tailwind-styled-v4 5.0.4 → 5.0.6-canary.0

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 (89) hide show
  1. package/CHANGELOG.md +136 -37
  2. package/README.md +2 -2
  3. package/dist/analyzer.d.ts +1 -0
  4. package/dist/analyzer.js +14 -0
  5. package/dist/analyzer.js.map +1 -0
  6. package/dist/animate.d.ts +1 -0
  7. package/dist/animate.js +14 -0
  8. package/dist/animate.js.map +1 -0
  9. package/dist/atomic.d.ts +1 -0
  10. package/dist/atomic.js +14 -0
  11. package/dist/atomic.js.map +1 -0
  12. package/dist/cli.d.ts +1 -0
  13. package/dist/cli.js +14 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/compiler.d.ts +1 -0
  16. package/dist/compiler.js +14 -0
  17. package/dist/compiler.js.map +1 -0
  18. package/dist/dashboard.d.ts +1 -0
  19. package/dist/dashboard.js +14 -0
  20. package/dist/dashboard.js.map +1 -0
  21. package/dist/devtools.d.ts +1 -0
  22. package/dist/devtools.js +14 -0
  23. package/dist/devtools.js.map +1 -0
  24. package/dist/engine.d.ts +1 -0
  25. package/dist/engine.js +14 -0
  26. package/dist/engine.js.map +1 -0
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +14 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/next.d.ts +1 -0
  31. package/dist/next.js +14 -0
  32. package/dist/next.js.map +1 -0
  33. package/dist/plugin-api.d.mts +11 -4
  34. package/dist/plugin-api.d.ts +137 -0
  35. package/dist/plugin-api.js +14002 -0
  36. package/dist/plugin-api.js.map +1 -0
  37. package/dist/plugin-api.mjs +18 -2
  38. package/dist/plugin-api.mjs.map +1 -1
  39. package/dist/plugin-registry.d.ts +1 -0
  40. package/dist/plugin-registry.js +14 -0
  41. package/dist/plugin-registry.js.map +1 -0
  42. package/dist/plugin.d.ts +1 -0
  43. package/dist/plugin.js +14 -0
  44. package/dist/plugin.js.map +1 -0
  45. package/dist/preset.d.ts +1 -0
  46. package/dist/preset.js +14 -0
  47. package/dist/preset.js.map +1 -0
  48. package/dist/rspack.d.ts +1 -0
  49. package/dist/rspack.js +14 -0
  50. package/dist/rspack.js.map +1 -0
  51. package/dist/runtime-css.d.ts +1 -0
  52. package/dist/runtime-css.js +14 -0
  53. package/dist/runtime-css.js.map +1 -0
  54. package/dist/runtime.d.ts +1 -0
  55. package/dist/runtime.js +14 -0
  56. package/dist/runtime.js.map +1 -0
  57. package/dist/scanner.d.ts +1 -0
  58. package/dist/scanner.js +14 -0
  59. package/dist/scanner.js.map +1 -0
  60. package/dist/shared.d.ts +1 -0
  61. package/dist/shared.js +14 -0
  62. package/dist/shared.js.map +1 -0
  63. package/dist/storybook-addon.d.ts +1 -0
  64. package/dist/storybook-addon.js +14 -0
  65. package/dist/storybook-addon.js.map +1 -0
  66. package/dist/svelte.d.ts +1 -0
  67. package/dist/svelte.js +14 -0
  68. package/dist/svelte.js.map +1 -0
  69. package/dist/syntax.d.ts +4 -0
  70. package/dist/syntax.js +92 -0
  71. package/dist/syntax.js.map +1 -0
  72. package/dist/syntax.mjs +7 -0
  73. package/dist/syntax.mjs.map +1 -1
  74. package/dist/testing.d.ts +1 -0
  75. package/dist/testing.js +14 -0
  76. package/dist/testing.js.map +1 -0
  77. package/dist/theme.d.ts +1 -0
  78. package/dist/theme.js +14 -0
  79. package/dist/theme.js.map +1 -0
  80. package/dist/tw.d.ts +1 -0
  81. package/dist/tw.js +7 -0
  82. package/dist/tw.js.map +1 -0
  83. package/dist/vite.d.ts +1 -0
  84. package/dist/vite.js +14 -0
  85. package/dist/vite.js.map +1 -0
  86. package/dist/vue.d.ts +1 -0
  87. package/dist/vue.js +14 -0
  88. package/dist/vue.js.map +1 -0
  89. package/package.json +59 -34
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.5.0-alpha.1] - 2026-04-18
4
+
5
+ ### 🚀 Performance (Rust Native)
6
+
7
+ - **10x faster** variant resolution via `resolve_variants` in Rust
8
+ - **20-50x faster** class deduplication via `normalizeAndDedupClasses` in Rust
9
+ - **30x faster** class parsing via `parseClasses` in Rust
10
+
11
+ ### 🛡️ Reliability System
12
+
13
+ - Health check monitoring for native bridge
14
+ - Auto-fallback with exponential backoff
15
+ - Telemetry with Prometheus/JSON/Console exporters
16
+ - Clear error messages if native binary missing
17
+
18
+ ### 🧪 Testing & Quality
19
+
20
+ - Integration tests for all core functions
21
+ - Unit tests for health check & telemetry
22
+ - Benchmark suite for performance regression
23
+
24
+ ### ⚠️ Breaking Changes
25
+
26
+ - **JS fallbacks removed** - Native binary is now required
27
+ - Run `npx tw setup` after installation
28
+
29
+ ### 📊 Benchmark Results
30
+
31
+ | Operation | v4.4 (JS) | v4.5 (Rust) | Improvement |
32
+ |-----------|-----------|-------------|-------------|
33
+ | Variant resolution | 0.52ms | 0.048ms | **10.8x** |
34
+ | Class deduplication | 2.1ms | 0.09ms | **23.3x** |
35
+ | Class parsing | 3.0ms | 0.10ms | **30x** |
36
+
37
+ ---
38
+
3
39
  ## v4.5.0 — Sprint 6–10 Platform Overhaul (2026-03-21)
