weapp-tailwindcss 5.5.3 → 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-C9X5Afn4.js → compiler-CJ5yX-on.js} +70 -22
- package/dist/{compiler-DMPaUcH6.cjs → compiler-DFROuh5Z.cjs} +69 -22
- 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-DXplvodk.cjs → css-imports-_5cwJnx-.cjs} +1 -1
- package/dist/{generator-C2aWns8n.js → generator-BgbYHNgD.js} +71 -55
- package/dist/{generator-BoZIiZD5.cjs → generator-RK2HtgOb.cjs} +71 -55
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-D50z06nw.cjs → gulp-BS7fTmyj.cjs} +16 -6
- package/dist/{gulp-COAAztkm.js → gulp-nl-2p5Dw.js} +14 -4
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-CTk1uZr9.js → hmr-timing-BfxWwMeT.js} +3 -3
- package/dist/{hmr-timing-DK0MJKpl.cjs → hmr-timing-D45cTIzM.cjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{pipeline-helpers-BzjYXNTa.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-CTkuf9Ae.cjs → scoped-generator-DccPwmJT.cjs} +3 -3
- package/dist/{scoped-generator-C21A7fis.js → scoped-generator-Dqq2iLky.js} +3 -3
- package/dist/{source-candidate-scan-signature-BB5DfjO2.js → source-candidate-scan-signature-BJkQJtRM.js} +2 -2
- package/dist/{source-candidate-scan-signature-4mZDDaKT.cjs → source-candidate-scan-signature-CnUlGWhP.cjs} +2 -2
- package/dist/{tailwindcss-Bji4u8In.cjs → tailwindcss-B03BGeTO.cjs} +1 -1
- package/dist/{tailwindcss-c4PkOe1F.js → tailwindcss-o3Xe-o7M.js} +1 -1
- package/dist/{transform-DmLonqPE.js → transform-BVH7iLHn.js} +3 -3
- package/dist/{transform-Cy0ddBWf.cjs → transform-MIhriZRr.cjs} +3 -3
- package/dist/{v4-generation-core-DQeiq-g1.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-OG66oLpb.cjs → vite-4RznbXVI.cjs} +9 -9
- package/dist/{vite-CaUxtQx5.js → vite-hGECCqfq.js} +8 -8
- 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-Bd-9OHFE.js → web-0FAisq6H.js} +50 -13
- package/dist/{web-CZKIefdl.cjs → web-DQZ27KWH.cjs} +53 -16
- package/dist/{webpack-Cyvq3H7Z.js → webpack-8cQlXIo4.js} +16 -6
- package/dist/{webpack-DJGgU27Y.cjs → webpack-DOQ_3ViW.cjs} +19 -9
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +1 -1
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
|
}
|
|
@@ -3003,27 +3022,6 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
|
|
|
3003
3022
|
});
|
|
3004
3023
|
return changed ? root.toString() : css;
|
|
3005
3024
|
}
|
|
3006
|
-
function normalizeTailwindV4CssSourceDirectives(css, base) {
|
|
3007
|
-
if (!css.includes("@source")) return css;
|
|
3008
|
-
let root;
|
|
3009
|
-
try {
|
|
3010
|
-
root = postcss.parse(css);
|
|
3011
|
-
} catch {
|
|
3012
|
-
return css;
|
|
3013
|
-
}
|
|
3014
|
-
let changed = false;
|
|
3015
|
-
root.walkAtRules("source", (rule) => {
|
|
3016
|
-
const match = rule.params.match(/^(not\s+)?("([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)')(.*)$/);
|
|
3017
|
-
if (!match) return;
|
|
3018
|
-
const specifier = match[3] ?? match[4];
|
|
3019
|
-
if (!specifier?.startsWith(".")) return;
|
|
3020
|
-
const resolved = path.resolve(base, specifier);
|
|
3021
|
-
const quote = match[2] === void 0 ? "'" : "\"";
|
|
3022
|
-
rule.params = `${match[1] ?? ""}${quote}${resolved}${quote}${match[5] ?? ""}`;
|
|
3023
|
-
changed = true;
|
|
3024
|
-
});
|
|
3025
|
-
return changed ? root.toString() : css;
|
|
3026
|
-
}
|
|
3027
3025
|
function normalizeTailwindV4CssSources(cssSources, packageName, projectRoot) {
|
|
3028
3026
|
if (!cssSources?.length) return cssSources;
|
|
3029
3027
|
let changed = false;
|
|
@@ -3056,32 +3054,26 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3056
3054
|
if (!cssEntries?.length) return;
|
|
3057
3055
|
const remainingCssEntries = [];
|
|
3058
3056
|
const cssSources = [];
|
|
3059
|
-
const
|
|
3060
|
-
const
|
|
3057
|
+
const graphs = /* @__PURE__ */ new Map();
|
|
3058
|
+
const collectCssGraph = (file, visiting = /* @__PURE__ */ new Set()) => {
|
|
3061
3059
|
const normalizedFile = path.resolve(file);
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
const
|
|
3068
|
-
const css = normalizeTailwindV4CssPackageImports(nested ? normalizeTailwindV4CssSourceDirectives(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), base) : normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), packageName);
|
|
3069
|
-
cssSources.push({
|
|
3070
|
-
file: normalizedFile,
|
|
3071
|
-
base,
|
|
3072
|
-
css,
|
|
3073
|
-
dependencies: [normalizedFile]
|
|
3074
|
-
});
|
|
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);
|
|
3075
3066
|
let root;
|
|
3076
3067
|
try {
|
|
3077
|
-
root = postcss.parse(
|
|
3068
|
+
root = postcss.parse(readFileSync(normalizedFile, "utf8"));
|
|
3078
3069
|
} catch {
|
|
3079
|
-
return;
|
|
3070
|
+
return graph;
|
|
3080
3071
|
}
|
|
3072
|
+
const base = path.dirname(normalizedFile);
|
|
3081
3073
|
root.walkAtRules("import", (rule) => {
|
|
3082
3074
|
const parsed = parseCssImportSpecifier(rule.params);
|
|
3083
|
-
if (!parsed || !parsed.specifier.startsWith(".")
|
|
3084
|
-
const importedFile =
|
|
3075
|
+
if (!parsed || !parsed.specifier.startsWith(".")) return;
|
|
3076
|
+
const importedFile = resolveCssImportFile(base, parsed.specifier);
|
|
3085
3077
|
const resolved = (path.extname(importedFile) ? [importedFile] : [
|
|
3086
3078
|
importedFile,
|
|
3087
3079
|
`${importedFile}.css`,
|
|
@@ -3089,9 +3081,24 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3089
3081
|
`${importedFile}.scss`,
|
|
3090
3082
|
`${importedFile}.sass`
|
|
3091
3083
|
]).find((candidate) => existsSync(candidate));
|
|
3092
|
-
if (resolved)
|
|
3084
|
+
if (!resolved) return;
|
|
3085
|
+
for (const dependency of collectCssGraph(resolved, nextVisiting)) graph.add(dependency);
|
|
3093
3086
|
});
|
|
3087
|
+
return graph;
|
|
3094
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 = [];
|
|
3095
3102
|
for (const cssEntry of cssEntries) {
|
|
3096
3103
|
const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
|
|
3097
3104
|
const file = path.resolve(normalizedCssEntry);
|
|
@@ -3099,8 +3106,17 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3099
3106
|
remainingCssEntries.push(normalizedCssEntry);
|
|
3100
3107
|
continue;
|
|
3101
3108
|
}
|
|
3102
|
-
|
|
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;
|
|
3103
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));
|
|
3104
3120
|
return {
|
|
3105
3121
|
cssEntries: remainingCssEntries,
|
|
3106
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
|
}
|
|
@@ -3012,27 +3031,6 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
|
|
|
3012
3031
|
});
|
|
3013
3032
|
return changed ? root.toString() : css;
|
|
3014
3033
|
}
|
|
3015
|
-
function normalizeTailwindV4CssSourceDirectives(css, base) {
|
|
3016
|
-
if (!css.includes("@source")) return css;
|
|
3017
|
-
let root;
|
|
3018
|
-
try {
|
|
3019
|
-
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
3020
|
-
} catch {
|
|
3021
|
-
return css;
|
|
3022
|
-
}
|
|
3023
|
-
let changed = false;
|
|
3024
|
-
root.walkAtRules("source", (rule) => {
|
|
3025
|
-
const match = rule.params.match(/^(not\s+)?("([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)')(.*)$/);
|
|
3026
|
-
if (!match) return;
|
|
3027
|
-
const specifier = match[3] ?? match[4];
|
|
3028
|
-
if (!specifier?.startsWith(".")) return;
|
|
3029
|
-
const resolved = node_path.default.resolve(base, specifier);
|
|
3030
|
-
const quote = match[2] === void 0 ? "'" : "\"";
|
|
3031
|
-
rule.params = `${match[1] ?? ""}${quote}${resolved}${quote}${match[5] ?? ""}`;
|
|
3032
|
-
changed = true;
|
|
3033
|
-
});
|
|
3034
|
-
return changed ? root.toString() : css;
|
|
3035
|
-
}
|
|
3036
3034
|
function normalizeTailwindV4CssSources(cssSources, packageName, projectRoot) {
|
|
3037
3035
|
if (!cssSources?.length) return cssSources;
|
|
3038
3036
|
let changed = false;
|
|
@@ -3065,32 +3063,26 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3065
3063
|
if (!cssEntries?.length) return;
|
|
3066
3064
|
const remainingCssEntries = [];
|
|
3067
3065
|
const cssSources = [];
|
|
3068
|
-
const
|
|
3069
|
-
const
|
|
3066
|
+
const graphs = /* @__PURE__ */ new Map();
|
|
3067
|
+
const collectCssGraph = (file, visiting = /* @__PURE__ */ new Set()) => {
|
|
3070
3068
|
const normalizedFile = node_path.default.resolve(file);
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
const
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
const
|
|
3077
|
-
const css = normalizeTailwindV4CssPackageImports(nested ? normalizeTailwindV4CssSourceDirectives(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), base) : normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), packageName);
|
|
3078
|
-
cssSources.push({
|
|
3079
|
-
file: normalizedFile,
|
|
3080
|
-
base,
|
|
3081
|
-
css,
|
|
3082
|
-
dependencies: [normalizedFile]
|
|
3083
|
-
});
|
|
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);
|
|
3084
3075
|
let root;
|
|
3085
3076
|
try {
|
|
3086
|
-
root = _weapp_tailwindcss_postcss.postcss.parse(
|
|
3077
|
+
root = _weapp_tailwindcss_postcss.postcss.parse((0, node_fs.readFileSync)(normalizedFile, "utf8"));
|
|
3087
3078
|
} catch {
|
|
3088
|
-
return;
|
|
3079
|
+
return graph;
|
|
3089
3080
|
}
|
|
3081
|
+
const base = node_path.default.dirname(normalizedFile);
|
|
3090
3082
|
root.walkAtRules("import", (rule) => {
|
|
3091
3083
|
const parsed = parseCssImportSpecifier(rule.params);
|
|
3092
|
-
if (!parsed || !parsed.specifier.startsWith(".")
|
|
3093
|
-
const importedFile =
|
|
3084
|
+
if (!parsed || !parsed.specifier.startsWith(".")) return;
|
|
3085
|
+
const importedFile = resolveCssImportFile(base, parsed.specifier);
|
|
3094
3086
|
const resolved = (node_path.default.extname(importedFile) ? [importedFile] : [
|
|
3095
3087
|
importedFile,
|
|
3096
3088
|
`${importedFile}.css`,
|
|
@@ -3098,9 +3090,24 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3098
3090
|
`${importedFile}.scss`,
|
|
3099
3091
|
`${importedFile}.sass`
|
|
3100
3092
|
]).find((candidate) => (0, node_fs.existsSync)(candidate));
|
|
3101
|
-
if (resolved)
|
|
3093
|
+
if (!resolved) return;
|
|
3094
|
+
for (const dependency of collectCssGraph(resolved, nextVisiting)) graph.add(dependency);
|
|
3102
3095
|
});
|
|
3096
|
+
return graph;
|
|
3103
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 = [];
|
|
3104
3111
|
for (const cssEntry of cssEntries) {
|
|
3105
3112
|
const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
|
|
3106
3113
|
const file = node_path.default.resolve(normalizedCssEntry);
|
|
@@ -3108,8 +3115,17 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
3108
3115
|
remainingCssEntries.push(normalizedCssEntry);
|
|
3109
3116
|
continue;
|
|
3110
3117
|
}
|
|
3111
|
-
|
|
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;
|
|
3112
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));
|
|
3113
3129
|
return {
|
|
3114
3130
|
cssEntries: remainingCssEntries,
|
|
3115
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 };
|