@salty-css/react 0.0.1-alpha.48 → 0.0.1-alpha.49

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/keyframes.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./parse-styles-SPT4zc_H.cjs"),b=({animationName:u,params:l,appendInitialStyles:m,...t})=>{const s=u||c.toHash(t),n=(r={})=>{const{duration:e="500ms",easing:o="ease-in-out",delay:a="0s",iterationCount:i="1",direction:S="normal",fillMode:d="forwards",playState:p="running"}={...l,...r},$=`${s} ${e} ${o} ${a} ${i} ${S} ${d} ${p}`;if(!m)return $;const g=c.parseStyles(t.from||t["0%"],"");return`${$};${g}`},y=Object.entries(t).reduce((r,[e,o])=>{const a=c.parseStyles(o,""),i=typeof e=="number"?`${e}%`:e;return`${r}${i}{${a}}`},""),f=`@keyframes ${s} {${y}}`;return Object.assign(n,{toString:n,isKeyframes:!0,animationName:s,css:f,keyframes:t}),n};exports.keyframes=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./parse-styles-SPT4zc_H.cjs"),j=({animationName:m,params:l,appendInitialStyles:f,...t})=>{const r=m||u.toHash(t),o=(n={})=>{const{duration:e="500ms",easing:s="ease-in-out",delay:a="0s",iterationCount:i="1",direction:d="normal",fillMode:g="forwards",playState:p="running"}={...l,...n},c=`${r} ${e} ${s} ${a} ${i} ${d} ${g} ${p}`;if(!f)return c;const $=t.from||t["0%"];if(!$)return c;const b=u.parseStyles($,"");return`${c};${b}`},y=Object.entries(t).reduce((n,[e,s])=>{if(!s)return n;const a=u.parseStyles(s,""),i=typeof e=="number"?`${e}%`:e;return`${n}${i}{${a}}`},""),S=`@keyframes ${r} {${y}}`;return Object.assign(o,{toString:o,isKeyframes:!0,animationName:r,css:S,keyframes:t}),o};exports.keyframes=j;
package/keyframes.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CssStyles, StyleValue } from '@salty-css/core/types';
2
2
  type KeyframeKeys = number | 'from' | 'to' | `${number}%`;
3
3
  type Keyframes = {
4
- [key in KeyframeKeys]: CssStyles;
4
+ [key in KeyframeKeys]?: CssStyles;
5
5
  };
6
6
  interface KeyframesConfig {
7
7
  animationName?: string;
package/keyframes.js CHANGED
@@ -1,30 +1,33 @@
1
- import { t as b, p as c } from "./parse-styles-T74HIH4_.js";
2
- const C = ({ animationName: m, params: u, appendInitialStyles: f, ...t }) => {
3
- const s = m || b(t), e = (r = {}) => {
1
+ import { t as j, p as m } from "./parse-styles-T74HIH4_.js";
2
+ const N = ({ animationName: u, params: f, appendInitialStyles: l, ...t }) => {
3
+ const e = u || j(t), o = (s = {}) => {
4
4
  const {
5
5
  duration: n = "500ms",
6
- easing: o = "ease-in-out",
6
+ easing: r = "ease-in-out",
7
7
  delay: a = "0s",
8
8
  iterationCount: i = "1",
9
- direction: d = "normal",
10
- fillMode: y = "forwards",
9
+ direction: y = "normal",
10
+ fillMode: g = "forwards",
11
11
  playState: S = "running"
12
- } = { ...u, ...r }, $ = `${s} ${n} ${o} ${a} ${i} ${d} ${y} ${S}`;
13
- if (!f) return $;
14
- const g = c(t.from || t["0%"], "");
15
- return `${$};${g}`;
16
- }, l = Object.entries(t).reduce((r, [n, o]) => {
17
- const a = c(o, ""), i = typeof n == "number" ? `${n}%` : n;
18
- return `${r}${i}{${a}}`;
19
- }, ""), p = `@keyframes ${s} {${l}}`;
20
- return Object.assign(e, {
21
- toString: e,
12
+ } = { ...f, ...s }, $ = `${e} ${n} ${r} ${a} ${i} ${y} ${g} ${S}`;
13
+ if (!l) return $;
14
+ const c = t.from || t["0%"];
15
+ if (!c) return $;
16
+ const b = m(c, "");
17
+ return `${$};${b}`;
18
+ }, p = Object.entries(t).reduce((s, [n, r]) => {
19
+ if (!r) return s;
20
+ const a = m(r, ""), i = typeof n == "number" ? `${n}%` : n;
21
+ return `${s}${i}{${a}}`;
22
+ }, ""), d = `@keyframes ${e} {${p}}`;
23
+ return Object.assign(o, {
24
+ toString: o,
22
25
  isKeyframes: !0,
23
- animationName: s,
24
- css: p,
26
+ animationName: e,
27
+ css: d,
25
28
  keyframes: t
26
- }), e;
29
+ }), o;
27
30
  };
28
31
  export {
29
- C as keyframes
32
+ N as keyframes
30
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.48",
3
+ "version": "0.0.1-alpha.49",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@salty-css/core": "^0.0.1-alpha.48",
44
+ "@salty-css/core": "^0.0.1-alpha.49",
45
45
  "clsx": ">=2.x",
46
46
  "react": ">=19.x || >=18.3.x"
47
47
  }