@fluentic/style 0.1.0-beta.11 → 0.1.0-beta.12
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 +6 -0
- package/compiler/compiler/compiler.ts +8 -4
- package/compiler/utils/file_resolver.ts +2 -1
- package/dist/compiler/index.mjs +1 -1
- package/dist/{compiler-C3CEGGtI.mjs → compiler-mCfMhtX4.mjs} +2 -3
- package/dist/{compiler-C3CEGGtI.mjs.map → compiler-mCfMhtX4.mjs.map} +1 -1
- package/dist/{loader-_-VjzlrX.mjs → loader-DUS2i9Zb.mjs} +3 -3
- package/dist/loader-DUS2i9Zb.mjs.map +1 -0
- package/dist/{misc-B76PUnWe.mjs → misc-vGtt_SX7.mjs} +2 -2
- package/dist/{misc-B76PUnWe.mjs.map → misc-vGtt_SX7.mjs.map} +1 -1
- package/dist/plugin/farm/index.mjs +3 -3
- package/dist/plugin/nextjs/index.mjs +4 -4
- package/dist/plugin/nextjs/index.mjs.map +1 -1
- package/dist/plugin/nextjs/loader.mjs +4 -4
- 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/{registry-w8ET5R7v.mjs → registry-BJqMbdMu.mjs} +2 -2
- package/dist/{registry-w8ET5R7v.mjs.map → registry-BJqMbdMu.mjs.map} +1 -1
- package/dist/{shared-PK52rW6T.cjs → shared-BRUPuZdH.cjs} +2 -3
- package/dist/{shared-PK52rW6T.cjs.map → shared-BRUPuZdH.cjs.map} +1 -1
- package/dist/{shared-C_cYxNzz.mjs → shared-DDzZd0tM.mjs} +4 -4
- package/dist/{shared-C_cYxNzz.mjs.map → shared-DDzZd0tM.mjs.map} +1 -1
- package/dist/{sidecar-BhvmXYsD.mjs → sidecar-BTT0veLU.mjs} +3 -3
- package/dist/{sidecar-BhvmXYsD.mjs.map → sidecar-BTT0veLU.mjs.map} +1 -1
- package/dist/types/adapter/preact.d.ts +1 -0
- package/dist/types/adapter/react.d.ts +1 -0
- package/dist/types/adapter/solid.d.ts +1 -0
- package/dist/types/atomic/atRule/counterStyle.d.ts +10 -0
- package/dist/types/atomic/atRule/fontFace.d.ts +10 -0
- package/dist/types/atomic/atRule/fontPaletteValues.d.ts +10 -0
- package/dist/types/atomic/atRule/fontSrc.d.ts +1 -0
- package/dist/types/atomic/atRule/keyframes.d.ts +13 -0
- package/dist/types/atomic/atRule/positionTry.d.ts +13 -0
- package/dist/types/atomic/atRule/property.d.ts +13 -0
- package/dist/types/atomic/atRule/utils.d.ts +5 -0
- package/dist/types/atomic/className.d.ts +11 -0
- package/dist/types/atomic/debug/className/className.d.ts +9 -0
- package/dist/types/atomic/debug/className/index.d.ts +1 -0
- package/dist/types/atomic/debug/property/data.d.ts +3 -0
- package/dist/types/atomic/debug/property/index.d.ts +1 -0
- package/dist/types/atomic/debug/property/property.d.ts +5 -0
- package/dist/types/atomic/debug/selector.d.ts +2 -0
- package/dist/types/atomic/debug/value.d.ts +5 -0
- package/dist/types/atomic/element.d.ts +5 -0
- package/dist/types/atomic/layer/index.d.ts +3 -0
- package/dist/types/atomic/layer/layer.d.ts +12 -0
- package/dist/types/atomic/layer/types.d.ts +30 -0
- package/dist/types/atomic/layer/utils.d.ts +4 -0
- package/dist/types/atomic/property/index.d.ts +2 -0
- package/dist/types/atomic/property/presets.d.ts +4 -0
- package/dist/types/atomic/property/property.d.ts +3 -0
- package/dist/types/atomic/property/type_maps.d.ts +31 -0
- package/dist/types/atomic/property/types.d.ts +4 -0
- package/dist/types/atomic/rule.d.ts +5 -0
- package/dist/types/atomic/scope.d.ts +3 -0
- package/dist/types/atomic/theme.d.ts +7 -0
- package/dist/types/atomic/token.d.ts +7 -0
- package/dist/types/atomic/utils/cssIdent.d.ts +2 -0
- package/dist/types/atomic/utils/cssVar.d.ts +3 -0
- package/dist/types/atomic/utils/debug.d.ts +4 -0
- package/dist/types/atomic/utils/format.d.ts +5 -0
- package/dist/types/atomic/utils/hash.d.ts +1 -0
- package/dist/types/atomic/utils/selector.d.ts +6 -0
- package/dist/types/atomic/utils/types.d.ts +7 -0
- package/dist/types/atomic/value/index.d.ts +2 -0
- package/dist/types/atomic/value/unitless.d.ts +1 -0
- package/dist/types/atomic/value/value.d.ts +2 -0
- package/dist/types/atomic/var.d.ts +4 -0
- package/dist/types/builder/classname/class_name_builder.d.ts +4 -0
- package/dist/types/builder/classname/fns.d.ts +48 -0
- package/dist/types/builder/classname/index.d.ts +3 -0
- package/dist/types/builder/classname/types.d.ts +18 -0
- package/dist/types/builder/data/check_selector.d.ts +2 -0
- package/dist/types/builder/data/const.d.ts +26 -0
- package/dist/types/builder/data/create.d.ts +13 -0
- package/dist/types/builder/data/data.d.ts +44 -0
- package/dist/types/builder/data/debug.d.ts +38 -0
- package/dist/types/builder/data/index.d.ts +8 -0
- package/dist/types/builder/data/is.d.ts +16 -0
- package/dist/types/builder/data/merge/index.d.ts +2 -0
- package/dist/types/builder/data/merge/scope.d.ts +7 -0
- package/dist/types/builder/data/merge/style.d.ts +6 -0
- package/dist/types/builder/data/merge/utils.d.ts +5 -0
- package/dist/types/builder/data/selector.d.ts +8 -0
- package/dist/types/builder/data/state.d.ts +85 -0
- package/dist/types/builder/extract/index.d.ts +7 -0
- package/dist/types/builder/extract/scope.d.ts +14 -0
- package/dist/types/builder/extract/sheet.d.ts +10 -0
- package/dist/types/builder/extract/slot.d.ts +9 -0
- package/dist/types/builder/extract/style.d.ts +11 -0
- package/dist/types/builder/extract/theme.d.ts +2 -0
- package/dist/types/builder/extract/token.d.ts +7 -0
- package/dist/types/builder/extract/utils.d.ts +28 -0
- package/dist/types/builder/extract/withTokens.d.ts +10 -0
- package/dist/types/builder/index.d.ts +2 -0
- package/dist/types/builder/selector_override.d.ts +5 -0
- package/dist/types/builder/selector_override_core.d.ts +6 -0
- package/dist/types/builder/style_builder.d.ts +15 -0
- package/dist/types/builder/style_data.d.ts +8 -0
- package/dist/types/builder/style_fns.d.ts +14 -0
- package/dist/types/builder/token/data.d.ts +10 -0
- package/dist/types/builder/token/name.d.ts +3 -0
- package/dist/types/builder/token/symbols.d.ts +4 -0
- package/dist/types/builder/types/alias.d.ts +59 -0
- package/dist/types/builder/types/fns.d.ts +115 -0
- package/dist/types/builder/types/index.d.ts +1 -0
- package/dist/types/builder/types/types.d.ts +22 -0
- package/dist/types/builder/utils.d.ts +9 -0
- package/dist/types/compiler/compiler/cache.d.ts +24 -0
- package/dist/types/compiler/compiler/compiler.d.ts +28 -0
- package/dist/types/compiler/compiler/constants.d.ts +6 -0
- package/dist/types/compiler/compiler/index.d.ts +4 -0
- package/dist/types/compiler/compiler/types.d.ts +53 -0
- package/dist/types/compiler/cssProp.d.ts +8 -0
- package/dist/types/compiler/extract/collector.d.ts +8 -0
- package/dist/types/compiler/extract/extract.d.ts +6 -0
- package/dist/types/compiler/extract/index.d.ts +3 -0
- package/dist/types/compiler/extract/types.d.ts +22 -0
- package/dist/types/compiler/index.d.ts +3 -0
- package/dist/types/compiler/transform/cssProp/index.d.ts +1 -0
- package/dist/types/compiler/transform/cssProp/plugin.d.ts +13 -0
- package/dist/types/compiler/transform/debug/index.d.ts +2 -0
- package/dist/types/compiler/transform/debug/plugin.d.ts +34 -0
- package/dist/types/compiler/transform/debug/transform.d.ts +7 -0
- package/dist/types/compiler/transform/debug/utils/debug_data.d.ts +11 -0
- package/dist/types/compiler/transform/debug/utils/source_url.d.ts +2 -0
- package/dist/types/compiler/transform/evaluator/evaluator.d.ts +41 -0
- package/dist/types/compiler/transform/evaluator/index.d.ts +3 -0
- package/dist/types/compiler/transform/evaluator/tracer.d.ts +8 -0
- package/dist/types/compiler/transform/evaluator/types.d.ts +21 -0
- package/dist/types/compiler/transform/extract/chain/chain.d.ts +18 -0
- package/dist/types/compiler/transform/extract/chain/extract_chain.d.ts +19 -0
- package/dist/types/compiler/transform/extract/chain/index.d.ts +3 -0
- package/dist/types/compiler/transform/extract/chain/types.d.ts +32 -0
- package/dist/types/compiler/transform/extract/index.d.ts +2 -0
- package/dist/types/compiler/transform/extract/plugin.d.ts +20 -0
- package/dist/types/compiler/transform/extract/transform.d.ts +10 -0
- package/dist/types/compiler/transform/extract/utils/imports.d.ts +3 -0
- package/dist/types/compiler/transform/extract/utils/replacement.d.ts +9 -0
- package/dist/types/compiler/transform/extract/utils/slot.d.ts +4 -0
- package/dist/types/compiler/transform/extract/utils/state.d.ts +34 -0
- package/dist/types/compiler/transform/extract/utils/theme.d.ts +9 -0
- package/dist/types/compiler/transform/extract/utils/token.d.ts +1 -0
- package/dist/types/compiler/transform/index.d.ts +5 -0
- package/dist/types/compiler/transform/syntax/index.d.ts +5 -0
- package/dist/types/compiler/transform/syntax/isStaticStyleValue.d.ts +2 -0
- package/dist/types/compiler/transform/syntax/isStyleChainCall.d.ts +2 -0
- package/dist/types/compiler/transform/syntax/static_ids.d.ts +16 -0
- package/dist/types/compiler/transform/syntax/types.d.ts +4 -0
- package/dist/types/compiler/transform/syntax/utils.d.ts +5 -0
- package/dist/types/compiler/transform/utils/babel.d.ts +21 -0
- package/dist/types/compiler/transform/utils/import.d.ts +2 -0
- package/dist/types/compiler/transform/utils/path.d.ts +1 -0
- package/dist/types/compiler/transform/utils/selector.d.ts +18 -0
- package/dist/types/compiler/utils/constants.d.ts +68 -0
- package/dist/types/compiler/utils/file_resolver.d.ts +12 -0
- package/dist/types/compiler/utils/import_source.d.ts +28 -0
- package/dist/types/compiler/utils/imports.d.ts +6 -0
- package/dist/types/compiler/utils/path.d.ts +4 -0
- package/dist/types/compiler/utils/sourcemap.d.ts +36 -0
- package/dist/types/config/build.d.ts +20 -0
- package/dist/types/config/config/check.d.ts +11 -0
- package/dist/types/config/config/css.d.ts +23 -0
- package/dist/types/config/config/css_extra.d.ts +13 -0
- package/dist/types/config/config/debug.d.ts +14 -0
- package/dist/types/config/config/dev.d.ts +36 -0
- package/dist/types/config/config/runtime.d.ts +10 -0
- package/dist/types/config/configure.d.ts +12 -0
- package/dist/types/config/constants.d.ts +1 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/config/types.d.ts +47 -0
- package/dist/types/config/utils.d.ts +2 -0
- package/dist/types/css/counterStyle.d.ts +4 -0
- package/dist/types/css/fontFace.d.ts +5 -0
- package/dist/types/css/fontPaletteValues.d.ts +4 -0
- package/dist/types/css/index.d.ts +9 -0
- package/dist/types/css/keyframes.d.ts +4 -0
- package/dist/types/css/positionTry.d.ts +4 -0
- package/dist/types/css/property.d.ts +7 -0
- package/dist/types/css/sheet.d.ts +7 -0
- package/dist/types/css/styleTarget.d.ts +9 -0
- package/dist/types/css/utils.d.ts +19 -0
- package/dist/types/dev/config.d.ts +6 -0
- package/dist/types/dev/fns.d.ts +14 -0
- package/dist/types/dev/index.d.ts +2 -0
- package/dist/types/dev/trace.d.ts +8 -0
- package/dist/types/dev/utils.d.ts +5 -0
- package/dist/types/dialect/extracted/index.d.ts +1 -0
- package/dist/types/dialect/index.d.ts +1 -0
- package/dist/types/dialect/namedTokens.d.ts +9 -0
- package/dist/types/entry/dev/adapter/preact.d.ts +1 -0
- package/dist/types/entry/dev/adapter/react.d.ts +1 -0
- package/dist/types/entry/dev/adapter/solid.d.ts +1 -0
- package/dist/types/entry/dev/config.d.ts +2 -0
- package/dist/types/entry/dev/css.d.ts +2 -0
- package/dist/types/entry/dev/index.d.ts +3 -0
- package/dist/types/entry/dev/jsx_dev_runtime.d.ts +3 -0
- package/dist/types/entry/dev/sheet.d.ts +1 -0
- package/dist/types/entry/prod/adapter/preact.d.ts +1 -0
- package/dist/types/entry/prod/adapter/react.d.ts +1 -0
- package/dist/types/entry/prod/adapter/solid.d.ts +1 -0
- package/dist/types/entry/prod/config.d.ts +2 -0
- package/dist/types/entry/prod/config_debug.d.ts +2 -0
- package/dist/types/entry/prod/css.d.ts +2 -0
- package/dist/types/entry/prod/extract.d.ts +1 -0
- package/dist/types/entry/prod/index.d.ts +2 -0
- package/dist/types/entry/prod/jsx_runtime.d.ts +2 -0
- package/dist/types/entry/prod/runtime.d.ts +8 -0
- package/dist/types/entry/rsc_dev/adapter/preact.d.ts +1 -0
- package/dist/types/entry/rsc_dev/adapter/react.d.ts +1 -0
- package/dist/types/entry/rsc_dev/adapter/solid.d.ts +1 -0
- package/dist/types/entry/rsc_dev/config.d.ts +2 -0
- package/dist/types/entry/rsc_dev/css.d.ts +2 -0
- package/dist/types/entry/rsc_dev/index.d.ts +2 -0
- package/dist/types/entry/rsc_dev/server.d.ts +10 -0
- package/dist/types/entry/rsc_prod/adapter/preact.d.ts +1 -0
- package/dist/types/entry/rsc_prod/adapter/react.d.ts +1 -0
- package/dist/types/entry/rsc_prod/adapter/solid.d.ts +1 -0
- package/dist/types/entry/rsc_prod/config.d.ts +2 -0
- package/dist/types/entry/rsc_prod/config_debug.d.ts +2 -0
- package/dist/types/entry/rsc_prod/css.d.ts +2 -0
- package/dist/types/entry/rsc_prod/index.d.ts +2 -0
- package/dist/types/entry/rsc_prod/jsx_runtime.d.ts +2 -0
- package/dist/types/entry/rsc_prod/runtime.d.ts +4 -0
- package/dist/types/entry/rsc_prod/server.d.ts +6 -0
- package/dist/types/entry/shared/config.d.ts +1 -0
- package/dist/types/entry/shared/config_debug.d.ts +1 -0
- package/dist/types/entry/shared/config_dev.d.ts +1 -0
- package/dist/types/entry/shared/dev.d.ts +1 -0
- package/dist/types/entry/shared/prod.d.ts +1 -0
- package/dist/types/entry/shared/utils.d.ts +2 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/jsx/extracted/jsx_runtime.d.ts +7 -0
- package/dist/types/jsx/rsc/jsx_runtime.d.ts +7 -0
- package/dist/types/jsx/rsc_extracted/jsx_runtime.d.ts +2 -0
- package/dist/types/jsx/runtime/jsx_dev_runtime.d.ts +6 -0
- package/dist/types/jsx/runtime/jsx_runtime.d.ts +7 -0
- package/dist/types/jsx/types/index.d.ts +1 -0
- package/dist/types/jsx/types/preact.d.ts +12 -0
- package/dist/types/jsx/types/react.d.ts +10 -0
- package/dist/types/jsx/types/solid.d.ts +12 -0
- package/dist/types/jsx/utils.d.ts +19 -0
- package/dist/types/plugin/bundler/farm/index.d.ts +1 -0
- package/dist/types/plugin/bundler/farm/plugin.d.ts +91 -0
- package/dist/types/plugin/bundler/parcel/index.d.ts +1 -0
- package/dist/types/plugin/bundler/parcel/optimizer.d.ts +3 -0
- package/dist/types/plugin/bundler/parcel/plugin.d.ts +6 -0
- package/dist/types/plugin/bundler/parcel/resolver.d.ts +3 -0
- package/dist/types/plugin/bundler/parcel/runtime.d.ts +3 -0
- package/dist/types/plugin/bundler/parcel/shared.d.ts +37 -0
- package/dist/types/plugin/bundler/parcel/transformer.d.ts +3 -0
- package/dist/types/plugin/bundler/rspack/index.d.ts +1 -0
- package/dist/types/plugin/bundler/rspack/plugin.d.ts +7 -0
- package/dist/types/plugin/bundler/vite/index.d.ts +1 -0
- package/dist/types/plugin/bundler/vite/plugin.d.ts +6 -0
- package/dist/types/plugin/bundler/vite/state.d.ts +55 -0
- package/dist/types/plugin/bundler/webpack/index.d.ts +1 -0
- package/dist/types/plugin/bundler/webpack/loader.d.ts +2 -0
- package/dist/types/plugin/bundler/webpack/plugin.d.ts +11 -0
- package/dist/types/plugin/bundler/webpack/shared/loader.d.ts +31 -0
- package/dist/types/plugin/bundler/webpack/shared/registry.d.ts +4 -0
- package/dist/types/plugin/bundler/webpack/utils.d.ts +18 -0
- package/dist/types/plugin/nextjs/constants.d.ts +3 -0
- package/dist/types/plugin/nextjs/html.d.ts +1 -0
- package/dist/types/plugin/nextjs/index.d.ts +2 -0
- package/dist/types/plugin/nextjs/loader.d.ts +3 -0
- package/dist/types/plugin/nextjs/plugin.d.ts +5 -0
- package/dist/types/plugin/nextjs/types.d.ts +21 -0
- package/dist/types/plugin/nextjs/utils.d.ts +59 -0
- package/dist/types/plugin/utils/cache/css_cache.d.ts +34 -0
- package/dist/types/plugin/utils/cache/file.d.ts +4 -0
- package/dist/types/plugin/utils/cache/index.d.ts +2 -0
- package/dist/types/plugin/utils/compiler.d.ts +40 -0
- package/dist/types/plugin/utils/constants.d.ts +4 -0
- package/dist/types/plugin/utils/cssMarker.d.ts +4 -0
- package/dist/types/plugin/utils/cssOutput.d.ts +10 -0
- package/dist/types/plugin/utils/filter.d.ts +14 -0
- package/dist/types/plugin/utils/imports.d.ts +3 -0
- package/dist/types/plugin/utils/index.d.ts +10 -0
- package/dist/types/plugin/utils/injection.d.ts +3 -0
- package/dist/types/plugin/utils/misc.d.ts +1 -0
- package/dist/types/plugin/utils/runtimeEntry.d.ts +8 -0
- package/dist/types/plugin/utils/sidecar/index.d.ts +1 -0
- package/dist/types/plugin/utils/sidecar/server.d.ts +19 -0
- package/dist/types/plugin/utils/sidecar/sidecar.d.ts +17 -0
- package/dist/types/plugin/utils/sidecar/utils.d.ts +33 -0
- package/dist/types/plugin/utils/sourcemap.d.ts +9 -0
- package/dist/types/plugin/utils/virtual.d.ts +12 -0
- package/dist/types/presets/tailwind/classname/index.d.ts +2 -0
- package/dist/types/presets/tailwind/classname/transform.d.ts +8 -0
- package/dist/types/presets/tailwind/classname/types.d.ts +27 -0
- package/dist/types/presets/tailwind/index.d.ts +5 -0
- package/dist/types/presets/tailwind/selectors.d.ts +68 -0
- package/dist/types/presets/tailwind/style/index.d.ts +2 -0
- package/dist/types/presets/tailwind/style/transform.d.ts +8 -0
- package/dist/types/presets/tailwind/style/types.d.ts +149 -0
- package/dist/types/presets/tailwind/theme.d.ts +477 -0
- package/dist/types/presets/tailwind/types.d.ts +53 -0
- package/dist/types/runtime/adapter/utils.d.ts +12 -0
- package/dist/types/runtime/core/cache/combine.d.ts +6 -0
- package/dist/types/runtime/core/cache/combineRuntime.d.ts +1 -0
- package/dist/types/runtime/core/cache/item.d.ts +15 -0
- package/dist/types/runtime/core/cache/itemWithResolver.d.ts +4 -0
- package/dist/types/runtime/core/cache/pool.d.ts +16 -0
- package/dist/types/runtime/core/cache/prop.d.ts +19 -0
- package/dist/types/runtime/core/cache/propCache.d.ts +12 -0
- package/dist/types/runtime/core/cache/resolvedItem.d.ts +5 -0
- package/dist/types/runtime/core/cache/result.d.ts +9 -0
- package/dist/types/runtime/core/cache/stateItem.d.ts +8 -0
- package/dist/types/runtime/core/cache/token.d.ts +2 -0
- package/dist/types/runtime/core/cache/tokenValues.d.ts +26 -0
- package/dist/types/runtime/core/cache/utils/tree.d.ts +12 -0
- package/dist/types/runtime/core/cache/utils/walk.d.ts +1 -0
- package/dist/types/runtime/core/className.d.ts +18 -0
- package/dist/types/runtime/core/combinedStyle.d.ts +20 -0
- package/dist/types/runtime/core/createTransformElement.d.ts +4 -0
- package/dist/types/runtime/core/elementMarker.d.ts +12 -0
- package/dist/types/runtime/core/elementMarkerData.d.ts +7 -0
- package/dist/types/runtime/core/getClassName.d.ts +4 -0
- package/dist/types/runtime/core/getSheetRules.d.ts +3 -0
- package/dist/types/runtime/core/getToken.d.ts +3 -0
- package/dist/types/runtime/core/index.d.ts +5 -0
- package/dist/types/runtime/core/jsx.d.ts +1 -0
- package/dist/types/runtime/core/resolveClassNameRuntime.d.ts +8 -0
- package/dist/types/runtime/env.d.ts +2 -0
- package/dist/types/runtime/extract/combineStyle.d.ts +27 -0
- package/dist/types/runtime/extract/getClassName.d.ts +10 -0
- package/dist/types/runtime/extract/index.d.ts +6 -0
- package/dist/types/runtime/extract/jsx.d.ts +10 -0
- package/dist/types/runtime/extract/token.d.ts +5 -0
- package/dist/types/runtime/extract/tokenResolver.d.ts +2 -0
- package/dist/types/runtime/rsc/constants.d.ts +4 -0
- package/dist/types/runtime/rsc/dev.d.ts +6 -0
- package/dist/types/runtime/rsc/getClassName.d.ts +24 -0
- package/dist/types/runtime/rsc/index.d.ts +1 -0
- package/dist/types/runtime/rsc/jsx.d.ts +1 -0
- package/dist/types/runtime/rsc/observer.d.ts +5 -0
- package/dist/types/runtime/rsc/styleStore.d.ts +5 -0
- package/dist/types/runtime/sheet/element.d.ts +2 -0
- package/dist/types/runtime/sheet/global.d.ts +3 -0
- package/dist/types/runtime/sheet/index.d.ts +3 -0
- package/dist/types/runtime/sheet/insert.d.ts +5 -0
- package/dist/types/runtime/sheet/rule.d.ts +8 -0
- package/dist/types/runtime/sheet/rules.d.ts +10 -0
- package/dist/types/runtime/sheet/theme.d.ts +5 -0
- package/dist/types/runtime/style/index.d.ts +3 -0
- package/dist/types/runtime/style/scope.d.ts +4 -0
- package/dist/types/runtime/style/style.d.ts +27 -0
- package/dist/types/runtime/style/token.d.ts +1 -0
- package/dist/types/runtime/types.d.ts +28 -0
- package/dist/types/selector/assert.d.ts +13 -0
- package/dist/types/selector/index.d.ts +5 -0
- package/dist/types/selector/presets/default.d.ts +108 -0
- package/dist/types/selector/presets/index.d.ts +3 -0
- package/dist/types/selector/presets/minimal.d.ts +46 -0
- package/dist/types/selector/presets/selectors.d.ts +62 -0
- package/dist/types/selector/selector.d.ts +12 -0
- package/dist/types/selector/types.d.ts +12 -0
- package/dist/types/selector/validate.d.ts +5 -0
- package/dist/types/sheet/dev/dev_layer.d.ts +4 -0
- package/dist/types/sheet/dev/dev_sort.d.ts +2 -0
- package/dist/types/sheet/dev/index.d.ts +5 -0
- package/dist/types/sheet/dev/utils.d.ts +26 -0
- package/dist/types/sheet/index.d.ts +4 -0
- package/dist/types/sheet/prod.d.ts +2 -0
- package/dist/types/sheet/sheet.d.ts +2 -0
- package/dist/types/sheet/sourcemap.d.ts +11 -0
- package/dist/types/sheet/types.d.ts +29 -0
- package/dist/types/sheet/utils/dom.d.ts +5 -0
- package/dist/types/sheet/utils/index.d.ts +4 -0
- package/dist/types/sheet/utils/layer.d.ts +10 -0
- package/dist/types/sheet/utils/noop.d.ts +2 -0
- package/dist/types/sheet/utils/rule.d.ts +3 -0
- package/dist/types/sheet/utils/sourcemap.d.ts +12 -0
- package/dist/types/style/classname.d.ts +15 -0
- package/dist/types/style/important.d.ts +8 -0
- package/dist/types/style/index.d.ts +12 -0
- package/dist/types/style/keyframes.d.ts +10 -0
- package/dist/types/style/style.d.ts +426 -0
- package/dist/types/style/theme.d.ts +5 -0
- package/dist/types/style/token.d.ts +29 -0
- package/dist/types/style/tokens.d.ts +10 -0
- package/dist/types/style/transform.d.ts +21 -0
- package/dist/types/style/types.d.ts +22 -0
- package/dist/types/style/utils/expose.d.ts +8 -0
- package/dist/types/style/utils/index.d.ts +1 -0
- package/dist/types/style/value.d.ts +12 -0
- package/dist/types/style/valueRef.d.ts +13 -0
- package/dist/types/style/weight.d.ts +9 -0
- package/dist/types/utils/global.d.ts +4 -0
- package/dist/types/utils/hash.d.ts +3 -0
- package/dist/types/utils/id.d.ts +12 -0
- package/dist/types/utils/object.d.ts +10 -0
- package/dist/types/utils/symbol.d.ts +1 -0
- package/dist/types/utils/trace.d.ts +21 -0
- package/dist/types/utils/type.d.ts +11 -0
- package/dist/{utils-DND33M6y.mjs → utils-D4UympcZ.mjs} +3 -3
- package/dist/{utils-DND33M6y.mjs.map → utils-D4UympcZ.mjs.map} +1 -1
- package/dist/{utils-NdisireF.mjs → utils-D75HPJWv.mjs} +4 -4
- package/dist/{utils-NdisireF.mjs.map → utils-D75HPJWv.mjs.map} +1 -1
- package/dist/{webpack-D7QO0bKN.mjs → webpack-_BpgAUEy.mjs} +5 -5
- package/dist/{webpack-D7QO0bKN.mjs.map → webpack-_BpgAUEy.mjs.map} +1 -1
- package/jsx/types/solid.ts +8 -25
- package/package.json +76 -72
- package/plugin/bundler/webpack/shared/loader.ts +4 -0
- package/plugin/nextjs/plugin.ts +7 -8
- package/dist/loader-_-VjzlrX.mjs.map +0 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { Selector } from "../../selector/index.js";
|
|
2
|
+
import type { StyleObject } from "../../style/types.js";
|
|
3
|
+
import type { ScopeItems } from "../data/merge/scope.js";
|
|
4
|
+
import type { scopeRule, selectorOverrideRule, slotOverrideRule, slotRule, styleRule } from "./alias.js";
|
|
5
|
+
import type { AtRuleStyleData, MergeRuleStyleData } from "./types.js";
|
|
6
|
+
type StyleFn<Style, Self> = {
|
|
7
|
+
(style: StyleObject<Style>): Self;
|
|
8
|
+
};
|
|
9
|
+
type StyleArgFn<Style, Self, Arg extends string> = {
|
|
10
|
+
(selector: Arg, style: StyleObject<Style>): Self;
|
|
11
|
+
};
|
|
12
|
+
type StyleArgsFn<Style, Self, Arg extends string> = {
|
|
13
|
+
(selector: Arg | Arg[], style: StyleObject<Style>): Self;
|
|
14
|
+
};
|
|
15
|
+
type StyleMergeFn<Style, Self> = {
|
|
16
|
+
(style: MergeRuleStyleData<Style>): Self;
|
|
17
|
+
};
|
|
18
|
+
type StyleAtRuleFn<Style, Self, Arg> = {
|
|
19
|
+
(selector: Arg, style: AtRuleStyleData<Style>): Self;
|
|
20
|
+
};
|
|
21
|
+
type StyleAtRuleNoArgFn<Style, Self> = {
|
|
22
|
+
(style: AtRuleStyleData<Style>): Self;
|
|
23
|
+
};
|
|
24
|
+
type StyleMediaFn<Style, Self, Arg> = StyleAtRuleFn<Style, Self, Arg> & {
|
|
25
|
+
(weight: number, selector: Arg, style: AtRuleStyleData<Style>): Self;
|
|
26
|
+
};
|
|
27
|
+
type StyleMediaNoArgFn<Style, Self> = StyleAtRuleNoArgFn<Style, Self> & {
|
|
28
|
+
(weight: number, style: AtRuleStyleData<Style>): Self;
|
|
29
|
+
};
|
|
30
|
+
type StyleAtRuleArgFn<Style, Self, Arg extends string> = StyleAtRuleFn<Style, Self, Arg>;
|
|
31
|
+
type StyleAtRuleArgsFn<Style, Self, Arg extends string> = StyleAtRuleFn<Style, Self, Arg | Arg[]>;
|
|
32
|
+
type StyleMediaArgFn<Style, Self, Arg extends string> = StyleMediaFn<Style, Self, Arg>;
|
|
33
|
+
type StyleMediaArgsFn<Style, Self, Arg extends string> = StyleMediaFn<Style, Self, Arg | Arg[]>;
|
|
34
|
+
export type SelectorString<S> = S extends Selector<infer T, any> ? T : S;
|
|
35
|
+
export type SelectorArg<S> = S extends Selector<any, infer Arg> ? Arg : string;
|
|
36
|
+
type GetArgFn<Selector, Fns extends Record<'Args' | 'Arg' | 'Default', unknown>> = Selector extends `${string}$$${string}` ? Fns['Args'] : Selector extends `${string}$${string}` ? Fns['Arg'] : Fns['Default'];
|
|
37
|
+
export type GetSelectorFn<Selector, Fns extends Record<'MediaNoArg' | 'MediaArg' | 'MediaArgs' | 'AtRuleNoArg' | 'AtRuleArg' | 'AtRuleArgs' | 'Args' | 'Arg' | 'Default', unknown>> = Selector extends `@media${string}` | `@container${string}` ? GetArgFn<Selector, {
|
|
38
|
+
Args: Fns['MediaArgs'];
|
|
39
|
+
Arg: Fns['MediaArg'];
|
|
40
|
+
Default: Fns['MediaNoArg'];
|
|
41
|
+
}> : Selector extends `@${string}` ? GetArgFn<Selector, {
|
|
42
|
+
Args: Fns['AtRuleArgs'];
|
|
43
|
+
Arg: Fns['AtRuleArg'];
|
|
44
|
+
Default: Fns['AtRuleNoArg'];
|
|
45
|
+
}> : GetArgFn<Selector, {
|
|
46
|
+
Args: Fns['Args'];
|
|
47
|
+
Arg: Fns['Arg'];
|
|
48
|
+
Default: Fns['Default'];
|
|
49
|
+
}>;
|
|
50
|
+
type GetStyleFn<Selector, Style, Self> = SelectorString<Selector> extends '...' ? StyleMergeFn<Style, Self> : GetSelectorFn<SelectorString<Selector>, {
|
|
51
|
+
MediaNoArg: StyleMediaNoArgFn<Style, Self>;
|
|
52
|
+
MediaArgs: StyleMediaArgsFn<Style, Self, SelectorArg<Selector>>;
|
|
53
|
+
MediaArg: StyleMediaArgFn<Style, Self, SelectorArg<Selector>>;
|
|
54
|
+
AtRuleNoArg: StyleAtRuleNoArgFn<Style, Self>;
|
|
55
|
+
AtRuleArgs: StyleAtRuleArgsFn<Style, Self, SelectorArg<Selector>>;
|
|
56
|
+
AtRuleArg: StyleAtRuleArgFn<Style, Self, SelectorArg<Selector>>;
|
|
57
|
+
Args: StyleArgsFn<Style, Self, SelectorArg<Selector>>;
|
|
58
|
+
Arg: StyleArgFn<Style, Self, SelectorArg<Selector>>;
|
|
59
|
+
Default: StyleFn<Style, Self>;
|
|
60
|
+
}>;
|
|
61
|
+
type ScopeFn<Style, Result> = {
|
|
62
|
+
(styles: Style): Result;
|
|
63
|
+
};
|
|
64
|
+
type ScopeArgFn<Style, Result, Arg extends string> = {
|
|
65
|
+
(selector: Arg, styles: Style): Result;
|
|
66
|
+
};
|
|
67
|
+
type ScopeArgsFn<Style, Result, Arg extends string> = {
|
|
68
|
+
(selector: Arg | Arg[], styles: Style): Result;
|
|
69
|
+
};
|
|
70
|
+
type ScopeAtRuleFn<Style, Result, Arg> = {
|
|
71
|
+
(selector: Arg, styles: Style): Result;
|
|
72
|
+
};
|
|
73
|
+
type ScopeAtRuleNoArgFn<Style, Result> = {
|
|
74
|
+
(styles: Style): Result;
|
|
75
|
+
};
|
|
76
|
+
type ScopeMediaFn<Style, Result, Arg> = ScopeAtRuleFn<Style, Result, Arg> & {
|
|
77
|
+
(weight: number, selector: Arg, styles: Style): Result;
|
|
78
|
+
};
|
|
79
|
+
type ScopeMediaNoArgFn<Style, Result> = ScopeAtRuleNoArgFn<Style, Result> & {
|
|
80
|
+
(weight: number, styles: Style): Result;
|
|
81
|
+
};
|
|
82
|
+
type ScopeAtRuleArgFn<Style, Result, Arg extends string> = ScopeAtRuleFn<Style, Result, Arg>;
|
|
83
|
+
type ScopeAtRuleArgsFn<Style, Result, Arg extends string> = ScopeAtRuleFn<Style, Result, Arg | Arg[]>;
|
|
84
|
+
type ScopeMediaArgFn<Style, Result, Arg extends string> = ScopeMediaFn<Style, Result, Arg>;
|
|
85
|
+
type ScopeMediaArgsFn<Style, Result, Arg extends string> = ScopeMediaFn<Style, Result, Arg | Arg[]>;
|
|
86
|
+
type GetScopeFn<Selector, Style, Result> = GetSelectorFn<SelectorString<Selector>, {
|
|
87
|
+
MediaNoArg: ScopeMediaNoArgFn<Style, Result>;
|
|
88
|
+
MediaArgs: ScopeMediaArgsFn<Style, Result, SelectorArg<Selector>>;
|
|
89
|
+
MediaArg: ScopeMediaArgFn<Style, Result, SelectorArg<Selector>>;
|
|
90
|
+
AtRuleNoArg: ScopeAtRuleNoArgFn<Style, Result>;
|
|
91
|
+
AtRuleArgs: ScopeAtRuleArgsFn<Style, Result, SelectorArg<Selector>>;
|
|
92
|
+
AtRuleArg: ScopeAtRuleArgFn<Style, Result, SelectorArg<Selector>>;
|
|
93
|
+
Args: ScopeArgsFn<Style, Result, SelectorArg<Selector>>;
|
|
94
|
+
Arg: ScopeArgFn<Style, Result, SelectorArg<Selector>>;
|
|
95
|
+
Default: ScopeFn<Style, Result>;
|
|
96
|
+
}>;
|
|
97
|
+
export type StyleSelfFn<Style, Selectors> = (style?: StyleObject<Style>) => ReturnType<typeof styleRule<Style, Selectors>>;
|
|
98
|
+
export type SlotSelfFn<Style, Selectors> = (style?: StyleObject<Style>) => ReturnType<typeof slotRule<Style, Selectors>>;
|
|
99
|
+
export type ScopeSelfFn<Selectors> = (styles?: ScopeItems) => ReturnType<typeof scopeRule<Selectors>>;
|
|
100
|
+
export type StyleSelectorFns<Style, Selectors> = {
|
|
101
|
+
[P in keyof Selectors]: GetStyleFn<Selectors[P], Style, ReturnType<typeof styleRule<Style, Selectors>>>;
|
|
102
|
+
};
|
|
103
|
+
export type SlotSelectorFns<Style, Selectors> = {
|
|
104
|
+
[P in keyof Selectors]: GetStyleFn<Selectors[P], Style, ReturnType<typeof slotRule<Style, Selectors>>>;
|
|
105
|
+
};
|
|
106
|
+
export type SlotOverrideSelectorFns<Style, Selectors> = {
|
|
107
|
+
[P in keyof Selectors]: GetStyleFn<Selectors[P], Style, ReturnType<typeof slotOverrideRule<Style, Selectors>>>;
|
|
108
|
+
};
|
|
109
|
+
export type SelectorOverrideSelectorFns<Style, Selectors> = {
|
|
110
|
+
[P in keyof Selectors]: GetStyleFn<Selectors[P], Style, ReturnType<typeof selectorOverrideRule<Style, Selectors>>>;
|
|
111
|
+
};
|
|
112
|
+
export type ScopeSelectorFns<Selectors> = {
|
|
113
|
+
[P in keyof Selectors]: GetScopeFn<Selectors[P], ScopeItems, ReturnType<typeof scopeRule<Selectors>>>;
|
|
114
|
+
};
|
|
115
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Selector } from "../../selector/index.js";
|
|
2
|
+
import type { StyleObject } from "../../style/types.js";
|
|
3
|
+
import type { DebugData, ScopeData, SelectorData, SelectorOverrideData, SlotData, SlotOverrideData, StyleData } from "../data/index.js";
|
|
4
|
+
import type { ScopeSelectorFns, ScopeSelfFn, SelectorOverrideSelectorFns, SlotOverrideSelectorFns, SlotSelectorFns, StyleSelectorFns } from "./fns.js";
|
|
5
|
+
export type { ScopeSelfFn };
|
|
6
|
+
export type MergeRuleStyleData<Style = unknown> = StyleData<Style> | StyleData<Style>[];
|
|
7
|
+
export type AtRuleStyleData<Style = unknown> = StyleObject<Style> | StyleData<Style>;
|
|
8
|
+
export type SelectorOverrideStyleData<Style = unknown> = StyleObject<Style> | StyleData<Style>;
|
|
9
|
+
export type SelectorsRecord = Record<string, Selector>;
|
|
10
|
+
export type SelectItemFalsy = false | null | undefined;
|
|
11
|
+
export type SelectItems<Item> = Item | (Item | SelectItemFalsy)[];
|
|
12
|
+
export type StyleBuilderFns<Style, Selectors> = StyleSelectorFns<Style, Selectors> & {};
|
|
13
|
+
export type SlotBuilderFns<Style, Selectors> = SlotSelectorFns<Style, Selectors> & {};
|
|
14
|
+
export type SlotOverrideBuilderFns<Style, Selectors> = SlotOverrideSelectorFns<Style, Selectors> & {};
|
|
15
|
+
export type SelectorOverrideBuilderFns<Style, Selectors> = SelectorOverrideSelectorFns<Style, Selectors> & {};
|
|
16
|
+
export type ScopeFns<Selectors> = ScopeSelectorFns<Selectors> & {};
|
|
17
|
+
export type StyleBuilder<Style, Selectors> = StyleData<Style> & StyleBuilderFns<Style, Selectors>;
|
|
18
|
+
export type SlotBuilder<Style, Selectors> = SlotData<Style> & ((style?: StyleObject<Style>) => SlotOverrideBuilder<Style, Selectors>) & SlotBuilderFns<Style, Selectors>;
|
|
19
|
+
export type SlotOverrideBuilder<Style, Selectors> = SlotOverrideData<Style> & SlotOverrideBuilderFns<Style, Selectors>;
|
|
20
|
+
export type ScopeBuilder<Selectors> = ScopeData & ScopeFns<Selectors> & {};
|
|
21
|
+
export type SelectorBuilder<Style, Selectors> = SelectorData<Style> & ((style?: SelectorOverrideStyleData<Style>, debug?: DebugData) => SelectorOverrideBuilder<Style, Selectors>) & SelectorOverrideBuilderFns<Style, Selectors>;
|
|
22
|
+
export type SelectorOverrideBuilder<Style, Selectors> = SelectorOverrideData<Style> & ((style?: SelectorOverrideStyleData<Style>) => SelectorOverrideBuilder<Style, Selectors>) & SelectorOverrideBuilderFns<Style, Selectors>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StyleObject, StyleTransform } from "../style/index.js";
|
|
2
|
+
import { type DebugData } from "./data/debug.js";
|
|
3
|
+
export declare const FnPrefixStyle = "style.";
|
|
4
|
+
export declare const FnPrefixSlot = "slot.";
|
|
5
|
+
export declare const FnPrefixScope = "scope.";
|
|
6
|
+
export declare const FnPrefixSelector = "selector.";
|
|
7
|
+
export declare function runtimeCallsite(): import("../utils/trace.js").TraceCallsite | null;
|
|
8
|
+
export declare function resolveCallsite(debug: DebugData | null | undefined): import("../utils/trace.js").TraceCallsite | null;
|
|
9
|
+
export declare function transformStyle<Style>(style: StyleObject<Style>, transform: StyleTransform<Style> | null): import("../index.js").TransformStyleObject<import("../index.js").CSSProperties> | StyleObject<Style>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CompilerCacheArgs = {
|
|
2
|
+
cacheDir: string;
|
|
3
|
+
};
|
|
4
|
+
export type CompilerCacheFile<T = unknown> = {
|
|
5
|
+
filePath: string;
|
|
6
|
+
contentHash: string;
|
|
7
|
+
cacheContent: T;
|
|
8
|
+
cacheType: string;
|
|
9
|
+
};
|
|
10
|
+
export type CompilerCacheGetItemArgs = {
|
|
11
|
+
filePath: string;
|
|
12
|
+
contentHash: string;
|
|
13
|
+
cacheType: string;
|
|
14
|
+
};
|
|
15
|
+
export type CompilerCacheSetItemArgs<T = unknown> = CompilerCacheGetItemArgs & {
|
|
16
|
+
cacheContent: T;
|
|
17
|
+
persistent?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type CompilerCache = ReturnType<typeof createCompilerCache>;
|
|
20
|
+
export declare function createCompilerCache(args: CompilerCacheArgs): {
|
|
21
|
+
getItem: <T>(args: CompilerCacheGetItemArgs) => T | null;
|
|
22
|
+
setItem: <T>(args: CompilerCacheSetItemArgs<T>) => void;
|
|
23
|
+
clear: () => void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CompilerRuntimeMode } from "./constants.js";
|
|
2
|
+
import type { CompilerInvalidateFileInfo, CompilerOptions, TransformDebugArgs, TransformDebugResult, TransformDebugRscResult, TransformExtractArgs, TransformExtractResult } from "./types.js";
|
|
3
|
+
export type CompilerArgs = {
|
|
4
|
+
projectDir: string;
|
|
5
|
+
cacheDir: string;
|
|
6
|
+
runtimeMode: CompilerRuntimeMode | null;
|
|
7
|
+
};
|
|
8
|
+
export type Compiler = ReturnType<typeof createCompiler>;
|
|
9
|
+
export type CompilerInternal = ReturnType<typeof createCompilerInternal>;
|
|
10
|
+
export declare function createCompiler(args: CompilerArgs, options: CompilerOptions): {
|
|
11
|
+
compileDebug: (args: TransformDebugArgs) => TransformDebugResult | null;
|
|
12
|
+
compileDebugRSC: (args: TransformDebugArgs) => TransformDebugRscResult | null;
|
|
13
|
+
compileExtract: (args: TransformExtractArgs) => TransformExtractResult | null;
|
|
14
|
+
getExtractedCss: () => string;
|
|
15
|
+
invalidateFile: (_info: CompilerInvalidateFileInfo) => void;
|
|
16
|
+
};
|
|
17
|
+
declare function createCompilerInternal(args: CompilerArgs, options: CompilerOptions): {
|
|
18
|
+
projectDir: string;
|
|
19
|
+
cacheDir: string;
|
|
20
|
+
runtimeMode: CompilerRuntimeMode | null;
|
|
21
|
+
cache: {
|
|
22
|
+
getItem: <T>(args: import("./cache.js").CompilerCacheGetItemArgs) => T | null;
|
|
23
|
+
setItem: <T>(args: import("./cache.js").CompilerCacheSetItemArgs<T>) => void;
|
|
24
|
+
clear: () => void;
|
|
25
|
+
};
|
|
26
|
+
options: CompilerOptions;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { StyleCheckOptions } from "../../config/config/check.js";
|
|
2
|
+
import type { CssConfig } from "../../config/config/css.js";
|
|
3
|
+
import type { DevRuntimeOptions } from "../../config/config/dev.js";
|
|
4
|
+
import type { CheckSelectorMode } from "../../config/types.js";
|
|
5
|
+
import type { ReplaceProps } from "../../utils/type.js";
|
|
6
|
+
import type { CompilerCssPropOptions } from "../cssProp.js";
|
|
7
|
+
import type { CssExtractRule } from "../extract/index.js";
|
|
8
|
+
import type { BabelTransformSourceMap } from "../transform/utils/babel.js";
|
|
9
|
+
import type { ImportSource } from "../utils/import_source.js";
|
|
10
|
+
import type { GetSourcemapFilePathFn } from "../utils/sourcemap.js";
|
|
11
|
+
export type CompilerCssOptions = Partial<CssConfig> & {
|
|
12
|
+
debugClassName?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type CompilerDevOptions = ReplaceProps<DevRuntimeOptions, {
|
|
15
|
+
checkSelector?: CheckSelectorMode;
|
|
16
|
+
}>;
|
|
17
|
+
export type DevSourcemapMode = 'sourceUrl' | 'sourceContent' | 'sidecarServer';
|
|
18
|
+
export type CompilerOptions = {
|
|
19
|
+
hoist?: boolean;
|
|
20
|
+
check?: StyleCheckOptions;
|
|
21
|
+
css?: CompilerCssOptions;
|
|
22
|
+
cssProp?: false | CompilerCssPropOptions;
|
|
23
|
+
dev?: CompilerDevOptions;
|
|
24
|
+
importSources?: ImportSource[];
|
|
25
|
+
getSourcemapFilePath?: GetSourcemapFilePathFn;
|
|
26
|
+
devSourcemap?: DevSourcemapMode;
|
|
27
|
+
};
|
|
28
|
+
export type TransformDebugArgs = {
|
|
29
|
+
code: string;
|
|
30
|
+
sourcemap: BabelTransformSourceMap;
|
|
31
|
+
filePath: string;
|
|
32
|
+
};
|
|
33
|
+
export type TransformDebugResult = {
|
|
34
|
+
code: string;
|
|
35
|
+
sourcemap: string | null;
|
|
36
|
+
};
|
|
37
|
+
export type TransformDebugRscResult = TransformDebugResult & {
|
|
38
|
+
css: string;
|
|
39
|
+
rules: CssExtractRule[];
|
|
40
|
+
};
|
|
41
|
+
export type TransformExtractArgs = {
|
|
42
|
+
code: string;
|
|
43
|
+
sourcemap: BabelTransformSourceMap;
|
|
44
|
+
filePath: string;
|
|
45
|
+
};
|
|
46
|
+
export type TransformExtractResult = {
|
|
47
|
+
code: string;
|
|
48
|
+
rules: CssExtractRule[];
|
|
49
|
+
sourcemap: string | null;
|
|
50
|
+
};
|
|
51
|
+
export type CompilerInvalidateFileInfo = {
|
|
52
|
+
filePath: string;
|
|
53
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CssExtractRule } from "./types.js";
|
|
2
|
+
export type CompilerCssCollector = ReturnType<typeof createCssCollector>;
|
|
3
|
+
export declare function createCssCollector(): {
|
|
4
|
+
add(item: CssExtractRule): void;
|
|
5
|
+
addMany(items: CssExtractRule[]): void;
|
|
6
|
+
getItems(): CssExtractRule[];
|
|
7
|
+
clear(): void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type CssConfig } from "../../config/config/css.js";
|
|
2
|
+
import type { CssExtractRule } from "./types.js";
|
|
3
|
+
type CssOptions = Pick<CssConfig, 'layer' | 'layers' | 'layerNamespace'>;
|
|
4
|
+
export type CompilerExtractCssArgs = Partial<CssOptions>;
|
|
5
|
+
export declare function extractCss(items: CssExtractRule[], args: CompilerExtractCssArgs): string;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LayerPriority } from "../../atomic/layer/index.js";
|
|
2
|
+
import type { ExtractedScopeItem, ExtractedSlotItem, ExtractedSlotOverrideItem, ExtractedStyleItem } from "../../builder/data/index.js";
|
|
3
|
+
import type { TRACE_STYLE, TRACE_VALUE } from "../../builder/data/debug.js";
|
|
4
|
+
export type CssExtractStyleItem = ExtractedStyleItem;
|
|
5
|
+
export type CssExtractSlotItem = ExtractedSlotItem;
|
|
6
|
+
export type CssExtractSlotOverrideItem = ExtractedSlotOverrideItem;
|
|
7
|
+
export type CssExtractScopeItem = ExtractedScopeItem;
|
|
8
|
+
export type CssExtractItem = CssExtractStyleItem | CssExtractSlotItem | CssExtractSlotOverrideItem | CssExtractScopeItem;
|
|
9
|
+
export type CssExtractRule = {
|
|
10
|
+
dedupe: string;
|
|
11
|
+
className: string;
|
|
12
|
+
css: string;
|
|
13
|
+
priority: LayerPriority;
|
|
14
|
+
important?: boolean;
|
|
15
|
+
layer?: 'sheet' | false;
|
|
16
|
+
trace?: {
|
|
17
|
+
filePath: string;
|
|
18
|
+
line: number;
|
|
19
|
+
column: number;
|
|
20
|
+
trace?: typeof TRACE_STYLE | typeof TRACE_VALUE;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createCssPropPlugin } from "./plugin.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CompilerOptions } from "../../compiler/types.js";
|
|
2
|
+
import type { BabelCore, BabelTypes, NodePath } from "../utils/babel.js";
|
|
3
|
+
type PluginState = BabelCore.PluginPass & {
|
|
4
|
+
options: CompilerOptions;
|
|
5
|
+
mergeId: BabelTypes.Identifier | null;
|
|
6
|
+
programPath: NodePath<BabelTypes.Program> | null;
|
|
7
|
+
changed: boolean;
|
|
8
|
+
};
|
|
9
|
+
type PluginArgs = {
|
|
10
|
+
options: CompilerOptions;
|
|
11
|
+
};
|
|
12
|
+
export declare function createCssPropPlugin(args: PluginArgs): (api: typeof BabelCore) => BabelCore.PluginObj<PluginState>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CheckSelectorMode, SourcemapLocationMode } from "../../../config/types.js";
|
|
2
|
+
import type { StyleFnMeta } from "../../../style/style.js";
|
|
3
|
+
import type { CompilerOptions } from "../../compiler/types.js";
|
|
4
|
+
import { type ImportSourceMatcher } from "../../utils/import_source.js";
|
|
5
|
+
import type { EvalModuleBindings, ImportMap, ResolveImportFn } from "../evaluator/types.js";
|
|
6
|
+
import type { ExtractTracer } from "../extract/plugin.js";
|
|
7
|
+
import type { BabelCore, BabelTypes, NodePath } from "../utils/babel.js";
|
|
8
|
+
type PluginState = BabelCore.PluginPass & {
|
|
9
|
+
options: CompilerOptions;
|
|
10
|
+
projectDir: string;
|
|
11
|
+
styleNames: Set<string>;
|
|
12
|
+
styleMetas: Map<string, StyleFnMeta>;
|
|
13
|
+
bindings: EvalModuleBindings;
|
|
14
|
+
imports: ImportMap;
|
|
15
|
+
resolveImport: ResolveImportFn;
|
|
16
|
+
importSourceMatcher: ImportSourceMatcher;
|
|
17
|
+
checkSelector: CheckSelectorMode | undefined;
|
|
18
|
+
filePath: string;
|
|
19
|
+
fileId: string;
|
|
20
|
+
sourcemapTrace: SourcemapTrace;
|
|
21
|
+
programPath: NodePath<BabelTypes.Program> | null;
|
|
22
|
+
sourceUrlId: BabelTypes.Identifier | null;
|
|
23
|
+
sourceContentId: BabelTypes.Identifier | null;
|
|
24
|
+
};
|
|
25
|
+
type PluginArgs = {
|
|
26
|
+
options: CompilerOptions;
|
|
27
|
+
projectDir: string;
|
|
28
|
+
sourceUrl: string;
|
|
29
|
+
sourceContent: string | null;
|
|
30
|
+
tracer: ExtractTracer;
|
|
31
|
+
};
|
|
32
|
+
type SourcemapTrace = SourcemapLocationMode;
|
|
33
|
+
export declare function createDebugPlugin(args: PluginArgs): (api: typeof BabelCore) => BabelCore.PluginObj<PluginState>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CompilerInternal, TransformDebugArgs, TransformDebugResult } from "../../compiler/index.js";
|
|
2
|
+
import type { ExtractTracer } from "../extract/plugin.js";
|
|
3
|
+
type TransformDebugDeps = {
|
|
4
|
+
tracer: ExtractTracer;
|
|
5
|
+
};
|
|
6
|
+
export declare function transformDebug(internal: CompilerInternal, args: TransformDebugArgs, deps: TransformDebugDeps): TransformDebugResult | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TokenNameFormat } from "../../../../config/types.js";
|
|
2
|
+
import type { CallArg, CallArgs } from "../../syntax/types.js";
|
|
3
|
+
import type { BabelTypes } from "../../utils/babel.js";
|
|
4
|
+
export type DebugTraceProperty = BabelTypes.ObjectProperty & {
|
|
5
|
+
__styleSourcemapStyleLoc?: BabelTypes.SourceLocation['start'];
|
|
6
|
+
__styleSourcemapStyleSourceUrl?: string | null;
|
|
7
|
+
__styleSourcemapValueLoc?: BabelTypes.SourceLocation['start'];
|
|
8
|
+
__styleSourcemapValueSourceUrl?: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function buildDebugDataObject(t: typeof BabelTypes, node: BabelTypes.CallExpression, fileId: string, sourceUrlRef: BabelTypes.Expression, sourceContentRef: BabelTypes.Expression | null, tokenNameFormat?: TokenNameFormat, styleArg?: CallArg, locOverride?: BabelTypes.SourceLocation['start'] | null, classNameArg?: boolean): BabelTypes.ObjectExpression;
|
|
11
|
+
export declare function hasDebugArgument(args: CallArgs): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TRACE_STYLE, TRACE_VALUE } from "../../../builder/data/debug.js";
|
|
2
|
+
import type { StyleFnMeta } from "../../../style/style.js";
|
|
3
|
+
import type { StyleTransform } from "../../../style/transform.js";
|
|
4
|
+
import type { CompilerRuntimeMode } from "../../compiler/index.js";
|
|
5
|
+
import type { BabelTypes } from "../utils/babel.js";
|
|
6
|
+
import type { EvalFail, EvalModuleBindings, EvalOk, EvalResult, ImportMap, ResolveImportFn } from "./types.js";
|
|
7
|
+
export declare const COMPILED_RUNTIME_VALUE: unique symbol;
|
|
8
|
+
export declare const COMPILED_STYLE_OBJECT_LOCATIONS: unique symbol;
|
|
9
|
+
export type CompiledRuntimeValue = {
|
|
10
|
+
[COMPILED_RUNTIME_VALUE]?: BabelTypes.Expression;
|
|
11
|
+
};
|
|
12
|
+
export type CompiledStyleObjectLocations = Record<string, {
|
|
13
|
+
filePath: string;
|
|
14
|
+
line: number;
|
|
15
|
+
column: number;
|
|
16
|
+
trace?: typeof TRACE_STYLE | typeof TRACE_VALUE;
|
|
17
|
+
variable?: boolean;
|
|
18
|
+
variableLine?: number;
|
|
19
|
+
variableColumn?: number;
|
|
20
|
+
}>;
|
|
21
|
+
export type CompiledStyleObject = Record<string, unknown> & {
|
|
22
|
+
[COMPILED_STYLE_OBJECT_LOCATIONS]?: CompiledStyleObjectLocations;
|
|
23
|
+
};
|
|
24
|
+
export declare function evalOk(value: unknown): EvalOk;
|
|
25
|
+
export declare function evalFail(reason: string): EvalFail;
|
|
26
|
+
export type EvalScope = {
|
|
27
|
+
bindings: EvalModuleBindings;
|
|
28
|
+
imports: ImportMap;
|
|
29
|
+
resolveImport: ResolveImportFn;
|
|
30
|
+
filePath: string;
|
|
31
|
+
styleFilePath?: string;
|
|
32
|
+
styleNames?: Set<string>;
|
|
33
|
+
sheetNames?: Set<string>;
|
|
34
|
+
styleMetas?: Map<string, StyleFnMeta>;
|
|
35
|
+
bindingNodes?: Map<string, BabelTypes.Node>;
|
|
36
|
+
styleTransform?: StyleTransform | null;
|
|
37
|
+
sourcemapTrace?: 'style' | 'value';
|
|
38
|
+
runtimeMode?: CompilerRuntimeMode | null;
|
|
39
|
+
};
|
|
40
|
+
export declare function evaluateNode(node: BabelTypes.Node | null | undefined, scope: EvalScope): EvalResult;
|
|
41
|
+
export declare function evaluateEnumDeclaration(node: BabelTypes.TSEnumDeclaration, scope: EvalScope): EvalResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CompilerInternal } from "../../compiler/index.js";
|
|
2
|
+
import type { BabelCore } from "../utils/babel.js";
|
|
3
|
+
import type { EvalModuleBindings } from "./types.js";
|
|
4
|
+
export type Tracer = ReturnType<typeof createTracer>;
|
|
5
|
+
export declare function createTracer(internal: CompilerInternal): {
|
|
6
|
+
resolveImport: (babel: typeof BabelCore, source: string, fromFile: string) => EvalModuleBindings | null;
|
|
7
|
+
traceModule: (babel: typeof BabelCore, source: string, fromFile: string) => EvalModuleBindings | null;
|
|
8
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ResolveImportFn = (source: string, from: string) => EvalModuleBindings | null;
|
|
2
|
+
export type ImportMap = Map<string, {
|
|
3
|
+
source: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type EvalModuleBindings = Map<string, EvalResult>;
|
|
7
|
+
export type EvalSlotRef = {
|
|
8
|
+
ok: false;
|
|
9
|
+
reason: 'slot-ref';
|
|
10
|
+
filePath: string;
|
|
11
|
+
slotId: string;
|
|
12
|
+
};
|
|
13
|
+
export type EvalOk = {
|
|
14
|
+
ok: true;
|
|
15
|
+
value: unknown;
|
|
16
|
+
};
|
|
17
|
+
export type EvalFail = {
|
|
18
|
+
ok: false;
|
|
19
|
+
reason: string;
|
|
20
|
+
};
|
|
21
|
+
export type EvalResult = EvalOk | EvalFail | EvalSlotRef;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StyleFnMeta } from "../../../../style/style.js";
|
|
2
|
+
import { CompilerRuntimeMode } from "../../../compiler/constants.js";
|
|
3
|
+
import type { CompilerOptions } from "../../../compiler/types.js";
|
|
4
|
+
import { type EvalScope } from "../../evaluator/evaluator.js";
|
|
5
|
+
import { type StyleChainParseResult } from "./extract_chain.js";
|
|
6
|
+
import type { CompiledChainData } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Compile a parsed chain into extracted items and CSS rules.
|
|
9
|
+
* Returns null if any argument cannot be statically evaluated.
|
|
10
|
+
*/
|
|
11
|
+
export declare function compileChain(chain: NonNullable<StyleChainParseResult>, fileId: string, nodeLoc: {
|
|
12
|
+
line: number;
|
|
13
|
+
column: number;
|
|
14
|
+
} | null | undefined, scope: EvalScope, opts: CompilerOptions, runtimeMode: CompilerRuntimeMode | null, meta: StyleFnMeta | null, styleNames?: Set<string>): CompiledChainData | null;
|
|
15
|
+
export declare function computeSlotId(fileId: string, loc: {
|
|
16
|
+
line: number;
|
|
17
|
+
column: number;
|
|
18
|
+
} | null | undefined): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BabelTypes } from "../../utils/babel.js";
|
|
2
|
+
export declare const STATIC_MERGE_METHOD = "$$style.merge";
|
|
3
|
+
export type StyleChainMethod = {
|
|
4
|
+
name: string;
|
|
5
|
+
args: BabelTypes.Node[];
|
|
6
|
+
nameNode: BabelTypes.Node;
|
|
7
|
+
};
|
|
8
|
+
export type StyleChainParseResult = {
|
|
9
|
+
kind: 'style' | 'slot' | 'scope' | 'sheet' | 'selector';
|
|
10
|
+
rootName: string;
|
|
11
|
+
baseArgs: BabelTypes.Node[];
|
|
12
|
+
methods: StyleChainMethod[];
|
|
13
|
+
} | null;
|
|
14
|
+
export type StyleSlotRef = {
|
|
15
|
+
kind: 'slot-ref';
|
|
16
|
+
slotId: string;
|
|
17
|
+
methods: StyleChainMethod[];
|
|
18
|
+
};
|
|
19
|
+
export declare function extractStyleChain(node: BabelTypes.Node, styleNames: Set<string>, sheetNames?: Set<string>): StyleChainParseResult;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CreateSheetOptions } from "../../../../builder/data/index.js";
|
|
2
|
+
import type { StyleTokenOverride } from "../../../../style/token.js";
|
|
3
|
+
import type { CssExtractItem, CssExtractRule } from "../../../extract/index.js";
|
|
4
|
+
import type { BabelTypes } from "../../utils/babel.js";
|
|
5
|
+
export type { CssExtractItem, CssExtractRule };
|
|
6
|
+
export type CompiledChainType = 'style' | 'sheet' | 'slot' | 'scope';
|
|
7
|
+
export type CompiledCssItem = CssExtractItem & {
|
|
8
|
+
valueNode?: BabelTypes.Expression;
|
|
9
|
+
hasParentSelector?: true;
|
|
10
|
+
sourceTrace?: NonNullable<CssExtractRule['trace']> & {
|
|
11
|
+
property: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type CompiledTokenItem = {
|
|
15
|
+
kind: 'token';
|
|
16
|
+
tokenId: string;
|
|
17
|
+
value: StyleTokenOverride;
|
|
18
|
+
valueNode: BabelTypes.Expression;
|
|
19
|
+
};
|
|
20
|
+
export type CompiledStyleSpreadItem = {
|
|
21
|
+
kind: 'style-spread';
|
|
22
|
+
expression: BabelTypes.Expression;
|
|
23
|
+
items: CompiledCssItem[];
|
|
24
|
+
};
|
|
25
|
+
export type CompiledItem = CompiledCssItem | CompiledTokenItem | CompiledStyleSpreadItem;
|
|
26
|
+
export type CompiledChainData = {
|
|
27
|
+
type: CompiledChainType;
|
|
28
|
+
slotId?: string;
|
|
29
|
+
items: CompiledItem[];
|
|
30
|
+
rules: CssExtractRule[];
|
|
31
|
+
sheetOptions?: CreateSheetOptions;
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompilerRuntimeMode } from "../../compiler/index.js";
|
|
2
|
+
import type { CompilerOptions } from "../../compiler/types.js";
|
|
3
|
+
import type { CompilerCssCollector } from "../../extract/collector.js";
|
|
4
|
+
import { BabelCore } from "../utils/babel.js";
|
|
5
|
+
import { type ExtractPluginState } from "./utils/state.js";
|
|
6
|
+
export type PluginState = BabelCore.PluginPass & ExtractPluginState;
|
|
7
|
+
type PluginArgs = {
|
|
8
|
+
options: CompilerOptions;
|
|
9
|
+
collector: CompilerCssCollector;
|
|
10
|
+
mode?: 'extract' | 'collect';
|
|
11
|
+
projectDir: string;
|
|
12
|
+
runtimeMode: CompilerRuntimeMode | null;
|
|
13
|
+
styleFilePath?: string;
|
|
14
|
+
tracer: ExtractTracer;
|
|
15
|
+
};
|
|
16
|
+
export type ExtractTracer = {
|
|
17
|
+
resolveImport(babel: typeof BabelCore, source: string, fromFile: string): ReturnType<ExtractPluginState['resolveImport']>;
|
|
18
|
+
};
|
|
19
|
+
export declare function createExtractPlugin(args: PluginArgs): (api: typeof BabelCore) => BabelCore.PluginObj<PluginState>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CompilerInternal, TransformExtractArgs, TransformExtractResult } from "../../compiler/index.js";
|
|
2
|
+
import type { CompilerCssCollector } from "../../extract/index.js";
|
|
3
|
+
import { type ExtractTracer } from "./plugin.js";
|
|
4
|
+
export type TransformExtractDeps = {
|
|
5
|
+
collector: CompilerCssCollector;
|
|
6
|
+
mode?: 'extract' | 'collect';
|
|
7
|
+
styleFilePath?: string;
|
|
8
|
+
tracer: ExtractTracer;
|
|
9
|
+
};
|
|
10
|
+
export declare function transformExtract(internal: CompilerInternal, args: TransformExtractArgs, deps: TransformExtractDeps): TransformExtractResult | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BabelTypes } from "../../utils/babel.js";
|
|
2
|
+
import type { CompiledChainData, CompiledCssItem, CompiledTokenItem } from "../chain/index.js";
|
|
3
|
+
import type { ExtractPluginState } from "./state.js";
|
|
4
|
+
type BuildReplacementOptions = {
|
|
5
|
+
getRuntimeToken?: (item: CompiledCssItem, valueNode: BabelTypes.Expression) => BabelTypes.Expression | null;
|
|
6
|
+
getTokenOverride?: (item: CompiledTokenItem) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function buildReplacement(t: typeof BabelTypes, chain: CompiledChainData, state: ExtractPluginState, options?: BuildReplacementOptions): BabelTypes.Expression | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BabelTypes, NodePath } from "../../utils/babel.js";
|
|
2
|
+
import type { CompiledChainData } from "../chain/index.js";
|
|
3
|
+
import type { ExtractPluginState } from "./state.js";
|
|
4
|
+
export declare function recordCompiledBinding(path: NodePath<BabelTypes.CallExpression>, state: ExtractPluginState, chain: CompiledChainData): void;
|