weapp-tailwindcss 5.0.0-next.36 → 5.0.0-next.38
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/{bundle-state-Bsr05EFW.mjs → bundle-state-CnaJxkFY.mjs} +1 -1
- package/dist/{bundle-state-8w8DM8Lw.js → bundle-state-DgGEhk_z.js} +1 -1
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
- package/dist/bundlers/vite/source-candidates.d.ts +5 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/generator/options.d.ts +3 -0
- package/dist/{generator-BtpQoQEH.js → generator--0-ekuVO.js} +5 -3
- package/dist/{generator-CmLpVJgw.mjs → generator-B76ovqsv.mjs} +5 -3
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +6 -6
- package/dist/{incremental-runtime-class-set-vqTU-eph.js → incremental-runtime-class-set-CN6K_97P.js} +25 -20
- package/dist/{incremental-runtime-class-set-W61zZU00.mjs → incremental-runtime-class-set-x10M9bn_.mjs} +25 -20
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-DGprmeke.mjs → postcss-CR9UCaIK.mjs} +3 -3
- package/dist/{postcss-DSvNrY0J.js → postcss-hYimKoN_.js} +3 -3
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-nPDKYr8V.mjs → precheck-BrNwLG2e.mjs} +3 -3
- package/dist/{precheck-Bp-V1T_Q.js → precheck-DPtJjZmV.js} +3 -3
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +2 -2
- package/dist/{source-candidates-l12JBkKU.mjs → source-candidates-DN1mihlU.mjs} +11 -11
- package/dist/{source-candidates-BjB4wSga.js → source-candidates-DSxme_O2.js} +11 -11
- package/dist/tailwindcss/v3-engine/types.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +1 -0
- package/dist/{tailwindcss-D6zEhnyE.mjs → tailwindcss-DWtPieNE.mjs} +1 -1
- package/dist/{tailwindcss-bNXguXhC.js → tailwindcss-glCm_d3H.js} +1 -1
- package/dist/typedoc.export.d.ts +1 -1
- package/dist/types/typedoc-tailwindcss-patch.d.ts +67 -0
- package/dist/{v3-engine-KDOfD-6F.js → v3-engine-D3BMLVAN.js} +78 -15
- package/dist/{v3-engine-BYcGCWUY.mjs → v3-engine-DCxNPBVs.mjs} +78 -15
- package/dist/{vite-C8SUICPv.mjs → vite-DOprpdH-.mjs} +11 -11
- package/dist/{vite-CMzi0wR2.js → vite-Ec0uX6kF.js} +11 -11
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +87 -18
- package/dist/{webpack-2v1sQKyZ.js → webpack-Ccohlg3A.js} +48 -17
- package/dist/{webpack-BiTMfrBW.mjs → webpack-DFlZcqAU.mjs} +47 -17
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -4
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as traverse, h as babelParse, o as Parser } from "./precheck-
|
|
1
|
+
import { g as traverse, h as babelParse, o as Parser } from "./precheck-BrNwLG2e.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-DPtJjZmV.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BundleSnapshot } from './bundle-state';
|
|
2
2
|
import type { TailwindcssPatcherLike } from '../../types';
|
|
3
|
+
import type { IArbitraryValues } from '../../types/shared';
|
|
3
4
|
import { extractRawCandidatesWithPositions, extractValidCandidates } from 'tailwindcss-patch';
|
|
4
5
|
type ExtractValidCandidatesOptions = Parameters<typeof extractValidCandidates>[0];
|
|
5
6
|
type MemoryExtractValidCandidatesOptions = ExtractValidCandidatesOptions & {
|
|
@@ -8,7 +9,9 @@ type MemoryExtractValidCandidatesOptions = ExtractValidCandidatesOptions & {
|
|
|
8
9
|
};
|
|
9
10
|
type ExtractValidCandidatesFn = (options?: MemoryExtractValidCandidatesOptions) => Promise<string[]>;
|
|
10
11
|
type ExtractRawCandidateResult = Awaited<ReturnType<typeof extractRawCandidatesWithPositions>>;
|
|
11
|
-
type ExtractRawCandidatesFn = (content: string, extension?: string
|
|
12
|
+
type ExtractRawCandidatesFn = (content: string, extension?: string, options?: {
|
|
13
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
14
|
+
}) => Promise<ExtractRawCandidateResult>;
|
|
12
15
|
export interface BundleRuntimeClassSetManager {
|
|
13
16
|
sync: (patcher: TailwindcssPatcherLike, snapshot: BundleSnapshot, options?: BundleRuntimeClassSetSyncOptions) => Promise<Set<string>>;
|
|
14
17
|
reset: () => Promise<void>;
|
|
@@ -18,6 +21,7 @@ export interface BundleRuntimeClassSetSyncOptions {
|
|
|
18
21
|
skipInitialFullScanWithBase?: boolean | undefined;
|
|
19
22
|
}
|
|
20
23
|
interface CreateBundleRuntimeClassSetManagerOptions {
|
|
24
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
21
25
|
extractCandidates?: ExtractValidCandidatesFn;
|
|
22
26
|
extractRawCandidates?: ExtractRawCandidatesFn;
|
|
23
27
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
|
+
import type { IArbitraryValues } from '../../types/shared';
|
|
2
3
|
export interface SourceCandidateCollector {
|
|
3
4
|
sync: (id: string, source: string) => Promise<void>;
|
|
4
5
|
syncCss: (id: string, source: string) => Promise<void>;
|
|
@@ -28,6 +29,9 @@ interface ScanSourceCandidateRootOptions {
|
|
|
28
29
|
entries?: TailwindSourceEntry[] | undefined;
|
|
29
30
|
explicit?: boolean | undefined;
|
|
30
31
|
}
|
|
32
|
+
export interface SourceCandidateCollectorOptions {
|
|
33
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
34
|
+
}
|
|
31
35
|
export declare function isSourceCandidateRequest(id: string): boolean;
|
|
32
|
-
export declare function createSourceCandidateCollector(): SourceCandidateCollector;
|
|
36
|
+
export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
|
|
33
37
|
export {};
|
package/dist/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-DPtJjZmV.js");
|
|
3
3
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
4
4
|
//#region src/core.ts
|
|
5
5
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
1
|
+
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-BrNwLG2e.mjs";
|
|
2
2
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
3
3
|
//#region src/core.ts
|
|
4
4
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { WeappTailwindcssGeneratorTarget } from './types';
|
|
3
|
+
import type { IArbitraryValues } from '../types/shared';
|
|
3
4
|
export interface WeappTailwindcssGeneratorOptions {
|
|
4
5
|
target?: WeappTailwindcssGeneratorTarget | undefined;
|
|
5
6
|
config?: string | undefined;
|
|
6
7
|
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
7
8
|
importFallback?: boolean | undefined;
|
|
8
9
|
tailwindcssV3Compatibility?: boolean | undefined;
|
|
10
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
9
11
|
}
|
|
10
12
|
export type WeappTailwindcssGeneratorUserOptions = WeappTailwindcssGeneratorOptions;
|
|
11
13
|
export interface NormalizedWeappTailwindcssGeneratorOptions {
|
|
@@ -14,5 +16,6 @@ export interface NormalizedWeappTailwindcssGeneratorOptions {
|
|
|
14
16
|
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
15
17
|
importFallback: boolean;
|
|
16
18
|
tailwindcssV3Compatibility: boolean;
|
|
19
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
17
20
|
}
|
|
18
21
|
export declare function normalizeWeappTailwindcssGeneratorOptions(options: WeappTailwindcssGeneratorUserOptions | undefined): NormalizedWeappTailwindcssGeneratorOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_chunk.__toESM(node_process);
|
|
5
5
|
//#region src/generator/options.ts
|
|
@@ -39,14 +39,16 @@ function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
|
39
39
|
if (options == null) return {
|
|
40
40
|
target,
|
|
41
41
|
importFallback: true,
|
|
42
|
-
tailwindcssV3Compatibility: target === "weapp"
|
|
42
|
+
tailwindcssV3Compatibility: target === "weapp",
|
|
43
|
+
bareArbitraryValues: void 0
|
|
43
44
|
};
|
|
44
45
|
return {
|
|
45
46
|
target,
|
|
46
47
|
config: options.config,
|
|
47
48
|
styleOptions: options.styleOptions,
|
|
48
49
|
importFallback: options.importFallback ?? true,
|
|
49
|
-
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
50
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp",
|
|
51
|
+
bareArbitraryValues: options.bareArbitraryValues
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-
|
|
1
|
+
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
//#region src/generator/options.ts
|
|
4
4
|
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
@@ -37,14 +37,16 @@ function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
|
37
37
|
if (options == null) return {
|
|
38
38
|
target,
|
|
39
39
|
importFallback: true,
|
|
40
|
-
tailwindcssV3Compatibility: target === "weapp"
|
|
40
|
+
tailwindcssV3Compatibility: target === "weapp",
|
|
41
|
+
bareArbitraryValues: void 0
|
|
41
42
|
};
|
|
42
43
|
return {
|
|
43
44
|
target,
|
|
44
45
|
config: options.config,
|
|
45
46
|
styleOptions: options.styleOptions,
|
|
46
47
|
importFallback: options.importFallback ?? true,
|
|
47
|
-
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
48
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp",
|
|
49
|
+
bareArbitraryValues: options.bareArbitraryValues
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
//#endregion
|
package/dist/generator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
|
+
const require_generator = require("./generator--0-ekuVO.js");
|
|
4
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
5
5
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
6
6
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-B76ovqsv.mjs";
|
|
3
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
5
|
-
const require_precheck = require("./precheck-
|
|
6
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
7
|
-
const require_source_candidates = require("./source-candidates-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-CN6K_97P.js");
|
|
5
|
+
const require_precheck = require("./precheck-DPtJjZmV.js");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-glCm_d3H.js");
|
|
7
|
+
const require_source_candidates = require("./source-candidates-DSxme_O2.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_process = require("node:process");
|
|
@@ -151,7 +151,7 @@ function createPlugins(options = {}) {
|
|
|
151
151
|
dependencies: [...sourceScan?.dependencies ?? []].sort()
|
|
152
152
|
}));
|
|
153
153
|
if (!forceRefresh && cachedGulpSourceCandidateSignature === nextSignature && cachedGulpSourceCandidates) return cachedGulpSourceCandidates;
|
|
154
|
-
const collector = require_source_candidates.createSourceCandidateCollector();
|
|
154
|
+
const collector = require_source_candidates.createSourceCandidateCollector({ bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues });
|
|
155
155
|
await collector.scanRoot({
|
|
156
156
|
entries: sourceScan?.entries,
|
|
157
157
|
root
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
2
|
-
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-
|
|
3
|
-
import { c as hasTailwindRootDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager, u as normalizeTailwindSourceForGenerator } from "./incremental-runtime-class-set-
|
|
4
|
-
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
5
|
-
import { t as createSourceCandidateCollector } from "./source-candidates-
|
|
1
|
+
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-BrNwLG2e.mjs";
|
|
2
|
+
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-DCxNPBVs.mjs";
|
|
3
|
+
import { c as hasTailwindRootDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager, u as normalizeTailwindSourceForGenerator } from "./incremental-runtime-class-set-x10M9bn_.mjs";
|
|
4
|
+
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-DWtPieNE.mjs";
|
|
5
|
+
import { t as createSourceCandidateCollector } from "./source-candidates-DN1mihlU.mjs";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import path from "node:path";
|
|
@@ -145,7 +145,7 @@ function createPlugins(options = {}) {
|
|
|
145
145
|
dependencies: [...sourceScan?.dependencies ?? []].sort()
|
|
146
146
|
}));
|
|
147
147
|
if (!forceRefresh && cachedGulpSourceCandidateSignature === nextSignature && cachedGulpSourceCandidates) return cachedGulpSourceCandidates;
|
|
148
|
-
const collector = createSourceCandidateCollector();
|
|
148
|
+
const collector = createSourceCandidateCollector({ bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues });
|
|
149
149
|
await collector.scanRoot({
|
|
150
150
|
entries: sourceScan?.entries,
|
|
151
151
|
root
|
package/dist/{incremental-runtime-class-set-vqTU-eph.js → incremental-runtime-class-set-CN6K_97P.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
|
+
const require_generator = require("./generator--0-ekuVO.js");
|
|
4
|
+
const require_precheck = require("./precheck-DPtJjZmV.js");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
6
6
|
let postcss = require("postcss");
|
|
7
7
|
postcss = require_chunk.__toESM(postcss);
|
|
8
|
+
let tailwindcss_patch = require("tailwindcss-patch");
|
|
8
9
|
let node_process = require("node:process");
|
|
9
10
|
node_process = require_chunk.__toESM(node_process);
|
|
10
11
|
let node_path = require("node:path");
|
|
11
12
|
node_path = require_chunk.__toESM(node_path);
|
|
12
|
-
let tailwindcss_patch = require("tailwindcss-patch");
|
|
13
13
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
14
14
|
//#region src/bundlers/shared/generator-css/markers.ts
|
|
15
15
|
const TAILWIND_V4_BANNER_RE = /\/\*!\s*tailwindcss v4\./;
|
|
@@ -1747,7 +1747,10 @@ function prefixLocalCssImportsWithWebpackIgnore(css) {
|
|
|
1747
1747
|
}
|
|
1748
1748
|
async function generateCssByGenerator(options) {
|
|
1749
1749
|
const { opts, runtimeState, runtime, rawSource, file, cssHandlerOptions, cssUserHandlerOptions, getSourceCandidatesForEntries, styleHandler, debug } = options;
|
|
1750
|
-
const generatorOptions =
|
|
1750
|
+
const generatorOptions = {
|
|
1751
|
+
...require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator),
|
|
1752
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues
|
|
1753
|
+
};
|
|
1751
1754
|
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
1752
1755
|
const effectiveRawSource = stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(normalizeTailwindSourceDirectives(rawSource, { importFallback: generatorOptions.importFallback })));
|
|
1753
1756
|
const cleanedLocalImportWrapper = cleanLocalCssImportWrapperTailwindDirectives(effectiveRawSource);
|
|
@@ -1765,7 +1768,7 @@ async function generateCssByGenerator(options) {
|
|
|
1765
1768
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || !shouldGenerateCurrentCss || majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers) return;
|
|
1766
1769
|
try {
|
|
1767
1770
|
await runtimeState.readyPromise;
|
|
1768
|
-
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(effectiveRawSource, "css") : [];
|
|
1771
|
+
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(effectiveRawSource, "css", { bareArbitraryValues: generatorOptions.bareArbitraryValues }) : [];
|
|
1769
1772
|
const runtimeWithCurrentCss = currentCssCandidates.length > 0 ? new Set([...runtime, ...currentCssCandidates]) : runtime;
|
|
1770
1773
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, effectiveRawSource, file, cssHandlerOptions, generatorOptions, {
|
|
1771
1774
|
getSourceCandidatesForEntries,
|
|
@@ -1784,6 +1787,7 @@ async function generateCssByGenerator(options) {
|
|
|
1784
1787
|
}) : runtimeWithCurrentCss;
|
|
1785
1788
|
const generatorRuntime = majorVersion === 4 && generatorOptions.target === "weapp" ? require_v3_engine.filterUnsupportedMiniProgramTailwindV4Candidates(sourceRuntime) : sourceRuntime;
|
|
1786
1789
|
return generator.generate({
|
|
1790
|
+
bareArbitraryValues: generatorOptions.bareArbitraryValues,
|
|
1787
1791
|
candidates: generatorRuntime,
|
|
1788
1792
|
incrementalCache: majorVersion === 3 || majorVersion === 4,
|
|
1789
1793
|
scanSources: shouldScanTailwindV4Sources(majorVersion, generatorOptions.target, generatorRuntime, isolateCssSource),
|
|
@@ -1917,11 +1921,18 @@ async function validateCandidatesByGenerator(options) {
|
|
|
1917
1921
|
const { candidates, cssHandlerOptions, debug, file, opts, rawSource, runtimeState } = options;
|
|
1918
1922
|
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
1919
1923
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || candidates.size === 0) return /* @__PURE__ */ new Set();
|
|
1920
|
-
const
|
|
1924
|
+
const generatorOptions = {
|
|
1925
|
+
...require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator),
|
|
1926
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues
|
|
1927
|
+
};
|
|
1928
|
+
const sources = await resolveGeneratorSources(majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, { runtime: candidates });
|
|
1921
1929
|
const classSets = await Promise.all(sources.map(async (source) => {
|
|
1922
1930
|
const generator = require_generator.createWeappTailwindcssGenerator(source);
|
|
1923
|
-
if (
|
|
1931
|
+
if (generatorOptions.bareArbitraryValues === void 0 || generatorOptions.bareArbitraryValues === false) {
|
|
1932
|
+
if (typeof generator.validateCandidates === "function") return generator.validateCandidates(candidates);
|
|
1933
|
+
}
|
|
1924
1934
|
return (await generator.generate({
|
|
1935
|
+
bareArbitraryValues: generatorOptions.bareArbitraryValues,
|
|
1925
1936
|
candidates,
|
|
1926
1937
|
target: "tailwind"
|
|
1927
1938
|
})).classSet;
|
|
@@ -2045,14 +2056,15 @@ function isRuntimeCandidateEntry(entry) {
|
|
|
2045
2056
|
if (entry.output.facadeModuleId && !isDependencyModuleId(entry.output.facadeModuleId)) return true;
|
|
2046
2057
|
return collectChunkModuleIds(entry).some((id) => !isDependencyModuleId(id));
|
|
2047
2058
|
}
|
|
2048
|
-
function createExtractOptions(context, source) {
|
|
2059
|
+
function createExtractOptions(context, source, bareArbitraryValues) {
|
|
2049
2060
|
return {
|
|
2050
2061
|
cwd: context.projectRoot,
|
|
2051
2062
|
base: context.base,
|
|
2052
2063
|
baseFallbacks: context.baseFallbacks,
|
|
2053
2064
|
css: context.css,
|
|
2054
2065
|
content: source,
|
|
2055
|
-
extension: "html"
|
|
2066
|
+
extension: "html",
|
|
2067
|
+
bareArbitraryValues
|
|
2056
2068
|
};
|
|
2057
2069
|
}
|
|
2058
2070
|
function createRuntimeEntries(snapshot) {
|
|
@@ -2181,14 +2193,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2181
2193
|
return designSystemPromise;
|
|
2182
2194
|
}
|
|
2183
2195
|
function populateCandidateValidityCacheFromDesignSystem(designSystem, unknownCandidates) {
|
|
2184
|
-
const
|
|
2185
|
-
const cssByCandidate = parsedCandidates.length > 0 ? designSystem.candidatesToCss(parsedCandidates) : [];
|
|
2186
|
-
const validCandidates = /* @__PURE__ */ new Set();
|
|
2187
|
-
for (let index = 0; index < parsedCandidates.length; index += 1) {
|
|
2188
|
-
const candidate = parsedCandidates[index];
|
|
2189
|
-
const css = cssByCandidate[index];
|
|
2190
|
-
if (candidate && typeof css === "string" && css.trim().length > 0) validCandidates.add(candidate);
|
|
2191
|
-
}
|
|
2196
|
+
const validCandidates = (0, tailwindcss_patch.resolveValidTailwindV4Candidates)(designSystem, unknownCandidates, { bareArbitraryValues: options.bareArbitraryValues });
|
|
2192
2197
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2193
2198
|
}
|
|
2194
2199
|
async function validateUnknownCandidates(patcher, unknownCandidates) {
|
|
@@ -2207,12 +2212,12 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2207
2212
|
throw error;
|
|
2208
2213
|
}
|
|
2209
2214
|
const source = createCandidateValidationSource(unknownCandidates);
|
|
2210
|
-
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source)));
|
|
2215
|
+
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source, options.bareArbitraryValues)));
|
|
2211
2216
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2212
2217
|
}
|
|
2213
2218
|
async function extractEntryRawCandidates(entry, patcher, knownSourceCandidates) {
|
|
2214
2219
|
const extension = resolveEntryExtension(entry);
|
|
2215
|
-
const matches = await extractRawCandidates(entry.source, extension);
|
|
2220
|
+
const matches = options.bareArbitraryValues === void 0 || options.bareArbitraryValues === false ? await extractRawCandidates(entry.source, extension) : await extractRawCandidates(entry.source, extension, { bareArbitraryValues: options.bareArbitraryValues });
|
|
2216
2221
|
const highConfidenceLiteralRanges = patcher.majorVersion === 3 && !customExtractCandidates ? createHighConfidenceLiteralRanges(entry.source, matches) : [];
|
|
2217
2222
|
const candidates = /* @__PURE__ */ new Set();
|
|
2218
2223
|
for (const match of matches) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { m as replaceWxml, r as resolveStyleOptionsFromContext } from "./precheck-
|
|
2
|
-
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, q as omitUndefined, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-
|
|
3
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { m as replaceWxml, r as resolveStyleOptionsFromContext } from "./precheck-BrNwLG2e.mjs";
|
|
2
|
+
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, q as omitUndefined, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-DCxNPBVs.mjs";
|
|
3
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-B76ovqsv.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import postcss from "postcss";
|
|
6
|
+
import { extractRawCandidatesWithPositions, extractSourceCandidates, extractValidCandidates, resolveValidTailwindV4Candidates } from "tailwindcss-patch";
|
|
6
7
|
import process from "node:process";
|
|
7
8
|
import path from "node:path";
|
|
8
|
-
import { extractRawCandidatesWithPositions, extractSourceCandidates, extractValidCandidates } from "tailwindcss-patch";
|
|
9
9
|
import { finalizeMiniProgramCss, removeUnsupportedMiniProgramAtRules } from "@weapp-tailwindcss/postcss";
|
|
10
10
|
//#region src/bundlers/shared/generator-css/markers.ts
|
|
11
11
|
const TAILWIND_V4_BANNER_RE = /\/\*!\s*tailwindcss v4\./;
|
|
@@ -1743,7 +1743,10 @@ function prefixLocalCssImportsWithWebpackIgnore(css) {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
async function generateCssByGenerator(options) {
|
|
1745
1745
|
const { opts, runtimeState, runtime, rawSource, file, cssHandlerOptions, cssUserHandlerOptions, getSourceCandidatesForEntries, styleHandler, debug } = options;
|
|
1746
|
-
const generatorOptions =
|
|
1746
|
+
const generatorOptions = {
|
|
1747
|
+
...normalizeWeappTailwindcssGeneratorOptions(opts.generator),
|
|
1748
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues
|
|
1749
|
+
};
|
|
1747
1750
|
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
1748
1751
|
const effectiveRawSource = stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(normalizeTailwindSourceDirectives(rawSource, { importFallback: generatorOptions.importFallback })));
|
|
1749
1752
|
const cleanedLocalImportWrapper = cleanLocalCssImportWrapperTailwindDirectives(effectiveRawSource);
|
|
@@ -1761,7 +1764,7 @@ async function generateCssByGenerator(options) {
|
|
|
1761
1764
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || !shouldGenerateCurrentCss || majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers) return;
|
|
1762
1765
|
try {
|
|
1763
1766
|
await runtimeState.readyPromise;
|
|
1764
|
-
const currentCssCandidates = majorVersion === 4 ? await extractSourceCandidates(effectiveRawSource, "css") : [];
|
|
1767
|
+
const currentCssCandidates = majorVersion === 4 ? await extractSourceCandidates(effectiveRawSource, "css", { bareArbitraryValues: generatorOptions.bareArbitraryValues }) : [];
|
|
1765
1768
|
const runtimeWithCurrentCss = currentCssCandidates.length > 0 ? new Set([...runtime, ...currentCssCandidates]) : runtime;
|
|
1766
1769
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, effectiveRawSource, file, cssHandlerOptions, generatorOptions, {
|
|
1767
1770
|
getSourceCandidatesForEntries,
|
|
@@ -1780,6 +1783,7 @@ async function generateCssByGenerator(options) {
|
|
|
1780
1783
|
}) : runtimeWithCurrentCss;
|
|
1781
1784
|
const generatorRuntime = majorVersion === 4 && generatorOptions.target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(sourceRuntime) : sourceRuntime;
|
|
1782
1785
|
return generator.generate({
|
|
1786
|
+
bareArbitraryValues: generatorOptions.bareArbitraryValues,
|
|
1783
1787
|
candidates: generatorRuntime,
|
|
1784
1788
|
incrementalCache: majorVersion === 3 || majorVersion === 4,
|
|
1785
1789
|
scanSources: shouldScanTailwindV4Sources(majorVersion, generatorOptions.target, generatorRuntime, isolateCssSource),
|
|
@@ -1913,11 +1917,18 @@ async function validateCandidatesByGenerator(options) {
|
|
|
1913
1917
|
const { candidates, cssHandlerOptions, debug, file, opts, rawSource, runtimeState } = options;
|
|
1914
1918
|
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
1915
1919
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || candidates.size === 0) return /* @__PURE__ */ new Set();
|
|
1916
|
-
const
|
|
1920
|
+
const generatorOptions = {
|
|
1921
|
+
...normalizeWeappTailwindcssGeneratorOptions(opts.generator),
|
|
1922
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues
|
|
1923
|
+
};
|
|
1924
|
+
const sources = await resolveGeneratorSources(majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, { runtime: candidates });
|
|
1917
1925
|
const classSets = await Promise.all(sources.map(async (source) => {
|
|
1918
1926
|
const generator = createWeappTailwindcssGenerator(source);
|
|
1919
|
-
if (
|
|
1927
|
+
if (generatorOptions.bareArbitraryValues === void 0 || generatorOptions.bareArbitraryValues === false) {
|
|
1928
|
+
if (typeof generator.validateCandidates === "function") return generator.validateCandidates(candidates);
|
|
1929
|
+
}
|
|
1920
1930
|
return (await generator.generate({
|
|
1931
|
+
bareArbitraryValues: generatorOptions.bareArbitraryValues,
|
|
1921
1932
|
candidates,
|
|
1922
1933
|
target: "tailwind"
|
|
1923
1934
|
})).classSet;
|
|
@@ -2041,14 +2052,15 @@ function isRuntimeCandidateEntry(entry) {
|
|
|
2041
2052
|
if (entry.output.facadeModuleId && !isDependencyModuleId(entry.output.facadeModuleId)) return true;
|
|
2042
2053
|
return collectChunkModuleIds(entry).some((id) => !isDependencyModuleId(id));
|
|
2043
2054
|
}
|
|
2044
|
-
function createExtractOptions(context, source) {
|
|
2055
|
+
function createExtractOptions(context, source, bareArbitraryValues) {
|
|
2045
2056
|
return {
|
|
2046
2057
|
cwd: context.projectRoot,
|
|
2047
2058
|
base: context.base,
|
|
2048
2059
|
baseFallbacks: context.baseFallbacks,
|
|
2049
2060
|
css: context.css,
|
|
2050
2061
|
content: source,
|
|
2051
|
-
extension: "html"
|
|
2062
|
+
extension: "html",
|
|
2063
|
+
bareArbitraryValues
|
|
2052
2064
|
};
|
|
2053
2065
|
}
|
|
2054
2066
|
function createRuntimeEntries(snapshot) {
|
|
@@ -2177,14 +2189,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2177
2189
|
return designSystemPromise;
|
|
2178
2190
|
}
|
|
2179
2191
|
function populateCandidateValidityCacheFromDesignSystem(designSystem, unknownCandidates) {
|
|
2180
|
-
const
|
|
2181
|
-
const cssByCandidate = parsedCandidates.length > 0 ? designSystem.candidatesToCss(parsedCandidates) : [];
|
|
2182
|
-
const validCandidates = /* @__PURE__ */ new Set();
|
|
2183
|
-
for (let index = 0; index < parsedCandidates.length; index += 1) {
|
|
2184
|
-
const candidate = parsedCandidates[index];
|
|
2185
|
-
const css = cssByCandidate[index];
|
|
2186
|
-
if (candidate && typeof css === "string" && css.trim().length > 0) validCandidates.add(candidate);
|
|
2187
|
-
}
|
|
2192
|
+
const validCandidates = resolveValidTailwindV4Candidates(designSystem, unknownCandidates, { bareArbitraryValues: options.bareArbitraryValues });
|
|
2188
2193
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2189
2194
|
}
|
|
2190
2195
|
async function validateUnknownCandidates(patcher, unknownCandidates) {
|
|
@@ -2203,12 +2208,12 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2203
2208
|
throw error;
|
|
2204
2209
|
}
|
|
2205
2210
|
const source = createCandidateValidationSource(unknownCandidates);
|
|
2206
|
-
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source)));
|
|
2211
|
+
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source, options.bareArbitraryValues)));
|
|
2207
2212
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2208
2213
|
}
|
|
2209
2214
|
async function extractEntryRawCandidates(entry, patcher, knownSourceCandidates) {
|
|
2210
2215
|
const extension = resolveEntryExtension(entry);
|
|
2211
|
-
const matches = await extractRawCandidates(entry.source, extension);
|
|
2216
|
+
const matches = options.bareArbitraryValues === void 0 || options.bareArbitraryValues === false ? await extractRawCandidates(entry.source, extension) : await extractRawCandidates(entry.source, extension, { bareArbitraryValues: options.bareArbitraryValues });
|
|
2212
2217
|
const highConfidenceLiteralRanges = patcher.majorVersion === 3 && !customExtractCandidates ? createHighConfidenceLiteralRanges(entry.source, matches) : [];
|
|
2213
2218
|
const candidates = /* @__PURE__ */ new Set();
|
|
2214
2219
|
for (const match of matches) {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator--0-ekuVO.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
4
|
+
const require_postcss = require("./postcss-hYimKoN_.js");
|
|
5
|
+
const require_vite = require("./vite-Ec0uX6kF.js");
|
|
6
|
+
const require_webpack = require("./webpack-Ccohlg3A.js");
|
|
7
7
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-B76ovqsv.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-CR9UCaIK.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-DOprpdH-.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-DFlZcqAU.mjs";
|
|
6
6
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
7
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as collectCssInlineSourceCandidates, F as parseConfigParam, H as readInstalledPackageMajorVersion, I as resolveCssSourceEntries, M as expandTailwindSourceEntries, O as DEFAULT_SOURCE_SCAN_EXTENSIONS, P as normalizeLegacyContentEntries, j as createSourceScanPattern, t as resolveTailwindV3Source, y as resolveTailwindV4Source$1 } from "./v3-engine-
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { A as collectCssInlineSourceCandidates, F as parseConfigParam, H as readInstalledPackageMajorVersion, I as resolveCssSourceEntries, M as expandTailwindSourceEntries, O as DEFAULT_SOURCE_SCAN_EXTENSIONS, P as normalizeLegacyContentEntries, j as createSourceScanPattern, t as resolveTailwindV3Source, y as resolveTailwindV4Source$1 } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-B76ovqsv.mjs";
|
|
3
3
|
import postcss from "postcss";
|
|
4
|
+
import { extractRawCandidatesWithPositions, extractValidCandidates } from "tailwindcss-patch";
|
|
4
5
|
import process from "node:process";
|
|
5
6
|
import path from "node:path";
|
|
6
|
-
import { extractRawCandidatesWithPositions, extractValidCandidates } from "tailwindcss-patch";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { loadConfig } from "tailwindcss-config";
|
|
9
9
|
//#region src/postcss/config-directive.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
|
+
const require_generator = require("./generator--0-ekuVO.js");
|
|
4
4
|
let postcss = require("postcss");
|
|
5
5
|
postcss = require_chunk.__toESM(postcss);
|
|
6
|
+
let tailwindcss_patch = require("tailwindcss-patch");
|
|
6
7
|
let node_process = require("node:process");
|
|
7
8
|
node_process = require_chunk.__toESM(node_process);
|
|
8
9
|
let node_path = require("node:path");
|
|
9
10
|
node_path = require_chunk.__toESM(node_path);
|
|
10
|
-
let tailwindcss_patch = require("tailwindcss-patch");
|
|
11
11
|
let node_fs_promises = require("node:fs/promises");
|
|
12
12
|
let tailwindcss_config = require("tailwindcss-config");
|
|
13
13
|
//#region src/postcss/config-directive.ts
|
package/dist/postcss.js
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_postcss = require("./postcss-
|
|
5
|
+
const require_postcss = require("./postcss-hYimKoN_.js");
|
|
6
6
|
exports.default = require_postcss.weappTailwindcssPostcssPlugin;
|
|
7
7
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
1
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-CR9UCaIK.mjs";
|
|
2
2
|
export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { B as createDebug, C as createTailwindV4Engine$1, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-
|
|
1
|
+
import { B as createDebug, C as createTailwindV4Engine$1, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
2
|
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-8xrgzxFY.mjs";
|
|
3
3
|
import { i as isMap, n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
4
|
-
import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-
|
|
4
|
+
import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-DWtPieNE.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
|
+
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
6
7
|
import process from "node:process";
|
|
7
8
|
import path from "node:path";
|
|
8
9
|
import { logger, pc } from "@weapp-tailwindcss/logger";
|
|
9
|
-
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
10
10
|
import { rm } from "node:fs/promises";
|
|
11
11
|
import { createStyleHandler } from "@weapp-tailwindcss/postcss";
|
|
12
12
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
3
|
const require_defaults = require("./defaults-zKUH2mDe.js");
|
|
4
4
|
require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-glCm_d3H.js");
|
|
6
|
+
let tailwindcss_patch = require("tailwindcss-patch");
|
|
6
7
|
let node_process = require("node:process");
|
|
7
8
|
node_process = require_chunk.__toESM(node_process);
|
|
8
9
|
let node_path = require("node:path");
|
|
9
10
|
node_path = require_chunk.__toESM(node_path);
|
|
10
11
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
11
|
-
let tailwindcss_patch = require("tailwindcss-patch");
|
|
12
12
|
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
14
14
|
let node_buffer = require("node:buffer");
|
package/dist/presets.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
4
4
|
const require_utils = require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-glCm_d3H.js");
|
|
6
6
|
require("./logger-TlKT3xmR.js");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
package/dist/presets.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as omitUndefined } from "./v3-engine-
|
|
1
|
+
import { q as omitUndefined } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
2
|
import { n as defuOverrideArray, o as resolveUniUtsPlatform } from "./utils-DsaS975I.mjs";
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-DWtPieNE.mjs";
|
|
4
4
|
import { t as logger } from "./logger-BNzxZbZj.mjs";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import path from "node:path";
|