@tamagui/helpers 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/composeEventHandlers.js +1 -1
- package/dist/cjs/composeEventHandlers.js.map +1 -1
- package/dist/cjs/composeEventHandlers.native.js +1 -1
- package/dist/cjs/composeEventHandlers.native.js.map +1 -1
- package/dist/cjs/withStaticProperties.js +1 -1
- package/dist/cjs/withStaticProperties.js.map +1 -1
- package/dist/cjs/withStaticProperties.native.js +1 -1
- package/dist/cjs/withStaticProperties.native.js.map +1 -1
- package/dist/esm/composeEventHandlers.js +1 -1
- package/dist/esm/composeEventHandlers.js.map +1 -1
- package/dist/esm/composeEventHandlers.native.js +1 -1
- package/dist/esm/composeEventHandlers.native.js.map +1 -1
- package/dist/esm/withStaticProperties.js +1 -1
- package/dist/esm/withStaticProperties.js.map +1 -1
- package/dist/esm/withStaticProperties.native.js +1 -1
- package/dist/esm/withStaticProperties.native.js.map +1 -1
- package/package.json +4 -4
- package/src/composeEventHandlers.ts +1 -1
- package/src/withStaticProperties.tsx +2 -2
|
@@ -18,7 +18,7 @@ __export(composeEventHandlers_exports, {
|
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
20
20
|
function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
|
|
21
|
-
return !og || !next ? next || og || void 0 :
|
|
21
|
+
return !og || !next ? next || og || void 0 : (event) => {
|
|
22
22
|
if (og == null || og(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
23
23
|
"defaultPrevented" in event && !event.defaultPrevented)
|
|
24
24
|
return next == null ? void 0 : next(event);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,CAAC,UAAa;AAEnB,QADA,iBAAK,QAEH,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,6BAAO;AAAA,EAElB;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -19,7 +19,7 @@ __export(composeEventHandlers_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
21
21
|
function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
|
|
22
|
-
return !og || !next ? next || og || void 0 :
|
|
22
|
+
return !og || !next ? next || og || void 0 : (event) => {
|
|
23
23
|
if (og == null || og(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
24
24
|
"defaultPrevented" in event && !event.defaultPrevented)
|
|
25
25
|
return next == null ? void 0 : next(event);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,CAAC,UAAa;AAEnB,QADA,iBAAK,QAEH,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,6BAAO;AAAA,EAElB;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -18,7 +18,7 @@ __export(withStaticProperties_exports, {
|
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
20
20
|
var import_react = require("react");
|
|
21
|
-
const Decorated = Symbol(), withStaticProperties =
|
|
21
|
+
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
22
22
|
const next = (() => {
|
|
23
23
|
if (component[Decorated]) {
|
|
24
24
|
const _ = (0, import_react.forwardRef)(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,QAAI;AAAA,QAAW,CAAC,OAAO,YAC3B,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -19,7 +19,7 @@ __export(withStaticProperties_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
21
21
|
var import_react = require("react");
|
|
22
|
-
const Decorated = Symbol(), withStaticProperties =
|
|
22
|
+
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
23
23
|
const next = (() => {
|
|
24
24
|
if (component[Decorated]) {
|
|
25
25
|
const _ = (0, import_react.forwardRef)(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,QAAI;AAAA,QAAW,CAAC,OAAO,YAC3B,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
|
|
2
|
-
return !og || !next ? next || og || void 0 :
|
|
2
|
+
return !og || !next ? next || og || void 0 : (event) => {
|
|
3
3
|
if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
4
4
|
"defaultPrevented" in event && !event.defaultPrevented)
|
|
5
5
|
return next?.(event);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,
|
|
4
|
+
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,CAAC,UAAa;AAEnB,QADA,KAAK,KAAK,GAER,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,OAAO,KAAK;AAAA,EAEvB;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
|
|
2
|
-
return !og || !next ? next || og || void 0 :
|
|
2
|
+
return !og || !next ? next || og || void 0 : (event) => {
|
|
3
3
|
if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
4
4
|
"defaultPrevented" in event && !event.defaultPrevented)
|
|
5
5
|
return next?.(event);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,
|
|
4
|
+
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,CAAC,UAAa;AAEnB,QADA,KAAK,KAAK,GAER,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,OAAO,KAAK;AAAA,EAEvB;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from "react";
|
|
2
|
-
const Decorated = Symbol(), withStaticProperties =
|
|
2
|
+
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
3
3
|
const next = (() => {
|
|
4
4
|
if (component[Decorated]) {
|
|
5
5
|
const _ = forwardRef(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,
|
|
4
|
+
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,IAAI;AAAA,QAAW,CAAC,OAAO,QAC3B,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from "react";
|
|
2
|
-
const Decorated = Symbol(), withStaticProperties =
|
|
2
|
+
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
3
3
|
const next = (() => {
|
|
4
4
|
if (component[Decorated]) {
|
|
5
5
|
const _ = forwardRef(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,
|
|
4
|
+
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,IAAI;AAAA,QAAW,CAAC,OAAO,QAC3B,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,gBAAO,OAAO,MAAM,WAAW,GAC/B,KAAK,SAAS,IAAI,IAEX;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tamagui/constants": "1.
|
|
23
|
-
"@tamagui/simple-hash": "1.
|
|
22
|
+
"@tamagui/constants": "1.85.1",
|
|
23
|
+
"@tamagui/simple-hash": "1.85.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "1.
|
|
26
|
+
"@tamagui/build": "1.85.1"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
@@ -4,10 +4,10 @@ const Decorated = Symbol()
|
|
|
4
4
|
|
|
5
5
|
type Combined<A, B> = A & B
|
|
6
6
|
|
|
7
|
-
export const withStaticProperties =
|
|
7
|
+
export const withStaticProperties = <A extends Function, B>(
|
|
8
8
|
component: A,
|
|
9
9
|
staticProps: B
|
|
10
|
-
): Combined<A, B> {
|
|
10
|
+
): Combined<A, B> => {
|
|
11
11
|
// clone component if already wrapped once
|
|
12
12
|
const next = (() => {
|
|
13
13
|
if (component[Decorated]) {
|