@harbour-enterprises/superdoc 0.8.1 → 0.8.2

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-CrXCj3vB.js → super-editor.es-DsEPyJm_.js} +53 -22
  2. package/dist/chunks/{super-editor.es-CrXCj3vB.js.map → super-editor.es-DsEPyJm_.js.map} +1 -1
  3. package/dist/super-editor/chunks/{converter-CxyadIIu.js → converter-azXT1h6A.js} +3 -3
  4. package/dist/super-editor/chunks/{converter-CxyadIIu.js.map → converter-azXT1h6A.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-KYJBSgz3.js → docx-zipper-D9w3bMVr.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-KYJBSgz3.js.map → docx-zipper-D9w3bMVr.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-BBN36BZJ.js → editor-D5nTnth_.js} +53 -22
  8. package/dist/super-editor/chunks/editor-D5nTnth_.js.map +1 -0
  9. package/dist/super-editor/chunks/{toolbar-CmvXKW36.js → toolbar-BYleEua6.js} +3 -3
  10. package/dist/super-editor/chunks/{toolbar-CmvXKW36.js.map → toolbar-BYleEua6.js.map} +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/docx-zipper.es.js +2 -2
  13. package/dist/super-editor/editor.es.js +3 -3
  14. package/dist/super-editor/extensions/comment/comments-plugin.d.ts.map +1 -1
  15. package/dist/super-editor/extensions/index.d.ts.map +1 -1
  16. package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/super-editor.es.js +6 -6
  19. package/dist/super-editor/tests/export/export-helpers/export-helpers.d.ts.map +1 -1
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.es.js +1 -1
  22. package/dist/superdoc.es.js +3 -3
  23. package/dist/superdoc.umd.js +53 -22
  24. package/dist/superdoc.umd.js.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/super-editor/chunks/editor-BBN36BZJ.js.map +0 -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, prepareDocumentForImport_fn, prepareDocumentForExport_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 generateRandom32BitHex, u as TrackFormatMarkName, w as comments_module_events, x as AddMarkStep, y as RemoveMarkStep, z as twipsToLines, B as pixelsToTwips, C as SuperConverter, E as EditorState, G as toKebabCase, H as kebabCase, I as SelectionRange, J as Transform } from "./converter-CxyadIIu.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 generateRandom32BitHex, u as TrackFormatMarkName, w as comments_module_events, x as AddMarkStep, y as RemoveMarkStep, z as twipsToLines, B as pixelsToTwips, C as SuperConverter, E as EditorState, G as toKebabCase, H as kebabCase, I as SelectionRange, J as Transform } from "./converter-azXT1h6A.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-KYJBSgz3.js";
17
+ import { D as DocxZipper } from "./docx-zipper-D9w3bMVr.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -10846,6 +10846,7 @@ const CommentsPlugin = Extension.create({
10846
10846
  const editor = this.editor;
10847
10847
  let shouldUpdate;
10848
10848
  let activeThreadId;
10849
+ if (editor.options.isHeadless) return [];
10849
10850
  const commentsPlugin = new Plugin({
10850
10851
  key: CommentsPluginKey,
10851
10852
  state: {
@@ -11744,7 +11745,7 @@ const _Editor = class _Editor extends EventEmitter {
11744
11745
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
11745
11746
  */
11746
11747
  processCollaborationMigrations() {
11747
- console.debug("[checkVersionMigrations] Current editor version", "0.8.1");
11748
+ console.debug("[checkVersionMigrations] Current editor version", "0.8.2");
11748
11749
  if (!this.options.ydoc) return;
11749
11750
  const metaMap = this.options.ydoc.getMap("meta");
11750
11751
  let docVersion = metaMap.get("version");
@@ -14030,7 +14031,17 @@ const Paragraph = Node.create({
14030
14031
  rendered: false
14031
14032
  },
14032
14033
  filename: { rendered: false },
14033
- rsidRDefault: { rendered: false }
14034
+ rsidRDefault: { rendered: false },
14035
+ // Experimental
14036
+ isEditable: {
14037
+ renderDOM: ({ isEditable }) => {
14038
+ let style = "";
14039
+ if (isEditable === false) {
14040
+ style = "opacity: 0.5; cursor: default; pointer-events: none; user-select: none;";
14041
+ }
14042
+ return { style, contenteditable: isEditable === false ? false : true };
14043
+ }
14044
+ }
14034
14045
  };
14035
14046
  },
14036
14047
  parseDOM() {
@@ -22564,23 +22575,43 @@ const onImageLoad = (editor) => {
22564
22575
  editor.view.dispatch(newTr);
22565
22576
  });
22566
22577
  };
22567
- const getRichTextExtensions = () => [
22568
- Bold,
22569
- Color,
22570
- Document,
22571
- History,
22572
- Italic,
22573
- Link,
22574
- Paragraph,
22575
- Strike,
22576
- Text,
22577
- TextStyle,
22578
- Underline,
22579
- Placeholder,
22580
- PopoverPlugin,
22581
- Mention,
22582
- Highlight
22583
- ];
22578
+ const getRichTextExtensions = () => {
22579
+ return [
22580
+ Bold,
22581
+ Color,
22582
+ Document,
22583
+ FontFamily,
22584
+ FontSize,
22585
+ History,
22586
+ Heading,
22587
+ Italic,
22588
+ LineHeight,
22589
+ Link,
22590
+ Paragraph,
22591
+ LineBreak,
22592
+ HardBreak,
22593
+ Strike,
22594
+ Text,
22595
+ TextAlign,
22596
+ TextIndent,
22597
+ TextStyle,
22598
+ Underline,
22599
+ Placeholder,
22600
+ PopoverPlugin,
22601
+ Mention,
22602
+ Highlight,
22603
+ FormatCommands,
22604
+ Table,
22605
+ TableRow,
22606
+ TableCell,
22607
+ TableHeader,
22608
+ FieldAnnotation,
22609
+ DropCursor,
22610
+ TrackInsert,
22611
+ TrackDelete,
22612
+ TrackFormat
22613
+ ];
22614
+ };
22584
22615
  const getStarterExtensions = () => {
22585
22616
  return [
22586
22617
  Bold,
@@ -22658,4 +22689,4 @@ export {
22658
22689
  redoDepth as r,
22659
22690
  undoDepth as u
22660
22691
  };
22661
- //# sourceMappingURL=editor-BBN36BZJ.js.map
22692
+ //# sourceMappingURL=editor-D5nTnth_.js.map