@salty-css/vite 0.0.1-alpha.11 → 0.0.1-alpha.111
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/README.md +83 -8
- package/index.cjs +24 -14
- package/index.d.ts +1 -0
- package/index.js +283 -211
- package/package.json +10 -2
package/README.md
CHANGED
@@ -1,15 +1,90 @@
|
|
1
|
-
# Salty
|
1
|
+
# Salty CSS - Kinda sweet but yet spicy CSS-in-JS library
|
2
2
|
|
3
|
-
|
3
|
+
In the world of frontend dev is there anything saltier than CSS? Salty CSS is built to provide better developer experience for developers looking for performant and feature rich CSS-in-JS solutions.
|
4
4
|
|
5
|
-
|
5
|
+
## Features
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
- Build time compilation to achieve awesome runtime performance and minimal size
|
8
|
+
- Next.js, React Server Components, Vite and Webpack support
|
9
|
+
- Type safety with out of the box TypeScript and ESLint plugin
|
10
|
+
- Advanced CSS variables configuration to allow smooth token usage
|
11
|
+
- Style templates to create reusable styles easily
|
11
12
|
|
12
|
-
|
13
|
+
## Get started
|
14
|
+
|
15
|
+
- Initialize: `npx salty-css init [directory]`
|
16
|
+
- Create component: `npx salty-css generate [filePath]`
|
17
|
+
- Build: `npx salty-css build [directory]`
|
18
|
+
|
19
|
+
### Packages
|
20
|
+
|
21
|
+
Note: Fastest way to get started with any framework is [npx salty-css init [directory]](#initialize-salty-css-for-a-project) command
|
22
|
+
|
23
|
+
- [Next.js](#nextjs) → `npm install @salty-css/next` + [Next.js install guide](#nextjs) + [Next.js example app](https://github.com/margarita-form/salty-css-website)
|
24
|
+
- [React](#react) → `npm install @salty-css/react` + [React install guide](#react) + [React example code](#code-examples)
|
25
|
+
- [Vite](#vite) → `npm install @salty-css/vite` + [(Vite install guide)](#vite)
|
26
|
+
- [Webpack](https://www.npmjs.com/package/@salty-css/webpack) → `npm install @salty-css/webpack` + Guide coming soon
|
27
|
+
- [ESLint](https://www.npmjs.com/package/@salty-css/eslint-plugin-core) → `npm install @salty-css/eslint-plugin-core` + Guide coming soon
|
28
|
+
- [Core](https://www.npmjs.com/package/@salty-css/react) → `npm install @salty-css/core` (This package contains code for internal use)
|
29
|
+
|
30
|
+
### Add Salty CSS to your project with `salty-css` CLI
|
31
|
+
|
32
|
+
#### Initialize Salty CSS for a project
|
33
|
+
|
34
|
+
In your existing repository run `npx salty-css init [directory]` which installs required salty-css packages to the current directory, detects framework in use (current support for vite and next.js) and creates project files to the provided directory. Directory can be left blank if you want files to be created to the current directory. Init will also create `.saltyrc.json` which contains some metadata for future CLI commands.
|
35
|
+
|
36
|
+
#### Create components
|
37
|
+
|
38
|
+
Components can be created with `npx salty-css generate [filePath]` which then creates a new Salty CSS component file to the specified path. Additional options like `--dir, --tag, --name and --className` are also supported. Read more about them with `npx salty-css generate --help`
|
39
|
+
|
40
|
+
#### Build / Compile Salty CSS
|
41
|
+
|
42
|
+
If you want to manually build your project that can be done by running `npx salty-css build [directory]`. Directory is not required as CLI can use default directory defined in `.saltyrc.json`. Note that build generates css files but Vite / Webpack plugin is still required for full support.
|
43
|
+
|
44
|
+
#### Update Salty CSS packages
|
45
|
+
|
46
|
+
To ease the pain of package updates all Salty CSS packages can be updated with `npx salty-css update`
|
47
|
+
|
48
|
+
### Manual work
|
49
|
+
|
50
|
+
#### Next.js
|
51
|
+
|
52
|
+
1. For Next.js support install `npm i @salty-css/next @salty-css/core @salty-css/react`
|
53
|
+
2. Create `salty.config.ts` to your app directory
|
54
|
+
3. Add Salty CSS plugin to next.js config
|
55
|
+
|
56
|
+
- **Next.js 15:** In `next.config.ts` add import for salty plugin `import { withSaltyCss } from '@salty-css/next';` and then add `withSaltyCss` to wrap your nextConfig export like so `export default withSaltyCss(nextConfig);`
|
57
|
+
- **Next.js 14 and older:** In `next.config.js` add import for salty plugin `const { withSaltyCss } = require('@salty-css/next');` and then add `withSaltyCss` to wrap your nextConfig export like so `module.exports = withSaltyCss(nextConfig);`
|
58
|
+
|
59
|
+
4. Make sure that `salty.config.ts` and `next.config.ts` are in the same folder!
|
60
|
+
5. Build `saltygen` directory by running your app once or with cli `npx salty-css build [directory]`
|
61
|
+
6. Import global styles from `saltygen/index.css` to some global css file with `@import 'insert_path_to_index_css';`.
|
62
|
+
|
63
|
+
[Check out Next.js demo project](https://github.com/margarita-form/salty-css-website) or [react example code](#code-examples)
|
64
|
+
|
65
|
+
#### React
|
66
|
+
|
67
|
+
1. Install related dependencies: `npm i @salty-css/core @salty-css/react`
|
68
|
+
2. Create `salty.config.ts` to your app directory
|
69
|
+
3. Configure your build tool to support Salty CSS ([Vite](#vite) or Webpack)
|
70
|
+
|
71
|
+
[Check out react example code](#code-examples)
|
72
|
+
|
73
|
+
#### Vite
|
74
|
+
|
75
|
+
1. For Vite support install `npm i @salty-css/vite @salty-css/core`
|
76
|
+
2. In `vite.config` add import for salty plugin `import { saltyPlugin } from '@salty-css/vite';` and then add `saltyPlugin(__dirname)` to your vite configuration plugins
|
77
|
+
3. Make sure that `salty.config.ts` and `vite.config.ts` are in the same folder!
|
78
|
+
4. Build `saltygen` directory by running your app once or with cli `npx salty-css build [directory]`
|
79
|
+
5. Import global styles from `saltygen/index.css` to some global css file with `@import 'insert_path_to_index_css';`.
|
80
|
+
|
81
|
+
### Create components
|
82
|
+
|
83
|
+
1. Create salty components with styled only inside files that end with `.css.ts`, `.salty.ts` `.styled.ts` or `.styles.ts`
|
84
|
+
|
85
|
+
## Code examples
|
86
|
+
|
87
|
+
### Basic usage example with Button
|
13
88
|
|
14
89
|
**Salty config**
|
15
90
|
|
package/index.cjs
CHANGED
@@ -1,18 +1,28 @@
|
|
1
|
-
"use strict";Object.
|
2
|
-
${
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const rt=require("esbuild"),it=require("child_process"),l=require("path"),f=require("fs"),L=require("fs/promises"),V=require("winston");var R=typeof document<"u"?document.currentScript:null;function ct(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const U=ct(rt),B=t=>String.fromCharCode(t+(t>25?39:97)),at=(t,e)=>{let s="",n;for(n=Math.abs(t);n>52;n=n/52|0)s=B(n%52)+s;return s=B(n%52)+s,s.length<e?s=s.padStart(e,"a"):s.length>e&&(s=s.slice(-e)),s},lt=(t,e)=>{let s=e.length;for(;s;)t=t*33^e.charCodeAt(--s);return t},q=(t,e=3)=>{const s=lt(5381,JSON.stringify(t))>>>0;return at(s,e)};function E(t){return t?typeof t!="string"?E(String(t)):t.replace(/\s/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(e,s)=>(s>0?"-":"")+e.toLowerCase()):""}const ut=(t,e)=>{if(typeof t!="string")return{result:t};if(!e)return{result:t};const s=[];return Object.values(e).forEach(n=>{const{pattern:o,transform:i}=n;t=t.replace(o,y=>{const{value:a,css:j}=i(y);return j&&s.push(j),a})}),{result:t,additionalCss:s}},G=t=>typeof t!="string"?{result:t}:/\{[^{}]+\}/g.test(t)?{result:t.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${E(n[1].replaceAll(".","-"))})`)}:{result:t},D=(t,e,s,n)=>{if(!t)return"";const o=[],i=Object.entries(t).reduce((a,[j,r])=>{const d=j.trim();if(typeof r=="function"&&(r=r()),typeof r=="object"){if(!r)return a;if(d==="variants")return Object.entries(r).forEach(([S,c])=>{c&&Object.entries(c).forEach(([p,m])=>{if(!m)return;const h=`${e}.${S}-${p}`,T=D(m,h);o.push(T)})}),a;if(d==="defaultVariants")return a;if(d==="compoundVariants")return r.forEach(S=>{const{css:c,...p}=S,m=Object.entries(p).reduce((T,[w,F])=>`${T}.${w}-${F}`,e),h=D(c,m);o.push(h)}),a;if(d.startsWith("@")){const S=D(r,e),c=`${d} {
|
2
|
+
${S.replace(`
|
3
3
|
`,`
|
4
4
|
`)}
|
5
|
-
}`;return o.push(c),a}const
|
6
|
-
`);if(!
|
7
|
-
`)},
|
8
|
-
`)};
|
9
|
-
|
10
|
-
|
5
|
+
}`;return o.push(c),a}const g=j.includes("&")?d.replace("&",e):d.startsWith(":")?`${e}${d}`:`${e} ${d}`,$=D(r,g);return o.push($),a}const b=d.startsWith("-")?d:E(d),k=(g,$=";")=>a=`${a}${g}${$}`,C=g=>k(`${b}:${g}`);if(typeof r=="number")return C(r);if(typeof r!="string")if("toString"in r)r=r.toString();else return a;const{modifiers:u}={},O=function*(){yield G(r),yield ut(r,u)}();for(const{result:g,additionalCss:$=[]}of O)r=g,$.forEach(S=>{const c=D(S,"");k(c,"")});return C(r)},"");if(!i)return o.join(`
|
6
|
+
`);if(!e)return i;let y="";return y=`${e} { ${i} }`,[y,...o].join(`
|
7
|
+
`)},H=(t,e=[])=>{if(!t)return"";const s=[],n={};if(Object.entries(t).forEach(([o,i])=>{if(typeof i=="object"){if(!i)return;const y=o.trim(),a=H(i,[...e,y]);s.push(a)}else n[o]=i}),Object.keys(n).length){const o=e.map(E).join("-"),i=D(n,`.${o}`);s.push(i)}return s.join(`
|
8
|
+
`)},ft=t=>Object.entries(t).reduce((e,[s,n])=>(typeof n=="object"&&(e[s]=K(n).map(o=>`"${o}"`).join(" | ")),e),{}),K=(t,e="",s=new Set)=>t?(Object.entries(t).forEach(([n,o])=>{const i=e?`${e}.${n}`:n;return typeof o=="object"?K(o,i,s):s.add(e)}),[...s]):[],X=t=>{if(!t||t==="/")throw new Error("Could not find package.json file");const e=l.join(t,"package.json");return f.existsSync(e)?e:X(l.join(t,".."))},pt=async t=>{const e=X(t);return await L.readFile(e,"utf-8").then(JSON.parse).catch(()=>{})},dt=async t=>{const e=await pt(t);if(e)return e.type};let M;const Y=async t=>{if(M)return M;const e=await dt(t);return e==="module"?M="esm":(e==="commonjs"||(typeof document>"u"?require("url").pathToFileURL(__filename).href:R&&R.tagName.toUpperCase()==="SCRIPT"&&R.src||new URL("index.cjs",document.baseURI).href).endsWith(".cjs"))&&(M="cjs"),M||"esm"},Z=V.createLogger({level:"debug",format:V.format.combine(V.format.colorize(),V.format.cli()),transports:[new V.transports.Console({})]}),A={externalModules:[]},Q=t=>{if(A.externalModules.length>0)return A.externalModules;const e=l.join(t,"salty.config.ts"),n=f.readFileSync(e,"utf8").match(/externalModules:\s?\[(.*)\]/);if(!n)return[];const o=n[1].split(",").map(i=>i.replace(/['"`]/g,"").trim());return A.externalModules=o,o},J=t=>l.join(t,"./saltygen"),yt=["salty","css","styles","styled"],gt=(t=[])=>new RegExp(`\\.(${[...yt,...t].join("|")})\\.`),_=(t,e=[])=>gt(e).test(t),mt=async t=>{const e=J(t),s=l.join(t,"salty.config.ts"),n=l.join(e,"salty.config.js"),o=await Y(t),i=Q(t);await U.build({entryPoints:[s],minify:!0,treeShaking:!0,bundle:!0,outfile:n,format:o,external:i});const y=Date.now(),{config:a}=await import(`${n}?t=${y}`);return a},v=async t=>{const e=await mt(t),s=new Set,n=(c,p=[])=>c?Object.entries(c).flatMap(([m,h])=>{if(!h)return;if(typeof h=="object")return n(h,[...p,m]);const T=[...p,m].join(".");s.add(`"${T}"`);const w=[...p.map(E),E(m)].join("-"),{result:F}=G(h);return`--${w}: ${F};`}):[],o=c=>c?Object.entries(c).flatMap(([p,m])=>{const h=n(m);return p==="base"?h.join(""):`${p} { ${h.join("")} }`}):[],i=c=>c?Object.entries(c).flatMap(([p,m])=>Object.entries(m).flatMap(([h,T])=>{const w=n(T,[p]),F=`.${p}-${h}, [data-${p}="${h}"]`,P=w.join("");return`${F} { ${P} }`})):[],y=n(e.variables),a=o(e.responsiveVariables),j=i(e.conditionalVariables),r=J(t),d=l.join(r,"css/variables.css"),b=`:root { ${y.join("")} ${a.join("")} } ${j.join("")}`;f.writeFileSync(d,b);const k=l.join(r,"css/global.css"),C=D(e.global,"");f.writeFileSync(k,C);const u=l.join(r,"css/templates.css"),x=H(e.templates),O=ft(e.templates);f.writeFileSync(u,x);const g=l.join(r,"types/css-tokens.d.ts"),S=`
|
9
|
+
// Variable types
|
10
|
+
type VariableTokens = ${[...s].join("|")};
|
11
|
+
type PropertyValueToken = \`{\${VariableTokens}}\`;
|
11
12
|
|
12
|
-
|
13
|
+
// Template types
|
14
|
+
type TemplateTokens = {
|
15
|
+
${Object.entries(O).map(([c,p])=>`${c}?: ${p}`).join(`
|
13
16
|
`)}
|
14
|
-
|
15
|
-
`);i
|
16
|
-
`),r=
|
17
|
-
`);
|
18
|
-
|
17
|
+
}
|
18
|
+
`;f.writeFileSync(g,S)},I=async(t,e,s)=>{const n=q(e),o=l.join(s,"./temp");f.existsSync(o)||f.mkdirSync(o);const i=l.parse(e);let y=f.readFileSync(e,"utf8");y=y.replace(/styled\([^"'`{,]+,/g,"styled('div',");const a=l.join(s,"js",n+".js"),j=Q(t),r=await Y(t);await U.build({stdin:{contents:y,sourcefile:i.base,resolveDir:i.dir,loader:"ts"},minify:!1,treeShaking:!0,bundle:!0,outfile:a,format:r,target:["node20"],keepNames:!0,external:j,packages:"external"});const d=Date.now();return await import(`${a}?t=${d}`)},W=async t=>{const e=J(t),s=l.join(e,"salty.config.js"),{config:n}=await import(s);return n},tt=()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}},ht=async(t,e=tt())=>{try{e?Z.info("Generating CSS in production mode! 🔥"):Z.info("Generating CSS in development mode! 🚀");const s=[],n=[],o=J(t),i=l.join(o,"index.css");(()=>{f.existsSync(o)&&it.execSync("rm -rf "+o),f.mkdirSync(o),f.mkdirSync(l.join(o,"css")),f.mkdirSync(l.join(o,"types"))})(),await v(t);const a=await W(t);async function j(u,x){const O=["node_modules","saltygen"],g=f.statSync(u);if(g.isDirectory()){const $=f.readdirSync(u);if(O.some(c=>u.includes(c)))return;await Promise.all($.map(c=>j(l.join(u,c),l.join(x,c))))}else if(g.isFile()&&_(u)){const S=await I(t,u,o),c=[];Object.entries(S).forEach(([T,w])=>{if(w.isKeyframes&&w.css){const z=`${w.animationName}.css`,nt=`css/${z}`,ot=l.join(o,nt);s.push(z),f.writeFileSync(ot,w.css);return}if(!w.generator)return;const F=w.generator._withBuildContext({name:T,config:a,prod:e}),P=`${F.hash}-${F.priority}.css`;n[F.priority]||(n[F.priority]=[]),n[F.priority].push(P),c.push(P);const N=`css/${P}`,st=l.join(o,N);f.writeFileSync(st,F.css)});const p=c.map(T=>`@import url('./${T}');`).join(`
|
19
|
+
`),m=q(u,6),h=l.join(o,`css/${m}.css`);f.writeFileSync(h,p)}}await j(t,o);const r=s.map(u=>`@import url('./css/${u}');`).join(`
|
20
|
+
`);let C=`@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
|
21
|
+
|
22
|
+
${["variables.css","global.css","templates.css"].filter(u=>{try{return f.readFileSync(l.join(o,"css",u),"utf8").length>0}catch{return!1}}).map(u=>`@import url('./css/${u}');`).join(`
|
23
|
+
`)}
|
24
|
+
${r}`;if(a.importStrategy!=="component"){const u=n.flat().map(x=>`@import url('./css/${x}');`).join(`
|
25
|
+
`);C+=u}f.writeFileSync(i,C)}catch(s){console.error(s)}},jt=async(t,e)=>{try{const s=[],n=l.join(t,"./saltygen"),o=l.join(n,"index.css");if(_(e)){const y=await W(t),a=await I(t,e,n);Object.entries(a).forEach(([k,C])=>{if(!C.generator)return;const u=C.generator._withBuildContext({name:k,config:y}),x=`${u.hash}-${u.priority}.css`,O=`css/${x}`,g=l.join(n,O);s.push(x),f.writeFileSync(g,u.css)});const j=f.readFileSync(o,"utf8").split(`
|
26
|
+
`),r=s.map(k=>`@import url('../saltygen/css/${k}');`),b=[...new Set([...j,...r])].join(`
|
27
|
+
`);f.writeFileSync(o,b)}}catch(s){console.error(s)}},bt=async(t,e,s=tt())=>{try{const n=l.join(t,"./saltygen");if(_(e)){const i=f.readFileSync(e,"utf8");i.replace(/^(?!export\s)const\s.*/gm,b=>`export ${b}`)!==i&&await L.writeFile(e,i);const a=await W(t),j=await I(t,e,n);let r=i;Object.entries(j).forEach(([b,k])=>{var P;if(k.isKeyframes||!k.generator)return;const C=k.generator._withBuildContext({name:b,config:a,prod:s}),u=new RegExp(`\\s${b}[=\\s]+[^()]+styled\\(([^,]+),`,"g").exec(i);if(!u)return console.error("Could not find the original declaration");const x=(P=u.at(1))==null?void 0:P.trim(),O=new RegExp(`\\s${b}[=\\s]+styled\\(`,"g").exec(r);if(!O)return console.error("Could not find the original declaration");const{index:g}=O;let $=!1;const S=setTimeout(()=>$=!0,5e3);let c=0,p=!1,m=0;for(;!p&&!$;){const N=r[g+c];N==="("&&m++,N===")"&&m--,m===0&&N===")"&&(p=!0),c>r.length&&($=!0),c++}if(!$)clearTimeout(S);else throw new Error("Failed to find the end of the styled call and timed out");const h=g+c,T=r.slice(g,h),w=r,F=` ${b} = styled(${x}, "${C.classNames}", ${JSON.stringify(C.props)});`;r=r.replace(T,F),w===r&&console.error("Minimize file failed to change content",{name:b,tagName:x})});const d=q(e,6);return a.importStrategy==="component"&&(r=`import '../../saltygen/css/${d}.css';
|
28
|
+
${r}`),r=r.replace("{ styled }","{ styledClient as styled }"),r=r.replace("@salty-css/react/styled","@salty-css/react/styled-client"),r}}catch(n){console.error("Error in minimizeFile:",n)}},et=t=>({name:"stylegen",buildStart:()=>ht(t),load:async e=>{if(_(e))return await bt(t,e)},watchChange:{handler:async e=>{_(e)&&await jt(t,e),e.includes("salty.config")&&await v(t)}}});exports.default=et;exports.saltyPlugin=et;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -1,279 +1,351 @@
|
|
1
|
-
import * as
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
const
|
8
|
-
let
|
9
|
-
for (n = Math.abs(t); n > 52; n = n / 52 | 0)
|
10
|
-
return
|
11
|
-
},
|
12
|
-
let
|
13
|
-
for (;
|
1
|
+
import * as L from "esbuild";
|
2
|
+
import { execSync as rt } from "child_process";
|
3
|
+
import { join as f, parse as it } from "path";
|
4
|
+
import { existsSync as B, writeFileSync as E, mkdirSync as A, statSync as ct, readdirSync as at, readFileSync as J } from "fs";
|
5
|
+
import { readFile as lt, writeFile as ft } from "fs/promises";
|
6
|
+
import { createLogger as pt, format as _, transports as ut } from "winston";
|
7
|
+
const H = (t) => String.fromCharCode(t + (t > 25 ? 39 : 97)), gt = (t, e) => {
|
8
|
+
let s = "", n;
|
9
|
+
for (n = Math.abs(t); n > 52; n = n / 52 | 0) s = H(n % 52) + s;
|
10
|
+
return s = H(n % 52) + s, s.length < e ? s = s.padStart(e, "a") : s.length > e && (s = s.slice(-e)), s;
|
11
|
+
}, dt = (t, e) => {
|
12
|
+
let s = e.length;
|
13
|
+
for (; s; ) t = t * 33 ^ e.charCodeAt(--s);
|
14
14
|
return t;
|
15
|
-
},
|
16
|
-
const
|
17
|
-
return
|
15
|
+
}, I = (t, e = 3) => {
|
16
|
+
const s = dt(5381, JSON.stringify(t)) >>> 0;
|
17
|
+
return gt(s, e);
|
18
18
|
};
|
19
|
-
function
|
20
|
-
return t ? typeof t != "string" ? String(t) : t.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (
|
19
|
+
function V(t) {
|
20
|
+
return t ? typeof t != "string" ? V(String(t)) : t.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (e, s) => (s > 0 ? "-" : "") + e.toLowerCase()) : "";
|
21
21
|
}
|
22
|
-
const
|
22
|
+
const yt = (t, e) => {
|
23
23
|
if (typeof t != "string") return { result: t };
|
24
|
-
if (!
|
25
|
-
const
|
26
|
-
return Object.values(
|
27
|
-
const { pattern:
|
28
|
-
t = t.replace(
|
29
|
-
const { value: a, css:
|
30
|
-
return
|
24
|
+
if (!e) return { result: t };
|
25
|
+
const s = [];
|
26
|
+
return Object.values(e).forEach((n) => {
|
27
|
+
const { pattern: o, transform: i } = n;
|
28
|
+
t = t.replace(o, (g) => {
|
29
|
+
const { value: a, css: h } = i(g);
|
30
|
+
return h && s.push(h), a;
|
31
31
|
});
|
32
|
-
}), { result: t, additionalCss:
|
33
|
-
},
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
if (
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
32
|
+
}), { result: t, additionalCss: s };
|
33
|
+
}, q = (t) => typeof t != "string" ? { result: t } : /\{[^{}]+\}/g.test(t) ? { result: t.replace(/\{([^{}]+)\}/g, (...n) => `var(--${V(n[1].replaceAll(".", "-"))})`) } : { result: t }, D = (t, e, s, n) => {
|
34
|
+
if (!t) return "";
|
35
|
+
const o = [], i = Object.entries(t).reduce((a, [h, r]) => {
|
36
|
+
const u = h.trim();
|
37
|
+
if (typeof r == "function" && (r = r()), typeof r == "object") {
|
38
|
+
if (!r) return a;
|
39
|
+
if (u === "variants")
|
40
|
+
return Object.entries(r).forEach(([j, c]) => {
|
41
|
+
c && Object.entries(c).forEach(([p, y]) => {
|
42
|
+
if (!y) return;
|
43
|
+
const m = `${e}.${j}-${p}`, x = D(y, m);
|
44
|
+
o.push(x);
|
44
45
|
});
|
45
46
|
}), a;
|
46
|
-
if (
|
47
|
+
if (u === "defaultVariants")
|
47
48
|
return a;
|
48
|
-
if (
|
49
|
-
return
|
50
|
-
const { css: c, ...
|
51
|
-
|
49
|
+
if (u === "compoundVariants")
|
50
|
+
return r.forEach((j) => {
|
51
|
+
const { css: c, ...p } = j, y = Object.entries(p).reduce((x, [w, S]) => `${x}.${w}-${S}`, e), m = D(c, y);
|
52
|
+
o.push(m);
|
52
53
|
}), a;
|
53
|
-
if (
|
54
|
-
const
|
55
|
-
${
|
54
|
+
if (u.startsWith("@")) {
|
55
|
+
const j = D(r, e), c = `${u} {
|
56
|
+
${j.replace(`
|
56
57
|
`, `
|
57
58
|
`)}
|
58
59
|
}`;
|
59
|
-
return
|
60
|
+
return o.push(c), a;
|
60
61
|
}
|
61
|
-
const d =
|
62
|
-
return
|
62
|
+
const d = h.includes("&") ? u.replace("&", e) : u.startsWith(":") ? `${e}${u}` : `${e} ${u}`, b = D(r, d);
|
63
|
+
return o.push(b), a;
|
63
64
|
}
|
64
|
-
const
|
65
|
-
if (typeof
|
66
|
-
if (typeof
|
67
|
-
if ("toString" in
|
65
|
+
const $ = u.startsWith("-") ? u : V(u), F = (d, b = ";") => a = `${a}${d}${b}`, C = (d) => F(`${$}:${d}`);
|
66
|
+
if (typeof r == "number") return C(r);
|
67
|
+
if (typeof r != "string")
|
68
|
+
if ("toString" in r) r = r.toString();
|
68
69
|
else return a;
|
69
|
-
const { modifiers:
|
70
|
-
yield
|
70
|
+
const { modifiers: l } = {}, T = function* () {
|
71
|
+
yield q(r), yield yt(r, l);
|
71
72
|
}();
|
72
|
-
for (const { result: d, additionalCss:
|
73
|
-
|
74
|
-
const c =
|
75
|
-
|
73
|
+
for (const { result: d, additionalCss: b = [] } of T)
|
74
|
+
r = d, b.forEach((j) => {
|
75
|
+
const c = D(j, "");
|
76
|
+
F(c, "");
|
76
77
|
});
|
77
|
-
return
|
78
|
+
return C(r);
|
78
79
|
}, "");
|
79
|
-
if (!
|
80
|
+
if (!i) return o.join(`
|
80
81
|
`);
|
81
|
-
if (!
|
82
|
-
let
|
83
|
-
return
|
82
|
+
if (!e) return i;
|
83
|
+
let g = "";
|
84
|
+
return g = `${e} { ${i} }`, [g, ...o].join(`
|
84
85
|
`);
|
85
|
-
},
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
86
|
+
}, U = (t, e = []) => {
|
87
|
+
if (!t) return "";
|
88
|
+
const s = [], n = {};
|
89
|
+
if (Object.entries(t).forEach(([o, i]) => {
|
90
|
+
if (typeof i == "object") {
|
91
|
+
if (!i) return;
|
92
|
+
const g = o.trim(), a = U(i, [...e, g]);
|
93
|
+
s.push(a);
|
92
94
|
} else
|
93
|
-
n[
|
95
|
+
n[o] = i;
|
94
96
|
}), Object.keys(n).length) {
|
95
|
-
const
|
96
|
-
|
97
|
+
const o = e.map(V).join("-"), i = D(n, `.${o}`);
|
98
|
+
s.push(i);
|
97
99
|
}
|
98
|
-
return
|
100
|
+
return s.join(`
|
99
101
|
`);
|
102
|
+
}, mt = (t) => Object.entries(t).reduce((e, [s, n]) => (typeof n == "object" && (e[s] = X(n).map((o) => `"${o}"`).join(" | ")), e), {}), X = (t, e = "", s = /* @__PURE__ */ new Set()) => t ? (Object.entries(t).forEach(([n, o]) => {
|
103
|
+
const i = e ? `${e}.${n}` : n;
|
104
|
+
return typeof o == "object" ? X(o, i, s) : s.add(e);
|
105
|
+
}), [...s]) : [], Y = (t) => {
|
106
|
+
if (!t || t === "/") throw new Error("Could not find package.json file");
|
107
|
+
const e = f(t, "package.json");
|
108
|
+
return B(e) ? e : Y(f(t, ".."));
|
109
|
+
}, ht = async (t) => {
|
110
|
+
const e = Y(t);
|
111
|
+
return await lt(e, "utf-8").then(JSON.parse).catch(() => {
|
112
|
+
});
|
113
|
+
}, $t = async (t) => {
|
114
|
+
const e = await ht(t);
|
115
|
+
if (e)
|
116
|
+
return e.type;
|
100
117
|
};
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
118
|
+
let O;
|
119
|
+
const Q = async (t) => {
|
120
|
+
if (O) return O;
|
121
|
+
const e = await $t(t);
|
122
|
+
return e === "module" ? O = "esm" : (e === "commonjs" || import.meta.url.endsWith(".cjs")) && (O = "cjs"), O || "esm";
|
123
|
+
}, K = pt({
|
124
|
+
level: "debug",
|
125
|
+
format: _.combine(_.colorize(), _.cli()),
|
126
|
+
transports: [new ut.Console({})]
|
127
|
+
}), W = {
|
128
|
+
externalModules: []
|
129
|
+
}, v = (t) => {
|
130
|
+
if (W.externalModules.length > 0) return W.externalModules;
|
131
|
+
const e = f(t, "salty.config.ts"), n = J(e, "utf8").match(/externalModules:\s?\[(.*)\]/);
|
132
|
+
if (!n) return [];
|
133
|
+
const o = n[1].split(",").map((i) => i.replace(/['"`]/g, "").trim());
|
134
|
+
return W.externalModules = o, o;
|
135
|
+
}, R = (t) => f(t, "./saltygen"), bt = ["salty", "css", "styles", "styled"], jt = (t = []) => new RegExp(`\\.(${[...bt, ...t].join("|")})\\.`), N = (t, e = []) => jt(e).test(t), wt = async (t) => {
|
136
|
+
const e = R(t), s = f(t, "salty.config.ts"), n = f(e, "salty.config.js"), o = await Q(t), i = v(t);
|
137
|
+
await L.build({
|
138
|
+
entryPoints: [s],
|
110
139
|
minify: !0,
|
111
140
|
treeShaking: !0,
|
112
141
|
bundle: !0,
|
113
142
|
outfile: n,
|
114
|
-
format:
|
115
|
-
external:
|
143
|
+
format: o,
|
144
|
+
external: i
|
116
145
|
});
|
117
|
-
const
|
118
|
-
return
|
119
|
-
},
|
120
|
-
const
|
121
|
-
if (!
|
122
|
-
if (typeof
|
123
|
-
const
|
124
|
-
|
125
|
-
const
|
126
|
-
return `--${
|
127
|
-
}) : [],
|
128
|
-
const
|
129
|
-
return
|
130
|
-
}) : [],
|
131
|
-
const
|
132
|
-
return `${
|
133
|
-
})) : [],
|
134
|
-
|
135
|
-
const
|
136
|
-
|
137
|
-
const
|
138
|
-
|
139
|
-
const d =
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
+
const g = Date.now(), { config: a } = await import(`${n}?t=${g}`);
|
147
|
+
return a;
|
148
|
+
}, tt = async (t) => {
|
149
|
+
const e = await wt(t), s = /* @__PURE__ */ new Set(), n = (c, p = []) => c ? Object.entries(c).flatMap(([y, m]) => {
|
150
|
+
if (!m) return;
|
151
|
+
if (typeof m == "object") return n(m, [...p, y]);
|
152
|
+
const x = [...p, y].join(".");
|
153
|
+
s.add(`"${x}"`);
|
154
|
+
const w = [...p.map(V), V(y)].join("-"), { result: S } = q(m);
|
155
|
+
return `--${w}: ${S};`;
|
156
|
+
}) : [], o = (c) => c ? Object.entries(c).flatMap(([p, y]) => {
|
157
|
+
const m = n(y);
|
158
|
+
return p === "base" ? m.join("") : `${p} { ${m.join("")} }`;
|
159
|
+
}) : [], i = (c) => c ? Object.entries(c).flatMap(([p, y]) => Object.entries(y).flatMap(([m, x]) => {
|
160
|
+
const w = n(x, [p]), S = `.${p}-${m}, [data-${p}="${m}"]`, P = w.join("");
|
161
|
+
return `${S} { ${P} }`;
|
162
|
+
})) : [], g = n(e.variables), a = o(e.responsiveVariables), h = i(e.conditionalVariables), r = R(t), u = f(r, "css/variables.css"), $ = `:root { ${g.join("")} ${a.join("")} } ${h.join("")}`;
|
163
|
+
E(u, $);
|
164
|
+
const F = f(r, "css/global.css"), C = D(e.global, "");
|
165
|
+
E(F, C);
|
166
|
+
const l = f(r, "css/templates.css"), k = U(e.templates), T = mt(e.templates);
|
167
|
+
E(l, k);
|
168
|
+
const d = f(r, "types/css-tokens.d.ts"), j = `
|
169
|
+
// Variable types
|
170
|
+
type VariableTokens = ${[...s].join("|")};
|
171
|
+
type PropertyValueToken = \`{\${VariableTokens}}\`;
|
172
|
+
|
173
|
+
// Template types
|
174
|
+
type TemplateTokens = {
|
175
|
+
${Object.entries(T).map(([c, p]) => `${c}?: ${p}`).join(`
|
176
|
+
`)}
|
177
|
+
}
|
178
|
+
`;
|
179
|
+
E(d, j);
|
180
|
+
}, Z = async (t, e, s) => {
|
181
|
+
const n = I(e), o = f(s, "./temp");
|
182
|
+
B(o) || A(o);
|
183
|
+
const i = it(e);
|
184
|
+
let g = J(e, "utf8");
|
185
|
+
g = g.replace(/styled\([^"'`{,]+,/g, "styled('div',");
|
186
|
+
const a = f(s, "js", n + ".js"), h = v(t), r = await Q(t);
|
187
|
+
await L.build({
|
188
|
+
stdin: {
|
189
|
+
contents: g,
|
190
|
+
sourcefile: i.base,
|
191
|
+
resolveDir: i.dir,
|
192
|
+
loader: "ts"
|
193
|
+
},
|
194
|
+
minify: !1,
|
146
195
|
treeShaking: !0,
|
147
196
|
bundle: !0,
|
148
|
-
outfile:
|
149
|
-
format:
|
150
|
-
target: ["
|
197
|
+
outfile: a,
|
198
|
+
format: r,
|
199
|
+
target: ["node20"],
|
151
200
|
keepNames: !0,
|
152
|
-
external:
|
201
|
+
external: h,
|
202
|
+
packages: "external"
|
153
203
|
});
|
154
|
-
const
|
155
|
-
return await import(`${
|
156
|
-
},
|
157
|
-
const
|
204
|
+
const u = Date.now();
|
205
|
+
return await import(`${a}?t=${u}`);
|
206
|
+
}, z = async (t) => {
|
207
|
+
const e = R(t), s = f(e, "salty.config.js"), { config: n } = await import(s);
|
158
208
|
return n;
|
159
|
-
},
|
209
|
+
}, et = () => {
|
210
|
+
try {
|
211
|
+
return process.env.NODE_ENV === "production";
|
212
|
+
} catch {
|
213
|
+
return !1;
|
214
|
+
}
|
215
|
+
}, St = async (t, e = et()) => {
|
160
216
|
try {
|
161
|
-
|
217
|
+
e ? K.info("Generating CSS in production mode! 🔥") : K.info("Generating CSS in development mode! 🚀");
|
218
|
+
const s = [], n = [], o = R(t), i = f(o, "index.css");
|
162
219
|
(() => {
|
163
|
-
|
164
|
-
})(), await
|
165
|
-
const
|
166
|
-
async function
|
167
|
-
const
|
168
|
-
if (
|
169
|
-
const
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
220
|
+
B(o) && rt("rm -rf " + o), A(o), A(f(o, "css")), A(f(o, "types"));
|
221
|
+
})(), await tt(t);
|
222
|
+
const a = await z(t);
|
223
|
+
async function h(l, k) {
|
224
|
+
const T = ["node_modules", "saltygen"], d = ct(l);
|
225
|
+
if (d.isDirectory()) {
|
226
|
+
const b = at(l);
|
227
|
+
if (T.some((c) => l.includes(c))) return;
|
228
|
+
await Promise.all(b.map((c) => h(f(l, c), f(k, c))));
|
229
|
+
} else if (d.isFile() && N(l)) {
|
230
|
+
const j = await Z(t, l, o), c = [];
|
231
|
+
Object.entries(j).forEach(([x, w]) => {
|
232
|
+
if (w.isKeyframes && w.css) {
|
233
|
+
const G = `${w.animationName}.css`, nt = `css/${G}`, ot = f(o, nt);
|
234
|
+
s.push(G), E(ot, w.css);
|
177
235
|
return;
|
178
236
|
}
|
179
|
-
if (!
|
180
|
-
const
|
181
|
-
name:
|
182
|
-
config:
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
237
|
+
if (!w.generator) return;
|
238
|
+
const S = w.generator._withBuildContext({
|
239
|
+
name: x,
|
240
|
+
config: a,
|
241
|
+
prod: e
|
242
|
+
}), P = `${S.hash}-${S.priority}.css`;
|
243
|
+
n[S.priority] || (n[S.priority] = []), n[S.priority].push(P), c.push(P);
|
244
|
+
const M = `css/${P}`, st = f(o, M);
|
245
|
+
E(st, S.css);
|
187
246
|
});
|
188
|
-
const
|
189
|
-
`),
|
190
|
-
|
247
|
+
const p = c.map((x) => `@import url('./${x}');`).join(`
|
248
|
+
`), y = I(l, 6), m = f(o, `css/${y}.css`);
|
249
|
+
E(m, p);
|
191
250
|
}
|
192
251
|
}
|
193
|
-
await
|
194
|
-
const
|
252
|
+
await h(t, o);
|
253
|
+
const r = s.map((l) => `@import url('./css/${l}');`).join(`
|
195
254
|
`);
|
196
|
-
let
|
255
|
+
let C = `@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
|
197
256
|
|
198
|
-
${["
|
257
|
+
${["variables.css", "global.css", "templates.css"].filter((l) => {
|
258
|
+
try {
|
259
|
+
return J(f(o, "css", l), "utf8").length > 0;
|
260
|
+
} catch {
|
261
|
+
return !1;
|
262
|
+
}
|
263
|
+
}).map((l) => `@import url('./css/${l}');`).join(`
|
199
264
|
`)}
|
200
|
-
${
|
201
|
-
if (
|
202
|
-
const
|
265
|
+
${r}`;
|
266
|
+
if (a.importStrategy !== "component") {
|
267
|
+
const l = n.flat().map((k) => `@import url('./css/${k}');`).join(`
|
203
268
|
`);
|
204
|
-
|
269
|
+
C += l;
|
205
270
|
}
|
206
|
-
|
271
|
+
E(i, C);
|
207
272
|
} catch (s) {
|
208
273
|
console.error(s);
|
209
274
|
}
|
210
|
-
},
|
275
|
+
}, Ft = async (t, e) => {
|
211
276
|
try {
|
212
|
-
const
|
213
|
-
if (
|
214
|
-
const
|
215
|
-
Object.entries(a).forEach(([
|
216
|
-
if (!
|
217
|
-
const
|
218
|
-
name:
|
219
|
-
config:
|
220
|
-
}),
|
221
|
-
|
277
|
+
const s = [], n = f(t, "./saltygen"), o = f(n, "index.css");
|
278
|
+
if (N(e)) {
|
279
|
+
const g = await z(t), a = await Z(t, e, n);
|
280
|
+
Object.entries(a).forEach(([F, C]) => {
|
281
|
+
if (!C.generator) return;
|
282
|
+
const l = C.generator._withBuildContext({
|
283
|
+
name: F,
|
284
|
+
config: g
|
285
|
+
}), k = `${l.hash}-${l.priority}.css`, T = `css/${k}`, d = f(n, T);
|
286
|
+
s.push(k), E(d, l.css);
|
222
287
|
});
|
223
|
-
const
|
224
|
-
`),
|
288
|
+
const h = J(o, "utf8").split(`
|
289
|
+
`), r = s.map((F) => `@import url('../saltygen/css/${F}');`), $ = [.../* @__PURE__ */ new Set([...h, ...r])].join(`
|
225
290
|
`);
|
226
|
-
|
291
|
+
E(o, $);
|
227
292
|
}
|
228
|
-
} catch (
|
229
|
-
console.error(
|
293
|
+
} catch (s) {
|
294
|
+
console.error(s);
|
230
295
|
}
|
231
|
-
},
|
296
|
+
}, Ct = async (t, e, s = et()) => {
|
232
297
|
try {
|
233
|
-
const
|
234
|
-
if (
|
235
|
-
|
236
|
-
|
237
|
-
const
|
238
|
-
let
|
239
|
-
Object.entries(
|
240
|
-
var
|
241
|
-
if (
|
242
|
-
|
243
|
-
|
298
|
+
const n = f(t, "./saltygen");
|
299
|
+
if (N(e)) {
|
300
|
+
const i = J(e, "utf8");
|
301
|
+
i.replace(/^(?!export\s)const\s.*/gm, ($) => `export ${$}`) !== i && await ft(e, i);
|
302
|
+
const a = await z(t), h = await Z(t, e, n);
|
303
|
+
let r = i;
|
304
|
+
Object.entries(h).forEach(([$, F]) => {
|
305
|
+
var P;
|
306
|
+
if (F.isKeyframes || !F.generator) return;
|
307
|
+
const C = F.generator._withBuildContext({
|
308
|
+
name: $,
|
309
|
+
config: a,
|
310
|
+
prod: s
|
311
|
+
}), l = new RegExp(`\\s${$}[=\\s]+[^()]+styled\\(([^,]+),`, "g").exec(i);
|
312
|
+
if (!l) return console.error("Could not find the original declaration");
|
313
|
+
const k = (P = l.at(1)) == null ? void 0 : P.trim(), T = new RegExp(`\\s${$}[=\\s]+styled\\(`, "g").exec(r);
|
314
|
+
if (!T) return console.error("Could not find the original declaration");
|
315
|
+
const { index: d } = T;
|
316
|
+
let b = !1;
|
317
|
+
const j = setTimeout(() => b = !0, 5e3);
|
318
|
+
let c = 0, p = !1, y = 0;
|
319
|
+
for (; !p && !b; ) {
|
320
|
+
const M = r[d + c];
|
321
|
+
M === "(" && y++, M === ")" && y--, y === 0 && M === ")" && (p = !0), c > r.length && (b = !0), c++;
|
244
322
|
}
|
245
|
-
if (!
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
}), b = new RegExp(`${i}[=\\s]+[^()]+styled\\(([^,]+),`, "g").exec(r);
|
250
|
-
if (!b)
|
251
|
-
return console.error("Could not find the original declaration");
|
252
|
-
const j = (y = b.at(1)) == null ? void 0 : y.trim(), { element: w, variantKeys: C } = h.props, d = `${i} = styled(${j}, "${h.classNames}", "${h._callerName}", ${JSON.stringify(w)}, ${JSON.stringify(
|
253
|
-
C
|
254
|
-
)});`, S = new RegExp(`${i}[=\\s]+[^()]+styled\\(([^,]+),[^;]+;`, "g");
|
255
|
-
f = f.replace(S, d);
|
323
|
+
if (!b) clearTimeout(j);
|
324
|
+
else throw new Error("Failed to find the end of the styled call and timed out");
|
325
|
+
const m = d + c, x = r.slice(d, m), w = r, S = ` ${$} = styled(${k}, "${C.classNames}", ${JSON.stringify(C.props)});`;
|
326
|
+
r = r.replace(x, S), w === r && console.error("Minimize file failed to change content", { name: $, tagName: k });
|
256
327
|
});
|
257
|
-
const
|
258
|
-
return
|
259
|
-
${
|
328
|
+
const u = I(e, 6);
|
329
|
+
return a.importStrategy === "component" && (r = `import '../../saltygen/css/${u}.css';
|
330
|
+
${r}`), r = r.replace("{ styled }", "{ styledClient as styled }"), r = r.replace("@salty-css/react/styled", "@salty-css/react/styled-client"), r;
|
260
331
|
}
|
261
|
-
} catch (
|
262
|
-
console.error(
|
332
|
+
} catch (n) {
|
333
|
+
console.error("Error in minimizeFile:", n);
|
263
334
|
}
|
264
|
-
},
|
335
|
+
}, Dt = (t) => ({
|
265
336
|
name: "stylegen",
|
266
|
-
buildStart: () =>
|
267
|
-
load: async (
|
268
|
-
if (
|
269
|
-
return await
|
337
|
+
buildStart: () => St(t),
|
338
|
+
load: async (e) => {
|
339
|
+
if (N(e))
|
340
|
+
return await Ct(t, e);
|
270
341
|
},
|
271
342
|
watchChange: {
|
272
|
-
handler: async (
|
273
|
-
|
343
|
+
handler: async (e) => {
|
344
|
+
N(e) && await Ft(t, e), e.includes("salty.config") && await tt(t);
|
274
345
|
}
|
275
346
|
}
|
276
347
|
});
|
277
348
|
export {
|
278
|
-
|
349
|
+
Dt as default,
|
350
|
+
Dt as saltyPlugin
|
279
351
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salty-css/vite",
|
3
|
-
"version": "0.0.1-alpha.
|
3
|
+
"version": "0.0.1-alpha.111",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"typings": "./dist/index.d.ts",
|
@@ -10,7 +10,12 @@
|
|
10
10
|
"publishConfig": {
|
11
11
|
"access": "public"
|
12
12
|
},
|
13
|
-
"
|
13
|
+
"description": "Vite plugin for Salty CSS",
|
14
|
+
"homepage": "https://salty-css.dev/",
|
15
|
+
"repository": {
|
16
|
+
"type": "git",
|
17
|
+
"url": "git+https://github.com/margarita-form/salty-css.git"
|
18
|
+
},
|
14
19
|
"bugs": {
|
15
20
|
"url": "https://github.com/margarita-form/salty-css/issues"
|
16
21
|
},
|
@@ -27,5 +32,8 @@
|
|
27
32
|
"import": "./index.js",
|
28
33
|
"require": "./index.cjs"
|
29
34
|
}
|
35
|
+
},
|
36
|
+
"dependencies": {
|
37
|
+
"@salty-css/core": "^0.0.1-alpha.111"
|
30
38
|
}
|
31
39
|
}
|