@tamagui/core 1.84.2 → 1.85.1
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/helpers/getBoundingClientRect.js.map +1 -1
- package/dist/cjs/helpers/getBoundingClientRect.native.js.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +2 -2
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/helpers/getBoundingClientRect.js.map +1 -1
- package/dist/esm/helpers/getBoundingClientRect.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +33 -25
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +20 -16
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
- package/src/helpers/getBoundingClientRect.tsx +1 -1
- package/src/index.tsx +15 -15
- package/types/helpers/getBoundingClientRect.d.ts +1 -1
- package/types/helpers/getBoundingClientRect.d.ts.map +1 -1
- package/types/index.d.ts +8 -12
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.1",
|
|
4
4
|
"source": "src/index.tsx",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"native-test.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tamagui/react-native-use-pressable": "1.
|
|
39
|
-
"@tamagui/react-native-use-responder-events": "1.
|
|
40
|
-
"@tamagui/use-event": "1.
|
|
41
|
-
"@tamagui/web": "1.
|
|
38
|
+
"@tamagui/react-native-use-pressable": "1.85.1",
|
|
39
|
+
"@tamagui/react-native-use-responder-events": "1.85.1",
|
|
40
|
+
"@tamagui/use-event": "1.85.1",
|
|
41
|
+
"@tamagui/web": "1.85.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "*"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tamagui/build": "1.
|
|
47
|
+
"@tamagui/build": "1.85.1",
|
|
48
48
|
"@testing-library/react": "^14.0.0",
|
|
49
49
|
"csstype": "^3.0.10",
|
|
50
50
|
"react": "^18.2.0",
|
package/src/index.tsx
CHANGED
|
@@ -24,36 +24,30 @@ import { usePlatformMethods } from './hooks/usePlatformMethods'
|
|
|
24
24
|
import { RNTextProps, RNViewProps } from './reactNativeTypes'
|
|
25
25
|
import { usePressability } from './vendor/Pressability'
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
export * from '@tamagui/web'
|
|
29
|
-
// fixes issues with TS saying internal type usage is breaking
|
|
30
|
-
// see https://discord.com/channels/909986013848412191/1146150253490348112/1146150253490348112
|
|
31
|
-
export * from './reactNativeTypes'
|
|
32
|
-
|
|
33
|
-
// adds extra types to Stack/Text:
|
|
27
|
+
// adds extra types to View/Stack/Text:
|
|
34
28
|
|
|
35
29
|
type RNExclusiveViewProps = Omit<RNViewProps, keyof StackProps>
|
|
36
|
-
|
|
37
|
-
type ViewType = TamaguiComponent<
|
|
30
|
+
type RNTamaguiView = TamaguiComponent<
|
|
38
31
|
StackProps & RNExclusiveViewProps,
|
|
39
32
|
TamaguiElement,
|
|
40
33
|
StackPropsBase & RNExclusiveViewProps,
|
|
41
34
|
void
|
|
42
35
|
>
|
|
43
36
|
|
|
44
|
-
// the same:
|
|
45
|
-
export const View = WebView as any as ViewType
|
|
46
|
-
export const Stack = WebStack as any as ViewType
|
|
47
|
-
|
|
48
37
|
type RNExclusiveTextProps = Omit<RNTextProps, keyof TextProps>
|
|
49
|
-
|
|
50
|
-
export const Text = WebText as any as TamaguiComponent<
|
|
38
|
+
type RNTamaguiText = TamaguiComponent<
|
|
51
39
|
TextProps & RNExclusiveTextProps,
|
|
52
40
|
TamaguiTextElement,
|
|
53
41
|
TextPropsBase & RNExclusiveTextProps,
|
|
54
42
|
void
|
|
55
43
|
>
|
|
56
44
|
|
|
45
|
+
// re-exports all of @tamagui/web just adds hooks
|
|
46
|
+
export * from '@tamagui/web'
|
|
47
|
+
// fixes issues with TS saying internal type usage is breaking
|
|
48
|
+
// see https://discord.com/channels/909986013848412191/1146150253490348112/1146150253490348112
|
|
49
|
+
export * from './reactNativeTypes'
|
|
50
|
+
|
|
57
51
|
const baseViews = getBaseViews()
|
|
58
52
|
|
|
59
53
|
// setup internal hooks:
|
|
@@ -222,3 +216,9 @@ setupHooks({
|
|
|
222
216
|
const dontComposePressabilityKeys = {
|
|
223
217
|
onClick: true,
|
|
224
218
|
}
|
|
219
|
+
|
|
220
|
+
// overwrite web versions:
|
|
221
|
+
// putting at the end ensures it overwrites in dist/cjs/index.js
|
|
222
|
+
export const View = WebView as any as RNTamaguiView
|
|
223
|
+
export const Stack = WebStack as any as RNTamaguiView
|
|
224
|
+
export const Text = WebText as any as RNTamaguiText
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getBoundingClientRect: (node: HTMLElement | null) =>
|
|
1
|
+
export declare const getBoundingClientRect: (node: HTMLElement | null) => undefined | DOMRect;
|
|
2
2
|
//# sourceMappingURL=getBoundingClientRect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBoundingClientRect.d.ts","sourceRoot":"","sources":["../../src/helpers/getBoundingClientRect.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,SAAU,WAAW,GAAG,IAAI,KAAG,
|
|
1
|
+
{"version":3,"file":"getBoundingClientRect.d.ts","sourceRoot":"","sources":["../../src/helpers/getBoundingClientRect.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,SAAU,WAAW,GAAG,IAAI,KAAG,SAAS,GAAG,OAG5E,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StackProps, StackPropsBase, TamaguiComponent, TamaguiElement, TamaguiTextElement, TextProps } from '@tamagui/web';
|
|
1
|
+
import type { StackProps, StackPropsBase, TamaguiComponent, TamaguiElement, TamaguiTextElement, TextProps, TextPropsBase } from '@tamagui/web';
|
|
3
2
|
import { RNTextProps, RNViewProps } from './reactNativeTypes';
|
|
4
|
-
export * from '@tamagui/web';
|
|
5
|
-
export * from './reactNativeTypes';
|
|
6
3
|
type RNExclusiveViewProps = Omit<RNViewProps, keyof StackProps>;
|
|
7
|
-
type
|
|
8
|
-
export declare const View: ViewType;
|
|
9
|
-
export declare const Stack: ViewType;
|
|
4
|
+
type RNTamaguiView = TamaguiComponent<StackProps & RNExclusiveViewProps, TamaguiElement, StackPropsBase & RNExclusiveViewProps, void>;
|
|
10
5
|
type RNExclusiveTextProps = Omit<RNTextProps, keyof TextProps>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
type RNTamaguiText = TamaguiComponent<TextProps & RNExclusiveTextProps, TamaguiTextElement, TextPropsBase & RNExclusiveTextProps, void>;
|
|
7
|
+
export * from '@tamagui/web';
|
|
8
|
+
export * from './reactNativeTypes';
|
|
9
|
+
export declare const View: RNTamaguiView;
|
|
10
|
+
export declare const Stack: RNTamaguiView;
|
|
11
|
+
export declare const Text: RNTamaguiText;
|
|
16
12
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,aAAa,EACd,MAAM,cAAc,CAAA;AAcrB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAK7D,KAAK,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,UAAU,CAAC,CAAA;AAC/D,KAAK,aAAa,GAAG,gBAAgB,CACnC,UAAU,GAAG,oBAAoB,EACjC,cAAc,EACd,cAAc,GAAG,oBAAoB,EACrC,IAAI,CACL,CAAA;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC,CAAA;AAC9D,KAAK,aAAa,GAAG,gBAAgB,CACnC,SAAS,GAAG,oBAAoB,EAChC,kBAAkB,EAClB,aAAa,GAAG,oBAAoB,EACpC,IAAI,CACL,CAAA;AAGD,cAAc,cAAc,CAAA;AAG5B,cAAc,oBAAoB,CAAA;AA6KlC,eAAO,MAAM,IAAI,eAAkC,CAAA;AACnD,eAAO,MAAM,KAAK,eAAmC,CAAA;AACrD,eAAO,MAAM,IAAI,eAAkC,CAAA"}
|