weapp-tailwindcss 5.5.3 → 5.5.5

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 (59) hide show
  1. package/dist/compiler/cache-telemetry.d.ts +30 -0
  2. package/dist/compiler/candidate-index.d.ts +3 -0
  3. package/dist/compiler/capabilities.d.ts +37 -0
  4. package/dist/compiler/events.d.ts +38 -1
  5. package/dist/compiler/index.d.ts +2 -0
  6. package/dist/compiler/runtime-state.d.ts +2 -1
  7. package/dist/{compiler-DMPaUcH6.cjs → compiler-Cc0JXfbw.cjs} +40096 -16978
  8. package/dist/{compiler-C9X5Afn4.js → compiler-D_vxtEdw.js} +70 -22
  9. package/dist/core/compiler/types.d.ts +2 -0
  10. package/dist/core.cjs +57 -8
  11. package/dist/core.d.ts +3 -0
  12. package/dist/core.js +56 -7
  13. package/dist/{css-imports-DXplvodk.cjs → css-imports-FRZwX4P6.cjs} +1 -1
  14. package/dist/{generator-BoZIiZD5.cjs → generator-BdSIvFEO.cjs} +86 -56
  15. package/dist/{generator-C2aWns8n.js → generator-CAOx1Sqm.js} +86 -56
  16. package/dist/generator.cjs +1 -1
  17. package/dist/generator.js +1 -1
  18. package/dist/{gulp-COAAztkm.js → gulp-B1mPTMqw.js} +14 -4
  19. package/dist/{gulp-D50z06nw.cjs → gulp-Dnt8VL8D.cjs} +16 -6
  20. package/dist/gulp.cjs +1 -1
  21. package/dist/gulp.js +1 -1
  22. package/dist/{hmr-timing-DK0MJKpl.cjs → hmr-timing-qpX410qU.cjs} +4 -4
  23. package/dist/{hmr-timing-CTk1uZr9.js → hmr-timing-wAt0LavM.js} +3 -3
  24. package/dist/index.cjs +4 -4
  25. package/dist/index.js +4 -4
  26. package/dist/{pipeline-helpers-BzjYXNTa.cjs → pipeline-helpers-BHagysZY.cjs} +3 -3
  27. package/dist/postcss.cjs +1 -1
  28. package/dist/postcss.js +1 -1
  29. package/dist/presets.cjs +2 -2
  30. package/dist/presets.js +2 -2
  31. package/dist/rspack.cjs +2 -2
  32. package/dist/rspack.js +2 -2
  33. package/dist/{runtime-state-BBQcA0n5.cjs → runtime-state-XYSycuGu.cjs} +6 -0
  34. package/dist/{scoped-generator-C21A7fis.js → scoped-generator-BqxVxNp9.js} +3 -3
  35. package/dist/{scoped-generator-CTkuf9Ae.cjs → scoped-generator-CtetE5rm.cjs} +3 -3
  36. package/dist/{source-candidate-scan-signature-4mZDDaKT.cjs → source-candidate-scan-signature-BDGB9nKZ.cjs} +2 -2
  37. package/dist/{source-candidate-scan-signature-BB5DfjO2.js → source-candidate-scan-signature-Lm32zKVA.js} +2 -2
  38. package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +1 -0
  39. package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +6 -0
  40. package/dist/{tailwindcss-Bji4u8In.cjs → tailwindcss-9e6ZuYgS.cjs} +1 -1
  41. package/dist/{tailwindcss-c4PkOe1F.js → tailwindcss-DTV9MoJT.js} +1 -1
  42. package/dist/{transform-DmLonqPE.js → transform-BbbZvFQq.js} +3 -3
  43. package/dist/{transform-Cy0ddBWf.cjs → transform-D21f8Dm8.cjs} +3 -3
  44. package/dist/{v4-generation-core-DQeiq-g1.cjs → v4-generation-core-DJBWZ_D0.cjs} +3 -3
  45. package/dist/vite/web.cjs +1 -1
  46. package/dist/vite/web.js +1 -1
  47. package/dist/{vite-OG66oLpb.cjs → vite-CaH7WjX6.cjs} +9 -9
  48. package/dist/{vite-CaUxtQx5.js → vite-CuYntLZP.js} +8 -8
  49. package/dist/vite.cjs +1 -1
  50. package/dist/vite.js +1 -1
  51. package/dist/weapp-tw-css-generation-loader.cjs +2 -2
  52. package/dist/weapp-tw-css-import-rewrite-loader.cjs +6 -6
  53. package/dist/{web-CZKIefdl.cjs → web-CYs2Kcaa.cjs} +53 -16
  54. package/dist/{web-Bd-9OHFE.js → web-CdXkY_VO.js} +50 -13
  55. package/dist/{webpack-DJGgU27Y.cjs → webpack-BQNnpQPC.cjs} +19 -9
  56. package/dist/{webpack-Cyvq3H7Z.js → webpack-BnCSOUuu.js} +16 -6
  57. package/dist/webpack.cjs +1 -1
  58. package/dist/webpack.js +1 -1
  59. package/package.json +4 -4
