@tenphi/tasty 3.0.1 → 3.0.2

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 (47) hide show
  1. package/README.md +16 -16
  2. package/dist/{babel-HlEpSZrj.d.ts → babel-R2qT7yLN.d.ts} +2 -2
  3. package/dist/{collector-D14DcZx9.js → collector-BpkjNQDo.js} +3 -3
  4. package/dist/{collector-D14DcZx9.js.map → collector-BpkjNQDo.js.map} +1 -1
  5. package/dist/{collector-BPzZezAG.d.ts → collector-D8o4Wdq-.d.ts} +2 -2
  6. package/dist/{config-CCcE_tqx.js → config-DOCuTykY.js} +260 -107
  7. package/dist/config-DOCuTykY.js.map +1 -0
  8. package/dist/{config-D2INrjr_.d.ts → config-De8L9NWM.d.ts} +2 -2
  9. package/dist/core/index.d.ts +4 -4
  10. package/dist/core/index.js +5 -5
  11. package/dist/{core-B5d0IPi2.js → core-p6iTbQnn.js} +7 -7
  12. package/dist/core-p6iTbQnn.js.map +1 -0
  13. package/dist/{css-writer-B5DBoxhf.js → css-writer-BHjTF0YN.js} +3 -3
  14. package/dist/{css-writer-B5DBoxhf.js.map → css-writer-BHjTF0YN.js.map} +1 -1
  15. package/dist/{format-rules-BbKDjsfO.js → format-rules-Cb0YIjyS.js} +2 -2
  16. package/dist/{format-rules-BbKDjsfO.js.map → format-rules-Cb0YIjyS.js.map} +1 -1
  17. package/dist/{hydrate-CwALW3J9.js → hydrate-xnaB3SDm.js} +2 -2
  18. package/dist/{hydrate-CwALW3J9.js.map → hydrate-xnaB3SDm.js.map} +1 -1
  19. package/dist/{index-BAAbdfRs.d.ts → index-DzGxoeyN.d.ts} +5 -5
  20. package/dist/{index-l_NdJSUS.d.ts → index-KUYya3x7.d.ts} +11 -1
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +6 -6
  23. package/dist/{keyframes-B8M1FmtE.js → keyframes-DiXjNoBZ.js} +2 -2
  24. package/dist/{keyframes-B8M1FmtE.js.map → keyframes-DiXjNoBZ.js.map} +1 -1
  25. package/dist/{merge-styles--1zOSFlS.js → merge-styles-B0lMso5W.js} +2 -2
  26. package/dist/{merge-styles--1zOSFlS.js.map → merge-styles-B0lMso5W.js.map} +1 -1
  27. package/dist/{merge-styles-NEvqayL_.d.ts → merge-styles-DLm4wdnb.d.ts} +2 -2
  28. package/dist/{resolve-recipes-Caix5NnH.js → resolve-recipes-C9nAuwgR.js} +3 -3
  29. package/dist/{resolve-recipes-Caix5NnH.js.map → resolve-recipes-C9nAuwgR.js.map} +1 -1
  30. package/dist/ssr/astro-client.js +1 -1
  31. package/dist/ssr/astro.js +3 -3
  32. package/dist/ssr/index.d.ts +1 -1
  33. package/dist/ssr/index.js +3 -3
  34. package/dist/ssr/next.d.ts +1 -1
  35. package/dist/ssr/next.js +4 -4
  36. package/dist/static/index.d.ts +2 -2
  37. package/dist/static/index.js +1 -1
  38. package/dist/zero/babel.d.ts +1 -1
  39. package/dist/zero/babel.js +4 -4
  40. package/dist/zero/index.d.ts +1 -1
  41. package/dist/zero/index.js +1 -1
  42. package/dist/zero/next.d.ts +1 -1
  43. package/docs/ai-agents.md +3 -0
  44. package/docs/configuration.md +1 -0
  45. package/package.json +14 -10
  46. package/dist/config-CCcE_tqx.js.map +0 -1
  47. package/dist/core-B5d0IPi2.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { b as Styles } from "../index-l_NdJSUS.js";
2
- import { t as mergeStyles } from "../merge-styles-NEvqayL_.js";
1
+ import { b as Styles } from "../index-KUYya3x7.js";
2
+ import { t as mergeStyles } from "../merge-styles-DLm4wdnb.js";
3
3
 
