@pikacss/core 0.0.23 → 0.0.24
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/dist/index.cjs +4 -6
- package/dist/index.mjs +4 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -308,25 +308,23 @@ function keyframes() {
|
|
|
308
308
|
};
|
|
309
309
|
engine.keyframes.add(...configList);
|
|
310
310
|
engine.addPreflight((engine2, isFormatted) => {
|
|
311
|
-
const
|
|
311
|
+
const maybeUsedName = /* @__PURE__ */ new Set();
|
|
312
312
|
engine2.store.atomicStyles.forEach(({ content: { property, value } }) => {
|
|
313
313
|
if (property === "animationName") {
|
|
314
|
-
value.forEach((name) =>
|
|
314
|
+
value.forEach((name) => maybeUsedName.add(name));
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
317
|
if (property === "animation") {
|
|
318
318
|
value.forEach((value2) => {
|
|
319
319
|
const animations = value2.split(",").map((v) => v.trim());
|
|
320
320
|
animations.forEach((animation) => {
|
|
321
|
-
|
|
322
|
-
if (isNotNullish(name))
|
|
323
|
-
used.add(name);
|
|
321
|
+
addToSet(maybeUsedName, ...animation.split(" "));
|
|
324
322
|
});
|
|
325
323
|
});
|
|
326
324
|
}
|
|
327
325
|
});
|
|
328
326
|
return renderCSSStyleBlocks(
|
|
329
|
-
new Map(Array.from(engine2.keyframes.store.entries()).filter(([name, { pruneUnused }]) => pruneUnused === false ||
|
|
327
|
+
new Map(Array.from(engine2.keyframes.store.entries()).filter(([name, { pruneUnused }]) => pruneUnused === false || maybeUsedName.has(name)).map(([name, { frames }]) => [
|
|
330
328
|
`@keyframes ${name}`,
|
|
331
329
|
{
|
|
332
330
|
properties: [],
|
package/dist/index.mjs
CHANGED
|
@@ -306,25 +306,23 @@ function keyframes() {
|
|
|
306
306
|
};
|
|
307
307
|
engine.keyframes.add(...configList);
|
|
308
308
|
engine.addPreflight((engine2, isFormatted) => {
|
|
309
|
-
const
|
|
309
|
+
const maybeUsedName = /* @__PURE__ */ new Set();
|
|
310
310
|
engine2.store.atomicStyles.forEach(({ content: { property, value } }) => {
|
|
311
311
|
if (property === "animationName") {
|
|
312
|
-
value.forEach((name) =>
|
|
312
|
+
value.forEach((name) => maybeUsedName.add(name));
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
if (property === "animation") {
|
|
316
316
|
value.forEach((value2) => {
|
|
317
317
|
const animations = value2.split(",").map((v) => v.trim());
|
|
318
318
|
animations.forEach((animation) => {
|
|
319
|
-
|
|
320
|
-
if (isNotNullish(name))
|
|
321
|
-
used.add(name);
|
|
319
|
+
addToSet(maybeUsedName, ...animation.split(" "));
|
|
322
320
|
});
|
|
323
321
|
});
|
|
324
322
|
}
|
|
325
323
|
});
|
|
326
324
|
return renderCSSStyleBlocks(
|
|
327
|
-
new Map(Array.from(engine2.keyframes.store.entries()).filter(([name, { pruneUnused }]) => pruneUnused === false ||
|
|
325
|
+
new Map(Array.from(engine2.keyframes.store.entries()).filter(([name, { pruneUnused }]) => pruneUnused === false || maybeUsedName.has(name)).map(([name, { frames }]) => [
|
|
328
326
|
`@keyframes ${name}`,
|
|
329
327
|
{
|
|
330
328
|
properties: [],
|