@tenphi/tasty 3.3.0 → 3.3.1
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.
- package/dist/{collector-BNQJyxFh.js → collector-BKqNBmzA.js} +3 -3
- package/dist/{collector-BNQJyxFh.js.map → collector-BKqNBmzA.js.map} +1 -1
- package/dist/{config-zkrtb424.js → config-BCdCTIED.js} +5 -4
- package/dist/config-BCdCTIED.js.map +1 -0
- package/dist/core/index.js +5 -5
- package/dist/{core-Bf48Z1I-.js → core-wxP3GHQu.js} +5 -5
- package/dist/{core-Bf48Z1I-.js.map → core-wxP3GHQu.js.map} +1 -1
- package/dist/{css-writer-B-SvwNbq.js → css-writer-D64NY9AX.js} +3 -3
- package/dist/{css-writer-B-SvwNbq.js.map → css-writer-D64NY9AX.js.map} +1 -1
- package/dist/{format-rules-Co21uwA3.js → format-rules-Bo_e2u7r.js} +2 -2
- package/dist/{format-rules-Co21uwA3.js.map → format-rules-Bo_e2u7r.js.map} +1 -1
- package/dist/{hydrate-D38TyhAG.js → hydrate-CMKOuKAx.js} +2 -2
- package/dist/{hydrate-D38TyhAG.js.map → hydrate-CMKOuKAx.js.map} +1 -1
- package/dist/index.js +6 -6
- package/dist/{keyframes-mDAB6pLf.js → keyframes-D737PShJ.js} +2 -2
- package/dist/{keyframes-mDAB6pLf.js.map → keyframes-D737PShJ.js.map} +1 -1
- package/dist/{merge-styles-CFwtEHzv.js → merge-styles-CUIQcs5v.js} +2 -2
- package/dist/{merge-styles-CFwtEHzv.js.map → merge-styles-CUIQcs5v.js.map} +1 -1
- package/dist/{resolve-recipes-B8pIVinB.js → resolve-recipes-Df1Ta-Q0.js} +3 -3
- package/dist/{resolve-recipes-B8pIVinB.js.map → resolve-recipes-Df1Ta-Q0.js.map} +1 -1
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro.js +3 -3
- package/dist/ssr/index.js +3 -3
- package/dist/ssr/next.js +4 -4
- package/dist/static/index.js +1 -1
- package/dist/zero/babel.js +4 -4
- package/dist/zero/index.js +1 -1
- package/docs/dsl.md +28 -15
- package/docs/styles.md +8 -6
- package/package.json +1 -1
- package/dist/config-zkrtb424.js.map +0 -1
package/dist/ssr/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as registerSSRCollectorGetterGlobal } from "../format-rules-
|
|
2
|
-
import { n as createServerStyleCollector, t as ServerStyleCollector } from "../collector-
|
|
1
|
+
import { a as registerSSRCollectorGetterGlobal } from "../format-rules-Bo_e2u7r.js";
|
|
2
|
+
import { n as createServerStyleCollector, t as ServerStyleCollector } from "../collector-BKqNBmzA.js";
|
|
3
3
|
import { n as runWithCollector, t as getSSRCollector } from "../async-storage-DKK-wTD4.js";
|
|
4
|
-
import { t as hydrateTastyClasses } from "../hydrate-
|
|
4
|
+
import { t as hydrateTastyClasses } from "../hydrate-CMKOuKAx.js";
|
|
5
5
|
//#region src/ssr/index.ts
|
|
6
6
|
registerSSRCollectorGetterGlobal(getSSRCollector);
|
|
7
7
|
//#endregion
|
package/dist/ssr/next.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as getConfig } from "../config-
|
|
3
|
-
import { i as registerSSRCollectorGetter } from "../format-rules-
|
|
2
|
+
import { n as getConfig } from "../config-BCdCTIED.js";
|
|
3
|
+
import { i as registerSSRCollectorGetter } from "../format-rules-Bo_e2u7r.js";
|
|
4
4
|
import { t as getTastySSRContext } from "../context-CA8YKeMn.js";
|
|
5
|
-
import { t as ServerStyleCollector } from "../collector-
|
|
6
|
-
import { t as hydrateTastyClasses } from "../hydrate-
|
|
5
|
+
import { t as ServerStyleCollector } from "../collector-BKqNBmzA.js";
|
|
6
|
+
import { t as hydrateTastyClasses } from "../hydrate-CMKOuKAx.js";
|
|
7
7
|
import { Fragment, createElement, useState } from "react";
|
|
8
8
|
import { useServerInsertedHTML } from "next/navigation";
|
|
9
9
|
//#region src/ssr/next.ts
|
package/dist/static/index.js
CHANGED
package/dist/zero/babel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as resetConfig, d as getGlobalStyles, i as getGlobalConfigTokens, s as getGlobalFunctions, t as configure } from "../config-
|
|
2
|
-
import { t as mergeStyles } from "../merge-styles-
|
|
3
|
-
import { t as resolveRecipes } from "../resolve-recipes-
|
|
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-
|
|
1
|
+
import { b as resetConfig, d as getGlobalStyles, i as getGlobalConfigTokens, s as getGlobalFunctions, t as configure } from "../config-BCdCTIED.js";
|
|
2
|
+
import { t as mergeStyles } from "../merge-styles-CUIQcs5v.js";
|
|
3
|
+
import { t as resolveRecipes } from "../resolve-recipes-Df1Ta-Q0.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-D64NY9AX.js";
|
|
5
5
|
import * as fs from "fs";
|
|
6
6
|
import * as path from "path";
|
|
7
7
|
import { declare } from "@babel/helper-plugin-utils";
|
package/dist/zero/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as extractStylesForSelector, l as extractStylesWithChunks, n as createCSSWriter, t as CSSWriter } from "../css-writer-
|
|
1
|
+
import { c as extractStylesForSelector, l as extractStylesWithChunks, n as createCSSWriter, t as CSSWriter } from "../css-writer-D64NY9AX.js";
|
|
2
2
|
export { CSSWriter, createCSSWriter, extractStylesForSelector, extractStylesWithChunks };
|
package/docs/dsl.md
CHANGED
|
@@ -134,7 +134,7 @@ color: '#purple', // Full opacity
|
|
|
134
134
|
color: '#purple.5', // 50% opacity
|
|
135
135
|
color: '#purple.05', // 5% opacity
|
|
136
136
|
color: '#purple.$fade', // Opacity from a custom property
|
|
137
|
-
fill: '#current', // →
|
|
137
|
+
fill: '#current', // → currentcolor
|
|
138
138
|
color: '(#primary, #secondary)', // Fallback syntax
|
|
139
139
|
```
|
|
140
140
|
|
|
@@ -163,27 +163,40 @@ Two properties follow from writing the alpha slot rather than compositing:
|
|
|
163
163
|
`/ var(--fade)` unchanged, so it works whether `$fade` holds `.5` or `50%` —
|
|
164
164
|
which is what `--*-opacity` properties are registered to accept.
|
|
165
165
|
|
|
166
|
-
###
|
|
166
|
+
### `#current` is the keyword
|
|
167
167
|
|
|
168
|
-
`#current` emits
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
and is indistinguishable from the keyword.
|
|
168
|
+
`#current` emits the `currentcolor` keyword, so it resolves against the element
|
|
169
|
+
that reads it. That is what lets it follow a color an ancestor faded — a ramp
|
|
170
|
+
that expresses its disabled state once, in `color`, fades everything painted from
|
|
171
|
+
`#current` below it with no further declarations.
|
|
173
172
|
|
|
174
|
-
The
|
|
173
|
+
The `color` style also publishes `--current-color` beside every color it sets,
|
|
174
|
+
for anything that needs the inherited color *as a color* rather than as the
|
|
175
|
+
keyword — hand-authored CSS, or a place the keyword will not do. Read it as
|
|
176
|
+
`$current-color`. It is registered with `initial-value: currentcolor`, so where
|
|
177
|
+
nothing published it, it still resolves against each element's own color:
|
|
178
|
+
|
|
179
|
+
```jsx
|
|
180
|
+
fill: '$current-color'; // → var(--current-color)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
A color that already reads the color it inherits — `#current`, a `#current` fade
|
|
184
|
+
— is not published into it: resolving such a value a second time at a descendant
|
|
185
|
+
would fade it twice.
|
|
186
|
+
|
|
187
|
+
One case needs the wider floor to be considered. A token *defined* as `#current`
|
|
188
|
+
and then faded gives relative color syntax a `currentcolor` origin, which Safari
|
|
189
|
+
supports only from 18:
|
|
175
190
|
|
|
176
191
|
```jsx
|
|
177
192
|
{ '#ink': '#current', fill: '#ink.5' }
|
|
178
|
-
// --ink-color:
|
|
179
|
-
// fill: oklch(from
|
|
193
|
+
// --ink-color: currentcolor
|
|
194
|
+
// fill: oklch(from currentcolor l c h / .5) → Chrome, Firefox, Safari 18+
|
|
180
195
|
```
|
|
181
196
|
|
|
182
|
-
|
|
183
|
-
`
|
|
184
|
-
|
|
185
|
-
published the variable, the origin is the keyword again and the Safari 18 floor
|
|
186
|
-
applies to that case alone.
|
|
197
|
+
Put the fade in the token instead — `{ '#ink': '#current.5' }` — and it goes
|
|
198
|
+
through `color-mix()`, which works from Safari 16.2 and composes like every other
|
|
199
|
+
`#current` fade.
|
|
187
200
|
|
|
188
201
|
### `#current` composes instead
|
|
189
202
|
|
package/docs/styles.md
CHANGED
|
@@ -290,12 +290,14 @@ Text color with design token support.
|
|
|
290
290
|
| `"light-dark(#dark, #light)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
|
|
291
291
|
| `true` | `currentColor` |
|
|
292
292
|
|
|
293
|
-
Also sets `$current-color` to the same color,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
color. A value that already reads the
|
|
297
|
-
`#current` fade, a bare `currentColor` —
|
|
298
|
-
|
|
293
|
+
Also sets `$current-color` to the same color, for anything that needs the
|
|
294
|
+
inherited color as a color rather than as the `currentcolor` keyword. Every color
|
|
295
|
+
publishes it, not just a named token, so a reader below always takes the nearest
|
|
296
|
+
`color` rather than the nearest *token* color. A value that already reads the
|
|
297
|
+
inherited color — `#current` itself, a `#current` fade, a bare `currentColor` —
|
|
298
|
+
is not republished: resolving it a second time one level down would fade it
|
|
299
|
+
twice, and the variable into itself is a self-reference. `#current` does not go
|
|
300
|
+
through it; it is the keyword.
|
|
299
301
|
|
|
300
302
|
### `svgFill`
|
|
301
303
|
|