@hanzogui/generate-themes 8.3.0 → 8.3.2
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/cjs/generate-themes.js +190 -0
- package/dist/cjs/generate-themes.js.map +1 -0
- package/dist/cjs/here.js +6 -0
- package/dist/cjs/here.js.map +1 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/write-generate-themes.js +20 -0
- package/dist/cjs/write-generate-themes.js.map +1 -0
- package/dist/esm/generate-themes.js +187 -0
- package/dist/esm/generate-themes.js.map +1 -0
- package/dist/esm/here.js +3 -0
- package/dist/esm/here.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/write-generate-themes.js +17 -0
- package/dist/esm/write-generate-themes.js.map +1 -0
- package/package.json +15 -15
- package/src/generate-themes.ts +9 -5
- package/src/here.cjs.ts +3 -0
- package/src/here.ts +2 -0
- package/src/index.ts +2 -2
- package/src/write-generate-themes.ts +4 -4
- package/types/generate-themes.d.ts.map +1 -1
- package/types/here.d.ts +2 -0
- package/types/here.d.ts.map +1 -0
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/write-generate-themes.d.ts +1 -1
- package/types/write-generate-themes.d.ts.map +1 -1
- package/dist/cjs/generate-themes.cjs +0 -185
- package/dist/cjs/generate-themes.native.js +0 -214
- package/dist/cjs/generate-themes.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -21
- package/dist/cjs/index.native.js +0 -24
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/write-generate-themes.cjs +0 -55
- package/dist/cjs/write-generate-themes.native.js +0 -60
- package/dist/cjs/write-generate-themes.native.js.map +0 -1
- package/dist/esm/generate-themes.mjs +0 -160
- package/dist/esm/generate-themes.mjs.map +0 -1
- package/dist/esm/generate-themes.native.js +0 -186
- package/dist/esm/generate-themes.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -3
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -3
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/write-generate-themes.mjs +0 -19
- package/dist/esm/write-generate-themes.mjs.map +0 -1
- package/dist/esm/write-generate-themes.native.js +0 -21
- package/dist/esm/write-generate-themes.native.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"here.d.ts","sourceRoot":"","sources":["../src/here.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,GAAG,QAAkB,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './generate-themes';
|
|
2
|
-
export * from './write-generate-themes';
|
|
1
|
+
export * from './generate-themes.ts';
|
|
2
|
+
export * from './write-generate-themes.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { generateThemes } from './generate-themes';
|
|
1
|
+
import type { generateThemes } from './generate-themes.ts';
|
|
2
2
|
export declare function writeGeneratedThemes(hanzoguiDotDir: string, outPath: string, generatedOutput: Awaited<ReturnType<typeof generateThemes>>): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=write-generate-themes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-generate-themes.d.ts","sourceRoot":"","sources":["../src/write-generate-themes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"write-generate-themes.d.ts","sourceRoot":"","sources":["../src/write-generate-themes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,iBAmB5D"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var generate_themes_exports = {};
|
|
24
|
-
__export(generate_themes_exports, {
|
|
25
|
-
generateThemes: () => generateThemes
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(generate_themes_exports);
|
|
28
|
-
var import_node_path = require("node:path");
|
|
29
|
-
let didRegisterOnce = false;
|
|
30
|
-
async function generateThemes(inputFile) {
|
|
31
|
-
const inputFilePath = inputFile[0] === "." ? (0, import_node_path.join)(process.cwd(), inputFile) : inputFile;
|
|
32
|
-
if (!didRegisterOnce) {
|
|
33
|
-
didRegisterOnce = true;
|
|
34
|
-
require("esbuild-register/dist/node").register({
|
|
35
|
-
hookIgnoreNodeModules: false
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
purgeCache(inputFilePath);
|
|
39
|
-
}
|
|
40
|
-
let og = process.env.GUI_KEEP_THEMES;
|
|
41
|
-
process.env.GUI_KEEP_THEMES = "1";
|
|
42
|
-
process.env.GUI_RUN_THEMEBUILDER = "1";
|
|
43
|
-
try {
|
|
44
|
-
const requiredThemes = require(inputFilePath);
|
|
45
|
-
const themes = requiredThemes["default"] || requiredThemes["themes"] || requiredThemes[Object.keys(requiredThemes)[0]];
|
|
46
|
-
const generatedThemes = generatedThemesToTypescript(themes);
|
|
47
|
-
return {
|
|
48
|
-
generated: generatedThemes
|
|
49
|
-
};
|
|
50
|
-
} catch (err) {
|
|
51
|
-
console.warn(` \u26A0\uFE0F Error running theme builder:
|
|
52
|
-
`, err?.["stack"] || err);
|
|
53
|
-
} finally {
|
|
54
|
-
process.env.GUI_KEEP_THEMES = og;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const dedupedTokens = /* @__PURE__ */new Map();
|
|
58
|
-
function generatedThemesToTypescript(themes) {
|
|
59
|
-
const dedupedThemes = /* @__PURE__ */new Map();
|
|
60
|
-
const dedupedThemeToNames = /* @__PURE__ */new Map();
|
|
61
|
-
let i = 0;
|
|
62
|
-
for (const name in themes) {
|
|
63
|
-
i++;
|
|
64
|
-
const theme = themes[name];
|
|
65
|
-
let j = 0;
|
|
66
|
-
for (const [key2, value] of Object.entries(theme)) {
|
|
67
|
-
i++;
|
|
68
|
-
const uniqueKey = `t${i}${j}`;
|
|
69
|
-
if (!dedupedTokens.has(value)) {
|
|
70
|
-
dedupedTokens.set(value, uniqueKey);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const key = JSON.stringify(theme);
|
|
74
|
-
if (dedupedThemes.has(key)) {
|
|
75
|
-
dedupedThemeToNames.set(key, [...dedupedThemeToNames.get(key), name]);
|
|
76
|
-
} else {
|
|
77
|
-
dedupedThemes.set(key, theme);
|
|
78
|
-
dedupedThemeToNames.set(key, [name]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (!themes) {
|
|
82
|
-
throw new Error(`Didn't find any themes exported or returned`);
|
|
83
|
-
}
|
|
84
|
-
const baseKeys = Object.entries(themes.light || themes[Object.keys(themes)[0]]);
|
|
85
|
-
const baseTypeString = `export type Theme = {
|
|
86
|
-
${baseKeys.map(([k]) => {
|
|
87
|
-
return ` ${k}: string;
|
|
88
|
-
`;
|
|
89
|
-
}).join("")}
|
|
90
|
-
}`;
|
|
91
|
-
let out = `${baseTypeString}
|
|
92
|
-
`;
|
|
93
|
-
out += `
|
|
94
|
-
function t(a: [number, number][]) {
|
|
95
|
-
let res: Record<string,string> = {}
|
|
96
|
-
for (const [ki, vi] of a) {
|
|
97
|
-
res[ks[ki] as string] = colors[vi] as string
|
|
98
|
-
}
|
|
99
|
-
return res as Theme
|
|
100
|
-
}
|
|
101
|
-
`;
|
|
102
|
-
out += `export const colors = [
|
|
103
|
-
`;
|
|
104
|
-
let index = 0;
|
|
105
|
-
const valueToIndex = {};
|
|
106
|
-
dedupedTokens.forEach((name, value) => {
|
|
107
|
-
valueToIndex[value] = index;
|
|
108
|
-
index++;
|
|
109
|
-
out += ` '${value}',
|
|
110
|
-
`;
|
|
111
|
-
});
|
|
112
|
-
out += "]\n\n";
|
|
113
|
-
const keys = baseKeys.map(([k]) => k);
|
|
114
|
-
out += `const ks = [
|
|
115
|
-
`;
|
|
116
|
-
out += keys.map(k => `'${k}'`).join(",\n");
|
|
117
|
-
out += `]
|
|
118
|
-
|
|
119
|
-
`;
|
|
120
|
-
let nameI = 0;
|
|
121
|
-
let themeTypes = `export type ThemeNames =`;
|
|
122
|
-
let exported = `export type Themes = Record<ThemeNames, Theme>
|
|
123
|
-
|
|
124
|
-
export const themes: Themes = {`;
|
|
125
|
-
dedupedThemes.forEach(theme => {
|
|
126
|
-
nameI++;
|
|
127
|
-
const key = JSON.stringify(theme);
|
|
128
|
-
const names = dedupedThemeToNames.get(key);
|
|
129
|
-
const name = `n${nameI}`;
|
|
130
|
-
const baseTheme = `const ${name} = ${objectToJsString(theme, keys, valueToIndex)}`;
|
|
131
|
-
out += `
|
|
132
|
-
${baseTheme}`;
|
|
133
|
-
names.forEach(n => {
|
|
134
|
-
exported += `
|
|
135
|
-
${n}: ${name},`;
|
|
136
|
-
if (n.toLowerCase() === n) {
|
|
137
|
-
themeTypes += `
|
|
138
|
-
| '${n}'`;
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
out += `
|
|
143
|
-
|
|
144
|
-
${themeTypes}
|
|
145
|
-
|
|
146
|
-
${exported}
|
|
147
|
-
}
|
|
148
|
-
`;
|
|
149
|
-
return out;
|
|
150
|
-
}
|
|
151
|
-
function objectToJsString(obj, keys, valueToIndex) {
|
|
152
|
-
let arrItems = [];
|
|
153
|
-
for (const key in obj) {
|
|
154
|
-
const ki = keys.indexOf(key);
|
|
155
|
-
const vi = valueToIndex[obj[key]];
|
|
156
|
-
arrItems.push(`[${ki}, ${vi}]`);
|
|
157
|
-
}
|
|
158
|
-
return `t([${arrItems.join(",")}])`;
|
|
159
|
-
}
|
|
160
|
-
function purgeCache(moduleName) {
|
|
161
|
-
searchCache(moduleName, mod => {
|
|
162
|
-
delete require.cache[mod.id];
|
|
163
|
-
});
|
|
164
|
-
if (!module.constructor || !module.constructor._pathCache) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
Object.keys(module.constructor._pathCache).forEach(cacheKey => {
|
|
168
|
-
if (cacheKey.indexOf(moduleName) > 0) {
|
|
169
|
-
delete module.constructor._pathCache[cacheKey];
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
function searchCache(moduleName, callback) {
|
|
174
|
-
let mod = require.resolve(moduleName);
|
|
175
|
-
if (mod && (mod = require.cache[mod]) !== void 0) {
|
|
176
|
-
;
|
|
177
|
-
(function traverse(mod2, depth = 0) {
|
|
178
|
-
if (depth > 10) return;
|
|
179
|
-
mod2.children.forEach(child => {
|
|
180
|
-
traverse(child, depth + 1);
|
|
181
|
-
});
|
|
182
|
-
callback(mod2);
|
|
183
|
-
})(mod);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var generate_themes_exports = {};
|
|
26
|
-
__export(generate_themes_exports, {
|
|
27
|
-
generateThemes: () => generateThemes
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(generate_themes_exports);
|
|
30
|
-
var import_path = require("path");
|
|
31
|
-
var didRegisterOnce = false;
|
|
32
|
-
async function generateThemes(inputFile) {
|
|
33
|
-
var inputFilePath = inputFile[0] === "." ? (0, import_path.join)(process.cwd(), inputFile) : inputFile;
|
|
34
|
-
if (!didRegisterOnce) {
|
|
35
|
-
didRegisterOnce = true;
|
|
36
|
-
require("esbuild-register/dist/node").register({
|
|
37
|
-
hookIgnoreNodeModules: false
|
|
38
|
-
});
|
|
39
|
-
} else {
|
|
40
|
-
purgeCache(inputFilePath);
|
|
41
|
-
}
|
|
42
|
-
var og = process.env.GUI_KEEP_THEMES;
|
|
43
|
-
process.env.GUI_KEEP_THEMES = "1";
|
|
44
|
-
process.env.GUI_RUN_THEMEBUILDER = "1";
|
|
45
|
-
try {
|
|
46
|
-
var requiredThemes = require(inputFilePath);
|
|
47
|
-
var themes = requiredThemes["default"] || requiredThemes["themes"] || requiredThemes[Object.keys(requiredThemes)[0]];
|
|
48
|
-
var generatedThemes = generatedThemesToTypescript(themes);
|
|
49
|
-
return {
|
|
50
|
-
generated: generatedThemes
|
|
51
|
-
};
|
|
52
|
-
} catch (err) {
|
|
53
|
-
console.warn(` \u26A0\uFE0F Error running theme builder:
|
|
54
|
-
`, (err === null || err === void 0 ? void 0 : err["stack"]) || err);
|
|
55
|
-
} finally {
|
|
56
|
-
process.env.GUI_KEEP_THEMES = og;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
var dedupedTokens = /* @__PURE__ */new Map();
|
|
60
|
-
function generatedThemesToTypescript(themes) {
|
|
61
|
-
var dedupedThemes = /* @__PURE__ */new Map();
|
|
62
|
-
var dedupedThemeToNames = /* @__PURE__ */new Map();
|
|
63
|
-
var i = 0;
|
|
64
|
-
for (var name in themes) {
|
|
65
|
-
i++;
|
|
66
|
-
var theme = themes[name];
|
|
67
|
-
var j = 0;
|
|
68
|
-
var _iteratorNormalCompletion = true,
|
|
69
|
-
_didIteratorError = false,
|
|
70
|
-
_iteratorError = void 0;
|
|
71
|
-
try {
|
|
72
|
-
for (var _iterator = Object.entries(theme)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
73
|
-
var [key, value] = _step.value;
|
|
74
|
-
i++;
|
|
75
|
-
var uniqueKey = `t${i}${j}`;
|
|
76
|
-
if (!dedupedTokens.has(value)) {
|
|
77
|
-
dedupedTokens.set(value, uniqueKey);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
} catch (err) {
|
|
81
|
-
_didIteratorError = true;
|
|
82
|
-
_iteratorError = err;
|
|
83
|
-
} finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
86
|
-
_iterator.return();
|
|
87
|
-
}
|
|
88
|
-
} finally {
|
|
89
|
-
if (_didIteratorError) {
|
|
90
|
-
throw _iteratorError;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
var key1 = JSON.stringify(theme);
|
|
95
|
-
if (dedupedThemes.has(key1)) {
|
|
96
|
-
dedupedThemeToNames.set(key1, [...dedupedThemeToNames.get(key1), name]);
|
|
97
|
-
} else {
|
|
98
|
-
dedupedThemes.set(key1, theme);
|
|
99
|
-
dedupedThemeToNames.set(key1, [name]);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (!themes) {
|
|
103
|
-
throw new Error(`Didn't find any themes exported or returned`);
|
|
104
|
-
}
|
|
105
|
-
var baseKeys = Object.entries(themes.light || themes[Object.keys(themes)[0]]);
|
|
106
|
-
var baseTypeString = `export type Theme = {
|
|
107
|
-
${baseKeys.map(function (param) {
|
|
108
|
-
var [k] = param;
|
|
109
|
-
return ` ${k}: string;
|
|
110
|
-
`;
|
|
111
|
-
}).join("")}
|
|
112
|
-
}`;
|
|
113
|
-
var out = `${baseTypeString}
|
|
114
|
-
`;
|
|
115
|
-
out += `
|
|
116
|
-
function t(a: [number, number][]) {
|
|
117
|
-
let res: Record<string,string> = {}
|
|
118
|
-
for (const [ki, vi] of a) {
|
|
119
|
-
res[ks[ki] as string] = colors[vi] as string
|
|
120
|
-
}
|
|
121
|
-
return res as Theme
|
|
122
|
-
}
|
|
123
|
-
`;
|
|
124
|
-
out += `export const colors = [
|
|
125
|
-
`;
|
|
126
|
-
var index = 0;
|
|
127
|
-
var valueToIndex = {};
|
|
128
|
-
dedupedTokens.forEach(function (name2, value2) {
|
|
129
|
-
valueToIndex[value2] = index;
|
|
130
|
-
index++;
|
|
131
|
-
out += ` '${value2}',
|
|
132
|
-
`;
|
|
133
|
-
});
|
|
134
|
-
out += "]\n\n";
|
|
135
|
-
var keys = baseKeys.map(function (param) {
|
|
136
|
-
var [k] = param;
|
|
137
|
-
return k;
|
|
138
|
-
});
|
|
139
|
-
out += `const ks = [
|
|
140
|
-
`;
|
|
141
|
-
out += keys.map(function (k) {
|
|
142
|
-
return `'${k}'`;
|
|
143
|
-
}).join(",\n");
|
|
144
|
-
out += `]
|
|
145
|
-
|
|
146
|
-
`;
|
|
147
|
-
var nameI = 0;
|
|
148
|
-
var themeTypes = `export type ThemeNames =`;
|
|
149
|
-
var exported = `export type Themes = Record<ThemeNames, Theme>
|
|
150
|
-
|
|
151
|
-
export const themes: Themes = {`;
|
|
152
|
-
dedupedThemes.forEach(function (theme2) {
|
|
153
|
-
nameI++;
|
|
154
|
-
var key2 = JSON.stringify(theme2);
|
|
155
|
-
var names = dedupedThemeToNames.get(key2);
|
|
156
|
-
var name2 = `n${nameI}`;
|
|
157
|
-
var baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;
|
|
158
|
-
out += `
|
|
159
|
-
${baseTheme}`;
|
|
160
|
-
names.forEach(function (n) {
|
|
161
|
-
exported += `
|
|
162
|
-
${n}: ${name2},`;
|
|
163
|
-
if (n.toLowerCase() === n) {
|
|
164
|
-
themeTypes += `
|
|
165
|
-
| '${n}'`;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
out += `
|
|
170
|
-
|
|
171
|
-
${themeTypes}
|
|
172
|
-
|
|
173
|
-
${exported}
|
|
174
|
-
}
|
|
175
|
-
`;
|
|
176
|
-
return out;
|
|
177
|
-
}
|
|
178
|
-
function objectToJsString(obj, keys, valueToIndex) {
|
|
179
|
-
var arrItems = [];
|
|
180
|
-
for (var key in obj) {
|
|
181
|
-
var ki = keys.indexOf(key);
|
|
182
|
-
var vi = valueToIndex[obj[key]];
|
|
183
|
-
arrItems.push(`[${ki}, ${vi}]`);
|
|
184
|
-
}
|
|
185
|
-
return `t([${arrItems.join(",")}])`;
|
|
186
|
-
}
|
|
187
|
-
function purgeCache(moduleName) {
|
|
188
|
-
searchCache(moduleName, function (mod) {
|
|
189
|
-
delete require.cache[mod.id];
|
|
190
|
-
});
|
|
191
|
-
if (!module.constructor || !module.constructor._pathCache) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
Object.keys(module.constructor._pathCache).forEach(function (cacheKey) {
|
|
195
|
-
if (cacheKey.indexOf(moduleName) > 0) {
|
|
196
|
-
delete module.constructor._pathCache[cacheKey];
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
function searchCache(moduleName, callback) {
|
|
201
|
-
var mod = require.resolve(moduleName);
|
|
202
|
-
if (mod && (mod = require.cache[mod]) !== void 0) {
|
|
203
|
-
;
|
|
204
|
-
(function traverse(mod2) {
|
|
205
|
-
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
206
|
-
if (depth > 10) return;
|
|
207
|
-
mod2.children.forEach(function (child) {
|
|
208
|
-
traverse(child, depth + 1);
|
|
209
|
-
});
|
|
210
|
-
callback(mod2);
|
|
211
|
-
})(mod);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
//# sourceMappingURL=generate-themes.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","generate_themes_exports","generateThemes","module","exports","import_path","require","didRegisterOnce","inputFile","inputFilePath","join","process","cwd","register","hookIgnoreNodeModules","purgeCache","og","env","GUI_KEEP_THEMES","GUI_RUN_THEMEBUILDER","requiredThemes","themes","keys","generatedThemes","generatedThemesToTypescript","generated","err","console","warn","dedupedTokens","Map","dedupedThemes","dedupedThemeToNames","i","theme","j","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","entries","Symbol","iterator","_step","next","done","uniqueKey","has","set","return","key1","JSON","stringify","Error","baseKeys","light","baseTypeString","map","param","k","out","index","valueToIndex","forEach","name2","value2","nameI","themeTypes","exported","theme2","key2","names","baseTheme","objectToJsString","n","toLowerCase","obj","arrItems","ki","indexOf","vi","push","moduleName","searchCache","cache","id","constructor","_pathCache","cacheKey","callback","resolve","traverse","mod2","depth","arguments","length","children","child"],"sources":["generate-themes.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar generate_themes_exports = {};\n__export(generate_themes_exports, {\n generateThemes: () => generateThemes\n});\nmodule.exports = __toCommonJS(generate_themes_exports);\nvar import_path = require(\"path\");\nvar didRegisterOnce = false;\nasync function generateThemes(inputFile) {\n var inputFilePath = inputFile[0] === \".\" ? (0, import_path.join)(process.cwd(), inputFile) : inputFile;\n if (!didRegisterOnce) {\n didRegisterOnce = true;\n require(\"esbuild-register/dist/node\").register({\n hookIgnoreNodeModules: false\n });\n } else {\n purgeCache(inputFilePath);\n }\n var og = process.env.GUI_KEEP_THEMES;\n process.env.GUI_KEEP_THEMES = \"1\";\n process.env.GUI_RUN_THEMEBUILDER = \"1\";\n try {\n var requiredThemes = require(inputFilePath);\n var themes = requiredThemes[\"default\"] || requiredThemes[\"themes\"] || requiredThemes[Object.keys(requiredThemes)[0]];\n var generatedThemes = generatedThemesToTypescript(themes);\n return {\n generated: generatedThemes\n };\n } catch (err) {\n console.warn(` \\u26A0\\uFE0F Error running theme builder:\n`, (err === null || err === void 0 ? void 0 : err[\"stack\"]) || err);\n } finally {\n process.env.GUI_KEEP_THEMES = og;\n }\n}\nvar dedupedTokens = /* @__PURE__ */ new Map();\nfunction generatedThemesToTypescript(themes) {\n var dedupedThemes = /* @__PURE__ */ new Map();\n var dedupedThemeToNames = /* @__PURE__ */ new Map();\n var i = 0;\n for (var name in themes) {\n i++;\n var theme = themes[name];\n var j = 0;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(theme)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n i++;\n var uniqueKey = `t${i}${j}`;\n if (!dedupedTokens.has(value)) {\n dedupedTokens.set(value, uniqueKey);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var key1 = JSON.stringify(theme);\n if (dedupedThemes.has(key1)) {\n dedupedThemeToNames.set(key1, [\n ...dedupedThemeToNames.get(key1),\n name\n ]);\n } else {\n dedupedThemes.set(key1, theme);\n dedupedThemeToNames.set(key1, [\n name\n ]);\n }\n }\n if (!themes) {\n throw new Error(`Didn't find any themes exported or returned`);\n }\n var baseKeys = Object.entries(themes.light || themes[Object.keys(themes)[0]]);\n var baseTypeString = `export type Theme = {\n${baseKeys.map(function(param) {\n var [k] = param;\n return ` ${k}: string;\n`;\n }).join(\"\")}\n}`;\n var out = `${baseTypeString}\n`;\n out += `\nfunction t(a: [number, number][]) {\n let res: Record<string,string> = {}\n for (const [ki, vi] of a) {\n res[ks[ki] as string] = colors[vi] as string\n }\n return res as Theme\n}\n`;\n out += `export const colors = [\n`;\n var index = 0;\n var valueToIndex = {};\n dedupedTokens.forEach(function(name2, value2) {\n valueToIndex[value2] = index;\n index++;\n out += ` '${value2}',\n`;\n });\n out += \"]\\n\\n\";\n var keys = baseKeys.map(function(param) {\n var [k] = param;\n return k;\n });\n out += `const ks = [\n`;\n out += keys.map(function(k) {\n return `'${k}'`;\n }).join(\",\\n\");\n out += `]\n\n`;\n var nameI = 0;\n var themeTypes = `export type ThemeNames =`;\n var exported = `export type Themes = Record<ThemeNames, Theme>\n\nexport const themes: Themes = {`;\n dedupedThemes.forEach(function(theme2) {\n nameI++;\n var key2 = JSON.stringify(theme2);\n var names = dedupedThemeToNames.get(key2);\n var name2 = `n${nameI}`;\n var baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;\n out += `\n${baseTheme}`;\n names.forEach(function(n) {\n exported += `\n ${n}: ${name2},`;\n if (n.toLowerCase() === n) {\n themeTypes += `\n | '${n}'`;\n }\n });\n });\n out += `\n\n${themeTypes}\n\n${exported}\n}\n`;\n return out;\n}\nfunction objectToJsString(obj, keys, valueToIndex) {\n var arrItems = [];\n for (var key in obj) {\n var ki = keys.indexOf(key);\n var vi = valueToIndex[obj[key]];\n arrItems.push(`[${ki}, ${vi}]`);\n }\n return `t([${arrItems.join(\",\")}])`;\n}\nfunction purgeCache(moduleName) {\n searchCache(moduleName, function(mod) {\n delete require.cache[mod.id];\n });\n if (!module.constructor || !module.constructor._pathCache) {\n return;\n }\n Object.keys(module.constructor._pathCache).forEach(function(cacheKey) {\n if (cacheKey.indexOf(moduleName) > 0) {\n delete module.constructor._pathCache[cacheKey];\n }\n });\n}\nfunction searchCache(moduleName, callback) {\n var mod = require.resolve(moduleName);\n if (mod && (mod = require.cache[mod]) !== void 0) {\n ;\n (function traverse(mod2) {\n var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n if (depth > 10) return;\n mod2.children.forEach(function(child) {\n traverse(child, depth + 1);\n });\n callback(mod2);\n })(mod);\n }\n}\n//# sourceMappingURL=generate-themes.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;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/dist/cjs/index.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
-
get: () => from[key],
|
|
9
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
18
|
-
var index_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./generate-themes.cjs"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./write-generate-themes.cjs"), module.exports);
|
package/dist/cjs/index.native.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
-
get: () => from[key],
|
|
11
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
20
|
-
var index_exports = {};
|
|
21
|
-
module.exports = __toCommonJS(index_exports);
|
|
22
|
-
__reExport(index_exports, require("./generate-themes.native.js"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./write-generate-themes.native.js"), module.exports);
|
|
24
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./generate-themes\"), module.exports);\n__reExport(index_exports, require(\"./write-generate-themes\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAAC;AAChJ,IAAIE,YAAY,GAAIF,GAAG,IAAKX,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEwB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAII,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACE,aAAa,CAAC;AAC5CN,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,6BAAmB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC;AACvER,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,mCAAyB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var write_generate_themes_exports = {};
|
|
35
|
-
__export(write_generate_themes_exports, {
|
|
36
|
-
writeGeneratedThemes: () => writeGeneratedThemes
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(write_generate_themes_exports);
|
|
39
|
-
var fs = __toESM(require("fs-extra"), 1);
|
|
40
|
-
async function writeGeneratedThemes(hanzoguiDotDir, outPath, generatedOutput) {
|
|
41
|
-
if (!generatedOutput) return;
|
|
42
|
-
const {
|
|
43
|
-
generated
|
|
44
|
-
} = generatedOutput;
|
|
45
|
-
if (process.env.DEBUG === "hanzogui") {
|
|
46
|
-
console.info(`Generated themes:`, JSON.stringify(generatedOutput, null, 2));
|
|
47
|
-
}
|
|
48
|
-
const newContent = `// @ts-nocheck
|
|
49
|
-
` + generated;
|
|
50
|
-
const existingContent = await fs.readFile(outPath, "utf-8").catch(() => null);
|
|
51
|
-
if (existingContent === newContent) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
await fs.writeFile(outPath, newContent);
|
|
55
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all) __defProp(target, name, {
|
|
11
|
-
get: all[name],
|
|
12
|
-
enumerable: true
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
-
get: () => from[key],
|
|
19
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
32
|
-
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
36
|
-
var write_generate_themes_exports = {};
|
|
37
|
-
__export(write_generate_themes_exports, {
|
|
38
|
-
writeGeneratedThemes: () => writeGeneratedThemes
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(write_generate_themes_exports);
|
|
41
|
-
var fs = __toESM(require("fs-extra"), 1);
|
|
42
|
-
async function writeGeneratedThemes(hanzoguiDotDir, outPath, generatedOutput) {
|
|
43
|
-
if (!generatedOutput) return;
|
|
44
|
-
var {
|
|
45
|
-
generated
|
|
46
|
-
} = generatedOutput;
|
|
47
|
-
if (process.env.DEBUG === "hanzogui") {
|
|
48
|
-
console.info(`Generated themes:`, JSON.stringify(generatedOutput, null, 2));
|
|
49
|
-
}
|
|
50
|
-
var newContent = `// @ts-nocheck
|
|
51
|
-
` + generated;
|
|
52
|
-
var existingContent = await fs.readFile(outPath, "utf-8").catch(function () {
|
|
53
|
-
return null;
|
|
54
|
-
});
|
|
55
|
-
if (existingContent === newContent) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
await fs.writeFile(outPath, newContent);
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=write-generate-themes.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","write_generate_themes_exports","writeGeneratedThemes","module","exports","fs","require","hanzoguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","newContent","existingContent","readFile","catch","writeFile"],"sources":["write-generate-themes.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar write_generate_themes_exports = {};\n__export(write_generate_themes_exports, {\n writeGeneratedThemes: () => writeGeneratedThemes\n});\nmodule.exports = __toCommonJS(write_generate_themes_exports);\nvar fs = __toESM(require(\"fs-extra\"), 1);\nasync function writeGeneratedThemes(hanzoguiDotDir, outPath, generatedOutput) {\n if (!generatedOutput) return;\n var { generated } = generatedOutput;\n if (process.env.DEBUG === \"hanzogui\") {\n console.info(`Generated themes:`, JSON.stringify(generatedOutput, null, 2));\n }\n var newContent = `// @ts-nocheck\n` + generated;\n var existingContent = await fs.readFile(outPath, \"utf-8\").catch(function() {\n return null;\n });\n if (existingContent === newContent) {\n return;\n }\n await fs.writeFile(outPath, newContent);\n}\n//# sourceMappingURL=write-generate-themes.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,GAAGR,MAAM,CAACS,cAAc;AACxC,IAAIC,YAAY,GAAGV,MAAM,CAACW,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBb,SAAS,CAACY,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD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