@tamagui/static 1.0.1-beta.59 → 1.0.1-beta.62
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/extractor/createExtractor.js +49 -21
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/extractMediaStyle.js +1 -1
- package/dist/cjs/extractor/extractMediaStyle.js.map +2 -2
- package/dist/cjs/extractor/extractToClassNames.js +1 -1
- package/dist/cjs/extractor/extractToClassNames.js.map +2 -2
- package/dist/esm/extractor/createExtractor.js +54 -24
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/extractMediaStyle.js +1 -1
- package/dist/esm/extractor/extractMediaStyle.js.map +2 -2
- package/dist/esm/extractor/extractToClassNames.js +1 -1
- package/dist/esm/extractor/extractToClassNames.js.map +2 -2
- package/dist/jsx/extractor/createExtractor.js +54 -24
- package/dist/jsx/extractor/extractMediaStyle.js +1 -1
- package/dist/jsx/extractor/extractToClassNames.js +1 -1
- package/package.json +9 -7
- package/src/constants.ts +13 -0
- package/src/extractor/accessSafe.ts +18 -0
- package/src/extractor/babelParse.ts +27 -0
- package/src/extractor/buildClassName.ts +61 -0
- package/src/extractor/createEvaluator.ts +69 -0
- package/src/extractor/createExtractor.ts +1725 -0
- package/src/extractor/ensureImportingConcat.ts +39 -0
- package/src/extractor/evaluateAstNode.ts +121 -0
- package/src/extractor/extractHelpers.ts +119 -0
- package/src/extractor/extractMediaStyle.ts +192 -0
- package/src/extractor/extractToClassNames.ts +426 -0
- package/src/extractor/findTopmostFunction.ts +22 -0
- package/src/extractor/generatedUid.ts +43 -0
- package/src/extractor/getPrefixLogs.ts +6 -0
- package/src/extractor/getPropValueFromAttributes.ts +92 -0
- package/src/extractor/getSourceModule.ts +101 -0
- package/src/extractor/getStaticBindingsForScope.ts +183 -0
- package/src/extractor/hoistClassNames.ts +45 -0
- package/src/extractor/literalToAst.ts +84 -0
- package/src/extractor/loadTamagui.ts +139 -0
- package/src/extractor/logLines.ts +16 -0
- package/src/extractor/normalizeTernaries.ts +63 -0
- package/src/extractor/removeUnusedHooks.ts +76 -0
- package/src/extractor/timer.ts +18 -0
- package/src/extractor/validHTMLAttributes.ts +99 -0
- package/src/index.ts +9 -0
- package/src/patchReactNativeWeb.ts +165 -0
- package/src/types.ts +97 -0
- package/types/extractor/createExtractor.d.ts +14 -1
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/extractMediaStyle.d.ts.map +1 -1
- package/types/extractor/extractToClassNames.d.ts.map +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export const validHTMLAttributes = {
|
|
2
|
+
autocomplete: true,
|
|
3
|
+
border: true,
|
|
4
|
+
contenteditable: true,
|
|
5
|
+
crossorigin: true,
|
|
6
|
+
dir: true,
|
|
7
|
+
draggable: true,
|
|
8
|
+
enctype: true,
|
|
9
|
+
formenctype: true,
|
|
10
|
+
formmethod: true,
|
|
11
|
+
formtarget: true,
|
|
12
|
+
inputmode: true,
|
|
13
|
+
kind: true,
|
|
14
|
+
link: true,
|
|
15
|
+
method: true,
|
|
16
|
+
preload: true,
|
|
17
|
+
referrerpolicy: true,
|
|
18
|
+
rel: true,
|
|
19
|
+
rev: true,
|
|
20
|
+
role: true,
|
|
21
|
+
sandbox: true,
|
|
22
|
+
shape: true,
|
|
23
|
+
spellcheck: true,
|
|
24
|
+
target: true,
|
|
25
|
+
translate: true,
|
|
26
|
+
type: true,
|
|
27
|
+
wrap: true,
|
|
28
|
+
'aria-autocomplete': true,
|
|
29
|
+
'aria-busy': true,
|
|
30
|
+
'aria-checked': true,
|
|
31
|
+
'aria-current': true,
|
|
32
|
+
'aria-disabled': true,
|
|
33
|
+
'aria-expanded': true,
|
|
34
|
+
'aria-haspopup': true,
|
|
35
|
+
'aria-hidden': true,
|
|
36
|
+
'aria-invalid': true,
|
|
37
|
+
'aria-polite': true,
|
|
38
|
+
'aria-modal': true,
|
|
39
|
+
'aria-multiline': true,
|
|
40
|
+
'aria-multiselectable': true,
|
|
41
|
+
'aria-orientation': true,
|
|
42
|
+
'aria-pressed': true,
|
|
43
|
+
'aria-readonly': true,
|
|
44
|
+
'aria-relevant': true,
|
|
45
|
+
'aria-required': true,
|
|
46
|
+
'aria-selected': true,
|
|
47
|
+
'aria-sort': true,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// for moving off react-native-web eventually (unused atm)
|
|
51
|
+
export const validAccessibilityAttributes = {
|
|
52
|
+
accessibilityRole: true,
|
|
53
|
+
accessibilityActiveDescendant: true,
|
|
54
|
+
accessibilityAtomic: true,
|
|
55
|
+
accessibilityAutoComplete: true,
|
|
56
|
+
accessibilityBusy: true,
|
|
57
|
+
accessibilityChecked: true,
|
|
58
|
+
accessibilityColumnCount: true,
|
|
59
|
+
accessibilityColumnIndex: true,
|
|
60
|
+
accessibilityColumnSpan: true,
|
|
61
|
+
accessibilityControls: true,
|
|
62
|
+
accessibilityCurrent: true,
|
|
63
|
+
accessibilityDescribedBy: true,
|
|
64
|
+
accessibilityDetails: true,
|
|
65
|
+
disabled: true,
|
|
66
|
+
accessibilityErrorMessage: true,
|
|
67
|
+
accessibilityExpanded: true,
|
|
68
|
+
accessibilityFlowTo: true,
|
|
69
|
+
accessibilityHasPopup: true,
|
|
70
|
+
accessibilityHidden: true,
|
|
71
|
+
accessibilityInvalid: true,
|
|
72
|
+
accessibilityKeyShortcuts: true,
|
|
73
|
+
accessibilityLabel: true,
|
|
74
|
+
accessibilityLabelledBy: true,
|
|
75
|
+
accessibilityLevel: true,
|
|
76
|
+
accessibilityLiveRegion: true,
|
|
77
|
+
accessibilityModal: true,
|
|
78
|
+
accessibilityMultiline: true,
|
|
79
|
+
accessibilityMultiSelectable: true,
|
|
80
|
+
accessibilityOrientation: true,
|
|
81
|
+
accessibilityOwns: true,
|
|
82
|
+
accessibilityPlaceholder: true,
|
|
83
|
+
accessibilityPosInSet: true,
|
|
84
|
+
accessibilityPressed: true,
|
|
85
|
+
accessibilityReadOnly: true,
|
|
86
|
+
accessibilityRequired: true,
|
|
87
|
+
accessibilityRoleDescription: true,
|
|
88
|
+
accessibilityRowCount: true,
|
|
89
|
+
accessibilityRowIndex: true,
|
|
90
|
+
accessibilityRowSpan: true,
|
|
91
|
+
accessibilitySelected: true,
|
|
92
|
+
accessibilitySetSize: true,
|
|
93
|
+
accessibilitySort: true,
|
|
94
|
+
accessibilityValueMax: true,
|
|
95
|
+
accessibilityValueMin: true,
|
|
96
|
+
accessibilityValueNow: true,
|
|
97
|
+
accessibilityValueText: true,
|
|
98
|
+
nativeID: true,
|
|
99
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
process.env.TAMAGUI_COMPILE_PROCESS = '1'
|
|
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 './patchReactNativeWeb'
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import path from 'path'
|
|
2
|
+
|
|
3
|
+
import * as fs from 'fs-extra'
|
|
4
|
+
|
|
5
|
+
// were patching react-native-web so we can use some internal methods
|
|
6
|
+
// we do it this way because we need to rely on webpack or bundler config to determine cjs vs esm
|
|
7
|
+
// so we can't just require it all directly
|
|
8
|
+
// would be nice in the future to be able to eject from react-native-web entirely optionally
|
|
9
|
+
|
|
10
|
+
// keep it sync
|
|
11
|
+
export function patchReactNativeWeb(dir: string = require.resolve('react-native-web')) {
|
|
12
|
+
const rootDir = dir.replace(/[\/\\]dist.*/, '')
|
|
13
|
+
const modulePath = path.join(rootDir, 'dist', 'tamagui-exports.js')
|
|
14
|
+
const cjsPath = path.join(rootDir, 'dist', 'cjs', 'tamagui-exports.js')
|
|
15
|
+
const shouldPatchExports =
|
|
16
|
+
fs.existsSync(modulePath) &&
|
|
17
|
+
fs.readFileSync(modulePath, 'utf-8') === moduleExports &&
|
|
18
|
+
fs.existsSync(cjsPath) &&
|
|
19
|
+
fs.readFileSync(cjsPath, 'utf-8') === cjsExports
|
|
20
|
+
if (!shouldPatchExports) {
|
|
21
|
+
console.log(' | patch ' + path.relative(rootDir, modulePath))
|
|
22
|
+
console.log(' | patch ' + path.relative(rootDir, cjsPath))
|
|
23
|
+
fs.writeFileSync(modulePath, moduleExports)
|
|
24
|
+
fs.writeFileSync(cjsPath, cjsExports)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// patch to allow className prop
|
|
28
|
+
const patches = [
|
|
29
|
+
{
|
|
30
|
+
id: 'dom-props',
|
|
31
|
+
filePath: ['modules', 'createDOMProps', 'index.js'],
|
|
32
|
+
replacee: ` if (dataSet != null) {`,
|
|
33
|
+
replacer: `
|
|
34
|
+
if (props.dataSet && props.dataSet.className) {
|
|
35
|
+
const { className, ...dataSetRest } = props.dataSet
|
|
36
|
+
classList = className
|
|
37
|
+
dataSet = dataSetRest
|
|
38
|
+
}
|
|
39
|
+
if (props.dataSet && props.dataSet.id) {
|
|
40
|
+
domProps['id'] = props.dataSet.id
|
|
41
|
+
}
|
|
42
|
+
if (dataSet != null) {`,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'forward-props',
|
|
46
|
+
filePath: ['modules', 'forwardedProps', 'index.js'],
|
|
47
|
+
replacee: `dataSet: true,`,
|
|
48
|
+
replacer: `id: true, dataSet: true,`,
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
for (const { filePath, replacee, replacer } of patches) {
|
|
53
|
+
const files = [
|
|
54
|
+
path.join(rootDir, 'dist', ...filePath),
|
|
55
|
+
path.join(rootDir, 'dist', 'cjs', ...filePath),
|
|
56
|
+
]
|
|
57
|
+
for (const file of files) {
|
|
58
|
+
const contents = fs.readFileSync(file, 'utf-8')
|
|
59
|
+
if (contents.includes(replacer)) {
|
|
60
|
+
continue
|
|
61
|
+
}
|
|
62
|
+
if (!contents.includes(replacee)) {
|
|
63
|
+
console.warn(
|
|
64
|
+
`⚠️ Error: couldn't apply className patch! Maybe using incompatible react-native-web version.`,
|
|
65
|
+
{
|
|
66
|
+
replacee,
|
|
67
|
+
contents,
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
continue
|
|
71
|
+
}
|
|
72
|
+
console.log(' | patch ' + path.relative(rootDir, file))
|
|
73
|
+
fs.writeFileSync(file, contents.replace(replacee, replacer))
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// if entry files not patched, patch them:
|
|
78
|
+
const moduleEntry = path.join(rootDir, 'dist', 'index.js')
|
|
79
|
+
const moduleEntrySrc = fs.readFileSync(moduleEntry, 'utf-8')
|
|
80
|
+
if (!moduleEntrySrc.includes('// tamagui-patch-v4')) {
|
|
81
|
+
fs.writeFileSync(
|
|
82
|
+
moduleEntry,
|
|
83
|
+
`${removePatch(moduleEntrySrc)}
|
|
84
|
+
|
|
85
|
+
// tamagui-patch-v4
|
|
86
|
+
import * as TExports from './tamagui-exports'
|
|
87
|
+
export const TamaguiExports = TExports
|
|
88
|
+
// tamagui-patch-end
|
|
89
|
+
`
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
const cjsEntry = path.join(rootDir, 'dist', 'cjs', 'index.js')
|
|
93
|
+
const cjsEntrySrc = fs.readFileSync(cjsEntry, 'utf-8')
|
|
94
|
+
if (!cjsEntrySrc.includes('// tamagui-patch-v4')) {
|
|
95
|
+
fs.writeFileSync(
|
|
96
|
+
cjsEntry,
|
|
97
|
+
`${removePatch(cjsEntrySrc)}
|
|
98
|
+
|
|
99
|
+
// tamagui-patch-v4
|
|
100
|
+
exports.TamaguiExports = _interopRequireDefault(require("./tamagui-exports"));
|
|
101
|
+
// tamagui-patch-end
|
|
102
|
+
`
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function removePatch(source: string) {
|
|
108
|
+
return source.replace(/\/\/ tamagui-patch([.\s\S]*)/g, '')
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// view exports/View.ts
|
|
112
|
+
const forwardedPropsObj = `{
|
|
113
|
+
...fwdProps.defaultProps,
|
|
114
|
+
...fwdProps.accessibilityProps,
|
|
115
|
+
...fwdProps.clickProps,
|
|
116
|
+
...fwdProps.focusProps,
|
|
117
|
+
...fwdProps.keyboardProps,
|
|
118
|
+
...fwdProps.mouseProps,
|
|
119
|
+
...fwdProps.touchProps,
|
|
120
|
+
...fwdProps.styleProps,
|
|
121
|
+
href: true,
|
|
122
|
+
lang: true,
|
|
123
|
+
onScroll: true,
|
|
124
|
+
onWheel: true,
|
|
125
|
+
pointerEvents: true
|
|
126
|
+
}
|
|
127
|
+
`
|
|
128
|
+
|
|
129
|
+
const moduleExports = `
|
|
130
|
+
export { atomic } from './exports/StyleSheet/compile'
|
|
131
|
+
export { default as createCompileableStyle } from './exports/StyleSheet/createCompileableStyle'
|
|
132
|
+
export { default as createReactDOMStyle } from './exports/StyleSheet/createReactDOMStyle'
|
|
133
|
+
export { default as i18Style } from './exports/StyleSheet/i18nStyle'
|
|
134
|
+
export { default as createDOMProps } from './modules/createDOMProps'
|
|
135
|
+
export { default as AccessibilityUtil } from './modules/AccessibilityUtil'
|
|
136
|
+
export { default as createElement } from './exports/createElement'
|
|
137
|
+
export { default as css } from './exports/StyleSheet/css'
|
|
138
|
+
export { default as TextAncestorContext } from './exports/Text/TextAncestorContext'
|
|
139
|
+
export { default as pick } from './modules/pick'
|
|
140
|
+
export { default as useElementLayout } from './modules/useElementLayout'
|
|
141
|
+
export { default as useMergeRefs } from './modules/useMergeRefs'
|
|
142
|
+
export { default as usePlatformMethods } from './modules/usePlatformMethods'
|
|
143
|
+
export { default as useResponderEvents } from './modules/useResponderEvents'
|
|
144
|
+
import * as fwdProps from './modules/forwardedProps'
|
|
145
|
+
export const forwardedProps = ${forwardedPropsObj}
|
|
146
|
+
`
|
|
147
|
+
|
|
148
|
+
const cjsExports = `
|
|
149
|
+
exports.atomic = require('./exports/StyleSheet/compile').atomic
|
|
150
|
+
exports.createCompileableStyle = require('./exports/StyleSheet/createCompileableStyle')
|
|
151
|
+
exports.createReactDOMStyle = require('./exports/StyleSheet/createReactDOMStyle')
|
|
152
|
+
exports.i18Style = require('./exports/StyleSheet/i18nStyle')
|
|
153
|
+
exports.createDOMProps = require('./modules/createDOMProps')
|
|
154
|
+
exports.AccessibilityUtil = require('./modules/AccessibilityUtil')
|
|
155
|
+
exports.createElement = require('./exports/createElement')
|
|
156
|
+
exports.css = require('./exports/StyleSheet/css')
|
|
157
|
+
exports.TextAncestorContext = require('./exports/Text/TextAncestorContext')
|
|
158
|
+
exports.pick = require('./modules/pick')
|
|
159
|
+
exports.useElementLayout = require('./modules/useElementLayout')
|
|
160
|
+
exports.useMergeRefs = require('./modules/useMergeRefs')
|
|
161
|
+
exports.usePlatformMethods = require('./modules/usePlatformMethods')
|
|
162
|
+
exports.useResponderEvents = require('./modules/useResponderEvents')
|
|
163
|
+
const fwdProps = require('./modules/forwardedProps')
|
|
164
|
+
exports.forwardedProps = ${forwardedPropsObj}
|
|
165
|
+
`
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { NodePath } from '@babel/traverse'
|
|
2
|
+
import * as t from '@babel/types'
|
|
3
|
+
import { PseudoStyles } from '@tamagui/core-node'
|
|
4
|
+
import { ViewStyle } from 'react-native'
|
|
5
|
+
|
|
6
|
+
export type ClassNameObject = t.StringLiteral | t.Expression
|
|
7
|
+
|
|
8
|
+
export interface CacheObject {
|
|
9
|
+
[key: string]: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TamaguiOptions {
|
|
13
|
+
// module paths you want to compile with tamagui (for example ['tamagui'])
|
|
14
|
+
components: string[]
|
|
15
|
+
// your tamagui.config.ts
|
|
16
|
+
config?: string
|
|
17
|
+
evaluateVars?: boolean
|
|
18
|
+
importsWhitelist?: string[]
|
|
19
|
+
disable?: boolean
|
|
20
|
+
disableExtraction?: boolean
|
|
21
|
+
disableDebugAttr?: boolean
|
|
22
|
+
disableExtractInlineMedia?: boolean
|
|
23
|
+
disableExtractVariables?: boolean
|
|
24
|
+
excludeReactNativeWebExports?: string[]
|
|
25
|
+
exclude?: RegExp
|
|
26
|
+
logTimings?: boolean
|
|
27
|
+
prefixLogs?: string
|
|
28
|
+
|
|
29
|
+
// probably non user options
|
|
30
|
+
cssPath?: string
|
|
31
|
+
cssData?: any
|
|
32
|
+
deoptProps?: Set<string>
|
|
33
|
+
excludeProps?: Set<string>
|
|
34
|
+
inlineProps?: Set<string>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type ExtractedAttrAttr = {
|
|
38
|
+
type: 'attr'
|
|
39
|
+
value: t.JSXAttribute | t.JSXSpreadAttribute
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type ExtractedAttrStyle = {
|
|
43
|
+
type: 'style'
|
|
44
|
+
value: ViewStyle & PseudoStyles
|
|
45
|
+
attr?: t.JSXAttribute | t.JSXSpreadAttribute
|
|
46
|
+
name?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type ExtractedAttr =
|
|
50
|
+
| ExtractedAttrAttr
|
|
51
|
+
| { type: 'ternary'; value: Ternary }
|
|
52
|
+
| ExtractedAttrStyle
|
|
53
|
+
|
|
54
|
+
export type ExtractTagProps = {
|
|
55
|
+
attrs: ExtractedAttr[]
|
|
56
|
+
node: t.JSXOpeningElement
|
|
57
|
+
attemptEval: (exprNode: t.Node, evalFn?: ((node: t.Node) => any) | undefined) => any
|
|
58
|
+
jsxPath: NodePath<t.JSXElement>
|
|
59
|
+
programPath: NodePath<t.Program>
|
|
60
|
+
originalNodeName: string
|
|
61
|
+
lineNumbers: string
|
|
62
|
+
filePath: string
|
|
63
|
+
isFlattened: boolean
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ExtractorParseProps = TamaguiOptions & {
|
|
67
|
+
target: 'native' | 'html'
|
|
68
|
+
sourcePath?: string
|
|
69
|
+
shouldPrintDebug?: boolean | 'verbose'
|
|
70
|
+
onExtractTag: (props: ExtractTagProps) => void
|
|
71
|
+
getFlattenedNode: (props: { isTextView: boolean; tag: string }) => string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Ternary {
|
|
75
|
+
test: t.Expression
|
|
76
|
+
// shorthand props that don't use hooks
|
|
77
|
+
inlineMediaQuery?: string
|
|
78
|
+
remove: Function
|
|
79
|
+
consequent: Object | null
|
|
80
|
+
alternate: Object | null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type StyleObject = {
|
|
84
|
+
property: string
|
|
85
|
+
value: string
|
|
86
|
+
className: string
|
|
87
|
+
identifier: string
|
|
88
|
+
rules: string[]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type ClassNameToStyleObj = {
|
|
92
|
+
[key: string]: StyleObject
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface PluginContext {
|
|
96
|
+
write: (path: string, rules: { [key: string]: string }) => any
|
|
97
|
+
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
+
import { TamaguiInternalConfig } from '@tamagui/core-node';
|
|
3
4
|
import { ExtractorParseProps } from '../types';
|
|
4
5
|
export declare type Extractor = ReturnType<typeof createExtractor>;
|
|
5
6
|
export declare function createExtractor(): {
|
|
6
|
-
getTamagui(): TamaguiInternalConfig
|
|
7
|
+
getTamagui(): TamaguiInternalConfig<import("@tamagui/core-node").CreateTokens<import("@tamagui/core-node").VariableVal>, {
|
|
8
|
+
[key: string]: Partial<import("@tamagui/core-node").TamaguiBaseTheme> & {
|
|
9
|
+
[key: string]: import("@tamagui/core-node").VariableVal;
|
|
10
|
+
};
|
|
11
|
+
}, {}, {
|
|
12
|
+
[x: string]: {
|
|
13
|
+
[key: string]: string | number;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
[key: string]: string | {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
}, import("@tamagui/core-node").GenericFonts>;
|
|
7
20
|
parse: (fileOrPath: NodePath<t.Program> | t.File, { config, importsWhitelist, evaluateVars, shouldPrintDebug, sourcePath, onExtractTag, getFlattenedNode, disable, disableExtraction, disableExtractInlineMedia, disableExtractVariables, disableDebugAttr, prefixLogs, excludeProps, target, ...props }: ExtractorParseProps) => {
|
|
8
21
|
flattened: number;
|
|
9
22
|
optimized: number;
|
|
@@ -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;
|
|
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,EAStB,MAAM,oBAAoB,CAAA;AAK3B,OAAO,EAIL,mBAAmB,EAEpB,MAAM,UAAU,CAAA;AAqCjB,oBAAY,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAI1D,wBAAgB,eAAe;;;;;;;;;;;;;;wBAqBb,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,0PAkBrC,mBAAmB;;;;;;EAilD3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAwC,MAAM,oBAAoB,CAAA;AAIhG,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAG/C,wBAAgB,iBAAiB,CAC/B,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;;;
|
|
1
|
+
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAwC,MAAM,oBAAoB,CAAA;AAIhG,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAG/C,wBAAgB,iBAAiB,CAC/B,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;;;SA2E9C;AAiFD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,UAAU,EAAE,MAAM,WAiBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,OAAO,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAiB7C,oBAAY,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,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE;IACD,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,OAAO,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAiB7C,oBAAY,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,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE;IACD,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,iBAAiB,GAAG,IAAI,CA4W3B"}
|