draftly 0.1.0-alpha.1 → 1.0.7

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.
Files changed (68) hide show
  1. package/dist/chunk-2B3A3VSQ.cjs +3382 -0
  2. package/dist/chunk-2B3A3VSQ.cjs.map +1 -0
  3. package/dist/{chunk-ZDSZRRUY.cjs → chunk-72ZYRGRT.cjs} +48 -104
  4. package/dist/chunk-72ZYRGRT.cjs.map +1 -0
  5. package/dist/{chunk-MOG6E2LY.js → chunk-CG4M4TC7.js} +46 -103
  6. package/dist/chunk-CG4M4TC7.js.map +1 -0
  7. package/dist/{chunk-LCQALOEI.js → chunk-DFQYXFOP.js} +36 -3
  8. package/dist/chunk-DFQYXFOP.js.map +1 -0
  9. package/dist/{chunk-6LQ2VR4I.js → chunk-HPSMS2WB.js} +38 -22
  10. package/dist/chunk-HPSMS2WB.js.map +1 -0
  11. package/dist/{chunk-7Z3SRTPZ.cjs → chunk-KBQDZ5IW.cjs} +38 -22
  12. package/dist/chunk-KBQDZ5IW.cjs.map +1 -0
  13. package/dist/{chunk-RV2SYFA6.cjs → chunk-KDEDLC3D.cjs} +36 -2
  14. package/dist/chunk-KDEDLC3D.cjs.map +1 -0
  15. package/dist/chunk-N3WL3XPB.js +3360 -0
  16. package/dist/chunk-N3WL3XPB.js.map +1 -0
  17. package/dist/{draftly-Bxu_H4nw.d.ts → draftly-BLnx3uGX.d.cts} +12 -6
  18. package/dist/{draftly-Bxu_H4nw.d.cts → draftly-BLnx3uGX.d.ts} +12 -6
  19. package/dist/editor/index.cjs +20 -12
  20. package/dist/editor/index.d.cts +3 -2
  21. package/dist/editor/index.d.ts +3 -2
  22. package/dist/editor/index.js +2 -2
  23. package/dist/index.cjs +59 -27
  24. package/dist/index.d.cts +3 -3
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.js +4 -4
  27. package/dist/plugins/index.cjs +35 -11
  28. package/dist/plugins/index.d.cts +321 -3
  29. package/dist/plugins/index.d.ts +321 -3
  30. package/dist/plugins/index.js +3 -3
  31. package/dist/preview/index.cjs +7 -7
  32. package/dist/preview/index.d.cts +9 -4
  33. package/dist/preview/index.d.ts +9 -4
  34. package/dist/preview/index.js +2 -2
  35. package/package.json +2 -1
  36. package/src/editor/draftly.ts +9 -13
  37. package/src/editor/plugin.ts +4 -1
  38. package/src/editor/theme.ts +34 -1
  39. package/src/editor/utils.ts +49 -0
  40. package/src/editor/view-plugin.ts +6 -131
  41. package/src/plugins/code-plugin.ts +1119 -0
  42. package/src/plugins/heading-plugin.ts +23 -11
  43. package/src/plugins/hr-plugin.ts +102 -0
  44. package/src/plugins/image-plugin.ts +96 -2
  45. package/src/plugins/index.ts +57 -39
  46. package/src/plugins/inline-plugin.ts +125 -6
  47. package/src/plugins/link-plugin.ts +509 -0
  48. package/src/plugins/list-plugin.ts +116 -2
  49. package/src/plugins/math-plugin.ts +5 -1
  50. package/src/plugins/mermaid-plugin.ts +500 -0
  51. package/src/plugins/paragraph-plugin.ts +38 -0
  52. package/src/plugins/quote-plugin.ts +146 -0
  53. package/src/preview/context.ts +1 -1
  54. package/src/preview/css-generator.ts +3 -1
  55. package/src/preview/default-renderers.ts +0 -5
  56. package/src/preview/preview.ts +2 -2
  57. package/src/preview/renderer.ts +34 -12
  58. package/src/preview/types.ts +1 -1
  59. package/dist/chunk-6LQ2VR4I.js.map +0 -1
  60. package/dist/chunk-7Z3SRTPZ.cjs.map +0 -1
  61. package/dist/chunk-GA6NYY77.cjs +0 -1400
  62. package/dist/chunk-GA6NYY77.cjs.map +0 -1
  63. package/dist/chunk-LCQALOEI.js.map +0 -1
  64. package/dist/chunk-MOG6E2LY.js.map +0 -1
  65. package/dist/chunk-RV2SYFA6.cjs.map +0 -1
  66. package/dist/chunk-TKZNKWGF.js +0 -1385
  67. package/dist/chunk-TKZNKWGF.js.map +0 -1
  68. package/dist/chunk-ZDSZRRUY.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as _codemirror_state from '@codemirror/state';
