weapp-tailwindcss 3.3.1-alpha.0 → 3.3.1
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/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/gulp.js +2 -2
- package/dist/gulp.mjs +2 -2
- package/dist/{index-BRIW1n3Y.js → index-BUKdNfgQ.js} +1 -1
- package/dist/{index-CL4sGCzc.js → index-Bo1YmwH_.js} +1 -1
- package/dist/{index-DpfxI7fV.mjs → index-Cs_Dzdmq.mjs} +1 -1
- package/dist/{index-BVWfDTC0.mjs → index-xZOevFHu.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{options-C0XCWlHf.js → options-6jN9OATi.js} +5 -21
- package/dist/{options-CgTnxChW.mjs → options-Dzp45zNb.mjs} +5 -21
- package/dist/{v5-ollx3zMy.mjs → v5-BpDhu0Ad.mjs} +1 -1
- package/dist/{v5-BMCb0QpH.js → v5-iC-oTPvp.js} +1 -1
- package/dist/vite.js +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/webpack.js +2 -2
- package/dist/webpack.mjs +2 -2
- package/dist/webpack4.js +1 -1
- package/dist/webpack4.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var process = require('node:process');
|
|
4
4
|
var semver = require('semver');
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-6jN9OATi.js');
|
|
6
6
|
var index = require('./index-DwZHOkK3.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import semver from 'semver';
|
|
3
|
-
import { g as getOptions } from './options-
|
|
3
|
+
import { g as getOptions } from './options-Dzp45zNb.mjs';
|
|
4
4
|
import { W as WEAPP_TW_REQUIRED_NODE_VERSION } from './index-BPzIdybK.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
package/dist/core.js
CHANGED
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Dzp45zNb.mjs';
|
|
2
2
|
import 'magic-string';
|
|
3
3
|
import './replace.mjs';
|
|
4
4
|
import '@weapp-core/escape';
|
package/dist/gulp.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-BUKdNfgQ.js');
|
|
6
|
+
require('./options-6jN9OATi.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as createPlugins } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { c as createPlugins } from './index-Cs_Dzdmq.mjs';
|
|
2
|
+
import './options-Dzp45zNb.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-Dzp45zNb.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-Dzp45zNb.mjs';
|
|
2
2
|
import { v as vitePluginName } from './index-BPzIdybK.mjs';
|
|
3
3
|
import { g as getGroupedEntries } from './defaults-DUZZvtdg.mjs';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-iC-oTPvp.js');
|
|
6
|
+
var index = require('./index-Bo1YmwH_.js');
|
|
7
|
+
var index$1 = require('./index-BUKdNfgQ.js');
|
|
8
|
+
require('./options-6jN9OATi.js');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('./replace.js');
|
|
11
11
|
require('@weapp-core/escape');
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
3
|
-
export { c as createPlugins } from './index-
|
|
4
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-BpDhu0Ad.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-xZOevFHu.mjs';
|
|
3
|
+
export { c as createPlugins } from './index-Cs_Dzdmq.mjs';
|
|
4
|
+
import './options-Dzp45zNb.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
|
7
7
|
import '@weapp-core/escape';
|
|
@@ -100,30 +100,16 @@ function decodeUnicode2(input) {
|
|
|
100
100
|
return input;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function toUnicodeEscapedString(str) {
|
|
104
|
-
return str.split('').map((char) => {
|
|
105
|
-
const code = char.charCodeAt(0);
|
|
106
|
-
if (code <= 31) {
|
|
107
|
-
const hexCode = code.toString(16).padStart(4, '0');
|
|
108
|
-
return `\\u${hexCode}`;
|
|
109
|
-
}
|
|
110
|
-
return char;
|
|
111
|
-
}).join('');
|
|
112
|
-
}
|
|
113
103
|
function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
114
104
|
const { classNameSet: set, escapeMap, mangleContext: ctx, needEscaped = false, jsPreserveClass, arbitraryValues, always, unescapeUnicode, } = options;
|
|
115
105
|
const allowDoubleQuotes = arbitraryValues === null || arbitraryValues === void 0 ? void 0 : arbitraryValues.allowDoubleQuotes;
|
|
116
|
-
const arr = splitCode(str, allowDoubleQuotes);
|
|
117
106
|
let rawStr = str;
|
|
118
|
-
let
|
|
107
|
+
let needUpdate = false;
|
|
119
108
|
if (unescapeUnicode && rawStr.includes('\\u')) {
|
|
120
109
|
rawStr = decodeUnicode2(rawStr);
|
|
121
|
-
needDecodeUnicode = true;
|
|
122
110
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
v = decodeUnicode2(v);
|
|
126
|
-
}
|
|
111
|
+
const arr = splitCode(rawStr, allowDoubleQuotes);
|
|
112
|
+
for (const v of arr) {
|
|
127
113
|
if (always || (set && set.has(v) && !(jsPreserveClass === null || jsPreserveClass === void 0 ? void 0 : jsPreserveClass(v)))) {
|
|
128
114
|
let ignoreFlag = false;
|
|
129
115
|
if (Array.isArray(node.leadingComments)) {
|
|
@@ -137,13 +123,11 @@ function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
|
137
123
|
rawStr = rawStr.replace(new RegExp(regex.escapeStringRegexp(v)), replace.replaceJs(v, {
|
|
138
124
|
escapeMap,
|
|
139
125
|
}));
|
|
126
|
+
needUpdate = true;
|
|
140
127
|
}
|
|
141
128
|
}
|
|
142
|
-
if (needDecodeUnicode) {
|
|
143
|
-
rawStr = toUnicodeEscapedString(rawStr);
|
|
144
|
-
}
|
|
145
129
|
}
|
|
146
|
-
if (typeof node.start === 'number' && typeof node.end === 'number') {
|
|
130
|
+
if (needUpdate && typeof node.start === 'number' && typeof node.end === 'number') {
|
|
147
131
|
const start = node.start + offset;
|
|
148
132
|
const end = node.end - offset;
|
|
149
133
|
if (start < end && str !== rawStr) {
|
|
@@ -69,30 +69,16 @@ function decodeUnicode2(input) {
|
|
|
69
69
|
return input;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function toUnicodeEscapedString(str) {
|
|
73
|
-
return str.split('').map((char) => {
|
|
74
|
-
const code = char.charCodeAt(0);
|
|
75
|
-
if (code <= 31) {
|
|
76
|
-
const hexCode = code.toString(16).padStart(4, '0');
|
|
77
|
-
return `\\u${hexCode}`;
|
|
78
|
-
}
|
|
79
|
-
return char;
|
|
80
|
-
}).join('');
|
|
81
|
-
}
|
|
82
72
|
function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
83
73
|
const { classNameSet: set, escapeMap, mangleContext: ctx, needEscaped = false, jsPreserveClass, arbitraryValues, always, unescapeUnicode, } = options;
|
|
84
74
|
const allowDoubleQuotes = arbitraryValues === null || arbitraryValues === void 0 ? void 0 : arbitraryValues.allowDoubleQuotes;
|
|
85
|
-
const arr = splitCode(str, allowDoubleQuotes);
|
|
86
75
|
let rawStr = str;
|
|
87
|
-
let
|
|
76
|
+
let needUpdate = false;
|
|
88
77
|
if (unescapeUnicode && rawStr.includes('\\u')) {
|
|
89
78
|
rawStr = decodeUnicode2(rawStr);
|
|
90
|
-
needDecodeUnicode = true;
|
|
91
79
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
v = decodeUnicode2(v);
|
|
95
|
-
}
|
|
80
|
+
const arr = splitCode(rawStr, allowDoubleQuotes);
|
|
81
|
+
for (const v of arr) {
|
|
96
82
|
if (always || (set && set.has(v) && !(jsPreserveClass === null || jsPreserveClass === void 0 ? void 0 : jsPreserveClass(v)))) {
|
|
97
83
|
let ignoreFlag = false;
|
|
98
84
|
if (Array.isArray(node.leadingComments)) {
|
|
@@ -106,13 +92,11 @@ function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
|
106
92
|
rawStr = rawStr.replace(new RegExp(escapeStringRegexp(v)), replaceWxml(v, {
|
|
107
93
|
escapeMap,
|
|
108
94
|
}));
|
|
95
|
+
needUpdate = true;
|
|
109
96
|
}
|
|
110
97
|
}
|
|
111
|
-
if (needDecodeUnicode) {
|
|
112
|
-
rawStr = toUnicodeEscapedString(rawStr);
|
|
113
|
-
}
|
|
114
98
|
}
|
|
115
|
-
if (typeof node.start === 'number' && typeof node.end === 'number') {
|
|
99
|
+
if (needUpdate && typeof node.start === 'number' && typeof node.end === 'number') {
|
|
116
100
|
const start = node.start + offset;
|
|
117
101
|
const end = node.end - offset;
|
|
118
102
|
if (start < end && str !== rawStr) {
|
package/dist/vite.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-Bo1YmwH_.js');
|
|
6
|
+
require('./options-6jN9OATi.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-xZOevFHu.mjs';
|
|
2
|
+
import './options-Dzp45zNb.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-iC-oTPvp.js');
|
|
6
|
+
require('./options-6jN9OATi.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-BpDhu0Ad.mjs';
|
|
2
|
+
import './options-Dzp45zNb.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack4.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-6jN9OATi.js');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
var webpackSources = require('webpack-sources');
|
package/dist/webpack4.mjs
CHANGED
package/package.json
CHANGED