@tamagui/generate-themes 1.135.3 → 1.135.4-1761748186554

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,49 +1,65 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  var __export = (target, all) => {
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);
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);
16
23
  var generate_themes_exports = {};
17
24
  __export(generate_themes_exports, {
18
25
  generateThemes: () => generateThemes
19
26
  });
20
27
  module.exports = __toCommonJS(generate_themes_exports);
21
- var import_node_path = require("node:path"), didRegisterOnce = !1;
28
+ var import_path = require("path"),
29
+ didRegisterOnce = !1;
22
30
  async function generateThemes(inputFile) {
23
- var inputFilePath = inputFile[0] === "." ? (0, import_node_path.join)(process.cwd(), inputFile) : inputFile;
31
+ var inputFilePath = inputFile[0] === "." ? (0, import_path.join)(process.cwd(), inputFile) : inputFile;
24
32
  didRegisterOnce ? purgeCache(inputFilePath) : (didRegisterOnce = !0, require("esbuild-register/dist/node").register({
25
33
  hookIgnoreNodeModules: !1
26
34
  }));
27
35
  var og = process.env.TAMAGUI_KEEP_THEMES;
28
36
  process.env.TAMAGUI_KEEP_THEMES = "1", process.env.TAMAGUI_RUN_THEMEBUILDER = "1";
29
37
  try {
30
- var requiredThemes = require(inputFilePath), themes = requiredThemes.default || requiredThemes.themes || requiredThemes[Object.keys(requiredThemes)[0]], generatedThemes = generatedThemesToTypescript(themes);
38
+ var requiredThemes = require(inputFilePath),
39
+ themes = requiredThemes.default || requiredThemes.themes || requiredThemes[Object.keys(requiredThemes)[0]],
40
+ generatedThemes = generatedThemesToTypescript(themes);
31
41
  return {
32
42
  generated: generatedThemes
33
43
  };
34
44
  } catch (err) {
35
45
  console.warn(` \u26A0\uFE0F Error running theme builder:
36
- `, (err == null ? void 0 : err.stack) || err);
46
+ `, err?.stack || err);
37
47
  } finally {
38
48
  process.env.TAMAGUI_KEEP_THEMES = og;
39
49
  }
40
50
  }
41
- var dedupedTokens = /* @__PURE__ */ new Map();
51
+ var dedupedTokens = /* @__PURE__ */new Map();
42
52
  function generatedThemesToTypescript(themes) {
43
- var dedupedThemes = /* @__PURE__ */ new Map(), dedupedThemeToNames = /* @__PURE__ */ new Map(), i = 0;
53
+ var dedupedThemes = /* @__PURE__ */new Map(),
54
+ dedupedThemeToNames = /* @__PURE__ */new Map(),
55
+ i = 0;
44
56
  for (var name in themes) {
45
57
  i++;
46
- var theme = themes[name], j = 0, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
58
+ var theme = themes[name],
59
+ j = 0,
60
+ _iteratorNormalCompletion = !0,
61
+ _didIteratorError = !1,
62
+ _iteratorError = void 0;
47
63
  try {
48
64
  for (var _iterator = Object.entries(theme)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
49
65
  var [key, value] = _step.value;
@@ -57,27 +73,22 @@ function generatedThemesToTypescript(themes) {
57
73
  try {
58
74
  !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
59
75
  } finally {
60
- if (_didIteratorError)
61
- throw _iteratorError;
76
+ if (_didIteratorError) throw _iteratorError;
62
77
  }
63
78
  }
64
79
  var key1 = JSON.stringify(theme);
65
- dedupedThemes.has(key1) ? dedupedThemeToNames.set(key1, [
66
- ...dedupedThemeToNames.get(key1),
67
- name
68
- ]) : (dedupedThemes.set(key1, theme), dedupedThemeToNames.set(key1, [
69
- name
70
- ]));
80
+ dedupedThemes.has(key1) ? dedupedThemeToNames.set(key1, [...dedupedThemeToNames.get(key1), name]) : (dedupedThemes.set(key1, theme), dedupedThemeToNames.set(key1, [name]));
71
81
  }
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;
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;
78
88
  `;
79
- }).join("")}
80
- }`, out = `${baseTypeString}
89
+ }).join("")}
90
+ }`,
91
+ out = `${baseTypeString}
81
92
  `;
82
93
  out += `
