tailwind-styled-v4 5.0.36 → 5.0.37

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 (69) hide show
  1. package/dist/analyzer.d.mts +152 -5
  2. package/dist/analyzer.d.ts +152 -5
  3. package/dist/animate.d.mts +30 -3
  4. package/dist/animate.d.ts +30 -3
  5. package/dist/compiler.d.mts +5 -0
  6. package/dist/compiler.d.ts +5 -0
  7. package/dist/compiler.js.map +1 -1
  8. package/dist/compiler.mjs.map +1 -1
  9. package/dist/devtools.d.mts +88 -2
  10. package/dist/devtools.d.ts +88 -2
  11. package/dist/engine.d.mts +557 -6
  12. package/dist/engine.d.ts +557 -6
  13. package/dist/engine.js.map +1 -1
  14. package/dist/engine.mjs.map +1 -1
  15. package/dist/index.d.mts +236 -9
  16. package/dist/index.d.ts +236 -9
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/next.js.map +1 -1
  20. package/dist/next.mjs.map +1 -1
  21. package/dist/plugin-api.d.mts +4 -2
  22. package/dist/plugin-api.d.ts +4 -2
  23. package/dist/plugin-registry.js +39 -25
  24. package/dist/plugin-registry.js.map +1 -1
  25. package/dist/plugin-registry.mjs +39 -25
  26. package/dist/plugin-registry.mjs.map +1 -1
  27. package/dist/plugin.d.mts +165 -5
  28. package/dist/plugin.d.ts +165 -5
  29. package/dist/plugin.js +17 -0
  30. package/dist/plugin.js.map +1 -1
  31. package/dist/plugin.mjs +15 -1
  32. package/dist/plugin.mjs.map +1 -1
  33. package/dist/runtime.d.mts +38 -3
  34. package/dist/runtime.d.ts +38 -3
  35. package/dist/scanner.d.mts +58 -4
  36. package/dist/scanner.d.ts +58 -4
  37. package/dist/shared.d.mts +185 -3
  38. package/dist/shared.d.ts +185 -3
  39. package/dist/shared.js.map +1 -1
  40. package/dist/shared.mjs.map +1 -1
  41. package/dist/storybook-addon.d.mts +2 -2
  42. package/dist/storybook-addon.d.ts +2 -2
  43. package/dist/svelte.d.mts +2 -1
  44. package/dist/svelte.d.ts +2 -1
  45. package/dist/theme.d.mts +38 -3
  46. package/dist/theme.d.ts +38 -3
  47. package/dist/turbopackLoader.js.map +1 -1
  48. package/dist/turbopackLoader.mjs.map +1 -1
  49. package/dist/vite.js.map +1 -1
  50. package/dist/vite.mjs.map +1 -1
  51. package/dist/vue.d.mts +4 -1
  52. package/dist/vue.d.ts +4 -1
  53. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  54. package/native/tailwind-styled-native.node +0 -0
  55. package/package.json +1 -1
  56. package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
  57. package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
  58. package/dist/index-DQI6O24n.d.mts +0 -464
  59. package/dist/index-NDINUhLN.d.mts +0 -90
  60. package/dist/index-NDINUhLN.d.ts +0 -90
  61. package/dist/index-UkYbyBkR.d.ts +0 -464
  62. package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
  63. package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
  64. package/dist/schemas-DR-SLxZZ.d.mts +0 -59
  65. package/dist/schemas-DR-SLxZZ.d.ts +0 -59
  66. package/dist/trace-Dz4vmZdy.d.mts +0 -96
  67. package/dist/trace-Dz4vmZdy.d.ts +0 -96
  68. package/dist/types-DXr2PmGP.d.mts +0 -31
  69. package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/shared.d.ts CHANGED
@@ -1,6 +1,99 @@
1
- export { C as CompoundCondition, E as ErrorSource, H as HtmlTagName, L as LRUCache, c as LoadNativeBindingOptions, d as LoadNativeBindingResult, e as Logger, R as ResolveCandidatesOptions, T as TokenMap, f as TwError, V as VariantMatrix, b as VariantProps, a as VariantValue, g as createDebugLogger, h as createLogger, i as formatErrorMessage, j as hashContent, k as isTwError, l as loadNativeBinding, r as resolveNativeBindingCandidates, m as resolveRuntimeDir, w as wrapUnknownError } from './index-NDINUhLN.js';
2
1
  import { z } from 'zod';
