@elia-ori/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.
- package/dist/index.cjs +4928 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +128 -0
- package/dist/index.d.ts +128 -0
- package/dist/index.js +4893 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/editor.css +277 -0
- package/dist/styles/editor.css.map +1 -0
- package/dist/styles/editor.d.cts +2 -0
- package/dist/styles/editor.d.ts +2 -0
- package/package.json +92 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/* src/styles/editor.css */
|
|
2
|
+
.tiptap-editor {
|
|
3
|
+
h1 {
|
|
4
|
+
font-size: 1.5rem;
|
|
5
|
+
font-weight: 700;
|
|
6
|
+
margin-bottom: 1rem;
|
|
7
|
+
margin-top: 1.5rem;
|
|
8
|
+
line-height: 1.25;
|
|
9
|
+
}
|
|
10
|
+
h2 {
|
|
11
|
+
font-size: 1.25rem;
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
margin-bottom: 0.75rem;
|
|
14
|
+
margin-top: 1.25rem;
|
|
15
|
+
line-height: 1.375;
|
|
16
|
+
}
|
|
17
|
+
h3 {
|
|
18
|
+
font-size: 1.125rem;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
margin-bottom: 0.5rem;
|
|
21
|
+
margin-top: 1rem;
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
}
|
|
24
|
+
p {
|
|
25
|
+
margin-top: 0.5rem;
|
|
26
|
+
margin-bottom: 0.5rem;
|
|
27
|
+
line-height: 1.625;
|
|
28
|
+
}
|
|
29
|
+
ul {
|
|
30
|
+
list-style-type: disc;
|
|
31
|
+
margin-top: 0.5rem;
|
|
32
|
+
margin-bottom: 0.5rem;
|
|
33
|
+
padding-left: 1.5rem;
|
|
34
|
+
}
|
|
35
|
+
ol {
|
|
36
|
+
list-style-type: decimal;
|
|
37
|
+
margin-top: 0.5rem;
|
|
38
|
+
margin-bottom: 0.5rem;
|
|
39
|
+
padding-left: 1.5rem;
|
|
40
|
+
}
|
|
41
|
+
li {
|
|
42
|
+
margin-top: 0.25rem;
|
|
43
|
+
margin-bottom: 0.25rem;
|
|
44
|
+
}
|
|
45
|
+
li p {
|
|
46
|
+
margin: 0;
|
|
47
|
+
display: inline;
|
|
48
|
+
}
|
|
49
|
+
blockquote {
|
|
50
|
+
border-left-width: 4px;
|
|
51
|
+
border-left-color: color-mix(in srgb, var(--muted-foreground) 30%, transparent);
|
|
52
|
+
padding-left: 1rem;
|
|
53
|
+
font-style: italic;
|
|
54
|
+
margin-top: 1rem;
|
|
55
|
+
margin-bottom: 1rem;
|
|
56
|
+
}
|
|
57
|
+
code {
|
|
58
|
+
background-color: var(--muted);
|
|
59
|
+
padding-left: 0.375rem;
|
|
60
|
+
padding-right: 0.375rem;
|
|
61
|
+
padding-top: 0.125rem;
|
|
62
|
+
padding-bottom: 0.125rem;
|
|
63
|
+
border-radius: 0.25rem;
|
|
64
|
+
font-size: 0.875rem;
|
|
65
|
+
font-family:
|
|
66
|
+
ui-monospace,
|
|
67
|
+
SFMono-Regular,
|
|
68
|
+
Menlo,
|
|
69
|
+
Monaco,
|
|
70
|
+
Consolas,
|
|
71
|
+
"Liberation Mono",
|
|
72
|
+
"Courier New",
|
|
73
|
+
monospace;
|
|
74
|
+
}
|
|
75
|
+
pre {
|
|
76
|
+
background-color: var(--muted);
|
|
77
|
+
padding: 1rem;
|
|
78
|
+
border-radius: 0.375rem;
|
|
79
|
+
margin-top: 1rem;
|
|
80
|
+
margin-bottom: 1rem;
|
|
81
|
+
overflow-x: auto;
|
|
82
|
+
}
|
|
83
|
+
pre code {
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
padding: 0;
|
|
86
|
+
}
|
|
87
|
+
a {
|
|
88
|
+
color: var(--primary);
|
|
89
|
+
text-decoration: underline;
|
|
90
|
+
text-underline-offset: 4px;
|
|
91
|
+
}
|
|
92
|
+
mark {
|
|
93
|
+
background-color: #fef08a;
|
|
94
|
+
padding-left: 0.125rem;
|
|
95
|
+
padding-right: 0.125rem;
|
|
96
|
+
}
|
|
97
|
+
.dark mark {
|
|
98
|
+
background-color: #854d0e;
|
|
99
|
+
}
|
|
100
|
+
hr {
|
|
101
|
+
border-color: var(--border);
|
|
102
|
+
margin-top: 1.5rem;
|
|
103
|
+
margin-bottom: 1.5rem;
|
|
104
|
+
}
|
|
105
|
+
sub,
|
|
106
|
+
sup {
|
|
107
|
+
font-size: 0.75rem;
|
|
108
|
+
}
|
|
109
|
+
> p.is-editor-empty:first-child:last-child::before {
|
|
110
|
+
color: var(--muted-foreground);
|
|
111
|
+
pointer-events: none;
|
|
112
|
+
float: left;
|
|
113
|
+
height: 0;
|
|
114
|
+
content: attr(data-placeholder);
|
|
115
|
+
}
|
|
116
|
+
ul[data-type=taskList] {
|
|
117
|
+
list-style-type: none;
|
|
118
|
+
padding-left: 0;
|
|
119
|
+
margin-top: 0.5rem;
|
|
120
|
+
margin-bottom: 0.5rem;
|
|
121
|
+
}
|
|
122
|
+
ul[data-type=taskList] li {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
gap: 0.5rem;
|
|
126
|
+
margin-top: 0.25rem;
|
|
127
|
+
margin-bottom: 0.25rem;
|
|
128
|
+
}
|
|
129
|
+
ul[data-type=taskList] li > label {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
}
|
|
133
|
+
ul[data-type=taskList] li > label input[type=checkbox] {
|
|
134
|
+
width: 1rem;
|
|
135
|
+
height: 1rem;
|
|
136
|
+
border-radius: 0.25rem;
|
|
137
|
+
border-color: var(--input);
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
accent-color: var(--primary);
|
|
140
|
+
}
|
|
141
|
+
ul[data-type=taskList] li > div {
|
|
142
|
+
flex: 1;
|
|
143
|
+
}
|
|
144
|
+
ul[data-type=taskList] li > div p {
|
|
145
|
+
margin: 0;
|
|
146
|
+
display: inline;
|
|
147
|
+
}
|
|
148
|
+
table {
|
|
149
|
+
width: 100%;
|
|
150
|
+
border-collapse: collapse;
|
|
151
|
+
margin-top: 1rem;
|
|
152
|
+
margin-bottom: 1rem;
|
|
153
|
+
}
|
|
154
|
+
table th,
|
|
155
|
+
table td {
|
|
156
|
+
border: 1px solid var(--border);
|
|
157
|
+
padding-left: 0.75rem;
|
|
158
|
+
padding-right: 0.75rem;
|
|
159
|
+
padding-top: 0.5rem;
|
|
160
|
+
padding-bottom: 0.5rem;
|
|
161
|
+
text-align: left;
|
|
162
|
+
}
|
|
163
|
+
table th {
|
|
164
|
+
background-color: var(--muted);
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
}
|
|
167
|
+
table tr:hover td {
|
|
168
|
+
background-color: color-mix(in srgb, var(--muted) 30%, transparent);
|
|
169
|
+
}
|
|
170
|
+
img {
|
|
171
|
+
max-width: 100%;
|
|
172
|
+
height: auto;
|
|
173
|
+
border-radius: 0.375rem;
|
|
174
|
+
margin-top: 1rem;
|
|
175
|
+
margin-bottom: 1rem;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
178
|
+
}
|
|
179
|
+
img.ProseMirror-selectednode {
|
|
180
|
+
outline: 2px solid var(--primary);
|
|
181
|
+
outline-offset: 2px;
|
|
182
|
+
}
|
|
183
|
+
.tiptap-resize-container {
|
|
184
|
+
position: relative;
|
|
185
|
+
display: inline-block;
|
|
186
|
+
}
|
|
187
|
+
.tiptap-resize-handle {
|
|
188
|
+
position: absolute;
|
|
189
|
+
width: 0.75rem;
|
|
190
|
+
height: 0.75rem;
|
|
191
|
+
background-color: var(--primary);
|
|
192
|
+
border-radius: 9999px;
|
|
193
|
+
opacity: 0;
|
|
194
|
+
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
195
|
+
}
|
|
196
|
+
.tiptap-resize-handle:hover {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
.tiptap-resize-container:hover .tiptap-resize-handle,
|
|
200
|
+
.tiptap-resize-container.is-resizing .tiptap-resize-handle {
|
|
201
|
+
opacity: 1;
|
|
202
|
+
}
|
|
203
|
+
.tiptap-resize-handle[data-direction=top-left] {
|
|
204
|
+
top: -0.375rem;
|
|
205
|
+
left: -0.375rem;
|
|
206
|
+
cursor: nwse-resize;
|
|
207
|
+
}
|
|
208
|
+
.tiptap-resize-handle[data-direction=top-right] {
|
|
209
|
+
top: -0.375rem;
|
|
210
|
+
right: -0.375rem;
|
|
211
|
+
cursor: nesw-resize;
|
|
212
|
+
}
|
|
213
|
+
.tiptap-resize-handle[data-direction=bottom-left] {
|
|
214
|
+
bottom: -0.375rem;
|
|
215
|
+
left: -0.375rem;
|
|
216
|
+
cursor: nesw-resize;
|
|
217
|
+
}
|
|
218
|
+
.tiptap-resize-handle[data-direction=bottom-right] {
|
|
219
|
+
bottom: -0.375rem;
|
|
220
|
+
right: -0.375rem;
|
|
221
|
+
cursor: nwse-resize;
|
|
222
|
+
}
|
|
223
|
+
div[data-callout] {
|
|
224
|
+
padding-left: 1rem;
|
|
225
|
+
padding-right: 1rem;
|
|
226
|
+
padding-top: 0.75rem;
|
|
227
|
+
padding-bottom: 0.75rem;
|
|
228
|
+
border-radius: 0.5rem;
|
|
229
|
+
margin-top: 1rem;
|
|
230
|
+
margin-bottom: 1rem;
|
|
231
|
+
border-left-width: 4px;
|
|
232
|
+
}
|
|
233
|
+
div[data-callout][data-type=success] {
|
|
234
|
+
background-color: #ecfdf5;
|
|
235
|
+
border-left-color: #10b981;
|
|
236
|
+
color: #065f46;
|
|
237
|
+
}
|
|
238
|
+
.dark div[data-callout][data-type=success] {
|
|
239
|
+
background-color: #064e3b;
|
|
240
|
+
border-left-color: #10b981;
|
|
241
|
+
color: #d1fae5;
|
|
242
|
+
}
|
|
243
|
+
div[data-callout][data-type=warning] {
|
|
244
|
+
background-color: #fffbeb;
|
|
245
|
+
border-left-color: #f59e0b;
|
|
246
|
+
color: #92400e;
|
|
247
|
+
}
|
|
248
|
+
.dark div[data-callout][data-type=warning] {
|
|
249
|
+
background-color: #78350f;
|
|
250
|
+
border-left-color: #f59e0b;
|
|
251
|
+
color: #fef3c7;
|
|
252
|
+
}
|
|
253
|
+
div[data-callout][data-type=error] {
|
|
254
|
+
background-color: #fef2f2;
|
|
255
|
+
border-left-color: #ef4444;
|
|
256
|
+
color: #991b1b;
|
|
257
|
+
}
|
|
258
|
+
.dark div[data-callout][data-type=error] {
|
|
259
|
+
background-color: #7f1d1d;
|
|
260
|
+
border-left-color: #ef4444;
|
|
261
|
+
color: #fee2e2;
|
|
262
|
+
}
|
|
263
|
+
div[data-callout][data-type=info] {
|
|
264
|
+
background-color: #f0f9ff;
|
|
265
|
+
border-left-color: #0ea5e9;
|
|
266
|
+
color: #075985;
|
|
267
|
+
}
|
|
268
|
+
.dark div[data-callout][data-type=info] {
|
|
269
|
+
background-color: #082f49;
|
|
270
|
+
border-left-color: #0ea5e9;
|
|
271
|
+
color: #e0f2fe;
|
|
272
|
+
}
|
|
273
|
+
div[data-callout] p {
|
|
274
|
+
color: inherit;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/*# sourceMappingURL=editor.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/styles/editor.css"],"sourcesContent":["/* TipTap Editor Styles */\n.tiptap-editor {\n /* Headings */\n h1 {\n font-size: 1.5rem;\n font-weight: 700;\n margin-bottom: 1rem;\n margin-top: 1.5rem;\n line-height: 1.25;\n }\n\n h2 {\n font-size: 1.25rem;\n font-weight: 700;\n margin-bottom: 0.75rem;\n margin-top: 1.25rem;\n line-height: 1.375;\n }\n\n h3 {\n font-size: 1.125rem;\n font-weight: 600;\n margin-bottom: 0.5rem;\n margin-top: 1rem;\n line-height: 1.5;\n }\n\n /* Paragraphs */\n p {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n line-height: 1.625;\n }\n\n /* Lists */\n ul {\n list-style-type: disc;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n padding-left: 1.5rem;\n }\n\n ol {\n list-style-type: decimal;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n padding-left: 1.5rem;\n }\n\n li {\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n }\n\n li p {\n margin: 0;\n display: inline;\n }\n\n /* Blockquote */\n blockquote {\n border-left-width: 4px;\n border-left-color: color-mix(in srgb, var(--muted-foreground) 30%, transparent);\n padding-left: 1rem;\n font-style: italic;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n\n /* Code */\n code {\n background-color: var(--muted);\n padding-left: 0.375rem;\n padding-right: 0.375rem;\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n border-radius: 0.25rem;\n font-size: 0.875rem;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n }\n\n pre {\n background-color: var(--muted);\n padding: 1rem;\n border-radius: 0.375rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n overflow-x: auto;\n }\n\n pre code {\n background-color: transparent;\n padding: 0;\n }\n\n /* Links */\n a {\n color: var(--primary);\n text-decoration: underline;\n text-underline-offset: 4px;\n }\n\n /* Mark (Highlight) */\n mark {\n background-color: #fef08a;\n padding-left: 0.125rem;\n padding-right: 0.125rem;\n }\n\n .dark mark {\n background-color: #854d0e;\n }\n\n /* Horizontal Rule */\n hr {\n border-color: var(--border);\n margin-top: 1.5rem;\n margin-bottom: 1.5rem;\n }\n\n /* Subscript & Superscript */\n sub,\n sup {\n font-size: 0.75rem;\n }\n\n /* Placeholder - only show when editor has a single empty paragraph */\n > p.is-editor-empty:first-child:last-child::before {\n color: var(--muted-foreground);\n pointer-events: none;\n float: left;\n height: 0;\n content: attr(data-placeholder);\n }\n\n /* Task List */\n ul[data-type=\"taskList\"] {\n list-style-type: none;\n padding-left: 0;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n\n ul[data-type=\"taskList\"] li {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n }\n\n ul[data-type=\"taskList\"] li > label {\n display: flex;\n align-items: center;\n }\n\n ul[data-type=\"taskList\"] li > label input[type=\"checkbox\"] {\n width: 1rem;\n height: 1rem;\n border-radius: 0.25rem;\n border-color: var(--input);\n cursor: pointer;\n accent-color: var(--primary);\n }\n\n ul[data-type=\"taskList\"] li > div {\n flex: 1;\n }\n\n ul[data-type=\"taskList\"] li > div p {\n margin: 0;\n display: inline;\n }\n\n /* Table */\n table {\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n\n table th,\n table td {\n border: 1px solid var(--border);\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n text-align: left;\n }\n\n table th {\n background-color: var(--muted);\n font-weight: 600;\n }\n\n table tr:hover td {\n background-color: color-mix(in srgb, var(--muted) 30%, transparent);\n }\n\n /* Image */\n img {\n max-width: 100%;\n height: auto;\n border-radius: 0.375rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n cursor: pointer;\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n img.ProseMirror-selectednode {\n outline: 2px solid var(--primary);\n outline-offset: 2px;\n }\n\n /* Resizable Image */\n .tiptap-resize-container {\n position: relative;\n display: inline-block;\n }\n\n .tiptap-resize-handle {\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n background-color: var(--primary);\n border-radius: 9999px;\n opacity: 0;\n transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .tiptap-resize-handle:hover {\n opacity: 1;\n }\n\n .tiptap-resize-container:hover .tiptap-resize-handle,\n .tiptap-resize-container.is-resizing .tiptap-resize-handle {\n opacity: 1;\n }\n\n .tiptap-resize-handle[data-direction=\"top-left\"] {\n top: -0.375rem;\n left: -0.375rem;\n cursor: nwse-resize;\n }\n\n .tiptap-resize-handle[data-direction=\"top-right\"] {\n top: -0.375rem;\n right: -0.375rem;\n cursor: nesw-resize;\n }\n\n .tiptap-resize-handle[data-direction=\"bottom-left\"] {\n bottom: -0.375rem;\n left: -0.375rem;\n cursor: nesw-resize;\n }\n\n .tiptap-resize-handle[data-direction=\"bottom-right\"] {\n bottom: -0.375rem;\n right: -0.375rem;\n cursor: nwse-resize;\n }\n\n /* Callout */\n div[data-callout] {\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n border-radius: 0.5rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n border-left-width: 4px;\n }\n\n div[data-callout][data-type=\"success\"] {\n background-color: #ecfdf5;\n border-left-color: #10b981;\n color: #065f46;\n }\n\n .dark div[data-callout][data-type=\"success\"] {\n background-color: #064e3b;\n border-left-color: #10b981;\n color: #d1fae5;\n }\n\n div[data-callout][data-type=\"warning\"] {\n background-color: #fffbeb;\n border-left-color: #f59e0b;\n color: #92400e;\n }\n\n .dark div[data-callout][data-type=\"warning\"] {\n background-color: #78350f;\n border-left-color: #f59e0b;\n color: #fef3c7;\n }\n\n div[data-callout][data-type=\"error\"] {\n background-color: #fef2f2;\n border-left-color: #ef4444;\n color: #991b1b;\n }\n\n .dark div[data-callout][data-type=\"error\"] {\n background-color: #7f1d1d;\n border-left-color: #ef4444;\n color: #fee2e2;\n }\n\n div[data-callout][data-type=\"info\"] {\n background-color: #f0f9ff;\n border-left-color: #0ea5e9;\n color: #075985;\n }\n\n .dark div[data-callout][data-type=\"info\"] {\n background-color: #082f49;\n border-left-color: #0ea5e9;\n color: #e0f2fe;\n }\n\n div[data-callout] p {\n color: inherit;\n }\n}\n"],"mappings":";AACA,CAAC;AAEC;AACE,eAAW;AACX,iBAAa;AACb,mBAAe;AACf,gBAAY;AACZ,iBAAa;AACf;AAEA;AACE,eAAW;AACX,iBAAa;AACb,mBAAe;AACf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O;AACT;AAEA,KAAG,CAAC,cAAc;AAChB,WAAO;AACT;AACF;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elia-ori/editor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "基於 TipTap 的富文字編輯器套件",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./dist/styles/editor.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "tsup --watch",
|
|
22
|
+
"build": "tsup"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"lucide-react": ">=0.400.0",
|
|
26
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
27
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@tiptap/pm": "^3.15.0",
|
|
31
|
+
"@tiptap/react": "^3.15.0",
|
|
32
|
+
"@tiptap/starter-kit": "^3.15.0",
|
|
33
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
34
|
+
"@radix-ui/react-toggle": "^1.1.0",
|
|
35
|
+
"@tiptap/extension-color": "^3.15.3",
|
|
36
|
+
"@tiptap/extension-highlight": "^3.15.3",
|
|
37
|
+
"@tiptap/extension-image": "^3.15.3",
|
|
38
|
+
"@tiptap/extension-link": "^3.15.3",
|
|
39
|
+
"@tiptap/extension-placeholder": "^3.15.3",
|
|
40
|
+
"@tiptap/extension-subscript": "^3.15.3",
|
|
41
|
+
"@tiptap/extension-superscript": "^3.15.3",
|
|
42
|
+
"@tiptap/extension-table": "^3.15.3",
|
|
43
|
+
"@tiptap/extension-table-cell": "^3.15.3",
|
|
44
|
+
"@tiptap/extension-table-header": "^3.15.3",
|
|
45
|
+
"@tiptap/extension-table-row": "^3.15.3",
|
|
46
|
+
"@tiptap/extension-task-item": "^3.15.3",
|
|
47
|
+
"@tiptap/extension-task-list": "^3.15.3",
|
|
48
|
+
"@tiptap/extension-text-align": "^3.15.3",
|
|
49
|
+
"@tiptap/extension-text-style": "^3.15.3",
|
|
50
|
+
"@tiptap/extension-underline": "^3.15.3",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"tailwind-merge": "^3.4.0",
|
|
53
|
+
"tiptap-extension-resize-image": "^1.3.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@tiptap/pm": "^3.15.3",
|
|
57
|
+
"@tiptap/react": "^3.15.3",
|
|
58
|
+
"@tiptap/starter-kit": "^3.15.3",
|
|
59
|
+
"@types/node": "^24.3.0",
|
|
60
|
+
"@types/react": "^19.2.4",
|
|
61
|
+
"@types/react-dom": "^19.2.3",
|
|
62
|
+
"lucide-react": "^0.556.0",
|
|
63
|
+
"react": "^19.2.3",
|
|
64
|
+
"react-dom": "^19.2.3",
|
|
65
|
+
"tailwindcss": "^4.1.17",
|
|
66
|
+
"tsup": "^8.0.0",
|
|
67
|
+
"typescript": "^5.9.2"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=18.0.0"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"repository": {
|
|
76
|
+
"type": "git",
|
|
77
|
+
"url": "git+https://github.com/elia-ori/elia-editor.git"
|
|
78
|
+
},
|
|
79
|
+
"bugs": {
|
|
80
|
+
"url": "https://github.com/elia-ori/elia-editor/issues"
|
|
81
|
+
},
|
|
82
|
+
"homepage": "https://github.com/elia-ori/elia-editor#readme",
|
|
83
|
+
"keywords": [
|
|
84
|
+
"react",
|
|
85
|
+
"tiptap",
|
|
86
|
+
"editor",
|
|
87
|
+
"rich-text",
|
|
88
|
+
"wysiwyg"
|
|
89
|
+
],
|
|
90
|
+
"author": "Elia",
|
|
91
|
+
"license": "MIT"
|
|
92
|
+
}
|