4
40
 
5
41
  ### Sprint 6 — Error Handling & Logging
@@ -8,15 +44,15 @@
8
44
  - `cache_read` return type diubah dari `CacheReadResult` → `napi::Result<CacheReadResult>` — error file tidak bisa dibaca sekarang dipropagasi ke JS dengan pesan deskriptif
9
45
  - `scan_workspace` sudah return `napi::Result` — error directory tidak ditemukan langsung dilempar ke JS
10
46
 
11
- #### Scanner (`packages/scanner/src/index.ts`)
47
+ #### Scanner (`packages/domain/scanner/src/index.ts`)
12
48
  - Hapus `debugScanner()` dan `isDebugEnabled()` yang tersebar — ganti dengan `createLogger("scanner")` dari `@tailwind-styled/shared`
13
49
  - Cache HIT/MISS/write-fail sekarang semua melalui `log.debug()` — terkontrol via `TWS_LOG_LEVEL`
14
50
 
15
- #### Engine (`packages/engine/src/index.ts`)
51
+ #### Engine (`packages/domain/engine/src/index.ts`)
16
52
  - Plugin `onError` hook dipanggil sebelum error dipropagasi — plugin tidak bisa crash engine
17
53
  - `watch()` emit event `{ type: "error" }` saat watcher atau transform gagal
18
54
 
19
- #### Shared Logger (`packages/shared/src/logger.ts`)
55
+ #### Shared Logger (`packages/domain/shared/src/logger.ts`)
20
56
  - Sudah support `TWS_LOG_LEVEL=debug|info|warn|error|silent`
21
57
  - `TWS_DEBUG_SCANNER=1` sebagai shorthand untuk debug scanner
22
58
 
@@ -24,17 +60,17 @@
24
60
 
25
61
  ### Sprint 7 — Platform Adapters
26
62
 
27
- #### Next.js (`packages/next/tsup.config.ts`)
63
+ #### Next.js (`packages/presentation/next/tsup.config.ts`)
28
64
  - Hapus `@tailwind-styled/compiler` dan `@tailwind-styled/plugin` dari `external`
29
65
  - Tambah `noExternal` agar compiler di-bundle inline ke adapter
30
66
  - `esbuildOptions` skip `*.node` native binaries Tailwind v4
31
67
 
32
- #### Vite (`packages/vite/tsup.config.ts`, `src/plugin.ts`)
68
+ #### Vite (`packages/presentation/vite/tsup.config.ts`, `src/plugin.ts`)
33
69
  - Hapus `@tailwind-styled/compiler`, `engine`, `scanner` dari `external`
34
70
  - Tambah `noExternal` untuk semua internal packages
35
71
  - `preserveImports: true` di `loaderOptions` transform hook
36
72
 
37
- #### Rspack (`packages/rspack/tsup.config.ts` — file baru, `src/loader.ts`)
73
+ #### Rspack (`packages/presentation/rspack/tsup.config.ts` — file baru, `src/loader.ts`)
38
74
  - Buat `tsup.config.ts` dari scratch
39
75
  - `noExternal: ["@tailwind-styled/compiler"]`
40
76
  - `preserveImports: true` di `runLoaderTransform` call
@@ -47,37 +83,37 @@
47
83
 
48
84
  ### Sprint 8 — Developer Tooling
49
85
 
50
- #### CLI (`packages/cli/src/analyze.ts`, `src/stats.ts`)
86
+ #### CLI (`packages/infrastructure/cli/src/analyze.ts`, `src/stats.ts`)
51
87
  - Suppress `console.log("Analyzing...")` saat `--json` aktif — output JSON sekarang clean parseable
52
88
  - `tw analyze --json` dan `tw stats --json` bisa di-pipe ke tools lain