4
4
  //#region src/static/types.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { t as mergeStyles } from "../merge-styles--1zOSFlS.js";
1
+ import { t as mergeStyles } from "../merge-styles-B0lMso5W.js";
2
2
  //#region src/static/types.ts
3
3
  /**
4
4
  * Create a StaticStyle object.
@@ -1,2 +1,2 @@
1
- import { n as _default, r as TastyZeroConfig, t as TastyZeroBabelOptions } from "../babel-HlEpSZrj.js";
1
+ import { n as _default, r as TastyZeroConfig, t as TastyZeroBabelOptions } from "../babel-R2qT7yLN.js";
2
2
  export { TastyZeroBabelOptions, type TastyZeroConfig, _default as default };
@@ -1,7 +1,7 @@
1
- import { b as resetConfig, d as getGlobalStyles, i as getGlobalConfigTokens, s as getGlobalFunctions, t as configure } from "../config-CCcE_tqx.js";
2
- import { t as mergeStyles } from "../merge-styles--1zOSFlS.js";
3
- import { t as resolveRecipes } from "../resolve-recipes-Caix5NnH.js";
4
- import { a as extractFunctionsFromStyles, c as extractStylesForSelector, i as extractFontFaceFromStyles, l as extractStylesWithChunks, o as extractKeyframesFromStyles, r as extractCounterStyleFromStyles, s as extractPropertiesFromStyles, t as CSSWriter, u as setExtractorNamePrefix } from "../css-writer-B5DBoxhf.js";
1
+ import { b as resetConfig, d as getGlobalStyles, i as getGlobalConfigTokens, s as getGlobalFunctions, t as configure } from "../config-DOCuTykY.js";
2
+ import { t as mergeStyles } from "../merge-styles-B0lMso5W.js";
3
+ import { t as resolveRecipes } from "../resolve-recipes-C9nAuwgR.js";
4
+ import { a as extractFunctionsFromStyles, c as extractStylesForSelector, i as extractFontFaceFromStyles, l as extractStylesWithChunks, o as extractKeyframesFromStyles, r as extractCounterStyleFromStyles, s as extractPropertiesFromStyles, t as CSSWriter, u as setExtractorNamePrefix } from "../css-writer-BHjTF0YN.js";
5
5
  import * as fs from "fs";
6
6
  import * as path from "path";
7
7
  import { declare } from "@babel/helper-plugin-utils";
@@ -1,4 +1,4 @@
1
- import { b as Styles } from "../index-l_NdJSUS.js";
1
+ import { b as Styles } from "../index-KUYya3x7.js";
2
2
 
3
3
  //#region src/zero/extractor.d.ts
4
4
  interface ExtractedChunk {
@@ -1,2 +1,2 @@
1
- import { c as extractStylesForSelector, l as extractStylesWithChunks, n as createCSSWriter, t as CSSWriter } from "../css-writer-B5DBoxhf.js";
1
+ import { c as extractStylesForSelector, l as extractStylesWithChunks, n as createCSSWriter, t as CSSWriter } from "../css-writer-BHjTF0YN.js";
2
2
  export { CSSWriter, createCSSWriter, extractStylesForSelector, extractStylesWithChunks };
@@ -1,4 +1,4 @@
1
- import { r as TastyZeroConfig } from "../babel-HlEpSZrj.js";
1
+ import { r as TastyZeroConfig } from "../babel-R2qT7yLN.js";
2
2
 
3
3
  //#region src/zero/next.d.ts
4
4
  interface WebpackConfigContext {
package/docs/ai-agents.md CHANGED
@@ -70,6 +70,9 @@ The last row goes the other way — longhands over the shorthand — because `fl
70
70
  - ❌ `#f5f5f5`, `rgb(0 0 0)`, `oklch(…)`, `okhsl(…)`, `red` → ✅ `#surface` (add the token to the config if it doesn't exist).
71
71
  - ❌ `var(--gap)` → ✅ `$gap` · ❌ `$accent-color` → ✅ `#accent` · ❌ `transparent` → ✅ `#clear` · ❌ `currentColor` → ✅ `#current`.
72
72
  - A `$name` must be declared as a `'$name': value` key in the same styles object, or in the config.
73
+ - Names are case-sensitive and start lowercase — `$myVar` → `--myVar`; a leading capital folds (`$Foo` → `--foo`). Prefer kebab-case.
74
+ - A `$name` reference is untyped: it fills the first free slot in a shorthand (`border: '1bw $my-style'` → the line style). Write colors as `#name`; `$name-color` is a fallback for pointing at a raw CSS custom property that holds a color.
75
+ - `preset` and `transition` take token *names*, not values, so a `$name` cannot stand in for one (it warns in dev and is ignored).
73
76
 
74
77
  ### Units
75
78
 
@@ -164,6 +164,7 @@ configure({
164
164
 
165
165
  - `$name` keys become `--name` CSS custom properties
166
166
  - `#name` keys become `--name-color` and `--name-color-{colorSpace}` properties (suffix depends on `colorSpace`, default `oklch`)
167
+ - Names keep their case, since CSS custom properties are case-sensitive: `$myVar` is `--myVar` and is referenced as `$myVar`. A leading capital is not supported and folds — `$Foo` and `#Purple` become `--foo` and `--purple-color` — so start names lowercase. Kebab-case (`$my-var`) remains the convention.
167
168
 
168
169
  Tokens are automatically emitted in all rendering modes: runtime (client), SSR, and zero-runtime (Babel plugin).
169
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenphi/tasty",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "A design-system-integrated styling system and DSL for concise, state-aware UI styling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -158,39 +158,39 @@
158
158
  "@types/babel__helper-plugin-utils": "^7.10.3",
159
159
  "@types/node": "^25.3.2",
160
160
  "@types/react": "^19.0.0",
161
+ "@vitest/browser-playwright": "^4.1.10",
161
162
  "eslint": "^10.0.0",
162
163
  "eslint-config-prettier": "^10.1.8",
163
- "happy-dom": "^20.9.0",
164
164
  "jiti": "^2.6.1",
165
- "jsdom": "^29.0.2",
166
165
  "knip": "^5.61.3",
167
166
  "next": "^16.0.0",
167
+ "playwright": "^1.62.1",
168
168
  "prettier": "^3.8.1",
169
169
  "react": "^19.0.0",
170
170
  "size-limit": "^12.0.0",
171
171
  "tsdown": "^0.22.0",
172
172
  "typescript": "^6.0.2",
173
173
  "typescript-eslint": "^8.56.0",
174
- "vitest": "^4.0.18"
174
+ "vitest": "^4.1.10"
175
175
  },
176
176
  "size-limit": [
177
177
  {
178
178
  "name": "main (import *)",
179
179
  "path": "dist/index.js",
180
180
  "import": "*",
181
- "limit": "57 kB"
181
+ "limit": "57.5 kB"
182
182
  },
183
183
  {
184
184
  "name": "core (import *)",
185
185
  "path": "dist/core/index.js",
186
186
  "import": "*",
187
- "limit": "54 kB"
187
+ "limit": "54.5 kB"
188
188
  },
189
189
  {
190
190
  "name": "static",
191
191
  "path": "dist/static/index.js",
192
192
  "import": "*",
193
- "limit": "18.5 kB"
193
+ "limit": "18.75 kB"
194
194
  },
195
195
  {
196
196
  "name": "zero",
@@ -201,7 +201,7 @@
201
201
  "path",
202
202
  "crypto"
203
203
  ],
204
- "limit": "33 kB"
204
+ "limit": "33.25 kB"
205
205
  },
206
206
  {
207
207
  "name": "babel-plugin",
@@ -212,12 +212,15 @@
212
212
  "path",
213
213
  "crypto"
214
214
  ],
215
- "limit": "50.5 kB"
215
+ "limit": "50.75 kB"
216
216
  }
217
217
  ],
218
218
  "scripts": {
219
219
  "build": "tsdown",
220
220
  "test": "vitest run",
221
+ "test:node": "vitest run --project node",
222
+ "test:browser": "vitest run --project browser",
223
+ "test:setup": "playwright install chromium",
221
224
  "test:watch": "vitest",
222
225
  "test:coverage": "vitest run --coverage",
223
226
  "typecheck": "tsc --noEmit",
@@ -226,7 +229,8 @@
226
229
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
227
230
  "format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
228
231
  "size": "size-limit",
229
- "bench": "vitest bench",
232
+ "bench": "vitest bench --project node",
233
+ "bench:browser": "vitest bench --project browser",
230
234
  "changeset": "changeset",
231
235
  "version": "changeset version",
232
236
  "release": "changeset publish",