@tenphi/tasty 0.0.0-snapshot.06c8a41 → 0.0.0-snapshot.07ea4a0
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 +408 -385
- package/dist/babel-types-BKDTT4--.d.ts +18 -0
- package/dist/chunks/async-storage-f9j9JRtq.js +37 -0
- package/dist/chunks/async-storage-f9j9JRtq.js.map +1 -0
- package/dist/chunks/build-config-CW4k04_V.js +60 -0
- package/dist/chunks/build-config-CW4k04_V.js.map +1 -0
- package/dist/{collector-B3OsM252.js → chunks/collector-DKWQXEwN.js} +10 -127
- package/dist/chunks/collector-DKWQXEwN.js.map +1 -0
- package/dist/chunks/config-engine-DTglOA78.js +272 -0
- package/dist/chunks/config-engine-DTglOA78.js.map +1 -0
- package/dist/chunks/config-file-DlZXJMj8.js +25 -0
- package/dist/chunks/config-file-DlZXJMj8.js.map +1 -0
- package/dist/chunks/css-definitions-_C7C-daI.js +910 -0
- package/dist/chunks/css-definitions-_C7C-daI.js.map +1 -0
- package/dist/{css-resources-Cyl_axbI.js → chunks/css-resources-P7IBUUZs.js} +2 -9
- package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
- package/dist/chunks/debug-BapJwy9w.js +502 -0
- package/dist/chunks/debug-BapJwy9w.js.map +1 -0
- package/dist/chunks/dsl-DYSJc1-T.js +1383 -0
- package/dist/chunks/dsl-DYSJc1-T.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-DayjnPuC.js +689 -0
- package/dist/chunks/react-runtime-DayjnPuC.js.map +1 -0
- package/dist/chunks/runtime-engine-IwGbSMb4.js +2432 -0
- package/dist/chunks/runtime-engine-IwGbSMb4.js.map +1 -0
- package/dist/chunks/runtime-state-CVrL92zX.js +152 -0
- package/dist/chunks/runtime-state-CVrL92zX.js.map +1 -0
- package/dist/{merge-styles-DuoZEsm9.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-CVmNIjow.js +5521 -0
- package/dist/chunks/style-engine-CVmNIjow.js.map +1 -0
- package/dist/{css-writer-Bgowobbx.js → chunks/zero-engine-igHhzYM6.js} +65 -145
- package/dist/chunks/zero-engine-igHhzYM6.js.map +1 -0
- package/dist/{collector-BTVXj2hS.d.ts → collector-CTU-nl0g.d.ts} +6 -5
- package/dist/{config-LfIDmVHx.d.ts → config-CcxqSZI2.d.ts} +45 -40
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +9 -6
- package/dist/hydrate-CRyjjAyl.d.ts +22 -0
- package/dist/{index-Bm9ltvdH.d.ts → index--GdqCPlp.d.ts} +271 -242
- package/dist/index.d.ts +5 -5
- package/dist/index.js +11 -922
- package/dist/{merge-styles-BcLl1u_d.d.ts → merge-styles-DSkVc6CD.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 +1 -2
- package/dist/ssr/astro-middleware-extract-static.js +1 -1
- package/dist/ssr/astro-middleware-extract.d.ts +1 -2
- package/dist/ssr/astro-middleware-extract.js +1 -1
- package/dist/ssr/astro-middleware-static.d.ts +1 -2
- package/dist/ssr/astro-middleware-static.js +1 -12
- package/dist/ssr/astro-middleware-static.js.map +1 -1
- package/dist/ssr/astro-middleware.d.ts +1 -2
- package/dist/ssr/astro-middleware.js +1 -13
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +8 -16
- package/dist/ssr/astro.js +220 -1
- package/dist/ssr/astro.js.map +1 -0
- package/dist/ssr/client.d.ts +2 -0
- package/dist/ssr/client.js +2 -0
- package/dist/ssr/index.d.ts +5 -25
- package/dist/ssr/index.js +5 -5
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next-config.d.ts +3 -5
- package/dist/ssr/next-config.js +43 -35
- package/dist/ssr/next-config.js.map +1 -1
- package/dist/ssr/next.d.ts +3 -9
- package/dist/ssr/next.js +7 -38
- 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-BmogEzTo.d.ts → types-DJEM_BOJ.d.ts} +852 -860
- package/dist/zero/babel.d.ts +67 -2
- package/dist/zero/babel.js +77 -140
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +62 -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 +3 -38
- 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 +66 -33
- package/docs/comparison.md +9 -8
- package/docs/configuration.md +192 -60
- package/docs/debug.md +5 -7
- package/docs/design-system.md +117 -15
- package/docs/dsl.md +204 -82
- package/docs/getting-started.md +81 -22
- package/docs/injector.md +41 -40
- package/docs/methodology.md +48 -23
- package/docs/migration-v3.md +3 -3
- package/docs/pipeline.md +54 -27
- package/docs/plugins.md +22 -42
- package/docs/react-api.md +72 -9
- package/docs/runtime-benchmarks.md +146 -91
- package/docs/ssr.md +92 -66
- package/docs/styles.md +117 -31
- package/docs/tasty-static.md +162 -58
- package/package.json +96 -38
- package/dist/astro-CeYENy2x.js +0 -301
- package/dist/astro-CeYENy2x.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-B3OsM252.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-DGm0CFHP.js +0 -1732
- package/dist/core-DGm0CFHP.js.map +0 -1
- package/dist/css-resources-Cyl_axbI.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-XRw9u7d4.js +0 -104
- package/dist/format-rules-XRw9u7d4.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-DuoZEsm9.js.map +0 -1
- package/dist/resolve-recipes-H9NqOQuP.js +0 -144
- package/dist/resolve-recipes-H9NqOQuP.js.map +0 -1
- package/dist/ssr-collector-ref-COs_ioWl.js +0 -29
- package/dist/ssr-collector-ref-COs_ioWl.js.map +0 -1
|
@@ -1,8 +1,64 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { Et as StyleDetails, G as NoType, M as StyleResult, X as StylesInterface, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, f as InjectResult, g as KeyframesResult, ht as StyleValueStateMap, i as FontFaceDescriptors, kt as CSSProperties$1, l as GCOptions, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, pt as StylePropValue, st as ResolvedStyleValue, t as CacheMetrics, u as GlobalInjectResult, w as StyleInjectorConfig, y as PropertyOptions } from "./types-DJEM_BOJ.js";
|
|
2
|
+
import { f as TastyPluginFactory, y as StyleInjector } from "./config-CcxqSZI2.js";
|
|
3
|
+
import { t as ServerStyleCollector } from "./collector-CTU-nl0g.js";
|
|
4
|
+
import "./merge-styles-DSkVc6CD.js";
|
|
5
|
+
import React, { AllHTMLAttributes, CSSProperties, ComponentType, ElementType, ForwardRefExoticComponent, JSX, PropsWithoutRef, ReactNode, RefAttributes } from "react";
|
|
6
|
+
//#region src/utils/color-math.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Consolidated color conversion math.
|
|
9
|
+
*
|
|
10
|
+
* Single source of truth for all color space conversions used across the
|
|
11
|
+
* library: sRGB gamma, HSL, OKLab, OKLCH, OKHSL, hex parsing, named
|
|
12
|
+
* colors, and CSS string converters.
|
|
13
|
+
*
|
|
14
|
+
* This module has zero internal imports — it is a leaf dependency.
|
|
15
|
+
*
|
|
16
|
+
* Reference: https://bottosson.github.io/posts/oklab/
|
|
17
|
+
*/
|
|
18
|
+
type Vec3 = [number, number, number];
|
|
19
|
+
/**
|
|
20
|
+
* HSL to RGB.
|
|
21
|
+
* Algorithm from CSS Color 4 spec.
|
|
22
|
+
*
|
|
23
|
+
* @param h - Hue in degrees (0-360)
|
|
24
|
+
* @param s - Saturation (0-1)
|
|
25
|
+
* @param l - Lightness (0-1)
|
|
26
|
+
* @returns RGB values in 0-255 range (may have fractional values)
|
|
27
|
+
*/
|
|
28
|
+
declare function hslToRgbValues(h: number, s: number, l: number): Vec3;
|
|
29
|
+
declare function getNamedColorHex(): Map<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Convert hex color string to `rgb()` CSS string.
|
|
32
|
+
* Supports 3, 4, 6, and 8 character hex values (with or without `#`).
|
|
33
|
+
*/
|
|
34
|
+
declare function hexToRgb(hex: string): string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Extract RGB values from an `rgb()`/`rgba()` string.
|
|
37
|
+
* Supports comma-separated, space-separated, fractional, percentage,
|
|
38
|
+
* and slash alpha notation.
|
|
39
|
+
*
|
|
40
|
+
* @returns Array of RGB values (0-255 range), converting percentages as needed.
|
|
41
|
+
*/
|
|
42
|
+
declare function getRgbValuesFromRgbaString(str: string): number[];
|
|
43
|
+
/**
|
|
44
|
+
* Convert any recognized color string to an `rgb()` CSS string.
|
|
45
|
+
* Handles hex, `okhsl()`, `okhst()`, `hsl()`/`hsla()`, named CSS colors,
|
|
46
|
+
* and `rgb()`/`rgba()` pass-through.
|
|
47
|
+
*/
|
|
48
|
+
declare function strToRgb(color: string, _ignoreAlpha?: boolean): string | null | undefined;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/utils/is-selector.d.ts
|
|
51
|
+
/** Check whether a style-object key identifies a nested CSS selector. */
|
|
52
|
+
declare function isSelector(key: string): boolean;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/config-state.d.ts
|
|
55
|
+
/**
|
|
56
|
+
* Minimal configuration state shared by the style engine, zero-runtime
|
|
57
|
+
* extractor, and runtime configuration module. Keeping it independent
|
|
58
|
+
* prevents pure rendering code from importing the full injector graph.
|
|
59
|
+
*/
|
|
60
|
+
declare function hasStylesGenerated(): boolean;
|
|
61
|
+
//#endregion
|
|
6
62
|
//#region src/utils/name-prefix.d.ts
|
|
7
63
|
/**
|
|
8
64
|
* Name prefix utilities for generated identifiers.
|
|
@@ -31,17 +87,17 @@ declare const DEFAULT_ZERO_NAME_PREFIX = "ts";
|
|
|
31
87
|
//#endregion
|
|
32
88
|
//#region src/styles/list.d.ts
|
|
33
89
|
declare const BASE_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition"];
|
|
34
|
-
declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin"];
|
|
35
|
-
declare const BLOCK_INNER_STYLES: readonly ["padding", "
|
|
36
|
-
declare const BLOCK_OUTER_STYLES: readonly ["border", "radius", "shadow", "outline"];
|
|
37
|
-
declare const BLOCK_STYLES: readonly ["padding", "
|
|
90
|
+
declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding"];
|
|
91
|
+
declare const BLOCK_INNER_STYLES: readonly ["padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign"];
|
|
92
|
+
declare const BLOCK_OUTER_STYLES: readonly ["border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
|
|
93
|
+
declare const BLOCK_STYLES: readonly ["padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
|
|
38
94
|
declare const COLOR_STYLES: readonly ["color", "fill", "fade", "image"];
|
|
39
95
|
declare const TEXT_STYLES: readonly ["textTransform", "fontWeight", "fontStyle"];
|
|
40
|
-
declare const DIMENSION_STYLES: readonly ["width", "height", "flexBasis", "flexGrow", "flexShrink", "flex"];
|
|
96
|
+
declare const DIMENSION_STYLES: readonly ["width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex"];
|
|
41
97
|
declare const FLOW_STYLES: readonly ["flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
|
|
42
|
-
declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "padding", "
|
|
43
|
-
declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "radius", "shadow", "outline"];
|
|
44
|
-
declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "
|
|
98
|
+
declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding", "padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
|
|
99
|
+
declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding", "width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
|
|
100
|
+
declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
|
|
45
101
|
//#endregion
|
|
46
102
|
//#region src/types.d.ts
|
|
47
103
|
/**
|
|
@@ -96,7 +152,7 @@ interface TastyBaseStylePropNames {}
|
|
|
96
152
|
* it names. Intersecting with `keyof StylesInterface` makes a name that isn't a
|
|
97
153
|
* real style inert rather than `never`-typed.
|
|
98
154
|
*/
|
|
99
|
-
type ExtraBaseStyleProps = { [key in keyof TastyBaseStylePropNames & keyof StylesInterface]?: StylePropValue<StylesInterface[key]
|
|
155
|
+
type ExtraBaseStyleProps = { [key in keyof TastyBaseStylePropNames & keyof StylesInterface]?: StylePropValue<StylesInterface[key]>; };
|
|
100
156
|
/** Allowed mod value types */
|
|
101
157
|
type ModValue = boolean | string | number | undefined | null;
|
|
102
158
|
/**
|
|
@@ -247,7 +303,7 @@ interface TastyExtensionConfig {
|
|
|
247
303
|
}
|
|
248
304
|
//#endregion
|
|
249
305
|
//#region src/tasty.d.ts
|
|
250
|
-
type StyleList = readonly (keyof { [key in keyof StylesInterface]: StylesInterface[key] })[];
|
|
306
|
+
type StyleList = readonly (keyof { [key in keyof StylesInterface]: StylesInterface[key]; })[];
|
|
251
307
|
/** Type descriptor for a single mod prop: a JS constructor or an enum array. */
|
|
252
308
|
type ModPropDef = BooleanConstructor | StringConstructor | NumberConstructor | readonly string[];
|
|
253
309
|
/** Array form: list of mod key names (types default to ModValue). */
|
|
@@ -259,7 +315,7 @@ type ModPropsInput = ModPropsList | ModPropsMap;
|
|
|
259
315
|
/** Resolve a single ModPropDef to its TypeScript type. */
|
|
260
316
|
type ResolveModPropDef<T> = T extends BooleanConstructor ? boolean : T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends readonly (infer U)[] ? U : ModValue;
|
|
261
317
|
/** Resolve an entire `modProps` definition to the component prop types it adds. */
|
|
262
|
-
type ResolveModProps<M extends ModPropsInput> = M extends readonly (infer K)[] ? Partial<Record<K & string, ModValue>> : M extends Record<string, ModPropDef> ? { [key in keyof M & string]?: ResolveModPropDef<M[key]
|
|
318
|
+
type ResolveModProps<M extends ModPropsInput> = M extends readonly (infer K)[] ? Partial<Record<K & string, ModValue>> : M extends Record<string, ModPropDef> ? { [key in keyof M & string]?: ResolveModPropDef<M[key]>; } : {};
|
|
263
319
|
/** A token key with `$` or `#` prefix. */
|
|
264
320
|
type TokenPropKey = `$${string}` | `#${string}`;
|
|
265
321
|
/** Array form: list of prop names. Names ending in `Color` map to `#` color tokens. */
|
|
@@ -315,24 +371,43 @@ type SubElementProps<Tag extends keyof JSX.IntrinsicElements = 'div'> = Omit<JSX
|
|
|
315
371
|
/**
|
|
316
372
|
* Generates the sub-element component types from an ElementsDefinition
|
|
317
373
|
*/
|
|
318
|
-
type SubElementComponents<E extends ElementsDefinition> = { [K in keyof E]: ForwardRefExoticComponent<PropsWithoutRef<SubElementProps<ResolveElementTag<E[K]>>> & RefAttributes<ResolveElementTag<E[K]> extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[ResolveElementTag<E[K]>] : Element$1
|
|
374
|
+
type SubElementComponents<E extends ElementsDefinition> = { [K in keyof E]: ForwardRefExoticComponent<PropsWithoutRef<SubElementProps<ResolveElementTag<E[K]>>> & RefAttributes<ResolveElementTag<E[K]> extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[ResolveElementTag<E[K]>] : Element$1>>; };
|
|
319
375
|
/**
|
|
320
376
|
* Base type containing common properties shared between TastyProps and TastyElementOptions.
|
|
321
377
|
* Separated to avoid code duplication while allowing different type constraints.
|
|
322
378
|
*/
|
|
323
379
|
type TastyBaseProps<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = {
|
|
324
|
-
/** Default styles of the element. */
|
|
325
|
-
|
|
326
|
-
|
|
380
|
+
/** Default styles of the element. */
|
|
381
|
+
styles?: Styles;
|
|
382
|
+
/** The list of styles that can be provided by props */
|
|
383
|
+
styleProps?: K;
|
|
384
|
+
/** Modifier keys exposed as top-level component props (array or typed object form). */
|
|
385
|
+
modProps?: M;
|
|
386
|
+
/** Token keys exposed as top-level component props (array or typed object form). */
|
|
327
387
|
tokenProps?: TP;
|
|
328
388
|
element?: BaseProps['element'];
|
|
329
|
-
variants?: V;
|
|
330
|
-
|
|
389
|
+
variants?: V;
|
|
390
|
+
/** Default tokens for inline CSS custom properties */
|
|
391
|
+
tokens?: Tokens;
|
|
392
|
+
/** Sub-element definitions for compound components */
|
|
331
393
|
elements?: E;
|
|
332
|
-
} & Pick<BaseProps, 'qa' | 'qaVal'
|
|
394
|
+
} & Pick<BaseProps, 'qa' | 'qaVal'>;
|
|
395
|
+
/**
|
|
396
|
+
* The names the `variant` option of `tasty(Base, options)` accepts: the
|
|
397
|
+
* extension's own variants and the base's, as its `variant` prop does. A
|
|
398
|
+
* union, not an intersection of the two, so an extension can default to a
|
|
399
|
+
* variant only one of them defines.
|
|
400
|
+
*/
|
|
401
|
+
type ExtensionVariantName<V extends VariantMap, Props> = string extends keyof V ? 'variant' extends keyof Props ? NonNullable<Props['variant' & keyof Props]> : keyof V : keyof V | ('variant' extends keyof Props ? NonNullable<Props['variant' & keyof Props]> : never);
|
|
333
402
|
type TastyProps<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, DefaultProps = AnyProps, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = TastyBaseProps<K, V, E, M, TP> & {
|
|
334
|
-
/** The tag name of the element or a React component. */
|
|
335
|
-
|
|
403
|
+
/** The tag name of the element or a React component. */
|
|
404
|
+
as?: string | ComponentType<any>;
|
|
405
|
+
/**
|
|
406
|
+
* The variant applied when the `variant` prop is omitted or names no
|
|
407
|
+
* variant: one of `variants`, or one of the base component's.
|
|
408
|
+
*/
|
|
409
|
+
variant?: ExtensionVariantName<V, DefaultProps>;
|
|
410
|
+
} & Partial<Omit<DefaultProps, 'as' | 'styles' | 'styleProps' | 'modProps' | 'tokenProps' | 'tokens' | 'variant'>>;
|
|
336
411
|
/**
|
|
337
412
|
* Resolves the props of a polymorphic `as` value (intrinsic tag or component).
|
|
338
413
|
* - For intrinsic tags (`'div'`, `'button'`, ...): returns `JSX.IntrinsicElements[Tag]`.
|
|
@@ -349,15 +424,16 @@ type ResolveAsProps<AsType extends ElementType> = AsType extends keyof JSX.Intri
|
|
|
349
424
|
* Note: Uses a separate index signature with `unknown` instead of an `any`
|
|
350
425
|
* record to ensure strict type checking for styles.
|
|
351
426
|
*/
|
|
352
|
-
type TastyElementOptions<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = TastyBaseProps<K, V, E, M, TP> & {
|
|
353
|
-
/** The tag name of the element or a React component. */
|
|
427
|
+
type TastyElementOptions<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = TastyBaseProps<K, V, E, M, TP> & WithVariant<V> & {
|
|
428
|
+
/** The tag name of the element or a React component. */
|
|
429
|
+
as?: AsType;
|
|
354
430
|
} & Record<string, unknown>;
|
|
355
|
-
type AllBasePropsWithMods<K extends StyleList, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = AllBaseProps & { [key in K[number]]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]
|
|
431
|
+
type AllBasePropsWithMods<K extends StyleList, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = AllBaseProps & { [key in K[number]]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]>; } & BaseStyleProps & ExtraBaseStyleProps & Partial<TastyCustomProps> & ResolveModProps<M> & ResolveTokenProps<TP>;
|
|
356
432
|
/**
|
|
357
|
-
*
|
|
358
|
-
*
|
|
433
|
+
* Props consumed by Tasty rather than forwarded to the `as` component.
|
|
434
|
+
* Event handlers are resolved from JSX.IntrinsicElements or the component's own props.
|
|
359
435
|
*/
|
|
360
|
-
type TastySpecificKeys = 'as' | 'qa' | 'qaVal' | 'element' | 'styles' | 'mods' | 'isHidden' | 'isDisabled' | 'isChecked' | 'style' | 'theme' | 'tokens' | 'ref'
|
|
436
|
+
type TastySpecificKeys = keyof BaseStyleProps | 'as' | 'qa' | 'qaVal' | 'element' | 'styles' | 'mods' | 'isHidden' | 'isDisabled' | 'isChecked' | 'style' | 'theme' | 'tokens' | 'ref';
|
|
361
437
|
/** Extract prop key names from a ModPropsInput (array elements or object keys). */
|
|
362
438
|
type ModPropsKeys<M extends ModPropsInput> = M extends readonly (infer K)[] ? K & string : keyof M & string;
|
|
363
439
|
/** Extract prop key names from a TokenPropsInput (array elements or object keys). */
|
|
@@ -379,7 +455,24 @@ type TokenPropsKeys<TP extends TokenPropsInput> = TP extends readonly (infer K)[
|
|
|
379
455
|
* is a component type with a narrower prop API.
|
|
380
456
|
*/
|
|
381
457
|
type TastyElementProps<K extends StyleList, V extends VariantMap, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = Omit<AllBasePropsWithMods<K, M, TP>, Exclude<keyof ResolveAsProps<AsType>, TastySpecificKeys | keyof TastyCustomProps | keyof ExtraBaseStyleProps | K[number] | ModPropsKeys<M> | TokenPropsKeys<TP>>> & WithVariant<V> & Omit<Omit<AllHTMLAttributes<HTMLElement>, keyof ResolveAsProps<AsType>> & ResolveAsProps<AsType>, TastySpecificKeys | keyof TastyCustomProps | keyof ExtraBaseStyleProps | K[number] | ModPropsKeys<M> | TokenPropsKeys<TP>>;
|
|
382
|
-
|
|
458
|
+
/** Statics React itself reads, as a type (see `REACT_STATICS`). */
|
|
459
|
+
type ReactStaticKey = '$$typeof' | 'render' | 'type' | 'compare' | 'displayName' | 'defaultProps' | 'propTypes' | 'contextType' | 'contextTypes' | 'childContextTypes' | 'getDerivedStateFromProps' | 'getDerivedStateFromError';
|
|
460
|
+
/**
|
|
461
|
+
* The statics of a component that are components themselves — a `tasty()`
|
|
462
|
+
* base's sub-elements (`Card.Title`) — which its extension keeps.
|
|
463
|
+
*/
|
|
464
|
+
type ComponentStatics<C> = { [Key in keyof C as Key extends ReactStaticKey ? never : C[Key] extends string ? never : C[Key] extends ElementType ? Key : never]: C[Key]; };
|
|
465
|
+
/** Prop names the extension form's own options claim from the base's props. */
|
|
466
|
+
type ExtensionClaimedKeys<K extends StyleList, V extends VariantMap, M extends ModPropsInput, TP extends TokenPropsInput> = K[number] | ModPropsKeys<M> | TokenPropsKeys<TP> | (string extends keyof V ? never : 'variant');
|
|
467
|
+
/**
|
|
468
|
+
* Props of a `tasty(Component, options)` extension: the base's props, plus
|
|
469
|
+
* whatever its own `styleProps`, `modProps`, `tokenProps` and `variants` add.
|
|
470
|
+
* Its variants extend the base's: `variant` accepts either set.
|
|
471
|
+
*/
|
|
472
|
+
type TastyExtensionProps<Props extends PropsWithStyles, DefaultProps extends Partial<Props>, K extends StyleList = readonly never[], V extends VariantMap = VariantMap, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = [ExtensionClaimedKeys<K, V, M, TP>] extends [never] ? TastyComponentPropsWithDefaults<Props, DefaultProps> : Omit<TastyComponentPropsWithDefaults<Props, DefaultProps>, ExtensionClaimedKeys<K, V, M, TP>> & { [key in K[number]]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]>; } & ResolveModProps<M> & ResolveTokenProps<TP> & (string extends keyof V ? unknown : {
|
|
473
|
+
variant?: keyof V | ('variant' extends keyof Props ? NonNullable<Props['variant']> : never);
|
|
474
|
+
});
|
|
475
|
+
type TastyComponentPropsWithDefaults<Props extends PropsWithStyles, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : { [key in Extract<keyof Props, keyof DefaultProps>]?: Props[key]; } & { [key in keyof Omit<Props, keyof DefaultProps>]: Props[key]; };
|
|
383
476
|
/**
|
|
384
477
|
* The component type returned by the `tasty(options)` element-factory overload.
|
|
385
478
|
*
|
|
@@ -394,9 +487,9 @@ type TastyComponentPropsWithDefaults<Props extends PropsWithStyles, DefaultProps
|
|
|
394
487
|
* `SomeComponent`; create another `tasty({ as: SomeComponent })` for that.
|
|
395
488
|
*/
|
|
396
489
|
type TastyPolymorphicComponent<DefaultAs extends ElementType, K extends StyleList, V extends VariantMap, M extends ModPropsInput, TP extends TokenPropsInput> = ForwardRefExoticComponent<PropsWithoutRef<TastyElementProps<K, V, DefaultAs, M, TP>> & RefAttributes<unknown>>;
|
|
397
|
-
declare function tasty<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]>(options: TastyElementOptions<K, V, E, AsType, M, TP>, secondArg?: never): TastyPolymorphicComponent<AsType, K, V, M, TP> & SubElementComponents<E>;
|
|
398
|
-
declare function tasty<Props extends PropsWithStyles, DefaultProps extends Partial<Props> = Partial<Props>, K extends StyleList = readonly never[], V extends VariantMap = VariantMap, E extends ElementsDefinition = Record<string, never>, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]>(Component: ComponentType<Props>, options?: TastyProps<K, V, E, Props, M, TP>): ComponentType<
|
|
399
|
-
declare const Element$1: TastyPolymorphicComponent<"div",
|
|
490
|
+
declare function tasty<K extends StyleList = readonly never[], V extends VariantMap = VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]>(options: TastyElementOptions<K, V, E, AsType, M, TP>, secondArg?: never): TastyPolymorphicComponent<AsType, K, V, M, TP> & SubElementComponents<E>;
|
|
491
|
+
declare function tasty<Props extends PropsWithStyles, DefaultProps extends Partial<Props> = Partial<Props>, K extends StyleList = readonly never[], V extends VariantMap = VariantMap, const E extends ElementsDefinition = Record<string, never>, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[], C extends ComponentType<Props> = ComponentType<Props>>(Component: C & ComponentType<Props>, options?: TastyProps<K, V, E, Props, M, TP>): ComponentType<TastyExtensionProps<Props, DefaultProps, K, V, M, TP>> & ComponentStatics<C> & (string extends keyof E ? unknown : SubElementComponents<E>);
|
|
492
|
+
declare const Element$1: TastyPolymorphicComponent<"div", readonly never[], VariantMap, readonly never[], readonly never[]> & SubElementComponents<Record<string, never>>;
|
|
400
493
|
//#endregion
|
|
401
494
|
//#region src/hooks/useStyles.d.ts
|
|
402
495
|
interface UseStylesResult {
|
|
@@ -412,7 +505,9 @@ interface UseStylesResult {
|
|
|
412
505
|
* Thin wrapper around `computeStyles()` that adds React context-based
|
|
413
506
|
* SSR collector discovery for backward compatibility with TastyRegistry.
|
|
414
507
|
*
|
|
415
|
-
*
|
|
508
|
+
* Works in Server Components too. There, like the other style functions, it
|
|
509
|
+
* cannot emit CSS itself: the next `tasty()` element in the tree emits it, so
|
|
510
|
+
* render one after it.
|
|
416
511
|
*
|
|
417
512
|
* @example
|
|
418
513
|
* ```tsx
|
|
@@ -777,11 +872,14 @@ interface TastyBatchProviderProps {
|
|
|
777
872
|
* );
|
|
778
873
|
* ```
|
|
779
874
|
*/
|
|
780
|
-
declare function TastyBatchProvider({
|
|
781
|
-
children
|
|
782
|
-
}: TastyBatchProviderProps): ReactNode;
|
|
875
|
+
declare function TastyBatchProvider({ children }: TastyBatchProviderProps): React.ReactNode;
|
|
783
876
|
//#endregion
|
|
784
877
|
//#region src/utils/get-display-name.d.ts
|
|
878
|
+
/**
|
|
879
|
+
* A readable name for a component: its `displayName`, else its function name,
|
|
880
|
+
* looking through `forwardRef()` and `memo()` to the component they wrap. A
|
|
881
|
+
* tag name names itself. Falls back to `fallbackName` when there is none.
|
|
882
|
+
*/
|
|
785
883
|
declare function getDisplayName<T>(Component: ElementType<T>, fallbackName?: string): string;
|
|
786
884
|
//#endregion
|
|
787
885
|
//#region src/index.d.ts
|
|
@@ -887,8 +985,8 @@ declare function resolveFunctionColor(str: string): string | null;
|
|
|
887
985
|
/**
|
|
888
986
|
* Chunk names, the built-in chunk style lists, and the style→chunk lookup.
|
|
889
987
|
*
|
|
890
|
-
* This
|
|
891
|
-
* `definitions.ts` for two reasons:
|
|
988
|
+
* This module only imports data-only style-name lists. It exists separately
|
|
989
|
+
* from `definitions.ts` for two reasons:
|
|
892
990
|
*
|
|
893
991
|
* 1. The style handler registry (`styles/predefined.ts`) needs to assign chunk
|
|
894
992
|
* membership for custom handlers. Reaching for `definitions.ts` would create an
|
|
@@ -901,7 +999,8 @@ declare function resolveFunctionColor(str: string): string | null;
|
|
|
901
999
|
* public API surface are unchanged.
|
|
902
1000
|
*/
|
|
903
1001
|
declare const CHUNK_NAMES: {
|
|
904
|
-
/** Special chunk for styles that cannot be split */
|
|
1002
|
+
/** Special chunk for styles that cannot be split */
|
|
1003
|
+
readonly COMBINED: "combined";
|
|
905
1004
|
readonly SUBCOMPONENTS: "subcomponents";
|
|
906
1005
|
readonly APPEARANCE: "appearance";
|
|
907
1006
|
readonly FONT: "font";
|
|
@@ -913,11 +1012,15 @@ declare const CHUNK_NAMES: {
|
|
|
913
1012
|
};
|
|
914
1013
|
type ChunkName = (typeof CHUNK_NAMES)[keyof typeof CHUNK_NAMES];
|
|
915
1014
|
/**
|
|
916
|
-
* Appearance chunk - visual styling
|
|
1015
|
+
* Appearance chunk - visual styling
|
|
1016
|
+
*
|
|
1017
|
+
* Handler dependencies (all styles in each handler MUST stay in this chunk):
|
|
1018
|
+
* ⚠️ fillStyle: fill, backgroundColor, image, backgroundImage,
|
|
1019
|
+
* backgroundPosition/Size/Repeat/Attachment/Origin/Clip, background
|
|
917
1020
|
*
|
|
918
1021
|
* @public
|
|
919
1022
|
*/
|
|
920
|
-
declare const APPEARANCE_CHUNK_STYLES: readonly ["fill", "color", "opacity", "border", "radius", "outline", "outlineOffset", "shadow", "fade"];
|
|
1023
|
+
declare const APPEARANCE_CHUNK_STYLES: readonly ["fill", "backgroundColor", "image", "backgroundImage", "backgroundPosition", "backgroundSize", "backgroundRepeat", "backgroundAttachment", "backgroundOrigin", "backgroundClip", "background", "color", "opacity", "border", "blockBorder", "inlineBorder", "radius", "outline", "outlineOffset", "shadow", "fade"];
|
|
921
1024
|
/**
|
|
922
1025
|
* Font chunk - typography styles
|
|
923
1026
|
*
|
|
@@ -931,13 +1034,15 @@ declare const FONT_CHUNK_STYLES: readonly ["preset", "font", "fontWeight", "font
|
|
|
931
1034
|
* Dimension chunk - sizing and spacing
|
|
932
1035
|
*
|
|
933
1036
|
* Handler dependencies (all styles in each handler MUST stay in this chunk):
|
|
934
|
-
* ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left
|
|
935
|
-
* ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left
|
|
1037
|
+
* ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left
|
|
1038
|
+
* ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left
|
|
936
1039
|
* ⚠️ widthStyle: width, minWidth, maxWidth
|
|
937
1040
|
* ⚠️ heightStyle: height, minHeight, maxHeight
|
|
1041
|
+
* ⚠️ blockSizeStyle: blockSize, minBlockSize, maxBlockSize
|
|
1042
|
+
* ⚠️ inlineSizeStyle: inlineSize, minInlineSize, maxInlineSize
|
|
938
1043
|
*/
|
|
939
1044
|
/** @public */
|
|
940
|
-
declare const DIMENSION_CHUNK_STYLES: readonly ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "
|
|
1045
|
+
declare const DIMENSION_CHUNK_STYLES: readonly ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "blockPadding", "inlinePadding", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "blockMargin", "inlineMargin", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "blockSize", "minBlockSize", "maxBlockSize", "inlineSize", "minInlineSize", "maxInlineSize", "flexBasis", "flexGrow", "flexShrink", "flex"];
|
|
941
1046
|
/**
|
|
942
1047
|
* Display chunk - display mode, layout flow, text overflow, and scrollbar
|
|
943
1048
|
*
|
|
@@ -961,10 +1066,10 @@ declare const LAYOUT_CHUNK_STYLES: readonly ["placeItems", "placeContent", "alig
|
|
|
961
1066
|
* Position chunk - element positioning
|
|
962
1067
|
*
|
|
963
1068
|
* Handler dependencies (all styles in each handler MUST stay in this chunk):
|
|
964
|
-
* ⚠️ insetStyle: inset,
|
|
1069
|
+
* ⚠️ insetStyle: inset, top, right, bottom, left
|
|
965
1070
|
*/
|
|
966
1071
|
/** @public */
|
|
967
|
-
declare const POSITION_CHUNK_STYLES: readonly ["position", "inset", "
|
|
1072
|
+
declare const POSITION_CHUNK_STYLES: readonly ["position", "inset", "blockInset", "inlineInset", "top", "right", "bottom", "left", "blockScrollMargin", "inlineScrollMargin", "blockScrollPadding", "inlineScrollPadding", "zIndex", "gridArea", "gridColumn", "gridRow", "order", "placeSelf", "alignSelf", "justifySelf", "transform", "transition", "animation"];
|
|
968
1073
|
/**
|
|
969
1074
|
* Map for O(1) style-to-chunk lookup. Seeded with the built-in lists above and
|
|
970
1075
|
* extended by {@link assignStyleChunk} when a custom handler declares style names
|
|
@@ -1004,19 +1109,25 @@ declare function categorizeStyleKeys(styles: Record<string, unknown>): Map<strin
|
|
|
1004
1109
|
*
|
|
1005
1110
|
* Later groups override earlier groups for conflicting directions.
|
|
1006
1111
|
*/
|
|
1007
|
-
declare function borderStyle({
|
|
1008
|
-
border
|
|
1009
|
-
}: {
|
|
1112
|
+
declare function borderStyle({ border }: {
|
|
1010
1113
|
border?: string | number | boolean;
|
|
1011
1114
|
}): Record<string, string> | null;
|
|
1012
1115
|
declare namespace borderStyle {
|
|
1013
1116
|
var __lookupStyles: string[];
|
|
1014
1117
|
}
|
|
1015
1118
|
//#endregion
|
|
1119
|
+
//#region src/styles/blockSize.d.ts
|
|
1120
|
+
declare function blockSizeStyle({ blockSize, minBlockSize, maxBlockSize }: {
|
|
1121
|
+
blockSize?: string | number | boolean;
|
|
1122
|
+
minBlockSize?: string | number | boolean;
|
|
1123
|
+
maxBlockSize?: string | number | boolean;
|
|
1124
|
+
}): Record<string, string | string[]> | null;
|
|
1125
|
+
declare namespace blockSizeStyle {
|
|
1126
|
+
var __lookupStyles: ("blockSize" | "maxBlockSize" | "minBlockSize")[];
|
|
1127
|
+
}
|
|
1128
|
+
//#endregion
|
|
1016
1129
|
//#region src/styles/color.d.ts
|
|
1017
|
-
declare function colorStyle({
|
|
1018
|
-
color
|
|
1019
|
-
}: {
|
|
1130
|
+
declare function colorStyle({ color }: {
|
|
1020
1131
|
color?: string | boolean;
|
|
1021
1132
|
}): Record<string, string> | null;
|
|
1022
1133
|
declare namespace colorStyle {
|
|
@@ -1040,21 +1151,13 @@ interface DisplayStyleProps {
|
|
|
1040
1151
|
* 3. Single-line `textOverflow` defaults white-space to nowrap
|
|
1041
1152
|
* 4. Explicit `whiteSpace` overrides the default from `textOverflow`
|
|
1042
1153
|
*/
|
|
1043
|
-
declare function displayStyle({
|
|
1044
|
-
display,
|
|
1045
|
-
hide,
|
|
1046
|
-
textOverflow,
|
|
1047
|
-
overflow,
|
|
1048
|
-
whiteSpace
|
|
1049
|
-
}: DisplayStyleProps): Record<string, string | number> | null;
|
|
1154
|
+
declare function displayStyle({ display, hide, textOverflow, overflow, whiteSpace }: DisplayStyleProps): Record<string, string | number> | null;
|
|
1050
1155
|
declare namespace displayStyle {
|
|
1051
1156
|
var __lookupStyles: string[];
|
|
1052
1157
|
}
|
|
1053
1158
|
//#endregion
|
|
1054
1159
|
//#region src/styles/fade.d.ts
|
|
1055
|
-
declare function fadeStyle({
|
|
1056
|
-
fade
|
|
1057
|
-
}: {
|
|
1160
|
+
declare function fadeStyle({ fade }: {
|
|
1058
1161
|
fade?: string;
|
|
1059
1162
|
}): {
|
|
1060
1163
|
mask: string;
|
|
@@ -1065,20 +1168,8 @@ declare namespace fadeStyle {
|
|
|
1065
1168
|
}
|
|
1066
1169
|
//#endregion
|
|
1067
1170
|
//#region src/styles/fill.d.ts
|
|
1068
|
-
declare function fillStyle({
|
|
1069
|
-
fill
|
|
1070
|
-
backgroundColor,
|
|
1071
|
-
image,
|
|
1072
|
-
backgroundImage,
|
|
1073
|
-
backgroundPosition,
|
|
1074
|
-
backgroundSize,
|
|
1075
|
-
backgroundRepeat,
|
|
1076
|
-
backgroundAttachment,
|
|
1077
|
-
backgroundOrigin,
|
|
1078
|
-
backgroundClip,
|
|
1079
|
-
background
|
|
1080
|
-
}: {
|
|
1081
|
-
fill?: string;
|
|
1171
|
+
declare function fillStyle({ fill, backgroundColor, image, backgroundImage, backgroundPosition, backgroundSize, backgroundRepeat, backgroundAttachment, backgroundOrigin, backgroundClip, background }: {
|
|
1172
|
+
fill?: string | boolean;
|
|
1082
1173
|
backgroundColor?: string;
|
|
1083
1174
|
image?: string;
|
|
1084
1175
|
backgroundImage?: string;
|
|
@@ -1093,9 +1184,7 @@ declare function fillStyle({
|
|
|
1093
1184
|
declare namespace fillStyle {
|
|
1094
1185
|
var __lookupStyles: string[];
|
|
1095
1186
|
}
|
|
1096
|
-
declare function svgFillStyle({
|
|
1097
|
-
svgFill
|
|
1098
|
-
}: {
|
|
1187
|
+
declare function svgFillStyle({ svgFill }: {
|
|
1099
1188
|
svgFill?: string;
|
|
1100
1189
|
}): {
|
|
1101
1190
|
fill: string;
|
|
@@ -1105,12 +1194,9 @@ declare namespace svgFillStyle {
|
|
|
1105
1194
|
}
|
|
1106
1195
|
//#endregion
|
|
1107
1196
|
//#region src/styles/flow.d.ts
|
|
1108
|
-
declare function flowStyle({
|
|
1109
|
-
display
|
|
1110
|
-
flow
|
|
1111
|
-
}: {
|
|
1112
|
-
display?: string;
|
|
1113
|
-
flow?: string;
|
|
1197
|
+
declare function flowStyle({ display, flow }: {
|
|
1198
|
+
display?: string | NoType;
|
|
1199
|
+
flow?: string | NoType;
|
|
1114
1200
|
}): {
|
|
1115
1201
|
[x: string]: string;
|
|
1116
1202
|
} | null;
|
|
@@ -1119,14 +1205,10 @@ declare namespace flowStyle {
|
|
|
1119
1205
|
}
|
|
1120
1206
|
//#endregion
|
|
1121
1207
|
//#region src/styles/gap.d.ts
|
|
1122
|
-
declare function gapStyle({
|
|
1123
|
-
display
|
|
1124
|
-
flow
|
|
1125
|
-
gap
|
|
1126
|
-
}: {
|
|
1127
|
-
display?: string;
|
|
1128
|
-
flow?: string;
|
|
1129
|
-
gap?: string | number | boolean;
|
|
1208
|
+
declare function gapStyle({ display, flow, gap }: {
|
|
1209
|
+
display?: string | NoType;
|
|
1210
|
+
flow?: string | NoType;
|
|
1211
|
+
gap?: string | number | boolean | NoType;
|
|
1130
1212
|
}): {
|
|
1131
1213
|
gap: string;
|
|
1132
1214
|
$?: undefined;
|
|
@@ -1153,28 +1235,14 @@ interface HeightStyleProps {
|
|
|
1153
1235
|
minHeight?: string | number | boolean;
|
|
1154
1236
|
maxHeight?: string | number | boolean;
|
|
1155
1237
|
}
|
|
1156
|
-
declare function heightStyle({
|
|
1157
|
-
height,
|
|
1158
|
-
minHeight,
|
|
1159
|
-
maxHeight
|
|
1160
|
-
}: HeightStyleProps): Record<string, string | string[]> | null;
|
|
1238
|
+
declare function heightStyle({ height, minHeight, maxHeight }: HeightStyleProps): Record<string, string | string[]> | null;
|
|
1161
1239
|
declare namespace heightStyle {
|
|
1162
1240
|
var __lookupStyles: string[];
|
|
1163
1241
|
}
|
|
1164
1242
|
//#endregion
|
|
1165
1243
|
//#region src/styles/inset.d.ts
|
|
1166
|
-
declare function insetStyle({
|
|
1167
|
-
inset,
|
|
1168
|
-
insetBlock,
|
|
1169
|
-
insetInline,
|
|
1170
|
-
top,
|
|
1171
|
-
right,
|
|
1172
|
-
bottom,
|
|
1173
|
-
left
|
|
1174
|
-
}: {
|
|
1244
|
+
declare function insetStyle({ inset, top, right, bottom, left }: {
|
|
1175
1245
|
inset?: string | number | boolean;
|
|
1176
|
-
insetBlock?: string | number | boolean;
|
|
1177
|
-
insetInline?: string | number | boolean;
|
|
1178
1246
|
top?: string | number | boolean;
|
|
1179
1247
|
right?: string | number | boolean;
|
|
1180
1248
|
bottom?: string | number | boolean;
|
|
@@ -1184,19 +1252,19 @@ declare namespace insetStyle {
|
|
|
1184
1252
|
var __lookupStyles: string[];
|
|
1185
1253
|
}
|
|
1186
1254
|
//#endregion
|
|
1255
|
+
//#region src/styles/inlineSize.d.ts
|
|
1256
|
+
declare function inlineSizeStyle({ inlineSize, minInlineSize, maxInlineSize }: {
|
|
1257
|
+
inlineSize?: string | number | boolean;
|
|
1258
|
+
minInlineSize?: string | number | boolean;
|
|
1259
|
+
maxInlineSize?: string | number | boolean;
|
|
1260
|
+
}): Record<string, string | string[]> | null;
|
|
1261
|
+
declare namespace inlineSizeStyle {
|
|
1262
|
+
var __lookupStyles: ("inlineSize" | "maxInlineSize" | "minInlineSize")[];
|
|
1263
|
+
}
|
|
1264
|
+
//#endregion
|
|
1187
1265
|
//#region src/styles/margin.d.ts
|
|
1188
|
-
declare function marginStyle({
|
|
1189
|
-
margin,
|
|
1190
|
-
marginBlock,
|
|
1191
|
-
marginInline,
|
|
1192
|
-
marginTop,
|
|
1193
|
-
marginRight,
|
|
1194
|
-
marginBottom,
|
|
1195
|
-
marginLeft
|
|
1196
|
-
}: {
|
|
1266
|
+
declare function marginStyle({ margin, marginTop, marginRight, marginBottom, marginLeft }: {
|
|
1197
1267
|
margin?: string | number | boolean;
|
|
1198
|
-
marginBlock?: string | number | boolean;
|
|
1199
|
-
marginInline?: string | number | boolean;
|
|
1200
1268
|
marginTop?: string | number | boolean;
|
|
1201
1269
|
marginRight?: string | number | boolean;
|
|
1202
1270
|
marginBottom?: string | number | boolean;
|
|
@@ -1225,27 +1293,14 @@ interface OutlineStyleProps {
|
|
|
1225
1293
|
*
|
|
1226
1294
|
* @return CSS properties for outline and optionally outline-offset
|
|
1227
1295
|
*/
|
|
1228
|
-
declare function outlineStyle({
|
|
1229
|
-
outline,
|
|
1230
|
-
outlineOffset
|
|
1231
|
-
}: OutlineStyleProps): Record<string, string> | null;
|
|
1296
|
+
declare function outlineStyle({ outline, outlineOffset }: OutlineStyleProps): Record<string, string> | null;
|
|
1232
1297
|
declare namespace outlineStyle {
|
|
1233
1298
|
var __lookupStyles: string[];
|
|
1234
1299
|
}
|
|
1235
1300
|
//#endregion
|
|
1236
1301
|
//#region src/styles/padding.d.ts
|
|
1237
|
-
declare function paddingStyle({
|
|
1238
|
-
padding,
|
|
1239
|
-
paddingBlock,
|
|
1240
|
-
paddingInline,
|
|
1241
|
-
paddingTop,
|
|
1242
|
-
paddingRight,
|
|
1243
|
-
paddingBottom,
|
|
1244
|
-
paddingLeft
|
|
1245
|
-
}: {
|
|
1302
|
+
declare function paddingStyle({ padding, paddingTop, paddingRight, paddingBottom, paddingLeft }: {
|
|
1246
1303
|
padding?: string | number | boolean;
|
|
1247
|
-
paddingBlock?: string | number | boolean;
|
|
1248
|
-
paddingInline?: string | number | boolean;
|
|
1249
1304
|
paddingTop?: string | number | boolean;
|
|
1250
1305
|
paddingRight?: string | number | boolean;
|
|
1251
1306
|
paddingBottom?: string | number | boolean;
|
|
@@ -1275,17 +1330,7 @@ interface PlacementStyleProps {
|
|
|
1275
1330
|
* 2. placeItems, placeContent, align, justify (medium) — each sets 2 longhands
|
|
1276
1331
|
* 3. alignItems, alignContent, justifyItems, justifyContent (highest) — each sets 1 longhand
|
|
1277
1332
|
*/
|
|
1278
|
-
declare function placementStyle({
|
|
1279
|
-
place,
|
|
1280
|
-
placeItems,
|
|
1281
|
-
placeContent,
|
|
1282
|
-
align,
|
|
1283
|
-
justify,
|
|
1284
|
-
alignItems,
|
|
1285
|
-
alignContent,
|
|
1286
|
-
justifyItems,
|
|
1287
|
-
justifyContent
|
|
1288
|
-
}: PlacementStyleProps): Record<string, string> | null;
|
|
1333
|
+
declare function placementStyle({ place, placeItems, placeContent, align, justify, alignItems, alignContent, justifyItems, justifyContent }: PlacementStyleProps): Record<string, string> | null;
|
|
1289
1334
|
declare namespace placementStyle {
|
|
1290
1335
|
var __lookupStyles: string[];
|
|
1291
1336
|
}
|
|
@@ -1326,25 +1371,13 @@ interface PresetStyleProps {
|
|
|
1326
1371
|
* - `font` is the recommended prop with special handling (monospace, boolean, fallback)
|
|
1327
1372
|
* - `fontFamily` is a direct value without special handling
|
|
1328
1373
|
*/
|
|
1329
|
-
declare function presetStyle({
|
|
1330
|
-
preset,
|
|
1331
|
-
fontSize,
|
|
1332
|
-
lineHeight,
|
|
1333
|
-
textTransform,
|
|
1334
|
-
letterSpacing,
|
|
1335
|
-
fontWeight,
|
|
1336
|
-
fontStyle,
|
|
1337
|
-
fontFamily,
|
|
1338
|
-
font
|
|
1339
|
-
}: PresetStyleProps): CSSMap | null;
|
|
1374
|
+
declare function presetStyle({ preset, fontSize, lineHeight, textTransform, letterSpacing, fontWeight, fontStyle, fontFamily, font }: PresetStyleProps): CSSMap | null;
|
|
1340
1375
|
declare namespace presetStyle {
|
|
1341
1376
|
var __lookupStyles: string[];
|
|
1342
1377
|
}
|
|
1343
1378
|
//#endregion
|
|
1344
1379
|
//#region src/styles/radius.d.ts
|
|
1345
|
-
declare function radiusStyle({
|
|
1346
|
-
radius
|
|
1347
|
-
}: {
|
|
1380
|
+
declare function radiusStyle({ radius }: {
|
|
1348
1381
|
radius?: string | number | boolean;
|
|
1349
1382
|
}): Record<string, string> | null;
|
|
1350
1383
|
declare namespace radiusStyle {
|
|
@@ -1352,18 +1385,8 @@ declare namespace radiusStyle {
|
|
|
1352
1385
|
}
|
|
1353
1386
|
//#endregion
|
|
1354
1387
|
//#region src/styles/scrollMargin.d.ts
|
|
1355
|
-
declare function scrollMarginStyle({
|
|
1356
|
-
scrollMargin,
|
|
1357
|
-
scrollMarginBlock,
|
|
1358
|
-
scrollMarginInline,
|
|
1359
|
-
scrollMarginTop,
|
|
1360
|
-
scrollMarginRight,
|
|
1361
|
-
scrollMarginBottom,
|
|
1362
|
-
scrollMarginLeft
|
|
1363
|
-
}: {
|
|
1388
|
+
declare function scrollMarginStyle({ scrollMargin, scrollMarginTop, scrollMarginRight, scrollMarginBottom, scrollMarginLeft }: {
|
|
1364
1389
|
scrollMargin?: string | number | boolean;
|
|
1365
|
-
scrollMarginBlock?: string | number | boolean;
|
|
1366
|
-
scrollMarginInline?: string | number | boolean;
|
|
1367
1390
|
scrollMarginTop?: string | number | boolean;
|
|
1368
1391
|
scrollMarginRight?: string | number | boolean;
|
|
1369
1392
|
scrollMarginBottom?: string | number | boolean;
|
|
@@ -1373,6 +1396,18 @@ declare namespace scrollMarginStyle {
|
|
|
1373
1396
|
var __lookupStyles: string[];
|
|
1374
1397
|
}
|
|
1375
1398
|
//#endregion
|
|
1399
|
+
//#region src/styles/scrollPadding.d.ts
|
|
1400
|
+
declare function scrollPaddingStyle({ scrollPadding, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft }: {
|
|
1401
|
+
scrollPadding?: string | number | boolean;
|
|
1402
|
+
scrollPaddingTop?: string | number | boolean;
|
|
1403
|
+
scrollPaddingRight?: string | number | boolean;
|
|
1404
|
+
scrollPaddingBottom?: string | number | boolean;
|
|
1405
|
+
scrollPaddingLeft?: string | number | boolean;
|
|
1406
|
+
}): Record<string, string> | null;
|
|
1407
|
+
declare namespace scrollPaddingStyle {
|
|
1408
|
+
var __lookupStyles: string[];
|
|
1409
|
+
}
|
|
1410
|
+
//#endregion
|
|
1376
1411
|
//#region src/styles/scrollbar.d.ts
|
|
1377
1412
|
interface ScrollbarStyleProps {
|
|
1378
1413
|
scrollbar?: string | boolean;
|
|
@@ -1388,18 +1423,13 @@ interface ScrollbarStyleProps {
|
|
|
1388
1423
|
* Note: `auto` is classified as a VALUE_KEYWORD by the parser, so it lands
|
|
1389
1424
|
* in `values` rather than `mods`. Both locations are checked for robustness.
|
|
1390
1425
|
*/
|
|
1391
|
-
declare function scrollbarStyle({
|
|
1392
|
-
scrollbar,
|
|
1393
|
-
overflow
|
|
1394
|
-
}: ScrollbarStyleProps): Record<string, string> | null;
|
|
1426
|
+
declare function scrollbarStyle({ scrollbar, overflow }: ScrollbarStyleProps): Record<string, string> | null;
|
|
1395
1427
|
declare namespace scrollbarStyle {
|
|
1396
1428
|
var __lookupStyles: string[];
|
|
1397
1429
|
}
|
|
1398
1430
|
//#endregion
|
|
1399
1431
|
//#region src/styles/shadow.d.ts
|
|
1400
|
-
declare function shadowStyle({
|
|
1401
|
-
shadow
|
|
1402
|
-
}: {
|
|
1432
|
+
declare function shadowStyle({ shadow }: {
|
|
1403
1433
|
shadow?: string | boolean;
|
|
1404
1434
|
}): {
|
|
1405
1435
|
'box-shadow': string;
|
|
@@ -1409,9 +1439,7 @@ declare namespace shadowStyle {
|
|
|
1409
1439
|
}
|
|
1410
1440
|
//#endregion
|
|
1411
1441
|
//#region src/styles/transition.d.ts
|
|
1412
|
-
declare function transitionStyle({
|
|
1413
|
-
transition
|
|
1414
|
-
}: {
|
|
1442
|
+
declare function transitionStyle({ transition }: {
|
|
1415
1443
|
transition?: string;
|
|
1416
1444
|
}): {
|
|
1417
1445
|
transition: string;
|
|
@@ -1426,11 +1454,7 @@ interface WidthStyleProps {
|
|
|
1426
1454
|
minWidth?: string | number | boolean;
|
|
1427
1455
|
maxWidth?: string | number | boolean;
|
|
1428
1456
|
}
|
|
1429
|
-
declare function widthStyle({
|
|
1430
|
-
width,
|
|
1431
|
-
minWidth,
|
|
1432
|
-
maxWidth
|
|
1433
|
-
}: WidthStyleProps): Record<string, string | string[]> | null;
|
|
1457
|
+
declare function widthStyle({ width, minWidth, maxWidth }: WidthStyleProps): Record<string, string | string[]> | null;
|
|
1434
1458
|
declare namespace widthStyle {
|
|
1435
1459
|
var __lookupStyles: string[];
|
|
1436
1460
|
}
|
|
@@ -1460,16 +1484,6 @@ declare namespace widthStyle {
|
|
|
1460
1484
|
* ```
|
|
1461
1485
|
*/
|
|
1462
1486
|
declare const styleHandlers: {
|
|
1463
|
-
readonly border: typeof borderStyle;
|
|
1464
|
-
readonly color: typeof colorStyle;
|
|
1465
|
-
readonly display: typeof displayStyle;
|
|
1466
|
-
readonly fade: typeof fadeStyle;
|
|
1467
|
-
readonly fill: typeof fillStyle;
|
|
1468
|
-
readonly svgFill: typeof svgFillStyle;
|
|
1469
|
-
readonly flow: typeof flowStyle;
|
|
1470
|
-
readonly gap: typeof gapStyle;
|
|
1471
|
-
readonly height: typeof heightStyle;
|
|
1472
|
-
readonly inset: typeof insetStyle;
|
|
1473
1487
|
readonly margin: typeof marginStyle;
|
|
1474
1488
|
readonly outline: typeof outlineStyle;
|
|
1475
1489
|
readonly padding: typeof paddingStyle;
|
|
@@ -1477,10 +1491,35 @@ declare const styleHandlers: {
|
|
|
1477
1491
|
readonly preset: typeof presetStyle;
|
|
1478
1492
|
readonly radius: typeof radiusStyle;
|
|
1479
1493
|
readonly scrollMargin: typeof scrollMarginStyle;
|
|
1494
|
+
readonly scrollPadding: typeof scrollPaddingStyle;
|
|
1480
1495
|
readonly scrollbar: typeof scrollbarStyle;
|
|
1481
1496
|
readonly shadow: typeof shadowStyle;
|
|
1482
1497
|
readonly transition: typeof transitionStyle;
|
|
1483
1498
|
readonly width: typeof widthStyle;
|
|
1499
|
+
readonly blockBorder: StyleHandler<Partial<Record<"blockBorder", string | number | boolean | undefined>>>;
|
|
1500
|
+
readonly inlineBorder: StyleHandler<Partial<Record<"inlineBorder", string | number | boolean | undefined>>>;
|
|
1501
|
+
readonly blockScrollPadding: StyleHandler<Partial<Record<"blockScrollPadding", string | number | boolean | undefined>>>;
|
|
1502
|
+
readonly inlineScrollPadding: StyleHandler<Partial<Record<"inlineScrollPadding", string | number | boolean | undefined>>>;
|
|
1503
|
+
readonly blockScrollMargin: StyleHandler<Partial<Record<"blockScrollMargin", string | number | boolean | undefined>>>;
|
|
1504
|
+
readonly inlineScrollMargin: StyleHandler<Partial<Record<"inlineScrollMargin", string | number | boolean | undefined>>>;
|
|
1505
|
+
readonly blockInset: StyleHandler<Partial<Record<"blockInset", string | number | boolean | undefined>>>;
|
|
1506
|
+
readonly inlineInset: StyleHandler<Partial<Record<"inlineInset", string | number | boolean | undefined>>>;
|
|
1507
|
+
readonly blockMargin: StyleHandler<Partial<Record<"blockMargin", string | number | boolean | undefined>>>;
|
|
1508
|
+
readonly inlineMargin: StyleHandler<Partial<Record<"inlineMargin", string | number | boolean | undefined>>>;
|
|
1509
|
+
readonly blockPadding: StyleHandler<Partial<Record<"blockPadding", string | number | boolean | undefined>>>;
|
|
1510
|
+
readonly inlinePadding: StyleHandler<Partial<Record<"inlinePadding", string | number | boolean | undefined>>>;
|
|
1511
|
+
readonly blockSize: typeof blockSizeStyle;
|
|
1512
|
+
readonly border: typeof borderStyle;
|
|
1513
|
+
readonly color: typeof colorStyle;
|
|
1514
|
+
readonly display: typeof displayStyle;
|
|
1515
|
+
readonly fade: typeof fadeStyle;
|
|
1516
|
+
readonly fill: typeof fillStyle;
|
|
1517
|
+
readonly svgFill: typeof svgFillStyle;
|
|
1518
|
+
readonly flow: typeof flowStyle;
|
|
1519
|
+
readonly gap: typeof gapStyle;
|
|
1520
|
+
readonly height: typeof heightStyle;
|
|
1521
|
+
readonly inset: typeof insetStyle;
|
|
1522
|
+
readonly inlineSize: typeof inlineSizeStyle;
|
|
1484
1523
|
};
|
|
1485
1524
|
//#endregion
|
|
1486
1525
|
//#region src/styles/define-handler.d.ts
|
|
@@ -1705,7 +1744,9 @@ declare function func(name: string, definition: FunctionDefinition, options?: {
|
|
|
1705
1744
|
weak?: boolean;
|
|
1706
1745
|
}): void;
|
|
1707
1746
|
/**
|
|
1708
|
-
* Get CSS text
|
|
1747
|
+
* Get the CSS text of every sheet the injector holds. Reads the live
|
|
1748
|
+
* stylesheets, so it needs a DOM: on the server, collect CSS with
|
|
1749
|
+
* `ServerStyleCollector` from `@tenphi/tasty/ssr` instead.
|
|
1709
1750
|
*/
|
|
1710
1751
|
declare function getCSSText(options?: {
|
|
1711
1752
|
root?: Document | ShadowRoot;
|
|
@@ -1772,59 +1813,47 @@ declare function destroy(root?: Document | ShadowRoot): void;
|
|
|
1772
1813
|
declare function createInjector(config?: Partial<StyleInjectorConfig>): StyleInjector;
|
|
1773
1814
|
//#endregion
|
|
1774
1815
|
//#region src/utils/filter-base-props.d.ts
|
|
1816
|
+
declare const basePropNames: readonly ["role", "title", "inert", "as", "element", "css", "qa", "mods", "qaVal", "hidden", "isHidden", "disabled", "isDisabled", "children", "style", "className", "href", "target", "tabIndex"];
|
|
1817
|
+
declare const ignoredEventPropNames: readonly ["onPress", "onHoverStart", "onHoverEnd", "onPressStart", "onPressEnd"];
|
|
1775
1818
|
interface PropsFilterOptions {
|
|
1776
1819
|
labelable?: boolean;
|
|
1777
|
-
propNames?:
|
|
1820
|
+
propNames?: ReadonlySet<string>;
|
|
1778
1821
|
eventProps?: boolean;
|
|
1779
1822
|
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1823
|
+
type ExplicitPropName<O> = O extends {
|
|
1824
|
+
propNames?: ReadonlySet<infer P>;
|
|
1825
|
+
} ? Extract<P, string> : never;
|
|
1826
|
+
type EventPropsEnabled<O> = O extends {
|
|
1827
|
+
eventProps?: infer E;
|
|
1828
|
+
} ? Extract<E, boolean> : never;
|
|
1829
|
+
type Characters<S extends string> = S extends `${infer First}${infer Rest}` ? First | Characters<Rest> : never;
|
|
1830
|
+
/** Models DOM-style event keys and the runtime's ignored event names. */
|
|
1831
|
+
type EventPropName<K extends string> = string extends K ? `on${Characters<'ABCDEFGHIJKLMNOPQRSTUVWXYZ'>}${string}` : K extends `on${infer Initial}${infer Rest}` ? 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' extends `${string}${Initial}${string}` ? Rest extends '' ? never : Exclude<K, (typeof ignoredEventPropNames)[number]> : never : never;
|
|
1832
|
+
type ExplicitNumericPropName<K, O> = K extends number ? `${K}` extends ExplicitPropName<O> ? K : never : never;
|
|
1833
|
+
type RetainedPropName<T, O> = 'id' | (typeof basePropNames)[number] | `aria-${string}` | `data-${string}` | ExplicitPropName<O> | (true extends EventPropsEnabled<O> ? EventPropName<Extract<keyof T, string>> : never);
|
|
1834
|
+
type FilteredProps<T extends object, O> = T extends unknown ? Partial<Pick<T, Extract<keyof T, RetainedPropName<T, O>> | Extract<RetainedPropName<T, O>, keyof T> | ExplicitNumericPropName<keyof T, O>>> : never;
|
|
1835
|
+
/**
|
|
1836
|
+
* Keeps the built-in base props, ARIA/data attributes, and explicitly allowed props.
|
|
1837
|
+
* DOM-style event names are kept only with `eventProps: true`, except the ignored
|
|
1838
|
+
* interaction events (which can still be allowed explicitly via `propNames`).
|
|
1839
|
+
* The return type preserves the input value types only for potentially retained
|
|
1840
|
+
* keys. Props remain optional because only own enumerable string keys are copied.
|
|
1841
|
+
* Use a literal union (e.g. `new Set(['name', 'type'] as const)`) for `propNames`
|
|
1842
|
+
* to keep precise types; a `Set<string>` can potentially retain any string key.
|
|
1782
1843
|
* @param props - The component props to be filtered.
|
|
1783
|
-
* @param opts -
|
|
1844
|
+
* @param opts - Additional prop names and event forwarding options.
|
|
1784
1845
|
*/
|
|
1785
|
-
declare function filterBaseProps<T extends object>(props: T, opts?:
|
|
1846
|
+
declare function filterBaseProps<T extends object>(props: T, opts?: undefined): FilteredProps<T, undefined>;
|
|
1847
|
+
declare function filterBaseProps<T extends object, O extends PropsFilterOptions | undefined = PropsFilterOptions>(props: T, opts: O): FilteredProps<T, O>;
|
|
1786
1848
|
//#endregion
|
|
1787
1849
|
//#region src/utils/colors.d.ts
|
|
1788
1850
|
declare function color$1(name: string, opacity?: number): string;
|
|
1789
1851
|
//#endregion
|
|
1790
1852
|
//#region src/utils/mod-attrs.d.ts
|
|
1791
|
-
declare
|
|
1792
|
-
//#endregion
|
|
1793
|
-
//#region src/utils/dotize.d.ts
|
|
1794
|
-
declare const dotize: {
|
|
1795
|
-
valTypes: {
|
|
1796
|
-
none: string;
|
|
1797
|
-
primitive: string;
|
|
1798
|
-
object: string;
|
|
1799
|
-
array: string;
|
|
1800
|
-
};
|
|
1801
|
-
getValType: (val: any) => string | undefined;
|
|
1802
|
-
getPathType: (arrPath: any) => string[];
|
|
1803
|
-
isUndefined: (obj: any) => obj is undefined;
|
|
1804
|
-
isNumber: (f: any) => boolean;
|
|
1805
|
-
isEmptyObj: (obj: any) => boolean;
|
|
1806
|
-
isPlainObject: (obj: any) => boolean;
|
|
1807
|
-
isNotObject: (obj: any) => boolean;
|
|
1808
|
-
isEmptyArray: (arr: any) => boolean;
|
|
1809
|
-
isNotArray: (arr: any) => boolean;
|
|
1810
|
-
removeEmptyArrayItem: (arr: any) => any;
|
|
1811
|
-
getFieldName: (field: any, prefix: any, isRoot: any, isArrayItem: any, isArray: any) => string;
|
|
1812
|
-
startsWith: (val: any, valToSearch: any) => boolean;
|
|
1813
|
-
convert: (obj: any, prefix?: string) => any;
|
|
1814
|
-
backward: (obj: any, prefix: any) => any;
|
|
1815
|
-
};
|
|
1853
|
+
declare function modAttrs(map: AllBaseProps['mods']): Record<string, string> | null;
|
|
1816
1854
|
//#endregion
|
|
1817
1855
|
//#region src/utils/resolve-recipes.d.ts
|
|
1818
|
-
/**
|
|
1819
|
-
* Resolve all `recipe` style properties in a styles object.
|
|
1820
|
-
*
|
|
1821
|
-
* Handles both top-level and sub-element recipe references.
|
|
1822
|
-
* Returns the same object reference if no recipes are present anywhere
|
|
1823
|
-
* (zero overhead for the common case).
|
|
1824
|
-
*
|
|
1825
|
-
* @param styles - The styles object potentially containing `recipe` keys
|
|
1826
|
-
* @returns Resolved styles with recipe values merged in, or the original object if unchanged
|
|
1827
|
-
*/
|
|
1856
|
+
/** Resolve recipe references against the globally configured recipe map. */
|
|
1828
1857
|
declare function resolveRecipes(styles: Styles): Styles;
|
|
1829
1858
|
//#endregion
|
|
1830
1859
|
//#region src/utils/process-tokens.d.ts
|
|
@@ -1929,5 +1958,5 @@ declare const tastyDebug: {
|
|
|
1929
1958
|
install(): void;
|
|
1930
1959
|
};
|
|
1931
1960
|
//#endregion
|
|
1932
|
-
export {
|
|
1933
|
-
//# sourceMappingURL=index
|
|
1961
|
+
export { createColorFunc as $, OuterStyleProps as $t, keyframes as A, strToRgb as An, TastyElementOptions as At, styleHandlers as B, BasePropsWithoutChildren as Bt, getRawCSSText as C, DEFAULT_ZERO_NAME_PREFIX as Cn, ResolveAsProps as Ct, injectRawCSS as D, getRgbValuesFromRgbaString as Dn, SubElementDefinition as Dt, injectGlobal as E, getNamedColorHex as En, ResolveTokenProps as Et, chunkSheetRegistry as F, VariantMap as Ft, ChunkName as G, ColorStyleProps as Gt, categorizeStyleKeys as H, BlockInnerStyleProps as Ht, ComputeStylesOptions as I, WithVariant as It, FONT_CHUNK_STYLES as J, ExtraBaseStyleProps as Jt, DIMENSION_CHUNK_STYLES as K, ContainerStyleProps as Kt, ComputeStylesResult as L, tasty as Lt, property as M, TastyPolymorphicComponent as Mt, touch as N, TastyProps as Nt, injector as O, hexToRgb as On, SubElementProps as Ot, ChunkSheetRegistry as P, TokenPropsInput as Pt, resolveFunctionColor as Q, Mods as Qt, computeStyles as R, AllBaseProps as Rt, getCSSTextForNode as S, DEFAULT_NAME_PREFIX as Sn, ModPropsInput as St, inject as T, isSelector as Tn, ResolveModProps as Tt, APPEARANCE_CHUNK_STYLES as U, BlockOuterStyleProps as Ut, ChunkInfo as V, BaseStyleProps as Vt, CHUNK_NAMES as W, BlockStyleProps as Wt, POSITION_CHUNK_STYLES as X, InnerStyleProps as Xt, LAYOUT_CHUNK_STYLES as Y, FlowStyleProps as Yt, STYLE_TO_CHUNK as Z, ModValue as Zt, destroy as _, FLOW_STYLES as _n, useStyles as _t, DebugOptions as a, TastyExtensionConfig as an, TastyBatchProvider as at, gc as b, POSITION_STYLES as bn, ElementsDefinition as bt, tastyDebug as c, TokenValue as cn, useFunction as ct, modAttrs as d, BLOCK_INNER_STYLES as dn, UsePropertyOptions as dt, PositionStyleProps as en, okhstFunction as et, color$1 as f, BLOCK_OUTER_STYLES as fn, useProperty as ft, createInjector as g, DIMENSION_STYLES as gn, UseStylesResult as gt, counterStyle as h, CONTAINER_STYLES as hn, useGlobalStyles as ht, DebugChunkInfo as i, TastyCustomProps as in, getDisplayName as it, ownKeyframes as j, TastyElementProps as jt, isPropertyDefined as k, hslToRgbValues as kn, TastyComponentPropsWithDefaults as kt, processTokens as l, Tokens as ln, useCounterStyle as lt, cleanup as m, COLOR_STYLES as mn, useRawCSS as mt, CacheStatus as n, TagName as nn, okhslFunction as nt, InspectResult as o, TastyThemeNames as on, TastyBatchProviderProps as ot, filterBaseProps as p, BLOCK_STYLES as pn, useKeyframes as pt, DISPLAY_CHUNK_STYLES as q, DimensionStyleProps as qt, ChunkBreakdown as r, TastyBaseStylePropNames as rn, okhslPlugin as rt, Summary as s, TextStyleProps as sn, UseFunctionOptions as st, CSSOptions as t, ShortGridStyles as tn, okhstPlugin as tt, resolveRecipes as u, BASE_STYLES as un, useFontFace as ut, fontFace as v, INNER_STYLES as vn, AllBasePropsWithMods as vt, holdKeyframes as w, hasStylesGenerated as wn, ResolveModPropDef as wt, getCSSText as x, TEXT_STYLES as xn, ModPropDef as xt, func as y, OUTER_STYLES as yn, Element$1 as yt, defineHandler as z, BaseProps as zt };
|
|
1962
|
+
//# sourceMappingURL=index--GdqCPlp.d.ts.map
|