@docen/extensions 0.0.8 → 0.0.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/index.cjs +8 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +8 -1
- package/dist/shared/{extensions.SlCx0Bmn.d.cts → extensions.BOBBi1Z_.d.cts} +12 -2
- package/dist/shared/{extensions.SlCx0Bmn.d.mts → extensions.BOBBi1Z_.d.mts} +12 -2
- package/dist/shared/{extensions.SlCx0Bmn.d.ts → extensions.BOBBi1Z_.d.ts} +12 -2
- package/dist/shared/extensions.CAUtiZQg.cjs +72 -0
- package/dist/shared/{extensions.BQfevE5S.d.cts → extensions.DmJvAao6.d.cts} +72 -2
- package/dist/shared/{extensions.DAZn2HEU.d.mts → extensions.IF9nv9tR.d.mts} +72 -2
- package/dist/shared/{extensions.BED3A2H3.d.ts → extensions.ITVKw7bK.d.ts} +72 -2
- package/dist/shared/extensions.ymUB12ul.mjs +72 -0
- package/dist/tiptap.cjs +1 -1
- package/dist/tiptap.d.cts +2 -2
- package/dist/tiptap.d.mts +2 -2
- package/dist/tiptap.d.ts +2 -2
- package/dist/tiptap.mjs +1 -1
- package/dist/types.d.cts +7 -7
- package/dist/types.d.mts +7 -7
- package/dist/types.d.ts +7 -7
- package/package.json +32 -34
- package/dist/shared/extensions.CcSIv21B.cjs +0 -72
- package/dist/shared/extensions.Chtjfo3m.mjs +0 -72
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node, a as Node$1, P as ParentConfig,
|
|
1
|
+
import { N as Node, a as Node$1, P as ParentConfig, E as EditorView, b as NodeView, R as ResizableNodeViewDirection, c as PluginKey, d as Editor, e as Range, T as Transaction, f as EditorState, g as ResolvedPos, D as DOMOutputSpec, M as Mark, h as Extension } from './extensions.BOBBi1Z_.cjs';
|
|
2
2
|
import '@tiptap/extension-mathematics';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -825,6 +825,25 @@ interface SuggestionOptions<I = any, TSelected = any> {
|
|
|
825
825
|
* @example 'mention'
|
|
826
826
|
*/
|
|
827
827
|
pluginKey?: PluginKey;
|
|
828
|
+
/**
|
|
829
|
+
* A function that returns a boolean to indicate if the suggestion should be active.
|
|
830
|
+
* This is useful to prevent suggestions from opening for remote users in collaborative environments.
|
|
831
|
+
* @param props The props object.
|
|
832
|
+
* @param props.editor The editor instance.
|
|
833
|
+
* @param props.range The range of the suggestion.
|
|
834
|
+
* @param props.query The current suggestion query.
|
|
835
|
+
* @param props.text The current suggestion text.
|
|
836
|
+
* @param props.transaction The current transaction.
|
|
837
|
+
* @returns {boolean}
|
|
838
|
+
* @example ({ transaction }) => isChangeOrigin(transaction)
|
|
839
|
+
*/
|
|
840
|
+
shouldShow?: (props: {
|
|
841
|
+
editor: Editor;
|
|
842
|
+
range: Range;
|
|
843
|
+
query: string;
|
|
844
|
+
text: string;
|
|
845
|
+
transaction: Transaction;
|
|
846
|
+
}) => boolean;
|
|
828
847
|
/**
|
|
829
848
|
* The editor instance.
|
|
830
849
|
* @default null
|
|
@@ -1420,6 +1439,7 @@ declare module '@tiptap/core' {
|
|
|
1420
1439
|
target?: string | null;
|
|
1421
1440
|
rel?: string | null;
|
|
1422
1441
|
class?: string | null;
|
|
1442
|
+
title?: string | null;
|
|
1423
1443
|
}) => ReturnType;
|
|
1424
1444
|
/**
|
|
1425
1445
|
* Toggle a link mark
|
|
@@ -1431,6 +1451,7 @@ declare module '@tiptap/core' {
|
|
|
1431
1451
|
target?: string | null;
|
|
1432
1452
|
rel?: string | null;
|
|
1433
1453
|
class?: string | null;
|
|
1454
|
+
title?: string | null;
|
|
1434
1455
|
}) => ReturnType;
|
|
1435
1456
|
/**
|
|
1436
1457
|
* Unset a link mark
|
|
@@ -1789,5 +1810,54 @@ declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
|
1789
1810
|
interface TextStyleAttributes extends Record<string, any> {
|
|
1790
1811
|
}
|
|
1791
1812
|
|
|
1792
|
-
|
|
1813
|
+
interface TextAlignOptions {
|
|
1814
|
+
/**
|
|
1815
|
+
* The types where the text align attribute can be applied.
|
|
1816
|
+
* @default []
|
|
1817
|
+
* @example ['heading', 'paragraph']
|
|
1818
|
+
*/
|
|
1819
|
+
types: string[];
|
|
1820
|
+
/**
|
|
1821
|
+
* The alignments which are allowed.
|
|
1822
|
+
* @default ['left', 'center', 'right', 'justify']
|
|
1823
|
+
* @example ['left', 'right']
|
|
1824
|
+
*/
|
|
1825
|
+
alignments: string[];
|
|
1826
|
+
/**
|
|
1827
|
+
* The default alignment.
|
|
1828
|
+
* @default null
|
|
1829
|
+
* @example 'center'
|
|
1830
|
+
*/
|
|
1831
|
+
defaultAlignment: string | null;
|
|
1832
|
+
}
|
|
1833
|
+
declare module '@tiptap/core' {
|
|
1834
|
+
interface Commands<ReturnType> {
|
|
1835
|
+
textAlign: {
|
|
1836
|
+
/**
|
|
1837
|
+
* Set the text align attribute
|
|
1838
|
+
* @param alignment The alignment
|
|
1839
|
+
* @example editor.commands.setTextAlign('left')
|
|
1840
|
+
*/
|
|
1841
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
1842
|
+
/**
|
|
1843
|
+
* Unset the text align attribute
|
|
1844
|
+
* @example editor.commands.unsetTextAlign()
|
|
1845
|
+
*/
|
|
1846
|
+
unsetTextAlign: () => ReturnType;
|
|
1847
|
+
/**
|
|
1848
|
+
* Toggle the text align attribute
|
|
1849
|
+
* @param alignment The alignment
|
|
1850
|
+
* @example editor.commands.toggleTextAlign('right')
|
|
1851
|
+
*/
|
|
1852
|
+
toggleTextAlign: (alignment: string) => ReturnType;
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* This extension allows you to align text.
|
|
1858
|
+
* @see https://www.tiptap.dev/api/extensions/text-align
|
|
1859
|
+
*/
|
|
1860
|
+
declare const TextAlign: Extension<TextAlignOptions, any>;
|
|
1861
|
+
|
|
1862
|
+
export { Image as A, BackgroundColor as B, Code as C, Details as D, Emoji as E, FontFamily as F, Paragraph as G, TableRow as J, LineHeight as L, Mention as M, OrderedList as O, Strike as S, Underline as U, Blockquote as a, Bold as b, BulletList as c, CodeBlockLowlight as d, Color as e, DetailsContent as f, DetailsSummary as g, Document as h, FontSize as i, HardBreak as j, Highlight as k, HorizontalRule as l, Italic as m, Link as n, ListItem as o, Subscript as p, Superscript as q, Table as r, TableCell as s, TableHeader as t, TaskItem as u, TaskList as v, Text as w, TextAlign as x, TextStyle as y, Heading as z };
|
|
1793
1863
|
export type { HeadingOptions as H, ImageOptions as I, ParagraphOptions as P, TableRowOptions as T };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node, a as Node$1, P as ParentConfig,
|
|
1
|
+
import { N as Node, a as Node$1, P as ParentConfig, E as EditorView, b as NodeView, R as ResizableNodeViewDirection, c as PluginKey, d as Editor, e as Range, T as Transaction, f as EditorState, g as ResolvedPos, D as DOMOutputSpec, M as Mark, h as Extension } from './extensions.BOBBi1Z_.mjs';
|
|
2
2
|
import '@tiptap/extension-mathematics';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -825,6 +825,25 @@ interface SuggestionOptions<I = any, TSelected = any> {
|
|
|
825
825
|
* @example 'mention'
|
|
826
826
|
*/
|
|
827
827
|
pluginKey?: PluginKey;
|
|
828
|
+
/**
|
|
829
|
+
* A function that returns a boolean to indicate if the suggestion should be active.
|
|
830
|
+
* This is useful to prevent suggestions from opening for remote users in collaborative environments.
|
|
831
|
+
* @param props The props object.
|
|
832
|
+
* @param props.editor The editor instance.
|
|
833
|
+
* @param props.range The range of the suggestion.
|
|
834
|
+
* @param props.query The current suggestion query.
|
|
835
|
+
* @param props.text The current suggestion text.
|
|
836
|
+
* @param props.transaction The current transaction.
|
|
837
|
+
* @returns {boolean}
|
|
838
|
+
* @example ({ transaction }) => isChangeOrigin(transaction)
|
|
839
|
+
*/
|
|
840
|
+
shouldShow?: (props: {
|
|
841
|
+
editor: Editor;
|
|
842
|
+
range: Range;
|
|
843
|
+
query: string;
|
|
844
|
+
text: string;
|
|
845
|
+
transaction: Transaction;
|
|
846
|
+
}) => boolean;
|
|
828
847
|
/**
|
|
829
848
|
* The editor instance.
|
|
830
849
|
* @default null
|
|
@@ -1420,6 +1439,7 @@ declare module '@tiptap/core' {
|
|
|
1420
1439
|
target?: string | null;
|
|
1421
1440
|
rel?: string | null;
|
|
1422
1441
|
class?: string | null;
|
|
1442
|
+
title?: string | null;
|
|
1423
1443
|
}) => ReturnType;
|
|
1424
1444
|
/**
|
|
1425
1445
|
* Toggle a link mark
|
|
@@ -1431,6 +1451,7 @@ declare module '@tiptap/core' {
|
|
|
1431
1451
|
target?: string | null;
|
|
1432
1452
|
rel?: string | null;
|
|
1433
1453
|
class?: string | null;
|
|
1454
|
+
title?: string | null;
|
|
1434
1455
|
}) => ReturnType;
|
|
1435
1456
|
/**
|
|
1436
1457
|
* Unset a link mark
|
|
@@ -1789,5 +1810,54 @@ declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
|
1789
1810
|
interface TextStyleAttributes extends Record<string, any> {
|
|
1790
1811
|
}
|
|
1791
1812
|
|
|
1792
|
-
|
|
1813
|
+
interface TextAlignOptions {
|
|
1814
|
+
/**
|
|
1815
|
+
* The types where the text align attribute can be applied.
|
|
1816
|
+
* @default []
|
|
1817
|
+
* @example ['heading', 'paragraph']
|
|
1818
|
+
*/
|
|
1819
|
+
types: string[];
|
|
1820
|
+
/**
|
|
1821
|
+
* The alignments which are allowed.
|
|
1822
|
+
* @default ['left', 'center', 'right', 'justify']
|
|
1823
|
+
* @example ['left', 'right']
|
|
1824
|
+
*/
|
|
1825
|
+
alignments: string[];
|
|
1826
|
+
/**
|
|
1827
|
+
* The default alignment.
|
|
1828
|
+
* @default null
|
|
1829
|
+
* @example 'center'
|
|
1830
|
+
*/
|
|
1831
|
+
defaultAlignment: string | null;
|
|
1832
|
+
}
|
|
1833
|
+
declare module '@tiptap/core' {
|
|
1834
|
+
interface Commands<ReturnType> {
|
|
1835
|
+
textAlign: {
|
|
1836
|
+
/**
|
|
1837
|
+
* Set the text align attribute
|
|
1838
|
+
* @param alignment The alignment
|
|
1839
|
+
* @example editor.commands.setTextAlign('left')
|
|
1840
|
+
*/
|
|
1841
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
1842
|
+
/**
|
|
1843
|
+
* Unset the text align attribute
|
|
1844
|
+
* @example editor.commands.unsetTextAlign()
|
|
1845
|
+
*/
|
|
1846
|
+
unsetTextAlign: () => ReturnType;
|
|
1847
|
+
/**
|
|
1848
|
+
* Toggle the text align attribute
|
|
1849
|
+
* @param alignment The alignment
|
|
1850
|
+
* @example editor.commands.toggleTextAlign('right')
|
|
1851
|
+
*/
|
|
1852
|
+
toggleTextAlign: (alignment: string) => ReturnType;
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* This extension allows you to align text.
|
|
1858
|
+
* @see https://www.tiptap.dev/api/extensions/text-align
|
|
1859
|
+
*/
|
|
1860
|
+
declare const TextAlign: Extension<TextAlignOptions, any>;
|
|
1861
|
+
|
|
1862
|
+
export { Image as A, BackgroundColor as B, Code as C, Details as D, Emoji as E, FontFamily as F, Paragraph as G, TableRow as J, LineHeight as L, Mention as M, OrderedList as O, Strike as S, Underline as U, Blockquote as a, Bold as b, BulletList as c, CodeBlockLowlight as d, Color as e, DetailsContent as f, DetailsSummary as g, Document as h, FontSize as i, HardBreak as j, Highlight as k, HorizontalRule as l, Italic as m, Link as n, ListItem as o, Subscript as p, Superscript as q, Table as r, TableCell as s, TableHeader as t, TaskItem as u, TaskList as v, Text as w, TextAlign as x, TextStyle as y, Heading as z };
|
|
1793
1863
|
export type { HeadingOptions as H, ImageOptions as I, ParagraphOptions as P, TableRowOptions as T };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node, a as Node$1, P as ParentConfig,
|
|
1
|
+
import { N as Node, a as Node$1, P as ParentConfig, E as EditorView, b as NodeView, R as ResizableNodeViewDirection, c as PluginKey, d as Editor, e as Range, T as Transaction, f as EditorState, g as ResolvedPos, D as DOMOutputSpec, M as Mark, h as Extension } from './extensions.BOBBi1Z_.js';
|
|
2
2
|
import '@tiptap/extension-mathematics';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -825,6 +825,25 @@ interface SuggestionOptions<I = any, TSelected = any> {
|
|
|
825
825
|
* @example 'mention'
|
|
826
826
|
*/
|
|
827
827
|
pluginKey?: PluginKey;
|
|
828
|
+
/**
|
|
829
|
+
* A function that returns a boolean to indicate if the suggestion should be active.
|
|
830
|
+
* This is useful to prevent suggestions from opening for remote users in collaborative environments.
|
|
831
|
+
* @param props The props object.
|
|
832
|
+
* @param props.editor The editor instance.
|
|
833
|
+
* @param props.range The range of the suggestion.
|
|
834
|
+
* @param props.query The current suggestion query.
|
|
835
|
+
* @param props.text The current suggestion text.
|
|
836
|
+
* @param props.transaction The current transaction.
|
|
837
|
+
* @returns {boolean}
|
|
838
|
+
* @example ({ transaction }) => isChangeOrigin(transaction)
|
|
839
|
+
*/
|
|
840
|
+
shouldShow?: (props: {
|
|
841
|
+
editor: Editor;
|
|
842
|
+
range: Range;
|
|
843
|
+
query: string;
|
|
844
|
+
text: string;
|
|
845
|
+
transaction: Transaction;
|
|
846
|
+
}) => boolean;
|
|
828
847
|
/**
|
|
829
848
|
* The editor instance.
|
|
830
849
|
* @default null
|
|
@@ -1420,6 +1439,7 @@ declare module '@tiptap/core' {
|
|
|
1420
1439
|
target?: string | null;
|
|
1421
1440
|
rel?: string | null;
|
|
1422
1441
|
class?: string | null;
|
|
1442
|
+
title?: string | null;
|
|
1423
1443
|
}) => ReturnType;
|
|
1424
1444
|
/**
|
|
1425
1445
|
* Toggle a link mark
|
|
@@ -1431,6 +1451,7 @@ declare module '@tiptap/core' {
|
|
|
1431
1451
|
target?: string | null;
|
|
1432
1452
|
rel?: string | null;
|
|
1433
1453
|
class?: string | null;
|
|
1454
|
+
title?: string | null;
|
|
1434
1455
|
}) => ReturnType;
|
|
1435
1456
|
/**
|
|
1436
1457
|
* Unset a link mark
|
|
@@ -1789,5 +1810,54 @@ declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
|
1789
1810
|
interface TextStyleAttributes extends Record<string, any> {
|
|
1790
1811
|
}
|
|
1791
1812
|
|
|
1792
|
-
|
|
1813
|
+
interface TextAlignOptions {
|
|
1814
|
+
/**
|
|
1815
|
+
* The types where the text align attribute can be applied.
|
|
1816
|
+
* @default []
|
|
1817
|
+
* @example ['heading', 'paragraph']
|
|
1818
|
+
*/
|
|
1819
|
+
types: string[];
|
|
1820
|
+
/**
|
|
1821
|
+
* The alignments which are allowed.
|
|
1822
|
+
* @default ['left', 'center', 'right', 'justify']
|
|
1823
|
+
* @example ['left', 'right']
|
|
1824
|
+
*/
|
|
1825
|
+
alignments: string[];
|
|
1826
|
+
/**
|
|
1827
|
+
* The default alignment.
|
|
1828
|
+
* @default null
|
|
1829
|
+
* @example 'center'
|
|
1830
|
+
*/
|
|
1831
|
+
defaultAlignment: string | null;
|
|
1832
|
+
}
|
|
1833
|
+
declare module '@tiptap/core' {
|
|
1834
|
+
interface Commands<ReturnType> {
|
|
1835
|
+
textAlign: {
|
|
1836
|
+
/**
|
|
1837
|
+
* Set the text align attribute
|
|
1838
|
+
* @param alignment The alignment
|
|
1839
|
+
* @example editor.commands.setTextAlign('left')
|
|
1840
|
+
*/
|
|
1841
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
1842
|
+
/**
|
|
1843
|
+
* Unset the text align attribute
|
|
1844
|
+
* @example editor.commands.unsetTextAlign()
|
|
1845
|
+
*/
|
|
1846
|
+
unsetTextAlign: () => ReturnType;
|
|
1847
|
+
/**
|
|
1848
|
+
* Toggle the text align attribute
|
|
1849
|
+
* @param alignment The alignment
|
|
1850
|
+
* @example editor.commands.toggleTextAlign('right')
|
|
1851
|
+
*/
|
|
1852
|
+
toggleTextAlign: (alignment: string) => ReturnType;
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* This extension allows you to align text.
|
|
1858
|
+
* @see https://www.tiptap.dev/api/extensions/text-align
|
|
1859
|
+
*/
|
|
1860
|
+
declare const TextAlign: Extension<TextAlignOptions, any>;
|
|
1861
|
+
|
|
1862
|
+
export { Image as A, BackgroundColor as B, Code as C, Details as D, Emoji as E, FontFamily as F, Paragraph as G, TableRow as J, LineHeight as L, Mention as M, OrderedList as O, Strike as S, Underline as U, Blockquote as a, Bold as b, BulletList as c, CodeBlockLowlight as d, Color as e, DetailsContent as f, DetailsSummary as g, Document as h, FontSize as i, HardBreak as j, Highlight as k, HorizontalRule as l, Italic as m, Link as n, ListItem as o, Subscript as p, Superscript as q, Table as r, TableCell as s, TableHeader as t, TaskItem as u, TaskList as v, Text as w, TextAlign as x, TextStyle as y, Heading as z };
|
|
1793
1863
|
export type { HeadingOptions as H, ImageOptions as I, ParagraphOptions as P, TableRowOptions as T };
|