autumnnote 1.0.5 → 1.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.
@@ -50,6 +50,20 @@
50
50
  user-select: text;
51
51
  // Subtle visual cue that the area is read-only.
52
52
  background: #fafafa;
53
+
54
+ // Block checklist checkbox interaction in read-only mode.
55
+ ul.an-checklist input[type='checkbox'] {
56
+ pointer-events: none;
57
+ cursor: default;
58
+ }
59
+
60
+ // Prevent images and videos from being dragged out.
61
+ img,
62
+ .an-video-wrapper {
63
+ -webkit-user-drag: none;
64
+ user-drag: none;
65
+ pointer-events: none;
66
+ }
53
67
  }
54
68
  }
55
69
 
@@ -87,6 +101,12 @@
87
101
  align-items: center;
88
102
  gap: 2px;
89
103
 
104
+ // Icon-only toolbar buttons should not have horizontal padding so all
105
+ // buttons appear consistently square (min-width = height = $an-btn-height).
106
+ // Dialog buttons (.an-dialog-actions .an-btn) keep their padding via the
107
+ // lower-specificity .an-btn rule.
108
+ > .an-btn { padding: 0; }
109
+
90
110
  // Separator between groups
91
111
  & + .an-btn-group {
92
112
  position: relative;
@@ -388,6 +408,7 @@
388
408
  // =============================================================================
389
409
 
390
410
  .an-editable {
411
+ position: relative; // Establishes containing block for the ::before placeholder
391
412
  flex: 1;
392
413
  padding: $an-editable-pad;
393
414
  min-height: 0;
@@ -397,18 +418,18 @@
397
418
  overflow-y: auto;
398
419
  word-break: break-word;
399
420
 
400
- // Placeholder — only shown when not focused.
401
- // float:left is the standard contenteditable placeholder technique (used by
402
- // Quill.js): the pseudo-element is out of normal flow so it never shifts the
403
- // cursor, yet it renders visually at the start of the empty editing area.
404
- // Avoid position:absolute here — without position:relative on the parent it
405
- // would be positioned relative to .an-container (contain:layout) and overlap
406
- // the toolbar.
421
+ // Placeholder — shown only when the editable is empty and not focused.
422
+ // Uses position:absolute so it never shifts the cursor or block content,
423
+ // and requires position:relative on this element (added above) so it is
424
+ // scoped to the editable area and never overlaps the toolbar.
407
425
  &.an-placeholder:not(:focus)::before {
408
426
  content: attr(data-placeholder);
409
427
  color: $an-muted;
410
428
  pointer-events: none;
411
- float: left;
429
+ position: absolute;
430
+ top: 12px; // matches top padding from $an-editable-pad (12px 14px)
431
+ left: 14px; // matches left padding
432
+ right: 14px;
412
433
  }
413
434
 
414
435
  // Content styles
@@ -472,9 +493,21 @@
472
493
  inset: 0;
473
494
  z-index: 2;
474
495
  cursor: default;
496
+ pointer-events: all; // Explicitly block pointer events reaching the iframe
475
497
  }
476
498
  }
477
499
 
500
+ // Ensure video shield stays effective even when a video copy moves outside
501
+ // .an-editable temporarily (e.g. native drag-and-drop).
502
+ // This global rule mirrors the scoped one above.
503
+ @at-root .an-video-wrapper .an-video-shield {
504
+ position: absolute;
505
+ inset: 0;
506
+ z-index: 2;
507
+ cursor: default;
508
+ pointer-events: all;
509
+ }
510
+
478
511
  // Table styles — target both classed and unclassed tables
479
512
  table, .an-table {
480
513
  border-collapse: collapse;
@@ -934,6 +967,91 @@
934
967
  background: $an-border;
935
968
  }
936
969
 
