@harbour-enterprises/superdoc 0.18.0-next.2 → 0.18.0-next.4

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 (36) hide show
  1. package/dist/chunks/{PdfViewer-D9sb0T1f.cjs → PdfViewer-Clvr2OBw.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-C3MhLK2d.es.js → PdfViewer-tWXS43mF.es.js} +1 -1
  3. package/dist/chunks/{index-D4MPFidQ.cjs → index-BkStnRcA.cjs} +2 -2
  4. package/dist/chunks/{index-OlqsNrl5.es.js → index-Dwl_rWDB.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-D0wPEvPh.cjs → super-editor.es-CpjpLN5S.cjs} +351 -31
  6. package/dist/chunks/{super-editor.es-D57bZvWs.es.js → super-editor.es-IKbi3D64.es.js} +351 -31
  7. package/dist/super-editor/ai-writer.es.js +1 -1
  8. package/dist/super-editor/chunks/{editor-Dlzi1Ni6.js → editor-dWtBG-wm.js} +351 -31
  9. package/dist/super-editor/chunks/{toolbar-DIRJurpK.js → toolbar-BTjX4A_E.js} +1 -1
  10. package/dist/super-editor/editor.es.js +1 -1
  11. package/dist/super-editor/src/extensions/block-node/block-node.d.ts +27 -3
  12. package/dist/super-editor/src/extensions/color/color.d.ts +1 -1
  13. package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +5 -0
  14. package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +5 -0
  15. package/dist/super-editor/src/extensions/image/image.d.ts +5 -0
  16. package/dist/super-editor/src/extensions/image/imageHelpers/getFileOpener.d.ts +1 -1
  17. package/dist/super-editor/src/extensions/image/imageHelpers/handleImageUpload.d.ts +1 -1
  18. package/dist/super-editor/src/extensions/image/imageHelpers/imagePlaceholderPlugin.d.ts +2 -3
  19. package/dist/super-editor/src/extensions/image/imageHelpers/imagePositionPlugin.d.ts +1 -2
  20. package/dist/super-editor/src/extensions/image/imageHelpers/processUploadedImage.d.ts +2 -5
  21. package/dist/super-editor/src/extensions/image/imageHelpers/startImageUpload.d.ts +18 -3
  22. package/dist/super-editor/src/extensions/linked-styles/helpers.d.ts +4 -6
  23. package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +29 -0
  24. package/dist/super-editor/src/extensions/linked-styles/plugin.d.ts +4 -2
  25. package/dist/super-editor/src/extensions/text-align/text-align.d.ts +9 -0
  26. package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +19 -0
  27. package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +5 -0
  28. package/dist/super-editor/super-editor.es.js +3 -3
  29. package/dist/super-editor/toolbar.es.js +2 -2
  30. package/dist/super-editor.cjs +1 -1
  31. package/dist/super-editor.es.js +1 -1
  32. package/dist/superdoc.cjs +2 -2
  33. package/dist/superdoc.es.js +2 -2
  34. package/dist/superdoc.umd.js +351 -31
  35. package/dist/superdoc.umd.js.map +1 -1
  36. package/package.json +1 -1
@@ -1,7 +1,31 @@
1
1
  export const BlockNodePluginKey: PluginKey<any>;
2
+ /**
3
+ * Block node information object
4
+ * @typedef {Object} BlockNodeInfo
5
+ * @property {Object} node - The block node
6
+ * @property {number} pos - Position in the document
7
+ */
8
+ /**
9
+ * @module BlockNode
10
+ * @sidebarTitle Block Node
11
+ * @snippetPath /snippets/extensions/block-node.mdx
12
+ */
2
13
  export const BlockNode: Extension;
3
- export function nodeAllowsSdBlockIdAttr(node: import("prosemirror-model").Node): boolean;
4
- export function nodeNeedsSdBlockId(node: import("prosemirror-model").Node): boolean;
5
- export function checkForNewBlockNodesInTrs(transactions: readonly Transaction[]): boolean;
14
+ export function nodeAllowsSdBlockIdAttr(node: any): boolean;
15
+ export function nodeNeedsSdBlockId(node: any): boolean;
16
+ export function checkForNewBlockNodesInTrs(transactions: ArrayLike<any>): boolean;
17
+ /**
18
+ * Block node information object
19
+ */
20
+ export type BlockNodeInfo = {
21
+ /**
22
+ * - The block node
23
+ */
24
+ node: any;
25
+ /**
26
+ * - Position in the document
27
+ */
28
+ pos: number;
29
+ };
6
30
  import { PluginKey } from 'prosemirror-state';
7
31
  import { Extension } from '@core/Extension.js';
@@ -5,7 +5,7 @@
5
5
  */
