x-star-design 0.0.42 → 0.0.44

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.
@@ -10,7 +10,7 @@ import { syntaxTree } from '@codemirror/language';
10
10
  import { linter } from '@codemirror/lint';
11
11
  import CodeMirror from '@uiw/react-codemirror';
12
12
  import classNames from 'classnames';
13
- import React, { useMemo } from 'react';
13
+ import React, { useCallback, useMemo } from 'react';
14
14
  import { prefix } from "../utils/global";
15
15
  import { LangId, Language, Theme, langCompleteOptionsMap, themeMap } from "./define";
16
16
  var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
@@ -42,7 +42,7 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
42
42
  options: options
43
43
  };
44
44
  };
45
- var regexpLinter = useMemo(function () {
45
+ var regexpLinter = useCallback(function () {
46
46
  return linter(function (view) {
47
47
  var diagnostics = [];
48
48
  syntaxTree(view.state).cursor().iterate(function (node) {
@@ -70,24 +70,24 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
70
70
  override: [function (context) {
71
71
  return langCompletions(context, Language.CPP);
72
72
  }]
73
- }), regexpLinter];
73
+ }), regexpLinter()];
74
74
  case LangId.PY2:
75
75
  case LangId.PY3:
76
76
  return [python(), autocompletion({
77
77
  override: [function (context) {
78
78
  return langCompletions(context, Language.PYTHON);
79
79
  }]
80
- }), regexpLinter];
80
+ }), regexpLinter()];
81
81
  case LangId.JAVA:
82
82
  return [java(), autocompletion({
83
83
  override: [function (context) {
84
84
  return langCompletions(context, Language.JAVA);
85
85
  }]
86
- }), regexpLinter];
86
+ }), regexpLinter()];
87
87
  default:
88
88
  return [];
89
89
  }
