@douyinfe/semi-foundation 2.70.0-alpha.2 → 2.70.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.
- package/chat/foundation.ts +17 -2
- package/datePicker/yearAndMonthFoundation.ts +29 -9
- package/lib/cjs/chat/foundation.d.ts +4 -0
- package/lib/cjs/chat/foundation.js +12 -1
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +39 -8
- package/lib/cjs/markdownRender/foundation.d.ts +1 -0
- package/lib/cjs/markdownRender/foundation.js +9 -4
- package/lib/cjs/overflowList/constants.d.ts +1 -1
- package/lib/cjs/resizable/foundation.d.ts +2 -4
- package/lib/cjs/resizable/group/index.d.ts +6 -3
- package/lib/cjs/resizable/group/index.js +90 -23
- package/lib/cjs/resizable/resizable.css +86 -0
- package/lib/cjs/resizable/resizable.scss +100 -3
- package/lib/cjs/resizable/single/index.d.ts +1 -1
- package/lib/cjs/resizable/single/index.js +2 -2
- package/lib/cjs/resizable/types.d.ts +41 -0
- package/lib/cjs/resizable/types.js +12 -0
- package/lib/cjs/resizable/utils.js +5 -5
- package/lib/cjs/resizable/variables.scss +8 -0
- package/lib/cjs/table/table.css +2 -1
- package/lib/cjs/table/table.scss +2 -1
- package/lib/cjs/transfer/transfer.css +1 -0
- package/lib/cjs/transfer/transfer.scss +1 -0
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/treeSelect/treeSelect.css +3 -1
- package/lib/cjs/treeSelect/treeSelect.scss +4 -1
- package/lib/es/chat/foundation.d.ts +4 -0
- package/lib/es/chat/foundation.js +12 -1
- package/lib/es/datePicker/yearAndMonthFoundation.js +39 -8
- package/lib/es/markdownRender/foundation.d.ts +1 -0
- package/lib/es/markdownRender/foundation.js +9 -4
- package/lib/es/overflowList/constants.d.ts +1 -1
- package/lib/es/resizable/foundation.d.ts +2 -4
- package/lib/es/resizable/foundation.js +2 -4
- package/lib/es/resizable/group/index.d.ts +6 -3
- package/lib/es/resizable/group/index.js +90 -23
- package/lib/es/resizable/resizable.css +86 -0
- package/lib/es/resizable/resizable.scss +100 -3
- package/lib/es/resizable/single/index.d.ts +1 -1
- package/lib/es/resizable/single/index.js +1 -1
- package/lib/es/resizable/types.d.ts +41 -0
- package/lib/es/resizable/types.js +6 -0
- package/lib/es/resizable/utils.js +5 -5
- package/lib/es/resizable/variables.scss +8 -0
- package/lib/es/table/table.css +2 -1
- package/lib/es/table/table.scss +2 -1
- package/lib/es/transfer/transfer.css +1 -0
- package/lib/es/transfer/transfer.scss +1 -0
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/treeSelect/treeSelect.css +3 -1
- package/lib/es/treeSelect/treeSelect.scss +4 -1
- package/markdownRender/foundation.ts +13 -7
- package/package.json +3 -5
- package/resizable/foundation.ts +3 -19
- package/resizable/group/index.ts +92 -29
- package/resizable/resizable.scss +100 -3
- package/resizable/single/index.ts +1 -1
- package/resizable/{singleConstants.ts → types.ts} +0 -65
- package/resizable/utils.ts +7 -6
- package/resizable/variables.scss +8 -0
- package/table/table.scss +2 -1
- package/transfer/transfer.scss +1 -0
- package/treeSelect/treeSelect.scss +4 -1
- package/tsconfig.json +1 -1
- package/jsonViewer/constants.ts +0 -7
- package/jsonViewer/foundation.ts +0 -67
- package/jsonViewer/jsonViewer.scss +0 -152
- package/jsonViewer/script/build.js +0 -51
- package/jsonViewer/variables.scss +0 -27
- package/lib/cjs/jsonViewer/constants.d.ts +0 -4
- package/lib/cjs/jsonViewer/constants.js +0 -10
- package/lib/cjs/jsonViewer/foundation.d.ts +0 -21
- package/lib/cjs/jsonViewer/foundation.js +0 -78
- package/lib/cjs/jsonViewer/jsonViewer.css +0 -136
- package/lib/cjs/jsonViewer/jsonViewer.scss +0 -152
- package/lib/cjs/jsonViewer/variables.scss +0 -27
- package/lib/cjs/resizable/groupConstants.d.ts +0 -16
- package/lib/cjs/resizable/groupConstants.js +0 -25
- package/lib/cjs/resizable/singleConstants.d.ts +0 -105
- package/lib/cjs/resizable/singleConstants.js +0 -67
- package/lib/es/jsonViewer/constants.d.ts +0 -4
- package/lib/es/jsonViewer/constants.js +0 -5
- package/lib/es/jsonViewer/foundation.d.ts +0 -21
- package/lib/es/jsonViewer/foundation.js +0 -60
- package/lib/es/jsonViewer/jsonViewer.css +0 -136
- package/lib/es/jsonViewer/jsonViewer.scss +0 -152
- package/lib/es/jsonViewer/variables.scss +0 -27
- package/lib/es/resizable/groupConstants.d.ts +0 -16
- package/lib/es/resizable/groupConstants.js +0 -19
- package/lib/es/resizable/singleConstants.d.ts +0 -105
- package/lib/es/resizable/singleConstants.js +0 -61
- package/resizable/groupConstants.ts +0 -25
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.directionStyles = void 0;
|
|
7
|
-
// group
|
|
8
|
-
const rowStyleBase = {
|
|
9
|
-
width: '100%',
|
|
10
|
-
height: '8px',
|
|
11
|
-
flexShrink: 0,
|
|
12
|
-
margin: '0',
|
|
13
|
-
cursor: 'row-resize'
|
|
14
|
-
};
|
|
15
|
-
const colStyleBase = {
|
|
16
|
-
width: '8px',
|
|
17
|
-
flexShrink: 0,
|
|
18
|
-
height: '100%',
|
|
19
|
-
margin: '0',
|
|
20
|
-
cursor: 'col-resize'
|
|
21
|
-
};
|
|
22
|
-
const directionStyles = exports.directionStyles = {
|
|
23
|
-
horizontal: Object.assign({}, colStyleBase),
|
|
24
|
-
vertical: Object.assign({}, rowStyleBase)
|
|
25
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
export declare const directions: readonly ["top", "right", "bottom", "left", "topRight", "bottomRight", "bottomLeft", "topLeft"];
|
|
2
|
-
export declare const directionStyles: {
|
|
3
|
-
readonly top: {
|
|
4
|
-
readonly top: "-5px";
|
|
5
|
-
readonly width: "100%";
|
|
6
|
-
readonly height: "10px";
|
|
7
|
-
readonly left: "0px";
|
|
8
|
-
readonly cursor: "row-resize";
|
|
9
|
-
};
|
|
10
|
-
readonly right: {
|
|
11
|
-
readonly left: any;
|
|
12
|
-
readonly right: "-5px";
|
|
13
|
-
readonly width: "10px";
|
|
14
|
-
readonly height: "100%";
|
|
15
|
-
readonly top: "0px";
|
|
16
|
-
readonly cursor: "col-resize";
|
|
17
|
-
};
|
|
18
|
-
readonly bottom: {
|
|
19
|
-
readonly top: any;
|
|
20
|
-
readonly bottom: "-5px";
|
|
21
|
-
readonly width: "100%";
|
|
22
|
-
readonly height: "10px";
|
|
23
|
-
readonly left: "0px";
|
|
24
|
-
readonly cursor: "row-resize";
|
|
25
|
-
};
|
|
26
|
-
readonly left: {
|
|
27
|
-
readonly left: "-5px";
|
|
28
|
-
readonly width: "10px";
|
|
29
|
-
readonly height: "100%";
|
|
30
|
-
readonly top: "0px";
|
|
31
|
-
readonly cursor: "col-resize";
|
|
32
|
-
};
|
|
33
|
-
readonly topRight: {
|
|
34
|
-
readonly right: "-10px";
|
|
35
|
-
readonly top: "-10px";
|
|
36
|
-
readonly cursor: "ne-resize";
|
|
37
|
-
readonly width: "20px";
|
|
38
|
-
readonly height: "20px";
|
|
39
|
-
readonly position: "absolute";
|
|
40
|
-
};
|
|
41
|
-
readonly bottomRight: {
|
|
42
|
-
readonly right: "-10px";
|
|
43
|
-
readonly bottom: "-10px";
|
|
44
|
-
readonly cursor: "se-resize";
|
|
45
|
-
readonly width: "20px";
|
|
46
|
-
readonly height: "20px";
|
|
47
|
-
readonly position: "absolute";
|
|
48
|
-
};
|
|
49
|
-
readonly bottomLeft: {
|
|
50
|
-
readonly left: "-10px";
|
|
51
|
-
readonly bottom: "-10px";
|
|
52
|
-
readonly cursor: "sw-resize";
|
|
53
|
-
readonly width: "20px";
|
|
54
|
-
readonly height: "20px";
|
|
55
|
-
readonly position: "absolute";
|
|
56
|
-
};
|
|
57
|
-
readonly topLeft: {
|
|
58
|
-
readonly left: "-10px";
|
|
59
|
-
readonly top: "-10px";
|
|
60
|
-
readonly cursor: "nw-resize";
|
|
61
|
-
readonly width: "20px";
|
|
62
|
-
readonly height: "20px";
|
|
63
|
-
readonly position: "absolute";
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export type Direction = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';
|
|
67
|
-
export interface HandleClassName {
|
|
68
|
-
top?: string;
|
|
69
|
-
right?: string;
|
|
70
|
-
bottom?: string;
|
|
71
|
-
left?: string;
|
|
72
|
-
topRight?: string;
|
|
73
|
-
bottomRight?: string;
|
|
74
|
-
bottomLeft?: string;
|
|
75
|
-
topLeft?: string;
|
|
76
|
-
}
|
|
77
|
-
export type HandlerCallback = (e: MouseEvent, direction: Direction) => void;
|
|
78
|
-
export interface Enable {
|
|
79
|
-
top?: boolean;
|
|
80
|
-
right?: boolean;
|
|
81
|
-
bottom?: boolean;
|
|
82
|
-
left?: boolean;
|
|
83
|
-
topRight?: boolean;
|
|
84
|
-
bottomRight?: boolean;
|
|
85
|
-
bottomLeft?: boolean;
|
|
86
|
-
topLeft?: boolean;
|
|
87
|
-
}
|
|
88
|
-
export interface Size {
|
|
89
|
-
width?: string | number;
|
|
90
|
-
height?: string | number;
|
|
91
|
-
}
|
|
92
|
-
export interface NumberSize {
|
|
93
|
-
width: number;
|
|
94
|
-
height: number;
|
|
95
|
-
}
|
|
96
|
-
export interface NewSize {
|
|
97
|
-
newHeight: number | string;
|
|
98
|
-
newWidth: number | string;
|
|
99
|
-
}
|
|
100
|
-
export declare const DEFAULT_SIZE: {
|
|
101
|
-
width: string;
|
|
102
|
-
height: string;
|
|
103
|
-
};
|
|
104
|
-
export type ResizeCallback = (size: Size, event: MouseEvent, direction: Direction) => void;
|
|
105
|
-
export type ResizeStartCallback = (e: MouseEvent, dir: Direction) => void | boolean;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.directions = exports.directionStyles = exports.DEFAULT_SIZE = void 0;
|
|
7
|
-
// single
|
|
8
|
-
const rowStyleBase = {
|
|
9
|
-
width: '100%',
|
|
10
|
-
height: '10px',
|
|
11
|
-
top: '0px',
|
|
12
|
-
left: '0px',
|
|
13
|
-
cursor: 'row-resize'
|
|
14
|
-
};
|
|
15
|
-
const colStyleBase = {
|
|
16
|
-
width: '10px',
|
|
17
|
-
height: '100%',
|
|
18
|
-
top: '0px',
|
|
19
|
-
left: '0px',
|
|
20
|
-
cursor: 'col-resize'
|
|
21
|
-
};
|
|
22
|
-
const edgeStyleBase = {
|
|
23
|
-
width: '20px',
|
|
24
|
-
height: '20px',
|
|
25
|
-
position: 'absolute'
|
|
26
|
-
};
|
|
27
|
-
const directions = exports.directions = ['top', 'right', 'bottom', 'left', 'topRight', 'bottomRight', 'bottomLeft', 'topLeft'];
|
|
28
|
-
const directionStyles = exports.directionStyles = {
|
|
29
|
-
top: Object.assign(Object.assign({}, rowStyleBase), {
|
|
30
|
-
top: '-5px'
|
|
31
|
-
}),
|
|
32
|
-
right: Object.assign(Object.assign({}, colStyleBase), {
|
|
33
|
-
left: undefined,
|
|
34
|
-
right: '-5px'
|
|
35
|
-
}),
|
|
36
|
-
bottom: Object.assign(Object.assign({}, rowStyleBase), {
|
|
37
|
-
top: undefined,
|
|
38
|
-
bottom: '-5px'
|
|
39
|
-
}),
|
|
40
|
-
left: Object.assign(Object.assign({}, colStyleBase), {
|
|
41
|
-
left: '-5px'
|
|
42
|
-
}),
|
|
43
|
-
topRight: Object.assign(Object.assign({}, edgeStyleBase), {
|
|
44
|
-
right: '-10px',
|
|
45
|
-
top: '-10px',
|
|
46
|
-
cursor: 'ne-resize'
|
|
47
|
-
}),
|
|
48
|
-
bottomRight: Object.assign(Object.assign({}, edgeStyleBase), {
|
|
49
|
-
right: '-10px',
|
|
50
|
-
bottom: '-10px',
|
|
51
|
-
cursor: 'se-resize'
|
|
52
|
-
}),
|
|
53
|
-
bottomLeft: Object.assign(Object.assign({}, edgeStyleBase), {
|
|
54
|
-
left: '-10px',
|
|
55
|
-
bottom: '-10px',
|
|
56
|
-
cursor: 'sw-resize'
|
|
57
|
-
}),
|
|
58
|
-
topLeft: Object.assign(Object.assign({}, edgeStyleBase), {
|
|
59
|
-
left: '-10px',
|
|
60
|
-
top: '-10px',
|
|
61
|
-
cursor: 'nw-resize'
|
|
62
|
-
})
|
|
63
|
-
};
|
|
64
|
-
const DEFAULT_SIZE = exports.DEFAULT_SIZE = {
|
|
65
|
-
width: 'auto',
|
|
66
|
-
height: 'auto'
|
|
67
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from '@douyinfe/semi-json-viewer-core';
|
|
2
|
-
import { JsonViewer } from '@douyinfe/semi-json-viewer-core';
|
|
3
|
-
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
4
|
-
export interface JsonViewerAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
5
|
-
getJsonViewerRef: () => HTMLElement;
|
|
6
|
-
onValueChange: (value: string) => void;
|
|
7
|
-
onValueHover: (value: string, el: HTMLElement) => HTMLElement | undefined;
|
|
8
|
-
}
|
|
9
|
-
declare class JsonViewerFoundation extends BaseFoundation<JsonViewerAdapter> {
|
|
10
|
-
constructor(adapter: JsonViewerAdapter);
|
|
11
|
-
jsonViewer: JsonViewer | null;
|
|
12
|
-
init(): void;
|
|
13
|
-
onValueChange(value: string): void;
|
|
14
|
-
onValueHover(value: string, el: HTMLElement): HTMLElement | undefined;
|
|
15
|
-
search(searchText: string): void;
|
|
16
|
-
prevSearch(): void;
|
|
17
|
-
nextSearch(): void;
|
|
18
|
-
replace(replaceText: string): void;
|
|
19
|
-
replaceAll(replaceText: string): void;
|
|
20
|
-
}
|
|
21
|
-
export default JsonViewerFoundation;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export * from '@douyinfe/semi-json-viewer-core';
|
|
2
|
-
import { JsonViewer } from '@douyinfe/semi-json-viewer-core';
|
|
3
|
-
import BaseFoundation from '../base/foundation';
|
|
4
|
-
class JsonViewerFoundation extends BaseFoundation {
|
|
5
|
-
constructor(adapter) {
|
|
6
|
-
super(Object.assign(Object.assign({}, JsonViewerFoundation), adapter));
|
|
7
|
-
this.jsonViewer = null;
|
|
8
|
-
}
|
|
9
|
-
init() {
|
|
10
|
-
const props = this.getProps();
|
|
11
|
-
const jsonViewerRef = this._adapter.getJsonViewerRef();
|
|
12
|
-
this.jsonViewer = new JsonViewer(jsonViewerRef, props.value, props.options);
|
|
13
|
-
this.jsonViewer.layout();
|
|
14
|
-
this.jsonViewer.emitter.on('contentChanged', e => {
|
|
15
|
-
var _a;
|
|
16
|
-
this.onValueChange((_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getModel().getValue());
|
|
17
|
-
});
|
|
18
|
-
this.jsonViewer.emitter.on('hoverNode', e => {
|
|
19
|
-
const el = this.onValueHover(e.value, e.target);
|
|
20
|
-
if (el) {
|
|
21
|
-
this.jsonViewer.emitter.emit('renderHoverNode', {
|
|
22
|
-
el
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
onValueChange(value) {
|
|
28
|
-
this._adapter.onValueChange(value);
|
|
29
|
-
}
|
|
30
|
-
onValueHover(value, el) {
|
|
31
|
-
return this._adapter.onValueHover(value, el);
|
|
32
|
-
}
|
|
33
|
-
search(searchText) {
|
|
34
|
-
var _a;
|
|
35
|
-
const state = this.getState('searchOptions');
|
|
36
|
-
const {
|
|
37
|
-
caseSensitive,
|
|
38
|
-
wholeWord,
|
|
39
|
-
regex
|
|
40
|
-
} = state;
|
|
41
|
-
(_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getSearchWidget().search(searchText, caseSensitive, wholeWord, regex);
|
|
42
|
-
}
|
|
43
|
-
prevSearch() {
|
|
44
|
-
var _a;
|
|
45
|
-
(_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getSearchWidget().navigateResults(-1);
|
|
46
|
-
}
|
|
47
|
-
nextSearch() {
|
|
48
|
-
var _a;
|
|
49
|
-
(_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getSearchWidget().navigateResults(1);
|
|
50
|
-
}
|
|
51
|
-
replace(replaceText) {
|
|
52
|
-
var _a;
|
|
53
|
-
(_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getSearchWidget().replace(replaceText);
|
|
54
|
-
}
|
|
55
|
-
replaceAll(replaceText) {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = this.jsonViewer) === null || _a === void 0 ? void 0 : _a.getSearchWidget().replaceAll(replaceText);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
export default JsonViewerFoundation;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/* shadow */
|
|
2
|
-
/* sizing */
|
|
3
|
-
/* spacing */
|
|
4
|
-
.semi-json-viewer-background {
|
|
5
|
-
background-color: var(--semi-color-default);
|
|
6
|
-
}
|
|
7
|
-
.semi-json-viewer-string-key {
|
|
8
|
-
color: rgba(var(--semi-red-5), 1);
|
|
9
|
-
}
|
|
10
|
-
.semi-json-viewer-string-value {
|
|
11
|
-
color: rgba(var(--semi-blue-5), 1);
|
|
12
|
-
}
|
|
13
|
-
.semi-json-viewer-keyword {
|
|
14
|
-
color: rgba(var(--semi-blue-5), 1);
|
|
15
|
-
}
|
|
16
|
-
.semi-json-viewer-number {
|
|
17
|
-
color: rgba(var(--semi-green-5), 1);
|
|
18
|
-
}
|
|
19
|
-
.semi-json-viewer-delimiter-comma {
|
|
20
|
-
color: rgba(var(--semi-blue-6), 1);
|
|
21
|
-
}
|
|
22
|
-
.semi-json-viewer-delimiter-bracket-0 {
|
|
23
|
-
color: rgba(var(--semi-blue-7), 1);
|
|
24
|
-
}
|
|
25
|
-
.semi-json-viewer-delimiter-bracket-1 {
|
|
26
|
-
color: rgba(var(--semi-green-7), 1);
|
|
27
|
-
}
|
|
28
|
-
.semi-json-viewer-delimiter-bracket-2 {
|
|
29
|
-
color: rgba(var(--semi-orange-7), 1);
|
|
30
|
-
}
|
|
31
|
-
.semi-json-viewer-delimiter-array-0 {
|
|
32
|
-
color: rgba(var(--semi-blue-7), 1);
|
|
33
|
-
}
|
|
34
|
-
.semi-json-viewer-delimiter-array-1 {
|
|
35
|
-
color: rgba(var(--semi-green-7), 1);
|
|
36
|
-
}
|
|
37
|
-
.semi-json-viewer-delimiter-array-2 {
|
|
38
|
-
color: rgba(var(--semi-orange-7), 1);
|
|
39
|
-
}
|
|
40
|
-
.semi-json-viewer-search-result {
|
|
41
|
-
background-color: rgba(var(--semi-green-2), 1);
|
|
42
|
-
}
|
|
43
|
-
.semi-json-viewer-current-search-result {
|
|
44
|
-
background-color: rgba(var(--semi-yellow-4), 1) !important;
|
|
45
|
-
}
|
|
46
|
-
.semi-json-viewer-folding-icon {
|
|
47
|
-
opacity: 0.7;
|
|
48
|
-
transition: opacity 0.8s;
|
|
49
|
-
color: rgba(var(--semi-blue-7), 1);
|
|
50
|
-
}
|
|
51
|
-
.semi-json-viewer-view-line {
|
|
52
|
-
font-family: Menlo, Firecode, Monaco, "Courier New", monospace;
|
|
53
|
-
font-weight: normal;
|
|
54
|
-
font-size: 12px;
|
|
55
|
-
font-feature-settings: "liga" 0, "calt" 0;
|
|
56
|
-
font-variation-settings: normal;
|
|
57
|
-
letter-spacing: 0px;
|
|
58
|
-
color: #237893;
|
|
59
|
-
}
|
|
60
|
-
.semi-json-viewer-line-number {
|
|
61
|
-
font-family: Menlo, Firecode, Monaco, "Courier New", monospace;
|
|
62
|
-
font-weight: normal;
|
|
63
|
-
font-size: 12px;
|
|
64
|
-
font-feature-settings: "liga" 0, "calt" 0;
|
|
65
|
-
font-variation-settings: normal;
|
|
66
|
-
letter-spacing: 0px;
|
|
67
|
-
color: rgba(var(--semi-grey-5), 1);
|
|
68
|
-
text-align: center;
|
|
69
|
-
width: 50px;
|
|
70
|
-
}
|
|
71
|
-
.semi-json-viewer-line-number-container {
|
|
72
|
-
scrollbar-width: none; /* 隐藏滚动条(Firefox) */
|
|
73
|
-
-ms-overflow-style: none; /* 隐藏滚动条(IE 和 Edge) */
|
|
74
|
-
}
|
|
75
|
-
.semi-json-viewer-line-number-container::-webkit-scrollbar {
|
|
76
|
-
display: none; /* 隐藏滚动条(Webkit 浏览器) */
|
|
77
|
-
}
|
|
78
|
-
.semi-json-viewer-search-bar-container {
|
|
79
|
-
width: 440px;
|
|
80
|
-
border: 1px solid var(--semi-color-border);
|
|
81
|
-
border-radius: var(--semi-border-radius-small);
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: column;
|
|
84
|
-
padding: 8px;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
}
|
|
87
|
-
.semi-json-viewer-replace-bar, .semi-json-viewer-search-bar {
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: flex-start;
|
|
90
|
-
gap: 8px;
|
|
91
|
-
}
|
|
92
|
-
.semi-json-viewer-search-options {
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
list-style: none;
|
|
97
|
-
padding-inline-start: 0;
|
|
98
|
-
margin-block-start: 0;
|
|
99
|
-
margin-block-end: 0;
|
|
100
|
-
}
|
|
101
|
-
.semi-json-viewer-search-options-item {
|
|
102
|
-
min-width: 32px;
|
|
103
|
-
height: 32px;
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
margin: 0 4px;
|
|
109
|
-
border-radius: var(--semi-border-radius-small);
|
|
110
|
-
}
|
|
111
|
-
.semi-json-viewer-search-options-item:hover {
|
|
112
|
-
background-color: var(--semi-color-default);
|
|
113
|
-
}
|
|
114
|
-
.semi-json-viewer-search-options-item-active {
|
|
115
|
-
color: var(--semi-color-primary);
|
|
116
|
-
background-color: var(--semi-color-primary-light-default);
|
|
117
|
-
}
|
|
118
|
-
.semi-json-viewer-complete-suggestions-container {
|
|
119
|
-
border-radius: var(--semi-border-radius-medium);
|
|
120
|
-
background-color: var(--semi-color-bg-3);
|
|
121
|
-
box-shadow: var(--semi-shadow-elevated);
|
|
122
|
-
z-index: 1000;
|
|
123
|
-
min-width: 200px;
|
|
124
|
-
max-width: 400px;
|
|
125
|
-
list-style: none;
|
|
126
|
-
padding: 4px 0;
|
|
127
|
-
}
|
|
128
|
-
.semi-json-viewer-complete-container {
|
|
129
|
-
position: absolute;
|
|
130
|
-
z-index: 1000;
|
|
131
|
-
}
|
|
132
|
-
.semi-json-viewer-complete-suggestions-item {
|
|
133
|
-
padding: 8px 16px;
|
|
134
|
-
color: var(--semi-color-text-0);
|
|
135
|
-
cursor: pointer;
|
|
136
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
@import './variables.scss';
|
|
2
|
-
|
|
3
|
-
$module: #{$prefix}-json-viewer;
|
|
4
|
-
|
|
5
|
-
.#{$module} {
|
|
6
|
-
&-background {
|
|
7
|
-
background-color: $color-json-viewer-background;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&-string-key {
|
|
11
|
-
color: $color-json-viewer-key;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&-string-value {
|
|
15
|
-
color: $color-json-viewer-value;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-keyword {
|
|
19
|
-
color: $color-json-viewer-keyword;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&-number {
|
|
23
|
-
color: $color-json-viewer-number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&-delimiter-comma {
|
|
27
|
-
color: $color-json-viewer-delimiter-comma;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@each $type, $colors in $semi-json-viewer-delimiter-colors {
|
|
31
|
-
@each $level, $color in $colors {
|
|
32
|
-
&-delimiter-#{$type}-#{$level} {
|
|
33
|
-
color: $color;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&-search-result {
|
|
39
|
-
background-color: $semi-json-viewer-search-result-background;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&-current-search-result {
|
|
43
|
-
background-color: $semi-json-viewer-current-search-result-background !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&-folding-icon {
|
|
47
|
-
opacity: 0.7;
|
|
48
|
-
transition: opacity 0.8s;
|
|
49
|
-
color: $semi-json-viewer-folding-icon-color;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&-view-line {
|
|
53
|
-
font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
|
|
54
|
-
font-weight: normal;
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
font-feature-settings: 'liga' 0, 'calt' 0;
|
|
57
|
-
font-variation-settings: normal;
|
|
58
|
-
letter-spacing: 0px;
|
|
59
|
-
color: #237893;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&-line-number {
|
|
63
|
-
font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
|
|
64
|
-
font-weight: normal;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
font-feature-settings: 'liga' 0, 'calt' 0;
|
|
67
|
-
font-variation-settings: normal;
|
|
68
|
-
letter-spacing: 0px;
|
|
69
|
-
color: $semi-json-viewer-line-number-color;
|
|
70
|
-
text-align: center;
|
|
71
|
-
width: 50px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&-line-number-container {
|
|
75
|
-
scrollbar-width: none; /* 隐藏滚动条(Firefox) */
|
|
76
|
-
-ms-overflow-style: none; /* 隐藏滚动条(IE 和 Edge) */
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&-line-number-container::-webkit-scrollbar {
|
|
80
|
-
display: none; /* 隐藏滚动条(Webkit 浏览器) */
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&-search-bar-container {
|
|
84
|
-
width: 440px;
|
|
85
|
-
border: 1px solid var(--semi-color-border);
|
|
86
|
-
border-radius: var(--semi-border-radius-small);
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
padding: 8px;
|
|
90
|
-
gap: 8px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
&-replace-bar,
|
|
95
|
-
&-search-bar {
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: flex-start;
|
|
98
|
-
gap: 8px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&-search-options {
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
justify-content: center;
|
|
105
|
-
list-style: none;
|
|
106
|
-
padding-inline-start: 0;
|
|
107
|
-
margin-block-start: 0;
|
|
108
|
-
margin-block-end: 0;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&-search-options-item {
|
|
112
|
-
min-width: 32px;
|
|
113
|
-
height: 32px;
|
|
114
|
-
display: flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
margin: 0 4px;
|
|
119
|
-
border-radius: var(--semi-border-radius-small);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&-search-options-item:hover {
|
|
123
|
-
background-color: var(--semi-color-default);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&-search-options-item-active {
|
|
127
|
-
color: var(--semi-color-primary);
|
|
128
|
-
background-color: var(--semi-color-primary-light-default);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&-complete-suggestions-container {
|
|
132
|
-
border-radius: var(--semi-border-radius-medium);
|
|
133
|
-
background-color: var(--semi-color-bg-3);
|
|
134
|
-
box-shadow: var(--semi-shadow-elevated);
|
|
135
|
-
z-index: 1000;
|
|
136
|
-
min-width: 200px;
|
|
137
|
-
max-width: 400px;
|
|
138
|
-
list-style: none;
|
|
139
|
-
padding: 4px 0;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&-complete-container {
|
|
143
|
-
position: absolute;
|
|
144
|
-
z-index: 1000;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&-complete-suggestions-item {
|
|
148
|
-
padding: 8px 16px;
|
|
149
|
-
color: var(--semi-color-text-0);
|
|
150
|
-
cursor: pointer;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
$color-json-viewer-background: var(--semi-color-default); // JSON背景颜色
|
|
2
|
-
$color-json-viewer-key: rgba(var(--semi-red-5), 1); // JSON key 颜色
|
|
3
|
-
$color-json-viewer-value: rgba(var(--semi-blue-5), 1);
|
|
4
|
-
$color-json-viewer-number: rgba(var(--semi-green-5), 1); // JSON number 颜色
|
|
5
|
-
$color-json-viewer-keyword: rgba(var(--semi-blue-5), 1); // JSON keyword 颜色
|
|
6
|
-
$color-json-viewer-delimiter-comma: rgba(var(--semi-blue-6), 1); // JSON delimiter comma 颜色
|
|
7
|
-
|
|
8
|
-
$semi-json-viewer-delimiter-colors: (
|
|
9
|
-
bracket: (
|
|
10
|
-
0: rgba(var(--semi-blue-7), 1), // 括号层级 0 颜色
|
|
11
|
-
1: rgba(var(--semi-green-7), 1), // 括号层级 1 颜色
|
|
12
|
-
2: rgba(var(--semi-orange-7), 1), // 括号层级 2 颜色
|
|
13
|
-
),
|
|
14
|
-
array: (
|
|
15
|
-
0: rgba(var(--semi-blue-7), 1), // 数组层级 0 颜色
|
|
16
|
-
1: rgba(var(--semi-green-7), 1), // 数组层级 1 颜色
|
|
17
|
-
2: rgba(var(--semi-orange-7), 1), // 数组层级 2 颜色
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
$semi-json-viewer-search-result-background: rgba(var(--semi-green-2), 1); // JSON search result background 颜色
|
|
22
|
-
$semi-json-viewer-current-search-result-background: rgba(var(--semi-yellow-4), 1); // JSON current search result background 颜色
|
|
23
|
-
|
|
24
|
-
$semi-json-viewer-folding-icon-color: rgba(var(--semi-blue-7), 1); // JSON folding icon 颜色
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
$semi-json-viewer-line-number-color: rgba(var(--semi-grey-5), 1); // JSON line number 颜色
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const directionStyles: {
|
|
2
|
-
readonly horizontal: {
|
|
3
|
-
readonly width: "8px";
|
|
4
|
-
readonly flexShrink: 0;
|
|
5
|
-
readonly height: "100%";
|
|
6
|
-
readonly margin: "0";
|
|
7
|
-
readonly cursor: "col-resize";
|
|
8
|
-
};
|
|
9
|
-
readonly vertical: {
|
|
10
|
-
readonly width: "100%";
|
|
11
|
-
readonly height: "8px";
|
|
12
|
-
readonly flexShrink: 0;
|
|
13
|
-
readonly margin: "0";
|
|
14
|
-
readonly cursor: "row-resize";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// group
|
|
2
|
-
const rowStyleBase = {
|
|
3
|
-
width: '100%',
|
|
4
|
-
height: '8px',
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
margin: '0',
|
|
7
|
-
cursor: 'row-resize'
|
|
8
|
-
};
|
|
9
|
-
const colStyleBase = {
|
|
10
|
-
width: '8px',
|
|
11
|
-
flexShrink: 0,
|
|
12
|
-
height: '100%',
|
|
13
|
-
margin: '0',
|
|
14
|
-
cursor: 'col-resize'
|
|
15
|
-
};
|
|
16
|
-
export const directionStyles = {
|
|
17
|
-
horizontal: Object.assign({}, colStyleBase),
|
|
18
|
-
vertical: Object.assign({}, rowStyleBase)
|
|
19
|
-
};
|