@harbour-enterprises/superdoc 0.20.0-next.7 → 0.20.0-next.9
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-BYyZViQt.es.js → PdfViewer-BZlsmhsJ.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DXtnxGoU.cjs → PdfViewer-BqGjx7hC.cjs} +1 -1
- package/dist/chunks/{index-CqLcgYHG.es.js → index-4GToG3C3.es.js} +2 -2
- package/dist/chunks/{index-CMBPzhIR.cjs → index-DPzgGSfg.cjs} +2 -2
- package/dist/chunks/{super-editor.es-5O71lyiI.cjs → super-editor.es-BkxUKZfn.cjs} +493 -639
- package/dist/chunks/{super-editor.es-BTalhwn-.es.js → super-editor.es-DqX3Ipsk.es.js} +493 -639
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-kutpjDQU.js → converter-C6YOTAXG.js} +246 -71
- package/dist/super-editor/chunks/{docx-zipper-BjcI24VU.js → docx-zipper-CSiwWpmr.js} +1 -1
- package/dist/super-editor/chunks/{editor-CQMKOaY4.js → editor-chVid4VD.js} +249 -570
- package/dist/super-editor/chunks/{toolbar-Cp6gL4i5.js → toolbar-ancqgN0p.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/core/super-converter/helpers.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/v2/importer/imageImporter.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +1 -1
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/tblGrid-helpers.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +9 -1
- package/dist/super-editor/src/extensions/block-node/block-node.d.ts +30 -5
- package/dist/super-editor/src/extensions/bold/bold.d.ts +20 -0
- package/dist/super-editor/src/extensions/bullet-list/bullet-list.d.ts +12 -0
- package/dist/super-editor/src/extensions/color/color.d.ts +26 -0
- package/dist/super-editor/src/extensions/content-block/content-block.d.ts +30 -0
- package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +16 -0
- package/dist/super-editor/src/extensions/document/document.d.ts +26 -0
- package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +26 -0
- package/dist/super-editor/src/extensions/font-family/font-family.d.ts +29 -0
- package/dist/super-editor/src/extensions/font-size/font-size.d.ts +21 -0
- package/dist/super-editor/src/extensions/format-commands/format-commands.d.ts +9 -0
- package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +9 -0
- package/dist/super-editor/src/extensions/heading/heading.d.ts +12 -6
- package/dist/super-editor/src/extensions/highlight/highlight.d.ts +20 -0
- package/dist/super-editor/src/extensions/history/history.d.ts +7 -15
- package/dist/super-editor/src/extensions/image/image.d.ts +78 -0
- package/dist/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/image/imageHelpers/rotation.d.ts +4 -0
- package/dist/super-editor/src/extensions/italic/italic.d.ts +10 -0
- package/dist/super-editor/src/extensions/line-break/line-break.d.ts +43 -0
- package/dist/super-editor/src/extensions/line-height/line-height.d.ts +22 -0
- package/dist/super-editor/src/extensions/link/link.d.ts +53 -25
- package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +9 -0
- package/dist/super-editor/src/extensions/list-item/list-item.d.ts +48 -0
- package/dist/super-editor/src/extensions/mention/mention.d.ts +26 -0
- package/dist/super-editor/src/extensions/noderesizer/noderesizer.d.ts +14 -0
- package/dist/super-editor/src/extensions/ordered-list/ordered-list.d.ts +35 -0
- package/dist/super-editor/src/extensions/page-number/page-number.d.ts +52 -0
- package/dist/super-editor/src/extensions/paragraph/paragraph.d.ts +49 -0
- package/dist/super-editor/src/extensions/placeholder/placeholder.d.ts +15 -0
- package/dist/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts +9 -0
- package/dist/super-editor/src/extensions/run-item/run-item.d.ts +24 -0
- package/dist/super-editor/src/extensions/search/search.d.ts +11 -2
- package/dist/super-editor/src/extensions/shape-container/shape-container.d.ts +29 -0
- package/dist/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts +26 -0
- package/dist/super-editor/src/extensions/slash-menu/slash-menu.d.ts +9 -0
- package/dist/super-editor/src/extensions/strike/strike.d.ts +10 -0
- package/dist/super-editor/src/extensions/structured-content/StructuredContentBlockView.d.ts +0 -1
- package/dist/super-editor/src/extensions/structured-content/StructuredContentInlineView.d.ts +0 -1
- package/dist/super-editor/src/extensions/structured-content/StructuredContentViewBase.d.ts +1 -1
- package/dist/super-editor/src/extensions/structured-content/document-section.d.ts +46 -27
- package/dist/super-editor/src/extensions/structured-content/structured-content-block.d.ts +26 -0
- package/dist/super-editor/src/extensions/structured-content/structured-content.d.ts +26 -0
- package/dist/super-editor/src/extensions/tab/tab.d.ts +25 -0
- package/dist/super-editor/src/extensions/table/table.d.ts +112 -121
- package/dist/super-editor/src/extensions/table-cell/table-cell.d.ts +41 -0
- package/dist/super-editor/src/extensions/table-header/table-header.d.ts +22 -0
- package/dist/super-editor/src/extensions/table-row/table-row.d.ts +28 -0
- package/dist/super-editor/src/extensions/text/text.d.ts +14 -0
- package/dist/super-editor/src/extensions/text-align/text-align.d.ts +22 -0
- package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +19 -10
- package/dist/super-editor/src/extensions/text-style/text-style.d.ts +20 -0
- package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +20 -0
- package/dist/super-editor/src/extensions/underline/underline.d.ts +25 -0
- package/dist/super-editor/src/tests/helpers/editor-test-utils.d.ts +14 -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 +493 -639
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for ShapeContainer
|
|
3
|
+
* @typedef {Object} ShapeContainerOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes] - HTML attributes for shape container elements
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for shape container nodes
|
|
9
|
+
* @typedef {Object} ShapeContainerAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {string} [fillcolor] - Background color for the shape
|
|
12
|
+
* @property {string} [style] - CSS style string
|
|
13
|
+
* @property {string} [sdBlockId] @internal - Internal block tracking ID
|
|
14
|
+
* @property {Object} [wrapAttributes] @internal - Internal wrapper attributes
|
|
15
|
+
* @property {Object} [attributes] @internal - Internal attributes storage
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* @module ShapeContainer
|
|
19
|
+
* @sidebarTitle Shape Container
|
|
20
|
+
* @snippetPath /snippets/extensions/shape-container.mdx
|
|
21
|
+
*/
|
|
1
22
|
export const ShapeContainer: Node;
|
|
23
|
+
/**
|
|
24
|
+
* Configuration options for ShapeContainer
|
|
25
|
+
*/
|
|
26
|
+
export type ShapeContainerOptions = any;
|
|
27
|
+
/**
|
|
28
|
+
* Attributes for shape container nodes
|
|
29
|
+
*/
|
|
30
|
+
export type ShapeContainerAttributes = any;
|
|
2
31
|
import { Node } from '@core/index.js';
|
|
@@ -1,2 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for ShapeTextbox
|
|
3
|
+
* @typedef {Object} ShapeTextboxOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes] - HTML attributes for shape textbox elements
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for shape textbox nodes
|
|
9
|
+
* @typedef {Object} ShapeTextboxAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {string} [sdBlockId] @internal - Internal block tracking ID
|
|
12
|
+
* @property {Object} [attributes] @internal - Internal attributes storage
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @module ShapeTextbox
|
|
16
|
+
* @sidebarTitle Shape Textbox
|
|
17
|
+
* @snippetPath /snippets/extensions/shape-textbox.mdx
|
|
18
|
+
*/
|
|
1
19
|
export const ShapeTextbox: Node;
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for ShapeTextbox
|
|
22
|
+
*/
|
|
23
|
+
export type ShapeTextboxOptions = any;
|
|
24
|
+
/**
|
|
25
|
+
* Attributes for shape textbox nodes
|
|
26
|
+
*/
|
|
27
|
+
export type ShapeTextboxAttributes = any;
|
|
2
28
|
import { Node } from '@core/index.js';
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export const SlashMenuPluginKey: PluginKey<any>;
|
|
2
|
+
/**
|
|
3
|
+
* @module SlashMenu
|
|
4
|
+
* @sidebarTitle Slash Menu
|
|
5
|
+
* @snippetPath /snippets/extensions/slash-menu.mdx
|
|
6
|
+
*/
|
|
2
7
|
export const SlashMenu: Extension;
|
|
8
|
+
/**
|
|
9
|
+
* Configuration options for SlashMenu
|
|
10
|
+
*/
|
|
11
|
+
export type SlashMenuOptions = any;
|
|
3
12
|
import { PluginKey } from 'prosemirror-state';
|
|
4
13
|
import { Extension } from '@core/Extension.js';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Strike
|
|
3
|
+
* @typedef {Object} StrikeOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes={}] - HTML attributes for strikethrough elements
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* @module Strike
|
|
3
9
|
* @sidebarTitle Strike
|
|
@@ -5,4 +11,8 @@
|
|
|
5
11
|
* @shortcut Mod-Shift-s | toggleStrike | Toggle strikethrough formatting
|
|
6
12
|
*/
|
|
7
13
|
export const Strike: Mark;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration options for Strike
|
|
16
|
+
*/
|
|
17
|
+
export type StrikeOptions = any;
|
|
8
18
|
import { Mark } from '@core/index.js';
|
|
@@ -10,7 +10,7 @@ export class StructuredContentViewBase {
|
|
|
10
10
|
htmlAttributes: any;
|
|
11
11
|
root: any;
|
|
12
12
|
isDragging: boolean;
|
|
13
|
-
mount(
|
|
13
|
+
mount(): void;
|
|
14
14
|
get dom(): any;
|
|
15
15
|
get contentDOM(): any;
|
|
16
16
|
update(node: any, decorations: any, innerDecorations: any): boolean;
|
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document section creation options
|
|
3
|
+
* @typedef {Object} SectionCreate
|
|
4
|
+
* @property {number} [id] - Unique ID. Auto-increments from existing sections if omitted
|
|
5
|
+
* @property {string} [title="Document section"] - Label shown in section header
|
|
6
|
+
* @property {string} [description] - Metadata for tracking (stored in Word's w:tag)
|
|
7
|
+
* @property {string} [sectionType] - Business classification
|
|
8
|
+
* @property {boolean} [isLocked=false] - Prevent editing when true
|
|
9
|
+
* @property {string} [html] - HTML content to insert
|
|
10
|
+
* @property {Object} [json] - ProseMirror JSON (overrides html if both provided)
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Update an existing section
|
|
14
|
+
* @typedef {Object} SectionUpdate
|
|
15
|
+
* @property {number} id - Target section ID (required)
|
|
16
|
+
* @property {string} [html] - Replace content with HTML
|
|
17
|
+
* @property {Object} [json] - Replace content with ProseMirror JSON (overrides html)
|
|
18
|
+
* @property {Partial<DocumentSectionAttributes>} [attrs] - Update attributes only (preserves content)
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for DocumentSection
|
|
22
|
+
* @typedef {Object} DocumentSectionOptions
|
|
23
|
+
* @category Options
|
|
24
|
+
* @property {Object} [htmlAttributes] - HTML attributes for document sections
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Attributes for document section nodes
|
|
28
|
+
* @typedef {Object} DocumentSectionAttributes
|
|
29
|
+
* @category Attributes
|
|
30
|
+
* @property {number} [id] - Unique section identifier
|
|
31
|
+
* @property {string} [title] - Section display label (becomes w:alias in Word)
|
|
32
|
+
* @property {string} [description] - Additional metadata stored in w:tag
|
|
33
|
+
* @property {string} [sectionType] - Business type for filtering/logic (e.g., 'legal', 'pricing')
|
|
34
|
+
* @property {boolean} [isLocked=false] - Lock state (maps to w:lock="sdtContentLocked")
|
|
35
|
+
* @property {string} [sdBlockId] @internal - Internal block tracking
|
|
36
|
+
*/
|
|
1
37
|
/**
|
|
2
38
|
* @module DocumentSection
|
|
3
39
|
* @sidebarTitle Document Section
|
|
@@ -5,32 +41,7 @@
|
|
|
5
41
|
*/
|
|
6
42
|
export const DocumentSection: Node;
|
|
7
43
|
/**
|
|
8
|
-
* Document section
|
|
9
|
-
*/
|
|
10
|
-
export type SectionAttributes = {
|
|
11
|
-
/**
|
|
12
|
-
* - Unique section identifier
|
|
13
|
-
*/
|
|
14
|
-
id?: number;
|
|
15
|
-
/**
|
|
16
|
-
* - Display label (becomes w:alias in Word)
|
|
17
|
-
*/
|
|
18
|
-
title?: string;
|
|
19
|
-
/**
|
|
20
|
-
* - Additional metadata stored in w:tag
|
|
21
|
-
*/
|
|
22
|
-
description?: string;
|
|
23
|
-
/**
|
|
24
|
-
* - Business type for filtering/logic (e.g., 'legal', 'pricing')
|
|
25
|
-
*/
|
|
26
|
-
sectionType?: string;
|
|
27
|
-
/**
|
|
28
|
-
* - Lock state (maps to w:lock="sdtContentLocked")
|
|
29
|
-
*/
|
|
30
|
-
isLocked?: boolean;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Create a new document section
|
|
44
|
+
* Document section creation options
|
|
34
45
|
*/
|
|
35
46
|
export type SectionCreate = {
|
|
36
47
|
/**
|
|
@@ -81,6 +92,14 @@ export type SectionUpdate = {
|
|
|
81
92
|
/**
|
|
82
93
|
* - Update attributes only (preserves content)
|
|
83
94
|
*/
|
|
84
|
-
attrs?: Partial<
|
|
95
|
+
attrs?: Partial<DocumentSectionAttributes>;
|
|
85
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Configuration options for DocumentSection
|
|
99
|
+
*/
|
|
100
|
+
export type DocumentSectionOptions = any;
|
|
101
|
+
/**
|
|
102
|
+
* Attributes for document section nodes
|
|
103
|
+
*/
|
|
104
|
+
export type DocumentSectionAttributes = any;
|
|
86
105
|
import { Node } from '@core/index.js';
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export const structuredContentClass: "sd-structured-content-block";
|
|
2
2
|
export const structuredContentInnerClass: "sd-structured-content-block__content";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for StructuredContentBlock
|
|
5
|
+
* @typedef {Object} StructuredContentBlockOptions
|
|
6
|
+
* @category Options
|
|
7
|
+
* @property {string} [structuredContentClass='sd-structured-content-block-tag'] - CSS class for the block
|
|
8
|
+
* @property {Object} [htmlAttributes] - HTML attributes for structured content blocks
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Attributes for structured content block nodes
|
|
12
|
+
* @typedef {Object} StructuredContentBlockAttributes
|
|
13
|
+
* @category Attributes
|
|
14
|
+
* @property {Object} [sdtPr] @internal - Internal structured document tag properties
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @module StructuredContentBlock
|
|
18
|
+
* @sidebarTitle Structured Content Block
|
|
19
|
+
* @snippetPath /snippets/extensions/structured-content-block.mdx
|
|
20
|
+
*/
|
|
3
21
|
export const StructuredContentBlock: Node;
|
|
22
|
+
/**
|
|
23
|
+
* Configuration options for StructuredContentBlock
|
|
24
|
+
*/
|
|
25
|
+
export type StructuredContentBlockOptions = any;
|
|
26
|
+
/**
|
|
27
|
+
* Attributes for structured content block nodes
|
|
28
|
+
*/
|
|
29
|
+
export type StructuredContentBlockAttributes = any;
|
|
4
30
|
import { Node } from '@core/index';
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export const structuredContentClass: "sd-structured-content";
|
|
2
2
|
export const structuredContentInnerClass: "sd-structured-content__content";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for StructuredContent
|
|
5
|
+
* @typedef {Object} StructuredContentOptions
|
|
6
|
+
* @category Options
|
|
7
|
+
* @property {string} [structuredContentClass='sd-structured-content-tag'] - CSS class for the inline element
|
|
8
|
+
* @property {Object} [htmlAttributes] - HTML attributes for structured content elements
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Attributes for structured content nodes
|
|
12
|
+
* @typedef {Object} StructuredContentAttributes
|
|
13
|
+
* @category Attributes
|
|
14
|
+
* @property {Object} [sdtPr] @internal - Internal structured document tag properties
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @module StructuredContent
|
|
18
|
+
* @sidebarTitle Structured Content
|
|
19
|
+
* @snippetPath /snippets/extensions/structured-content.mdx
|
|
20
|
+
*/
|
|
3
21
|
export const StructuredContent: Node;
|
|
22
|
+
/**
|
|
23
|
+
* Configuration options for StructuredContent
|
|
24
|
+
*/
|
|
25
|
+
export type StructuredContentOptions = any;
|
|
26
|
+
/**
|
|
27
|
+
* Attributes for structured content nodes
|
|
28
|
+
*/
|
|
29
|
+
export type StructuredContentAttributes = any;
|
|
4
30
|
import { Node } from '@core/index';
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for TabNode
|
|
3
|
+
* @typedef {Object} TabNodeOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes] - HTML attributes for tab elements
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for tab nodes
|
|
9
|
+
* @typedef {Object} TabNodeAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {number} [tabSize] - Width of the tab in pixels
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @module TabNode
|
|
15
|
+
* @sidebarTitle Tab
|
|
16
|
+
* @snippetPath /snippets/extensions/tab.mdx
|
|
17
|
+
*/
|
|
1
18
|
export const TabNode: Node;
|
|
19
|
+
/**
|
|
20
|
+
* Configuration options for TabNode
|
|
21
|
+
*/
|
|
22
|
+
export type TabNodeOptions = any;
|
|
23
|
+
/**
|
|
24
|
+
* Attributes for tab nodes
|
|
25
|
+
*/
|
|
26
|
+
export type TabNodeAttributes = any;
|
|
2
27
|
import { Node } from '@core/index.js';
|
|
@@ -1,140 +1,63 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Table
|
|
3
|
-
* @sidebarTitle Table
|
|
4
|
-
* @snippetPath /snippets/extensions/table.mdx
|
|
5
|
-
* @shortcut Tab | goToNextCell/addRowAfter | Navigate to next cell or add row
|
|
6
|
-
* @shortcut Shift-Tab | goToPreviousCell | Navigate to previous cell
|
|
7
|
-
* @shortcut Backspace | deleteTableWhenSelected | Delete table when all cells selected
|
|
8
|
-
* @shortcut Delete | deleteTableWhenSelected | Delete table when all cells selected
|
|
9
|
-
*/
|
|
10
|
-
export const Table: Node;
|
|
11
1
|
/**
|
|
12
2
|
* Table configuration options
|
|
3
|
+
* @typedef {Object} TableConfig
|
|
4
|
+
* @property {number} [rows=3] - Number of rows to create
|
|
5
|
+
* @property {number} [cols=3] - Number of columns to create
|
|
6
|
+
* @property {boolean} [withHeaderRow=false] - Create first row as header row
|
|
13
7
|
*/
|
|
14
|
-
export type TableConfig = {
|
|
15
|
-
/**
|
|
16
|
-
* - Number of rows to create
|
|
17
|
-
*/
|
|
18
|
-
rows?: number;
|
|
19
|
-
/**
|
|
20
|
-
* - Number of columns to create
|
|
21
|
-
*/
|
|
22
|
-
cols?: number;
|
|
23
|
-
/**
|
|
24
|
-
* - Create first row as header row
|
|
25
|
-
*/
|
|
26
|
-
withHeaderRow?: boolean;
|
|
27
|
-
};
|
|
28
8
|
/**
|
|
29
9
|
* Table indentation configuration
|
|
10
|
+
* @typedef {Object} TableIndent
|
|
11
|
+
* @property {number} width - Indent width in pixels
|
|
12
|
+
* @property {string} [type='dxa'] - Indent type
|
|
30
13
|
*/
|
|
31
|
-
export type TableIndent = {
|
|
32
|
-
/**
|
|
33
|
-
* - Indent width in pixels
|
|
34
|
-
*/
|
|
35
|
-
width: number;
|
|
36
|
-
/**
|
|
37
|
-
* - Indent type
|
|
38
|
-
*/
|
|
39
|
-
type?: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Table attributes
|
|
43
|
-
*/
|
|
44
|
-
export type TableAttributes = {
|
|
45
|
-
/**
|
|
46
|
-
* - Table indentation
|
|
47
|
-
*/
|
|
48
|
-
tableIndent?: TableIndent;
|
|
49
|
-
/**
|
|
50
|
-
* - Table border configuration
|
|
51
|
-
*/
|
|
52
|
-
borders?: import("./tableHelpers/createTableBorders.js").TableBorders;
|
|
53
|
-
/**
|
|
54
|
-
* - CSS border-collapse value
|
|
55
|
-
*/
|
|
56
|
-
borderCollapse?: string;
|
|
57
|
-
/**
|
|
58
|
-
* - Reference to table style ID
|
|
59
|
-
*/
|
|
60
|
-
tableStyleId?: string;
|
|
61
|
-
/**
|
|
62
|
-
* - Table layout algorithm
|
|
63
|
-
*/
|
|
64
|
-
tableLayout?: string;
|
|
65
|
-
/**
|
|
66
|
-
* - Cell spacing in pixels
|
|
67
|
-
*/
|
|
68
|
-
tableCellSpacing?: number;
|
|
69
|
-
};
|
|
70
14
|
/**
|
|
71
15
|
* Cell selection position
|
|
16
|
+
* @typedef {Object} CellSelectionPosition
|
|
17
|
+
* @property {number} anchorCell - Starting cell position
|
|
18
|
+
* @property {number} headCell - Ending cell position
|
|
72
19
|
*/
|
|
73
|
-
export type CellSelectionPosition = {
|
|
74
|
-
/**
|
|
75
|
-
* - Starting cell position
|
|
76
|
-
*/
|
|
77
|
-
anchorCell: number;
|
|
78
|
-
/**
|
|
79
|
-
* - Ending cell position
|
|
80
|
-
*/
|
|
81
|
-
headCell: number;
|
|
82
|
-
};
|
|
83
20
|
/**
|
|
84
|
-
*
|
|
21
|
+
* Configuration options for Table
|
|
22
|
+
* @typedef {Object} TableOptions
|
|
23
|
+
* @category Options
|
|
24
|
+
* @property {Object} [htmlAttributes={'aria-label': 'Table node'}] - Default HTML attributes for all tables
|
|
25
|
+
* @property {boolean} [resizable=true] - Enable column resizing functionality
|
|
26
|
+
* @property {number} [handleWidth=5] - Width of resize handles in pixels
|
|
27
|
+
* @property {number} [cellMinWidth=10] - Minimum cell width constraint in pixels
|
|
28
|
+
* @property {boolean} [lastColumnResizable=true] - Allow resizing of the last column
|
|
29
|
+
* @property {boolean} [allowTableNodeSelection=false] - Enable selecting the entire table node
|
|
85
30
|
*/
|
|
86
|
-
export type ColGroupInfo = {
|
|
87
|
-
/**
|
|
88
|
-
* - Column group DOM structure
|
|
89
|
-
*/
|
|
90
|
-
colgroup?: any[];
|
|
91
|
-
/**
|
|
92
|
-
* - Fixed table width or empty string
|
|
93
|
-
*/
|
|
94
|
-
tableWidth?: string;
|
|
95
|
-
/**
|
|
96
|
-
* - Minimum table width or empty string
|
|
97
|
-
*/
|
|
98
|
-
tableMinWidth?: string;
|
|
99
|
-
/**
|
|
100
|
-
* - Array of column width values
|
|
101
|
-
*/
|
|
102
|
-
colgroupValues?: number[];
|
|
103
|
-
};
|
|
104
31
|
/**
|
|
105
|
-
*
|
|
32
|
+
* Attributes for table nodes
|
|
33
|
+
* @typedef {Object} TableAttributes
|
|
34
|
+
* @category Attributes
|
|
35
|
+
* @property {TableIndent} [tableIndent] - Table indentation configuration
|
|
36
|
+
* @property {import("./tableHelpers/createTableBorders.js").TableBorders} [borders] - Border styling for this table
|
|
37
|
+
* @property {string} [borderCollapse='collapse'] - CSS border-collapse property
|
|
38
|
+
* @property {string} [justification] - Table alignment ('left', 'center', 'right')
|
|
39
|
+
* @property {number} [tableCellSpacing] - Cell spacing in pixels for this table
|
|
40
|
+
* @property {string} [sdBlockId] @internal - Internal block tracking ID
|
|
41
|
+
* @property {string} [tableStyleId] @internal - Internal reference to table style
|
|
42
|
+
* @property {string} [tableLayout] @internal - CSS table-layout property (advanced usage)
|
|
106
43
|
*/
|
|
107
|
-
export type CellPosition = {
|
|
108
|
-
/**
|
|
109
|
-
* - Resolved position
|
|
110
|
-
*/
|
|
111
|
-
$pos: any;
|
|
112
|
-
/**
|
|
113
|
-
* - Absolute position
|
|
114
|
-
*/
|
|
115
|
-
pos: number;
|
|
116
|
-
/**
|
|
117
|
-
* - Depth in document tree
|
|
118
|
-
*/
|
|
119
|
-
depth: number;
|
|
120
|
-
};
|
|
121
44
|
/**
|
|
122
45
|
* Current cell information
|
|
46
|
+
* @typedef {Object} CurrentCellInfo
|
|
47
|
+
* @property {Object} rect - Selected rectangle information
|
|
48
|
+
* @property {import('prosemirror-model').Node} cell - The cell node
|
|
49
|
+
* @property {Object} attrs - Cell attributes
|
|
123
50
|
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
* - Cell attributes without span properties
|
|
135
|
-
*/
|
|
136
|
-
attrs: any;
|
|
137
|
-
};
|
|
51
|
+
/**
|
|
52
|
+
* @module Table
|
|
53
|
+
* @sidebarTitle Table
|
|
54
|
+
* @snippetPath /snippets/extensions/table.mdx
|
|
55
|
+
* @shortcut Tab | goToNextCell/addRowAfter | Navigate to next cell or add row
|
|
56
|
+
* @shortcut Shift-Tab | goToPreviousCell | Navigate to previous cell
|
|
57
|
+
* @shortcut Backspace | deleteTableWhenSelected | Delete table when all cells selected
|
|
58
|
+
* @shortcut Delete | deleteTableWhenSelected | Delete table when all cells selected
|
|
59
|
+
*/
|
|
60
|
+
export const Table: Node;
|
|
138
61
|
/**
|
|
139
62
|
* Theme color options
|
|
140
63
|
*/
|
|
@@ -465,4 +388,72 @@ export type TableGrid = {
|
|
|
465
388
|
*/
|
|
466
389
|
colWidths?: ColWidth[];
|
|
467
390
|
};
|
|
391
|
+
/**
|
|
392
|
+
* Table configuration options
|
|
393
|
+
*/
|
|
394
|
+
export type TableConfig = {
|
|
395
|
+
/**
|
|
396
|
+
* - Number of rows to create
|
|
397
|
+
*/
|
|
398
|
+
rows?: number;
|
|
399
|
+
/**
|
|
400
|
+
* - Number of columns to create
|
|
401
|
+
*/
|
|
402
|
+
cols?: number;
|
|
403
|
+
/**
|
|
404
|
+
* - Create first row as header row
|
|
405
|
+
*/
|
|
406
|
+
withHeaderRow?: boolean;
|
|
407
|
+
};
|
|
408
|
+
/**
|
|
409
|
+
* Table indentation configuration
|
|
410
|
+
*/
|
|
411
|
+
export type TableIndent = {
|
|
412
|
+
/**
|
|
413
|
+
* - Indent width in pixels
|
|
414
|
+
*/
|
|
415
|
+
width: number;
|
|
416
|
+
/**
|
|
417
|
+
* - Indent type
|
|
418
|
+
*/
|
|
419
|
+
type?: string;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* Cell selection position
|
|
423
|
+
*/
|
|
424
|
+
export type CellSelectionPosition = {
|
|
425
|
+
/**
|
|
426
|
+
* - Starting cell position
|
|
427
|
+
*/
|
|
428
|
+
anchorCell: number;
|
|
429
|
+
/**
|
|
430
|
+
* - Ending cell position
|
|
431
|
+
*/
|
|
432
|
+
headCell: number;
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Configuration options for Table
|
|
436
|
+
*/
|
|
437
|
+
export type TableOptions = any;
|
|
438
|
+
/**
|
|
439
|
+
* Attributes for table nodes
|
|
440
|
+
*/
|
|
441
|
+
export type TableAttributes = any;
|
|
442
|
+
/**
|
|
443
|
+
* Current cell information
|
|
444
|
+
*/
|
|
445
|
+
export type CurrentCellInfo = {
|
|
446
|
+
/**
|
|
447
|
+
* - Selected rectangle information
|
|
448
|
+
*/
|
|
449
|
+
rect: any;
|
|
450
|
+
/**
|
|
451
|
+
* - The cell node
|
|
452
|
+
*/
|
|
453
|
+
cell: import("prosemirror-model").Node;
|
|
454
|
+
/**
|
|
455
|
+
* - Cell attributes
|
|
456
|
+
*/
|
|
457
|
+
attrs: any;
|
|
458
|
+
};
|
|
468
459
|
import { Node } from '@core/index.js';
|
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cell margins configuration
|
|
3
|
+
* @typedef {Object} CellMargins
|
|
4
|
+
* @property {number} [top] - Top margin in pixels
|
|
5
|
+
* @property {number} [right] - Right margin in pixels
|
|
6
|
+
* @property {number} [bottom] - Bottom margin in pixels
|
|
7
|
+
* @property {number} [left] - Left margin in pixels
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Cell background configuration
|
|
11
|
+
* @typedef {Object} CellBackground
|
|
12
|
+
* @property {string} color - Background color (hex without #)
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Configuration options for TableCell
|
|
16
|
+
* @typedef {Object} TableCellOptions
|
|
17
|
+
* @category Options
|
|
18
|
+
* @property {Object} [htmlAttributes={'aria-label': 'Table cell node'}] - HTML attributes for table cells
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Attributes for table cell nodes
|
|
22
|
+
* @typedef {Object} TableCellAttributes
|
|
23
|
+
* @category Attributes
|
|
24
|
+
* @property {number} [colspan=1] - Number of columns this cell spans
|
|
25
|
+
* @property {number} [rowspan=1] - Number of rows this cell spans
|
|
26
|
+
* @property {number[]} [colwidth=[100]] - Column widths array in pixels
|
|
27
|
+
* @property {CellBackground} [background] - Cell background color configuration
|
|
28
|
+
* @property {string} [verticalAlign] - Vertical content alignment (top, middle, bottom)
|
|
29
|
+
* @property {CellMargins} [cellMargins] - Internal cell padding
|
|
30
|
+
* @property {import('./helpers/createCellBorders.js').CellBorders} [borders] - Cell border configuration
|
|
31
|
+
* @property {string} [widthType='auto'] @internal - Internal width type
|
|
32
|
+
* @property {string} [widthUnit='px'] @internal - Internal width unit
|
|
33
|
+
*/
|
|
1
34
|
/**
|
|
2
35
|
* @module TableCell
|
|
3
36
|
* @sidebarTitle Table Cell
|
|
@@ -34,4 +67,12 @@ export type CellBackground = {
|
|
|
34
67
|
*/
|
|
35
68
|
color: string;
|
|
36
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* Configuration options for TableCell
|
|
72
|
+
*/
|
|
73
|
+
export type TableCellOptions = any;
|
|
74
|
+
/**
|
|
75
|
+
* Attributes for table cell nodes
|
|
76
|
+
*/
|
|
77
|
+
export type TableCellAttributes = any;
|
|
37
78
|
import { Node } from '@core/index.js';
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for TableHeader
|
|
3
|
+
* @typedef {Object} TableHeaderOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes={'aria-label': 'Table head node'}] - HTML attributes for table headers
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for table header nodes
|
|
9
|
+
* @typedef {Object} TableHeaderAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {number} [colspan=1] - Number of columns this header spans
|
|
12
|
+
* @property {number} [rowspan=1] - Number of rows this header spans
|
|
13
|
+
* @property {number[]} [colwidth] - Column widths array in pixels
|
|
14
|
+
*/
|
|
1
15
|
/**
|
|
2
16
|
* @module TableHeader
|
|
3
17
|
* @sidebarTitle Table Header
|
|
4
18
|
* @snippetPath /snippets/extensions/table-header.mdx
|
|
5
19
|
*/
|
|
6
20
|
export const TableHeader: Node;
|
|
21
|
+
/**
|
|
22
|
+
* Configuration options for TableHeader
|
|
23
|
+
*/
|
|
24
|
+
export type TableHeaderOptions = any;
|
|
25
|
+
/**
|
|
26
|
+
* Attributes for table header nodes
|
|
27
|
+
*/
|
|
28
|
+
export type TableHeaderAttributes = any;
|
|
7
29
|
import { Node } from '@core/index.js';
|
|
@@ -36,6 +36,26 @@
|
|
|
36
36
|
* @property {number} [wBefore.value] - The width in twenieths of a point (1/1440 of an inch).
|
|
37
37
|
* @property {"auto" | "dxa" | "nil" | "pct"} [wBefore.type] - The type of width.
|
|
38
38
|
*/
|
|
39
|
+
/**
|
|
40
|
+
* Configuration options for TableRow
|
|
41
|
+
* @typedef {Object} TableRowOptions
|
|
42
|
+
* @category Options
|
|
43
|
+
* @property {Object} [htmlAttributes={'aria-label': 'Table row node'}] - HTML attributes for table rows
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Attributes for table row nodes
|
|
47
|
+
* @typedef {Object} TableRowAttributes
|
|
48
|
+
* @category Attributes
|
|
49
|
+
* @property {number} [rowHeight] - Fixed row height in pixels
|
|
50
|
+
* @property {boolean} [cantSplit=false] - Indicates row should not split across pages
|
|
51
|
+
* @property {TableRowProperties} [tableRowProperties] @internal - Internal row properties
|
|
52
|
+
* @property {string} [rsidDel] @internal - Editing session ID for deletion
|
|
53
|
+
* @property {string} [rsidR] @internal - Editing session ID for addition
|
|
54
|
+
* @property {string} [rsidRPr] @internal - Editing session ID for row mark modification
|
|
55
|
+
* @property {string} [rsidTr] @internal - Editing session ID for properties modification
|
|
56
|
+
* @property {string} [paraId] @internal - Unique identifier for the row
|
|
57
|
+
* @property {string} [textId] @internal - Unique identifier for row text
|
|
58
|
+
*/
|
|
39
59
|
/**
|
|
40
60
|
* @module TableRow
|
|
41
61
|
* @sidebarTitle Table Row
|
|
@@ -153,4 +173,12 @@ export type TableRowProperties = {
|
|
|
153
173
|
type?: "auto" | "dxa" | "nil" | "pct";
|
|
154
174
|
};
|
|
155
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* Configuration options for TableRow
|
|
178
|
+
*/
|
|
179
|
+
export type TableRowOptions = any;
|
|
180
|
+
/**
|
|
181
|
+
* Attributes for table row nodes
|
|
182
|
+
*/
|
|
183
|
+
export type TableRowAttributes = any;
|
|
156
184
|
import { Node } from '@core/index.js';
|