@tamagui/generate-themes 1.88.22 → 1.88.23
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/esm/generate-themes.native.js +8 -36
- package/dist/esm/generate-themes.native.js.map +2 -2
- package/dist/esm/index.native.js +2 -21
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/write-generate-themes.native.js +5 -33
- package/dist/esm/write-generate-themes.native.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,40 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var generate_themes_exports = {};
|
|
25
|
-
__export(generate_themes_exports, {
|
|
26
|
-
generateThemes: () => generateThemes
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(generate_themes_exports);
|
|
29
|
-
var import_module = __toESM(require("module")), import_path = require("path");
|
|
30
|
-
const ogRequire = import_module.default.prototype.require;
|
|
1
|
+
import Module from "module";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
const ogRequire = Module.prototype.require;
|
|
31
4
|
async function generateThemes(inputFile) {
|
|
32
5
|
const { unregister } = require("esbuild-register/dist/node").register({
|
|
33
6
|
hookIgnoreNodeModules: !1
|
|
34
|
-
}), inputFilePath = inputFile[0] === "." ?
|
|
7
|
+
}), inputFilePath = inputFile[0] === "." ? join(process.cwd(), inputFile) : inputFile;
|
|
35
8
|
purgeCache(inputFilePath);
|
|
36
9
|
let promise = null;
|
|
37
|
-
|
|
10
|
+
Module.prototype.require = function(id) {
|
|
38
11
|
const out = ogRequire.apply(this, arguments);
|
|
39
12
|
if (id === "@tamagui/theme-builder" && !promise) {
|
|
40
13
|
let resolve;
|
|
@@ -69,7 +42,7 @@ async function generateThemes(inputFile) {
|
|
|
69
42
|
} catch (err) {
|
|
70
43
|
console.warn(` \u26A0\uFE0F Error running theme builder: ${err}`, err == null ? void 0 : err.stack);
|
|
71
44
|
} finally {
|
|
72
|
-
|
|
45
|
+
Module.prototype.require = ogRequire, unregister();
|
|
73
46
|
}
|
|
74
47
|
}
|
|
75
48
|
const dedupedTokens = /* @__PURE__ */ new Map();
|
|
@@ -177,8 +150,7 @@ function searchCache(moduleName, callback) {
|
|
|
177
150
|
}), callback(mod2));
|
|
178
151
|
}(mod);
|
|
179
152
|
}
|
|
180
|
-
|
|
181
|
-
0 && (module.exports = {
|
|
153
|
+
export {
|
|
182
154
|
generateThemes
|
|
183
|
-
}
|
|
155
|
+
};
|
|
184
156
|
//# sourceMappingURL=generate-themes.js.map
|
|
@@ -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;AAAA,EACF,CAAC;AACH;AAEA,SAAS,sBACP,cACA,2BACA;AACA,SAAO,IAAI,MAAM,cAAc;AAAA,IAC7B,IAAI,QAAQ,KAAK;AACf,YAAM,MAAM,QAAQ,IAAI,QAAQ,GAAG;AACnC,aAAI,QAAQ,WAEV,0BAA0B,WAAW;AAAA,QACnC;AAAA,MACF,CAAC,GAEI;AAAA,IACT;AAAA,EACF,CAAC;AACH;AAKA,SAAS,WAAW,YAAY;AAG9B,cAAY,YAAY,SAAU,KAAK;AACrC,WAAO,QAAQ,MAAM,IAAI,EAAE;AAAA,EAC7B,CAAC,GAKD,OAAO,KAAK,OAAO,YAAY,UAAU,EAAE,QAAQ,SAAU,UAAU;AACrE,IAAI,SAAS,QAAQ,UAAU,IAAI,KAEjC,OAAO,OAAO,YAAY,WAAW,QAAQ;AAAA,EAEjD,CAAC;AACH;AAMA,SAAS,YAAY,YAAY,UAAU;AAEzC,MAAI,MAAM,QAAQ,QAAQ,UAAU;AAKpC,EAAI,QAAQ,MAAM,QAAQ,MAAM,GAAG,OAAO,UAEtC,SAAS,SAASC,MAAK,QAAQ,GAAG;AAElC,IAAI,QAAQ,OAKZA,KAAI,SAAS,QAAQ,SAAU,OAAO;AACpC,eAAS,OAAO,QAAQ,CAAC;AAAA,IAC3B,CAAC,GAID,SAASA,IAAG;AAAA,EACd,EAAG,GAAG;AAEV;",
|
|
5
|
+
"names": ["key", "target", "mod"]
|
|
6
6
|
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./generate-themes"), module.exports);
|
|
16
|
-
__reExport(src_exports, require("./write-generate-themes"), module.exports);
|
|
17
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
18
|
-
0 && (module.exports = {
|
|
19
|
-
...require("./generate-themes"),
|
|
20
|
-
...require("./write-generate-themes")
|
|
21
|
-
});
|
|
1
|
+
export * from "./generate-themes";
|
|
2
|
+
export * from "./write-generate-themes";
|
|
22
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,43 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var write_generate_themes_exports = {};
|
|
25
|
-
__export(write_generate_themes_exports, {
|
|
26
|
-
writeGeneratedThemes: () => writeGeneratedThemes
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(write_generate_themes_exports);
|
|
29
|
-
var import_path = require("path"), fs = __toESM(require("fs-extra"));
|
|
1
|
+
import { join } from "path";
|
|
2
|
+
import * as fs from "fs-extra";
|
|
30
3
|
async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
31
4
|
if (!generatedOutput)
|
|
32
5
|
return;
|
|
33
|
-
const { generated, state } = generatedOutput, tamaguiDotDirExists = await fs.pathExists(tamaguiDotDir), themeBuilderStatePath =
|
|
6
|
+
const { generated, state } = generatedOutput, tamaguiDotDirExists = await fs.pathExists(tamaguiDotDir), themeBuilderStatePath = join(tamaguiDotDir, "theme-builder.json");
|
|
34
7
|
process.env.DEBUG === "tamagui" && (console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2)), console.info("Writing themes to", { outPath, themeBuilderStatePath })), await Promise.all([
|
|
35
8
|
fs.writeFile(outPath, generated),
|
|
36
9
|
state && tamaguiDotDirExists ? fs.writeFile(themeBuilderStatePath, JSON.stringify(state)) : null
|
|
37
10
|
]);
|
|
38
11
|
}
|
|
39
|
-
|
|
40
|
-
0 && (module.exports = {
|
|
12
|
+
export {
|
|
41
13
|
writeGeneratedThemes
|
|
42
|
-
}
|
|
14
|
+
};
|
|
43
15
|
//# sourceMappingURL=write-generate-themes.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/write-generate-themes.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,YAAY;AAErB,YAAY,QAAQ;AAIpB,eAAsB,qBACpB,eACA,SACA,iBACA;AACA,MAAI,CAAC;AAAiB;AAEtB,QAAM,EAAE,WAAW,MAAM,IAAI,iBAEvB,sBAAsB,MAAM,GAAG,WAAW,aAAa,GACvD,wBAAwB,KAAK,eAAe,oBAAoB;AAEtE,EAAI,QAAQ,IAAI,UAAU,cACxB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC,GAC1E,QAAQ,KAAK,qBAAqB,EAAE,SAAS,sBAAsB,CAAC,IAGtE,MAAM,QAAQ,IAAI;AAAA,IAChB,GAAG,UAAU,SAAS,SAAS;AAAA,IAC/B,SAAS,sBACL,GAAG,UAAU,uBAAuB,KAAK,UAAU,KAAK,CAAC,IACzD;AAAA,EACN,CAAC;AACH;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/generate-themes",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"clean:build": "tamagui-build clean:build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tamagui/create-theme": "1.88.
|
|
33
|
-
"@tamagui/types": "1.88.
|
|
32
|
+
"@tamagui/create-theme": "1.88.23",
|
|
33
|
+
"@tamagui/types": "1.88.23",
|
|
34
34
|
"esbuild-register": "^3.4.2",
|
|
35
35
|
"fs-extra": "^11.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@tamagui/build": "1.88.
|
|
38
|
+
"@tamagui/build": "1.88.23"
|
|
39
39
|
}
|
|
40
40
|
}
|