@tenphi/tasty 0.0.0-snapshot.8a8eb7d → 0.0.0-snapshot.8be165d
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 +176 -131
- package/dist/astro-C_by9qPq.js +307 -0
- package/dist/astro-C_by9qPq.js.map +1 -0
- package/dist/{async-storage-B7_o6FKt.js → async-storage-DKK-wTD4.js} +1 -1
- package/dist/{async-storage-B7_o6FKt.js.map → async-storage-DKK-wTD4.js.map} +1 -1
- package/dist/babel-BUQGeOXA.d.ts +83 -0
- package/dist/{collector-o-UYCV-b.js → collector-BevHh16N.js} +108 -24
- package/dist/collector-BevHh16N.js.map +1 -0
- package/dist/{collector-CpU85p2G.d.ts → collector-CLVr5_p3.d.ts} +62 -7
- package/dist/{config-DOvjo65E.js → config-NcdqU9PC.js} +2812 -1496
- package/dist/config-NcdqU9PC.js.map +1 -0
- package/dist/{config-3h7BtX4l.d.ts → config-YsxGv4tq.d.ts} +351 -33
- package/dist/{context-CkSg-kDT.js → context-CA8YKeMn.js} +1 -1
- package/dist/{context-CkSg-kDT.js.map → context-CA8YKeMn.js.map} +1 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +6 -6
- package/dist/{core-CPx5Lqjr.js → core-D7s7u-k1.js} +150 -182
- package/dist/core-D7s7u-k1.js.map +1 -0
- package/dist/{css-writer-DJvsfR1w.js → css-writer-BDPmetHV.js} +54 -15
- package/dist/css-writer-BDPmetHV.js.map +1 -0
- package/dist/{format-global-rules-Dbc_1tc3.js → format-global-rules-DklyaXv-.js} +1 -1
- package/dist/{format-global-rules-Dbc_1tc3.js.map → format-global-rules-DklyaXv-.js.map} +1 -1
- package/dist/{format-rules-aRlqFAd1.js → format-rules-BQCn7JZH.js} +4 -17
- package/dist/format-rules-BQCn7JZH.js.map +1 -0
- package/dist/{hydrate-Ddw7yjyx.js → hydrate-C3cfqlaQ.js} +3 -11
- package/dist/{hydrate-Ddw7yjyx.js.map → hydrate-C3cfqlaQ.js.map} +1 -1
- package/dist/{index-C_SRmAWj.d.ts → index-CBK778ne.d.ts} +294 -161
- package/dist/{index-BsJz5xBF.d.ts → index-Cd45t5NM.d.ts} +297 -62
- package/dist/index.d.ts +5 -5
- package/dist/index.js +250 -60
- package/dist/index.js.map +1 -1
- package/dist/{keyframes-C4ObN2Vc.js → keyframes-ByhOtsXB.js} +97 -199
- package/dist/keyframes-ByhOtsXB.js.map +1 -0
- package/dist/{merge-styles-BbyWO2Gc.js → merge-styles-BKfagXfV.js} +2 -2
- package/dist/{merge-styles-BbyWO2Gc.js.map → merge-styles-BKfagXfV.js.map} +1 -1
- package/dist/{merge-styles-BzOwGOGC.d.ts → merge-styles-CU7JbEwg.d.ts} +2 -2
- package/dist/{resolve-recipes-CqTtBOKx.js → resolve-recipes-vvygrWLw.js} +3 -3
- package/dist/{resolve-recipes-CqTtBOKx.js.map → resolve-recipes-vvygrWLw.js.map} +1 -1
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro-client.js.map +1 -1
- package/dist/ssr/astro-middleware-extract-static.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract-static.js +9 -0
- package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
- package/dist/ssr/astro-middleware-extract.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract.js +9 -0
- package/dist/ssr/astro-middleware-extract.js.map +1 -0
- package/dist/ssr/astro-middleware-static.d.ts +18 -0
- package/dist/ssr/astro-middleware-static.js +18 -0
- package/dist/ssr/astro-middleware-static.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +11 -7
- package/dist/ssr/astro-middleware.js +10 -10
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +37 -7
- package/dist/ssr/astro.js +2 -147
- package/dist/ssr/index.d.ts +2 -9
- package/dist/ssr/index.js +5 -5
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next.d.ts +2 -3
- package/dist/ssr/next.js +6 -7
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +2 -2
- package/dist/static/index.js +4 -4
- package/dist/static/index.js.map +1 -1
- package/dist/static/inject.js.map +1 -1
- package/dist/zero/babel.d.ts +2 -81
- package/dist/zero/babel.js +27 -23
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +16 -2
- package/dist/zero/index.js +2 -2
- package/dist/zero/next.d.ts +1 -1
- package/dist/zero/next.js +1 -1
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +17 -9
- package/docs/adoption.md +56 -31
- package/docs/ai-agents.md +224 -0
- package/docs/comparison.md +69 -40
- package/docs/configuration.md +470 -85
- package/docs/debug.md +7 -7
- package/docs/design-system.md +43 -24
- package/docs/dsl.md +407 -185
- package/docs/getting-started.md +60 -39
- package/docs/injector.md +58 -5
- package/docs/methodology.md +44 -38
- package/docs/migration-v3.md +285 -0
- package/docs/pipeline.md +4 -7
- package/docs/plugins.md +353 -0
- package/docs/react-api.md +142 -42
- package/docs/runtime-benchmarks.md +216 -0
- package/docs/ssr.md +132 -86
- package/docs/styles.md +56 -9
- package/docs/tasty-static.md +140 -105
- package/package.json +50 -18
- package/tasty.config.ts +4 -0
- package/dist/collector-o-UYCV-b.js.map +0 -1
- package/dist/config-DOvjo65E.js.map +0 -1
- package/dist/core-CPx5Lqjr.js.map +0 -1
- package/dist/css-writer-DJvsfR1w.js.map +0 -1
- package/dist/format-rules-aRlqFAd1.js.map +0 -1
- package/dist/keyframes-C4ObN2Vc.js.map +0 -1
- package/dist/ssr/astro.js.map +0 -1
|
@@ -1,5 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as SheetInfo, Et as RuleInfo, Ot as StyleInjectorConfig, P as StyleHandlerDefinition, St as PropertyDefinition, Tt as RootRegistry, b as Styles, bt as KeyframesResult, dt as FunctionDefinition, gt as InjectResult, h as ConfigTokens, ht as GlobalInjectResult, it as UnitHandler, kt as StyleRule, lt as FontFaceDescriptors, mt as GCOptions, n as StyleResult, nt as StyleDetails, ot as CacheMetrics, pt as GCConfig, st as CounterStyleDescriptors, ut as FontFaceInput, v as RecipeStyles, wt as RawCSSResult, xt as KeyframesSteps, yt as KeyframesInfo } from "./index-Cd45t5NM.js";
|
|
2
2
|
|
|
3
|
+
//#region src/prop-handlers.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Props middleware for tasty components.
|
|
6
|
+
*
|
|
7
|
+
* A prop handler receives a component's props and returns them, changed or not.
|
|
8
|
+
* That makes it the extension point for props that are *not* style properties:
|
|
9
|
+
* it can read a custom prop, strip it so it never reaches the DOM, and fold its
|
|
10
|
+
* meaning into `styles`, `mods`, `tokens`, `variant`, or `as`.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* configure({
|
|
14
|
+
* propHandlers: {
|
|
15
|
+
* glaze: (props) => {
|
|
16
|
+
* const { glaze, ...rest } = props;
|
|
17
|
+
* if (!glaze) return rest;
|
|
18
|
+
* return { ...rest, styles: mergeStyles(glazeStyles(glaze), rest.styles) };
|
|
19
|
+
* },
|
|
20
|
+
* },
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Handlers run on every render of every tasty component, so the registry is a
|
|
25
|
+
* pre-composed chain that is `null` while nothing is registered — the cost when
|
|
26
|
+
* unused is one property load and one branch.
|
|
27
|
+
*/
|
|
28
|
+
/** Props object handed to a prop handler. Deliberately untyped: handlers see everything. */
|
|
29
|
+
type PropHandlerProps = Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Props middleware: props in, props out. Returning nothing means "unchanged".
|
|
32
|
+
*
|
|
33
|
+
* Must be a **pure function** and must not mutate its input. Style values are
|
|
34
|
+
* cached by object identity, so mutating a value object in place produces a stale
|
|
35
|
+
* class name and stale CSS. Return fresh (ideally frozen, ideally memoized)
|
|
36
|
+
* objects instead.
|
|
37
|
+
*/
|
|
38
|
+
type PropHandler = (props: PropHandlerProps) => PropHandlerProps | void | null;
|
|
39
|
+
/**
|
|
40
|
+
* How a prop handler is declared. The map key is both its name and, by default,
|
|
41
|
+
* the prop that triggers it.
|
|
42
|
+
*
|
|
43
|
+
* - `fn` — triggered when a prop matching the key is present
|
|
44
|
+
* - `['glaze', fn]` — triggered by the named prop
|
|
45
|
+
* - `[['glaze', 'tone'], fn]` — triggered by any of them
|
|
46
|
+
* - `['*', fn]` — unconditional; runs on every render of every component
|
|
47
|
+
*/
|
|
48
|
+
type PropHandlerDefinition = PropHandler | [string, PropHandler] | [string[], PropHandler];
|
|
49
|
+
//#endregion
|
|
3
50
|
//#region src/injector/sheet-manager.d.ts
|
|
4
51
|
declare class SheetManager {
|
|
5
52
|
private rootRegistries;
|
|
@@ -20,6 +67,19 @@ declare class SheetManager {
|
|
|
20
67
|
* abstracting away adopted vs style-element modes.
|
|
21
68
|
*/
|
|
22
69
|
getCSSSheet(sheetInfo: SheetInfo): CSSStyleSheet | null;
|
|
70
|
+
/**
|
|
71
|
+
* Record an inserted rule text at its rule index (text mode only).
|
|
72
|
+
*
|
|
73
|
+
* `textRules` mirrors the sheet's rule order. `textContent` cannot be edited
|
|
74
|
+
* rule-by-rule the way CSSOM can, so keeping the texts is what makes
|
|
75
|
+
* deletion possible at all in this mode.
|
|
76
|
+
*/
|
|
77
|
+
private trackTextRule;
|
|
78
|
+
/**
|
|
79
|
+
* Remove rule indices from a text-mode sheet and rewrite the element's text.
|
|
80
|
+
* Returns the indices that were actually removed.
|
|
81
|
+
*/
|
|
82
|
+
private deleteTextRules;
|
|
23
83
|
/**
|
|
24
84
|
* Determine the injection mode for a root.
|
|
25
85
|
* ShadowRoot uses adopted stylesheets when supported; Document uses <style> elements.
|
|
@@ -105,7 +165,7 @@ declare class SheetManager {
|
|
|
105
165
|
/**
|
|
106
166
|
* Get CSS text from all sheets (for SSR)
|
|
107
167
|
*/
|
|
108
|
-
|
|
168
|
+
getCSSText(registry: RootRegistry): string;
|
|
109
169
|
/**
|
|
110
170
|
* Get cache performance metrics
|
|
111
171
|
*/
|
|
@@ -183,6 +243,36 @@ declare class StyleInjector {
|
|
|
183
243
|
private rscClassRegex;
|
|
184
244
|
/** @internal — exposed for debug utilities only */
|
|
185
245
|
get _sheetManager(): SheetManager;
|
|
246
|
+
/**
|
|
247
|
+
* Whether sheet writes should be queued instead of applied immediately.
|
|
248
|
+
*
|
|
249
|
+
* Only ever true on the client: SSR collects CSS as text and the RSC path
|
|
250
|
+
* returns it as strings, so neither has a live sheet to batch writes against.
|
|
251
|
+
*
|
|
252
|
+
* In the default `true` mode a write is only queued inside an open batch
|
|
253
|
+
* window — a commit in which `<TastyBatchProvider>` rendered and will
|
|
254
|
+
* therefore flush in its insertion effect, before any layout effect can
|
|
255
|
+
* measure. Everything else falls through to a synchronous write, so enabling
|
|
256
|
+
* the flag cannot make a `useLayoutEffect` read an unstyled element.
|
|
257
|
+
* `'always'` drops the gate and accepts that trade for wider coverage.
|
|
258
|
+
*/
|
|
259
|
+
private get batching();
|
|
260
|
+
/**
|
|
261
|
+
* Apply a sheet write now, or queue it when batching is on.
|
|
262
|
+
* Returns the queue handle when deferred, so the caller can cancel it if it
|
|
263
|
+
* disposes before the flush.
|
|
264
|
+
*/
|
|
265
|
+
private writeSheet;
|
|
266
|
+
/**
|
|
267
|
+
* Insert a global (non-class) rule, honouring batching.
|
|
268
|
+
*
|
|
269
|
+
* `onApplied` records the caller's dedupe bookkeeping. When the write is
|
|
270
|
+
* queued it runs eagerly, so a repeat call before the flush bails out instead
|
|
271
|
+
* of queueing the same rule twice — the same reasoning as
|
|
272
|
+
* `insertPropertyRule`'s eager marking. When written synchronously it runs
|
|
273
|
+
* only on success, preserving the existing retry-on-failure behaviour.
|
|
274
|
+
*/
|
|
275
|
+
private writeGlobalRule;
|
|
186
276
|
constructor(config?: StyleInjectorConfig);
|
|
187
277
|
/**
|
|
188
278
|
* Generate a deterministic class name from a cache key using content hash.
|
|
@@ -254,13 +344,13 @@ declare class StyleInjector {
|
|
|
254
344
|
/**
|
|
255
345
|
* Get CSS text from all sheets (for SSR)
|
|
256
346
|
*/
|
|
257
|
-
|
|
347
|
+
getCSSText(options?: {
|
|
258
348
|
root?: Document | ShadowRoot;
|
|
259
349
|
}): string;
|
|
260
350
|
/**
|
|
261
351
|
* Get CSS only for the provided tasty classNames (e.g., ["t0","t3"])
|
|
262
352
|
*/
|
|
263
|
-
|
|
353
|
+
getCSSTextForClasses(classNames: Iterable<string>, options?: {
|
|
264
354
|
root?: Document | ShadowRoot;
|
|
265
355
|
}): string;
|
|
266
356
|
/**
|
|
@@ -322,11 +412,28 @@ declare class StyleInjector {
|
|
|
322
412
|
/**
|
|
323
413
|
* Inject a CSS @counter-style rule.
|
|
324
414
|
*
|
|
325
|
-
* Permanent and global — no dispose or ref-counting.
|
|
326
|
-
*
|
|
415
|
+
* Permanent and global — no dispose or ref-counting. Deduplicates by name.
|
|
416
|
+
* By default a definition overrides a previously injected one of the same
|
|
417
|
+
* name. Pass `weak: true` for global `configure()` definitions, which must
|
|
418
|
+
* never clobber an existing rule (so component-local definitions win
|
|
419
|
+
* regardless of injection order).
|
|
327
420
|
*/
|
|
328
421
|
counterStyle(name: string, descriptors: CounterStyleDescriptors, options?: {
|
|
329
422
|
root?: Document | ShadowRoot;
|
|
423
|
+
weak?: boolean;
|
|
424
|
+
}): void;
|
|
425
|
+
/**
|
|
426
|
+
* Inject a CSS @function rule (custom function).
|
|
427
|
+
*
|
|
428
|
+
* Permanent and global — no dispose or ref-counting. Deduplicates by function
|
|
429
|
+
* name. By default a definition overrides a previously injected one of the
|
|
430
|
+
* same name. Pass `weak: true` for global `configure()` definitions, which
|
|
431
|
+
* must never clobber an existing rule (so component-local definitions win
|
|
432
|
+
* regardless of injection order).
|
|
433
|
+
*/
|
|
434
|
+
func(name: string, definition: FunctionDefinition, options?: {
|
|
435
|
+
root?: Document | ShadowRoot;
|
|
436
|
+
weak?: boolean;
|
|
330
437
|
}): void;
|
|
331
438
|
/**
|
|
332
439
|
* Inject keyframes and return object with toString() and dispose()
|
|
@@ -377,7 +484,38 @@ declare class StyleInjector {
|
|
|
377
484
|
destroy(root?: Document | ShadowRoot): void;
|
|
378
485
|
}
|
|
379
486
|
//#endregion
|
|
487
|
+
//#region src/functions/index.d.ts
|
|
488
|
+
/**
|
|
489
|
+
* A parse-time function: receives the parsed (comma-separated) argument groups
|
|
490
|
+
* and returns a CSS value string. This is the JS flavor of the unified
|
|
491
|
+
* `functions` config (bare-name keys), distinct from declarative `@function`
|
|
492
|
+
* definitions (`$$`-prefixed keys).
|
|
493
|
+
*/
|
|
494
|
+
type ParseFunction = (groups: StyleDetails[]) => string;
|
|
495
|
+
/**
|
|
496
|
+
* The unified `functions` map: keys are either bare names (parse functions,
|
|
497
|
+
* value is a function) or `$$name`/`$name`/`--name` (declarative CSS functions,
|
|
498
|
+
* value is a {@link FunctionDefinition} object).
|
|
499
|
+
*/
|
|
500
|
+
type FunctionsConfig = Record<string, FunctionDefinition | ParseFunction>;
|
|
501
|
+
//#endregion
|
|
380
502
|
//#region src/utils/color-space.d.ts
|
|
503
|
+
/**
|
|
504
|
+
* Color handling that survives into the emitted CSS.
|
|
505
|
+
*
|
|
506
|
+
* Tasty does not rewrite a color into a particular color space: opacity is
|
|
507
|
+
* applied with CSS relative color syntax, which reads the channels off whatever
|
|
508
|
+
* the browser resolves a value to, so a color is emitted exactly as authored.
|
|
509
|
+
* What is left here is how an alpha gets applied, and the one distinction that
|
|
510
|
+
* matters — replacing a token's alpha versus composing onto an inherited one.
|
|
511
|
+
*/
|
|
512
|
+
/**
|
|
513
|
+
* The color space a `#name` token's value used to be rewritten into.
|
|
514
|
+
*
|
|
515
|
+
* @deprecated Kept for the `colorSpace` config option, which no longer has any
|
|
516
|
+
* effect. Colors are emitted as authored and opacity is always applied in
|
|
517
|
+
* `oklch` through relative color syntax.
|
|
518
|
+
*/
|
|
381
519
|
type ColorSpace = 'rgb' | 'hsl' | 'oklch';
|
|
382
520
|
//#endregion
|
|
383
521
|
//#region src/utils/typography.d.ts
|
|
@@ -441,8 +579,12 @@ declare function generateTypographyTokens(presets: Record<string, TypographyPres
|
|
|
441
579
|
interface TastyPlugin {
|
|
442
580
|
/** Unique name for the plugin (used for debugging and conflict detection) */
|
|
443
581
|
name: string;
|
|
444
|
-
/**
|
|
445
|
-
|
|
582
|
+
/**
|
|
583
|
+
* Custom functions (unified map). Bare keys map to parse functions
|
|
584
|
+
* `(groups) => string`; `$$name` keys map to declarative CSS `@function`
|
|
585
|
+
* definitions. See {@link FunctionsConfig}.
|
|
586
|
+
*/
|
|
587
|
+
functions?: FunctionsConfig;
|
|
446
588
|
/** Custom units that transform numeric values (e.g., `2x` → `calc(2 * var(--gap))`) */
|
|
447
589
|
units?: Record<string, string | UnitHandler>;
|
|
448
590
|
/** Custom state aliases (e.g., `'@mobile': '@media(w < 768px)'`) */
|
|
@@ -461,11 +603,37 @@ interface TastyPlugin {
|
|
|
461
603
|
* ```
|
|
462
604
|
*/
|
|
463
605
|
handlers?: Record<string, StyleHandlerDefinition>;
|
|
606
|
+
/**
|
|
607
|
+
* Props middleware for every tasty component — props in, props out. The
|
|
608
|
+
* extension point for props that are not style properties: read a custom prop,
|
|
609
|
+
* strip it so it never reaches the DOM, and fold its meaning into `styles`,
|
|
610
|
+
* `mods`, `tokens`, `variant`, or `as`.
|
|
611
|
+
*
|
|
612
|
+
* Must be pure and must not mutate its input.
|
|
613
|
+
* See {@link TastyConfig.propHandlers}.
|
|
614
|
+
* @example
|
|
615
|
+
* ```ts
|
|
616
|
+
* propHandlers: {
|
|
617
|
+
* glaze: (props) => {
|
|
618
|
+
* const { glaze, ...rest } = props;
|
|
619
|
+
* if (!glaze) return rest;
|
|
620
|
+
* return { ...rest, styles: mergeStyles(glazeStyles(glaze), rest.styles) };
|
|
621
|
+
* },
|
|
622
|
+
* }
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
625
|
+
propHandlers?: Record<string, PropHandlerDefinition>;
|
|
626
|
+
/**
|
|
627
|
+
* Style properties exposed as top-level props on every tasty component, in
|
|
628
|
+
* addition to the built-in base styles.
|
|
629
|
+
* See {@link TastyConfig.baseStyleProps}.
|
|
630
|
+
*/
|
|
631
|
+
baseStyleProps?: readonly string[];
|
|
464
632
|
/**
|
|
465
633
|
* Design tokens injected as CSS custom properties on `:root`.
|
|
466
634
|
* Values are parsed through the Tasty DSL. Supports state maps.
|
|
467
635
|
* - `$name` → `--name` CSS custom property
|
|
468
|
-
* - `#name` → `--name-color`
|
|
636
|
+
* - `#name` → `--name-color`
|
|
469
637
|
*/
|
|
470
638
|
tokens?: ConfigTokens;
|
|
471
639
|
/** Predefined tokens replaced during style parsing (`$name` or `#name`) */
|
|
@@ -492,6 +660,19 @@ interface TastyPlugin {
|
|
|
492
660
|
* Supports the full Tasty style syntax.
|
|
493
661
|
*/
|
|
494
662
|
globalStyles?: Record<string, Styles>;
|
|
663
|
+
/**
|
|
664
|
+
* Global CSS `@property` definitions. A plugin whose handler or prop handler
|
|
665
|
+
* emits a custom property usually wants one, so the property animates and
|
|
666
|
+
* inherits correctly instead of being treated as an untyped string.
|
|
667
|
+
* See {@link TastyConfig.properties}.
|
|
668
|
+
*/
|
|
669
|
+
properties?: Record<string, PropertyDefinition>;
|
|
670
|
+
/** Global keyframes, injected only when referenced. See {@link TastyConfig.keyframes}. */
|
|
671
|
+
keyframes?: Record<string, KeyframesSteps>;
|
|
672
|
+
/** Global `@font-face` definitions. See {@link TastyConfig.fontFaces}. */
|
|
673
|
+
fontFaces?: Record<string, FontFaceInput>;
|
|
674
|
+
/** Global `@counter-style` definitions. See {@link TastyConfig.counterStyles}. */
|
|
675
|
+
counterStyles?: Record<string, CounterStyleDescriptors>;
|
|
495
676
|
}
|
|
496
677
|
/**
|
|
497
678
|
* A factory function that creates a TastyPlugin.
|
|
@@ -502,13 +683,13 @@ interface TastyPlugin {
|
|
|
502
683
|
* // Plugin without options
|
|
503
684
|
* const okhslPlugin: TastyPluginFactory = () => ({
|
|
504
685
|
* name: 'okhsl',
|
|
505
|
-
*
|
|
686
|
+
* functions: { okhsl: okhslFunction },
|
|
506
687
|
* });
|
|
507
688
|
*
|
|
508
689
|
* // Plugin with options
|
|
509
690
|
* const debugPlugin: TastyPluginFactory<{ verbose: boolean }> = (options) => ({
|
|
510
691
|
* name: 'debug',
|
|
511
|
-
*
|
|
692
|
+
* functions: { debug: createDebugFunc(options.verbose) },
|
|
512
693
|
* });
|
|
513
694
|
* ```
|
|
514
695
|
*/
|
|
@@ -545,30 +726,92 @@ interface TastyConfig {
|
|
|
545
726
|
*/
|
|
546
727
|
units?: Record<string, string | UnitHandler>;
|
|
547
728
|
/**
|
|
548
|
-
* Custom functions
|
|
549
|
-
*
|
|
550
|
-
*
|
|
729
|
+
* Custom functions (merged with existing). A single map holds both flavors,
|
|
730
|
+
* discriminated by value type:
|
|
731
|
+
*
|
|
732
|
+
* - **Bare key + function value** — a parse-time function that processes the
|
|
733
|
+
* parsed argument groups and returns a CSS value. Called as `name(...)`.
|
|
734
|
+
* - **`$$name` key + object value** — a declarative CSS `@function`
|
|
735
|
+
* definition. Called as `$$name(...)` (→ native `--name(...)`).
|
|
736
|
+
*
|
|
737
|
+
* A key whose prefix does not match its value type (object under a bare key,
|
|
738
|
+
* or function under a `$$` key) is ignored with a dev warning.
|
|
739
|
+
*
|
|
740
|
+
* @example
|
|
741
|
+
* ```ts
|
|
742
|
+
* configure({
|
|
743
|
+
* functions: {
|
|
744
|
+
* double: (groups) => `calc(2 * ${groups[0].output})`, // parse function
|
|
745
|
+
* $$negative: { args: ['$value'], result: '(-1 * $value)' }, // CSS function
|
|
746
|
+
* },
|
|
747
|
+
* });
|
|
748
|
+
* ```
|
|
551
749
|
*/
|
|
552
|
-
|
|
750
|
+
functions?: FunctionsConfig;
|
|
553
751
|
/**
|
|
554
|
-
*
|
|
555
|
-
*
|
|
752
|
+
* @deprecated No longer has any effect; will be removed in the next major.
|
|
753
|
+
* Setting it warns in development.
|
|
556
754
|
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
755
|
+
* A `#name` token's value used to be rewritten into this color space so an
|
|
756
|
+
* opacity suffix had numeric channels to write an alpha into. Opacity now uses
|
|
757
|
+
* relative color syntax — `oklch(from var(--name-color) l c h / .5)` — which
|
|
758
|
+
* has the browser read the channels, so a color is emitted exactly as
|
|
759
|
+
* authored and there is nothing left for the setting to decide.
|
|
560
760
|
*
|
|
561
|
-
*
|
|
761
|
+
* To address a token's channels yourself, write relative color syntax against
|
|
762
|
+
* the token: `oklch(from var(--brand-color) calc(l * 1.2) c h)`. It works on
|
|
763
|
+
* every `<color>`, including the ones no conversion could evaluate.
|
|
562
764
|
*/
|
|
563
765
|
colorSpace?: ColorSpace;
|
|
564
766
|
/**
|
|
565
767
|
* Automatically infer and register CSS @property declarations
|
|
566
768
|
* from custom property values found in styles, keyframes, and global config.
|
|
567
769
|
* Covers all types: \<color\>, \<number\>, \<length\>, \<angle\>, \<percentage\>, \<time\>.
|
|
568
|
-
* When false, only explicitly declared @
|
|
770
|
+
* When false, only explicitly declared @property are registered.
|
|
569
771
|
* @default true
|
|
570
772
|
*/
|
|
571
773
|
autoPropertyTypes?: boolean;
|
|
774
|
+
/**
|
|
775
|
+
* Defer stylesheet writes and apply them in one batch instead of performing
|
|
776
|
+
* one `insertRule()` per component during render.
|
|
777
|
+
*
|
|
778
|
+
* Each `insertRule()` on a live sheet invalidates style for that sheet's
|
|
779
|
+
* scope. When components inject during React's render phase while other
|
|
780
|
+
* components read layout in the same pass, the two interleave and the browser
|
|
781
|
+
* is forced to recalculate style between every injection. Batching collapses
|
|
782
|
+
* that into one invalidation per flush.
|
|
783
|
+
*
|
|
784
|
+
* - `false` (default) — inject synchronously, one write per component.
|
|
785
|
+
* - `true` — batch, but only inside a *batch window*: a commit in which
|
|
786
|
+
* `<TastyBatchProvider>` rendered and will therefore flush in its
|
|
787
|
+
* `useInsertionEffect`, before any `useLayoutEffect` runs. Any injection
|
|
788
|
+
* outside a window — a deep update the provider did not re-render for, an
|
|
789
|
+
* injection from a layout effect, an event handler, an async callback — is
|
|
790
|
+
* written straight through. Enabling this can never make a layout effect
|
|
791
|
+
* measure an unstyled element. Requires `<TastyBatchProvider>`; without it
|
|
792
|
+
* nothing is batched (and dev mode says so once).
|
|
793
|
+
* - `'always'` — batch every injection, flushing on a microtask when no
|
|
794
|
+
* window is open. Wins on more commits, but a `useLayoutEffect` that
|
|
795
|
+
* measures a freshly mounted element can read its unstyled box, because
|
|
796
|
+
* microtasks run after the layout phase. Paint is unaffected: microtasks
|
|
797
|
+
* always drain before the browser paints.
|
|
798
|
+
*
|
|
799
|
+
* No effect during SSR or RSC: styles are collected as text there, the
|
|
800
|
+
* runtime injector never runs, and the provider is inert without a
|
|
801
|
+
* `document`. No effect on zero-runtime `tastyStatic` styles either — those
|
|
802
|
+
* are extracted at build time and never reach the injector.
|
|
803
|
+
*
|
|
804
|
+
* @default false
|
|
805
|
+
* @example
|
|
806
|
+
* ```tsx
|
|
807
|
+
* configure({ batchInjection: true });
|
|
808
|
+
*
|
|
809
|
+
* <TastyBatchProvider>
|
|
810
|
+
* <App />
|
|
811
|
+
* </TastyBatchProvider>
|
|
812
|
+
* ```
|
|
813
|
+
*/
|
|
814
|
+
batchInjection?: boolean | 'always';
|
|
572
815
|
/**
|
|
573
816
|
* Garbage collection configuration for unused styles.
|
|
574
817
|
* GC is triggered by touch count: every `touchInterval` touches, the
|
|
@@ -597,7 +840,7 @@ interface TastyConfig {
|
|
|
597
840
|
* `'ts'` (overridable via the same option) so its classes can't
|
|
598
841
|
* collide with runtime classes when both are loaded on the same page.
|
|
599
842
|
*
|
|
600
|
-
* Must match `^[a-zA-
|
|
843
|
+
* Must match `^[a-zA-Z_][a-zA-Z0-9_-]{0,31}$`. Locked once styles
|
|
601
844
|
* have been generated.
|
|
602
845
|
*
|
|
603
846
|
* @default 't'
|
|
@@ -673,7 +916,7 @@ interface TastyConfig {
|
|
|
673
916
|
* @example
|
|
674
917
|
* ```ts
|
|
675
918
|
* configure({
|
|
676
|
-
*
|
|
919
|
+
* fontFaces: {
|
|
677
920
|
* 'Brand Sans': [
|
|
678
921
|
* { src: 'url("/fonts/brand-regular.woff2") format("woff2")', fontWeight: 400, fontDisplay: 'swap' },
|
|
679
922
|
* { src: 'url("/fonts/brand-bold.woff2") format("woff2")', fontWeight: 700, fontDisplay: 'swap' },
|
|
@@ -683,7 +926,7 @@ interface TastyConfig {
|
|
|
683
926
|
* });
|
|
684
927
|
* ```
|
|
685
928
|
*/
|
|
686
|
-
|
|
929
|
+
fontFaces?: Record<string, FontFaceInput>;
|
|
687
930
|
/**
|
|
688
931
|
* Global @counter-style definitions.
|
|
689
932
|
* Keys are counter-style names, values are descriptor objects.
|
|
@@ -691,13 +934,32 @@ interface TastyConfig {
|
|
|
691
934
|
* @example
|
|
692
935
|
* ```ts
|
|
693
936
|
* configure({
|
|
694
|
-
*
|
|
937
|
+
* counterStyles: {
|
|
695
938
|
* thumbs: { system: 'cyclic', symbols: '"👍"', suffix: '" "' },
|
|
696
939
|
* },
|
|
697
940
|
* });
|
|
698
941
|
* ```
|
|
699
942
|
*/
|
|
700
|
-
|
|
943
|
+
counterStyles?: Record<string, CounterStyleDescriptors>;
|
|
944
|
+
/**
|
|
945
|
+
* Opt-in polyfills for not-yet-baseline CSS features. Each key toggles a
|
|
946
|
+
* feature polyfill; all default to `false`.
|
|
947
|
+
*
|
|
948
|
+
* - `functions` — polyfill CSS `@function` by inlining every `$$name(...)`
|
|
949
|
+
* call into plain CSS (calc/var/color-mix) at parse time instead of
|
|
950
|
+
* emitting the native `@function` at-rule. Enables `@function` usage in
|
|
951
|
+
* browsers that don't support it yet (Firefox/Safari). Note this is the
|
|
952
|
+
* `functions` *feature toggle*, distinct from the top-level `functions`
|
|
953
|
+
* definitions map.
|
|
954
|
+
*
|
|
955
|
+
* @example
|
|
956
|
+
* ```ts
|
|
957
|
+
* configure({ polyfills: { functions: true } });
|
|
958
|
+
* ```
|
|
959
|
+
*/
|
|
960
|
+
polyfills?: {
|
|
961
|
+
functions?: boolean;
|
|
962
|
+
};
|
|
701
963
|
/**
|
|
702
964
|
* Custom style handlers that transform style properties into CSS declarations.
|
|
703
965
|
* Handlers replace built-in handlers for the same style name.
|
|
@@ -727,13 +989,63 @@ interface TastyConfig {
|
|
|
727
989
|
* ```
|
|
728
990
|
*/
|
|
729
991
|
handlers?: Record<string, StyleHandlerDefinition>;
|
|
992
|
+
/**
|
|
993
|
+
* Props middleware for every tasty component. A prop handler receives the
|
|
994
|
+
* component's props and returns them, changed or not — the extension point for
|
|
995
|
+
* props that are not style properties.
|
|
996
|
+
*
|
|
997
|
+
* The map key is the handler's name and, by default, the prop that triggers it.
|
|
998
|
+
* Use `['*', fn]` for an unconditional handler, or `[['a', 'b'], fn]` to trigger
|
|
999
|
+
* on any of several props.
|
|
1000
|
+
*
|
|
1001
|
+
* Handlers must be pure and must not mutate their input: style values are cached
|
|
1002
|
+
* by object identity, so mutating one in place yields stale CSS. Memoize the
|
|
1003
|
+
* styles you build per input value.
|
|
1004
|
+
*
|
|
1005
|
+
* Not applicable to zero-runtime mode — `tastyStatic()` takes styles objects, not
|
|
1006
|
+
* props, so there is nothing for middleware to run on. Components rendered
|
|
1007
|
+
* through `tasty()` are unaffected and keep the runtime injector.
|
|
1008
|
+
*
|
|
1009
|
+
* @example
|
|
1010
|
+
* ```ts
|
|
1011
|
+
* configure({
|
|
1012
|
+
* propHandlers: {
|
|
1013
|
+
* glaze: (props) => {
|
|
1014
|
+
* const { glaze, ...rest } = props;
|
|
1015
|
+
* if (!glaze) return rest;
|
|
1016
|
+
* return { ...rest, styles: mergeStyles(glazeStyles(glaze), rest.styles) };
|
|
1017
|
+
* },
|
|
1018
|
+
* },
|
|
1019
|
+
* });
|
|
1020
|
+
*
|
|
1021
|
+
* <Element glaze="purple" />
|
|
1022
|
+
* ```
|
|
1023
|
+
*/
|
|
1024
|
+
propHandlers?: Record<string, PropHandlerDefinition>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Style properties exposed as top-level props on **every** tasty component, in
|
|
1027
|
+
* addition to the built-in base styles, without each component listing them in
|
|
1028
|
+
* `styleProps`.
|
|
1029
|
+
*
|
|
1030
|
+
* Augment `TastyBaseStylePropNames` to type them. Each name costs one property
|
|
1031
|
+
* check per render of every component, so keep the list short; the effect is
|
|
1032
|
+
* app-global and cannot be scoped to a subtree.
|
|
1033
|
+
*
|
|
1034
|
+
* @example
|
|
1035
|
+
* ```ts
|
|
1036
|
+
* configure({ baseStyleProps: ['radius', 'shadow'] });
|
|
1037
|
+
*
|
|
1038
|
+
* <Card radius="1r" shadow />
|
|
1039
|
+
* ```
|
|
1040
|
+
*/
|
|
1041
|
+
baseStyleProps?: readonly string[];
|
|
730
1042
|
/**
|
|
731
1043
|
* Design tokens injected as CSS custom properties on `:root`.
|
|
732
1044
|
* Values are parsed through the Tasty DSL. Supports state maps
|
|
733
1045
|
* for responsive/theme-aware tokens.
|
|
734
1046
|
*
|
|
735
1047
|
* - `$name` keys become `--name` CSS custom properties
|
|
736
|
-
* - `#name` keys become `--name-color`
|
|
1048
|
+
* - `#name` keys become `--name-color` properties
|
|
737
1049
|
*
|
|
738
1050
|
* Tokens are injected once when the first style is rendered.
|
|
739
1051
|
*
|
|
@@ -782,7 +1094,7 @@ interface TastyConfig {
|
|
|
782
1094
|
/**
|
|
783
1095
|
* Predefined style recipes -- named style bundles that can be applied via `recipe` style property.
|
|
784
1096
|
* Recipe values are flat tasty styles (no sub-element keys). They may contain base styles,
|
|
785
|
-
* tokens (`$name`/`#name` definitions), local states, `@keyframes`, and `@
|
|
1097
|
+
* tokens (`$name`/`#name` definitions), local states, `@keyframes`, and `@property`.
|
|
786
1098
|
*
|
|
787
1099
|
* Components reference recipes via: `recipe: 'name1 name2'` in their styles.
|
|
788
1100
|
* Use `/` to separate base recipes from post recipes: `recipe: 'base1 base2 / post1'`.
|
|
@@ -878,13 +1190,19 @@ declare function getGlobalKeyframes(): Record<string, KeyframesSteps> | null;
|
|
|
878
1190
|
* Returns null if no font faces configured.
|
|
879
1191
|
* Reads from globalThis first for cross-module SSR support.
|
|
880
1192
|
*/
|
|
881
|
-
declare function
|
|
1193
|
+
declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
|
|
882
1194
|
/**
|
|
883
1195
|
* Get global counter-style configuration.
|
|
884
1196
|
* Returns null if no counter styles configured.
|
|
885
1197
|
* Reads from globalThis first for cross-module SSR support.
|
|
886
1198
|
*/
|
|
887
|
-
declare function
|
|
1199
|
+
declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
|
|
1200
|
+
/**
|
|
1201
|
+
* Get global @function configuration.
|
|
1202
|
+
* Returns null if no functions configured.
|
|
1203
|
+
* Reads from globalThis first for cross-module SSR support.
|
|
1204
|
+
*/
|
|
1205
|
+
declare function getGlobalFunctions(): Record<string, FunctionDefinition> | null;
|
|
888
1206
|
/**
|
|
889
1207
|
* Check if any global recipes are configured.
|
|
890
1208
|
* Fast path: returns false if no recipes were ever set.
|
|
@@ -941,5 +1259,5 @@ declare function getNamePrefix(): string;
|
|
|
941
1259
|
*/
|
|
942
1260
|
declare function resetConfig(): void;
|
|
943
1261
|
//#endregion
|
|
944
|
-
export {
|
|
945
|
-
//# sourceMappingURL=config-
|
|
1262
|
+
export { ParseFunction as C, PropHandlerDefinition as D, PropHandler as E, PropHandlerProps as O, FunctionsConfig as S, SheetManager as T, TastyPluginFactory as _, getGlobalFontFaces as a, generateTypographyTokens as b, getGlobalRecipes as c, hasGlobalRecipes as d, hasStylesGenerated as f, TastyPlugin as g, resetConfig as h, getGlobalCounterStyles as i, getNamePrefix as l, isTestEnvironment as m, configure as n, getGlobalFunctions as o, isConfigLocked as p, getConfig as r, getGlobalKeyframes as s, TastyConfig as t, hasGlobalKeyframes as u, TypographyPreset as v, StyleInjector as w, ColorSpace as x, TypographyTokenValue as y };
|
|
1263
|
+
//# sourceMappingURL=config-YsxGv4tq.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-CA8YKeMn.js","names":[],"sources":["../src/ssr/context.ts"],"sourcesContent":["/**\n * React context for SSR collector discovery.\n *\n * Used by Next.js TastyRegistry to provide the ServerStyleCollector\n * to useStyles() via React context (the streaming-compatible path).\n *\n * This avoids relying on globalThis for cross-layer communication,\n * which leaks between RSC and SSR module graphs in Next.js App Router.\n *\n * The context is created lazily to avoid calling createContext() at\n * module evaluation time, which would break Server Components that\n * import from `@tenphi/tasty` without using any React hooks.\n */\n\nimport { createContext, type Context } from 'react';\n\nimport type { ServerStyleCollector } from './collector';\n\nlet _ctx: Context<ServerStyleCollector | null> | undefined;\n\nexport function getTastySSRContext(): Context<ServerStyleCollector | null> {\n if (!_ctx) {\n _ctx = createContext<ServerStyleCollector | null>(null);\n }\n return _ctx;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAI;AAEJ,SAAgB,qBAA2D;CACzE,IAAI,CAAC,MACH,OAAO,cAA2C,IAAI;CAExD,OAAO;AACT"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as
|
|
3
|
-
import { $
|
|
4
|
-
import { t as mergeStyles } from "../merge-styles-
|
|
5
|
-
export { APPEARANCE_CHUNK_STYLES, AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps,
|
|
1
|
+
import { C as ParseFunction, D as PropHandlerDefinition, E as PropHandler, O as PropHandlerProps, S as FunctionsConfig, T as SheetManager, _ as TastyPluginFactory, a as getGlobalFontFaces, b as generateTypographyTokens, c as getGlobalRecipes, d as hasGlobalRecipes, f as hasStylesGenerated, g as TastyPlugin, h as resetConfig, i as getGlobalCounterStyles, l as getNamePrefix, m as isTestEnvironment, n as configure, o as getGlobalFunctions, p as isConfigLocked, r as getConfig, s as getGlobalKeyframes, t as TastyConfig, u as hasGlobalKeyframes, v as TypographyPreset, w as StyleInjector, x as ColorSpace, y as TypographyTokenValue } from "../config-YsxGv4tq.js";
|
|
2
|
+
import { $ as StyleParser, A as ParsedColor, At as StyleUsage, B as StyleValueStateMap, C as SuffixForSelector, Ct as PropertyOptions, D as CSSMap, Dt as SheetInfo, E as AnyStyleHandler, Et as RuleInfo, F as StyleHandlerProps, G as parseColor, H as getGlobalParser, I as StyleHandlerResult, J as getNamedColorHex, K as parseStyle, L as StyleMap, M as ResolvedStyleValue, Mt as flushStyles, N as StyleHandler, Nt as hasPendingStyleWrites, O as CUSTOM_UNITS, Ot as StyleInjectorConfig, P as StyleHandlerDefinition, Pt as resetStyleBatch, Q as strToRgb, R as StylePropValue, S as StylesWithoutSelectors, St as PropertyDefinition, T as TastyPresetNames, Tt as RootRegistry, U as getGlobalPredefinedTokens, V as filterMods, W as normalizeColorTokenValue, X as hexToRgb, Y as getRgbValuesFromRgbaString, Z as hslToRgbValues, _ as NotSelector, _t as InjectionMode, a as ParseStateKeyOptions, at as CSSProperties, b as Styles, bt as KeyframesResult, c as ParsedAdvancedState, ct as DisposeFunction, d as getGlobalPredefinedStates, dt as FunctionDefinition, et as ParserOptions, f as setGlobalPredefinedStates, ft as FunctionParameter, g as NoType, gt as InjectResult, h as ConfigTokens, i as renderStyles, it as UnitHandler, j as RawStyleHandler, jt as QueuedWrite, k as DIRECTIONS, kt as StyleRule, l as StateParserContext, lt as FontFaceDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as StyleDetails, o as parseStateKey, ot as CacheMetrics, p as ConditionNode, pt as GCConfig, q as stringifyStyles, r as isSelector, rt as StyleDetailsPart, s as AtRuleContext, st as CounterStyleDescriptors, t as RenderResult, tt as ProcessedStyle, u as createStateParserContext, ut as FontFaceInput, v as RecipeStyles, vt as KeyframesCacheEntry, w as TastyNamedColors, wt as RawCSSResult, x as StylesInterface, xt as KeyframesSteps, y as Selector, yt as KeyframesInfo, z as StyleValue } from "../index-Cd45t5NM.js";
|
|
3
|
+
import { $ as okhstFunction, $t as PositionStyleProps, A as keyframes, B as ChunkInfo, Bt as BaseStyleProps, C as getCSSTextForNode, D as injectRawCSS, E as injectGlobal, F as ComputeStylesOptions, G as DIMENSION_CHUNK_STYLES, Gt as ContainerStyleProps, H as APPEARANCE_CHUNK_STYLES, Ht as BlockOuterStyleProps, I as ComputeStylesResult, J as LAYOUT_CHUNK_STYLES, Jt as FlowStyleProps, K as DISPLAY_CHUNK_STYLES, Kt as DimensionStyleProps, L as computeStyles, M as touch, N as ChunkSheetRegistry, O as injector, P as chunkSheetRegistry, Q as createColorFunc, Qt as OuterStyleProps, R as defineHandler, S as getCSSText, Sn as DEFAULT_ZERO_NAME_PREFIX, T as inject, U as CHUNK_NAMES, Ut as BlockStyleProps, V as categorizeStyleKeys, Vt as BlockInnerStyleProps, W as ChunkName, Wt as ColorStyleProps, X as STYLE_TO_CHUNK, Xt as ModValue, Y as POSITION_CHUNK_STYLES, Yt as InnerStyleProps, Z as resolveFunctionColor, Zt as Mods, _ as createInjector, _n as INNER_STYLES, a as DebugOptions, an as TastyThemeNames, b as func, bn as TEXT_STYLES, c as tastyDebug, cn as Tokens, d as dotize, dn as BLOCK_OUTER_STYLES, en as ShortGridStyles, et as okhstPlugin, f as _modAttrs, fn as BLOCK_STYLES, g as counterStyle, gn as FLOW_STYLES, h as cleanup, hn as DIMENSION_STYLES, i as DebugChunkInfo, in as TastyExtensionConfig, j as property, k as isPropertyDefined, l as processTokens, ln as BASE_STYLES, m as filterBaseProps, mn as CONTAINER_STYLES, n as CacheStatus, nn as TastyBaseStylePropNames, nt as okhslPlugin, o as InspectResult, on as TextStyleProps, p as color, pn as COLOR_STYLES, q as FONT_CHUNK_STYLES, qt as ExtraBaseStyleProps, r as ChunkBreakdown, rn as TastyCustomProps, s as Summary, sn as TokenValue, t as CSSOptions, tn as TagName, tt as okhslFunction, u as resolveRecipes, un as BLOCK_INNER_STYLES, v as destroy, vn as OUTER_STYLES, w as getRawCSSText, x as gc, xn as DEFAULT_NAME_PREFIX, y as fontFace, yn as POSITION_STYLES, z as styleHandlers } from "../index-CBK778ne.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-CU7JbEwg.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 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, dotize, 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, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
|