@tamagui/static 1.0.1-beta.102 → 1.0.1-beta.105
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 +4 -0
- package/dist/cjs/constants.js.map +2 -2
- package/dist/cjs/extractor/createEvaluator.js.map +1 -1
- package/dist/cjs/extractor/createExtractor.js +5 -39
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/defaultTamaguiConfig.js +177 -0
- package/dist/cjs/extractor/defaultTamaguiConfig.js.map +7 -0
- package/dist/cjs/extractor/loadTamagui.js +46 -66
- package/dist/cjs/extractor/loadTamagui.js.map +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/require.js +99 -0
- package/dist/cjs/require.js.map +7 -0
- package/dist/esm/constants.js +3 -0
- package/dist/esm/constants.js.map +2 -2
- package/dist/esm/extractor/createEvaluator.js.map +1 -1
- package/dist/esm/extractor/createExtractor.js +6 -41
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/defaultTamaguiConfig.js +155 -0
- package/dist/esm/extractor/defaultTamaguiConfig.js.map +7 -0
- package/dist/esm/extractor/loadTamagui.js +46 -66
- package/dist/esm/extractor/loadTamagui.js.map +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/require.js +74 -0
- package/dist/esm/require.js.map +7 -0
- package/dist/jsx/constants.js +3 -0
- package/dist/jsx/constants.js.map +2 -2
- package/dist/jsx/extractor/createEvaluator.js.map +1 -1
- package/dist/jsx/extractor/createExtractor.js +6 -41
- package/dist/jsx/extractor/createExtractor.js.map +2 -2
- package/dist/jsx/extractor/defaultTamaguiConfig.js +142 -0
- package/dist/jsx/extractor/defaultTamaguiConfig.js.map +7 -0
- package/dist/jsx/extractor/loadTamagui.js +46 -66
- package/dist/jsx/extractor/loadTamagui.js.map +2 -2
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/require.js +74 -0
- package/dist/jsx/require.js.map +7 -0
- package/package.json +9 -8
- package/src/constants.ts +2 -0
- package/src/extractor/createEvaluator.ts +1 -1
- package/src/extractor/createExtractor.ts +4 -60
- package/src/extractor/defaultTamaguiConfig.ts +149 -0
- package/src/extractor/loadTamagui.ts +52 -85
- package/src/index.ts +1 -0
- package/src/require.ts +93 -0
- package/types/constants.d.ts +1 -0
- package/types/constants.d.ts.map +1 -1
- package/types/extractor/createEvaluator.d.ts +1 -1
- package/types/extractor/createEvaluator.d.ts.map +1 -1
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/defaultTamaguiConfig.d.ts +83 -0
- package/types/extractor/defaultTamaguiConfig.d.ts.map +1 -0
- package/types/extractor/loadTamagui.d.ts +1 -1
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/require.d.ts +4 -0
- package/types/require.d.ts.map +1 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { TamaguiInternalConfig, createFont, createTamagui, createTokens } from '@tamagui/core-node'
|
|
2
|
+
import { shorthands } from '@tamagui/shorthands'
|
|
3
|
+
|
|
4
|
+
// basic fallback theme just to have compiler load in decent tate
|
|
5
|
+
|
|
6
|
+
const font = createFont({
|
|
7
|
+
family: 'System',
|
|
8
|
+
size: {
|
|
9
|
+
1: 15,
|
|
10
|
+
},
|
|
11
|
+
lineHeight: {
|
|
12
|
+
1: 15,
|
|
13
|
+
},
|
|
14
|
+
transform: {},
|
|
15
|
+
weight: {
|
|
16
|
+
1: '400',
|
|
17
|
+
},
|
|
18
|
+
color: {
|
|
19
|
+
1: '$color',
|
|
20
|
+
},
|
|
21
|
+
letterSpacing: {
|
|
22
|
+
1: 0,
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const size = {
|
|
27
|
+
0: 0,
|
|
28
|
+
0.25: 2,
|
|
29
|
+
0.5: 4,
|
|
30
|
+
0.75: 8,
|
|
31
|
+
1: 20,
|
|
32
|
+
1.5: 24,
|
|
33
|
+
2: 28,
|
|
34
|
+
2.5: 32,
|
|
35
|
+
3: 36,
|
|
36
|
+
3.5: 40,
|
|
37
|
+
4: 44,
|
|
38
|
+
true: 44,
|
|
39
|
+
4.5: 48,
|
|
40
|
+
5: 52,
|
|
41
|
+
5.5: 59,
|
|
42
|
+
6: 64,
|
|
43
|
+
6.5: 69,
|
|
44
|
+
7: 74,
|
|
45
|
+
7.6: 79,
|
|
46
|
+
8: 84,
|
|
47
|
+
8.5: 89,
|
|
48
|
+
9: 94,
|
|
49
|
+
9.5: 99,
|
|
50
|
+
10: 104,
|
|
51
|
+
11: 124,
|
|
52
|
+
12: 144,
|
|
53
|
+
13: 164,
|
|
54
|
+
14: 184,
|
|
55
|
+
15: 204,
|
|
56
|
+
16: 224,
|
|
57
|
+
17: 224,
|
|
58
|
+
18: 244,
|
|
59
|
+
19: 264,
|
|
60
|
+
20: 284,
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const spaces = Object.entries(size).map(([k, v]) => [
|
|
64
|
+
k,
|
|
65
|
+
Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12)),
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
const spacesNegative = spaces.map(([k, v]) => [`-${k}`, -v])
|
|
69
|
+
|
|
70
|
+
const space = {
|
|
71
|
+
...Object.fromEntries(spaces),
|
|
72
|
+
...Object.fromEntries(spacesNegative),
|
|
73
|
+
} as any
|
|
74
|
+
|
|
75
|
+
const zIndex = {
|
|
76
|
+
0: 0,
|
|
77
|
+
1: 100,
|
|
78
|
+
2: 200,
|
|
79
|
+
3: 300,
|
|
80
|
+
4: 400,
|
|
81
|
+
5: 500,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const radius = {
|
|
85
|
+
0: 0,
|
|
86
|
+
1: 3,
|
|
87
|
+
2: 5,
|
|
88
|
+
3: 7,
|
|
89
|
+
4: 9,
|
|
90
|
+
5: 10,
|
|
91
|
+
6: 16,
|
|
92
|
+
7: 19,
|
|
93
|
+
8: 22,
|
|
94
|
+
9: 26,
|
|
95
|
+
10: 34,
|
|
96
|
+
11: 42,
|
|
97
|
+
12: 50,
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const tokens = createTokens({
|
|
101
|
+
color: {
|
|
102
|
+
white: '#fff',
|
|
103
|
+
black: '#000',
|
|
104
|
+
},
|
|
105
|
+
radius,
|
|
106
|
+
zIndex,
|
|
107
|
+
space,
|
|
108
|
+
size,
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const themes = {
|
|
112
|
+
light: {
|
|
113
|
+
background: tokens.color.white,
|
|
114
|
+
color: tokens.color.black,
|
|
115
|
+
},
|
|
116
|
+
dark: {
|
|
117
|
+
background: tokens.color.black,
|
|
118
|
+
color: tokens.color.white,
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const config = createTamagui({
|
|
123
|
+
defaultTheme: 'light',
|
|
124
|
+
shouldAddPrefersColorThemes: true,
|
|
125
|
+
themeClassNameOnRoot: true,
|
|
126
|
+
shorthands,
|
|
127
|
+
fonts: {
|
|
128
|
+
heading: font,
|
|
129
|
+
body: font,
|
|
130
|
+
},
|
|
131
|
+
themes,
|
|
132
|
+
tokens,
|
|
133
|
+
media: {
|
|
134
|
+
xs: { maxWidth: 660 },
|
|
135
|
+
sm: { maxWidth: 800 },
|
|
136
|
+
md: { maxWidth: 1020 },
|
|
137
|
+
lg: { maxWidth: 1280 },
|
|
138
|
+
xl: { maxWidth: 1420 },
|
|
139
|
+
xxl: { maxWidth: 1600 },
|
|
140
|
+
gtXs: { minWidth: 660 + 1 },
|
|
141
|
+
gtSm: { minWidth: 800 + 1 },
|
|
142
|
+
gtMd: { minWidth: 1020 + 1 },
|
|
143
|
+
gtLg: { minWidth: 1280 + 1 },
|
|
144
|
+
short: { maxHeight: 820 },
|
|
145
|
+
tall: { minHeight: 820 },
|
|
146
|
+
hoverNone: { hover: 'none' },
|
|
147
|
+
pointerCoarse: { pointer: 'coarse' },
|
|
148
|
+
},
|
|
149
|
+
}) as TamaguiInternalConfig
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { join } from 'path'
|
|
2
2
|
|
|
3
|
-
import type { StaticConfig, TamaguiComponent, TamaguiInternalConfig } from '@tamagui/core'
|
|
3
|
+
import type { StaticConfig, TamaguiComponent, TamaguiInternalConfig } from '@tamagui/core-node'
|
|
4
4
|
import { createTamagui } from '@tamagui/core-node'
|
|
5
5
|
|
|
6
|
+
import { SHOULD_DEBUG } from '../constants'
|
|
7
|
+
import { getNameToPaths, registerRequire, unregisterRequire } from '../require'
|
|
8
|
+
import { config as defaultTamaguiConfig } from './defaultTamaguiConfig'
|
|
9
|
+
|
|
6
10
|
let loadedTamagui: any = null
|
|
7
11
|
|
|
8
12
|
type NameToPaths = {
|
|
@@ -16,6 +20,8 @@ export type TamaguiProjectInfo = {
|
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
export function loadTamagui(props: { components: string[]; config: string }): TamaguiProjectInfo {
|
|
23
|
+
console.trace('load', !!loadedTamagui)
|
|
24
|
+
|
|
19
25
|
if (loadedTamagui) {
|
|
20
26
|
return loadedTamagui
|
|
21
27
|
}
|
|
@@ -37,102 +43,62 @@ export function loadTamagui(props: { components: string[]; config: string }): Ta
|
|
|
37
43
|
globalThis['__DEV__'] = process.env.NODE_ENV === 'development'
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
const rnw = require('react-native-web')
|
|
42
|
-
const Mod = require('module')
|
|
43
|
-
const og = Mod.prototype.require
|
|
44
|
-
const nameToPaths: NameToPaths = {}
|
|
46
|
+
registerRequire()
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
path === '@gorhom/bottom-sheet' ||
|
|
52
|
-
path.startsWith('react-native-reanimated') ||
|
|
53
|
-
path === 'expo-linear-gradient'
|
|
54
|
-
) {
|
|
55
|
-
return proxyWorm
|
|
56
|
-
}
|
|
57
|
-
if (
|
|
58
|
-
path.startsWith('react-native') &&
|
|
59
|
-
// allow our rnw.tsx imports through
|
|
60
|
-
!path.startsWith('react-native-web/dist/cjs/exports')
|
|
61
|
-
) {
|
|
62
|
-
return rnw
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
const out = og.apply(this, arguments)
|
|
66
|
-
if (!nameToPaths[path]) {
|
|
67
|
-
if (out && typeof out === 'object') {
|
|
68
|
-
for (const key in out) {
|
|
69
|
-
try {
|
|
70
|
-
const conf = out[key]?.staticConfig as StaticConfig
|
|
71
|
-
if (conf) {
|
|
72
|
-
if (conf.componentName) {
|
|
73
|
-
nameToPaths[conf.componentName] ??= new Set()
|
|
74
|
-
const fullName = path.startsWith('.')
|
|
75
|
-
? join(`${this.path.replace(/dist(\/cjs)?/, 'src')}`, path)
|
|
76
|
-
: path
|
|
77
|
-
nameToPaths[conf.componentName].add(fullName)
|
|
78
|
-
} else {
|
|
79
|
-
// console.log('no name component', path)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
} catch {
|
|
83
|
-
// ok
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return out
|
|
89
|
-
} catch (err: any) {
|
|
90
|
-
console.error('Tamagui error loading file:\n', path, err.message, '\n', err.stack)
|
|
91
|
-
// avoid infinite loops
|
|
92
|
-
process.exit(1)
|
|
93
|
-
}
|
|
94
|
-
}
|
|
48
|
+
try {
|
|
49
|
+
// import config
|
|
50
|
+
const exp = require(configPath)
|
|
51
|
+
const tamaguiConfig = (exp['default'] || exp) as TamaguiInternalConfig
|
|
95
52
|
|
|
96
|
-
|
|
97
|
-
const exp = require(configPath)
|
|
98
|
-
const tamaguiConfig = (exp['default'] || exp) as TamaguiInternalConfig
|
|
99
|
-
|
|
100
|
-
if (!tamaguiConfig || !tamaguiConfig.parsed) {
|
|
101
|
-
try {
|
|
53
|
+
if (!tamaguiConfig || !tamaguiConfig.parsed) {
|
|
102
54
|
const confPath = require.resolve(configPath)
|
|
103
55
|
console.log(`Received:`, tamaguiConfig)
|
|
104
56
|
throw new Error(`Can't find valid config in ${confPath}`)
|
|
105
|
-
} catch (err) {
|
|
106
|
-
throw err
|
|
107
57
|
}
|
|
108
|
-
}
|
|
109
58
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
59
|
+
// import components
|
|
60
|
+
const components = {}
|
|
61
|
+
for (const moduleName of props.components) {
|
|
62
|
+
const exported = require(moduleName)
|
|
63
|
+
for (const Name in exported) {
|
|
64
|
+
const val = exported[Name]
|
|
65
|
+
const staticConfig = val?.staticConfig as StaticConfig | undefined
|
|
66
|
+
if (staticConfig) {
|
|
67
|
+
// remove non-stringifyable
|
|
68
|
+
const { Component, reactNativeWebComponent, ...sc } = staticConfig
|
|
69
|
+
Object.assign(components, { [Name]: { staticConfig: sc } })
|
|
70
|
+
}
|
|
121
71
|
}
|
|
122
72
|
}
|
|
123
|
-
}
|
|
124
73
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Mod.prototype.require = og
|
|
74
|
+
// undo shims
|
|
75
|
+
process.env.IS_STATIC = undefined
|
|
128
76
|
|
|
129
|
-
|
|
130
|
-
|
|
77
|
+
// set up core-node
|
|
78
|
+
createTamagui(tamaguiConfig as any)
|
|
131
79
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
80
|
+
loadedTamagui = {
|
|
81
|
+
components,
|
|
82
|
+
tamaguiConfig,
|
|
83
|
+
nameToPaths: getNameToPaths(),
|
|
84
|
+
}
|
|
85
|
+
} catch (err) {
|
|
86
|
+
if (err instanceof Error) {
|
|
87
|
+
console.warn(
|
|
88
|
+
`Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config`
|
|
89
|
+
)
|
|
90
|
+
console.log(`\n\n ${err.message}\n\n`)
|
|
91
|
+
if (SHOULD_DEBUG) {
|
|
92
|
+
console.log(err.stack)
|
|
93
|
+
}
|
|
94
|
+
} else {
|
|
95
|
+
console.error(`Error loading tamagui.config.ts`, err)
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
components: {},
|
|
99
|
+
tamaguiConfig: defaultTamaguiConfig,
|
|
100
|
+
nameToPaths: {},
|
|
101
|
+
}
|
|
136
102
|
}
|
|
137
103
|
|
|
138
104
|
return loadedTamagui
|
|
@@ -141,5 +107,6 @@ export function loadTamagui(props: { components: string[]; config: string }): Ta
|
|
|
141
107
|
throw err
|
|
142
108
|
} finally {
|
|
143
109
|
unregister()
|
|
110
|
+
unregisterRequire()
|
|
144
111
|
}
|
|
145
112
|
}
|
package/src/index.ts
CHANGED
package/src/require.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { join } from 'path'
|
|
2
|
+
|
|
3
|
+
import type { StaticConfig } from '@tamagui/core-node'
|
|
4
|
+
|
|
5
|
+
import { SHOULD_DEBUG } from './constants'
|
|
6
|
+
|
|
7
|
+
const nameToPaths = {}
|
|
8
|
+
const Mod = require('module')
|
|
9
|
+
const og = Mod.prototype.require
|
|
10
|
+
globalThis['ogRequire'] = og
|
|
11
|
+
|
|
12
|
+
export const getNameToPaths = () => nameToPaths
|
|
13
|
+
|
|
14
|
+
let tries = 0
|
|
15
|
+
setInterval(() => {
|
|
16
|
+
tries = 0
|
|
17
|
+
}, 500)
|
|
18
|
+
|
|
19
|
+
export function registerRequire() {
|
|
20
|
+
if (Mod.prototype.require !== globalThis['ogRequire']) {
|
|
21
|
+
console.warn('didnt unregister before re-registering')
|
|
22
|
+
process.exit(1)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const proxyWorm = require('@tamagui/proxy-worm')
|
|
26
|
+
const rnw = require('react-native-web')
|
|
27
|
+
|
|
28
|
+
Mod.prototype.require = function (path: string) {
|
|
29
|
+
if (SHOULD_DEBUG) {
|
|
30
|
+
console.log('tamagui require', path)
|
|
31
|
+
}
|
|
32
|
+
if (path.endsWith('.css')) {
|
|
33
|
+
return {}
|
|
34
|
+
}
|
|
35
|
+
if (
|
|
36
|
+
path === '@gorhom/bottom-sheet' ||
|
|
37
|
+
path.startsWith('react-native-reanimated') ||
|
|
38
|
+
path === 'expo-linear-gradient'
|
|
39
|
+
) {
|
|
40
|
+
return proxyWorm
|
|
41
|
+
}
|
|
42
|
+
if (
|
|
43
|
+
path.startsWith('react-native') &&
|
|
44
|
+
// allow our rnw.tsx imports through
|
|
45
|
+
!path.startsWith('react-native-web/dist/cjs/exports')
|
|
46
|
+
) {
|
|
47
|
+
return rnw
|
|
48
|
+
// return og('react-native-web')
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
const out = og.apply(this, arguments)
|
|
52
|
+
if (!nameToPaths[path]) {
|
|
53
|
+
if (out && typeof out === 'object') {
|
|
54
|
+
for (const key in out) {
|
|
55
|
+
try {
|
|
56
|
+
const conf = out[key]?.staticConfig as StaticConfig
|
|
57
|
+
if (conf) {
|
|
58
|
+
if (conf.componentName) {
|
|
59
|
+
nameToPaths[conf.componentName] ??= new Set()
|
|
60
|
+
const fullName = path.startsWith('.')
|
|
61
|
+
? join(`${this.path.replace(/dist(\/cjs)?/, 'src')}`, path)
|
|
62
|
+
: path
|
|
63
|
+
nameToPaths[conf.componentName].add(fullName)
|
|
64
|
+
} else {
|
|
65
|
+
// console.log('no name component', path)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
} catch {
|
|
69
|
+
// ok
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return out
|
|
75
|
+
} catch (err: any) {
|
|
76
|
+
console.error(
|
|
77
|
+
`Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring (set DEBUG=tamagui to see stack)\n`,
|
|
78
|
+
err.message
|
|
79
|
+
)
|
|
80
|
+
if (SHOULD_DEBUG) {
|
|
81
|
+
console.log(err.stack)
|
|
82
|
+
}
|
|
83
|
+
if (++tries > 10) {
|
|
84
|
+
// avoid infinite loops
|
|
85
|
+
process.exit(1)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function unregisterRequire() {
|
|
92
|
+
Mod.prototype.require = og
|
|
93
|
+
}
|
package/types/constants.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export declare const MEDIA_SEP = "_";
|
|
|
3
3
|
export declare const cacheDir: any;
|
|
4
4
|
export declare const FAILED_EVAL: unique symbol;
|
|
5
5
|
export declare const CONCAT_CLASSNAME_IMPORT = "concatClassName";
|
|
6
|
+
export declare const SHOULD_DEBUG: boolean | undefined;
|
|
6
7
|
//# sourceMappingURL=constants.d.ts.map
|
package/types/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gBAAgB,CAAA;AAI1C,eAAO,MAAM,SAAS,MAAM,CAAA;AAG5B,eAAO,MAAM,QAAQ,KAAkD,CAAA;AAEvE,eAAO,MAAM,WAAW,eAA8B,CAAA;AACtD,eAAO,MAAM,uBAAuB,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gBAAgB,CAAA;AAI1C,eAAO,MAAM,SAAS,MAAM,CAAA;AAG5B,eAAO,MAAM,QAAQ,KAAkD,CAAA;AAEvE,eAAO,MAAM,WAAW,eAA8B,CAAA;AACtD,eAAO,MAAM,uBAAuB,oBAAoB,CAAA;AAExD,eAAO,MAAM,YAAY,qBAAwE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import type { TamaguiConfig } from '@tamagui/core';
|
|
3
|
+
import type { TamaguiConfig } from '@tamagui/core-node';
|
|
4
4
|
export declare function createEvaluator({ tamaguiConfig, staticNamespace, sourcePath, traversePath, shouldPrintDebug, }: {
|
|
5
5
|
tamaguiConfig: TamaguiConfig;
|
|
6
6
|
staticNamespace: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEvaluator.d.ts","sourceRoot":"","sources":["../../src/extractor/createEvaluator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createEvaluator.d.ts","sourceRoot":"","sources":["../../src/extractor/createEvaluator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAQvD,wBAAgB,eAAe,CAAC,EAC9B,aAAa,EACb,eAAe,EACf,UAAU,EACV,YAAY,EACZ,gBAAgB,GACjB,EAAE;IACD,aAAa,EAAE,aAAa,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC,OAoCY,MAAM,SAGlB;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,GAAG,OACtD,MAAM,SAOlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAGL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAGL,qBAAqB,EAQtB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAIL,mBAAmB,EAEpB,MAAM,UAAU,CAAA;AAqCjB,oBAAY,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAI1D,wBAAgB,eAAe;;;;;;;;;;;;;;wBAgCb,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,iSAoBrC,mBAAmB;;;;;;;EAytD3B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { TamaguiInternalConfig } from '@tamagui/core-node';
|
|
2
|
+
export declare const tokens: {
|
|
3
|
+
color: {
|
|
4
|
+
white: import("@tamagui/core-node").Variable<any>;
|
|
5
|
+
black: import("@tamagui/core-node").Variable<any>;
|
|
6
|
+
};
|
|
7
|
+
space: {
|
|
8
|
+
[x: string]: import("@tamagui/core-node").Variable<any>;
|
|
9
|
+
};
|
|
10
|
+
size: {
|
|
11
|
+
0: import("@tamagui/core-node").Variable<any>;
|
|
12
|
+
0.25: import("@tamagui/core-node").Variable<any>;
|
|
13
|
+
0.5: import("@tamagui/core-node").Variable<any>;
|
|
14
|
+
0.75: import("@tamagui/core-node").Variable<any>;
|
|
15
|
+
1: import("@tamagui/core-node").Variable<any>;
|
|
16
|
+
1.5: import("@tamagui/core-node").Variable<any>;
|
|
17
|
+
2: import("@tamagui/core-node").Variable<any>;
|
|
18
|
+
2.5: import("@tamagui/core-node").Variable<any>;
|
|
19
|
+
3: import("@tamagui/core-node").Variable<any>;
|
|
20
|
+
3.5: import("@tamagui/core-node").Variable<any>;
|
|
21
|
+
4: import("@tamagui/core-node").Variable<any>;
|
|
22
|
+
true: import("@tamagui/core-node").Variable<any>;
|
|
23
|
+
4.5: import("@tamagui/core-node").Variable<any>;
|
|
24
|
+
5: import("@tamagui/core-node").Variable<any>;
|
|
25
|
+
5.5: import("@tamagui/core-node").Variable<any>;
|
|
26
|
+
6: import("@tamagui/core-node").Variable<any>;
|
|
27
|
+
6.5: import("@tamagui/core-node").Variable<any>;
|
|
28
|
+
7: import("@tamagui/core-node").Variable<any>;
|
|
29
|
+
7.6: import("@tamagui/core-node").Variable<any>;
|
|
30
|
+
8: import("@tamagui/core-node").Variable<any>;
|
|
31
|
+
8.5: import("@tamagui/core-node").Variable<any>;
|
|
32
|
+
9: import("@tamagui/core-node").Variable<any>;
|
|
33
|
+
9.5: import("@tamagui/core-node").Variable<any>;
|
|
34
|
+
10: import("@tamagui/core-node").Variable<any>;
|
|
35
|
+
11: import("@tamagui/core-node").Variable<any>;
|
|
36
|
+
12: import("@tamagui/core-node").Variable<any>;
|
|
37
|
+
13: import("@tamagui/core-node").Variable<any>;
|
|
38
|
+
14: import("@tamagui/core-node").Variable<any>;
|
|
39
|
+
15: import("@tamagui/core-node").Variable<any>;
|
|
40
|
+
16: import("@tamagui/core-node").Variable<any>;
|
|
41
|
+
17: import("@tamagui/core-node").Variable<any>;
|
|
42
|
+
18: import("@tamagui/core-node").Variable<any>;
|
|
43
|
+
19: import("@tamagui/core-node").Variable<any>;
|
|
44
|
+
20: import("@tamagui/core-node").Variable<any>;
|
|
45
|
+
};
|
|
46
|
+
radius: {
|
|
47
|
+
0: import("@tamagui/core-node").Variable<any>;
|
|
48
|
+
1: import("@tamagui/core-node").Variable<any>;
|
|
49
|
+
2: import("@tamagui/core-node").Variable<any>;
|
|
50
|
+
3: import("@tamagui/core-node").Variable<any>;
|
|
51
|
+
4: import("@tamagui/core-node").Variable<any>;
|
|
52
|
+
5: import("@tamagui/core-node").Variable<any>;
|
|
53
|
+
6: import("@tamagui/core-node").Variable<any>;
|
|
54
|
+
7: import("@tamagui/core-node").Variable<any>;
|
|
55
|
+
8: import("@tamagui/core-node").Variable<any>;
|
|
56
|
+
9: import("@tamagui/core-node").Variable<any>;
|
|
57
|
+
10: import("@tamagui/core-node").Variable<any>;
|
|
58
|
+
11: import("@tamagui/core-node").Variable<any>;
|
|
59
|
+
12: import("@tamagui/core-node").Variable<any>;
|
|
60
|
+
};
|
|
61
|
+
zIndex: {
|
|
62
|
+
0: import("@tamagui/core-node").Variable<any>;
|
|
63
|
+
1: import("@tamagui/core-node").Variable<any>;
|
|
64
|
+
2: import("@tamagui/core-node").Variable<any>;
|
|
65
|
+
3: import("@tamagui/core-node").Variable<any>;
|
|
66
|
+
4: import("@tamagui/core-node").Variable<any>;
|
|
67
|
+
5: import("@tamagui/core-node").Variable<any>;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export declare const config: TamaguiInternalConfig<import("@tamagui/core-node").CreateTokens<import("@tamagui/core-node").VariableVal>, {
|
|
71
|
+
[key: string]: Partial<import("@tamagui/core-node").TamaguiBaseTheme> & {
|
|
72
|
+
[key: string]: import("@tamagui/core-node").VariableVal;
|
|
73
|
+
};
|
|
74
|
+
}, {}, {
|
|
75
|
+
[x: string]: {
|
|
76
|
+
[key: string]: string | number;
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
[key: string]: string | {
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
};
|
|
82
|
+
}, import("@tamagui/core-node").GenericFonts>;
|
|
83
|
+
//# sourceMappingURL=defaultTamaguiConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTamaguiConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/defaultTamaguiConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAA;AAmGnG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASjB,CAAA;AAaF,eAAO,MAAM,MAAM;;;;;;;;;;;;6CA2BQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAS/F,aAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAA;AAED,oBAAY,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC5C,aAAa,EAAE,qBAAqB,CAAA;IACpC,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CA0F/F"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,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,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,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,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require.d.ts","sourceRoot":"","sources":["../src/require.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,UAAoB,CAAA;AAO/C,wBAAgB,eAAe,SAsE9B;AAED,wBAAgB,iBAAiB,SAEhC"}
|