@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/docs/tasty-static.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Build-Time Extraction (`tastyStatic`)
|
|
2
2
|
|
|
3
|
-
`tastyStatic` is
|
|
3
|
+
`tastyStatic` is Tasty's framework-agnostic build-time utility for extracting CSS before rendering. It produces no client styling runtime in file mode, but it is not the only way to achieve zero-runtime delivery: server-only `tasty()` also ships no Tasty runtime to the browser while retaining the full React component API. Astro's `tastyIntegration({ islands: false })` is the clearest example; the same architecture applies to server-only Next.js RSC.
|
|
4
|
+
|
|
5
|
+
Choose `tastyStatic` specifically when styles must be generated during the build, when the consumer is not React, or when you want static class-name objects instead of components. For the broader docs map, see the [Docs Hub](README.md).
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
@@ -8,19 +10,19 @@
|
|
|
8
10
|
|
|
9
11
|
- **Static site generation (SSG)** — Pre-render all styles at build time
|
|
10
12
|
- **No-JavaScript websites** — CSS works without any JS runtime
|
|
11
|
-
- **Performance-critical pages** —
|
|
13
|
+
- **Performance-critical pages** — CSS extracted before the application renders
|
|
12
14
|
- **Landing pages** — Minimal bundle size with pre-generated CSS
|
|
13
15
|
|
|
14
16
|
## Requirements
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Build-time extraction is part of the main `@tenphi/tasty` package but requires additional peer dependencies depending on your setup:
|
|
17
19
|
|
|
18
|
-
| Dependency
|
|
19
|
-
|
|
20
|
-
| `@babel/core`
|
|
21
|
-
| `@babel/helper-plugin-utils` | >= 7.24 | Babel plugin
|
|
22
|
-
| `@babel/types`
|
|
23
|
-
| `jiti`
|
|
20
|
+
| Dependency | Version | Required for |
|
|
21
|
+
| ---------------------------- | ------- | -------------------------------------------------------------------------- |
|
|
22
|
+
| `@babel/core` | >= 7.24 | Babel plugin (`@tenphi/tasty/babel-plugin`) |
|
|
23
|
+
| `@babel/helper-plugin-utils` | >= 7.24 | Babel plugin |
|
|
24
|
+
| `@babel/types` | >= 7.24 | Babel plugin |
|
|
25
|
+
| `jiti` | >= 2.6 | Next.js wrapper (`@tenphi/tasty/zero/next`) when using `configFile` option |
|
|
24
26
|
|
|
25
27
|
All of these are declared as optional peer dependencies of `@tenphi/tasty`. Install only what your setup requires:
|
|
26
28
|
|
|
@@ -107,11 +109,11 @@ tastyStatic('body', {
|
|
|
107
109
|
|
|
108
110
|
## StaticStyle Object
|
|
109
111
|
|
|
110
|
-
| Property
|
|
111
|
-
|
|
112
|
-
| `className`
|
|
113
|
-
| `styles`
|
|
114
|
-
| `toString()` | `() => string` | Returns `className` for string coercion
|
|
112
|
+
| Property | Type | Description |
|
|
113
|
+
| ------------ | -------------- | ------------------------------------------ |
|
|
114
|
+
| `className` | `string` | Space-separated class names for use in JSX |
|
|
115
|
+
| `styles` | `Styles` | The original (or merged) styles object |
|
|
116
|
+
| `toString()` | `() => string` | Returns `className` for string coercion |
|
|
115
117
|
|
|
116
118
|
---
|
|
117
119
|
|
|
@@ -123,49 +125,83 @@ tastyStatic('body', {
|
|
|
123
125
|
// babel.config.js
|
|
124
126
|
module.exports = {
|
|
125
127
|
plugins: [
|
|
126
|
-
[
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
[
|
|
129
|
+
'@tenphi/tasty/babel-plugin',
|
|
130
|
+
{
|
|
131
|
+
output: 'public/tasty.css',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
],
|
|
130
135
|
};
|
|
131
136
|
```
|
|
132
137
|
|
|
133
|
-
These examples use `data-schema="dark"` as the root-state convention. If your app already uses a different root attribute such as `data-theme`, keep the same alias pattern and swap the attribute name consistently in your
|
|
138
|
+
These examples use `data-schema="dark"` as the root-state convention. If your app already uses a different root attribute such as `data-theme`, keep the same alias pattern and swap the attribute name consistently in your build-time config.
|
|
134
139
|
|
|
135
140
|
### With Configuration
|
|
136
141
|
|
|
137
142
|
```javascript
|
|
138
143
|
module.exports = {
|
|
139
144
|
plugins: [
|
|
140
|
-
[
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
[
|
|
146
|
+
'@tenphi/tasty/babel-plugin',
|
|
147
|
+
{
|
|
148
|
+
output: 'public/tasty.css',
|
|
149
|
+
config: {
|
|
150
|
+
states: {
|
|
151
|
+
'@mobile': '@media(w < 768px)',
|
|
152
|
+
'@tablet': '@media(w < 1024px)',
|
|
153
|
+
'@dark': '@root(schema=dark)',
|
|
154
|
+
},
|
|
155
|
+
devMode: true,
|
|
147
156
|
},
|
|
148
|
-
devMode: true,
|
|
149
157
|
},
|
|
150
|
-
|
|
151
|
-
]
|
|
158
|
+
],
|
|
159
|
+
],
|
|
152
160
|
};
|
|
153
161
|
```
|
|
154
162
|
|
|
155
163
|
### Plugin Options
|
|
156
164
|
|
|
157
|
-
| Option
|
|
158
|
-
|
|
159
|
-
| `output`
|
|
160
|
-
| `mode`
|
|
161
|
-
| `configFile`
|
|
162
|
-
| `config`
|
|
163
|
-
| `configDeps`
|
|
164
|
-
| `
|
|
165
|
-
| `config.
|
|
166
|
-
| `config.
|
|
167
|
-
| `config.
|
|
168
|
-
| `config.
|
|
165
|
+
| Option | Type | Default | Description |
|
|
166
|
+
| -------------------------- | ------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
167
|
+
| `output` | `string` | `'tasty.css'` | Path for generated CSS file |
|
|
168
|
+
| `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS (see [Inject Mode](#inject-mode)) |
|
|
169
|
+
| `configFile` | `string` | — | Absolute path to a TS/JS module that default-exports a `TastyZeroConfig` object. JSON-serializable alternative to `config` — required for Turbopack. |
|
|
170
|
+
| `config` | `TastyZeroConfig \| () => TastyZeroConfig` | `{}` | Inline config object or factory function. Takes precedence over `configFile`. |
|
|
171
|
+
| `configDeps` | `string[]` | `[]` | Absolute file paths that affect config (for cache invalidation) |
|
|
172
|
+
| `injectImport` | `boolean` | `true` | Replace `@tenphi/tasty/static` imports with an import of the generated CSS file. Set to `false` to manage CSS imports manually. |
|
|
173
|
+
| `config.states` | `Record<string, string>` | `{}` | Predefined state aliases (e.g. `{ '@mobile': '@media(w < 768px)' }`) |
|
|
174
|
+
| `config.devMode` | `boolean` | `false` | Add source comments to CSS |
|
|
175
|
+
| `config.tokens` | `ConfigTokens` | — | Design tokens injected as CSS custom properties on `:root`. Values are parsed through the Tasty DSL. Supports state maps for responsive/themed tokens. |
|
|
176
|
+
| `config.replaceTokens` | `Record<string, string \| number>` | — | Parse-time token substitution. Keys use `$name` for custom properties and `#name` for color tokens. |
|
|
177
|
+
| `config.recipes` | `Record<string, RecipeStyles>` | `{}` | Predefined style recipes |
|
|
178
|
+
| `config.keyframes` | `Record<string, KeyframesSteps>` | — | Global `@keyframes` definitions available to all `tastyStatic` calls |
|
|
179
|
+
| `config.fontFaces` | `Record<string, FontFaceInput>` | — | Global `@font-face` definitions |
|
|
180
|
+
| `config.counterStyles` | `Record<string, CounterStyleDescriptors>` | — | Global `@counter-style` definitions |
|
|
181
|
+
| `config.units` | `Record<string, string \| UnitHandler>` | — | Custom units for the style parser (merged with built-ins). E.g. `{ em: 'em', vw: 'vw' }` |
|
|
182
|
+
| `config.functions` | `Record<string, FunctionDefinition \| Function>` | — | Custom functions (merged). Bare keys → parse functions; `$$name` keys → declarative CSS `@function` definitions |
|
|
183
|
+
| `config.polyfills` | `{ functions?: boolean }` | `{}` | Opt-in polyfills. `functions: true` inlines `@function` calls into plain CSS at build time |
|
|
184
|
+
| `config.plugins` | `TastyPlugin[]` | — | Plugins that extend tasty with custom functions, units, states, and handlers |
|
|
185
|
+
| `config.handlers` | `Record<string, StyleHandlerDefinition>` | — | Custom style handlers that transform style properties into CSS declarations |
|
|
186
|
+
| `config.presets` | `Record<string, TypographyPreset>` | — | Typography presets — shorthand for `generateTypographyTokens()`. Generated tokens merge under explicit `tokens`. |
|
|
187
|
+
| `config.globalStyles` | `Record<string, Styles>` | — | Global Tasty styles keyed by CSS selector. Supports the full style syntax. |
|
|
188
|
+
| `config.autoPropertyTypes` | `boolean` | `true` | Automatically infer and register CSS `@property` declarations from values |
|
|
189
|
+
| `config.parserCacheSize` | `number` | `1000` | Parser LRU cache size. Larger values improve performance for builds with many unique style values |
|
|
190
|
+
| `config.namePrefix` | `string` | `'ts'` | Prefix prepended to every generated identifier. Defaults to `'ts'` so static classes never collide with runtime (`'t'`) classes. See [Configuration: Name prefix](configuration.md#name-prefix). |
|
|
191
|
+
|
|
192
|
+
### Coexisting with `tasty()`
|
|
193
|
+
|
|
194
|
+
When a page mixes `tastyStatic` with `tasty`, both must use **different** `namePrefix` values. The defaults handle this automatically (`'t'` for React rendering, `'ts'` for build-time extraction). If you customize one, customize the other:
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
// tasty-zero.config.ts (Babel plugin)
|
|
198
|
+
export default { namePrefix: 'mbs' };
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
// app entry (`tasty()` configure)
|
|
203
|
+
configure({ namePrefix: 'mb' });
|
|
204
|
+
```
|
|
169
205
|
|
|
170
206
|
---
|
|
171
207
|
|
|
@@ -177,16 +213,24 @@ Recipes work with `tastyStatic` the same way as with runtime `tasty`:
|
|
|
177
213
|
// babel.config.js
|
|
178
214
|
module.exports = {
|
|
179
215
|
plugins: [
|
|
180
|
-
[
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
216
|
+
[
|
|
217
|
+
'@tenphi/tasty/babel-plugin',
|
|
218
|
+
{
|
|
219
|
+
output: 'public/tasty.css',
|
|
220
|
+
config: {
|
|
221
|
+
recipes: {
|
|
222
|
+
card: {
|
|
223
|
+
padding: '4x',
|
|
224
|
+
fill: '#surface',
|
|
225
|
+
radius: '1r',
|
|
226
|
+
border: true,
|
|
227
|
+
},
|
|
228
|
+
elevated: { shadow: '2x 2x 4x #shadow' },
|
|
229
|
+
},
|
|
186
230
|
},
|
|
187
231
|
},
|
|
188
|
-
|
|
189
|
-
]
|
|
232
|
+
],
|
|
233
|
+
],
|
|
190
234
|
};
|
|
191
235
|
```
|
|
192
236
|
|
|
@@ -198,7 +242,7 @@ const card = tastyStatic({
|
|
|
198
242
|
color: '#text',
|
|
199
243
|
});
|
|
200
244
|
|
|
201
|
-
<div className={card}>Styled card</div
|
|
245
|
+
<div className={card}>Styled card</div>;
|
|
202
246
|
```
|
|
203
247
|
|
|
204
248
|
---
|
|
@@ -209,7 +253,7 @@ The `withTastyZero` wrapper configures both **webpack** and **Turbopack** automa
|
|
|
209
253
|
|
|
210
254
|
```typescript
|
|
211
255
|
// next.config.ts
|
|
212
|
-
import { withTastyZero } from '@tenphi/tasty/next';
|
|
256
|
+
import { withTastyZero } from '@tenphi/tasty/zero/next';
|
|
213
257
|
|
|
214
258
|
export default withTastyZero({
|
|
215
259
|
output: 'public/tasty.css',
|
|
@@ -222,14 +266,14 @@ export default withTastyZero({
|
|
|
222
266
|
|
|
223
267
|
### `withTastyZero` Options
|
|
224
268
|
|
|
225
|
-
| Option
|
|
226
|
-
|
|
227
|
-
| `output`
|
|
228
|
-
| `mode`
|
|
229
|
-
| `enabled`
|
|
230
|
-
| `configFile` | `string`
|
|
231
|
-
| `config`
|
|
232
|
-
| `configDeps` | `string[]`
|
|
269
|
+
| Option | Type | Default | Description |
|
|
270
|
+
| ------------ | -------------------- | -------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
271
|
+
| `output` | `string` | `'public/tasty.css'` | Output path for CSS relative to project root |
|
|
272
|
+
| `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS |
|
|
273
|
+
| `enabled` | `boolean` | `true` | Enable/disable the plugin |
|
|
274
|
+
| `configFile` | `string` | — | Path to a TS/JS module that default-exports `TastyZeroConfig`. Recommended for Turbopack compatibility. |
|
|
275
|
+
| `config` | `TastyZeroConfig` | — | Inline config object. For static configs that don't change during dev. |
|
|
276
|
+
| `configDeps` | `string[]` | `[]` | Extra files the config depends on (for cache invalidation) |
|
|
233
277
|
|
|
234
278
|
### Turbopack Support
|
|
235
279
|
|
|
@@ -267,12 +311,15 @@ export default defineConfig({
|
|
|
267
311
|
react({
|
|
268
312
|
babel: {
|
|
269
313
|
plugins: [
|
|
270
|
-
[
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
314
|
+
[
|
|
315
|
+
'@tenphi/tasty/babel-plugin',
|
|
316
|
+
{
|
|
317
|
+
output: 'public/tasty.css',
|
|
318
|
+
config: {
|
|
319
|
+
states: { '@mobile': '@media(w < 768px)' },
|
|
320
|
+
},
|
|
274
321
|
},
|
|
275
|
-
|
|
322
|
+
],
|
|
276
323
|
],
|
|
277
324
|
},
|
|
278
325
|
}),
|
|
@@ -306,7 +353,9 @@ export const Button = () => <button className={button}>Click</button>;
|
|
|
306
353
|
const button = {
|
|
307
354
|
className: 'ts3f2a1b ts8c4d2e',
|
|
308
355
|
styles: { padding: '2x 4x', fill: '#purple', color: '#white' },
|
|
309
|
-
toString() {
|
|
356
|
+
toString() {
|
|
357
|
+
return this.className;
|
|
358
|
+
},
|
|
310
359
|
};
|
|
311
360
|
|
|
312
361
|
export const Button = () => <button className={button}>Click</button>;
|
|
@@ -354,13 +403,16 @@ This is ideal for **reusable components**, **extensions**, and **libraries** whe
|
|
|
354
403
|
// babel.config.js
|
|
355
404
|
module.exports = {
|
|
356
405
|
plugins: [
|
|
357
|
-
[
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
406
|
+
[
|
|
407
|
+
'@tenphi/tasty/babel-plugin',
|
|
408
|
+
{
|
|
409
|
+
mode: 'inject',
|
|
410
|
+
config: {
|
|
411
|
+
states: { '@mobile': '@media(w < 768px)' },
|
|
412
|
+
},
|
|
361
413
|
},
|
|
362
|
-
|
|
363
|
-
]
|
|
414
|
+
],
|
|
415
|
+
],
|
|
364
416
|
};
|
|
365
417
|
```
|
|
366
418
|
|
|
@@ -368,7 +420,7 @@ With Next.js:
|
|
|
368
420
|
|
|
369
421
|
```typescript
|
|
370
422
|
// next.config.ts
|
|
371
|
-
import { withTastyZero } from '@tenphi/tasty/next';
|
|
423
|
+
import { withTastyZero } from '@tenphi/tasty/zero/next';
|
|
372
424
|
|
|
373
425
|
export default withTastyZero({
|
|
374
426
|
mode: 'inject',
|
|
@@ -400,13 +452,20 @@ tastyStatic('.heading', { preset: 'h1' });
|
|
|
400
452
|
```tsx
|
|
401
453
|
import { injectCSS as _$i } from '@tenphi/tasty/static/inject';
|
|
402
454
|
|
|
403
|
-
const button =
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
455
|
+
const button =
|
|
456
|
+
(_$i(
|
|
457
|
+
'ts3f2a1b ts8c4d2e',
|
|
458
|
+
'.ts3f2a1b.ts3f2a1b{padding:16px 32px}\n.ts8c4d2e.ts8c4d2e{background:#9370db}',
|
|
459
|
+
),
|
|
460
|
+
{
|
|
461
|
+
className: 'ts3f2a1b ts8c4d2e',
|
|
462
|
+
styles: { padding: '2x 4x', fill: '#purple' },
|
|
463
|
+
toString() {
|
|
464
|
+
return this.className;
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
_$i('.heading', '.heading{font-size:2.5rem;font-weight:700;line-height:1.2}');
|
|
410
469
|
```
|
|
411
470
|
|
|
412
471
|
### Dev Mode / HMR
|
|
@@ -415,7 +474,7 @@ Class names are content-hashed (`ts` + MD5). When styles change, a new hash prod
|
|
|
415
474
|
|
|
416
475
|
### Limitations (inject mode)
|
|
417
476
|
|
|
418
|
-
- **Client-side only** — Styles are injected via the DOM, so they are not available during SSR. For server-rendered apps, use `mode: 'file'` or
|
|
477
|
+
- **Client-side only** — Styles are injected via the DOM, so they are not available during SSR. For server-rendered apps, use `mode: 'file'` or React `tasty()`.
|
|
419
478
|
- **Larger JS bundle** — CSS is embedded in JavaScript, increasing bundle size. Best suited for components and extensions, not full-app styling.
|
|
420
479
|
|
|
421
480
|
---
|
|
@@ -484,13 +543,15 @@ For dynamic styling needs, combine with regular CSS or CSS variables:
|
|
|
484
543
|
```tsx
|
|
485
544
|
const card = tastyStatic({
|
|
486
545
|
padding: '4x',
|
|
487
|
-
fill: '
|
|
546
|
+
fill: '($card-bg, #white)',
|
|
488
547
|
});
|
|
489
548
|
|
|
490
549
|
<div
|
|
491
550
|
className={card}
|
|
492
|
-
style={{
|
|
493
|
-
|
|
551
|
+
style={{
|
|
552
|
+
'--card-bg': isActive ? 'var(--purple-color)' : 'var(--white-color)',
|
|
553
|
+
}}
|
|
554
|
+
/>;
|
|
494
555
|
```
|
|
495
556
|
|
|
496
557
|
---
|
|
@@ -507,14 +568,15 @@ const card = tastyStatic({
|
|
|
507
568
|
## Common Issues
|
|
508
569
|
|
|
509
570
|
- No CSS file is generated: make sure the Babel plugin actually runs for files importing `@tenphi/tasty/static`, and verify the `output` path is writable.
|
|
510
|
-
- Styles stay dynamic by mistake: `tastyStatic()` only supports build-time-known values. Move
|
|
571
|
+
- Styles stay dynamic by mistake: `tastyStatic()` only supports build-time-known values. Move dynamic values to CSS variables or switch that component to React `tasty()`.
|
|
511
572
|
- Turbopack config behaves inconsistently: prefer `configFile` over inline functions so the setup stays JSON-serializable.
|
|
512
573
|
|
|
513
574
|
---
|
|
514
575
|
|
|
515
576
|
## Related
|
|
516
577
|
|
|
517
|
-
- [Docs Hub](README.md) — Choose the right guide by task or
|
|
578
|
+
- [Docs Hub](README.md) — Choose the right guide by task or CSS delivery model
|
|
518
579
|
- [Style DSL](dsl.md) — State maps, tokens, units, extending semantics (shared by runtime and static)
|
|
519
|
-
- [
|
|
580
|
+
- [React API](react-api.md) — Client or server rendering with `tasty()`: component props, variants, sub-elements, and style functions
|
|
520
581
|
- [Configuration](configuration.md) — Global configuration: tokens, recipes, custom units, and style handlers
|
|
582
|
+
- [Plugins & Extension Points](plugins.md) — Which extension points work at build time (`functions`, `units`, `states`, `handlers`, `recipes`) and which do not (`propHandlers` — `tastyStatic()` takes styles objects, not props)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/tasty",
|
|
3
|
-
"version": "0.0.0-snapshot.
|
|
3
|
+
"version": "0.0.0-snapshot.bbfcd75",
|
|
4
4
|
"description": "A design-system-integrated styling system and DSL for concise, state-aware UI styling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"import": "./dist/zero/index.js",
|
|
33
33
|
"default": "./dist/zero/index.js"
|
|
34
34
|
},
|
|
35
|
-
"./next": {
|
|
35
|
+
"./zero/next": {
|
|
36
36
|
"types": "./dist/zero/next.d.ts",
|
|
37
37
|
"import": "./dist/zero/next.js",
|
|
38
38
|
"default": "./dist/zero/next.js"
|
|
@@ -52,11 +52,41 @@
|
|
|
52
52
|
"import": "./dist/ssr/next.js",
|
|
53
53
|
"default": "./dist/ssr/next.js"
|
|
54
54
|
},
|
|
55
|
+
"./ssr/next-config": {
|
|
56
|
+
"types": "./dist/ssr/next-config.d.ts",
|
|
57
|
+
"import": "./dist/ssr/next-config.js",
|
|
58
|
+
"default": "./dist/ssr/next-config.js"
|
|
59
|
+
},
|
|
55
60
|
"./ssr/astro": {
|
|
56
61
|
"types": "./dist/ssr/astro.d.ts",
|
|
57
62
|
"import": "./dist/ssr/astro.js",
|
|
58
63
|
"default": "./dist/ssr/astro.js"
|
|
59
64
|
},
|
|
65
|
+
"./ssr/astro-client": {
|
|
66
|
+
"types": "./dist/ssr/astro-client.d.ts",
|
|
67
|
+
"import": "./dist/ssr/astro-client.js",
|
|
68
|
+
"default": "./dist/ssr/astro-client.js"
|
|
69
|
+
},
|
|
70
|
+
"./ssr/astro-middleware": {
|
|
71
|
+
"types": "./dist/ssr/astro-middleware.d.ts",
|
|
72
|
+
"import": "./dist/ssr/astro-middleware.js",
|
|
73
|
+
"default": "./dist/ssr/astro-middleware.js"
|
|
74
|
+
},
|
|
75
|
+
"./ssr/astro-middleware-static": {
|
|
76
|
+
"types": "./dist/ssr/astro-middleware-static.d.ts",
|
|
77
|
+
"import": "./dist/ssr/astro-middleware-static.js",
|
|
78
|
+
"default": "./dist/ssr/astro-middleware-static.js"
|
|
79
|
+
},
|
|
80
|
+
"./ssr/astro-middleware-extract": {
|
|
81
|
+
"types": "./dist/ssr/astro-middleware-extract.d.ts",
|
|
82
|
+
"import": "./dist/ssr/astro-middleware-extract.js",
|
|
83
|
+
"default": "./dist/ssr/astro-middleware-extract.js"
|
|
84
|
+
},
|
|
85
|
+
"./ssr/astro-middleware-extract-static": {
|
|
86
|
+
"types": "./dist/ssr/astro-middleware-extract-static.d.ts",
|
|
87
|
+
"import": "./dist/ssr/astro-middleware-extract-static.js",
|
|
88
|
+
"default": "./dist/ssr/astro-middleware-extract-static.js"
|
|
89
|
+
},
|
|
60
90
|
"./tasty.config": "./tasty.config.ts"
|
|
61
91
|
},
|
|
62
92
|
"files": [
|
|
@@ -67,7 +97,12 @@
|
|
|
67
97
|
"sideEffects": [
|
|
68
98
|
"./dist/ssr/index.js",
|
|
69
99
|
"./dist/ssr/next.js",
|
|
70
|
-
"./dist/ssr/astro.js"
|
|
100
|
+
"./dist/ssr/astro.js",
|
|
101
|
+
"./dist/ssr/astro-client.js",
|
|
102
|
+
"./dist/ssr/astro-middleware.js",
|
|
103
|
+
"./dist/ssr/astro-middleware-static.js",
|
|
104
|
+
"./dist/ssr/astro-middleware-extract.js",
|
|
105
|
+
"./dist/ssr/astro-middleware-extract-static.js"
|
|
71
106
|
],
|
|
72
107
|
"engines": {
|
|
73
108
|
"node": ">=20"
|
|
@@ -75,6 +110,9 @@
|
|
|
75
110
|
"scripts": {
|
|
76
111
|
"build": "tsdown",
|
|
77
112
|
"test": "vitest run",
|
|
113
|
+
"test:node": "vitest run --project node",
|
|
114
|
+
"test:browser": "vitest run --project browser",
|
|
115
|
+
"test:setup": "playwright install chromium",
|
|
78
116
|
"test:watch": "vitest",
|
|
79
117
|
"test:coverage": "vitest run --coverage",
|
|
80
118
|
"typecheck": "tsc --noEmit",
|
|
@@ -83,11 +121,19 @@
|
|
|
83
121
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
84
122
|
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
85
123
|
"size": "size-limit",
|
|
86
|
-
"bench": "vitest bench",
|
|
124
|
+
"bench": "vitest bench --project node",
|
|
125
|
+
"bench:browser": "vitest bench --project browser",
|
|
126
|
+
"bench:overhead": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-overhead.bench.tsx",
|
|
127
|
+
"bench:injection": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-injection.bench.ts",
|
|
128
|
+
"bench:interaction": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-interaction.bench.tsx",
|
|
129
|
+
"bench:cold-start": "node scripts/cold-start/index.mjs",
|
|
87
130
|
"prepublishOnly": "pnpm run build",
|
|
88
131
|
"changeset": "changeset",
|
|
89
132
|
"version": "changeset version",
|
|
90
133
|
"release": "changeset publish",
|
|
134
|
+
"knip": "knip",
|
|
135
|
+
"check:build": "node scripts/check-built-entries.mjs",
|
|
136
|
+
"check:test-only": "node scripts/check-test-only-code.mjs",
|
|
91
137
|
"hygiene": "pnpm lint && pnpm format:check && pnpm typecheck",
|
|
92
138
|
"hygiene:fix": "pnpm lint:fix && pnpm format && pnpm typecheck"
|
|
93
139
|
},
|
|
@@ -117,6 +163,7 @@
|
|
|
117
163
|
"@babel/helper-plugin-utils": "^7.24.0",
|
|
118
164
|
"@babel/types": "^7.24.0",
|
|
119
165
|
"jiti": "^2.6.1",
|
|
166
|
+
"next": ">=14.0.0",
|
|
120
167
|
"react": "^18.0.0 || ^19.0.0"
|
|
121
168
|
},
|
|
122
169
|
"peerDependenciesMeta": {
|
|
@@ -134,60 +181,93 @@
|
|
|
134
181
|
},
|
|
135
182
|
"jiti": {
|
|
136
183
|
"optional": true
|
|
184
|
+
},
|
|
185
|
+
"next": {
|
|
186
|
+
"optional": true
|
|
137
187
|
}
|
|
138
188
|
},
|
|
139
189
|
"dependencies": {
|
|
140
190
|
"csstype": "^3.1.0"
|
|
141
191
|
},
|
|
142
192
|
"devDependencies": {
|
|
193
|
+
"@astrojs/react": "^4.4.2",
|
|
143
194
|
"@babel/core": "^7.24.0",
|
|
144
|
-
"@
|
|
195
|
+
"@babel/helper-plugin-utils": "^7.24.0",
|
|
196
|
+
"@babel/types": "^7.24.0",
|
|
197
|
+
"@changesets/changelog-github": "^0.7.0",
|
|
145
198
|
"@changesets/cli": "^2.29.8",
|
|
146
199
|
"@eslint/js": "^10.0.1",
|
|
147
200
|
"@size-limit/esbuild": "^12.0.0",
|
|
148
201
|
"@size-limit/file": "^12.0.0",
|
|
202
|
+
"@tenphi/eslint-plugin-tasty": "^1.0.5",
|
|
149
203
|
"@testing-library/jest-dom": "^6.9.1",
|
|
150
204
|
"@testing-library/react": "^16.3.2",
|
|
151
205
|
"@types/babel__core": "^7.20.5",
|
|
152
206
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
153
|
-
"@types/node": "^
|
|
207
|
+
"@types/node": "^24.13.3",
|
|
154
208
|
"@types/react": "^19.0.0",
|
|
155
|
-
"@
|
|
209
|
+
"@types/react-dom": "^19.0.0",
|
|
210
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
211
|
+
"astro": "^5.18.2",
|
|
212
|
+
"esbuild": "^0.27.7",
|
|
156
213
|
"eslint": "^10.0.0",
|
|
157
214
|
"eslint-config-prettier": "^10.1.8",
|
|
158
|
-
"
|
|
159
|
-
"
|
|
215
|
+
"jiti": "^2.6.1",
|
|
216
|
+
"knip": "^5.61.3",
|
|
217
|
+
"next": "^16.0.0",
|
|
218
|
+
"playwright": "^1.62.1",
|
|
219
|
+
"prettier": "^3.9.6",
|
|
160
220
|
"react": "^19.0.0",
|
|
221
|
+
"react-dom": "^19.0.0",
|
|
161
222
|
"size-limit": "^12.0.0",
|
|
162
|
-
"tsdown": "^0.
|
|
163
|
-
"typescript": "^
|
|
223
|
+
"tsdown": "^0.22.0",
|
|
224
|
+
"typescript": "^6.0.2",
|
|
164
225
|
"typescript-eslint": "^8.56.0",
|
|
165
|
-
"vitest": "^4.
|
|
166
|
-
},
|
|
167
|
-
"pnpm": {
|
|
168
|
-
"onlyBuiltDependencies": [
|
|
169
|
-
"esbuild"
|
|
170
|
-
]
|
|
226
|
+
"vitest": "^4.1.10"
|
|
171
227
|
},
|
|
172
|
-
"packageManager": "pnpm@
|
|
228
|
+
"packageManager": "pnpm@11.24.0",
|
|
173
229
|
"size-limit": [
|
|
174
230
|
{
|
|
175
231
|
"name": "main (import *)",
|
|
176
232
|
"path": "dist/index.js",
|
|
177
233
|
"import": "*",
|
|
178
|
-
"limit": "
|
|
234
|
+
"limit": "56.39 kB"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "main (tasty)",
|
|
238
|
+
"path": "dist/index.js",
|
|
239
|
+
"import": "{ tasty }",
|
|
240
|
+
"limit": "50.61 kB"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "main (StyleParser)",
|
|
244
|
+
"path": "dist/index.js",
|
|
245
|
+
"import": "{ StyleParser }",
|
|
246
|
+
"limit": "6.94 kB"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "main (parseColor)",
|
|
250
|
+
"path": "dist/index.js",
|
|
251
|
+
"import": "{ parseColor }",
|
|
252
|
+
"limit": "7.59 kB"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "main (useRawCSS)",
|
|
256
|
+
"path": "dist/index.js",
|
|
257
|
+
"import": "{ useRawCSS }",
|
|
258
|
+
"limit": "30.68 kB"
|
|
179
259
|
},
|
|
180
260
|
{
|
|
181
261
|
"name": "core (import *)",
|
|
182
262
|
"path": "dist/core/index.js",
|
|
183
263
|
"import": "*",
|
|
184
|
-
"limit": "
|
|
264
|
+
"limit": "53.35 kB"
|
|
185
265
|
},
|
|
186
266
|
{
|
|
187
267
|
"name": "static",
|
|
188
268
|
"path": "dist/static/index.js",
|
|
189
269
|
"import": "*",
|
|
190
|
-
"limit": "
|
|
270
|
+
"limit": "1.08 kB"
|
|
191
271
|
},
|
|
192
272
|
{
|
|
193
273
|
"name": "zero",
|
|
@@ -198,7 +278,7 @@
|
|
|
198
278
|
"path",
|
|
199
279
|
"crypto"
|
|
200
280
|
],
|
|
201
|
-
"limit": "
|
|
281
|
+
"limit": "32.29 kB"
|
|
202
282
|
},
|
|
203
283
|
{
|
|
204
284
|
"name": "babel-plugin",
|
|
@@ -209,7 +289,25 @@
|
|
|
209
289
|
"path",
|
|
210
290
|
"crypto"
|
|
211
291
|
],
|
|
212
|
-
"limit": "
|
|
292
|
+
"limit": "40.28 kB"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "astro client",
|
|
296
|
+
"path": "dist/ssr/astro-client.js",
|
|
297
|
+
"import": "*",
|
|
298
|
+
"limit": "0.5 kB"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "Next.js config",
|
|
302
|
+
"path": "dist/ssr/next-config.js",
|
|
303
|
+
"import": "{ withTastyNext }",
|
|
304
|
+
"ignore": [
|
|
305
|
+
"node:crypto",
|
|
306
|
+
"node:fs",
|
|
307
|
+
"node:module",
|
|
308
|
+
"node:path"
|
|
309
|
+
],
|
|
310
|
+
"limit": "36.43 kB"
|
|
213
311
|
}
|
|
214
312
|
]
|
|
215
313
|
}
|