superdoc 0.35.2 → 0.36.0

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 (37) hide show
  1. package/dist/chunks/{PdfViewer-CjZkPY58.cjs → PdfViewer-BVjCijQM.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-BFtgOHmf.es.js → PdfViewer-Cw6hrjmI.es.js} +1 -1
  3. package/dist/chunks/{index-2Tp2kFsl.cjs → index-C2I7v8Mz.cjs} +15 -5
  4. package/dist/chunks/{index-CzChRmiA-Db3kkVxc.cjs → index-C6pGFRDv-DPPxKqzz.cjs} +1 -1
  5. package/dist/chunks/{index-CzChRmiA-C73DMMSu.es.js → index-C6pGFRDv-NmZ85_ZC.es.js} +1 -1
  6. package/dist/chunks/{index-cSTBvMaB.es.js → index-DxVLb2GI.es.js} +15 -5
  7. package/dist/chunks/{super-editor.es-CyHF2Y6u.cjs → super-editor.es-DU7fPHu1.cjs} +115 -50
  8. package/dist/chunks/{super-editor.es-DgptwjrT.es.js → super-editor.es-wvWKJiSQ.es.js} +115 -50
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +5 -2
  10. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  11. package/dist/packages/superdoc/src/core/types/index.d.ts +52 -15
  12. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  13. package/dist/style.css +37 -33
  14. package/dist/super-editor/ai-writer.es.js +2 -2
  15. package/dist/super-editor/chunks/{converter-CNQW31Bb.js → converter-B_MV8Ifd.js} +1 -1
  16. package/dist/super-editor/chunks/{docx-zipper-WzK7I7n3.js → docx-zipper-BErVQPhm.js} +1 -1
  17. package/dist/super-editor/chunks/{editor-tmuPz5Wb.js → editor-DJdDJYe1.js} +88 -17
  18. package/dist/super-editor/chunks/{index-CzChRmiA.js → index-C6pGFRDv.js} +1 -1
  19. package/dist/super-editor/chunks/{toolbar-BVEErXhc.js → toolbar-C3z7Pv8Z.js} +2 -2
  20. package/dist/super-editor/converter.es.js +1 -1
  21. package/dist/super-editor/docx-zipper.es.js +2 -2
  22. package/dist/super-editor/editor.es.js +3 -3
  23. package/dist/super-editor/file-zipper.es.js +1 -1
  24. package/dist/super-editor/style.css +10 -6
  25. package/dist/super-editor/super-editor/src/core/Editor.d.ts +29 -4
  26. package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
  27. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +5 -2
  28. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  29. package/dist/super-editor/super-editor.es.js +32 -28
  30. package/dist/super-editor/toolbar.es.js +2 -2
  31. package/dist/super-editor.cjs +1 -1
  32. package/dist/super-editor.es.js +1 -1
  33. package/dist/superdoc.cjs +2 -2
  34. package/dist/superdoc.es.js +2 -2
  35. package/dist/superdoc.umd.js +123 -48
  36. package/dist/superdoc.umd.js.map +1 -1
  37. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-Cwv-wUpm.cjs");