53
89
 
54
- #### DevTools (`packages/devtools/src/index.tsx`)
90
+ #### DevTools (`packages/infrastructure/devtools/src/index.tsx`)
55
91
  - Hapus tombol "Run Rust Workspace Scan" — tidak bisa jalan di browser environment
56
92
  - Hapus `getRustAnalyzer()`, `runRustScan`, `rustReport`, `rustScanning`
57
93
  - Ganti dengan panel **Engine Metrics** yang fetch dari `http://localhost:3000/metrics` (dashboard)
58
94
  - Fallback message: "Rust analyzer hanya tersedia via CLI atau dashboard — `tw analyze . | tw dashboard`"
59
95
  - DOM Scan tetap ada dan berfungsi
60
96
 
61
- #### VSCode Extension (`packages/vscode/src/extension.ts`, `scripts/postbuild.cjs`)
97
+ #### VSCode Extension (`packages/infrastructure/vscode/src/extension.ts`, `scripts/postbuild.cjs`)
62
98
  - `startLspServer` cek `dist/lsp.mjs` sebagai kandidat pertama (bundled bersama extension)
63
- - Tambah `packages/vscode/scripts/postbuild.cjs` — copy `scripts/v48/lsp.mjs` ke `dist/lsp.mjs` setiap build
99
+ - Tambah `packages/infrastructure/vscode/scripts/postbuild.cjs` — copy `scripts/v48/lsp.mjs` ke `dist/lsp.mjs` setiap build
64
100
  - `package.json` tambah `"postbuild": "node scripts/postbuild.cjs"`
65
101
 
66
102
  ---
67
103
 
68
104
  ### Sprint 9 — Studio Desktop (Electron)
69
105
 
70
- #### Main Process (`packages/studio-desktop/src/main.js`)
106
+ #### Main Process (`packages/infrastructure/studio-desktop/src/main.js`)
71
107
  - `STUDIO_SCRIPT` sekarang di-resolve via `resolveStudioScript()` — cek `process.resourcesPath` (packaged), `__dirname/../..` (dev), dan `cwd` (fallback)
72
108
  - Engine IPC handlers baru: `engine-scan`, `engine-build`, `engine-watch-start`, `engine-watch-stop`, `engine-reset`
73
109
  - `createEngine` dari `@tailwind-styled/engine` di-lazy-load per project
74
110
  - Engine di-reset otomatis saat `change-project` dipanggil
75
111
  - Engine events di-forward ke renderer via `mainWindow.webContents.send("engine-event")`
76
112
 
77
- #### Preload (`packages/studio-desktop/src/preload.js`)
113
+ #### Preload (`packages/infrastructure/studio-desktop/src/preload.js`)
78
114
  - Ekspos `engineScan`, `engineBuild`, `engineWatchStart`, `engineWatchStop`, `onEngineEvent` ke renderer via `contextBridge`
79
115
 
80
- #### Package (`packages/studio-desktop/package.json`)
116
+ #### Package (`packages/infrastructure/studio-desktop/package.json`)
81
117
  - Tambah `@tailwind-styled/shared` ke dependencies
82
118
  - Script `dev` update dengan fallback message jika Electron belum terinstall
83
119
 
@@ -85,15 +121,15 @@
85
121
 
86
122
  ### Sprint 10 — Testing & Documentation
87
123
 
88
- #### Testing Package (`packages/testing/src/index.ts`)
124
+ #### Testing Package (`packages/domain/testing/src/index.ts`)
89
125
  - Tambah `EngineMetricsSnapshot` interface
90
126
  - Tambah `expectEngineMetrics(metrics, expectations)` — assert minFiles, maxBuildTimeMs, minUniqueClasses, cacheHitRateMin
91
127
  - Tambah `toHaveEngineMetrics(expectations)` — Jest/Vitest custom matcher
92
128
  - Tambah `tailwindMatchersWithMetrics` — combined export semua matchers
93
129
 
94
130
  #### Test Suites Baru
95
- - `packages/testing/test/sprint9-platform.test.mjs` — 23 tests: next/vite/rspack adapter configs, preserveImports, studio-desktop engine IPC
96
- - `packages/testing/test/sprint10-integration.test.mjs` — 28 tests: Sprint 6–8 error handling, logging, engine propagation, DevTools safety, VSCode LSP, metrics matchers
131
+ - `packages/domain/testing/test/sprint9-platform.test.mjs` — 23 tests: next/vite/rspack adapter configs, preserveImports, studio-desktop engine IPC
132
+ - `packages/domain/testing/test/sprint10-integration.test.mjs` — 28 tests: Sprint 6–8 error handling, logging, engine propagation, DevTools safety, VSCode LSP, metrics matchers
97
133
 
98
134
  #### Test Results
99
135
  - Total: **84/86 tests pass**
@@ -123,7 +159,7 @@
123
159
 
124
160
  #### Dashboard & Metrics
