@yurikilian/lex4 1.5.1 → 1.5.3
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/components/BlockTypePicker.d.ts +11 -0
- package/dist/components/BlockTypePicker.d.ts.map +1 -0
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/extensions/extension-context.d.ts +3 -3
- package/dist/extensions/extension-context.d.ts.map +1 -1
- package/dist/lex4-editor.cjs +164 -45
- package/dist/lex4-editor.cjs.map +1 -1
- package/dist/lex4-editor.js +164 -45
- package/dist/lex4-editor.js.map +1 -1
- package/dist/style.css +145 -2
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -89,6 +89,8 @@
|
|
|
89
89
|
--lex4-sidebar-width: 320px;
|
|
90
90
|
--lex4-ui-font-family: "Inter Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
91
91
|
--lex4-font-family: 'Calibri', 'Carlito', sans-serif;
|
|
92
|
+
--lex4-body-font-size: 12pt;
|
|
93
|
+
--lex4-body-line-height: 1.5;
|
|
92
94
|
|
|
93
95
|
font-family: var(--lex4-ui-font-family);
|
|
94
96
|
-webkit-font-smoothing: antialiased;
|
|
@@ -206,6 +208,120 @@
|
|
|
206
208
|
gap: 0.25rem;
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
.lex4-block-type-picker {
|
|
212
|
+
position: relative;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.lex4-editor button.lex4-block-type-trigger {
|
|
216
|
+
display: inline-flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
gap: 0.375rem;
|
|
219
|
+
height: 32px;
|
|
220
|
+
padding: 0 0.5rem 0 0.625rem;
|
|
221
|
+
border-radius: 999px;
|
|
222
|
+
border: 1px solid var(--color-input);
|
|
223
|
+
background-color: var(--color-background);
|
|
224
|
+
color: var(--color-foreground);
|
|
225
|
+
transition: background-color 150ms, border-color 150ms, box-shadow 150ms;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.lex4-editor button.lex4-block-type-trigger:hover,
|
|
229
|
+
.lex4-editor button.lex4-block-type-trigger.open {
|
|
230
|
+
background-color: var(--color-secondary);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.lex4-editor button.lex4-block-type-trigger:focus-visible {
|
|
234
|
+
outline: none;
|
|
235
|
+
border-color: var(--color-ring);
|
|
236
|
+
box-shadow: 0 0 0 1px var(--color-ring);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.lex4-block-type-trigger-code {
|
|
240
|
+
min-width: 1.75rem;
|
|
241
|
+
font-size: 0.8125rem;
|
|
242
|
+
line-height: 1rem;
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
color: var(--color-foreground);
|
|
245
|
+
text-align: center;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.lex4-block-type-trigger-code.heading {
|
|
249
|
+
color: var(--color-primary);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.lex4-block-type-trigger-chevron {
|
|
253
|
+
color: var(--color-muted-foreground);
|
|
254
|
+
transition: transform 150ms ease;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.lex4-block-type-trigger-chevron.open {
|
|
258
|
+
transform: rotate(180deg);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.lex4-block-type-menu {
|
|
262
|
+
position: absolute;
|
|
263
|
+
top: calc(100% + 0.5rem);
|
|
264
|
+
left: 0;
|
|
265
|
+
min-width: 13rem;
|
|
266
|
+
padding: 0.375rem;
|
|
267
|
+
border: 1px solid var(--color-border);
|
|
268
|
+
border-radius: 1rem;
|
|
269
|
+
background-color: var(--color-surface-elevated);
|
|
270
|
+
box-shadow: var(--shadow-lg);
|
|
271
|
+
z-index: 30;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.lex4-editor button.lex4-block-type-item {
|
|
275
|
+
width: 100%;
|
|
276
|
+
display: flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
gap: 0.75rem;
|
|
279
|
+
padding: 0.625rem 0.75rem;
|
|
280
|
+
border-radius: 0.75rem;
|
|
281
|
+
color: var(--color-foreground);
|
|
282
|
+
transition: background-color 150ms, color 150ms;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.lex4-editor button.lex4-block-type-item:hover,
|
|
286
|
+
.lex4-editor button.lex4-block-type-item.active {
|
|
287
|
+
background-color: var(--color-secondary);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.lex4-block-type-item-code {
|
|
291
|
+
min-width: 2rem;
|
|
292
|
+
padding: 0.1875rem 0.4375rem;
|
|
293
|
+
border-radius: 999px;
|
|
294
|
+
background-color: color-mix(in srgb, var(--color-secondary) 86%, var(--color-background));
|
|
295
|
+
font-size: 0.8125rem;
|
|
296
|
+
line-height: 1rem;
|
|
297
|
+
font-weight: 600;
|
|
298
|
+
color: var(--color-muted-foreground);
|
|
299
|
+
text-align: center;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.lex4-block-type-item-code.heading {
|
|
303
|
+
color: color-mix(in srgb, var(--color-primary) 80%, var(--color-foreground));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.lex4-block-type-item-code.active {
|
|
307
|
+
color: var(--color-primary);
|
|
308
|
+
background-color: color-mix(in srgb, var(--color-primary) 12%, var(--color-background));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.lex4-block-type-item-label {
|
|
312
|
+
font-size: 0.875rem;
|
|
313
|
+
line-height: 1.25rem;
|
|
314
|
+
font-weight: 500;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.lex4-block-type-item-check {
|
|
318
|
+
margin-left: auto;
|
|
319
|
+
display: inline-flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
color: var(--color-primary);
|
|
323
|
+
}
|
|
324
|
+
|
|
209
325
|
.lex4-editor button.lex4-toolbar-toggle-btn {
|
|
210
326
|
display: inline-flex;
|
|
211
327
|
align-items: center;
|
|
@@ -1007,10 +1123,27 @@
|
|
|
1007
1123
|
height: 100%;
|
|
1008
1124
|
padding: 0;
|
|
1009
1125
|
overflow: visible;
|
|
1126
|
+
font-size: var(--lex4-body-font-size);
|
|
1127
|
+
line-height: var(--lex4-body-line-height);
|
|
1010
1128
|
}
|
|
1011
1129
|
|
|
1012
1130
|
.lex4-root {
|
|
1013
1131
|
outline: none;
|
|
1132
|
+
font-size: var(--lex4-body-font-size);
|
|
1133
|
+
line-height: var(--lex4-body-line-height);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.lex4-page-body-editable::-moz-selection, .lex4-page-body-editable *::-moz-selection, .lex4-root::-moz-selection, .lex4-root *::-moz-selection {
|
|
1137
|
+
background-color: var(--color-selection-bg);
|
|
1138
|
+
color: var(--color-selection-text);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.lex4-page-body-editable::selection,
|
|
1142
|
+
.lex4-page-body-editable *::selection,
|
|
1143
|
+
.lex4-root::selection,
|
|
1144
|
+
.lex4-root *::selection {
|
|
1145
|
+
background-color: var(--color-selection-bg);
|
|
1146
|
+
color: var(--color-selection-text);
|
|
1014
1147
|
}
|
|
1015
1148
|
|
|
1016
1149
|
.lex4-paragraph {
|
|
@@ -1018,6 +1151,15 @@
|
|
|
1018
1151
|
text-align: justify;
|
|
1019
1152
|
}
|
|
1020
1153
|
|
|
1154
|
+
.lex4-paragraph:has(> br:only-child) {
|
|
1155
|
+
min-height: calc(1em * var(--lex4-body-line-height));
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.lex4-paragraph:has(> br:only-child)::before {
|
|
1159
|
+
content: '\00a0';
|
|
1160
|
+
color: transparent;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1021
1163
|
.lex4-heading {
|
|
1022
1164
|
margin: 0 0 0.5rem;
|
|
1023
1165
|
font-weight: 600;
|
|
@@ -1104,9 +1246,10 @@
|
|
|
1104
1246
|
|
|
1105
1247
|
.lex4-page-placeholder {
|
|
1106
1248
|
position: absolute;
|
|
1107
|
-
top: 0
|
|
1249
|
+
top: 0;
|
|
1108
1250
|
left: 0;
|
|
1109
|
-
font-size:
|
|
1251
|
+
font-size: var(--lex4-body-font-size);
|
|
1252
|
+
line-height: var(--lex4-body-line-height);
|
|
1110
1253
|
color: color-mix(in srgb, var(--color-muted-foreground) 82%, transparent);
|
|
1111
1254
|
pointer-events: none;
|
|
1112
1255
|
-webkit-user-select: none;
|