2
- import { Range, Extension } from '@codemirror/state';
3
- import { EditorView, Decoration, KeyBinding, ViewUpdate } from '@codemirror/view';
2
+ import { Extension, Range } from '@codemirror/state';
3
+ import { EditorView, KeyBinding, Decoration, ViewUpdate } from '@codemirror/view';
4
4
  import { MarkdownConfig } from '@lezer/markdown';
5
5
  import { SyntaxNode } from '@lezer/common';
6
6
  import { StyleSpec } from 'style-mod';
@@ -47,6 +47,12 @@ declare function cursorInRange(view: EditorView, from: number, to: number): bool
47
47
  * Check if any selection overlaps with the given range
48
48
  */
49
49
  declare function selectionOverlapsRange(view: EditorView, from: number, to: number): boolean;
50
+ /**
51
+ * Toggle markdown style on selection or insert markers at cursor
52
+ * @param marker - The markdown marker (e.g., "**" for bold, "*" for italic)
53
+ * @returns Command function for EditorView
54
+ */
55
+ declare function toggleMarkdownStyle(marker: string): (view: EditorView) => boolean;
50
56
 
51
57
  /**
52
58
  * Context passed to plugin lifecycle methods
@@ -92,6 +98,8 @@ declare abstract class DraftlyPlugin {
92
98
  readonly decorationPriority: number;
93
99
  /** Plugin dependencies - names of required plugins */
94
100
  readonly dependencies: string[];
101
+ /** Node types this plugin handles for decorations and preview rendering */
102
+ readonly requiredNodes: readonly string[];
95
103
  /** Private configuration storage */
96
104
  private _config;
97
105
  /** Protected context - accessible to subclasses */
@@ -174,7 +182,7 @@ declare abstract class DraftlyPlugin {
174
182
  renderToHTML?(node: SyntaxNode, children: string, ctx: {
175
183
  sliceDoc(from: number, to: number): string;
176
184
  sanitize(html: string): string;
177
- }): string | null;
185
+ }): string | null | Promise<string | null>;
178
186
  /**
179
187
  * Get CSS styles for preview mode
180
188
  * Override to provide custom CSS for preview rendering
@@ -234,8 +242,6 @@ type DraftlyNode = {
234
242
  interface DraftlyConfig {
235
243
  /** Theme */
236
244
  theme?: ThemeEnum;
237
- /** ThemeStlye */
238
- themeStyle?: Extension;
239
245
  /** Weather to load base styles */
240
246
  baseStyles?: boolean;
241
247
  /** Plugins to load */