83
94
  function t(a: [number, number][]) {
@@ -89,30 +100,36 @@ function t(a: [number, number][]) {
89
100
  }
90
101
  `, out += `export const colors = [
91
102
  `;
92
- var index = 0, valueToIndex = {};
93
- dedupedTokens.forEach(function(name2, value2) {
103
+ var index = 0,
104
+ valueToIndex = {};
105
+ dedupedTokens.forEach(function (name2, value2) {
94
106
  valueToIndex[value2] = index, index++, out += ` '${value2}',
95
107
  `;
96
108
  }), out += `]
97
109
 
98
110
  `;
99
- var keys = baseKeys.map(function(param) {
111
+ var keys = baseKeys.map(function (param) {
100
112
  var [k] = param;
101
113
  return k;
102
114
  });
103
115
  out += `const ks = [
104
- `, out += keys.map(function(k) {
116
+ `, out += keys.map(function (k) {
105
117
  return `'${k}'`;
106
118
  }).join(`,
107
119
  `), out += `]
108
120
 
109
121
  `;
110
- var nameI = 0, themeTypes = "type ThemeNames =", exported = "export const themes: Record<ThemeNames, Theme> = {";
111
- return dedupedThemes.forEach(function(theme2) {
122
+ var nameI = 0,
123
+ themeTypes = "type ThemeNames =",
124
+ exported = "export const themes: Record<ThemeNames, Theme> = {";
125
+ return dedupedThemes.forEach(function (theme2) {
112
126
  nameI++;
113
- var key2 = JSON.stringify(theme2), names = dedupedThemeToNames.get(key2), name2 = `n${nameI}`, baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;
127
+ var key2 = JSON.stringify(theme2),
128
+ names = dedupedThemeToNames.get(key2),
129
+ name2 = `n${nameI}`,
130
+ baseTheme = `const ${name2} = ${objectToJsString(theme2, keys, valueToIndex)}`;
114
131
  out += `
115
- ${baseTheme}`, names.forEach(function(n) {
132
+ ${baseTheme}`, names.forEach(function (n) {
116
133
  exported += `
117
134
  ${n}: ${name2},`, n.toLowerCase() === n && (themeTypes += `
118
135
  | '${n}'`);
@@ -128,15 +145,16 @@ ${exported}
128
145
  function objectToJsString(obj, keys, valueToIndex) {
129
146
  var arrItems = [];
130
147
  for (var key in obj) {
131
- var ki = keys.indexOf(key), vi = valueToIndex[obj[key]];
148
+ var ki = keys.indexOf(key),
149
+ vi = valueToIndex[obj[key]];
132
150
  arrItems.push(`[${ki}, ${vi}]`);
133
151
  }
134
152
  return `t([${arrItems.join(",")}])`;
135
153
  }
136
154
  function purgeCache(moduleName) {
137
- searchCache(moduleName, function(mod) {
155
+ searchCache(moduleName, function (mod) {
138
156
  delete require.cache[mod.id];
139
- }), !(!module.constructor || !module.constructor._pathCache) && Object.keys(module.constructor._pathCache).forEach(function(cacheKey) {
157
+ }), !(!module.constructor || !module.constructor._pathCache) && Object.keys(module.constructor._pathCache).forEach(function (cacheKey) {
140
158
  cacheKey.indexOf(moduleName) > 0 && delete module.constructor._pathCache[cacheKey];
141
159
  });
142
160
  }
@@ -144,13 +162,9 @@ function searchCache(moduleName, callback) {
144
162
  var mod = require.resolve(moduleName);
145
163
  mod && (mod = require.cache[mod]) !== void 0 && function traverse(mod2) {
146
164
  var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
147
- depth > 10 || (mod2.children.forEach(function(child) {
165
+ depth > 10 || (mod2.children.forEach(function (child) {
148
166
  traverse(child, depth + 1);
149
167
  }), callback(mod2));
150
168
  }(mod);
151
169
  }
152
- // Annotate the CommonJS export names for ESM import in node:
153
- 0 && (module.exports = {
154
- generateThemes
155
- });
156
- //# sourceMappingURL=generate-themes.js.map
170
+ //# sourceMappingURL=generate-themes.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/generate-themes.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB,sBACjB,kBAAkB;AACtB,eAAsB,eAAe,WAAW;AAC5C,MAAI,gBAAgB,UAAU,CAAC,MAAM,UAAM,uBAAK,QAAQ,IAAI,GAAG,SAAS,IAAI;AAC5E,EAAK,kBAOD,WAAW,aAAa,KANxB,kBAAkB,IAElB,QAAQ,4BAA4B,EAAE,SAAS;AAAA,IAC3C,uBAAuB;AAAA,EAC3B,CAAC;AAIL,MAAI,KAAK,QAAQ,IAAI;AACrB,UAAQ,IAAI,sBAAsB,KAClC,QAAQ,IAAI,2BAA2B;AACvC,MAAI;AACA,QAAI,iBAAiB,QAAQ,aAAa,GACtC,SAAS,eAAe,WAAc,eAAe,UAAa,eAAe,OAAO,KAAK,cAAc,EAAE,CAAC,CAAC,GAC/G,kBAAkB,4BAA4B,MAAM;AACxD,WAAO;A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,EACL,CAAC,GACD,OAAO;AAAA;AAAA,EAAO,UAAU;AAAA;AAAA,EAAO,QAAQ;AAAA;AAAA,GAChC;AACX;AACA,SAAS,iBAAiB,KAAK,MAAM,cAAc;AAC/C,MAAI,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
+ {"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,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,uBAAA;AAMrB,IAAIK,WAAA,GAAAC,OAAkB;EAAAC,eAAA;AAEtB,eAAsBL,eAAeM,SAAA,EAAmB;EACtD,IAAAC,aAAM,GAAAD,SAAgB,GAAU,KAAC,GAAM,OAAAH,WAAM,CAAAK,IAAA,EAAAC,OAAK,CAAAC,GAAA,IAAQJ,SAAO,IAAAA,SAAa;EAEzED,eAAA,GAOHM,UAAA,CAAWJ,aAAa,KANxBF,eAAA,GAAkB,IAElBD,OAAA,CAAQ,4BAA4B,EAAEQ,QAAA,CAAS;IAC7CC,qBAAA,EAAuB;EACzB,CAAC;EAKH,IAAIC,EAAA,GAAKL,OAAA,CAAQM,GAAA,CAAIC,mBAAA;EACrBP,OAAA,CAAQM,GAAA,CAAIC,mBAAA,GAAsB,KAClCP,OAAA,CAAQM,GAAA,CAAIE,wBAAA,GAA2B;EAEvC,IAAI;IACF,IAAAC,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IAAA,KAAAC,CAAA,IAAAD,KAAA;IAAO,OAAAC,CAAU;EAAA;EAAOC,GAAA;AAAQ,GAAAA,GAAA,IAAA1C,IAAA,CAAAuC,GAAA,WAAAE,CAAA;IAEhC,WAAAA,CAAA;EACT,GAAAvD,IAAA;AAEA,IAAAwD,GAAA,IAAS;AAKP;AACA;EACE,IAAAM,KAAM,IAAK;IAAAC,UAAK,GAAQ,mBACb;IAAAC,QAAoB,GAAC;EAChC,OAAAxC,aAAkB,CAAAmC,OAAO,CAAE,UAAGM,MAAA;IAChCH,KAAA;IACA,IAAAI,IAAO,GAAMpB,IAAA,CAAAC,SAAc,CAAAkB,MAAI;MAAAE,KAAA,GAAA1C,mBAAA,CAAAuB,GAAA,CAAAkB,IAAA;MAAAN,KAAA,OAAAE,KAAA;MAAAM,SAAA,YAAAR,KAAA,MAAAS,gBAAA,CAAAJ,MAAA,EAAAnD,IAAA,EAAA4C,YAAA;IACjCF,GAAA;AAKA,EAAAY,SAAS,IAAAD,KAAW,CAAAR,OAAA,WAAYW,CAAA;MAG9BN,QAAY;AACV,IAAAM,CAAA,KAAAV,KAAO,KAAQU,CAAA,CAAAC,WAAY,OAAAD,CAAA,KAAAP,UAAA;AAAA,MAIzBO,CAAA,GAAC;IASC;EAIN,CAAC,GAAAd,GAAA;AACH;AAMA,EAAAO,UAAS;AAEP;AAKA,EAAIC,QAAQ;AAIR;AAME,GAAAR,GAAA;AAAyB;AAKf,SACRa,iBAAAG,GAAA,EAAA1D,IAAA,EAAA4C,YAAA;EAEV,IAAAe,QAAA","ignoreList":[]}
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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);
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);
13
18
  var index_exports = {};
14
19
  module.exports = __toCommonJS(index_exports);
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
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
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,oCADd;",
5
- "names": []
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":[]}
@@ -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"));
37
+ var fs = __toESM(require("fs-extra"), 1);
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"));
28
+ var fs = __toESM(require("fs-extra"), 1);
29
29
  async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
30
30
  if (!generatedOutput) return;
31
31
  const { generated } = generatedOutput;
@@ -1,43 +1,49 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  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
- };
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
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "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);
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);
24
34
  var write_generate_themes_exports = {};
25
35
  __export(write_generate_themes_exports, {
26
36
  writeGeneratedThemes: () => writeGeneratedThemes
27
37
  });
28
38
  module.exports = __toCommonJS(write_generate_themes_exports);
29
- var fs = __toESM(require("fs-extra"));
39
+ var fs = __toESM(require("fs-extra"), 1);
30
40
  async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
31
41
  if (generatedOutput) {
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
- ]);
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)]);
37
47
  }
38
48
  }
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
49
+ //# sourceMappingURL=write-generate-themes.native.js.map
@@ -1,6 +1 @@
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
+ {"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,4 +1,4 @@
1
- import { join } from "node:path";
1
+ import { join } from "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,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/generate-themes",
3
- "version": "1.135.3",
3
+ "version": "1.135.4-1761748186554",
4
+ "type": "module",
4
5
  "source": "src/index.ts",
5
6
  "types": "./types/index.d.ts",
6
7
  "main": "dist/cjs",
@@ -33,13 +34,13 @@
33
34
  "clean:build": "tamagui-build clean:build"
34
35
  },
35
36
  "dependencies": {
36
- "@tamagui/create-theme": "1.135.3",
37
- "@tamagui/theme-builder": "1.135.3",
38
- "@tamagui/types": "1.135.3",
37
+ "@tamagui/create-theme": "1.135.4-1761748186554",
38
+ "@tamagui/theme-builder": "1.135.4-1761748186554",
39
+ "@tamagui/types": "1.135.4-1761748186554",
39
40
  "esbuild-register": "^3.6.0",
40
41
  "fs-extra": "^11.2.0"
41
42
  },
42
43
  "devDependencies": {
43
- "@tamagui/build": "1.135.3"
44
+ "@tamagui/build": "1.135.4-1761748186554"
44
45
  }
45
46
  }