@kanso-labs/unplugin-style-dictionary 0.2.6 → 0.3.0

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.
Files changed (45) hide show
  1. package/README.md +80 -24
  2. package/dist/cjs/_virtual/_rolldown/runtime.cjs +23 -0
  3. package/dist/cjs/index.cjs +268 -0
  4. package/dist/cjs/index.cjs.map +1 -0
  5. package/dist/cjs/index.d.cts +9 -0
  6. package/dist/cjs/rolldown.cjs +6 -0
  7. package/dist/cjs/rolldown.cjs.map +1 -0
  8. package/dist/cjs/rolldown.d.cts +5 -0
  9. package/dist/cjs/rollup.cjs +6 -0
  10. package/dist/cjs/rollup.cjs.map +1 -0
  11. package/dist/cjs/rollup.d.cts +5 -0
  12. package/dist/cjs/types.d.cts +43 -0
  13. package/dist/cjs/vite.cjs +6 -0
  14. package/dist/cjs/vite.cjs.map +1 -0
  15. package/dist/cjs/vite.d.cts +5 -0
  16. package/dist/cjs/webpack.cjs +6 -0
  17. package/dist/cjs/webpack.cjs.map +1 -0
  18. package/dist/cjs/webpack.d.cts +5 -0
  19. package/dist/index.d.ts +9 -7
  20. package/dist/index.js +202 -150
  21. package/dist/index.js.map +1 -1
  22. package/dist/rolldown.d.ts +6 -2
  23. package/dist/rolldown.js +3 -3
  24. package/dist/rolldown.js.map +1 -1
  25. package/dist/rollup.d.ts +6 -2
  26. package/dist/rollup.js +3 -3
  27. package/dist/rollup.js.map +1 -1
  28. package/dist/types.d.ts +31 -27
  29. package/dist/vite.d.ts +6 -2
  30. package/dist/vite.js +3 -3
  31. package/dist/vite.js.map +1 -1
  32. package/dist/webpack.d.ts +6 -2
  33. package/dist/webpack.js +3 -3
  34. package/dist/webpack.js.map +1 -1
  35. package/package.json +54 -25
  36. package/dist/index.cjs +0 -2
  37. package/dist/index.cjs.map +0 -1
  38. package/dist/rolldown.cjs +0 -2
  39. package/dist/rolldown.cjs.map +0 -1
  40. package/dist/rollup.cjs +0 -2
  41. package/dist/rollup.cjs.map +0 -1
  42. package/dist/vite.cjs +0 -2
  43. package/dist/vite.cjs.map +0 -1
  44. package/dist/webpack.cjs +0 -2
  45. package/dist/webpack.cjs.map +0 -1
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Config } from 'style-dictionary';
1
+ import { Config } from "style-dictionary";
2
+ //#region src/types.d.ts
2
3
  /**
3
4
  * Options for the Style Dictionary unplugin factory, shared across all bundler
4
5
  * targets (Vite, Rolldown, Rollup, Webpack).
@@ -10,30 +11,33 @@ import { Config } from 'style-dictionary';
10
11
  * graph. A one-shot build (e.g. `tsdown`/`rolldown build` without `--watch`)
11
12
  * only builds once, in `buildStart`.
12
13
  */
