@tamagui/tailwind 0.0.0-bootstrap.0 → 3.0.0-beta.643.1
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/candidate.cjs +385 -0
- package/dist/cjs/candidate.native.cjs +431 -0
- package/dist/cjs/candidate.native.js +433 -0
- package/dist/cjs/candidate.native.js.map +1 -0
- package/dist/cjs/frontend.cjs +80 -0
- package/dist/cjs/frontend.native.cjs +95 -0
- package/dist/cjs/frontend.native.js +97 -0
- package/dist/cjs/frontend.native.js.map +1 -0
- package/dist/cjs/index.cjs +39 -0
- package/dist/cjs/index.native.cjs +41 -0
- package/dist/cjs/index.native.js +43 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/styled.cjs +30 -0
- package/dist/cjs/styled.native.cjs +32 -0
- package/dist/cjs/styled.native.js +34 -0
- package/dist/cjs/styled.native.js.map +1 -0
- package/dist/cjs/types.cjs +17 -0
- package/dist/cjs/types.native.cjs +19 -0
- package/dist/cjs/types.native.js +21 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/vite/state.cjs +249 -0
- package/dist/cjs/vite/state.native.cjs +331 -0
- package/dist/cjs/vite/state.native.js +333 -0
- package/dist/cjs/vite/state.native.js.map +1 -0
- package/dist/cjs/vite.cjs +148 -0
- package/dist/cjs/vite.native.cjs +188 -0
- package/dist/cjs/vite.native.js +190 -0
- package/dist/cjs/vite.native.js.map +1 -0
- package/dist/esm/candidate.mjs +360 -0
- package/dist/esm/candidate.mjs.map +1 -0
- package/dist/esm/candidate.native.js +404 -0
- package/dist/esm/candidate.native.js.map +1 -0
- package/dist/esm/frontend.mjs +57 -0
- package/dist/esm/frontend.mjs.map +1 -0
- package/dist/esm/frontend.native.js +70 -0
- package/dist/esm/frontend.native.js.map +1 -0
- package/dist/esm/index.mjs +11 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +11 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/styled.mjs +10 -0
- package/dist/esm/styled.mjs.map +1 -0
- package/dist/esm/styled.native.js +10 -0
- package/dist/esm/styled.native.js.map +1 -0
- package/dist/esm/types.mjs +0 -0
- package/dist/esm/types.native.js +0 -0
- package/dist/esm/vite/state.mjs +215 -0
- package/dist/esm/vite/state.mjs.map +1 -0
- package/dist/esm/vite/state.native.js +295 -0
- package/dist/esm/vite/state.native.js.map +1 -0
- package/dist/esm/vite.mjs +116 -0
- package/dist/esm/vite.mjs.map +1 -0
- package/dist/esm/vite.native.js +154 -0
- package/dist/esm/vite.native.js.map +1 -0
- package/package.json +88 -5
- package/src/candidate.ts +527 -0
- package/src/frontend.ts +116 -0
- package/src/index.tsx +24 -0
- package/src/styled.tsx +52 -0
- package/src/types.ts +226 -0
- package/src/vite/state.ts +274 -0
- package/src/vite.ts +204 -0
- package/types/candidate.d.ts +23 -0
- package/types/candidate.d.ts.map +1 -0
- package/types/frontend.d.ts +20 -0
- package/types/frontend.d.ts.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/styled.d.ts +12 -0
- package/types/styled.d.ts.map +1 -0
- package/types/types.d.ts +158 -0
- package/types/types.d.ts.map +1 -0
- package/types/vite/state.d.ts +28 -0
- package/types/vite/state.d.ts.map +1 -0
- package/types/vite.d.ts +20 -0
- package/types/vite.d.ts.map +1 -0
- package/README.md +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createTamaguiPlugins } from "@tamagui/vite-plugin/internal";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { TAILWIND_RESOLVED_ID, TAILWIND_RESOLVED_ID as TAILWIND_RESOLVED_ID2, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID, TAILWIND_VIRTUAL_ID as TAILWIND_VIRTUAL_ID2, createTailwindScannerState, isTamaguiCoreResetCSS, updateTailwindForWatchChange, wrapWithTamaguiLayer } from "./vite/state.mjs";
|
|
4
|
+
|
|
5
|
+
function isNative(environment) {
|
|
6
|
+
return environment?.name === "ios" || environment?.name === "android";
|
|
7
|
+
}
|
|
8
|
+
function isNotClient(environment) {
|
|
9
|
+
return !!environment?.name && environment.name !== "client";
|
|
10
|
+
}
|
|
11
|
+
function createTailwindPlugin(loader) {
|
|
12
|
+
const state = createTailwindScannerState();
|
|
13
|
+
let config;
|
|
14
|
+
let server;
|
|
15
|
+
const configure = async (addWatchFile) => state.configure(config.root, loader.getGeneration(), await loader.getTamaguiConfig(), addWatchFile, (glob) => server?.watcher.add(glob));
|
|
16
|
+
const isAppJSXSource = (filePath) => {
|
|
17
|
+
if (!/\.[jt]sx$/.test(filePath)) return false;
|
|
18
|
+
const relative = path.relative(config.root, filePath);
|
|
19
|
+
return relative !== "" && relative !== ".." && !relative.startsWith(`..${path.sep}`) && !relative.split(path.sep).includes("node_modules");
|
|
20
|
+
};
|
|
21
|
+
const clientTailwindModule = () => server?.environments.client?.moduleGraph.getModuleById(TAILWIND_RESOLVED_ID);
|
|
22
|
+
return {
|
|
23
|
+
name: "tamagui-tailwind",
|
|
24
|
+
enforce: "pre",
|
|
25
|
+
config() {
|
|
26
|
+
return {
|
|
27
|
+
optimizeDeps: { include: ["@tamagui/tailwind", "@tamagui/core/internal-runtime"] },
|
|
28
|
+
resolve: { dedupe: ["@tamagui/tailwind"] },
|
|
29
|
+
define: { "process.env.TAMAGUI_CSS_LAYER": JSON.stringify("tamagui") }
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
configResolved(resolvedConfig) {
|
|
33
|
+
config = resolvedConfig;
|
|
34
|
+
},
|
|
35
|
+
configureServer(_server) {
|
|
36
|
+
server = _server;
|
|
37
|
+
},
|
|
38
|
+
hotUpdate: {
|
|
39
|
+
order: "post",
|
|
40
|
+
async handler(options) {
|
|
41
|
+
if (this.environment.name !== "client") return;
|
|
42
|
+
if (loader.isEvaluationDependency(options.file)) {
|
|
43
|
+
state.clear();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (!await configure(() => {})) return;
|
|
47
|
+
const changed = options.type === "delete" ? await state.removeSource(options.file) : await state.scanSource(options.file, await options.read());
|
|
48
|
+
if (!changed) return;
|
|
49
|
+
const virtualModule = clientTailwindModule();
|
|
50
|
+
if (!virtualModule) return;
|
|
51
|
+
this.environment.moduleGraph.invalidateModule(virtualModule);
|
|
52
|
+
return [...options.modules, virtualModule];
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
async watchChange(id, change) {
|
|
56
|
+
if (config.command !== "build") return;
|
|
57
|
+
if (loader.isEvaluationDependency(id)) {
|
|
58
|
+
state.clear();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await updateTailwindForWatchChange(state, id, change.event, () => configure((file) => this.addWatchFile(file)));
|
|
62
|
+
},
|
|
63
|
+
resolveId(source) {
|
|
64
|
+
if (isNative(this.environment) || isNotClient(this.environment)) return;
|
|
65
|
+
if (source === TAILWIND_VIRTUAL_ID) return TAILWIND_RESOLVED_ID;
|
|
66
|
+
},
|
|
67
|
+
async load(id) {
|
|
68
|
+
if (id !== TAILWIND_RESOLVED_ID) return;
|
|
69
|
+
if (isNative(this.environment) || isNotClient(this.environment)) return;
|
|
70
|
+
if (!await configure((file) => this.addWatchFile(file))) return "";
|
|
71
|
+
return state.css;
|
|
72
|
+
},
|
|
73
|
+
transform: {
|
|
74
|
+
order: "pre",
|
|
75
|
+
async handler(code, id) {
|
|
76
|
+
if (isNative(this.environment)) return;
|
|
77
|
+
const [validId] = id.split("?");
|
|
78
|
+
if (isTamaguiCoreResetCSS(validId)) {
|
|
79
|
+
return {
|
|
80
|
+
code: wrapWithTamaguiLayer(code),
|
|
81
|
+
map: null
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (!loader.getEnvironment()) return;
|
|
85
|
+
if (!isAppJSXSource(validId)) return;
|
|
86
|
+
if (!await configure((file) => this.addWatchFile(file))) return;
|
|
87
|
+
if (await state.scanSource(validId, code)) {
|
|
88
|
+
const virtualModule = clientTailwindModule();
|
|
89
|
+
if (virtualModule) {
|
|
90
|
+
server?.environments.client?.moduleGraph.invalidateModule(virtualModule);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
for (const dependency of loader.getEvaluationDependencies()) {
|
|
94
|
+
this.addWatchFile(dependency);
|
|
95
|
+
}
|
|
96
|
+
if (isNotClient(this.environment)) return;
|
|
97
|
+
return {
|
|
98
|
+
code: `${code}
|
|
99
|
+
import "${TAILWIND_VIRTUAL_ID}";`,
|
|
100
|
+
map: null
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function tamaguiPlugin(options = {}) {
|
|
107
|
+
const { plugins, loader } = createTamaguiPlugins({
|
|
108
|
+
...options,
|
|
109
|
+
components: [.../* @__PURE__ */ new Set([...options.components ?? ["tamagui"], "@tamagui/tailwind"])],
|
|
110
|
+
wrapExtractedCSS: wrapWithTamaguiLayer
|
|
111
|
+
});
|
|
112
|
+
return [...plugins, createTailwindPlugin(loader)];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { TAILWIND_RESOLVED_ID2 as TAILWIND_RESOLVED_ID, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID2 as TAILWIND_VIRTUAL_ID, tamaguiPlugin };
|
|
116
|
+
//# sourceMappingURL=vite.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","names":[],"sources":["esm/vite.js"],"sourcesContent":["import {\n createTamaguiPlugins\n} from \"@tamagui/vite-plugin/internal\";\nimport path from \"node:path\";\nimport {\n createTailwindScannerState,\n isTamaguiCoreResetCSS,\n TAILWIND_RESOLVED_ID,\n TAILWIND_VIRTUAL_ID,\n updateTailwindForWatchChange,\n wrapWithTamaguiLayer\n} from \"./vite/state\";\nimport { TAILWIND_RESOLVED_ID as TAILWIND_RESOLVED_ID2, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID as TAILWIND_VIRTUAL_ID2 } from \"./vite/state\";\nfunction isNative(environment) {\n return environment?.name === \"ios\" || environment?.name === \"android\";\n}\nfunction isNotClient(environment) {\n return !!environment?.name && environment.name !== \"client\";\n}\nfunction createTailwindPlugin(loader) {\n const state = createTailwindScannerState();\n let config;\n let server;\n const configure = async (addWatchFile) => state.configure(\n config.root,\n loader.getGeneration(),\n await loader.getTamaguiConfig(),\n addWatchFile,\n (glob) => server?.watcher.add(glob)\n );\n const isAppJSXSource = (filePath) => {\n if (!/\\.[jt]sx$/.test(filePath)) return false;\n const relative = path.relative(config.root, filePath);\n return relative !== \"\" && relative !== \"..\" && !relative.startsWith(`..${path.sep}`) && !relative.split(path.sep).includes(\"node_modules\");\n };\n const clientTailwindModule = () => server?.environments.client?.moduleGraph.getModuleById(TAILWIND_RESOLVED_ID);\n return {\n name: \"tamagui-tailwind\",\n enforce: \"pre\",\n config() {\n return {\n optimizeDeps: {\n // Tailwind components reach the shared renderer through\n // `@tamagui/core/internal-runtime`, while regular components reach it through\n // `@tamagui/core`. Optimizing both entries together puts them in one chunk\n // graph, so there is a single `@tamagui/web` instance and both frontends see\n // the same config singleton and contexts.\n include: [\"@tamagui/tailwind\", \"@tamagui/core/internal-runtime\"]\n },\n resolve: {\n dedupe: [\"@tamagui/tailwind\"]\n },\n define: {\n // Runtime-generated and SSR fallback rules must participate in the same\n // cascade order as compiler-extracted Tamagui CSS. Without this, the\n // unlayered runtime duplicate beats official Tailwind utilities.\n \"process.env.TAMAGUI_CSS_LAYER\": JSON.stringify(\"tamagui\")\n }\n };\n },\n configResolved(resolvedConfig) {\n config = resolvedConfig;\n },\n configureServer(_server) {\n server = _server;\n },\n hotUpdate: {\n order: \"post\",\n async handler(options) {\n if (this.environment.name !== \"client\") return;\n if (loader.isEvaluationDependency(options.file)) {\n state.clear();\n return;\n }\n if (!await configure(() => {\n })) return;\n const changed = options.type === \"delete\" ? await state.removeSource(options.file) : await state.scanSource(options.file, await options.read());\n if (!changed) return;\n const virtualModule = clientTailwindModule();\n if (!virtualModule) return;\n this.environment.moduleGraph.invalidateModule(virtualModule);\n return [...options.modules, virtualModule];\n }\n },\n async watchChange(id, change) {\n if (config.command !== \"build\") return;\n if (loader.isEvaluationDependency(id)) {\n state.clear();\n return;\n }\n await updateTailwindForWatchChange(\n state,\n id,\n change.event,\n () => configure((file) => this.addWatchFile(file))\n );\n },\n resolveId(source) {\n if (isNative(this.environment) || isNotClient(this.environment)) return;\n if (source === TAILWIND_VIRTUAL_ID) return TAILWIND_RESOLVED_ID;\n },\n async load(id) {\n if (id !== TAILWIND_RESOLVED_ID) return;\n if (isNative(this.environment) || isNotClient(this.environment)) return;\n if (!await configure((file) => this.addWatchFile(file))) return \"\";\n return state.css;\n },\n transform: {\n order: \"pre\",\n async handler(code, id) {\n if (isNative(this.environment)) return;\n const [validId] = id.split(\"?\");\n if (isTamaguiCoreResetCSS(validId)) {\n return { code: wrapWithTamaguiLayer(code), map: null };\n }\n if (!loader.getEnvironment()) return;\n if (!isAppJSXSource(validId)) return;\n if (!await configure((file) => this.addWatchFile(file))) return;\n if (await state.scanSource(validId, code)) {\n const virtualModule = clientTailwindModule();\n if (virtualModule) {\n server?.environments.client?.moduleGraph.invalidateModule(virtualModule);\n }\n }\n for (const dependency of loader.getEvaluationDependencies()) {\n this.addWatchFile(dependency);\n }\n if (isNotClient(this.environment)) return;\n return { code: `${code}\nimport \"${TAILWIND_VIRTUAL_ID}\";`, map: null };\n }\n }\n };\n}\nfunction tamaguiPlugin(options = {}) {\n const { plugins, loader } = createTamaguiPlugins({\n ...options,\n components: [\n .../* @__PURE__ */ new Set([...options.components ?? [\"tamagui\"], \"@tamagui/tailwind\"])\n ],\n wrapExtractedCSS: wrapWithTamaguiLayer\n });\n return [...plugins, createTailwindPlugin(loader)];\n}\nexport {\n TAILWIND_RESOLVED_ID2 as TAILWIND_RESOLVED_ID,\n TAILWIND_VERSION,\n TAILWIND_VIRTUAL_ID2 as TAILWIND_VIRTUAL_ID,\n tamaguiPlugin\n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AAW,SAAS,IAAI,GAAG;KACzC,MAAM,gBAAgB,qBAAqB;KAC3C,IAAI,eAAe;MACjB,QAAQ,aAAa,QAAQ,YAAY,iBAAiB,aAAa;KACzE;IACF;IACA,KAAK,MAAM,cAAc,OAAO,0BAA0B,GAAG;KAC3D,KAAK,aAAa,UAAU;IAC9B;IACA,IAAI,YAAY,KAAK,WAAW,GAAG;IACnC,OAAO;KAAE,MAAM,GAAG,KAAK;UACrB,oBAAoB;KAAK,KAAK;IAAK;GACvC;EACF;CACF;AACF;AACA,SAAS,cAAc,UAAU,CAAC,GAAG;CACnC,MAAM,EAAE,SAAS,WAAW,qBAAqB;EAC/C,GAAG;EACH,YAAY,CACV,mBAAmB,IAAI,IAAI,CAAC,GAAG,QAAQ,cAAc,CAAC,SAAS,GAAG,mBAAmB,CAAC,CACxF;EACA,kBAAkB;CACpB,CAAC;CACD,OAAO,CAAC,GAAG,SAAS,qBAAqB,MAAM,CAAC;AAClD"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { createTamaguiPlugins } from "@tamagui/vite-plugin/internal";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { TAILWIND_RESOLVED_ID, TAILWIND_RESOLVED_ID as TAILWIND_RESOLVED_ID2, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID, TAILWIND_VIRTUAL_ID as TAILWIND_VIRTUAL_ID2, createTailwindScannerState, isTamaguiCoreResetCSS, updateTailwindForWatchChange, wrapWithTamaguiLayer } from "./vite/state.native.js";
|
|
4
|
+
|
|
5
|
+
function isNative(environment) {
|
|
6
|
+
return (environment === null || environment === void 0 ? void 0 : environment.name) === "ios" || (environment === null || environment === void 0 ? void 0 : environment.name) === "android";
|
|
7
|
+
}
|
|
8
|
+
function isNotClient(environment) {
|
|
9
|
+
return !!(environment === null || environment === void 0 ? void 0 : environment.name) && environment.name !== "client";
|
|
10
|
+
}
|
|
11
|
+
function createTailwindPlugin(loader) {
|
|
12
|
+
var state = createTailwindScannerState();
|
|
13
|
+
var config;
|
|
14
|
+
var server;
|
|
15
|
+
var configure = async function(addWatchFile) {
|
|
16
|
+
return state.configure(config.root, loader.getGeneration(), await loader.getTamaguiConfig(), addWatchFile, function(glob) {
|
|
17
|
+
return server === null || server === void 0 ? void 0 : server.watcher.add(glob);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var isAppJSXSource = function(filePath) {
|
|
21
|
+
if (!/\.[jt]sx$/.test(filePath)) return false;
|
|
22
|
+
var relative = path.relative(config.root, filePath);
|
|
23
|
+
return relative !== "" && relative !== ".." && !relative.startsWith(`..${path.sep}`) && !relative.split(path.sep).includes("node_modules");
|
|
24
|
+
};
|
|
25
|
+
var clientTailwindModule = function() {
|
|
26
|
+
var _server_environments_client;
|
|
27
|
+
return server === null || server === void 0 ? void 0 : (_server_environments_client = server.environments.client) === null || _server_environments_client === void 0 ? void 0 : _server_environments_client.moduleGraph.getModuleById(TAILWIND_RESOLVED_ID);
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
name: "tamagui-tailwind",
|
|
31
|
+
enforce: "pre",
|
|
32
|
+
config() {
|
|
33
|
+
return {
|
|
34
|
+
optimizeDeps: { include: ["@tamagui/tailwind", "@tamagui/core/internal-runtime"] },
|
|
35
|
+
resolve: { dedupe: ["@tamagui/tailwind"] },
|
|
36
|
+
define: { "process.env.TAMAGUI_CSS_LAYER": JSON.stringify("tamagui") }
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
configResolved(resolvedConfig) {
|
|
40
|
+
config = resolvedConfig;
|
|
41
|
+
},
|
|
42
|
+
configureServer(_server) {
|
|
43
|
+
server = _server;
|
|
44
|
+
},
|
|
45
|
+
hotUpdate: {
|
|
46
|
+
order: "post",
|
|
47
|
+
async handler(options) {
|
|
48
|
+
if (this.environment.name !== "client") return;
|
|
49
|
+
if (loader.isEvaluationDependency(options.file)) {
|
|
50
|
+
state.clear();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (!await configure(function() {})) return;
|
|
54
|
+
var changed = options.type === "delete" ? await state.removeSource(options.file) : await state.scanSource(options.file, await options.read());
|
|
55
|
+
if (!changed) return;
|
|
56
|
+
var virtualModule = clientTailwindModule();
|
|
57
|
+
if (!virtualModule) return;
|
|
58
|
+
this.environment.moduleGraph.invalidateModule(virtualModule);
|
|
59
|
+
return [...options.modules, virtualModule];
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
async watchChange(id, change) {
|
|
63
|
+
var _this = this;
|
|
64
|
+
if (config.command !== "build") return;
|
|
65
|
+
if (loader.isEvaluationDependency(id)) {
|
|
66
|
+
state.clear();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
await updateTailwindForWatchChange(state, id, change.event, function() {
|
|
70
|
+
return configure(function(file) {
|
|
71
|
+
return _this.addWatchFile(file);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
resolveId(source) {
|
|
76
|
+
if (isNative(this.environment) || isNotClient(this.environment)) return;
|
|
77
|
+
if (source === TAILWIND_VIRTUAL_ID) return TAILWIND_RESOLVED_ID;
|
|
78
|
+
},
|
|
79
|
+
async load(id) {
|
|
80
|
+
var _this = this;
|
|
81
|
+
if (id !== TAILWIND_RESOLVED_ID) return;
|
|
82
|
+
if (isNative(this.environment) || isNotClient(this.environment)) return;
|
|
83
|
+
if (!await configure(function(file) {
|
|
84
|
+
return _this.addWatchFile(file);
|
|
85
|
+
})) return "";
|
|
86
|
+
return state.css;
|
|
87
|
+
},
|
|
88
|
+
transform: {
|
|
89
|
+
order: "pre",
|
|
90
|
+
async handler(code, id) {
|
|
91
|
+
var _this = this;
|
|
92
|
+
if (isNative(this.environment)) return;
|
|
93
|
+
var [validId] = id.split("?");
|
|
94
|
+
if (isTamaguiCoreResetCSS(validId)) {
|
|
95
|
+
return {
|
|
96
|
+
code: wrapWithTamaguiLayer(code),
|
|
97
|
+
map: null
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (!loader.getEnvironment()) return;
|
|
101
|
+
if (!isAppJSXSource(validId)) return;
|
|
102
|
+
if (!await configure(function(file) {
|
|
103
|
+
return _this.addWatchFile(file);
|
|
104
|
+
})) return;
|
|
105
|
+
if (await state.scanSource(validId, code)) {
|
|
106
|
+
var virtualModule = clientTailwindModule();
|
|
107
|
+
if (virtualModule) {
|
|
108
|
+
var _server_environments_client;
|
|
109
|
+
server === null || server === void 0 ? void 0 : (_server_environments_client = server.environments.client) === null || _server_environments_client === void 0 ? void 0 : _server_environments_client.moduleGraph.invalidateModule(virtualModule);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
113
|
+
try {
|
|
114
|
+
for (var _iterator = loader.getEvaluationDependencies()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
115
|
+
var dependency = _step.value;
|
|
116
|
+
this.addWatchFile(dependency);
|
|
117
|
+
}
|
|
118
|
+
} catch (err) {
|
|
119
|
+
_didIteratorError = true;
|
|
120
|
+
_iteratorError = err;
|
|
121
|
+
} finally {
|
|
122
|
+
try {
|
|
123
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
124
|
+
_iterator.return();
|
|
125
|
+
}
|
|
126
|
+
} finally {
|
|
127
|
+
if (_didIteratorError) {
|
|
128
|
+
throw _iteratorError;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (isNotClient(this.environment)) return;
|
|
133
|
+
return {
|
|
134
|
+
code: `${code}
|
|
135
|
+
import "${TAILWIND_VIRTUAL_ID}";`,
|
|
136
|
+
map: null
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function tamaguiPlugin() {
|
|
143
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
144
|
+
var _options_components;
|
|
145
|
+
var { plugins, loader } = createTamaguiPlugins({
|
|
146
|
+
...options,
|
|
147
|
+
components: [.../* @__PURE__ */ new Set([...(_options_components = options.components) !== null && _options_components !== void 0 ? _options_components : ["tamagui"], "@tamagui/tailwind"])],
|
|
148
|
+
wrapExtractedCSS: wrapWithTamaguiLayer
|
|
149
|
+
});
|
|
150
|
+
return [...plugins, createTailwindPlugin(loader)];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export { TAILWIND_RESOLVED_ID2 as TAILWIND_RESOLVED_ID, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID2 as TAILWIND_VIRTUAL_ID, tamaguiPlugin };
|
|
154
|
+
//# sourceMappingURL=vite.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.native.js","names":[],"sources":["esm/vite.native.js"],"sourcesContent":["import { createTamaguiPlugins } from \"@tamagui/vite-plugin/internal\";\nimport path from \"path\";\nimport { createTailwindScannerState, isTamaguiCoreResetCSS, TAILWIND_RESOLVED_ID, TAILWIND_VIRTUAL_ID, updateTailwindForWatchChange, wrapWithTamaguiLayer } from \"./vite/state\";\nimport { TAILWIND_RESOLVED_ID as TAILWIND_RESOLVED_ID2, TAILWIND_VERSION, TAILWIND_VIRTUAL_ID as TAILWIND_VIRTUAL_ID2 } from \"./vite/state\";\nfunction isNative(environment) {\n return (environment === null || environment === void 0 ? void 0 : environment.name) === \"ios\" || (environment === null || environment === void 0 ? void 0 : environment.name) === \"android\";\n}\nfunction isNotClient(environment) {\n return !!(environment === null || environment === void 0 ? void 0 : environment.name) && environment.name !== \"client\";\n}\nfunction createTailwindPlugin(loader) {\n var state = createTailwindScannerState();\n var config;\n var server;\n var configure = async function(addWatchFile) {\n return state.configure(config.root, loader.getGeneration(), await loader.getTamaguiConfig(), addWatchFile, function(glob) {\n return server === null || server === void 0 ? void 0 : server.watcher.add(glob);\n });\n };\n var isAppJSXSource = function(filePath) {\n if (!/\\.[jt]sx$/.test(filePath)) return false;\n var relative = path.relative(config.root, filePath);\n return relative !== \"\" && relative !== \"..\" && !relative.startsWith(`..${path.sep}`) && !relative.split(path.sep).includes(\"node_modules\");\n };\n var clientTailwindModule = function() {\n var _server_environments_client;\n return server === null || server === void 0 ? void 0 : (_server_environments_client = server.environments.client) === null || _server_environments_client === void 0 ? void 0 : _server_environments_client.moduleGraph.getModuleById(TAILWIND_RESOLVED_ID);\n };\n return {\n name: \"tamagui-tailwind\",\n enforce: \"pre\",\n config() {\n return {\n optimizeDeps: {\n // Tailwind components reach the shared renderer through\n // `@tamagui/core/internal-runtime`, while regular components reach it through\n // `@tamagui/core`. Optimizing both entries together puts them in one chunk\n // graph, so there is a single `@tamagui/web` instance and both frontends see\n // the same config singleton and contexts.\n include: [\n \"@tamagui/tailwind\",\n \"@tamagui/core/internal-runtime\"\n ]\n },\n resolve: {\n dedupe: [\n \"@tamagui/tailwind\"\n ]\n },\n define: {\n // Runtime-generated and SSR fallback rules must participate in the same\n // cascade order as compiler-extracted Tamagui CSS. Without this, the\n // unlayered runtime duplicate beats official Tailwind utilities.\n \"process.env.TAMAGUI_CSS_LAYER\": JSON.stringify(\"tamagui\")\n }\n };\n },\n configResolved(resolvedConfig) {\n config = resolvedConfig;\n },\n configureServer(_server) {\n server = _server;\n },\n hotUpdate: {\n order: \"post\",\n async handler(options) {\n if (this.environment.name !== \"client\") return;\n if (loader.isEvaluationDependency(options.file)) {\n state.clear();\n return;\n }\n if (!await configure(function() {\n })) return;\n var changed = options.type === \"delete\" ? await state.removeSource(options.file) : await state.scanSource(options.file, await options.read());\n if (!changed) return;\n var virtualModule = clientTailwindModule();\n if (!virtualModule) return;\n this.environment.moduleGraph.invalidateModule(virtualModule);\n return [\n ...options.modules,\n virtualModule\n ];\n }\n },\n async watchChange(id, change) {\n var _this = this;\n if (config.command !== \"build\") return;\n if (loader.isEvaluationDependency(id)) {\n state.clear();\n return;\n }\n await updateTailwindForWatchChange(state, id, change.event, function() {\n return configure(function(file) {\n return _this.addWatchFile(file);\n });\n });\n },\n resolveId(source) {\n if (isNative(this.environment) || isNotClient(this.environment)) return;\n if (source === TAILWIND_VIRTUAL_ID) return TAILWIND_RESOLVED_ID;\n },\n async load(id) {\n var _this = this;\n if (id !== TAILWIND_RESOLVED_ID) return;\n if (isNative(this.environment) || isNotClient(this.environment)) return;\n if (!await configure(function(file) {\n return _this.addWatchFile(file);\n })) return \"\";\n return state.css;\n },\n transform: {\n order: \"pre\",\n async handler(code, id) {\n var _this = this;\n if (isNative(this.environment)) return;\n var [validId] = id.split(\"?\");\n if (isTamaguiCoreResetCSS(validId)) {\n return {\n code: wrapWithTamaguiLayer(code),\n map: null\n };\n }\n if (!loader.getEnvironment()) return;\n if (!isAppJSXSource(validId)) return;\n if (!await configure(function(file) {\n return _this.addWatchFile(file);\n })) return;\n if (await state.scanSource(validId, code)) {\n var virtualModule = clientTailwindModule();\n if (virtualModule) {\n var _server_environments_client;\n server === null || server === void 0 ? void 0 : (_server_environments_client = server.environments.client) === null || _server_environments_client === void 0 ? void 0 : _server_environments_client.moduleGraph.invalidateModule(virtualModule);\n }\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = loader.getEvaluationDependencies()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var dependency = _step.value;\n this.addWatchFile(dependency);\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 if (isNotClient(this.environment)) return;\n return {\n code: `${code}\nimport \"${TAILWIND_VIRTUAL_ID}\";`,\n map: null\n };\n }\n }\n };\n}\nfunction tamaguiPlugin() {\n var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var _options_components;\n var { plugins, loader } = createTamaguiPlugins({\n ...options,\n components: [\n .../* @__PURE__ */ new Set([\n ...(_options_components = options.components) !== null && _options_components !== void 0 ? _options_components : [\n \"tamagui\"\n ],\n \"@tamagui/tailwind\"\n ])\n ],\n wrapExtractedCSS: wrapWithTamaguiLayer\n });\n return [\n ...plugins,\n createTailwindPlugin(loader)\n ];\n}\nexport {\n TAILWIND_RESOLVED_ID2 as TAILWIND_RESOLVED_ID,\n TAILWIND_VERSION,\n TAILWIND_VIRTUAL_ID2 as TAILWIND_VIRTUAL_ID,\n tamaguiPlugin\n};\n//# sourceMappingURL=vite.js.map\n"],"mappings":";;;;;AAIA,SAAS,SAAS,aAAa;CAC7B,QAAQ,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,UAAU,UAAU,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,UAAU;AACpL;AACA,SAAS,YAAY,aAAa;CAChC,OAAO,CAAC,EAAE,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,SAAS,YAAY,SAAS;AAChH;AACA,SAAS,qBAAqB,QAAQ;CACpC,IAAI,QAAQ,2BAA2B;CACvC,IAAI;CACJ,IAAI;CACJ,IAAI,YAAY,eAAe,cAAc;EAC3C,OAAO,MAAM,UAAU,OAAO,MAAM,OAAO,cAAc,GAAG,MAAM,OAAO,iBAAiB,GAAG,cAAc,SAAS,MAAM;GACxH,OAAO,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,QAAQ,IAAI,IAAI;EAChF,CAAC;CACH;CACA,IAAI,iBAAiB,SAAS,UAAU;EACtC,IAAI,CAAC,YAAY,KAAK,QAAQ,GAAG,OAAO;EACxC,IAAI,WAAW,KAAK,SAAS,OAAO,MAAM,QAAQ;EAClD,OAAO,aAAa,MAAM,aAAa,QAAQ,CAAC,SAAS,WAAW,KAAK,KAAK,KAAK,KAAK,CAAC,SAAS,MAAM,KAAK,GAAG,EAAE,SAAS,cAAc;CAC3I;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AG,OAAO,4BAA4B,MAAM;MACnL,IAAI,aAAa,MAAM;MACvB,KAAK,aAAa,UAAU;KAC9B;IACF,SAAS,KAAK;KACZ,oBAAoB;KACpB,iBAAiB;IACnB,UAAU;KACR,IAAI;MACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;OAC1D,UAAU,OAAO;MACnB;KACF,UAAU;MACR,IAAI,mBAAmB;OACrB,MAAM;MACR;KACF;IACF;IACA,IAAI,YAAY,KAAK,WAAW,GAAG;IACnC,OAAO;KACL,MAAM,GAAG,KAAK;UACd,oBAAoB;KACpB,KAAK;IACP;GACF;EACF;CACF;AACF;AACA,SAAS,gBAAgB;CACvB,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI;CACJ,IAAI,EAAE,SAAS,WAAW,qBAAqB;EAC7C,GAAG;EACH,YAAY,CACV,mBAAmB,IAAI,IAAI,CACzB,IAAI,sBAAsB,QAAQ,gBAAgB,QAAQ,wBAAwB,KAAK,IAAI,sBAAsB,CAC/G,SACF,GACA,mBACF,CAAC,CACH;EACA,kBAAkB;CACpB,CAAC;CACD,OAAO,CACL,GAAG,SACH,qBAAqB,MAAM,CAC7B;AACF"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/tailwind",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Nate Wienert"
|
|
7
|
+
},
|
|
5
8
|
"repository": {
|
|
6
9
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/tamagui/tamagui.git"
|
|
10
|
+
"url": "git+https://github.com/tamagui/tamagui.git",
|
|
11
|
+
"directory": "code/core/tailwind"
|
|
8
12
|
},
|
|
9
|
-
"
|
|
13
|
+
"source": "src/index.tsx",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
10
16
|
"files": [
|
|
11
|
-
"
|
|
17
|
+
"src/candidate.ts",
|
|
18
|
+
"src/frontend.ts",
|
|
19
|
+
"src/index.tsx",
|
|
20
|
+
"src/styled.tsx",
|
|
21
|
+
"src/types.ts",
|
|
22
|
+
"src/vite.ts",
|
|
23
|
+
"src/vite/state.ts",
|
|
24
|
+
"types",
|
|
25
|
+
"dist"
|
|
12
26
|
],
|
|
27
|
+
"main": "dist/cjs/index.cjs",
|
|
28
|
+
"module": "dist/esm/index.mjs",
|
|
29
|
+
"types": "./types/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
"./package.json": "./package.json",
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./types/index.d.ts",
|
|
34
|
+
"react-native": "./dist/esm/index.native.js",
|
|
35
|
+
"browser": "./dist/esm/index.mjs",
|
|
36
|
+
"module": "./dist/esm/index.mjs",
|
|
37
|
+
"import": "./dist/esm/index.mjs",
|
|
38
|
+
"require": "./dist/cjs/index.cjs",
|
|
39
|
+
"default": "./dist/esm/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./vite": {
|
|
42
|
+
"types": "./types/vite.d.ts",
|
|
43
|
+
"react-native": "./dist/esm/vite.mjs",
|
|
44
|
+
"browser": "./dist/esm/vite.mjs",
|
|
45
|
+
"module": "./dist/esm/vite.mjs",
|
|
46
|
+
"import": "./dist/esm/vite.mjs",
|
|
47
|
+
"require": "./dist/cjs/vite.cjs",
|
|
48
|
+
"default": "./dist/esm/vite.mjs"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
13
51
|
"publishConfig": {
|
|
14
52
|
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tamagui-build --exclude __tests__",
|
|
56
|
+
"watch": "tamagui-build --exclude __tests__ --watch",
|
|
57
|
+
"clean": "tamagui-build clean",
|
|
58
|
+
"clean:build": "tamagui-build clean:build",
|
|
59
|
+
"test:web": "vitest --run --config ./vitest.config.ts",
|
|
60
|
+
"test:native": "vitest --run --config ./vitest.native.config.ts",
|
|
61
|
+
"test:types": "vitest --typecheck --run --config ./vitest.config.ts",
|
|
62
|
+
"test": "bun run test:web && bun run test:native"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@tailwindcss/node": "4.3.0",
|
|
66
|
+
"@tailwindcss/oxide": "4.3.0",
|
|
67
|
+
"@tamagui/constants": "3.0.0-beta.643.1",
|
|
68
|
+
"@tamagui/core": "3.0.0-beta.643.1",
|
|
69
|
+
"@tamagui/helpers": "3.0.0-beta.643.1",
|
|
70
|
+
"@tamagui/style-grammar": "3.0.0-beta.643.1",
|
|
71
|
+
"@tamagui/vite-plugin": "3.0.0-beta.643.1"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
75
|
+
"@tamagui/config": "3.0.0-beta.643.1",
|
|
76
|
+
"@tamagui/config-default": "3.0.0-beta.643.1",
|
|
77
|
+
"@tamagui/fake-react-native": "3.0.0-beta.643.1",
|
|
78
|
+
"@tamagui/react-native-web-lite": "3.0.0-beta.643.1",
|
|
79
|
+
"@tamagui/to-tailwind": "3.0.0-beta.643.1",
|
|
80
|
+
"@tamagui/web": "3.0.0-beta.643.1",
|
|
81
|
+
"react": ">=19",
|
|
82
|
+
"typescript": "~6.0.3",
|
|
83
|
+
"vite": "^8.0.3",
|
|
84
|
+
"vitest": "4.0.4"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"react": ">=19",
|
|
88
|
+
"tailwindcss": "4.3.0",
|
|
89
|
+
"vite": "^8.0.3"
|
|
90
|
+
},
|
|
91
|
+
"peerDependenciesMeta": {
|
|
92
|
+
"tailwindcss": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"vite": {
|
|
96
|
+
"optional": true
|
|
97
|
+
}
|
|
15
98
|
}
|
|
16
99
|
}
|