@salty-css/react 0.0.1-alpha.279 → 0.0.1-alpha.280

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("@salty-css/core/parsers"),g=require("@salty-css/core/util"),j=require("./clsx-C11secjj.cjs"),x=require("react"),o=e=>g.toHash(e),c=async(e,n)=>(await S.parseStyles(e,n)).join(`
2
- `),d=async({as:e,scope:n,styles:s,...r})=>{if(e){const a=l=>typeof e=="string"?x.createElement(e,l):e(l);if(!s)return t.jsx(a,{...r});const i=o(s),m=await c(s,n||`.${i}`),y={...r,className:j.clsx(i,r.className)};return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:m}),t.jsx(a,{...y})]})}if(!s)return null;const u=await c(s,n);return t.jsx("style",{children:u})};exports.DynamicStyles=d;exports.getDynamicStylesClassName=o;exports.getDynamicStylesCss=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("@salty-css/core/parsers"),C=require("@salty-css/core/cache/resolve-dynamic-config-cache"),S=require("@salty-css/core/util"),f=require("./clsx-C11secjj.cjs"),j=require("react"),l=e=>S.toHash(e),r=async(e,t)=>{const s=await C.resolveDynamicConfigCache();return(await g.parseStyles(e,t,s)).join(`
2
+ `)},x=async({as:e,scope:t,styles:s,...c})=>{if(e){const a=o=>typeof e=="string"?j.createElement(e,o):e(o);if(!s)return n.jsx(a,{...c});const i=l(s),u=await r(s,t||`.${i}`),y={...c,className:f.clsx(i,c.className)};return n.jsxs(n.Fragment,{children:[n.jsx("style",{children:u}),n.jsx(a,{...y})]})}if(!s)return null;const m=await r(s,t);return n.jsx("style",{children:m})};exports.DynamicStyles=x;exports.getDynamicStylesClassName=l;exports.getDynamicStylesCss=r;
package/dynamic-styles.js CHANGED
@@ -1,25 +1,29 @@
1
- import { jsx as s, jsxs as f, Fragment as y } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as p, Fragment as y } from "react/jsx-runtime";
2
2
  import { parseStyles as u } from "@salty-css/core/parsers";
3
+ import { resolveDynamicConfigCache as g } from "@salty-css/core/cache/resolve-dynamic-config-cache";
3
4
  import { toHash as d } from "@salty-css/core/util";
4
- import { c as g } from "./clsx-OuTLNxxd.js";
5
- import { createElement as h } from "react";
6
- const x = (t) => d(t), m = async (t, r) => (await u(t, r)).join(`
7
- `), D = async ({ as: t, scope: r, styles: n, ...e }) => {
5
+ import { c as h } from "./clsx-OuTLNxxd.js";
6
+ import { createElement as C } from "react";
7
+ const w = (t) => d(t), i = async (t, r) => {
8
+ const n = await g();
9
+ return (await u(t, r, n)).join(`
10
+ `);
11
+ }, E = async ({ as: t, scope: r, styles: n, ...o }) => {
8
12
  if (t) {
9
- const c = (a) => typeof t == "string" ? h(t, a) : t(a);
10
- if (!n) return /* @__PURE__ */ s(c, { ...e });
11
- const o = x(n), l = await m(n, r || `.${o}`), p = { ...e, className: g(o, e.className) };
12
- return /* @__PURE__ */ f(y, { children: [
13
+ const c = (a) => typeof t == "string" ? C(t, a) : t(a);
14
+ if (!n) return /* @__PURE__ */ s(c, { ...o });
15
+ const e = w(n), l = await i(n, r || `.${e}`), f = { ...o, className: h(e, o.className) };
16
+ return /* @__PURE__ */ p(y, { children: [
13
17
  /* @__PURE__ */ s("style", { children: l }),
14
- /* @__PURE__ */ s(c, { ...p })
18
+ /* @__PURE__ */ s(c, { ...f })
15
19
  ] });
16
20
  }
17
21
  if (!n) return null;
18
- const i = await m(n, r);
19
- return /* @__PURE__ */ s("style", { children: i });
22
+ const m = await i(n, r);
23
+ return /* @__PURE__ */ s("style", { children: m });
20
24
  };
21
25
  export {
22
- D as DynamicStyles,
23
- x as getDynamicStylesClassName,
24
- m as getDynamicStylesCss
26
+ E as DynamicStyles,
27
+ w as getDynamicStylesClassName,
28
+ i as getDynamicStylesCss
25
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.279",
3
+ "version": "0.0.1-alpha.280",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "@salty-css/core": "^0.0.1-alpha.279",
73
+ "@salty-css/core": "^0.0.1-alpha.280",
74
74
  "clsx": ">=2.x",
75
75
  "react": ">=19.x || >=18.3.x"
76
76
  }