13
- export interface UnpluginStyleDictionaryOptions {
14
- /**
15
- * Style Dictionary configuration(s).
16
- * Can be:
17
- * - A file path string (e.g. 'sd.config.json')
18
- * - An array of file path strings
19
- * - A Style Dictionary configuration object
20
- * - An array of Style Dictionary configuration objects
21
- * - A function that returns a config or array of configs (or resolves to them).
22
- * Useful for calling `StyleDictionary.registerFormat()` (or other `register*`
23
- * methods) before returning a config that references the custom format by name.
24
- *
25
- * If not provided, it will look for 'sd.config.json' or 'config.json' in the root directory.
26
- */
27
- config?: (() => Config | Config[] | Promise<Config | Config[]>) | Config | Config[] | string | string[];
28
- /**
29
- * Disable console logging.
30
- * @default false
31
- */
32
- silent?: boolean;
33
- /**
34
- * Additional files or glob patterns to watch.
35
- * If config files are paths, those paths are watched automatically.
36
- * By default, the plugin also parses 'source' and 'include' properties in configurations and watches them.
37
- */
38
- watch?: string | string[];
14
+ interface UnpluginStyleDictionaryOptions {
15
+ /**
16
+ * Style Dictionary configuration(s).
17
+ * Can be:
18
+ * - A file path string (e.g. 'sd.config.json')
19
+ * - An array of file path strings
20
+ * - A Style Dictionary configuration object
21
+ * - An array of Style Dictionary configuration objects
22
+ * - A function that returns a config or array of configs (or resolves to them).
23
+ * Useful for calling `StyleDictionary.registerFormat()` (or other `register*`
24
+ * methods) before returning a config that references the custom format by name.
25
+ *
26
+ * If not provided, it will look for 'sd.config.json' or 'config.json' in the root directory.
27
+ */
28
+ config?: (() => Config | Config[] | Promise<Config | Config[]>) | Config | Config[] | string | string[];
29
+ /**
30
+ * Disable console logging.
31
+ * @default false
32
+ */
33
+ silent?: boolean;
34
+ /**
35
+ * Additional files or glob patterns to watch.
36
+ * If config files are paths, those paths are watched automatically.
37
+ * By default, the plugin also parses 'source' and 'include' properties in configurations and watches them.
38
+ */
39
+ watch?: string | string[];
39
40
  }
41
+ //#endregion
42
+ export { UnpluginStyleDictionaryOptions };
43
+ //# sourceMappingURL=types.d.ts.map
package/dist/vite.d.ts CHANGED
@@ -1,2 +1,6 @@
1
- declare const _default: (options?: import('./types.js').UnpluginStyleDictionaryOptions | undefined) => import('vite').Plugin<any>;
2
- export default _default;
1
+ import { UnpluginStyleDictionaryOptions } from "./types.js";
2
+ //#region src/vite.d.ts
3
+ declare const _default: (options?: UnpluginStyleDictionaryOptions | undefined) => import("vite").Plugin<any>;
4
+ //#endregion
5
+ export { _default as default };
6
+ //# sourceMappingURL=vite.d.ts.map
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
- import e from "./index.js";
1
+ import unplugin from "./index.js";
2
2
  //#region src/vite.ts
3
- var t = e.vite;
3
+ var vite_default = unplugin.vite;
4
4
  //#endregion
5
- export { t as default };
5
+ export { vite_default as default };
6
6
 
7
7
  //# sourceMappingURL=vite.js.map
package/dist/vite.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.js","names":[],"sources":["../src/vite.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.vite\n"],"mappings":";;AAEA,IAAA,IAAe,EAAS"}
1
+ {"version":3,"file":"vite.js","names":[],"sources":["../src/vite.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.vite\n"],"mappings":";;AAEA,IAAA,eAAe,SAAS"}
package/dist/webpack.d.ts CHANGED
@@ -1,2 +1,6 @@
1
- declare const _default: (options?: import('./types.js').UnpluginStyleDictionaryOptions | undefined) => import('webpack').WebpackPluginInstance;
2
- export default _default;
1
+ import { UnpluginStyleDictionaryOptions } from "./types.js";
2
+ //#region src/webpack.d.ts
3
+ declare const _default: (options?: UnpluginStyleDictionaryOptions | undefined) => import("webpack").WebpackPluginInstance;
4
+ //#endregion
5
+ export { _default as default };
6
+ //# sourceMappingURL=webpack.d.ts.map
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
- import e from "./index.js";
1
+ import unplugin from "./index.js";
2
2
  //#region src/webpack.ts
3
- var t = e.webpack;
3
+ var webpack_default = unplugin.webpack;
4
4
  //#endregion
5
- export { t as default };
5
+ export { webpack_default as default };
6
6
 
7
7
  //# sourceMappingURL=webpack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.js","names":[],"sources":["../src/webpack.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.webpack\n"],"mappings":";;AAEA,IAAA,IAAe,EAAS"}
1
+ {"version":3,"file":"webpack.js","names":[],"sources":["../src/webpack.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.webpack\n"],"mappings":";;AAEA,IAAA,kBAAe,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanso-labs/unplugin-style-dictionary",
3
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
4
  "description": "Compile Style Dictionary design tokens ahead of your bundler (Vite, Rolldown, Rollup, or Webpack) from a single unplugin-based plugin, with automatic watching and rebuilding under Vite",
5
5
  "keywords": [
6
6
  "unplugin",
@@ -21,33 +21,58 @@
21
21
  },
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/index.d.ts",
25
- "import": "./dist/index.js",
26
- "require": "./dist/index.cjs"
24
+ "import": {
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
27
+ },
28
+ "require": {
29
+ "types": "./dist/cjs/index.d.cts",
30
+ "default": "./dist/cjs/index.cjs"
31
+ }
27
32
  },
28
33
  "./vite": {
29
- "types": "./dist/vite.d.ts",
30
- "import": "./dist/vite.js",
31
- "require": "./dist/vite.cjs"
34
+ "import": {
35
+ "types": "./dist/vite.d.ts",
36
+ "default": "./dist/vite.js"
37
+ },
38
+ "require": {
39
+ "types": "./dist/cjs/vite.d.cts",
40
+ "default": "./dist/cjs/vite.cjs"
41
+ }
32
42
  },
33
43
  "./rolldown": {
34
- "types": "./dist/rolldown.d.ts",
35
- "import": "./dist/rolldown.js",
36
- "require": "./dist/rolldown.cjs"
44
+ "import": {
45
+ "types": "./dist/rolldown.d.ts",
46
+ "default": "./dist/rolldown.js"
47
+ },
48
+ "require": {
49
+ "types": "./dist/cjs/rolldown.d.cts",
50
+ "default": "./dist/cjs/rolldown.cjs"
51
+ }
37
52
  },
38
53
  "./rollup": {
39
- "types": "./dist/rollup.d.ts",
40
- "import": "./dist/rollup.js",
41
- "require": "./dist/rollup.cjs"
54
+ "import": {
55
+ "types": "./dist/rollup.d.ts",
56
+ "default": "./dist/rollup.js"
57
+ },
58
+ "require": {
59
+ "types": "./dist/cjs/rollup.d.cts",
60
+ "default": "./dist/cjs/rollup.cjs"
61
+ }
42
62
  },
43
63
  "./webpack": {
44
- "types": "./dist/webpack.d.ts",
45
- "import": "./dist/webpack.js",
46
- "require": "./dist/webpack.cjs"
64
+ "import": {
65
+ "types": "./dist/webpack.d.ts",
66
+ "default": "./dist/webpack.js"
67
+ },
68
+ "require": {
69
+ "types": "./dist/cjs/webpack.d.cts",
70
+ "default": "./dist/cjs/webpack.cjs"
71
+ }
47
72
  },
48
73
  "./package.json": "./package.json"
49
74
  },
