@devup-ui/webpack-plugin 0.1.12 → 0.1.13

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/devup-ui.css CHANGED
@@ -1,4 +1,4 @@
1
- :root{--base:#FFFFFF;--warning:#FF9800;--third:#918AE9;--menuActive:#EAE8FC;--info:#2196F3;--joinBg:#CDE2FA;--shadow:#87878740;--buttonBlueHover:#1453AC;--menuHover:#F6F4FF;--containerBackground:#FFFFFF;--primary:#6159D4;--error:#F44336;--background:#FFFFFF;--link:#006BFF;--footerTitle:#A3A4B4;--search:#9C50FF;--textReverse:#FFFFFF;--title:#1A1A1A;--success:#4CAF50;--border:#E0E0E0;--negativeBase:#000000;--codeBg:#3E3B41;--buttonBlue:#266CCD;--cardBg:#F8F8F8;--secondary:#85A5F2;--buttonBlueActive:#19498B;--footerBg:#E6E7ED;--caption:#A9A8B4;--footerText:#51575F;--text:#2F2F2F;--captionBold:#878594;}
2
- :root[data-theme=dark]{--text:#EDEDED;--base:#000000;--border:#333333;--error:#F44336;--footerTitle:#A3A4B4;--shadow:#62626240;--third:#737FE4;--link:#006BFF;--caption:#A9A8B4;--textReverse:#2F2F2F;--containerBackground:#1E1E1E;--search:#6FA4FF;--warning:#FF9800;--cardBg:#28272B;--title:#FAFAFA;--success:#4CAF50;--buttonBlueHover:#1453AC;--background:#131313;--joinBg:#2F363E;--footerText:#FFFFFF;--captionBold:#878594;--codeBg:#2E303C;--footerBg:#2E303C;--primary:#737FE4;--menuActive:#283259;--secondary:#2A4586;--menuHover:#3C404B;--buttonBlueActive:#19498B;--negativeBase:#FFFFFF;--buttonBlue:#0867AF;--info:#2196F3;}
1
+ :root{--link:#006BFF;--buttonBlueActive:#19498B;--menuActive:#EAE8FC;--title:#1A1A1A;--border:#E0E0E0;--footerText:#51575F;--menuHover:#F6F4FF;--containerBackground:#FFFFFF;--error:#F44336;--caption:#A9A8B4;--success:#4CAF50;--codeBg:#3E3B41;--third:#918AE9;--shadow:#87878740;--primary:#6159D4;--joinBg:#CDE2FA;--buttonBlue:#266CCD;--cardBg:#F8F8F8;--text:#2F2F2F;--search:#9C50FF;--base:#FFFFFF;--textReverse:#FFFFFF;--footerTitle:#A3A4B4;--footerBg:#E6E7ED;--captionBold:#878594;--warning:#FF9800;--info:#2196F3;--buttonBlueHover:#1453AC;--background:#FFFFFF;--negativeBase:#000000;--secondary:#85A5F2;}
2
+ :root[data-theme=dark]{--negativeBase:#FFFFFF;--buttonBlueHover:#1453AC;--footerText:#FFFFFF;--third:#737FE4;--footerBg:#2E303C;--caption:#A9A8B4;--secondary:#2A4586;--containerBackground:#1E1E1E;--link:#006BFF;--border:#333333;--warning:#FF9800;--success:#4CAF50;--menuActive:#283259;--primary:#737FE4;--footerTitle:#A3A4B4;--buttonBlueActive:#19498B;--textReverse:#2F2F2F;--background:#131313;--shadow:#62626240;--captionBold:#878594;--buttonBlue:#0867AF;--search:#6FA4FF;--base:#000000;--info:#2196F3;--title:#FAFAFA;--joinBg:#2F363E;--codeBg:#2E303C;--menuHover:#3C404B;--error:#F44336;--text:#EDEDED;--cardBg:#28272B;}
3
3
  .typo-body{font-family:Pretendard;font-size:14px;font-weight:500;line-height:130%;letter-spacing:-0.42px}.typo-bodyReg{font-family:Pretendard;font-size:16px;font-weight:400;line-height:150%;letter-spacing:-0.48px}.typo-buttonL{font-family:Pretendard;font-size:17px;font-weight:800;line-height:130%;letter-spacing:-0.51px}.typo-buttonLbold{font-family:Pretendard;font-size:17px;font-weight:700;line-height:130%;letter-spacing:-0.51px}.typo-buttonLsemiB{font-family:Pretendard;font-size:17px;font-weight:600;line-height:130%;letter-spacing:-0.51px}.typo-buttonM{font-family:Pretendard;font-size:15px;font-weight:600;line-height:130%;letter-spacing:-0.45px}.typo-buttonS{font-family:Pretendard;font-size:14px;font-weight:800;line-height:130%;letter-spacing:-0.42px}.typo-buttonSmid{font-family:Pretendard;font-size:14px;font-weight:500;line-height:130%;letter-spacing:-0.42px}.typo-caption{font-family:Pretendard;font-size:14px;font-weight:500;line-height:140%;letter-spacing:-0.42px}.typo-captionBold{font-family:Pretendard;font-size:14px;font-weight:700;line-height:130%;letter-spacing:-0.42px}.typo-code{font-family:D2Coding;font-size:13px;font-weight:700;line-height:150%;letter-spacing:-0.39px}.typo-footerMenu{font-family:Pretendard;font-size:13px;font-weight:500;line-height:140%;letter-spacing:-0.39px}.typo-h1{font-family:Pretendard;font-size:38px;font-weight:800;line-height:130%;letter-spacing:-1.14px}.typo-h2{font-family:Pretendard;font-size:36px;font-weight:800;line-height:130%;letter-spacing:-1.08px}.typo-h3{font-family:Pretendard;font-size:32px;font-weight:700;line-height:130%;letter-spacing:-0.96px}.typo-h4{font-family:Pretendard;font-size:28px;font-weight:700;line-height:130%;letter-spacing:-0.84px}.typo-h5{font-family:Pretendard;font-size:24px;font-weight:600;line-height:130%;letter-spacing:-0.72px}.typo-h6{font-family:Pretendard;font-size:18px;font-weight:600;line-height:130%;letter-spacing:-0.54px}.typo-h6Reg{font-family:Pretendard;font-size:18px;font-weight:400;line-height:130%;letter-spacing:-0.54px}.typo-small{font-family:Pretendard;font-size:11px;font-weight:300;line-height:130%;letter-spacing:-0.33px}.typo-smallBold{font-family:Pretendard;font-size:12px;font-weight:800;line-height:140%;letter-spacing:-0.36px}.typo-textL{font-family:Pretendard;font-size:16px;font-weight:500;line-height:130%;letter-spacing:-0.48px}.typo-textS{font-family:Pretendard;font-size:13px;font-weight:500;line-height:140%;letter-spacing:-0.39px}.typo-textSbold{font-family:Pretendard;font-size:15px;font-weight:700;line-height:140%;letter-spacing:-0.45px}
4
- @media (min-width:1280px){.typo-body{font-family:Pretendard;font-size:16px;font-weight:500;line-height:150%;letter-spacing:-0.48px}.typo-buttonL{font-family:Pretendard;font-size:20px;font-weight:800;line-height:130%;letter-spacing:-0.6px}.typo-buttonLbold{font-family:Pretendard;font-size:18px;font-weight:700;line-height:130%;letter-spacing:-0.54px}.typo-buttonLsemiB{font-family:Pretendard;font-size:18px;font-weight:600;line-height:130%;letter-spacing:-0.54px}.typo-buttonM{font-family:Pretendard;font-size:17px;font-weight:600;line-height:130%;letter-spacing:-0.51px}.typo-buttonS{font-family:Pretendard;font-size:15px;font-weight:700;line-height:130%;letter-spacing:-0.45px}.typo-buttonSmid{font-family:Pretendard;font-size:15px;font-weight:500;line-height:130%;letter-spacing:-0.45px}.typo-code{font-family:D2Coding;font-size:15px;font-weight:700;line-height:150%;letter-spacing:-0.45px}.typo-footerMenu{font-family:Pretendard;font-size:14px;font-weight:500;line-height:140%;letter-spacing:-0.42px}.typo-h1{font-family:Pretendard;font-size:52px;font-weight:800;line-height:130%;letter-spacing:-1.56px}.typo-h2{font-family:Pretendard;font-size:48px;font-weight:800;line-height:130%;letter-spacing:-1.44px}.typo-h3{font-family:Pretendard;font-size:42px;font-weight:700;line-height:130%;letter-spacing:-1.26px}.typo-h4{font-family:Pretendard;font-size:36px;font-weight:700;line-height:130%;letter-spacing:-1.08px}.typo-h5{font-family:Pretendard;font-size:30px;font-weight:600;line-height:130%;letter-spacing:-0.9px}.typo-h6{font-family:Pretendard;font-size:24px;font-weight:600;line-height:130%;letter-spacing:-0.72px}.typo-h6Reg{font-family:Pretendard;font-size:24px;font-weight:400;line-height:130%;letter-spacing:-0.72px}.typo-small{font-family:Pretendard;font-size:12px;font-weight:400;line-height:140%;letter-spacing:-0.36px}.typo-textL{font-family:Pretendard;font-size:18px;font-weight:500;line-height:150%;letter-spacing:-0.54px}.typo-textS{font-family:Pretendard;font-size:15px;font-weight:500;line-height:140%;letter-spacing:-0.45px}}.d18{width:247px}.d60{padding:12px 34px}.d65{padding:20px 30px}.d66{background:var(--buttonBlue)}.d3{text-align:center}.d67{margin-left:auto}.d78{border-radius:16px}.d77{padding-left:10px;padding-right:10px;}.d50{max-width:1440px}.d0{height:50px}.d25{gap:16px}.d80{height:70px}.d83{top:20px}.d75{height:42px}.d1{width:52px}.d41{color:var(--footerText)}.d45{align-items:flex-end}.d2{color:var(--title)}.d24{padding-top:80px}.d63{width:520px}.d68{padding-right:100px}.d37{padding-top:40px}.d57{height:46px}.d70{justify-content:center}.d28{padding-left:8px;padding-right:8px;}.d34{padding:30px 24px}.d36{padding-bottom:120px}.d56{box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.25)}.d30{width:484px}.d71{background-color:var(--joinBg)}.d12{width:24px;height:24px;}.d54{width:100%}.d44{justify-content:space-between}.d79{box-shadow:0px 2px 8px 0px var(--shadow, rgba(135, 135, 135, 0.25))}.d14{background:var(--text)}.d21{margin-left:auto;margin-right:auto;}.d6{align-items:center}.d55{background:var(--containerBackground)}.d61{opacity:2.4px}.d82{position:fixed}.d17{padding:16px 40px}.d5{flex-direction:column}.d39{margin-top:150px}.d49{padding:60px 320px}.d53{padding:20px}.d19{gap:50px}.d31{background:var(--cardBg)}.d38{padding-top:40px;padding-bottom:40px;}.d64{background:var(--codeBg)}.d76{padding-left:24px;padding-right:24px;}.d35{gap:40px}.d15{border-radius:100px}.d13{gap:10px}.d47{background:var(--footerBg)}.d7{gap:24px}.d40{color:var(--footerTitle)}.d48{gap:80px}.d22{max-width:1200px}.d59{border-radius:1000px}.d26{width:805px}.d46{text-align:right}.d72{background-image:url(/discord-bg.svg)}.d32{border-radius:20px}.d9{border-radius:100%}.d58{width:162.67px}.d20{max-width:800px}.d29{flex:1 0 0}.d62{padding:6px}.d42{gap:14px}.d81{padding-left:40px;padding-right:40px;}.d8{background:var(--secondary)}.d16{gap:20px}.d52{flex:4px}.d23{padding-bottom:100px}.d33{padding:24px}.d27{width:32px;height:32px;}.d73{border-radius:40px 40px 0px 40px}.d4{display:flex}.d43{min-width:240px}.d69{width:548px}.d74{height:380px}.d11{color:var(--base)}.d51{color:#FFF}.d10{width:10px;height:10px;}
4
+ @media (min-width:1280px){.typo-body{font-family:Pretendard;font-size:16px;font-weight:500;line-height:150%;letter-spacing:-0.48px}.typo-buttonL{font-family:Pretendard;font-size:20px;font-weight:800;line-height:130%;letter-spacing:-0.6px}.typo-buttonLbold{font-family:Pretendard;font-size:18px;font-weight:700;line-height:130%;letter-spacing:-0.54px}.typo-buttonLsemiB{font-family:Pretendard;font-size:18px;font-weight:600;line-height:130%;letter-spacing:-0.54px}.typo-buttonM{font-family:Pretendard;font-size:17px;font-weight:600;line-height:130%;letter-spacing:-0.51px}.typo-buttonS{font-family:Pretendard;font-size:15px;font-weight:700;line-height:130%;letter-spacing:-0.45px}.typo-buttonSmid{font-family:Pretendard;font-size:15px;font-weight:500;line-height:130%;letter-spacing:-0.45px}.typo-code{font-family:D2Coding;font-size:15px;font-weight:700;line-height:150%;letter-spacing:-0.45px}.typo-footerMenu{font-family:Pretendard;font-size:14px;font-weight:500;line-height:140%;letter-spacing:-0.42px}.typo-h1{font-family:Pretendard;font-size:52px;font-weight:800;line-height:130%;letter-spacing:-1.56px}.typo-h2{font-family:Pretendard;font-size:48px;font-weight:800;line-height:130%;letter-spacing:-1.44px}.typo-h3{font-family:Pretendard;font-size:42px;font-weight:700;line-height:130%;letter-spacing:-1.26px}.typo-h4{font-family:Pretendard;font-size:36px;font-weight:700;line-height:130%;letter-spacing:-1.08px}.typo-h5{font-family:Pretendard;font-size:30px;font-weight:600;line-height:130%;letter-spacing:-0.9px}.typo-h6{font-family:Pretendard;font-size:24px;font-weight:600;line-height:130%;letter-spacing:-0.72px}.typo-h6Reg{font-family:Pretendard;font-size:24px;font-weight:400;line-height:130%;letter-spacing:-0.72px}.typo-small{font-family:Pretendard;font-size:12px;font-weight:400;line-height:140%;letter-spacing:-0.36px}.typo-textL{font-family:Pretendard;font-size:18px;font-weight:500;line-height:150%;letter-spacing:-0.54px}.typo-textS{font-family:Pretendard;font-size:15px;font-weight:500;line-height:140%;letter-spacing:-0.45px}}.d6{align-items:center}.d4{display:flex}.d5{flex-direction:column}.d61{justify-content:center}.d6{align-items:center}.d57{align-items:flex-end}.d56{background:var(--buttonBlue)}.d44{background:var(--containerBackground)}.d8{background:var(--secondary)}.d31{background:var(--cardBg)}.d72{background:var(--footerBg)}.d53{background:var(--codeBg)}.d14{background:var(--text)}.d62{background-color:var(--joinBg)}.d63{background-image:url(/discord-bg.svg)}.d64{border-radius:40px 40px 0px 40px}.d48{border-radius:1000px}.d32{border-radius:20px}.d15{border-radius:100px}.d78{border-radius:16px}.d9{border-radius:100%}.d79{box-shadow:0px 2px 8px 0px var(--shadow, rgba(135, 135, 135, 0.25))}.d45{box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.25)}.d10{width:10px;height:10px;}.d12{width:24px;height:24px;}.d27{width:32px;height:32px;}.d11{color:var(--base)}.d2{color:var(--title)}.d40{color:#FFF}.d66{color:var(--footerTitle)}.d67{color:var(--footerText)}.d29{flex:1 0 0}.d41{flex:4px}.d13{gap:10px}.d35{gap:40px}.d68{gap:14px}.d73{gap:80px}.d25{gap:16px}.d16{gap:20px}.d19{gap:50px}.d7{gap:24px}.d80{height:70px}.d75{height:42px}.d65{height:380px}.d46{height:46px}.d0{height:50px}.d70{justify-content:space-between}.d55{max-width:1440px}.d20{max-width:800px}.d22{max-width:1200px}.d69{min-width:240px}.d58{margin-left:auto}.d39{margin-top:150px}.d21{margin-left:auto;margin-right:auto;}.d50{opacity:0.6}.d51{padding:6px}.d49{padding:12px 34px}.d33{padding:24px}.d42{padding:20px}.d54{padding:20px 30px}.d17{padding:16px 40px}.d74{padding:60px 320px}.d34{padding:30px 24px}.d23{padding-bottom:100px}.d36{padding-bottom:120px}.d82{position:fixed}.d59{padding-right:100px}.d24{padding-top:80px}.d37{padding-top:40px}.d28{padding-left:8px;padding-right:8px;}.d76{padding-left:24px;padding-right:24px;}.d81{padding-left:40px;padding-right:40px;}.d77{padding-left:10px;padding-right:10px;}.d38{padding-top:40px;padding-bottom:40px;}.d3{text-align:center}.d71{text-align:right}.d83{top:20px}.d47{width:162.67px}.d60{width:548px}.d30{width:484px}.d43{width:100%}.d1{width:52px}.d26{width:805px}.d52{width:520px}.d18{width:247px}
package/dist/loader.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("node:fs"),a=require("@devup-ui/wasm"),d=function(n){const{plugin:o}=this.getOptions(),{package:r,cssFile:e}=o.options,t=this.async(),s=this.resourcePath;if(s.includes("node_modules/")||s.includes("@devup-ui/react")||!/\.[tj](s|sx)?$/.test(s)){t(null,n);return}this.addDependency(e);try{const{code:c,css:i}=a.codeExtract(this.resourcePath,n.toString(),r,e+(o.watch?"?"+Date.now():""));i&&u.writeFileSync(e,i,{encoding:"utf-8"}),t(null,c)}catch(c){t(c)}};exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("node:fs"),a=require("@devup-ui/wasm"),d=function(n){const{plugin:o}=this.getOptions(),{package:r,cssFile:e}=o.options,t=this.async(),s=this.resourcePath;if(s.includes("node_modules/")||s.includes("@devup-ui/react")||!/\.[tj](s|sx)?$/.test(s)){t(null,n);return}this.addDependency(e);try{const{code:c,css:i}=a.codeExtract(this.resourcePath,n.toString(),r,e);i&&u.writeFileSync(e,i,{encoding:"utf-8"}),t(null,c)}catch(c){t(c)}};exports.default=d;
package/dist/loader.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import { writeFileSync as a } from "node:fs";
2
2
  import { codeExtract as d } from "@devup-ui/wasm";
3
- const p = function(s) {
4
- const { plugin: o } = this.getOptions(), { package: r, cssFile: t } = o.options, e = this.async(), c = this.resourcePath;
3
+ const p = function(n) {
4
+ const { plugin: i } = this.getOptions(), { package: r, cssFile: t } = i.options, e = this.async(), c = this.resourcePath;
5
5
  if (c.includes("node_modules/") || c.includes("@devup-ui/react") || !/\.[tj](s|sx)?$/.test(c)) {
6
- e(null, s);
6
+ e(null, n);
7
7
  return;
8
8
  }
9
9
  this.addDependency(t);
10
10
  try {
11
- const { code: n, css: i } = d(
11
+ const { code: s, css: o } = d(
12
12
  this.resourcePath,
13
- s.toString(),
13
+ n.toString(),
14
14
  r,
15
- t + (o.watch ? "?" + Date.now() : "")
15
+ t
16
16
  );
17
- i && a(t, i, {
17
+ o && a(t, o, {
18
18
  encoding: "utf-8"
19
- }), e(null, n);
20
- } catch (n) {
21
- e(n);
19
+ }), e(null, s);
20
+ } catch (s) {
21
+ e(s);
22
22
  }
23
23
  };
24
24
  export {
package/dist/plugin.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty;var g=(o,e,t)=>e in o?m(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var a=(o,e,t)=>g(o,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("node:fs"),l=require("node:module"),c=require("node:path"),v=require("node:url"),u=require("@devup-ui/wasm");var s=typeof document<"u"?document.currentScript:null;const y=v.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href),P=c.dirname(y);class U{constructor({package:e="@devup-ui/react",cssFile:t=c.join(P,"devup-ui.css"),devupPath:r="devup.json",interfacePath:n=".df"}){a(this,"options");a(this,"watch",!1);this.options={package:e,cssFile:t,devupPath:r,interfacePath:n}}writeDataFiles(){var t;u.registerTheme((t=JSON.parse(i.readFileSync(this.options.devupPath,"utf-8")))==null?void 0:t.theme);const e=u.getThemeInterface(this.options.package,"DevupThemeColors","DevupThemeTypography");e&&(i.existsSync(this.options.interfacePath)||i.mkdirSync(this.options.interfacePath),i.writeFileSync(c.join(this.options.interfacePath,"theme.d.ts"),e,{encoding:"utf-8"})),i.writeFileSync(this.options.cssFile,u.getCss(),{encoding:"utf-8"})}apply(e){const t=i.existsSync(this.options.devupPath);if(t){try{this.writeDataFiles()}catch(n){console.error(n)}e.hooks.afterCompile.tap("DevupUIWebpackPlugin",n=>{n.fileDependencies.add(this.options.devupPath)})}let r=null;e.hooks.watchRun.tapAsync("DevupUIWebpackPlugin",(n,h)=>{this.watch=!0,t&&i.stat(this.options.devupPath,(p,f)=>{if(p){console.error(`Error checking ${this.options.devupPath}:`,p);return}const d=f.mtimeMs;r&&r!==d&&this.writeDataFiles(),r=d}),h()}),i.existsSync(this.options.cssFile)||i.writeFileSync(this.options.cssFile,"",{encoding:"utf-8"}),e.options.module.rules.push({test:this.options.cssFile,use:[{loader:l.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href).resolve("@devup-ui/webpack-plugin/css-loader")}]}),e.options.module.rules.push({test:/\.(tsx|ts|js|mjs|jsx)$/,exclude:/node_modules/,use:[{loader:l.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href).resolve("@devup-ui/webpack-plugin/loader"),options:{plugin:this}}]})}}exports.DevupUIWebpackPlugin=U;
1
+ "use strict";var m=Object.defineProperty;var g=(o,e,t)=>e in o?m(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var d=(o,e,t)=>g(o,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("node:fs"),l=require("node:module"),a=require("node:path"),v=require("node:url"),u=require("@devup-ui/wasm");var s=typeof document<"u"?document.currentScript:null;const y=v.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href),P=a.dirname(y);class U{constructor({package:e="@devup-ui/react",cssFile:t=a.join(P,"devup-ui.css"),devupPath:r="devup.json",interfacePath:n=".df"}){d(this,"options");this.options={package:e,cssFile:t,devupPath:r,interfacePath:n}}writeDataFiles(){var t;u.registerTheme((t=JSON.parse(i.readFileSync(this.options.devupPath,"utf-8")))==null?void 0:t.theme);const e=u.getThemeInterface(this.options.package,"DevupThemeColors","DevupThemeTypography");e&&(i.existsSync(this.options.interfacePath)||i.mkdirSync(this.options.interfacePath),i.writeFileSync(a.join(this.options.interfacePath,"theme.d.ts"),e,{encoding:"utf-8"})),i.writeFileSync(this.options.cssFile,u.getCss(),{encoding:"utf-8"})}apply(e){const t=i.existsSync(this.options.devupPath);if(t){try{this.writeDataFiles()}catch(n){console.error(n)}e.hooks.afterCompile.tap("DevupUIWebpackPlugin",n=>{n.fileDependencies.add(this.options.devupPath)})}let r=null;e.hooks.watchRun.tapAsync("DevupUIWebpackPlugin",(n,h)=>{t&&i.stat(this.options.devupPath,(p,f)=>{if(p){console.error(`Error checking ${this.options.devupPath}:`,p);return}const c=f.mtimeMs;r&&r!==c&&this.writeDataFiles(),r=c}),h()}),i.existsSync(this.options.cssFile)||i.writeFileSync(this.options.cssFile,"",{encoding:"utf-8"}),e.options.module.rules.push({test:this.options.cssFile,use:[{loader:l.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href).resolve("@devup-ui/webpack-plugin/css-loader")}]}),e.options.module.rules.push({test:/\.(tsx|ts|js|mjs|jsx)$/,exclude:/node_modules/,use:[{loader:l.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href).resolve("@devup-ui/webpack-plugin/loader"),options:{plugin:this}}]})}}exports.DevupUIWebpackPlugin=U;
package/dist/plugin.d.ts CHANGED
@@ -7,7 +7,6 @@ export interface DevupUIWebpackPluginOptions {
7
7
  }
8
8
  export declare class DevupUIWebpackPlugin {
9
9
  options: DevupUIWebpackPluginOptions;
10
- watch: boolean;
11
10
  constructor({ package: libPackage, cssFile, devupPath, interfacePath, }: Partial<DevupUIWebpackPluginOptions>);
12
11
  writeDataFiles(): void;
13
12
  apply(compiler: Compiler): void;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAKvC,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,EAAE,2BAA2B,CAAA;IACpC,KAAK,UAAQ;gBAED,EACV,OAAO,EAAE,UAA8B,EACvC,OAAwC,EACxC,SAAwB,EACxB,aAAqB,GACtB,EAAE,OAAO,CAAC,2BAA2B,CAAC;IASvC,cAAc;IAyBd,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAiEzB"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAKvC,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,EAAE,2BAA2B,CAAA;gBAExB,EACV,OAAO,EAAE,UAA8B,EACvC,OAAwC,EACxC,SAAwB,EACxB,aAAqB,GACtB,EAAE,OAAO,CAAC,2BAA2B,CAAC;IASvC,cAAc;IAyBd,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAgEzB"}
package/dist/plugin.js CHANGED
@@ -1,12 +1,12 @@
1
1
  var m = Object.defineProperty;
2
2
  var f = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var p = (i, e, t) => f(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { readFileSync as v, existsSync as n, mkdirSync as g, writeFileSync as r, stat as k } from "node:fs";
3
+ var u = (i, e, t) => f(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { readFileSync as v, existsSync as p, mkdirSync as g, writeFileSync as n, stat as k } from "node:fs";
5
5
  import { createRequire as c } from "node:module";
6
6
  import { dirname as P, join as h } from "node:path";
7
7
  import { fileURLToPath as D } from "node:url";
8
- import { registerTheme as w, getThemeInterface as y, getCss as F } from "@devup-ui/wasm";
9
- const T = D(import.meta.url), x = P(T);
8
+ import { registerTheme as y, getThemeInterface as F, getCss as T } from "@devup-ui/wasm";
9
+ const w = D(import.meta.url), x = P(w);
10
10
  class _ {
11
11
  constructor({
12
12
  package: e = "@devup-ui/react",
@@ -14,8 +14,7 @@ class _ {
14
14
  devupPath: o = "devup.json",
15
15
  interfacePath: s = ".df"
16
16
  }) {
17
- p(this, "options");
18
- p(this, "watch", !1);
17
+ u(this, "options");
19
18
  this.options = {
20
19
  package: e,
21
20
  cssFile: t,
@@ -25,26 +24,26 @@ class _ {
25
24
  }
26
25
  writeDataFiles() {
27
26
  var t;
28
- w(
27
+ y(
29
28
  (t = JSON.parse(v(this.options.devupPath, "utf-8"))) == null ? void 0 : t.theme
30
29
  );
31
- const e = y(
30
+ const e = F(
32
31
  this.options.package,
33
32
  "DevupThemeColors",
34
33
  "DevupThemeTypography"
35
34
  );
36
- e && (n(this.options.interfacePath) || g(this.options.interfacePath), r(
35
+ e && (p(this.options.interfacePath) || g(this.options.interfacePath), n(
37
36
  h(this.options.interfacePath, "theme.d.ts"),
38
37
  e,
39
38
  {
40
39
  encoding: "utf-8"
41
40
  }
42
- )), r(this.options.cssFile, F(), {
41
+ )), n(this.options.cssFile, T(), {
43
42
  encoding: "utf-8"
44
43
  });
45
44
  }
46
45
  apply(e) {
47
- const t = n(this.options.devupPath);
46
+ const t = p(this.options.devupPath);
48
47
  if (t) {
49
48
  try {
50
49
  this.writeDataFiles();
@@ -57,15 +56,15 @@ class _ {
57
56
  }
58
57
  let o = null;
59
58
  e.hooks.watchRun.tapAsync("DevupUIWebpackPlugin", (s, l) => {
60
- this.watch = !0, t && k(this.options.devupPath, (a, d) => {
61
- if (a) {
62
- console.error(`Error checking ${this.options.devupPath}:`, a);
59
+ t && k(this.options.devupPath, (r, d) => {
60
+ if (r) {
61
+ console.error(`Error checking ${this.options.devupPath}:`, r);
63
62
  return;
64
63
  }
65
- const u = d.mtimeMs;
66
- o && o !== u && this.writeDataFiles(), o = u;
64
+ const a = d.mtimeMs;
65
+ o && o !== a && this.writeDataFiles(), o = a;
67
66
  }), l();
68
- }), n(this.options.cssFile) || r(this.options.cssFile, "", { encoding: "utf-8" }), e.options.module.rules.push({
67
+ }), p(this.options.cssFile) || n(this.options.cssFile, "", { encoding: "utf-8" }), e.options.module.rules.push({
69
68
  test: this.options.cssFile,
70
69
  use: [
71
70
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devup-ui/webpack-plugin",
3
3
  "type": "module",
4
- "version": "0.1.12",
4
+ "version": "0.1.13",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@devup-ui/wasm": "0.1.10"
30
+ "@devup-ui/wasm": "0.1.11"
31
31
  },
32
32
  "devDependencies": {
33
33
  "vite": "^6.0.7",