@@ -284,4 +290,4 @@ interface DraftlyConfig {
284
290
  */
285
291
  declare function draftly(config?: DraftlyConfig): Extension[];
286
292
 
287
- export { type DecorationContext as D, type PluginConfig as P, SyntaxPlugin as S, ThemeEnum as T, DecorationPlugin as a, type DraftlyConfig as b, type DraftlyNode as c, DraftlyPlugin as d, type PluginContext as e, type ThemeStyle as f, createTheme as g, cursorInRange as h, deepMerge as i, draftly as j, selectionOverlapsRange as s };
293
+ export { type DecorationContext as D, type PluginConfig as P, SyntaxPlugin as S, ThemeEnum as T, DecorationPlugin as a, type DraftlyConfig as b, type DraftlyNode as c, DraftlyPlugin as d, type PluginContext as e, type ThemeStyle as f, createTheme as g, cursorInRange as h, deepMerge as i, draftly as j, selectionOverlapsRange as s, toggleMarkdownStyle as t };
@@ -1,6 +1,6 @@
1
1
  import * as _codemirror_state from '@codemirror/state';
2
- import { Range, Extension } from '@codemirror/state';
3
- import { EditorView, Decoration, KeyBinding, ViewUpdate } from '@codemirror/view';
2
+ import { Extension, Range } from '@codemirror/state';
3
+ import { EditorView, KeyBinding, Decoration, ViewUpdate } from '@codemirror/view';
4
4
  import { MarkdownConfig } from '@lezer/markdown';
5
5
  import { SyntaxNode } from '@lezer/common';
6
6
  import { StyleSpec } from 'style-mod';
@@ -47,6 +47,12 @@ declare function cursorInRange(view: EditorView, from: number, to: number): bool
47
47
  * Check if any selection overlaps with the given range
48
48
  */
49
49
  declare function selectionOverlapsRange(view: EditorView, from: number, to: number): boolean;
50
+ /**
51
+ * Toggle markdown style on selection or insert markers at cursor
52
+ * @param marker - The markdown marker (e.g., "**" for bold, "*" for italic)
53
+ * @returns Command function for EditorView
54
+ */
55
+ declare function toggleMarkdownStyle(marker: string): (view: EditorView) => boolean;
50
56
 
51
57
  /**
52
58
  * Context passed to plugin lifecycle methods
@@ -92,6 +98,8 @@ declare abstract class DraftlyPlugin {
92
98
  readonly decorationPriority: number;
93
99
  /** Plugin dependencies - names of required plugins */
94
100
  readonly dependencies: string[];
101
+ /** Node types this plugin handles for decorations and preview rendering */
102
+ readonly requiredNodes: readonly string[];
95
103
  /** Private configuration storage */
96
104
  private _config;
97
105
  /** Protected context - accessible to subclasses */
@@ -174,7 +182,7 @@ declare abstract class DraftlyPlugin {
174
182
  renderToHTML?(node: SyntaxNode, children: string, ctx: {
175
183
  sliceDoc(from: number, to: number): string;
176
184
  sanitize(html: string): string;
177
- }): string | null;
185
+ }): string | null | Promise<string | null>;
178
186
  /**
179
187
  * Get CSS styles for preview mode
180
188
  * Override to provide custom CSS for preview rendering
@@ -234,8 +242,6 @@ type DraftlyNode = {
234
242
  interface DraftlyConfig {
235
243
  /** Theme */
236
244
  theme?: ThemeEnum;
237
- /** ThemeStlye */
238
- themeStyle?: Extension;
239
245
  /** Weather to load base styles */
240
246
  baseStyles?: boolean;
241
247
  /** Plugins to load */
@@ -284,4 +290,4 @@ interface DraftlyConfig {
284
290
  */
285
291
  declare function draftly(config?: DraftlyConfig): Extension[];
286
292
 
287
- export { type DecorationContext as D, type PluginConfig as P, SyntaxPlugin as S, ThemeEnum as T, DecorationPlugin as a, type DraftlyConfig as b, type DraftlyNode as c, DraftlyPlugin as d, type PluginContext as e, type ThemeStyle as f, createTheme as g, cursorInRange as h, deepMerge as i, draftly as j, selectionOverlapsRange as s };
293
+ export { type DecorationContext as D, type PluginConfig as P, SyntaxPlugin as S, ThemeEnum as T, DecorationPlugin as a, type DraftlyConfig as b, type DraftlyNode as c, DraftlyPlugin as d, type PluginContext as e, type ThemeStyle as f, createTheme as g, cursorInRange as h, deepMerge as i, draftly as j, selectionOverlapsRange as s, toggleMarkdownStyle as t };
@@ -1,49 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkZDSZRRUY_cjs = require('../chunk-ZDSZRRUY.cjs');
4
- var chunkRV2SYFA6_cjs = require('../chunk-RV2SYFA6.cjs');
3
+ var chunk72ZYRGRT_cjs = require('../chunk-72ZYRGRT.cjs');
4
+ var chunkKDEDLC3D_cjs = require('../chunk-KDEDLC3D.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "DecorationPlugin", {
9
9
  enumerable: true,
10
- get: function () { return chunkZDSZRRUY_cjs.DecorationPlugin; }
10
+ get: function () { return chunk72ZYRGRT_cjs.DecorationPlugin; }
11
11
  });
12
12
  Object.defineProperty(exports, "DraftlyPlugin", {
13
13
  enumerable: true,
14
- get: function () { return chunkZDSZRRUY_cjs.DraftlyPlugin; }
14
+ get: function () { return chunk72ZYRGRT_cjs.DraftlyPlugin; }
15
15
  });
16
16
  Object.defineProperty(exports, "SyntaxPlugin", {
17
17
  enumerable: true,
18
- get: function () { return chunkZDSZRRUY_cjs.SyntaxPlugin; }
18
+ get: function () { return chunk72ZYRGRT_cjs.SyntaxPlugin; }
19
19
  });
