Skip to content

Feat: add rulesVariants feature #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Feat: add rulesVariants feature #176

wants to merge 3 commits into from

Conversation

Jeong-jj
Copy link
Member

@Jeong-jj Jeong-jj commented Apr 6, 2025

Description

Add rulesVariants feature, It's inspired by PandaCSS's defineSlotRecipe().

Related Issue

#154

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Expanded styling configuration options for more dynamic, compound design customizations.
    • Introduced a new function, rulesVariants, for processing slot configurations.
  • Refactor
    • Improved internal handling of complex style configurations to enhance flexibility and consistency.

Additional context

Checklist

It has some build and test error, so it WIP

Copy link

changeset-bot bot commented Apr 6, 2025

⚠️ No Changeset found

Latest commit: e8939a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Apr 6, 2025

Walkthrough

This pull request introduces several modifications to the type definitions in the types.ts and index.ts files within the CSS rules package. Key updates include the addition of new types such as SlotRecipeStyleRule, SlotRecipeDefinition, and SlotRecipeResult, as well as modifications to the RecipeStyleRule type. Additionally, a new function rulesVariants is introduced in index.ts, enhancing the functionality related to styling rules.

Changes

File Change Summary
packages/css/src/rules/types.ts Added new types: SlotRecipeStyleRule, SlotRecipeDefinition, and SlotRecipeResult; updated RecipeStyleRule to be exported and modified PatternOptions to include CSSPropertiesWithVars.
packages/css/src/rules/index.ts Added rulesVariants function, updated processCompoundStyle function signature to use RecipeStyleRule instead of `ComplexCSSRule

Possibly related issues

  • Rules Variants #154: The changes in this PR, particularly the introduction of the rulesVariants function and modifications to the RecipeStyleRule type, are directly related to the functionality described in this issue.

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • black7375

Poem

I'm a little rabbit, hopping with glee,
New types and functions, oh what a spree!
With rulesVariants in play,
Styling's more fun every day.
In the world of CSS, we leap and bound,
With patterns and slots, joy can be found! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

yarn install v1.22.22
[1/4] Resolving packages...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
/opt/yarn-v1.22.22/lib/cli.js:66663
throw new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.statusCode);
^

ResponseError: Request failed "503 Service Unavailable"
at ResponseError.ExtendableBuiltin (/opt/yarn-v1.22.22/lib/cli.js:696:66)
at new ResponseError (/opt/yarn-v1.22.22/lib/cli.js:802:124)
at params.callback [as _callback] (/opt/yarn-v1.22.22/lib/cli.js:66663:19)
at self.callback (/opt/yarn-v1.22.22/lib/cli.js:141415:22)
at Request.emit (node:events:519:28)
at Request. (/opt/yarn-v1.22.22/lib/cli.js:142387:10)
at Request.emit (node:events:519:28)
at IncomingMessage. (/opt/yarn-v1.22.22/lib/cli.js:142309:12)
at Object.onceWrapper (node:events:633:28)
at IncomingMessage.emit (node:events:531:35) {
responseCode: 503
}

Node.js v22.9.0

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Apr 6, 2025

Triggered from #176 by @​Jeong-jj.

Checking if we can fast forward main (871e38a) to feat/rulesVariants (de04d7c).

Target branch (main):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Pull request (feat/rulesVariants):

commit de04d7cc72fbef6454359eeb86c08b6426e25513 (pull_request/feat/rulesVariants)
Author: JeongJun <rgfdds98@gmail.com>
Date:   Sun Apr 6 13:57:30 2025 +0900

    test: add more test code about rulesVariants

Can't fast forward main (871e38a) to feat/rulesVariants (de04d7c). main (871e38a) is not a direct ancestor of feat/rulesVariants (de04d7c). Branches appear to have diverged at 0fda782:

* de04d7cc72fbef6454359eeb86c08b6426e25513 test: add more test code about rulesVariants
* daef85f25f351a4dc30ec586029697d7736c40ae Feat: rulesVariants function with Test Code
| * 871e38ae97311961dfd3adc543279459a70c5f68 Chore: Disable minify option
| * a963dc1854e0b4278e01c7008ec8187add2eecad feat: Co-location using babel
| *   6701e124b2532ffe78ab84bcfd22a8b34f12252b Add 'macaron/' from commit '2d226886aa1521285491734a0419983f0f61de33'
| |\  
| | * 2d226886aa1521285491734a0419983f0f61de33 release: v1.6.1
| | * c7b8ef6acdce16b593426f39f837cc46274af4bd fix: add options to esbuild plugins wrapper (#70)
| | * d42ed6cec5daa4aee8148b935d825b30c641dfc8 release: v1.6.0
| | * e066fd9d11f9a3cc6718efa630815ac1e3ddd3df feat(esbuild): add includeNodeModulesPattern option (#68)
| | * e40bf0568b703fa2d71b3c454473946c0d7e1040 release: v1.5.3
| | * 92bbe47522b1446d68069909055cf750fc82cb88 fix: depend on latest version of core
| | * 33507480aa804f0915aa0d44af472000a0470df4 release: v1.5.2
| | * b084e636075a1be23e48857d0c7ff729756c56ed fix: export types of react & solid adapter, esm issues with vite & qwik
| | * 1077aa0ea0220fff30f5ab4f3986dac696164416 release: v1.5.1
| | * ce672675778f37c7b8312b625df0366b19411ea6 chore: switch from yarn to npm workspaces
| | * 2bc26b4cbcf4d7526797c6ba61a0a59eb0b932a1 feat: add qwik adapter
| | * ac2a588990e0f2c487ccbcd5cb9ac5f721064a36 fix(#44): don't clear cache on watch
| | * 2fc412ad58ceed08c04f95ef4683af80f467dd9b release: v1.4.2
| | * a33a7fe2ba8311baa54eda3121acd0fc43304278 fix: suppress vite sourcemap warning
| | * f4797e5da9df4aefa0c680370c5bd302f6974ffc release: v1.4.0
| | * e63ce271c47537f4bdd46734fe136b9964962194 feat: pass ref when creating the component (#40)
| | * 828cbde478f78986a9d0705fe4bcb40836df8fc0 release: v1.3.0
| | * 5fa67942632c2eaf3f1984663a84612fbb5a58be feat: provide babel options as an argument for vite plugin (#39)
| | * 7e6d0dda16d51487f6add93cab0ac4752ca981d7 release: v1.2.1
| | * 346eab7ce159e62680821ff084e104c8704621e7 fix: support forwardRef types in react
| | * 0b25c7d82442058b797a8a7b419cc95d5e429b22 release: v1.2.0
| | * 296720bc0c36ecaacfb7cd11b8ed805855119177 feat: export vanilla-extract dynamic lib
| | * 5db5bed84e580b7b25985687267dcb77a9833bc8 release: v1.1.4
| | * aa493de321d8089840a50105d9a6a14f1cd3eb9f fix: typescript build error in esbuild plugin
| | * f0442dd718003facd5c56afc4f237e5cce7e5c87 fix: make @macaron-css/core side-effect free
| | * 6d6d927c317e9bc4c0db507af5aed5bbe794843e chore: bump dependencies
| | * b52abb5d5a1b852128521b9a7350862b3d613de1 release: v1.1.3
| | * 4b6fe0c9397c34fcb10e023e1793070bb96f19be fix(babel): fix max callstack err due to reference
| | * c02ef9d70d44a00c0c0c0a989e4d2d8dd86a58d6 release: v1.1.2
| | * d7ee03d5b04ce7746cda2a4be84ecd9fe880e69c fix(babel): move references from ignored styles
| | * c253ab7205c4b08485109052806221fd789b957a release: v1.1.1
| | * 024d30c470b793cf347816b6e9458a4120328e45 fix(babel): ignore extraction of styled
| | * 7d1f767eca85dd9140b33e61e206a187a046e65a release: v1.1.0
| | * 62e35c8ab05283cfdc5b309795d9a0c4386aec63 feat(babel): allow ignoring extraction
| | * 6d4054a40a98ceb210148c67a2dd26adf2ffec37 release: v1.0.1
| | * 0165d5961e46989c47a7c3548f2810e4c713eb9c fix(adapter): styled component type def (fix #13)
| | * e994919ab3aef26e375cd483145bd1321eba2fc7 Release 1.0.0
| | * dfe4eafb2dc64b654ef1c07704b42467bb46ee10 feat(react): `as` to change rendered component
| | * 7511a2e395c2d7ab17871286694fdbc4d10099ee chore: bump vite plugin
| | * c8f4f4b9dc8fddd287edfbda24e2d8c107cf57cd fix: handle unknown virtual files in vite plugin
| | * 428798446c8c403d5a96bf4f98db8f36c3bdfd75 bump macaron babel plugin
| | * 6734b853c1fe4c5d300cbf9c6095eec00465496a fix tests
| | * b7e45767ccc552966e2c45d68ba84c37825c5b4a fix installation issue
| | * af837d30c75291ea8457c0eb4cc7d2cf62b6f64a npm release
| | * 81afb8c72e922adc9ffae33181ec487bdb24d110 update deps and examples
| | * a910f9e7a2d2fe36f3eb64eceb729367ee726684 npm release
| | * 1d5fe89263bdb246d10db5a56c57f1dc9dd55531 rename $macaron to macaron$
| | * 9a42ce43a6a3e5d3648b31e7f64e232bc0a300df update react tests
| | * 0d243be7d36f4f376995aee8f6a3a7f672daf7ee implement block scoped eval ($macaron)
| | * 76186946c9ef8f650a989304f47521915e1feaa3 fix react types
| | * 999ec10cf65e9a3583fb26ce96603410a6998996 fix react adapter
| | * 4e573aea6ae08f5464332713c90b57db1dcc1031 remove unused code vite plugin
| | * 53bae126247fc904e6802691141658dc3bd2736f add custom implementation of recipes
| | * 328ae0c4d0750b257b5244e9f2030abc9ba38858 publish
| | * ae80ddd3a4c7bba43fda1f5f69d1d477dbc21a8c fix vite hmr bug
| | * 4cb6092c063698981eeb05baaa86405c93e16a93 publish
| | * 0811870bffcc98a9168bc3d49ca03204c5f6159b solid selectorFn shouldn't have default variants
| | * ea910d1c88581cd8d7517c43c532b68225047323 stringify stub path
| | * 020a7a9ed05807351cab7daed9daf20ec53210b4 type only imports babel
| | * 1b40bac1c176e34eb7739a546a906affa77663ed publish packages
| | * a84c28744513463bf1217a64d4222422ef66e50f fix the "template" bug with solid-js web transform
| | * f42e54b984c11f285bf33f664b4d95918487791d react inherit component and tests
| | * 2d2463803aa702b054558d4b0b5f8707abe49c4e solid adapter component inheritance
| | * 4fb0fda76deb9771a16c029274692d5916b4e680 fix vite ssr bug
| | * fe8d613c6f96c66a26661f537a5c155b92ac982e remove styled visitor for function serializer
| | * f6609eff3c55c48caeb3951f897ff3b6ce391402 vite fix monorepo issue
| | * 41ecff6bbe8a43a1125b011934e54584fcd58452 publish core, solid and react adapter
| | * 941269ad2224953c24980257d5d9a8f858cb77be using styled components as selectors
| | * 8b6934f1ec3d12cf7e72a2fd9dc424bd871aa8c9 override toString and fix types
| | * 9f1e8be8fc9e8869913b8e3710de48c6343586b3 publish babel fix
| | * fcc868c0d7a16d60353f643b6aab8a44cdca2f7a fix infinite loop in transforming function declarations
| | * 85cab023c83ad33718cb1cbbb19566418f5c88e9 update main/module/types babel
| | * d5b08e4cd84923742c530b8d22c00abf095f18f4 release vite plugin
| | * 60abf3efbf32aebb08b21d71225fb00949403168 fix vite plugin
| | * 77e8bf273fda8a2986f6646f11479e54ac854ae5 release
| | * 6d82095fd2ce02e43fc81292a46f9fd9d000d484 fix shared styles esbuild plugin
| | * 081dee7db62c23e55cd46fb8a7b08ee8cbe122a9 build packages
| | * 3473e58e24521d215f686ebdb5b2c99393877956 update vite plugin
| | * 107ef35c199c86813c8825653cd9d0be23eadc7d normalize file paths for linux
| | * 6c8be0ef23e878f1da29f5110133925a8d2525bc fix solid and react adapter
| | * 7ccdf8312d6440cf5d56cc19dbd41fd47cf9852d add styled api example to solid-start
| | * adc7ec4d159fb41f04ba5c4fe5b74b84bd16fae4 solid-start example
| | * 267ab582ed51f53a60fe3143bb5f880362f641d6 update tests
| | * c26d251245333cce0b68095dca7301314c0ba5f0 fix style declarations referencing each other
| | * 07f31bc792ea12ce1e68c4c4d1cbc3ac178c13c4 better data structures
| | * 89d8f85d8264b784e6af01db4cdb237ab8196331 fix recursive bindings
| | * d6f2fd0cbd89caab767433240c385efd2221d1e0 bump babel plugin
| | * db46851761a36bad2575d5b7424b7e0c510f585a improve build perf
| | * e8a883bcfe12e9b23f43e2de94c68a8bee2d47f4 bump versions
| | * 02fd9d4696af92a4be043dcdd570e76817ae3812 fix ts error
| | * 7efaa48606d0a434d6fbf9cd3d055d79b4c5ce2f fix binding traversal and simplify it alot
| | * d9acfc25400521f2e427462d2083d953d25b8dd6 allow tsx syntax in precompile step
| | * fbe8269b57f4536188f1d7a2f68ec82b0167cd80 simplify call expression traverser
| | * 7199492f80cf741fb776635c72e48d8096803732 fix type error
| | * 480827a9024a4084b8d6cc98ead9d50de2db174b declaration aliasing and proper ordering
| | * 8ee005b26eb6f4f1d9183f80c5370227de13080c styled api visitor for react
| | *   421f1750947cc52e1fd1cefc5117987a7368085a Merge branch 'react' into main
| | |\  
| | | * 4c97241f68cb38d3b083e416ff579b7c680af8f1 add react support
| | * | 6863175b4e47958fc35dd1d38099c990c332e139 fix: bindings transfer and naming conflict
| | |/  
| | * ebe2e8d14daed2ae71846004b878d17bbfa609dd binding push order
| | * 8ebfbe2b0270034a458f66487b220cd858348ec9 partially working expression extraction
| | * 254bb57b386adb172c5e7aa3fd4bd6788a1c2b57 remove renaming banner from packages
| | * ee7ebf15664e5b6b7c54d4f7902d5c8807ad3db4 rename to macaron!
| | * 4f40cfefe50e9f3db6856b95495e4069bc07ab39 release: comptime-css-babel@0.1.3
| | * 36c4a2fa658c115ca888ff6b01954abe5e7494f9 release: comptime-css@0.1.3
| | * f77d4be20107c1587e7c0fe953e43531db5182f8 fix babel plugin conflict with other plugns
| | * d5f2eb34322cf689e43957fabe0e4bdc4999ea78 add custom impl of createRuntimeFn with variants
| | * 38ef933b1d67403e41c06d7d733491ab9d2bfafe styled api babel todo
| | * 6ed5a8ac89af03829f17779098e9f0a98964d2e1 fix esbuild plugin caching
| | * 518b456f9dc660dfbc040659cd91a2ba75983bf1 improve vite plugin (fast)
| | * 8dff8fcb2c67b6d7b5586d45ab679a1bd4897896 move shared utils to comptime-css-integration
| | * 7c6bebdc718941c3a66e7d6412f86374e70e29a7 vite plugin hmr (slow)
| | * e0205ba20ab7cac94c5b03cf716f93da2c646d36 add vite plugin prototype (no hmr)
| | * 1de139148ba7b687c929274fb843b0a242ebdaf2 fix: add `pure` comment babel
| | * b0086a77d673b2bd4d9b4c8d4372c24689860a37 mark styled components as pure
| | * 9604a21ba04b301befff22ec974ea7d34708f782 release: comptime-css-esbuild@0.1.1
| | * 8ac0e5ece1beca181a5a79f952f775b9d471046b release: comptime-css-babel@0.1.2
| | * 758875609abd095383d0586d67e16675faf8a36d fix: remove duplication of imported idents b/w runtime and static extraction
| | * 72eba15eff2dcf1337974380b36037539f07b7b9 fix: crawl path after every modification
| | * 677f30a240f14a407846318475278a6105260b83 release: comptime-css-babel@0.1.1
| | * 0e5d0bba4e0c5acf77ef7e24896bcc31344995ca release: comptime-css@0.1.2
| | * 9e320d0cf0d24f92a09cfa2ea17e7428d4baccbb add repository in package.json
| | * 7d4ffda84e1e97c6b53b19bfaa68e0243eb9fd5e release: comptime-css@0.1.1
| | * 81da3dad0dac5d11bc882b0e4df841e214ab9f21 publish script
| | * 872eb3eff56557af43224026c080c5a58877f104 remove package scope
| | * 94b9872311e7a18036b40b6a8073eec93a5c80b2 add solid example and fix import check
| | * 45a5fb08be93854bd7ea95f19a56917c0800b4c3 add vanilla example
| | * 5a7d012742d39cacd9178c4fc5f0349e2ce41d97 organise code
| * 6e4fbc9f3b0000c26586aad9ab92628d3f853748 Chore: Version Packages
| * 617ce18fc0425da9b7d393f3020cfb88b4bf2a67 fix: test changeset
| * 9a4597fbf4b76afe5a678cebe2af01b683f40537 Fix: Changeset - More permissions
| * 8cb8a01e378ade3a881098e65f57509eaef0c8c2 Chore(deps): Bump the dev-dependencies group across 1 directory with 29 updates
| * c26432ef8e75d914a680d19c4d29f4fd3ee40dc0 Chore(deps-dev): Bump vite from 6.1.0 to 6.1.2 in the npm_and_yarn group
| * de4e353202e20c769e18e082aa472c80c85ad009 Fix: CI - remove hard reset #118
| * 69b3b3990e3507da43ee68058a2d02ee28aef26a Docs: Update for CSS Rules #93
|/  
* 0fda782180e643ba0ed337d69dd4c07488da36c2 Fix: Rules - Identifier when `debugId` is `undefined` #109

commit 0fda782180e643ba0ed337d69dd4c07488da36c2
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Thu Feb 20 02:45:22 2025 +0900

    Fix: Rules - Identifier when `debugId` is `undefined` #109

Rebase locally, and then force push to feat/rulesVariants.

@Jeong-jj Jeong-jj requested a review from black7375 April 6, 2025 12:32
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Triggered from #176 by @​Jeong-jj.

Checking if we can fast forward main (871e38a) to feat/rulesVariants (4bc6ad0).

Target branch (main):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Pull request (feat/rulesVariants):

commit 4bc6ad01232f3731cc7658180e2d7e96e9514366 (pull_request/feat/rulesVariants)
Author: JeongJun <rgfdds98@gmail.com>
Date:   Sun Apr 6 23:43:14 2025 +0900

    fix: edit test code and type

Can't fast forward main (871e38a) to feat/rulesVariants (4bc6ad0). main (871e38a) is not a direct ancestor of feat/rulesVariants (4bc6ad0). Branches appear to have diverged at 0fda782:

* 4bc6ad01232f3731cc7658180e2d7e96e9514366 fix: edit test code and type
* de04d7cc72fbef6454359eeb86c08b6426e25513 test: add more test code about rulesVariants
* daef85f25f351a4dc30ec586029697d7736c40ae Feat: rulesVariants function with Test Code
| * 871e38ae97311961dfd3adc543279459a70c5f68 Chore: Disable minify option
| * a963dc1854e0b4278e01c7008ec8187add2eecad feat: Co-location using babel
| *   6701e124b2532ffe78ab84bcfd22a8b34f12252b Add 'macaron/' from commit '2d226886aa1521285491734a0419983f0f61de33'
| |\  
| | * 2d226886aa1521285491734a0419983f0f61de33 release: v1.6.1
| | * c7b8ef6acdce16b593426f39f837cc46274af4bd fix: add options to esbuild plugins wrapper (#70)
| | * d42ed6cec5daa4aee8148b935d825b30c641dfc8 release: v1.6.0
| | * e066fd9d11f9a3cc6718efa630815ac1e3ddd3df feat(esbuild): add includeNodeModulesPattern option (#68)
| | * e40bf0568b703fa2d71b3c454473946c0d7e1040 release: v1.5.3
| | * 92bbe47522b1446d68069909055cf750fc82cb88 fix: depend on latest version of core
| | * 33507480aa804f0915aa0d44af472000a0470df4 release: v1.5.2
| | * b084e636075a1be23e48857d0c7ff729756c56ed fix: export types of react & solid adapter, esm issues with vite & qwik
| | * 1077aa0ea0220fff30f5ab4f3986dac696164416 release: v1.5.1
| | * ce672675778f37c7b8312b625df0366b19411ea6 chore: switch from yarn to npm workspaces
| | * 2bc26b4cbcf4d7526797c6ba61a0a59eb0b932a1 feat: add qwik adapter
| | * ac2a588990e0f2c487ccbcd5cb9ac5f721064a36 fix(#44): don't clear cache on watch
| | * 2fc412ad58ceed08c04f95ef4683af80f467dd9b release: v1.4.2
| | * a33a7fe2ba8311baa54eda3121acd0fc43304278 fix: suppress vite sourcemap warning
| | * f4797e5da9df4aefa0c680370c5bd302f6974ffc release: v1.4.0
| | * e63ce271c47537f4bdd46734fe136b9964962194 feat: pass ref when creating the component (#40)
| | * 828cbde478f78986a9d0705fe4bcb40836df8fc0 release: v1.3.0
| | * 5fa67942632c2eaf3f1984663a84612fbb5a58be feat: provide babel options as an argument for vite plugin (#39)
| | * 7e6d0dda16d51487f6add93cab0ac4752ca981d7 release: v1.2.1
| | * 346eab7ce159e62680821ff084e104c8704621e7 fix: support forwardRef types in react
| | * 0b25c7d82442058b797a8a7b419cc95d5e429b22 release: v1.2.0
| | * 296720bc0c36ecaacfb7cd11b8ed805855119177 feat: export vanilla-extract dynamic lib
| | * 5db5bed84e580b7b25985687267dcb77a9833bc8 release: v1.1.4
| | * aa493de321d8089840a50105d9a6a14f1cd3eb9f fix: typescript build error in esbuild plugin
| | * f0442dd718003facd5c56afc4f237e5cce7e5c87 fix: make @macaron-css/core side-effect free
| | * 6d6d927c317e9bc4c0db507af5aed5bbe794843e chore: bump dependencies
| | * b52abb5d5a1b852128521b9a7350862b3d613de1 release: v1.1.3
| | * 4b6fe0c9397c34fcb10e023e1793070bb96f19be fix(babel): fix max callstack err due to reference
| | * c02ef9d70d44a00c0c0c0a989e4d2d8dd86a58d6 release: v1.1.2
| | * d7ee03d5b04ce7746cda2a4be84ecd9fe880e69c fix(babel): move references from ignored styles
| | * c253ab7205c4b08485109052806221fd789b957a release: v1.1.1
| | * 024d30c470b793cf347816b6e9458a4120328e45 fix(babel): ignore extraction of styled
| | * 7d1f767eca85dd9140b33e61e206a187a046e65a release: v1.1.0
| | * 62e35c8ab05283cfdc5b309795d9a0c4386aec63 feat(babel): allow ignoring extraction
| | * 6d4054a40a98ceb210148c67a2dd26adf2ffec37 release: v1.0.1
| | * 0165d5961e46989c47a7c3548f2810e4c713eb9c fix(adapter): styled component type def (fix #13)
| | * e994919ab3aef26e375cd483145bd1321eba2fc7 Release 1.0.0
| | * dfe4eafb2dc64b654ef1c07704b42467bb46ee10 feat(react): `as` to change rendered component
| | * 7511a2e395c2d7ab17871286694fdbc4d10099ee chore: bump vite plugin
| | * c8f4f4b9dc8fddd287edfbda24e2d8c107cf57cd fix: handle unknown virtual files in vite plugin
| | * 428798446c8c403d5a96bf4f98db8f36c3bdfd75 bump macaron babel plugin
| | * 6734b853c1fe4c5d300cbf9c6095eec00465496a fix tests
| | * b7e45767ccc552966e2c45d68ba84c37825c5b4a fix installation issue
| | * af837d30c75291ea8457c0eb4cc7d2cf62b6f64a npm release
| | * 81afb8c72e922adc9ffae33181ec487bdb24d110 update deps and examples
| | * a910f9e7a2d2fe36f3eb64eceb729367ee726684 npm release
| | * 1d5fe89263bdb246d10db5a56c57f1dc9dd55531 rename $macaron to macaron$
| | * 9a42ce43a6a3e5d3648b31e7f64e232bc0a300df update react tests
| | * 0d243be7d36f4f376995aee8f6a3a7f672daf7ee implement block scoped eval ($macaron)
| | * 76186946c9ef8f650a989304f47521915e1feaa3 fix react types
| | * 999ec10cf65e9a3583fb26ce96603410a6998996 fix react adapter
| | * 4e573aea6ae08f5464332713c90b57db1dcc1031 remove unused code vite plugin
| | * 53bae126247fc904e6802691141658dc3bd2736f add custom implementation of recipes
| | * 328ae0c4d0750b257b5244e9f2030abc9ba38858 publish
| | * ae80ddd3a4c7bba43fda1f5f69d1d477dbc21a8c fix vite hmr bug
| | * 4cb6092c063698981eeb05baaa86405c93e16a93 publish
| | * 0811870bffcc98a9168bc3d49ca03204c5f6159b solid selectorFn shouldn't have default variants
| | * ea910d1c88581cd8d7517c43c532b68225047323 stringify stub path
| | * 020a7a9ed05807351cab7daed9daf20ec53210b4 type only imports babel
| | * 1b40bac1c176e34eb7739a546a906affa77663ed publish packages
| | * a84c28744513463bf1217a64d4222422ef66e50f fix the "template" bug with solid-js web transform
| | * f42e54b984c11f285bf33f664b4d95918487791d react inherit component and tests
| | * 2d2463803aa702b054558d4b0b5f8707abe49c4e solid adapter component inheritance
| | * 4fb0fda76deb9771a16c029274692d5916b4e680 fix vite ssr bug
| | * fe8d613c6f96c66a26661f537a5c155b92ac982e remove styled visitor for function serializer
| | * f6609eff3c55c48caeb3951f897ff3b6ce391402 vite fix monorepo issue
| | * 41ecff6bbe8a43a1125b011934e54584fcd58452 publish core, solid and react adapter
| | * 941269ad2224953c24980257d5d9a8f858cb77be using styled components as selectors
| | * 8b6934f1ec3d12cf7e72a2fd9dc424bd871aa8c9 override toString and fix types
| | * 9f1e8be8fc9e8869913b8e3710de48c6343586b3 publish babel fix
| | * fcc868c0d7a16d60353f643b6aab8a44cdca2f7a fix infinite loop in transforming function declarations
| | * 85cab023c83ad33718cb1cbbb19566418f5c88e9 update main/module/types babel
| | * d5b08e4cd84923742c530b8d22c00abf095f18f4 release vite plugin
| | * 60abf3efbf32aebb08b21d71225fb00949403168 fix vite plugin
| | * 77e8bf273fda8a2986f6646f11479e54ac854ae5 release
| | * 6d82095fd2ce02e43fc81292a46f9fd9d000d484 fix shared styles esbuild plugin
| | * 081dee7db62c23e55cd46fb8a7b08ee8cbe122a9 build packages
| | * 3473e58e24521d215f686ebdb5b2c99393877956 update vite plugin
| | * 107ef35c199c86813c8825653cd9d0be23eadc7d normalize file paths for linux
| | * 6c8be0ef23e878f1da29f5110133925a8d2525bc fix solid and react adapter
| | * 7ccdf8312d6440cf5d56cc19dbd41fd47cf9852d add styled api example to solid-start
| | * adc7ec4d159fb41f04ba5c4fe5b74b84bd16fae4 solid-start example
| | * 267ab582ed51f53a60fe3143bb5f880362f641d6 update tests
| | * c26d251245333cce0b68095dca7301314c0ba5f0 fix style declarations referencing each other
| | * 07f31bc792ea12ce1e68c4c4d1cbc3ac178c13c4 better data structures
| | * 89d8f85d8264b784e6af01db4cdb237ab8196331 fix recursive bindings
| | * d6f2fd0cbd89caab767433240c385efd2221d1e0 bump babel plugin
| | * db46851761a36bad2575d5b7424b7e0c510f585a improve build perf
| | * e8a883bcfe12e9b23f43e2de94c68a8bee2d47f4 bump versions
| | * 02fd9d4696af92a4be043dcdd570e76817ae3812 fix ts error
| | * 7efaa48606d0a434d6fbf9cd3d055d79b4c5ce2f fix binding traversal and simplify it alot
| | * d9acfc25400521f2e427462d2083d953d25b8dd6 allow tsx syntax in precompile step
| | * fbe8269b57f4536188f1d7a2f68ec82b0167cd80 simplify call expression traverser
| | * 7199492f80cf741fb776635c72e48d8096803732 fix type error
| | * 480827a9024a4084b8d6cc98ead9d50de2db174b declaration aliasing and proper ordering
| | * 8ee005b26eb6f4f1d9183f80c5370227de13080c styled api visitor for react
| | *   421f1750947cc52e1fd1cefc5117987a7368085a Merge branch 'react' into main
| | |\  
| | | * 4c97241f68cb38d3b083e416ff579b7c680af8f1 add react support
| | * | 6863175b4e47958fc35dd1d38099c990c332e139 fix: bindings transfer and naming conflict
| | |/  
| | * ebe2e8d14daed2ae71846004b878d17bbfa609dd binding push order
| | * 8ebfbe2b0270034a458f66487b220cd858348ec9 partially working expression extraction
| | * 254bb57b386adb172c5e7aa3fd4bd6788a1c2b57 remove renaming banner from packages
| | * ee7ebf15664e5b6b7c54d4f7902d5c8807ad3db4 rename to macaron!
| | * 4f40cfefe50e9f3db6856b95495e4069bc07ab39 release: comptime-css-babel@0.1.3
| | * 36c4a2fa658c115ca888ff6b01954abe5e7494f9 release: comptime-css@0.1.3
| | * f77d4be20107c1587e7c0fe953e43531db5182f8 fix babel plugin conflict with other plugns
| | * d5f2eb34322cf689e43957fabe0e4bdc4999ea78 add custom impl of createRuntimeFn with variants
| | * 38ef933b1d67403e41c06d7d733491ab9d2bfafe styled api babel todo
| | * 6ed5a8ac89af03829f17779098e9f0a98964d2e1 fix esbuild plugin caching
| | * 518b456f9dc660dfbc040659cd91a2ba75983bf1 improve vite plugin (fast)
| | * 8dff8fcb2c67b6d7b5586d45ab679a1bd4897896 move shared utils to comptime-css-integration
| | * 7c6bebdc718941c3a66e7d6412f86374e70e29a7 vite plugin hmr (slow)
| | * e0205ba20ab7cac94c5b03cf716f93da2c646d36 add vite plugin prototype (no hmr)
| | * 1de139148ba7b687c929274fb843b0a242ebdaf2 fix: add `pure` comment babel
| | * b0086a77d673b2bd4d9b4c8d4372c24689860a37 mark styled components as pure
| | * 9604a21ba04b301befff22ec974ea7d34708f782 release: comptime-css-esbuild@0.1.1
| | * 8ac0e5ece1beca181a5a79f952f775b9d471046b release: comptime-css-babel@0.1.2
| | * 758875609abd095383d0586d67e16675faf8a36d fix: remove duplication of imported idents b/w runtime and static extraction
| | * 72eba15eff2dcf1337974380b36037539f07b7b9 fix: crawl path after every modification
| | * 677f30a240f14a407846318475278a6105260b83 release: comptime-css-babel@0.1.1
| | * 0e5d0bba4e0c5acf77ef7e24896bcc31344995ca release: comptime-css@0.1.2
| | * 9e320d0cf0d24f92a09cfa2ea17e7428d4baccbb add repository in package.json
| | * 7d4ffda84e1e97c6b53b19bfaa68e0243eb9fd5e release: comptime-css@0.1.1
| | * 81da3dad0dac5d11bc882b0e4df841e214ab9f21 publish script
| | * 872eb3eff56557af43224026c080c5a58877f104 remove package scope
| | * 94b9872311e7a18036b40b6a8073eec93a5c80b2 add solid example and fix import check
| | * 45a5fb08be93854bd7ea95f19a56917c0800b4c3 add vanilla example
| | * 5a7d012742d39cacd9178c4fc5f0349e2ce41d97 organise code
| * 6e4fbc9f3b0000c26586aad9ab92628d3f853748 Chore: Version Packages
| * 617ce18fc0425da9b7d393f3020cfb88b4bf2a67 fix: test changeset
| * 9a4597fbf4b76afe5a678cebe2af01b683f40537 Fix: Changeset - More permissions
| * 8cb8a01e378ade3a881098e65f57509eaef0c8c2 Chore(deps): Bump the dev-dependencies group across 1 directory with 29 updates
| * c26432ef8e75d914a680d19c4d29f4fd3ee40dc0 Chore(deps-dev): Bump vite from 6.1.0 to 6.1.2 in the npm_and_yarn group
| * de4e353202e20c769e18e082aa472c80c85ad009 Fix: CI - remove hard reset #118
| * 69b3b3990e3507da43ee68058a2d02ee28aef26a Docs: Update for CSS Rules #93
|/  
* 0fda782180e643ba0ed337d69dd4c07488da36c2 Fix: Rules - Identifier when `debugId` is `undefined` #109

commit 0fda782180e643ba0ed337d69dd4c07488da36c2
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Thu Feb 20 02:45:22 2025 +0900

    Fix: Rules - Identifier when `debugId` is `undefined` #109

Rebase locally, and then force push to feat/rulesVariants.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/css/src/rules/index.ts (1)

226-226: Consider potential property duplication.

Spreading slotConfig after explicitly listing its properties (base, variants, toggles) could lead to property duplication if slotConfig contains other properties with the same names. While the last occurrence would win, this approach might be confusing.

Consider either:

- base: slotConfig.base,
- variants: slotConfig.variants,
- toggles: slotConfig.toggles,
- ...slotConfig
+ ...slotConfig,
+ base: slotConfig.base,
+ variants: slotConfig.variants,
+ toggles: slotConfig.toggles

Or just use the spread operator if these properties are already in slotConfig:

- base: slotConfig.base,
- variants: slotConfig.variants,
- toggles: slotConfig.toggles,
- ...slotConfig
+ ...slotConfig
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de04d7c and 4bc6ad0.

📒 Files selected for processing (2)
  • packages/css/src/rules/index.ts (4 hunks)
  • packages/css/src/rules/types.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/css/src/rules/types.ts
🧰 Additional context used
🧬 Code Definitions (1)
packages/css/src/rules/index.ts (1)
packages/css/src/rules/types.ts (8)
  • RecipeStyleRule (33-33)
  • SlotRecipeDefinition (221-221)
  • SlotRecipeResult (223-228)
  • PatternOptions (171-186)
  • RuntimeFn (193-200)
  • ConditionalVariants (160-169)
  • ComplexPropDefinitions (69-71)
  • PropTarget (67-67)
🔇 Additional comments (4)
packages/css/src/rules/index.ts (4)

29-32: New type imports reflect the enhanced functionality.

The addition of VariantStringMap, RecipeStyleRule, SlotRecipeDefinition, and SlotRecipeResult types properly supports the new recipe variants functionality.


203-203: Improved type safety with RecipeStyleRule.

Replacing the union type ComplexCSSRule | string with the more semantic RecipeStyleRule type enhances code readability and maintainability while preserving the same functionality.


212-242: Well-implemented rulesVariants function.

The rulesVariants function effectively processes slot recipe definitions by:

  1. Creating a result object to store slot runtime functions
  2. Iterating through each slot to generate a runtime function using the existing rules
  3. Setting appropriate debug IDs for each slot
  4. Properly handling slot configuration properties (base, variants, toggles)

The type handling is precise, ensuring type safety throughout the slots processing pipeline.


911-1196: Comprehensive test coverage for rulesVariants.

The tests thoroughly cover various scenarios including:

  • Empty slots
  • Multiple slot combinations
  • Slot variants
  • Slot toggles
  • Slot default variants
  • Slot compound variants

These tests validate that the rulesVariants function behaves as expected in different scenarios.

@Jeong-jj Jeong-jj force-pushed the feat/rulesVariants branch 2 times, most recently from 0920a65 to 4bc6ad0 Compare April 6, 2025 15:07
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Triggered from #176 by @​Jeong-jj.

Checking if we can fast forward main (871e38a) to feat/rulesVariants (4bc6ad0).

Target branch (main):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Pull request (feat/rulesVariants):

commit 4bc6ad01232f3731cc7658180e2d7e96e9514366 (pull_request/feat/rulesVariants)
Author: JeongJun <rgfdds98@gmail.com>
Date:   Sun Apr 6 23:43:14 2025 +0900

    fix: edit test code and type

Can't fast forward main (871e38a) to feat/rulesVariants (4bc6ad0). main (871e38a) is not a direct ancestor of feat/rulesVariants (4bc6ad0). Branches appear to have diverged at 0fda782:

* 4bc6ad01232f3731cc7658180e2d7e96e9514366 fix: edit test code and type
* de04d7cc72fbef6454359eeb86c08b6426e25513 test: add more test code about rulesVariants
* daef85f25f351a4dc30ec586029697d7736c40ae Feat: rulesVariants function with Test Code
| * 871e38ae97311961dfd3adc543279459a70c5f68 Chore: Disable minify option
| * a963dc1854e0b4278e01c7008ec8187add2eecad feat: Co-location using babel
| *   6701e124b2532ffe78ab84bcfd22a8b34f12252b Add 'macaron/' from commit '2d226886aa1521285491734a0419983f0f61de33'
| |\  
| | * 2d226886aa1521285491734a0419983f0f61de33 release: v1.6.1
| | * c7b8ef6acdce16b593426f39f837cc46274af4bd fix: add options to esbuild plugins wrapper (#70)
| | * d42ed6cec5daa4aee8148b935d825b30c641dfc8 release: v1.6.0
| | * e066fd9d11f9a3cc6718efa630815ac1e3ddd3df feat(esbuild): add includeNodeModulesPattern option (#68)
| | * e40bf0568b703fa2d71b3c454473946c0d7e1040 release: v1.5.3
| | * 92bbe47522b1446d68069909055cf750fc82cb88 fix: depend on latest version of core
| | * 33507480aa804f0915aa0d44af472000a0470df4 release: v1.5.2
| | * b084e636075a1be23e48857d0c7ff729756c56ed fix: export types of react & solid adapter, esm issues with vite & qwik
| | * 1077aa0ea0220fff30f5ab4f3986dac696164416 release: v1.5.1
| | * ce672675778f37c7b8312b625df0366b19411ea6 chore: switch from yarn to npm workspaces
| | * 2bc26b4cbcf4d7526797c6ba61a0a59eb0b932a1 feat: add qwik adapter
| | * ac2a588990e0f2c487ccbcd5cb9ac5f721064a36 fix(#44): don't clear cache on watch
| | * 2fc412ad58ceed08c04f95ef4683af80f467dd9b release: v1.4.2
| | * a33a7fe2ba8311baa54eda3121acd0fc43304278 fix: suppress vite sourcemap warning
| | * f4797e5da9df4aefa0c680370c5bd302f6974ffc release: v1.4.0
| | * e63ce271c47537f4bdd46734fe136b9964962194 feat: pass ref when creating the component (#40)
| | * 828cbde478f78986a9d0705fe4bcb40836df8fc0 release: v1.3.0
| | * 5fa67942632c2eaf3f1984663a84612fbb5a58be feat: provide babel options as an argument for vite plugin (#39)
| | * 7e6d0dda16d51487f6add93cab0ac4752ca981d7 release: v1.2.1
| | * 346eab7ce159e62680821ff084e104c8704621e7 fix: support forwardRef types in react
| | * 0b25c7d82442058b797a8a7b419cc95d5e429b22 release: v1.2.0
| | * 296720bc0c36ecaacfb7cd11b8ed805855119177 feat: export vanilla-extract dynamic lib
| | * 5db5bed84e580b7b25985687267dcb77a9833bc8 release: v1.1.4
| | * aa493de321d8089840a50105d9a6a14f1cd3eb9f fix: typescript build error in esbuild plugin
| | * f0442dd718003facd5c56afc4f237e5cce7e5c87 fix: make @macaron-css/core side-effect free
| | * 6d6d927c317e9bc4c0db507af5aed5bbe794843e chore: bump dependencies
| | * b52abb5d5a1b852128521b9a7350862b3d613de1 release: v1.1.3
| | * 4b6fe0c9397c34fcb10e023e1793070bb96f19be fix(babel): fix max callstack err due to reference
| | * c02ef9d70d44a00c0c0c0a989e4d2d8dd86a58d6 release: v1.1.2
| | * d7ee03d5b04ce7746cda2a4be84ecd9fe880e69c fix(babel): move references from ignored styles
| | * c253ab7205c4b08485109052806221fd789b957a release: v1.1.1
| | * 024d30c470b793cf347816b6e9458a4120328e45 fix(babel): ignore extraction of styled
| | * 7d1f767eca85dd9140b33e61e206a187a046e65a release: v1.1.0
| | * 62e35c8ab05283cfdc5b309795d9a0c4386aec63 feat(babel): allow ignoring extraction
| | * 6d4054a40a98ceb210148c67a2dd26adf2ffec37 release: v1.0.1
| | * 0165d5961e46989c47a7c3548f2810e4c713eb9c fix(adapter): styled component type def (fix #13)
| | * e994919ab3aef26e375cd483145bd1321eba2fc7 Release 1.0.0
| | * dfe4eafb2dc64b654ef1c07704b42467bb46ee10 feat(react): `as` to change rendered component
| | * 7511a2e395c2d7ab17871286694fdbc4d10099ee chore: bump vite plugin
| | * c8f4f4b9dc8fddd287edfbda24e2d8c107cf57cd fix: handle unknown virtual files in vite plugin
| | * 428798446c8c403d5a96bf4f98db8f36c3bdfd75 bump macaron babel plugin
| | * 6734b853c1fe4c5d300cbf9c6095eec00465496a fix tests
| | * b7e45767ccc552966e2c45d68ba84c37825c5b4a fix installation issue
| | * af837d30c75291ea8457c0eb4cc7d2cf62b6f64a npm release
| | * 81afb8c72e922adc9ffae33181ec487bdb24d110 update deps and examples
| | * a910f9e7a2d2fe36f3eb64eceb729367ee726684 npm release
| | * 1d5fe89263bdb246d10db5a56c57f1dc9dd55531 rename $macaron to macaron$
| | * 9a42ce43a6a3e5d3648b31e7f64e232bc0a300df update react tests
| | * 0d243be7d36f4f376995aee8f6a3a7f672daf7ee implement block scoped eval ($macaron)
| | * 76186946c9ef8f650a989304f47521915e1feaa3 fix react types
| | * 999ec10cf65e9a3583fb26ce96603410a6998996 fix react adapter
| | * 4e573aea6ae08f5464332713c90b57db1dcc1031 remove unused code vite plugin
| | * 53bae126247fc904e6802691141658dc3bd2736f add custom implementation of recipes
| | * 328ae0c4d0750b257b5244e9f2030abc9ba38858 publish
| | * ae80ddd3a4c7bba43fda1f5f69d1d477dbc21a8c fix vite hmr bug
| | * 4cb6092c063698981eeb05baaa86405c93e16a93 publish
| | * 0811870bffcc98a9168bc3d49ca03204c5f6159b solid selectorFn shouldn't have default variants
| | * ea910d1c88581cd8d7517c43c532b68225047323 stringify stub path
| | * 020a7a9ed05807351cab7daed9daf20ec53210b4 type only imports babel
| | * 1b40bac1c176e34eb7739a546a906affa77663ed publish packages
| | * a84c28744513463bf1217a64d4222422ef66e50f fix the "template" bug with solid-js web transform
| | * f42e54b984c11f285bf33f664b4d95918487791d react inherit component and tests
| | * 2d2463803aa702b054558d4b0b5f8707abe49c4e solid adapter component inheritance
| | * 4fb0fda76deb9771a16c029274692d5916b4e680 fix vite ssr bug
| | * fe8d613c6f96c66a26661f537a5c155b92ac982e remove styled visitor for function serializer
| | * f6609eff3c55c48caeb3951f897ff3b6ce391402 vite fix monorepo issue
| | * 41ecff6bbe8a43a1125b011934e54584fcd58452 publish core, solid and react adapter
| | * 941269ad2224953c24980257d5d9a8f858cb77be using styled components as selectors
| | * 8b6934f1ec3d12cf7e72a2fd9dc424bd871aa8c9 override toString and fix types
| | * 9f1e8be8fc9e8869913b8e3710de48c6343586b3 publish babel fix
| | * fcc868c0d7a16d60353f643b6aab8a44cdca2f7a fix infinite loop in transforming function declarations
| | * 85cab023c83ad33718cb1cbbb19566418f5c88e9 update main/module/types babel
| | * d5b08e4cd84923742c530b8d22c00abf095f18f4 release vite plugin
| | * 60abf3efbf32aebb08b21d71225fb00949403168 fix vite plugin
| | * 77e8bf273fda8a2986f6646f11479e54ac854ae5 release
| | * 6d82095fd2ce02e43fc81292a46f9fd9d000d484 fix shared styles esbuild plugin
| | * 081dee7db62c23e55cd46fb8a7b08ee8cbe122a9 build packages
| | * 3473e58e24521d215f686ebdb5b2c99393877956 update vite plugin
| | * 107ef35c199c86813c8825653cd9d0be23eadc7d normalize file paths for linux
| | * 6c8be0ef23e878f1da29f5110133925a8d2525bc fix solid and react adapter
| | * 7ccdf8312d6440cf5d56cc19dbd41fd47cf9852d add styled api example to solid-start
| | * adc7ec4d159fb41f04ba5c4fe5b74b84bd16fae4 solid-start example
| | * 267ab582ed51f53a60fe3143bb5f880362f641d6 update tests
| | * c26d251245333cce0b68095dca7301314c0ba5f0 fix style declarations referencing each other
| | * 07f31bc792ea12ce1e68c4c4d1cbc3ac178c13c4 better data structures
| | * 89d8f85d8264b784e6af01db4cdb237ab8196331 fix recursive bindings
| | * d6f2fd0cbd89caab767433240c385efd2221d1e0 bump babel plugin
| | * db46851761a36bad2575d5b7424b7e0c510f585a improve build perf
| | * e8a883bcfe12e9b23f43e2de94c68a8bee2d47f4 bump versions
| | * 02fd9d4696af92a4be043dcdd570e76817ae3812 fix ts error
| | * 7efaa48606d0a434d6fbf9cd3d055d79b4c5ce2f fix binding traversal and simplify it alot
| | * d9acfc25400521f2e427462d2083d953d25b8dd6 allow tsx syntax in precompile step
| | * fbe8269b57f4536188f1d7a2f68ec82b0167cd80 simplify call expression traverser
| | * 7199492f80cf741fb776635c72e48d8096803732 fix type error
| | * 480827a9024a4084b8d6cc98ead9d50de2db174b declaration aliasing and proper ordering
| | * 8ee005b26eb6f4f1d9183f80c5370227de13080c styled api visitor for react
| | *   421f1750947cc52e1fd1cefc5117987a7368085a Merge branch 'react' into main
| | |\  
| | | * 4c97241f68cb38d3b083e416ff579b7c680af8f1 add react support
| | * | 6863175b4e47958fc35dd1d38099c990c332e139 fix: bindings transfer and naming conflict
| | |/  
| | * ebe2e8d14daed2ae71846004b878d17bbfa609dd binding push order
| | * 8ebfbe2b0270034a458f66487b220cd858348ec9 partially working expression extraction
| | * 254bb57b386adb172c5e7aa3fd4bd6788a1c2b57 remove renaming banner from packages
| | * ee7ebf15664e5b6b7c54d4f7902d5c8807ad3db4 rename to macaron!
| | * 4f40cfefe50e9f3db6856b95495e4069bc07ab39 release: comptime-css-babel@0.1.3
| | * 36c4a2fa658c115ca888ff6b01954abe5e7494f9 release: comptime-css@0.1.3
| | * f77d4be20107c1587e7c0fe953e43531db5182f8 fix babel plugin conflict with other plugns
| | * d5f2eb34322cf689e43957fabe0e4bdc4999ea78 add custom impl of createRuntimeFn with variants
| | * 38ef933b1d67403e41c06d7d733491ab9d2bfafe styled api babel todo
| | * 6ed5a8ac89af03829f17779098e9f0a98964d2e1 fix esbuild plugin caching
| | * 518b456f9dc660dfbc040659cd91a2ba75983bf1 improve vite plugin (fast)
| | * 8dff8fcb2c67b6d7b5586d45ab679a1bd4897896 move shared utils to comptime-css-integration
| | * 7c6bebdc718941c3a66e7d6412f86374e70e29a7 vite plugin hmr (slow)
| | * e0205ba20ab7cac94c5b03cf716f93da2c646d36 add vite plugin prototype (no hmr)
| | * 1de139148ba7b687c929274fb843b0a242ebdaf2 fix: add `pure` comment babel
| | * b0086a77d673b2bd4d9b4c8d4372c24689860a37 mark styled components as pure
| | * 9604a21ba04b301befff22ec974ea7d34708f782 release: comptime-css-esbuild@0.1.1
| | * 8ac0e5ece1beca181a5a79f952f775b9d471046b release: comptime-css-babel@0.1.2
| | * 758875609abd095383d0586d67e16675faf8a36d fix: remove duplication of imported idents b/w runtime and static extraction
| | * 72eba15eff2dcf1337974380b36037539f07b7b9 fix: crawl path after every modification
| | * 677f30a240f14a407846318475278a6105260b83 release: comptime-css-babel@0.1.1
| | * 0e5d0bba4e0c5acf77ef7e24896bcc31344995ca release: comptime-css@0.1.2
| | * 9e320d0cf0d24f92a09cfa2ea17e7428d4baccbb add repository in package.json
| | * 7d4ffda84e1e97c6b53b19bfaa68e0243eb9fd5e release: comptime-css@0.1.1
| | * 81da3dad0dac5d11bc882b0e4df841e214ab9f21 publish script
| | * 872eb3eff56557af43224026c080c5a58877f104 remove package scope
| | * 94b9872311e7a18036b40b6a8073eec93a5c80b2 add solid example and fix import check
| | * 45a5fb08be93854bd7ea95f19a56917c0800b4c3 add vanilla example
| | * 5a7d012742d39cacd9178c4fc5f0349e2ce41d97 organise code
| * 6e4fbc9f3b0000c26586aad9ab92628d3f853748 Chore: Version Packages
| * 617ce18fc0425da9b7d393f3020cfb88b4bf2a67 fix: test changeset
| * 9a4597fbf4b76afe5a678cebe2af01b683f40537 Fix: Changeset - More permissions
| * 8cb8a01e378ade3a881098e65f57509eaef0c8c2 Chore(deps): Bump the dev-dependencies group across 1 directory with 29 updates
| * c26432ef8e75d914a680d19c4d29f4fd3ee40dc0 Chore(deps-dev): Bump vite from 6.1.0 to 6.1.2 in the npm_and_yarn group
| * de4e353202e20c769e18e082aa472c80c85ad009 Fix: CI - remove hard reset #118
| * 69b3b3990e3507da43ee68058a2d02ee28aef26a Docs: Update for CSS Rules #93
|/  
* 0fda782180e643ba0ed337d69dd4c07488da36c2 Fix: Rules - Identifier when `debugId` is `undefined` #109

commit 0fda782180e643ba0ed337d69dd4c07488da36c2
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Thu Feb 20 02:45:22 2025 +0900

    Fix: Rules - Identifier when `debugId` is `undefined` #109

Rebase locally, and then force push to feat/rulesVariants.

@Jeong-jj Jeong-jj force-pushed the feat/rulesVariants branch 2 times, most recently from 0920a65 to 4bc6ad0 Compare April 6, 2025 15:13
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Triggered from #176 by @​Jeong-jj.

Checking if we can fast forward main (871e38a) to feat/rulesVariants (4bc6ad0).

Target branch (main):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Pull request (feat/rulesVariants):

commit 4bc6ad01232f3731cc7658180e2d7e96e9514366 (pull_request/feat/rulesVariants)
Author: JeongJun <rgfdds98@gmail.com>
Date:   Sun Apr 6 23:43:14 2025 +0900

    fix: edit test code and type

Can't fast forward main (871e38a) to feat/rulesVariants (4bc6ad0). main (871e38a) is not a direct ancestor of feat/rulesVariants (4bc6ad0). Branches appear to have diverged at 0fda782:

* 4bc6ad01232f3731cc7658180e2d7e96e9514366 fix: edit test code and type
* de04d7cc72fbef6454359eeb86c08b6426e25513 test: add more test code about rulesVariants
* daef85f25f351a4dc30ec586029697d7736c40ae Feat: rulesVariants function with Test Code
| * 871e38ae97311961dfd3adc543279459a70c5f68 Chore: Disable minify option
| * a963dc1854e0b4278e01c7008ec8187add2eecad feat: Co-location using babel
| *   6701e124b2532ffe78ab84bcfd22a8b34f12252b Add 'macaron/' from commit '2d226886aa1521285491734a0419983f0f61de33'
| |\  
| | * 2d226886aa1521285491734a0419983f0f61de33 release: v1.6.1
| | * c7b8ef6acdce16b593426f39f837cc46274af4bd fix: add options to esbuild plugins wrapper (#70)
| | * d42ed6cec5daa4aee8148b935d825b30c641dfc8 release: v1.6.0
| | * e066fd9d11f9a3cc6718efa630815ac1e3ddd3df feat(esbuild): add includeNodeModulesPattern option (#68)
| | * e40bf0568b703fa2d71b3c454473946c0d7e1040 release: v1.5.3
| | * 92bbe47522b1446d68069909055cf750fc82cb88 fix: depend on latest version of core
| | * 33507480aa804f0915aa0d44af472000a0470df4 release: v1.5.2
| | * b084e636075a1be23e48857d0c7ff729756c56ed fix: export types of react & solid adapter, esm issues with vite & qwik
| | * 1077aa0ea0220fff30f5ab4f3986dac696164416 release: v1.5.1
| | * ce672675778f37c7b8312b625df0366b19411ea6 chore: switch from yarn to npm workspaces
| | * 2bc26b4cbcf4d7526797c6ba61a0a59eb0b932a1 feat: add qwik adapter
| | * ac2a588990e0f2c487ccbcd5cb9ac5f721064a36 fix(#44): don't clear cache on watch
| | * 2fc412ad58ceed08c04f95ef4683af80f467dd9b release: v1.4.2
| | * a33a7fe2ba8311baa54eda3121acd0fc43304278 fix: suppress vite sourcemap warning
| | * f4797e5da9df4aefa0c680370c5bd302f6974ffc release: v1.4.0
| | * e63ce271c47537f4bdd46734fe136b9964962194 feat: pass ref when creating the component (#40)
| | * 828cbde478f78986a9d0705fe4bcb40836df8fc0 release: v1.3.0
| | * 5fa67942632c2eaf3f1984663a84612fbb5a58be feat: provide babel options as an argument for vite plugin (#39)
| | * 7e6d0dda16d51487f6add93cab0ac4752ca981d7 release: v1.2.1
| | * 346eab7ce159e62680821ff084e104c8704621e7 fix: support forwardRef types in react
| | * 0b25c7d82442058b797a8a7b419cc95d5e429b22 release: v1.2.0
| | * 296720bc0c36ecaacfb7cd11b8ed805855119177 feat: export vanilla-extract dynamic lib
| | * 5db5bed84e580b7b25985687267dcb77a9833bc8 release: v1.1.4
| | * aa493de321d8089840a50105d9a6a14f1cd3eb9f fix: typescript build error in esbuild plugin
| | * f0442dd718003facd5c56afc4f237e5cce7e5c87 fix: make @macaron-css/core side-effect free
| | * 6d6d927c317e9bc4c0db507af5aed5bbe794843e chore: bump dependencies
| | * b52abb5d5a1b852128521b9a7350862b3d613de1 release: v1.1.3
| | * 4b6fe0c9397c34fcb10e023e1793070bb96f19be fix(babel): fix max callstack err due to reference
| | * c02ef9d70d44a00c0c0c0a989e4d2d8dd86a58d6 release: v1.1.2
| | * d7ee03d5b04ce7746cda2a4be84ecd9fe880e69c fix(babel): move references from ignored styles
| | * c253ab7205c4b08485109052806221fd789b957a release: v1.1.1
| | * 024d30c470b793cf347816b6e9458a4120328e45 fix(babel): ignore extraction of styled
| | * 7d1f767eca85dd9140b33e61e206a187a046e65a release: v1.1.0
| | * 62e35c8ab05283cfdc5b309795d9a0c4386aec63 feat(babel): allow ignoring extraction
| | * 6d4054a40a98ceb210148c67a2dd26adf2ffec37 release: v1.0.1
| | * 0165d5961e46989c47a7c3548f2810e4c713eb9c fix(adapter): styled component type def (fix #13)
| | * e994919ab3aef26e375cd483145bd1321eba2fc7 Release 1.0.0
| | * dfe4eafb2dc64b654ef1c07704b42467bb46ee10 feat(react): `as` to change rendered component
| | * 7511a2e395c2d7ab17871286694fdbc4d10099ee chore: bump vite plugin
| | * c8f4f4b9dc8fddd287edfbda24e2d8c107cf57cd fix: handle unknown virtual files in vite plugin
| | * 428798446c8c403d5a96bf4f98db8f36c3bdfd75 bump macaron babel plugin
| | * 6734b853c1fe4c5d300cbf9c6095eec00465496a fix tests
| | * b7e45767ccc552966e2c45d68ba84c37825c5b4a fix installation issue
| | * af837d30c75291ea8457c0eb4cc7d2cf62b6f64a npm release
| | * 81afb8c72e922adc9ffae33181ec487bdb24d110 update deps and examples
| | * a910f9e7a2d2fe36f3eb64eceb729367ee726684 npm release
| | * 1d5fe89263bdb246d10db5a56c57f1dc9dd55531 rename $macaron to macaron$
| | * 9a42ce43a6a3e5d3648b31e7f64e232bc0a300df update react tests
| | * 0d243be7d36f4f376995aee8f6a3a7f672daf7ee implement block scoped eval ($macaron)
| | * 76186946c9ef8f650a989304f47521915e1feaa3 fix react types
| | * 999ec10cf65e9a3583fb26ce96603410a6998996 fix react adapter
| | * 4e573aea6ae08f5464332713c90b57db1dcc1031 remove unused code vite plugin
| | * 53bae126247fc904e6802691141658dc3bd2736f add custom implementation of recipes
| | * 328ae0c4d0750b257b5244e9f2030abc9ba38858 publish
| | * ae80ddd3a4c7bba43fda1f5f69d1d477dbc21a8c fix vite hmr bug
| | * 4cb6092c063698981eeb05baaa86405c93e16a93 publish
| | * 0811870bffcc98a9168bc3d49ca03204c5f6159b solid selectorFn shouldn't have default variants
| | * ea910d1c88581cd8d7517c43c532b68225047323 stringify stub path
| | * 020a7a9ed05807351cab7daed9daf20ec53210b4 type only imports babel
| | * 1b40bac1c176e34eb7739a546a906affa77663ed publish packages
| | * a84c28744513463bf1217a64d4222422ef66e50f fix the "template" bug with solid-js web transform
| | * f42e54b984c11f285bf33f664b4d95918487791d react inherit component and tests
| | * 2d2463803aa702b054558d4b0b5f8707abe49c4e solid adapter component inheritance
| | * 4fb0fda76deb9771a16c029274692d5916b4e680 fix vite ssr bug
| | * fe8d613c6f96c66a26661f537a5c155b92ac982e remove styled visitor for function serializer
| | * f6609eff3c55c48caeb3951f897ff3b6ce391402 vite fix monorepo issue
| | * 41ecff6bbe8a43a1125b011934e54584fcd58452 publish core, solid and react adapter
| | * 941269ad2224953c24980257d5d9a8f858cb77be using styled components as selectors
| | * 8b6934f1ec3d12cf7e72a2fd9dc424bd871aa8c9 override toString and fix types
| | * 9f1e8be8fc9e8869913b8e3710de48c6343586b3 publish babel fix
| | * fcc868c0d7a16d60353f643b6aab8a44cdca2f7a fix infinite loop in transforming function declarations
| | * 85cab023c83ad33718cb1cbbb19566418f5c88e9 update main/module/types babel
| | * d5b08e4cd84923742c530b8d22c00abf095f18f4 release vite plugin
| | * 60abf3efbf32aebb08b21d71225fb00949403168 fix vite plugin
| | * 77e8bf273fda8a2986f6646f11479e54ac854ae5 release
| | * 6d82095fd2ce02e43fc81292a46f9fd9d000d484 fix shared styles esbuild plugin
| | * 081dee7db62c23e55cd46fb8a7b08ee8cbe122a9 build packages
| | * 3473e58e24521d215f686ebdb5b2c99393877956 update vite plugin
| | * 107ef35c199c86813c8825653cd9d0be23eadc7d normalize file paths for linux
| | * 6c8be0ef23e878f1da29f5110133925a8d2525bc fix solid and react adapter
| | * 7ccdf8312d6440cf5d56cc19dbd41fd47cf9852d add styled api example to solid-start
| | * adc7ec4d159fb41f04ba5c4fe5b74b84bd16fae4 solid-start example
| | * 267ab582ed51f53a60fe3143bb5f880362f641d6 update tests
| | * c26d251245333cce0b68095dca7301314c0ba5f0 fix style declarations referencing each other
| | * 07f31bc792ea12ce1e68c4c4d1cbc3ac178c13c4 better data structures
| | * 89d8f85d8264b784e6af01db4cdb237ab8196331 fix recursive bindings
| | * d6f2fd0cbd89caab767433240c385efd2221d1e0 bump babel plugin
| | * db46851761a36bad2575d5b7424b7e0c510f585a improve build perf
| | * e8a883bcfe12e9b23f43e2de94c68a8bee2d47f4 bump versions
| | * 02fd9d4696af92a4be043dcdd570e76817ae3812 fix ts error
| | * 7efaa48606d0a434d6fbf9cd3d055d79b4c5ce2f fix binding traversal and simplify it alot
| | * d9acfc25400521f2e427462d2083d953d25b8dd6 allow tsx syntax in precompile step
| | * fbe8269b57f4536188f1d7a2f68ec82b0167cd80 simplify call expression traverser
| | * 7199492f80cf741fb776635c72e48d8096803732 fix type error
| | * 480827a9024a4084b8d6cc98ead9d50de2db174b declaration aliasing and proper ordering
| | * 8ee005b26eb6f4f1d9183f80c5370227de13080c styled api visitor for react
| | *   421f1750947cc52e1fd1cefc5117987a7368085a Merge branch 'react' into main
| | |\  
| | | * 4c97241f68cb38d3b083e416ff579b7c680af8f1 add react support
| | * | 6863175b4e47958fc35dd1d38099c990c332e139 fix: bindings transfer and naming conflict
| | |/  
| | * ebe2e8d14daed2ae71846004b878d17bbfa609dd binding push order
| | * 8ebfbe2b0270034a458f66487b220cd858348ec9 partially working expression extraction
| | * 254bb57b386adb172c5e7aa3fd4bd6788a1c2b57 remove renaming banner from packages
| | * ee7ebf15664e5b6b7c54d4f7902d5c8807ad3db4 rename to macaron!
| | * 4f40cfefe50e9f3db6856b95495e4069bc07ab39 release: comptime-css-babel@0.1.3
| | * 36c4a2fa658c115ca888ff6b01954abe5e7494f9 release: comptime-css@0.1.3
| | * f77d4be20107c1587e7c0fe953e43531db5182f8 fix babel plugin conflict with other plugns
| | * d5f2eb34322cf689e43957fabe0e4bdc4999ea78 add custom impl of createRuntimeFn with variants
| | * 38ef933b1d67403e41c06d7d733491ab9d2bfafe styled api babel todo
| | * 6ed5a8ac89af03829f17779098e9f0a98964d2e1 fix esbuild plugin caching
| | * 518b456f9dc660dfbc040659cd91a2ba75983bf1 improve vite plugin (fast)
| | * 8dff8fcb2c67b6d7b5586d45ab679a1bd4897896 move shared utils to comptime-css-integration
| | * 7c6bebdc718941c3a66e7d6412f86374e70e29a7 vite plugin hmr (slow)
| | * e0205ba20ab7cac94c5b03cf716f93da2c646d36 add vite plugin prototype (no hmr)
| | * 1de139148ba7b687c929274fb843b0a242ebdaf2 fix: add `pure` comment babel
| | * b0086a77d673b2bd4d9b4c8d4372c24689860a37 mark styled components as pure
| | * 9604a21ba04b301befff22ec974ea7d34708f782 release: comptime-css-esbuild@0.1.1
| | * 8ac0e5ece1beca181a5a79f952f775b9d471046b release: comptime-css-babel@0.1.2
| | * 758875609abd095383d0586d67e16675faf8a36d fix: remove duplication of imported idents b/w runtime and static extraction
| | * 72eba15eff2dcf1337974380b36037539f07b7b9 fix: crawl path after every modification
| | * 677f30a240f14a407846318475278a6105260b83 release: comptime-css-babel@0.1.1
| | * 0e5d0bba4e0c5acf77ef7e24896bcc31344995ca release: comptime-css@0.1.2
| | * 9e320d0cf0d24f92a09cfa2ea17e7428d4baccbb add repository in package.json
| | * 7d4ffda84e1e97c6b53b19bfaa68e0243eb9fd5e release: comptime-css@0.1.1
| | * 81da3dad0dac5d11bc882b0e4df841e214ab9f21 publish script
| | * 872eb3eff56557af43224026c080c5a58877f104 remove package scope
| | * 94b9872311e7a18036b40b6a8073eec93a5c80b2 add solid example and fix import check
| | * 45a5fb08be93854bd7ea95f19a56917c0800b4c3 add vanilla example
| | * 5a7d012742d39cacd9178c4fc5f0349e2ce41d97 organise code
| * 6e4fbc9f3b0000c26586aad9ab92628d3f853748 Chore: Version Packages
| * 617ce18fc0425da9b7d393f3020cfb88b4bf2a67 fix: test changeset
| * 9a4597fbf4b76afe5a678cebe2af01b683f40537 Fix: Changeset - More permissions
| * 8cb8a01e378ade3a881098e65f57509eaef0c8c2 Chore(deps): Bump the dev-dependencies group across 1 directory with 29 updates
| * c26432ef8e75d914a680d19c4d29f4fd3ee40dc0 Chore(deps-dev): Bump vite from 6.1.0 to 6.1.2 in the npm_and_yarn group
| * de4e353202e20c769e18e082aa472c80c85ad009 Fix: CI - remove hard reset #118
| * 69b3b3990e3507da43ee68058a2d02ee28aef26a Docs: Update for CSS Rules #93
|/  
* 0fda782180e643ba0ed337d69dd4c07488da36c2 Fix: Rules - Identifier when `debugId` is `undefined` #109

commit 0fda782180e643ba0ed337d69dd4c07488da36c2
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Thu Feb 20 02:45:22 2025 +0900

    Fix: Rules - Identifier when `debugId` is `undefined` #109

Rebase locally, and then force push to feat/rulesVariants.

@Jeong-jj Jeong-jj force-pushed the feat/rulesVariants branch from 4bc6ad0 to e8939a5 Compare April 6, 2025 15:28
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Triggered from #176 by @​Jeong-jj.

Checking if we can fast forward main (871e38a) to feat/rulesVariants (e8939a5).

Target branch (main):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Pull request (feat/rulesVariants):

commit e8939a5878d25be4c25cca0dc567247951d58617 (pull_request/feat/rulesVariants)
Author: JeongJun <rgfdds98@gmail.com>
Date:   Sun Apr 6 23:43:14 2025 +0900

    fix: edit test code and type

It is possible to fast forward main (871e38a) to feat/rulesVariants (e8939a5). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to feat/rulesVariants.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/css/src/rules/index.ts (1)

223-253: Consider adding a short doc comment for rulesVariants.
A quick documentation note can aid future maintainers in understanding its purpose, parameters, and returned structure.

+/**
+ * Processes multiple named slot configurations using `rules` and returns a collection
+ * of runtime functions, one per slot.
+ *
+ * @param slots - Defines each slot's base style, variants, toggles, etc.
+ * @param debugId - Optional debug identifier used for scoping generated class names.
+ * @returns An object containing runtime functions for each slot's styling needs.
+ */
export function rulesVariants<Slots extends SlotRecipeDefinition>(
  slots: Slots,
  debugId?: string
): SlotRecipeResult<Slots> {
  ...
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0920a65 and e8939a5.

📒 Files selected for processing (2)
  • packages/css/src/rules/index.ts (4 hunks)
  • packages/css/src/rules/types.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/css/src/rules/types.ts
🧰 Additional context used
🧬 Code Definitions (1)
packages/css/src/rules/index.ts (1)
packages/css/src/rules/types.ts (8)
  • RecipeStyleRule (33-33)
  • SlotRecipeDefinition (221-221)
  • SlotRecipeResult (223-228)
  • PatternOptions (171-186)
  • RuntimeFn (193-200)
  • ConditionalVariants (160-169)
  • ComplexPropDefinitions (69-71)
  • PropTarget (67-67)
🔇 Additional comments (8)
packages/css/src/rules/index.ts (8)

29-32: Looks good.
Expanding the exported types to include VariantStringMap, RecipeStyleRule, SlotRecipeDefinition, and SlotRecipeResult is consistent with the usage below.


214-214: No issues with the refined parameter type.
Changing the parameter from ComplexCSSRule | string to RecipeStyleRule aligns with the RecipeStyleRule alias (ComplexCSSRule | string) for clarity.


923-967: Solid test coverage for 'empty slots'.
This test confirms that a basic slot definition yields correct class names.


969-1030: Well-structured test for multiple slot combinations.
These checks confirm that combining toggles and variants produces the expected class names. Looks great.


1032-1074: Enhance test logic for 'slot variants' to verify variant behavior.
Currently, the test only verifies that the base classes are applied. Including checks for specific variant classes (e.g., color.main) would provide stronger coverage.


1076-1118: Enhance test logic for 'slot toggles' to verify toggle behavior.
The test only checks the top-level slot classes. Consider verifying toggles like accent are actually applied.


1120-1162: Enhance default variants coverage.
The "slot defaultVariants" test doesn’t assert that the default variants are automatically applied. Please add checks to confirm default variants are reflected in the generated class names.


1164-1206: Enhance compound variants coverage.
The "slot compoundVariants" test doesn’t verify compound variants beyond confirming the base class names. Strengthening these assertions ensures compound conditions produce the expected style classes.

Comment on lines +215 to +228
export type SlotRecipeStyleRule = {
base?: RecipeStyleRule | CSSPropertiesWithVars;
variants?: VariantGroups;
toggles?: VariantDefinitions;
} & (CSSRule | CSSPropertiesWithVars);

export type SlotRecipeDefinition = Record<string, SlotRecipeStyleRule>;

export type SlotRecipeResult<Slots extends SlotRecipeDefinition> = {
[Slot in keyof Slots]: RuntimeFn<
ConditionalVariants<Slots[Slot]["variants"], Slots[Slot]["toggles"]>,
ComplexPropDefinitions<PropTarget>
>;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about use MultipleRecipe?
As we improve the API, cssVariant and rulesVariant will be changed to the concept of mutiple.

I hope the terminology in the above code is also unified appropriately!!

Comment on lines +223 to +253
export function rulesVariants<Slots extends SlotRecipeDefinition>(
slots: Slots,
debugId?: string
): SlotRecipeResult<Slots> {
const result: Partial<SlotRecipeResult<Slots>> = {};

Object.entries(slots).forEach(([slotName, slotConfig]) => {
const slotDebugId = debugId ? `${debugId}_${slotName}` : slotName;
result[slotName as keyof Slots] = rules(
{
base: slotConfig.base,
variants: slotConfig.variants,
toggles: slotConfig.toggles,
...slotConfig
} as PatternOptions<
Slots[typeof slotName]["variants"],
Slots[typeof slotName]["toggles"],
undefined
>,
slotDebugId
) as RuntimeFn<
ConditionalVariants<
Slots[typeof slotName]["variants"],
Slots[typeof slotName]["toggles"]
>,
ComplexPropDefinitions<PropTarget>
>;
});

return result as SlotRecipeResult<Slots>;
}
Copy link
Contributor

@black7375 black7375 Apr 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a Mapping feature to maintain the same usability as cssVariant.

@black7375 black7375 force-pushed the main branch 2 times, most recently from 8b61d06 to 93841d4 Compare April 19, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants