feat: className:@md, named groups, and arbitrary variant attributes - #53
Merged
Conversation
JSX cannot parse className:@md or className:group-hover/item. Keep the real Tailwind names via mods() / useMods() / classy.mods and scan those maps into the class manifest instead of inventing substitute characters. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Keep the same attribute spelling as Vue. UseClassy already rewrites className:@md and className:group-hover/item before JSX parse, matching className:sm:hover. Character substitution and a separate mods() helper both felt unnatural. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Parse class:/className: modifier names with bracket depth so data-[state=open] keeps its inner =, and [&>*] works as an attribute. Same pre-parse rewrite path as @md and named groups. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
class:hover='…' and className:@md='…' parse the same as double quotes, including whitespace around = and arbitrary variants with inner =. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
A global brace-expansion override remapped ESLint's minimatch onto v5 and broke `expand`. Pin patched versions per major, start all demos in parallel on fixed ports, and refresh the React demo toolchain. Co-authored-by: Cursor <cursoragent@cursor.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
useclassy-com | 5efce51 | Commit Preview URL Branch Preview URL |
Sep 05 2026, 09:52 PM |
- Added support for the `useclassy-typescript-plugin` in various demo projects, including React and UnoCSS. - Updated TypeScript configuration files to extend and include necessary paths for better integration. - Enhanced VSCode settings to support the new TypeScript plugin and improve development experience. - Updated demo applications to reflect changes in className handling and added examples for new features. - Improved README documentation to clarify setup instructions and usage of the TypeScript plugin.
… vite-plugin-useclassy/typescript-plugin - Removed all instances of the deprecated useclassy-typescript-plugin from package.json, pnpm-lock.yaml, and various demo configurations. - Updated TypeScript plugin references in configuration files and README to reflect the new vite-plugin-useclassy/typescript-plugin. - Adjusted VSCode settings and documentation to align with the changes in plugin naming and usage. - Cleaned up workspace configuration by removing the useclassy-typescript-plugin from pnpm-workspace.yaml.
- Removed unused demo references from tsconfig.json, retaining only the necessary path for tsconfig.node.json. - This cleanup streamlines the TypeScript configuration for better maintainability.
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
…t-attributes # Conflicts: # README.md # src/init/index.ts # src/tests/init-setup.test.ts Co-authored-by: jrmybtlr <24998792+jrmybtlr@users.noreply.github.com>
Co-authored-by: jrmybtlr <24998792+jrmybtlr@users.noreply.github.com>
Co-authored-by: jrmybtlr <24998792+jrmybtlr@users.noreply.github.com>
Co-authored-by: jrmybtlr <24998792+jrmybtlr@users.noreply.github.com>
Contributor
Resolved in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@md, named groups, and arbitrary ones ([&>*],data-[state=open]). Bracket-aware parsing so=inside[…]is not the attribute separator; quoted values may use"or'.className:sm:hover). No character substitution, nomods()helper.brace-expansionpins, parallel demodevon port 3000, and a React demo toolchain bump so the new attributes lint/typecheck under Vite 8.Supersedes #52.
Test plan
pnpm test— parser tests for[&>*],data-[state=open], single quotes, dep-scan rewriteclassName:@md,className:group-hover/item,className:[&>*],className:data-[state=open], single-quoted modifierspnpm dev)Made with Cursor