@fluentic/style 0.1.0-beta.13 → 0.1.0-beta.15
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 +22 -0
- package/README.md +3 -2
- package/atomic/className.ts +4 -0
- package/atomic/rule.ts +15 -7
- package/atomic/token.ts +10 -1
- package/atomic/utils/selector.ts +12 -3
- package/builder/classname/class_name_builder.ts +1 -1
- package/builder/data/const.ts +2 -0
- package/builder/data/data.ts +1 -1
- package/builder/data/merge/scope.ts +7 -0
- package/builder/data/merge/style.ts +12 -3
- package/builder/data/state.ts +1 -0
- package/builder/extract/token.ts +10 -0
- package/builder/selector_override.ts +1 -1
- package/builder/selector_override_core.ts +17 -3
- package/builder/types/alias.ts +1 -1
- package/compiler/extract/extract.ts +21 -75
- package/compiler/extract/types.ts +4 -1
- package/compiler/transform/debug/plugin.ts +22 -0
- package/compiler/transform/evaluator/evaluator.ts +87 -10
- package/compiler/transform/evaluator/tracer.ts +4 -0
- package/compiler/transform/extract/chain/chain.ts +82 -22
- package/compiler/transform/extract/chain/extract_chain.ts +2 -0
- package/compiler/transform/extract/plugin.ts +81 -29
- package/compiler/transform/extract/utils/imports.ts +8 -1
- package/compiler/transform/extract/utils/replacement.ts +17 -5
- package/compiler/transform/extract/utils/state.ts +2 -0
- package/compiler/transform/extract/utils/token.ts +107 -0
- package/compiler/transform/utils/babel.ts +1 -1
- package/compiler/utils/constants.ts +2 -0
- package/config/config/css.ts +5 -3
- package/config/configure.ts +4 -0
- package/config/document.ts +23 -0
- package/css/globalSheet.ts +66 -0
- package/css/index.ts +4 -1
- package/css/sheet.ts +34 -14
- package/dialect/namedTokens.ts +13 -8
- package/dist/{className-yhJCGT0F.js → className-CC5PHcXI.js} +9 -2
- package/dist/className-CC5PHcXI.js.map +1 -0
- package/dist/{combine-yuoQ_qpx.js → combine-BpOQWCtM.js} +5 -5
- package/dist/combine-BpOQWCtM.js.map +1 -0
- package/dist/compiler/index.mjs +1 -1
- package/dist/{compiler-BEHxZYjz.mjs → compiler-AOb_VaKQ.mjs} +626 -188
- package/dist/compiler-AOb_VaKQ.mjs.map +1 -0
- package/dist/config/index.js +2 -2
- package/dist/{config-B5nEd-TV.js → config-B70LIQhi.js} +2 -2
- package/dist/{config-B5nEd-TV.js.map → config-B70LIQhi.js.map} +1 -1
- package/dist/{config-BWGBkVrM.js → config-BF-mxuPk.js} +4 -4
- package/dist/{config-BWGBkVrM.js.map → config-BF-mxuPk.js.map} +1 -1
- package/dist/config-B_OQYZSm.js +57 -0
- package/dist/config-B_OQYZSm.js.map +1 -0
- package/dist/{css-BQRIvzwZ.js → css-C7tcD3IO.js} +615 -213
- package/dist/css-C7tcD3IO.js.map +1 -0
- package/dist/css-Cdxkur4h.js +414 -0
- package/dist/css-Cdxkur4h.js.map +1 -0
- package/dist/{css-p_5ZNny_.js → css-RohOR3Vq.js} +112 -73
- package/dist/css-RohOR3Vq.js.map +1 -0
- package/dist/css.js +2 -2
- package/dist/css_extra-BC1Z_hDy.js +8 -0
- package/dist/{css_extra-DuVzUIYx.js.map → css_extra-BC1Z_hDy.js.map} +1 -1
- package/dist/{css_extra-DuVzUIYx.js → css_extra-CuzJtAR_.js} +2 -2
- package/dist/css_extra-CuzJtAR_.js.map +1 -0
- package/dist/{data-QXDBLlWs.js → data-Bw3Xod5J.js} +28 -20
- package/dist/data-Bw3Xod5J.js.map +1 -0
- package/dist/{debug-CkgcZDaX.js → debug-CVO3xx4C.js} +24 -3
- package/dist/debug-CVO3xx4C.js.map +1 -0
- package/dist/dev/rsc.js +134 -25
- package/dist/dev/rsc.js.map +1 -1
- package/dist/{dev-DocaGP3_.js → dev-BnQXPLQB.js} +6 -7
- package/dist/{dev-DocaGP3_.js.map → dev-BnQXPLQB.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-DZjd1NuA.js → elementMarker-BrHXg161.js} +334 -54
- package/dist/elementMarker-BrHXg161.js.map +1 -0
- package/dist/entry/dev/adapter/preact.js +1 -1
- package/dist/entry/dev/adapter/react.js +1 -1
- package/dist/entry/dev/adapter/solid.js +1 -1
- 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 +11 -11
- package/dist/entry/prod/adapter/preact.js +1 -1
- package/dist/entry/prod/adapter/react.js +1 -1
- package/dist/entry/prod/adapter/solid.js +1 -1
- package/dist/entry/prod/css.js +3 -3
- package/dist/entry/prod/extract.js +10 -1
- package/dist/entry/prod/extract.js.map +1 -1
- package/dist/entry/prod.js +3 -3
- package/dist/entry/rsc-dev/adapter/preact.js +1 -1
- package/dist/entry/rsc-dev/adapter/react.js +1 -1
- package/dist/entry/rsc-dev/adapter/solid.js +1 -1
- package/dist/entry/rsc-dev/css.js +4 -3
- package/dist/entry/rsc-dev/dev.js +129 -24
- package/dist/entry/rsc-dev/dev.js.map +1 -1
- package/dist/entry/rsc-dev/jsx-dev-runtime.js +5 -4
- package/dist/entry/rsc-dev/jsx-dev-runtime.js.map +1 -1
- package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
- package/dist/entry/rsc-dev.js +8 -7
- package/dist/entry/rsc-dev.js.map +1 -1
- package/dist/entry/rsc-prod/css.js +4 -4
- package/dist/entry/rsc-prod.js +14 -5
- package/dist/entry/rsc-prod.js.map +1 -1
- package/dist/{rules-znG9bsKI.js → env-D6daex-9.js} +64 -20
- package/dist/env-D6daex-9.js.map +1 -0
- package/dist/{getClassName-DtkplEIt.js → getClassName-5yYUibKw.js} +2 -2
- package/dist/{getClassName-DtkplEIt.js.map → getClassName-5yYUibKw.js.map} +1 -1
- package/dist/getClassName-9CsXbNls.js.map +1 -1
- package/dist/{getClassName-BIqt1S41.js → getClassName-B3azD1TO.js} +6 -4
- package/dist/getClassName-B3azD1TO.js.map +1 -0
- package/dist/{getClassName-BB_L7U_v.js → getClassName-m5DOkMFQ.js} +4 -5
- package/dist/{getClassName-BB_L7U_v.js.map → getClassName-m5DOkMFQ.js.map} +1 -1
- package/dist/global-DeIYtcdl.js +36 -0
- package/dist/global-DeIYtcdl.js.map +1 -0
- package/dist/{css-CGMAis1n.js → globalSheet-CdgVpvCb.js} +185 -426
- package/dist/globalSheet-CdgVpvCb.js.map +1 -0
- package/dist/{debug-0iaVEC7z.js → hash-DCJkLls_.js} +168 -6
- package/dist/hash-DCJkLls_.js.map +1 -0
- package/dist/index.js +9 -9
- package/dist/jsx/jsx-dev-runtime.js +1 -1
- package/dist/jsx/jsx-dev-runtime.server.js +3 -3
- package/dist/jsx/jsx-dev-runtime.server.js.map +1 -1
- package/dist/jsx/jsx-runtime.js +1 -1
- package/dist/jsx/jsx-runtime.server.js +4 -4
- package/dist/jsx/jsx-runtime.server.js.map +1 -1
- package/dist/{jsx-BCufpzdb.js → jsx-CvloSSpb.js} +4 -4
- package/dist/{jsx-BCufpzdb.js.map → jsx-CvloSSpb.js.map} +1 -1
- package/dist/jsx_runtime-pt7DOZOE.js +13 -0
- package/dist/jsx_runtime-pt7DOZOE.js.map +1 -0
- package/dist/{loader-vMHuD1zT.mjs → loader-fAuIjIik.mjs} +3 -3
- package/dist/{loader-vMHuD1zT.mjs.map → loader-fAuIjIik.mjs.map} +1 -1
- package/dist/{misc-9EGKYkZo.mjs → misc-CyZgGtc9.mjs} +3 -3
- package/dist/{misc-9EGKYkZo.mjs.map → misc-CyZgGtc9.mjs.map} +1 -1
- package/dist/{namedTokens-DnpyC5XT.js → namedTokens-DwgmUMBM.js} +13 -9
- package/dist/namedTokens-DwgmUMBM.js.map +1 -0
- package/dist/plugin/farm/index.mjs +3 -3
- package/dist/plugin/nextjs/index.mjs +4 -4
- package/dist/plugin/nextjs/loader.mjs +7 -5
- package/dist/plugin/nextjs/loader.mjs.map +1 -1
- package/dist/plugin/parcel/index.cjs +1 -1
- package/dist/plugin/parcel/index.mjs +2 -2
- 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 +2 -2
- package/dist/plugin/vite/index.mjs +3 -3
- package/dist/plugin/webpack/index.mjs +2 -2
- package/dist/plugin/webpack/loader.mjs +2 -2
- package/dist/presets/tailwind/index.js +3 -3
- package/dist/{registry-DVB7n6V-.mjs → registry-BMijh1CM.mjs} +2 -2
- package/dist/{registry-DVB7n6V-.mjs.map → registry-BMijh1CM.mjs.map} +1 -1
- package/dist/{resolveClassNameRuntime-DvH6j_4N.js → resolveClassNameRuntime-B6vKNL5y.js} +2 -2
- package/dist/{resolveClassNameRuntime-DvH6j_4N.js.map → resolveClassNameRuntime-B6vKNL5y.js.map} +1 -1
- package/dist/server.js +87 -17
- package/dist/server.js.map +1 -1
- package/dist/{shared-O-5Fcsxa.mjs → shared-BfASWZo1.mjs} +4 -4
- package/dist/{shared-O-5Fcsxa.mjs.map → shared-BfASWZo1.mjs.map} +1 -1
- package/dist/{shared-DaEDCb8I.cjs → shared-DY0kuBcN.cjs} +622 -184
- package/dist/shared-DY0kuBcN.cjs.map +1 -0
- package/dist/sheet-B-5idGtZ.js +9 -0
- package/dist/sheet-B-5idGtZ.js.map +1 -0
- package/dist/{config-Bqe8Y-4_.js → sheet-C6ymGhKV.js} +23 -2
- package/dist/sheet-C6ymGhKV.js.map +1 -0
- package/dist/sheet-D4f9KYPf.js +1 -0
- package/dist/{sidecar-DiYLwXbk.mjs → sidecar-cCzTDkzg.mjs} +3 -3
- package/dist/{sidecar-DiYLwXbk.mjs.map → sidecar-cCzTDkzg.mjs.map} +1 -1
- package/dist/{style-CtXEZqgx.js → style-a6ccye6R.js} +12 -13
- package/dist/style-a6ccye6R.js.map +1 -0
- package/dist/styleStore-Ceoaqa5U.js +45 -0
- package/dist/styleStore-Ceoaqa5U.js.map +1 -0
- package/dist/{env-DJyXPJ9q.js → styleStore-D1IEmq1v.js} +439 -63
- package/dist/styleStore-D1IEmq1v.js.map +1 -0
- package/dist/{token-DyLO6Hnf.js → token-Ci73NE6h.js} +5 -33
- package/dist/token-Ci73NE6h.js.map +1 -0
- package/dist/{trace-C1_6fM21.js → trace-DDsvwdF0.js} +3 -3
- package/dist/{trace-C1_6fM21.js.map → trace-DDsvwdF0.js.map} +1 -1
- package/dist/{trace-Bsh-Kkg_.js → trace-uHVvnYiw.js} +2 -2
- package/dist/{trace-Bsh-Kkg_.js.map → trace-uHVvnYiw.js.map} +1 -1
- package/dist/{transform-8TIMiF5A.js → transform-BkxIouPX.js} +2 -2
- package/dist/{transform-8TIMiF5A.js.map → transform-BkxIouPX.js.map} +1 -1
- package/dist/types/atomic/className.d.ts +2 -2
- package/dist/types/atomic/utils/selector.d.ts +2 -1
- package/dist/types/builder/data/const.d.ts +1 -0
- package/dist/types/builder/data/data.d.ts +1 -1
- package/dist/types/builder/data/merge/utils.d.ts +6 -1
- package/dist/types/builder/data/state.d.ts +17 -2
- package/dist/types/builder/extract/token.d.ts +6 -1
- package/dist/types/builder/selector_override.d.ts +1 -1
- package/dist/types/builder/selector_override_core.d.ts +2 -0
- package/dist/types/builder/style_fns.d.ts +1 -1
- package/dist/types/builder/types/alias.d.ts +2 -2
- package/dist/types/builder/utils.d.ts +1 -1
- package/dist/types/compiler/extract/types.d.ts +7 -1
- package/dist/types/compiler/transform/evaluator/evaluator.d.ts +18 -1
- package/dist/types/compiler/transform/extract/chain/extract_chain.d.ts +2 -0
- package/dist/types/compiler/transform/extract/utils/replacement.d.ts +2 -0
- package/dist/types/compiler/transform/extract/utils/state.d.ts +1 -0
- package/dist/types/compiler/transform/extract/utils/token.d.ts +3 -0
- package/dist/types/compiler/transform/utils/selector.d.ts +1 -1
- package/dist/types/compiler/utils/constants.d.ts +2 -0
- package/dist/types/compiler/utils/import_source.d.ts +8 -2
- package/dist/types/config/config/css.d.ts +2 -1
- package/dist/types/config/configure.d.ts +2 -0
- package/dist/types/config/document.d.ts +3 -0
- package/dist/types/css/globalSheet.d.ts +24 -0
- package/dist/types/css/index.d.ts +4 -1
- package/dist/types/css/sheet.d.ts +3 -2
- package/dist/types/entry/rsc_dev/css.d.ts +1 -0
- package/dist/types/plugin/bundler/farm/plugin.d.ts +8 -2
- package/dist/types/presets/tailwind/selectors.d.ts +24 -24
- package/dist/types/presets/tailwind/theme.d.ts +361 -361
- package/dist/types/runtime/core/cache/itemWithResolver.d.ts +1 -1
- package/dist/types/runtime/core/cache/stateItem.d.ts +8 -2
- package/dist/types/runtime/rsc/constants.d.ts +2 -0
- package/dist/types/runtime/rsc/dev.d.ts +5 -0
- package/dist/types/runtime/rsc/getClassName.d.ts +3 -0
- package/dist/types/runtime/rsc/globalSheet.d.ts +22 -0
- package/dist/types/runtime/rsc/observer.d.ts +5 -0
- package/dist/types/runtime/rsc/styleStore.d.ts +2 -0
- package/dist/types/runtime/sheet/document.d.ts +3 -0
- package/dist/types/runtime/types.d.ts +4 -1
- package/dist/types/selector/presets/default.d.ts +28 -28
- package/dist/types/selector/presets/minimal.d.ts +10 -10
- package/dist/types/selector/selector.d.ts +15 -2
- package/dist/types/sheet/ordered.d.ts +4 -0
- package/dist/types/sheet/ordering.d.ts +15 -0
- package/dist/types/sheet/types.d.ts +7 -0
- package/dist/types/style/important.d.ts +2 -1
- package/dist/types/style/style.d.ts +95 -95
- package/dist/{utils-BBN9msTv.mjs → utils-BO6Ix8t5.mjs} +4 -4
- package/dist/{utils-BBN9msTv.mjs.map → utils-BO6Ix8t5.mjs.map} +1 -1
- package/dist/{utils-DoKJnvxk.js → utils-CB70kIh6.js} +3 -3
- package/dist/{utils-DoKJnvxk.js.map → utils-CB70kIh6.js.map} +1 -1
- package/dist/{utils-Bjh9pO87.mjs → utils-EG9gh2g3.mjs} +3 -3
- package/dist/{utils-Bjh9pO87.mjs.map → utils-EG9gh2g3.mjs.map} +1 -1
- package/dist/{utils-10MTZOuB.js → utils-sG7IWYP6.js} +1091 -643
- package/dist/utils-sG7IWYP6.js.map +1 -0
- package/dist/utils.js +3 -3
- package/dist/{value-Dg6ALjjj.js → value-B-ThmbY-.js} +47 -6
- package/dist/value-B-ThmbY-.js.map +1 -0
- package/dist/{webpack-C1j49Psk.mjs → webpack-WXAJ3IYn.mjs} +5 -5
- package/dist/{webpack-C1j49Psk.mjs.map → webpack-WXAJ3IYn.mjs.map} +1 -1
- package/entry/dev/sheet.ts +4 -1
- package/entry/rsc_dev/css.ts +2 -0
- package/jsx/rsc/jsx_dev_runtime.ts +11 -2
- package/jsx/rsc/jsx_runtime.ts +14 -3
- package/package.json +5 -4
- package/plugin/nextjs/loader.ts +18 -2
- package/runtime/core/elementMarker.ts +9 -3
- package/runtime/extract/getClassName.ts +1 -1
- package/runtime/rsc/constants.ts +3 -0
- package/runtime/rsc/dev.ts +31 -15
- package/runtime/rsc/getClassName.ts +6 -0
- package/runtime/rsc/globalSheet.ts +130 -0
- package/runtime/rsc/observer.ts +118 -15
- package/runtime/rsc/styleStore.ts +12 -36
- package/runtime/sheet/document.ts +28 -0
- package/runtime/sheet/global-prod.ts +3 -5
- package/runtime/sheet/global.ts +3 -5
- package/runtime/sheet/rule.ts +4 -2
- package/runtime/sheet/rules.ts +3 -0
- package/sheet/dev/dev_sort.ts +5 -1
- package/sheet/dev/index.ts +23 -3
- package/sheet/ordered.ts +188 -0
- package/sheet/ordering.ts +138 -0
- package/sheet/prod.ts +17 -5
- package/sheet/types.ts +4 -0
- package/style/important.ts +3 -1
- package/style/style.ts +1 -1
- package/style/token.ts +2 -0
- package/utils/trace.ts +1 -0
- package/dist/className-yhJCGT0F.js.map +0 -1
- package/dist/combine-yuoQ_qpx.js.map +0 -1
- package/dist/compiler-BEHxZYjz.mjs.map +0 -1
- package/dist/config-Bqe8Y-4_.js.map +0 -1
- package/dist/config-DggQEE-4.js +0 -36
- package/dist/config-DggQEE-4.js.map +0 -1
- package/dist/createTransformElement-B2jSnugo.js +0 -34
- package/dist/createTransformElement-B2jSnugo.js.map +0 -1
- package/dist/css-BQRIvzwZ.js.map +0 -1
- package/dist/css-CGMAis1n.js.map +0 -1
- package/dist/css-D7eTqvMH.js +0 -57
- package/dist/css-D7eTqvMH.js.map +0 -1
- package/dist/css-p_5ZNny_.js.map +0 -1
- package/dist/data-QXDBLlWs.js.map +0 -1
- package/dist/debug-0iaVEC7z.js.map +0 -1
- package/dist/debug-CkgcZDaX.js.map +0 -1
- package/dist/elementMarker-DZjd1NuA.js.map +0 -1
- package/dist/env-DJyXPJ9q.js.map +0 -1
- package/dist/getClassName-BIqt1S41.js.map +0 -1
- package/dist/global-CBQGormL.js +0 -14
- package/dist/global-CBQGormL.js.map +0 -1
- package/dist/hash-Cr-LCWDt.js +0 -166
- package/dist/hash-Cr-LCWDt.js.map +0 -1
- package/dist/jsx_runtime-Bu_A8mr4.js +0 -12
- package/dist/jsx_runtime-Bu_A8mr4.js.map +0 -1
- package/dist/namedTokens-DnpyC5XT.js.map +0 -1
- package/dist/rules-znG9bsKI.js.map +0 -1
- package/dist/shared-DaEDCb8I.cjs.map +0 -1
- package/dist/sheet-SlZRjOmw.js +0 -7
- package/dist/sheet-SlZRjOmw.js.map +0 -1
- package/dist/style-CtXEZqgx.js.map +0 -1
- package/dist/styleStore-BImBZdt6.js +0 -57
- package/dist/styleStore-BImBZdt6.js.map +0 -1
- package/dist/styleStore-CBan0gHQ.js +0 -60
- package/dist/styleStore-CBan0gHQ.js.map +0 -1
- package/dist/token-DyLO6Hnf.js.map +0 -1
- package/dist/utils-10MTZOuB.js.map +0 -1
- package/dist/value-Dg6ALjjj.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SheetData, SlotData, StyleData } from "../../../builder/data/data.js";
|
|
2
2
|
import { type StyleTokenValues, type TokenValueResolver } from "./tokenValues.js";
|
|
3
3
|
export declare function createResolvedStyleItemWithResolver<Data extends StyleData | SheetData | SlotData>(data: Data, tokens: StyleTokenValues | null, resolver: TokenValueResolver): import("./item.js").ResolvedStyleItem<Data>;
|
|
4
|
-
export declare function getDirectStyleItemWithResolver(item: StyleData | SheetData | SlotData, resolver: TokenValueResolver): import("./item.js").ResolvedStyleItem<
|
|
4
|
+
export declare function getDirectStyleItemWithResolver(item: StyleData | SheetData | SlotData, resolver: TokenValueResolver): import("./item.js").ResolvedStyleItem<StyleData | SheetData | SlotData>;
|
|
@@ -3,6 +3,12 @@ import type { AtRuleRefData } from "../../../style/valueRef.js";
|
|
|
3
3
|
import type { StyleTokenValues } from "./tokenValues.js";
|
|
4
4
|
export declare function getStateItemDedupe(item: StateItem): string;
|
|
5
5
|
export declare function getStateItemClassName(item: StateItem): string;
|
|
6
|
-
export declare function getStateItemVariableValue(item: StateItem, tokens: StyleTokenValues | null): [
|
|
6
|
+
export declare function getStateItemVariableValue(item: StateItem, tokens: StyleTokenValues | null): [
|
|
7
|
+
string,
|
|
8
|
+
unknown
|
|
9
|
+
] | null;
|
|
7
10
|
export declare function getStateItemAtRuleRef(item: StateItem): AtRuleRefData | null;
|
|
8
|
-
export declare function getStateItemAtRuleRefVariables(item: StateItem, tokens: StyleTokenValues | null): [
|
|
11
|
+
export declare function getStateItemAtRuleRefVariables(item: StateItem, tokens: StyleTokenValues | null): [
|
|
12
|
+
string,
|
|
13
|
+
unknown
|
|
14
|
+
][] | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const GLOBAL_SEED_ATTR = "data-css-global-seed-dev";
|
|
2
|
+
export declare const GLOBAL_RULES_ATTR = "data-css-global-rules-dev";
|
|
1
3
|
export declare const ELEMENT_CSS_DATA_ATTR = "data-css-dev";
|
|
2
4
|
export declare const PRECOLLECT_LINK_TAG_ATTR = "data-fluentic-style-rsc-dev-link";
|
|
3
5
|
export declare const SEED_STYLE_TAG_ATTR = "data-fluentic-style-rsc-dev-style";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type StyleDevUtilsOptions } from "../../dev/index.js";
|
|
2
|
+
import type { GlobalRuleBatch } from "./globalSheet.js";
|
|
2
3
|
type StyleDevProps = StyleDevUtilsOptions & {
|
|
3
4
|
enableStyleDevUtils?: StyleDevUtilsOptions | boolean;
|
|
5
|
+
/** @internal Carries RSC request globals into Next's HTML renderer. */
|
|
6
|
+
globalRules?: GlobalRuleBatch[];
|
|
7
|
+
/** @internal Registers seed data without another observer or devtools instance. */
|
|
8
|
+
seedOnly?: boolean;
|
|
4
9
|
};
|
|
5
10
|
export declare function StyleDev(props: StyleDevProps): null;
|
|
6
11
|
export {};
|
|
@@ -11,6 +11,9 @@ export type RscStylePayloadRule = {
|
|
|
11
11
|
css: string;
|
|
12
12
|
priority?: LayerPriority | null;
|
|
13
13
|
important?: boolean;
|
|
14
|
+
importantNative?: boolean;
|
|
15
|
+
sheet?: boolean;
|
|
16
|
+
globalSheet?: SheetRule['globalSheet'];
|
|
14
17
|
layer?: SheetRule['layer'];
|
|
15
18
|
callsite?: SheetRule['callsite'];
|
|
16
19
|
debug?: DebugData | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentType, type ReactElement } from 'react';
|
|
2
|
+
import { createGlobalSheet as createClientGlobalSheet } from "../../css/globalSheet.js";
|
|
3
|
+
import type { SheetRule } from "../../sheet/index.js";
|
|
4
|
+
export type GlobalRuleBatch = {
|
|
5
|
+
owner: string;
|
|
6
|
+
revision: string;
|
|
7
|
+
rules: SheetRule[];
|
|
8
|
+
};
|
|
9
|
+
type SeedComponent = ComponentType<{
|
|
10
|
+
globalRules?: GlobalRuleBatch[];
|
|
11
|
+
seedOnly?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
/** Registered only by the Next loader, keeping the core RSC runtime framework-neutral. */
|
|
14
|
+
export declare function setGlobalSheetSeedComponent(component: SeedComponent): void;
|
|
15
|
+
export declare function resetGlobalSheetModule(filePath: string): void;
|
|
16
|
+
export declare const createGlobalSheet: typeof createClientGlobalSheet;
|
|
17
|
+
export declare function getGlobalRuleBatches(): GlobalRuleBatch[];
|
|
18
|
+
export declare function serializeGlobalRuleBatches(batches: GlobalRuleBatch[]): string;
|
|
19
|
+
export declare function GlobalSheetPayload(): import("react").FunctionComponentElement<import("react").FragmentProps> | null;
|
|
20
|
+
export declare function renderGlobalRuleBatches(batches: GlobalRuleBatch[]): import("react").FunctionComponentElement<import("react").FragmentProps> | null;
|
|
21
|
+
export declare function withGlobalSheetPayload(element: ReactElement, type: unknown): ReactElement;
|
|
22
|
+
export {};
|
|
@@ -3,3 +3,8 @@ export declare function startRscDevObserver(root?: ParentNode): void;
|
|
|
3
3
|
export declare function stopRscDevObserver(): void;
|
|
4
4
|
export declare function getRscDevInitialStyleSelector(): string;
|
|
5
5
|
export declare function parseRscStylePayload(value: string | null): SheetRule[];
|
|
6
|
+
export declare function parseGlobalRulePayload(value: string | null): Array<{
|
|
7
|
+
owner: string;
|
|
8
|
+
revision: string;
|
|
9
|
+
rules: SheetRule[];
|
|
10
|
+
}> | null;
|
|
@@ -2,4 +2,6 @@ import type { SheetRule } from "../../sheet/index.js";
|
|
|
2
2
|
export declare function addRscStyleRules(rules: SheetRule[]): void;
|
|
3
3
|
export declare function getRscStyleCssIfChanged(): string | null;
|
|
4
4
|
export declare function getRscStyleCss(): string;
|
|
5
|
+
export declare function getRscStyleRules(): readonly SheetRule[];
|
|
6
|
+
export declare function serializeRscRules(rules: readonly SheetRule[]): string;
|
|
5
7
|
export declare function clearRscStyleStore(): void;
|
|
@@ -17,7 +17,10 @@ export type RuntimeStyleAttributes = {
|
|
|
17
17
|
};
|
|
18
18
|
export type ElementDebugData = {
|
|
19
19
|
$$elementDebug: true;
|
|
20
|
-
loc: [
|
|
20
|
+
loc: [
|
|
21
|
+
line: number,
|
|
22
|
+
column: number
|
|
23
|
+
];
|
|
21
24
|
label: string;
|
|
22
25
|
sourceUrl: string;
|
|
23
26
|
code?: string;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
export declare const Selectors: {
|
|
2
|
-
media: import("../index.js").Selector<"@media $$", string>;
|
|
3
|
-
container: import("../index.js").Selector<"@container $$", string>;
|
|
4
|
-
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
5
|
-
attr: import("../index.js").Selector<"$", string>;
|
|
6
|
-
select: import("../index.js").Selector<"$$", string>;
|
|
7
|
-
merge: import("../index.js").Selector<"...", string>;
|
|
8
|
-
not: import("../index.js").Selector<":not($$)", string>;
|
|
9
|
-
is: import("../index.js").Selector<":is($$)", string>;
|
|
10
|
-
where: import("../index.js").Selector<":where($$)", string>;
|
|
11
|
-
has: import("../index.js").Selector<":has($$)", string>;
|
|
12
|
-
nthChild: import("../index.js").Selector<":nth-child($)", string>;
|
|
13
|
-
nthLastChild: import("../index.js").Selector<":nth-last-child($)", string>;
|
|
14
|
-
nthOfType: import("../index.js").Selector<":nth-of-type($)", string>;
|
|
15
|
-
nthLastOfType: import("../index.js").Selector<":nth-last-of-type($)", string>;
|
|
16
|
-
lang: import("../index.js").Selector<":lang($)", string>;
|
|
17
|
-
dir: import("../index.js").Selector<":dir($)", string>;
|
|
18
|
-
before: import("../index.js").Selector<"::before", string>;
|
|
19
|
-
after: import("../index.js").Selector<"::after", string>;
|
|
20
2
|
hover: import("../index.js").Selector<":hover", string>;
|
|
21
3
|
active: import("../index.js").Selector<":active", string>;
|
|
22
4
|
focus: import("../index.js").Selector<":focus", string>;
|
|
@@ -51,14 +33,8 @@ export declare const Selectors: {
|
|
|
51
33
|
onlyOfType: import("../index.js").Selector<":only-of-type", string>;
|
|
52
34
|
fullscreen: import("../index.js").Selector<":fullscreen", string>;
|
|
53
35
|
modal: import("../index.js").Selector<":modal", string>;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
media: import("../index.js").Selector<"@media $$", string>;
|
|
57
|
-
container: import("../index.js").Selector<"@container $$", string>;
|
|
58
|
-
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
59
|
-
attr: import("../index.js").Selector<"$", string>;
|
|
60
|
-
select: import("../index.js").Selector<"$$", string>;
|
|
61
|
-
merge: import("../index.js").Selector<"...", string>;
|
|
36
|
+
before: import("../index.js").Selector<"::before", string>;
|
|
37
|
+
after: import("../index.js").Selector<"::after", string>;
|
|
62
38
|
not: import("../index.js").Selector<":not($$)", string>;
|
|
63
39
|
is: import("../index.js").Selector<":is($$)", string>;
|
|
64
40
|
where: import("../index.js").Selector<":where($$)", string>;
|
|
@@ -69,8 +45,14 @@ export declare const PrioritySelectors: {
|
|
|
69
45
|
nthLastOfType: import("../index.js").Selector<":nth-last-of-type($)", string>;
|
|
70
46
|
lang: import("../index.js").Selector<":lang($)", string>;
|
|
71
47
|
dir: import("../index.js").Selector<":dir($)", string>;
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
attr: import("../index.js").Selector<"$", string>;
|
|
49
|
+
select: import("../index.js").Selector<"$$", string>;
|
|
50
|
+
merge: import("../index.js").Selector<"...", string>;
|
|
51
|
+
media: import("../index.js").Selector<"@media $$", string>;
|
|
52
|
+
container: import("../index.js").Selector<"@container $$", string>;
|
|
53
|
+
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
54
|
+
};
|
|
55
|
+
export declare const PrioritySelectors: {
|
|
74
56
|
hover: import("../index.js").Selector<":hover", string>;
|
|
75
57
|
active: import("../index.js").Selector<":active", string>;
|
|
76
58
|
focus: import("../index.js").Selector<":focus", string>;
|
|
@@ -105,4 +87,22 @@ export declare const PrioritySelectors: {
|
|
|
105
87
|
onlyOfType: import("../index.js").Selector<":only-of-type", string>;
|
|
106
88
|
fullscreen: import("../index.js").Selector<":fullscreen", string>;
|
|
107
89
|
modal: import("../index.js").Selector<":modal", string>;
|
|
90
|
+
before: import("../index.js").Selector<"::before", string>;
|
|
91
|
+
after: import("../index.js").Selector<"::after", string>;
|
|
92
|
+
not: import("../index.js").Selector<":not($$)", string>;
|
|
93
|
+
is: import("../index.js").Selector<":is($$)", string>;
|
|
94
|
+
where: import("../index.js").Selector<":where($$)", string>;
|
|
95
|
+
has: import("../index.js").Selector<":has($$)", string>;
|
|
96
|
+
nthChild: import("../index.js").Selector<":nth-child($)", string>;
|
|
97
|
+
nthLastChild: import("../index.js").Selector<":nth-last-child($)", string>;
|
|
98
|
+
nthOfType: import("../index.js").Selector<":nth-of-type($)", string>;
|
|
99
|
+
nthLastOfType: import("../index.js").Selector<":nth-last-of-type($)", string>;
|
|
100
|
+
lang: import("../index.js").Selector<":lang($)", string>;
|
|
101
|
+
dir: import("../index.js").Selector<":dir($)", string>;
|
|
102
|
+
attr: import("../index.js").Selector<"$", string>;
|
|
103
|
+
select: import("../index.js").Selector<"$$", string>;
|
|
104
|
+
merge: import("../index.js").Selector<"...", string>;
|
|
105
|
+
media: import("../index.js").Selector<"@media $$", string>;
|
|
106
|
+
container: import("../index.js").Selector<"@container $$", string>;
|
|
107
|
+
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
108
108
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const MinimalSelectors: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
2
|
+
before: import("../index.js").Selector<"::before", string>;
|
|
3
|
+
after: import("../index.js").Selector<"::after", string>;
|
|
5
4
|
attr: import("../index.js").Selector<"$", string>;
|
|
6
5
|
select: import("../index.js").Selector<"$$", string>;
|
|
7
6
|
merge: import("../index.js").Selector<"...", string>;
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
media: import("../index.js").Selector<"@media $$", string>;
|
|
8
|
+
container: import("../index.js").Selector<"@container $$", string>;
|
|
9
|
+
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
10
10
|
hover: import("../index.js").Selector<":hover", string>;
|
|
11
11
|
active: import("../index.js").Selector<":active", string>;
|
|
12
12
|
focus: import("../index.js").Selector<":focus", string>;
|
|
@@ -22,14 +22,14 @@ export declare const MinimalSelectors: {
|
|
|
22
22
|
has: import("../index.js").Selector<":has($$)", string>;
|
|
23
23
|
};
|
|
24
24
|
export declare const MinimalPrioritySelectors: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
25
|
+
before: import("../index.js").Selector<"::before", string>;
|
|
26
|
+
after: import("../index.js").Selector<"::after", string>;
|
|
28
27
|
attr: import("../index.js").Selector<"$", string>;
|
|
29
28
|
select: import("../index.js").Selector<"$$", string>;
|
|
30
29
|
merge: import("../index.js").Selector<"...", string>;
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
media: import("../index.js").Selector<"@media $$", string>;
|
|
31
|
+
container: import("../index.js").Selector<"@container $$", string>;
|
|
32
|
+
supports: import("../index.js").Selector<"@supports $$", string>;
|
|
33
33
|
hover: import("../index.js").Selector<":hover", string>;
|
|
34
34
|
active: import("../index.js").Selector<":active", string>;
|
|
35
35
|
focus: import("../index.js").Selector<":focus", string>;
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import type { Selector, SelectorAssert, SelectorAssertFn } from "./types.js";
|
|
2
|
-
type SelectorArgs = [
|
|
2
|
+
type SelectorArgs = [
|
|
3
|
+
] | [
|
|
4
|
+
SelectorAssert | null
|
|
5
|
+
] | [
|
|
6
|
+
number
|
|
7
|
+
] | [
|
|
8
|
+
number,
|
|
9
|
+
SelectorAssert | null
|
|
10
|
+
];
|
|
3
11
|
type SelectorAssertArg<Assert> = Assert extends SelectorAssertFn<infer Arg> ? Arg extends string ? Arg : string : string;
|
|
4
|
-
type SelectorArg<Args extends SelectorArgs> = Args extends [
|
|
12
|
+
type SelectorArg<Args extends SelectorArgs> = Args extends [
|
|
13
|
+
infer Assert
|
|
14
|
+
] ? SelectorAssertArg<Assert> : Args extends [
|
|
15
|
+
number,
|
|
16
|
+
infer Assert
|
|
17
|
+
] ? SelectorAssertArg<Assert> : string;
|
|
5
18
|
export declare function selector<const T extends string, const Args extends SelectorArgs>(selector: T, ...args: Args): Selector<T, SelectorArg<Args>>;
|
|
6
19
|
type SelectorString<T extends Selector> = T extends Selector<infer T> ? T : unknown;
|
|
7
20
|
type PrioritySelectors<Selectors extends Record<string, Selector>> = {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SheetOptions, StyleSheet } from "./types.js";
|
|
2
|
+
export declare function refreshOrderedSheets(): void;
|
|
3
|
+
/** Keep whole global sheets together; move DOM groups without rebuilding unrelated rules. */
|
|
4
|
+
export declare function createOrderedSheet(create: (options: SheetOptions) => StyleSheet, options: SheetOptions, dev: boolean): StyleSheet;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CssConfig } from "../config/config/css.js";
|
|
2
|
+
import type { SheetRule } from "./types.js";
|
|
3
|
+
export type OrderedRule = Pick<SheetRule, 'css' | 'priority' | 'layer' | 'important' | 'importantNative' | 'sheet' | 'globalSheet'>;
|
|
4
|
+
export type OrderingConfig = Pick<CssConfig, 'layer' | 'layers' | 'layerNamespace'>;
|
|
5
|
+
export declare function sheetRuleLayer(rule: OrderedRule, config?: OrderingConfig): SheetRule['layer'];
|
|
6
|
+
export declare function sheetRuleGroup(rule: OrderedRule, config?: OrderingConfig): string;
|
|
7
|
+
export declare function compareSheetGroups(a: OrderedRule, b: OrderedRule): number;
|
|
8
|
+
export declare function compareSheetRules(a: OrderedRule, b: OrderedRule, config?: OrderingConfig): number;
|
|
9
|
+
/** Stable group sort: equal global orders keep the first-discovered sheet first. */
|
|
10
|
+
export declare function orderSheetRules<T extends OrderedRule>(rules: readonly T[], config?: OrderingConfig): T[];
|
|
11
|
+
/** Reserve each parent's first child for managed important declarations. */
|
|
12
|
+
export declare function sheetLayerOrder(names: readonly string[], config?: OrderingConfig, reservedParents?: readonly string[]): string;
|
|
13
|
+
/** Build only ordering declarations; runtime flushing need not serialize rule bodies. */
|
|
14
|
+
export declare function sheetOrderingPreamble(rules: readonly OrderedRule[], config?: OrderingConfig, mode?: 'sort' | 'layer'): string;
|
|
15
|
+
export declare function serializeOrderedRules(rules: readonly OrderedRule[], config?: OrderingConfig, mode?: 'sort' | 'layer'): string;
|
|
@@ -8,6 +8,12 @@ export type SheetRule = {
|
|
|
8
8
|
key?: string | null;
|
|
9
9
|
priority?: LayerPriority | null;
|
|
10
10
|
important?: boolean;
|
|
11
|
+
importantNative?: boolean;
|
|
12
|
+
sheet?: boolean;
|
|
13
|
+
globalSheet?: {
|
|
14
|
+
id: string;
|
|
15
|
+
order: number;
|
|
16
|
+
};
|
|
11
17
|
layer?: 'style' | 'sheet' | false | NamedSheetLayer;
|
|
12
18
|
callsite?: SheetCallsite | null;
|
|
13
19
|
debug?: DebugData | null;
|
|
@@ -26,5 +32,6 @@ export type StyleSheet = {
|
|
|
26
32
|
updateLayers(layers: readonly string[]): void;
|
|
27
33
|
insert(rule: SheetRule | string): void;
|
|
28
34
|
flush(): void;
|
|
35
|
+
replaceRules?(owner: string, rules: SheetRule[]): void;
|
|
29
36
|
destroy?(): void;
|
|
30
37
|
};
|
|
@@ -2,7 +2,8 @@ declare const STYLE_IMPORTANT: unique symbol;
|
|
|
2
2
|
export type StyleImportantValue<T = unknown> = {
|
|
3
3
|
readonly [STYLE_IMPORTANT]: true;
|
|
4
4
|
readonly value: T;
|
|
5
|
+
readonly native?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function importantValue<T>(value: T): StyleImportantValue<T>;
|
|
7
|
+
export declare function importantValue<T>(value: T, native?: boolean): StyleImportantValue<T>;
|
|
7
8
|
export declare function isStyleImportantValue(value: unknown): value is StyleImportantValue;
|
|
8
9
|
export {};
|