50
- "main": "./dist/index.cjs",
75
+ "main": "./dist/cjs/index.cjs",
51
76
  "module": "./dist/index.js",
52
77
  "types": "./dist/index.d.ts",
53
78
  "type": "module",
@@ -56,11 +81,13 @@
56
81
  "url": "git+https://github.com/kanso-labs/unplugin-style-dictionary.git"
57
82
  },
58
83
  "scripts": {
59
- "build": "tsc -b && vite build",
84
+ "build": "tsc -b && tsdown",
60
85
  "clean": "rimraf dist",
61
- "lint": "eslint .",
62
- "test": "vitest run",
63
- "prepare": "husky"
86
+ "format": "oxfmt",
87
+ "format:check": "oxfmt --check",
88
+ "lint": "oxlint --type-aware . && eslint . && npm run format:check",
89
+ "prepare": "husky",
90
+ "test": "vitest run"
64
91
  },
65
92
  "peerDependencies": {
66
93
  "rolldown": "*",
@@ -89,19 +116,21 @@
89
116
  "@eslint/js": "10.0.1",
90
117
  "@types/node": "26.2.0",
91
118
  "eslint": "10.9.0",
92
- "eslint-config-prettier": "10.1.8",
119
+ "eslint-plugin-oxlint": "1.78.0",
93
120
  "eslint-plugin-perfectionist": "5.10.1",
94
- "eslint-plugin-prettier": "5.5.6",
95
121
  "globals": "17.11.0",
96
122
  "husky": "9.1.7",
97
- "prettier": "3.9.6",
123
+ "lint-staged": "17.3.0",
124
+ "oxfmt": "0.64.0",
125
+ "oxlint": "1.78.0",
126
+ "oxlint-tsgolint": "7.0.2001",
98
127
  "rimraf": "6.1.3",
99
128
  "rollup": "4.62.5",
100
129
  "style-dictionary": "5.5.2",
130
+ "tsdown": "0.22.14",
101
131
  "typescript": "6.0.3",
102
132
  "typescript-eslint": "8.67.0",
103
133
  "vite": "8.2.2",
104
- "vite-plugin-dts": "5.0.3",
105
134
  "vitest": "4.1.11",
106
135
  "webpack": "5.109.2"
107
136
  },
