markdown-wysiwyg-editor 0.2.3 → 0.2.5

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 (77) hide show
  1. package/README.md +140 -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 +14 -0
  5. package/dist/components/EmojiPicker.d.ts.map +1 -0
  6. package/dist/components/ImagePicker.d.ts +10 -0
  7. package/dist/components/ImagePicker.d.ts.map +1 -0
  8. package/dist/components/LinkContextMenu.d.ts +6 -1
  9. package/dist/components/MarkdownEditor.d.ts +2 -2
  10. package/dist/components/MarkdownEditor.d.ts.map +1 -1
  11. package/dist/components/MarkdownSyntaxStatus.d.ts +2 -2
  12. package/dist/components/MarkdownToolbar.d.ts +7 -2
  13. package/dist/components/MarkdownToolbar.d.ts.map +1 -1
  14. package/dist/components/TableContextMenu.d.ts +4 -1
  15. package/dist/components/TableEdgeControls.d.ts +3 -2
  16. package/dist/components/TableToolbar.d.ts +3 -2
  17. package/dist/components/toolbar/DownloadMenu.d.ts +13 -0
  18. package/dist/components/toolbar/DownloadMenu.d.ts.map +1 -0
  19. package/dist/components/toolbar/HeadingMenu.d.ts +13 -0
  20. package/dist/components/toolbar/HeadingMenu.d.ts.map +1 -0
  21. package/dist/components/toolbar/LinkModal.d.ts +12 -0
  22. package/dist/components/toolbar/LinkModal.d.ts.map +1 -0
  23. package/dist/components/toolbar/ToolbarButton.d.ts +11 -0
  24. package/dist/components/toolbar/ToolbarButton.d.ts.map +1 -0
  25. package/dist/components/ui/icons.d.ts +30 -0
  26. package/dist/components/ui/icons.d.ts.map +1 -0
  27. package/dist/constants/emojiData.d.ts +14 -0
  28. package/dist/constants/emojiData.d.ts.map +1 -0
  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 +1 -1
  51. package/dist/extensions/TableRightClickExtension.d.ts +1 -1
  52. package/dist/extensions/mermaidRegistry.d.ts +2 -2
  53. package/dist/hooks/useEditorContextMenus.d.ts +30 -0
  54. package/dist/hooks/useEditorContextMenus.d.ts.map +1 -0
  55. package/dist/hooks/useEditorState.d.ts +3 -3
  56. package/dist/hooks/useMarkdownEditor.d.ts +2 -2
  57. package/dist/hooks/useMarkdownInsertion.d.ts +11 -0
  58. package/dist/hooks/useMarkdownInsertion.d.ts.map +1 -0
  59. package/dist/hooks/useTableToolbar.d.ts +1 -1
  60. package/dist/i18n/I18nContext.d.ts +1 -1
  61. package/dist/index.css +704 -1
  62. package/dist/index.d.ts +8 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +34042 -26789
  65. package/dist/index.js.map +150 -1
  66. package/dist/lib/utils.d.ts +8 -0
  67. package/dist/lib/utils.d.ts.map +1 -0
  68. package/dist/setupTests.d.ts +2 -0
  69. package/dist/setupTests.d.ts.map +1 -0
  70. package/dist/theme.css +96 -0
  71. package/dist/types/editor.d.ts +1 -1
  72. package/dist/types/index.d.ts +51 -1
  73. package/dist/types/index.d.ts.map +1 -1
  74. package/dist/utils/pasteHandler.d.ts +2 -2
  75. package/dist/utils/selectionUtils.d.ts +2 -3
  76. package/dist/utils/selectionUtils.d.ts.map +1 -1
  77. package/package.json +41 -17
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
4
4
 
