lexxy 0.1.21.beta → 0.1.23.beta
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascript/lexxy.js +1198 -442
- data/app/assets/javascript/lexxy.js.br +0 -0
- data/app/assets/javascript/lexxy.js.gz +0 -0
- data/app/assets/javascript/lexxy.min.js +2 -2
- data/app/assets/javascript/lexxy.min.js.br +0 -0
- data/app/assets/javascript/lexxy.min.js.gz +0 -0
- data/app/assets/stylesheets/lexxy-content.css +4 -2
- data/app/assets/stylesheets/lexxy-editor.css +93 -51
- data/app/assets/stylesheets/lexxy-variables.css +1 -1
- data/lib/lexxy/engine.rb +4 -2
- data/lib/lexxy/version.rb +1 -1
- metadata +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -135,7 +135,6 @@
|
|
|
135
135
|
.code-token__property,
|
|
136
136
|
.token.boolean,
|
|
137
137
|
.token.constant,
|
|
138
|
-
.token.deleted,
|
|
139
138
|
.token.number,
|
|
140
139
|
.token.property,
|
|
141
140
|
.token.symbol,
|
|
@@ -148,6 +147,7 @@
|
|
|
148
147
|
.token.builtin,
|
|
149
148
|
.token.char,
|
|
150
149
|
.token.inserted,
|
|
150
|
+
.token.line,
|
|
151
151
|
.token.selector,
|
|
152
152
|
.token.string {
|
|
153
153
|
color: var(--lexxy-color-code-token-selector);
|
|
@@ -165,9 +165,11 @@
|
|
|
165
165
|
|
|
166
166
|
/* Operators and symbolic entities */
|
|
167
167
|
.code-token__operator,
|
|
168
|
+
.token.deleted,
|
|
168
169
|
.token.entity,
|
|
169
170
|
.token.operator,
|
|
170
|
-
.token.url
|
|
171
|
+
.token.url,
|
|
172
|
+
code[data-language="diff"] .code-token__operator + .code-token__selector {
|
|
171
173
|
color: var(--lexxy-color-code-token-operator);
|
|
172
174
|
}
|
|
173
175
|
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
transition: opacity 150ms;
|
|
19
19
|
|
|
20
20
|
input,
|
|
21
|
-
button
|
|
21
|
+
button,
|
|
22
|
+
summary {
|
|
22
23
|
&:focus-visible {
|
|
23
|
-
outline
|
|
24
|
+
outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
|
|
25
|
+
outline-offset: var(--lexxy-focus-ring-offset);
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -179,49 +181,64 @@
|
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
/*
|
|
184
|
+
/* Dropdowns
|
|
183
185
|
/* -------------------------------------------------------------------------- */
|
|
184
186
|
|
|
185
|
-
:where(.lexxy-
|
|
186
|
-
display: contents;
|
|
187
|
+
:where(.lexxy-editor__toolbar-dropdown) {
|
|
187
188
|
position: relative;
|
|
189
|
+
user-select: none;
|
|
190
|
+
-webkit-user-select: none;
|
|
191
|
+
|
|
192
|
+
.lexxy-editor__toolbar-dropdown-content {
|
|
193
|
+
--dropdown-padding: 1ch;
|
|
194
|
+
--dropdown-gap: calc(var(--dropdown-padding) / 2);
|
|
188
195
|
|
|
189
|
-
dialog {
|
|
190
196
|
background-color: var(--lexxy-color-canvas);
|
|
191
197
|
border: 2px solid var(--lexxy-color-selected-hover);
|
|
192
198
|
border-radius: var(--lexxy-radius);
|
|
193
199
|
border-start-start-radius: 0;
|
|
194
200
|
box-sizing: border-box;
|
|
195
201
|
color: var(--lexxy-color-ink);
|
|
202
|
+
display: flex;
|
|
203
|
+
gap: var(--dropdown-gap);
|
|
196
204
|
inset-block-start: 2lh;
|
|
197
|
-
inline-
|
|
198
|
-
max-inline-size:
|
|
205
|
+
inset-inline-start: 0;
|
|
206
|
+
max-inline-size: 40ch;
|
|
199
207
|
margin: 0;
|
|
200
|
-
padding:
|
|
208
|
+
padding: var(--dropdown-padding);
|
|
201
209
|
position: absolute;
|
|
202
210
|
z-index: 3;
|
|
203
211
|
}
|
|
204
212
|
|
|
205
|
-
&:
|
|
213
|
+
&:is([open]) .lexxy-editor__toolbar-button {
|
|
206
214
|
background-color: var(--lexxy-color-selected-hover);
|
|
207
215
|
border-end-end-radius: 0;
|
|
208
216
|
border-end-start-radius: 0;
|
|
217
|
+
|
|
218
|
+
&:hover {
|
|
219
|
+
background-color: var(--lexxy-color-selected-hover);
|
|
220
|
+
}
|
|
209
221
|
}
|
|
210
|
-
|
|
222
|
+
|
|
223
|
+
[overflowing] & {
|
|
224
|
+
position: static;
|
|
211
225
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
226
|
+
.lexxy-editor__toolbar-dropdown-content {
|
|
227
|
+
--dropdown-padding: 0.5ch;
|
|
228
|
+
inset-inline-end: var(--dropdown-padding);
|
|
229
|
+
inset-inline-start: var(--dropdown-padding);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
218
232
|
}
|
|
219
233
|
|
|
220
|
-
/* Link
|
|
234
|
+
/* Link dropdown
|
|
221
235
|
/* -------------------------------------------------------------------------- */
|
|
222
236
|
|
|
223
|
-
:where(
|
|
224
|
-
|
|
237
|
+
:where(lexxy-link-dropdown) {
|
|
238
|
+
|
|
239
|
+
> * { flex: 1; }
|
|
240
|
+
|
|
241
|
+
.lexxy-editor__toolbar-dropdown-actions {
|
|
225
242
|
display: flex;
|
|
226
243
|
font-size: var(--lexxy-text-small);
|
|
227
244
|
flex: 1 1 0%;
|
|
@@ -242,6 +259,11 @@
|
|
|
242
259
|
color: var(--lexxy-color-text);
|
|
243
260
|
box-sizing: border-box;
|
|
244
261
|
inline-size: 100%;
|
|
262
|
+
min-inline-size: 40ch;
|
|
263
|
+
|
|
264
|
+
[overflowing] & {
|
|
265
|
+
min-inline-size: 0;
|
|
266
|
+
}
|
|
245
267
|
}
|
|
246
268
|
|
|
247
269
|
button {
|
|
@@ -254,31 +276,31 @@
|
|
|
254
276
|
button[type="submit"] {
|
|
255
277
|
background-color: var(--lexxy-color-accent-dark);
|
|
256
278
|
color: var(--lexxy-color-ink-inverted);
|
|
279
|
+
|
|
280
|
+
&:hover {
|
|
281
|
+
background-color: var(--lexxy-color-accent-medium);
|
|
282
|
+
}
|
|
257
283
|
}
|
|
258
284
|
}
|
|
259
285
|
|
|
260
|
-
/* Color
|
|
286
|
+
/* Color dropdown
|
|
261
287
|
/* -------------------------------------------------------------------------- */
|
|
262
288
|
|
|
263
|
-
:where(
|
|
264
|
-
|
|
289
|
+
:where(lexxy-highlight-dropdown) {
|
|
290
|
+
display: flex;
|
|
291
|
+
flex-direction: column;
|
|
292
|
+
|
|
293
|
+
[data-button-group] {
|
|
265
294
|
display: flex;
|
|
266
|
-
|
|
267
|
-
|
|
295
|
+
justify-items: flex-start;
|
|
296
|
+
flex-direction: row;
|
|
297
|
+
gap: var(--dropdown-gap);
|
|
268
298
|
|
|
269
|
-
[data-button-group] {
|
|
270
|
-
display: flex;
|
|
271
|
-
flex-direction: row;
|
|
272
|
-
flex-wrap: wrap;
|
|
273
|
-
gap: 0.5ch;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
299
|
button {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
inline-size:
|
|
280
|
-
|
|
281
|
-
outline: none;
|
|
300
|
+
aspect-ratio: 1 / 1;
|
|
301
|
+
inline-size: var(--button-size);
|
|
302
|
+
min-inline-size: var(--button-size);
|
|
303
|
+
max-inline-size: var(--button-size);
|
|
282
304
|
|
|
283
305
|
&:after {
|
|
284
306
|
align-self: center;
|
|
@@ -291,32 +313,52 @@
|
|
|
291
313
|
inset-inline-end: 0;
|
|
292
314
|
inset-inline-start: 0;
|
|
293
315
|
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
294
318
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
319
|
+
button {
|
|
320
|
+
--button-size: 2lh;
|
|
298
321
|
|
|
299
|
-
|
|
300
|
-
|
|
322
|
+
color: var(--lexxy-color-text);
|
|
323
|
+
flex: 1;
|
|
324
|
+
min-block-size: var(--button-size);
|
|
325
|
+
position: relative;
|
|
301
326
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
}
|
|
327
|
+
&:hover {
|
|
328
|
+
opacity: 0.8;
|
|
306
329
|
}
|
|
307
330
|
|
|
308
|
-
|
|
309
|
-
|
|
331
|
+
&[aria-pressed="true"] {
|
|
332
|
+
box-shadow: 0 0 0 2px currentColor inset;
|
|
310
333
|
|
|
311
|
-
|
|
312
|
-
|
|
334
|
+
&:after {
|
|
335
|
+
content: "✓";
|
|
313
336
|
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
314
339
|
|
|
315
|
-
|
|
340
|
+
.lexxy-editor__toolbar-dropdown-reset[disabled] {
|
|
341
|
+
display: none;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
[overflowing] & {
|
|
345
|
+
inline-size: fit-content;
|
|
346
|
+
|
|
347
|
+
[data-button-group] {
|
|
348
|
+
flex-wrap: wrap;
|
|
349
|
+
|
|
350
|
+
button {
|
|
351
|
+
--button-size: 1.6lh;
|
|
352
|
+
|
|
353
|
+
&:after {
|
|
354
|
+
font-size: 0.9em;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
316
357
|
}
|
|
317
358
|
}
|
|
318
359
|
}
|
|
319
360
|
|
|
361
|
+
|
|
320
362
|
/* Language picker
|
|
321
363
|
/* -------------------------------------------------------------------------- */
|
|
322
364
|
|
data/lib/lexxy/engine.rb
CHANGED
|
@@ -27,8 +27,10 @@ module Lexxy
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
initializer "lexxy.assets" do |app|
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
if Rails.application.config.respond_to?(:assets)
|
|
31
|
+
app.config.assets.paths << root.join("app/assets/stylesheets")
|
|
32
|
+
app.config.assets.paths << root.join("app/javascript")
|
|
33
|
+
end
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
initializer "lexxy.sanitization" do |app|
|
data/lib/lexxy/version.rb
CHANGED