@nextblock-cms/editor 0.14.0 → 0.14.2
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/index.css +1 -1
- package/index.js +70 -70
- package/index.mjs +9535 -9535
- package/package.json +1 -1
- package/styles/advanced-features.css +33 -33
- package/styles/drag-handle.css +162 -162
- package/styles/editor.css +252 -252
package/styles/editor.css
CHANGED
|
@@ -1,252 +1,252 @@
|
|
|
1
|
-
@import "tailwindcss/theme";
|
|
2
|
-
@config "../../../../tailwind.config.js";
|
|
3
|
-
/* libs/editor/src/styles/editor.css */
|
|
4
|
-
|
|
5
|
-
.is-editor-empty,
|
|
6
|
-
.is-empty {
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ProseMirror .is-editor-empty::before,
|
|
11
|
-
.ProseMirror .is-empty::before {
|
|
12
|
-
content: attr(data-placeholder);
|
|
13
|
-
color: #94a3b8;
|
|
14
|
-
font-style: italic;
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
opacity: 0.7;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ProseMirror .is-empty::before {
|
|
20
|
-
float: left;
|
|
21
|
-
height: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ProseMirror .is-empty-heading-1::before {
|
|
25
|
-
font-size: 2.25rem;
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.ProseMirror .is-empty-heading-2::before {
|
|
30
|
-
font-size: 1.875rem;
|
|
31
|
-
font-weight: 600;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ProseMirror .is-empty-heading-3::before {
|
|
35
|
-
font-size: 1.5rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tiptap h1,
|
|
40
|
-
.tiptap h2,
|
|
41
|
-
.tiptap h3,
|
|
42
|
-
.tiptap h4,
|
|
43
|
-
.tiptap h5,
|
|
44
|
-
.tiptap h6 {
|
|
45
|
-
margin-top: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.ProseMirror .is-empty-blockquote::before {
|
|
49
|
-
font-style: italic;
|
|
50
|
-
opacity: 0.6;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ProseMirror .is-empty-code-block::before {
|
|
54
|
-
font-family: var(--font-mono, ui-monospace, SFMono-Regular, SFMono, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace);
|
|
55
|
-
font-size: 0.9rem;
|
|
56
|
-
opacity: 0.5;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Suppress placeholder floats inside table cells to keep caret aligned */
|
|
60
|
-
.ProseMirror td .is-empty::before,
|
|
61
|
-
.ProseMirror th .is-empty::before,
|
|
62
|
-
.ProseMirror td.is-empty::before,
|
|
63
|
-
.ProseMirror th.is-empty::before {
|
|
64
|
-
content: none;
|
|
65
|
-
display: none;
|
|
66
|
-
float: none;
|
|
67
|
-
height: auto;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.ProseMirror td.is-empty,
|
|
71
|
-
.ProseMirror th.is-empty {
|
|
72
|
-
position: static;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.ProseMirror table .is-empty::before {
|
|
76
|
-
content: none !important;
|
|
77
|
-
display: none !important;
|
|
78
|
-
float: none !important;
|
|
79
|
-
height: auto !important;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.ProseMirror table .is-empty {
|
|
84
|
-
position: static !important;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/* Custom text selection style */
|
|
89
|
-
/* Custom text selection style */
|
|
90
|
-
::selection {
|
|
91
|
-
background: rgba(59, 130, 246, 0.3); /* blue-500 with opacity */
|
|
92
|
-
color: inherit;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
::-moz-selection {
|
|
96
|
-
background: rgba(59, 130, 246, 0.3);
|
|
97
|
-
color: inherit;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Drag handle styles */
|
|
101
|
-
.tiptap-drag-handle {
|
|
102
|
-
position: absolute;
|
|
103
|
-
z-index: 50;
|
|
104
|
-
pointer-events: none;
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
transform: translateX(0);
|
|
109
|
-
transition: opacity 120ms var(--ease-out, ease), transform 120ms var(--ease-out, ease);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.tiptap-drag-handle__group {
|
|
113
|
-
pointer-events: auto;
|
|
114
|
-
display: inline-flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
gap: 0.125rem;
|
|
117
|
-
padding: 0.125rem 0.1rem;
|
|
118
|
-
border-radius: 0.5rem;
|
|
119
|
-
border: none;
|
|
120
|
-
background-color: transparent;
|
|
121
|
-
box-shadow: none;
|
|
122
|
-
color: color-mix(in srgb, hsl(var(--muted-foreground)) 80%, hsl(var(--foreground)) 20%);
|
|
123
|
-
transition:
|
|
124
|
-
background-color 120ms var(--ease-out, ease),
|
|
125
|
-
color 120ms var(--ease-out, ease);
|
|
126
|
-
min-height: 1.65rem;
|
|
127
|
-
line-height: 1;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.tiptap-drag-handle__group:hover,
|
|
131
|
-
.tiptap-drag-handle__group:focus-within {
|
|
132
|
-
background-color: transparent;
|
|
133
|
-
color: color-mix(in srgb, hsl(var(--foreground)) 90%, hsl(var(--muted-foreground)) 10%);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.dark .tiptap-drag-handle__group {
|
|
137
|
-
background-color: transparent;
|
|
138
|
-
border: none;
|
|
139
|
-
box-shadow: none;
|
|
140
|
-
color: color-mix(in srgb, hsl(var(--muted-foreground)) 85%, white 15%);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.tiptap-drag-handle__group[data-menu-open='true'] {
|
|
144
|
-
border: none;
|
|
145
|
-
background-color: transparent;
|
|
146
|
-
color: hsl(var(--primary));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.tiptap-drag-handle__button {
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
width: 1.3rem;
|
|
154
|
-
height: 1.3rem;
|
|
155
|
-
border-radius: 0.5rem;
|
|
156
|
-
border: none;
|
|
157
|
-
background-color: transparent;
|
|
158
|
-
color: inherit;
|
|
159
|
-
transition:
|
|
160
|
-
background-color 120ms var(--ease-out, ease),
|
|
161
|
-
border-color 120ms var(--ease-out, ease),
|
|
162
|
-
transform 120ms var(--ease-out, ease),
|
|
163
|
-
color 120ms var(--ease-out, ease);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.tiptap-drag-handle__button--ghost:hover,
|
|
167
|
-
.tiptap-drag-handle__button--ghost:focus-visible {
|
|
168
|
-
background-color: color-mix(in srgb, hsl(var(--muted)) 55%, transparent 45%);
|
|
169
|
-
border-color: transparent;
|
|
170
|
-
color: hsl(var(--foreground));
|
|
171
|
-
transform: translateY(-1px);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.dark .tiptap-drag-handle__button--ghost:hover,
|
|
175
|
-
.dark .tiptap-drag-handle__button--ghost:focus-visible {
|
|
176
|
-
background-color: color-mix(in srgb, hsl(var(--muted)) 68%, transparent 32%);
|
|
177
|
-
border-color: transparent;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.tiptap-drag-handle__button:active {
|
|
181
|
-
transform: translateY(0);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.tiptap-drag-handle__plus {
|
|
185
|
-
cursor: pointer;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.tiptap-drag-handle__grip {
|
|
189
|
-
cursor: grab;
|
|
190
|
-
border-left: none;
|
|
191
|
-
padding-left: 0.1rem;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.tiptap-drag-handle__grip:active {
|
|
195
|
-
cursor: grabbing;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
body.dragging {
|
|
199
|
-
cursor: grabbing !important;
|
|
200
|
-
user-select: none;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
body.dragging .tiptap-drag-handle__group {
|
|
204
|
-
box-shadow: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
body.dragging .tiptap-drag-handle__button {
|
|
208
|
-
background-color: color-mix(in srgb, hsl(var(--primary)) 18%, transparent 82%);
|
|
209
|
-
border-color: transparent;
|
|
210
|
-
color: hsl(var(--primary-foreground));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.tiptap-drag-handle__icon {
|
|
214
|
-
width: 0.85rem;
|
|
215
|
-
height: 0.85rem;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.tiptap-drag-handle__icon--filled {
|
|
219
|
-
width: 0.95rem;
|
|
220
|
-
height: 0.95rem;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.tiptap-drag-hover-target {
|
|
224
|
-
position: relative;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.tiptap-drag-hover-target::before {
|
|
228
|
-
content: '';
|
|
229
|
-
position: absolute;
|
|
230
|
-
left: -0.75rem;
|
|
231
|
-
right: -0.75rem;
|
|
232
|
-
top: -0.5rem;
|
|
233
|
-
bottom: -0.5rem;
|
|
234
|
-
border-radius: 0.75rem;
|
|
235
|
-
border: 1px dashed transparent;
|
|
236
|
-
transition: border-color 120ms var(--ease-out, ease);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.tiptap-drag-hover-target.is-drag-over::before {
|
|
240
|
-
border-color: hsl(var(--primary));
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
@media (max-width: 768px) {
|
|
244
|
-
.tiptap-drag-handle {
|
|
245
|
-
transform: translateX(calc(-100% - 0.5rem));
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.tiptap-drag-handle__group {
|
|
249
|
-
gap: 0.1rem;
|
|
250
|
-
padding: 0.15rem 0.2rem;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
1
|
+
@import "tailwindcss/theme";
|
|
2
|
+
@config "../../../../tailwind.config.js";
|
|
3
|
+
/* libs/editor/src/styles/editor.css */
|
|
4
|
+
|
|
5
|
+
.is-editor-empty,
|
|
6
|
+
.is-empty {
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ProseMirror .is-editor-empty::before,
|
|
11
|
+
.ProseMirror .is-empty::before {
|
|
12
|
+
content: attr(data-placeholder);
|
|
13
|
+
color: #94a3b8;
|
|
14
|
+
font-style: italic;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
opacity: 0.7;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ProseMirror .is-empty::before {
|
|
20
|
+
float: left;
|
|
21
|
+
height: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ProseMirror .is-empty-heading-1::before {
|
|
25
|
+
font-size: 2.25rem;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ProseMirror .is-empty-heading-2::before {
|
|
30
|
+
font-size: 1.875rem;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ProseMirror .is-empty-heading-3::before {
|
|
35
|
+
font-size: 1.5rem;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tiptap h1,
|
|
40
|
+
.tiptap h2,
|
|
41
|
+
.tiptap h3,
|
|
42
|
+
.tiptap h4,
|
|
43
|
+
.tiptap h5,
|
|
44
|
+
.tiptap h6 {
|
|
45
|
+
margin-top: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ProseMirror .is-empty-blockquote::before {
|
|
49
|
+
font-style: italic;
|
|
50
|
+
opacity: 0.6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ProseMirror .is-empty-code-block::before {
|
|
54
|
+
font-family: var(--font-mono, ui-monospace, SFMono-Regular, SFMono, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace);
|
|
55
|
+
font-size: 0.9rem;
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Suppress placeholder floats inside table cells to keep caret aligned */
|
|
60
|
+
.ProseMirror td .is-empty::before,
|
|
61
|
+
.ProseMirror th .is-empty::before,
|
|
62
|
+
.ProseMirror td.is-empty::before,
|
|
63
|
+
.ProseMirror th.is-empty::before {
|
|
64
|
+
content: none;
|
|
65
|
+
display: none;
|
|
66
|
+
float: none;
|
|
67
|
+
height: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ProseMirror td.is-empty,
|
|
71
|
+
.ProseMirror th.is-empty {
|
|
72
|
+
position: static;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ProseMirror table .is-empty::before {
|
|
76
|
+
content: none !important;
|
|
77
|
+
display: none !important;
|
|
78
|
+
float: none !important;
|
|
79
|
+
height: auto !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
.ProseMirror table .is-empty {
|
|
84
|
+
position: static !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/* Custom text selection style */
|
|
89
|
+
/* Custom text selection style */
|
|
90
|
+
::selection {
|
|
91
|
+
background: rgba(59, 130, 246, 0.3); /* blue-500 with opacity */
|
|
92
|
+
color: inherit;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
::-moz-selection {
|
|
96
|
+
background: rgba(59, 130, 246, 0.3);
|
|
97
|
+
color: inherit;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Drag handle styles */
|
|
101
|
+
.tiptap-drag-handle {
|
|
102
|
+
position: absolute;
|
|
103
|
+
z-index: 50;
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
transform: translateX(0);
|
|
109
|
+
transition: opacity 120ms var(--ease-out, ease), transform 120ms var(--ease-out, ease);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.tiptap-drag-handle__group {
|
|
113
|
+
pointer-events: auto;
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: 0.125rem;
|
|
117
|
+
padding: 0.125rem 0.1rem;
|
|
118
|
+
border-radius: 0.5rem;
|
|
119
|
+
border: none;
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
box-shadow: none;
|
|
122
|
+
color: color-mix(in srgb, hsl(var(--muted-foreground)) 80%, hsl(var(--foreground)) 20%);
|
|
123
|
+
transition:
|
|
124
|
+
background-color 120ms var(--ease-out, ease),
|
|
125
|
+
color 120ms var(--ease-out, ease);
|
|
126
|
+
min-height: 1.65rem;
|
|
127
|
+
line-height: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.tiptap-drag-handle__group:hover,
|
|
131
|
+
.tiptap-drag-handle__group:focus-within {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: color-mix(in srgb, hsl(var(--foreground)) 90%, hsl(var(--muted-foreground)) 10%);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dark .tiptap-drag-handle__group {
|
|
137
|
+
background-color: transparent;
|
|
138
|
+
border: none;
|
|
139
|
+
box-shadow: none;
|
|
140
|
+
color: color-mix(in srgb, hsl(var(--muted-foreground)) 85%, white 15%);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.tiptap-drag-handle__group[data-menu-open='true'] {
|
|
144
|
+
border: none;
|
|
145
|
+
background-color: transparent;
|
|
146
|
+
color: hsl(var(--primary));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.tiptap-drag-handle__button {
|
|
150
|
+
display: inline-flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
width: 1.3rem;
|
|
154
|
+
height: 1.3rem;
|
|
155
|
+
border-radius: 0.5rem;
|
|
156
|
+
border: none;
|
|
157
|
+
background-color: transparent;
|
|
158
|
+
color: inherit;
|
|
159
|
+
transition:
|
|
160
|
+
background-color 120ms var(--ease-out, ease),
|
|
161
|
+
border-color 120ms var(--ease-out, ease),
|
|
162
|
+
transform 120ms var(--ease-out, ease),
|
|
163
|
+
color 120ms var(--ease-out, ease);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.tiptap-drag-handle__button--ghost:hover,
|
|
167
|
+
.tiptap-drag-handle__button--ghost:focus-visible {
|
|
168
|
+
background-color: color-mix(in srgb, hsl(var(--muted)) 55%, transparent 45%);
|
|
169
|
+
border-color: transparent;
|
|
170
|
+
color: hsl(var(--foreground));
|
|
171
|
+
transform: translateY(-1px);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dark .tiptap-drag-handle__button--ghost:hover,
|
|
175
|
+
.dark .tiptap-drag-handle__button--ghost:focus-visible {
|
|
176
|
+
background-color: color-mix(in srgb, hsl(var(--muted)) 68%, transparent 32%);
|
|
177
|
+
border-color: transparent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.tiptap-drag-handle__button:active {
|
|
181
|
+
transform: translateY(0);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.tiptap-drag-handle__plus {
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tiptap-drag-handle__grip {
|
|
189
|
+
cursor: grab;
|
|
190
|
+
border-left: none;
|
|
191
|
+
padding-left: 0.1rem;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.tiptap-drag-handle__grip:active {
|
|
195
|
+
cursor: grabbing;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
body.dragging {
|
|
199
|
+
cursor: grabbing !important;
|
|
200
|
+
user-select: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
body.dragging .tiptap-drag-handle__group {
|
|
204
|
+
box-shadow: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
body.dragging .tiptap-drag-handle__button {
|
|
208
|
+
background-color: color-mix(in srgb, hsl(var(--primary)) 18%, transparent 82%);
|
|
209
|
+
border-color: transparent;
|
|
210
|
+
color: hsl(var(--primary-foreground));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tiptap-drag-handle__icon {
|
|
214
|
+
width: 0.85rem;
|
|
215
|
+
height: 0.85rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.tiptap-drag-handle__icon--filled {
|
|
219
|
+
width: 0.95rem;
|
|
220
|
+
height: 0.95rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.tiptap-drag-hover-target {
|
|
224
|
+
position: relative;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.tiptap-drag-hover-target::before {
|
|
228
|
+
content: '';
|
|
229
|
+
position: absolute;
|
|
230
|
+
left: -0.75rem;
|
|
231
|
+
right: -0.75rem;
|
|
232
|
+
top: -0.5rem;
|
|
233
|
+
bottom: -0.5rem;
|
|
234
|
+
border-radius: 0.75rem;
|
|
235
|
+
border: 1px dashed transparent;
|
|
236
|
+
transition: border-color 120ms var(--ease-out, ease);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.tiptap-drag-hover-target.is-drag-over::before {
|
|
240
|
+
border-color: hsl(var(--primary));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media (max-width: 768px) {
|
|
244
|
+
.tiptap-drag-handle {
|
|
245
|
+
transform: translateX(calc(-100% - 0.5rem));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.tiptap-drag-handle__group {
|
|
249
|
+
gap: 0.1rem;
|
|
250
|
+
padding: 0.15rem 0.2rem;
|
|
251
|
+
}
|
|
252
|
+
}
|