20
20
  Object.defineProperty(exports, "draftly", {
21
21
  enumerable: true,
22
- get: function () { return chunkZDSZRRUY_cjs.draftly; }
22
+ get: function () { return chunk72ZYRGRT_cjs.draftly; }
23
23
  });
24
24
  Object.defineProperty(exports, "draftlyBaseTheme", {
25
25
  enumerable: true,
26
- get: function () { return chunkZDSZRRUY_cjs.draftlyBaseTheme; }
26
+ get: function () { return chunk72ZYRGRT_cjs.draftlyBaseTheme; }
27
+ });
28
+ Object.defineProperty(exports, "markdownResetExtension", {
29
+ enumerable: true,
30
+ get: function () { return chunk72ZYRGRT_cjs.markdownResetExtension; }
27
31
  });
28
32
  Object.defineProperty(exports, "ThemeEnum", {
29
33
  enumerable: true,
30
- get: function () { return chunkRV2SYFA6_cjs.ThemeEnum; }
34
+ get: function () { return chunkKDEDLC3D_cjs.ThemeEnum; }
31
35
  });
32
36
  Object.defineProperty(exports, "createTheme", {
33
37
  enumerable: true,
34
- get: function () { return chunkRV2SYFA6_cjs.createTheme; }
38
+ get: function () { return chunkKDEDLC3D_cjs.createTheme; }
35
39
  });
36
40
  Object.defineProperty(exports, "cursorInRange", {
37
41
  enumerable: true,
38
- get: function () { return chunkRV2SYFA6_cjs.cursorInRange; }
42
+ get: function () { return chunkKDEDLC3D_cjs.cursorInRange; }
39
43
  });
40
44
  Object.defineProperty(exports, "deepMerge", {
41
45
  enumerable: true,
42
- get: function () { return chunkRV2SYFA6_cjs.deepMerge; }
46
+ get: function () { return chunkKDEDLC3D_cjs.deepMerge; }
43
47
  });
44
48
  Object.defineProperty(exports, "selectionOverlapsRange", {
45
49
  enumerable: true,
46
- get: function () { return chunkRV2SYFA6_cjs.selectionOverlapsRange; }
50
+ get: function () { return chunkKDEDLC3D_cjs.selectionOverlapsRange; }
51
+ });
52
+ Object.defineProperty(exports, "toggleMarkdownStyle", {
53
+ enumerable: true,
54
+ get: function () { return chunkKDEDLC3D_cjs.toggleMarkdownStyle; }
47
55
  });
48
56
  //# sourceMappingURL=index.cjs.map
49
57
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange } from '../draftly-Bxu_H4nw.cjs';
1
+ export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange, t as toggleMarkdownStyle } from '../draftly-BLnx3uGX.cjs';
2
2
  import * as _codemirror_state from '@codemirror/state';
3
3
  import '@codemirror/view';
4
4
  import '@lezer/markdown';
@@ -10,5 +10,6 @@ import 'style-mod';
10
10
  * Note: Layout styles are scoped under .cm-draftly which is added by the view plugin
11
11
  */
12
12
  declare const draftlyBaseTheme: _codemirror_state.Extension;
13
+ declare const markdownResetExtension: _codemirror_state.Extension;
13
14
 
14
- export { draftlyBaseTheme };
15
+ export { draftlyBaseTheme, markdownResetExtension };
@@ -1,4 +1,4 @@
1
- export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange } from '../draftly-Bxu_H4nw.js';
1
+ export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange, t as toggleMarkdownStyle } from '../draftly-BLnx3uGX.js';
2
2
  import * as _codemirror_state from '@codemirror/state';
3
3
  import '@codemirror/view';
4
4
  import '@lezer/markdown';
@@ -10,5 +10,6 @@ import 'style-mod';
10
10
  * Note: Layout styles are scoped under .cm-draftly which is added by the view plugin
11
11
  */
12
12
  declare const draftlyBaseTheme: _codemirror_state.Extension;
13
+ declare const markdownResetExtension: _codemirror_state.Extension;
13
14
 
