feat: Add outline support for new arch #6
Merged
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
This PR adds support for outline utilities (
outlineWidth,outlineStyle,outlineOffset,outlineColor) for React Native 0.73+ (New Architecture).Changes
Core Implementation
src/parser/outline.ts- Dedicated parser for outline utilitiesoutline- Shorthand (width: 1, style: solid)outline-{width}- Width utilities (0, 1, 2, 4, 8, + arbitrary)outline-{style}- Style utilities (solid, dashed, dotted)outline-offset-{value}- Offset utilities (scale + arbitrary)outline-none- Reset utilitysrc/parser/colors.ts- Added support foroutline-{color}classessrc/parser/index.ts- RegisteredparseOutlinein parser chainsrc/index.ts- ExportedparseOutlinefor advanced usageTests
src/parser/outline.test.tsAll 9 tests pass (tests width, style, offset, arbitrary values, and edge cases)
Documentation
docs/src/content/docs/reference/outlines.md- Dedicated documentation with compile-time examplesdocs/src/content/docs/reference/borders.md- Removed outline section, added linkCompile-Time Transformation Example