@harbour-enterprises/superdoc 0.5.12 → 0.5.13

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 (26) hide show
  1. package/dist/chunks/{super-editor.es-DImmA9mQ.js → super-editor.es-D8gDx0Xk.js} +22 -10
  2. package/dist/chunks/{super-editor.es-DImmA9mQ.js.map → super-editor.es-D8gDx0Xk.js.map} +1 -1
  3. package/dist/style.css +6 -6
  4. package/dist/super-editor/chunks/{converter-CFLxtL2x.js → converter-NKfCyisU.js} +3 -3
  5. package/dist/super-editor/chunks/{converter-CFLxtL2x.js.map → converter-NKfCyisU.js.map} +1 -1
  6. package/dist/super-editor/chunks/{docx-zipper-BaNAQU0O.js → docx-zipper-DJ7daFzb.js} +2 -2
  7. package/dist/super-editor/chunks/{docx-zipper-BaNAQU0O.js.map → docx-zipper-DJ7daFzb.js.map} +1 -1
  8. package/dist/super-editor/chunks/{editor-BmHE-S8u.js → editor-B9mWpy4t.js} +7 -5
  9. package/dist/super-editor/chunks/{editor-BmHE-S8u.js.map → editor-B9mWpy4t.js.map} +1 -1
  10. package/dist/super-editor/chunks/{toolbar-p9qCNyMX.js → toolbar-C1eFWogE.js} +3 -3
  11. package/dist/super-editor/chunks/{toolbar-p9qCNyMX.js.map → toolbar-C1eFWogE.js.map} +1 -1
  12. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  13. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +1 -0
  14. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/extensions/linked-styles/linked-styles.d.ts.map +1 -1
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/style.css +6 -6
  21. package/dist/super-editor/super-editor.es.js +21 -11
  22. package/dist/super-editor/super-editor.es.js.map +1 -1
  23. package/dist/super-editor/toolbar.es.js +2 -2
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.es.js +3 -3
  26. package/package.json +1 -1
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _events, _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-CFLxtL2x.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-NKfCyisU.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createElementVNode, toDisplayString, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-BaNAQU0O.js";
17
+ import { D as DocxZipper } from "./docx-zipper-DJ7daFzb.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -11340,7 +11340,7 @@ const _Editor = class _Editor extends EventEmitter {
11340
11340
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
11341
11341
  */
11342
11342
  processCollaborationMigrations() {
11343
- console.debug("[checkVersionMigrations] Current editor version", "0.5.12");
11343
+ console.debug("[checkVersionMigrations] Current editor version", "0.5.13");
11344
11344
  if (!this.options.ydoc) return;
11345
11345
  const metaMap = this.options.ydoc.getMap("meta");
11346
11346
  let docVersion = metaMap.get("version");
@@ -13196,7 +13196,7 @@ const createLinkedStylesPlugin = (editor) => {
13196
13196
  key: LinkedStylesPluginKey,
13197
13197
  state: {
13198
13198
  init(_, { doc: doc2, selection }) {
13199
- if (!editor.converter) return;
13199
+ if (!editor.converter || editor.options.mode !== "docx") return {};
13200
13200
  const styles = editor.converter?.linkedStyles || [];
13201
13201
  return {
13202
13202
  styles,
@@ -13204,6 +13204,7 @@ const createLinkedStylesPlugin = (editor) => {
13204
13204
  };
13205
13205
  },
13206
13206
  apply(tr, prev, oldEditorState, newEditorState) {
13207
+ if (!editor.converter || editor.options.mode !== "docx") return { ...prev };
13207
13208
  let decorations = prev.decorations || DecorationSet.empty;
13208
13209
  if (tr.docChanged) {
13209
13210
  const styles = LinkedStylesPluginKey.getState(editor.state).styles;
@@ -13294,6 +13295,7 @@ const getSpacingStyleString = (spacing) => {
13294
13295
  `.trim();
13295
13296
  };
13296
13297
  const getQuickFormatList = (editor) => {
13298
+ if (!editor?.converter) return [];
13297
13299
  const styles = editor.converter.linkedStyles || [];
13298
13300
  return styles.filter((style) => {
13299
13301
  return style.type === "paragraph" && style.definition.attrs;
@@ -19377,4 +19379,4 @@ export {
19377
19379
  redoDepth as r,
19378
19380
  undoDepth as u
19379
19381
  };
19380
- //# sourceMappingURL=editor-BmHE-S8u.js.map
19382
+ //# sourceMappingURL=editor-B9mWpy4t.js.map