14
- export { draftlyBaseTheme };
15
+ export { draftlyBaseTheme, markdownResetExtension };
@@ -1,4 +1,4 @@
1
- export { DecorationPlugin, DraftlyPlugin, SyntaxPlugin, draftly, draftlyBaseTheme } from '../chunk-MOG6E2LY.js';
2
- export { ThemeEnum, createTheme, cursorInRange, deepMerge, selectionOverlapsRange } from '../chunk-LCQALOEI.js';
1
+ export { DecorationPlugin, DraftlyPlugin, SyntaxPlugin, draftly, draftlyBaseTheme, markdownResetExtension } from '../chunk-CG4M4TC7.js';
2
+ export { ThemeEnum, createTheme, cursorInRange, deepMerge, selectionOverlapsRange, toggleMarkdownStyle } from '../chunk-DFQYXFOP.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -1,103 +1,135 @@
1
1
  'use strict';
2
2
 
3
- var chunkGA6NYY77_cjs = require('./chunk-GA6NYY77.cjs');
4
- var chunkZDSZRRUY_cjs = require('./chunk-ZDSZRRUY.cjs');
5
- var chunk7Z3SRTPZ_cjs = require('./chunk-7Z3SRTPZ.cjs');
6
- var chunkRV2SYFA6_cjs = require('./chunk-RV2SYFA6.cjs');
3
+ var chunk2B3A3VSQ_cjs = require('./chunk-2B3A3VSQ.cjs');
4
+ var chunk72ZYRGRT_cjs = require('./chunk-72ZYRGRT.cjs');
5
+ var chunkKBQDZ5IW_cjs = require('./chunk-KBQDZ5IW.cjs');
6
+ var chunkKDEDLC3D_cjs = require('./chunk-KDEDLC3D.cjs');
7
7
 
8
8
 
9
9
 
10
+ Object.defineProperty(exports, "CodePlugin", {
11
+ enumerable: true,
12
+ get: function () { return chunk2B3A3VSQ_cjs.CodePlugin; }
13
+ });
14
+ Object.defineProperty(exports, "HRPlugin", {
15
+ enumerable: true,
16
+ get: function () { return chunk2B3A3VSQ_cjs.HRPlugin; }
17
+ });
10
18
  Object.defineProperty(exports, "HTMLPlugin", {
11
19
  enumerable: true,
12
- get: function () { return chunkGA6NYY77_cjs.HTMLPlugin; }
20
+ get: function () { return chunk2B3A3VSQ_cjs.HTMLPlugin; }
13
21
  });
14
22
  Object.defineProperty(exports, "HeadingPlugin", {
15
23
  enumerable: true,
16
- get: function () { return chunkGA6NYY77_cjs.HeadingPlugin; }
24
+ get: function () { return chunk2B3A3VSQ_cjs.HeadingPlugin; }
17
25
  });
18
26
  Object.defineProperty(exports, "ImagePlugin", {
19
27
  enumerable: true,
20
- get: function () { return chunkGA6NYY77_cjs.ImagePlugin; }
28
+ get: function () { return chunk2B3A3VSQ_cjs.ImagePlugin; }
21
29
  });
22
30
  Object.defineProperty(exports, "InlinePlugin", {
23
31
  enumerable: true,
24
- get: function () { return chunkGA6NYY77_cjs.InlinePlugin; }
32
+ get: function () { return chunk2B3A3VSQ_cjs.InlinePlugin; }
33
+ });
34
+ Object.defineProperty(exports, "LinkPlugin", {
35
+ enumerable: true,
36
+ get: function () { return chunk2B3A3VSQ_cjs.LinkPlugin; }
25
37
  });
26
38
  Object.defineProperty(exports, "ListPlugin", {
27
39
  enumerable: true,
28
- get: function () { return chunkGA6NYY77_cjs.ListPlugin; }
40
+ get: function () { return chunk2B3A3VSQ_cjs.ListPlugin; }
29
41
  });
30
42
  Object.defineProperty(exports, "MathPlugin", {
31
43
  enumerable: true,
32
- get: function () { return chunkGA6NYY77_cjs.MathPlugin; }
44
+ get: function () { return chunk2B3A3VSQ_cjs.MathPlugin; }
45
+ });
46
+ Object.defineProperty(exports, "MermaidPlugin", {
47
+ enumerable: true,
48
+ get: function () { return chunk2B3A3VSQ_cjs.MermaidPlugin; }
49
+ });
50
+ Object.defineProperty(exports, "ParagraphPlugin", {
51
+ enumerable: true,
52
+ get: function () { return chunk2B3A3VSQ_cjs.ParagraphPlugin; }
53
+ });
54
+ Object.defineProperty(exports, "QuotePlugin", {
55
+ enumerable: true,
56
+ get: function () { return chunk2B3A3VSQ_cjs.QuotePlugin; }
33
57
  });
