@harbour-enterprises/superdoc 1.3.0-next.11 → 1.3.0-next.13
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-Dsxwbxdh.es.js → PdfViewer-DebfKi_n.es.js} +2 -2
- package/dist/chunks/{PdfViewer-DxthqP0q.cjs → PdfViewer-z2obaZHa.cjs} +2 -2
- package/dist/chunks/{SuperConverter-Caxoktb7.es.js → SuperConverter-Dh27SFeK.es.js} +13 -12
- package/dist/chunks/{SuperConverter-DgyRPhnD.cjs → SuperConverter-Dxl1uYvz.cjs} +2 -1
- package/dist/chunks/{index-CTQjsYpZ.cjs → index-C7p34V06.cjs} +30 -7
- package/dist/chunks/{index-BClM7AjD.cjs → index-DNdp0AxW.cjs} +147 -17
- package/dist/chunks/{index-D2CRfjhH.es.js → index-DOsTLvRQ.es.js} +30 -7
- package/dist/chunks/{index-CE0fU2k7.es.js → index-OlLDoLS-.es.js} +147 -17
- package/dist/style.css +33 -33
- 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 +174 -21
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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-Dh27SFeK.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 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";
|
|
@@ -10936,6 +10936,105 @@ const setSectionHeaderFooterAtSelection = ({ headerInches, footerInches } = {})
|
|
|
10936
10936
|
tr.setNodeMarkup(pos, void 0, nextAttrs, node.marks);
|
|
10937
10937
|
return true;
|
|
10938
10938
|
};
|
|
10939
|
+
function findGoverningSectPrParagraph(doc2, selectionPos) {
|
|
10940
|
+
const candidates = [];
|
|
10941
|
+
doc2.descendants((node, nodePos) => {
|
|
10942
|
+
if (node.type?.name === "paragraph" && node.attrs?.paragraphProperties?.sectPr) {
|
|
10943
|
+
candidates.push({ node, pos: nodePos });
|
|
10944
|
+
}
|
|
10945
|
+
});
|
|
10946
|
+
if (!candidates.length) return null;
|
|
10947
|
+
const inside = candidates.find((c2) => selectionPos >= c2.pos && selectionPos < c2.pos + c2.node.nodeSize);
|
|
10948
|
+
if (inside) return inside;
|
|
10949
|
+
const atOrAfter = candidates.find((c2) => c2.pos >= selectionPos);
|
|
10950
|
+
return atOrAfter ?? candidates[candidates.length - 1];
|
|
10951
|
+
}
|
|
10952
|
+
const setSectionPageMarginsAtSelection = ({ topInches, rightInches, bottomInches, leftInches } = {}) => ({ tr, state, editor }) => {
|
|
10953
|
+
if (!state || !editor) {
|
|
10954
|
+
console.warn("[setSectionPageMarginsAtSelection] Missing state or editor");
|
|
10955
|
+
return false;
|
|
10956
|
+
}
|
|
10957
|
+
const hasTop = typeof topInches === "number";
|
|
10958
|
+
const hasRight = typeof rightInches === "number";
|
|
10959
|
+
const hasBottom = typeof bottomInches === "number";
|
|
10960
|
+
const hasLeft = typeof leftInches === "number";
|
|
10961
|
+
if (!hasTop && !hasRight && !hasBottom && !hasLeft) {
|
|
10962
|
+
console.warn("[setSectionPageMarginsAtSelection] No margin values provided");
|
|
10963
|
+
return false;
|
|
10964
|
+
}
|
|
10965
|
+
if (hasTop && topInches < 0 || hasRight && rightInches < 0 || hasBottom && bottomInches < 0 || hasLeft && leftInches < 0) {
|
|
10966
|
+
console.warn("[setSectionPageMarginsAtSelection] Margin values must be >= 0");
|
|
10967
|
+
return false;
|
|
10968
|
+
}
|
|
10969
|
+
const updates = {};
|
|
10970
|
+
if (hasTop) updates.topInches = topInches;
|
|
10971
|
+
if (hasRight) updates.rightInches = rightInches;
|
|
10972
|
+
if (hasBottom) updates.bottomInches = bottomInches;
|
|
10973
|
+
if (hasLeft) updates.leftInches = leftInches;
|
|
10974
|
+
const { from: from3 } = state.selection;
|
|
10975
|
+
const governing = findGoverningSectPrParagraph(state.doc, from3);
|
|
10976
|
+
if (governing) {
|
|
10977
|
+
const { node, pos } = governing;
|
|
10978
|
+
const paraProps = node.attrs?.paragraphProperties || null;
|
|
10979
|
+
const existingSectPr = paraProps?.sectPr || null;
|
|
10980
|
+
if (!existingSectPr) {
|
|
10981
|
+
console.warn("[setSectionPageMarginsAtSelection] Paragraph found but has no sectPr");
|
|
10982
|
+
return false;
|
|
10983
|
+
}
|
|
10984
|
+
const sectPr2 = JSON.parse(JSON.stringify(existingSectPr));
|
|
10985
|
+
try {
|
|
10986
|
+
updateSectionMargins({ type: "sectPr", sectPr: sectPr2 }, updates);
|
|
10987
|
+
} catch (err) {
|
|
10988
|
+
console.error("[setSectionPageMarginsAtSelection] Failed to update sectPr:", err);
|
|
10989
|
+
return false;
|
|
10990
|
+
}
|
|
10991
|
+
const resolved = getSectPrMargins(sectPr2);
|
|
10992
|
+
const normalizedSectionMargins = {
|
|
10993
|
+
top: resolved.top ?? null,
|
|
10994
|
+
right: resolved.right ?? null,
|
|
10995
|
+
bottom: resolved.bottom ?? null,
|
|
10996
|
+
left: resolved.left ?? null,
|
|
10997
|
+
header: resolved.header ?? null,
|
|
10998
|
+
footer: resolved.footer ?? null
|
|
10999
|
+
};
|
|
11000
|
+
const newParagraphProperties = { ...paraProps || {}, sectPr: sectPr2 };
|
|
11001
|
+
const nextAttrs = {
|
|
11002
|
+
...node.attrs,
|
|
11003
|
+
paragraphProperties: newParagraphProperties,
|
|
11004
|
+
sectionMargins: normalizedSectionMargins
|
|
11005
|
+
};
|
|
11006
|
+
tr.setNodeMarkup(pos, void 0, nextAttrs, node.marks);
|
|
11007
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
11008
|
+
return true;
|
|
11009
|
+
}
|
|
11010
|
+
const docAttrs = state.doc.attrs ?? {};
|
|
11011
|
+
const converter = editor.converter ?? null;
|
|
11012
|
+
const baseBodySectPr = docAttrs.bodySectPr || converter?.bodySectPr || null;
|
|
11013
|
+
const sectPr = baseBodySectPr != null ? JSON.parse(JSON.stringify(baseBodySectPr)) : { type: "element", name: "w:sectPr", elements: [] };
|
|
11014
|
+
try {
|
|
11015
|
+
updateSectionMargins({ type: "sectPr", sectPr }, updates);
|
|
11016
|
+
} catch (err) {
|
|
11017
|
+
console.error("[setSectionPageMarginsAtSelection] Failed to update sectPr:", err);
|
|
11018
|
+
return false;
|
|
11019
|
+
}
|
|
11020
|
+
if (converter) {
|
|
11021
|
+
converter.bodySectPr = sectPr;
|
|
11022
|
+
if (!converter.pageStyles) converter.pageStyles = {};
|
|
11023
|
+
if (!converter.pageStyles.pageMargins) converter.pageStyles.pageMargins = {};
|
|
11024
|
+
const pageMargins = converter.pageStyles.pageMargins;
|
|
11025
|
+
const resolved = getSectPrMargins(sectPr);
|
|
11026
|
+
if (resolved.top != null) pageMargins.top = resolved.top;
|
|
11027
|
+
if (resolved.right != null) pageMargins.right = resolved.right;
|
|
11028
|
+
if (resolved.bottom != null) pageMargins.bottom = resolved.bottom;
|
|
11029
|
+
if (resolved.left != null) pageMargins.left = resolved.left;
|
|
11030
|
+
if (resolved.header != null) pageMargins.header = resolved.header;
|
|
11031
|
+
if (resolved.footer != null) pageMargins.footer = resolved.footer;
|
|
11032
|
+
}
|
|
11033
|
+
const nextDocAttrs = { ...docAttrs, bodySectPr: sectPr };
|
|
11034
|
+
tr.setNodeMarkup(0, void 0, nextDocAttrs);
|
|
11035
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
11036
|
+
return true;
|
|
11037
|
+
};
|
|
10939
11038
|
const insertSectionBreakAtSelection = ({ headerInches, footerInches } = {}) => ({ tr, state, editor }) => {
|
|
10940
11039
|
if (!state || !editor) {
|
|
10941
11040
|
console.warn("[insertSectionBreakAtSelection] Missing state or editor");
|
|
@@ -11467,6 +11566,7 @@ const commands$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
11467
11566
|
setMeta,
|
|
11468
11567
|
setNode,
|
|
11469
11568
|
setSectionHeaderFooterAtSelection,
|
|
11569
|
+
setSectionPageMarginsAtSelection,
|
|
11470
11570
|
setTextIndentation,
|
|
11471
11571
|
setTextSelection,
|
|
11472
11572
|
skipTab,
|
|
@@ -15334,7 +15434,7 @@ const canUseDOM = () => {
|
|
|
15334
15434
|
return false;
|
|
15335
15435
|
}
|
|
15336
15436
|
};
|
|
15337
|
-
const summaryVersion = "1.3.0-next.
|
|
15437
|
+
const summaryVersion = "1.3.0-next.13";
|
|
15338
15438
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15339
15439
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15340
15440
|
function mapAttributes(attrs) {
|
|
@@ -17336,9 +17436,8 @@ class Editor extends EventEmitter {
|
|
|
17336
17436
|
try {
|
|
17337
17437
|
const jsonObj = json;
|
|
17338
17438
|
const attrs = jsonObj.attrs;
|
|
17339
|
-
const hasBody = attrs && "bodySectPr" in attrs;
|
|
17340
17439
|
const converter = this.converter;
|
|
17341
|
-
if (
|
|
17440
|
+
if (converter && converter.bodySectPr) {
|
|
17342
17441
|
jsonObj.attrs = attrs || {};
|
|
17343
17442
|
jsonObj.attrs.bodySectPr = converter.bodySectPr;
|
|
17344
17443
|
}
|
|
@@ -17967,7 +18066,7 @@ class Editor extends EventEmitter {
|
|
|
17967
18066
|
* Process collaboration migrations
|
|
17968
18067
|
*/
|
|
17969
18068
|
processCollaborationMigrations() {
|
|
17970
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.
|
|
18069
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.13");
|
|
17971
18070
|
if (!this.options.ydoc) return;
|
|
17972
18071
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
17973
18072
|
let docVersion = metaMap.get("version");
|
|
@@ -43338,7 +43437,16 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
|
|
|
43338
43437
|
if (!value || typeof value !== "object") return;
|
|
43339
43438
|
return normalizePxIndent(value) ?? convertIndentTwipsToPx(value);
|
|
43340
43439
|
};
|
|
43341
|
-
const
|
|
43440
|
+
const hydratedIndentPx = convertIndentTwipsToPx(hydrated?.indent);
|
|
43441
|
+
const paragraphIndentPx = convertIndentTwipsToPx(paragraphProps.indent);
|
|
43442
|
+
const textIndentPx = normalizeParagraphIndent(attrs.textIndent);
|
|
43443
|
+
const attrsIndentPx = normalizeIndentObject(attrs.indent);
|
|
43444
|
+
const indentChain = [];
|
|
43445
|
+
if (hydratedIndentPx) indentChain.push({ indent: hydratedIndentPx });
|
|
43446
|
+
if (paragraphIndentPx) indentChain.push({ indent: paragraphIndentPx });
|
|
43447
|
+
if (textIndentPx) indentChain.push({ indent: textIndentPx });
|
|
43448
|
+
if (attrsIndentPx) indentChain.push({ indent: attrsIndentPx });
|
|
43449
|
+
const normalizedIndent = indentChain.length ? combineIndentProperties(indentChain).indent : void 0;
|
|
43342
43450
|
const unwrapTabStops = (tabStops) => {
|
|
43343
43451
|
if (!Array.isArray(tabStops)) {
|
|
43344
43452
|
return void 0;
|
|
@@ -49594,7 +49702,11 @@ async function measureTableBlock(block, constraints) {
|
|
|
49594
49702
|
}
|
|
49595
49703
|
async function measureImageBlock(block, constraints) {
|
|
49596
49704
|
const intrinsic = getIntrinsicImageSize(block, constraints.maxWidth);
|
|
49597
|
-
const
|
|
49705
|
+
const isBlockBehindDoc = block.anchor?.behindDoc;
|
|
49706
|
+
const isBlockWrapBehindDoc = block.wrap?.type === "None" && block.wrap?.behindDoc;
|
|
49707
|
+
const bypassWidthConstraint = isBlockBehindDoc || isBlockWrapBehindDoc;
|
|
49708
|
+
const isWidthConstraintBypassed = bypassWidthConstraint || constraints.maxWidth <= 0;
|
|
49709
|
+
const maxWidth = isWidthConstraintBypassed ? intrinsic.width : constraints.maxWidth;
|
|
49598
49710
|
const hasNegativeVerticalPosition = block.anchor?.isAnchored && (typeof block.anchor?.offsetV === "number" && block.anchor.offsetV < 0 || typeof block.margin?.top === "number" && block.margin.top < 0);
|
|
49599
49711
|
const maxHeight = hasNegativeVerticalPosition || !constraints.maxHeight || constraints.maxHeight <= 0 ? Infinity : constraints.maxHeight;
|
|
49600
49712
|
const widthScale = maxWidth / intrinsic.width;
|
|
@@ -54715,7 +54827,7 @@ class PresentationEditor extends EventEmitter {
|
|
|
54715
54827
|
const zoom = this.#layoutOptions.zoom ?? 1;
|
|
54716
54828
|
const layoutMode = this.#layoutOptions.layoutMode ?? "vertical";
|
|
54717
54829
|
const pages = this.#layoutState.layout?.pages;
|
|
54718
|
-
const pageGap = this.#
|
|
54830
|
+
const pageGap = this.#getEffectivePageGap();
|
|
54719
54831
|
const defaultWidth = this.#layoutOptions.pageSize?.w ?? DEFAULT_PAGE_SIZE.w;
|
|
54720
54832
|
const defaultHeight = this.#layoutOptions.pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
54721
54833
|
let maxWidth = defaultWidth;
|
|
@@ -57826,7 +57938,11 @@ const Document = Node$1.create({
|
|
|
57826
57938
|
*/
|
|
57827
57939
|
clearDocument: () => ({ commands: commands2 }) => {
|
|
57828
57940
|
return commands2.setContent("<p></p>");
|
|
57829
|
-
}
|
|
57941
|
+
},
|
|
57942
|
+
/**
|
|
57943
|
+
* Set section page margins (top/right/bottom/left) for the section at the current selection.
|
|
57944
|
+
*/
|
|
57945
|
+
setSectionPageMarginsAtSelection
|
|
57830
57946
|
};
|
|
57831
57947
|
}
|
|
57832
57948
|
});
|
|
@@ -64335,6 +64451,10 @@ const Image = Node$1.create({
|
|
|
64335
64451
|
}
|
|
64336
64452
|
const hasAnchorData = Boolean(anchorData);
|
|
64337
64453
|
const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
|
|
64454
|
+
const isWrapBehindDoc = wrap?.attrs?.behindDoc;
|
|
64455
|
+
const isAnchorBehindDoc = anchorData?.behindDoc;
|
|
64456
|
+
const isBehindDocAnchor = wrap?.type === "None" && (isWrapBehindDoc || isAnchorBehindDoc);
|
|
64457
|
+
const isAbsolutelyPositioned = style2.includes("position: absolute;");
|
|
64338
64458
|
if (hasAnchorData) {
|
|
64339
64459
|
switch (anchorData.hRelativeFrom) {
|
|
64340
64460
|
case "page":
|
|
@@ -64362,7 +64482,6 @@ const Image = Node$1.create({
|
|
|
64362
64482
|
style2 += "float: left;";
|
|
64363
64483
|
}
|
|
64364
64484
|
} else if (!anchorData.alignH && marginOffset?.horizontal != null) {
|
|
64365
|
-
const isAbsolutelyPositioned = style2.includes("position: absolute;");
|
|
64366
64485
|
if (isAbsolutelyPositioned) {
|
|
64367
64486
|
style2 += `left: ${baseHorizontal}px;`;
|
|
64368
64487
|
style2 += "max-width: none;";
|
|
@@ -64376,7 +64495,8 @@ const Image = Node$1.create({
|
|
|
64376
64495
|
const relativeFromPageV = anchorData?.vRelativeFrom === "page";
|
|
64377
64496
|
const relativeFromMarginV = anchorData?.vRelativeFrom === "margin";
|
|
64378
64497
|
const maxMarginV = 500;
|
|
64379
|
-
const
|
|
64498
|
+
const allowNegativeTopOffset = isBehindDocAnchor;
|
|
64499
|
+
const baseTop = allowNegativeTopOffset ? marginOffset?.top ?? 0 : Math.max(0, marginOffset?.top ?? 0);
|
|
64380
64500
|
let rotationHorizontal = 0;
|
|
64381
64501
|
let rotationTop = 0;
|
|
64382
64502
|
const { rotation: rotation2 } = transformData ?? {};
|
|
@@ -64395,7 +64515,10 @@ const Image = Node$1.create({
|
|
|
64395
64515
|
margin.left += horizontal;
|
|
64396
64516
|
}
|
|
64397
64517
|
}
|
|
64398
|
-
|
|
64518
|
+
const appliedTopViaStyle = isAbsolutelyPositioned && allowNegativeTopOffset && !relativeFromMarginV;
|
|
64519
|
+
if (appliedTopViaStyle) {
|
|
64520
|
+
style2 += `top: ${top2}px;`;
|
|
64521
|
+
} else if (top2 && !relativeFromMarginV) {
|
|
64399
64522
|
if (relativeFromPageV && top2 >= maxMarginV) margin.top += maxMarginV;
|
|
64400
64523
|
else margin.top += top2;
|
|
64401
64524
|
}
|
|
@@ -64408,6 +64531,9 @@ const Image = Node$1.create({
|
|
|
64408
64531
|
}
|
|
64409
64532
|
if (margin.top) style2 += `margin-top: ${margin.top}px;`;
|
|
64410
64533
|
if (margin.bottom) style2 += `margin-bottom: ${margin.bottom}px;`;
|
|
64534
|
+
if (isBehindDocAnchor) {
|
|
64535
|
+
style2 += "max-width: none;";
|
|
64536
|
+
}
|
|
64411
64537
|
const finalAttributes = { ...htmlAttributes };
|
|
64412
64538
|
if (style2) {
|
|
64413
64539
|
const existingStyle = finalAttributes.style || "";
|
|
@@ -90217,10 +90343,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
90217
90343
|
const handleMarginChange = ({ side, value }) => {
|
|
90218
90344
|
const base2 = activeEditor.value;
|
|
90219
90345
|
if (!base2) return;
|
|
90220
|
-
const
|
|
90221
|
-
const
|
|
90222
|
-
|
|
90223
|
-
|
|
90346
|
+
const payload = side === "left" ? { leftInches: value } : side === "right" ? { rightInches: value } : side === "top" ? { topInches: value } : side === "bottom" ? { bottomInches: value } : {};
|
|
90347
|
+
const didUpdateSection = typeof base2.commands?.setSectionPageMarginsAtSelection === "function" ? base2.commands.setSectionPageMarginsAtSelection(payload) : false;
|
|
90348
|
+
if (!didUpdateSection) {
|
|
90349
|
+
const pageStyles2 = base2.getPageStyles();
|
|
90350
|
+
const { pageMargins } = pageStyles2;
|
|
90351
|
+
const update = { ...pageMargins, [side]: value };
|
|
90352
|
+
base2?.updatePageStyle({ pageMargins: update });
|
|
90353
|
+
}
|
|
90224
90354
|
};
|
|
90225
90355
|
onBeforeUnmount(() => {
|
|
90226
90356
|
stopPolling();
|
|
@@ -90356,7 +90486,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
90356
90486
|
};
|
|
90357
90487
|
}
|
|
90358
90488
|
});
|
|
90359
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
90489
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3e9da07c"]]);
|
|
90360
90490
|
const _hoisted_1 = ["innerHTML"];
|
|
90361
90491
|
const _sfc_main = {
|
|
90362
90492
|
__name: "SuperInput",
|
package/dist/style.css
CHANGED
|
@@ -1978,10 +1978,10 @@ to {
|
|
|
1978
1978
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
1979
1979
|
}
|
|
1980
1980
|
|
|
1981
|
-
.editor-element[data-v-
|
|
1981
|
+
.editor-element[data-v-3e9da07c] {
|
|
1982
1982
|
position: relative;
|
|
1983
1983
|
}
|
|
1984
|
-
.super-editor-container[data-v-
|
|
1984
|
+
.super-editor-container[data-v-3e9da07c] {
|
|
1985
1985
|
width: auto;
|
|
1986
1986
|
height: auto;
|
|
1987
1987
|
/* min-width is controlled via inline style (containerStyle) to scale with zoom */
|
|
@@ -1990,14 +1990,14 @@ to {
|
|
|
1990
1990
|
display: flex;
|
|
1991
1991
|
flex-direction: column;
|
|
1992
1992
|
}
|
|
1993
|
-
.ruler[data-v-
|
|
1993
|
+
.ruler[data-v-3e9da07c] {
|
|
1994
1994
|
margin-bottom: 2px;
|
|
1995
1995
|
}
|
|
1996
|
-
.super-editor[data-v-
|
|
1996
|
+
.super-editor[data-v-3e9da07c] {
|
|
1997
1997
|
color: initial;
|
|
1998
1998
|
overflow: hidden;
|
|
1999
1999
|
}
|
|
2000
|
-
.placeholder-editor[data-v-
|
|
2000
|
+
.placeholder-editor[data-v-3e9da07c] {
|
|
2001
2001
|
position: absolute;
|
|
2002
2002
|
top: 0;
|
|
2003
2003
|
left: 0;
|
|
@@ -2009,7 +2009,7 @@ to {
|
|
|
2009
2009
|
background-color: white;
|
|
2010
2010
|
box-sizing: border-box;
|
|
2011
2011
|
}
|
|
2012
|
-
.placeholder-title[data-v-
|
|
2012
|
+
.placeholder-title[data-v-3e9da07c] {
|
|
2013
2013
|
display: flex;
|
|
2014
2014
|
justify-content: center;
|
|
2015
2015
|
margin-bottom: 40px;
|
|
@@ -2553,46 +2553,46 @@ img[data-v-7dd69850] {
|
|
|
2553
2553
|
display: none;
|
|
2554
2554
|
}
|
|
2555
2555
|
|
|
2556
|
-
.superdoc[data-v-
|
|
2556
|
+
.superdoc[data-v-5196811d] {
|
|
2557
2557
|
display: flex;
|
|
2558
2558
|
}
|
|
2559
|
-
.right-sidebar[data-v-
|
|
2559
|
+
.right-sidebar[data-v-5196811d] {
|
|
2560
2560
|
min-width: 320px;
|
|
2561
2561
|
}
|
|
2562
|
-
.floating-comments[data-v-
|
|
2562
|
+
.floating-comments[data-v-5196811d] {
|
|
2563
2563
|
min-width: 300px;
|
|
2564
2564
|
width: 300px;
|
|
2565
2565
|
}
|
|
2566
|
-
.superdoc__layers[data-v-
|
|
2566
|
+
.superdoc__layers[data-v-5196811d] {
|
|
2567
2567
|
height: 100%;
|
|
2568
2568
|
position: relative;
|
|
2569
2569
|
box-sizing: border-box;
|
|
2570
2570
|
}
|
|
2571
|
-
.superdoc__document[data-v-
|
|
2571
|
+
.superdoc__document[data-v-5196811d] {
|
|
2572
2572
|
width: 100%;
|
|
2573
2573
|
position: relative;
|
|
2574
2574
|
}
|
|
2575
|
-
.superdoc__sub-document[data-v-
|
|
2575
|
+
.superdoc__sub-document[data-v-5196811d] {
|
|
2576
2576
|
width: 100%;
|
|
2577
2577
|
position: relative;
|
|
2578
2578
|
}
|
|
2579
|
-
.superdoc__selection-layer[data-v-
|
|
2579
|
+
.superdoc__selection-layer[data-v-5196811d] {
|
|
2580
2580
|
position: absolute;
|
|
2581
2581
|
min-width: 100%;
|
|
2582
2582
|
min-height: 100%;
|
|
2583
2583
|
z-index: 10;
|
|
2584
2584
|
pointer-events: none;
|
|
2585
2585
|
}
|
|
2586
|
-
.superdoc__temp-selection[data-v-
|
|
2586
|
+
.superdoc__temp-selection[data-v-5196811d] {
|
|
2587
2587
|
position: absolute;
|
|
2588
2588
|
}
|
|
2589
|
-
.superdoc__comments-layer[data-v-
|
|
2589
|
+
.superdoc__comments-layer[data-v-5196811d] {
|
|
2590
2590
|
/* position: absolute; */
|
|
2591
2591
|
top: 0;
|
|
2592
2592
|
height: 100%;
|
|
2593
2593
|
position: relative;
|
|
2594
2594
|
}
|
|
2595
|
-
.superdoc__right-sidebar[data-v-
|
|
2595
|
+
.superdoc__right-sidebar[data-v-5196811d] {
|
|
2596
2596
|
width: 320px;
|
|
2597
2597
|
min-width: 320px;
|
|
2598
2598
|
padding: 0 10px;
|
|
@@ -2602,14 +2602,14 @@ img[data-v-7dd69850] {
|
|
|
2602
2602
|
}
|
|
2603
2603
|
|
|
2604
2604
|
/* Tools styles */
|
|
2605
|
-
.tools[data-v-
|
|
2605
|
+
.tools[data-v-5196811d] {
|
|
2606
2606
|
position: absolute;
|
|
2607
2607
|
z-index: 3;
|
|
2608
2608
|
display: flex;
|
|
2609
2609
|
flex-direction: column;
|
|
2610
2610
|
gap: 6px;
|
|
2611
2611
|
}
|
|
2612
|
-
.tools .tool-icon[data-v-
|
|
2612
|
+
.tools .tool-icon[data-v-5196811d] {
|
|
2613
2613
|
font-size: 20px;
|
|
2614
2614
|
border-radius: 12px;
|
|
2615
2615
|
border: none;
|
|
@@ -2617,7 +2617,7 @@ img[data-v-7dd69850] {
|
|
|
2617
2617
|
background-color: #dbdbdb;
|
|
2618
2618
|
cursor: pointer;
|
|
2619
2619
|
}
|
|
2620
|
-
.tools-item[data-v-
|
|
2620
|
+
.tools-item[data-v-5196811d] {
|
|
2621
2621
|
display: flex;
|
|
2622
2622
|
align-items: center;
|
|
2623
2623
|
justify-content: center;
|
|
@@ -2627,10 +2627,10 @@ img[data-v-7dd69850] {
|
|
|
2627
2627
|
border-radius: 12px;
|
|
2628
2628
|
cursor: pointer;
|
|
2629
2629
|
}
|
|
2630
|
-
.tools-item i[data-v-
|
|
2630
|
+
.tools-item i[data-v-5196811d] {
|
|
2631
2631
|
cursor: pointer;
|
|
2632
2632
|
}
|
|
2633
|
-
.superdoc__tools-icon[data-v-
|
|
2633
|
+
.superdoc__tools-icon[data-v-5196811d] {
|
|
2634
2634
|
width: 20px;
|
|
2635
2635
|
height: 20px;
|
|
2636
2636
|
flex-shrink: 0;
|
|
@@ -2645,15 +2645,15 @@ img[data-v-7dd69850] {
|
|
|
2645
2645
|
|
|
2646
2646
|
/* 834px is iPad screen size in portrait orientation */
|
|
2647
2647
|
@media (max-width: 834px) {
|
|
2648
|
-
.superdoc .superdoc__layers[data-v-
|
|
2648
|
+
.superdoc .superdoc__layers[data-v-5196811d] {
|
|
2649
2649
|
margin: 0;
|
|
2650
2650
|
border: 0 !important;
|
|
2651
2651
|
box-shadow: none;
|
|
2652
2652
|
}
|
|
2653
|
-
.superdoc__sub-document[data-v-
|
|
2653
|
+
.superdoc__sub-document[data-v-5196811d] {
|
|
2654
2654
|
max-width: 100%;
|
|
2655
2655
|
}
|
|
2656
|
-
.superdoc__right-sidebar[data-v-
|
|
2656
|
+
.superdoc__right-sidebar[data-v-5196811d] {
|
|
2657
2657
|
padding: 10px;
|
|
2658
2658
|
width: 55px;
|
|
2659
2659
|
position: relative;
|
|
@@ -2661,7 +2661,7 @@ img[data-v-7dd69850] {
|
|
|
2661
2661
|
}
|
|
2662
2662
|
|
|
2663
2663
|
/* AI Writer styles */
|
|
2664
|
-
.ai-writer-container[data-v-
|
|
2664
|
+
.ai-writer-container[data-v-5196811d] {
|
|
2665
2665
|
position: fixed;
|
|
2666
2666
|
z-index: 1000;
|
|
2667
2667
|
background: white;
|
|
@@ -2679,13 +2679,13 @@ img[data-v-7dd69850] {
|
|
|
2679
2679
|
} */
|
|
2680
2680
|
|
|
2681
2681
|
/* Tools styles */
|
|
2682
|
-
.tools[data-v-
|
|
2682
|
+
.tools[data-v-5196811d] {
|
|
2683
2683
|
position: absolute;
|
|
2684
2684
|
z-index: 3;
|
|
2685
2685
|
display: flex;
|
|
2686
2686
|
gap: 6px;
|
|
2687
2687
|
}
|
|
2688
|
-
.tools .tool-icon[data-v-
|
|
2688
|
+
.tools .tool-icon[data-v-5196811d] {
|
|
2689
2689
|
font-size: 20px;
|
|
2690
2690
|
border-radius: 12px;
|
|
2691
2691
|
border: none;
|
|
@@ -2693,7 +2693,7 @@ img[data-v-7dd69850] {
|
|
|
2693
2693
|
background-color: #dbdbdb;
|
|
2694
2694
|
cursor: pointer;
|
|
2695
2695
|
}
|
|
2696
|
-
.tools-item[data-v-
|
|
2696
|
+
.tools-item[data-v-5196811d] {
|
|
2697
2697
|
display: flex;
|
|
2698
2698
|
align-items: center;
|
|
2699
2699
|
justify-content: center;
|
|
@@ -2704,18 +2704,18 @@ img[data-v-7dd69850] {
|
|
|
2704
2704
|
border-radius: 12px;
|
|
2705
2705
|
cursor: pointer;
|
|
2706
2706
|
}
|
|
2707
|
-
.tools-item i[data-v-
|
|
2707
|
+
.tools-item i[data-v-5196811d] {
|
|
2708
2708
|
cursor: pointer;
|
|
2709
2709
|
}
|
|
2710
|
-
.superdoc__tools-icon[data-v-
|
|
2710
|
+
.superdoc__tools-icon[data-v-5196811d] {
|
|
2711
2711
|
width: 20px;
|
|
2712
2712
|
height: 20px;
|
|
2713
2713
|
flex-shrink: 0;
|
|
2714
2714
|
}
|
|
2715
|
-
.ai-tool > svg[data-v-
|
|
2715
|
+
.ai-tool > svg[data-v-5196811d] {
|
|
2716
2716
|
fill: transparent;
|
|
2717
2717
|
}
|
|
2718
|
-
.ai-tool[data-v-
|
|
2718
|
+
.ai-tool[data-v-5196811d]::before {
|
|
2719
2719
|
content: '';
|
|
2720
2720
|
position: absolute;
|
|
2721
2721
|
width: 20px;
|
|
@@ -2736,7 +2736,7 @@ img[data-v-7dd69850] {
|
|
|
2736
2736
|
filter: brightness(1.2);
|
|
2737
2737
|
transition: filter 0.2s ease;
|
|
2738
2738
|
}
|
|
2739
|
-
.ai-tool[data-v-
|
|
2739
|
+
.ai-tool[data-v-5196811d]:hover::before {
|
|
2740
2740
|
filter: brightness(1.3);
|
|
2741
2741
|
}
|
|
2742
2742
|
|
|
@@ -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-Dxl1uYvz.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-Dh27SFeK.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-DNdp0AxW.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-Dxl1uYvz.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-OlLDoLS-.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-OlLDoLS-.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-Dh27SFeK.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-DNdp0AxW.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-C7p34V06.cjs");
|
|
5
|
+
const superEditor_converter = require("./chunks/SuperConverter-Dxl1uYvz.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-OlLDoLS-.es.js";
|
|
2
|
+
import { D, H, P, S, c } from "./chunks/index-DOsTLvRQ.es.js";
|
|
3
|
+
import { S as S2, r } from "./chunks/SuperConverter-Dh27SFeK.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";
|