6
6
  /**
7
7
  * @module Color
8
- * @sidebarTitle Text Color
8
+ * @sidebarTitle Color
9
9
  * @snippetPath /snippets/extensions/color.mdx
10
10
  */
11
11
  export const Color: Extension;
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module DropCursor
3
+ * @sidebarTitle Drop Cursor
4
+ * @snippetPath /snippets/extensions/dropcursor.mdx
5
+ */
1
6
  export const DropCursor: Extension;
2
7
  import { Extension } from '@core/index.js';
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module Gapcursor
3
+ * @sidebarTitle Gap Cursor
4
+ * @snippetPath /snippets/extensions/gapcursor.mdx
5
+ */
1
6
  export const Gapcursor: Extension;
2
7
  import { Extension } from '@core/index.js';
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module Image
3
+ * @sidebarTitle Image
4
+ * @snippetPath /snippets/extensions/image.mdx
5
+ */
1
6
  export const Image: Node;
2
7
  import { Node } from '@core/index.js';
@@ -1 +1 @@
1
- export function getFileOpener(): () => Promise<any>;
1
+ export function getFileOpener(): Function;
@@ -1 +1 @@
1
- export function handleImageUpload(file: any): Promise<any>;
1
+ export function handleImageUpload(file: File): Promise<string>;
@@ -1,6 +1,5 @@
1
1
  export const ImagePlaceholderPluginKey: PluginKey<any>;
2
- export function ImagePlaceholderPlugin(): Plugin<DecorationSet>;
3
- export function findPlaceholder(state: any, id: any): any;
2
+ export function ImagePlaceholderPlugin(): Plugin;
3
+ export function findPlaceholder(state: any, id: string): number | null;
4
4
  import { PluginKey } from 'prosemirror-state';
5
- import { DecorationSet } from 'prosemirror-view';
6
5
  import { Plugin } from 'prosemirror-state';
@@ -1,5 +1,4 @@
1
1
  export function ImagePositionPlugin({ editor }: {
2
2
  editor: any;
3
- }): Plugin<DecorationSet>;
4
- import { DecorationSet } from 'prosemirror-view';
3
+ }): Plugin;
5
4
  import { Plugin } from 'prosemirror-state';
@@ -1,5 +1,2 @@
1
- export function processUploadedImage(fileData: string | File, editor: any): Promise<string | File>;
2
- export function getAllowedImageDimensions(width: any, height: any, editor: any): {
3
- width: any;
4
- height: any;
5
- };
1
+ export function processUploadedImage(fileData: string | File, editor: any): Promise<string | any>;
2
+ export function getAllowedImageDimensions(width: number, height: number, editor: any): any;
@@ -1,12 +1,27 @@
1
+ /**
2
+ * Uploads an image and inserts it into the document
3
+ * @category Helper
4
+ * @param {Object} params - Upload parameters
5
+ * @param {Object} params.editor - Editor instance
6
+ * @param {Object} params.view - Editor view
7
+ * @param {File} params.file - Processed image file
8
+ * @param {Object} params.size - Image dimensions
9
+ * @param {Function} params.uploadHandler - Function to handle the upload
10
+ * @returns {Promise<void>}
11
+ * @example
12
+ * await uploadImage({ editor, view, file, size, uploadHandler });
13
+ * @note Shows placeholder during upload
14
+ * @note Handles collaboration mode image sharing
15
+ */
1
16
  export function uploadImage({ editor, view, file, size, uploadHandler }: {
2
17
  editor: any;
3
18
  view: any;
4
- file: any;
19
+ file: File;
5
20
  size: any;
6
- uploadHandler: any;
21
+ uploadHandler: Function;
7
22
  }): Promise<void>;
8
23
  export function startImageUpload({ editor, view, file }: {
9
24
  editor: any;
10
25
  view: any;
11
- file: any;
26
+ file: File;
12
27
  }): Promise<void>;
@@ -1,9 +1,7 @@
1
- export function getLinkedStyle(styleId: string, styles?: any): any;
1
+ export function getLinkedStyle(styleId: string, styles?: any[]): any;
2
2
  export function getSpacingStyle(spacing: any): any;
3
3
  export function getSpacingStyleString(spacing: any): string;
4
- export function getMarksStyle(attrs: any): string;
5
- export function getQuickFormatList(editor: import("../../core/Editor.js").Editor): any[];
4
+ export function getMarksStyle(attrs: any[]): string;
5
+ export function getQuickFormatList(editor: any): any[];
6
6
  export function generateLinkedStyleString(linkedStyle: any, basedOnStyle: any, node: any, parent: any, includeSpacing?: boolean): string;