125
161
  - `@tailwind-styled/dashboard` — Live metrics server with file-watch IPC. Reads `.tw-cache/metrics.json` written by engine. Real-time HTML UI with build history chart.
126
- - `packages/engine/src/metricsWriter.ts` — Connects engine build results → `.tw-cache/metrics.json` → dashboard.
162
+ - `packages/domain/engine/src/metricsWriter.ts` — Connects engine build results → `.tw-cache/metrics.json` → dashboard.
127
163
 
128
164
  #### Plugin Registry
129
165
  - `@tailwind-styled/plugin-registry` — `tw-plugin search/install/list` CLI. Registry now includes 4 official + 2 community plugins with docs and install commands.
@@ -141,11 +177,11 @@
141
177
  - `tw cluster <init|build|status>` — Real `worker_threads` pool. Distributes file scan across CPU cores. Reports throughput (files/sec).
142
178
 
143
179
  ### Tests Added (Sprint 2)
144
- - `packages/scanner/test/parse-v46.test.mjs` — 20 unit tests for parse pipeline
145
- - `packages/compiler/test/shake-v47.test.mjs` — 10 unit tests for tree shaking
146
- - `packages/vue/test/vue-adapter.test.mjs` — 9 unit tests for Vue cv()
147
- - `packages/svelte/test/svelte-adapter.test.mjs` — 12 unit tests for Svelte cv()/tw()
148
- - `packages/testing/test/testing-utils.test.mjs` — 18 unit tests for testing utilities
180
+ - `packages/domain/scanner/test/parse-v46.test.mjs` — 20 unit tests for parse pipeline
181
+ - `packages/domain/compiler/test/shake-v47.test.mjs` — 10 unit tests for tree shaking
182
+ - `packages/presentation/vue/test/vue-adapter.test.mjs` — 9 unit tests for Vue cv()
183
+ - `packages/presentation/svelte/test/svelte-adapter.test.mjs` — 12 unit tests for Svelte cv()/tw()
184
+ - `packages/domain/testing/test/testing-utils.test.mjs` — 18 unit tests for testing utilities
149
185
  - `examples/integration-test/sprint2.integration.test.mjs` — 9 integration tests (parse→shake pipeline, dashboard HTTP, real-world component patterns)
150
186
 
151
187
  ### Benchmark
@@ -198,7 +234,7 @@
198
234
 
199
235
  ### v4.3 — Command Densification
200
236
  - `tw studio` — sekarang spawn `scripts/v45/studio.mjs` langsung (sebelumnya: `console.log` placeholder)
201
- - `tw dashboard` — direct spawn `packages/dashboard/src/server.mjs` tanpa butuh build (sebelumnya: `npm run dev`)
237
+ - `tw dashboard` — direct spawn `packages/infrastructure/dashboard/src/server.mjs` tanpa butuh build (sebelumnya: `npm run dev`)
202
238
  - `tw storybook` — tanpa `--variants` → launch Storybook dev server via `npx storybook dev`; dengan `--variants` → enumerate JSON (CI mode)
203
239
 
204
240
  ### v4.4 — DX & Quality
@@ -211,21 +247,21 @@
211
247
  - `tw sync figma <pull|push|diff>` — CLI sekarang route subcommand `figma` ke `scripts/v45/figma-sync.mjs`
212
248
  - `tw ai` — multi-provider: `--provider=anthropic|openai|ollama`, `--model=name`, auto-fallback ke Anthropic → static template
213
249
  - `@tailwind-styled/shared` — package baru: `LRUCache` (TTL support), `createLogger`, `hashContent`/`hashFile`, `debounce`/`throttle`, `parseVersion`/`satisfiesMinVersion`
214
- - `packages/compiler` — migrasi `hashFileContent` ke `@tailwind-styled/shared`
250
+ - `packages/domain/compiler` — migrasi `hashFileContent` ke `@tailwind-styled/shared`
215
251
 
216
252
  ### Tests
217
- - `packages/testing/test/v43-v45.test.mjs` — 28 tests covering shared package, audit, AI provider, preflight
253
+ - `packages/domain/testing/test/v43-v45.test.mjs` — 28 tests covering shared package, audit, AI provider, preflight
218
254
 
219
255
  ### v4.2.0 patch (2026-03-16)
220
256
 
221
257
  - `scripts/v49/critical-css.mjs` — upgraded: real CSS rule parsing, `--inline`, `--out=file`, id/tag/class extraction, savedPercent metric
222
258
  - `scripts/v48/lint-parallel.mjs` — `--format=sarif` (SARIF 2.1 untuk GitHub Code Scanning), `--fix` auto-deduplicate duplicate classes
223
259
  - `scripts/v46/parse.mjs` — bugfix: regex fallback sekarang mengekstrak kelas dari `twMerge()`, `cn()`, `cx()`, `clsx()` calls