3
- export { T as TraceSnapshot, a as TraceSummary, i as calculateHealth, j as createTraceSnapshot, f as formatDuration, b as formatMemory, g as getBuildTimeColor, c as getHealthColor, d as getMemoryColor, e as getModeColor, h as getPipelinePercentages } from './trace-Dz4vmZdy.js';
2
+
3
+ /**
4
+ * Shared trace utilities for CLI, devtools, and dashboard
5
+ *
6
+ * Provides reusable trace snapshot handling, formatting, and analysis
7
+ * across the tailwind-styled-v4 ecosystem without introducing coupling.
8
+ */
9
+ interface TraceSnapshot {
10
+ generatedAt: string;
11
+ buildMs: number | null;
12
+ scanMs: number | null;
13
+ analyzeMs: number | null;
14
+ compileMs: number | null;
15
+ memoryMb: {
16
+ rss: number;
17
+ heapUsed: number;
18
+ heapTotal: number;
19
+ } | null;
20
+ classCount: number | null;
21
+ fileCount: number | null;
22
+ cssBytes: number | null;
23
+ mode: string | null;
24
+ eventsReceived?: number;
25
+ eventsProcessed?: number;
26
+ batchesProcessed?: number;
27
+ incrementalUpdates?: number;
28
+ fullRescans?: number;
29
+ }
30
+ interface TraceSummary {
31
+ workspace: {
32
+ totalPackages: number;
33
+ totalFiles: number;
34
+ totalClasses: number;
35
+ lastScanDurationMs: number;
36
+ lastBuildDurationMs: number;
37
+ };
38
+ cache: {
39
+ hitRate: number;
40
+ totalEntries: number;
41
+ memoryUsageMb: number;
42
+ };
43
+ pipeline: {
44
+ scanDurationMs: number;
45
+ analyzeDurationMs: number;
46
+ compileDurationMs: number;
47
+ totalDurationMs: number;
48
+ };
49
+ health: {
50
+ status: "healthy" | "degraded" | "unhealthy";
51
+ issues: Array<{
52
+ severity: string;
53
+ message: string;
54
+ }>;
55
+ };
56
+ }
57
+ /**
58
+ * Get health status color for UI rendering
59
+ */
60
+ declare function getHealthColor(status?: string): string;
61
+ /**
62
+ * Get mode color for UI rendering
63
+ */
64
+ declare function getModeColor(mode?: string | null): string;
65
+ /**
66
+ * Format memory in human-readable format
67
+ */
68
+ declare function formatMemory(bytes: number): string;
69
+ /**
70
+ * Format duration in human-readable format
71
+ */
72
+ declare function formatDuration(ms: number | null): string;
73
+ /**
74
+ * Calculate health status from metrics
75
+ */
76
+ declare function calculateHealth(metrics: TraceSnapshot, summary?: TraceSummary): "healthy" | "degraded" | "unhealthy";
77
+ /**
78
+ * Get color for build time indicator
79
+ */
80
+ declare function getBuildTimeColor(ms: number | null): string;
81
+ /**
82
+ * Get color for memory usage indicator
83
+ */
84
+ declare function getMemoryColor(mb: number): string;
85
+ /**
86
+ * Create trace snapshot from dashboard data
87
+ */
88
+ declare function createTraceSnapshot(data: Record<string, unknown>): TraceSnapshot;
89
+ /**
90
+ * Calculate pipeline time distribution
91
+ */
92
+ declare function getPipelinePercentages(metrics: TraceSnapshot): {
93
+ scanPct: number;
94
+ analyzePct: number;
95
+ compilePct: number;
96
+ };
4
97
 
