superdoc 1.13.0-next.2 → 1.13.0-next.4
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-DG0TJek4.es.js → PdfViewer-BZ-Q6H5z.es.js} +2 -2
- package/dist/chunks/{PdfViewer-DUcNxmEb.cjs → PdfViewer-CdbSEVLf.cjs} +2 -2
- package/dist/chunks/{SuperConverter-CdatvpcH.es.js → SuperConverter-B_NOnNVB.es.js} +1 -1
- package/dist/chunks/{SuperConverter-7up5TKGC.cjs → SuperConverter-CbFCp71X.cjs} +1 -1
- package/dist/chunks/{index-BgR2i-Ql.cjs → index--U-7Y4jp.cjs} +4 -4
- package/dist/chunks/{index-Dz85Qhsj.es.js → index-CqHfbpw2.es.js} +36 -19
- package/dist/chunks/{index-hbNHS8kg.cjs → index-DyQXEw93.cjs} +36 -19
- package/dist/chunks/{index-DmWJqwCi.es.js → index-n6o1E4Io.es.js} +4 -4
- package/dist/style.css +0 -12
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/tsconfig.types.tsbuildinfo +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 +37 -20
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, b as computed, r as ref, e as onMounted, f as onUnmounted, o as openBlock, c as createElementBlock, a as createBaseVNode, g as createVNode, u as unref, i as createCommentVNode } from "./vue-DiPLN5sT.es.js";
|
|
2
|
-
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-
|
|
3
|
-
import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-
|
|
2
|
+
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-n6o1E4Io.es.js";
|
|
3
|
+
import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-CqHfbpw2.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-BkoOkkmT.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const superdoc = require("./index--U-7Y4jp.cjs");
|
|
5
|
+
const index = require("./index-DyQXEw93.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -33817,7 +33817,7 @@ class SuperConverter {
|
|
|
33817
33817
|
static getStoredSuperdocVersion(docx) {
|
|
33818
33818
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
33819
33819
|
}
|
|
33820
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.13.0-next.
|
|
33820
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.13.0-next.4") {
|
|
33821
33821
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
33822
33822
|
}
|
|
33823
33823
|
/**
|
|
@@ -33818,7 +33818,7 @@ class SuperConverter {
|
|
|
33818
33818
|
static getStoredSuperdocVersion(docx) {
|
|
33819
33819
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
33820
33820
|
}
|
|
33821
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.13.0-next.
|
|
33821
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.13.0-next.4") {
|
|
33822
33822
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
33823
33823
|
}
|
|
33824
33824
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
2
|
+
const index = require("./index-DyQXEw93.cjs");
|
|
3
3
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
4
4
|
require("./helpers-OFep8CYR.cjs");
|
|
5
|
-
require("./SuperConverter-
|
|
5
|
+
require("./SuperConverter-CbFCp71X.cjs");
|
|
6
6
|
const eventemitter3 = require("./eventemitter3-D-UiF04J.cjs");
|
|
7
7
|
const vue = require("./vue-BkoOkkmT.cjs");
|
|
8
8
|
require("./jszip.min-oAFpNMh5.cjs");
|
|
@@ -8169,7 +8169,7 @@ const _sfc_main = {
|
|
|
8169
8169
|
__name: "SuperDoc",
|
|
8170
8170
|
emits: ["selection-update"],
|
|
8171
8171
|
setup(__props, { emit: __emit }) {
|
|
8172
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
8172
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CdbSEVLf.cjs")));
|
|
8173
8173
|
const superdocStore = useSuperdocStore();
|
|
8174
8174
|
const commentsStore = useCommentsStore();
|
|
8175
8175
|
const {
|
|
@@ -21642,7 +21642,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
21642
21642
|
this.config.colors = shuffleArray(this.config.colors);
|
|
21643
21643
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
21644
21644
|
this.colorIndex = 0;
|
|
21645
|
-
this.version = "1.13.0-next.
|
|
21645
|
+
this.version = "1.13.0-next.4";
|
|
21646
21646
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
21647
21647
|
this.superdocId = config.superdocId || uuid.v4();
|
|
21648
21648
|
this.colors = this.config.colors;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as Plugin, j as PluginKey, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$2, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as replaceStep$1, y as canJoin, z as joinPoint, 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, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as resolveTableCellProperties, a3 as decodeRPrFromMarks, a4 as carbonCopy, a5 as calculateResolvedParagraphProperties, a6 as encodeCSSFromPPr, a7 as encodeCSSFromRPr, a8 as generateOrderedListIndex, a9 as docxNumberingHelpers, aa as InputRule, ab as insertNewRelationship, ac as kebabCase$1, ad as getUnderlineCssString, ae as handleClipboardPaste } from "./SuperConverter-
|
|
1
|
+
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as Plugin, j as PluginKey, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$2, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as replaceStep$1, y as canJoin, z as joinPoint, 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, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as resolveTableCellProperties, a3 as decodeRPrFromMarks, a4 as carbonCopy, a5 as calculateResolvedParagraphProperties, a6 as encodeCSSFromPPr, a7 as encodeCSSFromRPr, a8 as generateOrderedListIndex, a9 as docxNumberingHelpers, aa as InputRule, ab as insertNewRelationship, ac as kebabCase$1, ad as getUnderlineCssString, ae as handleClipboardPaste } from "./SuperConverter-B_NOnNVB.es.js";
|
|
2
2
|
import { j as twipsToInches, m as inchesToTwips, p as ptToTwips, d as linesToTwips, f as twipsToLines, k as pixelsToTwips, z as resolveOpcTargetPath, B as Buffer$3, D as getArrayBufferFromUrl, h as halfPointToPoints, c as twipsToPixels$2, E as convertSizeToCSS, F as inchesToPixels } from "./helpers-BqdwtJE0.es.js";
|
|
3
3
|
import { p as process$1$2, r as ref, b as computed, c as createElementBlock, F as Fragment$1, U as renderList, O as withModifiers, o as openBlock, Q as normalizeClass, M as toDisplayString, i as createCommentVNode, a as createBaseVNode, V as createApp, e as onMounted, f as onUnmounted, u as unref, S as withDirectives, Y as vModelText, D as nextTick, N as normalizeStyle, B as watch, Z as withKeys, _ as createTextVNode, g as createVNode, h as h$1, $ as readonly, E as getCurrentInstance, l as onBeforeUnmount, s as reactive, m as onBeforeMount, j as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, k as provide, q as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, K as shallowRef, w as watchEffect, J as global$2, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, x as markRaw, P as createBlock, L as withCtx, a9 as useCssVars, W as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-DiPLN5sT.es.js";
|
|
4
4
|
import "./jszip.min-BCZQ7Wq2.es.js";
|
|
@@ -976,7 +976,7 @@ const DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
|
976
976
|
const COMMUNITY_LICENSE_KEY = "community-and-eval-agplv3";
|
|
977
977
|
function getSuperdocVersion() {
|
|
978
978
|
try {
|
|
979
|
-
return true ? "1.13.0-next.
|
|
979
|
+
return true ? "1.13.0-next.4" : "unknown";
|
|
980
980
|
} catch {
|
|
981
981
|
return "unknown";
|
|
982
982
|
}
|
|
@@ -17084,7 +17084,7 @@ const canUseDOM = () => {
|
|
|
17084
17084
|
return false;
|
|
17085
17085
|
}
|
|
17086
17086
|
};
|
|
17087
|
-
const summaryVersion = "1.13.0-next.
|
|
17087
|
+
const summaryVersion = "1.13.0-next.4";
|
|
17088
17088
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
17089
17089
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
17090
17090
|
function mapAttributes(attrs) {
|
|
@@ -19891,7 +19891,7 @@ class Editor extends EventEmitter {
|
|
|
19891
19891
|
* Process collaboration migrations
|
|
19892
19892
|
*/
|
|
19893
19893
|
processCollaborationMigrations() {
|
|
19894
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.13.0-next.
|
|
19894
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.13.0-next.4");
|
|
19895
19895
|
if (!this.options.ydoc) return;
|
|
19896
19896
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
19897
19897
|
let docVersion = metaMap.get("version");
|
|
@@ -46461,6 +46461,7 @@ function layoutDrawingBlock({
|
|
|
46461
46461
|
state.page.fragments.push(fragment);
|
|
46462
46462
|
state.cursorY += requiredHeight;
|
|
46463
46463
|
}
|
|
46464
|
+
const ANCHORED_TABLE_FULL_WIDTH_RATIO = 0.99;
|
|
46464
46465
|
function getTableIndentWidth(attrs) {
|
|
46465
46466
|
if (!attrs) {
|
|
46466
46467
|
return 0;
|
|
@@ -46831,8 +46832,13 @@ function layoutTableBlock({
|
|
|
46831
46832
|
advanceColumn,
|
|
46832
46833
|
columnX
|
|
46833
46834
|
}) {
|
|
46835
|
+
let treatAsInline = false;
|
|
46834
46836
|
if (block.anchor?.isAnchored) {
|
|
46835
|
-
|
|
46837
|
+
const totalWidth = measure.totalWidth ?? 0;
|
|
46838
|
+
treatAsInline = columnWidth > 0 && totalWidth >= columnWidth * ANCHORED_TABLE_FULL_WIDTH_RATIO;
|
|
46839
|
+
if (!treatAsInline) {
|
|
46840
|
+
return;
|
|
46841
|
+
}
|
|
46836
46842
|
}
|
|
46837
46843
|
const tableProps = block.attrs?.tableProperties;
|
|
46838
46844
|
const floatingProps = tableProps?.floatingTableProperties;
|
|
@@ -48487,18 +48493,6 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48487
48493
|
}
|
|
48488
48494
|
const anchorsForPara = anchoredByParagraph.get(index2);
|
|
48489
48495
|
const tablesForPara = anchoredTablesByParagraph.get(index2);
|
|
48490
|
-
if (tablesForPara) {
|
|
48491
|
-
const state = paginator.ensurePage();
|
|
48492
|
-
for (const { block: tableBlock, measure: tableMeasure } of tablesForPara) {
|
|
48493
|
-
if (placedAnchoredTableIds.has(tableBlock.id)) continue;
|
|
48494
|
-
floatManager.registerTable(tableBlock, tableMeasure, state.cursorY, state.columnIndex, state.page.number);
|
|
48495
|
-
const anchorX = tableBlock.anchor?.offsetH ?? columnX(state.columnIndex);
|
|
48496
|
-
const anchorY = state.cursorY + (tableBlock.anchor?.offsetV ?? 0);
|
|
48497
|
-
const tableFragment = createAnchoredTableFragment(tableBlock, tableMeasure, anchorX, anchorY);
|
|
48498
|
-
state.page.fragments.push(tableFragment);
|
|
48499
|
-
placedAnchoredTableIds.add(tableBlock.id);
|
|
48500
|
-
}
|
|
48501
|
-
}
|
|
48502
48496
|
const chain = keepNextChains.get(index2);
|
|
48503
48497
|
if (midChainIndices.has(index2)) ;
|
|
48504
48498
|
else if (chain) {
|
|
@@ -48571,6 +48565,7 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48571
48565
|
}
|
|
48572
48566
|
}
|
|
48573
48567
|
}
|
|
48568
|
+
const paragraphStartY = paginator.ensurePage().cursorY;
|
|
48574
48569
|
layoutParagraphBlock(
|
|
48575
48570
|
{
|
|
48576
48571
|
block,
|
|
@@ -48596,6 +48591,29 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48596
48591
|
placedAnchoredIds
|
|
48597
48592
|
} : void 0
|
|
48598
48593
|
);
|
|
48594
|
+
if (tablesForPara) {
|
|
48595
|
+
const state = paginator.ensurePage();
|
|
48596
|
+
const columnWidthForTable = getCurrentColumns().width;
|
|
48597
|
+
let tableBottomY = state.cursorY;
|
|
48598
|
+
for (const { block: tableBlock, measure: tableMeasure } of tablesForPara) {
|
|
48599
|
+
if (placedAnchoredTableIds.has(tableBlock.id)) continue;
|
|
48600
|
+
const totalWidth = tableMeasure.totalWidth ?? 0;
|
|
48601
|
+
if (columnWidthForTable > 0 && totalWidth >= columnWidthForTable * ANCHORED_TABLE_FULL_WIDTH_RATIO) continue;
|
|
48602
|
+
const offsetV = tableBlock.anchor?.offsetV ?? 0;
|
|
48603
|
+
const anchorY = Math.max(paragraphStartY + offsetV, state.cursorY);
|
|
48604
|
+
floatManager.registerTable(tableBlock, tableMeasure, anchorY, state.columnIndex, state.page.number);
|
|
48605
|
+
const anchorX = tableBlock.anchor?.offsetH ?? columnX(state.columnIndex);
|
|
48606
|
+
const tableFragment = createAnchoredTableFragment(tableBlock, tableMeasure, anchorX, anchorY);
|
|
48607
|
+
state.page.fragments.push(tableFragment);
|
|
48608
|
+
placedAnchoredTableIds.add(tableBlock.id);
|
|
48609
|
+
const wrapType = tableBlock.wrap?.type ?? "None";
|
|
48610
|
+
if (wrapType !== "None") {
|
|
48611
|
+
const bottom2 = anchorY + (tableMeasure.totalHeight ?? 0);
|
|
48612
|
+
if (bottom2 > tableBottomY) tableBottomY = bottom2;
|
|
48613
|
+
}
|
|
48614
|
+
}
|
|
48615
|
+
state.cursorY = tableBottomY;
|
|
48616
|
+
}
|
|
48599
48617
|
continue;
|
|
48600
48618
|
}
|
|
48601
48619
|
if (block.kind === "image") {
|
|
@@ -53855,8 +53873,7 @@ function renderRemoteCaret(options) {
|
|
|
53855
53873
|
caretEl.style.width = `${options.cursorStyles.CARET_WIDTH}px`;
|
|
53856
53874
|
caretEl.style.borderLeft = `${options.cursorStyles.CARET_WIDTH}px solid ${color}`;
|
|
53857
53875
|
caretEl.style.pointerEvents = "none";
|
|
53858
|
-
caretEl.style.transition = "
|
|
53859
|
-
caretEl.style.willChange = "transform";
|
|
53876
|
+
caretEl.style.transition = "opacity 100ms ease-out";
|
|
53860
53877
|
caretEl.setAttribute("data-client-id", options.cursor.clientId.toString());
|
|
53861
53878
|
caretEl.setAttribute("aria-hidden", "true");
|
|
53862
53879
|
if (options.presence?.showLabels !== false) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_converter = require("./SuperConverter-
|
|
2
|
+
const superEditor_converter = require("./SuperConverter-CbFCp71X.cjs");
|
|
3
3
|
const helpers$1 = require("./helpers-OFep8CYR.cjs");
|
|
4
4
|
const vue = require("./vue-BkoOkkmT.cjs");
|
|
5
5
|
require("./jszip.min-oAFpNMh5.cjs");
|
|
@@ -993,7 +993,7 @@ const DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
|
993
993
|
const COMMUNITY_LICENSE_KEY = "community-and-eval-agplv3";
|
|
994
994
|
function getSuperdocVersion() {
|
|
995
995
|
try {
|
|
996
|
-
return true ? "1.13.0-next.
|
|
996
|
+
return true ? "1.13.0-next.4" : "unknown";
|
|
997
997
|
} catch {
|
|
998
998
|
return "unknown";
|
|
999
999
|
}
|
|
@@ -17101,7 +17101,7 @@ const canUseDOM = () => {
|
|
|
17101
17101
|
return false;
|
|
17102
17102
|
}
|
|
17103
17103
|
};
|
|
17104
|
-
const summaryVersion = "1.13.0-next.
|
|
17104
|
+
const summaryVersion = "1.13.0-next.4";
|
|
17105
17105
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
17106
17106
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
17107
17107
|
function mapAttributes(attrs) {
|
|
@@ -19908,7 +19908,7 @@ class Editor extends EventEmitter {
|
|
|
19908
19908
|
* Process collaboration migrations
|
|
19909
19909
|
*/
|
|
19910
19910
|
processCollaborationMigrations() {
|
|
19911
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.13.0-next.
|
|
19911
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.13.0-next.4");
|
|
19912
19912
|
if (!this.options.ydoc) return;
|
|
19913
19913
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
19914
19914
|
let docVersion = metaMap.get("version");
|
|
@@ -46478,6 +46478,7 @@ function layoutDrawingBlock({
|
|
|
46478
46478
|
state.page.fragments.push(fragment);
|
|
46479
46479
|
state.cursorY += requiredHeight;
|
|
46480
46480
|
}
|
|
46481
|
+
const ANCHORED_TABLE_FULL_WIDTH_RATIO = 0.99;
|
|
46481
46482
|
function getTableIndentWidth(attrs) {
|
|
46482
46483
|
if (!attrs) {
|
|
46483
46484
|
return 0;
|
|
@@ -46848,8 +46849,13 @@ function layoutTableBlock({
|
|
|
46848
46849
|
advanceColumn,
|
|
46849
46850
|
columnX
|
|
46850
46851
|
}) {
|
|
46852
|
+
let treatAsInline = false;
|
|
46851
46853
|
if (block.anchor?.isAnchored) {
|
|
46852
|
-
|
|
46854
|
+
const totalWidth = measure.totalWidth ?? 0;
|
|
46855
|
+
treatAsInline = columnWidth > 0 && totalWidth >= columnWidth * ANCHORED_TABLE_FULL_WIDTH_RATIO;
|
|
46856
|
+
if (!treatAsInline) {
|
|
46857
|
+
return;
|
|
46858
|
+
}
|
|
46853
46859
|
}
|
|
46854
46860
|
const tableProps = block.attrs?.tableProperties;
|
|
46855
46861
|
const floatingProps = tableProps?.floatingTableProperties;
|
|
@@ -48504,18 +48510,6 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48504
48510
|
}
|
|
48505
48511
|
const anchorsForPara = anchoredByParagraph.get(index2);
|
|
48506
48512
|
const tablesForPara = anchoredTablesByParagraph.get(index2);
|
|
48507
|
-
if (tablesForPara) {
|
|
48508
|
-
const state = paginator.ensurePage();
|
|
48509
|
-
for (const { block: tableBlock, measure: tableMeasure } of tablesForPara) {
|
|
48510
|
-
if (placedAnchoredTableIds.has(tableBlock.id)) continue;
|
|
48511
|
-
floatManager.registerTable(tableBlock, tableMeasure, state.cursorY, state.columnIndex, state.page.number);
|
|
48512
|
-
const anchorX = tableBlock.anchor?.offsetH ?? columnX(state.columnIndex);
|
|
48513
|
-
const anchorY = state.cursorY + (tableBlock.anchor?.offsetV ?? 0);
|
|
48514
|
-
const tableFragment = createAnchoredTableFragment(tableBlock, tableMeasure, anchorX, anchorY);
|
|
48515
|
-
state.page.fragments.push(tableFragment);
|
|
48516
|
-
placedAnchoredTableIds.add(tableBlock.id);
|
|
48517
|
-
}
|
|
48518
|
-
}
|
|
48519
48513
|
const chain = keepNextChains.get(index2);
|
|
48520
48514
|
if (midChainIndices.has(index2)) ;
|
|
48521
48515
|
else if (chain) {
|
|
@@ -48588,6 +48582,7 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48588
48582
|
}
|
|
48589
48583
|
}
|
|
48590
48584
|
}
|
|
48585
|
+
const paragraphStartY = paginator.ensurePage().cursorY;
|
|
48591
48586
|
layoutParagraphBlock(
|
|
48592
48587
|
{
|
|
48593
48588
|
block,
|
|
@@ -48613,6 +48608,29 @@ function layoutDocument(blocks, measures, options = {}) {
|
|
|
48613
48608
|
placedAnchoredIds
|
|
48614
48609
|
} : void 0
|
|
48615
48610
|
);
|
|
48611
|
+
if (tablesForPara) {
|
|
48612
|
+
const state = paginator.ensurePage();
|
|
48613
|
+
const columnWidthForTable = getCurrentColumns().width;
|
|
48614
|
+
let tableBottomY = state.cursorY;
|
|
48615
|
+
for (const { block: tableBlock, measure: tableMeasure } of tablesForPara) {
|
|
48616
|
+
if (placedAnchoredTableIds.has(tableBlock.id)) continue;
|
|
48617
|
+
const totalWidth = tableMeasure.totalWidth ?? 0;
|
|
48618
|
+
if (columnWidthForTable > 0 && totalWidth >= columnWidthForTable * ANCHORED_TABLE_FULL_WIDTH_RATIO) continue;
|
|
48619
|
+
const offsetV = tableBlock.anchor?.offsetV ?? 0;
|
|
48620
|
+
const anchorY = Math.max(paragraphStartY + offsetV, state.cursorY);
|
|
48621
|
+
floatManager.registerTable(tableBlock, tableMeasure, anchorY, state.columnIndex, state.page.number);
|
|
48622
|
+
const anchorX = tableBlock.anchor?.offsetH ?? columnX(state.columnIndex);
|
|
48623
|
+
const tableFragment = createAnchoredTableFragment(tableBlock, tableMeasure, anchorX, anchorY);
|
|
48624
|
+
state.page.fragments.push(tableFragment);
|
|
48625
|
+
placedAnchoredTableIds.add(tableBlock.id);
|
|
48626
|
+
const wrapType = tableBlock.wrap?.type ?? "None";
|
|
48627
|
+
if (wrapType !== "None") {
|
|
48628
|
+
const bottom2 = anchorY + (tableMeasure.totalHeight ?? 0);
|
|
48629
|
+
if (bottom2 > tableBottomY) tableBottomY = bottom2;
|
|
48630
|
+
}
|
|
48631
|
+
}
|
|
48632
|
+
state.cursorY = tableBottomY;
|
|
48633
|
+
}
|
|
48616
48634
|
continue;
|
|
48617
48635
|
}
|
|
48618
48636
|
if (block.kind === "image") {
|
|
@@ -53872,8 +53890,7 @@ function renderRemoteCaret(options) {
|
|
|
53872
53890
|
caretEl.style.width = `${options.cursorStyles.CARET_WIDTH}px`;
|
|
53873
53891
|
caretEl.style.borderLeft = `${options.cursorStyles.CARET_WIDTH}px solid ${color}`;
|
|
53874
53892
|
caretEl.style.pointerEvents = "none";
|
|
53875
|
-
caretEl.style.transition = "
|
|
53876
|
-
caretEl.style.willChange = "transform";
|
|
53893
|
+
caretEl.style.transition = "opacity 100ms ease-out";
|
|
53877
53894
|
caretEl.setAttribute("data-client-id", options.cursor.clientId.toString());
|
|
53878
53895
|
caretEl.setAttribute("aria-hidden", "true");
|
|
53879
53896
|
if (options.presence?.showLabels !== false) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, l as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, f as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, d as SuperInput, aG as vClickOutside, P as PresentationEditor, c as SuperEditor, A as AIWriter, aH as NConfigProvider, aI as COMMUNITY_LICENSE_KEY, e as SuperToolbar } from "./index-
|
|
1
|
+
import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, l as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, f as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, d as SuperInput, aG as vClickOutside, P as PresentationEditor, c as SuperEditor, A as AIWriter, aH as NConfigProvider, aI as COMMUNITY_LICENSE_KEY, e as SuperToolbar } from "./index-CqHfbpw2.es.js";
|
|
2
2
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
3
3
|
import "./helpers-BqdwtJE0.es.js";
|
|
4
|
-
import "./SuperConverter-
|
|
4
|
+
import "./SuperConverter-B_NOnNVB.es.js";
|
|
5
5
|
import { E as EventEmitter$1 } from "./eventemitter3-DdGu2UnW.es.js";
|
|
6
6
|
import { j as inject, k as provide, b as computed, l as onBeforeUnmount, p as process$1, m as onBeforeMount, d as defineComponent, h, t as toRef, T as Transition, n as TransitionGroup, w as watchEffect, r as ref, e as onMounted, q as Teleport, F as Fragment, s as reactive, v as effectScope, x as markRaw, y as toRaw, z as isRef, A as isReactive, B as watch, u as unref, C as hasInjectionContext, D as nextTick, E as getCurrentInstance, G as getCurrentScope, H as onScopeDispose, I as toRefs, J as global, K as shallowRef, o as openBlock, c as createElementBlock, g as createVNode, L as withCtx, a as createBaseVNode, M as toDisplayString, N as normalizeStyle, i as createCommentVNode, O as withModifiers, P as createBlock, Q as normalizeClass, R as resolveDirective, S as withDirectives, U as renderList, V as createApp, W as resolveDynamicComponent, X as defineAsyncComponent } from "./vue-DiPLN5sT.es.js";
|
|
7
7
|
import "./jszip.min-BCZQ7Wq2.es.js";
|
|
@@ -8152,7 +8152,7 @@ const _sfc_main = {
|
|
|
8152
8152
|
__name: "SuperDoc",
|
|
8153
8153
|
emits: ["selection-update"],
|
|
8154
8154
|
setup(__props, { emit: __emit }) {
|
|
8155
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
8155
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-BZ-Q6H5z.es.js"));
|
|
8156
8156
|
const superdocStore = useSuperdocStore();
|
|
8157
8157
|
const commentsStore = useCommentsStore();
|
|
8158
8158
|
const {
|
|
@@ -21625,7 +21625,7 @@ class SuperDoc extends EventEmitter$1 {
|
|
|
21625
21625
|
this.config.colors = shuffleArray(this.config.colors);
|
|
21626
21626
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
21627
21627
|
this.colorIndex = 0;
|
|
21628
|
-
this.version = "1.13.0-next.
|
|
21628
|
+
this.version = "1.13.0-next.4";
|
|
21629
21629
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
21630
21630
|
this.superdocId = config.superdocId || v4();
|
|
21631
21631
|
this.colors = this.config.colors;
|
package/dist/style.css
CHANGED
|
@@ -324,11 +324,6 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
324
324
|
.presentation-editor__remote-caret {
|
|
325
325
|
position: absolute;
|
|
326
326
|
pointer-events: none;
|
|
327
|
-
/* Smooth transitions for cursor movement */
|
|
328
|
-
transition:
|
|
329
|
-
left 0.1s ease-out,
|
|
330
|
-
top 0.1s ease-out,
|
|
331
|
-
height 0.1s ease-out;
|
|
332
327
|
}
|
|
333
328
|
.presentation-editor__remote-label {
|
|
334
329
|
position: absolute;
|
|
@@ -351,13 +346,6 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
351
346
|
position: absolute;
|
|
352
347
|
border-radius: 2px;
|
|
353
348
|
pointer-events: none;
|
|
354
|
-
/* Smooth transitions for selection changes */
|
|
355
|
-
transition:
|
|
356
|
-
left 0.1s ease-out,
|
|
357
|
-
top 0.1s ease-out,
|
|
358
|
-
width 0.1s ease-out,
|
|
359
|
-
height 0.1s ease-out,
|
|
360
|
-
opacity 0.15s ease-out;
|
|
361
349
|
/* Better color blending with text (multiply mode shows text more clearly through highlights) */
|
|
362
350
|
mix-blend-mode: multiply;
|
|
363
351
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../chunks/helpers-OFep8CYR.cjs");
|
|
4
|
-
const superEditor_converter = require("../chunks/SuperConverter-
|
|
4
|
+
const superEditor_converter = require("../chunks/SuperConverter-CbFCp71X.cjs");
|
|
5
5
|
require("../chunks/uuid-R7L08bOx.cjs");
|
|
6
6
|
exports.SuperConverter = superEditor_converter.SuperConverter;
|