weapp-tailwindcss 5.0.0-next.1 → 5.0.0-next.3

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.
Files changed (44) hide show
  1. package/dist/bundlers/shared/generator-css.d.ts +3 -1
  2. package/dist/bundlers/vite/css-finalizer.d.ts +3 -0
  3. package/dist/bundlers/vite/generate-bundle.d.ts +14 -1
  4. package/dist/bundlers/vite/source-candidates.d.ts +15 -0
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.mjs +1 -1
  7. package/dist/core.js +1 -1
  8. package/dist/core.mjs +1 -1
  9. package/dist/generator/options.d.ts +2 -0
  10. package/dist/generator/types.d.ts +1 -0
  11. package/dist/generator-Y-Ikv4Fu.mjs +1177 -0
  12. package/dist/{generator-css-DhPFjSzK.mjs → generator-css-Bwy_Uz89.mjs} +72 -32
  13. package/dist/{generator-css-CnYjiMrD.js → generator-css-CRLrHW4F.js} +72 -32
  14. package/dist/{generator-CZ-JXw6T.js → generator-mmhXzZnv.js} +797 -13
  15. package/dist/generator.js +1 -1
  16. package/dist/generator.mjs +1 -1
  17. package/dist/gulp.js +4 -5
  18. package/dist/gulp.mjs +4 -5
  19. package/dist/index.js +3 -3
  20. package/dist/index.mjs +3 -3
  21. package/dist/{loader-anchors-DvwgIYdA.mjs → loader-anchors-1MumTAtA.mjs} +2 -2
  22. package/dist/{loader-anchors-cprm4Klq.js → loader-anchors-TrFvT6g1.js} +1 -1
  23. package/dist/postcss.js +3 -1
  24. package/dist/postcss.mjs +3 -1
  25. package/dist/{recorder-rn_2v_nd.js → recorder-GdTJ3QqX.js} +1 -1
  26. package/dist/{recorder-B_XyZ576.mjs → recorder-XdFvVASS.mjs} +1 -1
  27. package/dist/tailwindcss/v4-engine/candidates.d.ts +2 -0
  28. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +1 -0
  29. package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +1 -0
  30. package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +1 -0
  31. package/dist/tailwindcss/v4-engine/tailwind-v4-default-colors.d.ts +1 -0
  32. package/dist/tailwindcss/v4-engine/types.d.ts +2 -0
  33. package/dist/{vite-C8JlHiyR.mjs → vite-BDywuCjn.mjs} +409 -163
  34. package/dist/{vite-BHpAqldo.js → vite-DgRh_GXn.js} +405 -158
  35. package/dist/vite.js +1 -1
  36. package/dist/vite.mjs +1 -1
  37. package/dist/{webpack-DNIJ0ysE.js → webpack-CAJR4hhP.js} +3 -3
  38. package/dist/{webpack-CABjKGGQ.mjs → webpack-CiHqVZTg.mjs} +3 -3
  39. package/dist/webpack.js +1 -1
  40. package/dist/webpack.mjs +1 -1
  41. package/dist/webpack4.js +3 -3
  42. package/dist/webpack4.mjs +3 -3
  43. package/package.json +5 -8
  44. package/dist/generator-Dwxgra97.mjs +0 -399
@@ -30,7 +30,9 @@ export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boole
30
30
  export declare function inheritLegacyUnitConvertedDeclarations(css: string, legacyCss: string): string;
31
31
  export declare function removeTailwindSourceDirectives(rawSource: string): string;
32
32
  export declare function hasTailwindSourceDirectives(rawSource: string): boolean;
