@tenphi/tasty 0.0.0-snapshot.b2ad8a7 → 0.0.0-snapshot.b317d64
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 +6 -6
- package/dist/babel-types-C_7kRP38.d.ts +18 -0
- package/dist/chunks/async-storage-CG5HnUT5.js +20 -0
- package/dist/chunks/async-storage-CG5HnUT5.js.map +1 -0
- package/dist/chunks/build-config-BDLYGmKn.js +60 -0
- package/dist/chunks/build-config-BDLYGmKn.js.map +1 -0
- package/dist/{collector-DCI2yzwx.js → chunks/collector-DqcB0UUT.js} +25 -119
- package/dist/chunks/collector-DqcB0UUT.js.map +1 -0
- package/dist/chunks/config-engine-CGIMO2PV.js +272 -0
- package/dist/chunks/config-engine-CGIMO2PV.js.map +1 -0
- package/dist/chunks/css-definitions-BibU6ZnP.js +904 -0
- package/dist/chunks/css-definitions-BibU6ZnP.js.map +1 -0
- package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
- package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
- package/dist/chunks/debug-Dy36S1sU.js +502 -0
- package/dist/chunks/debug-Dy36S1sU.js.map +1 -0
- package/dist/chunks/dsl-DRhFWQzo.js +1378 -0
- package/dist/chunks/dsl-DRhFWQzo.js.map +1 -0
- package/dist/chunks/hydration-TRcz5vnk.js +41 -0
- package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
- package/dist/chunks/react-runtime-BljxMd6C.js +582 -0
- package/dist/chunks/react-runtime-BljxMd6C.js.map +1 -0
- package/dist/chunks/runtime-engine-CPYI2bA8.js +2415 -0
- package/dist/chunks/runtime-engine-CPYI2bA8.js.map +1 -0
- package/dist/chunks/runtime-state-C0u1jp-Q.js +141 -0
- package/dist/chunks/runtime-state-C0u1jp-Q.js.map +1 -0
- package/dist/{merge-styles-CzVxdtav.js → chunks/shared-utils-y-HjvPN4.js} +60 -55
- package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
- package/dist/chunks/style-engine-D35rvcdB.js +5420 -0
- package/dist/chunks/style-engine-D35rvcdB.js.map +1 -0
- package/dist/{css-writer-Cq0fg5v8.js → chunks/zero-engine-b--JCZad.js} +51 -146
- package/dist/chunks/zero-engine-b--JCZad.js.map +1 -0
- package/dist/{collector-CQDeU7WS.d.ts → collector-w4mBj5gd.d.ts} +23 -4
- package/dist/{config-CwRr6-fG.d.ts → config-CrZOfNJ5.d.ts} +110 -96
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +9 -6
- package/dist/{index-C0W21Qcb.d.ts → index-CYJtAI9a.d.ts} +243 -281
- package/dist/index.d.ts +5 -5
- package/dist/index.js +11 -998
- package/dist/{merge-styles-Bpwfy1CS.d.ts → merge-styles-VXwJ0Frr.d.ts} +2 -3
- package/dist/ssr/astro-client.d.ts +1 -1
- package/dist/ssr/astro-client.js +1 -14
- package/dist/ssr/astro-client.js.map +1 -1
- package/dist/ssr/astro-middleware-extract-static.d.ts +10 -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 +10 -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 +3 -2
- package/dist/ssr/astro-middleware-static.js +0 -11
- package/dist/ssr/astro-middleware-static.js.map +1 -1
- package/dist/ssr/astro-middleware.d.ts +3 -2
- package/dist/ssr/astro-middleware.js +0 -12
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +40 -6
- package/dist/ssr/astro.js +157 -93
- package/dist/ssr/astro.js.map +1 -1
- package/dist/ssr/index.d.ts +10 -11
- package/dist/ssr/index.js +4 -4
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next-config.d.ts +64 -0
- package/dist/ssr/next-config.js +134 -0
- package/dist/ssr/next-config.js.map +1 -0
- package/dist/ssr/next.d.ts +9 -8
- package/dist/ssr/next.js +29 -43
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +8 -9
- package/dist/static/index.js +4 -22
- package/dist/static/index.js.map +1 -1
- package/dist/static/inject.d.ts +1 -2
- package/dist/{index-DpykQKO8.d.ts → types-JEY8PVYP.d.ts} +986 -972
- package/dist/zero/babel.d.ts +67 -2
- package/dist/zero/babel.js +57 -131
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +44 -8
- package/dist/zero/index.js +24 -2
- package/dist/zero/index.js.map +1 -0
- package/dist/zero/next.d.ts +4 -5
- package/dist/zero/next.js +0 -31
- package/dist/zero/next.js.map +1 -1
- package/docs/ai-agents.md +31 -5
- package/docs/configuration.md +18 -2
- package/docs/debug.md +15 -5
- package/docs/dsl.md +56 -8
- package/docs/getting-started.md +13 -11
- package/docs/injector.md +21 -7
- package/docs/methodology.md +5 -5
- package/docs/pipeline.md +34 -10
- package/docs/plugins.md +1 -1
- package/docs/react-api.md +9 -0
- package/docs/runtime-benchmarks.md +282 -110
- package/docs/ssr.md +179 -20
- package/docs/styles.md +89 -19
- package/docs/tasty-static.md +34 -1
- package/package.json +101 -36
- package/dist/async-storage-DKK-wTD4.js +0 -44
- package/dist/async-storage-DKK-wTD4.js.map +0 -1
- package/dist/babel-B_P8t-f0.d.ts +0 -83
- package/dist/collector-DCI2yzwx.js.map +0 -1
- package/dist/config-B97n_EIv.js +0 -12612
- package/dist/config-B97n_EIv.js.map +0 -1
- package/dist/context-CA8YKeMn.js +0 -24
- package/dist/context-CA8YKeMn.js.map +0 -1
- package/dist/core-DWrUWxog.js +0 -1645
- package/dist/core-DWrUWxog.js.map +0 -1
- package/dist/css-writer-Cq0fg5v8.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-Wb7dJOoL.js +0 -130
- package/dist/format-rules-Wb7dJOoL.js.map +0 -1
- package/dist/hydrate-gFTLBDK9.js +0 -37
- package/dist/hydrate-gFTLBDK9.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/merge-styles-CzVxdtav.js.map +0 -1
- package/dist/renderChunk-COXABoQz.js +0 -290
- package/dist/renderChunk-COXABoQz.js.map +0 -1
- package/dist/resolve-recipes-BnrUEjWV.js +0 -144
- package/dist/resolve-recipes-BnrUEjWV.js.map +0 -1
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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-JEY8PVYP.js";
|
|
2
|
+
//#region src/config-resources.d.ts
|
|
3
|
+
declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
|
|
4
|
+
declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
|
|
5
|
+
declare function getGlobalFunctions(): Record<string, FunctionDefinition> | null;
|
|
6
|
+
/**
|
|
7
|
+
* Get global keyframes configuration.
|
|
8
|
+
* Returns null if no keyframes configured (fast path for zero-overhead).
|
|
9
|
+
*/
|
|
10
|
+
declare function getGlobalKeyframes(): Record<string, KeyframesSteps> | null;
|
|
11
|
+
//#endregion
|
|
3
12
|
//#region src/prop-handlers.d.ts
|
|
4
13
|
/**
|
|
5
14
|
* Props middleware for tasty components.
|
|
@@ -105,6 +114,8 @@ declare class SheetManager {
|
|
|
105
114
|
* Create a style element and append to document
|
|
106
115
|
*/
|
|
107
116
|
private createStyleElement;
|
|
117
|
+
/** Append a rule to a text-mode sheet while preserving its index mirror. */
|
|
118
|
+
private appendTextRule;
|
|
108
119
|
/**
|
|
109
120
|
* Insert CSS rules as a single block
|
|
110
121
|
*/
|
|
@@ -165,6 +176,11 @@ declare class SheetManager {
|
|
|
165
176
|
* Get total number of rules across all sheets
|
|
166
177
|
*/
|
|
167
178
|
getTotalRuleCount(registry: RootRegistry): number;
|
|
179
|
+
/**
|
|
180
|
+
* The CSS of one managed sheet, or `null` when it holds none this can read —
|
|
181
|
+
* an empty style element, or a sheet the engine refuses to hand over.
|
|
182
|
+
*/
|
|
183
|
+
private readSheetCSS;
|
|
168
184
|
/**
|
|
169
185
|
* Get CSS text from all sheets (for SSR)
|
|
170
186
|
*/
|
|
@@ -232,6 +248,28 @@ declare class SheetManager {
|
|
|
232
248
|
/**
|
|
233
249
|
* Get the raw CSS content
|
|
234
250
|
*/
|
|
251
|
+
/**
|
|
252
|
+
* The CSS this injector owns in `root`, one entry per sheet, in the order the
|
|
253
|
+
* engine applies them.
|
|
254
|
+
*
|
|
255
|
+
* `getCSSText()` walks the managed sheets only, and raw CSS has its own —
|
|
256
|
+
* which sits before, after, or *between* them depending on how it got there:
|
|
257
|
+
* prepended to `adoptedStyleSheets`, or wherever in `<head>` the first raw
|
|
258
|
+
* injection happened to land, with every managed sheet opened afterwards
|
|
259
|
+
* following it. Reporting a fixed order would describe the opposite winner
|
|
260
|
+
* from the live page whenever two rules of equal specificity meet, so the raw
|
|
261
|
+
* sheet is spliced in at the position the DOM actually gives it.
|
|
262
|
+
*/
|
|
263
|
+
getOwnedCSSInOrder(registry: RootRegistry, root: Document | ShadowRoot): string[];
|
|
264
|
+
/**
|
|
265
|
+
* Top-level rules in the raw sheet.
|
|
266
|
+
*
|
|
267
|
+
* Read from the sheet the engine parsed, not from the text: a raw block is
|
|
268
|
+
* one string but any number of rules, and one rule — `@keyframes`, `@media` —
|
|
269
|
+
* can contain any number of blocks, so counting braces answers neither
|
|
270
|
+
* question.
|
|
271
|
+
*/
|
|
272
|
+
getRawRuleCount(root: Document | ShadowRoot): number;
|
|
235
273
|
getRawCSSText(root: Document | ShadowRoot): string;
|
|
236
274
|
}
|
|
237
275
|
//#endregion
|
|
@@ -240,24 +278,15 @@ declare class StyleInjector {
|
|
|
240
278
|
private sheetManager;
|
|
241
279
|
private config;
|
|
242
280
|
private globalRuleCounter;
|
|
243
|
-
/** Cancels the scheduled
|
|
281
|
+
/** Cancels the scheduled sweep, whichever timer scheduled it. */
|
|
244
282
|
private cancelPendingGC;
|
|
245
|
-
/** className -> the CSS it stands for, so a collected class can come back. */
|
|
246
|
-
private recipes;
|
|
247
|
-
/**
|
|
248
|
-
* cacheKey -> the class name it resolves to, and whether its CSS has been
|
|
249
|
-
* described yet. A managed render is then one lookup rather than a hash plus
|
|
250
|
-
* a second lookup, which matters because it runs for every chunk of every
|
|
251
|
-
* component on every render.
|
|
252
|
-
*/
|
|
253
|
-
private classNames;
|
|
254
|
-
/** Releases since the last scheduled pass. */
|
|
255
|
-
private releaseCount;
|
|
256
283
|
private namePrefix;
|
|
257
284
|
private classRegex;
|
|
258
285
|
private rscClassRegex;
|
|
259
286
|
/** @internal — exposed for debug utilities only */
|
|
260
287
|
get _sheetManager(): SheetManager;
|
|
288
|
+
/** Register inferable custom properties used by a set of declarations. */
|
|
289
|
+
private inferProperties;
|
|
261
290
|
/**
|
|
262
291
|
* Whether sheet writes should be queued instead of applied immediately.
|
|
263
292
|
*
|
|
@@ -336,6 +365,28 @@ declare class StyleInjector {
|
|
|
336
365
|
getRawCSSText(options?: {
|
|
337
366
|
root?: Document | ShadowRoot;
|
|
338
367
|
}): string;
|
|
368
|
+
/**
|
|
369
|
+
* Take a reference on local `@keyframes`, under the deterministic names the
|
|
370
|
+
* caller resolved.
|
|
371
|
+
*
|
|
372
|
+
* One reference per distinct set of steps, shared by every class that ends up
|
|
373
|
+
* animating it, so a repeat render takes nothing further. Ownership is
|
|
374
|
+
* assigned by `ownKeyframes()` once the rules exist to be inspected.
|
|
375
|
+
*/
|
|
376
|
+
holdKeyframes(steps: Record<string, KeyframesSteps>, names: Map<string, string>, options?: {
|
|
377
|
+
root?: Document | ShadowRoot;
|
|
378
|
+
}): Map<string, string>;
|
|
379
|
+
/**
|
|
380
|
+
* Record that `className` animates these keyframes, so the reference is
|
|
381
|
+
* released when the last such class is collected.
|
|
382
|
+
*
|
|
383
|
+
* Only classes whose rules actually reference the animation should be here:
|
|
384
|
+
* a class that merely rendered alongside one would otherwise keep the
|
|
385
|
+
* keyframes alive for as long as it lives.
|
|
386
|
+
*/
|
|
387
|
+
ownKeyframes(key: string, className: string, options?: {
|
|
388
|
+
root?: Document | ShadowRoot;
|
|
389
|
+
}): void;
|
|
339
390
|
/**
|
|
340
391
|
* Pin an already-injected cacheKey and return the handle that releases it.
|
|
341
392
|
* For callers that skipped the pipeline on a cache hit but still need the
|
|
@@ -460,74 +511,64 @@ declare class StyleInjector {
|
|
|
460
511
|
keyframes(steps: KeyframesSteps, nameOrOptions?: string | {
|
|
461
512
|
root?: Document | ShadowRoot;
|
|
462
513
|
name?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Give this name its own rule even if another name already carries
|
|
516
|
+
* the same steps. Without it two names with identical steps share
|
|
517
|
+
* one rule under whichever name arrived first — fine when the caller
|
|
518
|
+
* only wants the animation, wrong when the name has to be the one it
|
|
519
|
+
* asked for.
|
|
520
|
+
*/
|
|
521
|
+
distinctByName?: boolean;
|
|
463
522
|
}): KeyframesResult;
|
|
464
523
|
/**
|
|
465
524
|
* Dispose keyframes
|
|
466
525
|
*/
|
|
467
526
|
private disposeKeyframes;
|
|
468
527
|
/**
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*/
|
|
473
|
-
/**
|
|
474
|
-
* The class name a cache key resolves to, and whether its CSS is already
|
|
475
|
-
* described. Pure: no allocation beyond the memo, nothing written — safe
|
|
476
|
-
* during render, and stable because the name is a hash of the key.
|
|
477
|
-
*/
|
|
478
|
-
resolveChunk(cacheKey: string): {
|
|
479
|
-
name: string;
|
|
480
|
-
described: boolean;
|
|
481
|
-
};
|
|
482
|
-
/** Whether this class has already been described, so its CSS need not be re-rendered. */
|
|
483
|
-
hasRecipe(className: string): boolean;
|
|
484
|
-
/**
|
|
485
|
-
* Record the CSS a class name stands for without writing it to a sheet.
|
|
486
|
-
*
|
|
487
|
-
* Called during render. Nothing is inserted yet: the component that will
|
|
488
|
-
* carry the class inserts it from here when it commits, so a render that is
|
|
489
|
-
* discarded leaves no rule behind, and a rule collected between render and
|
|
490
|
-
* commit comes back.
|
|
491
|
-
*/
|
|
492
|
-
defineRecipe(className: string, recipe: StyleRecipe): void;
|
|
493
|
-
/**
|
|
494
|
-
* Take up a class on commit: insert its rules if they are not in the sheet,
|
|
495
|
-
* and count one more mounted holder.
|
|
528
|
+
* Count a render, and schedule a collection pass every `touchInterval` of
|
|
529
|
+
* them. Nothing else: what a class is worth keeping is decided by the sweep's
|
|
530
|
+
* own DOM scan, so rendering does not track usage at all.
|
|
496
531
|
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
532
|
+
* @deprecated The class name is ignored — pass anything, or stop calling it.
|
|
533
|
+
* Collection no longer records per-class usage, and scheduling does not need
|
|
534
|
+
* to know which class was rendered. A class handed back by `inject()` is
|
|
535
|
+
* marked wanted there, which is what reuse actually goes through.
|
|
499
536
|
*/
|
|
500
|
-
|
|
537
|
+
touch(_className: string, options?: {
|
|
501
538
|
root?: Document | ShadowRoot;
|
|
502
539
|
}): void;
|
|
503
540
|
/**
|
|
504
|
-
*
|
|
505
|
-
* not deleted here: insertion-effect cleanups and setups interleave component
|
|
506
|
-
* by component, so a sibling mounting the same class must get to say so
|
|
507
|
-
* first. The scheduled pass re-checks before deleting anything.
|
|
508
|
-
*/
|
|
509
|
-
release(className: string, options?: {
|
|
510
|
-
root?: Document | ShadowRoot;
|
|
511
|
-
}): void;
|
|
512
|
-
/**
|
|
513
|
-
* Schedule a collection pass. Runs on all active roots, and avoids
|
|
541
|
+
* Schedule a GC in idle time. Runs GC on all active roots, and avoids
|
|
514
542
|
* double-scheduling.
|
|
515
543
|
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* Deleting on the way past would race that; the pass re-checks instead.
|
|
544
|
+
* Idle only. Without `requestIdleCallback` nothing is collected
|
|
545
|
+
* automatically: running the sweep inline here would put it inside the render
|
|
546
|
+
* that touched the class, and collection is never urgent enough for that.
|
|
520
547
|
*/
|
|
521
548
|
private scheduleGC;
|
|
522
549
|
/**
|
|
523
|
-
* The one definition of "unused":
|
|
524
|
-
*
|
|
525
|
-
* and `tastyDebug` reports it — all through here, so the three can never
|
|
526
|
-
* disagree about what "unused" means.
|
|
550
|
+
* The one definition of "unused": this injector owns the class's rules, no
|
|
551
|
+
* element in `root` carries it, and nobody pinned it.
|
|
527
552
|
*
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* `
|
|
553
|
+
* `gc()` evicts from this set, `getMetrics()` counts it, and `tastyDebug`
|
|
554
|
+
* reports it — all through here, so the three can never disagree about what
|
|
555
|
+
* "unused" means. Entries carry their last `touch()` so callers can drop the
|
|
556
|
+
* oldest first; a class that was never touched sorts as oldest.
|
|
557
|
+
*/
|
|
558
|
+
/**
|
|
559
|
+
* Everything the injector holds falls into one of five bands, and only the
|
|
560
|
+
* last of them is ever deleted:
|
|
561
|
+
*
|
|
562
|
+
* 1. rendered — some element carries the class right now
|
|
563
|
+
* 2. not ours — queued for a batched write, pre-allocated, or server-rendered
|
|
564
|
+
* 3. hot — nothing carries it, but that was noticed less than `grace` ago
|
|
565
|
+
* 4. cached — cold, but within `capacity` when ordered by when it went cold
|
|
566
|
+
* 5. the rest
|
|
567
|
+
*
|
|
568
|
+
* This returns bands 4 and 5 together, most recently cold first; `gc()` draws
|
|
569
|
+
* the capacity line through them. Band 3 is what makes collection safe
|
|
570
|
+
* without a commit signal: a render can resolve a class and commit it a
|
|
571
|
+
* little later, and during that gap nothing on the page carries it.
|
|
531
572
|
*/
|
|
532
573
|
private collectUnused;
|
|
533
574
|
/**
|
|
@@ -974,7 +1015,7 @@ interface TastyConfig {
|
|
|
974
1015
|
* const Spinner = tasty({
|
|
975
1016
|
* styles: {
|
|
976
1017
|
* transform: 'rotate($rotation)',
|
|
977
|
-
* transition: '$$rotation
|
|
1018
|
+
* transition: '$$rotation $transition', // outputs: --rotation var(--transition)
|
|
978
1019
|
* },
|
|
979
1020
|
* });
|
|
980
1021
|
* ```
|
|
@@ -1243,38 +1284,11 @@ declare global {
|
|
|
1243
1284
|
* Detect if we're running in a test environment
|
|
1244
1285
|
*/
|
|
1245
1286
|
declare function isTestEnvironment(): boolean;
|
|
1246
|
-
/**
|
|
1247
|
-
* Check if styles have been generated (configuration is locked)
|
|
1248
|
-
*/
|
|
1249
|
-
declare function hasStylesGenerated(): boolean;
|
|
1250
1287
|
/**
|
|
1251
1288
|
* Check if any global keyframes are configured.
|
|
1252
|
-
*
|
|
1289
|
+
* Storage only ever holds a non-empty record, so no Object.keys() is needed.
|
|
1253
1290
|
*/
|
|
1254
1291
|
declare function hasGlobalKeyframes(): boolean;
|
|
1255
|
-
/**
|
|
1256
|
-
* Get global keyframes configuration.
|
|
1257
|
-
* Returns null if no keyframes configured (fast path for zero-overhead).
|
|
1258
|
-
*/
|
|
1259
|
-
declare function getGlobalKeyframes(): Record<string, KeyframesSteps> | null;
|
|
1260
|
-
/**
|
|
1261
|
-
* Get global font-face configuration.
|
|
1262
|
-
* Returns null if no font faces configured.
|
|
1263
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1264
|
-
*/
|
|
1265
|
-
declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
|
|
1266
|
-
/**
|
|
1267
|
-
* Get global counter-style configuration.
|
|
1268
|
-
* Returns null if no counter styles configured.
|
|
1269
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1270
|
-
*/
|
|
1271
|
-
declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
|
|
1272
|
-
/**
|
|
1273
|
-
* Get global @function configuration.
|
|
1274
|
-
* Returns null if no functions configured.
|
|
1275
|
-
* Reads from globalThis first for cross-module SSR support.
|
|
1276
|
-
*/
|
|
1277
|
-
declare function getGlobalFunctions(): Record<string, FunctionDefinition> | null;
|
|
1278
1292
|
/**
|
|
1279
1293
|
* Check if any global recipes are configured.
|
|
1280
1294
|
* Fast path: returns false if no recipes were ever set.
|
|
@@ -1331,5 +1345,5 @@ declare function getNamePrefix(): string;
|
|
|
1331
1345
|
*/
|
|
1332
1346
|
declare function resetConfig(): void;
|
|
1333
1347
|
//#endregion
|
|
1334
|
-
export {
|
|
1335
|
-
//# sourceMappingURL=config-
|
|
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-CrZOfNJ5.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
|
|
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-JEY8PVYP.js";
|
|
2
|
+
import { $ as createColorFunc, $t as OuterStyleProps, A as keyframes, An as strToRgb, B as styleHandlers, C as getRawCSSText, Cn as DEFAULT_ZERO_NAME_PREFIX, D as injectRawCSS, Dn as getRgbValuesFromRgbaString, E as injectGlobal, En as getNamedColorHex, F as chunkSheetRegistry, G as ChunkName, Gt as ColorStyleProps, H as categorizeStyleKeys, Ht as BlockInnerStyleProps, I as ComputeStylesOptions, J as FONT_CHUNK_STYLES, Jt as ExtraBaseStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as ContainerStyleProps, L as ComputeStylesResult, M as property, N as touch, O as injector, On as hexToRgb, P as ChunkSheetRegistry, Q as resolveFunctionColor, Qt as Mods, R as computeStyles, S as getCSSTextForNode, Sn as DEFAULT_NAME_PREFIX, T as inject, Tn as isSelector, U as APPEARANCE_CHUNK_STYLES, Ut as BlockOuterStyleProps, V as ChunkInfo, Vt as BaseStyleProps, W as CHUNK_NAMES, Wt as BlockStyleProps, X as POSITION_CHUNK_STYLES, Xt as InnerStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as FlowStyleProps, Z as STYLE_TO_CHUNK, Zt as ModValue, _ as destroy, _n as FLOW_STYLES, a as DebugOptions, an as TastyExtensionConfig, b as gc, bn as POSITION_STYLES, c as tastyDebug, cn as TokenValue, d as modAttrs, dn as BLOCK_INNER_STYLES, en as PositionStyleProps, et as okhstFunction, f as color, fn as BLOCK_OUTER_STYLES, g as createInjector, gn as DIMENSION_STYLES, h as counterStyle, hn as CONTAINER_STYLES, i as DebugChunkInfo, in as TastyCustomProps, j as ownKeyframes, k as isPropertyDefined, kn as hslToRgbValues, l as processTokens, ln as Tokens, m as cleanup, mn as COLOR_STYLES, n as CacheStatus, nn as TagName, nt as okhslFunction, o as InspectResult, on as TastyThemeNames, p as filterBaseProps, pn as BLOCK_STYLES, q as DISPLAY_CHUNK_STYLES, qt as DimensionStyleProps, r as ChunkBreakdown, rn as TastyBaseStylePropNames, rt as okhslPlugin, s as Summary, sn as TextStyleProps, t as CSSOptions, tn as ShortGridStyles, tt as okhstPlugin, u as resolveRecipes, un as BASE_STYLES, v as fontFace, vn as INNER_STYLES, w as holdKeyframes, wn as hasStylesGenerated, x as getCSSText, xn as TEXT_STYLES, y as func, yn as OUTER_STYLES, z as defineHandler } from "../index-CYJtAI9a.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-CrZOfNJ5.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-VXwJ0Frr.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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { A as strToRgb, C as StyleParser, D as getRgbValuesFromRgbaString, E as getNamedColorHex, O as hexToRgb, S as createColorFunc, _ as stringifyStyles, b as okhslFunction, c as getGlobalParser, d as parseColor, f as parseStyle, i as DIRECTIONS, k as hslToRgbValues, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, r as CUSTOM_UNITS, t as color, u as normalizeColorTokenValue, v as okhstFunction, x as okhslPlugin, y as okhstPlugin } from "../chunks/dsl-DRhFWQzo.js";
|
|
2
|
+
import { n as isSelector, t as mergeStyles } from "../chunks/shared-utils-y-HjvPN4.js";
|
|
3
|
+
import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "../chunks/css-definitions-BibU6ZnP.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-D35rvcdB.js";
|
|
5
|
+
import { i as generateTypographyTokens } from "../chunks/config-engine-CGIMO2PV.js";
|
|
6
|
+
import { c as getGlobalFunctions, l as getGlobalKeyframes, o as getGlobalCounterStyles, s as getGlobalFontFaces } from "../chunks/runtime-state-C0u1jp-Q.js";
|
|
7
|
+
import { A as ownKeyframes, B as hasGlobalKeyframes, C as holdKeyframes, D as injector, E as injectRawCSS, F as configure, G as StyleInjector, H as isConfigLocked, I as getConfig, J as flushStyles, K as SheetManager, M as touch, N as ChunkSheetRegistry, O as isPropertyDefined, P as chunkSheetRegistry, R as getGlobalRecipes, S as getRawCSSText, T as injectGlobal, U as isTestEnvironment, V as hasGlobalRecipes, W as resetConfig, Y as hasPendingStyleWrites, Z as resetStyleBatch, _ as fontFace, a as filterBaseProps, b as getCSSText, g as destroy, h as createInjector, i as modAttrs, j as property, k as keyframes, m as counterStyle, o as computeStyles, p as cleanup, r as processTokens, s as resolveRecipes, v as func, w as inject, x as getCSSTextForNode, y as gc, z as getNamePrefix } from "../chunks/runtime-engine-CPYI2bA8.js";
|
|
8
|
+
import { t as tastyDebug } from "../chunks/debug-Dy36S1sU.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 };
|