@tenphi/tasty 0.0.0-snapshot.bbd10c7 → 0.0.0-snapshot.bbfcd75
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 +196 -140
- package/dist/babel-Zs1Q03qt.d.ts +83 -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-CUQVwdWF.js +42 -0
- package/dist/chunks/build-config-CUQVwdWF.js.map +1 -0
- package/dist/chunks/collector-B0LTHw6Z.js +208 -0
- package/dist/chunks/collector-B0LTHw6Z.js.map +1 -0
- package/dist/chunks/config-engine-C3pF9EK9.js +267 -0
- package/dist/chunks/config-engine-C3pF9EK9.js.map +1 -0
- package/dist/chunks/css-definitions-D_it4XZH.js +875 -0
- package/dist/chunks/css-definitions-D_it4XZH.js.map +1 -0
- package/dist/chunks/css-resources-BN8apgxt.js +142 -0
- package/dist/chunks/css-resources-BN8apgxt.js.map +1 -0
- package/dist/{debug.js → chunks/debug-C9LeNVoJ.js} +187 -139
- package/dist/chunks/debug-C9LeNVoJ.js.map +1 -0
- package/dist/chunks/dsl-C5yuAn41.js +1373 -0
- package/dist/chunks/dsl-C5yuAn41.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-O-OUrKLH.js +557 -0
- package/dist/chunks/react-runtime-O-OUrKLH.js.map +1 -0
- package/dist/chunks/runtime-engine-DvnE2g-E.js +2437 -0
- package/dist/chunks/runtime-engine-DvnE2g-E.js.map +1 -0
- package/dist/chunks/runtime-state-BTDqSYBk.js +127 -0
- package/dist/chunks/runtime-state-BTDqSYBk.js.map +1 -0
- package/dist/{utils/merge-styles.js → chunks/shared-utils-DWA4LjIa.js} +55 -55
- package/dist/chunks/shared-utils-DWA4LjIa.js.map +1 -0
- package/dist/chunks/style-engine-C1ECBZxR.js +5131 -0
- package/dist/chunks/style-engine-C1ECBZxR.js.map +1 -0
- package/dist/{zero/extractor.js → chunks/zero-engine-B6EnYcXY.js} +89 -82
- package/dist/chunks/zero-engine-B6EnYcXY.js.map +1 -0
- package/dist/collector-hl5KNH7k.d.ts +165 -0
- package/dist/config-DWL1ZYue.d.ts +1358 -0
- package/dist/core/index.d.ts +5 -34
- package/dist/core/index.js +9 -27
- package/dist/index-D9N9GV24.d.ts +1947 -0
- package/dist/index.d.ts +5 -51
- package/dist/index.js +11 -36
- package/dist/{utils/merge-styles.d.ts → merge-styles-C_oMoJVd.d.ts} +3 -3
- package/dist/ssr/astro-client.js +6 -0
- package/dist/ssr/astro-client.js.map +1 -0
- package/dist/ssr/astro-middleware-extract-static.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract-static.js +9 -0
- package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
- package/dist/ssr/astro-middleware-extract.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract.js +9 -0
- package/dist/ssr/astro-middleware-extract.js.map +1 -0
- package/dist/ssr/astro-middleware-static.d.ts +18 -0
- package/dist/ssr/astro-middleware-static.js +7 -0
- package/dist/ssr/astro-middleware-static.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +19 -0
- package/dist/ssr/astro-middleware.js +7 -0
- package/dist/ssr/astro-middleware.js.map +1 -0
- package/dist/ssr/astro.d.ts +117 -11
- package/dist/ssr/astro.js +204 -48
- package/dist/ssr/astro.js.map +1 -1
- package/dist/ssr/index.d.ts +37 -4
- package/dist/ssr/index.js +6 -6
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next-config.d.ts +66 -0
- package/dist/ssr/next-config.js +124 -0
- package/dist/ssr/next-config.js.map +1 -0
- package/dist/ssr/next.d.ts +14 -5
- package/dist/ssr/next.js +31 -46
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +91 -5
- package/dist/static/index.js +31 -3
- package/dist/static/index.js.map +1 -0
- package/dist/static/inject.js.map +1 -1
- package/dist/types-jKZNpias.d.ts +1616 -0
- package/dist/zero/babel.d.ts +2 -182
- package/dist/zero/babel.js +82 -113
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +81 -3
- package/dist/zero/index.js +2 -3
- package/dist/zero/next.d.ts +1 -1
- package/dist/zero/next.js +0 -31
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +20 -12
- package/docs/adoption.md +59 -32
- package/docs/ai-agents.md +229 -0
- package/docs/comparison.md +76 -48
- package/docs/configuration.md +566 -69
- package/docs/debug.md +37 -23
- package/docs/design-system.md +63 -32
- package/docs/dsl.md +527 -179
- package/docs/getting-started.md +62 -41
- package/docs/injector.md +157 -51
- package/docs/methodology.md +69 -37
- package/docs/migration-v3.md +285 -0
- package/docs/pipeline.md +744 -0
- package/docs/plugins.md +353 -0
- package/docs/{runtime.md → react-api.md} +176 -67
- package/docs/runtime-benchmarks.md +377 -0
- package/docs/ssr.md +350 -94
- package/docs/styles.md +108 -27
- package/docs/tasty-static.md +149 -87
- package/package.json +121 -23
- package/tasty.config.ts +6 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -7
- package/dist/chunks/cacheKey.js +0 -77
- package/dist/chunks/cacheKey.js.map +0 -1
- package/dist/chunks/definitions.d.ts +0 -37
- package/dist/chunks/definitions.js +0 -258
- package/dist/chunks/definitions.js.map +0 -1
- package/dist/chunks/index.d.ts +0 -1
- package/dist/chunks/renderChunk.d.ts +0 -1
- package/dist/chunks/renderChunk.js +0 -59
- package/dist/chunks/renderChunk.js.map +0 -1
- package/dist/compute-styles.d.ts +0 -31
- package/dist/compute-styles.js +0 -356
- package/dist/compute-styles.js.map +0 -1
- package/dist/config.d.ts +0 -372
- package/dist/config.js +0 -507
- package/dist/config.js.map +0 -1
- package/dist/counter-style/index.js +0 -51
- package/dist/counter-style/index.js.map +0 -1
- package/dist/debug.d.ts +0 -89
- package/dist/debug.js.map +0 -1
- package/dist/font-face/index.js +0 -63
- package/dist/font-face/index.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/useCounterStyle.d.ts +0 -50
- package/dist/hooks/useCounterStyle.js +0 -45
- package/dist/hooks/useCounterStyle.js.map +0 -1
- package/dist/hooks/useFontFace.d.ts +0 -43
- package/dist/hooks/useFontFace.js +0 -69
- package/dist/hooks/useFontFace.js.map +0 -1
- package/dist/hooks/useGlobalStyles.d.ts +0 -30
- package/dist/hooks/useGlobalStyles.js +0 -77
- package/dist/hooks/useGlobalStyles.js.map +0 -1
- package/dist/hooks/useKeyframes.d.ts +0 -56
- package/dist/hooks/useKeyframes.js +0 -63
- package/dist/hooks/useKeyframes.js.map +0 -1
- package/dist/hooks/useProperty.d.ts +0 -79
- package/dist/hooks/useProperty.js +0 -108
- package/dist/hooks/useProperty.js.map +0 -1
- package/dist/hooks/useRawCSS.d.ts +0 -53
- package/dist/hooks/useRawCSS.js +0 -34
- package/dist/hooks/useRawCSS.js.map +0 -1
- package/dist/hooks/useStyles.d.ts +0 -40
- package/dist/hooks/useStyles.js +0 -29
- package/dist/hooks/useStyles.js.map +0 -1
- package/dist/injector/index.d.ts +0 -166
- package/dist/injector/index.js +0 -166
- package/dist/injector/index.js.map +0 -1
- package/dist/injector/injector.d.ts +0 -166
- package/dist/injector/injector.js +0 -464
- package/dist/injector/injector.js.map +0 -1
- package/dist/injector/sheet-manager.d.ts +0 -136
- package/dist/injector/sheet-manager.js +0 -733
- package/dist/injector/sheet-manager.js.map +0 -1
- package/dist/injector/types.d.ts +0 -204
- package/dist/keyframes/index.js +0 -206
- package/dist/keyframes/index.js.map +0 -1
- package/dist/parser/classify.js +0 -319
- package/dist/parser/classify.js.map +0 -1
- package/dist/parser/const.js +0 -60
- package/dist/parser/const.js.map +0 -1
- package/dist/parser/lru.js +0 -109
- package/dist/parser/lru.js.map +0 -1
- package/dist/parser/parser.d.ts +0 -25
- package/dist/parser/parser.js +0 -115
- package/dist/parser/parser.js.map +0 -1
- package/dist/parser/tokenizer.js +0 -69
- package/dist/parser/tokenizer.js.map +0 -1
- package/dist/parser/types.d.ts +0 -51
- package/dist/parser/types.js +0 -46
- package/dist/parser/types.js.map +0 -1
- package/dist/pipeline/conditions.d.ts +0 -134
- package/dist/pipeline/conditions.js +0 -406
- package/dist/pipeline/conditions.js.map +0 -1
- package/dist/pipeline/exclusive.js +0 -230
- package/dist/pipeline/exclusive.js.map +0 -1
- package/dist/pipeline/index.d.ts +0 -55
- package/dist/pipeline/index.js +0 -708
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/materialize.js +0 -1103
- package/dist/pipeline/materialize.js.map +0 -1
- package/dist/pipeline/parseStateKey.d.ts +0 -15
- package/dist/pipeline/parseStateKey.js +0 -446
- package/dist/pipeline/parseStateKey.js.map +0 -1
- package/dist/pipeline/simplify.js +0 -515
- package/dist/pipeline/simplify.js.map +0 -1
- package/dist/pipeline/warnings.js +0 -18
- package/dist/pipeline/warnings.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/okhsl-plugin.d.ts +0 -35
- package/dist/plugins/okhsl-plugin.js +0 -97
- package/dist/plugins/okhsl-plugin.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -76
- package/dist/properties/index.js +0 -222
- package/dist/properties/index.js.map +0 -1
- package/dist/properties/property-type-resolver.d.ts +0 -24
- package/dist/properties/property-type-resolver.js +0 -90
- package/dist/properties/property-type-resolver.js.map +0 -1
- package/dist/ssr/async-storage.d.ts +0 -17
- package/dist/ssr/async-storage.js +0 -34
- package/dist/ssr/async-storage.js.map +0 -1
- package/dist/ssr/collect-auto-properties.js +0 -39
- package/dist/ssr/collect-auto-properties.js.map +0 -1
- package/dist/ssr/collector.d.ts +0 -102
- package/dist/ssr/collector.js +0 -219
- package/dist/ssr/collector.js.map +0 -1
- package/dist/ssr/format-global-rules.js +0 -22
- package/dist/ssr/format-global-rules.js.map +0 -1
- package/dist/ssr/format-keyframes.js +0 -69
- package/dist/ssr/format-keyframes.js.map +0 -1
- package/dist/ssr/format-property.js +0 -49
- package/dist/ssr/format-property.js.map +0 -1
- package/dist/ssr/format-rules.js +0 -73
- package/dist/ssr/format-rules.js.map +0 -1
- package/dist/ssr/hydrate.d.ts +0 -22
- package/dist/ssr/hydrate.js +0 -49
- package/dist/ssr/hydrate.js.map +0 -1
- package/dist/ssr/ssr-collector-ref.js +0 -12
- package/dist/ssr/ssr-collector-ref.js.map +0 -1
- package/dist/states/index.d.ts +0 -49
- package/dist/states/index.js +0 -170
- package/dist/states/index.js.map +0 -1
- package/dist/static/tastyStatic.d.ts +0 -46
- package/dist/static/tastyStatic.js +0 -30
- package/dist/static/tastyStatic.js.map +0 -1
- package/dist/static/types.d.ts +0 -49
- package/dist/static/types.js +0 -24
- package/dist/static/types.js.map +0 -1
- package/dist/styles/border.d.ts +0 -25
- package/dist/styles/border.js +0 -120
- package/dist/styles/border.js.map +0 -1
- package/dist/styles/color.d.ts +0 -14
- package/dist/styles/color.js +0 -26
- package/dist/styles/color.js.map +0 -1
- package/dist/styles/const.js +0 -17
- package/dist/styles/const.js.map +0 -1
- package/dist/styles/createStyle.js +0 -79
- package/dist/styles/createStyle.js.map +0 -1
- package/dist/styles/dimension.js +0 -109
- package/dist/styles/dimension.js.map +0 -1
- package/dist/styles/directional.js +0 -133
- package/dist/styles/directional.js.map +0 -1
- package/dist/styles/display.d.ts +0 -30
- package/dist/styles/display.js +0 -73
- package/dist/styles/display.js.map +0 -1
- package/dist/styles/fade.d.ts +0 -15
- package/dist/styles/fade.js +0 -62
- package/dist/styles/fade.js.map +0 -1
- package/dist/styles/fill.d.ts +0 -42
- package/dist/styles/fill.js +0 -51
- package/dist/styles/fill.js.map +0 -1
- package/dist/styles/flow.d.ts +0 -16
- package/dist/styles/flow.js +0 -12
- package/dist/styles/flow.js.map +0 -1
- package/dist/styles/gap.d.ts +0 -31
- package/dist/styles/gap.js +0 -38
- package/dist/styles/gap.js.map +0 -1
- package/dist/styles/height.d.ts +0 -17
- package/dist/styles/height.js +0 -19
- package/dist/styles/height.js.map +0 -1
- package/dist/styles/index.d.ts +0 -1
- package/dist/styles/index.js +0 -8
- package/dist/styles/index.js.map +0 -1
- package/dist/styles/inset.d.ts +0 -24
- package/dist/styles/inset.js +0 -34
- package/dist/styles/inset.js.map +0 -1
- package/dist/styles/list.d.ts +0 -16
- package/dist/styles/list.js +0 -100
- package/dist/styles/list.js.map +0 -1
- package/dist/styles/margin.d.ts +0 -24
- package/dist/styles/margin.js +0 -32
- package/dist/styles/margin.js.map +0 -1
- package/dist/styles/outline.d.ts +0 -29
- package/dist/styles/outline.js +0 -55
- package/dist/styles/outline.js.map +0 -1
- package/dist/styles/padding.d.ts +0 -24
- package/dist/styles/padding.js +0 -32
- package/dist/styles/padding.js.map +0 -1
- package/dist/styles/placement.d.ts +0 -37
- package/dist/styles/placement.js +0 -74
- package/dist/styles/placement.js.map +0 -1
- package/dist/styles/predefined.d.ts +0 -71
- package/dist/styles/predefined.js +0 -237
- package/dist/styles/predefined.js.map +0 -1
- package/dist/styles/preset.d.ts +0 -52
- package/dist/styles/preset.js +0 -127
- package/dist/styles/preset.js.map +0 -1
- package/dist/styles/radius.d.ts +0 -12
- package/dist/styles/radius.js +0 -83
- package/dist/styles/radius.js.map +0 -1
- package/dist/styles/scrollMargin.d.ts +0 -24
- package/dist/styles/scrollMargin.js +0 -32
- package/dist/styles/scrollMargin.js.map +0 -1
- package/dist/styles/scrollbar.d.ts +0 -25
- package/dist/styles/scrollbar.js +0 -51
- package/dist/styles/scrollbar.js.map +0 -1
- package/dist/styles/shadow.d.ts +0 -14
- package/dist/styles/shadow.js +0 -25
- package/dist/styles/shadow.js.map +0 -1
- package/dist/styles/shared.js +0 -17
- package/dist/styles/shared.js.map +0 -1
- package/dist/styles/transition.d.ts +0 -14
- package/dist/styles/transition.js +0 -159
- package/dist/styles/transition.js.map +0 -1
- package/dist/styles/types.d.ts +0 -564
- package/dist/styles/width.d.ts +0 -17
- package/dist/styles/width.js +0 -19
- package/dist/styles/width.js.map +0 -1
- package/dist/tasty.d.ts +0 -134
- package/dist/tasty.js +0 -240
- package/dist/tasty.js.map +0 -1
- package/dist/types.d.ts +0 -184
- package/dist/utils/cache-wrapper.js +0 -21
- package/dist/utils/cache-wrapper.js.map +0 -1
- package/dist/utils/case-converter.js +0 -8
- package/dist/utils/case-converter.js.map +0 -1
- package/dist/utils/color-math.d.ts +0 -46
- package/dist/utils/color-math.js +0 -749
- package/dist/utils/color-math.js.map +0 -1
- package/dist/utils/color-space.d.ts +0 -5
- package/dist/utils/color-space.js +0 -228
- package/dist/utils/color-space.js.map +0 -1
- package/dist/utils/colors.d.ts +0 -5
- package/dist/utils/colors.js +0 -10
- package/dist/utils/colors.js.map +0 -1
- package/dist/utils/css-types.d.ts +0 -7
- package/dist/utils/dotize.d.ts +0 -26
- package/dist/utils/dotize.js +0 -122
- package/dist/utils/dotize.js.map +0 -1
- package/dist/utils/filter-base-props.d.ts +0 -15
- package/dist/utils/filter-base-props.js +0 -45
- package/dist/utils/filter-base-props.js.map +0 -1
- package/dist/utils/get-display-name.d.ts +0 -7
- package/dist/utils/get-display-name.js +0 -10
- package/dist/utils/get-display-name.js.map +0 -1
- package/dist/utils/has-keys.js +0 -13
- package/dist/utils/has-keys.js.map +0 -1
- package/dist/utils/is-dev-env.js +0 -19
- package/dist/utils/is-dev-env.js.map +0 -1
- package/dist/utils/is-valid-element-type.js +0 -15
- package/dist/utils/is-valid-element-type.js.map +0 -1
- package/dist/utils/merge-styles.js.map +0 -1
- package/dist/utils/mod-attrs.d.ts +0 -6
- package/dist/utils/mod-attrs.js +0 -20
- package/dist/utils/mod-attrs.js.map +0 -1
- package/dist/utils/process-tokens.d.ts +0 -17
- package/dist/utils/process-tokens.js +0 -83
- package/dist/utils/process-tokens.js.map +0 -1
- package/dist/utils/resolve-recipes.d.ts +0 -17
- package/dist/utils/resolve-recipes.js +0 -146
- package/dist/utils/resolve-recipes.js.map +0 -1
- package/dist/utils/selector-transform.js +0 -32
- package/dist/utils/selector-transform.js.map +0 -1
- package/dist/utils/string.js +0 -8
- package/dist/utils/string.js.map +0 -1
- package/dist/utils/styles.d.ts +0 -99
- package/dist/utils/styles.js +0 -220
- package/dist/utils/styles.js.map +0 -1
- package/dist/utils/typography.d.ts +0 -47
- package/dist/utils/typography.js +0 -51
- package/dist/utils/typography.js.map +0 -1
- package/dist/utils/warnings.d.ts +0 -16
- package/dist/utils/warnings.js +0 -16
- package/dist/utils/warnings.js.map +0 -1
- package/dist/zero/css-writer.d.ts +0 -45
- package/dist/zero/css-writer.js +0 -73
- package/dist/zero/css-writer.js.map +0 -1
- package/dist/zero/extractor.d.ts +0 -24
- package/dist/zero/extractor.js.map +0 -1
- package/docs/PIPELINE.md +0 -519
- /package/dist/{chunks/cacheKey.d.ts → ssr/astro-client.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,51 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { CSSMap, CUSTOM_UNITS, DIRECTIONS, ParsedColor, RawStyleHandler, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleMap, StylePropValue, StyleValue, StyleValueStateMap, customFunc, filterMods, getGlobalFuncs, getGlobalParser, getGlobalPredefinedTokens, normalizeColorTokenValue, parseColor, parseStyle, resetGlobalPredefinedTokens, setGlobalPredefinedTokens, stringifyStyles } from "./utils/styles.js";
|
|
7
|
-
import { ConfigTokenValue, ConfigTokens, NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames } from "./styles/types.js";
|
|
8
|
-
import { ConditionNode } from "./pipeline/conditions.js";
|
|
9
|
-
import { AtRuleContext, ParsedAdvancedState, StateParserContext, createStateParserContext, getGlobalPredefinedStates, setGlobalPredefinedStates } from "./states/index.js";
|
|
10
|
-
import { ParseStateKeyOptions, parseStateKey } from "./pipeline/parseStateKey.js";
|
|
11
|
-
import { RenderResult, StyleResult, isSelector, renderStyles } from "./pipeline/index.js";
|
|
12
|
-
import { SheetManager } from "./injector/sheet-manager.js";
|
|
13
|
-
import { StyleInjector } from "./injector/injector.js";
|
|
14
|
-
import { ColorSpace } from "./utils/color-space.js";
|
|
15
|
-
import { TastyPlugin, TastyPluginFactory } from "./plugins/types.js";
|
|
16
|
-
import { TastyConfig, configure, getConfig, getGlobalCounterStyle, getGlobalFontFace, getGlobalKeyframes, getGlobalRecipes, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, isConfigLocked, isTestEnvironment, resetConfig } from "./config.js";
|
|
17
|
-
import { okhslFunc, okhslPlugin } from "./plugins/okhsl-plugin.js";
|
|
18
|
-
import { CHUNK_NAMES, ChunkInfo, ChunkName, STYLE_TO_CHUNK, categorizeStyleKeys } from "./chunks/definitions.js";
|
|
19
|
-
import { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_STYLES, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, TEXT_STYLES } from "./styles/list.js";
|
|
20
|
-
import { AllBaseProps, BaseProps, BasePropsWithoutChildren, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, ColorStyleProps, ContainerStyleProps, DimensionStyleProps, FlowStyleProps, GlobalStyledProps, InnerStyleProps, ModValue, Mods, OuterStyleProps, PositionStyleProps, Props, ShortGridStyles, TagName, TastyExtensionConfig, TastyThemeNames, TextStyleProps, TokenValue, Tokens } from "./types.js";
|
|
21
|
-
import { AllBasePropsWithMods, Element, ElementsDefinition, ModPropDef, ModPropsInput, ResolveModPropDef, ResolveModProps, ResolveTokenProps, SubElementDefinition, SubElementProps, TastyElementOptions, TastyElementProps, TastyProps, TokenPropsInput, VariantMap, WithVariant, tasty } from "./tasty.js";
|
|
22
|
-
import { UseStylesOptions, UseStylesResult, useStyles } from "./hooks/useStyles.js";
|
|
23
|
-
import { useGlobalStyles } from "./hooks/useGlobalStyles.js";
|
|
24
|
-
import { useRawCSS } from "./hooks/useRawCSS.js";
|
|
25
|
-
import { useKeyframes } from "./hooks/useKeyframes.js";
|
|
26
|
-
import { UsePropertyOptions, useProperty } from "./hooks/useProperty.js";
|
|
27
|
-
import { useFontFace } from "./hooks/useFontFace.js";
|
|
28
|
-
import { useCounterStyle } from "./hooks/useCounterStyle.js";
|
|
29
|
-
import { getDisplayName } from "./utils/get-display-name.js";
|
|
30
|
-
import { styleHandlers } from "./styles/predefined.js";
|
|
31
|
-
import { ComputeStylesOptions, ComputeStylesResult, computeStyles } from "./compute-styles.js";
|
|
32
|
-
import { PropertyOptions, cleanup, counterStyle, createInjector, destroy, fontFace, getCssText, getCssTextForNode, getIsTestEnvironment, getRawCSSText, inject, injectGlobal, injectRawCSS, injector, isPropertyDefined, keyframes, property } from "./injector/index.js";
|
|
33
|
-
import { filterBaseProps } from "./utils/filter-base-props.js";
|
|
34
|
-
import { color } from "./utils/colors.js";
|
|
35
|
-
import { _modAttrs } from "./utils/mod-attrs.js";
|
|
36
|
-
import { dotize } from "./utils/dotize.js";
|
|
37
|
-
import { mergeStyles } from "./utils/merge-styles.js";
|
|
38
|
-
import { resolveRecipes } from "./utils/resolve-recipes.js";
|
|
39
|
-
import { deprecationWarning, warn } from "./utils/warnings.js";
|
|
40
|
-
import { processTokens } from "./utils/process-tokens.js";
|
|
41
|
-
import { TypographyPreset, generateTypographyTokens } from "./utils/typography.js";
|
|
42
|
-
import { tastyDebug } from "./debug.js";
|
|
43
|
-
import { CSSProperties as CSSProperties$1 } from "react";
|
|
44
|
-
|
|
45
|
-
//#region src/index.d.ts
|
|
46
|
-
declare module './utils/css-types' {
|
|
47
|
-
interface CSSProperties extends CSSProperties$1 {}
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { type AllBaseProps, type AllBasePropsWithMods, AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CSSMap, CSSProperties, CUSTOM_UNITS, CacheMetrics, ChunkInfo, ChunkName, ColorSpace, ColorStyleProps, ComputeStylesOptions, ComputeStylesResult, ConditionNode, ConfigTokenValue, ConfigTokens, ContainerStyleProps, CounterStyleDescriptors, DIMENSION_STYLES, DIRECTIONS, DimensionStyleProps, DisposeFunction, Element, type ElementsDefinition, FLOW_STYLES, FlowStyleProps, FontFaceDescriptors, FontFaceInput, GlobalStyledProps, INNER_STYLES, InjectResult, InnerStyleProps, KeyframesCacheEntry, KeyframesInfo, KeyframesResult, KeyframesSteps, type ModPropDef, type ModPropsInput, ModValue, Mods, NoType, NotSelector, OUTER_STYLES, OuterStyleProps, POSITION_STYLES, ParseStateKeyOptions, ParsedAdvancedState, ParsedColor, ParserOptions, PositionStyleProps, ProcessedStyle, PropertyDefinition, PropertyOptions, Props, RawCSSResult, RawStyleHandler, RecipeStyles, RenderResult, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, RootRegistry, RuleInfo, STYLE_TO_CHUNK, Selector, SheetInfo, SheetManager, ShortGridStyles, StateParserContext, StyleDetails, StyleDetailsPart, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleInjector, StyleInjectorConfig, StyleMap, StyleParser, StylePropValue, StyleResult, StyleRule, StyleValue, StyleValueStateMap, Styles, StylesInterface, StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, SuffixForSelector, TEXT_STYLES, TagName, TastyConfig, type TastyElementOptions, type TastyElementProps, TastyExtensionConfig, TastyNamedColors, TastyPlugin, TastyPluginFactory, TastyPresetNames, type TastyProps, TastyThemeNames, TextStyleProps, type TokenPropsInput, TokenValue, Tokens, TypographyPreset, UnitHandler, type UsePropertyOptions, type UseStylesOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { $ as SuffixForSelector, A as resetStyleBatch, At as ParserOptions, B as getGlobalPredefinedStates, C as SheetInfo, Ct as stringifyStyles, D as QueuedWrite, Dt as hslToRgbValues, E as StyleUsage, Et as hexToRgb, F as parseStateKey, Ft as CSSProperties, G as ConfigTokens, H as ConditionNode, I as AtRuleContext, J as RecipeStyles, K as NoType, L as ParsedAdvancedState, M as StyleResult, Mt as StyleDetails, N as renderStyles, Nt as StyleDetailsPart, O as flushStyles, Ot as strToRgb, P as ParseStateKeyOptions, Pt as UnitHandler, Q as StylesWithoutSelectors, R as StateParserContext, S as RuleInfo, St as parseStyle, T as StyleRule, Tt as getRgbValuesFromRgbaString, U as isSelector, V as setGlobalPredefinedStates, W as ConfigTokenValue, X as Styles, Y as Selector, Z as StylesInterface, _ as KeyframesSteps, _t as filterMods, a as FontFaceInput, at as DIRECTIONS, b as RawCSSResult, bt as normalizeColorTokenValue, c as GCConfig, ct as ResolvedStyleValue, d as InjectOptions, dt as StyleHandlerProps, et as TastyNamedColors, f as InjectResult, ft as StyleHandlerResult, g as KeyframesResult, gt as StyleValueStateMap, h as KeyframesInfo, ht as StyleValue, i as FontFaceDescriptors, it as CUSTOM_UNITS, j as RenderResult, jt as ProcessedStyle, k as hasPendingStyleWrites, kt as StyleParser, l as GCOptions, lt as StyleHandler, m as KeyframesCacheEntry, mt as StylePropValue, n as CounterStyleDescriptors, nt as AnyStyleHandler, o as FunctionDefinition, ot as ParsedColor, p as InjectionMode, pt as StyleMap, q as NotSelector, r as DisposeFunction, rt as CSSMap, s as FunctionParameter, st as RawStyleHandler, t as CacheMetrics, tt as TastyPresetNames, ut as StyleHandlerDefinition, v as PropertyDefinition, vt as getGlobalParser, w as StyleInjectorConfig, wt as getNamedColorHex, x as RootRegistry, xt as parseColor, y as PropertyOptions, yt as getGlobalPredefinedTokens, z as createStateParserContext } from "./types-jKZNpias.js";
|
|
2
|
+
import { C as PropHandler, D as getGlobalFontFaces, E as getGlobalCounterStyles, O as getGlobalFunctions, S as SheetManager, T as PropHandlerProps, _ as generateTypographyTokens, a as getGlobalRecipes, b as ParseFunction, c as hasGlobalRecipes, d as resetConfig, f as hasStylesGenerated, g as TypographyTokenValue, h as TypographyPreset, i as getGlobalKeyframes, l as isConfigLocked, m as TastyPluginFactory, n as configure, o as getNamePrefix, p as TastyPlugin, r as getConfig, s as hasGlobalKeyframes, t as TastyConfig, u as isTestEnvironment, v as ColorSpace, w as PropHandlerDefinition, x as StyleInjector, y as FunctionsConfig } from "./config-DWL1ZYue.js";
|
|
3
|
+
import { $ as createColorFunc, $t as OuterStyleProps, A as keyframes, At as TastyElementOptions, B as styleHandlers, Bt as BasePropsWithoutChildren, C as getRawCSSText, Cn as DEFAULT_ZERO_NAME_PREFIX, Ct as ResolveAsProps, D as injectRawCSS, Dt as SubElementDefinition, E as injectGlobal, Et as ResolveTokenProps, F as chunkSheetRegistry, Ft as VariantMap, G as ChunkName, Gt as ColorStyleProps, H as categorizeStyleKeys, Ht as BlockInnerStyleProps, I as ComputeStylesOptions, It as WithVariant, J as FONT_CHUNK_STYLES, Jt as ExtraBaseStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as ContainerStyleProps, L as ComputeStylesResult, Lt as tasty, M as property, Mt as TastyPolymorphicComponent, N as touch, Nt as TastyProps, O as injector, Ot as SubElementProps, P as ChunkSheetRegistry, Pt as TokenPropsInput, Q as resolveFunctionColor, Qt as Mods, R as computeStyles, Rt as AllBaseProps, S as getCSSTextForNode, Sn as DEFAULT_NAME_PREFIX, St as ModPropsInput, T as inject, Tt as ResolveModProps, 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, _t as useStyles, a as DebugOptions, an as TastyExtensionConfig, at as TastyBatchProvider, b as gc, bn as POSITION_STYLES, bt as ElementsDefinition, c as tastyDebug, cn as TokenValue, ct as useFunction, d as modAttrs, dn as BLOCK_INNER_STYLES, dt as UsePropertyOptions, en as PositionStyleProps, et as okhstFunction, f as color, fn as BLOCK_OUTER_STYLES, ft as useProperty, g as createInjector, gn as DIMENSION_STYLES, gt as UseStylesResult, h as counterStyle, hn as CONTAINER_STYLES, ht as useGlobalStyles, i as DebugChunkInfo, in as TastyCustomProps, it as getDisplayName, j as ownKeyframes, jt as TastyElementProps, k as isPropertyDefined, kt as TastyComponentPropsWithDefaults, l as processTokens, ln as Tokens, lt as useCounterStyle, m as cleanup, mn as COLOR_STYLES, mt as useRawCSS, n as CacheStatus, nn as TagName, nt as okhslFunction, o as InspectResult, on as TastyThemeNames, ot as TastyBatchProviderProps, p as filterBaseProps, pn as BLOCK_STYLES, pt as useKeyframes, q as DISPLAY_CHUNK_STYLES, qt as DimensionStyleProps, r as ChunkBreakdown, rn as TastyBaseStylePropNames, rt as okhslPlugin, s as Summary, sn as TextStyleProps, st as UseFunctionOptions, t as CSSOptions, tn as ShortGridStyles, tt as okhstPlugin, u as resolveRecipes, un as BASE_STYLES, ut as useFontFace, v as fontFace, vn as INNER_STYLES, vt as AllBasePropsWithMods, w as holdKeyframes, wt as ResolveModPropDef, x as getCSSText, xn as TEXT_STYLES, xt as ModPropDef, y as func, yn as OUTER_STYLES, yt as Element, z as defineHandler, zt as BaseProps } from "./index-D9N9GV24.js";
|
|
4
|
+
import { t as mergeStyles } from "./merge-styles-C_oMoJVd.js";
|
|
5
|
+
export { APPEARANCE_CHUNK_STYLES, type AllBaseProps, type AllBasePropsWithMods, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, 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, Element, type ElementsDefinition, 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 ModPropDef, type ModPropsInput, 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 ResolveAsProps, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, 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 SubElementDefinition, type SubElementProps, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, TastyBatchProvider, type TastyBatchProviderProps, type TastyComponentPropsWithDefaults, type TastyConfig, type TastyCustomProps, type TastyElementOptions, type TastyElementProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPolymorphicComponent, type TastyPresetNames, type TastyProps, type TastyThemeNames, type TextStyleProps, type TokenPropsInput, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, type UseFunctionOptions, type UsePropertyOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, 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, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
|
package/dist/index.js
CHANGED
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { isSelector, renderStyles } from "./pipeline/index.js";
|
|
13
|
-
import { configure, getConfig, getGlobalCounterStyle, getGlobalFontFace, getGlobalKeyframes, getGlobalRecipes, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, isConfigLocked, isTestEnvironment, resetConfig } from "./config.js";
|
|
14
|
-
import { CHUNK_NAMES, STYLE_TO_CHUNK, categorizeStyleKeys } from "./chunks/definitions.js";
|
|
15
|
-
import { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_STYLES, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, TEXT_STYLES } from "./styles/list.js";
|
|
16
|
-
import { cleanup, counterStyle, createInjector, destroy, fontFace, getCssText, getCssTextForNode, getIsTestEnvironment, getRawCSSText, inject, injectGlobal, injectRawCSS, injector, isPropertyDefined, keyframes, property } from "./injector/index.js";
|
|
17
|
-
import { mergeStyles } from "./utils/merge-styles.js";
|
|
18
|
-
import { resolveRecipes } from "./utils/resolve-recipes.js";
|
|
19
|
-
import { computeStyles } from "./compute-styles.js";
|
|
20
|
-
import { filterBaseProps } from "./utils/filter-base-props.js";
|
|
21
|
-
import { color } from "./utils/colors.js";
|
|
22
|
-
import { _modAttrs } from "./utils/mod-attrs.js";
|
|
23
|
-
import { dotize } from "./utils/dotize.js";
|
|
24
|
-
import { processTokens } from "./utils/process-tokens.js";
|
|
25
|
-
import { generateTypographyTokens } from "./utils/typography.js";
|
|
26
|
-
import { tastyDebug } from "./debug.js";
|
|
27
|
-
import { getDisplayName } from "./utils/get-display-name.js";
|
|
28
|
-
import { Element, tasty } from "./tasty.js";
|
|
29
|
-
import { useStyles } from "./hooks/useStyles.js";
|
|
30
|
-
import { useGlobalStyles } from "./hooks/useGlobalStyles.js";
|
|
31
|
-
import { useRawCSS } from "./hooks/useRawCSS.js";
|
|
32
|
-
import { useKeyframes } from "./hooks/useKeyframes.js";
|
|
33
|
-
import { useProperty } from "./hooks/useProperty.js";
|
|
34
|
-
import { useFontFace } from "./hooks/useFontFace.js";
|
|
35
|
-
import { useCounterStyle } from "./hooks/useCounterStyle.js";
|
|
36
|
-
export { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, DIMENSION_STYLES, DIRECTIONS, Element, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, categorizeStyleKeys, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
|
|
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-C5yuAn41.js";
|
|
2
|
+
import { n as isSelector, t as mergeStyles } from "./chunks/shared-utils-DWA4LjIa.js";
|
|
3
|
+
import { C as DEFAULT_NAME_PREFIX, w as DEFAULT_ZERO_NAME_PREFIX } from "./chunks/css-definitions-D_it4XZH.js";
|
|
4
|
+
import { A as APPEARANCE_CHUNK_STYLES, B as getGlobalPredefinedStates, F as LAYOUT_CHUNK_STYLES, H as hasStylesGenerated, I as POSITION_CHUNK_STYLES, L as STYLE_TO_CHUNK, M as DIMENSION_CHUNK_STYLES, N as DISPLAY_CHUNK_STYLES, O as styleHandlers, P as FONT_CHUNK_STYLES, V as setGlobalPredefinedStates, _ 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, j as CHUNK_NAMES, 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, w as defineHandler, x as parseStateKey, z as createStateParserContext } from "./chunks/style-engine-C1ECBZxR.js";
|
|
5
|
+
import { i as generateTypographyTokens } from "./chunks/config-engine-C3pF9EK9.js";
|
|
6
|
+
import { c as getGlobalFunctions, o as getGlobalCounterStyles, s as getGlobalFontFaces } from "./chunks/runtime-state-BTDqSYBk.js";
|
|
7
|
+
import { A as ownKeyframes, B as getNamePrefix, C as holdKeyframes, D as injector, E as injectRawCSS, F as configure, G as resetConfig, H as hasGlobalRecipes, I as getConfig, K as StyleInjector, M as touch, N as ChunkSheetRegistry, O as isPropertyDefined, P as chunkSheetRegistry, Q as resetStyleBatch, R as getGlobalKeyframes, S as getRawCSSText, T as injectGlobal, U as isConfigLocked, V as hasGlobalKeyframes, W as isTestEnvironment, X as hasPendingStyleWrites, Y as flushStyles, _ 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, q as SheetManager, r as processTokens, s as resolveRecipes, v as func, w as inject, x as getCSSTextForNode, y as gc, z as getGlobalRecipes } from "./chunks/runtime-engine-DvnE2g-E.js";
|
|
8
|
+
import { t as tastyDebug } from "./chunks/debug-C9LeNVoJ.js";
|
|
9
|
+
import "./core/index.js";
|
|
10
|
+
import { a as useProperty, c as useGlobalStyles, d as Element, f as tasty, i as useFontFace, l as useStyles, n as useFunction, o as useKeyframes, p as getDisplayName, r as useCounterStyle, s as useRawCSS, t as TastyBatchProvider } from "./chunks/react-runtime-O-OUrKLH.js";
|
|
11
|
+
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, Element, 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, TastyBatchProvider, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, 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, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Styles } from "
|
|
1
|
+
import { X as Styles } from "./types-jKZNpias.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/merge-styles.d.ts
|
|
4
4
|
declare function mergeStyles(...objects: (Styles | undefined | null)[]): Styles;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { mergeStyles };
|
|
7
|
-
//# sourceMappingURL=merge-styles.d.ts.map
|
|
6
|
+
export { mergeStyles as t };
|
|
7
|
+
//# sourceMappingURL=merge-styles-C_oMoJVd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-client.js","names":[],"sources":["../../src/ssr/astro-client.ts"],"sourcesContent":["/**\n * Client-side cache hydration for Astro islands.\n *\n * Reads the class name list from `window.__TASTY__` (populated by\n * inline scripts emitted during SSR) and pre-populates the injector\n * so island hydration skips the style pipeline entirely.\n *\n * This module is browser-safe — it does NOT import node:async_hooks.\n *\n * Usage:\n * - Automatically injected by tastyIntegration() via injectScript('before-hydration')\n * - Can be imported manually: `import '@tenphi/tasty/ssr/astro-client'`\n */\n\nimport { hydrateTastyClasses } from './hydrate';\n\nif (typeof window !== 'undefined') {\n hydrateTastyClasses();\n}\n"],"mappings":";;AAgBA,IAAI,OAAO,WAAW,aACpB,oBAAoB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/ssr/astro-middleware-extract-static.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Prerender-extraction middleware entrypoint for sites without islands.
|
|
4
|
+
* Exported only so Astro can resolve it through the package exports map.
|
|
5
|
+
*/
|
|
6
|
+
declare const onRequest: (context: {
|
|
7
|
+
isPrerendered?: boolean;
|
|
8
|
+
}, next: () => Promise<Response>) => Promise<Response>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { onRequest };
|
|
11
|
+
//# sourceMappingURL=astro-middleware-extract-static.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-middleware-extract-static.js","names":[],"sources":["../../src/ssr/astro-middleware-extract-static.ts"],"sourcesContent":["/**\n * Prerender-extraction middleware entrypoint for sites without islands.\n * Exported only so Astro can resolve it through the package exports map.\n */\n\nimport { tastyMiddleware } from './astro';\n\nconst options = {\n transferCache: false,\n extractionMetadata: true,\n};\n\nexport const onRequest = tastyMiddleware(options);\n"],"mappings":";AAYA,MAAa,YAAY,gBAAgB;CAJvC,eAAe;CACf,oBAAoB;AAGmB,CAAO"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/ssr/astro-middleware-extract.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Prerender-extraction middleware entrypoint with island cache transfer.
|
|
4
|
+
* Exported only so Astro can resolve it through the package exports map.
|
|
5
|
+
*/
|
|
6
|
+
declare const onRequest: (context: {
|
|
7
|
+
isPrerendered?: boolean;
|
|
8
|
+
}, next: () => Promise<Response>) => Promise<Response>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { onRequest };
|
|
11
|
+
//# sourceMappingURL=astro-middleware-extract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-middleware-extract.js","names":[],"sources":["../../src/ssr/astro-middleware-extract.ts"],"sourcesContent":["/**\n * Prerender-extraction middleware entrypoint with island cache transfer.\n * Exported only so Astro can resolve it through the package exports map.\n */\n\nimport { tastyMiddleware } from './astro';\n\nconst options = {\n transferCache: true,\n extractionMetadata: true,\n};\n\nexport const onRequest = tastyMiddleware(options);\n"],"mappings":";AAYA,MAAa,YAAY,gBAAgB;CAJvC,eAAe;CACf,oBAAoB;AAGmB,CAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/ssr/astro-middleware-static.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Astro middleware entrypoint for `tastyIntegration({ islands: false })`.
|
|
4
|
+
*
|
|
5
|
+
* Registered via `addMiddleware()` as
|
|
6
|
+
* `@tenphi/tasty/ssr/astro-middleware-static`. Exposed as a package subpath
|
|
7
|
+
* only so Astro can resolve it — use `tastyMiddleware({ transferCache: false })`
|
|
8
|
+
* directly if you need manual middleware composition.
|
|
9
|
+
*
|
|
10
|
+
* Identical to `./astro-middleware` except that no class-list `<script>` is
|
|
11
|
+
* emitted, so a site without `client:*` islands ships zero client JavaScript.
|
|
12
|
+
*/
|
|
13
|
+
declare const onRequest: (context: {
|
|
14
|
+
isPrerendered?: boolean;
|
|
15
|
+
}, next: () => Promise<Response>) => Promise<Response>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { onRequest };
|
|
18
|
+
//# sourceMappingURL=astro-middleware-static.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-middleware-static.js","names":[],"sources":["../../src/ssr/astro-middleware-static.ts"],"sourcesContent":["/**\n * Astro middleware entrypoint for `tastyIntegration({ islands: false })`.\n *\n * Registered via `addMiddleware()` as\n * `@tenphi/tasty/ssr/astro-middleware-static`. Exposed as a package subpath\n * only so Astro can resolve it — use `tastyMiddleware({ transferCache: false })`\n * directly if you need manual middleware composition.\n *\n * Identical to `./astro-middleware` except that no class-list `<script>` is\n * emitted, so a site without `client:*` islands ships zero client JavaScript.\n */\n\nimport { tastyMiddleware } from './astro';\n\nexport const onRequest = tastyMiddleware({ transferCache: false });\n"],"mappings":";;AAcA,MAAa,YAAY,gBAAgB,EAAE,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/ssr/astro-middleware.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Astro middleware entrypoint for `tastyIntegration()`.
|
|
4
|
+
*
|
|
5
|
+
* Registered via `addMiddleware()` as `@tenphi/tasty/ssr/astro-middleware`.
|
|
6
|
+
* Exposed as a package subpath only so Astro can resolve it — use
|
|
7
|
+
* `tastyMiddleware()` directly if you need manual middleware composition.
|
|
8
|
+
*
|
|
9
|
+
* This is the islands variant: the rendered class list is transferred to the
|
|
10
|
+
* client so hydrating islands skip the style pipeline. See
|
|
11
|
+
* `./astro-middleware-static` for the variant used by
|
|
12
|
+
* `tastyIntegration({ islands: false })`.
|
|
13
|
+
*/
|
|
14
|
+
declare const onRequest: (context: {
|
|
15
|
+
isPrerendered?: boolean;
|
|
16
|
+
}, next: () => Promise<Response>) => Promise<Response>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { onRequest };
|
|
19
|
+
//# sourceMappingURL=astro-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-middleware.js","names":[],"sources":["../../src/ssr/astro-middleware.ts"],"sourcesContent":["/**\n * Astro middleware entrypoint for `tastyIntegration()`.\n *\n * Registered via `addMiddleware()` as `@tenphi/tasty/ssr/astro-middleware`.\n * Exposed as a package subpath only so Astro can resolve it — use\n * `tastyMiddleware()` directly if you need manual middleware composition.\n *\n * This is the islands variant: the rendered class list is transferred to the\n * client so hydrating islands skip the style pipeline. See\n * `./astro-middleware-static` for the variant used by\n * `tastyIntegration({ islands: false })`.\n */\n\nimport { tastyMiddleware } from './astro';\n\nexport const onRequest = tastyMiddleware({ transferCache: true });\n"],"mappings":";;AAeA,MAAa,YAAY,gBAAgB,EAAE,eAAe,KAAK,CAAC"}
|
package/dist/ssr/astro.d.ts
CHANGED
|
@@ -1,29 +1,135 @@
|
|
|
1
|
-
import { hydrateTastyCache } from "./hydrate.js";
|
|
2
|
-
|
|
3
1
|
//#region src/ssr/astro.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Astro integration for Tasty SSR.
|
|
4
|
+
*
|
|
5
|
+
* Provides:
|
|
6
|
+
* - tastyIntegration() — Astro Integration API (recommended)
|
|
7
|
+
* - tastyMiddleware() — manual middleware for advanced composition
|
|
8
|
+
*
|
|
9
|
+
* Import from '@tenphi/tasty/ssr/astro'.
|
|
10
|
+
*/
|
|
4
11
|
interface TastyMiddlewareOptions {
|
|
5
12
|
/**
|
|
6
|
-
* Whether to embed the
|
|
7
|
-
* Set to false to skip
|
|
13
|
+
* Whether to embed the class-list script for client hydration.
|
|
14
|
+
* Set to false to skip class transfer (e.g. for CSP restrictions).
|
|
15
|
+
* Without it, client components may re-inject CSS that already exists
|
|
16
|
+
* in server-rendered `<style>` tags. Default: true.
|
|
8
17
|
*/
|
|
9
18
|
transferCache?: boolean;
|
|
10
19
|
}
|
|
11
20
|
/**
|
|
12
21
|
* Create an Astro middleware that collects Tasty styles during SSR.
|
|
13
22
|
*
|
|
14
|
-
* All React components rendered during the request
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* injects the collected CSS into </head>.
|
|
23
|
+
* All React components rendered during the request will have their
|
|
24
|
+
* computeStyles() calls captured by the collector via AsyncLocalStorage.
|
|
25
|
+
* After rendering, the middleware injects the collected CSS into </head>.
|
|
18
26
|
*
|
|
19
|
-
* @example
|
|
27
|
+
* @example Manual middleware setup
|
|
20
28
|
* ```ts
|
|
21
29
|
* // src/middleware.ts
|
|
22
30
|
* import { tastyMiddleware } from '@tenphi/tasty/ssr/astro';
|
|
23
31
|
* export const onRequest = tastyMiddleware();
|
|
24
32
|
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example Composing with other middleware
|
|
35
|
+
* ```ts
|
|
36
|
+
* // src/middleware.ts
|
|
37
|
+
* import { sequence } from 'astro:middleware';
|
|
38
|
+
* import { tastyMiddleware } from '@tenphi/tasty/ssr/astro';
|
|
39
|
+
*
|
|
40
|
+
* export const onRequest = sequence(
|
|
41
|
+
* tastyMiddleware(),
|
|
42
|
+
* myOtherMiddleware,
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function tastyMiddleware(options?: TastyMiddlewareOptions): (context: {
|
|
47
|
+
isPrerendered?: boolean;
|
|
48
|
+
}, next: () => Promise<Response>) => Promise<Response>;
|
|
49
|
+
interface TastyIntegrationCSSOptions {
|
|
50
|
+
/**
|
|
51
|
+
* CSS delivery mode. Extraction only applies to prerendered builds.
|
|
52
|
+
* Extracted CSS preserves resource URLs verbatim, so use absolute URLs or
|
|
53
|
+
* data URLs. Root-relative URLs are also supported unless `assetsPrefix`
|
|
54
|
+
* sends CSS to an external origin. The build rejects resource URLs whose
|
|
55
|
+
* targets would change after extraction.
|
|
56
|
+
*/
|
|
57
|
+
mode?: 'inline' | 'extract';
|
|
58
|
+
}
|
|
59
|
+
interface TastyIntegrationOptions {
|
|
60
|
+
/**
|
|
61
|
+
* Enable island hydration support.
|
|
62
|
+
*
|
|
63
|
+
* When `true` (default): injects a client hydration script via
|
|
64
|
+
* `injectScript('before-hydration')` and sets `transferCache: true`
|
|
65
|
+
* on the middleware. Islands skip the style pipeline during hydration.
|
|
66
|
+
*
|
|
67
|
+
* When `false`: no client JS is shipped and `transferCache` is set
|
|
68
|
+
* to `false`. Use this for fully static sites without `client:*`
|
|
69
|
+
* directives.
|
|
70
|
+
*/
|
|
71
|
+
islands?: boolean;
|
|
72
|
+
/** Configure inline or build-wide extracted CSS delivery. */
|
|
73
|
+
css?: TastyIntegrationCSSOptions;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Astro integration that automatically sets up Tasty SSR.
|
|
77
|
+
*
|
|
78
|
+
* Registers middleware for cross-component CSS deduplication and
|
|
79
|
+
* optionally injects a client hydration script for island support.
|
|
80
|
+
*
|
|
81
|
+
* @example Basic setup (with islands)
|
|
82
|
+
* ```ts
|
|
83
|
+
* // astro.config.mjs
|
|
84
|
+
* import { tastyIntegration } from '@tenphi/tasty/ssr/astro';
|
|
85
|
+
*
|
|
86
|
+
* export default defineConfig({
|
|
87
|
+
* integrations: [tastyIntegration()],
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @example Static-only (no client JS)
|
|
92
|
+
* ```ts
|
|
93
|
+
* // astro.config.mjs
|
|
94
|
+
* import { tastyIntegration } from '@tenphi/tasty/ssr/astro';
|
|
95
|
+
*
|
|
96
|
+
* export default defineConfig({
|
|
97
|
+
* integrations: [tastyIntegration({ islands: false })],
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
25
100
|
*/
|
|
26
|
-
declare function
|
|
101
|
+
declare function tastyIntegration(options?: TastyIntegrationOptions): {
|
|
102
|
+
name: string;
|
|
103
|
+
hooks: {
|
|
104
|
+
'astro:config:setup': ({
|
|
105
|
+
addMiddleware,
|
|
106
|
+
injectScript
|
|
107
|
+
}: {
|
|
108
|
+
addMiddleware: (middleware: {
|
|
109
|
+
entrypoint: string | URL;
|
|
110
|
+
order: "pre" | "post";
|
|
111
|
+
}) => void;
|
|
112
|
+
injectScript: (stage: "head-inline" | "before-hydration" | "page" | "page-ssr", content: string) => void;
|
|
113
|
+
}) => void;
|
|
114
|
+
'astro:config:done': ({
|
|
115
|
+
config
|
|
116
|
+
}: {
|
|
117
|
+
config: {
|
|
118
|
+
base?: string;
|
|
119
|
+
site?: URL;
|
|
120
|
+
build?: {
|
|
121
|
+
assets?: string;
|
|
122
|
+
assetsPrefix?: string | Record<string, string>;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}) => void;
|
|
126
|
+
'astro:build:done': ({
|
|
127
|
+
dir
|
|
128
|
+
}: {
|
|
129
|
+
dir: URL;
|
|
130
|
+
}) => Promise<void>;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
27
133
|
//#endregion
|
|
28
|
-
export { TastyMiddlewareOptions,
|
|
134
|
+
export { TastyIntegrationCSSOptions, TastyIntegrationOptions, TastyMiddlewareOptions, tastyIntegration, tastyMiddleware };
|
|
29
135
|
//# sourceMappingURL=astro.d.ts.map
|