@tamagui/static 1.2.4 → 1.2.6
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 +13 -9
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/createExtractor.js +13 -9
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/package.json +14 -14
- package/src/extractor/createExtractor.ts +14 -10
- package/types/extractor/createExtractor.d.ts +1 -13
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/extractHelpers.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/static",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"@babel/runtime": "^7.19.4",
|
|
36
36
|
"@babel/traverse": "^7.19.6",
|
|
37
37
|
"@expo/match-media": "^0.3.0",
|
|
38
|
-
"@tamagui/build": "^1.2.
|
|
39
|
-
"@tamagui/cli-color": "^1.2.
|
|
40
|
-
"@tamagui/config-default-node": "^1.2.
|
|
41
|
-
"@tamagui/core-node": "^1.2.
|
|
42
|
-
"@tamagui/fake-react-native": "^1.2.
|
|
43
|
-
"@tamagui/helpers": "^1.2.
|
|
44
|
-
"@tamagui/helpers-node": "^1.2.
|
|
45
|
-
"@tamagui/proxy-worm": "^1.2.
|
|
46
|
-
"@tamagui/shorthands": "^1.2.
|
|
47
|
-
"@tamagui/types": "^1.2.
|
|
38
|
+
"@tamagui/build": "^1.2.6",
|
|
39
|
+
"@tamagui/cli-color": "^1.2.6",
|
|
40
|
+
"@tamagui/config-default-node": "^1.2.6",
|
|
41
|
+
"@tamagui/core-node": "^1.2.6",
|
|
42
|
+
"@tamagui/fake-react-native": "^1.2.6",
|
|
43
|
+
"@tamagui/helpers": "^1.2.6",
|
|
44
|
+
"@tamagui/helpers-node": "^1.2.6",
|
|
45
|
+
"@tamagui/proxy-worm": "^1.2.6",
|
|
46
|
+
"@tamagui/shorthands": "^1.2.6",
|
|
47
|
+
"@tamagui/types": "^1.2.6",
|
|
48
48
|
"babel-literal-to-ast": "^2.1.0",
|
|
49
49
|
"esbuild": "^0.17.5",
|
|
50
50
|
"esbuild-register": "^3.4.2",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
"fs-extra": "^11.1.0",
|
|
54
54
|
"invariant": "^2.2.4",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
|
-
"react-native-web-internals": "^1.2.
|
|
57
|
-
"react-native-web-lite": "^1.2.
|
|
56
|
+
"react-native-web-internals": "^1.2.6",
|
|
57
|
+
"react-native-web-lite": "^1.2.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@babel/plugin-syntax-typescript": "^7.18.6",
|
|
61
61
|
"@babel/types": "^7.19.4",
|
|
62
62
|
"@dish/babel-preset": "^0.0.6",
|
|
63
|
-
"@tamagui/test-design-system": "^1.2.
|
|
63
|
+
"@tamagui/test-design-system": "^1.2.6",
|
|
64
64
|
"@testing-library/react": "^13.4.0",
|
|
65
65
|
"@types/babel__generator": "^7.6.4",
|
|
66
66
|
"@types/babel__traverse": "^7.18.2",
|
|
@@ -1950,15 +1950,6 @@ export function createExtractor(
|
|
|
1950
1950
|
throw new Error(`Impossible, no styles`)
|
|
1951
1951
|
}
|
|
1952
1952
|
|
|
1953
|
-
const isNativeNotFlat = !shouldFlatten && target === 'native'
|
|
1954
|
-
if (isNativeNotFlat) {
|
|
1955
|
-
if (shouldPrintDebug) {
|
|
1956
|
-
logger.info(`Disabled flattening except for simple cases on native for now`)
|
|
1957
|
-
}
|
|
1958
|
-
node.attributes = ogAttributes
|
|
1959
|
-
return null
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
1953
|
let getStyleError: any = null
|
|
1963
1954
|
|
|
1964
1955
|
// fix up ternaries, combine final style values
|
|
@@ -2083,9 +2074,19 @@ export function createExtractor(
|
|
|
2083
2074
|
}
|
|
2084
2075
|
}
|
|
2085
2076
|
|
|
2077
|
+
const isNativeNotFlat = !shouldFlatten && target === 'native'
|
|
2078
|
+
if (isNativeNotFlat) {
|
|
2079
|
+
if (shouldPrintDebug) {
|
|
2080
|
+
logger.info(`Disabled flattening except for simple cases on native for now`)
|
|
2081
|
+
}
|
|
2082
|
+
node.attributes = ogAttributes
|
|
2083
|
+
return null
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
2086
|
if (shouldPrintDebug) {
|
|
2087
2087
|
// prettier-ignore
|
|
2088
|
-
logger.info([`
|
|
2088
|
+
logger.info([` - inlined props (${inlined.size}):`, shouldDeopt ? ' deopted' : '', hasSpread ? ' has spread' : '', staticConfig.neverFlatten ? 'neverFlatten' : ''].join(' '))
|
|
2089
|
+
logger.info(` - shouldFlatten/isFlattened: ${shouldFlatten}`)
|
|
2089
2090
|
logger.info(` - attrs (end):\n ${logLines(attrs.map(attrStr).join(', '))}`)
|
|
2090
2091
|
}
|
|
2091
2092
|
|
|
@@ -2103,6 +2104,9 @@ export function createExtractor(
|
|
|
2103
2104
|
completeProps,
|
|
2104
2105
|
staticConfig,
|
|
2105
2106
|
})
|
|
2107
|
+
} catch (err) {
|
|
2108
|
+
node.attributes = ogAttributes
|
|
2109
|
+
console.error(`err: ${err}`)
|
|
2106
2110
|
} finally {
|
|
2107
2111
|
if (debugPropValue) {
|
|
2108
2112
|
shouldPrintDebug = ogDebug
|
|
@@ -12,19 +12,7 @@ export declare function createExtractor({ logger }?: ExtractorOptions): {
|
|
|
12
12
|
cleanupBeforeExit: typeof cleanupBeforeExit;
|
|
13
13
|
loadTamagui: (props: TamaguiOptions) => Promise<TamaguiProjectInfo>;
|
|
14
14
|
loadTamaguiSync: (props: TamaguiOptions) => TamaguiProjectInfo;
|
|
15
|
-
getTamagui():
|
|
16
|
-
[key: string]: Partial<import("@tamagui/core-node").TamaguiBaseTheme> & {
|
|
17
|
-
[key: string]: import("@tamagui/core-node").VariableVal;
|
|
18
|
-
};
|
|
19
|
-
}, import("@tamagui/core-node").GenericShorthands, {
|
|
20
|
-
[key: string]: {
|
|
21
|
-
[key: string]: string | number;
|
|
22
|
-
};
|
|
23
|
-
}, {
|
|
24
|
-
[key: string]: string | any[] | {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
27
|
-
}, import("@tamagui/core-node").GenericFonts> | undefined;
|
|
15
|
+
getTamagui(): any;
|
|
28
16
|
parseSync: (f: FileOrPath, props: ExtractorParseProps) => {
|
|
29
17
|
styled: number;
|
|
30
18
|
flattened: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAiB,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AACrE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAIV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,aAAa,CAAA;AAapB,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,kBAAkB,EAAgC,MAAM,kBAAkB,CAAA;AAiCnF,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;AAI9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,GAAE,gBAAsC;;;;;yBA4BjC,cAAc;6BAPhB,cAAc
|
|
1
|
+
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAiB,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AACrE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAIV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,aAAa,CAAA;AAapB,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,kBAAkB,EAAgC,MAAM,kBAAkB,CAAA;AAiCnF,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;AAI9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,GAAE,gBAAsC;;;;;yBA4BjC,cAAc;6BAPhB,cAAc;;mBAwBtB,UAAU,SAAS,mBAAmB;;;;;;;eAIpC,UAAU,SAAS,mBAAmB;;;;;;;EAk9D1D"}
|
|
@@ -11,14 +11,14 @@ export declare function isValidThemeHook(props: TamaguiOptionsWithFileInfo, jsxP
|
|
|
11
11
|
export declare const isInsideComponentPackage: (props: TamaguiOptionsWithFileInfo, moduleName: string) => any;
|
|
12
12
|
export declare const isComponentPackage: (props: TamaguiOptionsWithFileInfo, srcName: string) => any;
|
|
13
13
|
export declare function getValidComponent(props: TamaguiOptionsWithFileInfo, moduleName: string, componentName: string): false | {
|
|
14
|
-
staticConfig:
|
|
14
|
+
staticConfig: StaticConfigParsed;
|
|
15
15
|
} | null;
|
|
16
16
|
export declare const isValidModule: (props: TamaguiOptionsWithFileInfo, moduleName: string) => {
|
|
17
17
|
isLocal: boolean;
|
|
18
18
|
isValid: any;
|
|
19
19
|
};
|
|
20
20
|
export declare const getValidImport: (props: TamaguiOptionsWithFileInfo, moduleName: string, componentName?: string) => {
|
|
21
|
-
staticConfig:
|
|
21
|
+
staticConfig: StaticConfigParsed;
|
|
22
22
|
} | null;
|
|
23
23
|
export declare const isValidImport: (props: TamaguiOptionsWithFileInfo, moduleName: string, componentName?: string) => any;
|
|
24
24
|
//# sourceMappingURL=extractHelpers.d.ts.map
|