@@ -0,0 +1,30 @@
1
+ export type CacheInvalidationReason = 'source-change' | 'config-change' | 'runtime-change' | 'platform-change' | 'manual-clear' | 'capacity-eviction';
2
+ export interface CacheTelemetry {
3
+ layer: 'source-scan' | 'candidate-index' | 'tailwind-generation' | 'postcss-result' | 'asset-emission';
4
+ keyFingerprint: string;
5
+ hit: boolean;
6
+ invalidationReason?: CacheInvalidationReason;
7
+ evicted?: boolean;
8
+ entries?: number;
9
+ memoryBytes?: number;
10
+ revision?: number;
11
+ operationId?: string;
12
+ }
13
+ export interface CacheTelemetryCollector {
14
+ record: (entry: CacheTelemetry) => void;
15
+ snapshot: () => readonly CacheTelemetry[];
16
+ clear: () => void;
17
+ hitRate: (layer?: CacheTelemetry['layer']) => number;
18
+ summary: (layer?: CacheTelemetry['layer']) => readonly CacheTelemetrySummary[];
19
+ }
20
+ export interface CacheTelemetrySummary {
21
+ layer: CacheTelemetry['layer'];
22
+ samples: number;
23
+ hits: number;
24
+ misses: number;
25
+ invalidations: number;
26
+ evictions: number;
27
+ entries: number;
28
+ memoryBytes: number;
29
+ }
30
+ export declare function createCacheTelemetryCollector(): CacheTelemetryCollector;
@@ -1,6 +1,9 @@
1
+ import type { CacheTelemetryCollector } from './cache-telemetry.js';
1
2
  import type { CandidateChange } from './types.js';
