markdown-wysiwyg-editor 0.2.4 → 0.2.6

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 (79) hide show
  1. package/README.md +143 -67
  2. package/dist/components/EditorChrome.d.ts +25 -0
  3. package/dist/components/EditorChrome.d.ts.map +1 -0
  4. package/dist/components/EmojiPicker.d.ts +1 -1
  5. package/dist/components/EmojiPicker.d.ts.map +1 -1
  6. package/dist/components/ImagePicker.d.ts +1 -1
  7. package/dist/components/ImagePicker.d.ts.map +1 -1
  8. package/dist/components/LinkContextMenu.d.ts +8 -1
  9. package/dist/components/LinkContextMenu.d.ts.map +1 -1
  10. package/dist/components/MarkdownEditor.d.ts +2 -2
  11. package/dist/components/MarkdownEditor.d.ts.map +1 -1
  12. package/dist/components/MarkdownSyntaxStatus.d.ts +2 -2
  13. package/dist/components/MarkdownToolbar.d.ts +7 -2
  14. package/dist/components/MarkdownToolbar.d.ts.map +1 -1
  15. package/dist/components/TableContextMenu.d.ts +4 -1
  16. package/dist/components/TableEdgeControls.d.ts +3 -2
  17. package/dist/components/TableToolbar.d.ts +3 -2
  18. package/dist/components/toolbar/DownloadMenu.d.ts +13 -0
  19. package/dist/components/toolbar/DownloadMenu.d.ts.map +1 -0
  20. package/dist/components/toolbar/HeadingMenu.d.ts +13 -0
  21. package/dist/components/toolbar/HeadingMenu.d.ts.map +1 -0
  22. package/dist/components/toolbar/LinkModal.d.ts +12 -0
  23. package/dist/components/toolbar/LinkModal.d.ts.map +1 -0
  24. package/dist/components/toolbar/ToolbarButton.d.ts +11 -0
  25. package/dist/components/toolbar/ToolbarButton.d.ts.map +1 -0
  26. package/dist/components/ui/icons.d.ts +30 -0
  27. package/dist/components/ui/icons.d.ts.map +1 -0
  28. package/dist/constants/emojiData.d.ts +1 -1
  29. package/dist/converters/JsonToMarkdownConverter.d.ts +5 -2
  30. package/dist/converters/JsonToMarkdownConverter.d.ts.map +1 -1
  31. package/dist/converters/MarkdownTipTapConverter.d.ts +13 -7
  32. package/dist/converters/MarkdownTipTapConverter.d.ts.map +1 -1
  33. package/dist/converters/markdown/BlockExtractor.d.ts +20 -0
  34. package/dist/converters/markdown/BlockExtractor.d.ts.map +1 -0
  35. package/dist/converters/markdown/BlockParser.d.ts +9 -0
  36. package/dist/converters/markdown/BlockParser.d.ts.map +1 -0
  37. package/dist/converters/markdown/InlineParser.d.ts +10 -0
  38. package/dist/converters/markdown/InlineParser.d.ts.map +1 -0
  39. package/dist/extensions/CodeBlockNodeView/IconButton.d.ts +9 -0
  40. package/dist/extensions/CodeBlockNodeView/IconButton.d.ts.map +1 -0
  41. package/dist/extensions/CodeBlockNodeView/MermaidCodeBlockView.d.ts +12 -0
  42. package/dist/extensions/CodeBlockNodeView/MermaidCodeBlockView.d.ts.map +1 -0
  43. package/dist/extensions/CodeBlockNodeView/RegularCodeBlockView.d.ts +10 -0
  44. package/dist/extensions/CodeBlockNodeView/RegularCodeBlockView.d.ts.map +1 -0
  45. package/dist/extensions/CodeBlockNodeView/constants.d.ts +5 -0
  46. package/dist/extensions/CodeBlockNodeView/constants.d.ts.map +1 -0
  47. package/dist/extensions/CodeBlockNodeView.d.ts +1 -1
  48. package/dist/extensions/CodeBlockNodeView.d.ts.map +1 -1
  49. package/dist/extensions/CustomCodeBlock.d.ts +1 -1
  50. package/dist/extensions/LinkClickExtension.d.ts +3 -1
  51. package/dist/extensions/LinkClickExtension.d.ts.map +1 -1
  52. package/dist/extensions/TableRightClickExtension.d.ts +1 -1
  53. package/dist/extensions/mermaidRegistry.d.ts +2 -2
  54. package/dist/hooks/useEditorContextMenus.d.ts +34 -0
  55. package/dist/hooks/useEditorContextMenus.d.ts.map +1 -0
  56. package/dist/hooks/useEditorState.d.ts +3 -3
  57. package/dist/hooks/useMarkdownEditor.d.ts +4 -2
  58. package/dist/hooks/useMarkdownEditor.d.ts.map +1 -1
  59. package/dist/hooks/useMarkdownInsertion.d.ts +11 -0
  60. package/dist/hooks/useMarkdownInsertion.d.ts.map +1 -0
  61. package/dist/hooks/useTableToolbar.d.ts +1 -1
  62. package/dist/i18n/I18nContext.d.ts +1 -1
  63. package/dist/index.css +704 -1
  64. package/dist/index.d.ts +4 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +33640 -27167
  67. package/dist/index.js.map +150 -1
  68. package/dist/lib/utils.d.ts +8 -0
  69. package/dist/lib/utils.d.ts.map +1 -0
  70. package/dist/setupTests.d.ts +2 -0
  71. package/dist/setupTests.d.ts.map +1 -0
  72. package/dist/theme.css +96 -0
  73. package/dist/types/editor.d.ts +1 -1
  74. package/dist/types/index.d.ts +1 -1
  75. package/dist/utils/pasteHandler.d.ts +2 -2
  76. package/dist/utils/pasteHandler.d.ts.map +1 -1
  77. package/dist/utils/selectionUtils.d.ts +2 -3
  78. package/dist/utils/selectionUtils.d.ts.map +1 -1
  79. package/package.json +40 -16
