markdown-wysiwyg-editor 0.1.0

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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +204 -0
  3. package/dist/components/LinkContextMenu.d.ts +21 -0
  4. package/dist/components/LinkContextMenu.d.ts.map +1 -0
  5. package/dist/components/MarkdownEditor.d.ts +4 -0
  6. package/dist/components/MarkdownEditor.d.ts.map +1 -0
  7. package/dist/components/MarkdownEditor.test.d.ts +2 -0
  8. package/dist/components/MarkdownEditor.test.d.ts.map +1 -0
  9. package/dist/components/MarkdownSyntaxStatus.d.ts +9 -0
  10. package/dist/components/MarkdownSyntaxStatus.d.ts.map +1 -0
  11. package/dist/components/MarkdownToolbar.d.ts +15 -0
  12. package/dist/components/MarkdownToolbar.d.ts.map +1 -0
  13. package/dist/components/TableContextMenu.d.ts +18 -0
  14. package/dist/components/TableContextMenu.d.ts.map +1 -0
  15. package/dist/components/TableEdgeControls.d.ts +11 -0
  16. package/dist/components/TableEdgeControls.d.ts.map +1 -0
  17. package/dist/components/TableToolbar.d.ts +13 -0
  18. package/dist/components/TableToolbar.d.ts.map +1 -0
  19. package/dist/constants/editor.d.ts +4 -0
  20. package/dist/constants/editor.d.ts.map +1 -0
  21. package/dist/converters/JsonToMarkdownConverter.d.ts +65 -0
  22. package/dist/converters/JsonToMarkdownConverter.d.ts.map +1 -0
  23. package/dist/converters/MarkdownTipTapConverter.d.ts +28 -0
  24. package/dist/converters/MarkdownTipTapConverter.d.ts.map +1 -0
  25. package/dist/extensions/CodeBlockNodeView.d.ts +3 -0
  26. package/dist/extensions/CodeBlockNodeView.d.ts.map +1 -0
  27. package/dist/extensions/CustomCodeBlock.d.ts +2 -0
  28. package/dist/extensions/CustomCodeBlock.d.ts.map +1 -0
  29. package/dist/extensions/LinkClickExtension.d.ts +7 -0
  30. package/dist/extensions/LinkClickExtension.d.ts.map +1 -0
  31. package/dist/extensions/MarkdownPasteExtension.d.ts +6 -0
  32. package/dist/extensions/MarkdownPasteExtension.d.ts.map +1 -0
  33. package/dist/extensions/MarkdownShortcutsExtension.d.ts +3 -0
  34. package/dist/extensions/MarkdownShortcutsExtension.d.ts.map +1 -0
  35. package/dist/extensions/TableForceExtension.d.ts +7 -0
  36. package/dist/extensions/TableForceExtension.d.ts.map +1 -0
  37. package/dist/extensions/TableHoverExtension.d.ts +7 -0
  38. package/dist/extensions/TableHoverExtension.d.ts.map +1 -0
  39. package/dist/extensions/TableResizeEnhancement.d.ts +7 -0
  40. package/dist/extensions/TableResizeEnhancement.d.ts.map +1 -0
  41. package/dist/extensions/TableRightClickExtension.d.ts +4 -0
  42. package/dist/extensions/TableRightClickExtension.d.ts.map +1 -0
  43. package/dist/hooks/useEditorState.d.ts +14 -0
  44. package/dist/hooks/useEditorState.d.ts.map +1 -0
  45. package/dist/hooks/useTableToolbar.d.ts +13 -0
  46. package/dist/hooks/useTableToolbar.d.ts.map +1 -0
  47. package/dist/index.css +1 -0
  48. package/dist/index.d.ts +19 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +37164 -0
  51. package/dist/index.js.map +1 -0
  52. package/dist/types/editor.d.ts +6 -0
  53. package/dist/types/editor.d.ts.map +1 -0
  54. package/dist/types/index.d.ts +81 -0
  55. package/dist/types/index.d.ts.map +1 -0
  56. package/dist/utils/logger.d.ts +13 -0
  57. package/dist/utils/logger.d.ts.map +1 -0
  58. package/dist/utils/pasteHandler.d.ts +18 -0
  59. package/dist/utils/pasteHandler.d.ts.map +1 -0
  60. package/dist/utils/security.d.ts +3 -0
  61. package/dist/utils/security.d.ts.map +1 -0
  62. package/dist/utils/selectionUtils.d.ts +21 -0
  63. package/dist/utils/selectionUtils.d.ts.map +1 -0
  64. package/package.json +99 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # @markdown-wysiwyg/editor
