Repository navigation
chore: merge upstream react-native-css 3.1.0-rc.1 into zeta/main - #7
Merged
Merged
Conversation
… 57 (nativewind#451) * fix: prepare Expo 57 compatibility for RC audit * docs: record Expo 57 engine RC verification and known limitation * ci: fix Expo 57 builds and prepare Git dependencies
…#466) * perf: avoid calculating ruleEffect/styleEffect twice on fresh mounts * fix: pre-render/unmounted effects can use stale rules/styles * chore: clean up llm comments in test * perf: remove redundant call to stylesObs?.get * chore: simplify comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e split (nativewind#410) * fix(native): share the :root variable registries across a dual-package split Re-cut onto main (a5002c5). The test reads the registries through jest.requireActual, because main's jest runs no dynamic import. * refactor(native): state the registry constraints in one line each --------- Co-authored-by: dan <dan@danstepanov.com>
nativewind#390) path.resolve separates with backslashes on Windows, so a relative import resolved against the file never matched the forward-slash package paths the handlers split on, and was left unrewritten.
* feat(metro): surface compiler warnings during a build The compiler records every declaration it could not translate, but nothing read compile().warnings() during a build, so a dropped float or z-index: auto was silent. The Metro transformer now prints one block per CSS file: capped in summary mode, listed in full in verbose mode, and printed again only when the file's warnings change. The warnings option sets the level, and none silences it. lightningcss also warns about input it cannot parse, such as an unknown at-rule or pseudo-element. Those warnings reach a new syntax channel, kept apart from what React Native cannot express, and the block counts them as syntax warnings; this package's own @nativeMapping is not reported. Every recorded value is text, so CompilerWarnings.values is Record<string, string[]>; the one number, a percentage line-height, is recorded as the ratio it resolved to. * docs: describe the syntax warnings in the compiler warnings block The section showed only dropped declarations, while the block also counts the warnings lightningcss gives for CSS it cannot parse and lists them under syntax:.
…ind#431) vars() and <VariableContextProvider /> mapped every entry of the record they are given into the runtime's variable record, so an entry whose value is undefined planted a key holding undefined. Variable lookup is presence-keyed, so that key read as "set to nothing" and stopped the cascade before the inherited value, the :root value and the var() fallback. Both channels now build the record through toVariableRecord, which strips the -- prefix and skips an entry with no value, the invariant the compiler already holds. "unset" remains how a variable is deliberately cleared.
…ativewind#475) getClassNameSelectors reversed lightningcss's selector array in place to walk it from the subject outwards. A nested rule, such as @media, @container or &:hover inside a rule, reads its parent's selector list again, so it saw that selector reversed: `.group .x { @media (…) { … } }` put the nested declarations on `.group` inside an `.x` container. The walk now reads a reversed copy, so every rule compiles against the selector as written.
…vewind#479) Babel types PluginPass.filename as string | undefined and leaves it undefined when its caller passes none, so the own-sources guard read .startsWith off undefined and threw. Each visitor now narrows the filename once and rewrites nothing without one. processed.has(path) could never be true, since only the Statement nodes the plugin generates are added; the set is typed WeakSet<Statement> and the disjunct is gone.
* ci: add verified RC publication to the release workflow * ci: wait for npm registry propagation during RC publication
…ativewind#567) Supersedes nativewind#412. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
Supersedes nativewind#434, carrying its commit and replacing its exact string key with a 53-bit mixed hash. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
…operties (nativewind#575) Supersedes nativewind#547. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
…rs do (nativewind#576) Supersedes nativewind#389. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
…ad of copying or replacing them (nativewind#578) Supersedes nativewind#487. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
…ors (nativewind#579) Supersedes nativewind#464 and nativewind#511. Co-authored-by: Ethan <ethan@zolplay.com> Co-authored-by: Nate I. <nate@oxy.so>
…ontal (nativewind#580) Supersedes nativewind#400. Co-authored-by: Daewoon Kim <me@kdw.kr>
…tive draws (nativewind#581) Based on nativewind#393. Co-authored-by: Yevhenii <evgeny.kotyrlo@gmail.com>
Closes nativewind#387, closes nativewind#396, closes nativewind#408, closes nativewind#437, closes nativewind#438, closes nativewind#439, closes nativewind#440, closes nativewind#441, closes nativewind#450, closes nativewind#465, closes nativewind#483, closes nativewind#499, closes nativewind#502, closes nativewind#385
Merge nativewind/react-native-css main (3.1.0-rc.1) and publish as @scatterlab/react-native-css 3.1.0-rc.1-zeta.1. Fork patches superseded by upstream and dropped: - logical padding expansion: upstream compiles padding-block/-inline to paddingVertical/Horizontal (nativewind#580) - percentage scale to ratio: upstream scaleFactor (nativewind#451, nativewind#576) - container attribute conditions: upstream evaluates group attributes against container snapshots (nativewind#451); the fork's disabled-group test passes - string `style` target merge: upstream layers class and inline styles for string targets (nativewind#578) Fork behavior kept on top of upstream: - filterCssVariables still drops undefined values and empty arrays and returns objects with non-enumerable members (Reanimated handles) as-is - gradients drop the color interpolation method; radial-gradient support uses upstream's colorStop/gradientPosition runtime shape - unprefixed backgroundImage/Size/Position/Repeat keys, transform-origin, mix-blend-mode, isolation, cursor, font-variation-settings - `react-native` export condition resolving dist/commonjs - package name, GitHub Packages publishConfig, react-native >=0.88 peer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
… variable When a gradient's arguments resolve to a single string, as with `linear-gradient(var(--g))`, the interpolation method was kept and React Native dropped the gradient. Strip it on that path too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
개요
상류
nativewind/react-native-cssmain(3.1.0-rc.1, merge-basef70c402이후 24커밋)을zeta/main에 merge 하고@scatterlab/react-native-css@3.1.0-rc.1-zeta.1로 올린다.상류가 가져온 것
!important스타일을 복사·치환 대신 레이어로 유지 (fix(native): keep class, inline and !important styles as layers instead of copying or replacing them nativewind/react-native-css#578), 인라인 스타일은 CSS 변수가 없으면 참조 그대로 통과scale퍼센트 → 비율 (scaleFactor) (fix(transformers): resolve and cascade transform properties as browsers do nativewind/react-native-css#576, fix: resolve react-native-css styling and tooling regressions on Expo 57 nativewind/react-native-css#451)padding-block/-inline→paddingVertical/Horizontal컴파일 (fix(compiler): compile padding-block/-inline to paddingVertical/Horizontal nativewind/react-native-css#580),border-x/y색을 RN 이 그리는 키로 (fix(compiler): land border-x/border-y colours on border keys React Native draws nativewind/react-native-css#581)group-<attr>:)을 컨테이너 스냅샷 기준으로 평가 (fix: resolve react-native-css styling and tooling regressions on Expo 57 nativewind/react-native-css#451):root변수 레지스트리를 dual-package 분할 간 공유 (fix(native): share the :root variable registries across a dual-package split nativewind/react-native-css#410), 스타일 캐시 해시 키 (fix, perf: key style cache by unique hash nativewind/react-native-css#568), 첫 마운트 중복 계산 제거 (perf: avoid calculating styles/rules twice on first mount nativewind/react-native-css#466)inherits: false등록 커스텀 프로퍼티 (feat(native): honour inherits: false on registered custom properties nativewind/react-native-css#567), metro 빌드 중 컴파일러 경고 노출 (feat(metro): surface compiler warnings during a build nativewind/react-native-css#430), 그라디언트colorStop/gradientPosition런타임 함수, babel/metro 수정 다수, node 엔트리(node/*.mjs)fork 패치 처리
상류로 대체돼 제거
d9de7bblogical padding → physical (런타임expandLogicalPadding)90fdbb5(nativewind#580)paddingVertical/Horizontal로 나감bd44e0escale 퍼센트 → 비율a5002c5(nativewind#451),572b652(nativewind#576)scaleFactor가 같은 변환.vendor/tailwind/transformscale 테스트 통과f34524f+26de234컨테이너 attribute 조건 평가a5002c5(nativewind#451)group - disabled attribute테스트(자식은 리렌더 안 되고 부모disabled만 바뀜)가 상류 구현만으로 통과bd3c150문자열"style"target 병합1695e40(nativewind#578)filterCssVariables+ 레이어([class, inline])로 바뀜. 아래 유지 패치와 합쳐 동작 보장유지
de4ee2d,e24cc4e): 상류filterCssVariables위에 3가지만 얹음 —src/native/styles/index.tsundefined값·빈 배열은 걸러진 것으로 취급 (className 스타일을 덮지 않음)styleUpdaterContainer)는 복사 없이 그대로 반환9ee1545):in oklab등을 RN 그라디언트 문자열에서 제거 —src/native/styles/resolve.ts. 인자가 리스트로 풀릴 때와 변수 하나에서 문자열로 풀릴 때(linear-gradient(var(--g))) 모두 적용. 상류gradient-contract테스트의 "oklab 은 표현 불가" 계약은 fork 동작(제거 후 1개 그라디언트로 파싱)으로 바꿈6aa35ea,1ea7364):background-size/position/repeat,transform-origin,mix-blend-mode,isolation,cursor,font-variation-settings,radial-gradient(), 접두어 없는backgroundImage/backgroundSize/backgroundPosition/backgroundRepeat키 —src/compiler/declarations.tslinear-gradient/radial-gradient인자를 콤마 리스트로, 스톱은colorStop)로 맞추고 radial 만 추가.background-image값은 상류처럼join(", ")된 문자열 (bg-none→"none")border-x/y와 공존react-nativeexport condition (ad6235d): 런타임 엔트리를dist/commonjs한 벌로 고정. 상류 fix(native): share the :root variable registries across a dual-package split nativewind/react-native-css#410 은:root레지스트리만 공유할 뿐 module/commonjs 두 벌 번들(+ colorjs.io 두 벌)은 막지 않아 유지@scatterlab/react-native-css, GitHub PackagespublishConfig, repository, peerreact-native >=0.88(접두어 없는 background 키 때문). 나머지는 상류값.yarn.lock은 상류 lock 에서yarn install로 재생성 (차이는 workspace 이름뿐)테스트
origin/zeta/main@apply, spacingpx-0/py-0, transformscale-*4건)upstream/mainexperimental_backgroundImage→backgroundImage(variable-lists,gradient-contract),metro/warnings픽스처에서 fork 가 지원하는 3속성을 다른 미지원 속성으로 교체, oklab 계약 반전className-with-style에 ActivityIndicator·ImageBackground·KeyboardAvoidingView·기본 config 의 all-undefined인라인 스타일 케이스yarn typecheck,yarn lint,yarn build통과배포
이 PR 은 레지스트리 배포를 포함하지 않는다. nativewind 가 react-native-css 를 peer 정확 버전으로 핀하므로 배포 시 nativewind 도 함께 올린다.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QfQGER5BSVC2yNVHk7QTQ3