@devup-ui/vite-plugin 0.1.16 → 0.1.18

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/plugin.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("node:fs"),o=require("node:path"),p=require("node:url"),u=require("@devup-ui/wasm");var s=typeof document<"u"?document.currentScript:null;const g=p.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href),y=o.dirname(g);function d(e){var r;u.registerTheme((r=JSON.parse(t.readFileSync(e.devupPath,"utf-8")))==null?void 0:r.theme);const n=u.getThemeInterface(e.package,"DevupThemeColors","DevupThemeTypography");n&&(t.existsSync(e.interfacePath)||t.mkdirSync(e.interfacePath),t.writeFileSync(o.join(e.interfacePath,"theme.d.ts"),n,{encoding:"utf-8"})),t.writeFileSync(e.cssFile,u.getCss(),{encoding:"utf-8"})}function h({package:e="@devup-ui/react",cssFile:n=o.join(y,"devup-ui.css"),devupPath:r="devup.json",interfacePath:a=".df",extractCss:m=!0}={}){if(t.existsSync(r))try{d({package:e,cssFile:n,devupPath:r,interfacePath:a})}catch(c){console.error(c)}return{name:"devup-ui",config:()=>({server:{watch:{ignored:[`!${r}`]}}}),watchChange(c){if(o.resolve(c)===o.resolve(r)&&t.existsSync(r))try{d({package:e,cssFile:n,devupPath:r,interfacePath:a})}catch(i){console.error(i)}},enforce:"pre",transform(c,i){if(!m||i.includes("node_modules")||!/\.(tsx|ts|js|mjs|jsx)$/i.test(i))return;const{code:l,css:f}=u.codeExtract(i,c,e,n);return f&&t.writeFileSync(n,f,{encoding:"utf-8"}),{code:l}}}}exports.DevupUI=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("node:fs"),o=require("node:path"),p=require("node:url"),u=require("@devup-ui/wasm");var s=typeof document<"u"?document.currentScript:null;const g=p.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("plugin.cjs",document.baseURI).href),h=o.dirname(g);function d(e){var r;u.registerTheme((r=JSON.parse(t.readFileSync(e.devupPath,"utf-8")))==null?void 0:r.theme);const n=u.getThemeInterface(e.package,"DevupThemeColors","DevupThemeTypography","DevupTheme");n&&(t.existsSync(e.interfacePath)||t.mkdirSync(e.interfacePath),t.writeFileSync(o.join(e.interfacePath,"theme.d.ts"),n,{encoding:"utf-8"})),t.writeFileSync(e.cssFile,u.getCss(),{encoding:"utf-8"})}function y({package:e="@devup-ui/react",cssFile:n=o.join(h,"devup-ui.css"),devupPath:r="devup.json",interfacePath:a=".df",extractCss:m=!0}={}){if(t.existsSync(r))try{d({package:e,cssFile:n,devupPath:r,interfacePath:a})}catch(c){console.error(c)}return{name:"devup-ui",config:()=>({server:{watch:{ignored:[`!${r}`]}}}),watchChange(c){if(o.resolve(c)===o.resolve(r)&&t.existsSync(r))try{d({package:e,cssFile:n,devupPath:r,interfacePath:a})}catch(i){console.error(i)}},enforce:"pre",transform(c,i){if(!m||i.includes("node_modules")||!/\.(tsx|ts|js|mjs|jsx)$/i.test(i))return;const{code:l,css:f}=u.codeExtract(i,c,e,n);return f&&t.writeFileSync(n,f,{encoding:"utf-8"}),{code:l}}}}exports.DevupUI=y;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKxC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;CACpB;AAoBD,wBAAgB,OAAO,CAAC,EACtB,OAAO,EAAE,UAA8B,EACvC,OAAwC,EACxC,SAAwB,EACxB,aAAqB,EACrB,UAAiB,GAClB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAAG,YAAY,CA0DnD"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKxC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;CACpB;AAqBD,wBAAgB,OAAO,CAAC,EACtB,OAAO,EAAE,UAA8B,EACvC,OAAwC,EACxC,SAAwB,EACxB,aAAqB,EACrB,UAAiB,GAClB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAAG,YAAY,CA0DnD"}
package/dist/plugin.js CHANGED
@@ -1,15 +1,16 @@
1
- import { existsSync as o, writeFileSync as i, readFileSync as p, mkdirSync as h } from "node:fs";
1
+ import { existsSync as o, writeFileSync as i, readFileSync as g, mkdirSync as h } from "node:fs";
2
2
  import { dirname as l, resolve as m, join as s } from "node:path";
3
3
  import { fileURLToPath as y } from "node:url";
4
- import { codeExtract as T, registerTheme as j, getThemeInterface as v, getCss as x } from "@devup-ui/wasm";
5
- const C = y(import.meta.url), S = l(C);
4
+ import { codeExtract as T, registerTheme as v, getThemeInterface as j, getCss as x } from "@devup-ui/wasm";
5
+ const C = y(import.meta.url), D = l(C);
6
6
  function u(e) {
7
7
  var r;
8
- j((r = JSON.parse(p(e.devupPath, "utf-8"))) == null ? void 0 : r.theme);
9
- const t = v(
8
+ v((r = JSON.parse(g(e.devupPath, "utf-8"))) == null ? void 0 : r.theme);
9
+ const t = j(
10
10
  e.package,
11
11
  "DevupThemeColors",
12
- "DevupThemeTypography"
12
+ "DevupThemeTypography",
13
+ "DevupTheme"
13
14
  );
14
15
  t && (o(e.interfacePath) || h(e.interfacePath), i(s(e.interfacePath, "theme.d.ts"), t, {
15
16
  encoding: "utf-8"
@@ -19,7 +20,7 @@ function u(e) {
19
20
  }
20
21
  function I({
21
22
  package: e = "@devup-ui/react",
22
- cssFile: t = s(S, "devup-ui.css"),
23
+ cssFile: t = s(D, "devup-ui.css"),
23
24
  devupPath: r = "devup.json",
24
25
  interfacePath: f = ".df",
25
26
  extractCss: d = !0
@@ -60,11 +61,11 @@ function I({
60
61
  enforce: "pre",
61
62
  transform(n, c) {
62
63
  if (!d || c.includes("node_modules") || !/\.(tsx|ts|js|mjs|jsx)$/i.test(c)) return;
63
- const { code: g, css: a } = T(c, n, e, t);
64
+ const { code: p, css: a } = T(c, n, e, t);
64
65
  return a && i(t, a, {
65
66
  encoding: "utf-8"
66
67
  }), {
67
- code: g
68
+ code: p
68
69
  };
69
70
  }
70
71
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devup-ui/vite-plugin",
3
3
  "type": "module",
4
- "version": "0.1.16",
4
+ "version": "0.1.18",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@devup-ui/wasm": "0.1.19"
22
+ "@devup-ui/wasm": "0.1.21"
23
23
  },
24
24
  "devDependencies": {
25
25
  "vite-plugin-dts": "^4.5.0",