@tenphi/tasty 0.0.0-snapshot.d2dcdeb → 0.0.0-snapshot.d4ccea8
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 +181 -131
- package/dist/{ssr/async-storage.js → async-storage-DKK-wTD4.js} +2 -2
- package/dist/async-storage-DKK-wTD4.js.map +1 -0
- package/dist/babel-eMs_zZjM.d.ts +83 -0
- package/dist/{ssr/collector.js → collector-BjkQEtbh.js} +111 -38
- package/dist/collector-BjkQEtbh.js.map +1 -0
- package/dist/{ssr/collector.d.ts → collector-DzeNxHOq.d.ts} +58 -7
- package/dist/config-DMslHK_e.d.ts +1298 -0
- package/dist/config-DX126v_w.js +12318 -0
- package/dist/config-DX126v_w.js.map +1 -0
- package/dist/{ssr/context.js → context-CA8YKeMn.js} +11 -3
- package/dist/context-CA8YKeMn.js.map +1 -0
- package/dist/core/index.d.ts +5 -34
- package/dist/core/index.js +6 -27
- package/dist/core-CMn-Tj2X.js +1573 -0
- package/dist/core-CMn-Tj2X.js.map +1 -0
- package/dist/{zero/extractor.js → css-writer-C8ShXK5R.js} +148 -24
- package/dist/css-writer-C8ShXK5R.js.map +1 -0
- package/dist/{ssr/format-global-rules.js → format-global-rules-DklyaXv-.js} +2 -2
- package/dist/format-global-rules-DklyaXv-.js.map +1 -0
- package/dist/{ssr/format-rules.js → format-rules-BkstDvlN.js} +59 -2
- package/dist/format-rules-BkstDvlN.js.map +1 -0
- package/dist/{ssr/hydrate.js → hydrate-DXXWZgm0.js} +4 -12
- package/dist/hydrate-DXXWZgm0.js.map +1 -0
- package/dist/index-BcsaHo8x.d.ts +1568 -0
- package/dist/index-CC0wykKn.d.ts +1909 -0
- package/dist/index.d.ts +5 -51
- package/dist/index.js +922 -36
- package/dist/index.js.map +1 -0
- package/dist/keyframes-Z0YLVOWq.js +493 -0
- package/dist/keyframes-Z0YLVOWq.js.map +1 -0
- package/dist/{utils/merge-styles.d.ts → merge-styles-BTFAkYSD.d.ts} +3 -3
- package/dist/{utils/merge-styles.js → merge-styles-Dpueyn82.js} +3 -4
- package/dist/merge-styles-Dpueyn82.js.map +1 -0
- package/dist/{utils/resolve-recipes.js → resolve-recipes-B2Vjr7ET.js} +4 -6
- package/dist/resolve-recipes-B2Vjr7ET.js.map +1 -0
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro-client.js.map +1 -1
- package/dist/ssr/astro-middleware-static.d.ts +16 -0
- package/dist/ssr/astro-middleware-static.js +18 -0
- package/dist/ssr/astro-middleware-static.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +8 -6
- package/dist/ssr/astro-middleware.js +10 -10
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +2 -17
- package/dist/ssr/astro.js +29 -21
- package/dist/ssr/astro.js.map +1 -1
- package/dist/ssr/index.d.ts +37 -4
- package/dist/ssr/index.js +5 -5
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next.d.ts +2 -3
- package/dist/ssr/next.js +7 -8
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +91 -5
- package/dist/static/index.js +49 -3
- package/dist/static/index.js.map +1 -0
- package/dist/static/inject.js.map +1 -1
- package/dist/zero/babel.d.ts +2 -81
- package/dist/zero/babel.js +45 -29
- 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 +1 -1
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +18 -10
- package/docs/adoption.md +56 -31
- package/docs/ai-agents.md +224 -0
- package/docs/comparison.md +69 -40
- package/docs/configuration.md +501 -72
- package/docs/debug.md +22 -18
- package/docs/design-system.md +43 -24
- package/docs/dsl.md +512 -179
- package/docs/getting-started.md +60 -39
- package/docs/injector.md +110 -32
- package/docs/methodology.md +68 -36
- package/docs/migration-v3.md +285 -0
- package/docs/pipeline.md +741 -0
- package/docs/plugins.md +353 -0
- package/docs/react-api.md +164 -40
- package/docs/runtime-benchmarks.md +216 -0
- package/docs/ssr.md +92 -81
- package/docs/styles.md +65 -16
- package/docs/tasty-static.md +149 -99
- package/package.json +49 -21
- package/tasty.config.ts +6 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -7
- package/dist/chunks/cacheKey.d.ts +0 -1
- 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 -335
- package/dist/compute-styles.js.map +0 -1
- package/dist/config.d.ts +0 -407
- package/dist/config.js +0 -587
- 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 +0 -453
- 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 -36
- package/dist/hooks/useCounterStyle.js +0 -65
- package/dist/hooks/useCounterStyle.js.map +0 -1
- package/dist/hooks/useFontFace.d.ts +0 -45
- package/dist/hooks/useFontFace.js +0 -66
- package/dist/hooks/useFontFace.js.map +0 -1
- package/dist/hooks/useGlobalStyles.d.ts +0 -46
- package/dist/hooks/useGlobalStyles.js +0 -88
- package/dist/hooks/useGlobalStyles.js.map +0 -1
- package/dist/hooks/useKeyframes.d.ts +0 -58
- package/dist/hooks/useKeyframes.js +0 -55
- package/dist/hooks/useKeyframes.js.map +0 -1
- package/dist/hooks/useProperty.d.ts +0 -81
- package/dist/hooks/useProperty.js +0 -96
- package/dist/hooks/useProperty.js.map +0 -1
- package/dist/hooks/useRawCSS.d.ts +0 -22
- package/dist/hooks/useRawCSS.js +0 -103
- package/dist/hooks/useRawCSS.js.map +0 -1
- package/dist/hooks/useStyles.d.ts +0 -40
- package/dist/hooks/useStyles.js +0 -31
- package/dist/hooks/useStyles.js.map +0 -1
- package/dist/injector/index.d.ts +0 -182
- package/dist/injector/index.js +0 -185
- package/dist/injector/index.js.map +0 -1
- package/dist/injector/injector.d.ts +0 -198
- package/dist/injector/injector.js +0 -651
- package/dist/injector/injector.js.map +0 -1
- package/dist/injector/sheet-manager.d.ts +0 -132
- package/dist/injector/sheet-manager.js +0 -699
- package/dist/injector/sheet-manager.js.map +0 -1
- package/dist/injector/types.d.ts +0 -235
- 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 -87
- 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/rsc-cache.js +0 -79
- package/dist/rsc-cache.js.map +0 -1
- package/dist/ssr/async-storage.d.ts +0 -17
- package/dist/ssr/async-storage.js.map +0 -1
- package/dist/ssr/collect-auto-properties.js +0 -58
- package/dist/ssr/collect-auto-properties.js.map +0 -1
- package/dist/ssr/collector.js.map +0 -1
- package/dist/ssr/context.js.map +0 -1
- 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.map +0 -1
- package/dist/ssr/hydrate.d.ts +0 -29
- package/dist/ssr/hydrate.js.map +0 -1
- package/dist/ssr/ssr-collector-ref.js +0 -29
- 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 -248
- 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/deps-equal.js +0 -15
- package/dist/utils/deps-equal.js.map +0 -1
- 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/hash.js +0 -14
- package/dist/utils/hash.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.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 -58
- 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/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,61 +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
|
-
| `injectImport`
|
|
165
|
-
| `config.states`
|
|
166
|
-
| `config.devMode`
|
|
167
|
-
| `config.tokens`
|
|
168
|
-
| `config.replaceTokens`
|
|
169
|
-
| `config.recipes`
|
|
170
|
-
| `config.keyframes`
|
|
171
|
-
| `config.
|
|
172
|
-
| `config.
|
|
173
|
-
| `config.units`
|
|
174
|
-
| `config.
|
|
175
|
-
| `config.
|
|
176
|
-
| `config.
|
|
177
|
-
| `config.
|
|
178
|
-
| `config.
|
|
179
|
-
| `config.
|
|
180
|
-
| `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
|
+
```
|
|
181
205
|
|
|
182
206
|
---
|
|
183
207
|
|
|
@@ -189,16 +213,24 @@ Recipes work with `tastyStatic` the same way as with runtime `tasty`:
|
|
|
189
213
|
// babel.config.js
|
|
190
214
|
module.exports = {
|
|
191
215
|
plugins: [
|
|
192
|
-
[
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
+
},
|
|
198
230
|
},
|
|
199
231
|
},
|
|
200
|
-
|
|
201
|
-
]
|
|
232
|
+
],
|
|
233
|
+
],
|
|
202
234
|
};
|
|
203
235
|
```
|
|
204
236
|
|
|
@@ -210,7 +242,7 @@ const card = tastyStatic({
|
|
|
210
242
|
color: '#text',
|
|
211
243
|
});
|
|
212
244
|
|
|
213
|
-
<div className={card}>Styled card</div
|
|
245
|
+
<div className={card}>Styled card</div>;
|
|
214
246
|
```
|
|
215
247
|
|
|
216
248
|
---
|
|
@@ -221,7 +253,7 @@ The `withTastyZero` wrapper configures both **webpack** and **Turbopack** automa
|
|
|
221
253
|
|
|
222
254
|
```typescript
|
|
223
255
|
// next.config.ts
|
|
224
|
-
import { withTastyZero } from '@tenphi/tasty/next';
|
|
256
|
+
import { withTastyZero } from '@tenphi/tasty/zero/next';
|
|
225
257
|
|
|
226
258
|
export default withTastyZero({
|
|
227
259
|
output: 'public/tasty.css',
|
|
@@ -234,14 +266,14 @@ export default withTastyZero({
|
|
|
234
266
|
|
|
235
267
|
### `withTastyZero` Options
|
|
236
268
|
|
|
237
|
-
| Option
|
|
238
|
-
|
|
239
|
-
| `output`
|
|
240
|
-
| `mode`
|
|
241
|
-
| `enabled`
|
|
242
|
-
| `configFile` | `string`
|
|
243
|
-
| `config`
|
|
244
|
-
| `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) |
|
|
245
277
|
|
|
246
278
|
### Turbopack Support
|
|
247
279
|
|
|
@@ -279,12 +311,15 @@ export default defineConfig({
|
|
|
279
311
|
react({
|
|
280
312
|
babel: {
|
|
281
313
|
plugins: [
|
|
282
|
-
[
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
314
|
+
[
|
|
315
|
+
'@tenphi/tasty/babel-plugin',
|
|
316
|
+
{
|
|
317
|
+
output: 'public/tasty.css',
|
|
318
|
+
config: {
|
|
319
|
+
states: { '@mobile': '@media(w < 768px)' },
|
|
320
|
+
},
|
|
286
321
|
},
|
|
287
|
-
|
|
322
|
+
],
|
|
288
323
|
],
|
|
289
324
|
},
|
|
290
325
|
}),
|
|
@@ -318,7 +353,9 @@ export const Button = () => <button className={button}>Click</button>;
|
|
|
318
353
|
const button = {
|
|
319
354
|
className: 'ts3f2a1b ts8c4d2e',
|
|
320
355
|
styles: { padding: '2x 4x', fill: '#purple', color: '#white' },
|
|
321
|
-
toString() {
|
|
356
|
+
toString() {
|
|
357
|
+
return this.className;
|
|
358
|
+
},
|
|
322
359
|
};
|
|
323
360
|
|
|
324
361
|
export const Button = () => <button className={button}>Click</button>;
|
|
@@ -366,13 +403,16 @@ This is ideal for **reusable components**, **extensions**, and **libraries** whe
|
|
|
366
403
|
// babel.config.js
|
|
367
404
|
module.exports = {
|
|
368
405
|
plugins: [
|
|
369
|
-
[
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
406
|
+
[
|
|
407
|
+
'@tenphi/tasty/babel-plugin',
|
|
408
|
+
{
|
|
409
|
+
mode: 'inject',
|
|
410
|
+
config: {
|
|
411
|
+
states: { '@mobile': '@media(w < 768px)' },
|
|
412
|
+
},
|
|
373
413
|
},
|
|
374
|
-
|
|
375
|
-
]
|
|
414
|
+
],
|
|
415
|
+
],
|
|
376
416
|
};
|
|
377
417
|
```
|
|
378
418
|
|
|
@@ -380,7 +420,7 @@ With Next.js:
|
|
|
380
420
|
|
|
381
421
|
```typescript
|
|
382
422
|
// next.config.ts
|
|
383
|
-
import { withTastyZero } from '@tenphi/tasty/next';
|
|
423
|
+
import { withTastyZero } from '@tenphi/tasty/zero/next';
|
|
384
424
|
|
|
385
425
|
export default withTastyZero({
|
|
386
426
|
mode: 'inject',
|
|
@@ -412,13 +452,20 @@ tastyStatic('.heading', { preset: 'h1' });
|
|
|
412
452
|
```tsx
|
|
413
453
|
import { injectCSS as _$i } from '@tenphi/tasty/static/inject';
|
|
414
454
|
|
|
415
|
-
const button =
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
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}');
|
|
422
469
|
```
|
|
423
470
|
|
|
424
471
|
### Dev Mode / HMR
|
|
@@ -427,7 +474,7 @@ Class names are content-hashed (`ts` + MD5). When styles change, a new hash prod
|
|
|
427
474
|
|
|
428
475
|
### Limitations (inject mode)
|
|
429
476
|
|
|
430
|
-
- **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()`.
|
|
431
478
|
- **Larger JS bundle** — CSS is embedded in JavaScript, increasing bundle size. Best suited for components and extensions, not full-app styling.
|
|
432
479
|
|
|
433
480
|
---
|
|
@@ -496,13 +543,15 @@ For dynamic styling needs, combine with regular CSS or CSS variables:
|
|
|
496
543
|
```tsx
|
|
497
544
|
const card = tastyStatic({
|
|
498
545
|
padding: '4x',
|
|
499
|
-
fill: '
|
|
546
|
+
fill: '($card-bg, #white)',
|
|
500
547
|
});
|
|
501
548
|
|
|
502
549
|
<div
|
|
503
550
|
className={card}
|
|
504
|
-
style={{
|
|
505
|
-
|
|
551
|
+
style={{
|
|
552
|
+
'--card-bg': isActive ? 'var(--purple-color)' : 'var(--white-color)',
|
|
553
|
+
}}
|
|
554
|
+
/>;
|
|
506
555
|
```
|
|
507
556
|
|
|
508
557
|
---
|
|
@@ -519,14 +568,15 @@ const card = tastyStatic({
|
|
|
519
568
|
## Common Issues
|
|
520
569
|
|
|
521
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.
|
|
522
|
-
- 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()`.
|
|
523
572
|
- Turbopack config behaves inconsistently: prefer `configFile` over inline functions so the setup stays JSON-serializable.
|
|
524
573
|
|
|
525
574
|
---
|
|
526
575
|
|
|
527
576
|
## Related
|
|
528
577
|
|
|
529
|
-
- [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
|
|
530
579
|
- [Style DSL](dsl.md) — State maps, tokens, units, extending semantics (shared by runtime and static)
|
|
531
|
-
- [React API](react-api.md) —
|
|
580
|
+
- [React API](react-api.md) — Client or server rendering with `tasty()`: component props, variants, sub-elements, and style functions
|
|
532
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.d4ccea8",
|
|
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"
|
|
@@ -62,6 +62,16 @@
|
|
|
62
62
|
"import": "./dist/ssr/astro-client.js",
|
|
63
63
|
"default": "./dist/ssr/astro-client.js"
|
|
64
64
|
},
|
|
65
|
+
"./ssr/astro-middleware": {
|
|
66
|
+
"types": "./dist/ssr/astro-middleware.d.ts",
|
|
67
|
+
"import": "./dist/ssr/astro-middleware.js",
|
|
68
|
+
"default": "./dist/ssr/astro-middleware.js"
|
|
69
|
+
},
|
|
70
|
+
"./ssr/astro-middleware-static": {
|
|
71
|
+
"types": "./dist/ssr/astro-middleware-static.d.ts",
|
|
72
|
+
"import": "./dist/ssr/astro-middleware-static.js",
|
|
73
|
+
"default": "./dist/ssr/astro-middleware-static.js"
|
|
74
|
+
},
|
|
65
75
|
"./tasty.config": "./tasty.config.ts"
|
|
66
76
|
},
|
|
67
77
|
"files": [
|
|
@@ -73,7 +83,9 @@
|
|
|
73
83
|
"./dist/ssr/index.js",
|
|
74
84
|
"./dist/ssr/next.js",
|
|
75
85
|
"./dist/ssr/astro.js",
|
|
76
|
-
"./dist/ssr/astro-client.js"
|
|
86
|
+
"./dist/ssr/astro-client.js",
|
|
87
|
+
"./dist/ssr/astro-middleware.js",
|
|
88
|
+
"./dist/ssr/astro-middleware-static.js"
|
|
77
89
|
],
|
|
78
90
|
"engines": {
|
|
79
91
|
"node": ">=20"
|
|
@@ -81,6 +93,9 @@
|
|
|
81
93
|
"scripts": {
|
|
82
94
|
"build": "tsdown",
|
|
83
95
|
"test": "vitest run",
|
|
96
|
+
"test:node": "vitest run --project node",
|
|
97
|
+
"test:browser": "vitest run --project browser",
|
|
98
|
+
"test:setup": "playwright install chromium",
|
|
84
99
|
"test:watch": "vitest",
|
|
85
100
|
"test:coverage": "vitest run --coverage",
|
|
86
101
|
"typecheck": "tsc --noEmit",
|
|
@@ -89,11 +104,17 @@
|
|
|
89
104
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
90
105
|
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
91
106
|
"size": "size-limit",
|
|
92
|
-
"bench": "vitest bench",
|
|
107
|
+
"bench": "vitest bench --project node",
|
|
108
|
+
"bench:browser": "vitest bench --project browser",
|
|
109
|
+
"bench:overhead": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-overhead.bench.tsx",
|
|
110
|
+
"bench:injection": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-injection.bench.ts",
|
|
111
|
+
"bench:tree": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-tree.bench.tsx",
|
|
93
112
|
"prepublishOnly": "pnpm run build",
|
|
94
113
|
"changeset": "changeset",
|
|
95
114
|
"version": "changeset version",
|
|
96
115
|
"release": "changeset publish",
|
|
116
|
+
"knip": "knip",
|
|
117
|
+
"check:test-only": "node scripts/check-test-only-code.mjs",
|
|
97
118
|
"hygiene": "pnpm lint && pnpm format:check && pnpm typecheck",
|
|
98
119
|
"hygiene:fix": "pnpm lint:fix && pnpm format && pnpm typecheck"
|
|
99
120
|
},
|
|
@@ -123,6 +144,7 @@
|
|
|
123
144
|
"@babel/helper-plugin-utils": "^7.24.0",
|
|
124
145
|
"@babel/types": "^7.24.0",
|
|
125
146
|
"jiti": "^2.6.1",
|
|
147
|
+
"next": ">=14.0.0",
|
|
126
148
|
"react": "^18.0.0 || ^19.0.0"
|
|
127
149
|
},
|
|
128
150
|
"peerDependenciesMeta": {
|
|
@@ -140,6 +162,9 @@
|
|
|
140
162
|
},
|
|
141
163
|
"jiti": {
|
|
142
164
|
"optional": true
|
|
165
|
+
},
|
|
166
|
+
"next": {
|
|
167
|
+
"optional": true
|
|
143
168
|
}
|
|
144
169
|
},
|
|
145
170
|
"dependencies": {
|
|
@@ -147,53 +172,56 @@
|
|
|
147
172
|
},
|
|
148
173
|
"devDependencies": {
|
|
149
174
|
"@babel/core": "^7.24.0",
|
|
150
|
-
"@
|
|
175
|
+
"@babel/helper-plugin-utils": "^7.24.0",
|
|
176
|
+
"@babel/types": "^7.24.0",
|
|
177
|
+
"@changesets/changelog-github": "^0.7.0",
|
|
151
178
|
"@changesets/cli": "^2.29.8",
|
|
152
179
|
"@eslint/js": "^10.0.1",
|
|
153
180
|
"@size-limit/esbuild": "^12.0.0",
|
|
154
181
|
"@size-limit/file": "^12.0.0",
|
|
182
|
+
"@tenphi/eslint-plugin-tasty": "^0.11.3",
|
|
155
183
|
"@testing-library/jest-dom": "^6.9.1",
|
|
156
184
|
"@testing-library/react": "^16.3.2",
|
|
157
185
|
"@types/babel__core": "^7.20.5",
|
|
158
186
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
159
187
|
"@types/node": "^25.3.2",
|
|
160
188
|
"@types/react": "^19.0.0",
|
|
161
|
-
"@
|
|
189
|
+
"@types/react-dom": "^19.0.0",
|
|
190
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
162
191
|
"eslint": "^10.0.0",
|
|
163
192
|
"eslint-config-prettier": "^10.1.8",
|
|
164
|
-
"
|
|
193
|
+
"jiti": "^2.6.1",
|
|
194
|
+
"knip": "^5.61.3",
|
|
195
|
+
"next": "^16.0.0",
|
|
196
|
+
"playwright": "^1.62.1",
|
|
165
197
|
"prettier": "^3.8.1",
|
|
166
198
|
"react": "^19.0.0",
|
|
199
|
+
"react-dom": "^19.0.0",
|
|
167
200
|
"size-limit": "^12.0.0",
|
|
168
|
-
"tsdown": "^0.
|
|
169
|
-
"typescript": "^
|
|
201
|
+
"tsdown": "^0.22.0",
|
|
202
|
+
"typescript": "^6.0.2",
|
|
170
203
|
"typescript-eslint": "^8.56.0",
|
|
171
|
-
"vitest": "^4.
|
|
172
|
-
},
|
|
173
|
-
"pnpm": {
|
|
174
|
-
"onlyBuiltDependencies": [
|
|
175
|
-
"esbuild"
|
|
176
|
-
]
|
|
204
|
+
"vitest": "^4.1.10"
|
|
177
205
|
},
|
|
178
|
-
"packageManager": "pnpm@
|
|
206
|
+
"packageManager": "pnpm@11.24.0",
|
|
179
207
|
"size-limit": [
|
|
180
208
|
{
|
|
181
209
|
"name": "main (import *)",
|
|
182
210
|
"path": "dist/index.js",
|
|
183
211
|
"import": "*",
|
|
184
|
-
"limit": "
|
|
212
|
+
"limit": "56.6 kB"
|
|
185
213
|
},
|
|
186
214
|
{
|
|
187
215
|
"name": "core (import *)",
|
|
188
216
|
"path": "dist/core/index.js",
|
|
189
217
|
"import": "*",
|
|
190
|
-
"limit": "
|
|
218
|
+
"limit": "53.65 kB"
|
|
191
219
|
},
|
|
192
220
|
{
|
|
193
221
|
"name": "static",
|
|
194
222
|
"path": "dist/static/index.js",
|
|
195
223
|
"import": "*",
|
|
196
|
-
"limit": "
|
|
224
|
+
"limit": "16.8 kB"
|
|
197
225
|
},
|
|
198
226
|
{
|
|
199
227
|
"name": "zero",
|
|
@@ -204,7 +232,7 @@
|
|
|
204
232
|
"path",
|
|
205
233
|
"crypto"
|
|
206
234
|
],
|
|
207
|
-
"limit": "
|
|
235
|
+
"limit": "31.25 kB"
|
|
208
236
|
},
|
|
209
237
|
{
|
|
210
238
|
"name": "babel-plugin",
|
|
@@ -215,7 +243,7 @@
|
|
|
215
243
|
"path",
|
|
216
244
|
"crypto"
|
|
217
245
|
],
|
|
218
|
-
"limit": "
|
|
246
|
+
"limit": "49.35 kB"
|
|
219
247
|
}
|
|
220
248
|
]
|
|
221
249
|
}
|
package/tasty.config.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
'#white',
|
|
4
4
|
'#black',
|
|
5
5
|
'#current',
|
|
6
|
+
'#clear',
|
|
6
7
|
'$gap',
|
|
7
8
|
'$radius',
|
|
8
9
|
'$border-width',
|
|
@@ -11,4 +12,9 @@ export default {
|
|
|
11
12
|
'$sharp-radius',
|
|
12
13
|
'$bold-font-weight',
|
|
13
14
|
],
|
|
15
|
+
styles: ['viewTransitionName'],
|
|
16
|
+
// This repo imports its own API relatively, so the plugin's default
|
|
17
|
+
// `@tenphi/tasty` import tracking never matches. List the local entry points so
|
|
18
|
+
// `tasty({ styles })` call sites are actually linted.
|
|
19
|
+
importSources: ['@tenphi/tasty', './tasty', '../tasty', './src/tasty'],
|
|
14
20
|
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
3
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
4
|
-
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
5
|
-
});
|
|
6
|
-
//#endregion
|
|
7
|
-
export { __require };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|