@symbiote-native/css-parser 0.5.1 → 0.5.3

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.
@@ -756,13 +756,9 @@ function declarationToStyleAt(declaration, context, depth) {
756
756
  }
757
757
  case 'text-shadow':
758
758
  return textShadowToStyle(value, context);
759
- // A CSS-Modules DIRECTIVE, not a style property — and lightningcss has ALREADY acted on it:
760
- // the composed names come back through `exports[...].composes`, which
761
- // `metro-css-module/index.ts` walks to flatten a chain. Measured 2026-08-20: it arrives as a
762
- // first-class `property: 'composes'`, NOT under `custom` where an unknown name goes, so it fell
763
- // through to the PROPERTY_TABLE miss and every author of a WORKING `.module.*` file was told
764
- // "unsupported CSS property" on every build. The drop warnings are the only signal that a real
765
- // rule died; a channel that cries wolf on working code is the one nobody reads when it matters.
759
+ // A CSS-Modules DIRECTIVE, not a style property: the composed names come back through
760
+ // `exports[...].composes`, which `metro-css-module/index.ts` flattens. It arrives as a
761
+ // first-class `property: 'composes'`, NOT under `custom`, so it must be matched here.
766
762
  case 'composes':
767
763
  return {};
768
764
  default:
@@ -12,8 +12,8 @@
12
12
  // Class names are emitted AS AUTHORED (`card-title` stays `card-title`, plus whatever the scoping
13
13
  // rename appended). No camelCase anywhere in this file: normalization is what the trap was made of.
14
14
  //
15
- // Measured 2026-08-20 and the reason this is ONE pass, not two: with `cssModules` on, the visitor
16
- // still sees the ORIGINAL class names — lightningcss renames AFTER the visitor walk. So the AST
15
+ // The reason this is ONE pass, not two: with `cssModules` on, the visitor still sees the
16
+ // ORIGINAL class names — lightningcss renames AFTER the visitor walk. So the AST
17
17
  // gives authored tokens and `exports` gives their renamed spelling, and the renamed CSS text never
18
18
  // has to be parsed a second time (which is exactly what `../metro-css-module/index.ts` had to do,
19
19
  // and what mangled a scope tail whose base36 hash began with a letter).
@@ -28,10 +28,9 @@ import { selectorsToMatches } from "./selectors.js";
28
28
  import { warnOnce } from "../values.js";
29
29
  // A conditional at-rule is DROPPED WHOLE, its nested rules with it. There is no media-query engine
30
30
  // in React Native, so applying `.responsive` from `@media (min-width: 900px)` would paint it on
31
- // every phone — worse than not supporting the rule, because it looks supported. The retired text
32
- // pass dropped these too, but silently: it simply never walked into an at-rule. Measured
33
- // 2026-08-20: returning `[]` from the at-rule visitor removes it BEFORE the walk descends, so a
34
- // nested style rule never reaches the collector; without it lightningcss hoists it out.
31
+ // every phone — worse than not supporting the rule, because it looks supported. Returning `[]`
32
+ // from the at-rule visitor removes it BEFORE the walk descends, so a nested style rule never
33
+ // reaches the collector; without it lightningcss hoists it out.
35
34
  //
36
35
  // `@keyframes` and `@font-face` need no entry here — neither emits a style rule to begin with.
37
36
  const CONDITIONAL_AT_RULES = ['media', 'supports', 'container'];
@@ -11,7 +11,7 @@
11
11
  // .card[data-x]{…} -> key `card[dataX]` a key no element can ever carry
12
12
  // .a.b / .a .b / .a>.b / .a+.b -> all key `aB` five selectors, one key, merged
13
13
  //
14
- // (Traps six and seven in `.claude/rules/style-registry-collisions.md`, measured 2026-08-20.)
14
+ // (Traps six and seven in `.claude/rules/style-registry-collisions.md`.)
15
15
  //
16
16
  // So this module reports what the selector ACTUALLY says and refuses to guess:
17
17
  // - tokens stay AS AUTHORED — `card-title` is `card-title`. Casing is the caller's problem, and
@@ -32,8 +32,7 @@
32
32
  // a raw token stream — structurally the same thing `:global(X)` is under that same mode. All three
33
33
  // are folded into `deep` here.
34
34
  //
35
- // `:global(X)` arrives in TWO DIFFERENT SHAPES and BOTH are live, so both are handled (measured
36
- // 2026-08-20, lightningcss 1.32, same CSS through both modes):
35
+ // `:global(X)` arrives in TWO DIFFERENT SHAPES and BOTH are live, so both are handled:
37
36
  //
38
37
  // cssModules OFF {kind:'custom-function', name:'global', arguments:[…raw token stream…]}
39
38
  // cssModules ON {kind:'global', selector:[…parsed SelectorComponent[]…]}
@@ -60,10 +59,9 @@ const DROP_EXPLANATION = {
60
59
  // `:active` support is OFF, and the selector machinery below is kept intact so one line turns it
61
60
  // back on.
62
61
  //
63
- // WHY. The pressed look has a second, better route that did not exist when `:active` landed: a
64
- // functional `style={({pressed}) => …}`, which the engine resolves into `style` + `activeStyle`
65
- // (`routeProp`, 2026-08-23). It reaches the same slot with no pseudo-class machinery and it is what
66
- // the ecosystem already writes — so the reason `:active` existed is gone.
62
+ // WHY. The pressed look has a second, better route: a functional `style={({pressed}) => …}`,
63
+ // which the engine resolves into `style` + `activeStyle` (`routeProp`). It reaches the same slot
64
+ // with no pseudo-class machinery and it is what the ecosystem already writes.
67
65
  //
68
66
  // Keeping BOTH live is what argues against it: they occupy different cascade slots (`activeStyle`
69
67
  // replaces the authored style, an `:active` class rule replaces the class style), so an adapter has
@@ -370,13 +368,9 @@ function consumeComponent(builder, component) {
370
368
  // depends on for every node at once.
371
369
  if (component.kind === STATE_PSEUDO_CLASS) {
372
370
  builder.specificity[1]++;
373
- // ...but NOT through a scope boundary. `:deep(.b:active)` already dropped, because a
374
- // custom-function payload is a raw token stream this walk re-parses; `.a >>> .b:active`
375
- // did NOT, because `>>>` is a real combinator and the walk reaches the pseudo-class
376
- // normally. Two spellings of one relation behaving differently is the bug, and the
377
- // decision (2026-08-23) is to refuse BOTH: a deep selector reaches into another
378
- // component's internals, and the state token is only meaningful on the node whose press
379
- // machine owns it — which is exactly the node a deep rule cannot predict.
371
+ // ...but NOT through a scope boundary. Both `:deep(.b:active)` and `.a >>> .b:active`
372
+ // refuse: a deep selector reaches into another component's internals, and the state
373
+ // token is only meaningful on the node whose press machine owns it.
380
374
  if (builder.combinators.includes('deep') ||
381
375
  builder.pending === 'deep') {
382
376
  drop(builder, 'pseudo-class', 'active through a deep combinator');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/css-parser",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Build-time CSS/SCSS/Less/Stylus compiler for SymbioteNative — compiles stylesheets to React Native style objects, resolved at runtime via a cross-adapter class-name registry.",
5
5
  "license": "MIT",
6
6
  "repository": {