@harbour-enterprises/superdoc 0.22.0-next.1 → 0.22.0-next.10

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 (47) hide show
  1. package/dist/chunks/{PdfViewer-BpwMPbUj.es.js → PdfViewer-CJdQmuIm.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-B3KmcDup.cjs → PdfViewer-DE1NR4Ve.cjs} +1 -1
  3. package/dist/chunks/{index-Cw4YywoD.es.js → index-B9sHxXr_.es.js} +53 -26
  4. package/dist/chunks/{index-BOf6E2I4.cjs → index-nfoifSpX.cjs} +53 -26
  5. package/dist/chunks/{super-editor.es-DHDx2fsy.cjs → super-editor.es-DAP-fnHo.cjs} +2264 -1648
  6. package/dist/chunks/{super-editor.es-vfoWxyZL.es.js → super-editor.es-_iVPQ8J8.es.js} +2264 -1648
  7. package/dist/core/SuperDoc.d.ts +5 -0
  8. package/dist/core/SuperDoc.d.ts.map +1 -1
  9. package/dist/core/types/index.d.ts +4 -4
  10. package/dist/core/types/index.d.ts.map +1 -1
  11. package/dist/stores/comments-store.d.ts +4 -1
  12. package/dist/stores/comments-store.d.ts.map +1 -1
  13. package/dist/style.css +48 -44
  14. package/dist/super-editor/ai-writer.es.js +2 -2
  15. package/dist/super-editor/chunks/{converter-BcqEfCTg.js → converter-DK1NMJZB.js} +439 -169
  16. package/dist/super-editor/chunks/{docx-zipper-DZ9ph0iQ.js → docx-zipper-CmK8TyNb.js} +73 -12
  17. package/dist/super-editor/chunks/{editor-BC2sSIVa.js → editor-YR4uV-dp.js} +1902 -1607
  18. package/dist/super-editor/chunks/{toolbar-DNTo5DDf.js → toolbar-DzJyRvb0.js} +2 -2
  19. package/dist/super-editor/converter.es.js +1 -1
  20. package/dist/super-editor/docx-zipper.es.js +2 -2
  21. package/dist/super-editor/editor.es.js +3 -3
  22. package/dist/super-editor/file-zipper.es.js +1 -1
  23. package/dist/super-editor/src/core/DocxZipper.d.ts +1 -1
  24. package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +1 -13
  25. package/dist/super-editor/src/core/super-converter/exporter.d.ts +1 -0
  26. package/dist/super-editor/src/core/super-converter/helpers/tableFallbackHelpers.d.ts +24 -0
  27. package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +5 -1
  28. package/dist/super-editor/src/extensions/index.d.ts +2 -1
  29. package/dist/super-editor/src/extensions/structured-content/index.d.ts +1 -0
  30. package/dist/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +67 -0
  31. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentBlockTags.d.ts +7 -0
  32. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentInlineTags.d.ts +7 -0
  33. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTags.d.ts +7 -0
  34. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsById.d.ts +8 -0
  35. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/index.d.ts +4 -0
  36. package/dist/super-editor/src/utils/contextmenu-helpers.d.ts +24 -0
  37. package/dist/super-editor/style.css +4 -0
  38. package/dist/super-editor/super-editor.es.js +8 -16
  39. package/dist/super-editor/toolbar.es.js +2 -2
  40. package/dist/super-editor.cjs +1 -1
  41. package/dist/super-editor.es.js +1 -1
  42. package/dist/superdoc.cjs +2 -2
  43. package/dist/superdoc.es.js +2 -2
  44. package/dist/superdoc.umd.js +1665 -1022
  45. package/dist/superdoc.umd.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/super-editor/src/components/slash-menu/contextmenu-helpers.d.ts +0 -1
