@tamagui/static 1.0.1-beta.99 → 1.0.1-rc.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.
- package/dist/{cjs/constants.js → constants.js} +9 -4
- package/dist/constants.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/accessSafe.js +14 -2
- package/dist/{esm/extractor → extractor}/accessSafe.js.map +2 -2
- package/dist/{cjs/extractor → extractor}/babelParse.js +5 -1
- package/dist/extractor/babelParse.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/buildClassName.js +40 -9
- package/dist/extractor/buildClassName.js.map +7 -0
- package/dist/extractor/bundle.js +117 -0
- package/dist/extractor/bundle.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/createEvaluator.js +11 -8
- package/dist/extractor/createEvaluator.js.map +7 -0
- package/dist/extractor/createExtractor.js +1623 -0
- package/dist/extractor/createExtractor.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/ensureImportingConcat.js +18 -6
- package/dist/extractor/ensureImportingConcat.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/evaluateAstNode.js +14 -4
- package/dist/extractor/evaluateAstNode.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/extractHelpers.js +83 -12
- package/dist/extractor/extractHelpers.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/extractMediaStyle.js +46 -42
- package/dist/extractor/extractMediaStyle.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/extractToClassNames.js +144 -73
- package/dist/extractor/extractToClassNames.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/findTopmostFunction.js +1 -0
- package/dist/{cjs/extractor → extractor}/findTopmostFunction.js.map +2 -2
- package/dist/{cjs/extractor → extractor}/generatedUid.js +9 -2
- package/dist/{cjs/extractor → extractor}/generatedUid.js.map +3 -3
- package/dist/{cjs/extractor → extractor}/getPrefixLogs.js +1 -0
- package/dist/extractor/getPrefixLogs.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/getPropValueFromAttributes.js +24 -13
- package/dist/extractor/getPropValueFromAttributes.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/getSourceModule.js +5 -1
- package/dist/{esm/extractor → extractor}/getSourceModule.js.map +3 -3
- package/dist/{cjs/extractor → extractor}/getStaticBindingsForScope.js +89 -35
- package/dist/extractor/getStaticBindingsForScope.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/hoistClassNames.js +5 -1
- package/dist/{jsx/extractor → extractor}/hoistClassNames.js.map +3 -3
- package/dist/{cjs/extractor → extractor}/literalToAst.js +26 -30
- package/dist/{jsx/extractor → extractor}/literalToAst.js.map +2 -2
- package/dist/extractor/loadFile.js +21 -0
- package/dist/extractor/loadFile.js.map +7 -0
- package/dist/extractor/loadTamagui.js +427 -0
- package/dist/extractor/loadTamagui.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/logLines.js +2 -1
- package/dist/extractor/logLines.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/normalizeTernaries.js +13 -34
- package/dist/extractor/normalizeTernaries.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/removeUnusedHooks.js +5 -1
- package/dist/extractor/removeUnusedHooks.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/timer.js +9 -1
- package/dist/extractor/timer.js.map +7 -0
- package/dist/{cjs/extractor → extractor}/validHTMLAttributes.js +1 -0
- package/dist/{jsx/extractor → extractor}/validHTMLAttributes.js.map +2 -2
- package/dist/getPragmaOptions.js +68 -0
- package/dist/getPragmaOptions.js.map +7 -0
- package/dist/helpers/memoize.js +46 -0
- package/dist/helpers/memoize.js.map +7 -0
- package/dist/{cjs/index.js → index.js} +10 -8
- package/dist/index.js.map +7 -0
- package/dist/require.js +86 -0
- package/dist/require.js.map +7 -0
- package/dist/{cjs/types.js → types.js} +1 -0
- package/dist/types.js.map +7 -0
- package/dist/webpackPlugin.js +35 -0
- package/dist/webpackPlugin.js.map +7 -0
- package/package.json +40 -36
- package/src/constants.ts +2 -1
- package/src/extractor/babelParse.ts +3 -2
- package/src/extractor/buildClassName.ts +21 -5
- package/src/extractor/bundle.ts +110 -0
- package/src/extractor/createEvaluator.ts +10 -12
- package/src/extractor/createExtractor.ts +1702 -1523
- package/src/extractor/ensureImportingConcat.ts +4 -11
- package/src/extractor/evaluateAstNode.ts +1 -1
- package/src/extractor/extractHelpers.ts +93 -10
- package/src/extractor/extractMediaStyle.ts +18 -11
- package/src/extractor/extractToClassNames.ts +104 -47
- package/src/extractor/getPrefixLogs.ts +1 -1
- package/src/extractor/getPropValueFromAttributes.ts +4 -3
- package/src/extractor/getSourceModule.ts +2 -0
- package/src/extractor/getStaticBindingsForScope.ts +90 -46
- package/src/extractor/loadFile.ts +17 -0
- package/src/extractor/loadTamagui.ts +448 -103
- package/src/extractor/logLines.ts +1 -1
- package/src/extractor/normalizeTernaries.ts +2 -2
- package/src/extractor/removeUnusedHooks.ts +2 -0
- package/src/extractor/timer.ts +12 -1
- package/src/getPragmaOptions.ts +53 -0
- package/src/helpers/memoize.ts +21 -0
- package/src/index.ts +9 -8
- package/src/require.ts +103 -0
- package/src/types.ts +33 -31
- package/src/webpackPlugin.ts +9 -0
- package/tamagui.tsconfig.json +5 -0
- package/types/constants.d.ts +6 -0
- package/types/extractor/accessSafe.d.ts +3 -0
- package/types/extractor/babelParse.d.ts +6 -0
- package/types/extractor/buildClassName.d.ts +5 -2
- package/types/extractor/bundle.d.ts +13 -0
- package/types/extractor/createEvaluator.d.ts +3 -3
- package/types/extractor/createExtractor.d.ts +25 -9
- package/types/extractor/ensureImportingConcat.d.ts +4 -0
- package/types/extractor/evaluateAstNode.d.ts +3 -0
- package/types/extractor/extractHelpers.d.ts +15 -3
- package/types/extractor/extractMediaStyle.d.ts +3 -3
- package/types/extractor/extractToClassNames.d.ts +5 -4
- package/types/extractor/findTopmostFunction.d.ts +4 -0
- package/types/extractor/generatedUid.d.ts +5 -0
- package/types/extractor/getPrefixLogs.d.ts +1 -1
- package/types/extractor/getPropValueFromAttributes.d.ts +19 -0
- package/types/extractor/getSourceModule.d.ts +16 -0
- package/types/extractor/getStaticBindingsForScope.d.ts +5 -0
- package/types/extractor/hoistClassNames.d.ts +6 -0
- package/types/extractor/literalToAst.d.ts +4 -0
- package/types/extractor/loadFile.d.ts +1 -0
- package/types/extractor/loadTamagui.d.ts +15 -5
- package/types/extractor/logLines.d.ts +2 -0
- package/types/extractor/normalizeTernaries.d.ts +1 -1
- package/types/extractor/removeUnusedHooks.d.ts +3 -0
- package/types/extractor/timer.d.ts +5 -0
- package/types/extractor/validHTMLAttributes.d.ts +98 -0
- package/types/getPragmaOptions.d.ts +9 -0
- package/types/helpers/memoize.d.ts +8 -0
- package/types/index.d.ts +9 -8
- package/types/require.d.ts +4 -0
- package/types/types.d.ts +28 -27
- package/types/webpackPlugin.d.ts +4 -0
- package/dist/cjs/constants.js.map +0 -7
- package/dist/cjs/extractor/accessSafe.js.map +0 -7
- package/dist/cjs/extractor/babelParse.js.map +0 -7
- package/dist/cjs/extractor/buildClassName.js.map +0 -7
- package/dist/cjs/extractor/createEvaluator.js.map +0 -7
- package/dist/cjs/extractor/createExtractor.js +0 -1394
- package/dist/cjs/extractor/createExtractor.js.map +0 -7
- package/dist/cjs/extractor/ensureImportingConcat.js.map +0 -7
- package/dist/cjs/extractor/evaluateAstNode.js.map +0 -7
- package/dist/cjs/extractor/extractHelpers.js.map +0 -7
- package/dist/cjs/extractor/extractMediaStyle.js.map +0 -7
- package/dist/cjs/extractor/extractToClassNames.js.map +0 -7
- package/dist/cjs/extractor/getPrefixLogs.js.map +0 -7
- package/dist/cjs/extractor/getPropValueFromAttributes.js.map +0 -7
- package/dist/cjs/extractor/getSourceModule.js.map +0 -7
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +0 -7
- package/dist/cjs/extractor/hoistClassNames.js.map +0 -7
- package/dist/cjs/extractor/literalToAst.js.map +0 -7
- package/dist/cjs/extractor/loadTamagui.js +0 -139
- package/dist/cjs/extractor/loadTamagui.js.map +0 -7
- package/dist/cjs/extractor/logLines.js.map +0 -7
- package/dist/cjs/extractor/normalizeTernaries.js.map +0 -7
- package/dist/cjs/extractor/removeUnusedHooks.js.map +0 -7
- package/dist/cjs/extractor/timer.js.map +0 -7
- package/dist/cjs/extractor/validHTMLAttributes.js.map +0 -7
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/types.js.map +0 -7
- package/dist/esm/constants.js +0 -14
- package/dist/esm/constants.js.map +0 -7
- package/dist/esm/extractor/accessSafe.js +0 -8
- package/dist/esm/extractor/babelParse.js +0 -28
- package/dist/esm/extractor/babelParse.js.map +0 -7
- package/dist/esm/extractor/buildClassName.js +0 -37
- package/dist/esm/extractor/buildClassName.js.map +0 -7
- package/dist/esm/extractor/createEvaluator.js +0 -53
- package/dist/esm/extractor/createEvaluator.js.map +0 -7
- package/dist/esm/extractor/createExtractor.js +0 -1379
- package/dist/esm/extractor/createExtractor.js.map +0 -7
- package/dist/esm/extractor/ensureImportingConcat.js +0 -21
- package/dist/esm/extractor/ensureImportingConcat.js.map +0 -7
- package/dist/esm/extractor/evaluateAstNode.js +0 -91
- package/dist/esm/extractor/evaluateAstNode.js.map +0 -7
- package/dist/esm/extractor/extractHelpers.js +0 -97
- package/dist/esm/extractor/extractHelpers.js.map +0 -7
- package/dist/esm/extractor/extractMediaStyle.js +0 -161
- package/dist/esm/extractor/extractMediaStyle.js.map +0 -7
- package/dist/esm/extractor/extractToClassNames.js +0 -294
- package/dist/esm/extractor/extractToClassNames.js.map +0 -7
- package/dist/esm/extractor/findTopmostFunction.js +0 -20
- package/dist/esm/extractor/findTopmostFunction.js.map +0 -7
- package/dist/esm/extractor/generatedUid.js +0 -25
- package/dist/esm/extractor/generatedUid.js.map +0 -7
- package/dist/esm/extractor/getPrefixLogs.js +0 -8
- package/dist/esm/extractor/getPrefixLogs.js.map +0 -7
- package/dist/esm/extractor/getPropValueFromAttributes.js +0 -46
- package/dist/esm/extractor/getPropValueFromAttributes.js.map +0 -7
- package/dist/esm/extractor/getSourceModule.js +0 -66
- package/dist/esm/extractor/getStaticBindingsForScope.js +0 -132
- package/dist/esm/extractor/getStaticBindingsForScope.js.map +0 -7
- package/dist/esm/extractor/hoistClassNames.js +0 -40
- package/dist/esm/extractor/hoistClassNames.js.map +0 -7
- package/dist/esm/extractor/literalToAst.js +0 -90
- package/dist/esm/extractor/literalToAst.js.map +0 -7
- package/dist/esm/extractor/loadTamagui.js +0 -117
- package/dist/esm/extractor/loadTamagui.js.map +0 -7
- package/dist/esm/extractor/logLines.js +0 -20
- package/dist/esm/extractor/logLines.js.map +0 -7
- package/dist/esm/extractor/normalizeTernaries.js +0 -79
- package/dist/esm/extractor/normalizeTernaries.js.map +0 -7
- package/dist/esm/extractor/removeUnusedHooks.js +0 -76
- package/dist/esm/extractor/removeUnusedHooks.js.map +0 -7
- package/dist/esm/extractor/timer.js +0 -22
- package/dist/esm/extractor/timer.js.map +0 -7
- package/dist/esm/extractor/validHTMLAttributes.js +0 -102
- package/dist/esm/extractor/validHTMLAttributes.js.map +0 -7
- package/dist/esm/index.js +0 -15
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -7
- package/dist/jsx/constants.js +0 -14
- package/dist/jsx/constants.js.map +0 -7
- package/dist/jsx/extractor/accessSafe.js +0 -8
- package/dist/jsx/extractor/accessSafe.js.map +0 -7
- package/dist/jsx/extractor/babelParse.js +0 -28
- package/dist/jsx/extractor/babelParse.js.map +0 -7
- package/dist/jsx/extractor/buildClassName.js +0 -37
- package/dist/jsx/extractor/buildClassName.js.map +0 -7
- package/dist/jsx/extractor/createEvaluator.js +0 -53
- package/dist/jsx/extractor/createEvaluator.js.map +0 -7
- package/dist/jsx/extractor/createExtractor.js +0 -1343
- package/dist/jsx/extractor/createExtractor.js.map +0 -7
- package/dist/jsx/extractor/ensureImportingConcat.js +0 -21
- package/dist/jsx/extractor/ensureImportingConcat.js.map +0 -7
- package/dist/jsx/extractor/evaluateAstNode.js +0 -91
- package/dist/jsx/extractor/evaluateAstNode.js.map +0 -7
- package/dist/jsx/extractor/extractHelpers.js +0 -97
- package/dist/jsx/extractor/extractHelpers.js.map +0 -7
- package/dist/jsx/extractor/extractMediaStyle.js +0 -146
- package/dist/jsx/extractor/extractMediaStyle.js.map +0 -7
- package/dist/jsx/extractor/extractToClassNames.js +0 -280
- package/dist/jsx/extractor/extractToClassNames.js.map +0 -7
- package/dist/jsx/extractor/findTopmostFunction.js +0 -20
- package/dist/jsx/extractor/findTopmostFunction.js.map +0 -7
- package/dist/jsx/extractor/generatedUid.js +0 -25
- package/dist/jsx/extractor/generatedUid.js.map +0 -7
- package/dist/jsx/extractor/getPrefixLogs.js +0 -9
- package/dist/jsx/extractor/getPrefixLogs.js.map +0 -7
- package/dist/jsx/extractor/getPropValueFromAttributes.js +0 -46
- package/dist/jsx/extractor/getPropValueFromAttributes.js.map +0 -7
- package/dist/jsx/extractor/getSourceModule.js +0 -66
- package/dist/jsx/extractor/getSourceModule.js.map +0 -7
- package/dist/jsx/extractor/getStaticBindingsForScope.js +0 -132
- package/dist/jsx/extractor/getStaticBindingsForScope.js.map +0 -7
- package/dist/jsx/extractor/hoistClassNames.js +0 -40
- package/dist/jsx/extractor/literalToAst.js +0 -75
- package/dist/jsx/extractor/loadTamagui.js +0 -102
- package/dist/jsx/extractor/loadTamagui.js.map +0 -7
- package/dist/jsx/extractor/logLines.js +0 -20
- package/dist/jsx/extractor/logLines.js.map +0 -7
- package/dist/jsx/extractor/normalizeTernaries.js +0 -50
- package/dist/jsx/extractor/normalizeTernaries.js.map +0 -7
- package/dist/jsx/extractor/removeUnusedHooks.js +0 -77
- package/dist/jsx/extractor/removeUnusedHooks.js.map +0 -7
- package/dist/jsx/extractor/timer.js +0 -22
- package/dist/jsx/extractor/timer.js.map +0 -7
- package/dist/jsx/extractor/validHTMLAttributes.js +0 -102
- package/dist/jsx/index.js +0 -15
- package/dist/jsx/index.js.map +0 -7
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -7
- package/types/extractor/buildClassName.d.ts.map +0 -1
- package/types/extractor/createEvaluator.d.ts.map +0 -1
- package/types/extractor/createExtractor.d.ts.map +0 -1
- package/types/extractor/extractHelpers.d.ts.map +0 -1
- package/types/extractor/extractMediaStyle.d.ts.map +0 -1
- package/types/extractor/extractToClassNames.d.ts.map +0 -1
- package/types/extractor/getPrefixLogs.d.ts.map +0 -1
- package/types/extractor/loadTamagui.d.ts.map +0 -1
- package/types/extractor/normalizeTernaries.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export function getPragmaOptions({
|
|
2
|
+
source,
|
|
3
|
+
path,
|
|
4
|
+
disableCommentCheck,
|
|
5
|
+
}: {
|
|
6
|
+
source: string
|
|
7
|
+
path: string
|
|
8
|
+
disableCommentCheck?: boolean
|
|
9
|
+
}) {
|
|
10
|
+
if (!disableCommentCheck && !source.startsWith('//') && !source.startsWith('/*')) {
|
|
11
|
+
return {
|
|
12
|
+
shouldPrintDebug: false,
|
|
13
|
+
shouldDisable: false,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let shouldPrintDebug: boolean | 'verbose' = false
|
|
18
|
+
let shouldDisable = false
|
|
19
|
+
|
|
20
|
+
// try and avoid too much parsing but sometimes esbuild adds helpers above..
|
|
21
|
+
const firstLine = source.slice(0, 800).split('\n')[0]
|
|
22
|
+
|
|
23
|
+
if (firstLine.includes('tamagui-ignore')) {
|
|
24
|
+
shouldDisable = true
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (firstLine.includes('debug')) {
|
|
28
|
+
shouldPrintDebug = true
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (firstLine.includes('debug-verbose')) {
|
|
32
|
+
shouldPrintDebug = 'verbose'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (process.env.TAMAGUI_DEBUG_FILE) {
|
|
36
|
+
if (path.includes(process.env.TAMAGUI_DEBUG_FILE)) {
|
|
37
|
+
shouldPrintDebug = 'verbose'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (process.env.DEBUG?.includes('tamagui')) {
|
|
42
|
+
shouldPrintDebug = true
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (process.env.DEBUG?.includes('tamagui-verbose')) {
|
|
46
|
+
shouldPrintDebug = 'verbose'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
shouldPrintDebug,
|
|
51
|
+
shouldDisable,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
export function memoize(func?: Function, resolver?: any) {
|
|
3
|
+
if (typeof func !== 'function' || (resolver != null && typeof resolver !== 'function')) {
|
|
4
|
+
throw new TypeError('Expected a function')
|
|
5
|
+
}
|
|
6
|
+
const memoized = function (...args) {
|
|
7
|
+
const key = resolver ? resolver.apply(this, args) : args[0]
|
|
8
|
+
const cache = memoized.cache
|
|
9
|
+
|
|
10
|
+
if (cache.has(key)) {
|
|
11
|
+
return cache.get(key)
|
|
12
|
+
}
|
|
13
|
+
const result = func.apply(this, args)
|
|
14
|
+
memoized.cache = cache.set(key, result) || cache
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
memoized.cache = new (memoize.Cache || Map)()
|
|
18
|
+
return memoized
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
memoize.Cache = Map
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
process.env.TAMAGUI_COMPILE_PROCESS = '1'
|
|
2
2
|
|
|
3
|
-
export { TamaguiOptions } from './types'
|
|
4
|
-
export { createExtractor } from './extractor/createExtractor'
|
|
5
|
-
export { literalToAst } from './extractor/literalToAst'
|
|
6
|
-
export * from './constants'
|
|
7
|
-
export * from './extractor/extractToClassNames'
|
|
8
|
-
export * from './extractor/extractHelpers'
|
|
9
|
-
export * from '
|
|
10
|
-
export * from './
|
|
3
|
+
export { TamaguiOptions } from './types.js'
|
|
4
|
+
export { createExtractor } from './extractor/createExtractor.js'
|
|
5
|
+
export { literalToAst } from './extractor/literalToAst.js'
|
|
6
|
+
export * from './constants.js'
|
|
7
|
+
export * from './extractor/extractToClassNames.js'
|
|
8
|
+
export * from './extractor/extractHelpers.js'
|
|
9
|
+
export * from './extractor/loadTamagui.js'
|
|
10
|
+
export * from './require.js'
|
|
11
|
+
export * from './getPragmaOptions.js'
|
package/src/require.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { relative, sep } from 'path'
|
|
2
|
+
|
|
3
|
+
import { SHOULD_DEBUG } from './constants.js'
|
|
4
|
+
|
|
5
|
+
const nameToPaths = {}
|
|
6
|
+
const Module = require('module')
|
|
7
|
+
const og = Module.prototype.require
|
|
8
|
+
globalThis['ogRequire'] = og
|
|
9
|
+
|
|
10
|
+
export const getNameToPaths = () => nameToPaths
|
|
11
|
+
|
|
12
|
+
export function registerRequire() {
|
|
13
|
+
if (Module.prototype.require !== globalThis['ogRequire']) {
|
|
14
|
+
// eslint-disable-next-line no-console
|
|
15
|
+
console.warn('didnt unregister before re-registering')
|
|
16
|
+
process.exit(1)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const proxyWorm = require('@tamagui/proxy-worm')
|
|
20
|
+
// TODO can swap with react-native-web-lite
|
|
21
|
+
const rnw = require('react-native-web')
|
|
22
|
+
const core = require('@tamagui/core-node')
|
|
23
|
+
|
|
24
|
+
Module.prototype.require = function (path: string) {
|
|
25
|
+
if (/\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {
|
|
26
|
+
return {}
|
|
27
|
+
}
|
|
28
|
+
if (
|
|
29
|
+
path === '@gorhom/bottom-sheet' ||
|
|
30
|
+
path.startsWith('react-native-reanimated') ||
|
|
31
|
+
path === 'expo-linear-gradient' ||
|
|
32
|
+
path === '@expo/vector-icons'
|
|
33
|
+
) {
|
|
34
|
+
return proxyWorm
|
|
35
|
+
}
|
|
36
|
+
if (
|
|
37
|
+
path.startsWith('react-native') &&
|
|
38
|
+
// allow our rnw.tsx imports through
|
|
39
|
+
!path.startsWith('react-native-web/dist/cjs/exports'.replace(/\//g, sep))
|
|
40
|
+
) {
|
|
41
|
+
return rnw
|
|
42
|
+
}
|
|
43
|
+
if (path === '@tamagui/core') {
|
|
44
|
+
return core
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const out = og.apply(this, arguments)
|
|
48
|
+
// only for studio disable for now
|
|
49
|
+
// if (!nameToPaths[path]) {
|
|
50
|
+
// if (out && typeof out === 'object') {
|
|
51
|
+
// for (const key in out) {
|
|
52
|
+
// try {
|
|
53
|
+
// const conf = out[key]?.staticConfig as StaticConfig
|
|
54
|
+
// if (conf) {
|
|
55
|
+
// if (conf.componentName) {
|
|
56
|
+
// nameToPaths[conf.componentName] ??= new Set()
|
|
57
|
+
// const fullName = path.startsWith('.')
|
|
58
|
+
// ? join(`${this.path.replace(/dist(\/cjs)?/, 'src')}`, path)
|
|
59
|
+
// : path
|
|
60
|
+
// nameToPaths[conf.componentName].add(fullName)
|
|
61
|
+
// } else {
|
|
62
|
+
// // console.log('no name component', path)
|
|
63
|
+
// }
|
|
64
|
+
// }
|
|
65
|
+
// } catch {
|
|
66
|
+
// // ok
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
|
+
// }
|
|
71
|
+
return out
|
|
72
|
+
} catch (err: any) {
|
|
73
|
+
/**
|
|
74
|
+
* Allow errors to happen, we're just reading config and components but sometimes external modules cause problems
|
|
75
|
+
* We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
if (process.env.DEBUG?.startsWith('tamagui')) {
|
|
79
|
+
// eslint-disable-next-line no-console
|
|
80
|
+
console.error(
|
|
81
|
+
`Tamagui failed loading the pre-built tamagui.config.ts
|
|
82
|
+
|
|
83
|
+
${err.message}
|
|
84
|
+
${err.stack}
|
|
85
|
+
|
|
86
|
+
You can see if it loads in the node repl:
|
|
87
|
+
|
|
88
|
+
require("./${relative(process.cwd(), path)}").default
|
|
89
|
+
|
|
90
|
+
`
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return proxyWorm
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return Module.prototype.require
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function unregisterRequire() {
|
|
102
|
+
Module.prototype.require = og
|
|
103
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { NodePath } from '@babel/traverse'
|
|
1
|
+
import type { NodePath } from '@babel/traverse'
|
|
2
2
|
import * as t from '@babel/types'
|
|
3
|
-
import { PseudoStyles } from '@tamagui/core-node'
|
|
4
|
-
import { StyleObject } from '@tamagui/
|
|
5
|
-
import {
|
|
3
|
+
import type { PseudoStyles, StaticConfig } from '@tamagui/core-node'
|
|
4
|
+
import type { StyleObject } from '@tamagui/helpers'
|
|
5
|
+
import type { TamaguiOptions } from '@tamagui/helpers-node'
|
|
6
|
+
import type { ViewStyle } from 'react-native'
|
|
7
|
+
|
|
8
|
+
import { LoadedComponents } from './index'
|
|
9
|
+
|
|
10
|
+
export type { TamaguiOptions } from '@tamagui/helpers-node'
|
|
6
11
|
|
|
7
12
|
export type { StyleObject } from '@tamagui/helpers'
|
|
8
13
|
|
|
@@ -12,30 +17,20 @@ export interface CacheObject {
|
|
|
12
17
|
[key: string]: any
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
logTimings?: boolean
|
|
30
|
-
prefixLogs?: string
|
|
31
|
-
|
|
32
|
-
// probably non user options
|
|
33
|
-
cssPath?: string
|
|
34
|
-
cssData?: any
|
|
35
|
-
deoptProps?: Set<string>
|
|
36
|
-
excludeProps?: Set<string>
|
|
37
|
-
inlineProps?: Set<string>
|
|
38
|
-
forceExtractStyleDefinitions?: boolean
|
|
20
|
+
export interface LogOptions {
|
|
21
|
+
clear?: boolean
|
|
22
|
+
timestamp?: boolean
|
|
23
|
+
error?: Error | null
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Logger {
|
|
27
|
+
info(msg: string, options?: LogOptions): void
|
|
28
|
+
warn(msg: string, options?: LogOptions): void
|
|
29
|
+
error(msg: string, options?: LogOptions): void
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type ExtractorOptions = {
|
|
33
|
+
logger?: Logger
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
export type ExtractedAttrAttr = {
|
|
@@ -56,6 +51,7 @@ export type ExtractedAttr =
|
|
|
56
51
|
| ExtractedAttrStyle
|
|
57
52
|
|
|
58
53
|
export type ExtractTagProps = {
|
|
54
|
+
parserProps: TamaguiOptionsWithFileInfo
|
|
59
55
|
attrs: ExtractedAttr[]
|
|
60
56
|
node: t.JSXOpeningElement
|
|
61
57
|
attemptEval: (exprNode: t.Node, evalFn?: ((node: t.Node) => any) | undefined) => any
|
|
@@ -65,14 +61,20 @@ export type ExtractTagProps = {
|
|
|
65
61
|
lineNumbers: string
|
|
66
62
|
filePath: string
|
|
67
63
|
isFlattened: boolean
|
|
64
|
+
completeProps: Record<string, any>
|
|
65
|
+
staticConfig: StaticConfig
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type TamaguiOptionsWithFileInfo = TamaguiOptions & {
|
|
69
|
+
sourcePath: string
|
|
70
|
+
allLoadedComponents: LoadedComponents[]
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
export type ExtractorParseProps =
|
|
73
|
+
export type ExtractorParseProps = Omit<TamaguiOptionsWithFileInfo, 'allLoadedComponents'> & {
|
|
71
74
|
target: 'native' | 'html'
|
|
72
|
-
sourcePath?: string
|
|
73
75
|
shouldPrintDebug?: boolean | 'verbose'
|
|
74
76
|
onExtractTag: (props: ExtractTagProps) => void
|
|
75
|
-
getFlattenedNode
|
|
77
|
+
getFlattenedNode?: (props: { isTextView: boolean; tag: string }) => string
|
|
76
78
|
extractStyledDefinitions?: boolean
|
|
77
79
|
// identifer, rule
|
|
78
80
|
onStyleRule?: (identifier: string, rules: string[]) => void
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const CSS_FILE_NAME = "__snack.css";
|
|
2
|
+
export declare const MEDIA_SEP = "_";
|
|
3
|
+
export declare const cacheDir: any;
|
|
4
|
+
export declare const FAILED_EVAL: unique symbol;
|
|
5
|
+
export declare const SHOULD_DEBUG: boolean | undefined;
|
|
6
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as babelParser from '@babel/parser';
|
|
3
|
+
import * as t from '@babel/types';
|
|
4
|
+
export declare const parserOptions: babelParser.ParserOptions;
|
|
5
|
+
export declare function babelParse(code: string | Buffer): t.File;
|
|
6
|
+
//# sourceMappingURL=babelParse.d.ts.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as t from '@babel/types';
|
|
2
|
-
import { ClassNameObject } from '../types';
|
|
3
|
-
|
|
2
|
+
import type { ClassNameObject } from '../types.js';
|
|
3
|
+
declare type Builder = (objects: ClassNameObject[], extras?: string) => t.Expression | t.StringLiteral | null;
|
|
4
|
+
export declare const buildClassName: Builder;
|
|
5
|
+
export declare const buildClassNameLogic: Builder;
|
|
6
|
+
export {};
|
|
4
7
|
//# sourceMappingURL=buildClassName.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import esbuild from 'esbuild';
|
|
2
|
+
/**
|
|
3
|
+
* For internal loading of new files
|
|
4
|
+
*/
|
|
5
|
+
declare type Props = Omit<Partial<esbuild.BuildOptions>, 'entryPoints'> & {
|
|
6
|
+
outfile: string;
|
|
7
|
+
entryPoints: string[];
|
|
8
|
+
resolvePlatformSpecificEntries?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function bundle(props: Props, aliases?: Record<string, string>): Promise<esbuild.BuildResult>;
|
|
11
|
+
export declare function bundleSync(props: Props, aliases?: Record<string, string>): esbuild.BuildResult;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import
|
|
4
|
-
export declare function createEvaluator({
|
|
5
|
-
|
|
3
|
+
import { TamaguiOptionsWithFileInfo } from '../types.js';
|
|
4
|
+
export declare function createEvaluator({ props, staticNamespace, sourcePath, traversePath, shouldPrintDebug, }: {
|
|
5
|
+
props: TamaguiOptionsWithFileInfo;
|
|
6
6
|
staticNamespace: Record<string, any>;
|
|
7
7
|
sourcePath: string;
|
|
8
8
|
traversePath?: NodePath<t.JSXElement>;
|
|
@@ -1,28 +1,44 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ExtractorOptions, ExtractorParseProps, TamaguiOptions } from '../types.js';
|
|
4
|
+
import { cleanupBeforeExit } from './getStaticBindingsForScope.js';
|
|
5
|
+
import { TamaguiProjectInfo } from './loadTamagui.js';
|
|
5
6
|
export declare type Extractor = ReturnType<typeof createExtractor>;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
declare type FileOrPath = NodePath<t.Program> | t.File;
|
|
8
|
+
export declare function createExtractor({ logger }?: ExtractorOptions): {
|
|
9
|
+
options: {
|
|
10
|
+
logger: import("../types.js").Logger;
|
|
11
|
+
};
|
|
12
|
+
cleanupBeforeExit: typeof cleanupBeforeExit;
|
|
13
|
+
loadTamagui: (props: TamaguiOptions) => Promise<TamaguiProjectInfo>;
|
|
14
|
+
loadTamaguiSync: (props: TamaguiOptions) => TamaguiProjectInfo;
|
|
15
|
+
getTamagui(): import("@tamagui/core-node").TamaguiInternalConfig<import("@tamagui/core-node").CreateTokens<import("@tamagui/core-node").VariableVal>, {
|
|
8
16
|
[key: string]: Partial<import("@tamagui/core-node").TamaguiBaseTheme> & {
|
|
9
17
|
[key: string]: import("@tamagui/core-node").VariableVal;
|
|
10
18
|
};
|
|
11
|
-
},
|
|
12
|
-
[
|
|
19
|
+
}, import("@tamagui/core-node").GenericShorthands, {
|
|
20
|
+
[key: string]: {
|
|
13
21
|
[key: string]: string | number;
|
|
14
22
|
};
|
|
15
23
|
}, {
|
|
16
|
-
[key: string]: string | {
|
|
24
|
+
[key: string]: string | any[] | {
|
|
17
25
|
[key: string]: any;
|
|
18
26
|
};
|
|
19
|
-
}, import("@tamagui/core-node").GenericFonts
|
|
20
|
-
|
|
27
|
+
}, import("@tamagui/core-node").GenericFonts> | undefined;
|
|
28
|
+
parseSync: (f: FileOrPath, props: ExtractorParseProps) => {
|
|
21
29
|
styled: number;
|
|
22
30
|
flattened: number;
|
|
23
31
|
optimized: number;
|
|
24
32
|
modified: number;
|
|
25
33
|
found: number;
|
|
26
34
|
} | null;
|
|
35
|
+
parse: (f: FileOrPath, props: ExtractorParseProps) => Promise<{
|
|
36
|
+
styled: number;
|
|
37
|
+
flattened: number;
|
|
38
|
+
optimized: number;
|
|
39
|
+
modified: number;
|
|
40
|
+
found: number;
|
|
41
|
+
} | null>;
|
|
27
42
|
};
|
|
43
|
+
export {};
|
|
28
44
|
//# sourceMappingURL=createExtractor.d.ts.map
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import { ExtractedAttr, Ternary } from '../types';
|
|
3
|
+
import type { ExtractedAttr, TamaguiOptionsWithFileInfo, Ternary } from '../types.js';
|
|
4
4
|
export declare function isPresent<T extends Object>(input: null | void | undefined | T): input is T;
|
|
5
5
|
export declare function isSimpleSpread(node: t.JSXSpreadAttribute): boolean;
|
|
6
6
|
export declare const attrStr: (attr?: ExtractedAttr) => string | t.JSXIdentifier;
|
|
7
7
|
export declare const objToStr: (obj: any, spacer?: string) => any;
|
|
8
8
|
export declare const ternaryStr: (x: Ternary) => string;
|
|
9
9
|
export declare function findComponentName(scope: any): string | undefined;
|
|
10
|
-
export declare function isValidThemeHook(jsxPath: NodePath<t.JSXElement>, n: t.MemberExpression, sourcePath: string): boolean;
|
|
11
|
-
export declare const
|
|
10
|
+
export declare function isValidThemeHook(props: TamaguiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, n: t.MemberExpression, sourcePath: string): boolean;
|
|
11
|
+
export declare const isInsideComponentPackage: (props: TamaguiOptionsWithFileInfo, moduleName: string) => any;
|
|
12
|
+
export declare const isComponentPackage: (props: TamaguiOptionsWithFileInfo, srcName: string) => any;
|
|
13
|
+
export declare function getValidComponent(props: TamaguiOptionsWithFileInfo, moduleName: string, componentName: string): false | {
|
|
14
|
+
staticConfig: import("@tamagui/core-node").StaticConfigParsed;
|
|
15
|
+
} | null;
|
|
16
|
+
export declare const isValidModule: (props: TamaguiOptionsWithFileInfo, moduleName: string) => {
|
|
17
|
+
isLocal: boolean;
|
|
18
|
+
isValid: any;
|
|
19
|
+
};
|
|
20
|
+
export declare const getValidImport: (props: TamaguiOptionsWithFileInfo, moduleName: string, componentName?: string) => {
|
|
21
|
+
staticConfig: import("@tamagui/core-node").StaticConfigParsed;
|
|
22
|
+
} | null;
|
|
23
|
+
export declare const isValidImport: (props: TamaguiOptionsWithFileInfo, moduleName: string, componentName?: string) => any;
|
|
12
24
|
//# sourceMappingURL=extractHelpers.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
3
|
import { TamaguiInternalConfig } from '@tamagui/core-node';
|
|
4
|
-
import {
|
|
5
|
-
export declare function extractMediaStyle(ternary: Ternary, jsxPath: NodePath<t.JSXElement>, tamaguiConfig: TamaguiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
|
|
4
|
+
import type { TamaguiOptionsWithFileInfo, Ternary } from '../types.js';
|
|
5
|
+
export declare function extractMediaStyle(props: TamaguiOptionsWithFileInfo, ternary: Ternary, jsxPath: NodePath<t.JSXElement>, tamaguiConfig: TamaguiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
|
|
6
6
|
mediaStyles: StyleObject[];
|
|
7
7
|
ternaryWithoutMedia: Ternary | null;
|
|
8
8
|
} | null;
|
|
9
|
-
export declare function isValidMediaCall(jsxPath: NodePath<t.JSXElement>, init: t.Expression, sourcePath: string): boolean;
|
|
9
|
+
export declare function isValidMediaCall(props: TamaguiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, init: t.Expression, sourcePath: string): boolean;
|
|
10
10
|
//# sourceMappingURL=extractMediaStyle.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import { TamaguiOptions } from '../types';
|
|
4
|
-
import { Extractor } from './createExtractor';
|
|
3
|
+
import type { TamaguiOptions } from '../types.js';
|
|
4
|
+
import { Extractor } from './createExtractor.js';
|
|
5
5
|
export declare type ExtractedResponse = {
|
|
6
6
|
js: string | Buffer;
|
|
7
7
|
styles: string;
|
|
@@ -9,11 +9,12 @@ export declare type ExtractedResponse = {
|
|
|
9
9
|
ast: t.File;
|
|
10
10
|
map: any;
|
|
11
11
|
};
|
|
12
|
-
export declare
|
|
12
|
+
export declare type ExtractToClassNamesProps = {
|
|
13
13
|
extractor: Extractor;
|
|
14
14
|
source: string | Buffer;
|
|
15
15
|
sourcePath: string;
|
|
16
16
|
options: TamaguiOptions;
|
|
17
17
|
shouldPrintDebug: boolean | 'verbose';
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
|
+
export declare function extractToClassNames({ extractor, source, sourcePath, options, shouldPrintDebug, }: ExtractToClassNamesProps): Promise<ExtractedResponse | null>;
|
|
19
20
|
//# sourceMappingURL=extractToClassNames.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
/**
|
|
3
|
+
* getPropValueFromAttributes gets a prop by name from a list of attributes and accounts for potential spread operators.
|
|
4
|
+
* Here's an example. Given this component:
|
|
5
|
+
* ```
|
|
6
|
+
* <Block coolProp="wow" {...spread1} neatProp="ok" {...spread2} />```
|
|
7
|
+
* getPropValueFromAttributes will return the following:
|
|
8
|
+
* - for propName `coolProp`:
|
|
9
|
+
* ```
|
|
10
|
+
* accessSafe(spread1, 'coolProp') || accessSafe(spread2, 'coolProp') || 'wow'```
|
|
11
|
+
* - for propName `neatProp`:
|
|
12
|
+
* ```
|
|
13
|
+
* accessSafe(spread2, 'neatProp') || 'ok'```
|
|
14
|
+
* - for propName `notPresent`: `null`
|
|
15
|
+
*
|
|
16
|
+
* The returned value should (obviously) be placed after spread operators.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPropValueFromAttributes(propName: string, attrs: (t.JSXAttribute | t.JSXSpreadAttribute)[]): t.Expression | null;
|
|
19
|
+
//# sourceMappingURL=getPropValueFromAttributes.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
export interface SourceModule {
|
|
3
|
+
sourceModule?: string;
|
|
4
|
+
imported?: string;
|
|
5
|
+
local?: string;
|
|
6
|
+
destructured?: boolean;
|
|
7
|
+
usesImportSyntax: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function getSourceModule(itemName: string, itemBinding: {
|
|
10
|
+
constant?: boolean;
|
|
11
|
+
path: {
|
|
12
|
+
node: t.Node;
|
|
13
|
+
parent: any;
|
|
14
|
+
};
|
|
15
|
+
}): SourceModule | null;
|
|
16
|
+
//# sourceMappingURL=getSourceModule.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodePath } from '@babel/traverse';
|
|
2
|
+
import * as t from '@babel/types';
|
|
3
|
+
export declare function cleanupBeforeExit(): void;
|
|
4
|
+
export declare function getStaticBindingsForScope(scope: NodePath<t.JSXElement>['scope'], whitelist: string[] | undefined, sourcePath: string, bindingCache: Record<string, string | null>, shouldPrintDebug: boolean | 'verbose'): Promise<Record<string, any>>;
|
|
5
|
+
//# sourceMappingURL=getStaticBindingsForScope.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NodePath } from '@babel/traverse';
|
|
2
|
+
import * as t from '@babel/types';
|
|
3
|
+
export declare function hoistClassNames(path: NodePath<t.JSXElement>, existing: {
|
|
4
|
+
[key: string]: t.Identifier;
|
|
5
|
+
}, expr: t.Expression): any;
|
|
6
|
+
//# sourceMappingURL=hoistClassNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=loadFile.d.ts.map
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StaticConfigParsed, TamaguiInternalConfig } from '@tamagui/core-node';
|
|
2
2
|
declare type NameToPaths = {
|
|
3
3
|
[key: string]: Set<string>;
|
|
4
4
|
};
|
|
5
|
+
export declare type LoadedComponents = {
|
|
6
|
+
moduleName: string;
|
|
7
|
+
nameToInfo: Record<string, {
|
|
8
|
+
staticConfig: StaticConfigParsed;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
5
11
|
export declare type TamaguiProjectInfo = {
|
|
6
|
-
components:
|
|
12
|
+
components: LoadedComponents[];
|
|
7
13
|
tamaguiConfig: TamaguiInternalConfig;
|
|
8
14
|
nameToPaths: NameToPaths;
|
|
9
15
|
};
|
|
10
|
-
|
|
16
|
+
declare type Props = {
|
|
11
17
|
components: string[];
|
|
12
|
-
config
|
|
13
|
-
|
|
18
|
+
config?: string;
|
|
19
|
+
forceExports?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function loadTamagui(props: Props): Promise<TamaguiProjectInfo>;
|
|
22
|
+
export declare function resolveWebOrNativeSpecificEntry(entry: string): string;
|
|
23
|
+
export declare function loadTamaguiSync(props: Props): TamaguiProjectInfo;
|
|
14
24
|
export {};
|
|
15
25
|
//# sourceMappingURL=loadTamagui.d.ts.map
|