@fluentic/style 0.1.0-beta.2 → 0.1.0-beta.3
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/CHANGELOG.md +26 -17
- package/README.md +80 -23
- package/compiler/compiler/types.ts +0 -1
- package/compiler/transform/evaluator/evaluator.ts +2 -0
- package/compiler/transform/evaluator/tracer.ts +11 -1
- package/compiler/transform/extract/chain/chain.ts +7 -4
- package/compiler/transform/extract/plugin.ts +1 -1
- package/compiler/transform/extract/utils/state.ts +1 -0
- package/compiler/utils/constants.ts +0 -4
- package/config/build.ts +12 -2
- package/config/config/debug.ts +13 -1
- package/config/config/dev.ts +8 -0
- package/config/configure.ts +10 -2
- package/dev/config.ts +2 -3
- package/dist/{className-W2kDyeVl.js → className-CKo4TxuT.js} +2 -2
- package/dist/{className-W2kDyeVl.js.map → className-CKo4TxuT.js.map} +1 -1
- package/dist/{className-Cuh2JNxO.js → className-ZJ5pBA-o.js} +4 -4
- package/dist/{className-Cuh2JNxO.js.map → className-ZJ5pBA-o.js.map} +1 -1
- package/dist/compiler/index.mjs +1 -1
- package/dist/{compiler-BXcGyZUP.mjs → compiler-D5v5tJXI.mjs} +56 -57
- package/dist/compiler-D5v5tJXI.mjs.map +1 -0
- package/dist/config/index.js +2 -2
- package/dist/{config-CLYMN3_p.js → config-BEvP7108.js} +11 -4
- package/dist/config-BEvP7108.js.map +1 -0
- package/dist/config-B_cbG3S6.js +1 -0
- package/dist/{config-C1k9vUrM.js → config-FIfi5aJ8.js} +4 -4
- package/dist/{config-C1k9vUrM.js.map → config-FIfi5aJ8.js.map} +1 -1
- package/dist/config-OXHoDUIo.js +6 -0
- package/dist/{config-DcYrUB-M.js.map → config-OXHoDUIo.js.map} +1 -1
- package/dist/{css-CohHH2tn.js → css-DcuJ_jSH.js} +3 -3
- package/dist/{css-CohHH2tn.js.map → css-DcuJ_jSH.js.map} +1 -1
- package/dist/{css-DfH4Gb1c.js → css-dPoZJDQH.js} +5 -3
- package/dist/css-dPoZJDQH.js.map +1 -0
- package/dist/{css-D_DL1yOz.js → css-oOt6ZR54.js} +4 -4
- package/dist/{css-D_DL1yOz.js.map → css-oOt6ZR54.js.map} +1 -1
- package/dist/css.js +1 -1
- package/dist/{css_extra-9BZ_jVET.js → css_extra-DeTuIlcO.js} +2 -2
- package/dist/{css_extra-9BZ_jVET.js.map → css_extra-DeTuIlcO.js.map} +1 -1
- package/dist/{data-Ze8GNiJm.js → data-CeYstKMP.js} +6 -7
- package/dist/{data-Ze8GNiJm.js.map → data-CeYstKMP.js.map} +1 -1
- package/dist/{debug-DLmUG3Vh.js → debug-D96KGgpH.js} +2 -2
- package/dist/{debug-DLmUG3Vh.js.map → debug-D96KGgpH.js.map} +1 -1
- package/dist/dev/rsc.js +9 -9
- package/dist/{dev-C2u78xuv.js → dev-fOtWB5K3.js} +6 -7
- package/dist/{dev-C2u78xuv.js.map → dev-fOtWB5K3.js.map} +1 -1
- package/dist/{dev-4TqJORRn.js → dev-p8tW7X-A.js} +9 -3
- package/dist/dev-p8tW7X-A.js.map +1 -0
- package/dist/dev.js +1 -1
- package/dist/{elementMarker-BKzZyg5V.js → elementMarker-CvqqIb7J.js} +5 -5
- package/dist/{elementMarker-BKzZyg5V.js.map → elementMarker-CvqqIb7J.js.map} +1 -1
- package/dist/entry/dev/css.js +2 -2
- package/dist/entry/dev/jsx-dev-runtime.js +2 -2
- package/dist/entry/dev/jsx-runtime.js +2 -2
- package/dist/entry/dev.js +7 -7
- package/dist/entry/prod/css.js +2 -2
- package/dist/entry/prod/jsx-dev-runtime.js +2 -2
- package/dist/entry/prod/jsx-runtime.js +2 -2
- package/dist/entry/prod/runtime.js +4 -4
- package/dist/entry/prod.js +6 -6
- package/dist/entry/rsc-dev/css.js +2 -2
- package/dist/entry/rsc-dev/dev.js +4 -5
- package/dist/entry/rsc-dev/dev.js.map +1 -1
- package/dist/entry/rsc-dev/jsx-dev-runtime.js +2 -2
- package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
- package/dist/entry/rsc-dev.js +5 -6
- package/dist/entry/rsc-dev.js.map +1 -1
- package/dist/entry/rsc-prod/css.js +2 -2
- package/dist/entry/rsc-prod/jsx-dev-runtime.js +2 -2
- package/dist/entry/rsc-prod/jsx-runtime.js +2 -2
- package/dist/entry/rsc-prod/runtime.js +4 -4
- package/dist/entry/rsc-prod.js +6 -6
- package/dist/extract-DeOytHKW.js +2 -0
- package/dist/{getClassName-C6690_nr.js → getClassName-oiQ8CnkS.js} +3 -3
- package/dist/{getClassName-C6690_nr.js.map → getClassName-oiQ8CnkS.js.map} +1 -1
- package/dist/{global-C7GsCW6Y.js → global-Cul1dX8k.js} +2 -2
- package/dist/{global-C7GsCW6Y.js.map → global-Cul1dX8k.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/jsx/jsx-dev-runtime.js +2 -2
- package/dist/jsx/jsx-dev-runtime.server.js +1 -1
- package/dist/jsx/jsx-runtime.js +2 -2
- package/dist/jsx/jsx-runtime.server.js +1 -1
- package/dist/{jsx-DsMajv_M.js → jsx-A4cK517J.js} +7 -7
- package/dist/{jsx-DsMajv_M.js.map → jsx-A4cK517J.js.map} +1 -1
- package/dist/{jsx-Berx-L-r.js → jsx-Ba-XV33u.js} +3 -3
- package/dist/{jsx-Berx-L-r.js.map → jsx-Ba-XV33u.js.map} +1 -1
- package/dist/{jsx_dev_runtime-DXlSD6kV.js → jsx_dev_runtime-BQcRzl5D.js} +2 -2
- package/dist/{jsx_dev_runtime-DXlSD6kV.js.map → jsx_dev_runtime-BQcRzl5D.js.map} +1 -1
- package/dist/{jsx_runtime-DPWo5qvV.js → jsx_runtime-B9KEoAQN.js} +2 -2
- package/dist/{jsx_runtime-DPWo5qvV.js.map → jsx_runtime-B9KEoAQN.js.map} +1 -1
- package/dist/{jsx_runtime-CMdEXGNZ.js → jsx_runtime-BXcbW8Yp.js} +2 -2
- package/dist/{jsx_runtime-CMdEXGNZ.js.map → jsx_runtime-BXcbW8Yp.js.map} +1 -1
- package/dist/{layer-DiNeeTgG.js → layer-CbQzwZF-.js} +3 -3
- package/dist/{layer-DiNeeTgG.js.map → layer-CbQzwZF-.js.map} +1 -1
- package/dist/{loader-DCT1Q9yi.mjs → loader-BAth2yZ1.mjs} +3 -3
- package/dist/{loader-DCT1Q9yi.mjs.map → loader-BAth2yZ1.mjs.map} +1 -1
- package/dist/{misc-o8pviMUi.mjs → misc-DFBKJGLT.mjs} +2 -2
- package/dist/{misc-o8pviMUi.mjs.map → misc-DFBKJGLT.mjs.map} +1 -1
- package/dist/plugin/farm/index.mjs +2 -2
- package/dist/plugin/nextjs/index.mjs +4 -4
- package/dist/plugin/nextjs/loader.mjs +4 -4
- package/dist/plugin/parcel/optimizer.cjs +1 -1
- package/dist/plugin/parcel/optimizer.mjs +2 -2
- package/dist/plugin/parcel/resolver.cjs +1 -1
- package/dist/plugin/parcel/resolver.mjs +2 -2
- package/dist/plugin/parcel/runtime.cjs +1 -1
- package/dist/plugin/parcel/runtime.mjs +1 -1
- package/dist/plugin/parcel/transformer.cjs +1 -1
- package/dist/plugin/parcel/transformer.mjs +2 -2
- package/dist/plugin/rspack/index.mjs +1 -1
- package/dist/plugin/vite/index.mjs +3 -3
- package/dist/plugin/webpack/index.mjs +1 -1
- package/dist/plugin/webpack/loader.mjs +2 -2
- package/dist/{property-BzZSTVIh.js → property-CF6JgpTq.js} +2 -2
- package/dist/{property-BzZSTVIh.js.map → property-CF6JgpTq.js.map} +1 -1
- package/dist/{registry-D3x1EDJm.mjs → registry-CiwvMfx8.mjs} +2 -2
- package/dist/{registry-D3x1EDJm.mjs.map → registry-CiwvMfx8.mjs.map} +1 -1
- package/dist/{rules-Dz7Pu2K6.js → rules-DlXcch7-.js} +8 -8
- package/dist/{rules-Dz7Pu2K6.js.map → rules-DlXcch7-.js.map} +1 -1
- package/dist/runtime-BKChZZ2-.js +52 -0
- package/dist/runtime-BKChZZ2-.js.map +1 -0
- package/dist/server.js +8 -8
- package/dist/{shared-uAzFeq0x.mjs → shared-x59dI2NW.mjs} +4 -4
- package/dist/{shared-uAzFeq0x.mjs.map → shared-x59dI2NW.mjs.map} +1 -1
- package/dist/{shared-B_gJf5uj.cjs → shared-yDD0nfm1.cjs} +52 -53
- package/dist/shared-yDD0nfm1.cjs.map +1 -0
- package/dist/sheet-B-uJfHRY.js +7 -0
- package/dist/{sheet-DasbRnvy.js.map → sheet-B-uJfHRY.js.map} +1 -1
- package/dist/{sidecar-BUO1hKXu.mjs → sidecar-CJ6i4wmn.mjs} +3 -3
- package/dist/{sidecar-BUO1hKXu.mjs.map → sidecar-CJ6i4wmn.mjs.map} +1 -1
- package/dist/{style-CYXTs1iu.js → style-91J0B5ef.js} +3 -3
- package/dist/style-91J0B5ef.js.map +1 -0
- package/dist/{style-DUztHzBz.js → style-Bw5ka-Nq.js} +5 -16
- package/dist/style-Bw5ka-Nq.js.map +1 -0
- package/dist/{style-BkeAZl0n.js → style-DFFK06Of.js} +9 -9
- package/dist/{style-BkeAZl0n.js.map → style-DFFK06Of.js.map} +1 -1
- package/dist/style-pz8e5To1.js +5 -0
- package/dist/{styleStore-DVDp-gI-.js → styleStore-DJ0Msgkh.js} +5 -5
- package/dist/{styleStore-DVDp-gI-.js.map → styleStore-DJ0Msgkh.js.map} +1 -1
- package/dist/{styleStore-BGJ2ZYtK.js → styleStore-ydQcDBD4.js} +2 -2
- package/dist/{styleStore-BGJ2ZYtK.js.map → styleStore-ydQcDBD4.js.map} +1 -1
- package/dist/{token-CA1j7suG.js → token-DT_sCPtm.js} +28 -3
- package/dist/token-DT_sCPtm.js.map +1 -0
- package/dist/{trace-DR7_Rpkg.js → trace-CO36aenp.js} +3 -3
- package/dist/{trace-DR7_Rpkg.js.map → trace-CO36aenp.js.map} +1 -1
- package/dist/{trace-D0IL6JT8.js → trace-D8j96G57.js} +2 -2
- package/dist/{trace-D0IL6JT8.js.map → trace-D8j96G57.js.map} +1 -1
- package/dist/{utils-R6QadAsY.js → utils-Bmw655wa.js} +3 -3
- package/dist/{utils-R6QadAsY.js.map → utils-Bmw655wa.js.map} +1 -1
- package/dist/{utils-CpA-dSpY.mjs → utils-D2fygyTm.mjs} +4 -4
- package/dist/{utils-CpA-dSpY.mjs.map → utils-D2fygyTm.mjs.map} +1 -1
- package/dist/{utils-DQGa0uzS.mjs → utils-DTXCTUlS.mjs} +3 -3
- package/dist/{utils-DQGa0uzS.mjs.map → utils-DTXCTUlS.mjs.map} +1 -1
- package/dist/{utils-BsbfH6cd.js → utils-DVFxZnVC.js} +13 -1
- package/dist/utils-DVFxZnVC.js.map +1 -0
- package/dist/{utils-D4YWF2K0.js → utils-hoYnMiA7.js} +4 -4
- package/dist/{utils-D4YWF2K0.js.map → utils-hoYnMiA7.js.map} +1 -1
- package/dist/utils.js +2 -2
- package/dist/{value-DBtSe-9B.js → value-DvFkGBy2.js} +33 -4
- package/dist/value-DvFkGBy2.js.map +1 -0
- package/dist/{value-CJG6EWe8.js → value-dG9LK0Gq.js} +2 -2
- package/dist/{value-CJG6EWe8.js.map → value-dG9LK0Gq.js.map} +1 -1
- package/dist/{webpack-Fb9xF5jS.mjs → webpack-BOU7_xld.mjs} +5 -5
- package/dist/{webpack-Fb9xF5jS.mjs.map → webpack-BOU7_xld.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/compiler-BXcGyZUP.mjs.map +0 -1
- package/dist/config-CLYMN3_p.js.map +0 -1
- package/dist/config-DcYrUB-M.js +0 -6
- package/dist/config-oI_yS50f.js +0 -1
- package/dist/css-DfH4Gb1c.js.map +0 -1
- package/dist/debug-BefbXMq1.js +0 -15
- package/dist/debug-BefbXMq1.js.map +0 -1
- package/dist/debug-OG2wSB5R.js +0 -15
- package/dist/debug-OG2wSB5R.js.map +0 -1
- package/dist/dev-4TqJORRn.js.map +0 -1
- package/dist/extract-B9j4TBkU.js +0 -2
- package/dist/runtime-B3jHW9B1.js +0 -32
- package/dist/runtime-B3jHW9B1.js.map +0 -1
- package/dist/shared-B_gJf5uj.cjs.map +0 -1
- package/dist/sheet-DasbRnvy.js +0 -7
- package/dist/style-B0F1sgRZ.js +0 -5
- package/dist/style-CYXTs1iu.js.map +0 -1
- package/dist/style-DUztHzBz.js.map +0 -1
- package/dist/token-CA1j7suG.js.map +0 -1
- package/dist/utils-BsbfH6cd.js.map +0 -1
- package/dist/value-DBtSe-9B.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
# @fluentic/style
|
|
2
2
|
|
|
3
|
-
## 0.1.0-beta.
|
|
3
|
+
## 0.1.0-beta.3
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
selector chaining, at-rule support, merge support, and static compiler
|
|
9
|
-
extraction.
|
|
10
|
-
- Split the Tailwind preset into style-object and class-name entry points so
|
|
11
|
-
teams can choose object-first or utility-class authoring from the same preset
|
|
12
|
-
package.
|
|
13
|
-
- Add named token compiler support and docs for transform extraction behavior.
|
|
7
|
+
- fd4a705: Make production class names globally dedupe extracted rules by deriving callsite-local hashing from dev mode only. Keep debug class names configurable from plugin and runtime CSS options, with dev defaulting to readable names and production defaulting to compact hashes.
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
## 0.1.0-beta.2
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
This beta adds class-name style chains, Tailwind presets, and compiler support
|
|
12
|
+
for transform-driven styling.
|
|
13
|
+
|
|
14
|
+
### Highlights
|
|
15
|
+
|
|
16
|
+
- Add `createClassNameFn` for class-name-driven style builders.
|
|
17
|
+
- Support nested class-name values, conditional falsey entries, weighted
|
|
18
|
+
class-name tokens, selector chaining, at-rules, and merges.
|
|
19
|
+
- Add compiler extraction for class-name style chains.
|
|
20
|
+
- Add Tailwind presets for both style-object and class-name authoring.
|
|
21
|
+
- Add `classNameTransform`, `classNameValue`, and transform metadata for
|
|
22
|
+
preserving source class labels in emitted rules.
|
|
23
|
+
- Add named token compiler support for static extraction and theme override
|
|
24
|
+
identity.
|
|
25
|
+
- Add configurable transform class-name formatting and hash length behavior for
|
|
26
|
+
debug output.
|
|
22
27
|
|
|
23
28
|
## 0.1.0-beta.1
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
This patch beta improves typed selector authoring and documentation.
|
|
31
|
+
|
|
32
|
+
### Changes
|
|
26
33
|
|
|
27
|
-
- Add `createSelectorAssert` for typed custom selector validators
|
|
34
|
+
- Add `createSelectorAssert` for typed custom selector validators.
|
|
35
|
+
- Keep the public beta API moving with small usability refinements after
|
|
36
|
+
`0.1.0-beta.0`.
|
|
28
37
|
|
|
29
38
|
## 0.1.0-beta.0
|
|
30
39
|
|
package/README.md
CHANGED
|
@@ -8,9 +8,10 @@ explores a specific question inside that space: what if styles composed around
|
|
|
8
8
|
React components the same way props and state do?
|
|
9
9
|
|
|
10
10
|
With Fluentic, you start simple with type-safe `style(...)` and the JSX `css`
|
|
11
|
-
prop.
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
prop. If your team prefers utility class names, you can also create class-name
|
|
12
|
+
style chains, including a Tailwind-like preset. When a component needs variants,
|
|
13
|
+
themes, nested parts, or consumer overrides, add slots, scopes, tokens, and
|
|
14
|
+
`combineStyle(...)` so those styles stay organized around the component.
|
|
14
15
|
|
|
15
16
|
For production builds, styles are extracted into static atomic CSS output.
|
|
16
17
|
Dynamic values from props and state still work as usual.
|
|
@@ -100,6 +101,49 @@ export function Card() {
|
|
|
100
101
|
That is the smallest version of Fluentic Style: type-safe styles, selectors, and
|
|
101
102
|
a `css` prop.
|
|
102
103
|
|
|
104
|
+
## Class Name Chains
|
|
105
|
+
|
|
106
|
+
Fluentic's default authoring path is object style chains, but class-name chains
|
|
107
|
+
are supported too. A class-name chain still produces Fluentic style data, so it
|
|
108
|
+
can use the same `css` prop, selector methods, slots, scopes, debugging, runtime
|
|
109
|
+
resolution, and production extraction path.
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { createClassNameFn } from '@fluentic/style';
|
|
113
|
+
import {
|
|
114
|
+
createTailwindClassNamePreset,
|
|
115
|
+
defaultTailwindTheme,
|
|
116
|
+
} from '@fluentic/style/presets/tailwind';
|
|
117
|
+
|
|
118
|
+
const tailwind = createTailwindClassNamePreset({
|
|
119
|
+
theme: defaultTailwindTheme,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export const { className: cx } = createClassNameFn({
|
|
123
|
+
selectors: tailwind.selectors,
|
|
124
|
+
transform: tailwind.transform,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const button = cx(
|
|
128
|
+
'inline-flex',
|
|
129
|
+
'items-center',
|
|
130
|
+
'gap-2',
|
|
131
|
+
'rounded-md',
|
|
132
|
+
'bg-blue-600',
|
|
133
|
+
'px-4',
|
|
134
|
+
'py-2',
|
|
135
|
+
'text-white',
|
|
136
|
+
)
|
|
137
|
+
.hover('bg-blue-700')
|
|
138
|
+
.md('px-6');
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Class names get their meaning from a user-land transform or a preset. See
|
|
142
|
+
[Class Name Style Chains](https://fluenticstack.com/style/docs/beyond-the-basics/class-name-style-chains/)
|
|
143
|
+
for the generic API, or
|
|
144
|
+
[Tailwind Class Name Preset](https://fluenticstack.com/style/docs/presets/tailwind/class-name/)
|
|
145
|
+
for the built-in Tailwind-like class-name vocabulary.
|
|
146
|
+
|
|
103
147
|
## Scale Into Components
|
|
104
148
|
|
|
105
149
|
When a component becomes reusable, give its styles component structure.
|
|
@@ -333,7 +377,19 @@ For Next.js and other bundlers, see the
|
|
|
333
377
|
Benchmarks live in the repository's `benchmark/` folder and run against
|
|
334
378
|
production builds. Current benchmark snapshots:
|
|
335
379
|
|
|
336
|
-
|
|
380
|
+
The main production checks are runtime cost and bundle size. In the production
|
|
381
|
+
path most apps use, Fluentic extracts CSS at build time and ships the extracted
|
|
382
|
+
production runtime for `css` prop composition, dynamic values, class-name
|
|
383
|
+
merging, and token resolution. That runtime entry currently reports `5.00 KB`
|
|
384
|
+
min+gzip.
|
|
385
|
+
Browser and SSR benchmarks track whether style resolution stays fast in
|
|
386
|
+
app-shaped renders. See the
|
|
387
|
+
[Bundle Size](https://fluenticstack.com/style/docs/benchmark/bundle-size/),
|
|
388
|
+
[React App](https://fluenticstack.com/style/docs/benchmark/react-app/), and
|
|
389
|
+
[SSR Style](https://fluenticstack.com/style/docs/benchmark/ssr-style/) reports
|
|
390
|
+
for what each number measures and how to rerun it.
|
|
391
|
+
|
|
392
|
+
[React app](https://fluenticstack.com/style/docs/benchmark/react-app/), 1500-row dashboard:
|
|
337
393
|
|
|
338
394
|
| Case | Mount | Style Update |
|
|
339
395
|
| -------------------------- | ---------- | ------------ |
|
|
@@ -347,7 +403,7 @@ React app, 1500-row dashboard:
|
|
|
347
403
|
| vanilla-extract DOM | `39.85 ms` | `17.65 ms` |
|
|
348
404
|
| CSS Modules DOM | `40.35 ms` | `17.75 ms` |
|
|
349
405
|
|
|
350
|
-
SSR render-only, 500 rows:
|
|
406
|
+
[SSR render-only](https://fluenticstack.com/style/docs/benchmark/ssr-style/), 500 rows:
|
|
351
407
|
|
|
352
408
|
| Case | Dashboard Mean | Composition Mean |
|
|
353
409
|
| --------------- | -------------- | ---------------- |
|
|
@@ -357,7 +413,7 @@ SSR render-only, 500 rows:
|
|
|
357
413
|
| Fluentic token | `7.667 ms` | `8.253 ms` |
|
|
358
414
|
| StyleX | `6.826 ms` | `8.059 ms` |
|
|
359
415
|
|
|
360
|
-
Compiler transform, 100 files per corpus:
|
|
416
|
+
[Compiler transform](https://fluenticstack.com/style/docs/benchmark/compiler/), 100 files per corpus:
|
|
361
417
|
|
|
362
418
|
| Corpus | Fluentic Warm | StyleX Babel |
|
|
363
419
|
| ------------- | ------------- | ------------ |
|
|
@@ -371,23 +427,24 @@ and the public suite list.
|
|
|
371
427
|
|
|
372
428
|
## Package Exports
|
|
373
429
|
|
|
374
|
-
| Import
|
|
375
|
-
|
|
|
376
|
-
| `@fluentic/style`
|
|
377
|
-
| `@fluentic/style/css`
|
|
378
|
-
| `@fluentic/style/selector`
|
|
379
|
-
| `@fluentic/style/config`
|
|
380
|
-
| `@fluentic/style/compiler`
|
|
381
|
-
| `@fluentic/style/
|
|
382
|
-
| `@fluentic/style/dev
|
|
383
|
-
| `@fluentic/style/
|
|
384
|
-
| `@fluentic/style/
|
|
385
|
-
| `@fluentic/style/plugin/
|
|
386
|
-
| `@fluentic/style/plugin/
|
|
387
|
-
| `@fluentic/style/plugin/
|
|
388
|
-
| `@fluentic/style/plugin/
|
|
389
|
-
| `@fluentic/style/plugin/
|
|
390
|
-
| `@fluentic/style/plugin/
|
|
430
|
+
| Import | Purpose |
|
|
431
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
432
|
+
| `@fluentic/style` | Runtime API, style builders, hooks, tokens, themes, and types. |
|
|
433
|
+
| `@fluentic/style/css` | CSS helper APIs for keyframes, font faces, and at-rules. |
|
|
434
|
+
| `@fluentic/style/selector` | Selector constructors, validators, presets, and priority helpers. |
|
|
435
|
+
| `@fluentic/style/config` | Runtime configuration helpers. |
|
|
436
|
+
| `@fluentic/style/compiler` | Node-only compiler entry used by build integrations and compiler benchmarks. |
|
|
437
|
+
| `@fluentic/style/presets/tailwind` | [Tailwind-like object fields and class-name chains](https://fluenticstack.com/style/docs/presets/tailwind/). |
|
|
438
|
+
| `@fluentic/style/dev` | Development utilities. |
|
|
439
|
+
| `@fluentic/style/dev/rsc` | React Server Component dev client boundary. |
|
|
440
|
+
| `@fluentic/style/jsx` | [JSX import source without a bundler plugin](https://fluenticstack.com/style/docs/integrations/runtime-only-mode/). |
|
|
441
|
+
| `@fluentic/style/plugin/jsx` | [JSX import source after adding a bundler plugin](https://fluenticstack.com/style/docs/integrations/jsx-runtime-setup/). |
|
|
442
|
+
| `@fluentic/style/plugin/nextjs` | [Next.js App Router integration](https://fluenticstack.com/style/docs/integrations/nextjs/). |
|
|
443
|
+
| `@fluentic/style/plugin/vite` | [Vite plugin](https://fluenticstack.com/style/docs/integrations/vite/). |
|
|
444
|
+
| `@fluentic/style/plugin/webpack` | [Webpack plugin](https://fluenticstack.com/style/docs/integrations/webpack/). |
|
|
445
|
+
| `@fluentic/style/plugin/rspack` | [Rspack plugin](https://fluenticstack.com/style/docs/integrations/rspack/). |
|
|
446
|
+
| `@fluentic/style/plugin/farm` | [Farm plugin](https://fluenticstack.com/style/docs/integrations/farm/). |
|
|
447
|
+
| `@fluentic/style/plugin/parcel` | [Parcel plugin](https://fluenticstack.com/style/docs/integrations/parcel/). |
|
|
391
448
|
|
|
392
449
|
## Repository Guide
|
|
393
450
|
|
|
@@ -32,6 +32,7 @@ import { exposeStyle } from '../../../style/utils';
|
|
|
32
32
|
import { type AtRuleRef, createAtRuleRef } from '../../../style/valueRef';
|
|
33
33
|
import { hashString } from '../../../utils/hash';
|
|
34
34
|
import type { StableId } from '../../../utils/id';
|
|
35
|
+
import type { CompilerRuntimeMode } from '../../compiler';
|
|
35
36
|
import {
|
|
36
37
|
FN_CREATE_COUNTER_STYLE,
|
|
37
38
|
FN_CREATE_EXTRACTED_SCOPE,
|
|
@@ -107,6 +108,7 @@ export type EvalScope = {
|
|
|
107
108
|
bindingNodes?: Map<string, BabelTypes.Node>;
|
|
108
109
|
styleTransform?: StyleTransform | null;
|
|
109
110
|
sourcemapTrace?: 'style' | 'value';
|
|
111
|
+
runtimeMode?: CompilerRuntimeMode | null;
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
export function evaluateNode(
|
|
@@ -312,7 +312,16 @@ function evaluateResolvedNode(
|
|
|
312
312
|
const meta = scope.styleMetas?.get(chain.rootName);
|
|
313
313
|
if (!meta) return evalFail('Cannot resolve imported style function');
|
|
314
314
|
|
|
315
|
-
const result = compileChain(
|
|
315
|
+
const result = compileChain(
|
|
316
|
+
chain,
|
|
317
|
+
fileId,
|
|
318
|
+
node.loc?.start,
|
|
319
|
+
scope,
|
|
320
|
+
options,
|
|
321
|
+
scope.runtimeMode ?? null,
|
|
322
|
+
meta,
|
|
323
|
+
styleNames,
|
|
324
|
+
);
|
|
316
325
|
if (!result) return evalFail('Cannot compile imported style chain');
|
|
317
326
|
|
|
318
327
|
const traceResult = options.dev?.sourcemapMode === 'value'
|
|
@@ -329,6 +338,7 @@ function evaluateResolvedNode(
|
|
|
329
338
|
sourcemapMode: 'value',
|
|
330
339
|
},
|
|
331
340
|
},
|
|
341
|
+
scope.runtimeMode ?? null,
|
|
332
342
|
meta,
|
|
333
343
|
styleNames,
|
|
334
344
|
) ?? result;
|
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
} from '../../../../style/transform';
|
|
52
52
|
import { isAtRuleRef } from '../../../../style/valueRef';
|
|
53
53
|
import { hashString } from '../../../../utils/hash';
|
|
54
|
+
import { CompilerRuntimeMode } from '../../../compiler';
|
|
54
55
|
import type { CompilerOptions } from '../../../compiler/types';
|
|
55
56
|
import { DEFAULT_CONFIG } from '../../../utils/constants';
|
|
56
57
|
import {
|
|
@@ -91,7 +92,6 @@ type CssConfig = {
|
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
type ExtractCssOptions = NonNullable<CompilerOptions['css']> & {
|
|
94
|
-
localClassName?: boolean;
|
|
95
95
|
debugClassName?: boolean;
|
|
96
96
|
scopeTargetPrefix?: string;
|
|
97
97
|
};
|
|
@@ -326,10 +326,11 @@ export function compileChain(
|
|
|
326
326
|
nodeLoc: { line: number; column: number; } | null | undefined,
|
|
327
327
|
scope: EvalScope,
|
|
328
328
|
opts: CompilerOptions,
|
|
329
|
+
runtimeMode: CompilerRuntimeMode | null,
|
|
329
330
|
meta: StyleFnMeta,
|
|
330
331
|
styleNames: Set<string> = new Set(),
|
|
331
332
|
): CompiledChainData | null {
|
|
332
|
-
const css = getCssConfig(opts);
|
|
333
|
+
const css = getCssConfig(opts, runtimeMode);
|
|
333
334
|
|
|
334
335
|
if (meta.mode === 'ClassName') {
|
|
335
336
|
if (chain.kind !== 'style') return null;
|
|
@@ -357,16 +358,18 @@ export function compileChain(
|
|
|
357
358
|
|
|
358
359
|
function getCssConfig(
|
|
359
360
|
opts: CompilerOptions,
|
|
361
|
+
runtimeMode: CompilerRuntimeMode | null,
|
|
360
362
|
): CssConfig {
|
|
361
363
|
const css = opts.css as ExtractCssOptions | undefined;
|
|
364
|
+
const isDevRuntimeMode = runtimeMode === CompilerRuntimeMode.Dev || runtimeMode === CompilerRuntimeMode.RscDev;
|
|
362
365
|
|
|
363
366
|
return {
|
|
364
367
|
classNameFormat: css?.classNameFormat ?? DEFAULT_CONFIG.classNameFormat ?? null,
|
|
365
368
|
transformClassNameFormat: css?.transformClassNameFormat ?? DEFAULT_CONFIG.transformClassNameFormat ?? null,
|
|
366
369
|
hashLength: css?.hashLength ?? DEFAULT_CONFIG.hashLength ?? 7,
|
|
367
370
|
tokenNameFormat: css?.tokenNameFormat ?? DEFAULT_CONFIG.tokenNameFormat ?? null,
|
|
368
|
-
localClassName:
|
|
369
|
-
debugClassName: css?.debugClassName ??
|
|
371
|
+
localClassName: isDevRuntimeMode,
|
|
372
|
+
debugClassName: css?.debugClassName ?? isDevRuntimeMode,
|
|
370
373
|
scopeTargetPrefix: css?.scopeTargetPrefix ?? '',
|
|
371
374
|
};
|
|
372
375
|
}
|
|
@@ -202,7 +202,7 @@ export function createExtractPlugin(args: PluginArgs) {
|
|
|
202
202
|
|
|
203
203
|
let result: ReturnType<typeof compileChain>;
|
|
204
204
|
try {
|
|
205
|
-
result = compileChain(chain, state.fileId, loc, scope, options, meta, state.styleNames);
|
|
205
|
+
result = compileChain(chain, state.fileId, loc, scope, options, state.runtimeMode, meta, state.styleNames);
|
|
206
206
|
} catch (error) {
|
|
207
207
|
const message = error instanceof Error ? error.message : String(error);
|
|
208
208
|
const node = getSelectorCompileErrorNode(error);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CSS_CONFIG_DEFAULT } from '../../config/config/css';
|
|
2
|
-
import { DEFAULT_DEBUG_CONFIG } from '../../config/config/debug';
|
|
3
|
-
import { DEV_CONFIG_DEFAULT } from '../../config/config/dev';
|
|
4
2
|
|
|
5
3
|
const pkg = '@fluentic/style';
|
|
6
4
|
|
|
@@ -15,8 +13,6 @@ export const STYLE_RSC_EXTRACT_RUNTIME_IMPORT_PATH = pkg + '/entry/rsc-prod/runt
|
|
|
15
13
|
|
|
16
14
|
export const DEFAULT_CONFIG = {
|
|
17
15
|
...CSS_CONFIG_DEFAULT,
|
|
18
|
-
localClassName: DEV_CONFIG_DEFAULT.isLocalClassNameEnabled,
|
|
19
|
-
debugClassName: DEFAULT_DEBUG_CONFIG.isDebugClassNameEnabled,
|
|
20
16
|
};
|
|
21
17
|
|
|
22
18
|
export const IMPORT_PATHS = [
|
package/config/build.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { globalData } from '../utils/global';
|
|
2
2
|
import type { ReplaceProps } from '../utils/type';
|
|
3
3
|
import { CSS_CONFIG, type CssConfig } from './config/css';
|
|
4
|
+
import { setDebugClassNameDefault, setDebugClassNameEnabled } from './config/debug';
|
|
4
5
|
import type { DevRuntimeOptions } from './config/dev';
|
|
5
6
|
import { RUNTIME_CONFIG } from './config/runtime';
|
|
6
7
|
import type { CheckSelectorMode } from './types';
|
|
7
8
|
|
|
8
|
-
export type BuildCssConfig = Partial<CssConfig
|
|
9
|
+
export type BuildCssConfig = Partial<CssConfig> & {
|
|
10
|
+
debugClassName?: boolean;
|
|
11
|
+
};
|
|
9
12
|
|
|
10
13
|
export type BuildDevConfig = ReplaceProps<DevRuntimeOptions, {
|
|
11
14
|
checkSelector?: CheckSelectorMode;
|
|
@@ -27,6 +30,13 @@ export function setBuildConfig(config: BuildConfig) {
|
|
|
27
30
|
RUNTIME_CONFIG.isHoist = config.hoist;
|
|
28
31
|
|
|
29
32
|
if (config.css) {
|
|
30
|
-
|
|
33
|
+
const { debugClassName, ...css } = config.css;
|
|
34
|
+
Object.assign(CSS_CONFIG, css);
|
|
35
|
+
|
|
36
|
+
if (typeof debugClassName === 'boolean') {
|
|
37
|
+
setDebugClassNameEnabled(debugClassName);
|
|
38
|
+
} else {
|
|
39
|
+
setDebugClassNameDefault(false);
|
|
40
|
+
}
|
|
31
41
|
}
|
|
32
42
|
}
|
package/config/config/debug.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { globalData } from '../../utils/global';
|
|
|
2
2
|
|
|
3
3
|
export type DebugConfig = {
|
|
4
4
|
isDebugClassNameEnabled: boolean;
|
|
5
|
+
isDebugClassNameConfigured: boolean;
|
|
5
6
|
|
|
6
7
|
maxPropertyLength: number;
|
|
7
8
|
maxValueLength: number;
|
|
@@ -11,7 +12,8 @@ export type DebugConfig = {
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const DEFAULT_DEBUG_CONFIG: DebugConfig = {
|
|
14
|
-
isDebugClassNameEnabled:
|
|
15
|
+
isDebugClassNameEnabled: false,
|
|
16
|
+
isDebugClassNameConfigured: false,
|
|
15
17
|
|
|
16
18
|
maxPropertyLength: 24,
|
|
17
19
|
maxValueLength: 8,
|
|
@@ -24,3 +26,13 @@ export const DEBUG_CONFIG = globalData<DebugConfig>(
|
|
|
24
26
|
'config.debug',
|
|
25
27
|
() => ({ ...DEFAULT_DEBUG_CONFIG }),
|
|
26
28
|
);
|
|
29
|
+
|
|
30
|
+
export function setDebugClassNameEnabled(value: boolean) {
|
|
31
|
+
DEBUG_CONFIG.isDebugClassNameEnabled = value;
|
|
32
|
+
DEBUG_CONFIG.isDebugClassNameConfigured = true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function setDebugClassNameDefault(value: boolean) {
|
|
36
|
+
if (DEBUG_CONFIG.isDebugClassNameConfigured) return;
|
|
37
|
+
DEBUG_CONFIG.isDebugClassNameEnabled = value;
|
|
38
|
+
}
|
package/config/config/dev.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { normalizeHashLength } from '../../utils/hash';
|
|
|
3
3
|
import { unsetAll } from '../../utils/object';
|
|
4
4
|
import type { BuildDevConfig } from '../build';
|
|
5
5
|
import type { SourcemapLocationMode, StylePriorityMode } from '../types';
|
|
6
|
+
import { setDebugClassNameDefault } from './debug';
|
|
6
7
|
import { RUNTIME_CONFIG } from './runtime';
|
|
7
8
|
|
|
8
9
|
export type DevConfig = {
|
|
@@ -89,6 +90,11 @@ export function setBuildDevConfig(config: BuildDevConfig) {
|
|
|
89
90
|
rebuildDevConfig();
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
export function setStyleDevMode(isDev: boolean) {
|
|
94
|
+
IS_DEV.isDev = isDev;
|
|
95
|
+
rebuildDevConfig();
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
export function setDevUtilsRuntimeOptions(options: DevRuntimeOptions | null) {
|
|
93
99
|
setOptions(configUtils, options, null);
|
|
94
100
|
rebuildDevConfig();
|
|
@@ -111,6 +117,8 @@ function rebuildDevConfig() {
|
|
|
111
117
|
);
|
|
112
118
|
|
|
113
119
|
DEV_CONFIG.isDev = IS_DEV.isDev;
|
|
120
|
+
DEV_CONFIG.isLocalClassNameEnabled = DEV_CONFIG.isDev;
|
|
121
|
+
setDebugClassNameDefault(DEV_CONFIG.isDev);
|
|
114
122
|
|
|
115
123
|
RUNTIME_CONFIG.changes += 1;
|
|
116
124
|
}
|
package/config/configure.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { BUILD_CONFIG } from './build';
|
|
2
2
|
import { CSS_CONFIG, type CssConfig } from './config/css';
|
|
3
|
+
import { setDebugClassNameEnabled } from './config/debug';
|
|
3
4
|
import { RUNTIME_CONFIG } from './config/runtime';
|
|
4
5
|
import { getCacheTTL } from './utils';
|
|
5
6
|
|
|
6
|
-
export type RuntimeCssOptions = Partial<CssConfig
|
|
7
|
+
export type RuntimeCssOptions = Partial<CssConfig> & {
|
|
8
|
+
debugClassName?: boolean;
|
|
9
|
+
};
|
|
7
10
|
|
|
8
11
|
export type ConfigureStyleRuntimeOptions = {
|
|
9
12
|
css?: RuntimeCssOptions;
|
|
@@ -13,7 +16,12 @@ export type ConfigureStyleRuntimeOptions = {
|
|
|
13
16
|
export function configureStyleRuntime(options: ConfigureStyleRuntimeOptions = {}) {
|
|
14
17
|
if (options.css) {
|
|
15
18
|
checkBuildConfig('css');
|
|
16
|
-
|
|
19
|
+
const { debugClassName, ...css } = options.css;
|
|
20
|
+
Object.assign(CSS_CONFIG, css);
|
|
21
|
+
|
|
22
|
+
if (typeof debugClassName === 'boolean') {
|
|
23
|
+
setDebugClassNameEnabled(debugClassName);
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
if (options.cacheTTL !== undefined) {
|
package/dev/config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DevRuntimeOptions, setDevRuntimeOptions, setStyleDevMode } from '../config/config/dev';
|
|
2
2
|
import { enableStyleDevUtils, type StyleDevUtilsOptions } from './utils';
|
|
3
3
|
|
|
4
4
|
export type ConfigureStyleDevOptions = DevRuntimeOptions & {
|
|
@@ -8,8 +8,7 @@ export type ConfigureStyleDevOptions = DevRuntimeOptions & {
|
|
|
8
8
|
export function configureStyleDev(options: ConfigureStyleDevOptions = {}) {
|
|
9
9
|
const { utils, ...devOptions } = options;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
setStyleDevMode(true);
|
|
13
12
|
setDevRuntimeOptions(devOptions);
|
|
14
13
|
|
|
15
14
|
if (utils) enableStyleDevUtils(utils);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as globalData } from "./token-CKXUECuU.js";
|
|
2
|
-
import { f as RUNTIME_CONFIG } from "./token-
|
|
2
|
+
import { f as RUNTIME_CONFIG } from "./token-DT_sCPtm.js";
|
|
3
3
|
//#region utils/object.ts
|
|
4
4
|
function hasOwn(target, field) {
|
|
5
5
|
return Object.prototype.hasOwnProperty.call(target, field);
|
|
@@ -141,4 +141,4 @@ function finishClassNameResult(result) {
|
|
|
141
141
|
//#endregion
|
|
142
142
|
export { mergeResolvedStyle as a, getStylePropCacheValue as c, getResolvedStyleItemTokenValues as d, isResolvedStyleItem as f, hasOwn as h, mergeResolvedClassName as i, createCacheTreeNode as l, setResolvedStyleItemTokenValues as m, finishClassNameResult as n, mergeStyle as o, markResolvedStyleItem as p, mergeClassName as r, walkRecursiveItems as s, createClassNameResult as t, getCacheTreeChild as u };
|
|
143
143
|
|
|
144
|
-
//# sourceMappingURL=className-
|
|
144
|
+
//# sourceMappingURL=className-CKo4TxuT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"className-W2kDyeVl.js","names":[],"sources":["../utils/object.ts","../runtime/core/cache/resolvedItem.ts","../runtime/core/cache/utils/tree.ts","../runtime/core/cache/propCache.ts","../runtime/core/cache/utils/walk.ts","../runtime/core/className.ts"],"sourcesContent":["export function clone<T>(\n data: T | null | undefined,\n) {\n let cloned: Record<string, unknown> = {};\n\n for (let key in data) {\n cloned[key] = data[key];\n }\n\n return cloned as T;\n}\n\nexport function merge<T>(\n data1: T | null | undefined,\n data2: T | null | undefined,\n) {\n let merged: Record<string, unknown> = {};\n\n if (data1) {\n for (let key in data1) {\n merged[key] = data1[key];\n }\n }\n\n if (data2) {\n for (let key in data2) {\n merged[key] = data2[key];\n }\n }\n\n return merged as T;\n}\n\nexport function assign(\n target: unknown,\n data: object,\n) {\n for (let key in data) {\n (target as any)[key] = (data as any)[key];\n }\n}\n\nexport function set(\n target: unknown,\n field: string | symbol,\n data: unknown,\n) {\n (target as any)[field] = data;\n}\n\nexport function get(\n target: unknown,\n field: string | symbol,\n): unknown {\n return (target as any)[field] ?? null;\n}\n\nexport function unsetAll(obj: object) {\n for (const key of Object.keys(obj)) {\n delete (obj as any)[key];\n }\n}\n\nexport function hasOwn(\n target: object,\n field: PropertyKey,\n) {\n return Object.prototype.hasOwnProperty.call(target, field);\n}\n\nexport function toArray<T>(\n value: T | T[] | null | undefined,\n): T[] {\n return Array.isArray(value) ? value : (value ? [value] : []);\n}\n\nexport function isFunction(\n value: unknown,\n): value is Function {\n return typeof value === 'function';\n}\n\nexport function isPromiseLike<T>(\n value: T | Promise<T>,\n): value is Promise<T> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n","import { globalData } from '../../../utils/global';\nimport type { StyleTokenValues } from './tokenValues';\n\nconst resolvedStyleItems = globalData(\n 'runtime.resolvedStyleItems',\n () => new WeakSet<object>(),\n);\n\nconst resolvedStyleItemTokenValues = globalData(\n 'runtime.styleItemTokenValues',\n () => new WeakMap<object, StyleTokenValues | null>(),\n);\n\nexport function markResolvedStyleItem(item: object) {\n resolvedStyleItems.add(item);\n}\n\nexport function isResolvedStyleItem(value: unknown): value is object {\n return !!value && typeof value === 'object' && resolvedStyleItems.has(value);\n}\n\nexport function setResolvedStyleItemTokenValues(\n item: object,\n tokens: StyleTokenValues,\n) {\n resolvedStyleItemTokenValues.set(item, tokens);\n}\n\nexport function getResolvedStyleItemTokenValues(item: object) {\n return resolvedStyleItemTokenValues.get(item) ?? null;\n}\n","export type CacheTreeNode<Key, Value> = {\n children: Map<Key, CacheTreeNode<Key, Value>>;\n value: Value;\n};\n\nexport type WeakCacheTreeNode<Key extends object, Value> = {\n children: WeakMap<Key, WeakCacheTreeNode<Key, Value>>;\n value: Value;\n};\n\nexport function createCacheTreeNode<Key, Value>(\n value: Value,\n): CacheTreeNode<Key, Value> {\n return {\n children: new Map(),\n value,\n };\n}\n\nexport function getCacheTreeChild<Key, Value>(\n node: CacheTreeNode<Key, Value>,\n key: Key,\n createValue: () => Value,\n) {\n let child = node.children.get(key);\n\n if (!child) {\n child = createCacheTreeNode<Key, Value>(createValue());\n node.children.set(key, child);\n }\n\n return child;\n}\n\nexport function createWeakCacheTreeNode<Key extends object, Value>(\n value: Value,\n): WeakCacheTreeNode<Key, Value> {\n return {\n children: new WeakMap(),\n value,\n };\n}\n\nexport function getWeakCacheTreeChild<Key extends object, Value>(\n node: WeakCacheTreeNode<Key, Value>,\n key: Key,\n createValue: () => Value,\n) {\n let child = node.children.get(key);\n\n if (!child) {\n child = createWeakCacheTreeNode<Key, Value>(createValue());\n node.children.set(key, child);\n }\n\n return child;\n}\n","import { RUNTIME_CONFIG } from '../../../config/config/runtime';\nimport type { StyleProp } from '../../types';\nimport type { ResolvedStyleProp } from './result';\nimport { createWeakCacheTreeNode, getWeakCacheTreeChild, type WeakCacheTreeNode } from './utils/tree';\n\ntype CacheValue<Data = StylePropCacheData<object>> = {\n d: Data | null;\n c: number;\n};\n\ntype CacheNode<Item extends object> = WeakCacheTreeNode<Item, CacheValue>;\n\nexport type StylePropCacheData<Item extends object> = {\n i: Item[];\n r: ResolvedStyleProp;\n};\n\nconst root = createWeakCacheTreeNode<object, CacheValue>(createCacheValue());\n\nexport function getStylePropCacheValue<Item extends object, Data = StylePropCacheData<Item>>(\n styleProp: StyleProp,\n walk: (\n styleProp: StyleProp,\n fn: (item: object) => void,\n onUnsupported: () => void,\n ) => void,\n onUnsupported?: () => void,\n) {\n let node = root as CacheNode<object>;\n let hasItem = false;\n let canCache = true;\n\n walk(\n styleProp,\n (item) => {\n hasItem = true;\n node = getWeakCacheTreeChild(node, item, createCacheValue);\n },\n () => {\n canCache = false;\n onUnsupported?.();\n },\n );\n\n if (!hasItem || !canCache) return null;\n\n const value = node.value as CacheValue<Data>;\n\n if (value.c !== RUNTIME_CONFIG.changes) {\n value.d = null;\n value.c = RUNTIME_CONFIG.changes;\n }\n\n return value;\n}\n\nfunction createCacheValue(): CacheValue {\n return {\n d: null,\n c: RUNTIME_CONFIG.changes,\n };\n}\n","export function walkRecursiveItems(\n root: unknown,\n fn: (item: unknown) => void,\n) {\n if (!root) return;\n\n const stack: unknown[] = [root];\n\n while (stack.length > 0) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let i = item.length - 1; i >= 0; i--) {\n stack.push(item[i]);\n }\n\n continue;\n }\n\n fn(item);\n }\n}\n","import type { CSSProperties } from 'react';\nimport type { RecursiveArray } from '../../utils/type';\n\ntype Items<T = string> = T | false | null | undefined | RecursiveArray<T | false | null | undefined>;\n\nexport type ClassNameProps = {\n className?: Items<string>;\n style?: Items<CSSProperties>;\n};\n\nexport type ClassNameResult = {\n className?: string | undefined;\n style?: CSSProperties | undefined;\n};\n\nexport function mergeClassName(className: Items<string>) {\n if (!className) return undefined;\n if (!Array.isArray(className)) return className as string;\n\n let nextClassName = '';\n\n const stack: unknown[] = [className];\n\n while (stack.length) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let index = item.length - 1; index >= 0; index--) {\n stack.push(item[index]);\n }\n } else {\n nextClassName = nextClassName\n ? `${nextClassName} ${item}`\n : item as string;\n }\n }\n\n return nextClassName || undefined;\n}\n\nexport function mergeStyle(style: Items<CSSProperties>) {\n if (!style) return undefined;\n if (!Array.isArray(style)) return style as CSSProperties;\n\n const nextStyle = {};\n\n const stack: unknown[] = [style];\n\n while (stack.length) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let index = item.length - 1; index >= 0; index--) {\n stack.push(item[index]);\n }\n } else {\n Object.assign(nextStyle, item);\n }\n }\n\n return nextStyle;\n}\n\nexport function mergeResolvedClassName(\n result: ClassNameResult,\n resolvedClassName: string,\n) {\n if (!resolvedClassName) return;\n\n result.className = result.className\n ? result.className + ' ' + resolvedClassName\n : resolvedClassName;\n}\n\nexport function mergeResolvedStyle(\n result: ClassNameResult,\n resolvedStyle: CSSProperties | undefined,\n) {\n if (!resolvedStyle) return;\n\n result.style = result.style\n ? Object.assign({}, resolvedStyle, result.style)\n : resolvedStyle;\n}\n\nexport function createClassNameResult(\n props: ClassNameProps = {},\n): ClassNameResult {\n return {\n className: props.className ? mergeClassName(props.className) : undefined,\n style: props.style ? mergeStyle(props.style) : undefined,\n };\n}\n\nexport function finishClassNameResult(result: ClassNameResult): ClassNameResult {\n return result.className || result.style ? result : {};\n}\n"],"m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AY,CAAC;CAEnB,MAAM,QAAmB,CAAC,KAAK;CAE/B,OAAO,MAAM,QAAQ;EACnB,MAAM,OAAO,MAAM,IAAI;EAEvB,IAAI,CAAC,MAAM;EAEX,IAAI,MAAM,QAAQ,IAAI,GACpB,KAAK,IAAI,QAAQ,KAAK,SAAS,GAAG,SAAS,GAAG,SAC5C,MAAM,KAAK,KAAK,MAAM;OAGxB,OAAO,OAAO,WAAW,IAAI;CAEjC;CAEA,OAAO;AACT;AAEA,SAAgB,uBACd,QACA,mBACA;CACA,IAAI,CAAC,mBAAmB;CAExB,OAAO,YAAY,OAAO,YACtB,OAAO,YAAY,MAAM,oBACzB;AACN;AAEA,SAAgB,mBACd,QACA,eACA;CACA,IAAI,CAAC,eAAe;CAEpB,OAAO,QAAQ,OAAO,QAClB,OAAO,OAAO,CAAC,GAAG,eAAe,OAAO,KAAK,IAC7C;AACN;AAEA,SAAgB,sBACd,QAAwB,CAAC,GACR;CACjB,OAAO;EACL,WAAW,MAAM,YAAY,eAAe,MAAM,SAAS,IAAI,KAAA;EAC/D,OAAO,MAAM,QAAQ,WAAW,MAAM,KAAK,IAAI,KAAA;CACjD;AACF;AAEA,SAAgB,sBAAsB,QAA0C;CAC9E,OAAO,OAAO,aAAa,OAAO,QAAQ,SAAS,CAAC;AACtD"}
|
|
1
|
+
{"version":3,"file":"className-CKo4TxuT.js","names":[],"sources":["../utils/object.ts","../runtime/core/cache/resolvedItem.ts","../runtime/core/cache/utils/tree.ts","../runtime/core/cache/propCache.ts","../runtime/core/cache/utils/walk.ts","../runtime/core/className.ts"],"sourcesContent":["export function clone<T>(\n data: T | null | undefined,\n) {\n let cloned: Record<string, unknown> = {};\n\n for (let key in data) {\n cloned[key] = data[key];\n }\n\n return cloned as T;\n}\n\nexport function merge<T>(\n data1: T | null | undefined,\n data2: T | null | undefined,\n) {\n let merged: Record<string, unknown> = {};\n\n if (data1) {\n for (let key in data1) {\n merged[key] = data1[key];\n }\n }\n\n if (data2) {\n for (let key in data2) {\n merged[key] = data2[key];\n }\n }\n\n return merged as T;\n}\n\nexport function assign(\n target: unknown,\n data: object,\n) {\n for (let key in data) {\n (target as any)[key] = (data as any)[key];\n }\n}\n\nexport function set(\n target: unknown,\n field: string | symbol,\n data: unknown,\n) {\n (target as any)[field] = data;\n}\n\nexport function get(\n target: unknown,\n field: string | symbol,\n): unknown {\n return (target as any)[field] ?? null;\n}\n\nexport function unsetAll(obj: object) {\n for (const key of Object.keys(obj)) {\n delete (obj as any)[key];\n }\n}\n\nexport function hasOwn(\n target: object,\n field: PropertyKey,\n) {\n return Object.prototype.hasOwnProperty.call(target, field);\n}\n\nexport function toArray<T>(\n value: T | T[] | null | undefined,\n): T[] {\n return Array.isArray(value) ? value : (value ? [value] : []);\n}\n\nexport function isFunction(\n value: unknown,\n): value is Function {\n return typeof value === 'function';\n}\n\nexport function isPromiseLike<T>(\n value: T | Promise<T>,\n): value is Promise<T> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n","import { globalData } from '../../../utils/global';\nimport type { StyleTokenValues } from './tokenValues';\n\nconst resolvedStyleItems = globalData(\n 'runtime.resolvedStyleItems',\n () => new WeakSet<object>(),\n);\n\nconst resolvedStyleItemTokenValues = globalData(\n 'runtime.styleItemTokenValues',\n () => new WeakMap<object, StyleTokenValues | null>(),\n);\n\nexport function markResolvedStyleItem(item: object) {\n resolvedStyleItems.add(item);\n}\n\nexport function isResolvedStyleItem(value: unknown): value is object {\n return !!value && typeof value === 'object' && resolvedStyleItems.has(value);\n}\n\nexport function setResolvedStyleItemTokenValues(\n item: object,\n tokens: StyleTokenValues,\n) {\n resolvedStyleItemTokenValues.set(item, tokens);\n}\n\nexport function getResolvedStyleItemTokenValues(item: object) {\n return resolvedStyleItemTokenValues.get(item) ?? null;\n}\n","export type CacheTreeNode<Key, Value> = {\n children: Map<Key, CacheTreeNode<Key, Value>>;\n value: Value;\n};\n\nexport type WeakCacheTreeNode<Key extends object, Value> = {\n children: WeakMap<Key, WeakCacheTreeNode<Key, Value>>;\n value: Value;\n};\n\nexport function createCacheTreeNode<Key, Value>(\n value: Value,\n): CacheTreeNode<Key, Value> {\n return {\n children: new Map(),\n value,\n };\n}\n\nexport function getCacheTreeChild<Key, Value>(\n node: CacheTreeNode<Key, Value>,\n key: Key,\n createValue: () => Value,\n) {\n let child = node.children.get(key);\n\n if (!child) {\n child = createCacheTreeNode<Key, Value>(createValue());\n node.children.set(key, child);\n }\n\n return child;\n}\n\nexport function createWeakCacheTreeNode<Key extends object, Value>(\n value: Value,\n): WeakCacheTreeNode<Key, Value> {\n return {\n children: new WeakMap(),\n value,\n };\n}\n\nexport function getWeakCacheTreeChild<Key extends object, Value>(\n node: WeakCacheTreeNode<Key, Value>,\n key: Key,\n createValue: () => Value,\n) {\n let child = node.children.get(key);\n\n if (!child) {\n child = createWeakCacheTreeNode<Key, Value>(createValue());\n node.children.set(key, child);\n }\n\n return child;\n}\n","import { RUNTIME_CONFIG } from '../../../config/config/runtime';\nimport type { StyleProp } from '../../types';\nimport type { ResolvedStyleProp } from './result';\nimport { createWeakCacheTreeNode, getWeakCacheTreeChild, type WeakCacheTreeNode } from './utils/tree';\n\ntype CacheValue<Data = StylePropCacheData<object>> = {\n d: Data | null;\n c: number;\n};\n\ntype CacheNode<Item extends object> = WeakCacheTreeNode<Item, CacheValue>;\n\nexport type StylePropCacheData<Item extends object> = {\n i: Item[];\n r: ResolvedStyleProp;\n};\n\nconst root = createWeakCacheTreeNode<object, CacheValue>(createCacheValue());\n\nexport function getStylePropCacheValue<Item extends object, Data = StylePropCacheData<Item>>(\n styleProp: StyleProp,\n walk: (\n styleProp: StyleProp,\n fn: (item: object) => void,\n onUnsupported: () => void,\n ) => void,\n onUnsupported?: () => void,\n) {\n let node = root as CacheNode<object>;\n let hasItem = false;\n let canCache = true;\n\n walk(\n styleProp,\n (item) => {\n hasItem = true;\n node = getWeakCacheTreeChild(node, item, createCacheValue);\n },\n () => {\n canCache = false;\n onUnsupported?.();\n },\n );\n\n if (!hasItem || !canCache) return null;\n\n const value = node.value as CacheValue<Data>;\n\n if (value.c !== RUNTIME_CONFIG.changes) {\n value.d = null;\n value.c = RUNTIME_CONFIG.changes;\n }\n\n return value;\n}\n\nfunction createCacheValue(): CacheValue {\n return {\n d: null,\n c: RUNTIME_CONFIG.changes,\n };\n}\n","export function walkRecursiveItems(\n root: unknown,\n fn: (item: unknown) => void,\n) {\n if (!root) return;\n\n const stack: unknown[] = [root];\n\n while (stack.length > 0) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let i = item.length - 1; i >= 0; i--) {\n stack.push(item[i]);\n }\n\n continue;\n }\n\n fn(item);\n }\n}\n","import type { CSSProperties } from 'react';\nimport type { RecursiveArray } from '../../utils/type';\n\ntype Items<T = string> = T | false | null | undefined | RecursiveArray<T | false | null | undefined>;\n\nexport type ClassNameProps = {\n className?: Items<string>;\n style?: Items<CSSProperties>;\n};\n\nexport type ClassNameResult = {\n className?: string | undefined;\n style?: CSSProperties | undefined;\n};\n\nexport function mergeClassName(className: Items<string>) {\n if (!className) return undefined;\n if (!Array.isArray(className)) return className as string;\n\n let nextClassName = '';\n\n const stack: unknown[] = [className];\n\n while (stack.length) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let index = item.length - 1; index >= 0; index--) {\n stack.push(item[index]);\n }\n } else {\n nextClassName = nextClassName\n ? `${nextClassName} ${item}`\n : item as string;\n }\n }\n\n return nextClassName || undefined;\n}\n\nexport function mergeStyle(style: Items<CSSProperties>) {\n if (!style) return undefined;\n if (!Array.isArray(style)) return style as CSSProperties;\n\n const nextStyle = {};\n\n const stack: unknown[] = [style];\n\n while (stack.length) {\n const item = stack.pop();\n\n if (!item) continue;\n\n if (Array.isArray(item)) {\n for (let index = item.length - 1; index >= 0; index--) {\n stack.push(item[index]);\n }\n } else {\n Object.assign(nextStyle, item);\n }\n }\n\n return nextStyle;\n}\n\nexport function mergeResolvedClassName(\n result: ClassNameResult,\n resolvedClassName: string,\n) {\n if (!resolvedClassName) return;\n\n result.className = result.className\n ? result.className + ' ' + resolvedClassName\n : resolvedClassName;\n}\n\nexport function mergeResolvedStyle(\n result: ClassNameResult,\n resolvedStyle: CSSProperties | undefined,\n) {\n if (!resolvedStyle) return;\n\n result.style = result.style\n ? Object.assign({}, resolvedStyle, result.style)\n : resolvedStyle;\n}\n\nexport function createClassNameResult(\n props: ClassNameProps = {},\n): ClassNameResult {\n return {\n className: props.className ? mergeClassName(props.className) : undefined,\n style: props.style ? mergeStyle(props.style) : undefined,\n };\n}\n\nexport function finishClassNameResult(result: ClassNameResult): ClassNameResult {\n return result.className || result.style ? result : {};\n}\n"],"mappings":";;;AA+DA,SAAgB,OACd,QACA,OACA;CACA,OAAO,OAAO,UAAU,eAAe,KAAK,QAAQ,KAAK;AAC3D;;;ACjEA,MAAM,qBAAqB,WACzB,oDACM,IAAI,QAAgB,CAC5B;AAEA,MAAM,+BAA+B,WACnC,sDACM,IAAI,QAAyC,CACrD;AAEA,SAAgB,sBAAsB,MAAc;CAClD,mBAAmB,IAAI,IAAI;AAC7B;AAEA,SAAgB,oBAAoB,OAAiC;CACnE,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,mBAAmB,IAAI,KAAK;AAC7E;AAEA,SAAgB,gCACd,MACA,QACA;CACA,6BAA6B,IAAI,MAAM,MAAM;AAC/C;AAEA,SAAgB,gCAAgC,MAAc;CAC5D,OAAO,6BAA6B,IAAI,IAAI,KAAK;AACnD;;;ACpBA,SAAgB,oBACd,OAC2B;CAC3B,OAAO;EACL,0BAAU,IAAI,IAAI;EAClB;CACF;AACF;AAEA,SAAgB,kBACd,MACA,KACA,aACA;CACA,IAAI,QAAQ,KAAK,SAAS,IAAI,GAAG;CAEjC,IAAI,CAAC,OAAO;EACV,QAAQ,oBAAgC,YAAY,CAAC;EACrD,KAAK,SAAS,IAAI,KAAK,KAAK;CAC9B;CAEA,OAAO;AACT;AAEA,SAAgB,wBACd,OAC+B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|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as symbol } from "./global-zaCE-g1C.js";
|
|
2
|
-
import {
|
|
2
|
+
import { s as CSS_CONFIG } from "./runtime-BKChZZ2-.js";
|
|
3
3
|
import { o as hashString } from "./css-CELBp6Gu.js";
|
|
4
|
-
import { t as DEV_CONFIG } from "./dev-
|
|
5
|
-
import { i as sanitizeDebugPropertyName, n as normalizePropertyName, t as normalizeDebugKeywordValue } from "./debug-
|
|
4
|
+
import { t as DEV_CONFIG } from "./dev-p8tW7X-A.js";
|
|
5
|
+
import { i as sanitizeDebugPropertyName, n as normalizePropertyName, t as normalizeDebugKeywordValue } from "./debug-D96KGgpH.js";
|
|
6
6
|
import { n as createNameFormatter, t as getIdentifierSafeHash } from "./hash-Bycpk3MR.js";
|
|
7
7
|
//#region builder/data/const.ts
|
|
8
8
|
const BUILDER_TYPE = symbol("builder.type");
|
|
@@ -260,4 +260,4 @@ function getCallsiteHash(callsite, localClassName) {
|
|
|
260
260
|
//#endregion
|
|
261
261
|
export { BUILDER_SCOPE_ID as _, getSelectorText as a, BUILDER_TYPE as b, getSlotId as c, isSlotData as d, isSlotOverrideData as f, BUILDER_SCOPE as g, BUILDER_CALLSITE as h, getSelectorPriority as i, isScopeData as l, isThemeData as m, getClassNameDedupe as n, getScopeTargetScope as o, isStyleData as p, getScopeClassName as r, getScopeTargetSlotId as s, getAtomicClassName as t, isScopeTargetData as u, BUILDER_SLOT_ID as v, BUILDER_STATE as y };
|
|
262
262
|
|
|
263
|
-
//# sourceMappingURL=className-
|
|
263
|
+
//# sourceMappingURL=className-ZJ5pBA-o.js.map
|