@uiw/react-md-editor 3.22.0 → 3.23.1

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.
@@ -27,6 +27,7 @@
27
27
  box-sizing: inherit;
28
28
  display: inherit;
29
29
  font-family: inherit;
30
+ font-family: var(--md-editor-font-family) !important;
30
31
  font-size: inherit;
31
32
  font-style: inherit;
32
33
  font-variant-ligatures: inherit;
@@ -42,9 +43,6 @@
42
43
  word-break: inherit;
43
44
  word-break: normal;
44
45
  padding: 0;
45
- > code {
46
- font-family: inherit;
47
- }
48
46
  }
49
47
  &-pre {
50
48
  position: relative;
@@ -53,7 +51,7 @@
53
51
  background-color: transparent !important;
54
52
  > code {
55
53
  padding: 0 !important;
56
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
54
+ font-family: var(--md-editor-font-family) !important;
57
55
  font-size: 14px !important;
58
56
  line-height: 18px !important;
59
57
  }
@@ -103,17 +101,17 @@
103
101
 
104
102
  .@{md-editor}-text-pre {
105
103
  .punctuation {
106
- color: var(--color-prettylights-syntax-comment) !important;
104
+ color: var(--color-prettylights-syntax-comment, #8b949e) !important;
107
105
  }
108
106
  .token.url,
109
107
  .token.content {
110
- color: var(--color-prettylights-syntax-constant) !important;
108
+ color: var(--color-prettylights-syntax-constant, #0550ae) !important;
111
109
  }
112
110
  .token.title.important {
113
- color: var(--color-prettylights-syntax-markup-bold);
111
+ color: var(--color-prettylights-syntax-markup-bold, #24292f);
114
112
  }
115
113
  .token.code-block .function {
116
- color: var(--color-prettylights-syntax-entity);
114
+ color: var(--color-prettylights-syntax-entity, #8250df);
117
115
  }
118
116
  .token.bold {
119
117
  font-weight: unset !important;
@@ -124,10 +122,10 @@
124
122
  font-weight: unset !important;
125
123
  }
126
124
  .token.code.keyword {
127
- color: var(--color-prettylights-syntax-constant) !important;
125
+ color: var(--color-prettylights-syntax-constant, #0550ae) !important;
128
126
  }
129
127
  .token.strike,
130
128
  .token.strike .content {
131
- color: var(--color-prettylights-syntax-markup-deleted-text) !important;
129
+ color: var(--color-prettylights-syntax-markup-deleted-text, #82071e) !important;
132
130
  }
133
131
  }
@@ -4,9 +4,9 @@
4
4
  &-toolbar-child {
5
5
  position: absolute;
6
6
  border-radius: 3px;
7
- box-shadow: 0 0 0 1px var(--color-border-default), 0 0 0 var(--color-border-default),
8
- 0 1px 1px var(--color-border-default);
9
- background-color: var(--color-canvas-default);
7
+ box-shadow: 0 0 0 1px var(--md-editor-box-shadow-color), 0 0 0 var(--md-editor-box-shadow-color),
8
+ 0 1px 1px var(--md-editor-box-shadow-color);
9
+ background-color: var(--md-editor-background-color);
10
10
  z-index: 1;
11
11
  display: none;
12
12
  &.active {
@@ -2,8 +2,8 @@
2
2
 
3
3
  .@{md-editor} {
4
4
  &-toolbar {
5
- border-bottom: 1px solid var(--color-border-default);
6
- background-color: var(--color-canvas-default);
5
+ border-bottom: 1px solid var(--md-editor-box-shadow-color);
6
+ background-color: var(--md-editor-background-color);
7
7
  padding: 5px 5px;
8
8
  display: flex;
9
9
  justify-content: space-between;
@@ -13,7 +13,7 @@
13
13
  flex-wrap: wrap;
14
14
  &.bottom {
15
15
  border-bottom: 0px;
16
- border-top: 1px solid var(--color-border-default);
16
+ border-top: 1px solid var(--md-editor-box-shadow-color);
17
17
  border-radius: 0 0 3px 3px;
18
18
  }
19
19
  ul,
@@ -55,11 +55,11 @@
55
55
  color: var(--color-danger-fg);
56
56
  }
57
57
  &:disabled {
58
- color: var(--color-border-default);
58
+ color: var(--md-editor-box-shadow-color);
59
59
  cursor: not-allowed;
60
60
  &:hover {
61
61
  background-color: transparent;
62
- color: var(--color-border-default);
62
+ color: var(--md-editor-box-shadow-color);
63
63
  }
64
64
  }
65
65
  }
@@ -73,7 +73,7 @@
73
73
  width: 1px;
74
74
  margin: -3px 3px 0 3px !important;
75
75
  vertical-align: middle;
76
- background-color: var(--color-border-default);
76
+ background-color: var(--md-editor-box-shadow-color);
77
77
  }
78
78
  }
79
79
  }
package/src/index.less CHANGED
@@ -6,9 +6,12 @@
6
6
  padding-bottom: 1px;
7
7
  position: relative;
8
8
  color: var(--color-fg-default);
9
- box-shadow: 0 0 0 1px var(--color-border-default), 0 0 0 var(--color-border-default),
10
- 0 1px 1px var(--color-border-default);
11
- background-color: var(--color-canvas-default);
9
+ --md-editor-font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
10
+ --md-editor-background-color: var(--color-canvas-default, #ffffff);
11
+ --md-editor-box-shadow-color: var(--color-border-default, #d0d7de);
12
+ box-shadow: 0 0 0 1px var(--md-editor-box-shadow-color), 0 0 0 var(--md-editor-box-shadow-color),
13
+ 0 1px 1px var(--md-editor-box-shadow-color);
14
+ background-color: var(--md-editor-background-color);
12
15
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
13
16
  display: flex;
14
17
  flex-direction: column;
@@ -20,7 +23,7 @@
20
23
  right: unset !important;
21
24
  left: 0;
22
25
  text-align: right !important;
23
- box-shadow: inset -1px 0 0 0 var(--color-border-default);
26
+ box-shadow: inset -1px 0 0 0 var(--md-editor-box-shadow-color);
24
27
  }
25
28
  &&-rtl &-text {
26
29
  text-align: right !important;
@@ -48,7 +51,7 @@
48
51
  &-preview {
49
52
  width: 50%;
50
53
  box-sizing: border-box;
51
- box-shadow: inset 1px 0 0 0 var(--color-border-default);
54
+ box-shadow: inset 1px 0 0 0 var(--md-editor-box-shadow-color);
52
55
  position: absolute;
53
56
  padding: 10px 20px;
54
57
  overflow: auto;
@@ -70,7 +73,7 @@
70
73
  &-show-preview &-input {
71
74
  width: 0%;
72
75
  overflow: hidden;
73
- background-color: var(--color-canvas-default);
76
+ background-color: var(--md-editor-background-color);
74
77
  }
75
78
  &-show-preview &-preview {
76
79
  width: 100%;