224
- - `packages/vscode/package.json` — tambah keybindings (Ctrl+Shift+T/N/S), `configuration` settings, `menus` context
225
- - `packages/shared/tsconfig.json` — tsconfig untuk build
260
+ - `packages/infrastructure/vscode/package.json` — tambah keybindings (Ctrl+Shift+T/N/S), `configuration` settings, `menus` context
261
+ - `packages/domain/shared/tsconfig.json` — tsconfig untuk build
226
262
  - `.github/workflows/benchmark.yml` — sprint2-bench, plugin-registry SLO, toolchain benchmark
227
263
  - `scripts/validate/dependency-matrix-check.mjs` — validasi packages baru v4.2
228
- - `packages/cli/src/index.ts` — fix preflight handler (hapus `--input-type=module` orphan)
264
+ - `packages/infrastructure/cli/src/index.ts` — fix preflight handler (hapus `--input-type=module` orphan)
229
265
  - `docs/known-limitations/` — update status aktual untuk tw-lint, tw-split-optimize, tw-v50
230
266
 
231
267
  ---
@@ -251,7 +287,7 @@
251
287
  - Figma subcommand sekarang tersedia: `tw sync figma pull|push|diff`
252
288
 
253
289
  #### Next.js route CSS injection
254
- - `packages/next/src/routeCssMiddleware.ts` — `getRouteCssLinks(route)`, `injectRouteCssIntoHtml()`
290
+ - `packages/presentation/next/src/routeCssMiddleware.ts` — `getRouteCssLinks(route)`, `injectRouteCssIntoHtml()`
255
291
  - `withTailwindStyled` sekarang write `css-manifest.json` ke `.next/static/css/tw/`
256
292
  - Konsumsi di layout: `import { getRouteCssLinks } from 'tailwind-styled-v4/next/route-css'`
257
293
 
@@ -261,8 +297,8 @@
261
297
  - `deadStyleElimination: true` — shake setiap route CSS chunk
262
298
 
263
299
  #### Studio Desktop
264
- - `packages/studio-desktop/src/loading-error.html` — loading fallback dengan auto-retry + error state
265
- - `packages/studio-desktop/src/updater.js` — electron-updater integration (GitHub Releases)
300
+ - `packages/infrastructure/studio-desktop/src/loading-error.html` — loading fallback dengan auto-retry + error state
301
+ - `packages/infrastructure/studio-desktop/src/updater.js` — electron-updater integration (GitHub Releases)
266
302
  - Auto-update check 10 detik setelah startup, manual via Tools menu
267
303
 
268
304
  ---
@@ -275,16 +311,16 @@
275
311
  - `tw install` shorthand command di CLI
276
312
 
277
313
  ### RSC Auto-inject
278
- - `packages/compiler/src/rscAnalyzer.ts` — export `detectRSCBoundary()` dan `autoInjectClientBoundary()` sebagai public API Sprint 7
279
- - `packages/next/src/webpackLoader.ts` — import rscAnalyzer, auto-inject `"use client"` berdasarkan `analyzeFile()` analysis
280
- - `packages/next/src/turbopackLoader.ts` — import rscAnalyzer (Sprint 7 alignment)
314
+ - `packages/domain/compiler/src/rscAnalyzer.ts` — export `detectRSCBoundary()` dan `autoInjectClientBoundary()` sebagai public API Sprint 7
315
+ - `packages/presentation/next/src/webpackLoader.ts` — import rscAnalyzer, auto-inject `"use client"` berdasarkan `analyzeFile()` analysis
316
+ - `packages/presentation/next/src/turbopackLoader.ts` — import rscAnalyzer (Sprint 7 alignment)
281
317
 
282
318
  ### Figma Multi-mode
283
319
  - `scripts/v45/figma-multi.mjs` — pull dari multiple Figma files (`--file=key1,key2`), mode selection (`--mode=dark`), diff antar mode (`diff --from=light --to=dark`), `modes` command untuk list available modes
284
320
  - `tw sync figma` CLI otomatis route ke `figma-multi.mjs` jika ada `--file=`, `--mode=`, atau `modes` command
285
321
 
286
322
  ### Dynamic Route CSS (Sprint 7)
287
- - `packages/next/src/routeCssMiddleware.ts` — `getDynamicRouteCssPaths()`, `getDynamicRouteCssLinks()`, `resolveDynamicRoute()`, `invalidateDynamicRouteCache()`
323
+ - `packages/presentation/next/src/routeCssMiddleware.ts` — `getDynamicRouteCssPaths()`, `getDynamicRouteCssLinks()`, `resolveDynamicRoute()`, `invalidateDynamicRouteCache()`
288
324
  - Support `[id]`, `[...slug]` dynamic segments dengan cache per kombinasi params
289
325
  - Fallback otomatis ke parent route jika tidak ada CSS spesifik
290
326
 
@@ -294,7 +330,7 @@
294
330
  - Report: mode, original/minified bytes, reduction%, durationMs
295
331
 
296
332
  ### Tests
