@fluentic/style 0.1.0-beta.4 → 0.1.0-beta.5
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 +42 -1
- package/README.md +10 -9
- package/atomic/className.ts +10 -4
- package/atomic/debug/className/className.ts +10 -0
- package/atomic/rule.ts +6 -3
- package/atomic/utils/selector.ts +14 -1
- package/builder/classname/class_name_builder.ts +68 -24
- package/builder/classname/fns.ts +2 -2
- package/builder/classname/types.ts +7 -0
- package/builder/data/const.ts +6 -0
- package/builder/data/create.ts +42 -0
- package/builder/data/data.ts +20 -1
- package/builder/data/index.ts +0 -1
- package/builder/data/is.ts +23 -0
- package/builder/data/merge/scope.ts +20 -19
- package/builder/data/merge/style.ts +70 -20
- package/builder/data/state.ts +16 -2
- package/builder/extract/index.ts +1 -0
- package/builder/extract/sheet.ts +26 -0
- package/builder/extract/utils.ts +2 -0
- package/builder/extract/withTokens.ts +2 -1
- package/builder/selector_override.noop.ts +11 -0
- package/builder/selector_override.ts +30 -0
- package/builder/selector_override_core.ts +66 -0
- package/builder/style_builder.ts +127 -3
- package/builder/style_data.ts +24 -0
- package/builder/style_fns.ts +24 -24
- package/builder/types/alias.ts +34 -6
- package/builder/types/fns.ts +13 -5
- package/builder/types/types.ts +32 -2
- package/builder/utils.ts +1 -0
- package/compiler/compiler/compiler.ts +4 -7
- package/compiler/compiler/constants.ts +6 -0
- package/compiler/compiler/index.ts +1 -0
- package/compiler/compiler/types.ts +2 -0
- package/compiler/cssProp.ts +35 -0
- package/compiler/index.ts +1 -0
- package/compiler/transform/cssProp/index.ts +1 -0
- package/compiler/transform/cssProp/plugin.ts +129 -0
- package/compiler/transform/debug/plugin.ts +6 -0
- package/compiler/transform/debug/transform.ts +2 -1
- package/compiler/transform/evaluator/evaluator.ts +32 -4
- package/compiler/transform/evaluator/tracer.ts +30 -2
- package/compiler/transform/extract/chain/chain.ts +540 -62
- package/compiler/transform/extract/chain/extract_chain.ts +12 -4
- package/compiler/transform/extract/chain/types.ts +1 -1
- package/compiler/transform/extract/plugin.ts +20 -4
- package/compiler/transform/extract/transform.ts +2 -1
- package/compiler/transform/extract/utils/replacement.ts +47 -2
- package/compiler/transform/extract/utils/state.ts +2 -0
- package/compiler/transform/index.ts +1 -0
- package/compiler/transform/syntax/isStaticStyleValue.ts +15 -9
- package/compiler/utils/constants.ts +8 -1
- package/compiler/utils/imports.ts +11 -1
- package/config/config/css.ts +1 -0
- package/css/index.ts +2 -0
- package/css/sheet.ts +119 -0
- package/css/styleTarget.ts +251 -0
- package/dist/adapter/preact.js +2 -0
- package/dist/adapter/react.js +2 -0
- package/dist/adapter/solid.js +2 -0
- package/dist/className-hiAsQ9V6.js +303 -0
- package/dist/className-hiAsQ9V6.js.map +1 -0
- package/dist/combine-Ca6LfFxv.js +1279 -0
- package/dist/combine-Ca6LfFxv.js.map +1 -0
- package/dist/compiler/index.mjs +2 -2
- package/dist/{compiler-CE0ZgkdH.mjs → compiler-OgDBuqfs.mjs} +1427 -546
- package/dist/compiler-OgDBuqfs.mjs.map +1 -0
- package/dist/config-B-KbXpIh.js +6 -0
- package/dist/{config-oKOjOTWi.js.map → config-B-KbXpIh.js.map} +1 -1
- package/dist/config-Barf8f4B.js +35 -0
- package/dist/config-Barf8f4B.js.map +1 -0
- package/dist/{config-lJNLh7eM.js → config-CsB4MuFI.js} +2 -2
- package/dist/{config-lJNLh7eM.js.map → config-CsB4MuFI.js.map} +1 -1
- package/dist/config-DOWSNV8w.js +1 -0
- package/dist/{config-CduqubI8.js → config-t76UljYv.js} +3 -3
- package/dist/config-t76UljYv.js.map +1 -0
- package/dist/createTransformElement-DDqld3RF.js +34 -0
- package/dist/createTransformElement-DDqld3RF.js.map +1 -0
- package/dist/css-CZwrac6F.js +3923 -0
- package/dist/css-CZwrac6F.js.map +1 -0
- package/dist/css-GtUPEO9U.js.map +1 -1
- package/dist/css-YfHN_8Nk.js +479 -0
- package/dist/css-YfHN_8Nk.js.map +1 -0
- package/dist/css-a9O5so0b.js +1246 -0
- package/dist/css-a9O5so0b.js.map +1 -0
- package/dist/css.js +2 -2
- package/dist/{css_extra-DYtS3g6Z.js → css_extra-CXXZAylc.js} +2 -2
- package/dist/{css_extra-DYtS3g6Z.js.map → css_extra-CXXZAylc.js.map} +1 -1
- package/dist/{data-D7NFt4JG.js → data-CzHJg147.js} +145 -59
- package/dist/data-CzHJg147.js.map +1 -0
- package/dist/{debug-Cvpo5cVu.js → debug-DkrxyknP.js} +80 -5
- package/dist/debug-DkrxyknP.js.map +1 -0
- package/dist/dev/rsc.js +5 -8
- package/dist/dev/rsc.js.map +1 -1
- package/dist/{dev-DdRWa6dJ.js → dev-z4laBwlS.js} +4 -4
- package/dist/{dev-DdRWa6dJ.js.map → dev-z4laBwlS.js.map} +1 -1
- package/dist/dev.js +1 -1
- package/dist/dialect/extracted/index.js +1 -1
- package/dist/dialect/index.js +1 -1
- package/dist/{elementMarker-ng0y3fN0.js → elementMarker-CqhU_l_m.js} +94 -8
- package/dist/elementMarker-CqhU_l_m.js.map +1 -0
- package/dist/entry/dev/adapter/preact.js +12 -0
- package/dist/entry/dev/adapter/preact.js.map +1 -0
- package/dist/entry/dev/adapter/react.js +12 -0
- package/dist/entry/dev/adapter/react.js.map +1 -0
- package/dist/entry/dev/adapter/solid.js +12 -0
- package/dist/entry/dev/adapter/solid.js.map +1 -0
- package/dist/entry/dev/css.js +3 -3
- package/dist/entry/dev/jsx-dev-runtime.js +2 -2
- package/dist/entry/dev/jsx-runtime.js +2 -2
- package/dist/entry/dev.js +10 -8
- package/dist/entry/prod/adapter/preact.js +12 -0
- package/dist/entry/prod/adapter/preact.js.map +1 -0
- package/dist/entry/prod/adapter/react.js +12 -0
- package/dist/entry/prod/adapter/react.js.map +1 -0
- package/dist/entry/prod/adapter/solid.js +12 -0
- package/dist/entry/prod/adapter/solid.js.map +1 -0
- package/dist/entry/prod/css.js +3 -3
- package/dist/entry/prod/extract.js +240 -3
- package/dist/entry/prod/extract.js.map +1 -0
- 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 +3 -5
- package/dist/entry/prod.js +84 -1229
- package/dist/entry/prod.js.map +1 -1
- package/dist/entry/rsc-dev/adapter/preact.js +12 -0
- package/dist/entry/rsc-dev/adapter/preact.js.map +1 -0
- package/dist/entry/rsc-dev/adapter/react.js +12 -0
- package/dist/entry/rsc-dev/adapter/react.js.map +1 -0
- package/dist/entry/rsc-dev/adapter/solid.js +12 -0
- package/dist/entry/rsc-dev/adapter/solid.js.map +1 -0
- package/dist/entry/rsc-dev/css.js +3 -3
- package/dist/entry/rsc-dev/dev.js +6 -10
- 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 +252 -750
- package/dist/entry/rsc-dev.js.map +1 -1
- package/dist/entry/rsc-prod/adapter/preact.js +2 -0
- package/dist/entry/rsc-prod/adapter/react.js +2 -0
- package/dist/entry/rsc-prod/adapter/solid.js +2 -0
- package/dist/entry/rsc-prod/css.js +9 -3
- package/dist/entry/rsc-prod/css.js.map +1 -0
- 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 +3 -5
- package/dist/entry/rsc-prod.js +236 -11
- package/dist/entry/rsc-prod.js.map +1 -1
- package/dist/{styleStore-CajcAEPO.js → env-Db2cRt-h.js} +1185 -162
- package/dist/env-Db2cRt-h.js.map +1 -0
- package/dist/{jsx-DL-DEAz8.js → getClassName-DKtQl5ZX.js} +5 -12
- package/dist/getClassName-DKtQl5ZX.js.map +1 -0
- package/dist/{utils-B_VhPBHH.js → getClassName-DaZF5nfJ.js} +28 -65
- package/dist/getClassName-DaZF5nfJ.js.map +1 -0
- package/dist/getClassName-a6p2uMFM.js +536 -0
- package/dist/getClassName-a6p2uMFM.js.map +1 -0
- package/dist/{getClassName-CrNVjAoJ.js → getClassName-aD9zqg9U.js} +31 -10
- package/dist/getClassName-aD9zqg9U.js.map +1 -0
- package/dist/global-zYTvWskP.js +10 -0
- package/dist/{global-CZBlA9E7.js.map → global-zYTvWskP.js.map} +1 -1
- package/dist/{hash-BfeJDf5U.js → hash-BOlQThNz.js} +37 -2
- package/dist/hash-BOlQThNz.js.map +1 -0
- package/dist/index.js +7 -6
- 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-C2pnWLcb.js +39 -0
- package/dist/jsx-C2pnWLcb.js.map +1 -0
- package/dist/{jsx_dev_runtime-aAhNYDeS.js → jsx_dev_runtime-kSrmu6b1.js} +2 -3
- package/dist/{jsx_dev_runtime-aAhNYDeS.js.map → jsx_dev_runtime-kSrmu6b1.js.map} +1 -1
- package/dist/{jsx_runtime-D7Y5up6H.js → jsx_runtime-BgK90E2O.js} +2 -3
- package/dist/{jsx_runtime-D7Y5up6H.js.map → jsx_runtime-BgK90E2O.js.map} +1 -1
- package/dist/{jsx_runtime-C6i1bWlu.js → jsx_runtime-XJSHujgI.js} +2 -2
- package/dist/{jsx_runtime-C6i1bWlu.js.map → jsx_runtime-XJSHujgI.js.map} +1 -1
- package/dist/{loader-BmYS_Rju.mjs → loader-DHvgp0fK.mjs} +3 -3
- package/dist/{loader-BmYS_Rju.mjs.map → loader-DHvgp0fK.mjs.map} +1 -1
- package/dist/{misc-BIS_c7BJ.mjs → misc-BuSLnvx0.mjs} +4 -4
- package/dist/misc-BuSLnvx0.mjs.map +1 -0
- package/dist/{namedTokens-CN_yhhik.js → namedTokens-D3tt-joz.js} +3 -3
- package/dist/{namedTokens-CN_yhhik.js.map → namedTokens-D3tt-joz.js.map} +1 -1
- package/dist/plugin/farm/index.mjs +4 -3
- package/dist/plugin/farm/index.mjs.map +1 -1
- package/dist/plugin/nextjs/index.mjs +5 -5
- package/dist/plugin/nextjs/index.mjs.map +1 -1
- package/dist/plugin/nextjs/loader.mjs +4 -4
- package/dist/plugin/parcel/index.cjs +2 -0
- package/dist/plugin/parcel/index.mjs +3 -1
- 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 +3 -2
- package/dist/plugin/rspack/index.mjs.map +1 -1
- package/dist/plugin/vite/index.mjs +6 -6
- package/dist/plugin/vite/index.mjs.map +1 -1
- package/dist/plugin/webpack/index.mjs +3 -2
- package/dist/plugin/webpack/loader.mjs +2 -2
- package/dist/presets/tailwind/index.js +3 -4
- package/dist/presets/tailwind/index.js.map +1 -1
- package/dist/{assert-BGdigdr5.js → presets-DSanixJV.js} +106 -2
- package/dist/presets-DSanixJV.js.map +1 -0
- package/dist/{registry-IaXmLQzA.mjs → registry-r3BKWqpI.mjs} +2 -2
- package/dist/{registry-IaXmLQzA.mjs.map → registry-r3BKWqpI.mjs.map} +1 -1
- package/dist/resolveClassNameRuntime-D5a37GNr.js +63 -0
- package/dist/resolveClassNameRuntime-D5a37GNr.js.map +1 -0
- package/dist/{rules-CxVzovt-.js → rules-B0_rKPfB.js} +583 -154
- package/dist/rules-B0_rKPfB.js.map +1 -0
- package/dist/{combine-C9vjpKCs.js → scope-BSuRLice.js} +239 -150
- package/dist/scope-BSuRLice.js.map +1 -0
- package/dist/selector/index.js +1 -2
- package/dist/server.js +12 -9
- package/dist/server.js.map +1 -1
- package/dist/{shared-CaJuvw03.cjs → shared-8_Msr7Q5.cjs} +1352 -466
- package/dist/shared-8_Msr7Q5.cjs.map +1 -0
- package/dist/{shared-DdPTZ0O3.mjs → shared-BGO_05rW.mjs} +4 -4
- package/dist/{shared-DdPTZ0O3.mjs.map → shared-BGO_05rW.mjs.map} +1 -1
- package/dist/sheet-BpLZIIuO.js +7 -0
- package/dist/{sheet-BWBzuy4D.js.map → sheet-BpLZIIuO.js.map} +1 -1
- package/dist/{sidecar-B3oCK9vC.mjs → sidecar-Bu2x35JE.mjs} +3 -3
- package/dist/{sidecar-B3oCK9vC.mjs.map → sidecar-Bu2x35JE.mjs.map} +1 -1
- package/dist/{styleStore-0fARJlZV.js → styleStore-BDy5TH6N.js} +3 -4
- package/dist/{styleStore-0fARJlZV.js.map → styleStore-BDy5TH6N.js.map} +1 -1
- package/dist/styleStore-DX3z_UVK.js +51 -0
- package/dist/styleStore-DX3z_UVK.js.map +1 -0
- package/dist/{token-D-S-4_mN.js → token-BsW_S8fN.js} +2 -2
- package/dist/{token-D-S-4_mN.js.map → token-BsW_S8fN.js.map} +1 -1
- package/dist/{trace-CFnhyCVf.js → trace-BdKEpgME.js} +2 -2
- package/dist/{trace-CFnhyCVf.js.map → trace-BdKEpgME.js.map} +1 -1
- package/dist/{trace-ZtgeY-8s.js → trace-DcuMxR45.js} +3 -3
- package/dist/{trace-ZtgeY-8s.js.map → trace-DcuMxR45.js.map} +1 -1
- package/dist/{style-CGaJndOl.js → types-BEUgXuu2.js} +268 -89
- package/dist/types-BEUgXuu2.js.map +1 -0
- package/dist/{utils-B5Xqf1lV.mjs → utils-BPDxr-oc.mjs} +4 -4
- package/dist/{utils-B5Xqf1lV.mjs.map → utils-BPDxr-oc.mjs.map} +1 -1
- package/dist/utils-CLnpwhJd.js +83 -0
- package/dist/utils-CLnpwhJd.js.map +1 -0
- package/dist/utils-CUl1BU40.js +72 -0
- package/dist/utils-CUl1BU40.js.map +1 -0
- package/dist/{utils-DaAiEEIG.mjs → utils-DZjLTV4D.mjs} +3 -3
- package/dist/{utils-DaAiEEIG.mjs.map → utils-DZjLTV4D.mjs.map} +1 -1
- package/dist/utils-okFWrQsg.js +41 -0
- package/dist/utils-okFWrQsg.js.map +1 -0
- package/dist/{utils-DzydRwYo.js → utils-sBVZEq4u.js} +141 -111
- package/dist/utils-sBVZEq4u.js.map +1 -0
- package/dist/utils.js +4 -4
- package/dist/utils.js.map +1 -1
- package/dist/value-CpJpQ00y.js +145 -0
- package/dist/value-CpJpQ00y.js.map +1 -0
- package/dist/{webpack-CHydnRXB.mjs → webpack-DTKgR-HY.mjs} +5 -5
- package/dist/webpack-DTKgR-HY.mjs.map +1 -0
- package/entry/dev/adapter/preact.ts +8 -0
- package/entry/dev/adapter/react.ts +8 -0
- package/entry/dev/adapter/solid.ts +8 -0
- package/entry/prod/adapter/preact.ts +8 -0
- package/entry/prod/adapter/react.ts +8 -0
- package/entry/prod/adapter/solid.ts +8 -0
- package/entry/rsc_dev/adapter/preact.ts +1 -0
- package/entry/rsc_dev/adapter/react.ts +1 -0
- package/entry/rsc_dev/adapter/solid.ts +1 -0
- package/entry/rsc_prod/adapter/preact.ts +1 -0
- package/entry/rsc_prod/adapter/react.ts +1 -0
- package/entry/rsc_prod/adapter/solid.ts +1 -0
- package/entry/shared/config_dev.ts +1 -1
- package/jsx/types/index.ts +3 -0
- package/jsx/types/preact.ts +14 -0
- package/jsx/{types.ts → types/react.ts} +2 -2
- package/jsx/types/solid.ts +32 -0
- package/package.json +78 -12
- package/plugin/bundler/farm/plugin.ts +2 -0
- package/plugin/bundler/parcel/plugin.ts +2 -0
- package/plugin/bundler/rspack/plugin.ts +1 -0
- package/plugin/bundler/vite/plugin.ts +3 -8
- package/plugin/bundler/vite/state.ts +2 -2
- package/plugin/bundler/webpack/plugin.ts +2 -1
- package/plugin/nextjs/plugin.ts +3 -0
- package/plugin/utils/compiler.ts +2 -0
- package/plugin/utils/runtimeEntry.ts +2 -2
- package/runtime/adapter/utils.ts +94 -0
- package/runtime/core/cache/combine.ts +33 -4
- package/runtime/core/cache/item.ts +31 -12
- package/runtime/core/cache/itemWithResolver.ts +44 -0
- package/runtime/core/cache/prop.ts +7 -6
- package/runtime/core/cache/result.ts +2 -2
- package/runtime/core/cache/stateItem.ts +16 -1
- package/runtime/core/combinedStyle.ts +4 -4
- package/runtime/extract/combineStyle.ts +179 -5
- package/runtime/extract/getClassName.ts +49 -6
- package/runtime/sheet/rule.ts +3 -10
- package/runtime/style/scope.ts +0 -24
- package/runtime/style/style.ts +179 -5
- package/runtime/types.ts +3 -3
- package/style/classname.ts +12 -6
- package/style/important.ts +19 -0
- package/style/index.ts +2 -0
- package/style/style.ts +16 -4
- package/style/types.ts +6 -4
- package/style/utils/expose.ts +4 -3
- package/style/weight.ts +21 -0
- package/dist/assert-BGdigdr5.js.map +0 -1
- package/dist/className-Do2Crx4b.js +0 -143
- package/dist/className-Do2Crx4b.js.map +0 -1
- package/dist/combine-C9vjpKCs.js.map +0 -1
- package/dist/combineStyle-DwAhsOmS.js +0 -26
- package/dist/combineStyle-DwAhsOmS.js.map +0 -1
- package/dist/compiler-CE0ZgkdH.mjs.map +0 -1
- package/dist/config-BE5D5x2N.js +0 -2
- package/dist/config-CduqubI8.js.map +0 -1
- package/dist/config-oKOjOTWi.js +0 -7
- package/dist/css-BewrRz3_.js +0 -243
- package/dist/css-BewrRz3_.js.map +0 -1
- package/dist/css-CiTI58yl.js +0 -1094
- package/dist/css-CiTI58yl.js.map +0 -1
- package/dist/css-Rc7ILf-3.js +0 -236
- package/dist/css-Rc7ILf-3.js.map +0 -1
- package/dist/cssIdent-BsyUXNNk.js +0 -38
- package/dist/cssIdent-BsyUXNNk.js.map +0 -1
- package/dist/cssVar-DGgQ2GIK.js +0 -92
- package/dist/cssVar-DGgQ2GIK.js.map +0 -1
- package/dist/data-D7NFt4JG.js.map +0 -1
- package/dist/debug-Cvpo5cVu.js.map +0 -1
- package/dist/dev-px0_6TNq.js +0 -81
- package/dist/dev-px0_6TNq.js.map +0 -1
- package/dist/elementMarker-ng0y3fN0.js.map +0 -1
- package/dist/extract-B-Vs88ME.js +0 -3
- package/dist/extract-CM8Fk2eK.js +0 -130
- package/dist/extract-CM8Fk2eK.js.map +0 -1
- package/dist/getClassName-CrNVjAoJ.js.map +0 -1
- package/dist/global-CZBlA9E7.js +0 -14
- package/dist/hash-BfeJDf5U.js.map +0 -1
- package/dist/jsx-BY1iFewe.js +0 -39
- package/dist/jsx-BY1iFewe.js.map +0 -1
- package/dist/jsx-DL-DEAz8.js.map +0 -1
- package/dist/layer-BSxAr-hy.js +0 -94
- package/dist/layer-BSxAr-hy.js.map +0 -1
- package/dist/misc-BIS_c7BJ.mjs.map +0 -1
- package/dist/presets-BhXa232U.js +0 -108
- package/dist/presets-BhXa232U.js.map +0 -1
- package/dist/property-BuLbzviK.js +0 -406
- package/dist/property-BuLbzviK.js.map +0 -1
- package/dist/rules-CxVzovt-.js.map +0 -1
- package/dist/selector-A-mRmMnI.js +0 -64
- package/dist/selector-A-mRmMnI.js.map +0 -1
- package/dist/shared-CaJuvw03.cjs.map +0 -1
- package/dist/sheet-BWBzuy4D.js +0 -7
- package/dist/style-CGaJndOl.js.map +0 -1
- package/dist/style-DDxjKdX0.js +0 -1891
- package/dist/style-DDxjKdX0.js.map +0 -1
- package/dist/style-S7LTQbRu.js +0 -5
- package/dist/styleStore-CajcAEPO.js.map +0 -1
- package/dist/symbols-Cp4ymzKF.js +0 -14
- package/dist/symbols-Cp4ymzKF.js.map +0 -1
- package/dist/utils-B_VhPBHH.js.map +0 -1
- package/dist/utils-CDUaX81o.js +0 -170
- package/dist/utils-CDUaX81o.js.map +0 -1
- package/dist/utils-DzydRwYo.js.map +0 -1
- package/dist/value-C0JRsyax.js +0 -64
- package/dist/value-C0JRsyax.js.map +0 -1
- package/dist/value-D08AocUs.js +0 -1053
- package/dist/value-D08AocUs.js.map +0 -1
- package/dist/valueRef-M3E1oza7.js +0 -16
- package/dist/valueRef-M3E1oza7.js.map +0 -1
- package/dist/webpack-CHydnRXB.mjs.map +0 -1
- package/dist/withTokens-DAzUIPvA.js +0 -95
- package/dist/withTokens-DAzUIPvA.js.map +0 -1
|
@@ -1098,6 +1098,8 @@ const BUILDER_CALLSITE = symbol("builder.callsite");
|
|
|
1098
1098
|
const BUILDER_SLOT_ID = symbol("builder.slotId");
|
|
1099
1099
|
const BUILDER_SCOPE_ID = symbol("builder.scopeId");
|
|
1100
1100
|
const BUILDER_SCOPE = symbol("builder.scope");
|
|
1101
|
+
symbol("builder.selector");
|
|
1102
|
+
const SHEET_SELECTOR_ANCHOR = "\0sheet";
|
|
1101
1103
|
//#endregion
|
|
1102
1104
|
//#region builder/data/is.ts
|
|
1103
1105
|
function getSlotId(data) {
|
|
@@ -1118,6 +1120,9 @@ function isSlotData(value) {
|
|
|
1118
1120
|
function isSlotOverrideData(value) {
|
|
1119
1121
|
return getBuilderType(value) === 3;
|
|
1120
1122
|
}
|
|
1123
|
+
function isSheetData(value) {
|
|
1124
|
+
return getBuilderType(value) === 9;
|
|
1125
|
+
}
|
|
1121
1126
|
function isScopeData(value) {
|
|
1122
1127
|
return getBuilderType(value) === 4;
|
|
1123
1128
|
}
|
|
@@ -1162,13 +1167,6 @@ function getStyleTokenName(token) {
|
|
|
1162
1167
|
}
|
|
1163
1168
|
symbol("style:token.debug");
|
|
1164
1169
|
globalData("style.token.idCounter", () => ({ value: 0 }));
|
|
1165
|
-
function getScopeClassName(className, scopeClassNameFormat) {
|
|
1166
|
-
return formatScopeClassName(scopeClassNameFormat || "-(className)", { className });
|
|
1167
|
-
}
|
|
1168
|
-
function formatScopeClassName(format, info) {
|
|
1169
|
-
if (typeof format === "function") return format(info);
|
|
1170
|
-
return format.replace(/\[|\]/g, "").replace(/\(className\)/g, info.className);
|
|
1171
|
-
}
|
|
1172
1170
|
//#endregion
|
|
1173
1171
|
//#region runtime/core/combinedStyle.ts
|
|
1174
1172
|
const targets = globalData("runtime.combinedStyle.targets", () => /* @__PURE__ */ new WeakMap());
|
|
@@ -1200,8 +1198,80 @@ function getResolvedStyleItemTokenValues(item) {
|
|
|
1200
1198
|
return resolvedStyleItemTokenValues.get(item) ?? null;
|
|
1201
1199
|
}
|
|
1202
1200
|
//#endregion
|
|
1203
|
-
//#region runtime/core/cache/
|
|
1204
|
-
|
|
1201
|
+
//#region runtime/core/cache/tokenValues.ts
|
|
1202
|
+
function createMutableTokenValues(base) {
|
|
1203
|
+
return {
|
|
1204
|
+
ids: base ? base.ids.slice() : null,
|
|
1205
|
+
values: base ? base.values.slice() : null,
|
|
1206
|
+
lookup: base ? { ...base.lookup } : null,
|
|
1207
|
+
index: base ? createTokenIndexLookup(base.ids) : null
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function addTokenOverride(values, item, resolver) {
|
|
1211
|
+
if (!resolver.is(item)) return false;
|
|
1212
|
+
addTokenValue(values, resolver.id(item), resolver.value(item));
|
|
1213
|
+
return true;
|
|
1214
|
+
}
|
|
1215
|
+
function addTokenValue(values, id, value) {
|
|
1216
|
+
if (!values.ids) values.ids = [];
|
|
1217
|
+
if (!values.values) values.values = [];
|
|
1218
|
+
if (!values.lookup) values.lookup = Object.create(null);
|
|
1219
|
+
if (!values.index) values.index = Object.create(null);
|
|
1220
|
+
const ids = values.ids;
|
|
1221
|
+
const tokenValues = values.values;
|
|
1222
|
+
const lookup = values.lookup;
|
|
1223
|
+
const indexLookup = values.index;
|
|
1224
|
+
const index = indexLookup[id];
|
|
1225
|
+
if (index === void 0) {
|
|
1226
|
+
indexLookup[id] = ids.push(id) - 1;
|
|
1227
|
+
tokenValues.push(value);
|
|
1228
|
+
} else tokenValues[index] = value;
|
|
1229
|
+
lookup[id] = value;
|
|
1230
|
+
}
|
|
1231
|
+
function addTokenValues(values, next) {
|
|
1232
|
+
if (!next) return;
|
|
1233
|
+
for (let i = 0, len = next.ids.length; i < len; i++) addTokenValue(values, next.ids[i], next.values[i]);
|
|
1234
|
+
}
|
|
1235
|
+
function addTokenOverrides(values, overrides, resolver) {
|
|
1236
|
+
for (let i = 0, len = overrides.length; i < len; i++) addTokenOverride(values, overrides[i], resolver);
|
|
1237
|
+
}
|
|
1238
|
+
function finishTokenValues(base, values) {
|
|
1239
|
+
if (!values.ids || !values.values || !values.lookup) return null;
|
|
1240
|
+
if (isSameTokenValues(base, values.ids, values.values)) return base;
|
|
1241
|
+
return {
|
|
1242
|
+
ids: values.ids,
|
|
1243
|
+
values: values.values,
|
|
1244
|
+
lookup: values.lookup
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
function mergeTokenValues(base, next) {
|
|
1248
|
+
if (!next) return base;
|
|
1249
|
+
if (!base) return next;
|
|
1250
|
+
const values = createMutableTokenValues(base);
|
|
1251
|
+
addTokenValues(values, next);
|
|
1252
|
+
return finishTokenValues(base, values);
|
|
1253
|
+
}
|
|
1254
|
+
function mergeTokenOverrides(base, overrides, resolver) {
|
|
1255
|
+
if (!overrides.length) return base;
|
|
1256
|
+
const values = createMutableTokenValues(base);
|
|
1257
|
+
addTokenOverrides(values, overrides, resolver);
|
|
1258
|
+
return finishTokenValues(base, values);
|
|
1259
|
+
}
|
|
1260
|
+
function createTokenIndexLookup(ids) {
|
|
1261
|
+
const lookup = Object.create(null);
|
|
1262
|
+
for (let i = 0, len = ids.length; i < len; i++) lookup[ids[i]] = i;
|
|
1263
|
+
return lookup;
|
|
1264
|
+
}
|
|
1265
|
+
function isSameTokenValues(base, ids, values) {
|
|
1266
|
+
if (!base || base.ids.length !== ids.length) return false;
|
|
1267
|
+
const baseLookup = base.lookup;
|
|
1268
|
+
for (let i = 0, len = ids.length; i < len; i++) {
|
|
1269
|
+
if (!hasOwn(baseLookup, ids[i])) return false;
|
|
1270
|
+
if (baseLookup[ids[i]] !== values[i]) return false;
|
|
1271
|
+
}
|
|
1272
|
+
return true;
|
|
1273
|
+
}
|
|
1274
|
+
globalData("runtime.directStyleItemCache", () => /* @__PURE__ */ new WeakMap());
|
|
1205
1275
|
function isResolvedStyleItem(value) {
|
|
1206
1276
|
return isResolvedStyleItem$1(value);
|
|
1207
1277
|
}
|
|
@@ -1217,14 +1287,6 @@ function createResolvedStyleItemFromItems(item, tokens) {
|
|
|
1217
1287
|
items: item.items
|
|
1218
1288
|
}, tokens);
|
|
1219
1289
|
}
|
|
1220
|
-
function getDirectStyleItem(item) {
|
|
1221
|
-
let cached = directStyleItemCache.get(item);
|
|
1222
|
-
if (!cached) {
|
|
1223
|
-
cached = createResolvedStyleItem(item, []);
|
|
1224
|
-
directStyleItemCache.set(item, cached);
|
|
1225
|
-
}
|
|
1226
|
-
return cached;
|
|
1227
|
-
}
|
|
1228
1290
|
function getStyleTokenValues(value) {
|
|
1229
1291
|
if (isCombinedStyle(value)) return getCombinedStyleTokens(value);
|
|
1230
1292
|
return getResolvedStyleItemTokenValues(value);
|
|
@@ -1244,11 +1306,14 @@ function resolveItems(data, scopes) {
|
|
|
1244
1306
|
items.push(item);
|
|
1245
1307
|
continue;
|
|
1246
1308
|
}
|
|
1247
|
-
if (isStyleTokenOverrideData(item))
|
|
1309
|
+
if (isStyleTokenOverrideData(item)) {
|
|
1310
|
+
items.push(item);
|
|
1311
|
+
continue;
|
|
1312
|
+
}
|
|
1248
1313
|
if (slotId && item.type !== 2) continue;
|
|
1249
1314
|
items.push(item);
|
|
1250
1315
|
}
|
|
1251
|
-
if (!slotId) return items;
|
|
1316
|
+
if (!slotId || isSheetData(data)) return items;
|
|
1252
1317
|
for (let i = 0, len = scopes.length; i < len; i++) {
|
|
1253
1318
|
const boundScope = scopes[i];
|
|
1254
1319
|
const scope = getScopeTargetScope(boundScope);
|
|
@@ -1273,13 +1338,33 @@ function resolveItems(data, scopes) {
|
|
|
1273
1338
|
return items;
|
|
1274
1339
|
}
|
|
1275
1340
|
function getScopeParentItem(className) {
|
|
1276
|
-
const parentClassName =
|
|
1341
|
+
const parentClassName = formatScopeClassName$1(className);
|
|
1277
1342
|
return [parentClassName, parentClassName];
|
|
1278
1343
|
}
|
|
1344
|
+
function formatScopeClassName$1(className) {
|
|
1345
|
+
const format = CSS_CONFIG.scopeClassNameFormat;
|
|
1346
|
+
if (!format) return "-" + className;
|
|
1347
|
+
if (typeof format === "function") return format({ className });
|
|
1348
|
+
return format.replace(/\[|\]/g, "").replace(/\(className\)/g, className);
|
|
1349
|
+
}
|
|
1279
1350
|
function isExtractedScopeParentMarker$1(value) {
|
|
1280
1351
|
return value === 1 || value === true;
|
|
1281
1352
|
}
|
|
1282
1353
|
//#endregion
|
|
1354
|
+
//#region runtime/core/cache/itemWithResolver.ts
|
|
1355
|
+
function createResolvedStyleItemWithResolver(data, tokens, resolver) {
|
|
1356
|
+
return createResolvedStyleItem(data, [], mergeTokenValues(getDataTokenValues(data, resolver), tokens));
|
|
1357
|
+
}
|
|
1358
|
+
function getDirectStyleItemWithResolver(item, resolver) {
|
|
1359
|
+
return createResolvedStyleItemWithResolver(item, null, resolver);
|
|
1360
|
+
}
|
|
1361
|
+
function getDataTokenValues(data, resolver) {
|
|
1362
|
+
const stateItems = data[BUILDER_STATE]?.items ?? [];
|
|
1363
|
+
const values = createMutableTokenValues(null);
|
|
1364
|
+
for (let i = 0, len = stateItems.length; i < len; i++) addTokenOverride(values, stateItems[i], resolver);
|
|
1365
|
+
return finishTokenValues(null, values);
|
|
1366
|
+
}
|
|
1367
|
+
//#endregion
|
|
1283
1368
|
//#region runtime/core/cache/utils/tree.ts
|
|
1284
1369
|
function createWeakCacheTreeNode(value) {
|
|
1285
1370
|
return {
|
|
@@ -1357,7 +1442,8 @@ function getTokenVarFallback(token, tokenNameFormat) {
|
|
|
1357
1442
|
function getStateItemDedupe(item) {
|
|
1358
1443
|
if (Array.isArray(item)) {
|
|
1359
1444
|
if (typeof item[0] === "number") switch (item[0]) {
|
|
1360
|
-
case 1:
|
|
1445
|
+
case 1:
|
|
1446
|
+
case 9: return item[1];
|
|
1361
1447
|
case 2:
|
|
1362
1448
|
case 3:
|
|
1363
1449
|
case 4: return item[2];
|
|
@@ -1371,7 +1457,8 @@ function getStateItemDedupe(item) {
|
|
|
1371
1457
|
function getStateItemClassName(item) {
|
|
1372
1458
|
if (Array.isArray(item)) {
|
|
1373
1459
|
if (typeof item[0] === "number") switch (item[0]) {
|
|
1374
|
-
case 1:
|
|
1460
|
+
case 1:
|
|
1461
|
+
case 9: return item[2];
|
|
1375
1462
|
case 2:
|
|
1376
1463
|
case 3:
|
|
1377
1464
|
case 4: return item[3];
|
|
@@ -1383,6 +1470,10 @@ function getStateItemClassName(item) {
|
|
|
1383
1470
|
return item.className;
|
|
1384
1471
|
}
|
|
1385
1472
|
function getStateItemVariableValue(item, tokens) {
|
|
1473
|
+
if (isStyleTokenOverrideData(item)) {
|
|
1474
|
+
const id = getStyleTokenId(item);
|
|
1475
|
+
return [getTokenVarName(item, CSS_CONFIG.tokenNameFormat ?? null), tokens && hasOwn(tokens.lookup, id) ? tokens.lookup[id] : getTokenOverrideValue(item, CSS_CONFIG.tokenNameFormat ?? null)];
|
|
1476
|
+
}
|
|
1386
1477
|
const value = getStateItemValue(item);
|
|
1387
1478
|
if (Array.isArray(value) && value[0] === 1) return [value[1], resolveMarkedVariableValue(value[2], value[3], tokens)];
|
|
1388
1479
|
if (!Array.isArray(item) && !isStyleTokenOverrideData(item) && item.variable?.[0] === 1) return [item.variable[1], resolveMarkedVariableValue(item.variable[2], item.variable[3], tokens)];
|
|
@@ -1422,7 +1513,8 @@ function getStateItemAtRuleRefVariables(item, tokens) {
|
|
|
1422
1513
|
}
|
|
1423
1514
|
function getStateItemValue(item) {
|
|
1424
1515
|
if (Array.isArray(item)) if (typeof item[0] === "number") switch (item[0]) {
|
|
1425
|
-
case 1:
|
|
1516
|
+
case 1:
|
|
1517
|
+
case 9: return item[3];
|
|
1426
1518
|
case 2:
|
|
1427
1519
|
case 3: return item[4];
|
|
1428
1520
|
case 4: return isExtractedScopeParentMarker(item[4]) ? void 0 : item[4];
|
|
@@ -1467,7 +1559,7 @@ function createStylePropResult(items, getThemeClassName) {
|
|
|
1467
1559
|
const stateItems = item.items;
|
|
1468
1560
|
for (let j = 0, itemLen = stateItems.length; j < itemLen; j++) style = addItem(classNames, style, stateItems[j], tokens);
|
|
1469
1561
|
}
|
|
1470
|
-
if (!classNames.length) return emptyStylePropResult;
|
|
1562
|
+
if (!classNames.length && !style) return emptyStylePropResult;
|
|
1471
1563
|
return {
|
|
1472
1564
|
className: classNames.join(" "),
|
|
1473
1565
|
style
|
|
@@ -1476,7 +1568,7 @@ function createStylePropResult(items, getThemeClassName) {
|
|
|
1476
1568
|
function addItem(classNames, style, item, tokens) {
|
|
1477
1569
|
const dedupe = getStateItemDedupe(item);
|
|
1478
1570
|
const className = getStateItemClassName(item);
|
|
1479
|
-
if (!dedupe || !className) return style;
|
|
1571
|
+
if (!dedupe || !className) return addItemStyle(style, item, tokens);
|
|
1480
1572
|
if (dedupeRun[dedupe] === runId) {
|
|
1481
1573
|
classNames[dedupeIndex[dedupe]] = className;
|
|
1482
1574
|
return addItemStyle(style, item, tokens);
|
|
@@ -1513,80 +1605,6 @@ const runtimeTokenValueResolver = {
|
|
|
1513
1605
|
}
|
|
1514
1606
|
};
|
|
1515
1607
|
//#endregion
|
|
1516
|
-
//#region runtime/core/cache/tokenValues.ts
|
|
1517
|
-
function createMutableTokenValues(base) {
|
|
1518
|
-
return {
|
|
1519
|
-
ids: base ? base.ids.slice() : null,
|
|
1520
|
-
values: base ? base.values.slice() : null,
|
|
1521
|
-
lookup: base ? { ...base.lookup } : null,
|
|
1522
|
-
index: base ? createTokenIndexLookup(base.ids) : null
|
|
1523
|
-
};
|
|
1524
|
-
}
|
|
1525
|
-
function addTokenOverride(values, item, resolver) {
|
|
1526
|
-
if (!resolver.is(item)) return false;
|
|
1527
|
-
addTokenValue(values, resolver.id(item), resolver.value(item));
|
|
1528
|
-
return true;
|
|
1529
|
-
}
|
|
1530
|
-
function addTokenValue(values, id, value) {
|
|
1531
|
-
if (!values.ids) values.ids = [];
|
|
1532
|
-
if (!values.values) values.values = [];
|
|
1533
|
-
if (!values.lookup) values.lookup = Object.create(null);
|
|
1534
|
-
if (!values.index) values.index = Object.create(null);
|
|
1535
|
-
const ids = values.ids;
|
|
1536
|
-
const tokenValues = values.values;
|
|
1537
|
-
const lookup = values.lookup;
|
|
1538
|
-
const indexLookup = values.index;
|
|
1539
|
-
const index = indexLookup[id];
|
|
1540
|
-
if (index === void 0) {
|
|
1541
|
-
indexLookup[id] = ids.push(id) - 1;
|
|
1542
|
-
tokenValues.push(value);
|
|
1543
|
-
} else tokenValues[index] = value;
|
|
1544
|
-
lookup[id] = value;
|
|
1545
|
-
}
|
|
1546
|
-
function addTokenValues(values, next) {
|
|
1547
|
-
if (!next) return;
|
|
1548
|
-
for (let i = 0, len = next.ids.length; i < len; i++) addTokenValue(values, next.ids[i], next.values[i]);
|
|
1549
|
-
}
|
|
1550
|
-
function addTokenOverrides(values, overrides, resolver) {
|
|
1551
|
-
for (let i = 0, len = overrides.length; i < len; i++) addTokenOverride(values, overrides[i], resolver);
|
|
1552
|
-
}
|
|
1553
|
-
function finishTokenValues(base, values) {
|
|
1554
|
-
if (!values.ids || !values.values || !values.lookup) return null;
|
|
1555
|
-
if (isSameTokenValues(base, values.ids, values.values)) return base;
|
|
1556
|
-
return {
|
|
1557
|
-
ids: values.ids,
|
|
1558
|
-
values: values.values,
|
|
1559
|
-
lookup: values.lookup
|
|
1560
|
-
};
|
|
1561
|
-
}
|
|
1562
|
-
function mergeTokenValues(base, next) {
|
|
1563
|
-
if (!next) return base;
|
|
1564
|
-
if (!base) return next;
|
|
1565
|
-
const values = createMutableTokenValues(base);
|
|
1566
|
-
addTokenValues(values, next);
|
|
1567
|
-
return finishTokenValues(base, values);
|
|
1568
|
-
}
|
|
1569
|
-
function mergeTokenOverrides(base, overrides, resolver) {
|
|
1570
|
-
if (!overrides.length) return base;
|
|
1571
|
-
const values = createMutableTokenValues(base);
|
|
1572
|
-
addTokenOverrides(values, overrides, resolver);
|
|
1573
|
-
return finishTokenValues(base, values);
|
|
1574
|
-
}
|
|
1575
|
-
function createTokenIndexLookup(ids) {
|
|
1576
|
-
const lookup = Object.create(null);
|
|
1577
|
-
for (let i = 0, len = ids.length; i < len; i++) lookup[ids[i]] = i;
|
|
1578
|
-
return lookup;
|
|
1579
|
-
}
|
|
1580
|
-
function isSameTokenValues(base, ids, values) {
|
|
1581
|
-
if (!base || base.ids.length !== ids.length) return false;
|
|
1582
|
-
const baseLookup = base.lookup;
|
|
1583
|
-
for (let i = 0, len = ids.length; i < len; i++) {
|
|
1584
|
-
if (!hasOwn(baseLookup, ids[i])) return false;
|
|
1585
|
-
if (baseLookup[ids[i]] !== values[i]) return false;
|
|
1586
|
-
}
|
|
1587
|
-
return true;
|
|
1588
|
-
}
|
|
1589
|
-
//#endregion
|
|
1590
1608
|
//#region runtime/core/cache/utils/walk.ts
|
|
1591
1609
|
function walkRecursiveItems(root, fn) {
|
|
1592
1610
|
if (!root) return;
|
|
@@ -1687,11 +1705,11 @@ function normalizeStylePropItem(item, stableTokenBound) {
|
|
|
1687
1705
|
const bound = getExtractedTokenBoundData(item);
|
|
1688
1706
|
if (stableTokenBound) return normalizeStylePropItem(bound.data, true);
|
|
1689
1707
|
const tokens = mergeTokenOverrides(null, bound.tokens, runtimeTokenValueResolver);
|
|
1690
|
-
if (isStyleData(bound.data) || isSlotData(bound.data)) return
|
|
1708
|
+
if (isStyleData(bound.data) || isSheetData(bound.data) || isSlotData(bound.data)) return createResolvedStyleItemWithResolver(bound.data, tokens, runtimeTokenValueResolver);
|
|
1691
1709
|
return normalizeStylePropItem(bound.data, false);
|
|
1692
1710
|
}
|
|
1693
1711
|
if (isResolvedStyleItem(item) || isThemeData(item)) return item;
|
|
1694
|
-
if (isStyleData(item) || isSlotData(item)) return
|
|
1712
|
+
if (isStyleData(item) || isSheetData(item) || isSlotData(item)) return getDirectStyleItemWithResolver(item, runtimeTokenValueResolver);
|
|
1695
1713
|
return null;
|
|
1696
1714
|
}
|
|
1697
1715
|
function getStylePropCacheKey(item, tokenBindings) {
|
|
@@ -1705,7 +1723,7 @@ function getStylePropCacheKey(item, tokenBindings) {
|
|
|
1705
1723
|
});
|
|
1706
1724
|
return key;
|
|
1707
1725
|
}
|
|
1708
|
-
if (isResolvedStyleItem(item) || isThemeData(item) || isStyleData(item) || isSlotData(item)) return item;
|
|
1726
|
+
if (isResolvedStyleItem(item) || isThemeData(item) || isStyleData(item) || isSheetData(item) || isSlotData(item)) return item;
|
|
1709
1727
|
return null;
|
|
1710
1728
|
}
|
|
1711
1729
|
function getThemeClassName(item) {
|
|
@@ -2190,15 +2208,28 @@ function getPropertyPriority(property) {
|
|
|
2190
2208
|
function getCssPropertyName(property) {
|
|
2191
2209
|
return property.replace(/^(webkit|moz|ms|o)([A-Z])/g, (_, prefix, c) => `-${prefix}-${c.toLowerCase()}`).replace(/[A-Z]/g, (c) => "-" + c.toLowerCase());
|
|
2192
2210
|
}
|
|
2211
|
+
function getScopeClassName(className, scopeClassNameFormat) {
|
|
2212
|
+
return formatScopeClassName(scopeClassNameFormat || "-(className)", { className });
|
|
2213
|
+
}
|
|
2214
|
+
function formatScopeClassName(format, info) {
|
|
2215
|
+
if (typeof format === "function") return format(info);
|
|
2216
|
+
return format.replace(/\[|\]/g, "").replace(/\(className\)/g, info.className);
|
|
2217
|
+
}
|
|
2193
2218
|
//#endregion
|
|
2194
2219
|
//#region atomic/utils/selector.ts
|
|
2195
2220
|
function getSelectorText(selector) {
|
|
2196
|
-
return Array.isArray(selector) ? selector[0] : selector;
|
|
2221
|
+
return stripSheetSelectorAnchor(Array.isArray(selector) ? selector[0] : selector);
|
|
2197
2222
|
}
|
|
2198
2223
|
function getSelectorPriority(selector) {
|
|
2199
2224
|
if (!selector) return 0;
|
|
2200
2225
|
return Array.isArray(selector) ? selector[1] : 0;
|
|
2201
2226
|
}
|
|
2227
|
+
function hasSheetSelectorAnchor(selector) {
|
|
2228
|
+
return (selector ? Array.isArray(selector) ? selector[0] : selector : "").startsWith(SHEET_SELECTOR_ANCHOR);
|
|
2229
|
+
}
|
|
2230
|
+
function stripSheetSelectorAnchor(selector) {
|
|
2231
|
+
return selector.startsWith("\0sheet") ? selector.slice(6) : selector;
|
|
2232
|
+
}
|
|
2202
2233
|
//#endregion
|
|
2203
2234
|
//#region atomic/value/unitless.ts
|
|
2204
2235
|
const UnitlessProperties = [
|
|
@@ -2262,10 +2293,11 @@ function shouldAppendCssPx(property) {
|
|
|
2262
2293
|
}
|
|
2263
2294
|
//#endregion
|
|
2264
2295
|
//#region atomic/rule.ts
|
|
2265
|
-
function buildAtomicRule(className, property, value, selector, parentSelector, atRules, scopeClassNameFormat) {
|
|
2296
|
+
function buildAtomicRule(className, property, value, important, selector, parentSelector, atRules, scopeClassNameFormat) {
|
|
2266
2297
|
const cssProp = getCssPropertyName(property);
|
|
2267
|
-
const cssValue = getCssPropertyValue(property, value);
|
|
2268
|
-
const
|
|
2298
|
+
const cssValue = getCssPropertyValue(property, value) + (important ? " !important" : "");
|
|
2299
|
+
const escapedClass = escapeCssIdent(className);
|
|
2300
|
+
const classSelector = hasSheetSelectorAnchor(selector) ? `:where(.${escapedClass})` : "." + escapedClass;
|
|
2269
2301
|
const itemSelector = selector ? getSelectorText(selector) : "";
|
|
2270
2302
|
let selectorStr = classSelector + itemSelector;
|
|
2271
2303
|
if (parentSelector) {
|
|
@@ -2316,11 +2348,9 @@ function createRuntimeSheetRules(item) {
|
|
|
2316
2348
|
if (Array.isArray(item)) return null;
|
|
2317
2349
|
if (isStyleTokenOverrideData(item)) return null;
|
|
2318
2350
|
const runtimeItem = item;
|
|
2319
|
-
const value = Array.isArray(runtimeItem.value) ? runtimeItem.value[0] : runtimeItem.value;
|
|
2320
|
-
const priority = Array.isArray(runtimeItem.value) ? runtimeItem.value[1] : null;
|
|
2321
2351
|
const parentSelector = runtimeItem.type === 4 ? runtimeItem.parentSelector : null;
|
|
2322
|
-
const layerPriority = getAtomicRuleLayerPriority(runtimeItem.property,
|
|
2323
|
-
const ruleCss = buildAtomicRule(runtimeItem.className, runtimeItem.property, value, runtimeItem.selector, parentSelector, runtimeItem.atRule, CSS_CONFIG.scopeClassNameFormat || null);
|
|
2352
|
+
const layerPriority = getAtomicRuleLayerPriority(runtimeItem.property, runtimeItem.weight, runtimeItem.selector, parentSelector, runtimeItem.atRule, runtimeItem.type === 4);
|
|
2353
|
+
const ruleCss = buildAtomicRule(runtimeItem.className, runtimeItem.property, runtimeItem.value, runtimeItem.important, runtimeItem.selector, parentSelector, runtimeItem.atRule, CSS_CONFIG.scopeClassNameFormat || null);
|
|
2324
2354
|
const rule = {
|
|
2325
2355
|
key: runtimeItem.className,
|
|
2326
2356
|
dedupe: runtimeItem.dedupe,
|
|
@@ -2511,4 +2541,4 @@ function createJsx(fn, transformElement) {
|
|
|
2511
2541
|
//#endregion
|
|
2512
2542
|
export { transformElement as a, wrapFragment as i, createJsxDEV as n, wrapCreateElement as r, createJsx as t };
|
|
2513
2543
|
|
|
2514
|
-
//# sourceMappingURL=utils-
|
|
2544
|
+
//# sourceMappingURL=utils-sBVZEq4u.js.map
|