2
3
  export declare class CandidateIndex {
4
+ private readonly telemetry?;
3
5
  private readonly candidatesBySource;
6
+ constructor(telemetry?: CacheTelemetryCollector | undefined);
4
7
  sync(sourceId: string, candidates: Iterable<string>): CandidateChange;
5
8
  remove(sourceId: string): CandidateChange;
6
9
  values(): Set<string>;
@@ -0,0 +1,37 @@
1
+ import type { CompilationDiagnosticEvent, CompilationEventListener } from './events.js';
2
+ export type AdapterCapability = 'compilerHost' | 'sourceCandidates' | 'cssGeneration' | 'assetEmission' | 'watchUpdate' | 'diagnostics';
3
+ export interface AdapterCapabilities {
4
+ adapter: string;
5
+ version: string;
6
+ capabilities: readonly AdapterCapability[];
7
+ }
8
+ export declare function createAdapterCapabilities(adapter: string, overrides?: Partial<AdapterCapabilities>): AdapterCapabilities;
9
+ export declare const BUILTIN_ADAPTER_CAPABILITIES: {
10
+ readonly vite: AdapterCapabilities;
11
+ readonly webpack: AdapterCapabilities;
12
+ readonly rspack: AdapterCapabilities;
13
+ readonly gulp: AdapterCapabilities;
14
+ };
15
+ export interface CompilerHost {
16
+ readonly id: string;
17
+ readonly capabilities: AdapterCapabilities;
18
+ revision: number;
19
+ dispose: () => void;
20
+ }
21
+ export interface SourceCandidateProvider {
22
+ scan: (sourceId: string, source: string) => Promise<ReadonlySet<string>> | ReadonlySet<string>;
23
+ }
24
+ export interface CssGenerator {
25
+ generate: (candidates: ReadonlySet<string>) => Promise<string> | string;
26
+ }
27
+ export interface AssetEmitter {
28
+ emit: (assetId: string, content: string) => Promise<void> | void;
29
+ }
30
+ export interface WatchUpdateHandler {
31
+ update: (sourceId: string, source: string) => Promise<void> | void;
32
+ }
33
+ export interface DiagnosticReporter {
34
+ report: CompilationEventListener;
35
+ }
36
+ export declare function missingCapabilities(actual: AdapterCapabilities, required: readonly AdapterCapability[]): AdapterCapability[];
37
+ export declare function createCapabilityDiagnostic(capabilities: AdapterCapabilities, required: readonly AdapterCapability[]): CompilationDiagnosticEvent | undefined;
@@ -1,4 +1,30 @@
1
- export type CompilationEvent = {
1
+ export declare const COMPILATION_EVENT_SCHEMA_VERSION = 1;
2
+ export interface CompilationDiagnosticEvent {
3
+ schemaVersion: typeof COMPILATION_EVENT_SCHEMA_VERSION;
4
+ type: 'diagnostic';
5
+ timestamp: string;
6
+ projectId?: string;
7
+ compilerId?: string;
8
+ adapter?: string;
9
+ phase: 'scan' | 'candidate' | 'generate' | 'postcss' | 'emit' | 'hmr';
10
+ revision?: number;
11
+ operationId?: string;
12
+ durationMs?: number;
13
+ cache?: {
14
+ hit: boolean;
15
+ key?: string;
16
+ reason?: string;
17
+ };
18
+ moduleId?: string;
19
+ sourceId?: string;
20
+ error?: {
21
+ name?: string;
22
+ message: string;
23
+ stack?: string;
24
+ };
25
+ evidence?: string[];
26
+ }
27
+ export type CompilationEvent = CompilationDiagnosticEvent | {
2
28
  type: 'source-updated';
3
29
  id: string;
4
30
  source: string;
@@ -29,4 +55,15 @@ export interface CompilationEventBus {
29
55
  subscribe: (listener: CompilationEventListener) => () => void;
30
56
  clear: () => void;
31
57
  }
58
+ export interface CompilationEventReporter {
59
+ readonly events: readonly CompilationEvent[];
60
+ collect: CompilationEventListener;
61
+ toJSONL: () => string;
62
+ summarize: () => string;
63
+ clear: () => void;
64
+ }
65
+ export declare function createCompilationEventReporter(): CompilationEventReporter;
66
+ export declare function redactCompilationPath(value: string, root?: string): string;
67
+ export declare function serializeCompilationEvent(event: CompilationEvent): string;
68
+ export declare function summarizeCompilationEvents(events: readonly CompilationEvent[]): string;
32
69
  export declare function createCompilationEventBus(): CompilationEventBus;
@@ -1,5 +1,7 @@
1
1
  export * from './artifact.js';
2
+ export * from './cache-telemetry.js';
2
3
  export * from './candidate-index.js';
4
+ export * from './capabilities.js';
3
5
  export * from './compilation-change-coordinator.js';
4
6
  export * from './compilation-scope-graph.js';
5
7
  export * from './compilation-session-pool.js';
@@ -1,4 +1,4 @@
1
- import type { CompilationEventBus } from './events.js';
1
+ import type { CompilationEventBus, CompilationEventListener } from './events.js';
2
2
  import type { RefreshTailwindcssRuntimeOptions, TailwindcssRuntimeLike } from '../types/index.js';
3
3
  export interface CompilerRuntimeState {
4
4
  tailwindRuntime: TailwindcssRuntimeLike;
@@ -13,5 +13,6 @@ export interface CreateCompilerRuntimeStateOptions {
13
13
  readyPromise?: Promise<void>;
14
14
  refreshTailwindcssRuntime: (options?: RefreshTailwindcssRuntimeOptions) => Promise<TailwindcssRuntimeLike>;
15
15
  events?: CompilationEventBus;
16
+ reporter?: CompilationEventListener;
16
17
  }
17
18
  export declare function createCompilerRuntimeState(options: CreateCompilerRuntimeStateOptions): CompilerRuntimeState;