34
58
  Object.defineProperty(exports, "allPlugins", {
35
59
  enumerable: true,
36
- get: function () { return chunkGA6NYY77_cjs.allPlugins; }
60
+ get: function () { return chunk2B3A3VSQ_cjs.allPlugins; }
37
61
  });
38
62
  Object.defineProperty(exports, "essentialPlugins", {
39
63
  enumerable: true,
40
- get: function () { return chunkGA6NYY77_cjs.essentialPlugins; }
64
+ get: function () { return chunk2B3A3VSQ_cjs.essentialPlugins; }
41
65
  });
42
66
  Object.defineProperty(exports, "DecorationPlugin", {
43
67
  enumerable: true,
44
- get: function () { return chunkZDSZRRUY_cjs.DecorationPlugin; }
68
+ get: function () { return chunk72ZYRGRT_cjs.DecorationPlugin; }
45
69
  });
46
70
  Object.defineProperty(exports, "DraftlyPlugin", {
47
71
  enumerable: true,
48
- get: function () { return chunkZDSZRRUY_cjs.DraftlyPlugin; }
72
+ get: function () { return chunk72ZYRGRT_cjs.DraftlyPlugin; }
49
73
  });
50
74
  Object.defineProperty(exports, "SyntaxPlugin", {
51
75
  enumerable: true,
52
- get: function () { return chunkZDSZRRUY_cjs.SyntaxPlugin; }
76
+ get: function () { return chunk72ZYRGRT_cjs.SyntaxPlugin; }
53
77
  });
54
78
  Object.defineProperty(exports, "draftly", {
55
79
  enumerable: true,
56
- get: function () { return chunkZDSZRRUY_cjs.draftly; }
80
+ get: function () { return chunk72ZYRGRT_cjs.draftly; }
57
81
  });
58
82
  Object.defineProperty(exports, "draftlyBaseTheme", {
59
83
  enumerable: true,
60
- get: function () { return chunkZDSZRRUY_cjs.draftlyBaseTheme; }
84
+ get: function () { return chunk72ZYRGRT_cjs.draftlyBaseTheme; }
85
+ });
86
+ Object.defineProperty(exports, "markdownResetExtension", {
87
+ enumerable: true,
88
+ get: function () { return chunk72ZYRGRT_cjs.markdownResetExtension; }
61
89
  });
62
90
  Object.defineProperty(exports, "PreviewRenderer", {
63
91
  enumerable: true,
64
- get: function () { return chunk7Z3SRTPZ_cjs.PreviewRenderer; }
92
+ get: function () { return chunkKBQDZ5IW_cjs.PreviewRenderer; }
65
93
  });
66
94
  Object.defineProperty(exports, "defaultRenderers", {
67
95
  enumerable: true,
68
- get: function () { return chunk7Z3SRTPZ_cjs.defaultRenderers; }
96
+ get: function () { return chunkKBQDZ5IW_cjs.defaultRenderers; }
69
97
  });
70
98
  Object.defineProperty(exports, "escapeHtml", {
71
99
  enumerable: true,
72
- get: function () { return chunk7Z3SRTPZ_cjs.escapeHtml; }
100
+ get: function () { return chunkKBQDZ5IW_cjs.escapeHtml; }
73
101
  });
74
102
  Object.defineProperty(exports, "generateCSS", {
75
103
  enumerable: true,
76
- get: function () { return chunk7Z3SRTPZ_cjs.generateCSS; }
104
+ get: function () { return chunkKBQDZ5IW_cjs.generateCSS; }
77
105
  });
78
106
  Object.defineProperty(exports, "preview", {
79
107
  enumerable: true,
80
- get: function () { return chunk7Z3SRTPZ_cjs.preview; }
108
+ get: function () { return chunkKBQDZ5IW_cjs.preview; }
81
109
  });
82
110
  Object.defineProperty(exports, "ThemeEnum", {
83
111
  enumerable: true,
84
- get: function () { return chunkRV2SYFA6_cjs.ThemeEnum; }
112
+ get: function () { return chunkKDEDLC3D_cjs.ThemeEnum; }
85
113
  });
86
114
  Object.defineProperty(exports, "createTheme", {
87
115
  enumerable: true,
88
- get: function () { return chunkRV2SYFA6_cjs.createTheme; }
116
+ get: function () { return chunkKDEDLC3D_cjs.createTheme; }
89
117
  });
