weapp-tailwindcss 5.0.0-next.5 → 5.0.0-next.8
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/bundlers/shared/css-cleanup/at-rules.d.ts +2 -0
- package/dist/bundlers/shared/css-cleanup/color-gamut.d.ts +3 -0
- package/dist/bundlers/shared/css-cleanup/root-cleanups.d.ts +4 -0
- package/dist/bundlers/shared/css-cleanup/selectors.d.ts +8 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +12 -0
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/markers.d.ts +16 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +11 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +10 -0
- package/dist/bundlers/shared/generator-css.d.ts +10 -23
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +20 -0
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +3 -0
- package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
- package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +1 -1
- package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
- package/dist/bundlers/vite/postcss-config.d.ts +6 -0
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +22 -0
- package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -0
- package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -0
- package/dist/cache-BVAiJV3J.js +502 -0
- package/dist/cache-CHs4DXui.mjs +434 -0
- package/dist/cli/helpers.d.ts +1 -2
- package/dist/cli/mount-options.d.ts +2 -2
- package/dist/cli/types.d.ts +0 -2
- package/dist/cli.js +107 -603
- package/dist/cli.mjs +118 -613
- package/dist/constants.d.ts +0 -1
- package/dist/context/tailwindcss.d.ts +1 -1
- package/dist/core.js +13 -20
- package/dist/core.mjs +8 -14
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +2 -2
- package/dist/css-macro.mjs +2 -2
- package/dist/defaults.d.ts +15 -1
- package/dist/defaults.js +28 -7
- package/dist/defaults.mjs +25 -8
- package/dist/{generator-9UEp8OoQ.js → generator-DKkhJbOg.js} +24 -7
- package/dist/{generator-Dpp-5s8z.mjs → generator-UBmfduYg.mjs} +20 -3
- package/dist/{generator-css-MyjZhF0z.mjs → generator-css-BIapP56i.mjs} +691 -606
- package/dist/{generator-css-CGueCYbX.js → generator-css-Mksw8PgB.js} +703 -606
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/gulp.js +33 -21
- package/dist/gulp.mjs +29 -17
- package/dist/index.js +5 -5
- package/dist/index.mjs +4 -4
- package/dist/logger-BRy6XPQ2.js +1 -0
- package/dist/logger-Bub1jggA.mjs +2 -0
- package/dist/postcss/config-directive.d.ts +1 -0
- package/dist/postcss/context.d.ts +9 -0
- package/dist/postcss/source-files.d.ts +8 -0
- package/dist/postcss/tailwind-version.d.ts +3 -0
- package/dist/postcss-QIXwT40c.js +298 -0
- package/dist/postcss-w48mGIhe.mjs +288 -0
- package/dist/postcss.js +3 -285
- package/dist/postcss.mjs +1 -278
- package/dist/{recorder-D4BKt75Q.js → precheck-B32p-gLI.js} +139 -274
- package/dist/{recorder-BIW3Kuke.mjs → precheck-B4RH6ZNN.mjs} +105 -239
- package/dist/presets.js +6 -4
- package/dist/presets.mjs +4 -2
- package/dist/runtime-patch-CwN5ya72.mjs +71 -0
- package/dist/runtime-patch-D6mBo_KB.js +85 -0
- package/dist/tailwindcss/runtime-patch.d.ts +5 -0
- package/dist/tailwindcss/runtime.d.ts +2 -3
- package/dist/tailwindcss/targets.d.ts +1 -5
- package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
- package/dist/tailwindcss/v4/patcher.d.ts +1 -1
- package/dist/{logger-D9clu_3f.js → tailwindcss-Bu-RWIHx.js} +70 -413
- package/dist/{logger-1gx9UllH.mjs → tailwindcss-C5IgPlQ0.mjs} +56 -382
- package/dist/types/index.d.ts +1 -6
- package/dist/uni-app-x/vite.d.ts +1 -1
- package/dist/{vite-fDM-UQpR.mjs → vite-BwgRVgxH.mjs} +677 -525
- package/dist/{vite-BkMGwDeH.js → vite-DyZuiyap.js} +704 -552
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +10 -1
- package/dist/{webpack-CICGEKT9.js → webpack-CNV2dx3Q.js} +72 -37
- package/dist/{webpack-D2Wdk28V.mjs → webpack-CT6EEENx.mjs} +58 -23
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +6 -9
- package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
- package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
- package/dist/cli/config.d.ts +0 -5
- package/dist/cli/helpers/patch-cwd.d.ts +0 -1
- package/dist/cli/mount-options/patch-status.d.ts +0 -2
- package/dist/cli/patch-options.d.ts +0 -6
- package/dist/cli/tokens.d.ts +0 -4
- package/dist/cli/workspace/package-dirs.d.ts +0 -3
- package/dist/cli/workspace/patch-package.d.ts +0 -3
- package/dist/cli/workspace/patch-utils.d.ts +0 -3
- package/dist/cli/workspace/types.d.ts +0 -11
- package/dist/cli/workspace/workspace-globs.d.ts +0 -2
- package/dist/cli/workspace/workspace-io.d.ts +0 -1
- package/dist/cli/workspace/workspace-lock.d.ts +0 -1
- package/dist/cli/workspace.d.ts +0 -2
- package/dist/js/syntax.d.ts +0 -10
- package/dist/patcher-options-DnqazL9E.js +0 -34
- package/dist/patcher-options-GuOwX0-k.mjs +0 -17
- package/dist/tailwindcss/recorder.d.ts +0 -13
- package/dist/tailwindcss/targets/paths.d.ts +0 -13
- package/dist/tailwindcss/targets/record-io.d.ts +0 -5
- package/dist/tailwindcss/targets/recorder.d.ts +0 -3
- package/dist/tailwindcss/targets/types.d.ts +0 -35
- package/dist/version-CWBxRFPB.js +0 -56
- package/dist/version-WNz3MwRv.mjs +0 -49
- /package/dist/{constants-p1dyh1x1.js → constants-BoB_6lFw.js} +0 -0
- /package/dist/{constants-B-_T5UnW.mjs → constants-E_loJC49.mjs} +0 -0
- /package/dist/{run-tasks-Cq5A5nVD.js → run-tasks-B50A3pxt.js} +0 -0
- /package/dist/{run-tasks-DUVrDJGl.mjs → run-tasks-DdNi-hkk.mjs} +0 -0
- /package/dist/{utils-DmC9_In3.js → utils-BiShvil9.js} +0 -0
- /package/dist/{utils-7DUGTFED.mjs → utils-Btw1iOVV.mjs} +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//#region src/tailwindcss/patcher-options.ts
|
|
2
|
-
function resolveTailwindcssOptions(options) {
|
|
3
|
-
return options?.tailwindcss ?? options?.tailwind;
|
|
4
|
-
}
|
|
5
|
-
function normalizeExtendLengthUnits(value) {
|
|
6
|
-
if (value === false) return false;
|
|
7
|
-
if (value === true) return { enabled: true };
|
|
8
|
-
if (value && typeof value === "object") return {
|
|
9
|
-
enabled: true,
|
|
10
|
-
...value
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function normalizeTailwindcssPatcherOptions(options) {
|
|
14
|
-
return options;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
Object.defineProperty(exports, "normalizeExtendLengthUnits", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return normalizeExtendLengthUnits;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports, "normalizeTailwindcssPatcherOptions", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function() {
|
|
26
|
-
return normalizeTailwindcssPatcherOptions;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(exports, "resolveTailwindcssOptions", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function() {
|
|
32
|
-
return resolveTailwindcssOptions;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/tailwindcss/patcher-options.ts
|
|
2
|
-
function resolveTailwindcssOptions(options) {
|
|
3
|
-
return options?.tailwindcss ?? options?.tailwind;
|
|
4
|
-
}
|
|
5
|
-
function normalizeExtendLengthUnits(value) {
|
|
6
|
-
if (value === false) return false;
|
|
7
|
-
if (value === true) return { enabled: true };
|
|
8
|
-
if (value && typeof value === "object") return {
|
|
9
|
-
enabled: true,
|
|
10
|
-
...value
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function normalizeTailwindcssPatcherOptions(options) {
|
|
14
|
-
return options;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { normalizeTailwindcssPatcherOptions as n, resolveTailwindcssOptions as r, normalizeExtendLengthUnits as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PatchTargetRecorder, PatchTargetRecorderOptions } from './targets';
|
|
2
|
-
import type { TailwindcssPatcherLike } from '../types';
|
|
3
|
-
interface SetupPatchRecorderOptions extends PatchTargetRecorderOptions {
|
|
4
|
-
logMessage?: boolean;
|
|
5
|
-
messagePrefix?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface PatchRecorderState {
|
|
8
|
-
recorder?: PatchTargetRecorder;
|
|
9
|
-
patchPromise: Promise<void>;
|
|
10
|
-
onPatchCompleted?: () => Promise<void> | void;
|
|
11
|
-
}
|
|
12
|
-
export declare function setupPatchRecorder(patcher: TailwindcssPatcherLike | undefined, baseDir: string | undefined, options?: SetupPatchRecorderOptions): PatchRecorderState;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const PATCH_INFO_FILENAME = "tailwindcss-target.json";
|
|
2
|
-
export declare const PATCH_INFO_CACHE_RELATIVE_PATH: string;
|
|
3
|
-
export declare const PATCH_INFO_LEGACY_RELATIVE_PATH: string;
|
|
4
|
-
export declare function formatRelativeToBase(targetPath: string, baseDir?: string): string;
|
|
5
|
-
export declare function resolveRecordLocation(baseDir: string): {
|
|
6
|
-
normalizedBase: string;
|
|
7
|
-
packageRoot: string;
|
|
8
|
-
recordDir: string;
|
|
9
|
-
recordKey: string;
|
|
10
|
-
recordPath: string;
|
|
11
|
-
packageJsonPath: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
export declare function getRecordFileCandidates(baseDir: string): string[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PatchTargetRecordResult, SavePatchTargetRecordOptions } from './types';
|
|
2
|
-
import type { TailwindcssPatcherLike } from '../../types';
|
|
3
|
-
export declare function readPatchTargetRecord(baseDir?: string): PatchTargetRecordResult | undefined;
|
|
4
|
-
export declare function saveCliPatchTargetRecord(baseDir: string | undefined, patcher: TailwindcssPatcherLike | undefined, options?: SavePatchTargetRecordOptions): Promise<string | undefined>;
|
|
5
|
-
export declare function __resetPatchTargetRecordWarningsForTests(): void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PatchTargetRecorder, PatchTargetRecorderOptions } from './types';
|
|
2
|
-
import type { TailwindcssPatcherLike } from '../../types';
|
|
3
|
-
export declare function createPatchTargetRecorder(baseDir: string | undefined, patcher: TailwindcssPatcherLike | undefined, options?: PatchTargetRecorderOptions): PatchTargetRecorder | undefined;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface PatchTargetRecord {
|
|
2
|
-
tailwindPackagePath: string;
|
|
3
|
-
packageVersion?: string;
|
|
4
|
-
recordedAt: string;
|
|
5
|
-
source: 'cli' | 'runtime' | string;
|
|
6
|
-
tailwindcssBasedir?: string;
|
|
7
|
-
cwd?: string;
|
|
8
|
-
patchVersion?: string;
|
|
9
|
-
packageJsonPath?: string;
|
|
10
|
-
recordKey?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PatchTargetRecordResult {
|
|
13
|
-
baseDir: string;
|
|
14
|
-
path: string;
|
|
15
|
-
record: PatchTargetRecord;
|
|
16
|
-
}
|
|
17
|
-
export interface SavePatchTargetRecordOptions {
|
|
18
|
-
cwd?: string;
|
|
19
|
-
source?: 'cli' | 'runtime' | string;
|
|
20
|
-
recordPath?: string;
|
|
21
|
-
recordKey?: string;
|
|
22
|
-
packageJsonPath?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface PatchTargetRecorder {
|
|
25
|
-
recordPath: string;
|
|
26
|
-
message?: string;
|
|
27
|
-
reason?: string;
|
|
28
|
-
onPatched: () => Promise<string | undefined>;
|
|
29
|
-
}
|
|
30
|
-
export interface PatchTargetRecorderOptions {
|
|
31
|
-
source?: 'cli' | 'runtime' | string;
|
|
32
|
-
cwd?: string;
|
|
33
|
-
recordTarget?: boolean;
|
|
34
|
-
alwaysRecord?: boolean;
|
|
35
|
-
}
|
package/dist/version-CWBxRFPB.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
let node_module = require("node:module");
|
|
3
|
-
let node_path = require("node:path");
|
|
4
|
-
node_path = require_chunk.__toESM(node_path);
|
|
5
|
-
let node_fs = require("node:fs");
|
|
6
|
-
//#region src/tailwindcss/version.ts
|
|
7
|
-
function normalizeSupportedTailwindcssMajorVersion(version) {
|
|
8
|
-
return version === 3 || version === 4 ? version : void 0;
|
|
9
|
-
}
|
|
10
|
-
function readPackageJson(packageJsonPath) {
|
|
11
|
-
try {
|
|
12
|
-
return JSON.parse((0, node_fs.readFileSync)(packageJsonPath, "utf8"));
|
|
13
|
-
} catch {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function findPackageJsonDeclaringPackage(packageName, base) {
|
|
18
|
-
let current = node_path.default.resolve(base);
|
|
19
|
-
while (true) {
|
|
20
|
-
const pkgPath = node_path.default.join(current, "package.json");
|
|
21
|
-
if ((0, node_fs.existsSync)(pkgPath)) {
|
|
22
|
-
const pkg = readPackageJson(pkgPath);
|
|
23
|
-
if (readDeclaredPackageVersion(packageName, pkg)) return pkgPath;
|
|
24
|
-
if (pkg?.name !== "weapp-tailwindcss") return;
|
|
25
|
-
}
|
|
26
|
-
const parent = node_path.default.dirname(current);
|
|
27
|
-
if (parent === current) return;
|
|
28
|
-
current = parent;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function readDeclaredPackageVersion(packageName, pkg) {
|
|
32
|
-
return pkg?.dependencies?.[packageName] ?? pkg?.devDependencies?.[packageName] ?? pkg?.peerDependencies?.[packageName] ?? pkg?.optionalDependencies?.[packageName];
|
|
33
|
-
}
|
|
34
|
-
function readDeclaredPackageMajorVersion(version) {
|
|
35
|
-
const match = version?.match(/(?:^|\D)([34])(?:\.|\b)/);
|
|
36
|
-
return normalizeSupportedTailwindcssMajorVersion(match ? Number(match[1]) : void 0);
|
|
37
|
-
}
|
|
38
|
-
function readInstalledPackageMajorVersion(packageName, base) {
|
|
39
|
-
const packageJsonPath = findPackageJsonDeclaringPackage(packageName, base);
|
|
40
|
-
if (!packageJsonPath) return;
|
|
41
|
-
const declaredVersion = readDeclaredPackageVersion(packageName, readPackageJson(packageJsonPath));
|
|
42
|
-
if (!declaredVersion) return;
|
|
43
|
-
try {
|
|
44
|
-
const pkg = (0, node_module.createRequire)(packageJsonPath)(`${packageName}/package.json`);
|
|
45
|
-
return normalizeSupportedTailwindcssMajorVersion(Number(pkg.version?.split(".")[0]));
|
|
46
|
-
} catch {
|
|
47
|
-
return readDeclaredPackageMajorVersion(declaredVersion);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
Object.defineProperty(exports, "readInstalledPackageMajorVersion", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function() {
|
|
54
|
-
return readInstalledPackageMajorVersion;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
-
//#region src/tailwindcss/version.ts
|
|
5
|
-
function normalizeSupportedTailwindcssMajorVersion(version) {
|
|
6
|
-
return version === 3 || version === 4 ? version : void 0;
|
|
7
|
-
}
|
|
8
|
-
function readPackageJson(packageJsonPath) {
|
|
9
|
-
try {
|
|
10
|
-
return JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
11
|
-
} catch {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function findPackageJsonDeclaringPackage(packageName, base) {
|
|
16
|
-
let current = path.resolve(base);
|
|
17
|
-
while (true) {
|
|
18
|
-
const pkgPath = path.join(current, "package.json");
|
|
19
|
-
if (existsSync(pkgPath)) {
|
|
20
|
-
const pkg = readPackageJson(pkgPath);
|
|
21
|
-
if (readDeclaredPackageVersion(packageName, pkg)) return pkgPath;
|
|
22
|
-
if (pkg?.name !== "weapp-tailwindcss") return;
|
|
23
|
-
}
|
|
24
|
-
const parent = path.dirname(current);
|
|
25
|
-
if (parent === current) return;
|
|
26
|
-
current = parent;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function readDeclaredPackageVersion(packageName, pkg) {
|
|
30
|
-
return pkg?.dependencies?.[packageName] ?? pkg?.devDependencies?.[packageName] ?? pkg?.peerDependencies?.[packageName] ?? pkg?.optionalDependencies?.[packageName];
|
|
31
|
-
}
|
|
32
|
-
function readDeclaredPackageMajorVersion(version) {
|
|
33
|
-
const match = version?.match(/(?:^|\D)([34])(?:\.|\b)/);
|
|
34
|
-
return normalizeSupportedTailwindcssMajorVersion(match ? Number(match[1]) : void 0);
|
|
35
|
-
}
|
|
36
|
-
function readInstalledPackageMajorVersion(packageName, base) {
|
|
37
|
-
const packageJsonPath = findPackageJsonDeclaringPackage(packageName, base);
|
|
38
|
-
if (!packageJsonPath) return;
|
|
39
|
-
const declaredVersion = readDeclaredPackageVersion(packageName, readPackageJson(packageJsonPath));
|
|
40
|
-
if (!declaredVersion) return;
|
|
41
|
-
try {
|
|
42
|
-
const pkg = createRequire(packageJsonPath)(`${packageName}/package.json`);
|
|
43
|
-
return normalizeSupportedTailwindcssMajorVersion(Number(pkg.version?.split(".")[0]));
|
|
44
|
-
} catch {
|
|
45
|
-
return readDeclaredPackageMajorVersion(declaredVersion);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
export { readInstalledPackageMajorVersion as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|