@razorwind/style-dictionary 0.0.33 → 0.0.35
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 +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -30,4 +30,4 @@ SCSS example:
|
|
|
30
30
|
## Regenerate
|
|
31
31
|
|
|
32
32
|
Platform outputs are build artifacts — adjust tokens or Style Dictionary platform config in Razorwind, not hand-edit generated files.
|
|
33
|
-
`}function h(e){if((0,d.isString)(e))return e;if(typeof e==`object`&&e&&`toString`in e&&typeof e.toString==`function`){let t=e.toString();if(t!==`[object Object]`)return t}return JSON.stringify(e)}function g(e,t){if(e)return e.map(e=>(0,f.isAbsolute)(e)?e:(0,f.resolve)(t,e))}function _(e){return!e||typeof e!=`object`?{}:e}function v(e){let t=e[0];if(!t)return`INSTALL.md`;let n=(0,f.dirname)(t);return n===`.`?`INSTALL.md`:(0,f.join)(n,`INSTALL.md`)}async function y(e,t={},n=process.cwd()){let{source:r,include:i,usesDtcg:a,platforms:o,verbose:s,...c}=t;if(!o||Object.keys(o).length===0)return{};let d=await new p.default({...c,source:g(r,n),include:g(i,n),tokens:_(e.tokens),platforms:o,usesDtcg:a??!0},(0,l.styleDictionaryLogOptions)(s)).formatAllPlatforms(),f={};for(let[e,t]of Object.entries(d))for(let n of t){let t=n.destination??`${e}.output`;f[t]=(0,u.createDocument)(t,h(n.output),{name:e})}if(Object.keys(f).length>0){let e=Object.keys(f).sort(),n=t.installPath??v(e),r=t.installGuide??m({files:e});f[n]=(0,u.createDocument)(n,r,{name:`razorwind-style-dictionary`},`markdown`)}return f}var b=(0,c.definePlugin)(e=>({name:`style-dictionary`,generate:async(t,n)=>y(t,{...e,verbose:e?.verbose??n.verbose},n.cwd)}));exports.default=b,exports.generateStyleDictionary=y,exports.renderInstallMd=m;
|
|
33
|
+
`}function h(e){if((0,d.isString)(e))return e;if(typeof e==`object`&&e&&`toString`in e&&typeof e.toString==`function`){let t=e.toString();if(t!==`[object Object]`)return t}return JSON.stringify(e)}function g(e,t){if(e)return e.map(e=>(0,f.isAbsolute)(e)?e:(0,f.resolve)(t,e))}function _(e){return!e||typeof e!=`object`?{}:(0,l.normalizeTokenTree)(e)}function v(e){let t=e[0];if(!t)return`INSTALL.md`;let n=(0,f.dirname)(t);return n===`.`?`INSTALL.md`:(0,f.join)(n,`INSTALL.md`)}async function y(e,t={},n=process.cwd()){let{source:r,include:i,usesDtcg:a,platforms:o,verbose:s,...c}=t;if(!o||Object.keys(o).length===0)return{};let d=await new p.default({...c,source:g(r,n),include:g(i,n),tokens:_(e.tokens),platforms:o,usesDtcg:a??!0},(0,l.styleDictionaryLogOptions)(s)).formatAllPlatforms(),f={};for(let[e,t]of Object.entries(d))for(let n of t){let t=n.destination??`${e}.output`;f[t]=(0,u.createDocument)(t,h(n.output),{name:e})}if(Object.keys(f).length>0){let e=Object.keys(f).sort(),n=t.installPath??v(e),r=t.installGuide??m({files:e});f[n]=(0,u.createDocument)(n,r,{name:`razorwind-style-dictionary`},void 0,`markdown`)}return f}var b=(0,c.definePlugin)(e=>({name:`style-dictionary`,generate:async(t,n)=>y(t,{...e,verbose:e?.verbose??n.verbose},n.cwd)}));exports.default=b,exports.generateStyleDictionary=y,exports.renderInstallMd=m;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/install.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KA0CY,+BAA+B,KAAK;;;;;;;;;;;;EAY9C;;;;;EAMA;;;;;;EAOA;;;;;;;;;iBC5Cc,gBAAgB;EAC9B;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/install.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KA0CY,+BAA+B,KAAK;;;;;;;;;;;;EAY9C;;;;;EAMA;;;;;;EAOA;;;;;;;;;iBC5Cc,gBAAgB;EAC9B;;;;;;;;;;iBCuEoB,wBACpB,MAAM,QACN,UAAS,8BACT,eACC,QAAQ,eAAe"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{definePlugin as e}from"@razorwind/core/plugin";import{styleDictionaryLogOptions as
|
|
1
|
+
import{definePlugin as e}from"@razorwind/core/plugin";import{normalizeTokenTree as t,styleDictionaryLogOptions as n}from"@razorwind/core/lib/tokens";import{createDocument as r}from"@razorwind/core/utils";import{isString as i}from"@stryke/type-checks/is-string";import{dirname as a,isAbsolute as o,join as s,resolve as c}from"node:path";import l from"style-dictionary";function u(e){let t=e.files.map(e=>`- \`${e}\``).join(`
|
|
2
2
|
`),n=e.files[0]??`build/output.css`;return`# Installing Style Dictionary Output
|
|
3
3
|
|
|
4
4
|
Generated by \`@razorwind/style-dictionary\`.
|
|
@@ -30,5 +30,5 @@ SCSS example:
|
|
|
30
30
|
## Regenerate
|
|
31
31
|
|
|
32
32
|
Platform outputs are build artifacts — adjust tokens or Style Dictionary platform config in Razorwind, not hand-edit generated files.
|
|
33
|
-
`}function
|
|
33
|
+
`}function d(e){if(i(e))return e;if(typeof e==`object`&&e&&`toString`in e&&typeof e.toString==`function`){let t=e.toString();if(t!==`[object Object]`)return t}return JSON.stringify(e)}function f(e,t){if(e)return e.map(e=>o(e)?e:c(t,e))}function p(e){return!e||typeof e!=`object`?{}:t(e)}function m(e){let t=e[0];if(!t)return`INSTALL.md`;let n=a(t);return n===`.`?`INSTALL.md`:s(n,`INSTALL.md`)}async function h(e,t={},i=process.cwd()){let{source:a,include:o,usesDtcg:s,platforms:c,verbose:h,...g}=t;if(!c||Object.keys(c).length===0)return{};let _=await new l({...g,source:f(a,i),include:f(o,i),tokens:p(e.tokens),platforms:c,usesDtcg:s??!0},n(h)).formatAllPlatforms(),v={};for(let[e,t]of Object.entries(_))for(let n of t){let t=n.destination??`${e}.output`;v[t]=r(t,d(n.output),{name:e})}if(Object.keys(v).length>0){let e=Object.keys(v).sort(),n=t.installPath??m(e),i=t.installGuide??u({files:e});v[n]=r(n,i,{name:`razorwind-style-dictionary`},void 0,`markdown`)}return v}var g=e(e=>({name:`style-dictionary`,generate:async(t,n)=>h(t,{...e,verbose:e?.verbose??n.verbose},n.cwd)}));export{g as default,h as generateStyleDictionary,u as renderInstallMd};
|
|
34
34
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorwind/style-dictionary",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Razorwind plugin that uses Style Dictionary to generate code from Razorwind design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"typings": "dist/index.d.mts",
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@power-plant/core": "^0.0.90",
|
|
87
|
-
"@razorwind/core": "^0.0.
|
|
87
|
+
"@razorwind/core": "^0.0.49",
|
|
88
88
|
"@stryke/type-checks": "^0.6.41",
|
|
89
89
|
"style-dictionary": "^5.5.1"
|
|
90
90
|
},
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"typescript": "^6.0.3"
|
|
95
95
|
},
|
|
96
96
|
"publishConfig": { "access": "public" },
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "8dc94fb22937f30d41e97f3c6ecff7f45eb81202"
|
|
98
98
|
}
|