@@ -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
- import { p as process$1 } from "./converter-BcqEfCTg.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BC2sSIVa.js";
2
+ import { p as process$1 } from "./converter-DK1NMJZB.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-YR4uV-dp.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 { a5 } from "./chunks/converter-BcqEfCTg.js";
1
+ import { a5 } from "./chunks/converter-DK1NMJZB.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-BcqEfCTg.js";
2
- import { D } from "./chunks/docx-zipper-DZ9ph0iQ.js";
1
+ import "./chunks/converter-DK1NMJZB.js";
2
+ import { D } from "./chunks/docx-zipper-CmK8TyNb.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-BC2sSIVa.js";
2
- import "./chunks/converter-BcqEfCTg.js";
3
- import "./chunks/docx-zipper-DZ9ph0iQ.js";
1
+ import { E } from "./chunks/editor-YR4uV-dp.js";
2
+ import "./chunks/converter-DK1NMJZB.js";
3
+ import "./chunks/docx-zipper-CmK8TyNb.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-DZ9ph0iQ.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CmK8TyNb.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -33,7 +33,7 @@ declare class DocxZipper {
33
33
  /**
34
34
  * Update [Content_Types].xml with extensions of new Image annotations
35
35
  */
36
- updateContentTypes(docx: any, media: any, fromJson: any): Promise<any>;
36
+ updateContentTypes(docx: any, media: any, fromJson: any, updatedDocs?: {}): Promise<any>;
37
37
  unzip(file: any): Promise<any>;
