weapp-tailwindcss 5.5.2 → 5.5.4
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/compiler/cache-telemetry.d.ts +30 -0
- package/dist/compiler/candidate-index.d.ts +3 -0
- package/dist/compiler/capabilities.d.ts +37 -0
- package/dist/compiler/events.d.ts +38 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/runtime-state.d.ts +2 -1
- package/dist/{compiler-tHMcW3BT.js → compiler-CJ5yX-on.js} +70 -22
- package/dist/{compiler-BSMSbVVt.cjs → compiler-DFROuh5Z.cjs} +70 -23
- package/dist/core/compiler/types.d.ts +2 -0
- package/dist/core.cjs +57 -8
- package/dist/core.d.ts +3 -0
- package/dist/core.js +56 -7
- package/dist/{css-imports-DsCSPIj2.cjs → css-imports-_5cwJnx-.cjs} +1 -1
- package/dist/{generator-DxEsInLz.js → generator-BgbYHNgD.js} +87 -23
- package/dist/{generator-CCw17l0G.cjs → generator-RK2HtgOb.cjs} +87 -23
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-C1r36Y_f.cjs → gulp-BS7fTmyj.cjs} +16 -6
- package/dist/{gulp-qGXKwQMZ.js → gulp-nl-2p5Dw.js} +14 -4
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-DixZjtTS.js → hmr-timing-BfxWwMeT.js} +3 -3
- package/dist/{hmr-timing-DuIbach8.cjs → hmr-timing-D45cTIzM.cjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{pipeline-helpers-CUwwOFt3.cjs → pipeline-helpers-BEhISt4D.cjs} +3 -3
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -2
- package/dist/presets.js +2 -2
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{runtime-state-BBQcA0n5.cjs → runtime-state-XYSycuGu.cjs} +6 -0
- package/dist/{scoped-generator-CO9xZ06m.cjs → scoped-generator-DccPwmJT.cjs} +3 -3
- package/dist/{scoped-generator-BJvL2CKZ.js → scoped-generator-Dqq2iLky.js} +3 -3
- package/dist/{source-candidate-scan-signature-CgJi--lh.js → source-candidate-scan-signature-BJkQJtRM.js} +2 -2
- package/dist/{source-candidate-scan-signature-_UPwg8oJ.cjs → source-candidate-scan-signature-CnUlGWhP.cjs} +2 -2
- package/dist/{tailwindcss-DhaLV5a2.cjs → tailwindcss-B03BGeTO.cjs} +1 -1
- package/dist/{tailwindcss-D2joPNdN.js → tailwindcss-o3Xe-o7M.js} +1 -1
- package/dist/{transform-BNtyKkZi.js → transform-BVH7iLHn.js} +3 -3
- package/dist/{transform-DAg85t9Z.cjs → transform-MIhriZRr.cjs} +3 -3
- package/dist/uni-app-x/style-reference-path.d.ts +1 -0
- package/dist/uni-app-x/vite/style-request.d.ts +5 -0
- package/dist/uni-app-x/vite/style-source.d.ts +1 -1
- package/dist/uni-app-x/vite/web-sfc-hmr.d.ts +14 -0
- package/dist/{v4-generation-core-bOm8k4AY.cjs → v4-generation-core-BvW2aK23.cjs} +3 -3
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-bJZi1V-l.cjs → vite-4RznbXVI.cjs} +86 -39
- package/dist/{vite-C_JJxZWl.js → vite-hGECCqfq.js} +85 -38
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +2 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +6 -6
- package/dist/{web-BiubXhxs.js → web-0FAisq6H.js} +50 -13
- package/dist/{web-B4wa3xrE.cjs → web-DQZ27KWH.cjs} +53 -16
- package/dist/{webpack-BDOQUv3J.js → webpack-8cQlXIo4.js} +16 -6
- package/dist/{webpack-CsBe1G_1.cjs → webpack-DOQ_3ViW.cjs} +19 -9
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +2 -2
package/dist/core.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { C as createTailwindRuntimeReadyPromise, D as createCompilationEventBus, d as createCompiler, f as getCompilerContext, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-
|
|
1
|
+
import { C as createTailwindRuntimeReadyPromise, D as createCompilationEventBus, d as createCompiler, f as getCompilerContext, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-CJ5yX-on.js";
|
|
2
2
|
import { finalizeMiniProgramCss, finalizeMiniProgramCssRoot, postcss, removeTailwindSourceDirectivesRoot } from "@weapp-tailwindcss/postcss";
|
|
3
3
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
4
|
+
import { performance } from "node:perf_hooks";
|
|
4
5
|
//#region src/core.ts
|
|
5
6
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
6
7
|
function resolveTransformWxssOptions(options) {
|
|
@@ -26,6 +27,26 @@ function createContext(options = {}) {
|
|
|
26
27
|
refreshTailwindcssRuntime
|
|
27
28
|
});
|
|
28
29
|
const defaultJsHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
30
|
+
const diagnosticEvents = [];
|
|
31
|
+
runtimeState.events.subscribe((event) => {
|
|
32
|
+
if (event.type === "diagnostic") diagnosticEvents.push(event);
|
|
33
|
+
});
|
|
34
|
+
async function emitDiagnostic(phase, startedAt, operationId, error) {
|
|
35
|
+
await runtimeState.events.emit({
|
|
36
|
+
schemaVersion: 1,
|
|
37
|
+
type: "diagnostic",
|
|
38
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
39
|
+
compilerId: "weapp-tailwindcss",
|
|
40
|
+
phase,
|
|
41
|
+
revision: runtimeState.revision,
|
|
42
|
+
operationId,
|
|
43
|
+
durationMs: performance.now() - startedAt,
|
|
44
|
+
error: error ? {
|
|
45
|
+
name: error instanceof Error ? error.name : void 0,
|
|
46
|
+
message: error instanceof Error ? error.message : String(error)
|
|
47
|
+
} : void 0
|
|
48
|
+
});
|
|
49
|
+
}
|
|
29
50
|
function getDefaultJsHandlerOptions(majorVersion = runtimeState.tailwindRuntime.majorVersion) {
|
|
30
51
|
if (typeof majorVersion !== "number") return;
|
|
31
52
|
let cached = defaultJsHandlerOptionsCache.get(majorVersion);
|
|
@@ -108,9 +129,17 @@ function createContext(options = {}) {
|
|
|
108
129
|
}
|
|
109
130
|
async function transformWxss(rawCss, options) {
|
|
110
131
|
await runtimeState.readyPromise;
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
const startedAt = performance.now();
|
|
133
|
+
const operationId = `css-${Date.now()}-${runtimeState.revision}`;
|
|
134
|
+
try {
|
|
135
|
+
const result = await styleHandler(rawCss, resolveTransformWxssOptions(options));
|
|
136
|
+
runtimeSet = await ensureRuntimeClassSet(runtimeState);
|
|
137
|
+
await emitDiagnostic("postcss", startedAt, operationId);
|
|
138
|
+
return result;
|
|
139
|
+
} catch (error) {
|
|
140
|
+
await emitDiagnostic("postcss", startedAt, operationId, error);
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
114
143
|
}
|
|
115
144
|
async function getRuntimeSet(options) {
|
|
116
145
|
await runtimeState.readyPromise;
|
|
@@ -123,18 +152,38 @@ function createContext(options = {}) {
|
|
|
123
152
|
else if (runtimeSet.size === 0) runtimeSet = await ensureRuntimeClassSet(runtimeState, { forceCollect: true });
|
|
124
153
|
const resolvedOptions = resolveTransformJsOptions(options);
|
|
125
154
|
if (shouldSkipJsTransform(rawJs, resolvedOptions)) return { code: rawJs };
|
|
126
|
-
|
|
155
|
+
const startedAt = performance.now();
|
|
156
|
+
const operationId = `js-${Date.now()}-${runtimeState.revision}`;
|
|
157
|
+
try {
|
|
158
|
+
const result = await jsHandler(rawJs, runtimeSet, resolvedOptions);
|
|
159
|
+
await emitDiagnostic("candidate", startedAt, operationId);
|
|
160
|
+
return result;
|
|
161
|
+
} catch (error) {
|
|
162
|
+
await emitDiagnostic("candidate", startedAt, operationId, error);
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
127
165
|
}
|
|
128
166
|
async function transformWxml(rawWxml, options) {
|
|
129
167
|
await runtimeState.readyPromise;
|
|
130
168
|
if (!options?.runtimeSet && runtimeSet.size === 0) runtimeSet = await ensureRuntimeClassSet(runtimeState, { forceCollect: true });
|
|
131
|
-
|
|
169
|
+
const startedAt = performance.now();
|
|
170
|
+
const operationId = `template-${Date.now()}-${runtimeState.revision}`;
|
|
171
|
+
try {
|
|
172
|
+
const result = templateHandler(rawWxml, resolveTransformWxmlOptions(options));
|
|
173
|
+
await emitDiagnostic("scan", startedAt, operationId);
|
|
174
|
+
return result;
|
|
175
|
+
} catch (error) {
|
|
176
|
+
await emitDiagnostic("scan", startedAt, operationId, error);
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
132
179
|
}
|
|
133
180
|
return {
|
|
134
181
|
getRuntimeSet,
|
|
135
182
|
transformWxss,
|
|
136
183
|
transformWxml,
|
|
137
|
-
transformJs
|
|
184
|
+
transformJs,
|
|
185
|
+
events: runtimeState.events,
|
|
186
|
+
getDiagnosticEvents: () => diagnosticEvents.slice()
|
|
138
187
|
};
|
|
139
188
|
}
|
|
140
189
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
5
5
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
@@ -1264,23 +1264,38 @@ async function resolveCssDefinedScanSources(source) {
|
|
|
1264
1264
|
let importSourceBase;
|
|
1265
1265
|
let hasSourceNone = false;
|
|
1266
1266
|
let hasTailwindImport = false;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1267
|
+
const sourcePatterns = [];
|
|
1268
|
+
const definitions = [{
|
|
1269
|
+
css: source.css,
|
|
1270
|
+
base: source.base,
|
|
1271
|
+
from: source.dependencies[0]
|
|
1272
|
+
}];
|
|
1273
|
+
for (const dependency of source.dependencies.slice(1)) {
|
|
1274
|
+
if (!existsSync(dependency)) continue;
|
|
1275
|
+
try {
|
|
1276
|
+
definitions.push({
|
|
1277
|
+
css: readFileSync(dependency, "utf8"),
|
|
1278
|
+
base: path.dirname(dependency),
|
|
1279
|
+
from: dependency
|
|
1280
|
+
});
|
|
1281
|
+
} catch {}
|
|
1273
1282
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1283
|
+
for (const definition of definitions) {
|
|
1284
|
+
let root;
|
|
1285
|
+
try {
|
|
1286
|
+
root = postcss.parse(definition.css, { from: definition.from });
|
|
1287
|
+
} catch {
|
|
1288
|
+
continue;
|
|
1289
|
+
}
|
|
1290
|
+
root.walkAtRules((rule) => {
|
|
1291
|
+
if (rule.name !== "import" || !isTailwindCssImport(rule.params)) return;
|
|
1277
1292
|
hasTailwindImport = true;
|
|
1278
1293
|
const sourceParam = parseImportSourceParam(rule.params);
|
|
1279
1294
|
if (sourceParam?.none) hasSourceNone = true;
|
|
1280
|
-
if (sourceParam?.sourcePath) importSourceBase = resolveSourceBase(
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1295
|
+
if (sourceParam?.sourcePath) importSourceBase = resolveSourceBase(definition.base, sourceParam.sourcePath);
|
|
1296
|
+
});
|
|
1297
|
+
sourcePatterns.push(...await resolveCssSourceEntries(root, definition.base, "**/*"));
|
|
1298
|
+
}
|
|
1284
1299
|
if (!importSourceBase) {
|
|
1285
1300
|
if (sourcePatterns.length > 0) return [...normalizeCssDefinedScanSources(source.base, sourcePatterns), ...createDefaultIgnoredScanSources(source.base)];
|
|
1286
1301
|
if (hasSourceNone) return false;
|
|
@@ -2960,6 +2975,10 @@ function isPostcssPluginImportTarget(value) {
|
|
|
2960
2975
|
function uniqueDefined(values) {
|
|
2961
2976
|
return [...new Set(values.filter((value) => typeof value === "string" && value.length > 0))];
|
|
2962
2977
|
}
|
|
2978
|
+
function resolveCssImportFile(base, specifier) {
|
|
2979
|
+
const normalizedSpecifier = path.sep === "\\" ? specifier.replaceAll("/", "\\") : specifier.replaceAll("\\", "/");
|
|
2980
|
+
return path.resolve(base, normalizedSpecifier);
|
|
2981
|
+
}
|
|
2963
2982
|
function getProjectRoot(runtime) {
|
|
2964
2983
|
return runtime.options?.projectRoot ?? process.cwd();
|
|
2965
2984
|
}
|
|
@@ -3035,6 +3054,51 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3035
3054
|
if (!cssEntries?.length) return;
|
|
3036
3055
|
const remainingCssEntries = [];
|
|
3037
3056
|
const cssSources = [];
|
|
3057
|
+
const graphs = /* @__PURE__ */ new Map();
|
|
3058
|
+
const collectCssGraph = (file, visiting = /* @__PURE__ */ new Set()) => {
|
|
3059
|
+
const normalizedFile = path.resolve(file);
|
|
3060
|
+
const cached = graphs.get(normalizedFile);
|
|
3061
|
+
if (cached) return cached;
|
|
3062
|
+
const graph = /* @__PURE__ */ new Set([normalizedFile]);
|
|
3063
|
+
graphs.set(normalizedFile, graph);
|
|
3064
|
+
if (visiting.has(normalizedFile) || !existsSync(normalizedFile)) return graph;
|
|
3065
|
+
const nextVisiting = new Set(visiting).add(normalizedFile);
|
|
3066
|
+
let root;
|
|
3067
|
+
try {
|
|
3068
|
+
root = postcss.parse(readFileSync(normalizedFile, "utf8"));
|
|
3069
|
+
} catch {
|
|
3070
|
+
return graph;
|
|
3071
|
+
}
|
|
3072
|
+
const base = path.dirname(normalizedFile);
|
|
3073
|
+
root.walkAtRules("import", (rule) => {
|
|
3074
|
+
const parsed = parseCssImportSpecifier(rule.params);
|
|
3075
|
+
if (!parsed || !parsed.specifier.startsWith(".")) return;
|
|
3076
|
+
const importedFile = resolveCssImportFile(base, parsed.specifier);
|
|
3077
|
+
const resolved = (path.extname(importedFile) ? [importedFile] : [
|
|
3078
|
+
importedFile,
|
|
3079
|
+
`${importedFile}.css`,
|
|
3080
|
+
`${importedFile}.pcss`,
|
|
3081
|
+
`${importedFile}.scss`,
|
|
3082
|
+
`${importedFile}.sass`
|
|
3083
|
+
]).find((candidate) => existsSync(candidate));
|
|
3084
|
+
if (!resolved) return;
|
|
3085
|
+
for (const dependency of collectCssGraph(resolved, nextVisiting)) graph.add(dependency);
|
|
3086
|
+
});
|
|
3087
|
+
return graph;
|
|
3088
|
+
};
|
|
3089
|
+
const createCssSource = (file, dependencies) => {
|
|
3090
|
+
const normalizedFile = path.resolve(file);
|
|
3091
|
+
const base = path.dirname(normalizedFile);
|
|
3092
|
+
const rawCss = readFileSync(normalizedFile, "utf8");
|
|
3093
|
+
const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
|
|
3094
|
+
return {
|
|
3095
|
+
file: normalizedFile,
|
|
3096
|
+
base,
|
|
3097
|
+
css: normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, entrySource?.config && existsSync(entrySource.config) ? entrySource.config : entrySource?.configRequest && !path.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? path.resolve(base, entrySource.configRequest) : entrySource?.config)), packageName),
|
|
3098
|
+
dependencies: [...dependencies]
|
|
3099
|
+
};
|
|
3100
|
+
};
|
|
3101
|
+
const rootEntries = [];
|
|
3038
3102
|
for (const cssEntry of cssEntries) {
|
|
3039
3103
|
const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
|
|
3040
3104
|
const file = path.resolve(normalizedCssEntry);
|
|
@@ -3042,17 +3106,17 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3042
3106
|
remainingCssEntries.push(normalizedCssEntry);
|
|
3043
3107
|
continue;
|
|
3044
3108
|
}
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
css,
|
|
3053
|
-
dependencies: [file]
|
|
3054
|
-
});
|
|
3109
|
+
rootEntries.push(file);
|
|
3110
|
+
}
|
|
3111
|
+
const entryGraphs = rootEntries.map((entry) => [entry, collectCssGraph(entry)]);
|
|
3112
|
+
const nestedEntries = /* @__PURE__ */ new Set();
|
|
3113
|
+
for (const [entry] of entryGraphs) for (const [otherEntry, otherGraph] of entryGraphs) if (entry !== otherEntry && otherGraph.has(entry)) {
|
|
3114
|
+
nestedEntries.add(entry);
|
|
3115
|
+
break;
|
|
3055
3116
|
}
|
|
3117
|
+
const selectedEntries = entryGraphs.filter(([entry]) => !nestedEntries.has(entry));
|
|
3118
|
+
const roots = selectedEntries.length > 0 ? selectedEntries : entryGraphs.slice(0, 1);
|
|
3119
|
+
for (const [rootEntry, dependencies] of roots) cssSources.push(createCssSource(rootEntry, dependencies));
|
|
3056
3120
|
return {
|
|
3057
3121
|
cssEntries: remainingCssEntries,
|
|
3058
3122
|
cssSources
|
|
@@ -1269,23 +1269,38 @@ async function resolveCssDefinedScanSources(source) {
|
|
|
1269
1269
|
let importSourceBase;
|
|
1270
1270
|
let hasSourceNone = false;
|
|
1271
1271
|
let hasTailwindImport = false;
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1272
|
+
const sourcePatterns = [];
|
|
1273
|
+
const definitions = [{
|
|
1274
|
+
css: source.css,
|
|
1275
|
+
base: source.base,
|
|
1276
|
+
from: source.dependencies[0]
|
|
1277
|
+
}];
|
|
1278
|
+
for (const dependency of source.dependencies.slice(1)) {
|
|
1279
|
+
if (!(0, node_fs.existsSync)(dependency)) continue;
|
|
1280
|
+
try {
|
|
1281
|
+
definitions.push({
|
|
1282
|
+
css: (0, node_fs.readFileSync)(dependency, "utf8"),
|
|
1283
|
+
base: node_path.default.dirname(dependency),
|
|
1284
|
+
from: dependency
|
|
1285
|
+
});
|
|
1286
|
+
} catch {}
|
|
1278
1287
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1288
|
+
for (const definition of definitions) {
|
|
1289
|
+
let root;
|
|
1290
|
+
try {
|
|
1291
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(definition.css, { from: definition.from });
|
|
1292
|
+
} catch {
|
|
1293
|
+
continue;
|
|
1294
|
+
}
|
|
1295
|
+
root.walkAtRules((rule) => {
|
|
1296
|
+
if (rule.name !== "import" || !isTailwindCssImport(rule.params)) return;
|
|
1282
1297
|
hasTailwindImport = true;
|
|
1283
1298
|
const sourceParam = parseImportSourceParam(rule.params);
|
|
1284
1299
|
if (sourceParam?.none) hasSourceNone = true;
|
|
1285
|
-
if (sourceParam?.sourcePath) importSourceBase = resolveSourceBase(
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1300
|
+
if (sourceParam?.sourcePath) importSourceBase = resolveSourceBase(definition.base, sourceParam.sourcePath);
|
|
1301
|
+
});
|
|
1302
|
+
sourcePatterns.push(...await resolveCssSourceEntries(root, definition.base, "**/*"));
|
|
1303
|
+
}
|
|
1289
1304
|
if (!importSourceBase) {
|
|
1290
1305
|
if (sourcePatterns.length > 0) return [...normalizeCssDefinedScanSources(source.base, sourcePatterns), ...createDefaultIgnoredScanSources(source.base)];
|
|
1291
1306
|
if (hasSourceNone) return false;
|
|
@@ -2969,6 +2984,10 @@ function isPostcssPluginImportTarget(value) {
|
|
|
2969
2984
|
function uniqueDefined(values) {
|
|
2970
2985
|
return [...new Set(values.filter((value) => typeof value === "string" && value.length > 0))];
|
|
2971
2986
|
}
|
|
2987
|
+
function resolveCssImportFile(base, specifier) {
|
|
2988
|
+
const normalizedSpecifier = node_path.default.sep === "\\" ? specifier.replaceAll("/", "\\") : specifier.replaceAll("\\", "/");
|
|
2989
|
+
return node_path.default.resolve(base, normalizedSpecifier);
|
|
2990
|
+
}
|
|
2972
2991
|
function getProjectRoot(runtime) {
|
|
2973
2992
|
return runtime.options?.projectRoot ?? node_process.default.cwd();
|
|
2974
2993
|
}
|
|
@@ -3044,6 +3063,51 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3044
3063
|
if (!cssEntries?.length) return;
|
|
3045
3064
|
const remainingCssEntries = [];
|
|
3046
3065
|
const cssSources = [];
|
|
3066
|
+
const graphs = /* @__PURE__ */ new Map();
|
|
3067
|
+
const collectCssGraph = (file, visiting = /* @__PURE__ */ new Set()) => {
|
|
3068
|
+
const normalizedFile = node_path.default.resolve(file);
|
|
3069
|
+
const cached = graphs.get(normalizedFile);
|
|
3070
|
+
if (cached) return cached;
|
|
3071
|
+
const graph = /* @__PURE__ */ new Set([normalizedFile]);
|
|
3072
|
+
graphs.set(normalizedFile, graph);
|
|
3073
|
+
if (visiting.has(normalizedFile) || !(0, node_fs.existsSync)(normalizedFile)) return graph;
|
|
3074
|
+
const nextVisiting = new Set(visiting).add(normalizedFile);
|
|
3075
|
+
let root;
|
|
3076
|
+
try {
|
|
3077
|
+
root = _weapp_tailwindcss_postcss.postcss.parse((0, node_fs.readFileSync)(normalizedFile, "utf8"));
|
|
3078
|
+
} catch {
|
|
3079
|
+
return graph;
|
|
3080
|
+
}
|
|
3081
|
+
const base = node_path.default.dirname(normalizedFile);
|
|
3082
|
+
root.walkAtRules("import", (rule) => {
|
|
3083
|
+
const parsed = parseCssImportSpecifier(rule.params);
|
|
3084
|
+
if (!parsed || !parsed.specifier.startsWith(".")) return;
|
|
3085
|
+
const importedFile = resolveCssImportFile(base, parsed.specifier);
|
|
3086
|
+
const resolved = (node_path.default.extname(importedFile) ? [importedFile] : [
|
|
3087
|
+
importedFile,
|
|
3088
|
+
`${importedFile}.css`,
|
|
3089
|
+
`${importedFile}.pcss`,
|
|
3090
|
+
`${importedFile}.scss`,
|
|
3091
|
+
`${importedFile}.sass`
|
|
3092
|
+
]).find((candidate) => (0, node_fs.existsSync)(candidate));
|
|
3093
|
+
if (!resolved) return;
|
|
3094
|
+
for (const dependency of collectCssGraph(resolved, nextVisiting)) graph.add(dependency);
|
|
3095
|
+
});
|
|
3096
|
+
return graph;
|
|
3097
|
+
};
|
|
3098
|
+
const createCssSource = (file, dependencies) => {
|
|
3099
|
+
const normalizedFile = node_path.default.resolve(file);
|
|
3100
|
+
const base = node_path.default.dirname(normalizedFile);
|
|
3101
|
+
const rawCss = (0, node_fs.readFileSync)(normalizedFile, "utf8");
|
|
3102
|
+
const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
|
|
3103
|
+
return {
|
|
3104
|
+
file: normalizedFile,
|
|
3105
|
+
base,
|
|
3106
|
+
css: normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, entrySource?.config && (0, node_fs.existsSync)(entrySource.config) ? entrySource.config : entrySource?.configRequest && !node_path.default.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? node_path.default.resolve(base, entrySource.configRequest) : entrySource?.config)), packageName),
|
|
3107
|
+
dependencies: [...dependencies]
|
|
3108
|
+
};
|
|
3109
|
+
};
|
|
3110
|
+
const rootEntries = [];
|
|
3047
3111
|
for (const cssEntry of cssEntries) {
|
|
3048
3112
|
const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
|
|
3049
3113
|
const file = node_path.default.resolve(normalizedCssEntry);
|
|
@@ -3051,17 +3115,17 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3051
3115
|
remainingCssEntries.push(normalizedCssEntry);
|
|
3052
3116
|
continue;
|
|
3053
3117
|
}
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
css,
|
|
3062
|
-
dependencies: [file]
|
|
3063
|
-
});
|
|
3118
|
+
rootEntries.push(file);
|
|
3119
|
+
}
|
|
3120
|
+
const entryGraphs = rootEntries.map((entry) => [entry, collectCssGraph(entry)]);
|
|
3121
|
+
const nestedEntries = /* @__PURE__ */ new Set();
|
|
3122
|
+
for (const [entry] of entryGraphs) for (const [otherEntry, otherGraph] of entryGraphs) if (entry !== otherEntry && otherGraph.has(entry)) {
|
|
3123
|
+
nestedEntries.add(entry);
|
|
3124
|
+
break;
|
|
3064
3125
|
}
|
|
3126
|
+
const selectedEntries = entryGraphs.filter(([entry]) => !nestedEntries.has(entry));
|
|
3127
|
+
const roots = selectedEntries.length > 0 ? selectedEntries : entryGraphs.slice(0, 1);
|
|
3128
|
+
for (const [rootEntry, dependencies] of roots) cssSources.push(createCssSource(rootEntry, dependencies));
|
|
3065
3129
|
return {
|
|
3066
3130
|
cssEntries: remainingCssEntries,
|
|
3067
3131
|
cssSources
|
package/dist/generator.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
3
3
|
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
4
4
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
5
5
|
exports.createWeappTailwindcssGeneratorFromRuntime = require_generator.createWeappTailwindcssGeneratorFromRuntime;
|
package/dist/generator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ft as transformTailwindV4CssByTarget, It as transformTailwindV4CssToWeapp, Vt as loadTailwindV4DesignSystem, d as resolveTailwindV4SourceFromRuntime, f as resolveTailwindV4SourceFromRuntimeOptions, i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromRuntime, p as resolveTailwindV4SourceOptionsFromRuntime, r as resolveTailwindSourceFromRuntime, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-
|
|
1
|
+
import { Ft as transformTailwindV4CssByTarget, It as transformTailwindV4CssToWeapp, Vt as loadTailwindV4DesignSystem, d as resolveTailwindV4SourceFromRuntime, f as resolveTailwindV4SourceFromRuntimeOptions, i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromRuntime, p as resolveTailwindV4SourceOptionsFromRuntime, r as resolveTailwindSourceFromRuntime, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-BgbYHNgD.js";
|
|
2
2
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromRuntime, loadTailwindV4DesignSystem, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromRuntime, resolveTailwindV4Source, resolveTailwindV4SourceFromRuntime, resolveTailwindV4SourceFromRuntimeOptions, resolveTailwindV4SourceOptionsFromRuntime, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
4
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
-
const require_compiler = require("./compiler-
|
|
6
|
-
const require_runtime_state = require("./runtime-state-
|
|
2
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
3
|
+
const require_tailwindcss = require("./tailwindcss-B03BGeTO.cjs");
|
|
4
|
+
const require_v4_generation_core = require("./v4-generation-core-BvW2aK23.cjs");
|
|
5
|
+
const require_compiler = require("./compiler-DFROuh5Z.cjs");
|
|
6
|
+
const require_runtime_state = require("./runtime-state-XYSycuGu.cjs");
|
|
7
7
|
const require_cache = require("./cache-CBJFB1HN.cjs");
|
|
8
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
8
|
+
const require_hmr_timing = require("./hmr-timing-D45cTIzM.cjs");
|
|
9
9
|
const require_final_css_cleanup = require("./final-css-cleanup-DSjczga3.cjs");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
11
11
|
node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
|
|
@@ -390,6 +390,16 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
390
390
|
readyPromise,
|
|
391
391
|
refreshTailwindcssRuntime
|
|
392
392
|
});
|
|
393
|
+
runtimeState.events.emit({
|
|
394
|
+
schemaVersion: 1,
|
|
395
|
+
type: "diagnostic",
|
|
396
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
397
|
+
adapter: "gulp",
|
|
398
|
+
phase: "emit",
|
|
399
|
+
revision: runtimeState.revision,
|
|
400
|
+
operationId: `gulp-init-${Date.now()}`,
|
|
401
|
+
evidence: ["createNativeGulpPlugins"]
|
|
402
|
+
});
|
|
393
403
|
const defaultStyleHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
394
404
|
let cachedDefaultTemplateHandlerOptions;
|
|
395
405
|
let cachedDefaultTemplateRuntimeSet;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as hasTailwindRootDirectives, Rt as getTailwindV4IncrementalGenerateCacheStats, _ as upsertTailwindV4CssSource, g as removeTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, rt as normalizeTailwindSourceForGenerator, tt as normalizeTailwindConfigDirectives, yt as prependConfigDirective } from "./generator-
|
|
2
|
-
import { f as resolveSourceScanEntries, l as getRuntimeClassSetSignature } from "./tailwindcss-
|
|
3
|
-
import { A as createCssSourceTraceCacheSignature, B as createSourceCandidateCollector, E as hasBundlerGeneratedCssMarker, L as rewriteLocalCssImportRequestsForOutput, N as createRuntimeClassSetManager, O as stripBundlerGeneratedCssMarkers, R as splitLocalCssImports, T as createBundlerGeneratedCssMarker, b as finalizeMiniProgramGeneratorCss, j as createCssTokenSourceMap, k as annotateCssSourceTrace, n as emitHmrTiming, r as generateTailwindV4Css, z as finalizeCompilerShadowRun } from "./hmr-timing-
|
|
4
|
-
import { C as createTailwindRuntimeReadyPromise, K as createDebug, L as createCompilationDependencyChanges, M as invalidateCompilationScope, N as recordCompilationDependencyChanges, O as AssetEmissionPlan, a as beginCompilerShadowRun, c as getCompilerShadowRunSnapshot, f as getCompilerContext, i as disposeCompilerOwner, j as getCompilationScopeDependencyRevision, n as createRuntimeAffectingSourceSignature, p as normalizeStyleHandlerMajorVersion, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-
|
|
1
|
+
import { $ as hasTailwindRootDirectives, Rt as getTailwindV4IncrementalGenerateCacheStats, _ as upsertTailwindV4CssSource, g as removeTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, rt as normalizeTailwindSourceForGenerator, tt as normalizeTailwindConfigDirectives, yt as prependConfigDirective } from "./generator-BgbYHNgD.js";
|
|
2
|
+
import { f as resolveSourceScanEntries, l as getRuntimeClassSetSignature } from "./tailwindcss-o3Xe-o7M.js";
|
|
3
|
+
import { A as createCssSourceTraceCacheSignature, B as createSourceCandidateCollector, E as hasBundlerGeneratedCssMarker, L as rewriteLocalCssImportRequestsForOutput, N as createRuntimeClassSetManager, O as stripBundlerGeneratedCssMarkers, R as splitLocalCssImports, T as createBundlerGeneratedCssMarker, b as finalizeMiniProgramGeneratorCss, j as createCssTokenSourceMap, k as annotateCssSourceTrace, n as emitHmrTiming, r as generateTailwindV4Css, z as finalizeCompilerShadowRun } from "./hmr-timing-BfxWwMeT.js";
|
|
4
|
+
import { C as createTailwindRuntimeReadyPromise, K as createDebug, L as createCompilationDependencyChanges, M as invalidateCompilationScope, N as recordCompilationDependencyChanges, O as AssetEmissionPlan, a as beginCompilerShadowRun, c as getCompilerShadowRunSnapshot, f as getCompilerContext, i as disposeCompilerOwner, j as getCompilationScopeDependencyRevision, n as createRuntimeAffectingSourceSignature, p as normalizeStyleHandlerMajorVersion, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-CJ5yX-on.js";
|
|
5
5
|
import { i as buildRuntimeCompilationSnapshot, l as updateRuntimeCompilationBuildState, o as createRuntimeCompilationBuildState, r as processCachedTask, s as removeRuntimeCompilationBuildStateFiles, t as finalizeMiniProgramCssStructure } from "./final-css-cleanup-B0HUBtiE.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -381,6 +381,16 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
381
381
|
readyPromise,
|
|
382
382
|
refreshTailwindcssRuntime
|
|
383
383
|
});
|
|
384
|
+
runtimeState.events.emit({
|
|
385
|
+
schemaVersion: 1,
|
|
386
|
+
type: "diagnostic",
|
|
387
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
388
|
+
adapter: "gulp",
|
|
389
|
+
phase: "emit",
|
|
390
|
+
revision: runtimeState.revision,
|
|
391
|
+
operationId: `gulp-init-${Date.now()}`,
|
|
392
|
+
evidence: ["createNativeGulpPlugins"]
|
|
393
|
+
});
|
|
384
394
|
const defaultStyleHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
385
395
|
let cachedDefaultTemplateHandlerOptions;
|
|
386
396
|
let cachedDefaultTemplateRuntimeSet;
|
package/dist/gulp.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_gulp = require("./gulp-
|
|
2
|
+
const require_gulp = require("./gulp-BS7fTmyj.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
4
|
exports.createPlugins = require_gulp.createPlugins;
|
|
5
5
|
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPlugins } from "./gulp-
|
|
1
|
+
import { t as createPlugins } from "./gulp-nl-2p5Dw.js";
|
|
2
2
|
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as hasTailwindRootDirectives, At as resolveTailwindV4CssSourceBase, B as removeUnsupportedMiniProgramAtRules, F as stripTailwindSourceMediaFragments, G as shouldFilterApplyOnlyGeneratedCss, H as removeTailwindV4GeneratedUserCssArtifacts, I as stripUnmatchedTailwindSourceMediaCloseFragments, J as splitUserCssLayerBlocks, K as extractGeneratedCssForUserLayerSelectors, L as finalizeMiniProgramCss$1, M as isCommentOnlyCss, Nt as parseCssImportSpecifier, P as removeTailwindV4GeneratorAtRules, Pt as quoteCssImportSpecifier, T as omitUndefined, Tt as isFileMatchedByTailwindSourceEntries, U as filterApplyOnlyGeneratedCss, Vt as loadTailwindV4DesignSystem, W as normalizeEmptyTailwindCustomVariants, Y as preferScopedGeneratedCssRules, Z as hasTailwindApplyDirective, _t as stripTailwindBanners, a as resolveGeneratorRuntimeBranch, at as removeTailwindSourceDirectives, ct as VITE_MARKER_RE, d as resolveTailwindV4SourceFromRuntime, dt as hasTailwindGeneratedCssMarkers, et as hasTailwindSourceDirectives, ft as splitGeneratorPlaceholderCssBySourceOrder, gt as stripTailwindBanner, ht as stripGeneratorPlaceholderMarkers, i as normalizeWeappTailwindcssGeneratorOptions, it as parseImportRequest, j as transformGeneratorUserCss, jt as toPosixPath, kt as resolveSourceScanPath, lt as createCssAppend, mt as splitTailwindV4GeneratedCssBySourceOrder, nt as normalizeTailwindSourceDirectives, ot as resolveCssEntrySource, p as resolveTailwindV4SourceOptionsFromRuntime, pt as splitTailwindGeneratedCssByBanner, q as hasUserCssLayerBlocks, s as shouldUseMiniProgramCssBranch, st as GENERATOR_PLACEHOLDER_MARKER_RE, u as resolveTailwindV4Source$1, ut as hasTailwindGeneratedCss, vt as normalizeConfigDirective, wt as isFileExcludedByTailwindSourceEntries, xt as FULL_SOURCE_SCAN_EXTENSION_RE, yt as prependConfigDirective, zt as filterUnsupportedMiniProgramTailwindV4Candidates } from "./generator-
|
|
1
|
+
import { $ as hasTailwindRootDirectives, At as resolveTailwindV4CssSourceBase, B as removeUnsupportedMiniProgramAtRules, F as stripTailwindSourceMediaFragments, G as shouldFilterApplyOnlyGeneratedCss, H as removeTailwindV4GeneratedUserCssArtifacts, I as stripUnmatchedTailwindSourceMediaCloseFragments, J as splitUserCssLayerBlocks, K as extractGeneratedCssForUserLayerSelectors, L as finalizeMiniProgramCss$1, M as isCommentOnlyCss, Nt as parseCssImportSpecifier, P as removeTailwindV4GeneratorAtRules, Pt as quoteCssImportSpecifier, T as omitUndefined, Tt as isFileMatchedByTailwindSourceEntries, U as filterApplyOnlyGeneratedCss, Vt as loadTailwindV4DesignSystem, W as normalizeEmptyTailwindCustomVariants, Y as preferScopedGeneratedCssRules, Z as hasTailwindApplyDirective, _t as stripTailwindBanners, a as resolveGeneratorRuntimeBranch, at as removeTailwindSourceDirectives, ct as VITE_MARKER_RE, d as resolveTailwindV4SourceFromRuntime, dt as hasTailwindGeneratedCssMarkers, et as hasTailwindSourceDirectives, ft as splitGeneratorPlaceholderCssBySourceOrder, gt as stripTailwindBanner, ht as stripGeneratorPlaceholderMarkers, i as normalizeWeappTailwindcssGeneratorOptions, it as parseImportRequest, j as transformGeneratorUserCss, jt as toPosixPath, kt as resolveSourceScanPath, lt as createCssAppend, mt as splitTailwindV4GeneratedCssBySourceOrder, nt as normalizeTailwindSourceDirectives, ot as resolveCssEntrySource, p as resolveTailwindV4SourceOptionsFromRuntime, pt as splitTailwindGeneratedCssByBanner, q as hasUserCssLayerBlocks, s as shouldUseMiniProgramCssBranch, st as GENERATOR_PLACEHOLDER_MARKER_RE, u as resolveTailwindV4Source$1, ut as hasTailwindGeneratedCss, vt as normalizeConfigDirective, wt as isFileExcludedByTailwindSourceEntries, xt as FULL_SOURCE_SCAN_EXTENSION_RE, yt as prependConfigDirective, zt as filterUnsupportedMiniProgramTailwindV4Candidates } from "./generator-BgbYHNgD.js";
|
|
2
2
|
import { o as transformCssMacroCss, r as hasCssMacroTailwindV4InternalAtRules, t as hasCssMacroStyleOptions } from "./auto-2dg_uhEJ.js";
|
|
3
|
-
import { _ as includesTailwindV4PreflightDirective, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as collectCssInlineSourceCandidates } from "./tailwindcss-
|
|
4
|
-
import { A as consumeCompilationScopeChanges, B as createGenerationArtifact, F as getCompilationSessionPool, G as replaceWxml, I as runCompilerOwnerActivity, J as traverse, K as createDebug, P as getTailwindGenerationSessionPool, R as mergeCompilationDependencyChanges, V as createAttributeMatcher, Y as md5Hash, k as composeGenerationArtifact, l as recordCompilerShadowReport, m as resolveStyleOptionsFromContext, o as completeCompilerShadowReportRun, q as babelParse, r as createStylePlatformAdapter, s as getCompilerShadowRunRevision, u as getFrameworkCompilerSession, z as createCssFragment } from "./compiler-
|
|
3
|
+
import { _ as includesTailwindV4PreflightDirective, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as collectCssInlineSourceCandidates } from "./tailwindcss-o3Xe-o7M.js";
|
|
4
|
+
import { A as consumeCompilationScopeChanges, B as createGenerationArtifact, F as getCompilationSessionPool, G as replaceWxml, I as runCompilerOwnerActivity, J as traverse, K as createDebug, P as getTailwindGenerationSessionPool, R as mergeCompilationDependencyChanges, V as createAttributeMatcher, Y as md5Hash, k as composeGenerationArtifact, l as recordCompilerShadowReport, m as resolveStyleOptionsFromContext, o as completeCompilerShadowReportRun, q as babelParse, r as createStylePlatformAdapter, s as getCompilerShadowRunRevision, u as getFrameworkCompilerSession, z as createCssFragment } from "./compiler-CJ5yX-on.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import process from "node:process";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
4
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
3
|
+
const require_tailwindcss = require("./tailwindcss-B03BGeTO.cjs");
|
|
4
|
+
const require_v4_generation_core = require("./v4-generation-core-BvW2aK23.cjs");
|
|
5
|
+
const require_compiler = require("./compiler-DFROuh5Z.cjs");
|
|
6
6
|
let node_process = require("node:process");
|
|
7
7
|
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
8
8
|
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_gulp = require("./gulp-
|
|
3
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
4
|
+
const require_gulp = require("./gulp-BS7fTmyj.cjs");
|
|
5
5
|
const require_postcss = require("./postcss.cjs");
|
|
6
|
-
const require_vite = require("./vite-
|
|
7
|
-
const require_webpack = require("./webpack-
|
|
6
|
+
const require_vite = require("./vite-4RznbXVI.cjs");
|
|
7
|
+
const require_webpack = require("./webpack-DOQ_3ViW.cjs");
|
|
8
8
|
require("./webpack.cjs");
|
|
9
9
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
10
10
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.js";
|
|
2
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
3
|
-
import { t as createPlugins } from "./gulp-
|
|
2
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-BgbYHNgD.js";
|
|
3
|
+
import { t as createPlugins } from "./gulp-nl-2p5Dw.js";
|
|
4
4
|
import weappTailwindcssPostcssPlugin from "./postcss.js";
|
|
5
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
6
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-hGECCqfq.js";
|
|
6
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-8cQlXIo4.js";
|
|
7
7
|
import "./webpack.js";
|
|
8
8
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
9
9
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
4
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-BvW2aK23.cjs");
|
|
4
|
+
const require_compiler = require("./compiler-DFROuh5Z.cjs");
|
|
5
5
|
const require_defaults = require("./defaults-CiGsr8Xq.cjs");
|
|
6
6
|
const require_final_css_cleanup = require("./final-css-cleanup-DSjczga3.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
package/dist/postcss.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_generator = require("./generator-
|
|
5
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
6
6
|
const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss").createWeappTailwindcssPostcssPlugin)({
|
|
7
7
|
createGenerator: (source) => {
|
|
8
8
|
return require_generator.createWeappTailwindcssGenerator(source);
|
package/dist/postcss.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-
|
|
1
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-BgbYHNgD.js";
|
|
2
2
|
import { createWeappTailwindcssPostcssPlugin } from "@weapp-tailwindcss/postcss";
|
|
3
3
|
const weappTailwindcssPostcssPlugin = createWeappTailwindcssPostcssPlugin({
|
|
4
4
|
createGenerator: (source) => {
|
package/dist/presets.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
3
3
|
const require_framework = require("./framework.cjs");
|
|
4
|
-
const require_generator = require("./generator-
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
4
|
+
const require_generator = require("./generator-RK2HtgOb.cjs");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-B03BGeTO.cjs");
|
|
6
6
|
require("./utils-CuKLf1Zv.cjs");
|
|
7
7
|
require("./logger-TlKT3xmR.cjs");
|
|
8
8
|
let node_path = require("node:path");
|
package/dist/presets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveTaroPlatform, resolveUniPlatformsFromEnv } from "./framework.js";
|
|
2
|
-
import { T as omitUndefined } from "./generator-
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
2
|
+
import { T as omitUndefined } from "./generator-BgbYHNgD.js";
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-o3Xe-o7M.js";
|
|
4
4
|
import { n as defuOverrideArray } from "./utils-MVwpU07P.js";
|
|
5
5
|
import { t as logger } from "./logger-BNzxZbZj.js";
|
|
6
6
|
import path from "node:path";
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
4
|
-
const require_webpack = require("./webpack-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-BvW2aK23.cjs");
|
|
4
|
+
const require_webpack = require("./webpack-DOQ_3ViW.cjs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
7
|
//#region src/bundlers/rspack/rule-match.ts
|
package/dist/rspack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as isSourceStyleRequest } from "./hmr-timing-
|
|
2
|
-
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { C as isSourceStyleRequest } from "./hmr-timing-BfxWwMeT.js";
|
|
2
|
+
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-8cQlXIo4.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
//#region src/bundlers/rspack/rule-match.ts
|
|
5
5
|
const STYLE_RULE_PROBES = [
|