@douyinfe/semi-foundation 2.90.13 → 2.91.0

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.
Files changed (79) hide show
  1. package/button/button.scss +1 -1
  2. package/button/variables.scss +32 -32
  3. package/cascader/variables.scss +13 -13
  4. package/checkbox/variables.scss +19 -19
  5. package/datePicker/variables.scss +15 -15
  6. package/inputNumber/foundation.ts +1 -1
  7. package/jsonViewer/jsonViewer.scss +3 -0
  8. package/jsonViewer/variables.scss +3 -0
  9. package/lib/cjs/button/button.scss +1 -1
  10. package/lib/cjs/button/variables.scss +32 -32
  11. package/lib/cjs/cascader/variables.scss +13 -13
  12. package/lib/cjs/checkbox/variables.scss +19 -19
  13. package/lib/cjs/datePicker/variables.scss +15 -15
  14. package/lib/cjs/inputNumber/foundation.js +1 -1
  15. package/lib/cjs/jsonViewer/jsonViewer.css +4 -0
  16. package/lib/cjs/jsonViewer/jsonViewer.scss +3 -0
  17. package/lib/cjs/jsonViewer/variables.scss +3 -0
  18. package/lib/cjs/navigation/variables.scss +9 -9
  19. package/lib/cjs/radio/variables.scss +22 -22
  20. package/lib/cjs/select/variables.scss +27 -28
  21. package/lib/cjs/sidebar/animation.scss +7 -0
  22. package/lib/cjs/sidebar/constants.d.ts +37 -0
  23. package/lib/cjs/sidebar/constants.js +43 -0
  24. package/lib/cjs/sidebar/containerFoundation.d.ts +42 -0
  25. package/lib/cjs/sidebar/containerFoundation.js +50 -0
  26. package/lib/cjs/sidebar/mcpCofContentFoundation.d.ts +52 -0
  27. package/lib/cjs/sidebar/mcpCofContentFoundation.js +74 -0
  28. package/lib/cjs/sidebar/sidebar.css +533 -0
  29. package/lib/cjs/sidebar/sidebar.scss +677 -0
  30. package/lib/cjs/sidebar/utils.d.ts +3 -0
  31. package/lib/cjs/sidebar/utils.js +28 -0
  32. package/lib/cjs/sidebar/variables.scss +138 -0
  33. package/lib/cjs/switch/variables.scss +30 -30
  34. package/lib/cjs/table/variables.scss +18 -19
  35. package/lib/cjs/tabs/variables.scss +5 -5
  36. package/lib/cjs/upload/variables.scss +10 -10
  37. package/lib/es/button/button.scss +1 -1
  38. package/lib/es/button/variables.scss +32 -32
  39. package/lib/es/cascader/variables.scss +13 -13
  40. package/lib/es/checkbox/variables.scss +19 -19
  41. package/lib/es/datePicker/variables.scss +15 -15
  42. package/lib/es/inputNumber/foundation.js +1 -1
  43. package/lib/es/jsonViewer/jsonViewer.css +4 -0
  44. package/lib/es/jsonViewer/jsonViewer.scss +3 -0
  45. package/lib/es/jsonViewer/variables.scss +3 -0
  46. package/lib/es/navigation/variables.scss +9 -9
  47. package/lib/es/radio/variables.scss +22 -22
  48. package/lib/es/select/variables.scss +27 -28
  49. package/lib/es/sidebar/animation.scss +7 -0
  50. package/lib/es/sidebar/constants.d.ts +37 -0
  51. package/lib/es/sidebar/constants.js +38 -0
  52. package/lib/es/sidebar/containerFoundation.d.ts +42 -0
  53. package/lib/es/sidebar/containerFoundation.js +42 -0
  54. package/lib/es/sidebar/mcpCofContentFoundation.d.ts +52 -0
  55. package/lib/es/sidebar/mcpCofContentFoundation.js +66 -0
  56. package/lib/es/sidebar/sidebar.css +533 -0
  57. package/lib/es/sidebar/sidebar.scss +677 -0
  58. package/lib/es/sidebar/utils.d.ts +3 -0
  59. package/lib/es/sidebar/utils.js +21 -0
  60. package/lib/es/sidebar/variables.scss +138 -0
  61. package/lib/es/switch/variables.scss +30 -30
  62. package/lib/es/table/variables.scss +18 -19
  63. package/lib/es/tabs/variables.scss +5 -5
  64. package/lib/es/upload/variables.scss +10 -10
  65. package/navigation/variables.scss +9 -9
  66. package/package.json +124 -4
  67. package/radio/variables.scss +22 -22
  68. package/select/variables.scss +27 -28
  69. package/sidebar/animation.scss +7 -0
  70. package/sidebar/constants.ts +41 -0
  71. package/sidebar/containerFoundation.ts +77 -0
  72. package/sidebar/mcpCofContentFoundation.ts +106 -0
  73. package/sidebar/sidebar.scss +677 -0
  74. package/sidebar/utils.ts +26 -0
  75. package/sidebar/variables.scss +138 -0
  76. package/switch/variables.scss +30 -30
  77. package/table/variables.scss +18 -19
  78. package/tabs/variables.scss +5 -5
  79. package/upload/variables.scss +10 -10
