@harbour-enterprises/superdoc 0.23.0-next.17 → 0.23.0-next.19
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-DOQw-QBT.es.js → PdfViewer-B2uwyIlo.es.js} +1 -1
- package/dist/chunks/{PdfViewer-ytL49tCj.cjs → PdfViewer-BzfXAaWt.cjs} +1 -1
- package/dist/chunks/{index-TI9YfKQC.cjs → index-DDWD3Ala.cjs} +2 -2
- package/dist/chunks/{index-BjP_ixoM.es.js → index-H3dscFSf.es.js} +2 -2
- package/dist/chunks/{super-editor.es-DMLpNrBd.cjs → super-editor.es-CHGawnS5.cjs} +44 -9
- package/dist/chunks/{super-editor.es-BIrzz0Is.es.js → super-editor.es-DKYU5AbZ.es.js} +44 -9
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{editor-CXHr0RmK.js → editor-C_9lsXSt.js} +44 -9
- package/dist/super-editor/chunks/{toolbar-BytYAx8O.js → toolbar-BS-RUJ1x.js} +1 -1
- package/dist/super-editor/editor.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +3 -3
- 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 +44 -9
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-ZWZLQtoU.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-H3dscFSf.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-DKMj1I9B.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-DDWD3Ala.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-CHGawnS5.cjs");
|
|
3
3
|
const vue = require("./vue-DKMj1I9B.cjs");
|
|
4
4
|
const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
|
|
5
5
|
const eventemitter3 = require("./eventemitter3-DkXkH2rT.cjs");
|
|
@@ -17116,7 +17116,7 @@ const _sfc_main = {
|
|
|
17116
17116
|
__name: "SuperDoc",
|
|
17117
17117
|
emits: ["selection-update"],
|
|
17118
17118
|
setup(__props, { emit: __emit }) {
|
|
17119
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17119
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BzfXAaWt.cjs")));
|
|
17120
17120
|
const superdocStore = useSuperdocStore();
|
|
17121
17121
|
const commentsStore = useCommentsStore();
|
|
17122
17122
|
const {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-DKYU5AbZ.es.js";
|
|
2
2
|
import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-ZWZLQtoU.es.js";
|
|
3
3
|
import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
|
|
4
4
|
import { E as EventEmitter } from "./eventemitter3-BWEnUdTY.es.js";
|
|
@@ -17099,7 +17099,7 @@ const _sfc_main = {
|
|
|
17099
17099
|
__name: "SuperDoc",
|
|
17100
17100
|
emits: ["selection-update"],
|
|
17101
17101
|
setup(__props, { emit: __emit }) {
|
|
17102
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17102
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-B2uwyIlo.es.js"));
|
|
17103
17103
|
const superdocStore = useSuperdocStore();
|
|
17104
17104
|
const commentsStore = useCommentsStore();
|
|
17105
17105
|
const {
|
|
@@ -66202,15 +66202,50 @@ const getChangesByIdToResolve = (state2, id) => {
|
|
|
66202
66202
|
const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
|
|
66203
66203
|
if (changeIndex === -1) return;
|
|
66204
66204
|
const matchingChange = trackedChanges[changeIndex];
|
|
66205
|
-
const
|
|
66206
|
-
const
|
|
66207
|
-
|
|
66208
|
-
|
|
66209
|
-
|
|
66210
|
-
|
|
66211
|
-
|
|
66212
|
-
|
|
66213
|
-
|
|
66205
|
+
const matchingId = matchingChange.mark.attrs.id;
|
|
66206
|
+
const getSegmentSize = ({ from: from2, to }) => to - from2;
|
|
66207
|
+
const areDirectlyConnected = (left2, right2) => {
|
|
66208
|
+
if (!left2 || !right2) {
|
|
66209
|
+
return false;
|
|
66210
|
+
}
|
|
66211
|
+
if (left2.to !== right2.from) {
|
|
66212
|
+
return false;
|
|
66213
|
+
}
|
|
66214
|
+
const hasContentBetween = state2.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
|
|
66215
|
+
return !hasContentBetween;
|
|
66216
|
+
};
|
|
66217
|
+
const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
|
|
66218
|
+
const linkedBefore = [];
|
|
66219
|
+
const linkedAfter = [];
|
|
66220
|
+
const collectDirection = (direction, collection) => {
|
|
66221
|
+
let currentIndex = changeIndex;
|
|
66222
|
+
let currentChange = matchingChange;
|
|
66223
|
+
while (true) {
|
|
66224
|
+
const neighborIndex = currentIndex + direction;
|
|
66225
|
+
const neighbor = trackedChanges[neighborIndex];
|
|
66226
|
+
if (!neighbor) {
|
|
66227
|
+
break;
|
|
66228
|
+
}
|
|
66229
|
+
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
66230
|
+
if (!areDirectlyConnected(left2, right2)) {
|
|
66231
|
+
break;
|
|
66232
|
+
}
|
|
66233
|
+
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
66234
|
+
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
66235
|
+
if (!sharesId && !complementary) {
|
|
66236
|
+
break;
|
|
66237
|
+
}
|
|
66238
|
+
collection.push(neighbor);
|
|
66239
|
+
currentIndex = neighborIndex;
|
|
66240
|
+
currentChange = neighbor;
|
|
66241
|
+
if (!sharesId) {
|
|
66242
|
+
break;
|
|
66243
|
+
}
|
|
66244
|
+
}
|
|
66245
|
+
};
|
|
66246
|
+
collectDirection(-1, linkedBefore);
|
|
66247
|
+
collectDirection(1, linkedAfter);
|
|
66248
|
+
return [matchingChange, ...linkedAfter, ...linkedBefore];
|
|
66214
66249
|
};
|
|
66215
66250
|
const TextTransform = Extension.create({
|
|
66216
66251
|
name: "textTransform",
|
|
@@ -66185,15 +66185,50 @@ const getChangesByIdToResolve = (state2, id) => {
|
|
|
66185
66185
|
const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
|
|
66186
66186
|
if (changeIndex === -1) return;
|
|
66187
66187
|
const matchingChange = trackedChanges[changeIndex];
|
|
66188
|
-
const
|
|
66189
|
-
const
|
|
66190
|
-
|
|
66191
|
-
|
|
66192
|
-
|
|
66193
|
-
|
|
66194
|
-
|
|
66195
|
-
|
|
66196
|
-
|
|
66188
|
+
const matchingId = matchingChange.mark.attrs.id;
|
|
66189
|
+
const getSegmentSize = ({ from: from2, to }) => to - from2;
|
|
66190
|
+
const areDirectlyConnected = (left2, right2) => {
|
|
66191
|
+
if (!left2 || !right2) {
|
|
66192
|
+
return false;
|
|
66193
|
+
}
|
|
66194
|
+
if (left2.to !== right2.from) {
|
|
66195
|
+
return false;
|
|
66196
|
+
}
|
|
66197
|
+
const hasContentBetween = state2.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
|
|
66198
|
+
return !hasContentBetween;
|
|
66199
|
+
};
|
|
66200
|
+
const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
|
|
66201
|
+
const linkedBefore = [];
|
|
66202
|
+
const linkedAfter = [];
|
|
66203
|
+
const collectDirection = (direction, collection) => {
|
|
66204
|
+
let currentIndex = changeIndex;
|
|
66205
|
+
let currentChange = matchingChange;
|
|
66206
|
+
while (true) {
|
|
66207
|
+
const neighborIndex = currentIndex + direction;
|
|
66208
|
+
const neighbor = trackedChanges[neighborIndex];
|
|
66209
|
+
if (!neighbor) {
|
|
66210
|
+
break;
|
|
66211
|
+
}
|
|
66212
|
+
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
66213
|
+
if (!areDirectlyConnected(left2, right2)) {
|
|
66214
|
+
break;
|
|
66215
|
+
}
|
|
66216
|
+
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
66217
|
+
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
66218
|
+
if (!sharesId && !complementary) {
|
|
66219
|
+
break;
|
|
66220
|
+
}
|
|
66221
|
+
collection.push(neighbor);
|
|
66222
|
+
currentIndex = neighborIndex;
|
|
66223
|
+
currentChange = neighbor;
|
|
66224
|
+
if (!sharesId) {
|
|
66225
|
+
break;
|
|
66226
|
+
}
|
|
66227
|
+
}
|
|
66228
|
+
};
|
|
66229
|
+
collectDirection(-1, linkedBefore);
|
|
66230
|
+
collectDirection(1, linkedAfter);
|
|
66231
|
+
return [matchingChange, ...linkedAfter, ...linkedBefore];
|
|
66197
66232
|
};
|
|
66198
66233
|
const TextTransform = Extension.create({
|
|
66199
66234
|
name: "textTransform",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
2
|
import { T as TextSelection } from "./chunks/converter-wrgxIFCy.js";
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-C_9lsXSt.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 = {}) {
|
|
@@ -28864,15 +28864,50 @@ const getChangesByIdToResolve = (state, id) => {
|
|
|
28864
28864
|
const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
|
|
28865
28865
|
if (changeIndex === -1) return;
|
|
28866
28866
|
const matchingChange = trackedChanges[changeIndex];
|
|
28867
|
-
const
|
|
28868
|
-
const
|
|
28869
|
-
|
|
28870
|
-
|
|
28871
|
-
|
|
28872
|
-
|
|
28873
|
-
|
|
28874
|
-
|
|
28875
|
-
|
|
28867
|
+
const matchingId = matchingChange.mark.attrs.id;
|
|
28868
|
+
const getSegmentSize = ({ from: from2, to }) => to - from2;
|
|
28869
|
+
const areDirectlyConnected = (left2, right2) => {
|
|
28870
|
+
if (!left2 || !right2) {
|
|
28871
|
+
return false;
|
|
28872
|
+
}
|
|
28873
|
+
if (left2.to !== right2.from) {
|
|
28874
|
+
return false;
|
|
28875
|
+
}
|
|
28876
|
+
const hasContentBetween = state.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
|
|
28877
|
+
return !hasContentBetween;
|
|
28878
|
+
};
|
|
28879
|
+
const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
|
|
28880
|
+
const linkedBefore = [];
|
|
28881
|
+
const linkedAfter = [];
|
|
28882
|
+
const collectDirection = (direction, collection) => {
|
|
28883
|
+
let currentIndex = changeIndex;
|
|
28884
|
+
let currentChange = matchingChange;
|
|
28885
|
+
while (true) {
|
|
28886
|
+
const neighborIndex = currentIndex + direction;
|
|
28887
|
+
const neighbor = trackedChanges[neighborIndex];
|
|
28888
|
+
if (!neighbor) {
|
|
28889
|
+
break;
|
|
28890
|
+
}
|
|
28891
|
+
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
28892
|
+
if (!areDirectlyConnected(left2, right2)) {
|
|
28893
|
+
break;
|
|
28894
|
+
}
|
|
28895
|
+
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
28896
|
+
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
28897
|
+
if (!sharesId && !complementary) {
|
|
28898
|
+
break;
|
|
28899
|
+
}
|
|
28900
|
+
collection.push(neighbor);
|
|
28901
|
+
currentIndex = neighborIndex;
|
|
28902
|
+
currentChange = neighbor;
|
|
28903
|
+
if (!sharesId) {
|
|
28904
|
+
break;
|
|
28905
|
+
}
|
|
28906
|
+
}
|
|
28907
|
+
};
|
|
28908
|
+
collectDirection(-1, linkedBefore);
|
|
28909
|
+
collectDirection(1, linkedAfter);
|
|
28910
|
+
return [matchingChange, ...linkedAfter, ...linkedBefore];
|
|
28876
28911
|
};
|
|
28877
28912
|
const TextTransform = Extension.create({
|
|
28878
28913
|
name: "textTransform",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
2
|
import { p as process$1 } from "./converter-wrgxIFCy.js";
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-C_9lsXSt.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -11,10 +11,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
12
|
import { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, at as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as runPropertyTranslators, aG as commentRangeEndTranslator, aH as commentRangeStartTranslator, aI as translator, aJ as translator$1, aK as translator$2, aL as translator$3, aM as translator$4, aN as translator$5, aO as translator$6, aP as translator$7, aQ as translator$8, aR as translator$9, aS as translator$a, aT as translator$b, aU as translator$c, aV as translator$d, aW as translator$e, aX as translator$f, aY as translator$g, aZ as translator$h, a_ as translator$i, a$ as translator$j, b0 as translator$k, b1 as translator$l, b2 as translator$m, b3 as translator$n, b4 as translator$o, b5 as translator$p, b6 as translator$q, b7 as translator$r, b8 as translator$s, b9 as translator$t, ba as translator$u, bb as translator$v, bc as translator$w, bd as translator$x, be as translator$y, bf as translator$z, bg as translator$A, bh as translator$B, bi as translator$C, bj as translator$D, bk as translator$E, bl as translator$F, bm as translator$G, bn as translator$H, bo as translator$I, bp as translator$J, bq as translator$K, br as translator$L, bs as translator$M, bt as translator$N, bu as translator$O, bv as translator$P, bw as translator$Q, bx as translator$R, by as translator$S, bz as translator$T, bA as translator$U, bB as translator$V, bC as translator$W, bD as translator$X, bE as translator$Y, bF as translator$Z, bG as translator$_, bH as translator$$, bI as translator$10, bJ as translator$11, bK as translator$12, a as Plugin } from "./chunks/converter-wrgxIFCy.js";
|
|
13
13
|
import { bL, a5, i, a2 } from "./chunks/converter-wrgxIFCy.js";
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { n, C, o, T, l, p, m } from "./chunks/editor-
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-C_9lsXSt.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-C_9lsXSt.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BS-RUJ1x.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
19
|
import { D } from "./chunks/docx-zipper-DIilDv93.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-CHGawnS5.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-DKYU5AbZ.es.js";
|
|
2
2
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-CHGawnS5.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DDWD3Ala.cjs");
|
|
5
5
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
|
7
7
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-DKYU5AbZ.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-H3dscFSf.es.js";
|
|
3
3
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
|
5
5
|
export {
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -73900,15 +73900,50 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
73900
73900
|
const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
|
|
73901
73901
|
if (changeIndex === -1) return;
|
|
73902
73902
|
const matchingChange = trackedChanges[changeIndex];
|
|
73903
|
-
const
|
|
73904
|
-
const
|
|
73905
|
-
|
|
73906
|
-
|
|
73907
|
-
|
|
73908
|
-
|
|
73909
|
-
|
|
73910
|
-
|
|
73911
|
-
|
|
73903
|
+
const matchingId = matchingChange.mark.attrs.id;
|
|
73904
|
+
const getSegmentSize = ({ from: from2, to }) => to - from2;
|
|
73905
|
+
const areDirectlyConnected = (left2, right2) => {
|
|
73906
|
+
if (!left2 || !right2) {
|
|
73907
|
+
return false;
|
|
73908
|
+
}
|
|
73909
|
+
if (left2.to !== right2.from) {
|
|
73910
|
+
return false;
|
|
73911
|
+
}
|
|
73912
|
+
const hasContentBetween = state2.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
|
|
73913
|
+
return !hasContentBetween;
|
|
73914
|
+
};
|
|
73915
|
+
const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
|
|
73916
|
+
const linkedBefore = [];
|
|
73917
|
+
const linkedAfter = [];
|
|
73918
|
+
const collectDirection = (direction, collection) => {
|
|
73919
|
+
let currentIndex = changeIndex;
|
|
73920
|
+
let currentChange = matchingChange;
|
|
73921
|
+
while (true) {
|
|
73922
|
+
const neighborIndex = currentIndex + direction;
|
|
73923
|
+
const neighbor = trackedChanges[neighborIndex];
|
|
73924
|
+
if (!neighbor) {
|
|
73925
|
+
break;
|
|
73926
|
+
}
|
|
73927
|
+
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
73928
|
+
if (!areDirectlyConnected(left2, right2)) {
|
|
73929
|
+
break;
|
|
73930
|
+
}
|
|
73931
|
+
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
73932
|
+
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
73933
|
+
if (!sharesId && !complementary) {
|
|
73934
|
+
break;
|
|
73935
|
+
}
|
|
73936
|
+
collection.push(neighbor);
|
|
73937
|
+
currentIndex = neighborIndex;
|
|
73938
|
+
currentChange = neighbor;
|
|
73939
|
+
if (!sharesId) {
|
|
73940
|
+
break;
|
|
73941
|
+
}
|
|
73942
|
+
}
|
|
73943
|
+
};
|
|
73944
|
+
collectDirection(-1, linkedBefore);
|
|
73945
|
+
collectDirection(1, linkedAfter);
|
|
73946
|
+
return [matchingChange, ...linkedAfter, ...linkedBefore];
|
|
73912
73947
|
};
|
|
73913
73948
|
const TextTransform = Extension.create({
|
|
73914
73949
|
name: "textTransform",
|