package/dist/index.cjs DELETED
@@ -1,2 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("node:fs");c=s(c,1);let l=require("node:path");l=s(l,1);let u=require("node:url"),d=require("node:zlib");d=s(d,1);let f=require("style-dictionary");f=s(f,1);let p=require("unplugin");function m(e,t){let n=e.replace(/\\/g,`/`);return t.some(e=>e===n||n.startsWith(e.replace(/\/\*\*/g,``))||e.includes(`*`)&&new RegExp(e.replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`)).test(n))}function h(e){try{c.default.rmSync(e,{force:!0})}catch{}}var g=0;function _(e){let t=l.default.extname(e);return l.default.join(l.default.dirname(e),`.${l.default.basename(e,t)}.${process.pid}.${g++}.tmp`)}var v=Object.create(c.default,{promises:{value:Object.create(c.default.promises,{writeFile:{value:async(e,t,n)=>{if(typeof e!=`string`)return c.default.promises.writeFile(e,t,n);let r=_(e);try{await c.default.promises.writeFile(r,t,n),await c.default.promises.rename(r,e)}catch(e){throw h(r),e}}}})},writeFileSync:{value:(e,t,n)=>{if(typeof e!=`string`){c.default.writeFileSync(e,t,n);return}let r=_(e);try{c.default.writeFileSync(r,t,n),c.default.renameSync(r,e)}catch(e){throw h(r),e}}}}),y=(e={})=>{let{silent:t=!1}=e,n=process.cwd(),r=(e,n=`info`)=>{if(t)return;let r=`[unplugin-style-dictionary]`;n===`error`?console.error(`\x1b[31m${r} ${e}\x1b[0m`):console.log(n===`success`?`\x1b[32m${r} ${e}\x1b[0m`:`\x1b[36m${r} ${e}\x1b[0m`)},i=async()=>{let t=e.config;if(!t)for(let e of[`sd.config.json`,`config.json`,`sd.config.js`,`sd.config.mjs`]){let r=l.default.resolve(n,e);if(c.default.existsSync(r)){t=e;break}}return t?(typeof t==`function`&&(t=await t()),(Array.isArray(t)?t:[t]).map(e=>{if(typeof e==`string`){let t=l.default.resolve(n,e);return{config:t,dir:l.default.dirname(t),file:t}}return{config:e,dir:n}})):(r(`No configuration specified and no default config file found. Style Dictionary will not compile.`,`error`),[])},a=async t=>{let i=new Set;for(let e of t){e.file&&i.add(e.file.replace(/\\/g,`/`));let t=null;if(typeof e.config==`string`)try{if(e.config.endsWith(`.json`)){let n=c.default.readFileSync(e.config,`utf-8`);t=JSON.parse(n)}else{let n=await import(`${(0,u.pathToFileURL)(e.config).href}?t=${Date.now()}`);t=n.default||n}}catch(t){r(`Failed to parse config file: ${e.config}. Error: ${t.message}`,`error`)}else t=e.config;if(t){let n=t=>{if(typeof t==`string`){let n=(l.default.isAbsolute(t)?t:l.default.resolve(e.dir,t)).replace(/\\/g,`/`);i.add(n)}};t.source&&(Array.isArray(t.source)?t.source.forEach(n):n(t.source)),t.include&&(Array.isArray(t.include)?t.include.forEach(n):n(t.include))}}if(e.watch){let t=Array.isArray(e.watch)?e.watch:[e.watch];for(let e of t){let t=l.default.isAbsolute(e)?e:l.default.resolve(n,e);i.add(t.replace(/\\/g,`/`))}}return Array.from(i)},o=async(e,i)=>{let a=Date.now();try{i||r(`Compiling design tokens...`,`info`);let o=new Set;for(let r of e){let e=new f.default(r.config);await e.hasInitialized;let a=await e.extend({log:{verbosity:`silent`}});if(a.volume=v,await a.buildAllPlatforms(),!i&&!t&&a.platforms)for(let e of Object.keys(a.platforms)){let t=a.platforms[e];if(t&&t.files){let e=t.buildPath||``;for(let r of t.files)if(r&&r.destination){let t=l.default.isAbsolute(e)?e:l.default.resolve(n,e),i=l.default.isAbsolute(r.destination)?r.destination:l.default.resolve(t,r.destination);o.add(i)}}}}let s=Date.now()-a;if(i)r(`Rebuilt design tokens due to change in ${i} (${s}ms)`,`success`);else{if(!t&&o.size>0){let e=[];for(let t of o)if(c.default.existsSync(t)){let r=l.default.relative(n,t).replace(/\\/g,`/`),i=l.default.dirname(r),a=l.default.basename(r),o=i===`.`?`\x1b[32m${a}\x1b[0m`:`\x1b[90m${i}/\x1b[0m\x1b[32m${a}\x1b[0m`;try{let n=`${(c.default.statSync(t).size/1024).toFixed(2)} kB`,i=c.default.readFileSync(t),a=`${(d.default.gzipSync(i).length/1024).toFixed(2)} kB`;e.push({coloredPath:o,gzipSizeStr:a,relativeDisplayPath:r,sizeStr:n})}catch{}}if(e.length>0){let t=Math.max(...e.map(e=>e.relativeDisplayPath.length),0),n=Math.max(...e.map(e=>e.sizeStr.length),0);for(let r of e){let e=` `.repeat(Math.max(2,t-r.relativeDisplayPath.length+2)),i=r.sizeStr.padStart(n);console.log(`${r.coloredPath}${e}\x1b[90m${i} │ gzip: ${r.gzipSizeStr}\x1b[0m`)}}}r(`Compiled successfully! (${s}ms)`,`success`)}}catch(e){let t=Date.now()-a;r(`Compilation failed after ${t}ms: ${e.message}`,`error`)}};return{async buildStart(){let e=await i();if(e.length===0)return;let t=await a(e);for(let e of t)this.addWatchFile(e);await o(e)},name:`unplugin-style-dictionary`,vite:{configResolved(e){n=e.root||process.cwd()},async configureServer(e){let t=await i();if(t.length===0)return;let n=await a(t);e.watcher.add(n),e.watcher.on(`all`,async(t,r)=>{if(!m(r,n))return;let s=await i();await o(s,l.default.basename(r));let c=await a(s);e.watcher.add(c)})}},async watchChange(e){let t=await i();if(t.length===0)return;let n=await a(t);if(m(e,n)){await o(t,l.default.basename(e));for(let e of n)this.addWatchFile(e)}}}},b=(0,p.createUnplugin)(y);exports.default=b,exports.unplugin=b,exports.matchesWatchedFile=m,exports.unpluginFactory=y;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'style-dictionary'\nimport type { UnpluginFactory } from 'unplugin'\nimport type { ViteDevServer } from 'vite'\n\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport { pathToFileURL } from 'node:url'\nimport zlib from 'node:zlib'\nimport StyleDictionary from 'style-dictionary'\nimport { createUnplugin } from 'unplugin'\n\nimport type { UnpluginStyleDictionaryOptions } from './types.js'\n\nexport * from './types.js'\n\n// Whether `file` matches one of the resolved config/token watch patterns.\n// Shared by the Vite-specific `configureServer` watcher and the universal\n// `watchChange` hook — both need it, and both must skip files that don't\n// match: without this filter, `watchChange` reacts to *any* changed\n// module-graph file, including this plugin's own generated output (since\n// consuming code imports it). Every regenerate is itself a \"change\", which\n// without filtering re-triggers a rebuild forever.\nexport function matchesWatchedFile(file: string, patterns: string[]): boolean {\n const normalizedFile = file.replace(/\\\\/g, '/')\n\n return patterns.some((pattern) => {\n // If the pattern is an exact file path\n if (pattern === normalizedFile) return true\n\n // If the pattern is a glob, we check if the file matches it.\n // Note: A simple string match or simple glob matcher can be used here.\n // For simplicity and correctness, since token source paths are usually globs,\n // we can match based on path directory containment or general matching.\n // Let's implement a robust matchesGlob check or check if it's one of the token files.\n // Chokidar triggers on actual files, so we want to check if the changed file matches\n // any of the config files or token files/globs.\n return (\n normalizedFile.startsWith(pattern.replace(/\\/\\*\\*/g, '')) ||\n (pattern.includes('*') &&\n new RegExp(\n pattern.replace(/[.+^${}()|[\\]\\\\]/g, '\\\\$&').replace(/\\*/g, '.*'),\n ).test(normalizedFile))\n )\n })\n}\n\n// Style Dictionary writes every generated file with a plain `writeFile` on the\n// volume it was handed, which truncates the destination and then streams the\n// new contents into it. Anything reading that file inside the window sees a\n// partial file: a consuming test run whose tokens are rebuilt mid-suite, or a\n// dev-server request landing on a rebuild, gets a truncated module and fails\n// to parse it. Writing a sibling temporary file and renaming it over the\n// destination closes the window — `rename` is atomic within a filesystem, so a\n// concurrent reader sees either the whole old file or the whole new one.\n\n// Best-effort cleanup of a temporary file whose write or rename failed. The\n// original failure is what the caller reports, so nothing here may throw.\nfunction discardTemporaryFile(temporary: string): void {\n try {\n fs.rmSync(temporary, { force: true })\n } catch {\n // Ignore: a leftover temporary file is not worth masking the real error.\n }\n}\n\n// Temporary path for an atomic write of `destination`.\n//\n// It has to be a sibling of the destination, because `rename` is only atomic\n// within one filesystem and the system temp directory is often a different\n// mount. The final extension is dropped rather than kept, so the temporary\n// file cannot match a pattern written for the generated file's own extension —\n// `matchesWatchedFile` tests its globs unanchored, and a leftover\n// `vars.css.tmp` would match a `*.css` watch. The pid and counter make the\n// name unique, so two writes of the same destination — parallel platforms in\n// one build, or two builds overlapping — never share a temporary file.\nlet temporaryFileCounter = 0\n\nfunction temporaryPathFor(destination: string): string {\n const extension = path.extname(destination)\n\n return path.join(\n path.dirname(destination),\n `.${path.basename(destination, extension)}.${process.pid}.${temporaryFileCounter++}.tmp`,\n )\n}\n\nconst writeFileAtomic: typeof fs.promises.writeFile = async (\n file,\n data,\n options,\n) => {\n // A file handle or descriptor is already-open state that a rename cannot\n // stand in for, so only a path is written atomically.\n if (typeof file !== 'string') {\n return fs.promises.writeFile(file, data, options)\n }\n\n const temporary = temporaryPathFor(file)\n\n try {\n await fs.promises.writeFile(temporary, data, options)\n await fs.promises.rename(temporary, file)\n } catch (err) {\n discardTemporaryFile(temporary)\n throw err\n }\n}\n\nconst writeFileSyncAtomic: typeof fs.writeFileSync = (file, data, options) => {\n if (typeof file !== 'string') {\n fs.writeFileSync(file, data, options)\n return\n }\n\n const temporary = temporaryPathFor(file)\n\n try {\n fs.writeFileSync(temporary, data, options)\n fs.renameSync(temporary, file)\n } catch (err) {\n discardTemporaryFile(temporary)\n throw err\n }\n}\n\n// `node:fs` with both write entry points swapped for their atomic\n// equivalents, handed to Style Dictionary as the volume it builds through.\n// Everything else — reads, `mkdir`, `access`, the `promises` namespace — is\n// inherited from `node:fs` unchanged, so only the moment a file becomes\n// visible to readers changes. Custom actions receive this volume too, so\n// whatever they emit is written the same way.\n//\n// It is assigned onto the instance rather than passed as the `volume`\n// constructor option on purpose: that option marks the volume as a custom\n// filesystem shim, which switches Style Dictionary's path resolution off for\n// every read as well.\nconst atomicVolume = Object.create(fs, {\n promises: {\n value: Object.create(fs.promises, {\n writeFile: { value: writeFileAtomic },\n }) as typeof fs.promises,\n },\n writeFileSync: { value: writeFileSyncAtomic },\n}) as typeof fs\n\nexport const unpluginFactory: UnpluginFactory<\n undefined | UnpluginStyleDictionaryOptions,\n false\n> = (options = {}) => {\n const { silent = false } = options\n let root = process.cwd()\n\n // Helper to log if not silent\n const log = (\n message: string,\n type: 'error' | 'info' | 'success' = 'info',\n ) => {\n if (silent) return\n const prefix = '[unplugin-style-dictionary]'\n if (type === 'error') {\n console.error(`\\x1b[31m${prefix} ${message}\\x1b[0m`)\n } else if (type === 'success') {\n console.log(`\\x1b[32m${prefix} ${message}\\x1b[0m`)\n } else {\n console.log(`\\x1b[36m${prefix} ${message}\\x1b[0m`)\n }\n }\n\n // Resolve config file paths / objects\n const resolveConfigs = async (): Promise<\n Array<{ config: Config | string; dir: string; file?: string }>\n > => {\n let rawConfig = options.config\n\n // If config is not defined, look for default configuration files\n if (!rawConfig) {\n const defaults = [\n 'sd.config.json',\n 'config.json',\n 'sd.config.js',\n 'sd.config.mjs',\n ]\n for (const file of defaults) {\n const fullPath = path.resolve(root, file)\n if (fs.existsSync(fullPath)) {\n rawConfig = file\n break\n }\n }\n }\n\n if (!rawConfig) {\n log(\n 'No configuration specified and no default config file found. Style Dictionary will not compile.',\n 'error',\n )\n return []\n }\n\n // Evaluate function if provided\n if (typeof rawConfig === 'function') {\n rawConfig = await rawConfig()\n }\n\n const configs = Array.isArray(rawConfig) ? rawConfig : [rawConfig]\n\n return configs.map((conf) => {\n if (typeof conf === 'string') {\n const fullPath = path.resolve(root, conf)\n return {\n config: fullPath,\n dir: path.dirname(fullPath),\n file: fullPath,\n }\n } else {\n return {\n config: conf,\n dir: root,\n }\n }\n })\n }\n\n // Parse token files to watch\n const getWatchFiles = async (\n resolvedConfigs: Array<{\n config: Config | string\n dir: string\n file?: string\n }>,\n ): Promise<string[]> => {\n const filesToWatch = new Set<string>()\n\n for (const item of resolvedConfigs) {\n if (item.file) {\n filesToWatch.add(item.file.replace(/\\\\/g, '/'))\n }\n\n let configObj: Config | null = null\n\n if (typeof item.config === 'string') {\n try {\n if (item.config.endsWith('.json')) {\n const content = fs.readFileSync(item.config, 'utf-8')\n configObj = JSON.parse(content)\n } else {\n const fileUrl = pathToFileURL(item.config).href\n const module = await import(`${fileUrl}?t=${Date.now()}`)\n configObj = module.default || module\n }\n } catch (err) {\n log(\n `Failed to parse config file: ${item.config}. Error: ${(err as Error).message}`,\n 'error',\n )\n }\n } else {\n configObj = item.config\n }\n\n if (configObj) {\n const addPattern = (pattern: unknown) => {\n if (typeof pattern === 'string') {\n const absolutePattern = path.isAbsolute(pattern)\n ? pattern\n : path.resolve(item.dir, pattern)\n const normalized = absolutePattern.replace(/\\\\/g, '/')\n filesToWatch.add(normalized)\n }\n }\n\n if (configObj.source) {\n if (Array.isArray(configObj.source)) {\n configObj.source.forEach(addPattern)\n } else {\n addPattern(configObj.source)\n }\n }\n\n if (configObj.include) {\n if (Array.isArray(configObj.include)) {\n configObj.include.forEach(addPattern)\n } else {\n addPattern(configObj.include)\n }\n }\n }\n }\n\n // Add manually configured watch files\n if (options.watch) {\n const extraWatches = Array.isArray(options.watch)\n ? options.watch\n : [options.watch]\n for (const pattern of extraWatches) {\n const absolutePattern = path.isAbsolute(pattern)\n ? pattern\n : path.resolve(root, pattern)\n filesToWatch.add(absolutePattern.replace(/\\\\/g, '/'))\n }\n }\n\n return Array.from(filesToWatch)\n }\n\n // Compile design tokens\n const runBuilds = async (\n resolvedConfigs: Array<{ config: Config | string; dir: string }>,\n context?: string,\n ) => {\n const startTime = Date.now()\n try {\n if (!context) {\n log('Compiling design tokens...', 'info')\n }\n\n const generatedFiles = new Set<string>()\n\n for (const item of resolvedConfigs) {\n const sd = new StyleDictionary(item.config)\n await sd.hasInitialized\n const silentSD = await sd.extend({\n log: {\n verbosity: 'silent',\n },\n })\n // Swap in the atomic volume only now that the instance has finished\n // reading its configs and token sources, so every write below lands\n // through `rename` while the read path stays exactly as it was.\n silentSD.volume = atomicVolume\n await silentSD.buildAllPlatforms()\n\n if (!context && !silent && silentSD.platforms) {\n for (const platformName of Object.keys(silentSD.platforms)) {\n const platform = silentSD.platforms[platformName]\n if (platform && platform.files) {\n const buildPath = platform.buildPath || ''\n for (const file of platform.files) {\n if (file && file.destination) {\n const absoluteBuildPath = path.isAbsolute(buildPath)\n ? buildPath\n : path.resolve(root, buildPath)\n const absoluteDestination = path.isAbsolute(file.destination)\n ? file.destination\n : path.resolve(absoluteBuildPath, file.destination)\n generatedFiles.add(absoluteDestination)\n }\n }\n }\n }\n }\n }\n\n const duration = Date.now() - startTime\n\n if (context) {\n log(\n `Rebuilt design tokens due to change in ${context} (${duration}ms)`,\n 'success',\n )\n } else {\n if (!silent && generatedFiles.size > 0) {\n const fileInfos: Array<{\n coloredPath: string\n gzipSizeStr: string\n relativeDisplayPath: string\n sizeStr: string\n }> = []\n\n for (const filePath of generatedFiles) {\n if (fs.existsSync(filePath)) {\n const displayPath = path\n .relative(root, filePath)\n .replace(/\\\\/g, '/')\n const dir = path.dirname(displayPath)\n const base = path.basename(displayPath)\n const coloredPath =\n dir === '.'\n ? `\\x1b[32m${base}\\x1b[0m`\n : `\\x1b[90m${dir}/\\x1b[0m\\x1b[32m${base}\\x1b[0m`\n\n try {\n const stats = fs.statSync(filePath)\n const bytes = stats.size\n const sizeStr = `${(bytes / 1024).toFixed(2)} kB`\n\n const content = fs.readFileSync(filePath)\n const gzipBytes = zlib.gzipSync(content).length\n const gzipSizeStr = `${(gzipBytes / 1024).toFixed(2)} kB`\n\n fileInfos.push({\n coloredPath,\n gzipSizeStr,\n relativeDisplayPath: displayPath,\n sizeStr,\n })\n } catch {\n // Ignore errors reading individual files\n }\n }\n }\n\n if (fileInfos.length > 0) {\n const longestPathLength = Math.max(\n ...fileInfos.map((f) => f.relativeDisplayPath.length),\n 0,\n )\n const longestSizeLength = Math.max(\n ...fileInfos.map((f) => f.sizeStr.length),\n 0,\n )\n\n for (const info of fileInfos) {\n const pathPadding = ' '.repeat(\n Math.max(\n 2,\n longestPathLength - info.relativeDisplayPath.length + 2,\n ),\n )\n const sizePadded = info.sizeStr.padStart(longestSizeLength)\n console.log(\n `${info.coloredPath}${pathPadding}\\x1b[90m${sizePadded} │ gzip: ${info.gzipSizeStr}\\x1b[0m`,\n )\n }\n }\n }\n\n log(`Compiled successfully! (${duration}ms)`, 'success')\n }\n } catch (err) {\n const duration = Date.now() - startTime\n log(\n `Compilation failed after ${duration}ms: ${(err as Error).message}`,\n 'error',\n )\n }\n }\n\n return {\n async buildStart() {\n const resolved = await resolveConfigs()\n if (resolved.length === 0) return\n\n // Register token/config files with the host bundler's watch mode.\n // Works out of the box wherever the host runs a persistent watcher\n // (e.g. `rollup --watch`); Vite's dev server is additionally handled\n // below via the `vite.configureServer` escape hatch, since token\n // sources are plain JSON/JS files outside the module graph and\n // `watchChange` is not reliably invoked by Vite while serving.\n const watchFiles = await getWatchFiles(resolved)\n for (const file of watchFiles) {\n this.addWatchFile(file)\n }\n\n await runBuilds(resolved)\n },\n\n name: 'unplugin-style-dictionary',\n\n vite: {\n configResolved(config) {\n root = config.root || process.cwd()\n },\n\n async configureServer(server: ViteDevServer) {\n const resolved = await resolveConfigs()\n if (resolved.length === 0) return\n\n const filesToWatch = await getWatchFiles(resolved)\n\n // Watch configuration files and token files\n server.watcher.add(filesToWatch)\n\n server.watcher.on('all', async (_event, file) => {\n if (!matchesWatchedFile(file, filesToWatch)) return\n\n // Re-resolve configs to handle added/removed configs or changes to config itself\n const currentResolved = await resolveConfigs()\n await runBuilds(currentResolved, path.basename(file))\n\n // Dynamically update the watch list in case the configurations changed\n const newWatches = await getWatchFiles(currentResolved)\n server.watcher.add(newWatches)\n })\n },\n },\n\n async watchChange(id) {\n const resolved = await resolveConfigs()\n if (resolved.length === 0) return\n\n const watchFiles = await getWatchFiles(resolved)\n // Without this check, watchChange fires for *any* changed file in the\n // host bundler's module graph — including our own generated output,\n // since consuming code imports it. Every regenerate is itself a\n // \"change\", so skipping non-matching files here is what keeps this\n // from rebuilding forever.\n if (!matchesWatchedFile(id, watchFiles)) return\n\n await runBuilds(resolved, path.basename(id))\n\n for (const file of watchFiles) {\n this.addWatchFile(file)\n }\n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,EAAa,MAAM,EAAc,CAAQ,EAC/C,IAAK,IAAM,KAAQ,EACjB,KAAK,aAAa,CAAI,EAGxB,MAAM,EAAU,CAAQ,CAC1B,EAEA,KAAM,4BAEN,KAAM,CACJ,eAAe,EAAQ,CACrB,EAAO,EAAO,MAAQ,QAAQ,IAAI,CACpC,EAEA,MAAM,gBAAgB,EAAuB,CAC3C,IAAM,EAAW,MAAM,EAAe,EACtC,GAAI,EAAS,SAAW,EAAG,OAE3B,IAAM,EAAe,MAAM,EAAc,CAAQ,EAGjD,EAAO,QAAQ,IAAI,CAAY,EAE/B,EAAO,QAAQ,GAAG,MAAO,MAAO,EAAQ,IAAS,CAC/C,GAAI,CAAC,EAAmB,EAAM,CAAY,EAAG,OAG7C,IAAM,EAAkB,MAAM,EAAe,EAC7C,MAAM,EAAU,EAAiB,EAAA,QAAK,SAAS,CAAI,CAAC,EAGpD,IAAM,EAAa,MAAM,EAAc,CAAe,EACtD,EAAO,QAAQ,IAAI,CAAU,CAC/B,CAAC,CACH,CACF,EAEA,MAAM,YAAY,EAAI,CACpB,IAAM,EAAW,MAAM,EAAe,EACtC,GAAI,EAAS,SAAW,EAAG,OAE3B,IAAM,EAAa,MAAM,EAAc,CAAQ,EAM1C,KAAmB,EAAI,CAAU,EAEtC,OAAM,EAAU,EAAU,EAAA,QAAK,SAAS,CAAE,CAAC,EAE3C,IAAK,IAAM,KAAQ,EACjB,KAAK,aAAa,CAAI,CAHmB,CAK7C,CACF,CACF,EAEa,GAA2B,EAAA,EAAA,eAAA,CAAe,CAAe"}
package/dist/rolldown.cjs DELETED
@@ -1,2 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=require("./index.cjs").default.rolldown;exports.default=e;
2
- //# sourceMappingURL=rolldown.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rolldown.cjs","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.rolldown\n"],"mappings":"+FAEA,IAAA,uBAAe,CAAA,CAAA,QAAS"}
package/dist/rollup.cjs DELETED
@@ -1,2 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=require("./index.cjs").default.rollup;exports.default=e;
2
- //# sourceMappingURL=rollup.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rollup.cjs","names":[],"sources":["../src/rollup.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.rollup\n"],"mappings":"+FAEA,IAAA,uBAAe,CAAA,CAAA,QAAS"}
package/dist/vite.cjs DELETED
@@ -1,2 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=require("./index.cjs").default.vite;exports.default=e;
2
- //# sourceMappingURL=vite.cjs.map
package/dist/vite.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite.cjs","names":[],"sources":["../src/vite.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.vite\n"],"mappings":"+FAEA,IAAA,uBAAe,CAAA,CAAA,QAAS"}
package/dist/webpack.cjs DELETED
@@ -1,2 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=require("./index.cjs").default.webpack;exports.default=e;
2
- //# sourceMappingURL=webpack.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack.cjs","names":[],"sources":["../src/webpack.ts"],"sourcesContent":["import { unplugin } from './index.js'\n\nexport default unplugin.webpack\n"],"mappings":"+FAEA,IAAA,uBAAe,CAAA,CAAA,QAAS"}