2
+
3
+ Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
4
+
5
+ ---
6
+
7
+ ## English
8
+
9
+ ### Features
10
+
11
+ - Rich text editing with Markdown syntax
12
+ - Code blocks with syntax highlighting (19 languages)
13
+ - Table editing with context menu and resize controls
14
+ - Optional Mermaid diagram support
15
+ - Optional image insertion
16
+ - Bidirectional Markdown conversion
17
+ - Link context menu
18
+ - TypeScript support
19
+
20
+ ### Installation
21
+
22
+ This editor is a React component targeting **React 18+ / ReactDOM 18+**.
23
+
24
+ ```bash
25
+ pnpm add react react-dom @markdown-wysiwyg/editor
26
+ ```
27
+
28
+ ### Quick Start
29
+
30
+ ```tsx
31
+ import { useState } from 'react';
32
+ import { MarkdownEditor } from '@markdown-wysiwyg/editor';
33
+ import '@markdown-wysiwyg/editor/style.css';
34
+
35
+ function App() {
36
+ const [content, setContent] = useState('');
37
+
38
+ return <MarkdownEditor value={content} onChange={setContent} />;
39
+ }
40
+ ```
41
+
42
+ #### With Mermaid
43
+
44
+ ```tsx
45
+ import { useState } from 'react';
46
+ import mermaid from 'mermaid';
47
+ import { MarkdownEditor } from '@markdown-wysiwyg/editor';
48
+ import '@markdown-wysiwyg/editor/style.css';
49
+
50
+ mermaid.initialize({ startOnLoad: false });
51
+
52
+ function App() {
53
+ const [content, setContent] = useState('');
54
+
55
+ return (
56
+ <MarkdownEditor
57
+ value={content}
58
+ onChange={setContent}
59
+ enableMermaid
60
+ mermaidLib={mermaid}
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ #### Disable Features
67
+
68
+ ```tsx
69
+ <MarkdownEditor
70
+ value={content}
71
+ onChange={setContent}
72
+ enableImage={false}
73
+ enableTable={false}
74
+ />
75
+ ```
76
+
77
+ ### API (Props)
78
+
79
+ | Prop | Type | Default | Description |
80
+ | -------------- | -------------------------- | ------------------- | ----------------------------------------------------- |
81
+ | `value` | `string` | - | Markdown content (required) |
82
+ | `onChange` | `(value: string) => void` | - | Change handler (required) |
83
+ | `editable` | `boolean` | `true` | Enable editing |
84
+ | `placeholder` | `string` | `'Start typing...'` | Placeholder text |
85
+ | `enableMermaid`| `boolean` | `false` | Enable Mermaid diagrams |
86
+ | `enableImage` | `boolean` | `true` | Enable image insertion |
87
+ | `enableTable` | `boolean` | `true` | Enable table editing |
88
+ | `enableCodeBlock` | `boolean` | `true` | Enable code blocks |
89
+ | `enableLink` | `boolean` | `true` | Enable links |
90
+ | `mermaidLib` | `typeof mermaid` | - | Mermaid instance (required if `enableMermaid=true`) |
91
+ | `className` | `string` | - | Additional CSS class |
92
+ | `style` | `React.CSSProperties` | - | Inline styles |
93
+ | `onBlur` | `() => void` | - | Blur event handler |
94
+ | `onFocus` | `() => void` | - | Focus event handler |
95
+ | `extensions` | `Extension[]` | - | Custom TipTap extensions |
96
+
97
+ ### Supported Languages (Code Blocks)
98
+
99
+ - JavaScript / TypeScript
100
+ - Python
101
+ - Java
102
+ - Go
103
+ - Rust
104
+ - PHP
105
+ - HTML / CSS
106
+ - SQL
107
+ - Bash / Shell (sh, zsh, tcsh)
108
+ - JSON / YAML / XML
109
+ - Mermaid (if enabled)
110
+
111
+ ### Bundle Size (rough guideline)
112
+
113
+ - Without Mermaid: ~150KB (gzipped)
114
+ - With Mermaid: +2.5MB
115
+
116
+ Consider your app's performance and whether you really need Mermaid.
117
+
118
+ ### Limitations / Notes
119
+
120
+ - Focused on **Markdown-based WYSIWYG**. It is not a full block editor like Notion.
121
+ - Styling assumes a relatively neutral, Tailwind-friendly base; you are expected to adapt it to your design system.
122
+ - TipTap / Mermaid and other internals may receive major updates; this library will follow with its own major bumps.
123
+
124
+ ### Browser Support
125
+
126
+ - Chrome / Edge: latest 2 versions
127
+ - Firefox: latest 2 versions
128
+ - Safari: latest 2 versions
129
+ - Mobile: iOS Safari 15+, Chrome Android
130
+
131
+ ### Advanced Usage
132
+
133
+ #### Custom Toolbar
134
+
135
+ You can hide the built-in toolbar and provide your own UI:
136
+
137
+ ```tsx
138
+ <MarkdownEditor
139
+ value={content}
140
+ onChange={setContent}
141
+ showToolbar={false}
142
+ />
143
+ ```
144
+
145
+ #### Custom Extensions
146
+
147
+ You can inject TipTap extensions directly:
148
+
149
+ ```tsx
150
+ import TextAlign from '@tiptap/extension-text-align';
151
+
152
+ <MarkdownEditor
153
+ value={content}
154
+ onChange={setContent}
155
+ extensions={[
156
+ TextAlign.configure({
157
+ types: ['heading', 'paragraph'],
158
+ }),
159
+ ]}
160
+ />
161
+ ```
162
+
163
+ ### Troubleshooting
164
+
165
+ #### Styles not loading
166
+
167
+ ```tsx
168
+ import '@markdown-wysiwyg/editor/style.css';
169
+ ```
170
+
171
+ Ensure the CSS is imported in your app entry.
172
+
173
+ #### "ReferenceError: global is not defined"
174
+
175
+ With some Vite setups you may need:
176
+
177
+ ```ts
178
+ define: {
179
+ global: 'window',
180
+ },
181
+ ```
182
+
183
+ ### Development
184
+
185
+ ```bash
186
+ pnpm install
187
+ pnpm dev
188
+ pnpm build
189
+ pnpm test
190
+ pnpm lint
191
+ ```
192
+
193
+ ### License
194
+
195
+ MIT
196
+
197
+ ### Credits
198
+
199
+ Built with:
200
+
201
+ - [TipTap](https://tiptap.dev/)
202
+ - [Lowlight](https://github.com/wooorm/lowlight)
203
+ - [Lucide](https://lucide.dev/) for icons
204
+ - [Mermaid](https://mermaid.js.org/)
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ interface LinkContextMenuProps {
3
+ visible: boolean;
4
+ position: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ linkData: {
9
+ href: string;
10
+ text: string;
11
+ } | null;
12
+ onClose: () => void;
13
+ onOpenLink: (href: string) => void;
14
+ onEditLink: (linkData: {
15
+ href: string;
16
+ text: string;
17
+ }) => void;
18
+ }
19
+ export declare const LinkContextMenu: React.FC<LinkContextMenuProps>;
20
+ export {};
21
+ //# sourceMappingURL=LinkContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/LinkContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,IAAI,CAAC;IACT,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,CAAC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwM1D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { IMarkdownEditorProps } from '../types/index';
3
+ export declare const MarkdownEditor: React.FC<IMarkdownEditorProps>;
4
+ //# sourceMappingURL=MarkdownEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAsChE,OAAO,8BAA8B,CAAC;AAItC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAatD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAguBzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MarkdownEditor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownEditor.test.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditor.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { ISelectionInfo } from '../utils/selectionUtils';
3
+ interface IMarkdownSyntaxStatusProps {
4
+ selectionInfo: ISelectionInfo | null;
5
+ className?: string;
6
+ }
7
+ export declare const MarkdownSyntaxStatus: React.FC<IMarkdownSyntaxStatusProps>;
8
+ export {};
9
+ //# sourceMappingURL=MarkdownSyntaxStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownSyntaxStatus.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownSyntaxStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,UAAU,0BAA0B;IAClC,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAsDrE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ interface MarkdownToolbarProps {
4
+ onInsertMarkdown: (markdown: string, cursorOffset?: number) => void;
5
+ onShowHelp: () => void;
6
+ onImageUploadComplete?: (markdownImageUrl: string) => void;
7
+ disabled?: boolean;
8
+ selectedText?: string;
9
+ editor?: Editor | null;
10
+ showDownloadButton?: boolean;
11
+ onDownloadAsMarkdown?: () => void;
12
+ }
13
+ export declare const MarkdownToolbar: React.FC<MarkdownToolbarProps>;
14
+ export {};
15
+ //# sourceMappingURL=MarkdownToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownToolbar.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownToolbar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAqBvC,UAAU,oBAAoB;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,qBAAqB,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqhB1D,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export interface ITableContextMenuProps {
3
+ isVisible: boolean;
4
+ position: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ onClose: () => void;
9
+ onAddRowAbove: () => void;
10
+ onAddRowBelow: () => void;
11
+ onAddColumnBefore: () => void;
12
+ onAddColumnAfter: () => void;
13
+ onDeleteRow: () => void;
14
+ onDeleteColumn: () => void;
15
+ onDeleteTable: () => void;
16
+ }
17
+ export declare const TableContextMenu: React.FC<ITableContextMenuProps>;
18
+ //# sourceMappingURL=TableContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/TableContextMenu.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4H7D,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ export interface ITableEdgeControlsProps {
4
+ editor: Editor | null;
5
+ }
6
+ /**
7
+ * TableEdgeControls - Control elements displayed around tables using React Portal
8
+ * Uses React Portal to show row/column add buttons outside of the table
9
+ */
10
+ export declare const TableEdgeControls: React.FC<ITableEdgeControlsProps>;
11
+ //# sourceMappingURL=TableEdgeControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableEdgeControls.d.ts","sourceRoot":"","sources":["../../src/components/TableEdgeControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,yBAAyB,CAAC;AAGjC,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8G/D,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ interface ITableToolbarProps {
4
+ editor: Editor;
5
+ visible: boolean;
6
+ position: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ }
11
+ export declare const TableToolbar: React.FC<ITableToolbarProps>;
12
+ export default TableToolbar;
13
+ //# sourceMappingURL=TableToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../../src/components/TableToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,yBAAyB,CAAC;AAOjC,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyTrD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const PASTE_DEBOUNCE_MS = 500;
2
+ export declare const LARGE_TEXT_THRESHOLD = 10000;
3
+ export declare const UPDATE_LOCK_RELEASE_MS = 150;
4
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/constants/editor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAC1C,eAAO,MAAM,sBAAsB,MAAM,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { JSONContent } from '@tiptap/react';
2
+ export declare class JsonToMarkdownConverter {
3
+ /**
4
+ * TipTap JSON構造をMarkdownテキストに変換
5
+ */
6
+ static convertToMarkdown(json: JSONContent): string;
7
+ /**
8
+ * ノード配列を処理してMarkdownテキストを生成
9
+ */
10
+ private static processNodes;
11
+ /**
12
+ * 単一ノードを処理してMarkdownテキストを生成
13
+ */
14
+ private static processNode;
15
+ /**
16
+ * 段落の処理
17
+ */
18
+ private static processParagraph;
19
+ /**
20
+ * 見出しの処理
21
+ */
22
+ private static processHeading;
23
+ /**
24
+ * 箇条書きリストの処理
25
+ */
26
+ private static processBulletList;
27
+ /**
28
+ * 番号付きリストの処理
29
+ */
30
+ private static processOrderedList;
31
+ /**
32
+ * リストアイテムの処理
33
+ */
34
+ private static processListItem;
35
+ /**
36
+ * 引用の処理
37
+ */
38
+ private static processBlockquote;
39
+ /**
40
+ * コードブロックの処理
41
+ */
42
+ private static processCodeBlock;
43
+ /**
44
+ * テーブルの処理
45
+ */
46
+ private static processTable;
47
+ /**
48
+ * テーブル行の処理
49
+ */
50
+ private static processTableRow;
51
+ /**
52
+ * テーブルセルの処理
53
+ */
54
+ private static processTableCell;
55
+ /**
56
+ * テキストの処理(マークアップ適用)
57
+ */
58
+ private static processText;
59
+ /**
60
+ * Markdownファイルとしてダウンロード
61
+ */
62
+ static downloadAsMarkdown(json: JSONContent, filename?: string): void;
63
+ }
64
+ export default JsonToMarkdownConverter;
65
+ //# sourceMappingURL=JsonToMarkdownConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonToMarkdownConverter.d.ts","sourceRoot":"","sources":["../../src/converters/JsonToMarkdownConverter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,qBAAa,uBAAuB;IAClC;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAQnD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAoD1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAK/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAO7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAKhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAKjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAM9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAShC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAM/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAsB3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAa9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA+B1B;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,GAAE,MAAsB,GAAG,IAAI;CA4BrF;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { JSONContent } from '@tiptap/core';
2
+ import { Editor } from '@tiptap/react';
3
+ /**
4
+ * メイン変換クラス
5
+ */
6
+ export declare class MarkdownTipTapConverter {
7
+ /**
8
+ * MarkdownがMarkdown構文を含むかチェック
9
+ */
10
+ static isMarkdownText(text: string): boolean;
11
+ /**
12
+ * MarkdownをTipTap JSON形式に変換
13
+ */
14
+ static markdownToTipTapJson(markdown: string): Promise<JSONContent>;
15
+ private static buildTableNode;
16
+ /**
17
+ * TipTap JSONをMarkdownに変換(逆変換)
18
+ */
19
+ static tipTapJsonToMarkdown(json: JSONContent): string;
20
+ private static nodeToMarkdown;
21
+ private static contentToText;
22
+ private static tableToMarkdown;
23
+ /**
24
+ * チャンク処理(エディター用)
25
+ */
26
+ static processMarkdownInSmallChunksWithRender(markdown: string, editor: Editor, onChunkProcessed?: (processed: number, total: number) => void): Promise<void>;
27
+ }
28
+ //# sourceMappingURL=MarkdownTipTapConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownTipTapConverter.d.ts","sourceRoot":"","sources":["../../src/converters/MarkdownTipTapConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAue5C;;GAEG;AACH,qBAAa,uBAAuB;IAClC;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI5C;;OAEG;WACU,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAiDzE,OAAO,CAAC,MAAM,CAAC,cAAc;IA4B7B;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAMtD,OAAO,CAAC,MAAM,CAAC,cAAc;IA0C7B,OAAO,CAAC,MAAM,CAAC,aAAa;IA4C5B,OAAO,CAAC,MAAM,CAAC,eAAe;IAwB9B;;OAEG;WACU,sCAAsC,CACjD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAC5D,OAAO,CAAC,IAAI,CAAC;CAWjB"}
@@ -0,0 +1,3 @@
1
+ import { NodeViewProps } from '@tiptap/core';
2
+ export declare const CodeBlockNodeView: ({ node, selected, editor, updateAttributes, deleteNode }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=CodeBlockNodeView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlockNodeView.d.ts","sourceRoot":"","sources":["../../src/extensions/CodeBlockNodeView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAkF7C,eAAO,MAAM,iBAAiB,GAAI,0DAA0D,aAAa,4CAWxG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const CustomCodeBlock: import('@tiptap/core').Node<import('@tiptap/extension-code-block-lowlight').CodeBlockLowlightOptions, any>;
2
+ //# sourceMappingURL=CustomCodeBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomCodeBlock.d.ts","sourceRoot":"","sources":["../../src/extensions/CustomCodeBlock.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,4GAI1B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { default as React } from 'react';
3
+ export declare const createLinkClickExtension: (handleContextMenu: (event: React.MouseEvent, linkData: {
4
+ href: string;
5
+ text: string;
6
+ }) => void) => Extension<any, any>;
7
+ //# sourceMappingURL=LinkClickExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkClickExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/LinkClickExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,wBAAwB,GACnC,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,wBA0D9F,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export declare const createMarkdownPasteExtension: (setIsProcessing: (processing: boolean) => void, setProcessingProgress: (progress: {
3
+ processed: number;
4
+ total: number;
5
+ }) => void) => Extension<any, any>;
6
+ //# sourceMappingURL=MarkdownPasteExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownPasteExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/MarkdownPasteExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,eAAO,MAAM,4BAA4B,GACvC,iBAAiB,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,EAC9C,uBAAuB,CAAC,QAAQ,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,wBAkFhF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export declare const createMarkdownShortcutsExtension: () => Extension<any, any>;
3
+ //# sourceMappingURL=MarkdownShortcutsExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownShortcutsExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/MarkdownShortcutsExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,gCAAgC,2BAO3C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ /**
3
+ * TableForceExtension - 強制的にリサイズハンドルを生成・表示
4
+ * TipTap Tableが正常に動作しない場合の緊急対応
5
+ */
6
+ export declare const TableForceExtension: Extension<any, any>;
7
+ //# sourceMappingURL=TableForceExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableForceExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/TableForceExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,qBAiH9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ /**
3
+ * TableHoverExtension - テーブルセルのホバー効果を統一管理
4
+ * TipTapと協調動作し、既存機能を妨げないように設計
5
+ */
6
+ export declare const TableHoverExtension: Extension<any, any>;
7
+ //# sourceMappingURL=TableHoverExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHoverExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/TableHoverExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,qBA8C9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ /**
3
+ * TableResizeEnhancement - TipTap純正リサイズ機能の体験向上
4
+ * スムーズアニメーションとビジュアルフィードバックを提供
5
+ */
6
+ export declare const TableResizeEnhancement: Extension<any, any>;
7
+ //# sourceMappingURL=TableResizeEnhancement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableResizeEnhancement.d.ts","sourceRoot":"","sources":["../../src/extensions/TableResizeEnhancement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC;;;GAGG;AACH,eAAO,MAAM,sBAAsB,qBA0BjC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { default as React } from 'react';
3
+ export declare const createTableRightClickExtension: (handleContextMenu: (event: React.MouseEvent) => void) => Extension<any, any>;
4
+ //# sourceMappingURL=TableRightClickExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableRightClickExtension.d.ts","sourceRoot":"","sources":["../../src/extensions/TableRightClickExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,8BAA8B,GACzC,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,wBA2BpD,CAAC"}
@@ -0,0 +1,14 @@
1
+ interface ProcessingProgress {
2
+ processed: number;
3
+ total: number;
4
+ }
5
+ export declare const useEditorState: () => {
6
+ readonly isUpdating: boolean;
7
+ readonly setIsUpdating: import('react').Dispatch<import('react').SetStateAction<boolean>>;
8
+ readonly isProcessing: boolean;
9
+ readonly setIsProcessing: import('react').Dispatch<import('react').SetStateAction<boolean>>;
10
+ readonly processingProgress: ProcessingProgress;
11
+ readonly setProcessingProgress: import('react').Dispatch<import('react').SetStateAction<ProcessingProgress>>;
12
+ };
13
+ export {};
14
+ //# sourceMappingURL=useEditorState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditorState.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorState.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc;;;;;;;CAgB1B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare const useTableToolbar: (editor: Editor | null) => {
3
+ visible: boolean;
4
+ position: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ tableElement: HTMLTableElement | null;
9
+ showToolbar: (tableElement: HTMLTableElement) => void;
10
+ hideToolbar: () => void;
11
+ checkTableSelection: () => void;
12
+ };
13
+ //# sourceMappingURL=useTableToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableToolbar.d.ts","sourceRoot":"","sources":["../../src/hooks/useTableToolbar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAWvC,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,GAAG,IAAI;;;WAJpC,MAAM;WAAK,MAAM;;;gCA0Be,gBAAgB;;;CA0KhE,CAAC"}
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .mw-editor{border:1px solid #d1d5db;border-radius:.375rem;box-shadow:0 1px 2px #0000000d;display:flex;flex-direction:column;position:relative}.mw-editor-scrollable{height:100%}.mw-editor-auto-height{min-height:fit-content}.mw-editor-loading{display:flex;align-items:center;justify-content:center;height:16rem;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.375rem}.mw-editor-loading-text{color:#6b7280}.mw-processing-indicator{position:absolute;top:.5rem;right:.5rem;z-index:50}.mw-processing-card{background-color:#fff;border:1px solid #e5e7eb;border-radius:.5rem;box-shadow:0 10px 15px -3px #0000001a;padding:.75rem;display:flex;align-items:center;gap:.5rem;min-width:12rem}.mw-processing-spinner{animation:spin 1s linear infinite;border-radius:9999px;height:1rem;width:1rem;border-bottom:2px solid #3b82f6}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mw-processing-text{font-size:.75rem}.mw-processing-title{font-weight:500;color:#374151}.mw-processing-status{color:#6b7280}.mw-processing-progress-bar{width:100%;background-color:#e5e7eb;border-radius:9999px;height:.25rem;margin-top:.25rem}.mw-processing-progress-fill{background-color:#3b82f6;height:.25rem;border-radius:9999px;transition:all .3s}.ProseMirror{font-family:Meiryo,メイリオ,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;line-height:1.625!important;font-size:1rem!important;min-height:100%!important;width:100%!important;cursor:text;outline:none;padding:1rem}.mw-editor-auto-height .ProseMirror{min-height:auto!important}.ProseMirror h1{font-size:1.5rem;font-weight:600;color:#111827;border-bottom:1px solid #e5e7eb;padding-bottom:.5rem;margin-top:1.5rem;margin-bottom:1rem}.ProseMirror h2{font-size:1.25rem;font-weight:600;color:#111827;border-bottom:1px solid #f3f4f6;padding-bottom:.25rem;margin-top:1.25rem;margin-bottom:.75rem}.ProseMirror h3{font-size:1.125rem;font-weight:600;color:#111827;margin-top:1rem;margin-bottom:.5rem}.ProseMirror p{color:#374151;line-height:1.625;margin-bottom:.75rem}.ProseMirror strong{color:#111827;font-weight:600}.ProseMirror em{color:#1f2937}.ProseMirror code{background-color:#e5e7eb!important;color:#111827!important;padding:.125rem .375rem!important;border-radius:.25rem!important;border:1px solid rgb(209 213 219)!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace!important;font-size:.875rem}.ProseMirror ul{list-style-type:none!important;padding-left:0!important;margin:.75rem 0}.ProseMirror ol{list-style-type:decimal;padding-left:1.5rem;margin:.75rem 0}.ProseMirror li{position:relative!important;padding-left:1.5rem!important;color:#374151;margin-bottom:.25rem}.ProseMirror ul li:before{content:"•"!important;position:absolute!important;left:0!important;color:#6b7280!important}.ProseMirror blockquote{border-left:4px solid rgb(209 213 219)!important;padding-left:1rem!important;padding-top:.75rem!important;padding-bottom:.75rem!important;background-color:#f9fafb!important;border-top-right-radius:.375rem!important;border-bottom-right-radius:.375rem!important;margin:.75rem 0!important;color:#4b5563;font-style:italic}.ProseMirror a{color:#2563eb;text-decoration:underline;word-break:break-words}.ProseMirror a:hover{color:#1e40af}.ProseMirror hr{border:none;border-top:1px solid #d1d5db;margin:1.5rem 0}.ProseMirror img{max-width:100%;height:auto;border-radius:.5rem;box-shadow:0 1px 3px #0000001a;border:1px solid #e5e7eb;margin:.5rem 0}.ProseMirror table{border-collapse:collapse;width:100%;margin:1rem 0}.ProseMirror th{border:1px solid #d1d5db;background-color:#f9fafb;padding:.75rem;text-align:left;font-weight:600;color:#111827}.ProseMirror td{border:1px solid #d1d5db;padding:.75rem;color:#374151}.tiptap-table-enhanced .tableWrapper{position:relative!important;overflow-x:auto}.table-cell-hover{background-color:#3b82f60d!important}.markdown-editor-content{flex:1;overflow-y:auto;position:relative}.markdown-editor-content-auto-height{min-height:fit-content;overflow:visible}.markdown-editor-content-scrollable{height:100%;overflow-y:auto}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.space-x-2>*+*{margin-left:.5rem}.relative{position:relative}.absolute{position:absolute}.border{border-width:1px}.border-gray-200{border-color:#e5e7eb}.border-gray-300{border-color:#d1d5db}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.shadow-sm{box-shadow:0 1px 2px #0000000d}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a}.bg-white{background-color:#fff}.bg-gray-50{background-color:#f9fafb}.bg-gray-200{background-color:#e5e7eb}.bg-blue-500{background-color:#3b82f6}.text-gray-500{color:#6b7280}.text-gray-700{color:#374151}.text-xs{font-size:.75rem}.font-medium{font-weight:500}.p-3{padding:.75rem}.top-2{top:.5rem}.right-2{right:.5rem}.z-50{z-index:50}.h-4{height:1rem}.w-4{width:1rem}.h-1{height:.25rem}.w-full{width:100%}.min-w-48{min-width:12rem}.mt-1{margin-top:.25rem}.h-full{height:100%}.min-h-fit{min-height:fit-content}.h-64{height:16rem}.animate-spin{animation:spin 1s linear infinite}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.rounded-full{border-radius:9999px}.border-b-2{border-bottom-width:2px}.ProseMirror{font-family:Meiryo,メイリオ,sans-serif!important;line-height:1.625!important;font-size:1rem!important;min-height:100%!important;width:100%!important;cursor:text}.markdown-editor-content.markdown-editor-autoheight .ProseMirror{min-height:auto!important}.markdown-editor-content .ProseMirror,.ProseMirror p,.ProseMirror li,.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6,.ProseMirror blockquote{cursor:text}.ProseMirror:empty:before{content:attr(data-placeholder);float:left;color:#aaa;pointer-events:none;height:0}.ProseMirror pre{background-color:#334155!important;color:#e5e7eb!important;border:1px solid rgb(100 116 139)!important;border-radius:.5rem!important;padding:1rem!important;margin:.75rem 0!important;overflow-x:auto!important;max-width:80ch!important;width:100%!important;white-space:pre!important}.ProseMirror pre code{background-color:transparent!important;color:#e5e7eb!important;padding:0!important;border:none!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace!important;font-size:.875rem!important;line-height:1.625!important;white-space:pre!important;display:block!important}.ProseMirror ul{list-style-type:none!important;padding-left:0!important}.ProseMirror li{position:relative!important;padding-left:1.5rem!important}.ProseMirror li:before{content:"•"!important;position:absolute!important;left:0!important;color:#6b7280!important}.ProseMirror blockquote{border-left:4px solid rgb(209 213 219)!important;padding-left:1rem!important;padding-top:.75rem!important;padding-bottom:.75rem!important;background-color:#f9fafb!important;border-top-right-radius:.375rem!important;border-bottom-right-radius:.375rem!important;margin:.75rem 0!important}.ProseMirror code{background-color:#e5e7eb!important;color:#111827!important;padding:.125rem .375rem!important;border-radius:.25rem!important;border:1px solid rgb(209 213 219)!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace!important}.tiptap-table-enhanced .tableWrapper{position:relative!important}.tiptap-table-enhanced .resize-cursor{cursor:col-resize!important;border-right:2px solid #3b82f6!important;background:#3b82f61a!important}.tiptap-table-enhanced th:hover,.tiptap-table-enhanced td:hover{background-color:#3b82f60d!important;transition:background-color .2s ease!important}.tiptap-table-enhanced table{border-collapse:separate!important;border-spacing:0!important;max-width:800px!important;width:auto!important}