File size: 2,863 Bytes
4e7644b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
.richInputRoot {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  max-height: 128px;
  overflow: auto;
  color: inherit;
}

.richEditor {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 5px 0;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  cursor: text;
}

.paragraph {
  margin: 0;
}

.text {
  color: inherit;
}

.placeholder {
  position: absolute;
  inset: 0 8px;
  padding: 5px 0;
  overflow: hidden;
  line-height: 1.65;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.hiddenTextarea {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  caret-color: transparent !important;
}

.atomicNode {
  display: inline;
}

.atomicChip {
  display: inline-flex;
  align-items: center;
  max-width: min(240px, 72vw);
  margin: 0 3px;
  padding: 2px 8px 2px 6px;
  gap: 4px;
  color: #1677ff;
  font: inherit;
  line-height: 1.45;
  vertical-align: baseline;
  background: rgba(22, 119, 255, 0.08);
  border: 1px solid rgba(22, 119, 255, 0.14);
  border-radius: 7px;
  cursor: pointer;

  svg {
    flex: 0 0 auto;
  }

  span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &:hover {
    color: #0958d9;
    background: rgba(22, 119, 255, 0.13);
  }
}

.codeChipHost {
  display: inline;
}

.codeChip {
  color: #315f93;
  font-family: var(--ant-font-family-code);
  background: rgba(49, 95, 147, 0.08);
  border-color: rgba(49, 95, 147, 0.16);
}

.codePopover {
  :global([class$="-popover-inner"]) {
    padding: 0;
    overflow: hidden;
  }
}

.codePreview {
  width: min(560px, calc(100vw - 48px));
  max-height: min(420px, 60vh);
  overflow: auto;

  pre {
    margin: 0;
    padding: 14px 16px 16px;
    color: var(--ant-color-text);
    font-family: var(--ant-font-family-code);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--ant-color-fill-quaternary);
  }
}

.codePreviewHeader {
  padding: 9px 16px;
  color: var(--ant-color-text-secondary);
  font-size: 12px;
  border-bottom: 1px solid var(--ant-color-border-secondary);
}

.richInputRoot[data-disabled] {
  cursor: not-allowed;

  .richEditor {
    cursor: not-allowed;
  }
}

:global(.dark-mode) {
  .atomicChip {
    color: #69b1ff;
    background: rgba(64, 150, 255, 0.14);
    border-color: rgba(105, 177, 255, 0.24);

    &:hover {
      color: #91caff;
      background: rgba(64, 150, 255, 0.2);
    }
  }

  .codeChip {
    color: #91caff;
    background: rgba(64, 150, 255, 0.12);
  }
}