@tenphi/tasty 0.0.0-snapshot.a85ade8 → 0.0.0-snapshot.a8a2a5d
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/README.md +418 -381
- package/dist/babel-types-BOABQvEI.d.ts +16 -0
- package/dist/chunks/async-storage-CzSKAyrI.js +36 -0
- package/dist/chunks/async-storage-CzSKAyrI.js.map +1 -0
- package/dist/chunks/build-config-DQkT3Wru.js +59 -0
- package/dist/chunks/build-config-DQkT3Wru.js.map +1 -0
- package/dist/{collector-C6TtL8HJ.js → chunks/collector-Df9zcabl.js} +11 -129
- package/dist/chunks/collector-Df9zcabl.js.map +1 -0
- package/dist/chunks/config-engine-C7OUmM1J.js +269 -0
- package/dist/chunks/config-engine-C7OUmM1J.js.map +1 -0
- package/dist/chunks/config-file-BX3F_61U.js +24 -0
- package/dist/chunks/config-file-BX3F_61U.js.map +1 -0
- package/dist/chunks/css-definitions-BkdTqT7G.js +896 -0
- package/dist/chunks/css-definitions-BkdTqT7G.js.map +1 -0
- package/dist/chunks/css-resources-C0zT36nQ.js +141 -0
- package/dist/chunks/css-resources-C0zT36nQ.js.map +1 -0
- package/dist/chunks/debug-CwGMB2RI.js +501 -0
- package/dist/chunks/debug-CwGMB2RI.js.map +1 -0
- package/dist/chunks/dsl-BAwiOznp.js +1442 -0
- package/dist/chunks/dsl-BAwiOznp.js.map +1 -0
- package/dist/chunks/hydration-DEmoq1sQ.js +39 -0
- package/dist/chunks/hydration-DEmoq1sQ.js.map +1 -0
- package/dist/chunks/react-runtime-B8YqpFx7.js +678 -0
- package/dist/chunks/react-runtime-B8YqpFx7.js.map +1 -0
- package/dist/chunks/runtime-engine-CHNH2nGy.js +2418 -0
- package/dist/chunks/runtime-engine-CHNH2nGy.js.map +1 -0
- package/dist/chunks/runtime-state-BxLKsQzs.js +150 -0
- package/dist/chunks/runtime-state-BxLKsQzs.js.map +1 -0
- package/dist/{merge-styles-DuoZEsm9.js → chunks/shared-utils-CYgOs2mp.js} +58 -57
- package/dist/chunks/shared-utils-CYgOs2mp.js.map +1 -0
- package/dist/chunks/style-engine-DkKH-TqL.js +5573 -0
- package/dist/chunks/style-engine-DkKH-TqL.js.map +1 -0
- package/dist/{css-writer-Bgowobbx.js → chunks/zero-engine-C-0ar_PT.js} +67 -149
- package/dist/chunks/zero-engine-C-0ar_PT.js.map +1 -0
- package/dist/{collector-BTVXj2hS.d.ts → collector-BN6hCWIx.d.ts} +3 -6
- package/dist/{config-LfIDmVHx.d.ts → config-Chmu-PnP.d.ts} +49 -63
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +9 -6
- package/dist/hydrate-CTh8SGd9.d.ts +20 -0
- package/dist/{index-Bm9ltvdH.d.ts → index-szujmf6W.d.ts} +263 -348
- package/dist/index.d.ts +5 -5
- package/dist/index.js +11 -922
- package/dist/merge-styles-Cx25bpax.d.ts +4 -0
- package/dist/ssr/astro-client.d.ts +1 -1
- package/dist/ssr/astro-client.js +2 -16
- package/dist/ssr/astro-client.js.map +1 -1
- package/dist/ssr/astro-middleware-extract-static.d.ts +1 -4
- package/dist/ssr/astro-middleware-extract-static.js +1 -2
- package/dist/ssr/astro-middleware-extract.d.ts +1 -4
- package/dist/ssr/astro-middleware-extract.js +1 -2
- package/dist/ssr/astro-middleware-static.d.ts +1 -4
- package/dist/ssr/astro-middleware-static.js +2 -14
- package/dist/ssr/astro-middleware-static.js.map +1 -1
- package/dist/ssr/astro-middleware.d.ts +1 -4
- package/dist/ssr/astro-middleware.js +2 -15
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +17 -19
- package/dist/ssr/astro.js +218 -1
- package/dist/ssr/astro.js.map +1 -0
- package/dist/ssr/client.d.ts +2 -0
- package/dist/ssr/client.js +1 -0
- package/dist/ssr/index.d.ts +5 -27
- package/dist/ssr/index.js +6 -7
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next-config.d.ts +63 -0
- package/dist/ssr/next-config.js +122 -0
- package/dist/ssr/next-config.js.map +1 -0
- package/dist/ssr/next.d.ts +9 -10
- package/dist/ssr/next.js +30 -45
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +8 -13
- package/dist/static/index.js +6 -26
- package/dist/static/index.js.map +1 -1
- package/dist/static/inject.d.ts +1 -4
- package/dist/static/inject.js +1 -2
- package/dist/{index-BmogEzTo.d.ts → types-DbMN-Yyn.d.ts} +1013 -1043
- package/dist/zero/babel.d.ts +71 -2
- package/dist/zero/babel.js +84 -150
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +61 -12
- package/dist/zero/index.js +24 -2
- package/dist/zero/index.js.map +1 -0
- package/dist/zero/next.d.ts +5 -7
- package/dist/zero/next.js +4 -40
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +4 -1
- package/docs/adoption.md +25 -17
- package/docs/ai-agents.md +69 -34
- package/docs/comparison.md +9 -8
- package/docs/configuration.md +204 -70
- package/docs/debug.md +18 -7
- package/docs/design-system.md +129 -15
- package/docs/dsl.md +327 -117
- package/docs/getting-started.md +81 -22
- package/docs/injector.md +41 -40
- package/docs/llms.txt +31 -0
- package/docs/methodology.md +48 -23
- package/docs/migration-v3.md +3 -3
- package/docs/pipeline.md +55 -28
- package/docs/plugins.md +22 -42
- package/docs/react-api.md +76 -11
- package/docs/runtime-benchmarks.md +257 -47
- package/docs/ssr.md +226 -80
- package/docs/styles.md +169 -33
- package/docs/tasty-static.md +176 -58
- package/harness/dev.harnesspm/rules/usage.md +12 -0
- package/harness/dev.harnesspm/scripts/render.mjs +320 -0
- package/harness/dev.harnesspm/scripts/styles.mjs +299 -0
- package/harness/plugin.json +20 -0
- package/package.json +116 -48
- package/tasty.config.ts +1 -0
- package/dist/astro-ib7E7V4Y.js +0 -307
- package/dist/astro-ib7E7V4Y.js.map +0 -1
- package/dist/async-storage-DKK-wTD4.js +0 -44
- package/dist/async-storage-DKK-wTD4.js.map +0 -1
- package/dist/babel-DWCsafYw.d.ts +0 -83
- package/dist/collector-C6TtL8HJ.js.map +0 -1
- package/dist/config-B3gPdCqd.js +0 -12421
- package/dist/config-B3gPdCqd.js.map +0 -1
- package/dist/context-CA8YKeMn.js +0 -24
- package/dist/context-CA8YKeMn.js.map +0 -1
- package/dist/core-Bq7w2kti.js +0 -1686
- package/dist/core-Bq7w2kti.js.map +0 -1
- package/dist/css-writer-Bgowobbx.js.map +0 -1
- package/dist/format-global-rules-DklyaXv-.js +0 -22
- package/dist/format-global-rules-DklyaXv-.js.map +0 -1
- package/dist/format-rules-rCZ37rqY.js +0 -130
- package/dist/format-rules-rCZ37rqY.js.map +0 -1
- package/dist/hydrate-CNOmZprz.js +0 -37
- package/dist/hydrate-CNOmZprz.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/keyframes-DE-OE76F.js +0 -535
- package/dist/keyframes-DE-OE76F.js.map +0 -1
- package/dist/merge-styles-BcLl1u_d.d.ts +0 -7
- package/dist/merge-styles-DuoZEsm9.js.map +0 -1
- package/dist/resolve-recipes-H9NqOQuP.js +0 -144
- package/dist/resolve-recipes-H9NqOQuP.js.map +0 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { C as SheetInfo, Et as StyleDetails, M as StyleResult, Ot as UnitHandler, S as RuleInfo, T as StyleRule, W as ConfigTokens, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, b as RawCSSResult, c as GCConfig, d as InjectOptions, f as InjectResult, g as KeyframesResult, h as KeyframesInfo, i as FontFaceDescriptors, l as GCOptions, lt as StyleHandlerDefinition, n as CounterStyleDescriptors, o as FunctionDefinition, q as RecipeStyles, t as CacheMetrics, u as GlobalInjectResult, v as PropertyDefinition, w as StyleInjectorConfig, x as RootRegistry } from "./types-DbMN-Yyn.js";
|
|
2
|
+
declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
|
|
3
|
+
declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
|
|
4
|
+
declare function getGlobalFunctions(): Record<string, FunctionDefinition> | null;
|
|
5
|
+
/**
|
|
6
|
+
* Get global keyframes configuration.
|
|
7
|
+
* Returns null if no keyframes configured (fast path for zero-overhead).
|
|
8
|
+
*/
|
|
9
|
+
declare function getGlobalKeyframes(): Record<string, KeyframesSteps> | null;
|
|
4
10
|
/**
|
|
5
11
|
* Props middleware for tasty components.
|
|
6
12
|
*
|
|
@@ -46,8 +52,6 @@ type PropHandler = (props: PropHandlerProps) => PropHandlerProps | void | null;
|
|
|
46
52
|
* - `['*', fn]` — unconditional; runs on every render of every component
|
|
47
53
|
*/
|
|
48
54
|
type PropHandlerDefinition = PropHandler | [string, PropHandler] | [string[], PropHandler];
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/injector/sheet-manager.d.ts
|
|
51
55
|
declare class SheetManager {
|
|
52
56
|
private rootRegistries;
|
|
53
57
|
/** Strong set of active roots so background GC can iterate them all */
|
|
@@ -105,6 +109,8 @@ declare class SheetManager {
|
|
|
105
109
|
* Create a style element and append to document
|
|
106
110
|
*/
|
|
107
111
|
private createStyleElement;
|
|
112
|
+
/** Append a rule to a text-mode sheet while preserving its index mirror. */
|
|
113
|
+
private appendTextRule;
|
|
108
114
|
/**
|
|
109
115
|
* Insert CSS rules as a single block
|
|
110
116
|
*/
|
|
@@ -171,7 +177,7 @@ declare class SheetManager {
|
|
|
171
177
|
*/
|
|
172
178
|
private readSheetCSS;
|
|
173
179
|
/**
|
|
174
|
-
* Get CSS text
|
|
180
|
+
* Get the CSS text of every sheet in `registry`.
|
|
175
181
|
*/
|
|
176
182
|
getCSSText(registry: RootRegistry): string;
|
|
177
183
|
/**
|
|
@@ -261,8 +267,6 @@ declare class SheetManager {
|
|
|
261
267
|
getRawRuleCount(root: Document | ShadowRoot): number;
|
|
262
268
|
getRawCSSText(root: Document | ShadowRoot): string;
|
|
263
269
|
}
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/injector/injector.d.ts
|
|
266
270
|
declare class StyleInjector {
|
|
267
271
|
private sheetManager;
|
|
268
272
|
private config;
|
|
@@ -272,8 +276,16 @@ declare class StyleInjector {
|
|
|
272
276
|
private namePrefix;
|
|
273
277
|
private classRegex;
|
|
274
278
|
private rscClassRegex;
|
|
279
|
+
/**
|
|
280
|
+
* Bumped whenever class rules are deleted — by `gc()`, `cleanup()` or
|
|
281
|
+
* `destroy()` — so a cache of class names handed out earlier, such as a
|
|
282
|
+
* `tasty()` factory's, knows they may no longer have rules behind them.
|
|
283
|
+
*/
|
|
284
|
+
evictions: number;
|
|
275
285
|
/** @internal — exposed for debug utilities only */
|
|
276
286
|
get _sheetManager(): SheetManager;
|
|
287
|
+
/** Register inferable custom properties used by a set of declarations. */
|
|
288
|
+
private inferProperties;
|
|
277
289
|
/**
|
|
278
290
|
* Whether sheet writes should be queued instead of applied immediately.
|
|
279
291
|
*
|
|
@@ -326,6 +338,11 @@ declare class StyleInjector {
|
|
|
326
338
|
className: string;
|
|
327
339
|
isNewAllocation: boolean;
|
|
328
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* Hand a class that is already injected — or queued for a batched write — to
|
|
343
|
+
* another caller: record the reference, write nothing.
|
|
344
|
+
*/
|
|
345
|
+
private reuseInjected;
|
|
329
346
|
/**
|
|
330
347
|
* Inject styles from StyleResult objects
|
|
331
348
|
*/
|
|
@@ -393,7 +410,7 @@ declare class StyleInjector {
|
|
|
393
410
|
*/
|
|
394
411
|
cleanup(root?: Document | ShadowRoot): void;
|
|
395
412
|
/**
|
|
396
|
-
* Get CSS text
|
|
413
|
+
* Get the CSS text of every sheet for `root`. Needs a DOM.
|
|
397
414
|
*/
|
|
398
415
|
getCSSText(options?: {
|
|
399
416
|
root?: Document | ShadowRoot;
|
|
@@ -583,8 +600,6 @@ declare class StyleInjector {
|
|
|
583
600
|
*/
|
|
584
601
|
destroy(root?: Document | ShadowRoot): void;
|
|
585
602
|
}
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region src/functions/index.d.ts
|
|
588
603
|
/**
|
|
589
604
|
* A parse-time function: receives the parsed (comma-separated) argument groups
|
|
590
605
|
* and returns a CSS value string. This is the JS flavor of the unified
|
|
@@ -598,27 +613,22 @@ type ParseFunction = (groups: StyleDetails[]) => string;
|
|
|
598
613
|
* value is a {@link FunctionDefinition} object).
|
|
599
614
|
*/
|
|
600
615
|
type FunctionsConfig = Record<string, FunctionDefinition | ParseFunction>;
|
|
601
|
-
//#endregion
|
|
602
|
-
//#region src/utils/color-space.d.ts
|
|
603
616
|
/**
|
|
604
617
|
* Color handling that survives into the emitted CSS.
|
|
605
618
|
*
|
|
606
619
|
* Tasty does not rewrite a color into a particular color space: opacity is
|
|
607
|
-
* applied with
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* matters — replacing a token's alpha versus composing onto an inherited one.
|
|
620
|
+
* applied with `color-mix()`, which the browser resolves against whatever a
|
|
621
|
+
* value turns out to be, so a color is emitted exactly as authored. What is left
|
|
622
|
+
* here is how an alpha gets applied.
|
|
611
623
|
*/
|
|
612
624
|
/**
|
|
613
625
|
* The color space a `#name` token's value used to be rewritten into.
|
|
614
626
|
*
|
|
615
627
|
* @deprecated Kept for the `colorSpace` config option, which no longer has any
|
|
616
628
|
* effect. Colors are emitted as authored and opacity is always applied in
|
|
617
|
-
* `
|
|
629
|
+
* `oklab` through `color-mix()`.
|
|
618
630
|
*/
|
|
619
631
|
type ColorSpace = 'rgb' | 'hsl' | 'oklch';
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region src/utils/typography.d.ts
|
|
622
632
|
/**
|
|
623
633
|
* A typography token value: plain value or a state map for responsive/theme-aware presets.
|
|
624
634
|
*
|
|
@@ -671,8 +681,6 @@ interface TypographyPreset {
|
|
|
671
681
|
* });
|
|
672
682
|
*/
|
|
673
683
|
declare function generateTypographyTokens(presets: Record<string, TypographyPreset>): ConfigTokens;
|
|
674
|
-
//#endregion
|
|
675
|
-
//#region src/plugins/types.d.ts
|
|
676
684
|
/**
|
|
677
685
|
* A tasty plugin that extends the style system with custom functions, units, states, or handlers.
|
|
678
686
|
*/
|
|
@@ -685,7 +693,7 @@ interface TastyPlugin {
|
|
|
685
693
|
* definitions. See {@link FunctionsConfig}.
|
|
686
694
|
*/
|
|
687
695
|
functions?: FunctionsConfig;
|
|
688
|
-
/** Custom units that
|
|
696
|
+
/** Custom units that scale numeric values (e.g., `x: '8px'` makes `2x` → `16px`) */
|
|
689
697
|
units?: Record<string, string | UnitHandler>;
|
|
690
698
|
/** Custom state aliases (e.g., `'@mobile': '@media(w < 768px)'`) */
|
|
691
699
|
states?: Record<string, string>;
|
|
@@ -794,8 +802,6 @@ interface TastyPlugin {
|
|
|
794
802
|
* ```
|
|
795
803
|
*/
|
|
796
804
|
type TastyPluginFactory<TOptions = void> = TOptions extends void ? () => TastyPlugin : (options: TOptions) => TastyPlugin;
|
|
797
|
-
//#endregion
|
|
798
|
-
//#region src/config.d.ts
|
|
799
805
|
/**
|
|
800
806
|
* Configuration options for the Tasty style system
|
|
801
807
|
*/
|
|
@@ -821,8 +827,12 @@ interface TastyConfig {
|
|
|
821
827
|
parserCacheSize?: number;
|
|
822
828
|
/**
|
|
823
829
|
* Custom units for the style parser (merged with built-in units).
|
|
824
|
-
*
|
|
825
|
-
*
|
|
830
|
+
* A unit scales its value by the number in front of it: the built-in
|
|
831
|
+
* `x: '8px'` makes `2x` → `16px`, and `u: 'var(--u)'` would make `2u` →
|
|
832
|
+
* `calc(2 * var(--u))`. A function receives the number and returns the CSS.
|
|
833
|
+
* Native CSS units (`px`, `em`, `vw`, …) need no entry: one with the same
|
|
834
|
+
* name replaces them.
|
|
835
|
+
* @example { u: 'var(--u)', col: (n) => `${n * 80}px` }
|
|
826
836
|
*/
|
|
827
837
|
units?: Record<string, string | UnitHandler>;
|
|
828
838
|
/**
|
|
@@ -854,8 +864,8 @@ interface TastyConfig {
|
|
|
854
864
|
*
|
|
855
865
|
* A `#name` token's value used to be rewritten into this color space so an
|
|
856
866
|
* opacity suffix had numeric channels to write an alpha into. Opacity now uses
|
|
857
|
-
*
|
|
858
|
-
*
|
|
867
|
+
* `color-mix(in oklab, var(--name-color) 50%, transparent)`, which the
|
|
868
|
+
* browser resolves against any color, so a color is emitted exactly as
|
|
859
869
|
* authored and there is nothing left for the setting to decide.
|
|
860
870
|
*
|
|
861
871
|
* To address a token's channels yourself, write relative color syntax against
|
|
@@ -979,7 +989,7 @@ interface TastyConfig {
|
|
|
979
989
|
* Keys use tasty token syntax ($name for properties, #name for colors).
|
|
980
990
|
*
|
|
981
991
|
* Tasty ships with `DEFAULT_PROPERTIES` (e.g. `$gap`, `$radius`, `#white`,
|
|
982
|
-
* `#black`, `#
|
|
992
|
+
* `#black`, `#border`, etc.) that are always included.
|
|
983
993
|
* Properties you specify here are merged on top, so you can override any
|
|
984
994
|
* default by using the same key.
|
|
985
995
|
*
|
|
@@ -1002,7 +1012,7 @@ interface TastyConfig {
|
|
|
1002
1012
|
* const Spinner = tasty({
|
|
1003
1013
|
* styles: {
|
|
1004
1014
|
* transform: 'rotate($rotation)',
|
|
1005
|
-
* transition: '$$rotation
|
|
1015
|
+
* transition: '$$rotation $transition', // outputs: --rotation var(--transition)
|
|
1006
1016
|
* },
|
|
1007
1017
|
* });
|
|
1008
1018
|
* ```
|
|
@@ -1169,6 +1179,10 @@ interface TastyConfig {
|
|
|
1169
1179
|
* Values are substituted inline before CSS generation, unlike `tokens` which
|
|
1170
1180
|
* inject CSS custom properties on `:root`.
|
|
1171
1181
|
*
|
|
1182
|
+
* Includes `'#clear': 'transparent'` by default. Aliases resolving to
|
|
1183
|
+
* `transparent` ignore opacity suffixes, including custom-property opacity.
|
|
1184
|
+
* Explicit replaceTokens entries can override the defaults.
|
|
1185
|
+
*
|
|
1172
1186
|
* For color tokens (#name), boolean `true` is converted to `transparent`.
|
|
1173
1187
|
*
|
|
1174
1188
|
* @example
|
|
@@ -1184,7 +1198,7 @@ interface TastyConfig {
|
|
|
1184
1198
|
* // Now use in styles - tokens are replaced at parse time:
|
|
1185
1199
|
* const Card = tasty({
|
|
1186
1200
|
* styles: {
|
|
1187
|
-
* padding: '$spacing', // →
|
|
1201
|
+
* padding: '$spacing', // → 16px
|
|
1188
1202
|
* fill: '#accent', // → var(--purple-color)
|
|
1189
1203
|
* },
|
|
1190
1204
|
* });
|
|
@@ -1271,38 +1285,11 @@ declare global {
|
|
|
1271
1285
|
* Detect if we're running in a test environment
|
|
1272
1286
|
*/
|
|
1273
1287
|
declare function isTestEnvironment(): boolean;
|
|
1274
|
-
/**
|
|
1275
|
-
* Check if styles have been generated (configuration is locked)
|
|
1276
|
-
*/
|
|
1277
|
-
declare function hasStylesGenerated(): boolean;
|
|
1278
1288
|
/**
|
|
1279
1289
|
* Check if any global keyframes are configured.
|
|
1280
|
-
*
|
|
1290
|
+
* Storage only ever holds a non-empty record, so no Object.keys() is needed.
|
|
1281
1291
|
*/
|
|
1282
1292
|
declare function hasGlobalKeyframes(): boolean;
|
|
1283
|
-
/**
|
|
1284
|
-
* Get global keyframes configuration.
|
|
1285
|
-
* Returns null if no keyframes configured (fast path for zero-overhead).
|
|
1286
|
-
*/
|
|
1287
|
-
declare function getGlobalKeyframes(): Record<string, KeyframesSteps> | null;
|
|
1288
|
-
/**
|
|
1289
|
-
* Get global font-face configuration.
|
|
1290
|
-
* Returns null if no font faces configured.
|
|
1291
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1292
|
-
*/
|
|
1293
|
-
declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
|
|
1294
|
-
/**
|
|
1295
|
-
* Get global counter-style configuration.
|
|
1296
|
-
* Returns null if no counter styles configured.
|
|
1297
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1298
|
-
*/
|
|
1299
|
-
declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
|
|
1300
|
-
/**
|
|
1301
|
-
* Get global @function configuration.
|
|
1302
|
-
* Returns null if no functions configured.
|
|
1303
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1304
|
-
*/
|
|
1305
|
-
declare function getGlobalFunctions(): Record<string, FunctionDefinition> | null;
|
|
1306
1293
|
/**
|
|
1307
1294
|
* Check if any global recipes are configured.
|
|
1308
1295
|
* Fast path: returns false if no recipes were ever set.
|
|
@@ -1358,6 +1345,5 @@ declare function getNamePrefix(): string;
|
|
|
1358
1345
|
* Clears the global injector and allows reconfiguration.
|
|
1359
1346
|
*/
|
|
1360
1347
|
declare function resetConfig(): void;
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
//# sourceMappingURL=config-LfIDmVHx.d.ts.map
|
|
1348
|
+
export { PropHandlerProps as C, getGlobalKeyframes as D, getGlobalFunctions as E, PropHandlerDefinition as S, getGlobalFontFaces as T, FunctionsConfig as _, getNamePrefix as a, SheetManager as b, isConfigLocked as c, TastyPlugin as d, TastyPluginFactory as f, ColorSpace as g, generateTypographyTokens as h, getGlobalRecipes as i, isTestEnvironment as l, TypographyTokenValue as m, configure as n, hasGlobalKeyframes as o, TypographyPreset as p, getConfig as r, hasGlobalRecipes as s, TastyConfig as t, resetConfig as u, ParseFunction as v, getGlobalCounterStyles as w, PropHandler as x, StyleInjector as y };
|
|
1349
|
+
//# sourceMappingURL=config-Chmu-PnP.d.ts.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { $ as
|
|
3
|
-
import {
|
|
4
|
-
import { t as mergeStyles } from "../merge-styles-
|
|
5
|
-
export { APPEARANCE_CHUNK_STYLES, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComputeStylesOptions, type ComputeStylesResult, type ConditionNode, type ConfigTokenValue, type ConfigTokens, type ContainerStyleProps, type CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectOptions, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, type TastyConfig, type TastyCustomProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPresetNames, type TastyThemeNames, type TextStyleProps, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy,
|
|
1
|
+
import { $ as TastyNamedColors, A as resetStyleBatch, B as getGlobalPredefinedStates, C as SheetInfo, Ct as StyleParser, D as QueuedWrite, Dt as StyleDetailsPart, E as StyleUsage, Et as StyleDetails, F as parseStateKey, G as NoType, H as ConditionNode, I as AtRuleContext, J as Selector, K as NotSelector, L as ParsedAdvancedState, M as StyleResult, N as renderStyles, O as flushStyles, Ot as UnitHandler, P as ParseStateKeyOptions, Q as SuffixForSelector, R as StateParserContext, S as RuleInfo, St as stringifyStyles, T as StyleRule, Tt as ProcessedStyle, U as ConfigTokenValue, V as setGlobalPredefinedStates, W as ConfigTokens, X as StylesInterface, Y as Styles, Z as StylesWithoutSelectors, _ as KeyframesSteps, _t as getGlobalParser, a as FontFaceInput, at as ParsedColor, b as RawCSSResult, bt as parseColor, c as GCConfig, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, et as TastyPresetNames, f as InjectResult, ft as StyleMap, g as KeyframesResult, gt as filterMods, h as KeyframesInfo, ht as StyleValueStateMap, i as FontFaceDescriptors, it as DIRECTIONS, j as RenderResult, k as hasPendingStyleWrites, kt as CSSProperties, l as GCOptions, lt as StyleHandlerDefinition, m as KeyframesCacheEntry, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, p as InjectionMode, pt as StylePropValue, q as RecipeStyles, r as DisposeFunction, rt as CUSTOM_UNITS, s as FunctionParameter, st as ResolvedStyleValue, t as CacheMetrics, tt as AnyStyleHandler, ut as StyleHandlerProps, v as PropertyDefinition, vt as getGlobalPredefinedTokens, w as StyleInjectorConfig, wt as ParserOptions, x as RootRegistry, xt as parseStyle, y as PropertyOptions, yt as normalizeColorTokenValue, z as createStateParserContext } from "../types-DbMN-Yyn.js";
|
|
2
|
+
import { $ as createColorFunc, $t as ModValue, A as keyframes, An as hexToRgb, B as styleHandlers, C as getRawCSSText, Cn as TEXT_STYLES, D as injectRawCSS, Dn as isSelector, E as injectGlobal, En as hasStylesGenerated, F as chunkSheetRegistry, G as ChunkName, Gt as BlockOuterStyleProps, H as categorizeStyleKeys, I as ComputeStylesOptions, J as FONT_CHUNK_STYLES, Jt as ContainerStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as BlockStyleProps, L as ComputeStylesResult, M as property, Mn as strToRgb, N as touch, O as injector, On as getNamedColorHex, P as ChunkSheetRegistry, Q as resolveFunctionColor, Qt as InnerStyleProps, R as computeStyles, S as getCSSTextForNode, Sn as POSITION_STYLES, T as inject, Tn as DEFAULT_ZERO_NAME_PREFIX, U as APPEARANCE_CHUNK_STYLES, Ut as BaseStyleProps, V as ChunkInfo, W as CHUNK_NAMES, Wt as BlockInnerStyleProps, X as POSITION_CHUNK_STYLES, Xt as ExtraBaseStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as DimensionStyleProps, Z as STYLE_TO_CHUNK, Zt as FlowStyleProps, _ as destroy, _n as CONTAINER_STYLES, a as DebugOptions, an as TastyBaseStylePropNames, b as gc, bn as INNER_STYLES, c as tastyDebug, cn as TastyThemeNames, d as modAttrs, dn as Tokens, en as Mods, et as okhstFunction, f as color, fn as BASE_STYLES, g as createInjector, gn as COLOR_STYLES, h as counterStyle, hn as BLOCK_STYLES, i as DebugChunkInfo, in as TagName, j as ownKeyframes, jn as hslToRgbValues, k as isPropertyDefined, kn as getRgbValuesFromRgbaString, l as processTokens, ln as TextStyleProps, m as cleanup, mn as BLOCK_OUTER_STYLES, n as CacheStatus, nn as PositionStyleProps, nt as okhslFunction, o as InspectResult, on as TastyCustomProps, p as filterBaseProps, pn as BLOCK_INNER_STYLES, q as DISPLAY_CHUNK_STYLES, qt as ColorStyleProps, r as ChunkBreakdown, rn as ShortGridStyles, rt as okhslPlugin, s as Summary, sn as TastyExtensionConfig, t as CSSOptions, tn as OuterStyleProps, tt as okhstPlugin, u as resolveRecipes, un as TokenValue, v as fontFace, vn as DIMENSION_STYLES, w as holdKeyframes, wn as DEFAULT_NAME_PREFIX, x as getCSSText, xn as OUTER_STYLES, y as func, yn as FLOW_STYLES, z as defineHandler } from "../index-szujmf6W.js";
|
|
3
|
+
import { C as PropHandlerProps, D as getGlobalKeyframes, E as getGlobalFunctions, S as PropHandlerDefinition, T as getGlobalFontFaces, _ as FunctionsConfig, a as getNamePrefix, b as SheetManager, c as isConfigLocked, d as TastyPlugin, f as TastyPluginFactory, g as ColorSpace, h as generateTypographyTokens, i as getGlobalRecipes, l as isTestEnvironment, m as TypographyTokenValue, n as configure, o as hasGlobalKeyframes, p as TypographyPreset, r as getConfig, s as hasGlobalRecipes, t as TastyConfig, u as resetConfig, v as ParseFunction, w as getGlobalCounterStyles, x as PropHandler, y as StyleInjector } from "../config-Chmu-PnP.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-Cx25bpax.js";
|
|
5
|
+
export { APPEARANCE_CHUNK_STYLES, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComputeStylesOptions, type ComputeStylesResult, type ConditionNode, type ConfigTokenValue, type ConfigTokens, type ContainerStyleProps, type CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectOptions, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, type TastyConfig, type TastyCustomProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPresetNames, type TastyThemeNames, type TextStyleProps, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
|
package/dist/core/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { d as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
1
|
+
import { A as injector, C as getCSSText, D as inject, E as holdKeyframes, F as touch, G as isConfigLocked, H as getNamePrefix, I as ChunkSheetRegistry, J as StyleInjector, K as isTestEnvironment, L as chunkSheetRegistry, M as keyframes, N as ownKeyframes, O as injectGlobal, P as property, Q as hasPendingStyleWrites, R as configure, S as gc, T as getRawCSSText, U as hasGlobalKeyframes, V as getGlobalRecipes, W as hasGlobalRecipes, Y as SheetManager, Z as flushStyles, _ as counterStyle, a as filterBaseProps, b as fontFace, et as resetStyleBatch, g as cleanup, i as modAttrs, j as isPropertyDefined, k as injectRawCSS, o as computeStyles, q as resetConfig, r as processTokens, s as resolveRecipes, v as createInjector, w as getCSSTextForNode, x as func, y as destroy, z as getConfig } from "../chunks/runtime-engine-CHNH2nGy.js";
|
|
2
|
+
import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "../chunks/css-definitions-BkdTqT7G.js";
|
|
3
|
+
import { A as getRgbValuesFromRgbaString, C as createColorFunc, M as hslToRgbValues, P as strToRgb, S as okhslPlugin, b as okhstPlugin, c as getGlobalParser, d as normalizeColorTokenValue, f as parseColor, i as DIRECTIONS, j as hexToRgb, k as getNamedColorHex, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, p as parseStyle, r as CUSTOM_UNITS, t as color, v as stringifyStyles, w as StyleParser, x as okhslFunction, y as okhstFunction } from "../chunks/dsl-BAwiOznp.js";
|
|
4
|
+
import { A as styleHandlers, B as STYLE_TO_CHUNK, E as defineHandler, F as DIMENSION_CHUNK_STYLES, G as setGlobalPredefinedStates, I as DISPLAY_CHUNK_STYLES, K as hasStylesGenerated, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, S as parseStateKey, U as createStateParserContext, W as getGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, z as POSITION_CHUNK_STYLES } from "../chunks/style-engine-DkKH-TqL.js";
|
|
5
|
+
import { n as isSelector, t as mergeStyles } from "../chunks/shared-utils-CYgOs2mp.js";
|
|
6
|
+
import { c as getGlobalFontFaces, l as getGlobalFunctions, s as getGlobalCounterStyles, u as getGlobalKeyframes } from "../chunks/runtime-state-BxLKsQzs.js";
|
|
7
|
+
import { i as generateTypographyTokens } from "../chunks/config-engine-C7OUmM1J.js";
|
|
8
|
+
import { t as tastyDebug } from "../chunks/debug-CwGMB2RI.js";
|
|
9
|
+
export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, FLOW_STYLES, FONT_CHUNK_STYLES, INNER_STYLES, LAYOUT_CHUNK_STYLES, OUTER_STYLES, POSITION_CHUNK_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side cache hydration for SSR/RSC.
|
|
3
|
+
*
|
|
4
|
+
* Registers class names rendered on the server with the client injector. If
|
|
5
|
+
* the runtime is not initialized yet, registration is deferred until its first
|
|
6
|
+
* use. With hash-based naming, only the class name list needs to cross the
|
|
7
|
+
* wire — no cache keys or counters.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Hydrate the client-side style registry from the server's class name list.
|
|
11
|
+
*
|
|
12
|
+
* Call this before ReactDOM.hydrateRoot() or ensure it runs before
|
|
13
|
+
* any tasty() component renders on the client.
|
|
14
|
+
*
|
|
15
|
+
* When called without arguments, reads the class list from `window.__TASTY__`
|
|
16
|
+
* (populated by inline scripts emitted during SSR/RSC streaming).
|
|
17
|
+
*/
|
|
18
|
+
declare function hydrateTastyClasses(classes?: string[]): void;
|
|
19
|
+
export { hydrateTastyClasses as t };
|
|
20
|
+
//# sourceMappingURL=hydrate-CTh8SGd9.d.ts.map
|