@vscode/markdown-editor 0.0.2-31 → 0.0.2-32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/markdown-editor",
3
- "version": "0.0.2-31",
3
+ "version": "0.0.2-32",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,7 +45,8 @@
45
45
  * overlays, which position themselves relative to this box, so it is the
46
46
  * positioning context. In limited-width mode the editor sets an inline
47
47
  * `max-width` here and the auto inline margins center it within the full-width
48
- * `.md-editor`.
48
+ * `.md-editor`. The block-start padding keeps every document clear of the top
49
+ * edge, independent of the first block's theme margins.
49
50
  */
50
51
  .md-editor-content {
51
52
  --md-editor-content-inline-start-padding: 48px;
@@ -57,7 +58,7 @@
57
58
  --md-editor-content-inline-end-padding: var(--md-editor-content-inline-start-padding);
58
59
  position: relative;
59
60
  margin-inline: auto;
60
- padding-block: 0;
61
+ padding-block: 24px 0;
61
62
  padding-inline: var(--md-editor-content-inline-start-padding) var(--md-editor-content-inline-end-padding);
62
63
  }
63
64
 
@@ -815,6 +816,52 @@ pre.md-unhandled-scroll.md-code-block {
815
816
  animation: md-readonly-editing-attempt 300ms ease-out;
816
817
  }
817
818
 
819
+ .md-readonly-edit-at {
820
+ position: absolute;
821
+ z-index: 20;
822
+ display: inline-flex;
823
+ align-items: center;
824
+ gap: 4px;
825
+ box-sizing: border-box;
826
+ min-height: 26px;
827
+ padding: 4px 9px 4px 7px;
828
+ white-space: nowrap;
829
+ appearance: none;
830
+ border: 1px solid var(--md-readonly-accent, #4c8bf5);
831
+ border-radius: 999px;
832
+ background: var(--md-readonly-accent, #4c8bf5);
833
+ color: var(--md-readonly-accent-foreground, #ffffff);
834
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
835
+ font: 600 12px/1 system-ui, sans-serif;
836
+ cursor: pointer;
837
+ animation: md-readonly-edit-at-appear 120ms ease-out;
838
+ }
839
+
840
+ .md-readonly-edit-at[hidden] {
841
+ display: none;
842
+ }
843
+
844
+ .md-readonly-edit-at:hover {
845
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
846
+ filter: brightness(1.08);
847
+ }
848
+
849
+ .md-readonly-edit-at:focus-visible {
850
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
851
+ outline-offset: 2px;
852
+ }
853
+
854
+ .md-readonly-edit-at .codicon {
855
+ font-size: 14px;
856
+ }
857
+
858
+ @keyframes md-readonly-edit-at-appear {
859
+ from {
860
+ opacity: 0;
861
+ transform: translateY(-2px) scale(0.96);
862
+ }
863
+ }
864
+
818
865
  @keyframes md-readonly-editing-attempt {
819
866
  50% {
820
867
  box-shadow: inset 0 0 0 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
@@ -982,6 +1029,7 @@ pre.md-unhandled-scroll.md-code-block {
982
1029
  @media (prefers-reduced-motion: reduce) {
983
1030
 
984
1031
  .md-editor.md-readonly-editing-attempt,
1032
+ .md-readonly-edit-at,
985
1033
  .md-readonly-toggle,
986
1034
  .md-readonly-toggle .md-readonly-toggle-indicator,
987
1035
  .md-readonly-toggle .md-readonly-toggle-icon,
@@ -992,6 +1040,19 @@ pre.md-unhandled-scroll.md-code-block {
992
1040
  }
993
1041
 
994
1042
  @media (forced-colors: active) {
1043
+ .md-readonly-edit-at {
1044
+ forced-color-adjust: none;
1045
+ border-color: Highlight;
1046
+ background: Highlight;
1047
+ color: HighlightText;
1048
+ box-shadow: none;
1049
+ filter: none;
1050
+ }
1051
+
1052
+ .md-readonly-edit-at:focus-visible {
1053
+ outline-color: Highlight;
1054
+ }
1055
+
995
1056
  .md-readonly-toggle {
996
1057
  forced-color-adjust: none;
997
1058
  border-color: ButtonText;