4
- const superdoc = require("./index-2Tp2kFsl.cjs");
4
+ const superdoc = require("./index-C2I7v8Mz.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { m as defineComponent, y as h, O as Transition, $ as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, v as createVNode, x as unref } from "./vue-CKmzTNVs.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-cSTBvMaB.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-DxVLb2GI.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-CyHF2Y6u.cjs");
2
+ const superEditor_es = require("./super-editor.es-DU7fPHu1.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-DmHNHvFX.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -17238,7 +17238,7 @@ const _sfc_main = {
17238
17238
  __name: "SuperDoc",
17239
17239
  emits: ["selection-update"],
17240
17240
  setup(__props, { emit: __emit }) {
17241
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CjZkPY58.cjs")));
17241
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BVjCijQM.cjs")));
17242
17242
  const superdocStore = useSuperdocStore();
17243
17243
  const commentsStore = useCommentsStore();
17244
17244
  const {
@@ -17459,6 +17459,8 @@ const _sfc_main = {
17459
17459
  suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
17460
17460
  disableContextMenu: proxy.$superdoc.config.disableContextMenu,
17461
17461
  jsonOverride: proxy.$superdoc.config.jsonOverride,
17462
+ layoutMode: proxy.$superdoc.config.layoutMode,
17463
+ layoutMargins: proxy.$superdoc.config.layoutMargins,
17462
17464
  permissionResolver: (payload = {}) => proxy.$superdoc.canPerformPermission({
17463
17465
  role: proxy.$superdoc.config.role,
17464
17466
  isInternal: proxy.$superdoc.config.isInternal,
@@ -17832,7 +17834,7 @@ const _sfc_main = {
17832
17834
  };
17833
17835
  }
17834
17836
  };
17835
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-29e35f23"]]);
17837
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5138e8c6"]]);
17836
17838
  const createSuperdocVueApp = () => {
17837
17839
  const app = vue.createApp(App);
17838
17840
  const pinia = createPinia();
@@ -17969,7 +17971,15 @@ class SuperDoc extends eventemitter3.EventEmitter {
17969
17971
  // async (file) => url;
17970
17972
  handleImageUpload: null,
17971
17973
  // Disable context menus (slash and right-click) globally
17972
- disableContextMenu: false
17974
+ disableContextMenu: false,
17975
+ // Document layout mode: 'paginated' (default) or 'responsive'
17976
+ // 'paginated': Fixed page width, shows page breaks like a real document
17977
+ // 'responsive': 100% width, text reflows to fit the container (useful for mobile/accessibility)
17978
+ layoutMode: "paginated",
17979
+ // Custom margins for responsive layout mode (values in pixels)
17980
+ // Only applies when layoutMode is 'responsive'
17981
+ // Example: { top: 48, bottom: 48, left: 48, right: 48 }
17982
+ layoutMargins: null
17973
17983
  };
17974
17984
  /**
17975
17985
  * @param {Config} config
@@ -18002,7 +18012,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18002
18012
  this.config.colors = shuffleArray(this.config.colors);
18003
18013
  this.userColorMap = /* @__PURE__ */ new Map();
18004
18014
  this.colorIndex = 0;
18005
- this.version = "0.35.2";
18015
+ this.version = "0.36.0";
18006
18016
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18007
18017
  this.superdocId = config.superdocId || uuid.v4();
18008
18018
  this.colors = this.config.colors;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-CyHF2Y6u.cjs");
3
+ const superEditor_es = require("./super-editor.es-DU7fPHu1.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-DgptwjrT.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-wvWKJiSQ.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -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-DgptwjrT.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-wvWKJiSQ.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-hYlnBzSA.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -17221,7 +17221,7 @@ const _sfc_main = {
17221
17221
  __name: "SuperDoc",
17222
17222
  emits: ["selection-update"],
17223
17223
  setup(__props, { emit: __emit }) {
17224
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-BFtgOHmf.es.js"));
17224
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Cw6hrjmI.es.js"));
17225
17225
  const superdocStore = useSuperdocStore();
17226
17226
  const commentsStore = useCommentsStore();
17227
17227
  const {
@@ -17442,6 +17442,8 @@ const _sfc_main = {
17442
17442
  suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
17443
17443
  disableContextMenu: proxy.$superdoc.config.disableContextMenu,
17444
17444
  jsonOverride: proxy.$superdoc.config.jsonOverride,
17445
+ layoutMode: proxy.$superdoc.config.layoutMode,
17446
+ layoutMargins: proxy.$superdoc.config.layoutMargins,
17445
17447
  permissionResolver: (payload = {}) => proxy.$superdoc.canPerformPermission({
17446
17448
  role: proxy.$superdoc.config.role,
17447
17449
  isInternal: proxy.$superdoc.config.isInternal,
@@ -17815,7 +17817,7 @@ const _sfc_main = {
17815
17817
  };
17816
17818
  }
17817
17819
  };
17818
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-29e35f23"]]);
17820
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5138e8c6"]]);
17819
17821
  const createSuperdocVueApp = () => {
17820
17822
  const app = createApp(App);
17821
17823
  const pinia = createPinia();
@@ -17952,7 +17954,15 @@ class SuperDoc extends EventEmitter {
17952
17954
  // async (file) => url;
17953
17955
  handleImageUpload: null,
17954
17956
  // Disable context menus (slash and right-click) globally
17955
- disableContextMenu: false
17957
+ disableContextMenu: false,
17958
+ // Document layout mode: 'paginated' (default) or 'responsive'
17959
+ // 'paginated': Fixed page width, shows page breaks like a real document
17960
+ // 'responsive': 100% width, text reflows to fit the container (useful for mobile/accessibility)
17961
+ layoutMode: "paginated",
17962
+ // Custom margins for responsive layout mode (values in pixels)
17963
+ // Only applies when layoutMode is 'responsive'
17964
+ // Example: { top: 48, bottom: 48, left: 48, right: 48 }
17965
+ layoutMargins: null
17956
17966
  };
17957
17967
  /**
17958
17968
  * @param {Config} config
@@ -17985,7 +17995,7 @@ class SuperDoc extends EventEmitter {
17985
17995
  this.config.colors = shuffleArray(this.config.colors);
17986
17996
  this.userColorMap = /* @__PURE__ */ new Map();
17987
17997
  this.colorIndex = 0;
17988
- this.version = "0.35.2";
17998
+ this.version = "0.36.0";
17989
17999
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17990
18000
  this.superdocId = config.superdocId || v4();
17991
18001
  this.colors = this.config.colors;