7
- export function applyLinkedStyleToTransaction(tr: Transaction, editor: Editor, style: {
8
- id: string;
9
- }): boolean;
7
+ export function applyLinkedStyleToTransaction(tr: any, editor: any, style: any): boolean;
@@ -1,2 +1,31 @@
1
+ /**
2
+ * Style definition from Word document
3
+ * @typedef {Object} LinkedStyle
4
+ * @property {string} id - Style ID (e.g., 'Heading1', 'Normal')
5
+ * @property {string} type - Style type ('paragraph' or 'character')
6
+ * @property {Object} definition - Style definition from Word
7
+ */
8
+ /**
9
+ * @module LinkedStyles
10
+ * @sidebarTitle Linked Styles
11
+ * @snippetPath /snippets/extensions/linked-styles.mdx
12
+ */
1
13
  export const LinkedStyles: Extension;
14
+ /**
15
+ * Style definition from Word document
16
+ */
17
+ export type LinkedStyle = {
18
+ /**
19
+ * - Style ID (e.g., 'Heading1', 'Normal')
20
+ */
21
+ id: string;
22
+ /**
23
+ * - Style type ('paragraph' or 'character')
24
+ */
25
+ type: string;
26
+ /**
27
+ * - Style definition from Word
28
+ */
29
+ definition: any;
30
+ };
2
31
  import { Extension } from '@core/Extension.js';
@@ -1,4 +1,6 @@
1
+ /**
2
+ * Plugin key for accessing linked styles state
3
+ */
1
4
  export const LinkedStylesPluginKey: PluginKey<any>;
2
- export function createLinkedStylesPlugin(editor: any): Plugin<any>;
5
+ export function createLinkedStylesPlugin(editor: any): any;
3
6
  import { PluginKey } from 'prosemirror-state';
4
- import { Plugin } from 'prosemirror-state';
@@ -1,2 +1,11 @@
1
+ /**
2
+ * @module TextAlign
3
+ * @sidebarTitle Text Align
4
+ * @snippetPath /snippets/extensions/text-align.mdx
5
+ * @shortcut Mod-Shift-l | setTextAlign('left') | Align text left
6
+ * @shortcut Mod-Shift-e | setTextAlign('center') | Align text center
7
+ * @shortcut Mod-Shift-r | setTextAlign('right') | Align text right
8
+ * @shortcut Mod-Shift-j | setTextAlign('justify') | Justify text
9
+ */
1
10
  export const TextAlign: Extension;
2
11
  import { Extension } from '@core/index.js';
@@ -1,2 +1,21 @@
1
+ /**
2
+ * Text indent configuration
3
+ * @typedef {Object} IndentConfig
4
+ * @property {string} indent - Indent value with unit (e.g., '0.5in', '1cm')
5
+ */
6
+ /**
7
+ * @module TextIndent
8
+ * @sidebarTitle Text Indent
9
+ * @snippetPath /snippets/extensions/text-indent.mdx
10
+ */
1
11
  export const TextIndent: Extension;
12
+ /**
13
+ * Text indent configuration
14
+ */
15
+ export type IndentConfig = {
16
+ /**
17
+ * - Indent value with unit (e.g., '0.5in', '1cm')
18
+ */
19
+ indent: string;
20
+ };
2
21
  import { Extension } from '@core/index.js';
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module TextTransform
3
+ * @sidebarTitle Text Transform
4
+ * @snippetPath /snippets/extensions/text-transform.mdx
5
+ */
1
6
  export const TextTransform: Extension;
2
7
  import { Extension } from '@core/index.js';
@@ -11,10 +11,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
12
  import { aw as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, az as vClickOutside, y as findParentNode, aA as getActiveFormatting, aq as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, aE as translator, aF as translator$1, a as Plugin } from "./chunks/converter-DdzGurMJ.js";
13
13
  import { aG, a4, d, a1 } from "./chunks/converter-DdzGurMJ.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-Dlzi1Ni6.js";
15
- import { k, C, l, T, i, m, j } from "./chunks/editor-Dlzi1Ni6.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-dWtBG-wm.js";
15
+ import { k, C, l, T, i, m, j } from "./chunks/editor-dWtBG-wm.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-DIRJurpK.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-BTjX4A_E.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
19
  import { D } from "./chunks/docx-zipper-Bjul2JVv.js";
20
20
  import { createZip } from "./file-zipper.es.js";
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DIRJurpK.js";
3
- import "./chunks/editor-Dlzi1Ni6.js";
2
+ import { T } from "./chunks/toolbar-BTjX4A_E.js";
3
+ import "./chunks/editor-dWtBG-wm.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-D0wPEvPh.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-CpjpLN5S.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-D57bZvWs.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-IKbi3D64.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-D0wPEvPh.cjs");
4
- const superdoc = require("./chunks/index-D4MPFidQ.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-CpjpLN5S.cjs");
4
+ const superdoc = require("./chunks/index-BkStnRcA.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-D57bZvWs.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-OlqsNrl5.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-IKbi3D64.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-Dwl_rWDB.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";