package/README.md CHANGED
@@ -1,7 +1,12 @@
1
1
  # markdown-wysiwyg-editor
2
2
 
3
+ [![npm version](https://badge.fury.io/js/markdown-wysiwyg-editor.svg)](https://badge.fury.io/js/markdown-wysiwyg-editor)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
4
7
 
8
+ [Live Demo](https://wysiwyg-doc.com/markdown-wysiwyg/index.html)
9
+
5
10
  ![Screenshot](https://raw.githubusercontent.com/ugnoguchigxp/markdownWysiwyg/main/assets/example.png)
6
11
 
7
12
  ---
@@ -13,6 +18,7 @@ Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
13
18
  - Table editing with context menu and resize controls
14
19
  - Optional Mermaid diagram support
15
20
  - Optional image insertion
21
+ - Emoji picker for inserting emojis
16
22
  - Bidirectional Markdown conversion
17
23
  - Link context menu
18
24
  - TypeScript support
@@ -21,6 +27,8 @@ Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
21
27
 
22
28
  This editor is a React component targeting **React 18+ / ReactDOM 18+**.
23
29
 
30
+ This package is **Tailwind CSS v4 + shadcn/ui token compatible**. It uses Tailwind utility classes (e.g. `bg-background`, `text-foreground`, `bg-popover`) that are compiled by your host app's Tailwind.
31
+
24
32
  ```bash
25
33
  pnpm add markdown-wysiwyg-editor
26
34
  # or
@@ -31,12 +39,14 @@ yarn add markdown-wysiwyg-editor
31
39
 
32
40
  ## Quick Start
33
41
 
34
- **⚠️ IMPORTANT**: You **MUST** import the CSS file for the editor to work properly.
42
+ **⚠️ IMPORTANT**
43
+
44
+ - **Your app MUST use Tailwind CSS v4** for the editor's utility classes to work.
45
+ - **You MUST configure Tailwind to scan this package** (see setup below).
35
46
 
36
47
  ```tsx
37
48
  import { useState } from 'react';
38
49
  import { MarkdownEditor } from 'markdown-wysiwyg-editor';
39
- import 'markdown-wysiwyg-editor/style.css'; // ← REQUIRED
40
50
 
41
51
  function App() {
42
52
  const [content, setContent] = useState('');
@@ -47,82 +57,120 @@ function App() {
47
57
 
48
58
  ## Essential Setup Steps
49
59
 
50
- ### 1. CSS Import (Required)
60
+ ### 1. Tailwind v4 Configuration (Required)
51
61
 
52
- **Without the CSS import, the editor will not display properly**. Make sure to import the stylesheet:
62
+ Add the following to your project's main CSS file (e.g., `index.css`):
53
63
 
54
- ```tsx
55
- import 'markdown-wysiwyg-editor/style.css';
64
+ ```css
65
+ @import "tailwindcss";
66
+
67
+ /* Scan package source for Tailwind classes */
68
+ @source "./node_modules/markdown-wysiwyg-editor/dist/*.js";
69
+
70
+ /* Import package theme (optional - provides default light/dark mode) */
71
+ @import "markdown-wysiwyg-editor/theme.css";
72
+
73
+ /* Import editor content styles */
74
+ @import "markdown-wysiwyg-editor/style.css";
75
+
76
+ /* Map CSS variables to Tailwind v4 theme */
77
+ @theme {
78
+ --color-background: hsl(var(--background));
79
+ --color-foreground: hsl(var(--foreground));
80
+ --color-card: hsl(var(--card));
81
+ --color-card-foreground: hsl(var(--card-foreground));
82
+ --color-popover: hsl(var(--popover));
83
+ --color-popover-foreground: hsl(var(--popover-foreground));
84
+ --color-primary: hsl(var(--primary));
85
+ --color-primary-foreground: hsl(var(--primary-foreground));
86
+ --color-secondary: hsl(var(--secondary));
87
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
88
+ --color-muted: hsl(var(--muted));
89
+ --color-muted-foreground: hsl(var(--muted-foreground));
90
+ --color-accent: hsl(var(--accent));
91
+ --color-accent-foreground: hsl(var(--accent-foreground));
92
+ --color-destructive: hsl(var(--destructive));
93
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
94
+ --color-border: hsl(var(--border));
95
+ --color-input: hsl(var(--input));
96
+ --color-ring: hsl(var(--ring));
97
+
98
+ --variant-dark: .dark &;
99
+ }
56
100
  ```
57
101
 
58
- You can import this in your main app file (e.g., `App.tsx` or `index.tsx`) to make it available globally.
102
+ ### 2. Theming Options
59
103
 
60
- ### 2. Theming (shadcn CSS Variables)
104
+ #### Option A: Use Package Default Theme
61
105
 
62
- This library uses **shadcn-style CSS variables** for theming. Define these variables in your host project's global CSS:
106
+ Import `theme.css` to get shadcn-compatible light/dark mode defaults:
63
107
 
64
108
  ```css
65
- :root {
66
- --background: 0 0% 100%;
67
- --foreground: 222.2 84% 4.9%;
68
- --primary: 221.2 83.2% 53.3%;
69
- --primary-foreground: 210 40% 98%;
70
- --secondary: 210 40% 96.1%;
71
- --secondary-foreground: 222.2 47.4% 11.2%;
72
- --muted: 210 40% 96.1%;
73
- --muted-foreground: 215.4 16.3% 46.9%;
74
- --accent: 210 40% 96.1%;
75
- --accent-foreground: 222.2 47.4% 11.2%;
76
- --destructive: 0 84.2% 60.2%;
77
- --destructive-foreground: 210 40% 98%;
78
- --border: 214.3 31.8% 91.4%;
79
- --input: 214.3 31.8% 91.4%;
80
- --ring: 221.2 83.2% 53.3%;
81
- --radius: 0.5rem;
82
- --popover: 0 0% 100%;
83
- --popover-foreground: 222.2 84% 4.9%;
84
- --card: 0 0% 100%;
85
- --card-foreground: 222.2 84% 4.9%;
86
- }
109
+ @import "markdown-wysiwyg-editor/theme.css";
110
+ ```
111
+
112
+ #### Option B: Use Your Own Theme
113
+
114
+ If you already use shadcn/ui or have your own CSS variables defined, skip importing `theme.css`:
87
115
 
88
- /* Dark mode - use .dark class or @media (prefers-color-scheme: dark) */
89
- .dark {
90
- --background: 222.2 84% 4.9%;
91
- --foreground: 210 40% 98%;
92
- --primary: 217.2 91.2% 59.8%;
93
- --primary-foreground: 222.2 47.4% 11.2%;
94
- --secondary: 217.2 32.6% 17.5%;
95
- --secondary-foreground: 210 40% 98%;
96
- --muted: 217.2 32.6% 17.5%;
97
- --muted-foreground: 215 20.2% 65.1%;
98
- --accent: 217.2 32.6% 17.5%;
99
- --accent-foreground: 210 40% 98%;
100
- --destructive: 0 62.8% 30.6%;
101
- --destructive-foreground: 210 40% 98%;
102
- --border: 217.2 32.6% 17.5%;
103
- --input: 217.2 32.6% 17.5%;
104
- --ring: 224.3 76.3% 48%;
105
- --popover: 222.2 84% 4.9%;
106
- --popover-foreground: 210 40% 98%;
107
- --card: 222.2 84% 4.9%;
108
- --card-foreground: 210 40% 98%;
116
+ ```css
117
+ @import "tailwindcss";
118
+ @source "./node_modules/markdown-wysiwyg-editor/dist/*.js";
119
+ @import "markdown-wysiwyg-editor/style.css";
120
+
121
+ /* Your own theme variables */
122
+ @layer base {
123
+ :root {
124
+ --background: 0 0% 100%;
125
+ --foreground: 222.2 84% 4.9%;
126
+ --popover: 0 0% 100%;
127
+ --popover-foreground: 222.2 84% 4.9%;
128
+ /* ... other variables */
129
+ }
130
+
131
+ .dark {
132
+ --background: 222.2 84% 4.9%;
133
+ --foreground: 210 40% 98%;
134
+ --popover: 222.2 84% 4.9%;
135
+ --popover-foreground: 210 40% 98%;
136
+ /* ... other variables */
137
+ }
109
138
  }
110
139
  ```
111
140
 
112
- > **Note**: If you already use shadcn/ui in your project, these variables are likely already defined. The editor will automatically use your existing theme.
113
-
114
- #### Tailwind CSS Configuration
141
+ #### Required CSS Variables
142
+
143
+ The editor expects these shadcn-style CSS variables (HSL triplets without `hsl()`):
144
+
145
+ | Variable | Light Mode Example | Description |
146
+ |----------|-------------------|-------------|
147
+ | `--background` | `0 0% 100%` | Page background |
148
+ | `--foreground` | `222.2 84% 4.9%` | Primary text color |
149
+ | `--popover` | `0 0% 100%` | Dropdown/menu background |
150
+ | `--popover-foreground` | `222.2 84% 4.9%` | Dropdown/menu text |
151
+ | `--primary` | `222.2 47.4% 11.2%` | Primary action color |
152
+ | `--primary-foreground` | `210 40% 98%` | Primary action text |
153
+ | `--secondary` | `210 40% 96.1%` | Secondary elements |
154
+ | `--secondary-foreground` | `222.2 47.4% 11.2%` | Secondary text |
155
+ | `--muted` | `210 40% 96.1%` | Muted backgrounds |
156
+ | `--muted-foreground` | `215.4 16.3% 46.9%` | Muted text |
157
+ | `--accent` | `210 40% 96.1%` | Hover states |
158
+ | `--accent-foreground` | `222.2 47.4% 11.2%` | Hover text |
159
+ | `--border` | `214.3 31.8% 91.4%` | Border color |
160
+ | `--input` | `214.3 31.8% 91.4%` | Input border |
161
+ | `--ring` | `222.2 84% 4.9%` | Focus ring |
162
+ | `--radius` | `0.5rem` | Border radius |
163
+
164
+ ### 3. Dark Mode
165
+
166
+ Dark mode works automatically when you add the `.dark` class to `<html>` or `<body>`:
115
167
 
116
- Make sure Tailwind scans this package's output:
168
+ ```tsx
169
+ // Toggle dark mode
170
+ document.documentElement.classList.toggle('dark');
171
+ ```
117
172
 
118
- ```js
119
- // tailwind.config.js
120
- export default {
121
- content: [
122
- './src/**/*.{js,ts,jsx,tsx}',
123
- './node_modules/markdown-wysiwyg-editor/dist/**/*.{js,cjs,mjs}',
124
- ],
125
- }
173
+ If you imported `theme.css`, dark mode colors are already defined. Otherwise, define them under `.dark` selector in your CSS.
126
174
  ```
127
175
 
128
176
  ### 3. Height and Scroll Configuration
@@ -179,17 +227,37 @@ The editor needs proper height configuration to enable scrolling. Choose one app
179
227
 
180
228
  #### Issue: Styles not applying
181
229
 
182
- - Verify the CSS import path: `'markdown-wysiwyg-editor/style.css'`
230
+ - Check that you've added `@source` directive pointing to this package
231
+ - Verify the `@theme` block maps CSS variables correctly
183
232
  - Check browser console for CSS loading errors
184
- - Make sure you're not using CSS modules that might interfere with global styles
233
+
234
+ #### Issue: Toolbar / menus look unstyled or transparent
235
+
236
+ - Ensure Tailwind CSS v4 is installed and configured
237
+ - Verify `@source "./node_modules/markdown-wysiwyg-editor/dist/*.js"` is in your CSS
238
+ - Check that CSS variables (`--popover`, `--background`, etc.) are defined
239
+ - Make sure `.dark` class toggle updates the CSS variables correctly
240
+
241
+ #### Issue: Dark mode not working
242
+
243
+ - Ensure `.dark` class is applied to `<html>` or `<body>`
244
+ - Import `theme.css` or define dark mode variables under `.dark` selector
245
+ - Check that `--variant-dark: .dark &;` is in your `@theme` block
185
246
 
186
247
  ### With Mermaid
187
248
 
249
+ `mermaid` is an optional peer dependency. Install it only if you enable Mermaid:
250
+
251
+ ```bash
252
+ pnpm add mermaid
253
+ # or
254
+ npm install mermaid
255
+ ```
256
+
188
257
  ```tsx
189
258
  import { useState } from 'react';
190
259
  import mermaid from 'mermaid';
191
260
  import { MarkdownEditor } from 'markdown-wysiwyg-editor';
192
- import 'markdown-wysiwyg-editor/style.css';
193
261
 
194
262
  mermaid.initialize({ startOnLoad: false });
195
263
 
@@ -208,6 +276,12 @@ function App() {
208
276
  <MarkdownEditor value={content} onChange={setContent} enableImage={false} enableTable={false} />
209
277
  ```
210
278
 
279
+ Emoji insertion is available via the built-in toolbar. To hide it, hide the toolbar:
280
+
281
+ ```tsx
282
+ <MarkdownEditor value={content} onChange={setContent} showToolbar={false} />
283
+ ```
284
+
211
285
  ### Image whitelist (local images)
212
286
 
213
287
  For security reasons, **local image paths are not rendered by default**.
@@ -393,6 +467,8 @@ import 'markdown-wysiwyg-editor/style.css';
393
467
 
394
468
  Ensure the CSS is imported in your app entry.
395
469
 
470
+ If the editor content is styled but the toolbar/buttons are not, Tailwind is not generating the required utility classes. Re-check the Tailwind `content` paths and shadcn-compatible theme tokens.
471
+
396
472
  ### "ReferenceError: global is not defined"
397
473
 
398
474
  With some Vite setups you may need:
@@ -0,0 +1,25 @@
1
+ import type { Editor } from '@tiptap/react';
2
+ import type React from 'react';
3
+ import type { ISelectionInfo } from '../utils/selectionUtils';
4
+ interface EditorChromeProps {
5
+ editor: Editor;
6
+ selectionInfo: ISelectionInfo | null;
7
+ editable: boolean;
8
+ effectiveShowToolbar: boolean;
9
+ effectiveShowSyntaxStatus: boolean;
10
+ effectiveShowPasteDebug: boolean;
11
+ showDownloadButton: boolean;
12
+ onDownloadAsMarkdown: () => void;
13
+ onInsertMarkdown: (markdown: string, cursorOffset?: number) => void;
14
+ pasteEvents: Array<{
15
+ timestamp: number;
16
+ type: string;
17
+ content: string;
18
+ result: string;
19
+ }>;
20
+ onClearPasteEvents: () => void;
21
+ children: React.ReactNode;
22
+ }
23
+ export declare const EditorChrome: React.FC<EditorChromeProps>;
24
+ export {};
25
+ //# sourceMappingURL=EditorChrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorChrome.d.ts","sourceRoot":"","sources":["../../src/components/EditorChrome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yBAAyB,EAAE,OAAO,CAAC;IACnC,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,WAAW,EAAE,KAAK,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6EpD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import type React from 'react';
2
2
  interface EmojiPickerProps {
3
3
  /** Called when an emoji is selected */
4
4
  onSelect: (emoji: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,UAAU,gBAAgB;IACxB,uCAAuC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+KlD,CAAC"}
1
+ {"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,UAAU,gBAAgB;IACxB,uCAAuC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuKlD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import type React from 'react';
2
2
  interface ImagePickerProps {
3
3
  onInsertMarkdown: (markdown: string) => void;
4
4
  onClose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePicker.d.ts","sourceRoot":"","sources":["../../src/components/ImagePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyGlD,CAAC"}
1
+ {"version":3,"file":"ImagePicker.d.ts","sourceRoot":"","sources":["../../src/components/ImagePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkGlD,CAAC"}
@@ -1,4 +1,9 @@
1
- import { default as React } from 'react';
1
+ /**
2
+ * LinkContextMenu - Context menu displayed when clicking on links
3
+ *
4
+ * Options menu shown when right-clicking or Ctrl+clicking on a link
5
+ */
6
+ import type React from 'react';
2
7
  interface LinkContextMenuProps {
3
8
  visible: boolean;
4
9
  position: {
@@ -8,6 +13,8 @@ interface LinkContextMenuProps {
8
13
  linkData: {
9
14
  href: string;
10
15
  text: string;
16
+ from?: number;
17
+ to?: number;
11
18
  } | null;
12
19
  onClose: () => void;
13
20
  onOpenLink: (href: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"LinkContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/LinkContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,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,CAkN1D,CAAC"}
1
+ {"version":3,"file":"LinkContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/LinkContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,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;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;KACb,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,CAkN1D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
2
- import { IMarkdownEditorProps } from '../types/index';
1
+ import React from 'react';
2
+ import { type IMarkdownEditorProps } from '../types/index';
3
3
  export declare const MarkdownEditor: React.FC<IMarkdownEditorProps>;
4
4
  //# sourceMappingURL=MarkdownEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0BhE,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAetE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAy2BzD,CAAC"}
1
+ {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0BhE,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAetE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwczD,CAAC"}
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
- import { ISelectionInfo } from '../utils/selectionUtils';
1
+ import type React from 'react';
2
+ import type { ISelectionInfo } from '../utils/selectionUtils';
3
3
  interface IMarkdownSyntaxStatusProps {
4
4
  selectionInfo: ISelectionInfo | null;
5
5
  className?: string;
@@ -1,5 +1,10 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/react';
1
+ /**
2
+ * MarkdownToolbar - Markdown formatting toolbar
3
+ *
4
+ * Toolbar component for applying various Markdown formatting
5
+ */
6
+ import React from 'react';
7
+ import type { Editor } from '@tiptap/react';
3
8
  interface MarkdownToolbarProps {
4
9
  onInsertMarkdown: (markdown: string, cursorOffset?: number) => void;
5
10
  onImageUploadComplete?: (markdownImageUrl: string) => void;
@@ -1 +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,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA0B5C,UAAU,oBAAoB;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,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,CAqvB1D,CAAC"}
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,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA4B5C,UAAU,oBAAoB;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,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,CAyV1D,CAAC"}
@@ -1,4 +1,7 @@
1
- import { default as React } from 'react';
1
+ /**
2
+ * TableContextMenu - Table operation context menu
3
+ */
4
+ import type React from 'react';
2
5
  export interface ITableContextMenuProps {
3
6
  isVisible: boolean;
4
7
  position: {
@@ -1,5 +1,6 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/react';
1
+ import type React from 'react';
2
+ import type { Editor } from '@tiptap/react';
3
+ import '@tiptap/extension-table';
3
4
  export interface ITableEdgeControlsProps {
4
5
  editor: Editor | null;
5
6
  }
@@ -1,5 +1,6 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/react';
1
+ import type React from 'react';
2
+ import type { Editor } from '@tiptap/react';
3
+ import '@tiptap/extension-table';
3
4
  interface ITableToolbarProps {
4
5
  editor: Editor;
5
6
  visible: boolean;
@@ -0,0 +1,13 @@
1
+ import type React from 'react';
2
+ import type { Translator } from '../../i18n/I18nContext';
3
+ interface DownloadMenuProps {
4
+ isOpen: boolean;
5
+ disabled?: boolean;
6
+ onToggle: () => void;
7
+ onClose: () => void;
8
+ onDownloadAsMarkdown: () => void;
9
+ t: Translator;
10
+ }
11
+ export declare const DownloadMenu: React.FC<DownloadMenuProps>;
12
+ export {};
13
+ //# sourceMappingURL=DownloadMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DownloadMenu.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/DownloadMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIzD,UAAU,iBAAiB;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,CAAC,EAAE,UAAU,CAAC;CACf;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwFpD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type React from 'react';
2
+ import type { Translator } from '../../i18n/I18nContext';
3
+ interface HeadingMenuProps {
4
+ isOpen: boolean;
5
+ disabled?: boolean;
6
+ onToggle: () => void;
7
+ onClose: () => void;
8
+ onInsertMarkdown: (markdown: string) => void;
9
+ t: Translator;
10
+ }
11
+ export declare const HeadingMenu: React.FC<HeadingMenuProps>;
12
+ export {};
13
+ //# sourceMappingURL=HeadingMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeadingMenu.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/HeadingMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIzD,UAAU,gBAAgB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,CAAC,EAAE,UAAU,CAAC;CACf;AAwCD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+FlD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import type { Translator } from '../../i18n/I18nContext';
3
+ interface LinkModalProps {
4
+ isOpen: boolean;
5
+ selectedText: string;
6
+ onInsertMarkdown: (markdown: string) => void;
7
+ onClose: () => void;
8
+ t: Translator;
9
+ }
10
+ export declare const LinkModal: React.FC<LinkModalProps>;
11
+ export {};
12
+ //# sourceMappingURL=LinkModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkModal.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/LinkModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,UAAU,cAAc;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,CAAC,EAAE,UAAU,CAAC;CACf;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgH9C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ import type { LucideIcon } from '../ui/icons';
3
+ interface ToolbarButtonProps {
4
+ icon: LucideIcon;
5
+ title: string;
6
+ onClick: () => void;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const ToolbarButton: React.FC<ToolbarButtonProps>;
10
+ export {};
11
+ //# sourceMappingURL=ToolbarButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmBtD,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { ComponentProps, FunctionComponent } from 'react';
2
+ export type IconProps = ComponentProps<'svg'> & {
3
+ size?: number | string;
4
+ };
5
+ export declare const Trash2: FunctionComponent<IconProps>;
6
+ export declare const Download: FunctionComponent<IconProps>;
7
+ export declare const Heading1: FunctionComponent<IconProps>;
8
+ export declare const ArrowLeft: FunctionComponent<IconProps>;
9
+ export declare const Columns3: FunctionComponent<IconProps>;
10
+ export declare const LayoutGrid: FunctionComponent<IconProps>;
11
+ export declare const Minus: FunctionComponent<IconProps>;
12
+ export declare const Plus: FunctionComponent<IconProps>;
13
+ export declare const Rows3: FunctionComponent<IconProps>;
14
+ export declare const Edit3: FunctionComponent<IconProps>;
15
+ export declare const ExternalLink: FunctionComponent<IconProps>;
16
+ export declare const X: FunctionComponent<IconProps>;
17
+ export declare const Bold: FunctionComponent<IconProps>;
18
+ export declare const Italic: FunctionComponent<IconProps>;
19
+ export declare const Strikethrough: FunctionComponent<IconProps>;
20
+ export declare const Code: FunctionComponent<IconProps>;
21
+ export declare const Quote: FunctionComponent<IconProps>;
22
+ export declare const FileCode: FunctionComponent<IconProps>;
23
+ export declare const List: FunctionComponent<IconProps>;
24
+ export declare const ListOrdered: FunctionComponent<IconProps>;
25
+ export declare const Link2: FunctionComponent<IconProps>;
26
+ export declare const Image: FunctionComponent<IconProps>;
27
+ export declare const Table: FunctionComponent<IconProps>;
28
+ export declare const Smile: FunctionComponent<IconProps>;
29
+ export type LucideIcon = FunctionComponent<IconProps>;
30
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/D,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAyBF,eAAO,MAAM,MAAM,8BASlB,CAAC;AAEF,eAAO,MAAM,QAAQ,8BAOpB,CAAC;AAEF,eAAO,MAAM,QAAQ,8BAQpB,CAAC;AAEF,eAAO,MAAM,SAAS,8BAMrB,CAAC;AAEF,eAAO,MAAM,QAAQ,8BAOpB,CAAC;AAEF,eAAO,MAAM,UAAU,8BAQtB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAA6C,CAAC;AAEhE,eAAO,MAAM,IAAI,8BAMhB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAOjB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAMjB,CAAC;AAEF,eAAO,MAAM,YAAY,8BAOxB,CAAC;AAEF,eAAO,MAAM,CAAC,8BAMb,CAAC;AAEF,eAAO,MAAM,IAAI,8BAMhB,CAAC;AAEF,eAAO,MAAM,MAAM,8BAOlB,CAAC;AAEF,eAAO,MAAM,aAAa,8BAOzB,CAAC;AAEF,eAAO,MAAM,IAAI,8BAMhB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAMjB,CAAC;AAEF,eAAO,MAAM,QAAQ,8BAQpB,CAAC;AAEF,eAAO,MAAM,IAAI,8BAUhB,CAAC;AAEF,eAAO,MAAM,WAAW,8BAUvB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAOjB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAOjB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAQjB,CAAC;AAEF,eAAO,MAAM,KAAK,8BAQjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { EmojiCategory, IEmoji, IEmojiCategoryMeta } from '../types';
1
+ import type { EmojiCategory, IEmoji, IEmojiCategoryMeta } from '../types';
2
2
  /**
3
3
  * Emoji categories with display metadata
4
4
  */
@@ -1,6 +1,9 @@
1
- import { JSONContent } from '@tiptap/react';
1
+ /**
2
+ * JsonToMarkdownConverter - JSON構造からMarkdown形式への変換
3
+ * TipTapエディターのJSON形式をMarkdownテキストに変換
4
+ */
5
+ import type { JSONContent } from '@tiptap/react';
2
6
  export declare class JsonToMarkdownConverter {
3
- private readonly _instanceMarker;
4
7
  private constructor();
5
8
  /**
6
9
  * TipTap JSON構造をMarkdownテキストに変換
@@ -1 +1 @@
1
- {"version":3,"file":"JsonToMarkdownConverter.d.ts","sourceRoot":"","sources":["../../src/converters/JsonToMarkdownConverter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,qBAAa,uBAAuB;IAElC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAK;IAErC,OAAO;IAIP;;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;IAuD1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAK/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAO7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IA+CxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAShC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAM/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAM3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IA0B3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAe9B;;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,SAAgB,GAAG,IAAI;CA4B7E;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"JsonToMarkdownConverter.d.ts","sourceRoot":"","sources":["../../src/converters/JsonToMarkdownConverter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,qBAAa,uBAAuB;IAGlC,OAAO;IAIP;;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;IAuD1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAK/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAO7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IA+CxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAShC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAM/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAM3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IA0B3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAe9B;;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,SAAgB,GAAG,IAAI;CA4B7E;AAED,eAAe,uBAAuB,CAAC"}
@@ -1,13 +1,20 @@
1
- import { JSONContent } from '@tiptap/core';
2
- import { Editor } from '@tiptap/react';
3
- interface MarkdownToTipTapOptions {
4
- publicImagePathPrefix?: string;
5
- }
1
+ /**
2
+ * Markdown TipTap JSON Converter
3
+ * 明確な優先順位と処理順序を持つMarkdownパーサー
4
+ *
5
+ * 処理順序:
6
+ * 1. コードブロック抽出(最優先、内部は一切処理しない)
7
+ * 2. テーブル抽出(セル内はインライン要素のみ処理)
8
+ * 3. ブロック要素パース(見出し、リスト、引用など)
9
+ * 4. インライン要素パース(bold, italic, code, linkなど)
10
+ */
11
+ import type { JSONContent } from '@tiptap/core';
12
+ import type { Editor } from '@tiptap/react';
13
+ import { type MarkdownToTipTapOptions } from './markdown/InlineParser';
6
14
  /**
7
15
  * メイン変換クラス
8
16
  */
9
17
  export declare class MarkdownTipTapConverter {
10
- private readonly _instanceMarker;
11
18
  private constructor();
12
19
  /**
13
20
  * MarkdownがMarkdown構文を含むかチェック
@@ -30,5 +37,4 @@ export declare class MarkdownTipTapConverter {
30
37
  */
31
38
  static processMarkdownInSmallChunksWithRender(markdown: string, editor: Editor, onChunkProcessed?: (processed: number, total: number) => void, options?: MarkdownToTipTapOptions): Promise<void>;
32
39
  }
33
- export {};
34
40
  //# sourceMappingURL=MarkdownTipTapConverter.d.ts.map
@@ -1 +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;AAY5C,UAAU,uBAAuB;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAymBD;;GAEG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAK;IAErC,OAAO;IAGP;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAM5C;;OAEG;WACU,oBAAoB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,WAAW,CAAC;IAoDvB,OAAO,CAAC,MAAM,CAAC,cAAc;IAmC7B;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAMtD,OAAO,CAAC,MAAM,CAAC,cAAc;IAkD7B,OAAO,CAAC,MAAM,CAAC,aAAa;IA8C5B,OAAO,CAAC,MAAM,CAAC,eAAe;IA0B9B;;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,EAC7D,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC;CAWjB"}
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;AAI5C,OAAO,EAAgB,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAIrF;;GAEG;AACH,qBAAa,uBAAuB;IAClC,OAAO;IAGP;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAM5C;;OAEG;WACU,oBAAoB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,WAAW,CAAC;IAoDvB,OAAO,CAAC,MAAM,CAAC,cAAc;IAmC7B;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAMtD,OAAO,CAAC,MAAM,CAAC,cAAc;IAkD7B,OAAO,CAAC,MAAM,CAAC,aAAa;IA8C5B,OAAO,CAAC,MAAM,CAAC,eAAe;IA0B9B;;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,EAC7D,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC;CAWjB"}