@devup-ui/plugin-utils 1.0.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.
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/load-config.d.ts +5 -0
- package/dist/load-config.d.ts.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +43 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var{defineProperty:L,getOwnPropertyNames:Y,getOwnPropertyDescriptor:Z}=Object,_=Object.prototype.hasOwnProperty;var U=new WeakMap,$=(T)=>{var p=U.get(T),q;if(p)return p;if(p=L({},"__esModule",{value:!0}),T&&typeof T==="object"||typeof T==="function")Y(T).map((w)=>!_.call(p,w)&&L(p,w,{get:()=>T[w],enumerable:!(q=Z(T,w))||q.enumerable}));return U.set(T,p),p};var R=(T,p)=>{for(var q in p)L(T,q,{get:p[q],enumerable:!0,configurable:!0,set:(w)=>p[q]=()=>w})};var F={};R(F,{loadDevupConfigSync:()=>N,loadDevupConfig:()=>Q,deepMerge:()=>A});module.exports=$(F);var E=require("node:fs"),W=require("node:fs/promises"),D=require("node:path");function G(T){return typeof T==="object"&&T!==null&&!Array.isArray(T)}function A(T,p){if(!G(T)||!G(p))return p!==void 0?p:T;let q={...T};for(let w in p)if(Object.prototype.hasOwnProperty.call(p,w)){let z=T[w],B=p[w];if(G(z)&&G(B))q[w]=A(z,B);else if(B!==void 0)q[w]=B}return q}function X(T){try{return JSON.parse(T)}catch{return{}}}function N(T){if(!E.existsSync(T))return{};let p=E.readFileSync(T,"utf-8"),q=X(p);if(!q.extends||q.extends.length===0)return q;let w=D.dirname(T),z={};for(let I of q.extends){let J=D.resolve(w,I),K=N(J);z=A(z,K)}let{extends:B,...H}=q;return A(z,H)}async function Q(T){if(!E.existsSync(T))return{};let p=await W.readFile(T,"utf-8"),q=X(p);if(!q.extends||q.extends.length===0)return q;let w=D.dirname(T),z={};for(let I of q.extends){let J=D.resolve(w,I),K=await Q(J);z=A(z,K)}let{extends:B,...H}=q;return A(z,H)}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC/E,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,GACX,MAAM,SAAS,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as J,readFileSync as W}from"node:fs";import{readFile as X}from"node:fs/promises";import{dirname as K,resolve as L}from"node:path";function D(T){return typeof T==="object"&&T!==null&&!Array.isArray(T)}function B(T,q){if(!D(T)||!D(q))return q!==void 0?q:T;let p={...T};for(let z in q)if(Object.prototype.hasOwnProperty.call(q,z)){let w=T[z],A=q[z];if(D(w)&&D(A))p[z]=B(w,A);else if(A!==void 0)p[z]=A}return p}function N(T){try{return JSON.parse(T)}catch{return{}}}function Q(T){if(!J(T))return{};let q=W(T,"utf-8"),p=N(q);if(!p.extends||p.extends.length===0)return p;let z=K(T),w={};for(let G of p.extends){let H=L(z,G),I=Q(H);w=B(w,I)}let{extends:A,...E}=p;return B(w,E)}async function U(T){if(!J(T))return{};let q=await X(T,"utf-8"),p=N(q);if(!p.extends||p.extends.length===0)return p;let z=K(T),w={};for(let G of p.extends){let H=L(z,G),I=await U(H);w=B(w,I)}let{extends:A,...E}=p;return B(w,E)}export{Q as loadDevupConfigSync,U as loadDevupConfig,B as deepMerge};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DevupConfig } from './types';
|
|
2
|
+
export declare function deepMerge<T, U>(base: T, override: U): T;
|
|
3
|
+
export declare function loadDevupConfigSync(configPath: string): DevupConfig;
|
|
4
|
+
export declare function loadDevupConfig(configPath: string): Promise<DevupConfig>;
|
|
5
|
+
//# sourceMappingURL=load-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../src/load-config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAe1C,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CA0BvD;AAoBD,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CA6BnE;AASD,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,WAAW,CAAC,CA6BtB"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Typography {
|
|
2
|
+
fontFamily?: string;
|
|
3
|
+
fontStyle?: string;
|
|
4
|
+
fontWeight?: number | string;
|
|
5
|
+
fontSize?: string;
|
|
6
|
+
lineHeight?: number | string;
|
|
7
|
+
letterSpacing?: string;
|
|
8
|
+
}
|
|
9
|
+
export type ThemeColors = Record<string, Record<string, string>>;
|
|
10
|
+
export type ThemeTypography = Record<string, Typography | (Typography | null)[]>;
|
|
11
|
+
export interface DevupTheme {
|
|
12
|
+
colors?: ThemeColors;
|
|
13
|
+
typography?: ThemeTypography;
|
|
14
|
+
}
|
|
15
|
+
export interface DevupConfig {
|
|
16
|
+
extends?: string[];
|
|
17
|
+
theme?: DevupTheme;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAMD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAMhE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;AAKhF,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,UAAU,CAAC,EAAE,eAAe,CAAA;CAC7B;AAKD,MAAM,WAAW,WAAW;IAO1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAKlB,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@devup-ui/plugin-utils",
|
|
3
|
+
"description": "Shared utilities for Devup UI build plugins",
|
|
4
|
+
"repository": "https://github.com/dev-five-git/devup-ui",
|
|
5
|
+
"author": "devfive",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://devup-ui.com",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/dev-five-git/devup-ui/issues",
|
|
10
|
+
"email": "contact@devfive.kr"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"devup-ui",
|
|
14
|
+
"plugin",
|
|
15
|
+
"utils"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"version": "1.0.0",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"lint": "eslint",
|
|
21
|
+
"build": "tsc && bun build --target node src/index.ts --production --env=disable --outfile dist/index.cjs --format cjs --packages external && bun build --target node src/index.ts --production --env=disable --outfile dist/index.mjs --format esm --packages external"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.cjs",
|
|
28
|
+
"module": "./dist/index.mjs",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.mjs",
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
|
+
}
|
|
43
|
+
}
|