@thangph2146/lexical-editor 0.0.5 → 0.0.7
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/README.md +47 -0
- package/dist/editor-x/editor.cjs +610 -493
- package/dist/editor-x/editor.cjs.map +1 -1
- package/dist/editor-x/editor.css +157 -69
- package/dist/editor-x/editor.css.map +1 -1
- package/dist/editor-x/editor.d.cts +2 -1
- package/dist/editor-x/editor.d.ts +2 -1
- package/dist/editor-x/editor.js +350 -233
- package/dist/editor-x/editor.js.map +1 -1
- package/dist/index.cjs +620 -501
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +157 -69
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +354 -235
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/src/components/lexical-editor.tsx +2 -0
- package/src/editor-x/editor.tsx +4 -2
- package/src/editor-x/plugins.tsx +7 -6
- package/src/plugins/images-plugin.tsx +3 -2
- package/src/plugins/layout-plugin.tsx +96 -61
- package/src/themes/_mixins.scss +12 -7
- package/src/themes/_variables.scss +2 -1
- package/src/themes/core/_reset.scss +10 -6
- package/src/themes/plugins/_color-picker.scss +1 -0
- package/src/themes/plugins/_layout.scss +3 -7
- package/src/themes/plugins/_list-color.scss +2 -0
- package/src/themes/plugins/_toolbar.scss +7 -7
- package/src/themes/ui-components/_button.scss +3 -3
- package/src/themes/ui-components/_flex.scss +2 -0
- package/src/themes/ui-components/_number-input.scss +81 -0
- package/src/themes/ui-components/_text-utilities.scss +1 -1
- package/src/themes/ui-components.scss +1 -0
- package/src/ui/flex.tsx +9 -2
- package/src/ui/number-input.tsx +104 -0
- package/src/themes/editor-theme copy.scss +0 -763
- package/src/themes/plugins copy.scss +0 -656
- package/src/themes/ui-components copy.scss +0 -1335
|
@@ -1,656 +0,0 @@
|
|
|
1
|
-
@use "variables" as *;
|
|
2
|
-
@use "mixins" as *;
|
|
3
|
-
|
|
4
|
-
// ==========================================
|
|
5
|
-
// 1. TOOLBAR COMPONENTS
|
|
6
|
-
// ==========================================
|
|
7
|
-
|
|
8
|
-
.editor-toolbar {
|
|
9
|
-
position: sticky;
|
|
10
|
-
top: 0; // Will be overridden by inline style from ToolbarPlugin
|
|
11
|
-
z-index: $editor-z-index-toolbar;
|
|
12
|
-
@include flex-center;
|
|
13
|
-
flex-wrap: wrap;
|
|
14
|
-
gap: $editor-gap-1;
|
|
15
|
-
border-bottom: $editor-border-width solid var(--border);
|
|
16
|
-
border-top-left-radius: $editor-border-radius;
|
|
17
|
-
border-top-right-radius: $editor-border-radius;
|
|
18
|
-
@include backdrop-blur($editor-dialog-overlay-blur, rgba(255, 255, 255, 0.8));
|
|
19
|
-
padding: $editor-gap-1;
|
|
20
|
-
@include shadow-sm;
|
|
21
|
-
width: 100%;
|
|
22
|
-
overflow-x: visible;
|
|
23
|
-
overflow-y: visible;
|
|
24
|
-
white-space: normal;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.editor-toolbar-group {
|
|
28
|
-
@include flex-center;
|
|
29
|
-
gap: $editor-gap-1;
|
|
30
|
-
padding: $editor-gap-1;
|
|
31
|
-
@include rounded-md;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Note: Toolbar items and select triggers are defined in ui-components.scss
|
|
35
|
-
|
|
36
|
-
.editor-toolbar-separator {
|
|
37
|
-
height: $editor-icon-size-lg !important; // h-6 (standard separator height)
|
|
38
|
-
margin-left: $editor-gap-1;
|
|
39
|
-
margin-right: $editor-gap-1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// ==========================================
|
|
43
|
-
// 2. FLOATING TOOLBARS & OVERLAYS
|
|
44
|
-
// ==========================================
|
|
45
|
-
|
|
46
|
-
.editor-floating-toolbar {
|
|
47
|
-
@include floating-toolbar-base;
|
|
48
|
-
@include backdrop-blur(8px, rgba(var(--background-rgb, 255, 255, 255), 0.85));
|
|
49
|
-
max-width: $editor-floating-toolbar-max-width;
|
|
50
|
-
flex-wrap: wrap;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.editor-floating-text-format {
|
|
54
|
-
@include floating-toolbar-base;
|
|
55
|
-
@include backdrop-blur(8px, rgba(var(--background-rgb, 255, 255, 255), 0.8));
|
|
56
|
-
@include backdrop-blur-dark(8px, rgba(var(--background-rgb, 15, 15, 15), 0.8));
|
|
57
|
-
|
|
58
|
-
// Hover effect for the whole bar
|
|
59
|
-
&:hover {
|
|
60
|
-
@include shadow-xl;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Divider between groups
|
|
64
|
-
.editor-separator--vertical {
|
|
65
|
-
height: $editor-gap-5;
|
|
66
|
-
width: $editor-border-width;
|
|
67
|
-
margin: 0 $editor-gap-1;
|
|
68
|
-
background-color: var(--border);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Custom styling for buttons in floating toolbar
|
|
72
|
-
.editor-toggle-group-item, .editor-btn, .editor-toolbar-item {
|
|
73
|
-
border: none;
|
|
74
|
-
border-radius: calc($editor-border-radius - 4px);
|
|
75
|
-
@include control-size(30px);
|
|
76
|
-
padding: 0;
|
|
77
|
-
background-color: transparent;
|
|
78
|
-
transition: all $editor-transition-normal;
|
|
79
|
-
@include flex-center-justify;
|
|
80
|
-
|
|
81
|
-
&:hover {
|
|
82
|
-
background-color: $editor-accent-color;
|
|
83
|
-
color: $editor-accent-foreground-color;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&[data-state="on"], &[data-state="active"], &--active {
|
|
87
|
-
background-color: $editor-accent-color;
|
|
88
|
-
color: $editor-accent-foreground-color !important;
|
|
89
|
-
font-weight: $editor-font-weight-bold;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Group of buttons with border as requested
|
|
94
|
-
.editor-floating-group, .editor-floating-group--lg {
|
|
95
|
-
@include flex-center;
|
|
96
|
-
gap: $editor-gap-0-5;
|
|
97
|
-
padding: $editor-gap-0-5;
|
|
98
|
-
border-radius: calc($editor-border-radius - 2px);
|
|
99
|
-
// Remove border from inner groups to make it cleaner
|
|
100
|
-
border: none;
|
|
101
|
-
background-color: transparent;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ==========================================
|
|
106
|
-
// 3. PLUGIN SPECIFIC STYLES
|
|
107
|
-
// ==========================================
|
|
108
|
-
|
|
109
|
-
// --- List Color Plugin ---
|
|
110
|
-
.editor-list-color-dialog {
|
|
111
|
-
padding: $editor-gap-2 0;
|
|
112
|
-
animation: editor-fade-in $editor-transition-slow;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.editor-list-color-trigger {
|
|
116
|
-
height: $editor-control-size-xl;
|
|
117
|
-
width: 100%;
|
|
118
|
-
@include flex-center;
|
|
119
|
-
justify-content: flex-start;
|
|
120
|
-
gap: $editor-gap-3;
|
|
121
|
-
@include rounded-md;
|
|
122
|
-
border: $editor-border-width solid var(--input);
|
|
123
|
-
padding: 0 $editor-gap-4;
|
|
124
|
-
background-color: var(--background);
|
|
125
|
-
transition: all $editor-transition-normal;
|
|
126
|
-
@include shadow-sm;
|
|
127
|
-
|
|
128
|
-
@include editor-button-interactive;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// --- Color Picker ---
|
|
132
|
-
.editor-color-picker-content {
|
|
133
|
-
@include flex-col;
|
|
134
|
-
gap: $editor-gap-4;
|
|
135
|
-
padding: $editor-gap-4;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.editor-color-picker-area {
|
|
139
|
-
position: relative;
|
|
140
|
-
height: $editor-color-picker-height; // h-40
|
|
141
|
-
width: 100%;
|
|
142
|
-
cursor: crosshair;
|
|
143
|
-
touch-action: none;
|
|
144
|
-
@include rounded-sm;
|
|
145
|
-
border: $editor-border-width solid var(--border);
|
|
146
|
-
overflow: hidden;
|
|
147
|
-
|
|
148
|
-
&[data-disabled="true"] {
|
|
149
|
-
pointer-events: none;
|
|
150
|
-
opacity: $editor-opacity-disabled;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.editor-slider-root {
|
|
155
|
-
position: relative;
|
|
156
|
-
@include flex-center;
|
|
157
|
-
width: 100%;
|
|
158
|
-
touch-action: none;
|
|
159
|
-
user-select: none;
|
|
160
|
-
|
|
161
|
-
&[data-disabled] {
|
|
162
|
-
opacity: $editor-opacity-disabled;
|
|
163
|
-
pointer-events: none;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.editor-slider-track {
|
|
168
|
-
position: relative;
|
|
169
|
-
height: $editor-gap-3; // h-3
|
|
170
|
-
width: 100%;
|
|
171
|
-
flex-grow: 1;
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
@include rounded-full;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.editor-slider-thumb {
|
|
177
|
-
display: block;
|
|
178
|
-
@include control-size($editor-icon-size-sm);
|
|
179
|
-
@include rounded-full;
|
|
180
|
-
border: $editor-border-width solid var(--border); // border-primary/50
|
|
181
|
-
background-color: var(--background);
|
|
182
|
-
@include shadow-sm;
|
|
183
|
-
transition: background-color $editor-transition-fast, border-color $editor-transition-fast;
|
|
184
|
-
|
|
185
|
-
&:focus-visible {
|
|
186
|
-
@include focus-ring;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.editor-color-swatch {
|
|
191
|
-
box-sizing: border-box;
|
|
192
|
-
@include control-size($editor-control-size-sm);
|
|
193
|
-
@include rounded-sm;
|
|
194
|
-
border: $editor-border-width solid var(--border);
|
|
195
|
-
@include shadow-sm;
|
|
196
|
-
|
|
197
|
-
&--disabled {
|
|
198
|
-
opacity: $editor-opacity-disabled;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.editor-color-presets {
|
|
203
|
-
@include flex-center;
|
|
204
|
-
gap: $editor-gap-2;
|
|
205
|
-
width: 100%;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.editor-color-preset-item {
|
|
209
|
-
height: $editor-control-size-sm;
|
|
210
|
-
padding-left: $editor-gap-2;
|
|
211
|
-
padding-right: $editor-gap-2;
|
|
212
|
-
flex: 1;
|
|
213
|
-
|
|
214
|
-
&__preview {
|
|
215
|
-
@include control-size($editor-gap-3);
|
|
216
|
-
@include rounded-full;
|
|
217
|
-
border: $editor-border-width solid var(--border);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
&__label {
|
|
221
|
-
font-family: $editor-font-family-mono;
|
|
222
|
-
@include text-sm;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.editor-color-value-text {
|
|
227
|
-
color: $editor-muted-foreground-color;
|
|
228
|
-
font-family: $editor-font-family-mono;
|
|
229
|
-
@include text-sm;
|
|
230
|
-
font-variant-numeric: tabular-nums;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// --- Table Plugin ---
|
|
234
|
-
.editor-table-dialog {
|
|
235
|
-
display: grid;
|
|
236
|
-
gap: $editor-gap-5;
|
|
237
|
-
padding: $editor-gap-2 0;
|
|
238
|
-
animation: editor-fade-in $editor-transition-slow;
|
|
239
|
-
|
|
240
|
-
&__group {
|
|
241
|
-
@include flex-col;
|
|
242
|
-
gap: $editor-gap-2;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&__checkbox-group {
|
|
246
|
-
@include flex-center;
|
|
247
|
-
gap: $editor-gap-3;
|
|
248
|
-
margin-top: $editor-gap-2;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// --- Image Plugin & Dialog Forms ---
|
|
253
|
-
.editor-image-grid {
|
|
254
|
-
display: grid;
|
|
255
|
-
grid-template-columns: repeat(4, 1fr);
|
|
256
|
-
gap: $editor-gap-2;
|
|
257
|
-
margin-bottom: $editor-gap-3;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.editor-image-btn {
|
|
261
|
-
position: relative;
|
|
262
|
-
aspect-ratio: 1 / 1;
|
|
263
|
-
@include rounded-sm;
|
|
264
|
-
overflow: hidden;
|
|
265
|
-
border: $editor-border-width-thick solid transparent;
|
|
266
|
-
transition: all $editor-transition-normal;
|
|
267
|
-
cursor: pointer;
|
|
268
|
-
padding: 0;
|
|
269
|
-
|
|
270
|
-
&--selected {
|
|
271
|
-
border-color: var(--primary);
|
|
272
|
-
box-shadow: 0 0 0 $editor-outline-width var(--primary), 0 0 0 calc($editor-outline-width * 2) var(--background);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&:hover:not(&--selected) {
|
|
276
|
-
border-color: color-mix(in srgb, var(--primary), transparent 50%);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.editor-folder-tree-trigger {
|
|
281
|
-
@include flex-center;
|
|
282
|
-
gap: $editor-gap-2;
|
|
283
|
-
width: 100%;
|
|
284
|
-
padding: calc($editor-gap-1 + 2px) $editor-gap-2;
|
|
285
|
-
@include rounded-sm;
|
|
286
|
-
transition: background-color $editor-transition-normal;
|
|
287
|
-
text-align: left;
|
|
288
|
-
border: none;
|
|
289
|
-
background: transparent;
|
|
290
|
-
|
|
291
|
-
&:hover {
|
|
292
|
-
background-color: $editor-accent-color;
|
|
293
|
-
color: $editor-accent-foreground-color;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.editor-tree-content {
|
|
298
|
-
margin-left: $editor-gap-4;
|
|
299
|
-
margin-top: $editor-gap-1;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.editor-empty-state {
|
|
303
|
-
text-align: center;
|
|
304
|
-
padding-top: $editor-control-size-sm;
|
|
305
|
-
padding-bottom: $editor-control-size-sm;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// --- Image Resizer ---
|
|
309
|
-
.editor-image-resizer {
|
|
310
|
-
&-handle {
|
|
311
|
-
position: absolute;
|
|
312
|
-
@include control-size(10px); // Slightly larger for better grab area
|
|
313
|
-
background-color: var(--primary); // Using primary color
|
|
314
|
-
border: $editor-border-width solid var(--background); // Background color for contrast
|
|
315
|
-
z-index: $editor-z-index-floating; // Ensure on top of image
|
|
316
|
-
transition: background-color $editor-transition-normal;
|
|
317
|
-
|
|
318
|
-
&:hover {
|
|
319
|
-
background-color: $editor-accent-color; // Highlight on hover
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// Directions
|
|
323
|
-
&--n {
|
|
324
|
-
top: -5px;
|
|
325
|
-
left: 50%;
|
|
326
|
-
transform: translateX(-50%);
|
|
327
|
-
cursor: ns-resize;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
&--ne {
|
|
331
|
-
top: -5px;
|
|
332
|
-
right: -5px;
|
|
333
|
-
cursor: nesw-resize;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
&--e {
|
|
337
|
-
top: 50%;
|
|
338
|
-
right: -5px;
|
|
339
|
-
transform: translateY(-50%);
|
|
340
|
-
cursor: ew-resize;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// --- Layout Plugin ---
|
|
346
|
-
.editor-layout-dialog-grid {
|
|
347
|
-
display: grid;
|
|
348
|
-
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
349
|
-
gap: $editor-gap-3;
|
|
350
|
-
|
|
351
|
-
@media (min-width: 768px) {
|
|
352
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.editor-layout-dialog-group {
|
|
357
|
-
@include flex-col;
|
|
358
|
-
gap: $editor-gap-1-5;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.editor-layout-color-trigger {
|
|
362
|
-
height: $editor-control-size-xl; // h-11
|
|
363
|
-
width: 100%;
|
|
364
|
-
justify-content: flex-start;
|
|
365
|
-
gap: $editor-gap-2;
|
|
366
|
-
padding-left: $editor-gap-2;
|
|
367
|
-
padding-right: $editor-gap-2;
|
|
368
|
-
@include text-sm;
|
|
369
|
-
transition: all $editor-transition-normal;
|
|
370
|
-
|
|
371
|
-
&:hover:not(:disabled) {
|
|
372
|
-
@include editor-button-interactive;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.editor-layout-color-preview {
|
|
377
|
-
@include control-size($editor-icon-size-sm);
|
|
378
|
-
flex-shrink: 0;
|
|
379
|
-
@include rounded-sm;
|
|
380
|
-
border: $editor-border-width solid var(--border);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// --- Mentions Plugin ---
|
|
384
|
-
.editor-mentions-popover {
|
|
385
|
-
position: fixed;
|
|
386
|
-
z-index: $editor-z-index-layer-10;
|
|
387
|
-
width: $editor-mentions-width;
|
|
388
|
-
@include rounded-md;
|
|
389
|
-
@include shadow-md;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.editor-mentions-item {
|
|
393
|
-
@include flex-center;
|
|
394
|
-
gap: $editor-gap-2;
|
|
395
|
-
|
|
396
|
-
@include editor-dropdown-item-interactive;
|
|
397
|
-
|
|
398
|
-
&--transparent {
|
|
399
|
-
background-color: transparent !important;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
// --- Tree View Plugin ---
|
|
404
|
-
.editor-tree-view-scroll-area {
|
|
405
|
-
background-color: var(--foreground);
|
|
406
|
-
color: var(--background);
|
|
407
|
-
height: 24rem; // h-96
|
|
408
|
-
overflow: hidden;
|
|
409
|
-
@include rounded-lg;
|
|
410
|
-
padding: $editor-gap-2;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
// --- Draggable Block Plugin ---
|
|
414
|
-
.editor-draggable-line {
|
|
415
|
-
background-color: var(--secondary-foreground);
|
|
416
|
-
pointer-events: none;
|
|
417
|
-
position: absolute;
|
|
418
|
-
top: 0;
|
|
419
|
-
left: 0;
|
|
420
|
-
height: $editor-gap-1;
|
|
421
|
-
opacity: 0;
|
|
422
|
-
will-change: transform;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.editor-draggable-menu {
|
|
426
|
-
position: absolute;
|
|
427
|
-
top: 0;
|
|
428
|
-
left: 0;
|
|
429
|
-
cursor: grab;
|
|
430
|
-
@include rounded-sm;
|
|
431
|
-
padding: $editor-gap-0-5 $editor-gap-1;
|
|
432
|
-
opacity: 0;
|
|
433
|
-
will-change: transform;
|
|
434
|
-
|
|
435
|
-
&:hover {
|
|
436
|
-
background-color: $editor-accent-color;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
&:active {
|
|
440
|
-
cursor: grabbing;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// --- Auto Embed Plugin ---
|
|
445
|
-
.editor-auto-embed-menu {
|
|
446
|
-
width: $editor-mentions-width;
|
|
447
|
-
padding: 0;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.editor-auto-embed-wrapper {
|
|
451
|
-
transform: translateY(-100%);
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// --- Floating Link Editor ---
|
|
455
|
-
.editor-floating-link-editor {
|
|
456
|
-
display: flex;
|
|
457
|
-
position: absolute;
|
|
458
|
-
top: 0;
|
|
459
|
-
left: 0;
|
|
460
|
-
z-index: $editor-z-index-floating;
|
|
461
|
-
max-width: $editor-link-editor-max-width;
|
|
462
|
-
width: 100%;
|
|
463
|
-
opacity: 0;
|
|
464
|
-
background-color: var(--background);
|
|
465
|
-
@include rounded-md;
|
|
466
|
-
border: $editor-border-width solid var(--border);
|
|
467
|
-
@include shadow-lg;
|
|
468
|
-
transition: opacity $editor-transition-normal;
|
|
469
|
-
will-change: transform;
|
|
470
|
-
|
|
471
|
-
&__input-container {
|
|
472
|
-
@include flex-center;
|
|
473
|
-
gap: $editor-gap-1;
|
|
474
|
-
padding: $editor-gap-1;
|
|
475
|
-
width: 100%;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
&__view-container {
|
|
479
|
-
@include flex-center;
|
|
480
|
-
justify-content: space-between;
|
|
481
|
-
gap: $editor-gap-2;
|
|
482
|
-
padding: $editor-gap-1 $editor-gap-1 $editor-gap-1 $editor-gap-3;
|
|
483
|
-
width: 100%;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
&__link {
|
|
487
|
-
display: block;
|
|
488
|
-
flex-grow: 1;
|
|
489
|
-
@include truncate;
|
|
490
|
-
color: var(--primary);
|
|
491
|
-
@include text-sm;
|
|
492
|
-
text-decoration: none;
|
|
493
|
-
|
|
494
|
-
&:hover {
|
|
495
|
-
text-decoration: underline;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// ==========================================
|
|
501
|
-
// 4. MENUS & PICKERS
|
|
502
|
-
// ==========================================
|
|
503
|
-
|
|
504
|
-
.editor-component-picker-menu {
|
|
505
|
-
position: fixed;
|
|
506
|
-
z-index: $editor-z-index-popover;
|
|
507
|
-
width: $editor-component-picker-width;
|
|
508
|
-
@include rounded-md;
|
|
509
|
-
border: $editor-border-width solid var(--border);
|
|
510
|
-
background-color: var(--popover);
|
|
511
|
-
color: var(--popover-foreground);
|
|
512
|
-
@include shadow-lg;
|
|
513
|
-
overflow: hidden;
|
|
514
|
-
|
|
515
|
-
// Base visibility
|
|
516
|
-
visibility: visible;
|
|
517
|
-
opacity: 1;
|
|
518
|
-
max-height: $editor-popover-max-height;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
.editor-command {
|
|
522
|
-
@include flex-col;
|
|
523
|
-
height: 100%;
|
|
524
|
-
width: 100%;
|
|
525
|
-
overflow: hidden;
|
|
526
|
-
border-radius: inherit;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
.editor-command-list {
|
|
530
|
-
max-height: $editor-popover-max-height;
|
|
531
|
-
overflow-y: auto;
|
|
532
|
-
overflow-x: hidden;
|
|
533
|
-
padding: $editor-gap-1;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.editor-command-group {
|
|
537
|
-
overflow: hidden;
|
|
538
|
-
color: var(--foreground);
|
|
539
|
-
|
|
540
|
-
& > [cmdk-group-heading] {
|
|
541
|
-
padding: $editor-gap-2 $editor-gap-2 4px;
|
|
542
|
-
font-size: $editor-font-size-xs;
|
|
543
|
-
font-weight: $editor-font-weight-medium;
|
|
544
|
-
color: var(--muted-foreground);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.editor-command-item {
|
|
549
|
-
position: relative;
|
|
550
|
-
@include flex-center;
|
|
551
|
-
cursor: pointer;
|
|
552
|
-
user-select: none;
|
|
553
|
-
@include rounded-sm;
|
|
554
|
-
padding: calc($editor-gap-1 + 2px) $editor-gap-2;
|
|
555
|
-
border: $editor-border-width solid transparent; // Added for hover border
|
|
556
|
-
@include text-sm;
|
|
557
|
-
outline: none;
|
|
558
|
-
gap: $editor-gap-2;
|
|
559
|
-
|
|
560
|
-
@include editor-dropdown-item-interactive;
|
|
561
|
-
|
|
562
|
-
&[data-disabled="true"] {
|
|
563
|
-
pointer-events: none;
|
|
564
|
-
opacity: $editor-opacity-disabled;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
svg {
|
|
568
|
-
@include icon-size($editor-icon-size-sm);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.editor-context-menu {
|
|
573
|
-
background-color: var(--popover);
|
|
574
|
-
color: var(--popover-foreground);
|
|
575
|
-
z-index: $editor-z-index-floating !important;
|
|
576
|
-
overflow: hidden;
|
|
577
|
-
@include rounded-md;
|
|
578
|
-
border: $editor-border-width solid var(--border);
|
|
579
|
-
@include shadow-md;
|
|
580
|
-
outline: none;
|
|
581
|
-
|
|
582
|
-
&:has(*) {
|
|
583
|
-
z-index: $editor-z-index-layer-10 !important;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.editor-context-menu-item {
|
|
588
|
-
position: relative;
|
|
589
|
-
width: 100%;
|
|
590
|
-
@include flex-center;
|
|
591
|
-
cursor: default;
|
|
592
|
-
gap: $editor-gap-2;
|
|
593
|
-
@include rounded-sm;
|
|
594
|
-
padding: calc($editor-gap-1 + 2px) $editor-gap-2;
|
|
595
|
-
border: $editor-border-width solid transparent; // Added for hover border
|
|
596
|
-
@include text-sm;
|
|
597
|
-
outline: none;
|
|
598
|
-
user-select: none;
|
|
599
|
-
|
|
600
|
-
@include editor-dropdown-item-interactive;
|
|
601
|
-
|
|
602
|
-
&[data-disabled="true"] {
|
|
603
|
-
pointer-events: none;
|
|
604
|
-
opacity: $editor-opacity-disabled;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.editor-context-menu-separator {
|
|
609
|
-
background-color: var(--border);
|
|
610
|
-
margin-left: -0.25rem; // -mx-1
|
|
611
|
-
margin-right: -0.25rem;
|
|
612
|
-
height: $editor-border-width;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
.editor-actions-bar {
|
|
616
|
-
clear: both;
|
|
617
|
-
@include flex-center;
|
|
618
|
-
width: 100%;
|
|
619
|
-
@include flex-center-between;
|
|
620
|
-
gap: $editor-gap-3;
|
|
621
|
-
overflow-x: auto;
|
|
622
|
-
flex-wrap: nowrap;
|
|
623
|
-
border-top: $editor-border-width solid var(--border);
|
|
624
|
-
padding: $editor-gap-1-5 $editor-gap-3;
|
|
625
|
-
@include backdrop-blur($editor-dialog-overlay-blur * 2, color-mix(in srgb, var(--background), transparent 50%));
|
|
626
|
-
|
|
627
|
-
@include scrollbar-hide;
|
|
628
|
-
|
|
629
|
-
// Ẩn nội dung tooltip mặc định trong actions bar nếu nó đang bị hiển thị sai
|
|
630
|
-
.editor-tooltip-content {
|
|
631
|
-
display: none !important;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// Chỉ hiển thị tooltip khi hover vào trigger
|
|
635
|
-
.editor-tooltip-group:hover .editor-tooltip-content {
|
|
636
|
-
display: block !important;
|
|
637
|
-
position: absolute;
|
|
638
|
-
bottom: 100%;
|
|
639
|
-
left: 50%;
|
|
640
|
-
transform: translateX(-50%);
|
|
641
|
-
margin-bottom: $editor-gap-2;
|
|
642
|
-
background: var(--popover);
|
|
643
|
-
color: var(--popover-foreground);
|
|
644
|
-
padding: $editor-gap-1 $editor-gap-2;
|
|
645
|
-
@include rounded-sm;
|
|
646
|
-
font-size: 0.75rem;
|
|
647
|
-
white-space: nowrap;
|
|
648
|
-
border: $editor-border-width solid var(--border);
|
|
649
|
-
@include shadow-sm;
|
|
650
|
-
z-index: $editor-z-index-floating;
|
|
651
|
-
pointer-events: none;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
// Note: Core toggle styles are defined in ui-components.scss
|
|
656
|
-
// Specific plugin overrides can be added here if needed
|