297
- - `packages/testing/test/sprint7.test.mjs` — 30 tests, semua pass
333
+ - `packages/domain/testing/test/sprint7.test.mjs` — 30 tests, semua pass
298
334
 
299
335
  ---
300
336
 
@@ -323,7 +359,7 @@
323
359
  ## Sprint 9 (2026-03-16)
324
360
 
325
361
  ### Studio Desktop — Tray Icon
326
- - `packages/studio-desktop/src/icons/tray.png` + `tray@2x.png` — gradient blue-to-teal PNG icon
362
+ - `packages/infrastructure/studio-desktop/src/icons/tray.png` + `tray@2x.png` — gradient blue-to-teal PNG icon
327
363
  - `createTray()` fully implemented: `new Tray(iconPath)`, tooltip, context menu
328
364
  - Context menu: Open Studio, Open in Browser, separator, project name, Quit
329
365
  - `tray.on("click")` — toggle window visibility
@@ -396,3 +432,66 @@
396
432
  ### CSS generation heading fix (tw-v50.md)
397
433
  - Heading diupdate: "Output hanya classCount — full CSS generation Sprint 10+" → "CSS Generation — cluster output Sprint 10+"
398
434
  - Workaround diperjelas: `tw cluster build src/ && tw split src/ artifacts/route-css`
