@docen/extensions 0.2.2 → 0.2.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.
@@ -723,6 +723,9 @@ interface Mark {
723
723
  fontSize?: string;
724
724
  fontFamily?: string;
725
725
  lineHeight?: string;
726
+ letterSpacing?: string;
727
+ doubleStrike?: boolean;
728
+ rtl?: boolean;
726
729
  href?: string;
727
730
  target?: string;
728
731
  rel?: string;
@@ -818,6 +821,9 @@ interface TableNode extends JSONContent {
818
821
  marginBottom?: number | null;
819
822
  marginLeft?: number | null;
820
823
  marginRight?: number | null;
824
+ layout?: "autofit" | "fixed" | null;
825
+ alignment?: "left" | "center" | "right" | null;
826
+ cellSpacing?: number | null;
821
827
  };
822
828
  content?: Array<TableRowNode>;
823
829
  }
@@ -825,6 +831,8 @@ interface TableRowNode extends JSONContent {
825
831
  type: "tableRow";
826
832
  attrs?: {
827
833
  rowHeight?: string | null;
834
+ rowHeightRule?: "exact" | "atLeast" | null;
835
+ header?: boolean | null;
828
836
  };
829
837
  content?: Array<TableCellNode | TableHeaderNode>;
830
838
  }
@@ -836,6 +844,8 @@ interface TableCellNode extends JSONContent {
836
844
  colwidth?: number[] | null;
837
845
  backgroundColor?: string | null;
838
846
  verticalAlign?: "top" | "middle" | "bottom" | null;
847
+ noWrap?: boolean | null;
848
+ textDirection?: "lrTb" | "tbRl" | "btLr" | null;
839
849
  borderTop?: Border;
840
850
  borderBottom?: Border;
841
851
  borderLeft?: Border;
@@ -851,6 +861,8 @@ interface TableHeaderNode extends JSONContent {
851
861
  colwidth?: number[] | null;
852
862
  backgroundColor?: string | null;
853
863
  verticalAlign?: "top" | "middle" | "bottom" | null;
864
+ noWrap?: boolean | null;
865
+ textDirection?: "lrTb" | "tbRl" | "btLr" | null;
854
866
  borderTop?: Border;
855
867
  borderBottom?: Border;
856
868
  borderLeft?: Border;
package/dist/index.d.mts CHANGED
@@ -1,44 +1,22 @@
1
- import { A as Superscript, B as Underline, C as ListItem, E as OrderedList, F as TaskItem, I as TaskList, L as Text, M as TableCell, N as TableHeader, O as Strike, S as Link, T as Mention, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, h as HardBreak, i as BulletList, j as Table, k as Subscript, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as Mathematics, x as LineHeight, z as TextStyle } from "./_chunks/tiptap-x0R9GhXd.mjs";
1
+ import { A as Subscript, C as ListItem, D as OrderedList, E as Mention, G as UndoRedo, H as Dropcursor, I as TaskItem, L as TaskList, R as Text, S as Link, T as Mathematics, U as Gapcursor, V as Underline, W as TrailingNode, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, h as HardBreak, i as BulletList, j as Superscript, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as ListKeymap, x as LineHeight } from "./_chunks/tiptap-DCQh2d2R.mjs";
2
+ import { r as Border } from "./_chunks/types-Dh7AmS7W.mjs";
2
3
  import * as _$_tiptap_extension_paragraph0 from "@tiptap/extension-paragraph";
3
4
  import * as _$_tiptap_extension_heading0 from "@tiptap/extension-heading";
4
5
  import * as _$_tiptap_extension_table0 from "@tiptap/extension-table";
5
6
  import * as _$_tiptap_extension_image0 from "@tiptap/extension-image";
7
+ import * as _$_tiptap_extension_strike0 from "@tiptap/extension-strike";
8
+ import * as _$_tiptap_extension_text_style0 from "@tiptap/extension-text-style";
6
9
  import { TextAlign } from "@tiptap/extension-text-align";
7
10
  import * as _$_tiptap_core0 from "@tiptap/core";
8
- import { AnyExtension } from "@tiptap/core";
11
+ import { AnyExtension, Extension } from "@tiptap/core";
9
12
 
10
13
  //#region src/extends/heading.d.ts
11
- /**
12
- * Custom Heading extension with DOCX-compatible style attributes
13
- *
14
- * Adds the same paragraph-level formatting as Paragraph extension:
15
- * - Indentation: left, right, first line
16
- * - Spacing: before, after
17
- *
18
- * This ensures consistency across all block-level elements for DOCX round-trip.
19
- *
20
- * Note: Attributes store CSS values as-is (no unit conversion).
21
- * Conversion happens in export-docx/import-docx packages.
22
- */
23
14
  declare const Heading: _$_tiptap_core0.Node<_$_tiptap_extension_heading0.HeadingOptions, any>;
24
15
  //#endregion
25
16
  //#region src/extends/image.d.ts
26
17
  declare const Image: _$_tiptap_core0.Node<_$_tiptap_extension_image0.ImageOptions, any>;
27
18
  //#endregion
28
19
  //#region src/extends/paragraph.d.ts
29
- /**
30
- * Custom Paragraph extension with DOCX-compatible style attributes
31
- *
32
- * Adds support for paragraph-level formatting used in DOCX round-trip conversion:
33
- * - Indentation: left, right, first line
34
- * - Spacing: before, after
35
- *
36
- * These attributes map to CSS margin properties for HTML rendering
37
- * and to DOCX paragraph properties for DOCX export/import.
38
- *
39
- * Note: Attributes store CSS values as-is (no unit conversion).
40
- * Conversion happens in export-docx/import-docx packages.
41
- */
42
20
  declare const Paragraph: _$_tiptap_core0.Node<_$_tiptap_extension_paragraph0.ParagraphOptions, any>;
43
21
  //#endregion
44
22
  //#region src/extends/table-row.d.ts
@@ -56,9 +34,55 @@ declare const Paragraph: _$_tiptap_core0.Node<_$_tiptap_extension_paragraph0.Par
56
34
  */
57
35
  declare const TableRow: _$_tiptap_core0.Node<_$_tiptap_extension_table0.TableRowOptions, any>;
58
36
  //#endregion
37
+ //#region src/extends/table.d.ts
38
+ declare const Table: _$_tiptap_core0.Node<_$_tiptap_extension_table0.TableOptions, any>;
39
+ //#endregion
40
+ //#region src/extends/table-cell.d.ts
41
+ declare const TableCell: _$_tiptap_core0.Node<_$_tiptap_extension_table0.TableCellOptions, any>;
42
+ //#endregion
43
+ //#region src/extends/table-header.d.ts
44
+ declare const TableHeader: _$_tiptap_core0.Node<_$_tiptap_extension_table0.TableHeaderOptions, any>;
45
+ //#endregion
46
+ //#region src/extends/strike.d.ts
47
+ declare const Strike: _$_tiptap_core0.Mark<_$_tiptap_extension_strike0.StrikeOptions, any>;
48
+ //#endregion
49
+ //#region src/extends/text-style.d.ts
50
+ declare const TextStyle: _$_tiptap_core0.Mark<_$_tiptap_extension_text_style0.TextStyleOptions, any>;
51
+ //#endregion
59
52
  //#region src/extensions.d.ts
60
53
  declare const tiptapNodeExtensions: AnyExtension[];
61
54
  declare const tiptapMarkExtensions: AnyExtension[];
62
55
  declare const tiptapExtensions: AnyExtension[];
56
+ interface StarterKitOptions {
57
+ bold?: Record<string, any> | false;
58
+ blockquote?: Record<string, any> | false;
59
+ bulletList?: Record<string, any> | false;
60
+ code?: Record<string, any> | false;
61
+ codeBlock?: Record<string, any> | false;
62
+ document?: false;
63
+ dropcursor?: Record<string, any> | false;
64
+ gapcursor?: false;
65
+ hardBreak?: Record<string, any> | false;
66
+ heading?: Record<string, any> | false;
67
+ undoRedo?: Record<string, any> | false;
68
+ horizontalRule?: Record<string, any> | false;
69
+ italic?: Record<string, any> | false;
70
+ listItem?: Record<string, any> | false;
71
+ listKeymap?: Record<string, any> | false;
72
+ link?: Record<string, any> | false;
73
+ orderedList?: Record<string, any> | false;
74
+ paragraph?: Record<string, any> | false;
75
+ strike?: Record<string, any> | false;
76
+ text?: false;
77
+ underline?: Record<string, any> | false;
78
+ trailingNode?: Record<string, any> | false;
79
+ }
80
+ declare const StarterKit: Extension<StarterKitOptions, any>;
81
+ //#endregion
82
+ //#region src/utils.d.ts
83
+ /**
84
+ * Render a Border to CSS string
85
+ */
86
+ declare function renderBorderCSS(border: Border): string | null;
63
87
  //#endregion
64
- export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Emoji, FontFamily, FontSize, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, Underline, tiptapExtensions, tiptapMarkExtensions, tiptapNodeExtensions };
88
+ export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Dropcursor, Emoji, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, ListKeymap, Mathematics, Mention, OrderedList, Paragraph, StarterKit, StarterKitOptions, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, TrailingNode, Underline, UndoRedo, renderBorderCSS, tiptapExtensions, tiptapMarkExtensions, tiptapNodeExtensions };
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Emoji, FontFamily, FontSize, HardBreak, Heading as Heading$1, Highlight, HorizontalRule, Image as Image$1, Italic, LineHeight, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph as Paragraph$1, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow as TableRow$1, TaskItem, TaskList, Text, TextAlign as TextAlign$1, TextStyle, Underline } from "./tiptap.mjs";
1
+ import { A as Subscript, B as TextStyle$1, C as ListItem, D as OrderedList, E as Mention, F as TableRow$1, G as UndoRedo, H as Dropcursor, I as TaskItem, L as TaskList, M as Table$1, N as TableCell$1, O as Paragraph$1, P as TableHeader$1, R as Text, S as Link, T as Mathematics, U as Gapcursor, V as Underline, W as TrailingNode, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, g as Heading$1, h as HardBreak, i as BulletList, j as Superscript, k as Strike$1, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as ListKeymap, x as LineHeight, y as Image$1, z as TextAlign$1 } from "./_chunks/tiptap-IhzajZrq.mjs";
2
2
  import { TextAlign } from "@tiptap/extension-text-align";
