@tamagui/static 1.85.12 → 1.86.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/extractor/createExtractor.js +20 -18
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/createExtractor.native.js +20 -13
- package/dist/cjs/extractor/createExtractor.native.js.map +2 -2
- package/dist/esm/extractor/createExtractor.js +20 -18
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/createExtractor.native.js +20 -13
- package/dist/esm/extractor/createExtractor.native.js.map +2 -2
- package/package.json +14 -14
- package/src/extractor/createExtractor.ts +13 -13
- package/src/types.ts +1 -0
- package/types/extractor/createExtractor.d.ts +1 -1
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/types.d.ts +1 -0
- package/types/types.d.ts.map +1 -1
@@ -55,18 +55,6 @@ const UNTOUCHED_PROPS = {
|
|
55
55
|
className: true,
|
56
56
|
}
|
57
57
|
|
58
|
-
const INLINE_EXTRACTABLE = {
|
59
|
-
ref: 'ref',
|
60
|
-
key: 'key',
|
61
|
-
...(process.env.TAMAGUI_TARGET === 'web' && {
|
62
|
-
onPress: 'onClick',
|
63
|
-
onHoverIn: 'onMouseEnter',
|
64
|
-
onHoverOut: 'onMouseLeave',
|
65
|
-
onPressIn: 'onMouseDown',
|
66
|
-
onPressOut: 'onMouseUp',
|
67
|
-
}),
|
68
|
-
}
|
69
|
-
|
70
58
|
const validHooks = {
|
71
59
|
useMedia: true,
|
72
60
|
useTheme: true,
|
@@ -85,13 +73,25 @@ function isFullyDisabled(props: TamaguiOptions) {
|
|
85
73
|
}
|
86
74
|
|
87
75
|
export function createExtractor(
|
88
|
-
{ logger = console }: ExtractorOptions = { logger: console }
|
76
|
+
{ logger = console, platform = 'web' }: ExtractorOptions = { logger: console }
|
89
77
|
) {
|
90
78
|
if (!process.env.TAMAGUI_TARGET) {
|
91
79
|
console.warn('⚠️ Please set process.env.TAMAGUI_TARGET to either "web" or "native"')
|
92
80
|
process.exit(1)
|
93
81
|
}
|
94
82
|
|
83
|
+
const INLINE_EXTRACTABLE = {
|
84
|
+
ref: 'ref',
|
85
|
+
key: 'key',
|
86
|
+
...(platform === 'web' && {
|
87
|
+
onPress: 'onClick',
|
88
|
+
onHoverIn: 'onMouseEnter',
|
89
|
+
onHoverOut: 'onMouseLeave',
|
90
|
+
onPressIn: 'onMouseDown',
|
91
|
+
onPressOut: 'onMouseUp',
|
92
|
+
}),
|
93
|
+
}
|
94
|
+
|
95
95
|
const componentState: TamaguiComponentState = {
|
96
96
|
focus: false,
|
97
97
|
hover: false,
|
package/src/types.ts
CHANGED
@@ -5,7 +5,7 @@ import { TamaguiProjectInfo } from './bundleConfig';
|
|
5
5
|
import { cleanupBeforeExit } from './getStaticBindingsForScope';
|
6
6
|
export type Extractor = ReturnType<typeof createExtractor>;
|
7
7
|
type FileOrPath = NodePath<t.Program> | t.File;
|
8
|
-
export declare function createExtractor({ logger }?: ExtractorOptions): {
|
8
|
+
export declare function createExtractor({ logger, platform }?: ExtractorOptions): {
|
9
9
|
options: {
|
10
10
|
logger: import("../types").Logger;
|
11
11
|
};
|
@@ -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,EAGV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAcnD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,6BAA6B,CAAA;
|
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,KA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