5
98
  /**
6
99
  * Error code registry — single source of truth for all error codes.
@@ -748,4 +841,93 @@ declare function appendStaticStateCssToSafelist(srcDir: string, safelistPath: st
748
841
 
749
842
  declare function setGlobalLogFile(filePath: string): void;
750
843
 
751
- export { type BuildPhaseTrace, type BuildPhases, type BuildTelemetry, type BuildTrace, type ClassInspection, type ClassProperty, type ClassUsageLocation, type ComponentCodegenOptions, type DashboardMetrics, type DashboardSummary, ERROR_CODES, type ErrorCode, type GeneratedStateRule, NativeAnalyzerReportSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema, NativeCssCompileResultSchema, type NativeResolutionResult, NativeScanFileSchema, NativeScanResultSchema, NativeTransformResultSchema, NativeWatchResultSchema, type ObservabilityClient, type PackageJson, PackageJsonSchema, type RegistryFile, RegistryFileSchema, type RegistryPluginEntry, RegistryPluginEntrySchema, type ScanCache, type ScanCacheClassEntry, ScanCacheClassEntrySchema, ScanCacheSchema, type StaticStateCssInput, type StaticStateExtractionResult, TW_STATE_STATIC_FILENAME, type TailwindConfig, TailwindConfigSchema, type TailwindInfo, TelemetryCollector, type TelemetrySummary, type TwStateConfigEntry, type WorkerPathOptions, type WorkerPathResult, appendStaticStateCssToSafelist, assertTailwindV4, createBuildTimer, createEsmRequire, createObservabilityClient, detectTailwind, extractStaticStateCss, formatErrorCode, formatNativeNotFoundError, generateBarrelFile, generateClassRenameCodemod, generateComponentCode, generateStorybookStory, getDirname, getFilename, getGlobalTelemetry, getSuggestion, getTailwindVersion, isTailwindV4, parseJsonFileWithSchema, parseJsonWithSchema, parseNative, resetGlobalTelemetry, resolveFromRoot, resolveLoaderPath, resolveNativeBinary, resolveNativeNodePath, resolveWorkerPath, safeParseNative, setGlobalLogFile, tryRequire };
844
+ type TokenMap = Record<string, string>;
845
+ type VariantValue = string | number | boolean | undefined;
846
+ type VariantProps = Record<string, VariantValue>;
847
+ type HtmlTagName = keyof HTMLElementTagNameMap;
848
+ type CompoundCondition = Record<string, string | number | boolean>;
849
+ type VariantMatrix = Record<string, Array<string | number | boolean>>;
850
+ interface Logger {
851
+ warn(...args: unknown[]): void;
852
+ debug(...args: unknown[]): void;
853
+ error(...args: unknown[]): void;
854
+ log(...args: unknown[]): void;
855
+ }
856
+ declare function createLogger(namespace: string): Logger;
857
+ declare function createDebugLogger(namespace: string, label?: string): (msg: string) => void;
858
+ type ErrorSource = "rust" | "validation" | "compile" | "io" | "config" | "unknown";
859
+ type ZodLikeIssue = {
860
+ path?: readonly PropertyKey[];
861
+ message?: string;
862
+ };
863
+ declare class TwError extends Error {
864
+ /** @deprecated Gunakan source */
865
+ readonly domain: string;
866
+ readonly source: ErrorSource;
867
+ readonly code: string;
868
+ readonly originalCause?: unknown;
869
+ constructor(domainOrSource: string, code: string, message: string, cause?: unknown);
870
+ static fromIo(code: string, message: string): TwError;
871
+ static fromCompile(code: string, message: string): TwError;
872
+ static fromRust(err: {
873
+ code?: string;
874
+ message?: string;
875
+ } | Error | unknown): TwError;
876
+ /** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
877
+ static fromZod(err: {
878
+ issues?: ZodLikeIssue[];
879
+ errors?: ZodLikeIssue[];
880
+ }): TwError;
881
+ static wrap(source: string, code: string, err: unknown): TwError;
882
+ toString(): string;
883
+ toJSON(): {
884
+ name: string;
885
+ source: string;
886
+ code: string;
887
+ message: string;
888
+ };
889
+ toCliMessage(): string;
890
+ }
891
+ declare function wrapUnknownError(domain: string, code: string, error: unknown): TwError;
892
+ declare function isTwError(err: unknown): err is TwError;
893
+ interface LoadNativeBindingOptions<T> {
894
+ runtimeDir: string;
895
+ candidates: string[];
896
+ isValid: (module: unknown) => module is T;
897
+ invalidExportMessage: string;
898
+ }
899
+ interface LoadNativeBindingResult<T> {
900
+ binding: T | null;
901
+ loadErrors: Array<{
902
+ path: string;
903
+ message: string;
904
+ }>;
905
+ loadedPath?: string;
906
+ }
907
+ declare function loadNativeBinding<T>(options: LoadNativeBindingOptions<T>): LoadNativeBindingResult<T>;
908
+ interface ResolveCandidatesOptions {
909
+ runtimeDir?: string;
910
+ envVarNames?: string[];
911
+ includeDefaultCandidates?: boolean;
912
+ enforceNodeExtensionForEnvPath?: boolean;
913
+ /** @deprecated — ignored, kept for backward compat */
914
+ packageName?: string;
915
+ }
916
+ declare function resolveNativeBindingCandidates(options: ResolveCandidatesOptions): string[];
917
+ declare function resolveRuntimeDir(dir: string | undefined, importMetaUrl: string): string;
918
+ declare function hashContent(content: string, algorithm?: string, length?: number): string;
919
+ declare function formatErrorMessage(error: unknown): string;
920
+ declare class LRUCache<K, V> {
921
+ private capacity;
922
+ private cache;
923
+ constructor(capacity: number);
924
+ get(key: K): V | undefined;
925
+ set(key: K, value: V): void;
926
+ delete(key: K): boolean;
927
+ has(key: K): boolean;
928
+ clear(): void;
929
+ entries(): IterableIterator<[K, V]>;
930
+ get size(): number;
931
+ }
932
+
933
+ export { type BuildPhaseTrace, type BuildPhases, type BuildTelemetry, type BuildTrace, type ClassInspection, type ClassProperty, type ClassUsageLocation, type ComponentCodegenOptions, type CompoundCondition, type DashboardMetrics, type DashboardSummary, ERROR_CODES, type ErrorCode, type ErrorSource, type GeneratedStateRule, type HtmlTagName, LRUCache, type LoadNativeBindingOptions, type LoadNativeBindingResult, type Logger, NativeAnalyzerReportSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema, NativeCssCompileResultSchema, type NativeResolutionResult, NativeScanFileSchema, NativeScanResultSchema, NativeTransformResultSchema, NativeWatchResultSchema, type ObservabilityClient, type PackageJson, PackageJsonSchema, type RegistryFile, RegistryFileSchema, type RegistryPluginEntry, RegistryPluginEntrySchema, type ResolveCandidatesOptions, type ScanCache, type ScanCacheClassEntry, ScanCacheClassEntrySchema, ScanCacheSchema, type StaticStateCssInput, type StaticStateExtractionResult, TW_STATE_STATIC_FILENAME, type TailwindConfig, TailwindConfigSchema, type TailwindInfo, TelemetryCollector, type TelemetrySummary, type TokenMap, type TraceSnapshot, type TraceSummary, TwError, type TwStateConfigEntry, type VariantMatrix, type VariantProps, type VariantValue, type WorkerPathOptions, type WorkerPathResult, appendStaticStateCssToSafelist, assertTailwindV4, calculateHealth, createBuildTimer, createDebugLogger, createEsmRequire, createLogger, createObservabilityClient, createTraceSnapshot, detectTailwind, extractStaticStateCss, formatDuration, formatErrorCode, formatErrorMessage, formatMemory, formatNativeNotFoundError, generateBarrelFile, generateClassRenameCodemod, generateComponentCode, generateStorybookStory, getBuildTimeColor, getDirname, getFilename, getGlobalTelemetry, getHealthColor, getMemoryColor, getModeColor, getPipelinePercentages, getSuggestion, getTailwindVersion, hashContent, isTailwindV4, isTwError, loadNativeBinding, parseJsonFileWithSchema, parseJsonWithSchema, parseNative, resetGlobalTelemetry, resolveFromRoot, resolveLoaderPath, resolveNativeBinary, resolveNativeBindingCandidates, resolveNativeNodePath, resolveRuntimeDir, resolveWorkerPath, safeParseNative, setGlobalLogFile, tryRequire, wrapUnknownError };