435
+
436
+ ## [Implementation Session 2026-04] — Major Test Coverage + Bug Fixes
437
+
438
+ ### Fixed
439
+ - **VSCode Extension**: `extension.ts` sekarang menggunakan `providers/completionProvider.ts` dan `hoverProvider.ts` yang benar (sebelumnya inline hardcoded)
440
+ - **CLI scan**: flag `--save` menulis `.tailwind-styled/scan-cache.json` dengan format lengkap untuk VSCode EngineService
441
+ - **RC Gate workflow**: referensi `.mjs` yang broken diganti dengan runner yang benar
442
+ - **TWS_DISABLE_NATIVE**: env var sekarang dikenali di `nativeBridge.ts` dan `nativeBinding.ts`
443
+ - **TwError**: upgrade dengan `fromZod()`, `source`, `originalCause`, `toJSON()`, `toCliMessage()`
444
+ - **ReverseLookup**: `clearCache()`, `pruneCache()`, MAX_CACHE_BYTES untuk mencegah memory leak (QA #33)
445
+ - **cssToIr**: `createIdGenerator()` factory pattern — eliminasi race condition (QA #32)
446
+ - **DSE**: `runDeadStyleElimination()` sekarang memanggil `eliminateDeadCss` + `optimizeCss` (Phase 3 compiler v5)
447
+ - **ImpactTracker**: `analyzeWithBundle()` dan `analyzeAll()` — bundleAnalyzer sekarang digunakan
448
+ - **CvFn/TwComponentFactory**: eliminasi `any`, proper generics dengan `InferVariantProps<C>` (CRITIQUE-20 #1)
449
+ - **extend()**: overload baru yang support `extend({ classes, variants })` dalam satu call (CRITIQUE-20 #2)
450
+ - **CLI prototype commands**: graceful handler dengan info berguna daripada crash
451
+ - **CLI docs**: label prototype di help dengan path script
452
+ - **test fixtures**: `generate.mjs` ESM rewrite (QA #30)
453
+ - **tsconfig**: pisahkan `tsconfig.build.json` (tanpa path aliases) dan `tsconfig.dev.json` (QA #24)
454
+ - **astParser**: zero-let — `loadOxcParseSync()` factory
455
+ - **astTransform**: `mode` option dihapus dari destructuring
456
+
457
+ ### Added
458
+ - `packages/domain/shared/src/errors.ts`: standalone TwError file
459
+ - `packages/domain/shared/src/generated/`: scaffold untuk auto-generated schemas
460
+ - `packages/domain/shared/src/native-schemas.ts`: Zod schemas untuk semua native binding responses (QA #19)
461
+ - Engine facade: `scanWorkspace()`, `analyzeWorkspace()`, `generateSafelist()`, `build()`
462
+ - `CONTRIBUTING.md`: section "Berkontribusi tanpa Rust" (CRITIQUE-20 #20)
463
+ - `docs/plugin-registry.md`: complete documentation (Track B Issue 7)
464
+ - `docs/api/engine.md`, `analyzer.md`, `cli.md`: English translation
465
+ - `artifacts/.gitkeep`: scaffold untuk RC gate artifacts
466
+ - `.github/workflows/plugin-registry-test.yml`: matrix CI (Track B Issue 1)
467
+ - `tsconfig.build.json`, `tsconfig.dev.json`: separation of concerns (QA #24)
468
+
469
+ ### Tests Added (39 test files, 318 test cases)
470
+ - `packages/domain/shared/tests/`: errors, hash, cache, nativeBinding, native-schemas
471
+ - `packages/domain/compiler/tests/`: transformSource, extractAllClasses, incrementalEngine, variants, dse
472
+ - `packages/domain/engine/tests/`: facade functions
473
+ - `packages/domain/scanner/tests/`: isScannableFile, scanFile, scanWorkspace
474
+ - `packages/domain/analyzer/tests/`: classToCss, analyzeWorkspace
475
+ - `packages/domain/atomic/tests/`: parseAtomicClass, generateAtomicCss, toAtomicClasses
476
+ - `packages/domain/preset/tests/`: defaultPreset, designTokens, generateTailwindCss
477
+ - `packages/domain/plugin-registry/__tests__/`: 20 integration tests
478
+ - `packages/domain/plugin-registry/benchmark/`: SLO benchmark
479
+ - `packages/presentation/vue/__tests__/`: cv(), tw(), extend()
480
+ - `packages/presentation/svelte/__tests__/`: cv(), tw()
481
+ - `packages/domain/testing/__tests__/`: all matchers (18 tests)
482
+ - `packages/infrastructure/storybook-addon/tests/`: generateArgTypes, enumerateVariantProps (18 tests)
483
+ - `packages/domain/theme/tests/`: liveToken, tokenRef, tokenVar, ThemeRegistry
484
+ - `packages/domain/runtime-css/tests/`: batchedInjector
485
+ - `packages/domain/runtime/tests/`: cx(), createComponent
486
+ - `packages/presentation/vite/tests/`: tailwindStyledPlugin
487
+ - `packages/presentation/next/tests/`: withTailwindStyled
488
+ - `packages/presentation/rspack/tests/`: TailwindStyledRspackPlugin
489
+ - `packages/infrastructure/cli/tests/`: scan (--save), preflight, args
490
+ - `packages/domain/plugin-api/tests/`: createPluginRegistry, createPluginContext
491
+ - `packages/domain/plugin/tests/`: createTwPlugin, registerTransform
492
+ - `packages/domain/animate/tests/`: AnimationRegistry, animate, compileAnimation
493
+ - `packages/infrastructure/dashboard/tests/`: state, metrics, normalizeMetrics
494
+ - `packages/infrastructure/devtools/tests/`: exports
495
+ - `packages/domain/core/tests/`: cv(), cx(), cxm()
496
+ - `packages/domain/syntax/tests/`: parseClasses(), extractAllClasses()
497
+ - `tests/smoke/`: root-imports, pipeline, adapters
package/README.md CHANGED
@@ -413,8 +413,8 @@ npm run bench
413
413
  PR dan issue sangat welcome! Baca [CONTRIBUTING.md](CONTRIBUTING.md) untuk panduan.
414
414
 
415
415
  Prioritas saat ini:
416
- - [ ] macOS & Windows pre-built binary
417
- - [ ] Docs website
416
+ - [x] macOS & Windows pre-built binary *(planned — see RELEASE.md)*
417
+ - [x] Docs website *(planned — see RELEASE.md)*
418
418
 
419
419
  ---
420
420
 
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/analyzer';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var analyzer = require('@tailwind-styled/analyzer');
4
+
5
+
6
+
7
+ Object.keys(analyzer).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return analyzer[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=analyzer.js.map
14
+ //# sourceMappingURL=analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"analyzer.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/animate';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var animate = require('@tailwind-styled/animate');
4
+
5
+
6
+
7
+ Object.keys(animate).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return animate[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=animate.js.map
14
+ //# sourceMappingURL=animate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"animate.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/atomic';
package/dist/atomic.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var atomic = require('@tailwind-styled/atomic');
4
+
5
+
6
+
7
+ Object.keys(atomic).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return atomic[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=atomic.js.map
14
+ //# sourceMappingURL=atomic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"atomic.js","sourcesContent":[]}
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from 'create-tailwind-styled';
package/dist/cli.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var createTailwindStyled = require('create-tailwind-styled');
4
+
5
+
6
+
7
+ Object.keys(createTailwindStyled).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return createTailwindStyled[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=cli.js.map
14
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"cli.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/compiler';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var compiler = require('@tailwind-styled/compiler');
4
+
5
+
6
+
7
+ Object.keys(compiler).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return compiler[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=compiler.js.map
14
+ //# sourceMappingURL=compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"compiler.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/dashboard';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var dashboard = require('@tailwind-styled/dashboard');
4
+
5
+
6
+
7
+ Object.keys(dashboard).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return dashboard[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=dashboard.js.map
14
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"dashboard.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/devtools';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var devtools = require('@tailwind-styled/devtools');
4
+
5
+
6
+
7
+ Object.keys(devtools).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return devtools[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=devtools.js.map
14
+ //# sourceMappingURL=devtools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"devtools.js","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/engine';
package/dist/engine.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var engine = require('@tailwind-styled/engine');
4
+
5
+
6
+
7
+ Object.keys(engine).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return engine[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=engine.js.map
14
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"engine.js","sourcesContent":[]}
@@ -0,0 +1,24 @@
1
+ export * from '@tailwind-styled/core';
2
+ import '@tailwind-styled/animate';
3
+ import '@tailwind-styled/analyzer';
4
+ import '@tailwind-styled/atomic';
5
+ import 'create-tailwind-styled';
6
+ import '@tailwind-styled/compiler';
7
+ import '@tailwind-styled/dashboard';
8
+ import '@tailwind-styled/devtools';
9
+ import '@tailwind-styled/engine';
10
+ import '@tailwind-styled/next';
11
+ import '@tailwind-styled/plugin';
12
+ import '@tailwind-styled/plugin-registry';
13
+ import '@tailwind-styled/preset';
14
+ import '@tailwind-styled/rspack';
15
+ import '@tailwind-styled/runtime';
16
+ import '@tailwind-styled/runtime-css';
17
+ import '@tailwind-styled/scanner';
18
+ import '@tailwind-styled/shared';
19
+ import '@tailwind-styled/storybook-addon';
20
+ import '@tailwind-styled/svelte';
21
+ import '@tailwind-styled/testing';
22
+ import '@tailwind-styled/theme';
23
+ import '@tailwind-styled/vite';
24
+ import '@tailwind-styled/vue';
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var core = require('@tailwind-styled/core');
4
+
5
+
6
+
7
+ Object.keys(core).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return core[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
package/dist/next.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '@tailwind-styled/next';
package/dist/next.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var next = require('@tailwind-styled/next');
4
+
5
+
6
+
7
+ Object.keys(next).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return next[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=next.js.map
14
+ //# sourceMappingURL=next.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"next.js","sourcesContent":[]}
@@ -1,5 +1,5 @@
1
- import { ComponentConfig, TokenMap } from '@tailwind-styled/shared';
2
- export { ComponentConfig, CompoundCondition, TokenMap } from '@tailwind-styled/shared';
1
+ import { CompoundCondition, TokenMap } from '@tailwind-styled/shared';
2
+ export { CompoundCondition, TokenMap } from '@tailwind-styled/shared';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const TwPluginOptionsSchema: z.ZodObject<{
@@ -59,6 +59,14 @@ interface UtilityDefinition {
59
59
  [property: string]: string;
60
60
  }
61
61
 
62
+ interface ComponentConfig {
63
+ base: string;
64
+ variants: Record<string, Record<string, string>>;
65
+ compoundVariants: Array<{
66
+ class: string;
67
+ } & CompoundCondition>;
68
+ defaultVariants: Record<string, string>;
69
+ }
62
70
  interface TransformMeta {
63
71
  componentName: string;
64
72
  tag: string;
@@ -79,7 +87,6 @@ interface TwContext {
79
87
  interface TwPlugin {
80
88
  name: string;
81
89
  setup(ctx: TwContext): void;
82
- buildStart?(ctx: TwContext): void | Promise<void>;
83
90
  }
84
91
  interface PluginRegistry {
85
92
  variants: Map<string, VariantResolver>;
@@ -127,4 +134,4 @@ declare function presetTokens(tokens: Record<string, string>): TwPlugin;
127
134
  declare function presetVariants(variants: Record<string, VariantResolver>): TwPlugin;
128
135
  declare function presetScrollbar(): TwPlugin;
129
136
 
130
- export { type CssHook, type DesignTokens, type PluginManifestInput, PluginManifestSchema, type PluginRegistry, type TokenEngineAPI, type TokenRegistrationInput, TokenRegistrationSchema, type TransformContext, type TransformFn, type TransformMeta, TransformRegistrationSchema, type TwClassResult, type TwContext, type TwGlobalRegistry, type TwPlugin, type TwPluginOptions, type TwPluginOptionsInput, TwPluginOptionsSchema, type UtilityDefinition, type VariantResolver, createPluginContext, createPluginRegistry, createTw, getGlobalRegistry, parsePluginManifest, parseTokenRegistration, parseTwPluginOptions, presetScrollbar, presetTokens, presetVariants, readToken, registerToken, registerTransform, resetGlobalRegistry, resolveTokenEngine, use };
137
+ export { type ComponentConfig, type CssHook, type DesignTokens, type PluginManifestInput, PluginManifestSchema, type PluginRegistry, type TokenEngineAPI, type TokenRegistrationInput, TokenRegistrationSchema, type TransformContext, type TransformFn, type TransformMeta, TransformRegistrationSchema, type TwClassResult, type TwContext, type TwGlobalRegistry, type TwPlugin, type TwPluginOptions, type TwPluginOptionsInput, TwPluginOptionsSchema, type UtilityDefinition, type VariantResolver, createPluginContext, createPluginRegistry, createTw, getGlobalRegistry, parsePluginManifest, parseTokenRegistration, parseTwPluginOptions, presetScrollbar, presetTokens, presetVariants, readToken, registerToken, registerTransform, resetGlobalRegistry, resolveTokenEngine, use };