@tamagui/cli 2.7.7 → 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/add.cjs +77 -87
- package/dist/build.cjs +415 -277
- package/dist/cli.cjs +343 -340
- package/dist/generate-prompt.cjs +344 -357
- package/dist/generate.cjs +46 -54
- package/dist/index.cjs +2 -1
- package/dist/migrate.cjs +370 -0
- package/dist/setup-prompt.cjs +158 -0
- package/dist/to-tailwind-default-config.cjs +778 -0
- package/dist/to-tailwind.cjs +214 -0
- package/dist/update-template.cjs +44 -52
- package/dist/update.cjs +15 -18
- package/dist/upgrade.cjs +407 -398
- package/dist/utils.cjs +85 -101
- package/metro.cjs +1 -0
- package/metro.d.ts +1 -0
- package/metro.mjs +1 -0
- package/package.json +41 -12
- package/src/build.ts +574 -363
- package/src/cli.ts +96 -12
- package/src/generate-prompt.ts +16 -24
- package/src/migrate.ts +354 -0
- package/src/setup-prompt.ts +139 -0
- package/src/to-tailwind-default-config.ts +755 -0
- package/src/to-tailwind.ts +313 -0
- package/src/utils.ts +11 -9
- package/types/add.d.ts +1 -1
- package/types/add.d.ts.map +1 -1
- package/types/build.d.ts +1 -1
- package/types/build.d.ts.map +1 -1
- package/types/migrate.d.ts +7 -0
- package/types/migrate.d.ts.map +1 -0
- package/types/setup-prompt.d.ts +3 -0
- package/types/setup-prompt.d.ts.map +1 -0
- package/types/to-tailwind-default-config.d.ts +53 -0
- package/types/to-tailwind-default-config.d.ts.map +1 -0
- package/types/to-tailwind.d.ts +16 -0
- package/types/to-tailwind.d.ts.map +1 -0
- package/types/utils.d.ts.map +1 -1
- package/vite.cjs +1 -0
- package/vite.d.ts +1 -0
- package/vite.mjs +1 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { readFile, stat, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { extname, relative, resolve, sep } from 'node:path'
|
|
3
|
+
import { bundledDefaultGrammarConfig } from './to-tailwind-default-config'
|
|
4
|
+
|
|
5
|
+
type GlobOptions = {
|
|
6
|
+
cwd: string
|
|
7
|
+
absolute: boolean
|
|
8
|
+
nodir: boolean
|
|
9
|
+
ignore: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type ToTailwindOptions = {
|
|
13
|
+
patterns: string[]
|
|
14
|
+
write?: boolean
|
|
15
|
+
cwd?: string
|
|
16
|
+
// path to the app config; token/font/theme names, media, and shorthands drive claiming.
|
|
17
|
+
configPath?: string
|
|
18
|
+
// explicitly use the canonical bundled v5 token/font/theme/media/shorthand domains.
|
|
19
|
+
useDefaultConfig?: boolean
|
|
20
|
+
// opt in to DOM renaming (View→div …). default false: Tamagui components are PRESERVED so the
|
|
21
|
+
// cross-platform (native) app keeps working.
|
|
22
|
+
renameDom?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type TransformConfig = {
|
|
26
|
+
tokens?: Record<string, Record<string, any>>
|
|
27
|
+
fonts?: Record<string, any>
|
|
28
|
+
themes?: Record<string, Record<string, any>>
|
|
29
|
+
media?: Record<string, any>
|
|
30
|
+
shorthands?: Record<string, string>
|
|
31
|
+
grammarConfig?: typeof bundledDefaultGrammarConfig
|
|
32
|
+
renameComponents?: boolean
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type ToTailwindResult = {
|
|
36
|
+
files: number
|
|
37
|
+
changed: number
|
|
38
|
+
written: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type Transform = (source: string, options?: TransformConfig) => string
|
|
42
|
+
|
|
43
|
+
const codeFileExtensions = new Set(['.js', '.jsx', '.ts', '.tsx'])
|
|
44
|
+
const defaultFileGlob = '**/*.{js,jsx,ts,tsx}'
|
|
45
|
+
const ignoredGlobs = ['**/node_modules/**', '**/.git/**']
|
|
46
|
+
|
|
47
|
+
const { glob } = require('glob') as {
|
|
48
|
+
glob(pattern: string, options: GlobOptions): Promise<string[]>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const { createTwoFilesPatch } = require('diff') as {
|
|
52
|
+
createTwoFilesPatch(
|
|
53
|
+
oldFileName: string,
|
|
54
|
+
newFileName: string,
|
|
55
|
+
oldStr: string,
|
|
56
|
+
newStr: string,
|
|
57
|
+
oldHeader?: string,
|
|
58
|
+
newHeader?: string,
|
|
59
|
+
options?: { context?: number }
|
|
60
|
+
): string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export async function toTailwind({
|
|
64
|
+
patterns,
|
|
65
|
+
write = false,
|
|
66
|
+
cwd = process.cwd(),
|
|
67
|
+
configPath,
|
|
68
|
+
useDefaultConfig = false,
|
|
69
|
+
renameDom = false,
|
|
70
|
+
}: ToTailwindOptions): Promise<ToTailwindResult> {
|
|
71
|
+
if (!patterns.length) {
|
|
72
|
+
throw new Error(
|
|
73
|
+
'Usage: tamagui to-tailwind <paths/glob> [--write] [--config <path> | --use-default-config] [--rename-dom]'
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// SAFETY: --write is destructive. Token domains, media, and shorthands differ per app, so
|
|
78
|
+
// require either an explicit app config or the explicit canonical bundled-config opt-in.
|
|
79
|
+
if (write && !configPath && !useDefaultConfig) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
'--write requires either --config <path> (app token/media grammar) or ' +
|
|
82
|
+
'--use-default-config (acknowledge the bundled defaults).'
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const { transformConfig, usedDefault } = await loadTransformConfig(
|
|
87
|
+
configPath,
|
|
88
|
+
useDefaultConfig,
|
|
89
|
+
cwd
|
|
90
|
+
)
|
|
91
|
+
if (usedDefault && !useDefaultConfig) {
|
|
92
|
+
// Dry-run fallback: bare token names pass through; other config data defaults.
|
|
93
|
+
console.warn(
|
|
94
|
+
'[to-tailwind] WARNING: no --config given — bare token names pass through ' +
|
|
95
|
+
'and bundled media/shorthands are used. pass --config <path> to enforce app domains.'
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
transformConfig.renameComponents = renameDom
|
|
99
|
+
|
|
100
|
+
const files = await collectFiles(patterns, cwd)
|
|
101
|
+
|
|
102
|
+
// TRANSACTIONAL parse check: abort BEFORE any transform/write if any file has parse errors,
|
|
103
|
+
// so malformed source is never normalized/partially rewritten.
|
|
104
|
+
const { findParseError } = require('@tamagui/to-tailwind') as {
|
|
105
|
+
findParseError?: (source: string) => string | null
|
|
106
|
+
}
|
|
107
|
+
if (typeof findParseError !== 'function') {
|
|
108
|
+
throw new Error(
|
|
109
|
+
'@tamagui/to-tailwind did not export findParseError — aborting because transactional parse safety is unavailable'
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
const sources = new Map<string, string>()
|
|
113
|
+
for (const file of files) {
|
|
114
|
+
const source = await readFile(file, 'utf8')
|
|
115
|
+
sources.set(file, source)
|
|
116
|
+
const err = findParseError(source)
|
|
117
|
+
if (err) {
|
|
118
|
+
throw new Error(
|
|
119
|
+
`parse error in ${relative(cwd, file) || file}: ${err} — aborted, no files written`
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const tamaguiToTailwind = loadTamaguiToTailwind()
|
|
125
|
+
let changed = 0
|
|
126
|
+
let written = 0
|
|
127
|
+
|
|
128
|
+
for (const file of files) {
|
|
129
|
+
const source = sources.get(file)!
|
|
130
|
+
const transformed = tamaguiToTailwind(source, transformConfig)
|
|
131
|
+
|
|
132
|
+
if (transformed === source) {
|
|
133
|
+
continue
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
changed++
|
|
137
|
+
|
|
138
|
+
if (write) {
|
|
139
|
+
await writeFile(file, transformed)
|
|
140
|
+
written++
|
|
141
|
+
continue
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
process.stdout.write(createDiff(file, source, transformed, cwd))
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (files.length === 0) {
|
|
148
|
+
console.info('No files matched.')
|
|
149
|
+
} else if (changed === 0) {
|
|
150
|
+
console.info(`No to-tailwind changes found in ${files.length} file(s).`)
|
|
151
|
+
} else if (write) {
|
|
152
|
+
console.info(`Converted ${changed} of ${files.length} file(s).`)
|
|
153
|
+
} else {
|
|
154
|
+
console.info(
|
|
155
|
+
`\n[dry-run] ${changed} of ${files.length} file(s) would change. Run with --write to apply.`
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
files: files.length,
|
|
161
|
+
changed,
|
|
162
|
+
written,
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async function collectFiles(patterns: string[], cwd: string) {
|
|
167
|
+
const files = new Set<string>()
|
|
168
|
+
|
|
169
|
+
for (const pattern of patterns) {
|
|
170
|
+
const resolved = resolve(cwd, pattern)
|
|
171
|
+
const existing = await stat(resolved).catch(() => null)
|
|
172
|
+
|
|
173
|
+
if (existing?.isDirectory()) {
|
|
174
|
+
for (const file of await glob(defaultFileGlob, {
|
|
175
|
+
cwd: resolved,
|
|
176
|
+
absolute: true,
|
|
177
|
+
nodir: true,
|
|
178
|
+
ignore: ignoredGlobs,
|
|
179
|
+
})) {
|
|
180
|
+
files.add(resolve(file))
|
|
181
|
+
}
|
|
182
|
+
continue
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (existing?.isFile()) {
|
|
186
|
+
if (isCodeFile(resolved)) {
|
|
187
|
+
files.add(resolved)
|
|
188
|
+
}
|
|
189
|
+
continue
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
for (const file of await glob(pattern, {
|
|
193
|
+
cwd,
|
|
194
|
+
absolute: true,
|
|
195
|
+
nodir: true,
|
|
196
|
+
ignore: ignoredGlobs,
|
|
197
|
+
})) {
|
|
198
|
+
if (isCodeFile(file)) {
|
|
199
|
+
files.add(resolve(file))
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return [...files].sort()
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function createDiff(file: string, source: string, transformed: string, cwd: string) {
|
|
208
|
+
const displayPath = toPosixPath(relative(cwd, file) || file)
|
|
209
|
+
return createTwoFilesPatch(
|
|
210
|
+
displayPath,
|
|
211
|
+
displayPath,
|
|
212
|
+
source,
|
|
213
|
+
transformed,
|
|
214
|
+
'before',
|
|
215
|
+
'after',
|
|
216
|
+
{
|
|
217
|
+
context: 3,
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function isCodeFile(file: string) {
|
|
223
|
+
return codeFileExtensions.has(extname(file))
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function toPosixPath(path: string) {
|
|
227
|
+
return path.split(sep).join('/')
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Load the app's token/font/theme NAMES plus media/shorthands. Token values are never baked into
|
|
231
|
+
// output; names are used only to reject missing or ambiguous candidates. We take the explicit-path
|
|
232
|
+
// route (`--config <path>`) rather than auto-discovering + bundling `tamagui.config.ts`: a real
|
|
233
|
+
// tamagui config is TS with `~`/`@` aliases and needs the app's bundler to evaluate, which the
|
|
234
|
+
// CLI can't reliably do — an explicit path the user has already made requireable (or a small
|
|
235
|
+
// module re-exporting the relevant config view) is the honest, non-magical contract. An explicit
|
|
236
|
+
// config that fails to load or has an invalid relevant shape aborts. The bundled-config opt-in
|
|
237
|
+
// loads canonical v5 domains; config-less dry-run leaves token/font/theme domains unknown.
|
|
238
|
+
async function loadTransformConfig(
|
|
239
|
+
configPath: string | undefined,
|
|
240
|
+
useDefaultConfig: boolean,
|
|
241
|
+
cwd: string
|
|
242
|
+
): Promise<{ transformConfig: TransformConfig; usedDefault: boolean }> {
|
|
243
|
+
if (!configPath) {
|
|
244
|
+
if (useDefaultConfig) {
|
|
245
|
+
// --use-default-config is an authoritative opt-in. The local snapshot contains names only;
|
|
246
|
+
// a focused dev-only parity test checks every domain against the canonical v5 config.
|
|
247
|
+
return {
|
|
248
|
+
transformConfig: { grammarConfig: bundledDefaultGrammarConfig },
|
|
249
|
+
usedDefault: true,
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// Config-less dry-run keeps domains unknown and uses converter media/shorthand defaults.
|
|
253
|
+
return { transformConfig: {}, usedDefault: true }
|
|
254
|
+
}
|
|
255
|
+
const resolved = resolve(cwd, configPath)
|
|
256
|
+
let mod: any
|
|
257
|
+
try {
|
|
258
|
+
mod = require(resolved)
|
|
259
|
+
} catch (requireErr) {
|
|
260
|
+
try {
|
|
261
|
+
mod = await import(resolved)
|
|
262
|
+
} catch {
|
|
263
|
+
throw new Error(
|
|
264
|
+
`--config ${configPath} could not be loaded (${(requireErr as Error).message}) — ` +
|
|
265
|
+
`aborted (not falling back to defaults).`
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
const config = mod?.config ?? mod?.default ?? mod?.tamaguiConfig ?? mod
|
|
270
|
+
const tokens = config?.tokens
|
|
271
|
+
const fonts = config?.fonts
|
|
272
|
+
const themes = config?.themes
|
|
273
|
+
const media = config?.media
|
|
274
|
+
const shorthands = config?.shorthands
|
|
275
|
+
|
|
276
|
+
// Structure validation: malformed relevant config must abort rather than silently fall back.
|
|
277
|
+
const isObj = (v: any) => v != null && typeof v === 'object' && !Array.isArray(v)
|
|
278
|
+
const bad = (msg: string) => {
|
|
279
|
+
throw new Error(`--config ${configPath} has a malformed shape: ${msg} — aborted.`)
|
|
280
|
+
}
|
|
281
|
+
if (tokens !== undefined) {
|
|
282
|
+
if (!isObj(tokens)) bad('`tokens` must be an object')
|
|
283
|
+
for (const category of ['space', 'size', 'radius', 'zIndex', 'color']) {
|
|
284
|
+
if (tokens[category] !== undefined && !isObj(tokens[category])) {
|
|
285
|
+
bad(`\`tokens.${category}\` must be an object`)
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (fonts !== undefined && !isObj(fonts)) bad('`fonts` must be an object')
|
|
290
|
+
if (themes !== undefined && !isObj(themes)) bad('`themes` must be an object')
|
|
291
|
+
if (media !== undefined && !isObj(media)) bad('`media` must be an object')
|
|
292
|
+
if (shorthands !== undefined && !isObj(shorthands))
|
|
293
|
+
bad('`shorthands` must be an object')
|
|
294
|
+
if (!tokens && !fonts && !themes && !media && !shorthands) {
|
|
295
|
+
bad('exposes no { tokens, fonts, themes, media, shorthands }')
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
transformConfig: { tokens, fonts, themes, media, shorthands },
|
|
299
|
+
usedDefault: false,
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function loadTamaguiToTailwind(): Transform {
|
|
304
|
+
const { tamaguiToTailwind } = require('@tamagui/to-tailwind') as {
|
|
305
|
+
tamaguiToTailwind?: Transform
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (typeof tamaguiToTailwind !== 'function') {
|
|
309
|
+
throw new Error('@tamagui/to-tailwind did not export tamaguiToTailwind')
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return tamaguiToTailwind
|
|
313
|
+
}
|
package/src/utils.ts
CHANGED
|
@@ -17,16 +17,11 @@ export async function getOptions({
|
|
|
17
17
|
let config = ''
|
|
18
18
|
try {
|
|
19
19
|
config = await getDefaultTamaguiConfigPath()
|
|
20
|
+
} catch {}
|
|
21
|
+
|
|
22
|
+
try {
|
|
20
23
|
pkgJson = await readJSON(join(root, 'package.json'))
|
|
21
|
-
} catch {
|
|
22
|
-
if (loadTamaguiOptions) {
|
|
23
|
-
console.warn(
|
|
24
|
-
chalk.yellow(
|
|
25
|
-
`Warning: no tamagui.config.ts found in ${root}. Commands that need a config may fail.`
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
24
|
+
} catch {}
|
|
30
25
|
|
|
31
26
|
const filledOptions = {
|
|
32
27
|
platform: 'native',
|
|
@@ -39,6 +34,13 @@ export async function getOptions({
|
|
|
39
34
|
if (loadTamaguiOptions) {
|
|
40
35
|
const { loadTamaguiBuildConfigSync } = require('@tamagui/static/loadTamagui')
|
|
41
36
|
finalOptions = loadTamaguiBuildConfigSync(filledOptions)
|
|
37
|
+
if (!finalOptions.config) {
|
|
38
|
+
console.warn(
|
|
39
|
+
chalk.yellow(
|
|
40
|
+
`Warning: no Tamagui config found in ${root}. Commands that need a config may fail.`
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
return {
|
package/types/add.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const generatedPackageTypes: readonly [
|
|
1
|
+
export declare const generatedPackageTypes: readonly ['font', 'icon'];
|
|
2
2
|
export declare const installGeneratedPackage: (type: string, packagesPath?: string) => Promise<void>;
|
|
3
3
|
//# sourceMappingURL=add.d.ts.map
|
package/types/add.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../src/add.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../src/add.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,qBAAqB,YAAI,MAAM,EAAE,MAAM,CAAU,CAAA;AAC9D,eAAO,MAAM,uBAAuB,SAAgB,MAAM,iBAAiB,MAAM,kBAqGhF,CAAA"}
|
package/types/build.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type BuildResult = {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function insertCssImport(jsContent: string, cssImport: string): string;
|
|
23
23
|
export declare const build: (options: CLIResolvedOptions & {
|
|
24
|
-
target?:
|
|
24
|
+
target?: 'web' | 'native' | 'both';
|
|
25
25
|
dir?: string;
|
|
26
26
|
include?: string;
|
|
27
27
|
exclude?: string;
|
package/types/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,gBAAgB,CAAA;AAuBxE,MAAM,MAAM,UAAU,GAAG;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,UAAU,CAAA;IACjB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAW5E;AAED,eAAO,MAAM,KAAK,YACP,kBAAkB,GAAG;IAC5B,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KACA,OAAO,CAAC,WAAW,CAuhBrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,QAE/D;AAED,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,UAkBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-prompt.d.ts","sourceRoot":"","sources":["../src/setup-prompt.ts"],"names":[],"mappings":"AAOA,wBAAgB,gBAAgB,SAE/B;AAED,wBAAgB,cAAc,WA+H7B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const bundledDefaultGrammarConfig: {
|
|
2
|
+
shorthands: {
|
|
3
|
+
text: string;
|
|
4
|
+
b: string;
|
|
5
|
+
bg: string;
|
|
6
|
+
content: string;
|
|
7
|
+
grow: string;
|
|
8
|
+
h: string;
|
|
9
|
+
items: string;
|
|
10
|
+
justify: string;
|
|
11
|
+
l: string;
|
|
12
|
+
m: string;
|
|
13
|
+
maxH: string;
|
|
14
|
+
maxW: string;
|
|
15
|
+
mb: string;
|
|
16
|
+
minH: string;
|
|
17
|
+
minW: string;
|
|
18
|
+
ml: string;
|
|
19
|
+
mr: string;
|
|
20
|
+
mt: string;
|
|
21
|
+
mx: string;
|
|
22
|
+
my: string;
|
|
23
|
+
p: string;
|
|
24
|
+
pb: string;
|
|
25
|
+
pl: string;
|
|
26
|
+
pr: string;
|
|
27
|
+
pt: string;
|
|
28
|
+
px: string;
|
|
29
|
+
py: string;
|
|
30
|
+
r: string;
|
|
31
|
+
rounded: string;
|
|
32
|
+
select: string;
|
|
33
|
+
self: string;
|
|
34
|
+
shrink: string;
|
|
35
|
+
t: string;
|
|
36
|
+
w: string;
|
|
37
|
+
z: string;
|
|
38
|
+
};
|
|
39
|
+
mediaNames: string[];
|
|
40
|
+
themeNames: string[];
|
|
41
|
+
tokenNames: {
|
|
42
|
+
space: string[];
|
|
43
|
+
size: string[];
|
|
44
|
+
radius: string[];
|
|
45
|
+
zIndex: never[];
|
|
46
|
+
color: string[];
|
|
47
|
+
fontFamily: string[];
|
|
48
|
+
fontSize: string[];
|
|
49
|
+
lineHeight: string[];
|
|
50
|
+
letterSpacing: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=to-tailwind-default-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-tailwind-default-config.d.ts","sourceRoot":"","sources":["../src/to-tailwind-default-config.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,2BAA2B;IACtC,UAAU;QACR,IAAI;QACJ,CAAC;QACD,EAAE;QACF,OAAO;QACP,IAAI;QACJ,CAAC;QACD,KAAK;QACL,OAAO;QACP,CAAC;QACD,CAAC;QACD,IAAI;QACJ,IAAI;QACJ,EAAE;QACF,IAAI;QACJ,IAAI;QACJ,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,CAAC;QACD,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,CAAC;QACD,OAAO;QACP,MAAM;QACN,IAAI;QACJ,MAAM;QACN,CAAC;QACD,CAAC;QACD,CAAC;;IAEH,UAAU;IAiCV,UAAU;IAkIV,UAAU;QACR,KAAK;QAuEL,IAAI;QAqCJ,MAAM;QAwBN,MAAM;QACN,KAAK;QAgVL,UAAU;QACV,QAAQ;QA+BR,UAAU;QA+BV,aAAa;;CAmBhB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ToTailwindOptions = {
|
|
2
|
+
patterns: string[];
|
|
3
|
+
write?: boolean;
|
|
4
|
+
cwd?: string;
|
|
5
|
+
configPath?: string;
|
|
6
|
+
useDefaultConfig?: boolean;
|
|
7
|
+
renameDom?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type ToTailwindResult = {
|
|
10
|
+
files: number;
|
|
11
|
+
changed: number;
|
|
12
|
+
written: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function toTailwind({ patterns, write, cwd, configPath, useDefaultConfig, renameDom, }: ToTailwindOptions): Promise<ToTailwindResult>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=to-tailwind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-tailwind.d.ts","sourceRoot":"","sources":["../src/to-tailwind.ts"],"names":[],"mappings":"AAWA,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAG1B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAYD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAwBD,wBAAsB,UAAU,CAAC,EAC/B,QAAQ,EACR,KAAa,EACb,GAAmB,EACnB,UAAU,EACV,gBAAwB,EACxB,SAAiB,GAClB,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8F/C"}
|
package/types/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAKxE,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,KAAK,EACL,kBAAkB,GACnB,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAKxE,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,KAAK,EACL,kBAAkB,GACnB,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA+C5D;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAKzD;AAiBD,eAAO,MAAM,WAAW,SAChB,OAAO,CAAC,cAAc,CAAC,KAC5B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAQnC,CAAA;AAID,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,QAE7C;AAED,wBAAgB,UAAU,SAEzB"}
|
package/vite.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@tamagui/vite-plugin')
|
package/vite.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@tamagui/vite-plugin'
|
package/vite.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@tamagui/vite-plugin'
|