@tamagui/static 1.92.1 → 1.93.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/extractor/bundle.js +4 -4
- package/dist/cjs/extractor/bundle.js.map +1 -1
- package/dist/cjs/extractor/bundle.native.js +4 -4
- package/dist/cjs/extractor/bundle.native.js.map +2 -2
- package/dist/cjs/extractor/bundleConfig.js +10 -10
- package/dist/cjs/extractor/bundleConfig.js.map +1 -1
- package/dist/cjs/extractor/bundleConfig.native.js +10 -10
- package/dist/cjs/extractor/bundleConfig.native.js.map +2 -2
- package/dist/cjs/extractor/createExtractor.js +10 -4
- package/dist/cjs/extractor/createExtractor.js.map +1 -1
- package/dist/cjs/extractor/createExtractor.native.js +3 -3
- package/dist/cjs/extractor/createExtractor.native.js.map +2 -2
- package/dist/cjs/extractor/extractHelpers.js +1 -1
- package/dist/cjs/extractor/extractHelpers.js.map +1 -1
- package/dist/cjs/extractor/extractHelpers.native.js +1 -1
- package/dist/cjs/extractor/extractHelpers.native.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.js +8 -2
- package/dist/cjs/extractor/extractMediaStyle.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.native.js +2 -2
- package/dist/cjs/extractor/extractMediaStyle.native.js.map +2 -2
- package/dist/cjs/extractor/extractToClassNames.js +3 -2
- package/dist/cjs/extractor/extractToClassNames.js.map +1 -1
- package/dist/cjs/extractor/extractToClassNames.native.js +3 -2
- package/dist/cjs/extractor/extractToClassNames.native.js.map +2 -2
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js +12 -8
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js.map +2 -2
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +7 -7
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +2 -2
- package/dist/cjs/extractor/generatedUid.js.map +1 -1
- package/dist/cjs/extractor/generatedUid.native.js.map +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.js +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.js +13 -45
- package/dist/cjs/extractor/loadTamagui.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.native.js +16 -78
- package/dist/cjs/extractor/loadTamagui.native.js.map +2 -2
- package/dist/cjs/extractor/watchTamaguiConfig.js +53 -0
- package/dist/cjs/extractor/watchTamaguiConfig.js.map +6 -0
- package/dist/cjs/extractor/watchTamaguiConfig.native.js +203 -0
- package/dist/cjs/extractor/watchTamaguiConfig.native.js.map +6 -0
- package/dist/cjs/index.js +18 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +30 -4
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/registerRequire.js +2 -2
- package/dist/cjs/registerRequire.js.map +1 -1
- package/dist/cjs/registerRequire.native.js +3 -3
- package/dist/cjs/registerRequire.native.js.map +2 -2
- package/dist/esm/extractor/bundle.js +4 -4
- package/dist/esm/extractor/bundle.js.map +1 -1
- package/dist/esm/extractor/bundle.mjs +4 -4
- package/dist/esm/extractor/bundle.native.js +4 -4
- package/dist/esm/extractor/bundle.native.js.map +2 -2
- package/dist/esm/extractor/bundleConfig.js +10 -10
- package/dist/esm/extractor/bundleConfig.js.map +1 -1
- package/dist/esm/extractor/bundleConfig.mjs +10 -10
- package/dist/esm/extractor/bundleConfig.native.js +10 -10
- package/dist/esm/extractor/bundleConfig.native.js.map +2 -2
- package/dist/esm/extractor/createExtractor.js +10 -4
- package/dist/esm/extractor/createExtractor.js.map +1 -1
- package/dist/esm/extractor/createExtractor.mjs +4 -4
- package/dist/esm/extractor/createExtractor.native.js +3 -3
- package/dist/esm/extractor/createExtractor.native.js.map +2 -2
- package/dist/esm/extractor/extractHelpers.js +1 -1
- package/dist/esm/extractor/extractHelpers.js.map +1 -1
- package/dist/esm/extractor/extractHelpers.mjs +1 -1
- package/dist/esm/extractor/extractHelpers.native.js +1 -1
- package/dist/esm/extractor/extractHelpers.native.js.map +1 -1
- package/dist/esm/extractor/extractMediaStyle.js +8 -2
- package/dist/esm/extractor/extractMediaStyle.js.map +1 -1
- package/dist/esm/extractor/extractMediaStyle.mjs +2 -2
- package/dist/esm/extractor/extractMediaStyle.native.js +2 -2
- package/dist/esm/extractor/extractMediaStyle.native.js.map +2 -2
- package/dist/esm/extractor/extractToClassNames.js +3 -2
- package/dist/esm/extractor/extractToClassNames.js.map +1 -1
- package/dist/esm/extractor/extractToClassNames.mjs +3 -2
- package/dist/esm/extractor/extractToClassNames.native.js +3 -2
- package/dist/esm/extractor/extractToClassNames.native.js.map +2 -2
- package/dist/esm/extractor/generateTamaguiStudioConfig.js +12 -8
- package/dist/esm/extractor/generateTamaguiStudioConfig.js.map +1 -1
- package/dist/esm/extractor/generateTamaguiStudioConfig.mjs +6 -6
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +7 -7
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +2 -2
- package/dist/esm/extractor/generatedUid.js.map +1 -1
- package/dist/esm/extractor/generatedUid.native.js.map +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.js +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.mjs +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.native.js +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +1 -1
- package/dist/esm/extractor/loadTamagui.js +14 -47
- package/dist/esm/extractor/loadTamagui.js.map +1 -1
- package/dist/esm/extractor/loadTamagui.mjs +13 -41
- package/dist/esm/extractor/loadTamagui.native.js +15 -77
- package/dist/esm/extractor/loadTamagui.native.js.map +2 -2
- package/dist/esm/extractor/watchTamaguiConfig.js +38 -0
- package/dist/esm/extractor/watchTamaguiConfig.js.map +6 -0
- package/dist/esm/extractor/watchTamaguiConfig.mjs +31 -0
- package/dist/esm/extractor/watchTamaguiConfig.native.js +183 -0
- package/dist/esm/extractor/watchTamaguiConfig.native.js.map +6 -0
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +13 -2
- package/dist/esm/index.native.js +15 -1
- package/dist/esm/index.native.js.map +2 -2
- package/dist/esm/registerRequire.js +2 -2
- package/dist/esm/registerRequire.js.map +1 -1
- package/dist/esm/registerRequire.mjs +3 -3
- package/dist/esm/registerRequire.native.js +3 -3
- package/dist/esm/registerRequire.native.js.map +2 -2
- package/package.json +25 -19
- package/src/extractor/bundle.ts +4 -4
- package/src/extractor/bundleConfig.ts +10 -10
- package/src/extractor/createExtractor.ts +10 -4
- package/src/extractor/extractHelpers.ts +1 -1
- package/src/extractor/extractMediaStyle.ts +8 -2
- package/src/extractor/extractToClassNames.ts +3 -2
- package/src/extractor/generateTamaguiStudioConfig.ts +14 -10
- package/src/extractor/generatedUid.ts +0 -1
- package/src/extractor/getStaticBindingsForScope.ts +5 -1
- package/src/extractor/loadTamagui.ts +14 -57
- package/src/extractor/watchTamaguiConfig.ts +46 -0
- package/src/index.ts +11 -1
- package/src/registerRequire.ts +2 -3
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/extractMediaStyle.d.ts +3 -2
- package/types/extractor/extractMediaStyle.d.ts.map +1 -1
- package/types/extractor/extractToClassNames.d.ts.map +1 -1
- package/types/extractor/generateTamaguiStudioConfig.d.ts.map +1 -1
- package/types/extractor/generatedUid.d.ts.map +1 -1
- package/types/extractor/getStaticBindingsForScope.d.ts.map +1 -1
- package/types/extractor/loadTamagui.d.ts +3 -4
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/types/extractor/watchTamaguiConfig.d.ts +5 -0
- package/types/extractor/watchTamaguiConfig.d.ts.map +1 -0
- package/types/index.d.ts +11 -1
- package/types/index.d.ts.map +1 -1
- package/types/registerRequire.d.ts.map +1 -1
- package/src/static.ts +0 -10
@@ -5,14 +5,15 @@ import { Color, colorLog } from '@tamagui/cli-color'
|
|
5
5
|
import type { CLIResolvedOptions, CLIUserOptions, TamaguiOptions } from '@tamagui/types'
|
6
6
|
import type { TamaguiInternalConfig } from '@tamagui/web'
|
7
7
|
import esbuild from 'esbuild'
|
8
|
-
import
|
8
|
+
import * as fsExtra from 'fs-extra'
|
9
9
|
|
10
|
+
import { readFile } from 'fs/promises'
|
10
11
|
import { SHOULD_DEBUG } from '../constants'
|
11
12
|
import { requireTamaguiCore } from '../helpers/requireTamaguiCore'
|
12
13
|
import { minifyCSS } from '../minifyCSS'
|
13
14
|
import { getNameToPaths, registerRequire } from '../registerRequire'
|
14
15
|
import {
|
15
|
-
TamaguiProjectInfo,
|
16
|
+
type TamaguiProjectInfo,
|
16
17
|
getBundledConfig,
|
17
18
|
hasBundledConfigChanged,
|
18
19
|
loadComponents,
|
@@ -23,7 +24,6 @@ import {
|
|
23
24
|
generateTamaguiThemes,
|
24
25
|
} from './generateTamaguiStudioConfig'
|
25
26
|
import { getTamaguiConfigPathFromOptionsConfig } from './getTamaguiConfigPathFromOptionsConfig'
|
26
|
-
import { readFile } from 'fs/promises'
|
27
27
|
|
28
28
|
const getFilledOptions = (propsIn: Partial<TamaguiOptions>): TamaguiOptions => ({
|
29
29
|
// defaults
|
@@ -55,7 +55,7 @@ export async function loadTamagui(
|
|
55
55
|
|
56
56
|
// this depends on the config so run it after
|
57
57
|
if (bundleInfo) {
|
58
|
-
const { createTamagui } = requireTamaguiCore(props.platform)
|
58
|
+
const { createTamagui } = requireTamaguiCore(props.platform || 'web')
|
59
59
|
|
60
60
|
// init config
|
61
61
|
const config = createTamagui(bundleInfo.tamaguiConfig) as any
|
@@ -64,7 +64,7 @@ export async function loadTamagui(
|
|
64
64
|
if (outputCSS && props.platform === 'web') {
|
65
65
|
const flush = async () => {
|
66
66
|
colorLog(Color.FgYellow, ` ➡ [tamagui] output css: ${outputCSS}\n`)
|
67
|
-
await writeFile(outputCSS, css)
|
67
|
+
await fsExtra.writeFile(outputCSS, css)
|
68
68
|
}
|
69
69
|
// default to not minifying it messes up ssr parsing
|
70
70
|
const cssOut = config.getCSS()
|
@@ -92,7 +92,7 @@ export async function loadTamagui(
|
|
92
92
|
let waiting = false
|
93
93
|
let hasLoggedOnce = false
|
94
94
|
|
95
|
-
const generateThemesAndLog = async (options: TamaguiOptions, force = false) => {
|
95
|
+
export const generateThemesAndLog = async (options: TamaguiOptions, force = false) => {
|
96
96
|
if (waiting) return
|
97
97
|
if (!options.themeBuilder) return
|
98
98
|
try {
|
@@ -123,7 +123,7 @@ export function loadTamaguiBuildConfigSync(
|
|
123
123
|
tamaguiOptions: Partial<TamaguiOptions> | undefined
|
124
124
|
) {
|
125
125
|
const buildFilePath = tamaguiOptions?.buildFile ?? 'tamagui.build.ts'
|
126
|
-
if (existsSync(buildFilePath)) {
|
126
|
+
if (fsExtra.existsSync(buildFilePath)) {
|
127
127
|
const registered = registerRequire('web')
|
128
128
|
try {
|
129
129
|
const out = require(buildFilePath).default
|
@@ -176,7 +176,7 @@ export function loadTamaguiSync({
|
|
176
176
|
process.env.IS_STATIC = 'is_static'
|
177
177
|
process.env.TAMAGUI_IS_SERVER = 'true'
|
178
178
|
|
179
|
-
const { unregister } = registerRequire(props.platform, {
|
179
|
+
const { unregister } = registerRequire(props.platform || 'web', {
|
180
180
|
proxyWormImports: !!forceExports,
|
181
181
|
})
|
182
182
|
|
@@ -202,7 +202,7 @@ export function loadTamaguiSync({
|
|
202
202
|
|
203
203
|
// set up core
|
204
204
|
if (tamaguiConfig) {
|
205
|
-
const { createTamagui } = requireTamaguiCore(props.platform)
|
205
|
+
const { createTamagui } = requireTamaguiCore(props.platform || 'web')
|
206
206
|
createTamagui(tamaguiConfig as any)
|
207
207
|
}
|
208
208
|
}
|
@@ -275,7 +275,7 @@ export function loadTamaguiSync({
|
|
275
275
|
console.error(`Error loading tamagui.config.ts`, err)
|
276
276
|
}
|
277
277
|
|
278
|
-
const { createTamagui } = requireTamaguiCore(props.platform)
|
278
|
+
const { createTamagui } = requireTamaguiCore(props.platform || 'web')
|
279
279
|
const { getDefaultTamaguiConfig } = require('@tamagui/config-default')
|
280
280
|
|
281
281
|
return {
|
@@ -300,7 +300,7 @@ export async function getOptions({
|
|
300
300
|
let pkgJson = {}
|
301
301
|
|
302
302
|
try {
|
303
|
-
pkgJson = await readJSON(join(root, 'package.json'))
|
303
|
+
pkgJson = await fsExtra.readJSON(join(root, 'package.json'))
|
304
304
|
} catch (err) {
|
305
305
|
// ok
|
306
306
|
}
|
@@ -334,7 +334,7 @@ export function resolveWebOrNativeSpecificEntry(entry: string) {
|
|
334
334
|
const fileName = basename(resolved).replace(ext, '')
|
335
335
|
const specificExt = process.env.TAMAGUI_TARGET === 'web' ? 'web' : 'native'
|
336
336
|
const specificFile = join(dirname(resolved), fileName + '.' + specificExt + ext)
|
337
|
-
if (existsSync(specificFile)) {
|
337
|
+
if (fsExtra.existsSync(specificFile)) {
|
338
338
|
return specificFile
|
339
339
|
}
|
340
340
|
return entry
|
@@ -351,7 +351,7 @@ async function getDefaultTamaguiConfigPath(root: string, configPath?: string) {
|
|
351
351
|
]
|
352
352
|
|
353
353
|
for (const path of searchPaths) {
|
354
|
-
if (await pathExists(path)) {
|
354
|
+
if (await fsExtra.pathExists(path)) {
|
355
355
|
return path
|
356
356
|
}
|
357
357
|
}
|
@@ -366,50 +366,7 @@ async function getDefaultTamaguiConfigPath(root: string, configPath?: string) {
|
|
366
366
|
|
367
367
|
export { TamaguiProjectInfo }
|
368
368
|
|
369
|
-
export async function
|
370
|
-
const options = await getOptions({ tamaguiOptions })
|
371
|
-
|
372
|
-
if (!options.tamaguiOptions.config) {
|
373
|
-
throw new Error(`No config`)
|
374
|
-
}
|
375
|
-
|
376
|
-
if (process.env.NODE_ENV === 'production') {
|
377
|
-
return {
|
378
|
-
dispose() {},
|
379
|
-
}
|
380
|
-
}
|
381
|
-
|
382
|
-
const disposeConfigWatcher = await esbuildWatchFiles(
|
383
|
-
options.tamaguiOptions.config,
|
384
|
-
() => {
|
385
|
-
void generateTamaguiStudioConfig(options.tamaguiOptions, null, true)
|
386
|
-
}
|
387
|
-
)
|
388
|
-
|
389
|
-
const themeBuilderInput = options.tamaguiOptions.themeBuilder?.input
|
390
|
-
let disposeThemesWatcher: Function | undefined
|
391
|
-
|
392
|
-
if (themeBuilderInput) {
|
393
|
-
let inputPath = themeBuilderInput
|
394
|
-
try {
|
395
|
-
inputPath = require.resolve(themeBuilderInput)
|
396
|
-
} catch {
|
397
|
-
// ok
|
398
|
-
}
|
399
|
-
disposeThemesWatcher = await esbuildWatchFiles(inputPath, () => {
|
400
|
-
void generateThemesAndLog(options.tamaguiOptions)
|
401
|
-
})
|
402
|
-
}
|
403
|
-
|
404
|
-
return {
|
405
|
-
dispose() {
|
406
|
-
disposeConfigWatcher()
|
407
|
-
disposeThemesWatcher?.()
|
408
|
-
},
|
409
|
-
}
|
410
|
-
}
|
411
|
-
|
412
|
-
async function esbuildWatchFiles(entry: string, onChanged: () => void) {
|
369
|
+
export async function esbuildWatchFiles(entry: string, onChanged: () => void) {
|
413
370
|
let hasRunOnce = false
|
414
371
|
|
415
372
|
/**
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { TamaguiOptions } from '@tamagui/types'
|
2
|
+
import { generateTamaguiStudioConfig } from './generateTamaguiStudioConfig'
|
3
|
+
import { getOptions, esbuildWatchFiles, generateThemesAndLog } from './loadTamagui'
|
4
|
+
|
5
|
+
export async function watchTamaguiConfig(tamaguiOptions: TamaguiOptions) {
|
6
|
+
const options = await getOptions({ tamaguiOptions })
|
7
|
+
|
8
|
+
if (!options.tamaguiOptions.config) {
|
9
|
+
throw new Error(`No config`)
|
10
|
+
}
|
11
|
+
|
12
|
+
if (process.env.NODE_ENV === 'production') {
|
13
|
+
return {
|
14
|
+
dispose() {},
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
const disposeConfigWatcher = await esbuildWatchFiles(
|
19
|
+
options.tamaguiOptions.config,
|
20
|
+
() => {
|
21
|
+
void generateTamaguiStudioConfig(options.tamaguiOptions, null, true)
|
22
|
+
}
|
23
|
+
)
|
24
|
+
|
25
|
+
const themeBuilderInput = options.tamaguiOptions.themeBuilder?.input
|
26
|
+
let disposeThemesWatcher: Function | undefined
|
27
|
+
|
28
|
+
if (themeBuilderInput) {
|
29
|
+
let inputPath = themeBuilderInput
|
30
|
+
try {
|
31
|
+
inputPath = require.resolve(themeBuilderInput)
|
32
|
+
} catch {
|
33
|
+
// ok
|
34
|
+
}
|
35
|
+
disposeThemesWatcher = await esbuildWatchFiles(inputPath, () => {
|
36
|
+
void generateThemesAndLog(options.tamaguiOptions)
|
37
|
+
})
|
38
|
+
}
|
39
|
+
|
40
|
+
return {
|
41
|
+
dispose() {
|
42
|
+
disposeConfigWatcher()
|
43
|
+
disposeThemesWatcher?.()
|
44
|
+
},
|
45
|
+
}
|
46
|
+
}
|
package/src/index.ts
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
import './setup'
|
2
|
-
export * from './static'
|
3
2
|
export * from './minifyCSS'
|
4
3
|
export * from './checkDeps'
|
4
|
+
export * from './types'
|
5
|
+
export { createExtractor } from './extractor/createExtractor'
|
6
|
+
export { literalToAst } from './extractor/literalToAst'
|
7
|
+
export * from './constants'
|
8
|
+
export * from './extractor/extractToClassNames'
|
9
|
+
export * from './extractor/extractHelpers'
|
10
|
+
export * from './extractor/loadTamagui'
|
11
|
+
export * from './extractor/watchTamaguiConfig'
|
12
|
+
export * from './extractor/createLogger'
|
13
|
+
export * from './registerRequire'
|
14
|
+
export * from './getPragmaOptions'
|
package/src/registerRequire.ts
CHANGED
@@ -5,12 +5,12 @@ import type { TamaguiPlatform } from './types'
|
|
5
5
|
import { esbuildIgnoreFilesRegex } from './extractor/bundle'
|
6
6
|
|
7
7
|
const nameToPaths = {}
|
8
|
-
const Module = require('module')
|
9
8
|
|
10
9
|
export const getNameToPaths = () => nameToPaths
|
11
10
|
|
11
|
+
const Module = require('module')
|
12
|
+
const packageJson = require('react-native-web/package.json')
|
12
13
|
const proxyWorm = require('@tamagui/proxy-worm')
|
13
|
-
// TODO can swap with react-native-web-lite
|
14
14
|
const rnw = require('react-native-web')
|
15
15
|
|
16
16
|
let isRegistered = false
|
@@ -176,7 +176,6 @@ export function registerRequire(
|
|
176
176
|
}
|
177
177
|
}
|
178
178
|
|
179
|
-
const packageJson = require('react-native-web/package.json')
|
180
179
|
const IGNORES = process.env.TAMAGUI_IGNORE_BUNDLE_ERRORS
|
181
180
|
const extraIgnores =
|
182
181
|
IGNORES === 'true' ? [] : process.env.TAMAGUI_IGNORE_BUNDLE_ERRORS?.split(',')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAGV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAcxD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,6BAA6B,CAAA;AAuB1F,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAQ9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,QAAgB,EAAE,GAAE,gBAAsC;;;;;yBAwDnD,cAAc;6BAPhB,cAAc;;mBAwBtB,UAAU,SAAS,mBAAmB;;;;;;;eAIpC,UAAU,SAAS,mBAAmB;;;;;;;
|
1
|
+
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAGV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAcxD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,6BAA6B,CAAA;AAuB1F,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAQ9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,QAAgB,EAAE,GAAE,gBAAsC;;;;;yBAwDnD,cAAc;6BAPhB,cAAc;;mBAwBtB,UAAU,SAAS,mBAAmB;;;;;;;eAIpC,UAAU,SAAS,mBAAmB;;;;;;;EA4sE1D"}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
2
2
|
import * as t from '@babel/types';
|
3
3
|
import type { TamaguiInternalConfig } from '@tamagui/core';
|
4
|
-
import
|
4
|
+
import * as core from '@tamagui/core';
|
5
|
+
import type { TamaguiOptionsWithFileInfo, Ternary } from '../types';
|
5
6
|
export declare function extractMediaStyle(props: TamaguiOptionsWithFileInfo, ternary: Ternary, jsxPath: NodePath<t.JSXElement>, tamaguiConfig: TamaguiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
|
6
|
-
mediaStyles: StyleObject[];
|
7
|
+
mediaStyles: core.StyleObject[];
|
7
8
|
ternaryWithoutMedia: Ternary | null;
|
8
9
|
} | null;
|
9
10
|
export declare function isValidMediaCall(props: TamaguiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, init: t.Expression, sourcePath: string): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AAIrC,OAAO,KAAK,EAAe,0BAA0B,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGhF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,0BAA0B,EACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,aAAa,EAAE,qBAAqB,EACpC,UAAU,EAAE,MAAM,EAClB,UAAU,SAAI,EACd,gBAAgB,GAAE,OAAO,GAAG,SAAiB;;;SAmE9C;AA0FD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,0BAA0B,EACjC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,UAAU,EAAE,MAAM,WAenB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,KAAK,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAiBlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC,CAAA;AAED,wBAAsB,mBAAmB,CAAC,EACxC,SAAS,EACT,MAAM,EACN,UAAe,EACf,OAAO,EACP,gBAAgB,GACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,
|
1
|
+
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,KAAK,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAiBlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC,CAAA;AAED,wBAAsB,mBAAmB,CAAC,EACxC,SAAS,EACT,MAAM,EACN,UAAe,EACf,OAAO,EACP,gBAAgB,GACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAmZ9D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generateTamaguiStudioConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/generateTamaguiStudioConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAKpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAMnD;;GAEG;AAEH,wBAAsB,2BAA2B,CAC/C,cAAc,EAAE,cAAc,EAC9B,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,EAC/B,OAAO,UAAQ,iBAiBhB;AAED,wBAAgB,+BAA+B,CAC7C,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,aAAa,
|
1
|
+
{"version":3,"file":"generateTamaguiStudioConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/generateTamaguiStudioConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAKpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAMnD;;GAEG;AAEH,wBAAsB,2BAA2B,CAC/C,cAAc,EAAE,cAAc,EAC9B,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,EAC/B,OAAO,UAAQ,iBAiBhB;AAED,wBAAgB,+BAA+B,CAC7C,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,aAAa,QAiBtB;AAED,wBAAsB,qBAAqB,CACzC,cAAc,EAAE,cAAc,EAC9B,KAAK,UAAQ,gCAmCd"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generatedUid.d.ts","sourceRoot":"","sources":["../../src/extractor/generatedUid.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"generatedUid.d.ts","sourceRoot":"","sources":["../../src/extractor/generatedUid.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,cAAc,CAAC;IAC5B,SAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACpD;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgC5D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getStaticBindingsForScope.d.ts","sourceRoot":"","sources":["../../src/extractor/getStaticBindingsForScope.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;
|
1
|
+
{"version":3,"file":"getStaticBindingsForScope.d.ts","sourceRoot":"","sources":["../../src/extractor/getStaticBindingsForScope.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAuCjC,wBAAgB,iBAAiB,SAQhC;AAyCD,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EACtC,SAAS,sBAAe,EACxB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAC3C,gBAAgB,EAAE,OAAO,GAAG,SAAS,GACpC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAsI9B"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CLIResolvedOptions, CLIUserOptions, TamaguiOptions } from '@tamagui/types';
|
2
|
-
import { TamaguiProjectInfo } from './bundleConfig';
|
2
|
+
import { type TamaguiProjectInfo } from './bundleConfig';
|
3
3
|
export declare function loadTamagui(propsIn: Partial<TamaguiOptions>): Promise<TamaguiProjectInfo | null>;
|
4
|
+
export declare const generateThemesAndLog: (options: TamaguiOptions, force?: boolean) => Promise<void>;
|
4
5
|
export declare function loadTamaguiBuildConfigSync(tamaguiOptions: Partial<TamaguiOptions> | undefined): TamaguiOptions;
|
5
6
|
export declare function loadTamaguiSync({ forceExports, cacheKey, ...propsIn }: Partial<TamaguiOptions> & {
|
6
7
|
forceExports?: boolean;
|
@@ -9,7 +10,5 @@ export declare function loadTamaguiSync({ forceExports, cacheKey, ...propsIn }:
|
|
9
10
|
export declare function getOptions({ root, tsconfigPath, tamaguiOptions, host, debug, }?: Partial<CLIUserOptions>): Promise<CLIResolvedOptions>;
|
10
11
|
export declare function resolveWebOrNativeSpecificEntry(entry: string): string;
|
11
12
|
export { TamaguiProjectInfo };
|
12
|
-
export declare function
|
13
|
-
dispose(): void;
|
14
|
-
}>;
|
13
|
+
export declare function esbuildWatchFiles(entry: string, onChanged: () => void): Promise<() => void>;
|
15
14
|
//# sourceMappingURL=loadTamagui.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
1
|
+
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAUxF,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,gBAAgB,CAAA;AAgBvB,wBAAsB,WAAW,CAC/B,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAC/B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAmDpC;AAMD,eAAO,MAAM,oBAAoB,YAAmB,cAAc,mCAsBjE,CAAA;AAKD,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,kBA4BpD;AAGD,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,kBAAkB,CAiIrB;AAED,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,KAAK,GACN,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA8B5D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,UAW5D;AA0BD,OAAO,EAAE,kBAAkB,EAAE,CAAA;AAE7B,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,uBAoC3E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"watchTamaguiConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/watchTamaguiConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAIpD,wBAAsB,kBAAkB,CAAC,cAAc,EAAE,cAAc;;GAyCtE"}
|
package/types/index.d.ts
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
import './setup';
|
2
|
-
export * from './static';
|
3
2
|
export * from './minifyCSS';
|
4
3
|
export * from './checkDeps';
|
4
|
+
export * from './types';
|
5
|
+
export { createExtractor } from './extractor/createExtractor';
|
6
|
+
export { literalToAst } from './extractor/literalToAst';
|
7
|
+
export * from './constants';
|
8
|
+
export * from './extractor/extractToClassNames';
|
9
|
+
export * from './extractor/extractHelpers';
|
10
|
+
export * from './extractor/loadTamagui';
|
11
|
+
export * from './extractor/watchTamaguiConfig';
|
12
|
+
export * from './extractor/createLogger';
|
13
|
+
export * from './registerRequire';
|
14
|
+
export * from './getPragmaOptions';
|
5
15
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,cAAc,aAAa,CAAA;AAC3B,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,eAAO,MAAM,cAAc,UAAoB,CAAA;AAe/C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAEzD;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,EACzB,EAAE,gBAAgB,EAAE;;CAEnB;2BAsB6B,GAAG,QAAQ,MAAM;;EA2HhD"}
|
package/src/static.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
export * from './types'
|
2
|
-
export { createExtractor } from './extractor/createExtractor'
|
3
|
-
export { literalToAst } from './extractor/literalToAst'
|
4
|
-
export * from './constants'
|
5
|
-
export * from './extractor/extractToClassNames'
|
6
|
-
export * from './extractor/extractHelpers'
|
7
|
-
export * from './extractor/loadTamagui'
|
8
|
-
export * from './extractor/createLogger'
|
9
|
-
export * from './registerRequire'
|
10
|
-
export * from './getPragmaOptions'
|