@tamagui/helpers 1.108.0 → 1.108.2
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/withStaticProperties.js +13 -5
- package/dist/cjs/withStaticProperties.js.map +2 -2
- package/dist/cjs/withStaticProperties.native.js +13 -5
- package/dist/cjs/withStaticProperties.native.js.map +2 -2
- package/dist/esm/withStaticProperties.js +3 -3
- package/dist/esm/withStaticProperties.js.map +1 -1
- package/dist/esm/withStaticProperties.mjs +2 -2
- package/dist/esm/withStaticProperties.mjs.map +1 -1
- package/dist/esm/withStaticProperties.native.js +3 -3
- package/dist/esm/withStaticProperties.native.js.map +2 -2
- package/package.json +4 -4
- package/src/withStaticProperties.tsx +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -11,18 +12,25 @@ var __export = (target, all) => {
|
|
|
11
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
13
|
return to;
|
|
13
14
|
};
|
|
14
|
-
var
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
23
|
var withStaticProperties_exports = {};
|
|
16
24
|
__export(withStaticProperties_exports, {
|
|
17
25
|
withStaticProperties: () => withStaticProperties
|
|
18
26
|
});
|
|
19
27
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
20
|
-
var import_react = require("react");
|
|
28
|
+
var import_react = __toESM(require("react"));
|
|
21
29
|
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
22
30
|
const next = (() => {
|
|
23
31
|
if (component[Decorated]) {
|
|
24
|
-
const _ =
|
|
25
|
-
(props, ref) =>
|
|
32
|
+
const _ = import_react.default.forwardRef(
|
|
33
|
+
(props, ref) => import_react.default.createElement(component, { ...props, ref })
|
|
26
34
|
);
|
|
27
35
|
for (const key in component) {
|
|
28
36
|
const v = component[key];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,IAAI,aAAAA,QAAM;AAAA,QAAW,CAAC,OAAO,QACjC,aAAAA,QAAM,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACzD;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
|
+
"names": ["React"]
|
|
6
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,13 +13,20 @@ var __export = (target, all) => {
|
|
|
12
13
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
14
|
return to;
|
|
14
15
|
};
|
|
15
|
-
var
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
24
|
var withStaticProperties_exports = {};
|
|
17
25
|
__export(withStaticProperties_exports, {
|
|
18
26
|
withStaticProperties: () => withStaticProperties
|
|
19
27
|
});
|
|
20
28
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
21
|
-
var import_react = require("react");
|
|
29
|
+
var import_react = __toESM(require("react"));
|
|
22
30
|
function _define_property(obj, key, value) {
|
|
23
31
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
24
32
|
value,
|
|
@@ -60,8 +68,8 @@ function _type_of(obj) {
|
|
|
60
68
|
var Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
|
|
61
69
|
var next = function() {
|
|
62
70
|
if (component[Decorated]) {
|
|
63
|
-
var _ = /* @__PURE__ */
|
|
64
|
-
return /* @__PURE__ */
|
|
71
|
+
var _ = /* @__PURE__ */ import_react.default.forwardRef(function(props, ref) {
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement(component, _object_spread_props(_object_spread({}, props), {
|
|
65
73
|
ref
|
|
66
74
|
}));
|
|
67
75
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers/src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["Decorated", "Symbol", "withStaticProperties", "component", "staticProps", "next", "_", "forwardRef", "props", "ref", "createElement", "key", "v", "Object", "assign"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,IAAMA,YAAYC,OAAAA,GAILC,uBAAuB,SAClCC,WACAC,aAAAA;AAGA,MAAMC,OAAQ,WAAA;AACZ,QAAIF,UAAUH,SAAAA,GAAY;AACxB,UAAMM,IAAIC,6BAAAA,QAAMC,WAAW,SAACC,OAAOC,KAAAA;eACjCH,6BAAAA,QAAMI,cAAcR,WAAkB,qBAAA,eAAA,CAAA,GAAKM,KAAAA,GAAAA;UAAOC;;;AAGpD,eAAWE,OAAOT,WAAW;AAC3B,YAAMU,IAAIV,UAAUS,GAAAA;AAEpBN,UAAEM,GAAAA,IAAOC,MAAK,OAAOA,IAAAA,MAAAA,cAAP,SAAOA,CAAAA,OAAM,WAAW,eAAA,CAAA,GAAKA,CAAAA,IAAMA;MACnD;IACF;AACA,WAAOV;EACT,EAAA;AAGAW,gBAAOC,OAAOV,MAAMD,WAAAA,GACpBC,KAAKL,SAAAA,IAAa,IAEXK;AACT;",
|
|
5
|
+
"names": ["Decorated", "Symbol", "withStaticProperties", "component", "staticProps", "next", "_", "React", "forwardRef", "props", "ref", "createElement", "key", "v", "Object", "assign"]
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
const Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
|
|
3
3
|
const next = (() => {
|
|
4
4
|
if (component[Decorated]) {
|
|
5
|
-
const _ = forwardRef(
|
|
6
|
-
(props, ref) => createElement(component, { ...props, ref })
|
|
5
|
+
const _ = React.forwardRef(
|
|
6
|
+
(props, ref) => React.createElement(component, { ...props, ref })
|
|
7
7
|
);
|
|
8
8
|
for (const key in component) {
|
|
9
9
|
const v = component[key];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAElB,MAAM,YAAY,OAAO,GAIZ,uBAAuB,CAClC,WACA,gBACmB;AAEnB,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,IAAI,MAAM;AAAA,QAAW,CAAC,OAAO,QACjC,MAAM,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACzD;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,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
const Decorated = Symbol(),
|
|
3
3
|
withStaticProperties = (component, staticProps) => {
|
|
4
4
|
const next = (() => {
|
|
5
5
|
if (component[Decorated]) {
|
|
6
|
-
const _ = forwardRef((props, ref) => createElement(component, {
|
|
6
|
+
const _ = React.forwardRef((props, ref) => React.createElement(component, {
|
|
7
7
|
...props,
|
|
8
8
|
ref
|
|
9
9
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","Decorated","Symbol","withStaticProperties","component","staticProps","next","_","forwardRef","props","ref","createElement","key","v","Object","assign"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAElB,MAAMC,SAAA,GAAYC,MAAA,CAAO;EAIZC,oBAAA,GAAuBA,CAClCC,SAAA,EACAC,WAAA,KACmB;IAEnB,MAAMC,IAAA,IAAQ,MAAM;MAClB,IAAIF,SAAA,CAAUH,SAAS,GAAG;QACxB,MAAMM,CAAA,GAAIP,KAAA,CAAMQ,UAAA,CAAW,CAACC,KAAA,EAAOC,GAAA,KACjCV,KAAA,CAAMW,aAAA,CAAcP,SAAA,EAAkB;UAAE,GAAGK,KAAA;UAAOC;QAAI,CAAC,CACzD;QAEA,WAAWE,GAAA,IAAOR,SAAA,EAAW;UAC3B,MAAMS,CAAA,GAAIT,SAAA,CAAUQ,GAAG;UAEvBL,CAAA,CAAEK,GAAG,IAAIC,CAAA,IAAK,OAAOA,CAAA,IAAM,WAAW;YAAE,GAAGA;UAAE,IAAIA,CAAA;QACnD;MACF;MACA,OAAOT,SAAA;IACT,GAAG;IAGH,OAAAU,MAAA,CAAOC,MAAA,CAAOT,IAAA,EAAMD,WAAW,GAC/BC,IAAA,CAAKL,SAAS,IAAI,IAEXK,IAAA;EACT","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
function _define_property(obj, key, value) {
|
|
3
3
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
4
4
|
value,
|
|
@@ -40,8 +40,8 @@ function _type_of(obj) {
|
|
|
40
40
|
var Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
|
|
41
41
|
var next = function() {
|
|
42
42
|
if (component[Decorated]) {
|
|
43
|
-
var _ = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
44
|
-
return /* @__PURE__ */ createElement(component, _object_spread_props(_object_spread({}, props), {
|
|
43
|
+
var _ = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
44
|
+
return /* @__PURE__ */ React.createElement(component, _object_spread_props(_object_spread({}, props), {
|
|
45
45
|
ref
|
|
46
46
|
}));
|
|
47
47
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers/src/withStaticProperties.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": "AAAA,OAAOA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,IAAMC,YAAYC,OAAAA,GAILC,uBAAuB,SAClCC,WACAC,aAAAA;AAGA,MAAMC,OAAQ,WAAA;AACZ,QAAIF,UAAUH,SAAAA,GAAY;AACxB,UAAMM,IAAIP,sBAAMQ,WAAW,SAACC,OAAOC,KAAAA;eACjCV,sBAAMW,cAAcP,WAAkB,qBAAA,eAAA,CAAA,GAAKK,KAAAA,GAAAA;UAAOC;;;AAGpD,eAAWE,OAAOR,WAAW;AAC3B,YAAMS,IAAIT,UAAUQ,GAAAA;AAEpBL,UAAEK,GAAAA,IAAOC,MAAK,OAAOA,IAAAA,MAAAA,cAAP,SAAOA,CAAAA,OAAM,WAAW,eAAA,CAAA,GAAKA,CAAAA,IAAMA;MACnD;IACF;AACA,WAAOT;EACT,EAAA;AAGAU,gBAAOC,OAAOT,MAAMD,WAAAA,GACpBC,KAAKL,SAAAA,IAAa,IAEXK;AACT;",
|
|
5
|
+
"names": ["React", "Decorated", "Symbol", "withStaticProperties", "component", "staticProps", "next", "_", "forwardRef", "props", "ref", "createElement", "key", "v", "Object", "assign"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.2",
|
|
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.108.
|
|
23
|
-
"@tamagui/simple-hash": "1.108.
|
|
22
|
+
"@tamagui/constants": "1.108.2",
|
|
23
|
+
"@tamagui/simple-hash": "1.108.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "1.108.
|
|
26
|
+
"@tamagui/build": "1.108.2"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
const Decorated = Symbol()
|
|
4
4
|
|
|
@@ -11,8 +11,8 @@ export const withStaticProperties = <A extends Function, B>(
|
|
|
11
11
|
// clone component if already wrapped once
|
|
12
12
|
const next = (() => {
|
|
13
13
|
if (component[Decorated]) {
|
|
14
|
-
const _ = forwardRef((props, ref) =>
|
|
15
|
-
createElement(component as any, { ...props, ref })
|
|
14
|
+
const _ = React.forwardRef((props, ref) =>
|
|
15
|
+
React.createElement(component as any, { ...props, ref })
|
|
16
16
|
)
|
|
17
17
|
// attach existing things again
|
|
18
18
|
for (const key in component) {
|