lexxy 0.1.26.beta → 0.7.1.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.
Binary file
Binary file
@@ -64,6 +64,10 @@
64
64
  font-style: italic;
65
65
  margin: var(--lexxy-content-margin) 0;
66
66
  padding: 0.5lh 2ch;
67
+
68
+ p:last-child {
69
+ margin-block-end: 0;
70
+ }
67
71
  }
68
72
 
69
73
  p:empty {
@@ -125,6 +129,7 @@
125
129
 
126
130
  /* Keywords and attributes */
127
131
  .code-token__attr,
132
+ .token.attr-name,
128
133
  .token.atrule,
129
134
  .token.attr,
130
135
  .token.keyword {
@@ -144,6 +149,7 @@
144
149
 
145
150
  /* Strings, selectors, and built-in constructs */
146
151
  .code-token__selector,
152
+ .token.attr-value,
147
153
  .token.builtin,
148
154
  .token.char,
149
155
  .token.inserted,
@@ -198,6 +204,7 @@
198
204
 
199
205
  /* Tables */
200
206
  :where(.lexxy-content__table-wrapper) {
207
+ margin: 0;
201
208
  margin-block: 1ch;
202
209
  overflow-x: auto;
203
210
  }
@@ -233,14 +240,6 @@
233
240
  }
234
241
  }
235
242
 
236
- :where([data-lexical-cursor]) {
237
- animation: blink 1s step-end infinite;
238
- block-size: 1lh;
239
- border-inline-start: 1px solid currentColor;
240
- line-height: inherit;
241
- margin-block: 1em;
242
- }
243
-
244
243
  /* Attachments
245
244
  /* ------------------------------------------------------------------------ */
246
245
 
@@ -54,15 +54,17 @@
54
54
  }
55
55
 