90
- }, [lang, regexpLinter]);
90
+ }, [lang]);
91
91
  return /*#__PURE__*/React.createElement(CodeMirror, _extends({
92
92
  className: classNames(className, "".concat(prefix, "-codeMirror")),
93
93
  value: value,
@@ -1,5 +1,5 @@
1
1
  @charset "UTF-8";
2
- .x-star-design--codeDetailModal .x-star-design--codeCompileResult {
2
+ .x-star-design-codeDetailModal .x-star-design-codeCompileResult {
3
3
  padding: 10px 20px;
4
4
  background-color: #fafafa;
5
5
  border: 1px solid #e3e3e3;
@@ -10,26 +10,26 @@
10
10
  min-height: 200px;
11
11
  height: 50vh;
12
12
  }
13
- .x-star-design--codeDetailModal .x-star-design--codeMirror {
13
+ .x-star-design-codeDetailModal .x-star-design-codeMirror {
14
14
  min-height: 200px;
15
15
  height: 50vh;
16
16
  }
17
17
 
18
- .x-star-design--codeMirror {
18
+ .x-star-design-codeMirror {
19
19
  width: 100%;
20
20
  height: 100%;
21
21
  }
22
- .x-star-design--codeMirror .cm-editor {
22
+ .x-star-design-codeMirror .cm-editor {
23
23
  font-family: JBMono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New";
24
24
  height: 100%;
25
25
  font-size: 16px;
26
26
  line-height: 150%;
27
27
  }
28
- .x-star-design--codeMirror .cm-focused {
28
+ .x-star-design-codeMirror .cm-focused {
29
29
  outline: unset;
30
30
  }
31
31
 
32
- .x-star-design--contactButtonCard {
32
+ .x-star-design-contactButtonCard {
33
33
  position: fixed !important;
34
34
  right: 3rem;
35
35
  top: 70%;
@@ -39,19 +39,19 @@
39
39
  z-index: 999;
40
40
  border: 3px dashed orange !important;
41
41
  }
42
- .x-star-design--contactButtonCard .ant-card-body,
43
- .x-star-design--contactButtonCard .x-star-design--card-body {
42
+ .x-star-design-contactButtonCard .ant-card-body,
43
+ .x-star-design-contactButtonCard .x-star-design-card-body {
44
44
  padding: 5px;
45
45
  }
46
46
 
47
- .x-star-design--draggable-layout {
47
+ .x-star-design-draggable-layout {
48
48
  position: relative;
49
49
  width: 100%;
50
50
  height: 100%;
51
51
  overflow: hidden;
52
52
  }
53
53
 
54
- .x-star-design--draggable-divider {
54
+ .x-star-design-draggable-divider {
55
55
  position: absolute;
56
56
  top: 0;
57
57
  bottom: 0;
@@ -62,33 +62,33 @@
62
62
  cursor: col-resize;
63
63
  }
64
64
 
65
- .x-star-design--draggable-divider:hover,
66
- .x-star-design--draggable-divider:active,
67
- .x-star-design--draggable-divider.x-star-design--draggable-divider-active {
65
+ .x-star-design-draggable-divider:hover,
66
+ .x-star-design-draggable-divider:active,
67
+ .x-star-design-draggable-divider.x-star-design-draggable-divider-active {
68
68
  border-left: 4px #1890ff solid;
69
69
  }
70
70
 
71
- .x-star-design--draggable-mask {
71
+ .x-star-design-draggable-mask {
72
72
  position: fixed;
73
73
  inset: 0;
74
74
  z-index: 99;
75
75
  }
76
76
 
77
- .x-star-design--draggable-children {
77
+ .x-star-design-draggable-children {
78
78
  position: absolute;
79
79
  top: 0;
80
80
  bottom: 0;
81
81
  }
82
- .x-star-design--draggable-children > * {
82
+ .x-star-design-draggable-children > * {
83
83
  height: 100%;
84
84
  }
85
85
 
86
- .x-star-design--errorPage {
86
+ .x-star-design-errorPage {
87
87
  position: relative;
88
88
  height: calc(100vh - 64px);
89
89
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
90
90
  }
91
- .x-star-design--errorPage .hello {
91
+ .x-star-design-errorPage .hello {
92
92
  position: absolute;
93
93
  bottom: 240px;
94
94
  left: 100px;
@@ -97,7 +97,7 @@
97
97
  background: url("https://media.strapi.turingstar.com.cn/production/2023/3/hello_0dd8b00bbf.png") 100% no-repeat;
98
98
  background-size: 100% 100%;
99
99
  }
100
- .x-star-design--errorPage .ip {
100
+ .x-star-design-errorPage .ip {
101
101
  position: absolute;
102
102
  bottom: 0;
103
103
  left: 0;
@@ -106,7 +106,7 @@
106
106
  background: url("https://media.strapi.turingstar.com.cn/production/2023/3/_31e3aca7f2.png") 100% no-repeat;
107
107
  background-size: 100% 100%;
108
108
  }
109
- .x-star-design--errorPage .planets {
109
+ .x-star-design-errorPage .planets {
110
110
  position: absolute;
111
111
  top: 0;
112
112
  right: 0;
@@ -115,7 +115,7 @@
115
115
  background: url("https://media.strapi.turingstar.com.cn/production/2023/3/background_right_6ff67955bc.png") 100% no-repeat;
116
116
  background-size: 100% 100%;
117
117
  }
118
- .x-star-design--errorPage .content {
118
+ .x-star-design-errorPage .content {
119
119
  position: absolute;
120
120
  top: 50%;
121
121
  left: 50%;
@@ -126,7 +126,7 @@
126
126
  transform: translate(-50%, -50%);
127
127
  flex-direction: column;
128
128
  }
129
- .x-star-design--errorPage .content .alert {
129
+ .x-star-design-errorPage .content .alert {
130
130
  position: relative;
131
131
  display: flex;
132
132
  align-items: flex-start;
@@ -141,19 +141,19 @@
141
141
  padding-block: 20px;
142
142
  box-sizing: border-box;
143
143
  }
144
- .x-star-design--errorPage .content .alert .description {
144
+ .x-star-design-errorPage .content .alert .description {
145
145
  display: flex;
146
146
  flex-direction: column;
147
147
  }
148
- .x-star-design--errorPage .content .alert .description div {
148
+ .x-star-design-errorPage .content .alert .description div {
149
149
  line-height: 2.5rem;
150
150
  }
151
- .x-star-design--errorPage .content .alert .description .actions {
151
+ .x-star-design-errorPage .content .alert .description .actions {
152
152
  display: flex;
153
153
  justify-content: space-between;
154
154
  width: 50%;
155
155
  }
156
- .x-star-design--errorPage .content a {
156
+ .x-star-design-errorPage .content a {
157
157
  color: #1890ff;
158
158
  text-decoration: none;
159
159
  background-color: transparent;
@@ -162,13 +162,13 @@
162
162
  transition: color 0.3s;
163
163
  touch-action: manipulation;
164
164
  }
165
- .x-star-design--errorPage .content a:hover {
165
+ .x-star-design-errorPage .content a:hover {
166
166
  text-decoration: none;
167
167
  outline: 0;
168
168
  color: #40a9ff;
169
169
  }
170
170
 
171
- .x-star-design--loadingMask {
171
+ .x-star-design-loadingMask {
172
172
  position: absolute;
173
173
  inset: 0;
174
174
  display: flex;
@@ -179,40 +179,40 @@
179
179
  transition: all 0.3s;
180
180
  }
181
181
 
182
- .x-star-design--loadingHide {
182
+ .x-star-design-loadingHide {
183
183
  opacity: 0;
184
184
  }
185
185
 
186
- .x-star-design--loadingLoader {
186
+ .x-star-design-loadingLoader {
187
187
  position: relative;
188
188
  width: 86px;
189
189
  height: 20px;
190
190
  margin: auto;
191
191
  }
192
192
 
193
- .x-star-design--loadingSquare {
193
+ .x-star-design-loadingSquare {
194
194
  position: absolute;
195
195
  top: 0;
196
196
  width: 20px;
197
197
  height: 20px;
198
198
  }
199
199
 
200
- .x-star-design--loadingSquare:nth-child(1) {
200
+ .x-star-design-loadingSquare:nth-child(1) {
201
201
  left: 0;
202
202
  animation: square1 1.5s linear forwards infinite;
203
203
  }
204
204
 
205
- .x-star-design--loadingSquare:nth-child(2) {
205
+ .x-star-design-loadingSquare:nth-child(2) {
206
206
  left: 22px;
207
207
  animation: square2 1.5s linear forwards infinite;
208
208
  }
209
209
 
210
- .x-star-design--loadingSquare:nth-child(3) {
210
+ .x-star-design-loadingSquare:nth-child(3) {
211
211
  left: 44px;
212
212
  animation: square3 1.5s linear forwards infinite;
213
213
  }
214
214
 
215
- .x-star-design--loadingSquare:nth-child(4) {
215
+ .x-star-design-loadingSquare:nth-child(4) {
216
216
  left: 66px;
217
217
  animation: square4 1.5s linear forwards infinite;
218
218
  }
@@ -313,17 +313,17 @@
313
313
  transform: translate(-66px, 0);
314
314
  }
315
315
  }
316
- .x-star-design--rainbowContent {
316
+ .x-star-design-rainbowContent {
317
317
  height: 100vh;
318
318
  display: flex;
319
319
  justify-content: center;
320
320
  align-items: center;
321
321
  flex-direction: column;
322
322
  }
323
- .x-star-design--rainbowContent img {
323
+ .x-star-design-rainbowContent img {
324
324
  margin-bottom: 20px;
325
325
  }
326
- .x-star-design--rainbowContent .x-star-design--rainbowDot {
326
+ .x-star-design-rainbowContent .x-star-design-rainbowDot {
327
327
  font-family: simsun, monospace;
328
328
  /* 固定字体避免设置的宽度无效 */
329
329
  display: inline-block;
@@ -351,7 +351,7 @@
351
351
  }
352
352
  }
353
353
 
354
- .x-star-design--statusTag {
354
+ .x-star-design-statusTag {
355
355
  position: relative;
356
356
  display: flex;
357
357
  justify-content: center;
@@ -364,30 +364,30 @@
364
364
  border: 1px dashed #b7b7b7;
365
365
  background-color: #efefef;
366
366
  }
367
- .x-star-design--statusTag img {
367
+ .x-star-design-statusTag img {
368
368
  width: 1rem;
369
369
  height: 1rem;
370
370
  }
371
- .x-star-design--statusTag .x-star-design--required {
371
+ .x-star-design-statusTag .x-star-design-required {
372
372
  position: absolute;
373
373
  width: 0.8rem;
374
374
  height: 0.8rem;
375
375
  }
376
- .x-star-design--statusTag .x-star-design--circleRequired {
376
+ .x-star-design-statusTag .x-star-design-circleRequired {
377
377
  top: -3px;
378
378
  right: -3px;
379
379
  }
380
- .x-star-design--statusTag .x-star-design--rectRequired {
380
+ .x-star-design-statusTag .x-star-design-rectRequired {
381
381
  top: -5px;
382
382
  right: -5px;
383
383
  }
384
384
 
385
- .x-star-design--titleSection {
385
+ .x-star-design-titleSection {
386
386
  font-size: 18px;
387
387
  margin: 15px 10px 20px 0;
388
388
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
389
389
  }
390
- .x-star-design--titleSection img {
390
+ .x-star-design-titleSection img {
391
391
  width: 1em;
392
392
  height: 1em;
393
393
  display: inline-flex;
@@ -401,32 +401,32 @@
401
401
  text-rendering: optimizelegibility;
402
402
  -webkit-font-smoothing: antialiased;
403
403
  }
404
- .x-star-design--titleSection .x-star-design--title {
404
+ .x-star-design-titleSection .x-star-design-title {
405
405
  color: #000;
406
406
  margin: 0 10px;
407
407
  }
408
- .x-star-design--titleSection .x-star-design--description {
408
+ .x-star-design-titleSection .x-star-design-description {
409
409
  color: #b6b6b6;
410
410
  font-size: 12px;
411
411
  }
412
412
 
413
- .x-star-design--virtual-grid::-webkit-scrollbar {
413
+ .x-star-design-virtual-grid::-webkit-scrollbar {
414
414
  width: 7px;
415
415
  height: 7px;
416
416
  }
417
- .x-star-design--virtual-grid::-webkit-scrollbar-thumb {
417
+ .x-star-design-virtual-grid::-webkit-scrollbar-thumb {
418
418
  border-radius: 3px;
419
419
  box-shadow: inset 0 0 5px #9b9ba3;
420
420
  background: rgba(152, 155, 163, 0.5);
421
421
  }
422
- .x-star-design--virtual-grid::-webkit-scrollbar-thumb:hover {
422
+ .x-star-design-virtual-grid::-webkit-scrollbar-thumb:hover {
423
423
  background: rgba(152, 155, 163, 0.7);
424
424
  }
425
- .x-star-design--virtual-grid::-webkit-scrollbar-thumb:active {
425
+ .x-star-design-virtual-grid::-webkit-scrollbar-thumb:active {
426
426
  background: rgba(152, 155, 163, 0.9);
427
427
  }
428
428
 
429
- .x-star-design--virtual-table-cell {
429
+ .x-star-design-virtual-table-cell {
430
430
  box-sizing: border-box;
431
431
  padding: 14px;
432
432
  border-bottom: 1px solid #e8e8e8;
@@ -434,7 +434,7 @@
434
434
  background: #fff;
435
435
  }
436
436
 
437
- [data-theme=dark] .x-star-design--virtual-table-cell {
437
+ [data-theme=dark] .x-star-design-virtual-table-cell {
438
438
  box-sizing: border-box;
439
439
  padding: 14px;
440
440
  border-bottom: 1px solid #303030;
@@ -442,16 +442,16 @@
442
442
  background: #141414;
443
443
  }
444
444
 
445
- .x-star-design--visualForm {
445
+ .x-star-design-visualForm {
446
446
  width: 90%;
447
447
  }
448
- .x-star-design--visualForm .x-star-design--row {
448
+ .x-star-design-visualForm .x-star-design-row {
449
449
  width: 100%;
450
450
  }
451
- .x-star-design--visualForm .x-star-design--row .x-star-design--explainItem {
451
+ .x-star-design-visualForm .x-star-design-row .x-star-design-explainItem {
452
452
  margin: -20px 0 16px;
453
453
  }
454
- .x-star-design--visualForm .x-star-design--row .x-star-design--form-item-extra {
454
+ .x-star-design-visualForm .x-star-design-row .x-star-design-form-item-extra {
455
455
  clear: both;
456
456
  color: rgba(0, 0, 0, 0.4509803922);
457
457
  font-size: 14px;
@@ -459,22 +459,22 @@
459
459
  transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
460
460
  min-height: 24px;
461
461
  }
462
- .x-star-design--visualForm .x-star-design--formList {
462
+ .x-star-design-visualForm .x-star-design-formList {
463
463
  width: 100%;
464
464
  }
465
465
 
466
- .x-star-design--XTabs.x-star-design--tabs, .x-star-design--XTabs.ant-tabs {
466
+ .x-star-design-XTabs.x-star-design-tabs, .x-star-design-XTabs.ant-tabs {
467
467
  width: 100%;
468
468
  min-height: 80vh;
469
469
  border: 0;
470
470
  background-color: #fff;
471
471
  color: #9e9e9e;
472
472
  }
473
- .x-star-design--XTabs .x-star-design--tabs-nav-wrap,
474
- .x-star-design--XTabs .ant-tabs-nav-wrap {
473
+ .x-star-design-XTabs .x-star-design-tabs-nav-wrap,
474
+ .x-star-design-XTabs .ant-tabs-nav-wrap {
475
475
  background-color: #e3ecff;
476
476
  }
477
- .x-star-design--XTabs.x-star-design--tabs-card > .x-star-design--tabs-nav .x-star-design--tabs-tab, .x-star-design--XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
477
+ .x-star-design-XTabs.x-star-design-tabs-card > .x-star-design-tabs-nav .x-star-design-tabs-tab, .x-star-design-XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
478
478
  width: 130px;
479
479
  height: 130px;
480
480
  background-color: #e3ecff;
@@ -484,35 +484,35 @@
484
484
  justify-content: center;
485
485
  border: 0;
486
486
  }
487
- .x-star-design--XTabs.x-star-design--tabs-card > .x-star-design--tabs-nav .x-star-design--tabs-tab-active, .x-star-design--XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
487
+ .x-star-design-XTabs.x-star-design-tabs-card > .x-star-design-tabs-nav .x-star-design-tabs-tab-active, .x-star-design-XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
488
488
  border-left: 6px solid #1890ff;
489
489
  background-color: #fff;
490
490
  transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
491
491
  border-radius: 0;
492
492
  }
493
- .x-star-design--XTabs .x-star-design--tabs-tab-btn,
494
- .x-star-design--XTabs .ant-tabs-tab-btn {
493
+ .x-star-design-XTabs .x-star-design-tabs-tab-btn,
494
+ .x-star-design-XTabs .ant-tabs-tab-btn {
495
495
  text-align: center;
496
496
  white-space: normal;
497
497
  }
498
- .x-star-design--XTabs .x-star-design--tabs-content,
499
- .x-star-design--XTabs .ant-tabs-content {
498
+ .x-star-design-XTabs .x-star-design-tabs-content,
499
+ .x-star-design-XTabs .ant-tabs-content {
500
500
  display: flex;
501
501
  width: 100%;
502
502
  height: 100%;
503
503
  border: 1px solid #d7d7d7;
504
504
  padding: 0 20px;
505
505
  }
506
- .x-star-design--XTabs .x-star-design--tabs-tabpane,
507
- .x-star-design--XTabs .ant-tabs-tabpane {
506
+ .x-star-design-XTabs .x-star-design-tabs-tabpane,
507
+ .x-star-design-XTabs .ant-tabs-tabpane {
508
508
  padding: 0 24px 24px;
509
509
  }
510
- .x-star-design--XTabs .x-star-design--icon-img {
510
+ .x-star-design-XTabs .x-star-design-icon-img {
511
511
  text-align: center;
512
512
  font-size: 44px;
513
513
  padding-left: 10px;
514
514
  }
515
- .x-star-design--XTabs .x-star-design--icon-title {
515
+ .x-star-design-XTabs .x-star-design-icon-title {
516
516
  font-size: 16px;
517
517
  display: block;
518
518
  padding-top: 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-design",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "A react component library developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",