@harbour-enterprises/superdoc 0.25.0-next.5 → 0.25.0-next.6

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.
@@ -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-STsumey2.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-DDGjYIm1.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-DisCF1vr.cjs");
4
+ const superdoc = require("./index-7exCeEb1.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-QqtfiJGc.cjs");
2
+ const superEditor_es = require("./super-editor.es-GExnUB7l.cjs");
3
3
  const vue = require("./vue-DKMj1I9B.cjs");
4
4
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
5
5
  const eventemitter3 = require("./eventemitter3-DkXkH2rT.cjs");
@@ -17164,7 +17164,7 @@ const _sfc_main = {
17164
17164
  __name: "SuperDoc",
17165
17165
  emits: ["selection-update"],
17166
17166
  setup(__props, { emit: __emit }) {
17167
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-8kRpbCwn.cjs")));
17167
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BeQy7uL0.cjs")));
17168
17168
  const superdocStore = useSuperdocStore();
17169
17169
  const commentsStore = useCommentsStore();
17170
17170
  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-rBPknGqQ.es.js";
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-XXbEUVCc.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-ABm6XYAA.es.js";
4
4
  import { E as EventEmitter } from "./eventemitter3-BWEnUdTY.es.js";
@@ -17147,7 +17147,7 @@ const _sfc_main = {
17147
17147
  __name: "SuperDoc",
17148
17148
  emits: ["selection-update"],
17149
17149
  setup(__props, { emit: __emit }) {
17150
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DVToyLl3.es.js"));
17150
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-BOrm7Awj.es.js"));
17151
17151
  const superdocStore = useSuperdocStore();
17152
17152
  const commentsStore = useCommentsStore();
17153
17153
  const {
@@ -67534,6 +67534,15 @@ const TrackChanges = Extension.create({
67534
67534
  const { from: from2, to } = state2.selection;
67535
67535
  return commands2.acceptTrackedChangesBetween(from2, to);
67536
67536
  },
67537
+ acceptTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
67538
+ const commentsPluginState = CommentsPluginKey.getState(state2);
67539
+ const activeThreadId = commentsPluginState?.activeThreadId;
67540
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
67541
+ return commands2.acceptTrackedChangeById(activeThreadId);
67542
+ } else {
67543
+ return commands2.acceptTrackedChangeBySelection();
67544
+ }
67545
+ },
67537
67546
  acceptTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
67538
67547
  const toResolve = getChangesByIdToResolve(state2, id) || [];
67539
67548
  return toResolve.map(({ from: from2, to }) => {
@@ -67562,6 +67571,15 @@ const TrackChanges = Extension.create({
67562
67571
  const { from: from2, to } = state2.selection;
67563
67572
  return commands2.rejectTrackedChangesBetween(from2, to);
67564
67573
  },
67574
+ rejectTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
67575
+ const commentsPluginState = CommentsPluginKey.getState(state2);
67576
+ const activeThreadId = commentsPluginState?.activeThreadId;
67577
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
67578
+ return commands2.rejectTrackedChangeById(activeThreadId);
67579
+ } else {
67580
+ return commands2.rejectTrackedChangeOnSelection();
67581
+ }
67582
+ },
67565
67583
  rejectAllTrackedChanges: () => ({ state: state2, commands: commands2 }) => {
67566
67584
  const from2 = 0, to = state2.doc.content.size;
67567
67585
  return commands2.rejectTrackedChangesBetween(from2, to);
@@ -85964,7 +85982,7 @@ const makeDefaultItems = ({
85964
85982
  disabled: false,
85965
85983
  name: "acceptTrackedChangeBySelection",
85966
85984
  tooltip: toolbarTexts2.trackChangesAccept,
85967
- command: "acceptTrackedChangeBySelection",
85985
+ command: "acceptTrackedChangeFromToolbar",
85968
85986
  icon: toolbarIcons2.trackChangesAccept,
85969
85987
  group: "left",
85970
85988
  attributes: {
@@ -85976,7 +85994,7 @@ const makeDefaultItems = ({
85976
85994
  disabled: false,
85977
85995
  name: "rejectTrackedChangeOnSelection",
85978
85996
  tooltip: toolbarTexts2.trackChangesReject,
85979
- command: "rejectTrackedChangeOnSelection",
85997
+ command: "rejectTrackedChangeFromToolbar",
85980
85998
  icon: toolbarIcons2.trackChangesReject,
85981
85999
  group: "left",
85982
86000
  attributes: {
@@ -67517,6 +67517,15 @@ const TrackChanges = Extension.create({
67517
67517
  const { from: from2, to } = state2.selection;
67518
67518
  return commands2.acceptTrackedChangesBetween(from2, to);
67519
67519
  },
67520
+ acceptTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
67521
+ const commentsPluginState = CommentsPluginKey.getState(state2);
67522
+ const activeThreadId = commentsPluginState?.activeThreadId;
67523
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
67524
+ return commands2.acceptTrackedChangeById(activeThreadId);
67525
+ } else {
67526
+ return commands2.acceptTrackedChangeBySelection();
67527
+ }
67528
+ },
67520
67529
  acceptTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
67521
67530
  const toResolve = getChangesByIdToResolve(state2, id) || [];
67522
67531
  return toResolve.map(({ from: from2, to }) => {
@@ -67545,6 +67554,15 @@ const TrackChanges = Extension.create({
67545
67554
  const { from: from2, to } = state2.selection;
67546
67555
  return commands2.rejectTrackedChangesBetween(from2, to);
67547
67556
  },
67557
+ rejectTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
67558
+ const commentsPluginState = CommentsPluginKey.getState(state2);
67559
+ const activeThreadId = commentsPluginState?.activeThreadId;
67560
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
67561
+ return commands2.rejectTrackedChangeById(activeThreadId);
67562
+ } else {
67563
+ return commands2.rejectTrackedChangeOnSelection();
67564
+ }
67565
+ },
67548
67566
  rejectAllTrackedChanges: () => ({ state: state2, commands: commands2 }) => {
67549
67567
  const from2 = 0, to = state2.doc.content.size;
67550
67568
  return commands2.rejectTrackedChangesBetween(from2, to);
@@ -85947,7 +85965,7 @@ const makeDefaultItems = ({
85947
85965
  disabled: false,
85948
85966
  name: "acceptTrackedChangeBySelection",
85949
85967
  tooltip: toolbarTexts2.trackChangesAccept,
85950
- command: "acceptTrackedChangeBySelection",
85968
+ command: "acceptTrackedChangeFromToolbar",
85951
85969
  icon: toolbarIcons2.trackChangesAccept,
85952
85970
  group: "left",
85953
85971
  attributes: {
@@ -85959,7 +85977,7 @@ const makeDefaultItems = ({
85959
85977
  disabled: false,
85960
85978
  name: "rejectTrackedChangeOnSelection",
85961
85979
  tooltip: toolbarTexts2.trackChangesReject,
85962
- command: "rejectTrackedChangeOnSelection",
85980
+ command: "rejectTrackedChangeFromToolbar",
85963
85981
  icon: toolbarIcons2.trackChangesReject,
85964
85982
  group: "left",
85965
85983
  attributes: {
@@ -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-DOkexB95.js";
3
- import { _ as _export_sfc } from "./chunks/editor-BOoGDORN.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-D1Q0suDz.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 = {}) {
@@ -29370,6 +29370,15 @@ const TrackChanges = Extension.create({
29370
29370
  const { from: from2, to } = state.selection;
29371
29371
  return commands2.acceptTrackedChangesBetween(from2, to);
29372
29372
  },
29373
+ acceptTrackedChangeFromToolbar: () => ({ state, commands: commands2 }) => {
29374
+ const commentsPluginState = CommentsPluginKey.getState(state);
29375
+ const activeThreadId = commentsPluginState?.activeThreadId;
29376
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
29377
+ return commands2.acceptTrackedChangeById(activeThreadId);
29378
+ } else {
29379
+ return commands2.acceptTrackedChangeBySelection();
29380
+ }
29381
+ },
29373
29382
  acceptTrackedChangeById: (id) => ({ state, tr, commands: commands2 }) => {
29374
29383
  const toResolve = getChangesByIdToResolve(state, id) || [];
29375
29384
  return toResolve.map(({ from: from2, to }) => {
@@ -29398,6 +29407,15 @@ const TrackChanges = Extension.create({
29398
29407
  const { from: from2, to } = state.selection;
29399
29408
  return commands2.rejectTrackedChangesBetween(from2, to);
29400
29409
  },
29410
+ rejectTrackedChangeFromToolbar: () => ({ state, commands: commands2 }) => {
29411
+ const commentsPluginState = CommentsPluginKey.getState(state);
29412
+ const activeThreadId = commentsPluginState?.activeThreadId;
29413
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
29414
+ return commands2.rejectTrackedChangeById(activeThreadId);
29415
+ } else {
29416
+ return commands2.rejectTrackedChangeOnSelection();
29417
+ }
29418
+ },
29401
29419
  rejectAllTrackedChanges: () => ({ state, commands: commands2 }) => {
29402
29420
  const from2 = 0, to = state.doc.content.size;
29403
29421
  return commands2.rejectTrackedChangesBetween(from2, to);
@@ -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-DOkexB95.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BOoGDORN.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-D1Q0suDz.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { E } from "./chunks/editor-BOoGDORN.js";
1
+ import { E } from "./chunks/editor-D1Q0suDz.js";
2
2
  import "./chunks/converter-DOkexB95.js";
3
3
  import "./chunks/docx-zipper-Ci5JbfjE.js";
4
4
  export {
@@ -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, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
12
12
  import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-DOkexB95.js";
13
13
  import { c1, a5, i, a2 } from "./chunks/converter-DOkexB95.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-BOoGDORN.js";
15
- import { t, C, v, T, p, w, q } from "./chunks/editor-BOoGDORN.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-D1Q0suDz.js";
15
+ import { t, C, v, T, p, w, q } from "./chunks/editor-D1Q0suDz.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, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-DPI_cCm_.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-DjuLzygc.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
19
  import { D } from "./chunks/docx-zipper-Ci5JbfjE.js";
20
20
  import { createZip } from "./file-zipper.es.js";
@@ -2088,7 +2088,7 @@ const makeDefaultItems = ({
2088
2088
  disabled: false,
2089
2089
  name: "acceptTrackedChangeBySelection",
2090
2090
  tooltip: toolbarTexts2.trackChangesAccept,
2091
- command: "acceptTrackedChangeBySelection",
2091
+ command: "acceptTrackedChangeFromToolbar",
2092
2092
  icon: toolbarIcons2.trackChangesAccept,
2093
2093
  group: "left",
2094
2094
  attributes: {
@@ -2100,7 +2100,7 @@ const makeDefaultItems = ({
2100
2100
  disabled: false,
2101
2101
  name: "rejectTrackedChangeOnSelection",
2102
2102
  tooltip: toolbarTexts2.trackChangesReject,
2103
- command: "rejectTrackedChangeOnSelection",
2103
+ command: "rejectTrackedChangeFromToolbar",
2104
2104
  icon: toolbarIcons2.trackChangesReject,
2105
2105
  group: "left",
2106
2106
  attributes: {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DPI_cCm_.js";
3
- import "./chunks/editor-BOoGDORN.js";
2
+ import { T } from "./chunks/toolbar-DjuLzygc.js";
3
+ import "./chunks/editor-D1Q0suDz.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -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-QqtfiJGc.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-GExnUB7l.cjs");
4
4
  require("./chunks/vue-DKMj1I9B.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -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-rBPknGqQ.es.js";
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-XXbEUVCc.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-QqtfiJGc.cjs");
4
- const superdoc = require("./chunks/index-DisCF1vr.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-GExnUB7l.cjs");
4
+ const superdoc = require("./chunks/index-7exCeEb1.cjs");
5
5
  require("./chunks/vue-DKMj1I9B.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-rBPknGqQ.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-STsumey2.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-XXbEUVCc.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-DDGjYIm1.es.js";
3
3
  import "./chunks/vue-ZWZLQtoU.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  export {
@@ -75232,6 +75232,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
75232
75232
  const { from: from2, to } = state2.selection;
75233
75233
  return commands2.acceptTrackedChangesBetween(from2, to);
75234
75234
  },
75235
+ acceptTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
75236
+ const commentsPluginState = CommentsPluginKey.getState(state2);
75237
+ const activeThreadId = commentsPluginState?.activeThreadId;
75238
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
75239
+ return commands2.acceptTrackedChangeById(activeThreadId);
75240
+ } else {
75241
+ return commands2.acceptTrackedChangeBySelection();
75242
+ }
75243
+ },
75235
75244
  acceptTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
75236
75245
  const toResolve = getChangesByIdToResolve(state2, id) || [];
75237
75246
  return toResolve.map(({ from: from2, to }) => {
@@ -75260,6 +75269,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
75260
75269
  const { from: from2, to } = state2.selection;
75261
75270
  return commands2.rejectTrackedChangesBetween(from2, to);
75262
75271
  },
75272
+ rejectTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
75273
+ const commentsPluginState = CommentsPluginKey.getState(state2);
75274
+ const activeThreadId = commentsPluginState?.activeThreadId;
75275
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
75276
+ return commands2.rejectTrackedChangeById(activeThreadId);
75277
+ } else {
75278
+ return commands2.rejectTrackedChangeOnSelection();
75279
+ }
75280
+ },
75263
75281
  rejectAllTrackedChanges: () => ({ state: state2, commands: commands2 }) => {
75264
75282
  const from2 = 0, to = state2.doc.content.size;
75265
75283
  return commands2.rejectTrackedChangesBetween(from2, to);
@@ -93662,7 +93680,7 @@ ${style2}
93662
93680
  disabled: false,
93663
93681
  name: "acceptTrackedChangeBySelection",
93664
93682
  tooltip: toolbarTexts2.trackChangesAccept,
93665
- command: "acceptTrackedChangeBySelection",
93683
+ command: "acceptTrackedChangeFromToolbar",
93666
93684
  icon: toolbarIcons2.trackChangesAccept,
93667
93685
  group: "left",
93668
93686
  attributes: {
@@ -93674,7 +93692,7 @@ ${style2}
93674
93692
  disabled: false,
93675
93693
  name: "rejectTrackedChangeOnSelection",
93676
93694
  tooltip: toolbarTexts2.trackChangesReject,
93677
- command: "rejectTrackedChangeOnSelection",
93695
+ command: "rejectTrackedChangeFromToolbar",
93678
93696
  icon: toolbarIcons2.trackChangesReject,
93679
93697
  group: "left",
93680
93698
  attributes: {