90
118
  Object.defineProperty(exports, "cursorInRange", {
91
119
  enumerable: true,
92
- get: function () { return chunkRV2SYFA6_cjs.cursorInRange; }
120
+ get: function () { return chunkKDEDLC3D_cjs.cursorInRange; }
93
121
  });
94
122
  Object.defineProperty(exports, "deepMerge", {
95
123
  enumerable: true,
96
- get: function () { return chunkRV2SYFA6_cjs.deepMerge; }
124
+ get: function () { return chunkKDEDLC3D_cjs.deepMerge; }
97
125
  });
98
126
  Object.defineProperty(exports, "selectionOverlapsRange", {
99
127
  enumerable: true,
100
- get: function () { return chunkRV2SYFA6_cjs.selectionOverlapsRange; }
128
+ get: function () { return chunkKDEDLC3D_cjs.selectionOverlapsRange; }
129
+ });
130
+ Object.defineProperty(exports, "toggleMarkdownStyle", {
131
+ enumerable: true,
132
+ get: function () { return chunkKDEDLC3D_cjs.toggleMarkdownStyle; }
101
133
  });
102
134
  //# sourceMappingURL=index.cjs.map
103
135
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange } from './draftly-Bxu_H4nw.cjs';
2
- export { draftlyBaseTheme } from './editor/index.cjs';
3
- export { HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, ListPlugin, MathPlugin, allPlugins, essentialPlugins } from './plugins/index.cjs';
1
+ export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange, t as toggleMarkdownStyle } from './draftly-BLnx3uGX.cjs';
2
+ export { draftlyBaseTheme, markdownResetExtension } from './editor/index.cjs';
3
+ export { CodePlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, allPlugins, essentialPlugins } from './plugins/index.cjs';
4
4
  export { GenerateCSSConfig, NodeRenderer, NodeRendererMap, PreviewConfig, PreviewContext, PreviewRenderer, defaultRenderers, escapeHtml, generateCSS, preview } from './preview/index.cjs';
5
5
  import '@codemirror/state';
6
6
  import '@codemirror/view';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange } from './draftly-Bxu_H4nw.js';
2
- export { draftlyBaseTheme } from './editor/index.js';
3
- export { HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, ListPlugin, MathPlugin, allPlugins, essentialPlugins } from './plugins/index.js';
1
+ export { D as DecorationContext, a as DecorationPlugin, b as DraftlyConfig, c as DraftlyNode, d as DraftlyPlugin, P as PluginConfig, e as PluginContext, S as SyntaxPlugin, T as ThemeEnum, f as ThemeStyle, g as createTheme, h as cursorInRange, i as deepMerge, j as draftly, s as selectionOverlapsRange, t as toggleMarkdownStyle } from './draftly-BLnx3uGX.js';
2
+ export { draftlyBaseTheme, markdownResetExtension } from './editor/index.js';
3
+ export { CodePlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, allPlugins, essentialPlugins } from './plugins/index.js';
4
4
  export { GenerateCSSConfig, NodeRenderer, NodeRendererMap, PreviewConfig, PreviewContext, PreviewRenderer, defaultRenderers, escapeHtml, generateCSS, preview } from './preview/index.js';
5
5
  import '@codemirror/state';
6
6
  import '@codemirror/view';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, ListPlugin, MathPlugin, allPlugins, essentialPlugins } from './chunk-TKZNKWGF.js';
2
- export { DecorationPlugin, DraftlyPlugin, SyntaxPlugin, draftly, draftlyBaseTheme } from './chunk-MOG6E2LY.js';
3
- export { PreviewRenderer, defaultRenderers, escapeHtml, generateCSS, preview } from './chunk-6LQ2VR4I.js';
4
- export { ThemeEnum, createTheme, cursorInRange, deepMerge, selectionOverlapsRange } from './chunk-LCQALOEI.js';
1
+ export { CodePlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, allPlugins, essentialPlugins } from './chunk-N3WL3XPB.js';
2
+ export { DecorationPlugin, DraftlyPlugin, SyntaxPlugin, draftly, draftlyBaseTheme, markdownResetExtension } from './chunk-CG4M4TC7.js';
3
+ export { PreviewRenderer, defaultRenderers, escapeHtml, generateCSS, preview } from './chunk-HPSMS2WB.js';
4
+ export { ThemeEnum, createTheme, cursorInRange, deepMerge, selectionOverlapsRange, toggleMarkdownStyle } from './chunk-DFQYXFOP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,42 +1,66 @@
1
1
  'use strict';
