@harbour-enterprises/superdoc 2.0.0-next.2 → 2.0.0-next.20

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.
Files changed (34) hide show
  1. package/dist/chunks/{PdfViewer-CWO98Qls.cjs → PdfViewer-Y5Q3KpNr.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-C4xgIIbF.es.js → PdfViewer-ag_ZFG_a.es.js} +1 -1
  3. package/dist/chunks/{index-BY-3Vl72.cjs → index-CWNzyoyI.cjs} +4 -6
  4. package/dist/chunks/{index-s9GUR_Gc.es.js → index-Dymes5hN.es.js} +4 -6
  5. package/dist/chunks/{index-BqPa6D4q-8U4x8RP6.es.js → index-XnRj2biz-CWqMvtJZ.es.js} +1 -1
  6. package/dist/chunks/{index-BqPa6D4q-Dulj8zfc.cjs → index-XnRj2biz-DiLIwrZX.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-CT28vUbx.es.js → super-editor.es-BBUBeVVw.es.js} +950 -202
  8. package/dist/chunks/{super-editor.es-BM-ulSRj.cjs → super-editor.es-DwEkOdPH.cjs} +950 -202
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
  10. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  11. package/dist/packages/superdoc/src/core/types/index.d.ts +173 -0
  12. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  13. package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
  14. package/dist/style.css +14 -6
  15. package/dist/super-editor/ai-writer.es.js +2 -2
  16. package/dist/super-editor/chunks/{converter-CDlAWcRu.js → converter-CFpzAUl1.js} +49 -9
  17. package/dist/super-editor/chunks/{docx-zipper-B2VXuf8h.js → docx-zipper-B4U-khNy.js} +1 -1
  18. package/dist/super-editor/chunks/{editor-B4Q_tNET.js → editor-CUCVDSiG.js} +894 -196
  19. package/dist/super-editor/chunks/{index-BqPa6D4q.js → index-XnRj2biz.js} +1 -1
  20. package/dist/super-editor/chunks/{toolbar-BD-lDCLr.js → toolbar-DXUz-ZeU.js} +2 -2
  21. package/dist/super-editor/converter.es.js +1 -1
  22. package/dist/super-editor/docx-zipper.es.js +2 -2
  23. package/dist/super-editor/editor.es.js +3 -3
  24. package/dist/super-editor/file-zipper.es.js +1 -1
  25. package/dist/super-editor/style.css +14 -6
  26. package/dist/super-editor/super-editor.es.js +19 -9
  27. package/dist/super-editor/toolbar.es.js +2 -2
  28. package/dist/super-editor.cjs +1 -1
  29. package/dist/super-editor.es.js +1 -1
  30. package/dist/superdoc.cjs +2 -2
  31. package/dist/superdoc.es.js +2 -2
  32. package/dist/superdoc.umd.js +953 -207
  33. package/dist/superdoc.umd.js.map +1 -1
  34. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-CDlAWcRu.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-CFpzAUl1.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { ref, readonly, watch, computed, getCurrentInstance, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, withDirectives, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, markRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, withKeys, unref, withModifiers, createBlock, toDisplayString, vModelText, createVNode, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-CDlAWcRu.js";
3
- import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-B4Q_tNET.js";
2
+ import { p as process$1 } from "./converter-CFpzAUl1.js";
3
+ import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-CUCVDSiG.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 { ac } from "./chunks/converter-CDlAWcRu.js";
1
+ import { ac } from "./chunks/converter-CFpzAUl1.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CDlAWcRu.js";
2
- import { D } from "./chunks/docx-zipper-B2VXuf8h.js";
1
+ import "./chunks/converter-CFpzAUl1.js";
2
+ import { D } from "./chunks/docx-zipper-B4U-khNy.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-B4Q_tNET.js";
2
- import "./chunks/converter-CDlAWcRu.js";
3
- import "./chunks/docx-zipper-B2VXuf8h.js";
1
+ import { E } from "./chunks/editor-CUCVDSiG.js";
2
+ import "./chunks/converter-CFpzAUl1.js";
3
+ import "./chunks/docx-zipper-B4U-khNy.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-B2VXuf8h.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-B4U-khNy.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1169,6 +1169,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1169
1169
  .ProseMirror.view-mode .sd-structured-content-draggable {
1170
1170
  display: none;
1171
1171
  }
1172
+ .presentation-editor--viewing .sd-structured-content,
1173
+ .presentation-editor--viewing .sd-structured-content-block {
1174
+ padding: 0;
1175
+ border: none;
1176
+ }
1177
+ .presentation-editor--viewing .sd-structured-content-draggable {
1178
+ display: none;
1179
+ }
1172
1180
  .sd-vector-shape {
1173
1181
  display: inline-block;
1174
1182
  vertical-align: bottom;
@@ -1957,10 +1965,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1957
1965
  box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
1958
1966
  }
1959
1967
 
1960
- .editor-element[data-v-209a1e8b] {
1968
+ .editor-element[data-v-c9a3c876] {
1961
1969
  position: relative;
1962
1970
  }
1963
- .super-editor-container[data-v-209a1e8b] {
1971
+ .super-editor-container[data-v-c9a3c876] {
1964
1972
  width: auto;
1965
1973
  height: auto;
1966
1974
  min-width: 8in;
@@ -1969,14 +1977,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1969
1977
  display: flex;
1970
1978
  flex-direction: column;
1971
1979
  }
1972
- .ruler[data-v-209a1e8b] {
1980
+ .ruler[data-v-c9a3c876] {
1973
1981
  margin-bottom: 2px;
1974
1982
  }
1975
- .super-editor[data-v-209a1e8b] {
1983
+ .super-editor[data-v-c9a3c876] {
1976
1984
  color: initial;
1977
1985
  overflow: hidden;
1978
1986
  }
1979
- .placeholder-editor[data-v-209a1e8b] {
1987
+ .placeholder-editor[data-v-c9a3c876] {
1980
1988
  position: absolute;
1981
1989
  top: 0;
1982
1990
  left: 0;
@@ -1988,7 +1996,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1988
1996
  background-color: white;
1989
1997
  box-sizing: border-box;
1990
1998
  }
1991
- .placeholder-title[data-v-209a1e8b] {
1999
+ .placeholder-title[data-v-c9a3c876] {
1992
2000
  display: flex;
1993
2001
  justify-content: center;
1994
2002
  margin-bottom: 40px;
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
12
- import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-CDlAWcRu.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-CDlAWcRu.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 getEditorSurfaceElement, l as collectTrackedChangesForContext, S as SLASH_MENU_HANDLED_FLAG, m as SlashMenuPluginKey, s as shouldBypassContextMenu, n as generateRulerDefinition, o as clampHandlePosition, p as calculateMarginFromHandle, q as measureCache, t as isHeadless, E as Editor, v as getStarterExtensions, P as PresentationEditor, w as Placeholder, x as getRichTextExtensions, D as DecorationSet, z as Decoration, M as Mark, A as Extension, B as Attribute, N as Node } from "./chunks/editor-B4Q_tNET.js";
15
- import { G, J, H, T, C, I, F } from "./chunks/editor-B4Q_tNET.js";
12
+ import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, W as isMacOS, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-CFpzAUl1.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-CFpzAUl1.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 getEditorSurfaceElement, l as collectTrackedChangesForContext, S as SLASH_MENU_HANDLED_FLAG, m as SlashMenuPluginKey, s as shouldBypassContextMenu, n as generateRulerDefinition, o as clampHandlePosition, p as calculateMarginFromHandle, q as measureCache, t as isHeadless, E as Editor, v as getStarterExtensions, P as PresentationEditor, w as Placeholder, x as getRichTextExtensions, D as DecorationSet, z as Decoration, M as Mark, A as Extension, B as Attribute, N as Node } from "./chunks/editor-CUCVDSiG.js";
15
+ import { G, J, H, T, C, I, F } from "./chunks/editor-CUCVDSiG.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, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, Teleport, 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-BD-lDCLr.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-DXUz-ZeU.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-B2VXuf8h.js";
19
+ import { D } from "./chunks/docx-zipper-B4U-khNy.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -4294,7 +4294,7 @@ const _sfc_main$8 = {
4294
4294
  if (open) {
4295
4295
  nextTick(() => {
4296
4296
  if (searchInput.value) {
4297
- searchInput.value.focus();
4297
+ searchInput.value.focus({ preventScroll: true });
4298
4298
  }
4299
4299
  });
4300
4300
  }
@@ -4399,7 +4399,11 @@ const _sfc_main$8 = {
4399
4399
  };
4400
4400
  const handleGlobalOutsideClick = (event) => {
4401
4401
  if (isOpen.value && menuRef.value && !menuRef.value.contains(event.target)) {
4402
- moveCursorToMouseEvent(event, props.editor);
4402
+ const isCtrlClickOnMac = event.ctrlKey && isMacOS();
4403
+ const isLeftClick = event.button === 0 && !isCtrlClickOnMac;
4404
+ if (isLeftClick) {
4405
+ moveCursorToMouseEvent(event, props.editor);
4406
+ }
4403
4407
  closeMenu({ restoreCursor: false });
4404
4408
  }
4405
4409
  };
@@ -6521,6 +6525,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6521
6525
  if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
6522
6526
  });
6523
6527
  const handleMarginClick = (event) => {
6528
+ if (event.button !== 0) {
6529
+ return;
6530
+ }
6531
+ if (event.ctrlKey && isMacOS()) {
6532
+ return;
6533
+ }
6524
6534
  if (event.target.classList.contains("ProseMirror")) return;
6525
6535
  onMarginClickCursorChange(event, activeEditor.value);
6526
6536
  };
@@ -6659,7 +6669,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6659
6669
  };
6660
6670
  }
6661
6671
  });
6662
- const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-209a1e8b"]]);
6672
+ const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c9a3c876"]]);
6663
6673
  const _hoisted_1 = ["innerHTML"];
6664
6674
  const _sfc_main = {
6665
6675
  __name: "SuperInput",
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-BD-lDCLr.js";
3
- import "./chunks/editor-B4Q_tNET.js";
2
+ import { T } from "./chunks/toolbar-DXUz-ZeU.js";
3
+ import "./chunks/editor-CUCVDSiG.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-BM-ulSRj.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DwEkOdPH.cjs");
4
4
  require("./chunks/vue-gvuFr0vx.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, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CT28vUbx.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BBUBeVVw.es.js";
2
2
  import "./chunks/vue-CLFbn_1r.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-BM-ulSRj.cjs");
4
- const superdoc = require("./chunks/index-BY-3Vl72.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DwEkOdPH.cjs");
4
+ const superdoc = require("./chunks/index-CWNzyoyI.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CT28vUbx.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-s9GUR_Gc.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BBUBeVVw.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-Dymes5hN.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,