@cross-css/native-darwin-arm64 0.4.0 → 0.6.0
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.
- package/README.md +35 -0
- package/package.json +1 -1
- package/xcss.node +0 -0
package/README.md
CHANGED
|
@@ -96,6 +96,20 @@ and selectors in injection definitions whose call-site context is unknown have
|
|
|
96
96
|
no exact score. Other valid selector-list members remain queryable. This API does
|
|
97
97
|
not expand injection calls or provide lint thresholds or editor hover UI.
|
|
98
98
|
|
|
99
|
+
## CSS value contexts
|
|
100
|
+
|
|
101
|
+
`LanguageService.cssValues(uri)` returns `{ revision, values }` in original-source
|
|
102
|
+
order. Each value has `text`, a UTF-16 `range`, an optional CSS `property`,
|
|
103
|
+
validation `parts` and `checkable` status, and function names with their exact
|
|
104
|
+
source ranges. Values include declarations, constant and variable initializers,
|
|
105
|
+
and parameter defaults. Raw bodies are excluded; strings and URL contents do not
|
|
106
|
+
produce function occurrences. Typed representatives describe only XCSS symbols
|
|
107
|
+
and arithmetic subexpressions, preserving surrounding CSS for host validation.
|
|
108
|
+
|
|
109
|
+
The semantic legend appends `cssFunction`, `cssKeyword`, and `cssColor`. Editor
|
|
110
|
+
adapters classify CSS values using their CSS grammar and merge those tokens with
|
|
111
|
+
the native symbol tokens, which take precedence. All earlier indices are stable.
|
|
112
|
+
|
|
99
113
|
## Shared utilities
|
|
100
114
|
|
|
101
115
|
`Compiler.compile(entry)` returns an optional `utilities` artifact alongside
|
|
@@ -104,3 +118,24 @@ module artifacts. It contains `css`, `sourceMap`, `sourceDependencies`, and mapp
|
|
|
104
118
|
`Compiler.compileUtilities(entries)` returns the deduplicated utility union for
|
|
105
119
|
several entry modules. Recompute the union after source updates or removals.
|
|
106
120
|
Bundled compilation includes utility CSS directly in the module artifact.
|
|
121
|
+
|
|
122
|
+
## Source formatting
|
|
123
|
+
|
|
124
|
+
`formatSource(source, options?)` formats XCSS without compiling CSS, resolving
|
|
125
|
+
imports, or reading files. It returns `{ text, diagnostics }`: `text` is absent
|
|
126
|
+
when syntax is invalid, and the original source must be left unchanged. Semantic
|
|
127
|
+
errors such as unresolved references do not prevent formatting. Diagnostic ranges
|
|
128
|
+
are zero-based UTF-16 positions in the original input.
|
|
129
|
+
|
|
130
|
+
Options are `tabWidth` (1–16, default 2), `useTabs` (default false),
|
|
131
|
+
`printWidth` (1–1000, default 80), and `endOfLine` (`lf` or `crlf`, default
|
|
132
|
+
`lf`). Formatting adds a final newline to nonempty output. `@raw` bodies and
|
|
133
|
+
nodes preceded by `/* prettier-ignore */` remain verbatim, even when their line
|
|
134
|
+
endings differ from the requested layout. Unknown at-rules remain opaque.
|
|
135
|
+
|
|
136
|
+
The Rust API is `xcss_format::format(source, &FormatOptions)`. The formatter
|
|
137
|
+
uses Malva's Raffia-based CSS printer and an XCSS document printer. CSS golden
|
|
138
|
+
fixtures are pinned to Prettier 3.6.2; exhaustive Prettier equivalence is not
|
|
139
|
+
guaranteed. XCSS headers and expressions use compatible layout conventions.
|
|
140
|
+
Opaque fragments deliberately retain their original spelling; comments are
|
|
141
|
+
preserved byte-for-byte. There is no CLI formatting command in this release.
|
package/package.json
CHANGED
package/xcss.node
CHANGED
|
Binary file
|