2
2
 
3
- var chunkGA6NYY77_cjs = require('../chunk-GA6NYY77.cjs');
4
- require('../chunk-ZDSZRRUY.cjs');
5
- require('../chunk-RV2SYFA6.cjs');
3
+ var chunk2B3A3VSQ_cjs = require('../chunk-2B3A3VSQ.cjs');
4
+ require('../chunk-72ZYRGRT.cjs');
5
+ require('../chunk-KDEDLC3D.cjs');
6
6
 
7
7
 
8
8
 
9
+ Object.defineProperty(exports, "CodePlugin", {
10
+ enumerable: true,
11
+ get: function () { return chunk2B3A3VSQ_cjs.CodePlugin; }
12
+ });
13
+ Object.defineProperty(exports, "HRPlugin", {
14
+ enumerable: true,
15
+ get: function () { return chunk2B3A3VSQ_cjs.HRPlugin; }
16
+ });
9
17
  Object.defineProperty(exports, "HTMLPlugin", {
10
18
  enumerable: true,
11
- get: function () { return chunkGA6NYY77_cjs.HTMLPlugin; }
19
+ get: function () { return chunk2B3A3VSQ_cjs.HTMLPlugin; }
12
20
  });
13
21
  Object.defineProperty(exports, "HeadingPlugin", {
14
22
  enumerable: true,
15
- get: function () { return chunkGA6NYY77_cjs.HeadingPlugin; }
23
+ get: function () { return chunk2B3A3VSQ_cjs.HeadingPlugin; }
16
24
  });
17
25
  Object.defineProperty(exports, "ImagePlugin", {
18
26
  enumerable: true,
19
- get: function () { return chunkGA6NYY77_cjs.ImagePlugin; }
27
+ get: function () { return chunk2B3A3VSQ_cjs.ImagePlugin; }
20
28
  });
21
29
  Object.defineProperty(exports, "InlinePlugin", {
22
30
  enumerable: true,
23
- get: function () { return chunkGA6NYY77_cjs.InlinePlugin; }
31
+ get: function () { return chunk2B3A3VSQ_cjs.InlinePlugin; }
32
+ });
33
+ Object.defineProperty(exports, "LinkPlugin", {
34
+ enumerable: true,
35
+ get: function () { return chunk2B3A3VSQ_cjs.LinkPlugin; }
24
36
  });
25
37
  Object.defineProperty(exports, "ListPlugin", {
26
38
  enumerable: true,
27
- get: function () { return chunkGA6NYY77_cjs.ListPlugin; }
39
+ get: function () { return chunk2B3A3VSQ_cjs.ListPlugin; }
28
40
  });
29
41
  Object.defineProperty(exports, "MathPlugin", {
30
42
  enumerable: true,
31
- get: function () { return chunkGA6NYY77_cjs.MathPlugin; }
43
+ get: function () { return chunk2B3A3VSQ_cjs.MathPlugin; }
44
+ });
45
+ Object.defineProperty(exports, "MermaidPlugin", {
46
+ enumerable: true,
47
+ get: function () { return chunk2B3A3VSQ_cjs.MermaidPlugin; }
48
+ });
49
+ Object.defineProperty(exports, "ParagraphPlugin", {
50
+ enumerable: true,
51
+ get: function () { return chunk2B3A3VSQ_cjs.ParagraphPlugin; }
52
+ });
53
+ Object.defineProperty(exports, "QuotePlugin", {
54
+ enumerable: true,
55
+ get: function () { return chunk2B3A3VSQ_cjs.QuotePlugin; }
32
56
  });
33
57
  Object.defineProperty(exports, "allPlugins", {
34
58
  enumerable: true,
35
- get: function () { return chunkGA6NYY77_cjs.allPlugins; }
59
+ get: function () { return chunk2B3A3VSQ_cjs.allPlugins; }
36
60
  });
37
61
  Object.defineProperty(exports, "essentialPlugins", {
38
62
  enumerable: true,
39
- get: function () { return chunkGA6NYY77_cjs.essentialPlugins; }
63
+ get: function () { return chunk2B3A3VSQ_cjs.essentialPlugins; }
40
64
  });
41
65
  //# sourceMappingURL=index.cjs.map
42
66
  //# sourceMappingURL=index.cjs.map