@harbour-enterprises/superdoc 0.18.0-next.2 → 0.18.0-next.3
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.
- package/dist/chunks/{PdfViewer-D9sb0T1f.cjs → PdfViewer-DDwiCSwf.cjs} +1 -1
- package/dist/chunks/{PdfViewer-C3MhLK2d.es.js → PdfViewer-Md3OYLQ6.es.js} +1 -1
- package/dist/chunks/{index-D4MPFidQ.cjs → index-B8Gqq2Ls.cjs} +2 -2
- package/dist/chunks/{index-OlqsNrl5.es.js → index-nnK3k8Eg.es.js} +2 -2
- package/dist/chunks/{super-editor.es-D57bZvWs.es.js → super-editor.es-C2jrGo_q.es.js} +366 -42
- package/dist/chunks/{super-editor.es-D0wPEvPh.cjs → super-editor.es-DPPXteBi.cjs} +366 -42
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DdzGurMJ.js → converter-YnaMMkRN.js} +15 -11
- package/dist/super-editor/chunks/{docx-zipper-Bjul2JVv.js → docx-zipper-Bq9-qqP_.js} +1 -1
- package/dist/super-editor/chunks/{editor-Dlzi1Ni6.js → editor-CAEseNKq.js} +353 -33
- package/dist/super-editor/chunks/{toolbar-DIRJurpK.js → toolbar-BxxxSTHJ.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/extensions/block-node/block-node.d.ts +27 -3
- package/dist/super-editor/src/extensions/color/color.d.ts +1 -1
- package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +5 -0
- package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +5 -0
- package/dist/super-editor/src/extensions/image/image.d.ts +5 -0
- package/dist/super-editor/src/extensions/image/imageHelpers/getFileOpener.d.ts +1 -1
- package/dist/super-editor/src/extensions/image/imageHelpers/handleImageUpload.d.ts +1 -1
- package/dist/super-editor/src/extensions/image/imageHelpers/imagePlaceholderPlugin.d.ts +2 -3
- package/dist/super-editor/src/extensions/image/imageHelpers/imagePositionPlugin.d.ts +1 -2
- package/dist/super-editor/src/extensions/image/imageHelpers/processUploadedImage.d.ts +2 -5
- package/dist/super-editor/src/extensions/image/imageHelpers/startImageUpload.d.ts +18 -3
- package/dist/super-editor/src/extensions/linked-styles/helpers.d.ts +4 -6
- package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +29 -0
- package/dist/super-editor/src/extensions/linked-styles/plugin.d.ts +4 -2
- package/dist/super-editor/src/extensions/text-align/text-align.d.ts +9 -0
- package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +19 -0
- package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +5 -0
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +366 -42
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -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 { H as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { H as process$1 } from "./converter-YnaMMkRN.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CAEseNKq.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-CAEseNKq.js";
|
|
2
|
+
import "./chunks/converter-YnaMMkRN.js";
|
|
3
|
+
import "./chunks/docx-zipper-Bq9-qqP_.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -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:
|
|
4
|
-
export function nodeNeedsSdBlockId(node:
|
|
5
|
-
export function checkForNewBlockNodesInTrs(transactions:
|
|
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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getFileOpener():
|
|
1
|
+
export function getFileOpener(): Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function handleImageUpload(file:
|
|
1
|
+
export function handleImageUpload(file: File): Promise<string>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const ImagePlaceholderPluginKey: PluginKey<any>;
|
|
2
|
-
export function ImagePlaceholderPlugin(): Plugin
|
|
3
|
-
export function findPlaceholder(state: any, id:
|
|
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,2 @@
|
|
|
1
|
-
export function processUploadedImage(fileData: string | File, editor: any): Promise<string |
|
|
2
|
-
export function getAllowedImageDimensions(width:
|
|
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:
|
|
19
|
+
file: File;
|
|
5
20
|
size: any;
|
|
6
|
-
uploadHandler:
|
|
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:
|
|
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:
|
|
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:
|
|
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):
|
|
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';
|
|
@@ -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 { 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-
|
|
13
|
-
import { aG, a4, d, a1 } from "./chunks/converter-
|
|
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-
|
|
15
|
-
import { k, C, l, T, i, m, j } from "./chunks/editor-
|
|
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-YnaMMkRN.js";
|
|
13
|
+
import { aG, a4, d, a1 } from "./chunks/converter-YnaMMkRN.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-CAEseNKq.js";
|
|
15
|
+
import { k, C, l, T, i, m, j } from "./chunks/editor-CAEseNKq.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-
|
|
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-BxxxSTHJ.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Bq9-qqP_.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -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-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DPPXteBi.cjs");
|
|
4
4
|
require("./chunks/vue-DWle4Cai.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -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-
|
|
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-C2jrGo_q.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-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DPPXteBi.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-B8Gqq2Ls.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");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-C2jrGo_q.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-nnK3k8Eg.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";
|