33
- export declare function resolveCssEntrySource(rawSource: string, base: string): {
33
+ export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
34
+ removeConfig?: boolean;
35
+ }): {
34
36
  css: string;
35
37
  config: string | undefined;
36
38
  configRequest: string | undefined;
@@ -14,6 +14,9 @@ interface CssFinalizerContext {
14
14
  getResolvedConfig: () => ResolvedConfig | undefined;
15
15
  recordCssAssetResult?: (file: string, css: string) => void;
16
16
  getRecordedGeneratorCandidates?: () => Set<string> | undefined;
17
+ getSourceCandidates?: () => Set<string>;
18
+ waitForSourceCandidateSyncs?: () => Promise<void>;
19
+ rememberMainCssSource?: (file: string, rawSource: string) => void;
17
20
  }
18
21
  export declare function createViteCssFinalizerOutputPlugin(context: CssFinalizerContext): Plugin;
19
22
  export {};
@@ -14,7 +14,20 @@ interface GenerateBundleContext {
14
14
  getResolvedConfig: () => ResolvedConfig | undefined;
15
15
  markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
16
16
  recordCssAssetResult?: (file: string, css: string) => void;
17
+ getSourceCandidates?: () => Set<string>;
18
+ waitForSourceCandidateSyncs?: () => Promise<void>;
19
+ rememberMainCssSource?: (file: string, rawSource: string, cssRuntimeSignature: string) => void;
20
+ getRememberedMainCssSources?: () => Map<string, string>;
21
+ getRememberedMainCssSignature?: (file: string) => string | undefined;
22
+ setRememberedMainCssSignature?: (file: string, cssRuntimeSignature: string) => void;
17
23
  recordGeneratorCandidates?: (candidates: Set<string>) => void;
18
24
  }
19
- export declare function createGenerateBundleHook(context: GenerateBundleContext): (_opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
25
+ interface GenerateBundleThis {
26
+ emitFile?: (emittedFile: {
27
+ type: 'asset';
28
+ fileName: string;
29
+ source: string;
30
+ }) => string;
31
+ }
32
+ export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
20
33
  export {};
@@ -0,0 +1,15 @@
1
+ export interface SourceCandidateCollector {
2
+ sync: (id: string, source: string) => Promise<void>;
3
+ syncFile: (id: string) => Promise<void>;
4
+ scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
5
+ remove: (id: string) => void;
6
+ values: () => Set<string>;
7
+ clear: () => void;
8
+ }
9
+ interface ScanSourceCandidateRootOptions {
10
+ root: string;
11
+ outDir?: string;
12
+ }
13
+ export declare function isSourceCandidateRequest(id: string): boolean;
14
+ export declare function createSourceCandidateCollector(): SourceCandidateCollector;
15
+ export {};
package/dist/cli.js CHANGED
@@ -156,7 +156,7 @@ function getRecordFileCandidates(baseDir) {
156
156
  }
157
157
  //#endregion
158
158
  //#region package.json
159
- var version = "5.0.0-next.1";
159
+ var version = "5.0.0-next.3";
160
160
  //#endregion
161
161
  //#region src/constants.ts
162
162
  const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^20.19.0 || >=22.12.0";
package/dist/cli.mjs CHANGED
@@ -127,7 +127,7 @@ function getRecordFileCandidates(baseDir) {
127
127
  }
128
128
  //#endregion
129
129
  //#region package.json
130
- var version = "5.0.0-next.1";
130
+ var version = "5.0.0-next.3";
131
131
  //#endregion
132
132
  //#region src/constants.ts
133
133
  const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^20.19.0 || >=22.12.0";
package/dist/core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-8l464Juk.js");
3
- const require_recorder = require("./recorder-rn_2v_nd.js");
3
+ const require_recorder = require("./recorder-GdTJ3QqX.js");
4
4
  let node_process = require("node:process");
5
5
  node_process = require_chunk.__toESM(node_process);
6
6
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder } from "./recorder-B_XyZ576.mjs";
1
+ import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder } from "./recorder-XdFvVASS.mjs";
2
2
  import process from "node:process";
3
3
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
4
4
  //#region src/core.ts
@@ -5,11 +5,13 @@ export interface WeappTailwindcssGeneratorOptions {
5
5
  mode?: WeappTailwindcssGeneratorMode;
6
6
  target?: WeappTailwindcssGeneratorTarget;
7
7
  styleOptions?: Partial<IStyleHandlerOptions>;
8
+ tailwindcssV3Compatibility?: boolean;
8
9
  }
9
10
  export type WeappTailwindcssGeneratorUserOptions = boolean | WeappTailwindcssGeneratorOptions;
10
11
  export interface NormalizedWeappTailwindcssGeneratorOptions {
11
12
  mode: WeappTailwindcssGeneratorMode;
12
13
  target: WeappTailwindcssGeneratorTarget;
13
14
  styleOptions?: Partial<IStyleHandlerOptions>;
15
+ tailwindcssV3Compatibility: boolean;
14
16
  }
15
17
  export declare function normalizeWeappTailwindcssGeneratorOptions(options: WeappTailwindcssGeneratorUserOptions | undefined): NormalizedWeappTailwindcssGeneratorOptions;
@@ -8,6 +8,7 @@ export type TailwindResolvedSource = TailwindV3ResolvedSource | TailwindV4Resolv
8
8
  export interface WeappTailwindcssGenerateOptions extends Omit<TailwindV3GenerateOptions & TailwindV4GenerateOptions, 'target'> {
9
9
  target?: WeappTailwindcssGeneratorTarget;
10
10
  styleOptions?: Partial<IStyleHandlerOptions>;
11
+ tailwindcssV3Compatibility?: boolean;
11
12
  }
12
13
  export type WeappTailwindcssGenerateResult = (TailwindV3GenerateResult | TailwindV4GenerateResult) & {
13
14
  target: WeappTailwindcssGeneratorTarget;