superdoc 1.0.0-beta.70 → 1.0.0-beta.72
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-Li0IVylM.cjs → PdfViewer-BxCLl7Q6.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DSqV0wBl.es.js → PdfViewer-Dg-qiC1A.es.js} +1 -1
- package/dist/chunks/{index-atbbnwyB.es.js → index-B1AqHbuy.es.js} +3 -3
- package/dist/chunks/{index-CJCOemVA.cjs → index-CAQDtLex.cjs} +3 -3
- package/dist/chunks/{index-DruHtc6s-CBCtA0Ud.cjs → index-qXb-Hmel-BPsIpdLY.cjs} +1 -1
- package/dist/chunks/{index-DruHtc6s-CPc5HSle.es.js → index-qXb-Hmel-DwJhkxdW.es.js} +1 -1
- package/dist/chunks/{super-editor.es-4JNmJF9G.es.js → super-editor.es-DPl3-zTR.es.js} +257 -16
- package/dist/chunks/{super-editor.es-CzBIlSB8.cjs → super-editor.es-DxG6ckVG.cjs} +257 -16
- package/dist/style.css +7 -8
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-B4HiY8pI.js → converter-JlOFMM88.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-D7YJSyKT.js → docx-zipper-BVmpz1K_.js} +1 -1
- package/dist/super-editor/chunks/{editor-C9smgNs-.js → editor-CNzx36Ms.js} +198 -7
- package/dist/super-editor/chunks/{index-DruHtc6s.js → index-qXb-Hmel.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BuJaDiNO.js → toolbar-DAhwzyFV.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +7 -8
- package/dist/super-editor/super-editor.es.js +66 -16
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +259 -18
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -42326,7 +42326,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
42326
42326
|
static getStoredSuperdocVersion(docx) {
|
|
42327
42327
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42328
42328
|
}
|
|
42329
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42329
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.72") {
|
|
42330
42330
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42331
42331
|
}
|
|
42332
42332
|
/**
|
|
@@ -59515,7 +59515,7 @@ const isHeadless = (editor) => {
|
|
|
59515
59515
|
const shouldSkipNodeView = (editor) => {
|
|
59516
59516
|
return isHeadless(editor);
|
|
59517
59517
|
};
|
|
59518
|
-
const summaryVersion = "1.0.0-beta.
|
|
59518
|
+
const summaryVersion = "1.0.0-beta.72";
|
|
59519
59519
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
59520
59520
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
59521
59521
|
function mapAttributes(attrs) {
|
|
@@ -60304,7 +60304,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60304
60304
|
{ default: remarkStringify },
|
|
60305
60305
|
{ default: remarkGfm }
|
|
60306
60306
|
] = await Promise.all([
|
|
60307
|
-
Promise.resolve().then(() => require("./index-
|
|
60307
|
+
Promise.resolve().then(() => require("./index-qXb-Hmel-BPsIpdLY.cjs")),
|
|
60308
60308
|
Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
|
|
60309
60309
|
Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
|
|
60310
60310
|
Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
|
|
@@ -60509,7 +60509,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60509
60509
|
* Process collaboration migrations
|
|
60510
60510
|
*/
|
|
60511
60511
|
processCollaborationMigrations() {
|
|
60512
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
60512
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.72");
|
|
60513
60513
|
if (!this.options.ydoc) return;
|
|
60514
60514
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
60515
60515
|
let docVersion = metaMap.get("version");
|
|
@@ -85086,6 +85086,109 @@ const _PresentationEditor = class _PresentationEditor2 extends EventEmitter$1 {
|
|
|
85086
85086
|
const activeEditor = this.getActiveEditor();
|
|
85087
85087
|
return activeEditor.commands;
|
|
85088
85088
|
}
|
|
85089
|
+
/**
|
|
85090
|
+
* Get the ProseMirror editor state for the currently active editor (header/footer-aware).
|
|
85091
|
+
*
|
|
85092
|
+
* This property dynamically returns the state from the appropriate editor instance:
|
|
85093
|
+
* - In body mode, returns the main editor's state
|
|
85094
|
+
* - In header/footer mode, returns the active header/footer editor's state
|
|
85095
|
+
*
|
|
85096
|
+
* This enables components like SlashMenu and context menus to access document
|
|
85097
|
+
* state, selection, and schema information in the correct editing context.
|
|
85098
|
+
*
|
|
85099
|
+
* @returns The EditorState for the active editor
|
|
85100
|
+
*
|
|
85101
|
+
* @example
|
|
85102
|
+
* ```typescript
|
|
85103
|
+
* const { selection, doc } = presentationEditor.state;
|
|
85104
|
+
* const selectedText = doc.textBetween(selection.from, selection.to);
|
|
85105
|
+
* ```
|
|
85106
|
+
*/
|
|
85107
|
+
get state() {
|
|
85108
|
+
return this.getActiveEditor().state;
|
|
85109
|
+
}
|
|
85110
|
+
/**
|
|
85111
|
+
* Check if the editor is currently editable (header/footer-aware).
|
|
85112
|
+
*
|
|
85113
|
+
* This property checks the editable state of the currently active editor:
|
|
85114
|
+
* - In body mode, returns whether the main editor is editable
|
|
85115
|
+
* - In header/footer mode, returns whether the header/footer editor is editable
|
|
85116
|
+
*
|
|
85117
|
+
* The editor may be non-editable due to:
|
|
85118
|
+
* - Document mode set to 'viewing'
|
|
85119
|
+
* - Explicit `editable: false` option
|
|
85120
|
+
* - Editor not fully initialized
|
|
85121
|
+
*
|
|
85122
|
+
* @returns true if the active editor accepts input, false otherwise
|
|
85123
|
+
*
|
|
85124
|
+
* @example
|
|
85125
|
+
* ```typescript
|
|
85126
|
+
* if (presentationEditor.isEditable) {
|
|
85127
|
+
* presentationEditor.commands.insertText('Hello');
|
|
85128
|
+
* }
|
|
85129
|
+
* ```
|
|
85130
|
+
*/
|
|
85131
|
+
get isEditable() {
|
|
85132
|
+
return this.getActiveEditor().isEditable;
|
|
85133
|
+
}
|
|
85134
|
+
/**
|
|
85135
|
+
* Get the editor options for the currently active editor (header/footer-aware).
|
|
85136
|
+
*
|
|
85137
|
+
* This property returns the options object from the appropriate editor instance,
|
|
85138
|
+
* providing access to configuration like document mode, AI settings, and custom
|
|
85139
|
+
* slash menu configuration.
|
|
85140
|
+
*
|
|
85141
|
+
* @returns The options object for the active editor
|
|
85142
|
+
*
|
|
85143
|
+
* @example
|
|
85144
|
+
* ```typescript
|
|
85145
|
+
* const { documentMode, isAiEnabled } = presentationEditor.options;
|
|
85146
|
+
* ```
|
|
85147
|
+
*/
|
|
85148
|
+
get options() {
|
|
85149
|
+
return this.getActiveEditor().options;
|
|
85150
|
+
}
|
|
85151
|
+
/**
|
|
85152
|
+
* Dispatch a ProseMirror transaction to the currently active editor (header/footer-aware).
|
|
85153
|
+
*
|
|
85154
|
+
* This method routes transactions to the appropriate editor instance:
|
|
85155
|
+
* - In body mode, dispatches to the main editor
|
|
85156
|
+
* - In header/footer mode, dispatches to the active header/footer editor
|
|
85157
|
+
*
|
|
85158
|
+
* Use this for direct state manipulation when commands are insufficient.
|
|
85159
|
+
* For most use cases, prefer using `commands` or `dispatchInActiveEditor`.
|
|
85160
|
+
*
|
|
85161
|
+
* @param tr - The ProseMirror transaction to dispatch
|
|
85162
|
+
*
|
|
85163
|
+
* @example
|
|
85164
|
+
* ```typescript
|
|
85165
|
+
* const { state } = presentationEditor;
|
|
85166
|
+
* const tr = state.tr.insertText('Hello', state.selection.from);
|
|
85167
|
+
* presentationEditor.dispatch(tr);
|
|
85168
|
+
* ```
|
|
85169
|
+
*/
|
|
85170
|
+
dispatch(tr) {
|
|
85171
|
+
const activeEditor = this.getActiveEditor();
|
|
85172
|
+
activeEditor.view?.dispatch(tr);
|
|
85173
|
+
}
|
|
85174
|
+
/**
|
|
85175
|
+
* Focus the editor, routing focus to the appropriate editing surface.
|
|
85176
|
+
*
|
|
85177
|
+
* In PresentationEditor, the actual ProseMirror EditorView is hidden and input
|
|
85178
|
+
* is bridged from the visible layout surface. This method focuses the hidden
|
|
85179
|
+
* editor view to enable keyboard input while the visual focus remains on the
|
|
85180
|
+
* rendered presentation.
|
|
85181
|
+
*
|
|
85182
|
+
* @example
|
|
85183
|
+
* ```typescript
|
|
85184
|
+
* // After closing a modal, restore focus to the editor
|
|
85185
|
+
* presentationEditor.focus();
|
|
85186
|
+
* ```
|
|
85187
|
+
*/
|
|
85188
|
+
focus() {
|
|
85189
|
+
const activeEditor = this.getActiveEditor();
|
|
85190
|
+
activeEditor.view?.focus();
|
|
85191
|
+
}
|
|
85089
85192
|
/**
|
|
85090
85193
|
* Returns the currently active editor (body or header/footer session).
|
|
85091
85194
|
*
|
|
@@ -85551,6 +85654,74 @@ const _PresentationEditor = class _PresentationEditor2 extends EventEmitter$1 {
|
|
|
85551
85654
|
getLayoutOptions() {
|
|
85552
85655
|
return { ...__privateGet$1(this, _layoutOptions) };
|
|
85553
85656
|
}
|
|
85657
|
+
/**
|
|
85658
|
+
* Get the page styles for the section containing the current caret position.
|
|
85659
|
+
*
|
|
85660
|
+
* In multi-section documents, different sections can have different page sizes,
|
|
85661
|
+
* margins, and orientations. This method returns the styles for the section
|
|
85662
|
+
* where the caret is currently located, enabling section-aware UI components
|
|
85663
|
+
* like rulers to display accurate information.
|
|
85664
|
+
*
|
|
85665
|
+
* @returns Object containing:
|
|
85666
|
+
* - pageSize: { width, height } in inches
|
|
85667
|
+
* - pageMargins: { left, right, top, bottom } in inches
|
|
85668
|
+
* - sectionIndex: The current section index (0-based)
|
|
85669
|
+
* - orientation: 'portrait' or 'landscape'
|
|
85670
|
+
*
|
|
85671
|
+
* Falls back to document-level defaults if section info is unavailable.
|
|
85672
|
+
*
|
|
85673
|
+
* @example
|
|
85674
|
+
* ```typescript
|
|
85675
|
+
* const sectionStyles = presentation.getCurrentSectionPageStyles();
|
|
85676
|
+
* console.log(`Section ${sectionStyles.sectionIndex}: ${sectionStyles.pageSize.width}" x ${sectionStyles.pageSize.height}"`);
|
|
85677
|
+
* ```
|
|
85678
|
+
*/
|
|
85679
|
+
getCurrentSectionPageStyles() {
|
|
85680
|
+
const PPI2 = 96;
|
|
85681
|
+
const layout = __privateGet$1(this, _layoutState).layout;
|
|
85682
|
+
const pageIndex = __privateMethod$1(this, _PresentationEditor_instances, getCurrentPageIndex_fn).call(this);
|
|
85683
|
+
const page = layout?.pages?.[pageIndex];
|
|
85684
|
+
const converterStyles = __privateGet$1(this, _editor3).converter?.pageStyles ?? {};
|
|
85685
|
+
const defaultMargins = converterStyles.pageMargins ?? { left: 1, right: 1, top: 1, bottom: 1 };
|
|
85686
|
+
const safeMargins = {
|
|
85687
|
+
left: typeof defaultMargins.left === "number" ? defaultMargins.left : 1,
|
|
85688
|
+
right: typeof defaultMargins.right === "number" ? defaultMargins.right : 1,
|
|
85689
|
+
top: typeof defaultMargins.top === "number" ? defaultMargins.top : 1,
|
|
85690
|
+
bottom: typeof defaultMargins.bottom === "number" ? defaultMargins.bottom : 1
|
|
85691
|
+
};
|
|
85692
|
+
if (!page) {
|
|
85693
|
+
return {
|
|
85694
|
+
pageSize: { width: 8.5, height: 11 },
|
|
85695
|
+
pageMargins: safeMargins,
|
|
85696
|
+
sectionIndex: 0,
|
|
85697
|
+
orientation: "portrait"
|
|
85698
|
+
};
|
|
85699
|
+
}
|
|
85700
|
+
const pageOrientation = page.orientation === "landscape" || page.orientation === "portrait" ? page.orientation : "portrait";
|
|
85701
|
+
const standardPortrait = { w: 8.5 * PPI2, h: 11 * PPI2 };
|
|
85702
|
+
const standardLandscape = { w: 11 * PPI2, h: 8.5 * PPI2 };
|
|
85703
|
+
const orientationDefault = pageOrientation === "landscape" ? standardLandscape : standardPortrait;
|
|
85704
|
+
const pageWidthPx = page.size?.w ?? orientationDefault.w;
|
|
85705
|
+
const pageHeightPx = page.size?.h ?? orientationDefault.h;
|
|
85706
|
+
const marginLeftPx = page.margins?.left ?? safeMargins.left * PPI2;
|
|
85707
|
+
const marginRightPx = page.margins?.right ?? safeMargins.right * PPI2;
|
|
85708
|
+
const marginTopPx = page.margins?.top ?? safeMargins.top * PPI2;
|
|
85709
|
+
const marginBottomPx = page.margins?.bottom ?? safeMargins.bottom * PPI2;
|
|
85710
|
+
return {
|
|
85711
|
+
pageSize: {
|
|
85712
|
+
width: pageWidthPx / PPI2,
|
|
85713
|
+
height: pageHeightPx / PPI2
|
|
85714
|
+
},
|
|
85715
|
+
pageMargins: {
|
|
85716
|
+
left: marginLeftPx / PPI2,
|
|
85717
|
+
right: marginRightPx / PPI2,
|
|
85718
|
+
top: marginTopPx / PPI2,
|
|
85719
|
+
bottom: marginBottomPx / PPI2
|
|
85720
|
+
},
|
|
85721
|
+
sectionIndex: page.sectionIndex ?? 0,
|
|
85722
|
+
orientation: pageOrientation
|
|
85723
|
+
};
|
|
85724
|
+
}
|
|
85554
85725
|
/**
|
|
85555
85726
|
* Get current remote cursor states (normalized to absolute PM positions).
|
|
85556
85727
|
* Returns an array of cursor states for all remote collaborators, excluding the local user.
|
|
@@ -88445,9 +88616,26 @@ getCurrentPageIndex_fn = function() {
|
|
|
88445
88616
|
}
|
|
88446
88617
|
const layout = __privateGet$1(this, _layoutState).layout;
|
|
88447
88618
|
const selection = __privateGet$1(this, _editor3).state?.selection;
|
|
88448
|
-
if (!layout || !selection)
|
|
88619
|
+
if (!layout || !selection) {
|
|
88620
|
+
return 0;
|
|
88621
|
+
}
|
|
88449
88622
|
const rects = selectionToRects(layout, __privateGet$1(this, _layoutState).blocks, __privateGet$1(this, _layoutState).measures, selection.from, selection.to) ?? [];
|
|
88450
|
-
|
|
88623
|
+
if (rects.length > 0) {
|
|
88624
|
+
return rects[0]?.pageIndex ?? 0;
|
|
88625
|
+
}
|
|
88626
|
+
const pos = selection.from;
|
|
88627
|
+
for (let pageIdx = 0; pageIdx < layout.pages.length; pageIdx++) {
|
|
88628
|
+
const page = layout.pages[pageIdx];
|
|
88629
|
+
for (const fragment of page.fragments) {
|
|
88630
|
+
const frag = fragment;
|
|
88631
|
+
if (frag.pmStart != null && frag.pmEnd != null) {
|
|
88632
|
+
if (pos >= frag.pmStart && pos <= frag.pmEnd) {
|
|
88633
|
+
return pageIdx;
|
|
88634
|
+
}
|
|
88635
|
+
}
|
|
88636
|
+
}
|
|
88637
|
+
}
|
|
88638
|
+
return 0;
|
|
88451
88639
|
};
|
|
88452
88640
|
findRegionForPage_fn = function(kind, pageIndex) {
|
|
88453
88641
|
const map22 = kind === "header" ? __privateGet$1(this, _headerRegions) : __privateGet$1(this, _footerRegions);
|
|
@@ -89865,6 +90053,9 @@ const processAiHighlights = (editor, doc2, highlightColor, customClass = null) =
|
|
|
89865
90053
|
};
|
|
89866
90054
|
function getEditorSurfaceElement(editor) {
|
|
89867
90055
|
if (!editor) return null;
|
|
90056
|
+
if (typeof editor.hitTest === "function" && editor.element instanceof HTMLElement) {
|
|
90057
|
+
return editor.element;
|
|
90058
|
+
}
|
|
89868
90059
|
return editor.presentationEditor?.element ?? editor.view?.dom ?? editor.options?.element ?? null;
|
|
89869
90060
|
}
|
|
89870
90061
|
function getSurfaceRelativePoint(editor, eventLocation = {}) {
|
|
@@ -123009,7 +123200,7 @@ const _sfc_main$8 = {
|
|
|
123009
123200
|
vue.onMounted(() => {
|
|
123010
123201
|
if (!props.editor) return;
|
|
123011
123202
|
document.addEventListener("keydown", handleGlobalKeyDown);
|
|
123012
|
-
document.addEventListener("
|
|
123203
|
+
document.addEventListener("pointerdown", handleGlobalOutsideClick);
|
|
123013
123204
|
props.editor.on("update", handleEditorUpdate);
|
|
123014
123205
|
slashMenuOpenHandler = async (event) => {
|
|
123015
123206
|
const readOnly = !props.editor?.isEditable;
|
|
@@ -123043,7 +123234,7 @@ const _sfc_main$8 = {
|
|
|
123043
123234
|
});
|
|
123044
123235
|
vue.onBeforeUnmount(() => {
|
|
123045
123236
|
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
123046
|
-
document.removeEventListener("
|
|
123237
|
+
document.removeEventListener("pointerdown", handleGlobalOutsideClick);
|
|
123047
123238
|
cleanupCustomItems();
|
|
123048
123239
|
if (props.editor) {
|
|
123049
123240
|
try {
|
|
@@ -123067,7 +123258,7 @@ const _sfc_main$8 = {
|
|
|
123067
123258
|
ref: menuRef,
|
|
123068
123259
|
class: "slash-menu",
|
|
123069
123260
|
style: vue.normalizeStyle(menuPosition.value),
|
|
123070
|
-
|
|
123261
|
+
onPointerdown: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
123071
123262
|
}, ["stop"]))
|
|
123072
123263
|
}, [
|
|
123073
123264
|
vue.withDirectives(vue.createBaseVNode("input", {
|
|
@@ -123179,6 +123370,7 @@ const _sfc_main$6 = {
|
|
|
123179
123370
|
const rulerHandleActiveColor = vue.ref("#2563EB66");
|
|
123180
123371
|
const pageSize = vue.ref(null);
|
|
123181
123372
|
const pageMargins = vue.ref(null);
|
|
123373
|
+
const currentSectionIndex = vue.ref(0);
|
|
123182
123374
|
const isDragging = vue.ref(false);
|
|
123183
123375
|
const currentHandle = vue.ref(null);
|
|
123184
123376
|
const leftHandle = vue.reactive({ side: "left", x: 0 });
|
|
@@ -123186,9 +123378,29 @@ const _sfc_main$6 = {
|
|
|
123186
123378
|
const showVerticalIndicator = vue.ref(false);
|
|
123187
123379
|
const initialX = vue.ref(0);
|
|
123188
123380
|
let offsetX = 0;
|
|
123189
|
-
|
|
123190
|
-
|
|
123191
|
-
|
|
123381
|
+
let selectionUpdateHandler = null;
|
|
123382
|
+
const getPresentationEditor = () => {
|
|
123383
|
+
return props.editor?.presentationEditor ?? null;
|
|
123384
|
+
};
|
|
123385
|
+
const updateRulerForCurrentSection = () => {
|
|
123386
|
+
if (!props.editor || props.editor.options?.mode !== "docx") return;
|
|
123387
|
+
const presentationEditor = getPresentationEditor();
|
|
123388
|
+
let docSize, docMargins, sectionIndex;
|
|
123389
|
+
if (presentationEditor && typeof presentationEditor.getCurrentSectionPageStyles === "function") {
|
|
123390
|
+
const sectionStyles = presentationEditor.getCurrentSectionPageStyles();
|
|
123391
|
+
docSize = sectionStyles.pageSize;
|
|
123392
|
+
docMargins = sectionStyles.pageMargins;
|
|
123393
|
+
sectionIndex = sectionStyles.sectionIndex;
|
|
123394
|
+
} else {
|
|
123395
|
+
const styles = props.editor.getPageStyles();
|
|
123396
|
+
docSize = styles.pageSize ?? { width: 8.5, height: 11 };
|
|
123397
|
+
docMargins = styles.pageMargins ?? { left: 1, right: 1, top: 1, bottom: 1 };
|
|
123398
|
+
sectionIndex = 0;
|
|
123399
|
+
}
|
|
123400
|
+
if (pageSize.value && currentSectionIndex.value === sectionIndex) {
|
|
123401
|
+
return;
|
|
123402
|
+
}
|
|
123403
|
+
currentSectionIndex.value = sectionIndex;
|
|
123192
123404
|
pageSize.value = docSize;
|
|
123193
123405
|
pageMargins.value = docMargins;
|
|
123194
123406
|
const definition = generateRulerDefinition({
|
|
@@ -123202,7 +123414,7 @@ const _sfc_main$6 = {
|
|
|
123202
123414
|
});
|
|
123203
123415
|
leftHandle.x = definition.leftMarginPx;
|
|
123204
123416
|
rightHandle.x = definition.rightMarginPx;
|
|
123205
|
-
|
|
123417
|
+
rulerDefinition.value = definition;
|
|
123206
123418
|
};
|
|
123207
123419
|
const getTickStyle = vue.computed(() => (tick) => {
|
|
123208
123420
|
return {
|
|
@@ -123256,7 +123468,8 @@ const _sfc_main$6 = {
|
|
|
123256
123468
|
const marginValue = getNewMarginValue();
|
|
123257
123469
|
emit("margin-change", {
|
|
123258
123470
|
side: currentHandle.value.side,
|
|
123259
|
-
value: marginValue
|
|
123471
|
+
value: marginValue,
|
|
123472
|
+
sectionIndex: currentSectionIndex.value
|
|
123260
123473
|
});
|
|
123261
123474
|
}
|
|
123262
123475
|
};
|
|
@@ -123280,12 +123493,40 @@ const _sfc_main$6 = {
|
|
|
123280
123493
|
"--ruler-width": `${width}px`
|
|
123281
123494
|
};
|
|
123282
123495
|
});
|
|
123496
|
+
const handleSelectionUpdate = () => {
|
|
123497
|
+
if (isDragging.value) return;
|
|
123498
|
+
updateRulerForCurrentSection();
|
|
123499
|
+
};
|
|
123500
|
+
const setupEditorListeners = () => {
|
|
123501
|
+
if (!props.editor) return;
|
|
123502
|
+
selectionUpdateHandler = handleSelectionUpdate;
|
|
123503
|
+
props.editor.on("selectionUpdate", selectionUpdateHandler);
|
|
123504
|
+
};
|
|
123505
|
+
const cleanupEditorListeners = () => {
|
|
123506
|
+
if (!props.editor || !selectionUpdateHandler) return;
|
|
123507
|
+
props.editor.off("selectionUpdate", selectionUpdateHandler);
|
|
123508
|
+
selectionUpdateHandler = null;
|
|
123509
|
+
};
|
|
123510
|
+
vue.watch(
|
|
123511
|
+
() => props.editor,
|
|
123512
|
+
(newEditor, oldEditor) => {
|
|
123513
|
+
if (oldEditor && selectionUpdateHandler) {
|
|
123514
|
+
oldEditor.off("selectionUpdate", selectionUpdateHandler);
|
|
123515
|
+
}
|
|
123516
|
+
if (newEditor) {
|
|
123517
|
+
setupEditorListeners();
|
|
123518
|
+
updateRulerForCurrentSection();
|
|
123519
|
+
}
|
|
123520
|
+
}
|
|
123521
|
+
);
|
|
123283
123522
|
vue.onMounted(() => {
|
|
123284
|
-
|
|
123523
|
+
updateRulerForCurrentSection();
|
|
123524
|
+
setupEditorListeners();
|
|
123285
123525
|
window.addEventListener("mousemove", handleMouseMove2);
|
|
123286
123526
|
window.addEventListener("mouseup", handleMouseUp);
|
|
123287
123527
|
});
|
|
123288
123528
|
vue.onUnmounted(() => {
|
|
123529
|
+
cleanupEditorListeners();
|
|
123289
123530
|
window.removeEventListener("mousemove", handleMouseMove2);
|
|
123290
123531
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
123291
123532
|
});
|
|
@@ -123326,7 +123567,7 @@ const _sfc_main$6 = {
|
|
|
123326
123567
|
};
|
|
123327
123568
|
}
|
|
123328
123569
|
};
|
|
123329
|
-
const Ruler = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
123570
|
+
const Ruler = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-0d1b9cd1"]]);
|
|
123330
123571
|
const _sfc_main$5 = {
|
|
123331
123572
|
__name: "GenericPopover",
|
|
123332
123573
|
props: {
|
package/dist/style.css
CHANGED
|
@@ -2189,7 +2189,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2189
2189
|
margin: 4px 0;
|
|
2190
2190
|
}
|
|
2191
2191
|
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
|
2192
|
-
.vertical-indicator[data-v-
|
|
2192
|
+
.vertical-indicator[data-v-0d1b9cd1] {
|
|
2193
2193
|
position: absolute;
|
|
2194
2194
|
height: 0px;
|
|
2195
2195
|
min-width: 1px;
|
|
@@ -2197,7 +2197,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2197
2197
|
top: 20px;
|
|
2198
2198
|
z-index: 100;
|
|
2199
2199
|
}
|
|
2200
|
-
.margin-handle[data-v-
|
|
2200
|
+
.margin-handle[data-v-0d1b9cd1] {
|
|
2201
2201
|
width: 56px;
|
|
2202
2202
|
min-width: 5px;
|
|
2203
2203
|
max-width: 5px;
|
|
@@ -2210,10 +2210,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2210
2210
|
transition: background-color 250ms ease;
|
|
2211
2211
|
z-index: 10;
|
|
2212
2212
|
}
|
|
2213
|
-
.margin-handle[data-v-
|
|
2213
|
+
.margin-handle[data-v-0d1b9cd1]:hover {
|
|
2214
2214
|
background-color: var(--ruler-handle-active-color);
|
|
2215
2215
|
}
|
|
2216
|
-
.ruler[data-v-
|
|
2216
|
+
.ruler[data-v-0d1b9cd1] {
|
|
2217
2217
|
height: 25px;
|
|
2218
2218
|
width: var(--ruler-width, 8.5in);
|
|
2219
2219
|
margin: 0;
|
|
@@ -2221,14 +2221,13 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2221
2221
|
box-sizing: border-box;
|
|
2222
2222
|
position: relative;
|
|
2223
2223
|
color: #666;
|
|
2224
|
+
transition: width 150ms ease-out;
|
|
2224
2225
|
}
|
|
2225
|
-
|
|
2226
|
-
/* Tick marks - using absolute positioning from ruler-core */
|
|
2227
|
-
.ruler-tick[data-v-b9f4f30a] {
|
|
2226
|
+
.ruler-tick[data-v-0d1b9cd1] {
|
|
2228
2227
|
pointer-events: none;
|
|
2229
2228
|
user-select: none;
|
|
2230
2229
|
}
|
|
2231
|
-
.numbering[data-v-
|
|
2230
|
+
.numbering[data-v-0d1b9cd1] {
|
|
2232
2231
|
position: absolute;
|
|
2233
2232
|
top: -16px;
|
|
2234
2233
|
left: -2px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-JlOFMM88.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-CNzx36Ms.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -42626,7 +42626,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42626
42626
|
static getStoredSuperdocVersion(docx) {
|
|
42627
42627
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42628
42628
|
}
|
|
42629
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.
|
|
42629
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.72") {
|
|
42630
42630
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
42631
42631
|
}
|
|
42632
42632
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-JlOFMM88.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|