@harbour-enterprises/superdoc 0.21.0 → 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.
- package/dist/chunks/{PdfViewer-D3zo7tPo.es.js → PdfViewer-CJdQmuIm.es.js} +1 -1
- package/dist/chunks/{PdfViewer-OZDJ7gwT.cjs → PdfViewer-DE1NR4Ve.cjs} +1 -1
- package/dist/chunks/{index-MzW5BVNd.es.js → index-B9sHxXr_.es.js} +55 -27
- package/dist/chunks/{index-CfYf4T_z.cjs → index-nfoifSpX.cjs} +55 -27
- package/dist/chunks/{super-editor.es-U-GVCd_F.cjs → super-editor.es-DAP-fnHo.cjs} +3469 -2438
- package/dist/chunks/{super-editor.es-Bntob7Wd.es.js → super-editor.es-_iVPQ8J8.es.js} +3469 -2438
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +12 -4
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/stores/comments-store.d.ts +4 -1
- package/dist/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +53 -44
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-3xnF_NHq.js → converter-DK1NMJZB.js} +1148 -748
- package/dist/super-editor/chunks/{docx-zipper-CZdELYi-.js → docx-zipper-CmK8TyNb.js} +73 -12
- package/dist/super-editor/chunks/{editor-BqYH4kDD.js → editor-YR4uV-dp.js} +1917 -1606
- package/dist/super-editor/chunks/{toolbar-TkaE2kKM.js → toolbar-DzJyRvb0.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/components/slash-menu/menuItems.d.ts +5 -1
- package/dist/super-editor/src/components/slash-menu/tests/testHelpers.d.ts +466 -0
- package/dist/super-editor/src/components/slash-menu/utils.d.ts +9 -2
- package/dist/super-editor/src/core/DocxZipper.d.ts +1 -1
- package/dist/super-editor/src/core/commands/__tests__/schemaWithLists.d.ts +2 -0
- package/dist/super-editor/src/core/commands/__tests__/testHelpers.d.ts +4 -0
- package/dist/super-editor/src/core/commands/__tests__/testSchema.d.ts +2 -0
- package/dist/super-editor/src/core/commands/tests/commandTestUtils.d.ts +7 -0
- package/dist/super-editor/src/core/commands/tests/test-schema.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +1 -13
- package/dist/super-editor/src/core/super-converter/exporter.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/helpers/tableFallbackHelpers.d.ts +24 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +5 -0
- package/dist/super-editor/src/extensions/index.d.ts +2 -1
- package/dist/super-editor/src/extensions/structured-content/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +67 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentBlockTags.d.ts +7 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentInlineTags.d.ts +7 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTags.d.ts +7 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsById.d.ts +8 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/index.d.ts +4 -0
- package/dist/super-editor/src/tests/helpers/helpers.d.ts +1 -0
- package/dist/super-editor/src/utils/contextmenu-helpers.d.ts +24 -0
- package/dist/super-editor/style.css +9 -0
- package/dist/super-editor/super-editor.es.js +454 -154
- 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 +3528 -2469
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/super-editor/src/extensions/run-item/index.d.ts +0 -1
- package/dist/super-editor/src/extensions/run-item/run-item.d.ts +0 -26
|
@@ -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 };
|
|
@@ -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,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';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export function getTestDataByFileName(name: string): Promise<any>;
|
|
2
|
+
export function getExtractedDocxData(folderName: any): Promise<{}>;
|
|
2
3
|
export function getTestDataAsFileBuffer(name: any): Promise<Buffer<ArrayBufferLike>>;
|
|
3
4
|
export function loadTestDataForEditorTests(filename: string): Promise<[any, any, any, any]>;
|
|
4
5
|
export function initTestEditor(options?: any): Editor;
|
|
@@ -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;
|
|
@@ -1748,6 +1752,11 @@ on the right if it is inside shape textbox.
|
|
|
1748
1752
|
height: 12px;
|
|
1749
1753
|
width: 12px;
|
|
1750
1754
|
}
|
|
1755
|
+
.slash-menu-custom-item {
|
|
1756
|
+
display: flex;
|
|
1757
|
+
align-items: center;
|
|
1758
|
+
width: 100%;
|
|
1759
|
+
}
|
|
1751
1760
|
.popover {
|
|
1752
1761
|
background: white;
|
|
1753
1762
|
border-radius: 6px;
|