38
38
  updateZip({ docx, updatedDocs, originalDocxFile, media, fonts, isHeadless }: {
39
39
  docx: any;
@@ -98,19 +98,7 @@ export class SuperConverter {
98
98
  get docxHelpers(): any;
99
99
  parseFromXml(): void;
100
100
  parseXmlToJson(xml: any): any;
101
- getDocumentDefaultStyles(): {
102
- fontSizePt?: undefined;
103
- kern?: undefined;
104
- typeface?: undefined;
105
- panose?: undefined;
106
- fontFamilyCss?: undefined;
107
- } | {
108
- fontSizePt: number;
109
- kern: any;
110
- typeface: any;
111
- panose: any;
112
- fontFamilyCss: any;
113
- };
101
+ getDocumentDefaultStyles(): {};
114
102
  getDocumentFonts(): string;
115
103
  getDocumentInternalId(): void;
116
104
  createDocumentIdElement(): {
@@ -103,6 +103,7 @@ export function translateHardBreak(params: any): {
103
103
  };
104
104
  }[];
105
105
  };
106
+ export function ensureSectionLayoutDefaults(sectPr: any, converter: any): any;
106
107
  export function isLineBreakOnlyRun(node: any): any;
107
108
  export class DocxExporter {
108
109
  constructor(converter: any);
@@ -0,0 +1,24 @@
1
+ export const DEFAULT_PAGE_WIDTH_TWIPS: 12240;
2
+ export const DEFAULT_PAGE_MARGIN_TWIPS: 1440;
3
+ export const DEFAULT_CONTENT_WIDTH_TWIPS: number;
4
+ export const MIN_COLUMN_WIDTH_TWIPS: number;
5
+ export function pctToPercent(value: any): number;
6
+ export function resolveContentWidthTwips(): number;
7
+ export function resolveMeasurementWidthPx(measurement: any): number;
8
+ export function countColumnsInRow(row: any): any;
9
+ export function buildFallbackGridForTable({ params, rows, tableWidth, tableWidthMeasurement }: {
10
+ params: Partial<import("@translator").SCDecoderConfig>;
11
+ rows: any[];
12
+ tableWidth?: {
13
+ width?: number | null;
14
+ };
15
+ tableWidthMeasurement?: {
16
+ value?: number;
17
+ type?: string;
18
+ };
19
+ }): {
20
+ grid: Array<{
21
+ col: number;
22
+ }>;
23
+ columnWidths: number[];
24
+ } | null;
@@ -4,6 +4,7 @@
4
4
  * @property {boolean} focused - Whether editor is focused
5
5
  * @property {Object|null} preservedSelection - Stored selection
6
6
  * @property {boolean} showVisualSelection - Whether to show selection decoration
7
+ * @property {boolean} skipFocusReset - Whether to skip clearing selection on next focus
7
8
  */
8
9
  /**
9
10
  * Configuration options for CustomSelection
@@ -22,7 +23,6 @@
22
23
  * @private
23
24
  */
24
25
  export const CustomSelectionPluginKey: PluginKey<any>;
25
- export function shouldAllowNativeContextMenu(event: MouseEvent): boolean;
26
26
  /**
27
27
  * @module CustomSelection
28
28
  * @sidebarTitle Custom Selection
@@ -45,6 +45,10 @@ export type SelectionState = {
45
45
  * - Whether to show selection decoration
46
46
  */
47
47
  showVisualSelection: boolean;
48
+ /**
49
+ * - Whether to skip clearing selection on next focus
50
+ */
51
+ skipFocusReset: boolean;
48
52
  };
49
53
  /**
50
54
  * Configuration options for CustomSelection
@@ -59,8 +59,9 @@ import { AiPlugin } from './ai/index.js';
59
59
  import { Search } from './search/index.js';
60
60
  import { StructuredContent } from './structured-content/index.js';
61
61
  import { StructuredContentBlock } from './structured-content/index.js';
62
+ import { StructuredContentCommands } from './structured-content/index.js';
62
63
  import { DocumentSection } from './structured-content/index.js';
63
64
  import { NodeResizer } from './noderesizer/index.js';
64
65
  import { CustomSelection } from './custom-selection/index.js';
65
66
  import { TextTransform } from './text-transform/index.js';
66
- export { History, Heading, Document, Text, Run, BulletList, OrderedList, ListItem, Paragraph, CommentRangeStart, CommentRangeEnd, CommentReference, TabNode, LineBreak, HardBreak, Bold, Italic, Underline, Highlight, Strike, Color, FontFamily, FontSize, TextAlign, TextIndent, TextStyle, LineHeight, FormatCommands, CommentsPlugin, Gapcursor, Table, TableRow, TableCell, TableHeader, Placeholder, DropCursor, BlockNode, FieldAnnotation, fieldAnnotationHelpers, Image, BookmarkStart, BookmarkEnd, PopoverPlugin, Mention, Collaboration, CollaborationCursor, TrackChanges, TrackInsert, TrackDelete, TrackFormat, CommentsMark, trackChangesHelpers, AiMark, AiAnimationMark, AiLoaderNode, AiPlugin, Search, StructuredContent, StructuredContentBlock, DocumentSection, NodeResizer, CustomSelection, TextTransform };
67
+ export { History, Heading, Document, Text, Run, BulletList, OrderedList, ListItem, Paragraph, CommentRangeStart, CommentRangeEnd, CommentReference, TabNode, LineBreak, HardBreak, Bold, Italic, Underline, Highlight, Strike, Color, FontFamily, FontSize, TextAlign, TextIndent, TextStyle, LineHeight, FormatCommands, CommentsPlugin, Gapcursor, Table, TableRow, TableCell, TableHeader, Placeholder, DropCursor, BlockNode, FieldAnnotation, fieldAnnotationHelpers, Image, BookmarkStart, BookmarkEnd, PopoverPlugin, Mention, Collaboration, CollaborationCursor, TrackChanges, TrackInsert, TrackDelete, TrackFormat, CommentsMark, trackChangesHelpers, AiMark, AiAnimationMark, AiLoaderNode, AiPlugin, Search, StructuredContent, StructuredContentBlock, StructuredContentCommands, DocumentSection, NodeResizer, CustomSelection, TextTransform };
@@ -1,3 +1,4 @@
1
1
  export * from "./structured-content.js";
2
2
  export * from "./structured-content-block.js";
3
+ export * from "./structured-content-commands.js";
3
4
  export * from "./document-section.js";
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @typedef {Object} StructuredContentInlineInsert
3
+ * @property {string} [text] - Text content to insert
4
+ * @property {Object} [json] - ProseMirror JSON
5
+ * @property {Object} [attrs] - Node attributes
6
+ */
7
+ /**
8
+ * @typedef {Object} StructuredContentBlockInsert
9
+ * @property {string} [html] - HTML content to insert
10
+ * @property {Object} [json] - ProseMirror JSON
11
+ * @property {Object} [attrs] - Node attributes
12
+ */
13
+ /**
14
+ * @typedef {Object} StructuredContentUpdate
15
+ * @property {string} [text] - Replace content with text (only for structured content inline)
16
+ * @property {string} [html] - Replace content with HTML (only for structured content block)
17
+ * @property {Object} [json] - Replace content with ProseMirror JSON (overrides html)
18
+ * @property {Object} [attrs] - Update attributes only (preserves content)
19
+ */
20
+ export const StructuredContentCommands: Extension;
21
+ export type StructuredContentInlineInsert = {
22
+ /**
23
+ * - Text content to insert
24
+ */
25
+ text?: string;
26
+ /**
27
+ * - ProseMirror JSON
28
+ */
29
+ json?: any;
30
+ /**
31
+ * - Node attributes
32
+ */
33
+ attrs?: any;
34
+ };
35
+ export type StructuredContentBlockInsert = {
36
+ /**
37
+ * - HTML content to insert
38
+ */
39
+ html?: string;
40
+ /**
41
+ * - ProseMirror JSON
42
+ */
43
+ json?: any;
44
+ /**
45
+ * - Node attributes
46
+ */
47
+ attrs?: any;
48
+ };
49
+ export type StructuredContentUpdate = {
50
+ /**
51
+ * - Replace content with text (only for structured content inline)
52
+ */
53
+ text?: string;
54
+ /**
55
+ * - Replace content with HTML (only for structured content block)
56
+ */
57
+ html?: string;
58
+ /**
59
+ * - Replace content with ProseMirror JSON (overrides html)
60
+ */
61
+ json?: any;
62
+ /**
63
+ * - Update attributes only (preserves content)
64
+ */
65
+ attrs?: any;
66
+ };
67
+ import { Extension } from '@core/index';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets all structured content block tags in the state.
3
+ * @param {EditorState} state Editor state.
4
+ * @returns {Array}
5
+ */
6
+ export function getStructuredContentBlockTags(state: EditorState): any[];
7
+ import { EditorState } from 'prosemirror-state';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets all structured content inline tags in the state.
3
+ * @param {EditorState} state Editor state.
4
+ * @returns {Array}
5
+ */
6
+ export function getStructuredContentInlineTags(state: EditorState): any[];
7
+ import { EditorState } from 'prosemirror-state';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets all structured content tags in the state.
3
+ * @param {EditorState} state Editor state.
4
+ * @returns {Array}
5
+ */
6
+ export function getStructuredContentTags(state: EditorState): any[];
7
+ import { EditorState } from 'prosemirror-state';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Gets structured content tags by ID in the state.
3
+ * @param {string | string[]} idOrIds
4
+ * @param {EditorState} state Editor state.
5
+ * @returns {Array}
6
+ */
7
+ export function getStructuredContentTagsById(idOrIds: string | string[], state: EditorState): any[];
8
+ import { EditorState } from 'prosemirror-state';
@@ -0,0 +1,4 @@
1
+ export * from "./getStructuredContentTags";
2
+ export * from "./getStructuredContentInlineTags";
3
+ export * from "./getStructuredContentBlockTags";
4
+ export * from "./getStructuredContentTagsById";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Determine if the native context menu should be allowed to appear.
3
+ * We bypass the custom menu when the user explicitly requests the system menu
4
+ * via modifier keys or when the event originated from a keyboard invocation.
5
+ * @param {MouseEvent} event
6
+ * @returns {boolean}
7
+ */
8
+ export function shouldBypassContextMenu(event: MouseEvent): boolean;
9
+ /**
10
+ * Determine if the native context menu should be allowed to appear.
11
+ * We bypass the custom menu when the user explicitly requests the system menu
12
+ * via modifier keys or when the event originated from a keyboard invocation.
13
+ * @param {MouseEvent} event
14
+ * @returns {boolean}
15
+ */
16
+ export function shouldUseNativeContextMenu(event: MouseEvent): boolean;
17
+ /**
18
+ * Determine if the native context menu should be allowed to appear.
19
+ * We bypass the custom menu when the user explicitly requests the system menu
20
+ * via modifier keys or when the event originated from a keyboard invocation.
21
+ * @param {MouseEvent} event
22
+ * @returns {boolean}
23
+ */
24
+ export function shouldAllowNativeContextMenu(event: MouseEvent): boolean;
@@ -717,6 +717,9 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
717
717
  z-index: -1;
718
718
  }
719
719
  .ProseMirror div[data-horizontal-rule='true'] {
720
+ position: relative;
721
+ z-index: auto;
722
+ display: block;
720
723
  margin-top: auto;
721
724
  align-self: flex-end;
722
725
  }
@@ -1141,6 +1144,7 @@ on the right if it is inside shape textbox.
1141
1144
  border-bottom: none;
1142
1145
  border-radius: 6px 6px 0 0;
1143
1146
  background-color: #629be7dd;
1147
+ box-sizing: border-box;
1144
1148
  z-index: 10;
1145
1149
  cursor: grab;
1146
1150
  display: none;
@@ -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 _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, b2 as translator$q, b3 as translator$r, b4 as translator$s, b5 as translator$t, b6 as translator$u, b7 as translator$v, b8 as translator$w, b9 as translator$x, ba as translator$y, bb as translator$z, bc as translator$A, bd as translator$B, be as translator$C, bf as translator$D, bg as translator$E, bh as translator$F, bi as translator$G, bj as translator$H, bk as translator$I, bl as translator$J, bm as translator$K, bn as translator$L, bo as translator$M, bp as translator$N, bq as translator$O, br as translator$P, bs as translator$Q, bt as translator$R, bu as translator$S, bv as translator$T, bw as translator$U, bx as translator$V, by as translator$W, bz as translator$X, bA as translator$Y, bB as translator$Z, bC as translator$_, bD as translator$$, bE as translator$10, a as Plugin } from "./chunks/converter-BcqEfCTg.js";
13
- import { bF, a5, i, a2 } from "./chunks/converter-BcqEfCTg.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, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-BC2sSIVa.js";
15
- import { n, C, o, T, l, p, m } from "./chunks/editor-BC2sSIVa.js";
12
+ import { aw as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, az as vClickOutside, H as findParentNode, aA as getActiveFormatting, as as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, aE as runPropertyTranslators, aF as translator, aG as translator$1, aH as translator$2, aI as translator$3, aJ as translator$4, aK as translator$5, aL as translator$6, aM as translator$7, aN as translator$8, aO as translator$9, aP as translator$a, aQ as translator$b, aR as translator$c, aS as translator$d, aT as translator$e, aU as translator$f, aV as translator$g, aW as translator$h, aX as translator$i, aY as translator$j, aZ as translator$k, a_ as translator$l, a$ as translator$m, b0 as translator$n, b1 as translator$o, b2 as translator$p, b3 as translator$q, b4 as translator$r, b5 as translator$s, b6 as translator$t, b7 as translator$u, b8 as translator$v, b9 as translator$w, ba as translator$x, bb as translator$y, bc as translator$z, bd as translator$A, be as translator$B, bf as translator$C, bg as translator$D, bh as translator$E, bi as translator$F, bj as translator$G, bk as translator$H, bl as translator$I, bm as translator$J, bn as translator$K, bo as translator$L, bp as translator$M, bq as translator$N, br as translator$O, bs as translator$P, bt as translator$Q, bu as translator$R, bv as translator$S, bw as translator$T, bx as translator$U, by as translator$V, bz as translator$W, bA as translator$X, bB as translator$Y, bC as translator$Z, bD as translator$_, bE as translator$$, bF as translator$10, a as Plugin } from "./chunks/converter-DK1NMJZB.js";
13
+ import { bG, a5, i, a2 } from "./chunks/converter-DK1NMJZB.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, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-YR4uV-dp.js";
15
+ import { n, C, o, T, l, p, m } from "./chunks/editor-YR4uV-dp.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, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-DNTo5DDf.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-DzJyRvb0.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-DZ9ph0iQ.js";
19
+ import { D } from "./chunks/docx-zipper-CmK8TyNb.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -2584,7 +2584,7 @@ class SuperToolbar extends EventEmitter {
2584
2584
  if (!argument) return;
