x-star-design 0.0.6 → 0.0.8
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/dist/code-mirror-wrapper/define.d.ts +10 -10
- package/dist/code-mirror-wrapper/define.js +10 -10
- package/dist/code-mirror-wrapper/index.d.ts +10 -10
- package/dist/status-tag/define.d.ts +1 -0
- package/dist/status-tag/index.d.ts +1 -1
- package/dist/status-tag/index.js +3 -1
- package/dist/styles/index.css +30 -32
- package/package.json +5 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare enum LangId {
|
|
2
|
-
CPP =
|
|
3
|
-
CPP11 =
|
|
4
|
-
CPP14 =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
CPP = "g++",
|
|
3
|
+
CPP11 = "g++11",
|
|
4
|
+
CPP14 = "g++14",
|
|
5
|
+
CPP17 = "g++17",
|
|
6
|
+
GCC = "gcc",
|
|
7
|
+
FPC = "fpc",
|
|
8
|
+
PY2 = "python2.7",
|
|
9
|
+
PY3 = "python3.8",
|
|
10
|
+
JAVA = "java8",
|
|
11
|
+
PLAIN = "plain"
|
|
12
12
|
}
|
|
13
13
|
export declare enum Language {
|
|
14
14
|
CPP = "cpp",
|
|
@@ -4,16 +4,16 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
5
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
6
|
export var LangId = /*#__PURE__*/function (LangId) {
|
|
7
|
-
LangId[
|
|
8
|
-
LangId[
|
|
9
|
-
LangId[
|
|
10
|
-
LangId[
|
|
11
|
-
LangId[
|
|
12
|
-
LangId[
|
|
13
|
-
LangId[
|
|
14
|
-
LangId[
|
|
15
|
-
LangId[
|
|
16
|
-
LangId[
|
|
7
|
+
LangId["CPP"] = "g++";
|
|
8
|
+
LangId["CPP11"] = "g++11";
|
|
9
|
+
LangId["CPP14"] = "g++14";
|
|
10
|
+
LangId["CPP17"] = "g++17";
|
|
11
|
+
LangId["GCC"] = "gcc";
|
|
12
|
+
LangId["FPC"] = "fpc";
|
|
13
|
+
LangId["PY2"] = "python2.7";
|
|
14
|
+
LangId["PY3"] = "python3.8";
|
|
15
|
+
LangId["JAVA"] = "java8";
|
|
16
|
+
LangId["PLAIN"] = "plain";
|
|
17
17
|
return LangId;
|
|
18
18
|
}({});
|
|
19
19
|
import { bbedit } from '@uiw/codemirror-theme-bbedit';
|
|
@@ -9,16 +9,16 @@ interface Props {
|
|
|
9
9
|
theme?: Theme;
|
|
10
10
|
/**
|
|
11
11
|
* @description
|
|
12
|
-
CPP =
|
|
13
|
-
CPP11,
|
|
14
|
-
CPP14,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
CPP = 'g++',
|
|
13
|
+
CPP11 = 'g++11',
|
|
14
|
+
CPP14 = 'g++14',
|
|
15
|
+
CPP17 = 'g++17',
|
|
16
|
+
GCC = 'gcc',
|
|
17
|
+
FPC = 'fpc',
|
|
18
|
+
PY2 = 'python2.7',
|
|
19
|
+
PY3 = 'python3.8',
|
|
20
|
+
JAVA = 'java8',
|
|
21
|
+
PLAIN = 'plain',
|
|
22
22
|
@default LangId.CPP
|
|
23
23
|
*/
|
|
24
24
|
lang?: LangId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StatusTagProps } from './define';
|
|
3
|
-
declare const StatusTag: ({ shape, status, hover, required, children, ...props }: StatusTagProps) => React.JSX.Element;
|
|
3
|
+
declare const StatusTag: ({ shape, status, hover, required, children, onClick, ...props }: StatusTagProps) => React.JSX.Element;
|
|
4
4
|
export default StatusTag;
|
package/dist/status-tag/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["shape", "status", "hover", "required", "children"];
|
|
2
|
+
var _excluded = ["shape", "status", "hover", "required", "children", "onClick"];
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -28,6 +28,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
28
28
|
hover = _ref.hover,
|
|
29
29
|
required = _ref.required,
|
|
30
30
|
children = _ref.children,
|
|
31
|
+
onClick = _ref.onClick,
|
|
31
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
var timeoutRef = useRef(0);
|
|
33
34
|
var _useState = useState(false),
|
|
@@ -94,6 +95,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
94
95
|
style: _objectSpread(_objectSpread({}, statusCSSMap.get(status)), {}, {
|
|
95
96
|
borderRadius: shape === 'circle' ? '50%' : '4px'
|
|
96
97
|
}, props.style),
|
|
98
|
+
onClick: onClick,
|
|
97
99
|
onMouseEnter: handleMouseEnter,
|
|
98
100
|
onMouseLeave: handleMouseLeave
|
|
99
101
|
}, statusCSSMap !== null && statusCSSMap !== void 0 && (_statusCSSMap$get = statusCSSMap.get(status)) !== null && _statusCSSMap$get !== void 0 && _statusCSSMap$get.icon ? hover ? showContent ? children : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get2 = statusCSSMap.get(status)) === null || _statusCSSMap$get2 === void 0 ? void 0 : _statusCSSMap$get2.icon : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get3 = statusCSSMap.get(status)) === null || _statusCSSMap$get3 === void 0 ? void 0 : _statusCSSMap$get3.icon : children, required && /*#__PURE__*/React.createElement("img", {
|
package/dist/styles/index.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
height: 100%;
|
|
36
36
|
}
|
|
37
37
|
.x-star-design-codeMirror .cm-editor {
|
|
38
|
-
font-family:
|
|
38
|
+
font-family: JBMono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New";
|
|
39
39
|
height: 100%;
|
|
40
40
|
font-size: 16px;
|
|
41
41
|
line-height: 150%;
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
position: relative;
|
|
50
50
|
background-color: #fafafa;
|
|
51
51
|
width: 16px;
|
|
52
|
-
height: 50px;
|
|
53
52
|
background-size: cover;
|
|
54
53
|
background-position: center;
|
|
55
54
|
font-size: 32px;
|
|
@@ -72,8 +71,8 @@
|
|
|
72
71
|
|
|
73
72
|
.x-star-design-draggableDivider {
|
|
74
73
|
position: absolute;
|
|
75
|
-
top:
|
|
76
|
-
bottom:
|
|
74
|
+
top: 0;
|
|
75
|
+
bottom: 0;
|
|
77
76
|
border-left: 4px transparent solid;
|
|
78
77
|
z-index: 91;
|
|
79
78
|
}
|
|
@@ -87,14 +86,14 @@
|
|
|
87
86
|
|
|
88
87
|
.x-star-design-draggableMask {
|
|
89
88
|
position: absolute;
|
|
90
|
-
inset:
|
|
89
|
+
inset: 0;
|
|
91
90
|
z-index: 90;
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
.x-star-design-draggableChildren {
|
|
95
94
|
position: absolute;
|
|
96
|
-
top:
|
|
97
|
-
bottom:
|
|
95
|
+
top: 0;
|
|
96
|
+
bottom: 0;
|
|
98
97
|
}
|
|
99
98
|
.x-star-design-draggableChildren > * {
|
|
100
99
|
height: 100%;
|
|
@@ -111,7 +110,7 @@
|
|
|
111
110
|
margin-bottom: 20px;
|
|
112
111
|
}
|
|
113
112
|
.x-star-design-rainbowContent .x-star-design-rainbowDot {
|
|
114
|
-
font-family: simsun;
|
|
113
|
+
font-family: simsun, monospace;
|
|
115
114
|
/* 固定字体避免设置的宽度无效 */
|
|
116
115
|
display: inline-block;
|
|
117
116
|
overflow: hidden;
|
|
@@ -140,7 +139,7 @@
|
|
|
140
139
|
|
|
141
140
|
.x-star-design-loadingMask {
|
|
142
141
|
position: absolute;
|
|
143
|
-
inset:
|
|
142
|
+
inset: 0;
|
|
144
143
|
display: flex;
|
|
145
144
|
align-items: center;
|
|
146
145
|
justify-content: center;
|
|
@@ -162,13 +161,13 @@
|
|
|
162
161
|
|
|
163
162
|
.x-star-design-loadingSquare {
|
|
164
163
|
position: absolute;
|
|
165
|
-
top:
|
|
164
|
+
top: 0;
|
|
166
165
|
width: 20px;
|
|
167
166
|
height: 20px;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
.x-star-design-loadingSquare:nth-child(1) {
|
|
171
|
-
left:
|
|
170
|
+
left: 0;
|
|
172
171
|
animation: square1 1.5s linear forwards infinite;
|
|
173
172
|
}
|
|
174
173
|
|
|
@@ -190,83 +189,83 @@
|
|
|
190
189
|
@keyframes square1 {
|
|
191
190
|
0% {
|
|
192
191
|
background-color: #096dd9;
|
|
193
|
-
transform: translate(
|
|
192
|
+
transform: translate(0, 0);
|
|
194
193
|
}
|
|
195
194
|
9.09091% {
|
|
196
195
|
background-color: #096dd9;
|
|
197
|
-
transform: translate(
|
|
196
|
+
transform: translate(0, -22px);
|
|
198
197
|
}
|
|
199
198
|
18.18182% {
|
|
200
199
|
background-color: #022679;
|
|
201
200
|
transform: translate(22px, -22px);
|
|
202
201
|
}
|
|
203
202
|
27.27273% {
|
|
204
|
-
transform: translate(22px,
|
|
203
|
+
transform: translate(22px, 0);
|
|
205
204
|
}
|
|
206
205
|
100% {
|
|
207
206
|
background-color: #022679;
|
|
208
|
-
transform: translate(22px,
|
|
207
|
+
transform: translate(22px, 0);
|
|
209
208
|
}
|
|
210
209
|
}
|
|
211
210
|
@keyframes square2 {
|
|
212
211
|
0% {
|
|
213
212
|
background-color: #022679;
|
|
214
|
-
transform: translate(
|
|
213
|
+
transform: translate(0, 0);
|
|
215
214
|
}
|
|
216
215
|
18.18182% {
|
|
217
|
-
transform: translate(
|
|
216
|
+
transform: translate(0, 0);
|
|
218
217
|
}
|
|
219
218
|
27.27273% {
|
|
220
219
|
background-color: #022679;
|
|
221
|
-
transform: translate(
|
|
220
|
+
transform: translate(0, 22px);
|
|
222
221
|
}
|
|
223
222
|
36.36364% {
|
|
224
223
|
background-color: #f57712;
|
|
225
224
|
transform: translate(22px, 22px);
|
|
226
225
|
}
|
|
227
226
|
45.45455% {
|
|
228
|
-
transform: translate(22px,
|
|
227
|
+
transform: translate(22px, 0);
|
|
229
228
|
}
|
|
230
229
|
100% {
|
|
231
230
|
background-color: #f57712;
|
|
232
|
-
transform: translate(22px,
|
|
231
|
+
transform: translate(22px, 0);
|
|
233
232
|
}
|
|
234
233
|
}
|
|
235
234
|
@keyframes square3 {
|
|
236
235
|
0% {
|
|
237
236
|
background-color: #f57712;
|
|
238
|
-
transform: translate(
|
|
237
|
+
transform: translate(0, 0);
|
|
239
238
|
}
|
|
240
239
|
36.36364% {
|
|
241
|
-
transform: translate(
|
|
240
|
+
transform: translate(0, 0);
|
|
242
241
|
}
|
|
243
242
|
45.45455% {
|
|
244
243
|
background-color: #f57712;
|
|
245
|
-
transform: translate(
|
|
244
|
+
transform: translate(0, -22px);
|
|
246
245
|
}
|
|
247
246
|
54.54545% {
|
|
248
247
|
background-color: #ffd600;
|
|
249
248
|
transform: translate(22px, -22px);
|
|
250
249
|
}
|
|
251
250
|
63.63636% {
|
|
252
|
-
transform: translate(22px,
|
|
251
|
+
transform: translate(22px, 0);
|
|
253
252
|
}
|
|
254
253
|
100% {
|
|
255
254
|
background-color: #ffd600;
|
|
256
|
-
transform: translate(22px,
|
|
255
|
+
transform: translate(22px, 0);
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
258
|
@keyframes square4 {
|
|
260
259
|
0% {
|
|
261
260
|
background-color: #ffd600;
|
|
262
|
-
transform: translate(
|
|
261
|
+
transform: translate(0, 0);
|
|
263
262
|
}
|
|
264
263
|
54.54545% {
|
|
265
|
-
transform: translate(
|
|
264
|
+
transform: translate(0, 0);
|
|
266
265
|
}
|
|
267
266
|
63.63636% {
|
|
268
267
|
background-color: #ffd600;
|
|
269
|
-
transform: translate(
|
|
268
|
+
transform: translate(0, 22px);
|
|
270
269
|
}
|
|
271
270
|
72.72727% {
|
|
272
271
|
background-color: #f57712;
|
|
@@ -280,7 +279,7 @@
|
|
|
280
279
|
}
|
|
281
280
|
100% {
|
|
282
281
|
background-color: #096dd9;
|
|
283
|
-
transform: translate(-66px,
|
|
282
|
+
transform: translate(-66px, 0);
|
|
284
283
|
}
|
|
285
284
|
}
|
|
286
285
|
.x-star-design-titleSection {
|
|
@@ -291,7 +290,6 @@
|
|
|
291
290
|
.x-star-design-titleSection img {
|
|
292
291
|
width: 1em;
|
|
293
292
|
height: 1em;
|
|
294
|
-
color: #1890ff;
|
|
295
293
|
display: inline-flex;
|
|
296
294
|
align-items: center;
|
|
297
295
|
color: inherit;
|
|
@@ -300,11 +298,11 @@
|
|
|
300
298
|
text-align: center;
|
|
301
299
|
text-transform: none;
|
|
302
300
|
vertical-align: -0.125em;
|
|
303
|
-
text-rendering:
|
|
301
|
+
text-rendering: optimizelegibility;
|
|
304
302
|
-webkit-font-smoothing: antialiased;
|
|
305
303
|
}
|
|
306
304
|
.x-star-design-titleSection .x-star-design-title {
|
|
307
|
-
color: #
|
|
305
|
+
color: #000;
|
|
308
306
|
display: inline;
|
|
309
307
|
margin-left: 10px;
|
|
310
308
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-star-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "A react component library developed by turingstar",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"docs:build": "dumi build",
|
|
16
16
|
"doctor": "father doctor",
|
|
17
17
|
"lint": "npm run lint:es && npm run lint:css",
|
|
18
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,
|
|
18
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,scss}\"",
|
|
19
19
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
20
20
|
"prepare": "husky install && dumi setup",
|
|
21
21
|
"prepublishOnly": "father doctor && npm run build",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"*.{md,json}": [
|
|
31
31
|
"prettier --write --no-error-on-unmatched-pattern"
|
|
32
32
|
],
|
|
33
|
-
"*.{css,
|
|
33
|
+
"*.{css,scss}": [
|
|
34
34
|
"stylelint --fix",
|
|
35
35
|
"prettier --write"
|
|
36
36
|
],
|
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
"prettier-plugin-packagejson": "^2.2.18",
|
|
76
76
|
"react": "^18.0.0",
|
|
77
77
|
"react-dom": "^18.0.0",
|
|
78
|
-
"stylelint": "^14.9.1"
|
|
78
|
+
"stylelint": "^14.9.1",
|
|
79
|
+
"stylelint-config-standard-scss": "^6.1.0"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|
|
81
82
|
"react": ">=16.9.0",
|