@silkui/vite 0.1.9 → 0.1.11
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/package.json +1 -1
- package/src/compiler.js +1 -1
- package/src/compiler.wasm +0 -0
- package/src/report.js +7 -0
package/package.json
CHANGED
package/src/compiler.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
|
|
3
3
|
const encoder = new TextEncoder();
|
|
4
4
|
const decoder = new TextDecoder();
|
|
5
|
-
const kinds = ['at-rule', 'selector', 'property', 'value', 'feature'];
|
|
5
|
+
const kinds = ['at-rule', 'selector', 'property', 'value', 'feature', 'animation'];
|
|
6
6
|
let compiler;
|
|
7
7
|
|
|
8
8
|
export function compileStylesheet(css, { strict = false, resolveUrl } = {}) {
|
package/src/compiler.wasm
CHANGED
|
Binary file
|
package/src/report.js
CHANGED
|
@@ -22,6 +22,13 @@ function quiet(diagnostic) {
|
|
|
22
22
|
* equivalent of. `SILKUI_CSS_REPORT=all` writes every dropped feature on its own line instead.
|
|
23
23
|
*/
|
|
24
24
|
export function reportDropped(warn, diagnostics) {
|
|
25
|
+
// `@keyframes` that set a property Silk UI does not animate: the property keeps its base value.
|
|
26
|
+
for (const item of diagnostics) {
|
|
27
|
+
if (item.kind !== "animation") continue;
|
|
28
|
+
const [name, property] = item.feature.split(": ");
|
|
29
|
+
warn(`@keyframes ${name} sets ${property}, which Silk UI does not animate: it keeps its base value`);
|
|
30
|
+
}
|
|
31
|
+
diagnostics = diagnostics.filter(item => item.kind !== "animation");
|
|
25
32
|
if (process.env.SILKUI_CSS_REPORT === "all") {
|
|
26
33
|
for (const item of diagnostics) warn(`dropped ${item.count} ${item.kind} occurrence(s): ${item.feature}`);
|
|
27
34
|
return;
|