@tamagui/themes 1.9.22 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ import { writeFile } from "fs/promises";
2
+ import { themes } from "./themes";
3
+ async function run() {
4
+ await writeFile("./generated.json", JSON.stringify(themes, null, 2));
5
+ const baseType = `type Theme = {
6
+ ${Object.entries(themes.light).map(([k]) => {
7
+ return ` ${k}: string;
8
+ `;
9
+ }).join("")}
10
+ }`;
11
+ const types = Object.keys(themes).map((name) => {
12
+ return `export type ${name} = Theme`;
13
+ }).join("\n");
14
+ await writeFile("./generated.d.ts", `${baseType}
15
+ ${types}`);
16
+ }
17
+ run();
18
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/generate.ts"],
4
+ "sourcesContent": ["import { writeFile } from 'fs/promises'\n\nimport { themes } from './themes'\n\nasync function run() {\n await writeFile('./generated.json', JSON.stringify(themes, null, 2))\n\n const baseType = `type Theme = {\n${Object.entries(themes.light)\n .map(([k]) => {\n return ` ${k}: string;\\n`\n })\n .join('')}\n}`\n\n const types = Object.keys(themes)\n .map((name) => {\n return `export type ${name} = Theme`\n })\n .join('\\n')\n\n await writeFile('./generated.d.ts', `${baseType}\\n${types}`)\n}\n\nrun()\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;AAE1B,SAAS,cAAc;AAEvB,eAAe,MAAM;AACnB,QAAM,UAAU,oBAAoB,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAEnE,QAAM,WAAW;AAAA,EACjB,OAAO,QAAQ,OAAO,KAAK,EAC1B,IAAI,CAAC,CAAC,CAAC,MAAM;AACZ,WAAO,KAAK;AAAA;AAAA,EACd,CAAC,EACA,KAAK,EAAE;AAAA;AAGR,QAAM,QAAQ,OAAO,KAAK,MAAM,EAC7B,IAAI,CAAC,SAAS;AACb,WAAO,eAAe;AAAA,EACxB,CAAC,EACA,KAAK,IAAI;AAEZ,QAAM,UAAU,oBAAoB,GAAG;AAAA,EAAa,OAAO;AAC7D;AAEA,IAAI;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ import { writeFile } from "fs/promises";
2
+ import { themes } from "./themes";
3
+ async function run() {
4
+ await writeFile("./generated.json", JSON.stringify(themes, null, 2));
5
+ const baseType = `type Theme = {
6
+ ${Object.entries(themes.light).map(([k]) => {
7
+ return ` ${k}: string;
8
+ `;
9
+ }).join("")}
10
+ }`;
11
+ const types = Object.keys(themes).map((name) => {
12
+ return `export type ${name} = Theme`;
13
+ }).join("\n");
14
+ await writeFile("./generated.d.ts", `${baseType}
15
+ ${types}`);
16
+ }
17
+ run();
18
+ //# sourceMappingURL=generate.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/generate.ts"],
4
+ "sourcesContent": ["import { writeFile } from 'fs/promises'\n\nimport { themes } from './themes'\n\nasync function run() {\n await writeFile('./generated.json', JSON.stringify(themes, null, 2))\n\n const baseType = `type Theme = {\n${Object.entries(themes.light)\n .map(([k]) => {\n return ` ${k}: string;\\n`\n })\n .join('')}\n}`\n\n const types = Object.keys(themes)\n .map((name) => {\n return `export type ${name} = Theme`\n })\n .join('\\n')\n\n await writeFile('./generated.d.ts', `${baseType}\\n${types}`)\n}\n\nrun()\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;AAE1B,SAAS,cAAc;AAEvB,eAAe,MAAM;AACnB,QAAM,UAAU,oBAAoB,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAEnE,QAAM,WAAW;AAAA,EACjB,OAAO,QAAQ,OAAO,KAAK,EAC1B,IAAI,CAAC,CAAC,CAAC,MAAM;AACZ,WAAO,KAAK;AAAA;AAAA,EACd,CAAC,EACA,KAAK,EAAE;AAAA;AAGR,QAAM,QAAQ,OAAO,KAAK,MAAM,EAC7B,IAAI,CAAC,SAAS;AACb,WAAO,eAAe;AAAA,EACxB,CAAC,EACA,KAAK,IAAI;AAEZ,QAAM,UAAU,oBAAoB,GAAG;AAAA,EAAa,OAAO;AAC7D;AAEA,IAAI;",
6
+ "names": []
7
+ }