970
+ // Color-strip variant — SVG stacked above a thin color bar (matches toolbar)
971
+ .an-context-icon--color {
972
+ flex-direction: column;
973
+ gap: 2px;
974
+ width: 16px;
975
+ align-items: center;
976
+
977
+ .an-context-icon-svg {
978
+ display: flex;
979
+ align-items: center;
980
+ justify-content: center;
981
+ line-height: 0;
982
+ }
983
+ }
984
+
985
+ .an-context-color-strip {
986
+ display: block;
987
+ width: 100%;
988
+ height: 3px;
989
+ border-radius: 1px;
990
+ flex-shrink: 0;
991
+ }
992
+
993
+ // Color palette inside context menu
994
+ .an-context-color-palette {
995
+ display: flex;
996
+ flex-wrap: wrap;
997
+ gap: 3px;
998
+ padding: 6px 12px 2px;
999
+ }
1000
+
1001
+ .an-context-color-swatch {
1002
+ width: 15px;
1003
+ height: 15px;
1004
+ border-radius: 3px;
1005
+ border: 1px solid rgba(0, 0, 0, 0.12);
1006
+ cursor: pointer;
1007
+ flex-shrink: 0;
1008
+ position: relative;
1009
+ transition: transform 0.1s;
1010
+
1011
+ &:hover {
1012
+ transform: scale(1.28);
1013
+ z-index: 1;
1014
+ border-color: rgba(0, 0, 0, 0.4);
1015
+ }
1016
+ }
1017
+
1018
+ .an-context-color-none {
1019
+ display: flex;
1020
+ align-items: center;
1021
+ justify-content: center;
1022
+ background: #fff !important;
1023
+ color: #999;
1024
+
1025
+ svg { display: block; }
1026
+
1027
+ &:hover { color: #333; }
1028
+ }
1029
+
1030
+ .an-context-color-custom {
1031
+ display: flex;
1032
+ align-items: center;
1033
+ gap: 8px;
1034
+ padding: 4px 12px 8px;
1035
+ font-size: 12px;
1036
+ color: $an-muted;
1037
+ cursor: pointer;
1038
+
1039
+ input[type='color'] {
1040
+ width: 18px;
1041
+ height: 18px;
1042
+ padding: 0;
1043
+ border: 1px solid $an-border;
1044
+ border-radius: 3px;
1045
+ cursor: pointer;
1046
+ background: transparent;
1047
+ -webkit-appearance: none;
1048
+ appearance: none;
1049
+ }
1050
+
1051
+ span { flex: 1; }
1052
+ &:hover span { color: $an-text; }
1053
+ }
1054
+
937
1055
  // ---------------------------------------------------------------------------
938
1056
  // Image resize overlay
939
1057
  // ---------------------------------------------------------------------------
@@ -1378,7 +1496,11 @@ $an-video-accent: #8b5cf6; // violet-500
1378
1496
  margin: 0.75em 0;
1379
1497
  text-align: center;
1380
1498
 
1381
- img { display: block; max-width: 100%; }
1499
+ img {
1500
+ display: block;
1501
+ max-width: 100%;
1502
+ margin: 0 auto; // Centers img when figure uses fit-content or explicit width
1503
+ }
1382
1504
  }
1383
1505
 
1384
1506
  figcaption.an-figcaption {
@@ -1650,6 +1772,21 @@ $an-video-accent: #8b5cf6; // violet-500
1650
1772
  .an-context-item { color: #cdd6f4; }
1651
1773
  .an-context-sep { background: #3f3f5f; }
1652
1774
 
1775
+ .an-context-color-swatch {
1776
+ border-color: rgba(255, 255, 255, 0.15);
1777
+ &:hover { border-color: rgba(255, 255, 255, 0.5); }
1778
+ }
1779
+
1780
+ .an-context-color-none {
1781
+ background: #1e1e2e !important;
1782
+ color: #888;
1783
+ &:hover { color: #ccc; }
1784
+ }
1785
+
1786
+ .an-context-color-custom {
1787
+ input[type='color'] { border-color: #3f3f5f; }
1788
+ }
1789
+
1653
1790
  .an-icon-cat {
1654
1791
  border-color: #3f3f5f;
1655
1792
  color: #a6adc8;