@tuya-sat/micro-dev-loader 3.0.27-beta.9 → 3.0.28

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.
@@ -14,8 +14,12 @@ html {
14
14
 
15
15
  // ========= Primary Color =========
16
16
  --@{ant-prefix}-primary-color: @base-primary;
17
- --@{ant-prefix}-primary-color-hover: color(~`colorPalette('@{base-primary}', 5) `);
18
- --@{ant-prefix}-primary-color-active: color(~`colorPalette('@{base-primary}', 7) `);
17
+ --@{ant-prefix}-primary-color-hover: color(
18
+ ~`colorPalette('@{base-primary}', 5) `
19
+ );
20
+ --@{ant-prefix}-primary-color-active: color(
21
+ ~`colorPalette('@{base-primary}', 7) `
22
+ );
19
23
  --@{ant-prefix}-primary-color-outline: fade(@base-primary, @outline-fade);
20
24
 
21
25
  // Legacy
@@ -36,16 +40,28 @@ html {
36
40
  --@{ant-prefix}-primary-color-deprecated-t-20: tint(@base-primary, 20%);
37
41
  --@{ant-prefix}-primary-color-deprecated-t-50: tint(@base-primary, 50%);
38
42
  --@{ant-prefix}-primary-color-deprecated-f-12: fade(@base-primary, 12%);
39
- --@{ant-prefix}-primary-color-active-deprecated-f-30: fade(@legacy-primary-1, 30%);
40
- --@{ant-prefix}-primary-color-active-deprecated-d-02: darken(@legacy-primary-1, 2%);
43
+ --@{ant-prefix}-primary-color-active-deprecated-f-30: fade(
44
+ @legacy-primary-1,
45
+ 30%
46
+ );
47
+ --@{ant-prefix}-primary-color-active-deprecated-d-02: darken(
48
+ @legacy-primary-1,
49
+ 2%
50
+ );
41
51
 
42
52
  // ========= Success Color =========
43
53
  --@{ant-prefix}-success-color: @green-6;
44
54
  --@{ant-prefix}-success-color-hover: color(~`colorPalette('@{green-6}', 5) `);
45
- --@{ant-prefix}-success-color-active: color(~`colorPalette('@{green-6}', 7) `);
55
+ --@{ant-prefix}-success-color-active: color(
56
+ ~`colorPalette('@{green-6}', 7) `
57
+ );
46
58
  --@{ant-prefix}-success-color-outline: fade(@green-6, @outline-fade);
47
59
  --@{ant-prefix}-success-color-deprecated-bg: ~`colorPalette('@{green-6}', 1) `;
48
- --@{ant-prefix}-success-color-deprecated-border: ~`colorPalette('@{green-6}', 3) `;
60
+ --@{ant-prefix}-success-color-deprecated-border: ~`colorPalette(
61
+ '@{green-6}',
62
+ 3
63
+ )
64
+ `;
49
65
 
50
66
  // ========== Error Color ==========
51
67
  --@{ant-prefix}-error-color: @red-5;
@@ -61,12 +77,21 @@ html {
61
77
  --@{ant-prefix}-warning-color-active: color(~`colorPalette('@{gold-6}', 7) `);
62
78
  --@{ant-prefix}-warning-color-outline: fade(@gold-6, @outline-fade);
63
79
  --@{ant-prefix}-warning-color-deprecated-bg: ~`colorPalette('@{gold-6}', 1) `;
64
- --@{ant-prefix}-warning-color-deprecated-border: ~`colorPalette('@{gold-6}', 3) `;
80
+ --@{ant-prefix}-warning-color-deprecated-border: ~`colorPalette(
81
+ '@{gold-6}',
82
+ 3
83
+ )
84
+ `;
65
85
 
66
86
  // ========== Info Color ===========
67
87
  --@{ant-prefix}-info-color: @base-primary;
68
- --@{ant-prefix}-info-color-deprecated-bg: ~`colorPalette('@{base-primary}', 1) `;
69
- --@{ant-prefix}-info-color-deprecated-border: ~`colorPalette('@{base-primary}', 3) `;
88
+ --@{ant-prefix}-info-color-deprecated-bg: ~`colorPalette('@{base-primary}', 1)
89
+ `;
90
+ --@{ant-prefix}-info-color-deprecated-border: ~`colorPalette(
91
+ '@{base-primary}',
92
+ 3
93
+ )
94
+ `;
70
95
  }
71
96
 
72
97
  // -------- Colors -----------
@@ -135,10 +160,11 @@ html {
135
160
  // Popover background color
136
161
  @popover-background: @component-background;
137
162
  @popover-customize-border-color: @border-color-split;
138
- @font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
139
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
140
- 'Noto Color Emoji';
141
- @code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
163
+ @font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
164
+ 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
165
+ 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
166
+ @code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,
167
+ monospace;
142
168
  @text-color: fade(@black, 85%);
143
169
  @text-color-secondary: fade(@black, 45%);
144
170
  @text-color-inverse: @white;
@@ -238,7 +264,11 @@ html {
238
264
  @outline-color: @primary-color; // No use anymore
239
265
  @outline-fade: 20%;
240
266
 
241
- @background-color-light: hsv(0, 0, 98%); // background of header and selected item
267
+ @background-color-light: hsv(
268
+ 0,
269
+ 0,
270
+ 98%
271
+ ); // background of header and selected item
242
272
  @background-color-base: hsv(0, 0, 96%); // Default grey background color
243
273
 
244
274
  // Disabled states
@@ -251,14 +281,14 @@ html {
251
281
  @shadow-color: rgba(0, 0, 0, 0.15);
252
282
  @shadow-color-inverse: @component-background;
253
283
  @box-shadow-base: @shadow-2;
254
- @shadow-1-up: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05),
255
- 0 -12px 48px 16px rgba(0, 0, 0, 0.03);
256
- @shadow-1-down: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05),
257
- 0 12px 48px 16px rgba(0, 0, 0, 0.03);
258
- @shadow-1-left: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05),
259
- -12px 0 48px 16px rgba(0, 0, 0, 0.03);
260
- @shadow-1-right: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05),
261
- 12px 0 48px 16px rgba(0, 0, 0, 0.03);
284
+ @shadow-1-up: 0 -6px 16px -8px rgba(0, 0, 0, 0.08),
285
+ 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);
286
+ @shadow-1-down: 0 6px 16px -8px rgba(0, 0, 0, 0.08),
287
+ 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);
288
+ @shadow-1-left: -6px 0 16px -8px rgba(0, 0, 0, 0.08),
289
+ -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);
290
+ @shadow-1-right: 6px 0 16px -8px rgba(0, 0, 0, 0.08),
291
+ 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);
262
292
  @shadow-2: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