@@ -0,0 +1,42 @@
1
+ import BaseFoundation from '../base/foundation';
2
+ import KeyCode from '../utils/keyCode';
3
+ export default class ContainerFoundation extends BaseFoundation {
4
+ constructor(adapter) {
5
+ super(Object.assign(Object.assign({}, ContainerFoundation.defaultAdapter), adapter));
6
+ this.init = () => {};
7
+ this.destroy = () => {
8
+ this.afterHide();
9
+ };
10
+ this.toggleDisplayNone = displayNone => {
11
+ this._adapter.toggleDisplayNone(displayNone);
12
+ };
13
+ this.handleAnimationEnd = () => {
14
+ const {
15
+ visible
16
+ } = this.getProps();
17
+ this.toggleDisplayNone(!visible);
18
+ };
19
+ }
20
+ handleCancel(e) {
21
+ this._adapter.notifyCancel(e);
22
+ }
23
+ beforeShow() {
24
+ this._adapter.setOnKeyDownListener();
25
+ }
26
+ afterHide() {
27
+ this._adapter.removeKeyDownListener();
28
+ }
29
+ handleKeyDown(e) {
30
+ const {
31
+ closeOnEsc
32
+ } = this.getProps();
33
+ if (closeOnEsc && e.keyCode === KeyCode.ESC) {
34
+ e.stopPropagation();
35
+ this.handleCancel(e);
36
+ return;
37
+ }
38
+ }
39
+ onVisibleChange(visible) {
40
+ this._adapter.notifyVisibleChange(visible);
41
+ }
42
+ }
@@ -0,0 +1,52 @@
1
+ /// <reference types="lodash" />
2
+ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
3
+ export interface MCPOption {
4
+ icon?: any;
5
+ label?: string;
6
+ value?: string;
7
+ desc?: any;
8
+ active?: boolean;
9
+ disabled?: boolean;
10
+ configure?: boolean;
11
+ }
12
+ export interface MCPConfigureContentProps {
13
+ className?: string;
14
+ options?: MCPOption[];
15
+ customOptions?: MCPOption[];
16
+ filter?: (inputValue: string, option: MCPOption) => boolean;
17
+ placeholder?: string;
18
+ style?: any;
19
+ onStatusChange?: (options: MCPOption[], custom: boolean) => void;
20
+ onSearch?: (inputValue: string, custom: boolean) => void;
21
+ onAddClick?: (e: any) => void;
22
+ onConfigureClick?: (e: any, option: MCPOption) => void;
23
+ onEditClick?: (e: any, option: MCPOption) => void;
24
+ renderItem?: (props: {
25
+ option: MCPOption;
26
+ custom: boolean;
27
+ }) => any;
28
+ }
29
+ export type MCPConfigureMode = 'inner' | 'custom';
30
+ export interface MCPConfigureContentState {
31
+ mode: MCPConfigureMode;
32
+ inputValue: string;
33
+ showOptions: MCPOption[];
34
+ cachedOptions: MCPOption[];
35
+ cachedCustomOptions: MCPOption[];
36
+ }
37
+ export interface MCPConfigureContentAdapter extends DefaultAdapter<MCPConfigureContentProps, MCPConfigureContentState> {
38
+ notifyConfigureClick: (e: any, option: MCPOption) => void;
39
+ notifyEditClick: (e: any, option: MCPOption) => void;
40
+ notifyStatusChange?: (options: MCPOption[], custom: boolean) => void;
41
+ notifyAddClick?: (e: any) => void;
42
+ }
43
+ export default class MCPConfigureContentFoundation extends BaseFoundation<MCPConfigureContentAdapter> {
44
+ constructor(adapter: MCPConfigureContentAdapter);
45
+ handleSearch: (value: string) => void;
46
+ updateShowOptions: import("lodash").DebouncedFuncLeading<(value: string, mode?: MCPConfigureMode) => void>;
47
+ handleModeChange: (e: any) => void;
48
+ onConfigureButtonClick: (e: React.MouseEvent<HTMLButtonElement>, option: MCPOption) => void;
49
+ onEditButtonClick: (e: React.MouseEvent<HTMLButtonElement>, option: MCPOption) => void;
50
+ handleStatusChange: (item: MCPOption, checked: boolean) => void;
51
+ handleAddClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
52
+ }
@@ -0,0 +1,66 @@
1
+ import _throttle from "lodash/throttle";
2
+ import BaseFoundation from '../base/foundation';
3
+ import { strings } from './constants';
4
+ import { getFilterResult } from './utils';
5
+ export default class MCPConfigureContentFoundation extends BaseFoundation {
6
+ constructor(adapter) {
7
+ super(Object.assign({}, adapter));
8
+ this.handleSearch = value => {
9
+ this.setState({
10
+ inputValue: value
11
+ });
12
+ this.updateShowOptions(value);
13
+ };
14
+ this.updateShowOptions = _throttle((value, mode) => {
15
+ let realMode = mode !== null && mode !== void 0 ? mode : this.getState('mode');
16
+ const {
17
+ options = [],
18
+ customOptions = [],
19
+ filter
20
+ } = this.getProps();
21
+ let showOptions = [];
22
+ if (realMode === strings.MCP_MODE.INNER) {
23
+ showOptions = value ? getFilterResult(value, options, filter) : options;
24
+ } else {
25
+ showOptions = value ? getFilterResult(value, customOptions, filter) : customOptions;
26
+ }
27
+ this.setState({
28
+ showOptions
29
+ });
30
+ }, 300);
31
+ this.handleModeChange = e => {
32
+ const newMode = e.target.value;
33
+ this.setState({
34
+ mode: newMode
35
+ });
36
+ this.updateShowOptions(this.getState('inputValue'), newMode);
37
+ };
38
+ this.onConfigureButtonClick = (e, option) => {
39
+ this._adapter.notifyConfigureClick(e, option);
40
+ };
41
+ this.onEditButtonClick = (e, option) => {
42
+ this._adapter.notifyEditClick(e, option);
43
+ };
44
+ this.handleStatusChange = (item, checked) => {
45
+ const {
46
+ options = [],
47
+ customOptions = []
48
+ } = this.getProps();
49
+ let newOptions = [];
50
+ const mode = this.getState('mode');
51
+ if (mode === strings.MCP_MODE.INNER) {
52
+ newOptions = options.map(option => option.value === item.value ? Object.assign(Object.assign({}, option), {
53
+ active: checked
54
+ }) : option);
55
+ } else {
56
+ newOptions = customOptions.map(option => option.value === item.value ? Object.assign(Object.assign({}, option), {
57
+ active: checked
58
+ }) : option);
59
+ }
60
+ this._adapter.notifyStatusChange(newOptions, mode === strings.MCP_MODE.CUSTOM);
61
+ };
62
+ this.handleAddClick = e => {
63
+ this._adapter.notifyAddClick(e);
64
+ };
65
+ }
66
+ }
@@ -0,0 +1,533 @@
1
+ /* shadow */
2
+ /* sizing */
3
+ /* spacing */
4
+ .semi-sidebar-main .semi-sidebar-container-content {
5
+ overflow: hidden;
6
+ }
7
+ .semi-sidebar-main-content-wrapper {
8
+ display: flex;
9
+ flex-direction: column;
10
+ height: 100%;
11
+ }
12
+ .semi-sidebar-main-content {
13
+ padding: 12px;
14
+ height: 100%;
15
+ box-sizing: border-box;
16
+ overflow: auto;
17
+ }
18
+ .semi-sidebar-container {
19
+ height: 100%;
20
+ border-left: 1px solid var(--semi-color-border);
21
+ box-sizing: border-box;
22
+ display: flex;
23
+ flex-direction: column;
24
+ overflow: hidden;
25
+ position: relative;
26
+ }
27
+ .semi-sidebar-container-header {
28
+ display: flex;
29
+ align-items: center;
30
+ padding: 12px 12px 12px 20px;
31
+ border-bottom: 1px solid var(--semi-color-border);
32
+ }
33
+ .semi-sidebar-container-header-title {
34
+ flex: 1;
35
+ font-size: 16px;
36
+ line-height: 22px;
37
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
38
+ font-weight: 600;
39
+ }
40
+ .semi-sidebar-container-header-closeBtn {
41
+ flex-shrink: 0;
42
+ }
43
+ .semi-sidebar-container-content {
44
+ flex: 1 1;
45
+ overflow: hidden;
46
+ }
47
+ .semi-sidebar-container .semi-toast-wrapper {
48
+ position: absolute;
49
+ }
50
+ @keyframes semi-sidebar-slideShow_right {
51
+ from {
52
+ transform: translateX(100%);
53
+ }
54
+ to {
55
+ transform: translateX(0);
56
+ }
57
+ }
58
+ @keyframes semi-sidebar-slideHide_right {
59
+ from {
60
+ transform: translateX(0);
61
+ }
62
+ to {
63
+ transform: translateX(100%);
64
+ }
65
+ }
66
+ .semi-sidebar-animation-content_show {
67
+ animation: semi-sidebar-slideShow_right 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
68
+ animation-fill-mode: forwards;
69
+ }
70
+ .semi-sidebar-animation-content_hide {
71
+ animation: semi-sidebar-slideHide_right 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
72
+ animation-fill-mode: forwards;
73
+ }
74
+ .semi-sidebar-mcp-configure-content {
75
+ padding: 20px 16px;
76
+ display: flex;
77
+ flex-direction: column;
78
+ height: 100%;
79
+ box-sizing: border-box;
80
+ }
81
+ .semi-sidebar-mcp-configure-content-header {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: space-between;
85
+ }
86
+ .semi-sidebar-mcp-configure-content-header-count {
87
+ font-size: 12px;
88
+ line-height: 16px;
89
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
90
+ vertical-align: middle;
91
+ color: var(--semi-color-text-2);
92
+ }
93
+ .semi-sidebar-mcp-configure-content-search {
94
+ margin: 16px 0;
95
+ }
96
+ .semi-sidebar-mcp-configure-content-search-container {
97
+ display: flex;
98
+ column-gap: 8px;
99
+ }
100
+ .semi-sidebar-mcp-configure-content-item-container {
101
+ overflow-y: auto;
102
+ }
103
+ .semi-sidebar-mcp-configure-content-item {
104
+ padding: 8px 16px;
105
+ display: flex;
106
+ align-items: center;
107
+ border-bottom: 1px solid var(--semi-color-border);
108
+ }
109
+ .semi-sidebar-mcp-configure-content-item-sign {
110
+ width: 32px;
111
+ height: 32px;
112
+ margin-right: 12px;
113
+ flex-shrink: 0;
114
+ }
115
+ .semi-sidebar-mcp-configure-content-item-sign .semi-icon {
116
+ font-size: 32px;
117
+ }
118
+ .semi-sidebar-mcp-configure-content-item-content {
119
+ justify-content: center;
120
+ flex: 1;
121
+ min-width: 0;
122
+ margin-right: 24px;
123
+ }
124
+ .semi-sidebar-mcp-configure-content-item-content-label {
125
+ font-size: 14px;
126
+ line-height: 20px;
127
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
128
+ font-weight: 600;
129
+ color: var(--semi-color-text-0);
130
+ }
131
+ .semi-sidebar-mcp-configure-content-item-content-desc {
132
+ font-size: 12px;
133
+ line-height: 16px;
134
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
135
+ color: var(--semi-color-text-0);
136
+ overflow: hidden;
137
+ text-overflow: ellipsis;
138
+ white-space: nowrap;
139
+ max-width: 100%;
140
+ }
141
+ .semi-sidebar-mcp-configure-content-item-button {
142
+ flex-shrink: 0;
143
+ }
144
+ .semi-sidebar-mcp-configure-content-item-button-configure {
145
+ margin-right: 12px;
146
+ }
147
+ .semi-sidebar-mcp-configure-content-item-button.semi-button.semi-button-with-icon-only {
148
+ width: 24px;
149
+ height: 24px;
150
+ }
151
+ .semi-sidebar-mcp-configure-content-custom-empty {
152
+ margin-top: 64px;
153
+ }
154
+ .semi-sidebar-annotation .semi-sidebar-container-content {
155
+ padding: 12px;
156
+ overflow: auto;
157
+ }
158
+ .semi-sidebar-annotation-content {
159
+ display: flex;
160
+ flex-direction: row;
161
+ flex-wrap: wrap;
162
+ gap: 8px;
163
+ width: 100%;
164
+ }
165
+ .semi-sidebar-annotation-item {
166
+ cursor: pointer;
167
+ }
168
+ .semi-sidebar-annotation-item-title {
169
+ overflow: hidden;
170
+ text-overflow: ellipsis;
171
+ white-space: normal;
172
+ max-width: 100%;
173
+ display: -webkit-box;
174
+ line-clamp: 2;
175
+ -webkit-line-clamp: 2;
176
+ -webkit-box-orient: vertical;
177
+ font-size: 14px;
178
+ line-height: 20px;
179
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
180
+ color: var(--semi-color-text-0);
181
+ font-weight: 600;
182
+ }
183
+ .semi-sidebar-annotation-item-footer {
184
+ display: flex;
185
+ column-gap: 4px;
186
+ align-items: center;
187
+ }
188
+ .semi-sidebar-annotation-item-footer-logo {
189
+ font-size: 14px;
190
+ width: 14px;
191
+ height: 14px;
192
+ }
193
+ .semi-sidebar-annotation-item-footer-text {
194
+ font-size: 12px;
195
+ line-height: 16px;
196
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
197
+ color: var(--semi-color-text-0);
198
+ overflow: hidden;
199
+ text-overflow: ellipsis;
200
+ white-space: nowrap;
201
+ flex-grow: 1;
202
+ }
203
+ .semi-sidebar-annotation-item-footer-order {
204
+ box-sizing: border-box;
205
+ min-width: 16px;
206
+ padding: 0 2px;
207
+ height: 16px;
208
+ border-radius: 8px;
209
+ background-color: var(--semi-color-fill-1);
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ font-size: 12px;
214
+ line-height: 16px;
215
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
216
+ color: var(--semi-color-text-2);
217
+ }
218
+ .semi-sidebar-annotation-item-text {
219
+ padding: 3px 12px;
220
+ width: 100%;
221
+ row-gap: 8px;
222
+ display: flex;
223
+ flex-direction: column;
224
+ }
225
+ .semi-sidebar-annotation-item-text-detail {
226
+ overflow: hidden;
227
+ text-overflow: ellipsis;
228
+ white-space: normal;
229
+ max-width: 100%;
230
+ display: -webkit-box;
231
+ line-clamp: 4;
232
+ -webkit-line-clamp: 4;
233
+ -webkit-box-orient: vertical;
234
+ font-size: 12px;
235
+ line-height: 16px;
236
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
237
+ color: var(--semi-color-text-2);
238
+ }
239
+ .semi-sidebar-annotation-item-video {
240
+ border-radius: 6px;
241
+ border: 1px solid var(--semi-color-border);
242
+ overflow: hidden;
243
+ width: calc((100% - 8px) / 2);
244
+ box-sizing: border-box;
245
+ }
246
+ .semi-sidebar-annotation-item-video-content {
247
+ padding: 8px 8px 12px 8px;
248
+ display: flex;
249
+ flex-direction: column;
250
+ row-gap: 8px;
251
+ }
252
+ .semi-sidebar-annotation-item-video .semi-sidebar-annotation-item-title {
253
+ height: 40px;
254
+ }
255
+ .semi-sidebar-annotation-item-video-img {
256
+ width: 100%;
257
+ height: 100%;
258
+ object-fit: cover;
259
+ }
260
+ .semi-sidebar-annotation-item-video-img-wrapper {
261
+ position: relative;
262
+ width: 100%;
263
+ height: 107px;
264
+ }
265
+ .semi-sidebar-annotation-item-video-play {
266
+ position: absolute;
267
+ top: 6px;
268
+ right: 6px;
269
+ border: 1px solid var(--semi-color-bg-0);
270
+ background: var(--semi-color-text-2);
271
+ color: var(--semi-color-bg-0);
272
+ border-radius: 50%;
273
+ width: 20px;
274
+ height: 20px;
275
+ }
276
+ .semi-sidebar-annotation-item-video-play.semi-icon {
277
+ display: inline-flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ font-size: 12px;
281
+ }
282
+ .semi-sidebar-annotation-item-video-duration {
283
+ padding: 2px 4px;
284
+ position: absolute;
285
+ bottom: 6px;
286
+ right: 6px;
287
+ background-color: rgba(var(--semi-grey-7), 0.7);
288
+ border-radius: 4px;
289
+ font-size: 12px;
290
+ line-height: 16px;
291
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
292
+ color: var(--semi-color-bg-0);
293
+ }
294
+ .semi-sidebar-annotation-item-video-title {
295
+ font-size: 14px;
296
+ line-height: 20px;
297
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
298
+ color: var(--semi-color-text-0);
299
+ }
300
+ .semi-sidebar-code-content {
301
+ height: 100%;
302
+ }
303
+ .semi-sidebar-code-content .semi-codeHighlight-defaultTheme pre[class*=language-], .semi-sidebar-main-content .semi-codeHighlight-defaultTheme pre[class*=language-] {
304
+ margin: 0px;
305
+ padding-top: 0px;
306
+ padding-bottom: 0px;
307
+ background-color: transparent;
308
+ overflow-y: hidden;
309
+ overflow-x: auto;
310
+ }
311
+ .semi-sidebar-code-content .semi-codeHighlight .line-numbers .line-numbers-rows, .semi-sidebar-main-content .semi-codeHighlight .line-numbers .line-numbers-rows {
312
+ border-right: none;
313
+ }
314
+ .semi-sidebar-code-content .semi-json-viewer, .semi-sidebar-main-content .semi-json-viewer {
315
+ padding-top: 0px;
316
+ padding-bottom: 0px;
317
+ background-color: transparent;
318
+ }
319
+ .semi-sidebar-collapse .semi-collapse-item {
320
+ border: 1px solid var(--semi-color-border);
321
+ border-radius: 8px;
322
+ }
323
+ .semi-sidebar-collapse .semi-collapse-item:not(:last-child) {
324
+ margin-bottom: 8px;
325
+ }
326
+ .semi-sidebar-collapse .semi-collapse-header {
327
+ padding: 8px 16px;
328
+ margin: 0px;
329
+ font-weight: 400;
330
+ }
331
+ .semi-sidebar-collapse-header-content {
332
+ display: flex;
333
+ align-items: center;
334
+ gap: 8px;
335
+ width: 100%;
336
+ padding-right: 8px;
337
+ }
338
+ .semi-sidebar-collapse-header-content .semi-icon {
339
+ color: var(--semi-color-text-1);
340
+ }
341
+ .semi-sidebar-collapse-header-text {
342
+ flex: 1;
343
+ overflow: hidden;
344
+ text-overflow: ellipsis;
345
+ white-space: nowrap;
346
+ }
347
+ .semi-sidebar-collapse-header-expand-btn {
348
+ flex-shrink: 0;
349
+ }
350
+ .semi-sidebar-collapse-header-expand-btn.semi-button.semi-button-with-icon-only {
351
+ padding: 4px;
352
+ width: 24px;
353
+ height: 24px;
354
+ }
355
+ .semi-sidebar-collapse .semi-collapse-item-active .semi-collapsible-wrapper {
356
+ border-top: 1px solid var(--semi-color-border);
357
+ }
358
+ .semi-sidebar-collapse-code .semi-collapse-content {
359
+ padding: 12px 0px;
360
+ }
361
+ .semi-sidebar-options {
362
+ display: flex;
363
+ flex-direction: row;
364
+ flex-wrap: wrap;
365
+ gap: 8px;
366
+ padding: 8px 12px;
367
+ border-bottom: 1px solid var(--semi-color-border);
368
+ }
369
+ .semi-sidebar-options-button .semi-button-content-right {
370
+ margin-left: 4px;
371
+ }
372
+ .semi-sidebar-options-normal.semi-button-primary.semi-button-light {
373
+ color: var(--semi-color-text-2);
374
+ font-weight: 400;
375
+ }
376
+ .semi-sidebar-file .tiptap {
377
+ font-size: 14px;
378
+ line-height: 24px;
379
+ }
380
+ .semi-sidebar-file .tiptap ::selection {
381
+ background: rgba(var(--semi-light-blue-1), 1);
382
+ }
383
+ .semi-sidebar-file .tiptap ::-moz-selection {
384
+ background: rgba(var(--semi-light-blue-1), 1);
385
+ }
386
+ .semi-sidebar-file .tiptap p.is-editor-empty:first-child::before {
387
+ color: var(--semi-color-text-2);
388
+ content: attr(data-placeholder);
389
+ float: left;
390
+ height: 0;
391
+ pointer-events: none;
392
+ }
393
+ .semi-sidebar-file .tiptap p {
394
+ margin: 0px;
395
+ white-space: pre-wrap;
396
+ color: var(--semi-color-text-0);
397
+ }
398
+ .semi-sidebar-file .tiptap blockquote {
399
+ border-left: 3px solid var(--semi-color-border);
400
+ margin: 24px 0;
401
+ padding-left: 16px;
402
+ }
403
+ .semi-sidebar-file .tiptap:focus {
404
+ outline: none;
405
+ }
406
+ .semi-sidebar-file .tiptap pre {
407
+ background-color: var(--semi-color-fill-0);
408
+ padding: 2px 4px;
409
+ border-radius: 4px;
410
+ overflow: auto;
411
+ font-size: 14px;
412
+ line-height: 24px;
413
+ border: 1px solid var(--semi-color-border);
414
+ }
415
+ .semi-sidebar-file .tiptap pre code {
416
+ background-color: transparent;
417
+ }
418
+ .semi-sidebar-file .tiptap code {
419
+ background-color: var(--semi-color-border);
420
+ padding: 2px 4px;
421
+ }
422
+ .semi-sidebar-file .tiptap hr {
423
+ border: none;
424
+ border-top: 1px solid var(--semi-color-border);
425
+ }
426
+ .semi-sidebar-file .tiptap span.select {
427
+ display: inline-block;
428
+ background-color: rgba(var(--semi-light-blue-1), 1);
429
+ line-height: 24px;
430
+ }
431
+ .semi-sidebar-file .tiptap.ProseMirror img:not([data-type=emoji] img) {
432
+ outline: 0.125rem solid transparent;
433
+ margin: 12px 0;
434
+ }
435
+ .semi-sidebar-file .tiptap.ProseMirror img:not([data-type=emoji] img).ProseMirror-selectednode {
436
+ outline-color: var(--semi-color-text-0);
437
+ }
438
+ .semi-sidebar-file .tiptap .tiptap-image-slot .uploadFail .semi-upload-drag-area, .semi-sidebar-file .tiptap .tiptap-image-slot .validateFail .semi-upload-drag-area, .semi-sidebar-file .tiptap .tiptap-image-slot .uploading .semi-upload-drag-area, .semi-sidebar-file .tiptap .tiptap-image-slot .success .semi-upload-drag-area {
439
+ display: none;
440
+ }
441
+ .semi-sidebar-file-menu-bar {
442
+ display: flex;
443
+ flex-direction: row;
444
+ align-items: center;
445
+ justify-content: center;
446
+ flex-wrap: wrap;
447
+ gap: 2px;
448
+ border-top: 1px solid var(--semi-color-border);
449
+ border-bottom: 1px solid var(--semi-color-border);
450
+ padding: 2px 12px;
451
+ }
452
+ .semi-sidebar-file-menu-bar-dropdown-item-active {
453
+ color: var(--semi-color-primary);
454
+ background: var(--semi-color-fill-0);
455
+ }
456
+ .semi-sidebar-file-menu-bar .semi-divider-vertical {
457
+ margin: 0px;
458
+ }
459
+ .semi-sidebar-file-menu-bar-btn-active.semi-button-tertiary.semi-button-borderless {
460
+ background: var(--semi-color-fill-0);
461
+ }
462
+ .semi-sidebar-file-menu-bar-btn-codeblock {
463
+ font-size: 12px;
464
+ line-height: 16px;
465
+ padding: 8px;
466
+ }
467
+ .semi-sidebar-file-menu-bar-link-dropdown {
468
+ padding: 8px;
469
+ display: flex;
470
+ align-items: center;
471
+ justify-content: center;
472
+ }
473
+ .semi-sidebar-file-menu-bar-link-dropdown-btn-active.semi-button-tertiary.semi-button-borderless {
474
+ color: var(--semi-color-primary);
475
+ }
476
+ .semi-sidebar-detail .semi-sidebar-file {
477
+ height: 100%;
478
+ display: flex;
479
+ flex-direction: column;
480
+ }
481
+ .semi-sidebar-detail .semi-sidebar-file-content {
482
+ height: 100%;
483
+ }
484
+ .semi-sidebar-detail .semi-sidebar-file-editor {
485
+ overflow: auto;
486
+ flex: 1;
487
+ padding: 0 12px;
488
+ }
489
+ .semi-sidebar-detail .semi-sidebar-code-content {
490
+ overflow: auto;
491
+ }
492
+ .semi-sidebar-main .semi-sidebar-code-content {
493
+ height: 200px;
494
+ overflow: auto;
495
+ }
496
+ .semi-sidebar-main .semi-sidebar-collapse-file .semi-collapse-content {
497
+ max-height: 400px;
498
+ overflow: auto;
499
+ }
500
+ .semi-sidebar-main .semi-sidebar-collapse-code .semi-collapse-content {
501
+ max-height: 200px;
502
+ overflow: auto;
503
+ }
504
+ .semi-sidebar-main .semi-codeHighlight {
505
+ height: 200px;
506
+ overflow: auto;
507
+ }
508
+ .semi-sidebar-detail-header {
509
+ display: flex;
510
+ flex-direction: row;
511
+ justify-content: space-between;
512
+ align-items: center;
513
+ color: var(--semi-color-text-0);
514
+ padding: 12px;
515
+ }
516
+ .semi-sidebar-detail-header-left {
517
+ display: flex;
518
+ flex-direction: row;
519
+ column-gap: 8px;
520
+ align-items: center;
521
+ }
522
+ .semi-sidebar-detail-header-title {
523
+ font-size: 16px;
524
+ line-height: 22px;
525
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
526
+ font-weight: 600;
527
+ }
528
+ .semi-sidebar-detail-header-right {
529
+ display: flex;
530
+ flex-direction: row;
531
+ column-gap: 4px;
532
+ align-items: center;
533
+ }