3
+ import { Extension } from "@tiptap/core";
3
4
  //#region \0rolldown/runtime.js
4
5
  var __create = Object.create;
5
6
  var __defProp = Object.defineProperty;
@@ -23,19 +24,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
24
  enumerable: true
24
25
  }) : target, mod));
25
26
  //#endregion
26
- //#region src/extends/heading.ts
27
+ //#region src/utils.ts
27
28
  /**
28
- * Custom Heading extension with DOCX-compatible style attributes
29
- *
30
- * Adds the same paragraph-level formatting as Paragraph extension:
31
- * - Indentation: left, right, first line
32
- * - Spacing: before, after
33
- *
34
- * This ensures consistency across all block-level elements for DOCX round-trip.
35
- *
36
- * Note: Attributes store CSS values as-is (no unit conversion).
37
- * Conversion happens in export-docx/import-docx packages.
29
+ * Render a Border to CSS string
38
30
  */
31
+ function renderBorderCSS(border) {
32
+ if (!border || border.style === "none") return null;
33
+ const size = border.size != null ? `${border.size / 8}pt` : "1pt";
34
+ const color = border.color || "auto";
35
+ return `${{
36
+ single: "solid",
37
+ dashed: "dashed",
38
+ dotted: "dotted",
39
+ double: "double",
40
+ dotDash: "dashed",
41
+ dotDotDash: "dotted"
42
+ }[border.style || "single"] || "solid"} ${size} ${color}`;
43
+ }
44
+ //#endregion
45
+ //#region src/extends/heading.ts
39
46
  const Heading = Heading$1.extend({ addAttributes() {
40
47
  return {
41
48
  ...this.parent?.(),
@@ -63,6 +70,58 @@ const Heading = Heading$1.extend({ addAttributes() {
63
70
  default: null,
64
71
  parseHTML: (element) => element.style.marginBottom || null,
65
72
  renderHTML: (attributes) => attributes.spacingAfter ? { style: `margin-bottom: ${attributes.spacingAfter}` } : {}
73
+ },
74
+ textAlign: {
75
+ default: null,
76
+ parseHTML: (element) => element.style.textAlign || null,
77
+ renderHTML: (attributes) => attributes.textAlign ? { style: `text-align: ${attributes.textAlign}` } : {}
78
+ },
79
+ shading: {
80
+ default: null,
81
+ parseHTML: (element) => {
82
+ const bg = element.style.backgroundColor;
83
+ if (!bg) return null;
84
+ return {
85
+ fill: bg.startsWith("#") ? bg : `#${bg}`,
86
+ type: "clear"
87
+ };
88
+ },
89
+ renderHTML: (attributes) => {
90
+ if (!attributes.shading?.fill) return {};
91
+ return { style: `background-color: ${attributes.shading.fill}` };
92
+ }
93
+ },
94
+ borderTop: {
95
+ default: null,
96
+ parseHTML: () => null,
97
+ renderHTML: (attributes) => {
98
+ const css = renderBorderCSS(attributes.borderTop);
99
+ return css ? { style: `border-top: ${css}` } : {};
100
+ }
101
+ },
102
+ borderBottom: {
103
+ default: null,
104
+ parseHTML: () => null,
105
+ renderHTML: (attributes) => {
106
+ const css = renderBorderCSS(attributes.borderBottom);
107
+ return css ? { style: `border-bottom: ${css}` } : {};
108
+ }
109
+ },
110
+ borderLeft: {
111
+ default: null,
112
+ parseHTML: () => null,
113
+ renderHTML: (attributes) => {
114
+ const css = renderBorderCSS(attributes.borderLeft);
115
+ return css ? { style: `border-left: ${css}` } : {};
116
+ }
117
+ },
118
+ borderRight: {
119
+ default: null,
120
+ parseHTML: () => null,
121
+ renderHTML: (attributes) => {
122
+ const css = renderBorderCSS(attributes.borderRight);
123
+ return css ? { style: `border-right: ${css}` } : {};
124
+ }
66
125
  }
67
126
  };
68
127
  } });
@@ -173,19 +232,6 @@ const Image = Image$1.extend({ addAttributes() {
173
232
  } });
174
233
  //#endregion
175
234
  //#region src/extends/paragraph.ts
176
- /**
177
- * Custom Paragraph extension with DOCX-compatible style attributes
178
- *
179
- * Adds support for paragraph-level formatting used in DOCX round-trip conversion:
180
- * - Indentation: left, right, first line
181
- * - Spacing: before, after
182
- *
183
- * These attributes map to CSS margin properties for HTML rendering
184
- * and to DOCX paragraph properties for DOCX export/import.
185
- *
186
- * Note: Attributes store CSS values as-is (no unit conversion).
187
- * Conversion happens in export-docx/import-docx packages.
188
- */
189
235
  const Paragraph = Paragraph$1.extend({ addAttributes() {
190
236
  return {
191
237
  ...this.parent?.(),
@@ -232,22 +278,34 @@ const Paragraph = Paragraph$1.extend({ addAttributes() {
232
278
  borderTop: {
233
279
  default: null,
234
280
  parseHTML: () => null,
235
- renderHTML: () => ({})
281
+ renderHTML: (attributes) => {
282
+ const css = renderBorderCSS(attributes.borderTop);
283
+ return css ? { style: `border-top: ${css}` } : {};
284
+ }
236
285
  },
237
286
  borderBottom: {
238
287
  default: null,
239
288
  parseHTML: () => null,
240
- renderHTML: () => ({})
289
+ renderHTML: (attributes) => {
290
+ const css = renderBorderCSS(attributes.borderBottom);
291
+ return css ? { style: `border-bottom: ${css}` } : {};
292
+ }
241
293
  },
242
294
  borderLeft: {
243
295
  default: null,
244
296
  parseHTML: () => null,
245
- renderHTML: () => ({})
297
+ renderHTML: (attributes) => {
298
+ const css = renderBorderCSS(attributes.borderLeft);
299
+ return css ? { style: `border-left: ${css}` } : {};
300
+ }
246
301
  },
247
302
  borderRight: {
248
303
  default: null,
249
304
  parseHTML: () => null,
250
- renderHTML: () => ({})
305
+ renderHTML: (attributes) => {
306
+ const css = renderBorderCSS(attributes.borderRight);
307
+ return css ? { style: `border-right: ${css}` } : {};
308
+ }
251
309
  }
252
310
  };
253
311
  } });
@@ -281,6 +339,110 @@ const TableRow = TableRow$1.extend({ addAttributes() {
281
339
  if (!attributes.rowHeight) return {};
282
340
  return { style: `height: ${attributes.rowHeight}` };
283
341
  }
342
+ },
343
+ header: {
344
+ default: null,
345
+ parseHTML: () => null,
346
+ renderHTML: () => ({})
347
+ }
348
+ };
349
+ } });
350
+ //#endregion
351
+ //#region src/extends/table.ts
352
+ const Table = Table$1.extend({ addAttributes() {
353
+ return {
354
+ ...this.parent?.(),
355
+ layout: {
356
+ default: null,
357
+ parseHTML: () => null,
358
+ renderHTML: () => ({})
359
+ },
360
+ alignment: {
361
+ default: null,
362
+ parseHTML: (element) => {
363
+ const ml = element.style.marginLeft;
364
+ const mr = element.style.marginRight;
365
+ if (ml === "auto" && mr === "auto") return "center";
366
+ if (ml === "auto") return "right";
367
+ if (mr === "auto") return "left";
368
+ return null;
369
+ },
370
+ renderHTML: (attributes) => {
371
+ if (!attributes.alignment) return {};
372
+ switch (attributes.alignment) {
373
+ case "center": return { style: "margin-left: auto; margin-right: auto" };
374
+ case "right": return { style: "margin-left: auto; margin-right: 0" };
375
+ default: return { style: "margin-left: 0; margin-right: auto" };
376
+ }
377
+ }
378
+ },
379
+ cellSpacing: {
380
+ default: null,
381
+ parseHTML: () => null,
382
+ renderHTML: () => ({})
383
+ }
384
+ };
385
+ } });
386
+ //#endregion
387
+ //#region src/extends/table-cell.ts
388
+ const TableCell = TableCell$1.extend({ addAttributes() {
389
+ return {
390
+ ...this.parent?.(),
391
+ noWrap: {
392
+ default: null,
393
+ parseHTML: (element) => element.style.whiteSpace === "nowrap" ? true : null,
394
+ renderHTML: (attributes) => attributes.noWrap ? { style: "white-space: nowrap" } : {}
395
+ },
396
+ textDirection: {
397
+ default: null,
398
+ parseHTML: () => null,
399
+ renderHTML: () => ({})
400
+ }
401
+ };
402
+ } });
403
+ //#endregion
404
+ //#region src/extends/table-header.ts
405
+ const TableHeader = TableHeader$1.extend({ addAttributes() {
406
+ return {
407
+ ...this.parent?.(),
408
+ noWrap: {
409
+ default: null,
410
+ parseHTML: (element) => element.style.whiteSpace === "nowrap" ? true : null,
411
+ renderHTML: (attributes) => attributes.noWrap ? { style: "white-space: nowrap" } : {}
412
+ },
413
+ textDirection: {
414
+ default: null,
415
+ parseHTML: () => null,
416
+ renderHTML: () => ({})
417
+ }
418
+ };
419
+ } });
420
+ //#endregion
421
+ //#region src/extends/strike.ts
422
+ const Strike = Strike$1.extend({ addAttributes() {
423
+ return {
424
+ ...this.parent?.(),
425
+ doubleStrike: {
426
+ default: null,
427
+ parseHTML: () => null,
428
+ renderHTML: () => ({})
429
+ }
430
+ };
431
+ } });
432
+ //#endregion
433
+ //#region src/extends/text-style.ts
434
+ const TextStyle = TextStyle$1.extend({ addAttributes() {
435
+ return {
436
+ ...this.parent?.(),
437
+ letterSpacing: {
438
+ default: null,
439
+ parseHTML: (element) => element.style.letterSpacing || null,
440
+ renderHTML: (attributes) => attributes.letterSpacing ? { style: `letter-spacing: ${attributes.letterSpacing}` } : {}
441
+ },
442
+ rtl: {
443
+ default: null,
444
+ parseHTML: (element) => element.dir === "rtl" ? true : null,
445
+ renderHTML: (attributes) => attributes.rtl ? { dir: "rtl" } : {}
284
446
  }
285
447
  };
286
448
  } });
@@ -47860,5 +48022,37 @@ const tiptapMarkExtensions = [
47860
48022
  LineHeight
47861
48023
  ];
47862
48024
  const tiptapExtensions = [...tiptapNodeExtensions, ...tiptapMarkExtensions];
48025
+ const StarterKit = Extension.create({
48026
+ name: "docenKit",
48027
+ addExtensions() {
48028
+ const extensions = [];
48029
+ if (this.options.bold !== false) extensions.push(Bold.configure(this.options.bold));
48030
+ if (this.options.blockquote !== false) extensions.push(Blockquote.configure(this.options.blockquote));
48031
+ if (this.options.bulletList !== false) extensions.push(BulletList.configure(this.options.bulletList));
48032
+ if (this.options.code !== false) extensions.push(Code.configure(this.options.code));
48033
+ if (this.options.codeBlock !== false) extensions.push(CodeBlockLowlight.configure({
48034
+ lowlight: createLowlight(grammars),
48035
+ ...this.options.codeBlock
48036
+ }));
48037
+ if (this.options.document !== false) extensions.push(Document);
48038
+ if (this.options.dropcursor !== false) extensions.push(Dropcursor.configure(this.options.dropcursor));
48039
+ if (this.options.gapcursor !== false) extensions.push(Gapcursor);
48040
+ if (this.options.hardBreak !== false) extensions.push(HardBreak.configure(this.options.hardBreak));
48041
+ if (this.options.heading !== false) extensions.push(Heading.configure(this.options.heading));
48042
+ if (this.options.undoRedo !== false) extensions.push(UndoRedo.configure(this.options.undoRedo));
48043
+ if (this.options.horizontalRule !== false) extensions.push(HorizontalRule.configure(this.options.horizontalRule));
48044
+ if (this.options.italic !== false) extensions.push(Italic.configure(this.options.italic));
48045
+ if (this.options.listItem !== false) extensions.push(ListItem.configure(this.options.listItem));
48046
+ if (this.options.listKeymap !== false) extensions.push(ListKeymap.configure(this.options.listKeymap));
48047
+ if (this.options.link !== false) extensions.push(Link.configure(this.options.link));
48048
+ if (this.options.orderedList !== false) extensions.push(OrderedList.configure(this.options.orderedList));
48049
+ if (this.options.paragraph !== false) extensions.push(Paragraph.configure(this.options.paragraph));
48050
+ if (this.options.strike !== false) extensions.push(Strike.configure(this.options.strike));
48051
+ if (this.options.text !== false) extensions.push(Text);
48052
+ if (this.options.underline !== false) extensions.push(Underline.configure(this.options.underline));
48053
+ if (this.options.trailingNode !== false) extensions.push(TrailingNode.configure(this.options.trailingNode));
48054
+ return extensions;
48055
+ }
48056
+ });
47863
48057
  //#endregion
47864
- export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Emoji, FontFamily, FontSize, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, Underline, tiptapExtensions, tiptapMarkExtensions, tiptapNodeExtensions };
48058
+ export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Dropcursor, Emoji, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, ListKeymap, Mathematics, Mention, OrderedList, Paragraph, StarterKit, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, TrailingNode, Underline, UndoRedo, renderBorderCSS, tiptapExtensions, tiptapMarkExtensions, tiptapNodeExtensions };
package/dist/tiptap.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as Superscript, B as Underline, C as ListItem, D as Paragraph, E as OrderedList, F as TaskItem, I as TaskList, L as Text, M as TableCell, N as TableHeader, O as Strike, P as TableRow, R as TextAlign, S as Link, T as Mention, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, g as Heading, h as HardBreak, i as BulletList, j as Table, k as Subscript, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as Mathematics, x as LineHeight, y as Image, z as TextStyle } from "./_chunks/tiptap-x0R9GhXd.mjs";
2
- export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Emoji, FontFamily, FontSize, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, Underline };
1
+ import { A as Subscript, B as TextStyle, C as ListItem, D as OrderedList, E as Mention, F as TableRow, G as UndoRedo, H as Dropcursor, I as TaskItem, L as TaskList, M as Table, N as TableCell, O as Paragraph, P as TableHeader, R as Text, S as Link, T as Mathematics, U as Gapcursor, V as Underline, W as TrailingNode, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, g as Heading, h as HardBreak, i as BulletList, j as Superscript, k as Strike, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as ListKeymap, x as LineHeight, y as Image, z as TextAlign } from "./_chunks/tiptap-DCQh2d2R.mjs";
2
+ export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Dropcursor, Emoji, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, ListKeymap, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, TrailingNode, Underline, UndoRedo };
package/dist/tiptap.mjs CHANGED
@@ -1,31 +1,2 @@
1
- import { Document } from "@tiptap/extension-document";
2
- import { Text } from "@tiptap/extension-text";
3
- import { Paragraph } from "@tiptap/extension-paragraph";
4
- import { Heading } from "@tiptap/extension-heading";
5
- import { Blockquote } from "@tiptap/extension-blockquote";
6
- import { HorizontalRule } from "@tiptap/extension-horizontal-rule";
7
- import { CodeBlockLowlight } from "@tiptap/extension-code-block-lowlight";
8
- import { BulletList } from "@tiptap/extension-bullet-list";
9
- import { OrderedList } from "@tiptap/extension-ordered-list";
10
- import { ListItem } from "@tiptap/extension-list-item";
11
- import { TaskList } from "@tiptap/extension-task-list";
12
- import { TaskItem } from "@tiptap/extension-task-item";
13
- import { Table, TableCell, TableHeader, TableRow } from "@tiptap/extension-table";
14
- import { Image } from "@tiptap/extension-image";
15
- import { HardBreak } from "@tiptap/extension-hard-break";
16
- import { Details, DetailsContent, DetailsSummary } from "@tiptap/extension-details";
17
- import { Emoji } from "@tiptap/extension-emoji";
18
- import { Mention } from "@tiptap/extension-mention";
19
- import { Mathematics } from "@tiptap/extension-mathematics";
20
- import { Bold } from "@tiptap/extension-bold";
21
- import { Italic } from "@tiptap/extension-italic";
22
- import { Underline } from "@tiptap/extension-underline";
23
- import { Strike } from "@tiptap/extension-strike";
24
- import { Code } from "@tiptap/extension-code";
25
- import { Link } from "@tiptap/extension-link";
26
- import { Highlight } from "@tiptap/extension-highlight";
27
- import { Subscript } from "@tiptap/extension-subscript";
28
- import { Superscript } from "@tiptap/extension-superscript";
29
- import { BackgroundColor, Color, FontFamily, FontSize, LineHeight, TextStyle } from "@tiptap/extension-text-style";
30
- import { TextAlign } from "@tiptap/extension-text-align";
31
- export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Emoji, FontFamily, FontSize, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, Underline };
1
+ import { A as Subscript, B as TextStyle, C as ListItem, D as OrderedList, E as Mention, F as TableRow, G as UndoRedo, H as Dropcursor, I as TaskItem, L as TaskList, M as Table, N as TableCell, O as Paragraph, P as TableHeader, R as Text, S as Link, T as Mathematics, U as Gapcursor, V as Underline, W as TrailingNode, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, g as Heading, h as HardBreak, i as BulletList, j as Superscript, k as Strike, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as ListKeymap, x as LineHeight, y as Image, z as TextAlign } from "./_chunks/tiptap-IhzajZrq.mjs";
2
+ export { BackgroundColor, Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Color, Details, DetailsContent, DetailsSummary, Document, Dropcursor, Emoji, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, LineHeight, Link, ListItem, ListKeymap, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, TrailingNode, Underline, UndoRedo };
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as TextNode, C as TableCellNode, D as TaskItemNode, E as TableRowNode, O as TaskListNode, S as SourceRectangleOptions, T as TableNode, _ as ListItemNode, a as CodeBlockNode, b as ParagraphNode, c as DetailsSummaryNode, d as HeadingNode, f as HorizontalRuleNode, g as JSONContent, h as ImageOutlineOptions, i as BulletListNode, k as TextContent, l as DocumentNode, m as ImageNode, n as BlockquoteNode, o as DetailsContentNode, p as ImageFloatingOptions, r as Border, s as DetailsNode, t as BlockNode, u as HardBreakNode, v as Mark, w as TableHeaderNode, x as Shading, y as OrderedListNode } from "./_chunks/types-or4xeozj.mjs";
1
+ import { A as TextNode, C as TableCellNode, D as TaskItemNode, E as TableRowNode, O as TaskListNode, S as SourceRectangleOptions, T as TableNode, _ as ListItemNode, a as CodeBlockNode, b as ParagraphNode, c as DetailsSummaryNode, d as HeadingNode, f as HorizontalRuleNode, g as JSONContent, h as ImageOutlineOptions, i as BulletListNode, k as TextContent, l as DocumentNode, m as ImageNode, n as BlockquoteNode, o as DetailsContentNode, p as ImageFloatingOptions, r as Border, s as DetailsNode, t as BlockNode, u as HardBreakNode, v as Mark, w as TableHeaderNode, x as Shading, y as OrderedListNode } from "./_chunks/types-Dh7AmS7W.mjs";
2
2
  export { BlockNode, BlockquoteNode, Border, BulletListNode, CodeBlockNode, DetailsContentNode, DetailsNode, DetailsSummaryNode, DocumentNode, HardBreakNode, HeadingNode, HorizontalRuleNode, ImageFloatingOptions, ImageNode, ImageOutlineOptions, JSONContent, ListItemNode, Mark, OrderedListNode, ParagraphNode, Shading, SourceRectangleOptions, TableCellNode, TableHeaderNode, TableNode, TableRowNode, TaskItemNode, TaskListNode, TextContent, TextNode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docen/extensions",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Collection of TipTap extensions with TypeScript type definitions for Docen",
5
5
  "keywords": [
6
6
  "docen",
@@ -1,31 +0,0 @@
1
- import { Document } from "@tiptap/extension-document";
2
- import { Text } from "@tiptap/extension-text";
3
- import { Paragraph } from "@tiptap/extension-paragraph";
4
- import { Heading } from "@tiptap/extension-heading";
5
- import { Blockquote } from "@tiptap/extension-blockquote";
6
- import { HorizontalRule } from "@tiptap/extension-horizontal-rule";
7
- import { CodeBlockLowlight } from "@tiptap/extension-code-block-lowlight";
8
- import { BulletList } from "@tiptap/extension-bullet-list";
9
- import { OrderedList } from "@tiptap/extension-ordered-list";
10
- import { ListItem } from "@tiptap/extension-list-item";
11
- import { TaskList } from "@tiptap/extension-task-list";
12
- import { TaskItem } from "@tiptap/extension-task-item";
13
- import { Table, TableCell, TableHeader, TableRow } from "@tiptap/extension-table";
14
- import { Image } from "@tiptap/extension-image";
15
- import { HardBreak } from "@tiptap/extension-hard-break";
16
- import { Details, DetailsContent, DetailsSummary } from "@tiptap/extension-details";
17
- import { Emoji } from "@tiptap/extension-emoji";
18
- import { Mention } from "@tiptap/extension-mention";
19
- import { Mathematics } from "@tiptap/extension-mathematics";
20
- import { Bold } from "@tiptap/extension-bold";
21
- import { Italic } from "@tiptap/extension-italic";
22
- import { Underline } from "@tiptap/extension-underline";
23
- import { Strike } from "@tiptap/extension-strike";
24
- import { Code } from "@tiptap/extension-code";
25
- import { Link } from "@tiptap/extension-link";
26
- import { Highlight } from "@tiptap/extension-highlight";
27
- import { Subscript } from "@tiptap/extension-subscript";
28
- import { Superscript } from "@tiptap/extension-superscript";
29
- import { BackgroundColor, Color, FontFamily, FontSize, LineHeight, TextStyle } from "@tiptap/extension-text-style";
30
- import { TextAlign } from "@tiptap/extension-text-align";
31
- export { Superscript as A, Underline as B, ListItem as C, Paragraph as D, OrderedList as E, TaskItem as F, TaskList as I, Text as L, TableCell as M, TableHeader as N, Strike as O, TableRow as P, TextAlign as R, Link as S, Mention as T, Highlight as _, Code as a, Italic as b, Details as c, Document as d, Emoji as f, Heading as g, HardBreak as h, BulletList as i, Table as j, Subscript as k, DetailsContent as l, FontSize as m, Blockquote as n, CodeBlockLowlight as o, FontFamily as p, Bold as r, Color as s, BackgroundColor as t, DetailsSummary as u, HorizontalRule as v, Mathematics as w, LineHeight as x, Image as y, TextStyle as z };