@tamagui/generate-themes 1.135.4-1761749240853 → 1.135.4

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.
@@ -1,65 +1,49 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
16
  var generate_themes_exports = {};
24
17
  __export(generate_themes_exports, {
25
18
  generateThemes: () => generateThemes
26
19
  });
27
20
  module.exports = __toCommonJS(generate_themes_exports);
28
- var import_path = require("path"),
29
- didRegisterOnce = !1;
21
+ var import_node_path = require("node:path"), didRegisterOnce = !1;
30
22
  async function generateThemes(inputFile) {
31
- var inputFilePath = inputFile[0] === "." ? (0, import_path.join)(process.cwd(), inputFile) : inputFile;
23
+ var inputFilePath = inputFile[0] === "." ? (0, import_node_path.join)(process.cwd(), inputFile) : inputFile;
32
24
  didRegisterOnce ? purgeCache(inputFilePath) : (didRegisterOnce = !0, require("esbuild-register/dist/node").register({
33
25
  hookIgnoreNodeModules: !1
34
26
  }));
35
27
  var og = process.env.TAMAGUI_KEEP_THEMES;
36
28
  process.env.TAMAGUI_KEEP_THEMES = "1", process.env.TAMAGUI_RUN_THEMEBUILDER = "1";
37
29
  try {
38
- var requiredThemes = require(inputFilePath),
39
- themes = requiredThemes.default || requiredThemes.themes || requiredThemes[Object.keys(requiredThemes)[0]],
40
- generatedThemes = generatedThemesToTypescript(themes);
30
+ var requiredThemes = require(inputFilePath), themes = requiredThemes.default || requiredThemes.themes || requiredThemes[Object.keys(requiredThemes)[0]], generatedThemes = generatedThemesToTypescript(themes);
41
31
  return {
42
32
  generated: generatedThemes
43
33
  };
44
34
  } catch (err) {
45
35
  console.warn(` \u26A0\uFE0F Error running theme builder:
46
- `, err?.stack || err);
36
+ `, (err == null ? void 0 : err.stack) || err);
47
37
  } finally {
48
38
  process.env.TAMAGUI_KEEP_THEMES = og;
49
39
  }
50
40
  }
51
- var dedupedTokens = /* @__PURE__ */new Map();
41
+ var dedupedTokens = /* @__PURE__ */ new Map();
52
42
  function generatedThemesToTypescript(themes) {
53
- var dedupedThemes = /* @__PURE__ */new Map(),
54
- dedupedThemeToNames = /* @__PURE__ */new Map(),
55
- i = 0;
43
+ var dedupedThemes = /* @__PURE__ */ new Map(), dedupedThemeToNames = /* @__PURE__ */ new Map(), i = 0;
56
44
  for (var name in themes) {
57
45
  i++;
58
- var theme = themes[name],
59
- j = 0,
60
- _iteratorNormalCompletion = !0,
61
- _didIteratorError = !1,
62
- _iteratorError = void 0;
46
+ var theme = themes[name], j = 0, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
63
47
  try {
64
48
  for (var _iterator = Object.entries(theme)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
65
49
  var [key, value] = _step.value;
@@ -73,22 +57,27 @@ function generatedThemesToTypescript(themes) {
73
57
  try {
74
58
  !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
75
59
  } finally {
76
- if (_didIteratorError) throw _iteratorError;
60
+ if (_didIteratorError)
61
+ throw _iteratorError;
77
62
  }
78
63
  }
79
64
  var key1 = JSON.stringify(theme);
80
- dedupedThemes.has(key1) ? dedupedThemeToNames.set(key1, [...dedupedThemeToNames.get(key1), name]) : (dedupedThemes.set(key1, theme), dedupedThemeToNames.set(key1, [name]));
65
+ dedupedThemes.has(key1) ? dedupedThemeToNames.set(key1, [
66
+ ...dedupedThemeToNames.get(key1),
67
+ name
68
+ ]) : (dedupedThemes.set(key1, theme), dedupedThemeToNames.set(key1, [
69
+ name
70
+ ]));
81
71
  }
82
- if (!themes) throw new Error("Didn't find any themes exported or returned");
83
- var baseKeys = Object.entries(themes.light || themes[Object.keys(themes)[0]]),
84
- baseTypeString = `type Theme = {
85
- ${baseKeys.map(function (param) {
86
- var [k] = param;
87
- return ` ${k}: string;
72
+ if (!themes)
73
+ throw new Error("Didn't find any themes exported or returned");
74
+ var baseKeys = Object.entries(themes.light || themes[Object.keys(themes)[0]]), baseTypeString = `type Theme = {
75
+ ${baseKeys.map(function(param) {
76
+ var [k] = param;
77
+ return ` ${k}: string;
88
78
  `;
89
- }).join("")}
90
- }`,
91
- out = `${baseTypeString}
79
+ }).join("")}
80
+ }`, out = `${baseTypeString}
92
81
  `;
93
82
  out += `
94
83
  function t(a: [number, number][]) {
@@ -100,36 +89,30 @@ function t(a: [number, number][]) {
100
89
  }
101
90
  `, out += `export const colors = [
102
91
  `;
103
- var index = 0,
104
- valueToIndex = {};
105
- dedupedTokens.forEach(function (name2, value2) {
92
+ var index = 0, valueToIndex = {};
93
+ dedupedTokens.forEach(function(name2, value2) {
106
94
  valueToIndex[value2] = index, index++, out += ` '${value2}',
107
95
  `;
108
96
  }), out += `]
109
97
 
110
98
  `;
111
- var keys = baseKeys.map(function (param) {
99
+ var keys = baseKeys.map(function(param) {
112
100
  var [k] = param;
113
101
  return k;
114
102
  });
115
103
  out += `const ks = [
116
- `, out += keys.map(function (k) {
104
+ `, out += keys.map(function(k) {
117
105
  return `'${k}'`;
118
106
  }).join(`,
119
107
  `), out += `]
120
108
 
121
109
  `;
122
- var nameI = 0,
123
- themeTypes = "type ThemeNames =",
124
- exported = "export const themes: Record<ThemeNames, Theme> = {";
125
- return dedupedThemes.forEach(function (theme2) {
110
+ var nameI = 0, themeTypes = "type ThemeNames =", exported = "export const themes: Record<ThemeNames, Theme> = {";
111
+ return dedupedThemes.forEach(function(theme2) {
126
112
  nameI++;
127
- var key2 = JSON.stringify(theme2),
128
- names = dedupedThemeToNames.get(key2),
129
- name2 = `n${nameI}`,
130
- baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;
113
+ var key2 = JSON.stringify(theme2), names = dedupedThemeToNames.get(key2), name2 = `n${nameI}`, baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;
131
114
  out += `
132
- ${baseTheme}`, names.forEach(function (n) {
115
+ ${baseTheme}`, names.forEach(function(n) {
133
116
  exported += `
134
117
  ${n}: ${name2},`, n.toLowerCase() === n && (themeTypes += `
135
118
  | '${n}'`);
@@ -145,16 +128,15 @@ ${exported}
145
128
  function objectToJsString(obj, keys, valueToIndex) {
146
129
  var arrItems = [];
147
130
  for (var key in obj) {
148
- var ki = keys.indexOf(key),
149
- vi = valueToIndex[obj[key]];
131
+ var ki = keys.indexOf(key), vi = valueToIndex[obj[key]];
150
132
  arrItems.push(`[${ki}, ${vi}]`);
151
133
  }
152
134
  return `t([${arrItems.join(",")}])`;
153
135
  }
154
136
  function purgeCache(moduleName) {
155
- searchCache(moduleName, function (mod) {
137
+ searchCache(moduleName, function(mod) {
156
138
  delete require.cache[mod.id];
157
- }), !(!module.constructor || !module.constructor._pathCache) && Object.keys(module.constructor._pathCache).forEach(function (cacheKey) {
139
+ }), !(!module.constructor || !module.constructor._pathCache) && Object.keys(module.constructor._pathCache).forEach(function(cacheKey) {
158
140
  cacheKey.indexOf(moduleName) > 0 && delete module.constructor._pathCache[cacheKey];
159
141
  });
160
142
  }
@@ -162,9 +144,13 @@ function searchCache(moduleName, callback) {
162
144
  var mod = require.resolve(moduleName);
163
145
  mod && (mod = require.cache[mod]) !== void 0 && function traverse(mod2) {
164
146
  var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
165
- depth > 10 || (mod2.children.forEach(function (child) {
147
+ depth > 10 || (mod2.children.forEach(function(child) {
166
148
  traverse(child, depth + 1);
167
149
  }), callback(mod2));
168
150
  }(mod);
169
151
  }
170
- //# sourceMappingURL=generate-themes.native.js.map
152
+ // Annotate the CommonJS export names for ESM import in node:
153
+ 0 && (module.exports = {
154
+ generateThemes
155
+ });
156
+ //# sourceMappingURL=generate-themes.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","generate_themes_exports","__export","generateThemes","module","exports","import_path","require","didRegisterOnce","inputFile","inputFilePath","join","process","cwd","purgeCache","register","hookIgnoreNodeModules","og","env","TAMAGUI_KEEP_THEMES","TAMAGUI_RUN_THEMEBUILDER","requiredThemes","themes","default","Object","keys","generatedThemes","generatedThemesToTypescript","generated","err","console","warn","stack","dedupedTokens","Map","dedupedThemes","dedupedThemeToNames","i","name","theme","j","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","entries","Symbol","iterator","_step","next","done","key","uniqueKey","has","set","return","key1","JSON","stringify","get","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"],"sources":["../../src/generate-themes.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAA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,WAAW,CAAC;AAChB,WAAQ,OAAO,KAAI;AACf,QAAI,KAAK,KAAK,QAAQ,GAAG,GACrB,KAAK,aAAa,IAAI,GAAG,CAAC;AAC9B,aAAS,KAAK,IAAI,EAAE,KAAK,EAAE,GAAG;AAAA,EAClC;AACA,SAAO,MAAM,SAAS,KAAK,GAAG,CAAC;AACnC;AAGI,SAAS,WAAW,YAAY;AAOhC,EAJA,YAAY,YAAY,SAAS,KAAK;AAClC,WAAO,QAAQ,MAAM,IAAI,EAAE;AAAA,EAC/B,CAAC,GAEG,GAAC,OAAO,eAAe,CAAC,OAAO,YAAY,eAO/C,OAAO,KAAK,OAAO,YAAY,UAAU,EAAE,QAAQ,SAAS,UAAU;AAClE,IAAI,SAAS,QAAQ,UAAU,IAAI,KAE/B,OAAO,OAAO,YAAY,WAAW,QAAQ;AAAA,EAErD,CAAC;AACL;AAII,SAAS,YAAY,YAAY,UAAU;AAE3C,MAAI,MAAM,QAAQ,QAAQ,UAAU;AAIpC,EAAI,QAAQ,MAAM,QAAQ,MAAM,GAAG,OAAO,UAGrC,SAAS,SAASI,MAAK;AACpB,QAAI,QAAQ,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI;AAE7E,IAAI,QAAQ,OAIZA,KAAI,SAAS,QAAQ,SAAS,OAAO;AACjC,eAAS,OAAO,QAAQ,CAAC;AAAA,IAC7B,CAAC,GAGD,SAASA,IAAG;AAAA,EAChB,EAAG,GAAG;AAEd;",
5
+ "names": ["name", "value", "theme", "key", "mod"]
6
+ }
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
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);
18
13
  var index_exports = {};
19
14
  module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./generate-themes.native.js"), module.exports);
21
- __reExport(index_exports, require("./write-generate-themes.native.js"), module.exports);
22
- //# sourceMappingURL=index.native.js.map
15
+ __reExport(index_exports, require("./generate-themes"), module.exports);
16
+ __reExport(index_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
+ });
22
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MADd,CAAAC,OAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,oCADd;",
5
+ "names": []
6
+ }
@@ -34,7 +34,7 @@ __export(write_generate_themes_exports, {
34
34
  writeGeneratedThemes: () => writeGeneratedThemes
35
35
  });
36
36
  module.exports = __toCommonJS(write_generate_themes_exports);
37
- var fs = __toESM(require("fs-extra"), 1);
37
+ var fs = __toESM(require("fs-extra"));
38
38
  async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
39
39
  if (!generatedOutput) return;
40
40
  const {
@@ -25,7 +25,7 @@ __export(write_generate_themes_exports, {
25
25
  writeGeneratedThemes: () => writeGeneratedThemes
26
26
  });
27
27
  module.exports = __toCommonJS(write_generate_themes_exports);
28
- var fs = __toESM(require("fs-extra"), 1);
28
+ var fs = __toESM(require("fs-extra"));
29
29
  async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
30
30
  if (!generatedOutput) return;
31
31
  const { generated } = generatedOutput;
@@ -1,49 +1,43 @@
1
1
  "use strict";
2
-
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
9
7
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
- get: () => from[key],
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
20
- return to;
21
- };
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
+ };
22
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
17
  // If the importer is in node compatibility mode or this is not an ESM
24
18
  // file that has been converted to a CommonJS file using a Babel-
25
19
  // compatible transform (i.e. "__esModule" has not been set), then set
26
20
  // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
34
24
  var write_generate_themes_exports = {};
35
25
  __export(write_generate_themes_exports, {
36
26
  writeGeneratedThemes: () => writeGeneratedThemes
37
27
  });
38
28
  module.exports = __toCommonJS(write_generate_themes_exports);
39
- var fs = __toESM(require("fs-extra"), 1);
29
+ var fs = __toESM(require("fs-extra"));
40
30
  async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
41
31
  if (generatedOutput) {
42
- var {
43
- generated
44
- } = generatedOutput;
45
- process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2)), await Promise.all([fs.writeFile(outPath, `// @ts-nocheck
46
- ` + generated)]);
32
+ var { generated } = generatedOutput;
33
+ process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2)), await Promise.all([
34
+ fs.writeFile(outPath, `// @ts-nocheck
35
+ ` + generated)
36
+ ]);
47
37
  }
48
38
  }
49
- //# sourceMappingURL=write-generate-themes.native.js.map
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ writeGeneratedThemes
42
+ });
43
+ //# sourceMappingURL=write-generate-themes.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","write_generate_themes_exports","__export","writeGeneratedThemes","module","exports","fs","__toESM","require","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","Promise","all","writeFile"],"sources":["../../src/write-generate-themes.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAoB,GAAAT,YAAA,CAAAK,6BAAA;AAIpB,IAAAK,EAAA,GAAAC,OAAsB,CAAAC,OAAA,YACpB;AAIA,eAAKL,oBAAiBA,CAAAM,aAAA,EAAAC,OAAA,EAAAC,eAAA;EAEtB,IAAAA,eAAkB;IAEd;MAAQC;IAAI,IAAUD,eACxB;IAG4DE,OAAA,CAAAC,GAAW,CAAAC,KAAA,kBAAAC,OAAA,CAAAC,IAAA,sBAAAC,IAAA,CAAAC,SAAA,CAAAR,eAAA,mBAAAS,OAAA,CAAAC,GAAA,EAC3Ef,EAAA,CAAAgB,SAAA,CAAAZ,OAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/write-generate-themes.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,eAAsB,qBAAqB,eAAe,SAAS,iBAAiB;AAChF,MAAK,iBACL;AAAA,QAAI,EAAE,UAAU,IAAI;AACpB,IAAI,QAAQ,IAAI,UAAU,aACtB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC,GAE9E,MAAM,QAAQ,IAAI;AAAA,MACd,GAAG,UAAU,SAAS;AAAA,IAAqB,SAAS;AAAA,IACxD,CAAC;AAAA;AACL;",
5
+ "names": []
6
+ }
@@ -1,4 +1,4 @@
1
- import { join } from "path";
1
+ import { join } from "node:path";
2
2
  var didRegisterOnce = !1;
3
3
  async function generateThemes(inputFile) {
4
4
  var inputFilePath = inputFile[0] === "." ? join(process.cwd(), inputFile) : inputFile;
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/generate-themes",
3
- "version": "1.135.4-1761749240853",
4
- "type": "module",
3
+ "version": "1.135.4",
5
4
  "source": "src/index.ts",
6
5
  "types": "./types/index.d.ts",
7
6
  "main": "dist/cjs",
@@ -34,13 +33,13 @@
34
33
  "clean:build": "tamagui-build clean:build"
35
34
  },
36
35
  "dependencies": {
37
- "@tamagui/create-theme": "1.135.4-1761749240853",
38
- "@tamagui/theme-builder": "1.135.4-1761749240853",
39
- "@tamagui/types": "1.135.4-1761749240853",
36
+ "@tamagui/create-theme": "1.135.4",
37
+ "@tamagui/theme-builder": "1.135.4",
38
+ "@tamagui/types": "1.135.4",
40
39
  "esbuild-register": "^3.6.0",
41
40
  "fs-extra": "^11.2.0"
42
41
  },
43
42
  "devDependencies": {
44
- "@tamagui/build": "1.135.4-1761749240853"
43
+ "@tamagui/build": "1.135.4"
45
44
  }
46
45
  }