2585
2585
  item.onActivate({ zoom: argument });
2586
2586
  this.emit("superdoc-command", { item, argument });
2587
- const layers = document.querySelector(this.superdoc.config.selector)?.querySelector(".layers");
2587
+ const layers = this.superdoc.element?.querySelector(".layers");
2588
2588
  if (!layers) return;
2589
2589
  const isMobileDevice = typeof screen.orientation !== "undefined";
2590
2590
  const isSmallScreen = window.matchMedia("(max-width: 834px)").matches;
@@ -3695,14 +3695,6 @@ function getStructureFromResolvedPos(state, pos) {
3695
3695
  return null;
3696
3696
  }
3697
3697
  }
3698
- const shouldBypassContextMenu = (event) => {
3699
- if (!event) return false;
3700
- if (event.ctrlKey || event.metaKey) {
3701
- return true;
3702
- }
3703
- const isKeyboardInvocation = event.type === "contextmenu" && typeof event.detail === "number" && event.detail === 0 && (event.button === 0 || event.button === void 0) && event.clientX === 0 && event.clientY === 0;
3704
- return Boolean(isKeyboardInvocation);
3705
- };
3706
3698
  const isModuleEnabled = (editorOptions, moduleName) => {
3707
3699
  switch (moduleName) {
3708
3700
  case "ai":
@@ -5004,7 +4996,7 @@ const Extensions = {
5004
4996
  export {
5005
4997
  AIWriter,
5006
4998
  n as AnnotatorHelpers,
5007
- bF as BasicUpload,
4999
+ bG as BasicUpload,
5008
5000
  C as CommentsPluginKey,
5009
5001
  D as DocxZipper,
5010
5002
  Editor,
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DNTo5DDf.js";
3
- import "./chunks/editor-BC2sSIVa.js";
2
+ import { T } from "./chunks/toolbar-DzJyRvb0.js";
3
+ import "./chunks/editor-YR4uV-dp.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-DHDx2fsy.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DAP-fnHo.cjs");
4
4
  require("./chunks/vue-DWle4Cai.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-vfoWxyZL.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-_iVPQ8J8.es.js";
2
2
  import "./chunks/vue-CXxsqYcP.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-DHDx2fsy.cjs");
4
- const superdoc = require("./chunks/index-BOf6E2I4.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DAP-fnHo.cjs");
4
+ const superdoc = require("./chunks/index-nfoifSpX.cjs");
5
5
  require("./chunks/vue-DWle4Cai.cjs");
6
6
  require("./chunks/jszip-b7l8QkfH.cjs");
7
7
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-vfoWxyZL.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-Cw4YywoD.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-_iVPQ8J8.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-B9sHxXr_.es.js";
3
3
  import "./chunks/vue-CXxsqYcP.es.js";
4
4
  import "./chunks/jszip-B8KIZSNe.es.js";
5
5
  import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";