5
+ [Live Demo](https://wysiwyg-doc.com/markdown-wysiwyg/index.html)
6
+
5
7
  ![Screenshot](https://raw.githubusercontent.com/ugnoguchigxp/markdownWysiwyg/main/assets/example.png)
6
8
 
7
9
  ---
@@ -13,6 +15,7 @@ Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
13
15
  - Table editing with context menu and resize controls
14
16
  - Optional Mermaid diagram support
15
17
  - Optional image insertion
18
+ - Emoji picker for inserting emojis
16
19
  - Bidirectional Markdown conversion
17
20
  - Link context menu
18
21
  - TypeScript support
@@ -21,6 +24,8 @@ Lightweight Markdown WYSIWYG editor for React, powered by TipTap.
21
24
 
22
25
  This editor is a React component targeting **React 18+ / ReactDOM 18+**.
23
26
 
27
+ 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.
28
+
24
29
  ```bash
25
30
  pnpm add markdown-wysiwyg-editor
26
31
  # or
@@ -31,12 +36,14 @@ yarn add markdown-wysiwyg-editor
31
36
 
32
37
  ## Quick Start
33
38
 
34
- **⚠️ IMPORTANT**: You **MUST** import the CSS file for the editor to work properly.
39
+ **⚠️ IMPORTANT**
40
+
41
+ - **Your app MUST use Tailwind CSS v4** for the editor's utility classes to work.
42
+ - **You MUST configure Tailwind to scan this package** (see setup below).
35
43
 
36
44
  ```tsx
37
45
  import { useState } from 'react';
38
46
  import { MarkdownEditor } from 'markdown-wysiwyg-editor';
39
- import 'markdown-wysiwyg-editor/style.css'; // ← REQUIRED
40
47
 
41
48
  function App() {
42
49
  const [content, setContent] = useState('');
@@ -47,82 +54,120 @@ function App() {
47
54
 
48
55
  ## Essential Setup Steps
49
56
 
50
- ### 1. CSS Import (Required)
57
+ ### 1. Tailwind v4 Configuration (Required)
51
58
 
52
- **Without the CSS import, the editor will not display properly**. Make sure to import the stylesheet:
59
+ Add the following to your project's main CSS file (e.g., `index.css`):
53
60
 
54
- ```tsx
55
- import 'markdown-wysiwyg-editor/style.css';
61
+ ```css
62
+ @import "tailwindcss";
63
+
64
+ /* Scan package source for Tailwind classes */
65
+ @source "./node_modules/markdown-wysiwyg-editor/dist/*.js";
66
+
67
+ /* Import package theme (optional - provides default light/dark mode) */
68
+ @import "markdown-wysiwyg-editor/theme.css";
69
+
70
+ /* Import editor content styles */
71
+ @import "markdown-wysiwyg-editor/style.css";
72
+
73
+ /* Map CSS variables to Tailwind v4 theme */
74
+ @theme {
75
+ --color-background: hsl(var(--background));
76
+ --color-foreground: hsl(var(--foreground));
77
+ --color-card: hsl(var(--card));
78
+ --color-card-foreground: hsl(var(--card-foreground));
79
+ --color-popover: hsl(var(--popover));
80
+ --color-popover-foreground: hsl(var(--popover-foreground));
81
+ --color-primary: hsl(var(--primary));
82
+ --color-primary-foreground: hsl(var(--primary-foreground));
83
+ --color-secondary: hsl(var(--secondary));
84
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
85
+ --color-muted: hsl(var(--muted));
86
+ --color-muted-foreground: hsl(var(--muted-foreground));
87
+ --color-accent: hsl(var(--accent));
88
+ --color-accent-foreground: hsl(var(--accent-foreground));
89
+ --color-destructive: hsl(var(--destructive));
90
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
91
+ --color-border: hsl(var(--border));
92
+ --color-input: hsl(var(--input));
93
+ --color-ring: hsl(var(--ring));
94
+
95
+ --variant-dark: .dark &;
96
+ }
56
97
  ```
57
98
 
58
- You can import this in your main app file (e.g., `App.tsx` or `index.tsx`) to make it available globally.
99
+ ### 2. Theming Options
59
100
 
60
- ### 2. Theming (shadcn CSS Variables)
101
+ #### Option A: Use Package Default Theme
61
102
 
62
- This library uses **shadcn-style CSS variables** for theming. Define these variables in your host project's global CSS:
103
+ Import `theme.css` to get shadcn-compatible light/dark mode defaults:
63
104
 
64
105
  ```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
- }
106
+ @import "markdown-wysiwyg-editor/theme.css";
107
+ ```
87
108
 
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%;
109
+ #### Option B: Use Your Own Theme
110
+
111
+ If you already use shadcn/ui or have your own CSS variables defined, skip importing `theme.css`:
112
+
113
+ ```css
114
+ @import "tailwindcss";
115
+ @source "./node_modules/markdown-wysiwyg-editor/dist/*.js";
116
+ @import "markdown-wysiwyg-editor/style.css";
117
+
118
+ /* Your own theme variables */
119
+ @layer base {
120
+ :root {
121
+ --background: 0 0% 100%;
122
+ --foreground: 222.2 84% 4.9%;
123
+ --popover: 0 0% 100%;
124
+ --popover-foreground: 222.2 84% 4.9%;
125
+ /* ... other variables */
126
+ }
127
+
128
+ .dark {
129
+ --background: 222.2 84% 4.9%;
130
+ --foreground: 210 40% 98%;
131
+ --popover: 222.2 84% 4.9%;
132
+ --popover-foreground: 210 40% 98%;
133
+ /* ... other variables */
134
+ }
109
135
  }
110
136
  ```
111
137
 
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
138
+ #### Required CSS Variables
139
+
140
+ The editor expects these shadcn-style CSS variables (HSL triplets without `hsl()`):
141
+
142
+ | Variable | Light Mode Example | Description |
143
+ |----------|-------------------|-------------|
144
+ | `--background` | `0 0% 100%` | Page background |
145
+ | `--foreground` | `222.2 84% 4.9%` | Primary text color |
146
+ | `--popover` | `0 0% 100%` | Dropdown/menu background |
147
+ | `--popover-foreground` | `222.2 84% 4.9%` | Dropdown/menu text |
148
+ | `--primary` | `222.2 47.4% 11.2%` | Primary action color |
149
+ | `--primary-foreground` | `210 40% 98%` | Primary action text |
150
+ | `--secondary` | `210 40% 96.1%` | Secondary elements |
151
+ | `--secondary-foreground` | `222.2 47.4% 11.2%` | Secondary text |
152
+ | `--muted` | `210 40% 96.1%` | Muted backgrounds |
153
+ | `--muted-foreground` | `215.4 16.3% 46.9%` | Muted text |
154
+ | `--accent` | `210 40% 96.1%` | Hover states |
155
+ | `--accent-foreground` | `222.2 47.4% 11.2%` | Hover text |
156
+ | `--border` | `214.3 31.8% 91.4%` | Border color |
157
+ | `--input` | `214.3 31.8% 91.4%` | Input border |
158
+ | `--ring` | `222.2 84% 4.9%` | Focus ring |
159
+ | `--radius` | `0.5rem` | Border radius |
160
+
161
+ ### 3. Dark Mode
162
+
163
+ Dark mode works automatically when you add the `.dark` class to `<html>` or `<body>`:
115
164
 
116
- Make sure Tailwind scans this package's output:
165
+ ```tsx
166
+ // Toggle dark mode
167
+ document.documentElement.classList.toggle('dark');
168
+ ```
117
169
 
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
- }
170
+ If you imported `theme.css`, dark mode colors are already defined. Otherwise, define them under `.dark` selector in your CSS.
126
171
  ```
127
172
 
128
173
  ### 3. Height and Scroll Configuration
@@ -179,17 +224,37 @@ The editor needs proper height configuration to enable scrolling. Choose one app
179
224
 
180
225
  #### Issue: Styles not applying
181
226
 
182
- - Verify the CSS import path: `'markdown-wysiwyg-editor/style.css'`
227
+ - Check that you've added `@source` directive pointing to this package
228
+ - Verify the `@theme` block maps CSS variables correctly
183
229
  - Check browser console for CSS loading errors
184
- - Make sure you're not using CSS modules that might interfere with global styles
230
+
231
+ #### Issue: Toolbar / menus look unstyled or transparent
232
+
233
+ - Ensure Tailwind CSS v4 is installed and configured
234
+ - Verify `@source "./node_modules/markdown-wysiwyg-editor/dist/*.js"` is in your CSS
235
+ - Check that CSS variables (`--popover`, `--background`, etc.) are defined
236
+ - Make sure `.dark` class toggle updates the CSS variables correctly
237
+
238
+ #### Issue: Dark mode not working
239
+
240
+ - Ensure `.dark` class is applied to `<html>` or `<body>`
241
+ - Import `theme.css` or define dark mode variables under `.dark` selector
242
+ - Check that `--variant-dark: .dark &;` is in your `@theme` block
185
243
 
186
244
  ### With Mermaid
187
245
 
246
+ `mermaid` is an optional peer dependency. Install it only if you enable Mermaid:
247
+
248
+ ```bash
249
+ pnpm add mermaid
250
+ # or
251
+ npm install mermaid
252
+ ```
253
+
188
254
  ```tsx
189
255
  import { useState } from 'react';
190
256
  import mermaid from 'mermaid';
191
257
  import { MarkdownEditor } from 'markdown-wysiwyg-editor';
192
- import 'markdown-wysiwyg-editor/style.css';
193
258
 
194
259
  mermaid.initialize({ startOnLoad: false });
195
260
 
@@ -208,6 +273,12 @@ function App() {
208
273
  <MarkdownEditor value={content} onChange={setContent} enableImage={false} enableTable={false} />
209
274
  ```
210
275
 
276
+ Emoji insertion is available via the built-in toolbar. To hide it, hide the toolbar:
277
+
278
+ ```tsx
279
+ <MarkdownEditor value={content} onChange={setContent} showToolbar={false} />
280
+ ```
281
+
211
282
  ### Image whitelist (local images)
212
283
 
213
284
  For security reasons, **local image paths are not rendered by default**.
@@ -393,6 +464,8 @@ import 'markdown-wysiwyg-editor/style.css';
393
464
 
394
465
  Ensure the CSS is imported in your app entry.
395
466
 
467
+ 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.
468
+
396
469
  ### "ReferenceError: global is not defined"
397
470
 
398
471
  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"}
@@ -0,0 +1,14 @@
1
+ import type React from 'react';
2
+ interface EmojiPickerProps {
3
+ /** Called when an emoji is selected */
4
+ onSelect: (emoji: string) => void;
5
+ /** Called when the picker should close */
6
+ onClose: () => void;
7
+ /** Disable the picker */
8
+ disabled?: boolean;
9
+ /** Translator function from host app */
10
+ t: (key: string, fallback?: string) => string;
11
+ }
12
+ export declare const EmojiPicker: React.FC<EmojiPickerProps>;
13
+ export {};
14
+ //# sourceMappingURL=EmojiPicker.d.ts.map
@@ -0,0 +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,CAwKlD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ interface ImagePickerProps {
3
+ onInsertMarkdown: (markdown: string) => void;
4
+ onClose: () => void;
5
+ disabled?: boolean;
6
+ t: (key: string, fallback?: string) => string;
7
+ }
8
+ export declare const ImagePicker: React.FC<ImagePickerProps>;
9
+ export {};
10
+ //# sourceMappingURL=ImagePicker.d.ts.map
@@ -0,0 +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,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: {
@@ -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,CAkczD,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;AAsB5C,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,CAwrB1D,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,CAyGlD,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"}
@@ -0,0 +1,14 @@
1
+ import type { EmojiCategory, IEmoji, IEmojiCategoryMeta } from '../types';
2
+ /**
3
+ * Emoji categories with display metadata
4
+ */
5
+ export declare const EMOJI_CATEGORIES: IEmojiCategoryMeta[];
6
+ /**
7
+ * Comprehensive emoji data with search keywords
8
+ */
9
+ export declare const EMOJI_DATA: IEmoji[];
10
+ /**
11
+ * Map of emojis grouped by category for efficient lookup
12
+ */
13
+ export declare const EMOJI_BY_CATEGORY: Map<EmojiCategory, IEmoji[]>;
14
+ //# sourceMappingURL=emojiData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emojiData.d.ts","sourceRoot":"","sources":["../../src/constants/emojiData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,EAUhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,EAue9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,CAE1D,CAAC"}
@@ -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,O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AAW;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,CA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