@cross-css/native-darwin-arm64 0.3.2 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +32 -0
  2. package/package.json +1 -1
  3. package/xcss.node +0 -0
package/README.md CHANGED
@@ -63,3 +63,35 @@ descriptor at-rule bodies are excluded. Conditional blocks nested in rules inher
63
63
  eligible. Consumers may substitute representative CSS values for typed parts;
64
64
  this is a broad compatibility check, not proof for all values of that type.
65
65
  Changes to any file or resolution invalidate the snapshot revision.
66
+
67
+ ## Selector analysis and specificity (API v3)
68
+
69
+ `LanguageService.selectors(uri)` returns `{ revision, selectors }` without
70
+ compiling CSS. Each selector-list member has its original UTF-16 `range`,
71
+ non-overlapping `parts` (`kind`, `range`), and either `specificity`
72
+ (`ids`, `classes`, `types`) or an explanatory `reason` when an exact
73
+ score is unavailable. Compare specificity tuples lexicographically, never as
74
+ decimal numbers. This is selector specificity, not full cascade priority.
75
+
76
+ Classification covers classes, IDs, tags, attribute names, pseudo-classes,
77
+ pseudo-elements, universal selectors, nesting, combinators, and namespace prefixes.
78
+ Attribute strings and numbers keep lexical highlighting. Functional pseudo names
79
+ include colon prefixes, while their selector arguments have independent parts.
80
+ The existing eight semantic token indices are stable; API v3 appends
81
+ `selectorId`, `selectorTag`, `selectorAttribute`, `pseudoClass`,
82
+ `pseudoElement`, `selectorUniversal`, `selectorNesting`,
83
+ `selectorCombinator`, and `selectorNamespace`. IDs no longer use `variable`.
84
+
85
+ Specificity follows [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascade/Specificity/)
86
+ and the linked CSS specifications: zero-weight `:where()`, maximum arguments
87
+ for `:is()`, `:not()`, and `:has()`, nth-child selector filters,
88
+ shadow DOM selectors, legacy pseudo-elements, and implicit/explicit nesting.
89
+ Parent lists contribute their maximum tuple; repeated `&` contributes repeatedly.
90
+ XCSS `:local` and `:global` wrappers are transparent. Scoped renaming does
91
+ not change specificity. At-rule boundaries add no specificity; an explicit
92
+ `:scope` counts as a pseudo-class. Keyframe steps are excluded.
93
+
94
+ Invalid/recovered selectors, unsupported functional selectors, unresolved parents,
95
+ and selectors in injection definitions whose call-site context is unknown have
96
+ no exact score. Other valid selector-list members remain queryable. This API does
97
+ not expand injection calls or provide lint thresholds or editor hover UI.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cross-css/native-darwin-arm64",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Precompiled XCSS native binding for darwin/arm64",
5
5
  "license": "MIT",
6
6
  "author": "Ivan Kobtsev",
package/xcss.node CHANGED
Binary file