@salty-css/react 0.0.1-alpha.266 → 0.0.1-alpha.268
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/dynamic-styles.cjs +2 -0
- package/dynamic-styles.d.ts +8 -0
- package/dynamic-styles.js +10 -0
- package/package.json +6 -2
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("@salty-css/core/parsers"),a=async({scope:e,styles:s})=>{const t=(await n.parseStyles(s,e)).join(`
|
2
|
+
`);return r.jsx("style",{children:t})};exports.DynamicStyles=a;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { BaseStyles } from '@salty-css/core/types';
|
2
|
+
/**
|
3
|
+
* Add any dynamic styles to your app with a custom scope.
|
4
|
+
*/
|
5
|
+
export declare const DynamicStyles: ({ scope, styles }: {
|
6
|
+
scope: string;
|
7
|
+
styles: BaseStyles;
|
8
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
|
+
import { parseStyles as e } from "@salty-css/core/parsers";
|
3
|
+
const c = async ({ scope: r, styles: s }) => {
|
4
|
+
const t = (await e(s, r)).join(`
|
5
|
+
`);
|
6
|
+
return /* @__PURE__ */ n("style", { children: t });
|
7
|
+
};
|
8
|
+
export {
|
9
|
+
c as DynamicStyles
|
10
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salty-css/react",
|
3
|
-
"version": "0.0.1-alpha.
|
3
|
+
"version": "0.0.1-alpha.268",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"typings": "./dist/index.d.ts",
|
@@ -63,10 +63,14 @@
|
|
63
63
|
"./helpers": {
|
64
64
|
"import": "./helpers.js",
|
65
65
|
"require": "./helpers.cjs"
|
66
|
+
},
|
67
|
+
"./dynamic-styles": {
|
68
|
+
"import": "./dynamic-styles.js",
|
69
|
+
"require": "./dynamic-styles.cjs"
|
66
70
|
}
|
67
71
|
},
|
68
72
|
"dependencies": {
|
69
|
-
"@salty-css/core": "^0.0.1-alpha.
|
73
|
+
"@salty-css/core": "^0.0.1-alpha.268",
|
70
74
|
"clsx": ">=2.x",
|
71
75
|
"react": ">=19.x || >=18.3.x"
|
72
76
|
}
|