263
293
  0 9px 28px 8px rgba(0, 0, 0, 0.05);
264
294
 
@@ -488,13 +518,18 @@ html {
488
518
  @input-padding-horizontal-sm: @control-padding-horizontal-sm - 1px;
489
519
  @input-padding-horizontal-lg: @input-padding-horizontal;
490
520
  @input-padding-vertical-base: max(
491
- (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -
492
- @border-width-base,
521
+ (
522
+ round(
523
+ ((@input-height-base - @font-size-base * @line-height-base) / 2) * 10
524
+ ) / 10
525
+ ) - @border-width-base,
493
526
  3px
494
527
  );
495
528
  @input-padding-vertical-sm: max(
496
- (round(((@input-height-sm - @font-size-base * @line-height-base) / 2) * 10) / 10) -
497
- @border-width-base,
529
+ (
530
+ round(((@input-height-sm - @font-size-base * @line-height-base) / 2) * 10) /
531
+ 10
532
+ ) - @border-width-base,
498
533
  0
499
534
  );
500
535
  @input-padding-vertical-lg: (
@@ -539,7 +574,8 @@ html {
539
574
  @select-selection-item-bg: @background-color-base;
540
575
  @select-selection-item-border-color: @border-color-split;
541
576
  @select-single-item-height-lg: 40px;
542
- @select-multiple-item-height: @input-height-base - @input-padding-vertical-base * 2; // Normal 24px
577
+ @select-multiple-item-height: @input-height-base - @input-padding-vertical-base *
578
+ 2; // Normal 24px
543
579
  @select-multiple-item-height-lg: 32px;
544
580
  @select-multiple-item-spacing-half: ceil((@input-padding-vertical-base / 2));
545
581
  @select-multiple-disabled-background: @input-disabled-bg;
@@ -610,7 +646,8 @@ html {
610
646
  @modal-header-padding-horizontal: @padding-lg;
611
647
  @modal-body-padding: @padding-lg;
612
648
  @modal-header-bg: @component-background;
613
- @modal-header-padding: @modal-header-padding-vertical @modal-header-padding-horizontal;
649
+ @modal-header-padding: @modal-header-padding-vertical
650
+ @modal-header-padding-horizontal;
614
651
  @modal-header-border-width: @border-width-base;
615
652
  @modal-header-border-style: @border-style-base;
616
653
  @modal-header-title-line-height: 22px;
@@ -629,6 +666,7 @@ html {
629
666
  @modal-mask-bg: fade(@black, 45%);
630
667
  @modal-confirm-body-padding: 32px 32px 24px;
631
668
  @modal-confirm-title-font-size: @font-size-lg;
669
+ @modal-border-radius: @border-radius-base;
632
670
 
633
671
  // Progress
634
672
  // --
@@ -806,8 +844,8 @@ html {
806
844
  @card-actions-li-margin: 12px 0;
807
845
  @card-skeleton-bg: #cfd8dc;
808
846
  @card-background: @component-background;
809
- @card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12),
810
- 0 5px 12px 4px rgba(0, 0, 0, 0.09);
847
+ @card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16),
848
+ 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);
811
849
  @card-radius: @border-radius-base;
812
850
  @card-head-tabs-margin-bottom: -17px;
813
851
  @card-head-extra-color: @text-color;
@@ -1023,8 +1061,10 @@ html {
1023
1061
  @alert-with-description-no-icon-padding-vertical: @padding-md - 1px;
1024
1062
  @alert-with-description-padding-vertical: @padding-md - 1px;
1025
1063
  @alert-with-description-padding: @alert-with-description-padding-vertical 15px
1026
- @alert-with-description-no-icon-padding-vertical @alert-with-description-icon-size;
1027
- @alert-icon-top: 8px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2);
1064
+ @alert-with-description-no-icon-padding-vertical
1065
+ @alert-with-description-icon-size;
1066
+ @alert-icon-top: 8px + @font-size-base * (@line-height-base / 2) -
1067
+ (@font-size-base / 2);
1028
1068
  @alert-with-description-icon-size: 24px;
1029
1069
 
1030
1070
  // List
@@ -1124,7 +1164,10 @@ html {
1124
1164
  @image-mask-font-size: 16px;
1125
1165
  @image-preview-operation-size: 18px;
1126
1166
  @image-preview-operation-color: @text-color-dark;
1127
- @image-preview-operation-disabled-color: fade(@image-preview-operation-color, 25%);
1167
+ @image-preview-operation-disabled-color: fade(
1168
+ @image-preview-operation-color,
1169
+ 25%
1170
+ );
1128
1171
 
1129
1172
  //---------dark
1130
1173
  // Layer background
@@ -1148,7 +1191,10 @@ html {
1148
1191
  @border-color-base: #434343; // base border outline a component
1149
1192
  @border-color-split: #303030; // split border inside a component
1150
1193
 
1151
- @background-color-light: fade(@white, 4%); // background of header and selected item
1194
+ @background-color-light: fade(
1195
+ @white,
1196
+ 4%
1197
+ ); // background of header and selected item
1152
1198
  @background-color-base: fade(@white, 8%); // Default grey background color
1153
1199
 
1154
1200
  // Disabled states
@@ -1169,12 +1215,12 @@ html {
1169
1215
  @shadow-color: rgba(0, 0, 0, 0.45);
1170
1216
  @shadow-color-inverse: @component-background;
1171
1217
  @box-shadow-base: @shadow-2;
1172
- @shadow-1-up: 0 -6px 16px -8px rgba(0, 0, 0, 0.32), 0 -9px 28px 0 rgba(0, 0, 0, 0.2),
1173
- 0 -12px 48px 16px rgba(0, 0, 0, 0.12);
1174
- @shadow-1-down: 0 6px 16px -8px rgba(0, 0, 0, 0.32), 0 9px 28px 0 rgba(0, 0, 0, 0.2),
1175
- 0 12px 48px 16px rgba(0, 0, 0, 0.12);
1176
- @shadow-1-right: 6px 0 16px -8px rgba(0, 0, 0, 0.32), 9px 0 28px 0 rgba(0, 0, 0, 0.2),
1177
- 12px 0 48px 16px rgba(0, 0, 0, 0.12);
1218
+ @shadow-1-up: 0 -6px 16px -8px rgba(0, 0, 0, 0.32),
1219
+ 0 -9px 28px 0 rgba(0, 0, 0, 0.2), 0 -12px 48px 16px rgba(0, 0, 0, 0.12);
1220
+ @shadow-1-down: 0 6px 16px -8px rgba(0, 0, 0, 0.32),
1221
+ 0 9px 28px 0 rgba(0, 0, 0, 0.2), 0 12px 48px 16px rgba(0, 0, 0, 0.12);
1222
+ @shadow-1-right: 6px 0 16px -8px rgba(0, 0, 0, 0.32),
1223
+ 9px 0 28px 0 rgba(0, 0, 0, 0.2), 12px 0 48px 16px rgba(0, 0, 0, 0.12);
1178
1224
  @shadow-2: 0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32),
1179
1225
  0 9px 28px 8px rgba(0, 0, 0, 0.2);
1180
1226
 
@@ -1348,8 +1394,8 @@ html {
1348
1394
  // ---
1349
1395
  @card-actions-background: @component-background;
1350
1396
  @card-skeleton-bg: #303030;
1351
- @card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.64), 0 3px 6px 0 rgba(0, 0, 0, 0.48),
1352
- 0 5px 12px 4px rgba(0, 0, 0, 0.36);
1397
+ @card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.64),
1398
+ 0 3px 6px 0 rgba(0, 0, 0, 0.48), 0 5px 12px 4px rgba(0, 0, 0, 0.36);
1353
1399
 
1354
1400
  // Transfer
1355
1401
  // ---
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
+ var chalk = require('chalk');
6
7
  var HtmlWebpackPlugin = require('html-webpack-plugin');
7
8
  var cheerio = require('cheerio');
8
9
  var less = require('less');
@@ -13,6 +14,7 @@ var changeAntdGlobalImport = require('../../loader/changeAntdGlobalImport.js');
13
14
 
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
16
 
17
+ var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
16
18
  var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefaultLegacy(HtmlWebpackPlugin);
17
19
  var cheerio__default = /*#__PURE__*/_interopDefaultLegacy(cheerio);
18
20
  var less__default = /*#__PURE__*/_interopDefaultLegacy(less);
@@ -34,9 +36,15 @@ class ThemePlugin {
34
36
  name: this.pluginName,
35
37
  stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
36
38
  }, (assets, callback) => tslib.__awaiter(this, void 0, void 0, function* () {
37
- const [pathname] = Object.entries(assets).find(([pathname]) => {
39
+ const targetThemeCssArr = Object.entries(assets).find(([pathname]) => {
38
40
  return /\/light\.[\s\S]+?\.css$/.test(pathname);
39
41
  });
42
+ if (!targetThemeCssArr) {
43
+ console.log(chalk__default["default"].yellow('未查找到亮暗色样式文件'));
44
+ callback();
45
+ return;
46
+ }
47
+ const [pathname] = targetThemeCssArr;
40
48
  const chunk = compilation.namedChunks.get("light");
41
49
  compilation.chunkGraph.getChunkModules(chunk).forEach((item) => {
42
50
  this.lessFiles.push(item.nameForCondition());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-dev-loader",
3
- "version": "3.0.27-beta.9",
3
+ "version": "3.0.28",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -14,7 +14,8 @@
14
14
  "@babel/generator": "7.17.7",
15
15
  "@babel/plugin-syntax-typescript": "7.16.7",
16
16
  "@babel/template": "7.16.7",
17
- "@tuya-sat/micro-utils": "3.0.27-beta.9",
17
+ "@tuya-sat/micro-utils": "3.0.28",
18
+ "chalk": "^5.3.0",
18
19
  "cheerio": "1.0.0-rc.10",
19
20
  "ejs": "3.1.6",
20
21
  "fs-extra": "10.0.1",