@tuya-sat/micro-dev-loader 2.2.9 → 2.2.12

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.
@@ -4,7 +4,7 @@
4
4
  @theme: variable;
5
5
 
6
6
  // The prefix to use on all css classes from ant.
7
- @ant-prefix: antd;
7
+ @ant-prefix: ant;
8
8
 
9
9
  // An override for the html selector for theme prefixes
10
10
  @html-selector: html;
@@ -163,6 +163,12 @@ html {
163
163
  @border-radius-base: 2px;
164
164
  @border-radius-sm: @border-radius-base;
165
165
 
166
+ // control border
167
+ @control-border-radius: @border-radius-base;
168
+
169
+ // arrow border
170
+ @arrow-border-radius: @border-radius-sm;
171
+
166
172
  // vertical paddings
167
173
  @padding-lg: 24px; // containers
168
174
  @padding-md: 16px; // small containers and buttons
@@ -221,7 +227,7 @@ html {
221
227
 
222
228
  // Border color
223
229
  @border-color-base: hsv(0, 0, 85%); // base border outline a component
224
- @border-color-split: hsv(0, 0, 94%); // split border inside a component
230
+ @border-color-split: rgba(0, 0, 0, 0.06); // split border inside a component
225
231
  @border-color-inverse: @white;
226
232
  @border-width-base: 1px; // width of the border for a component
227
233
  @border-style-base: solid; // style of a components border
@@ -338,10 +344,12 @@ html {
338
344
  @divider-text-padding: 1em;
339
345
  @divider-orientation-margin: 5%;
340
346
  @divider-color: rgba(0, 0, 0, 6%);
347
+ @divider-vertical-gutter: 8px;
341
348
 
342
349
  // Dropdown
343
350
  @dropdown-selected-color: @primary-color;
344
351
  @dropdown-menu-submenu-disabled-bg: @component-background;
352
+ @dropdown-selected-bg: @item-active-bg;
345
353
 
346
354
  // Empty
347
355
  @empty-font-size: @font-size-base;
@@ -361,6 +369,7 @@ html {
361
369
  @radio-button-color: @btn-default-color;
362
370
  @radio-button-hover-color: @primary-5;
363
371
  @radio-button-active-color: @primary-7;
372
+ @radio-button-padding-horizontal: @padding-md - 1px;
364
373
  @radio-disabled-button-checked-bg: @disabled-active-bg;
365
374
  @radio-disabled-button-checked-color: @disabled-color;
366
375
  @radio-wrapper-margin-right: 8px;
@@ -568,11 +577,12 @@ html {
568
577
  // Tooltip background color
569
578
  @tooltip-bg: rgba(0, 0, 0, 0.75);
570
579
  // Tooltip arrow width
571
- @tooltip-arrow-width: 5px;
580
+ @tooltip-arrow-width: 8px * sqrt(2);
572
581
  // Tooltip distance with trigger
573
582
  @tooltip-distance: @tooltip-arrow-width - 1px + 4px;
574
583
  // Tooltip arrow color
575
584
  @tooltip-arrow-color: @tooltip-bg;
585
+ @tooltip-border-radius: @border-radius-base;
576
586
 
577
587
  // Popover
578
588
  // ---
@@ -584,7 +594,7 @@ html {
584
594
  @popover-min-width: 177px;
585
595
  @popover-min-height: 32px;
586
596
  // Popover arrow width
587
- @popover-arrow-width: 6px;
597
+ @popover-arrow-width: @tooltip-arrow-width;
588
598
  // Popover arrow color
589
599
  @popover-arrow-color: @popover-bg;
590
600
  // Popover outer arrow width
@@ -618,11 +628,12 @@ html {
618
628
  @modal-footer-border-width: @border-width-base;
619
629
  @modal-mask-bg: fade(@black, 45%);
620
630
  @modal-confirm-body-padding: 32px 32px 24px;
631
+ @modal-confirm-title-font-size: @font-size-lg;
621
632
 
622
633
  // Progress
623
634
  // --
624
635
  @progress-default-color: @processing-color;
625
- @progress-remaining-color: @background-color-base;
636
+ @progress-remaining-color: rgba(0, 0, 0, 0.04);
626
637
  @progress-info-text-color: @progress-text-color;
627
638
  @progress-radius: 100px;
628
639
  @progress-steps-item-bg: #f3f3f3;
@@ -719,6 +730,7 @@ html {
719
730
 
720
731
  // Tag
721
732
  // --
733
+ @tag-border-radius: @border-radius-base;
722
734
  @tag-default-bg: @background-color-light;
723
735
  @tag-default-color: @text-color;
724
736
  @tag-font-size: @font-size-sm;
@@ -1044,6 +1056,8 @@ html {
1044
1056
  @drawer-footer-padding-vertical: @modal-footer-padding-vertical;
1045
1057
  @drawer-footer-padding-horizontal: @modal-footer-padding-horizontal;
1046
1058
  @drawer-header-close-size: 56px;
1059
+ @drawer-title-font-size: @font-size-lg;
1060
+ @drawer-title-line-height: 22px;
1047
1061
 
1048
1062
  // Timeline
1049
1063
  // ---
@@ -1112,8 +1126,7 @@ html {
1112
1126
  @image-preview-operation-color: @text-color-dark;
1113
1127
  @image-preview-operation-disabled-color: fade(@image-preview-operation-color, 25%);
1114
1128
 
1115
-
1116
- //---------ssssssss
1129
+ //---------dark
1117
1130
  // Layer background
1118
1131
  @popover-background: #1f1f1f;
1119
1132
  @popover-customize-border-color: #3a3a3a;
@@ -1382,18 +1395,19 @@ html {
1382
1395
 
1383
1396
  // Alert
1384
1397
  // ---
1385
- @alert-success-border-color: @green-3;
1386
- @alert-success-bg-color: @green-1;
1387
- @alert-success-icon-color: @success-color;
1388
- @alert-info-border-color: @primary-3;
1389
- @alert-info-bg-color: @primary-1;
1390
- @alert-info-icon-color: @info-color;
1391
- @alert-warning-border-color: @gold-3;
1392
- @alert-warning-bg-color: @gold-1;
1393
- @alert-warning-icon-color: @warning-color;
1394
- @alert-error-border-color: @red-3;
1395
- @alert-error-bg-color: @red-1;
1396
- @alert-error-icon-color: @error-color;
1398
+ // --- 注释,使用css变量
1399
+ // @alert-success-border-color: @green-3;
1400
+ // @alert-success-bg-color: @green-1;
1401
+ // @alert-success-icon-color: @success-color;
1402
+ // @alert-info-border-color: @primary-3;
1403
+ // @alert-info-bg-color: @primary-1;
1404
+ // @alert-info-icon-color: @info-color;
1405
+ // @alert-warning-border-color: @gold-3;
1406
+ // @alert-warning-bg-color: @gold-1;
1407
+ // @alert-warning-icon-color: @warning-color;
1408
+ // @alert-error-border-color: @red-3;
1409
+ // @alert-error-bg-color: @red-1;
1410
+ // @alert-error-icon-color: @error-color;
1397
1411
 
1398
1412
  // Timeline
1399
1413
  // ---
@@ -109,6 +109,10 @@ function createHandleImportPlugin() {
109
109
  };
110
110
  }
111
111
  class HandleImport extends less.FileManager {
112
+ constructor() {
113
+ super(...arguments);
114
+ this.interceptReg = /\/style\/themes\/(variable|default)(\.less)*$/;
115
+ }
112
116
  loadFile(filename, currentDirectory, options, environment) {
113
117
  const _super = Object.create(null, {
114
118
  loadFile: { get: () => super.loadFile }
@@ -116,17 +120,22 @@ class HandleImport extends less.FileManager {
116
120
  return tslib.__awaiter(this, void 0, void 0, function* () {
117
121
  if (filename.startsWith("~")) {
118
122
  let filenamed = filename.replace("~", "");
119
- let fullPath = path__default["default"].join(currentDirectory, filename);
120
- if (fullPath.endsWith("style/themes/variable.less")) {
123
+ const fullPath = require.resolve(filenamed);
124
+ if (this.interceptReg.test(fullPath)) {
121
125
  return {
122
- filename: filenamed.startsWith("antd")
123
- ? require.resolve(filenamed)
124
- : fullPath,
126
+ filename: fullPath,
125
127
  contents: darkVariableContent,
126
128
  };
127
129
  }
128
130
  return _super.loadFile.call(this, filenamed, currentDirectory, options, environment);
129
131
  }
132
+ const fullPath = path__default["default"].join(currentDirectory, filename);
133
+ if (this.interceptReg.test(fullPath)) {
134
+ return {
135
+ filename: fullPath,
136
+ contents: darkVariableContent,
137
+ };
138
+ }
130
139
  return _super.loadFile.call(this, filename, currentDirectory, options, environment);
131
140
  });
132
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-dev-loader",
3
- "version": "2.2.9",
3
+ "version": "2.2.12",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -14,7 +14,7 @@
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": "2.2.9",
17
+ "@tuya-sat/micro-utils": "2.2.12",
18
18
  "cheerio": "1.0.0-rc.10",
19
19
  "ejs": "3.1.6",
20
20
  "fs-extra": "10.0.1",
@@ -1,3 +0,0 @@
1
- export default function compress(data: string, path: string, lessVarible: {
2
- [key: string]: any;
3
- }): Promise<string>;