56
56
  table {
57
- .table-cell--selected {
58
- background-color: var(--lexxy-color-table-cell-selected-bg) !important;
59
- }
57
+ th, td {
58
+ &.table-cell--selected {
59
+ background-color: var(--lexxy-color-table-cell-selected-bg);
60
+ }
60
61
 
61
- .lexxy-content__table-cell--selected {
62
- background-color: var(--lexxy-color-table-cell-selected-bg) !important;
63
- border-color: var(--lexxy-color-table-cell-selected-border) !important;
62
+ &.lexxy-content__table-cell--selected {
63
+ background-color: var(--lexxy-color-table-cell-selected-bg);
64
+ border-color: var(--lexxy-color-table-cell-selected-border);
65
+ }
64
66
  }
65
-
67
+
66
68
  &.lexxy-content__table--selection {
67
69
  ::selection {
68
70
  background: transparent;
@@ -100,6 +102,20 @@
100
102
  outline: 2px dashed var(--lexxy-color-selected-dark);
101
103
  }
102
104
 
105
+ :where([data-lexical-cursor]) {
106
+ animation: blink 1s infinite;
107
+ block-size: 1lh;
108
+ border-inline-start: 1.5px solid currentColor;
109
+ line-height: inherit;
110
+ margin-block: 0 var(--lexxy-content-margin);
111
+ }
112
+
113
+ @keyframes blink {
114
+ 0% { opacity: 1; }
115
+ 60% { opacity: 1; }
116
+ 100% { opacity: 0;}
117
+ }
118
+
103
119
  /* Toolbar
104
120
  /* -------------------------------------------------------------------------- */
105
121
 
@@ -376,73 +392,10 @@
376
392
  }
377
393
  }
378
394
 
379
- /* Table dropdown
380
- /* -------------------------------------------------------------------------- */
381
-
382
- :where(lexxy-table-dropdown) {
383
- display: flex;
384
- flex-direction: column;
385
- gap: 1ch;
386
-
387
- .lexxy-editor__table-create {
388
- display: flex;
389
- flex-direction: column;
390
- flex-wrap: wrap;
391
- gap: 0;
392
-
393
- .lexxy-editor__table-buttons {
394
- background-color: var(--lexxy-color-ink-lighter);
395
- display: flex;
396
- flex-direction: column;
397
- gap: 1px;
398
- padding: 1px;
399
-
400
- div {
401
- display: flex;
402
- flex-direction: row;
403
- gap: 1px;
404
- }
405
-
406
- button {
407
- aspect-ratio: 1.5 / 1;
408
- border: 0;
409
- border-radius: 0;
410
- color: var(--lexxy-color-ink);
411
- font-family: var(--lexxy-font-base);
412
- font-size: var(--lexxy-text-small);
413
- font-weight: normal;
414
- inline-size: 4ch;
415
- margin: 0;
416
-
417
- &.active {
418
- background-color: var(--lexxy-color-ink-lightest);
419
- }
420
- }
421
- }
422
-
423
- label {
424
- align-items: center;
425
- display: flex;
426
- gap: 0.5ch;
427
- padding: 0.5ch 0;
428
- margin-block-start: 1ch;
429
- }
430
-
431
- &:has(input[type="checkbox"]:checked) {
432
- .lexxy-editor__table-buttons {
433
- div:first-child button,
434
- button:first-child {
435
- filter: brightness(0.95);
436
- }
437
- }
438
- }
439
- }
440
- }
441
-
442
395
  /* Table handle buttons
443
396
  /* -------------------------------------------------------------------------- */
444
397
 
445
- :where(.lexxy-table-handle-buttons) {
398
+ :where(lexxy-table-handler) {
446
399
  --button-size: 2.5lh;
447
400
 
448
401
  color: var(--lexxy-color-ink-inverted);
@@ -453,7 +406,7 @@
453
406
  line-height: 1;
454
407
  position: absolute;
455
408
  transform: translate(-50%, -120%);
456
- z-index: 10;
409
+ z-index: 2;
457
410
 
458
411
  .lexxy-table-control {
459
412
  align-items: center;
@@ -465,7 +418,8 @@
465
418
  padding: 2px;
466
419
  white-space: nowrap;
467
420
 
468
- button {
421
+ button,
422
+ summary {
469
423
  aspect-ratio: 1 / 1;
470
424
  align-items: center;
471
425
  background-color: transparent;
@@ -477,14 +431,21 @@
477
431
  font-weight: bold;
478
432
  justify-content: center;
479
433
  line-height: 1;
434
+ list-style: none;
480
435
  min-block-size: var(--button-size);
481
436
  min-inline-size: var(--button-size);
482
437
  padding: 0;
438
+ user-select: none;
439
+ -webkit-user-select: none;
483
440
 
484
441
  &:hover {
485
442
  background-color: var(--lexxy-color-ink-medium);
486
443
  }
487
444
 
445
+ &:focus-visible {
446
+ outline-color: var(--lexxy-focus-ring-color);
447
+ }
448
+
488
449
  svg {
489
450
  block-size: 1em;
490
451
  inline-size: 1em;
@@ -495,47 +456,17 @@
495
456
  display: none;
496
457
  }
497
458
  }
498
-
499
- button,
500
- summary {
501
- &:focus,
502
- &:focus-visible {
503
- background-color: var(--lexxy-color-ink-medium);
504
- outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
505
- outline-offset: var(--lexxy-focus-ring-offset);
506
- }
507
- }
508
459
  }
509
460
 
510
461
  .lexxy-table-control__more-menu {
511
462
  gap: 0;
512
- padding: 2px;
463
+ padding: 0.25ch;
513
464
  position: relative;
514
465
 
515
466
  summary {
516
- aspect-ratio: 1 / 1;
517
- align-items: center;
518
- background: transparent;
519
- border-radius: var(--lexxy-radius);
520
- border: 0;
521
- box-sizing: border-box;
522
- display: flex;
523
- font-size: inherit;
524
- justify-content: center;
525
- list-style: none;
526
- min-block-size: var(--button-size);
527
- min-inline-size: var(--button-size);
528
- padding: 0;
529
- user-select: none;
530
- -webkit-user-select: none;
531
-
532
467
  &::-webkit-details-marker {
533
468
  display: none;
534
469
  }
535
-
536
- &:hover {
537
- background: var(--lexxy-color-ink-medium);
538
- }
539
470
  }
540
471
 
541
472
  .lexxy-table-control__more-menu-details {
@@ -552,7 +483,7 @@
552
483
  border-radius: 0.75ch;
553
484
  display: flex;
554
485
  flex-direction: column;
555
- padding: 2px;
486
+ padding: 0.25ch;
556
487
  }
557
488
 
558
489
  button {
@@ -585,28 +516,32 @@
585
516
  /* Language picker
586
517
  /* -------------------------------------------------------------------------- */
587
518
 
588
- :where(.lexxy-code-language-picker) {
589
- -webkit-appearance: none;
590
- appearance: none;
591
- background-color: var(--lexxy-color-canvas);
592
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E");
593
- background-position: center right 1ch;
594
- background-repeat: no-repeat;
595
- background-size: 1ch;
596
- block-size: 1.5lh;
597
- border: 1px solid var(--lexxy-color-ink-lighter);
598
- border-radius: var(--lexxy-radius);
599
- color: var(--lexxy-color-ink);
600
- font-family: var(--lexxy-font-base);
601
- font-size: var(--lexxy-text-small);
602
- font-weight: normal;
519
+ :where(lexxy-code-language-picker) {
603
520
  inset-inline-end: var(--lexxy-editor-padding);
604
- margin: 0.5ch 0.5ch 0 -0.5ch;
605
- padding: 0 2ch 0 1ch;
606
- text-align: start;
521
+ position: absolute;
607
522
 
608
- @media (prefers-color-scheme: dark) {
609
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23fff'/%3E%3C/svg%3E");
523
+ select {
524
+ -webkit-appearance: none;
525
+ appearance: none;
526
+ background-color: var(--lexxy-color-canvas);
527
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E");
528
+ background-position: center right 1ch;
529
+ background-repeat: no-repeat;
530
+ background-size: 1ch;
531
+ block-size: 1.5lh;
532
+ border: 1px solid var(--lexxy-color-ink-lighter);
533
+ border-radius: var(--lexxy-radius);
534
+ color: var(--lexxy-color-ink);
535
+ font-family: var(--lexxy-font-base);
536
+ font-size: var(--lexxy-text-small);
537
+ font-weight: normal;
538
+ margin: 0.5ch 0.5ch 0 -0.5ch;
539
+ padding: 0 2ch 0 1ch;
540
+ text-align: start;
541
+
542
+ @media (prefers-color-scheme: dark) {
543
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23fff'/%3E%3C/svg%3E");
544
+ }
610
545
  }
611
546
  }
612
547
 
data/config/ci.rb CHANGED
@@ -4,8 +4,9 @@ CI.run do
4
4
  step "Style: Ruby", "bin/rubocop -f github"
5
5
  step "Style: JavaScript", "yarn lint"
6
6
 
7
- step "Tests: prepare", "env RAILS_ENV=test bin/rails db:test:prepare"
8
- step "Tests: run", "env RAILS_ENV=test bin/rails test:all -d"
7
+ step "Tests: JavaScript", "yarn test"
8
+ step "Tests: Rails (prepare)", "env RAILS_ENV=test bin/rails db:test:prepare"
9
+ step "Tests: Rails (run)", "env RAILS_ENV=test bin/rails test:all -d"
9
10
 
10
11
  unless success?
11
12
  failure "Signoff: CI failed.", "Fix the issues and try again."
@@ -25,6 +25,7 @@ module Lexxy
25
25
  def render_custom_attachments_in(value)
26
26
  if value.respond_to?(:body)
27
27
  if html = value.body_before_type_cast.presence
28
+ self.prefix_partial_path_with_controller_namespace = false if respond_to?(:prefix_partial_path_with_controller_namespace=)
28
29
  ActionText::Fragment.wrap(html).replace(ActionText::Attachment.tag_name) do |node|
29
30
  if node["url"].blank?
30
31
  attachment = ActionText::Attachment.from_node(node)
data/lib/lexxy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lexxy
2
- VERSION = "0.1.26.beta"
2
+ VERSION = "0.7.1.beta"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lexxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26.beta
4
+ version: 0.7.1.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia