@tamagui/helpers 1.89.2 → 1.89.3
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/index.js +1 -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/cjs/shouldRenderNativePlatform.js +35 -0
- package/dist/cjs/shouldRenderNativePlatform.js.map +6 -0
- package/dist/cjs/shouldRenderNativePlatform.native.js +40 -0
- package/dist/cjs/shouldRenderNativePlatform.native.js.map +6 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.native.js +1 -1
- package/dist/esm/shouldRenderNativePlatform.js +19 -0
- package/dist/esm/shouldRenderNativePlatform.js.map +6 -0
- package/dist/esm/shouldRenderNativePlatform.mjs +14 -0
- package/dist/esm/shouldRenderNativePlatform.native.js +19 -0
- package/dist/esm/shouldRenderNativePlatform.native.js.map +6 -0
- package/package.json +4 -4
- package/src/index.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/shouldRenderNativePlatform.d.ts +17 -0
- package/types/shouldRenderNativePlatform.d.ts.map +1 -0
- /package/src/{native.ts → shouldRenderNativePlatform.ts} +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -16,7 +16,7 @@ __reExport(src_exports, require("./clamp"), module.exports);
|
|
|
16
16
|
__reExport(src_exports, require("./composeEventHandlers"), module.exports);
|
|
17
17
|
__reExport(src_exports, require("./concatClassName"), module.exports);
|
|
18
18
|
__reExport(src_exports, require("./types"), module.exports);
|
|
19
|
-
__reExport(src_exports, require("./
|
|
19
|
+
__reExport(src_exports, require("./shouldRenderNativePlatform"), module.exports);
|
|
20
20
|
__reExport(src_exports, require("./validStyleProps"), module.exports);
|
|
21
21
|
__reExport(src_exports, require("./withStaticProperties"), module.exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,mCAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,
|
|
4
|
+
"mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,mCAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,yCALd;AAMA,wBAAc,8BANd;AAOA,wBAAc,mCAPd;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -17,7 +17,7 @@ __reExport(src_exports, require("./clamp"), module.exports);
|
|
|
17
17
|
__reExport(src_exports, require("./composeEventHandlers"), module.exports);
|
|
18
18
|
__reExport(src_exports, require("./concatClassName"), module.exports);
|
|
19
19
|
__reExport(src_exports, require("./types"), module.exports);
|
|
20
|
-
__reExport(src_exports, require("./
|
|
20
|
+
__reExport(src_exports, require("./shouldRenderNativePlatform"), module.exports);
|
|
21
21
|
__reExport(src_exports, require("./validStyleProps"), module.exports);
|
|
22
22
|
__reExport(src_exports, require("./withStaticProperties"), module.exports);
|
|
23
23
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -27,7 +27,7 @@ __reExport(src_exports, require("./withStaticProperties"), module.exports);
|
|
|
27
27
|
...require("./composeEventHandlers"),
|
|
28
28
|
...require("./concatClassName"),
|
|
29
29
|
...require("./types"),
|
|
30
|
-
...require("./
|
|
30
|
+
...require("./shouldRenderNativePlatform"),
|
|
31
31
|
...require("./validStyleProps"),
|
|
32
32
|
...require("./withStaticProperties")
|
|
33
33
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,mCAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,mCAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,yCALd;AAMA,wBAAc,8BANd;AAOA,wBAAc,mCAPd;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var shouldRenderNativePlatform_exports = {};
|
|
16
|
+
__export(shouldRenderNativePlatform_exports, {
|
|
17
|
+
shouldRenderNativePlatform: () => shouldRenderNativePlatform
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(shouldRenderNativePlatform_exports);
|
|
20
|
+
var import_constants = require("@tamagui/constants");
|
|
21
|
+
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
22
|
+
function shouldRenderNativePlatform(nativeProp) {
|
|
23
|
+
if (!nativeProp)
|
|
24
|
+
return null;
|
|
25
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
26
|
+
for (const platform of ALL_PLATFORMS)
|
|
27
|
+
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform))
|
|
28
|
+
return platform;
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
function resolvePlatformNames(nativeProp) {
|
|
32
|
+
const platforms = nativeProp === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms);
|
|
33
|
+
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=shouldRenderNativePlatform.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shouldRenderNativePlatform.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAuBhC,MAAM,gBAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAAS,2BAA2B,YAA0B;AACnE,MAAI,CAAC;AACH,WAAO;AAET,QAAM,yBAAyB,qBAAqB,UAAU;AAE9D,aAAW,YAAY;AACrB,QAAI,aAAa,oCAAmB,uBAAuB,IAAI,QAAQ;AACrE,aAAO;AAIX,SAAO;AACT;AAEA,SAAS,qBAAqB,YAAyB;AACrD,QAAM,YACJ,eAAe,KACX,gBACA,eAAe,KACb,CAAC,IACD,MAAM,QAAQ,UAAU,IACtB,aACA,CAAC,UAAU,GACf,MAAM,IAAI,IAAI,SAAS;AAE7B,SAAI,IAAI,IAAI,QAAQ,MAElB,IAAI,IAAI,SAAS,GACjB,IAAI,IAAI,KAAK,GACb,IAAI,OAAO,QAAQ,IAEd;AACT;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var shouldRenderNativePlatform_exports = {};
|
|
17
|
+
__export(shouldRenderNativePlatform_exports, {
|
|
18
|
+
shouldRenderNativePlatform: () => shouldRenderNativePlatform
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(shouldRenderNativePlatform_exports);
|
|
21
|
+
var import_constants = require("@tamagui/constants");
|
|
22
|
+
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
23
|
+
function shouldRenderNativePlatform(nativeProp) {
|
|
24
|
+
if (!nativeProp)
|
|
25
|
+
return null;
|
|
26
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
27
|
+
for (const platform of ALL_PLATFORMS)
|
|
28
|
+
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform))
|
|
29
|
+
return platform;
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
function resolvePlatformNames(nativeProp) {
|
|
33
|
+
const platforms = nativeProp === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms);
|
|
34
|
+
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
shouldRenderNativePlatform
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=shouldRenderNativePlatform.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shouldRenderNativePlatform.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAuBhC,MAAM,gBAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAAS,2BAA2B,YAA0B;AACnE,MAAI,CAAC;AACH,WAAO;AAET,QAAM,yBAAyB,qBAAqB,UAAU;AAE9D,aAAW,YAAY;AACrB,QAAI,aAAa,oCAAmB,uBAAuB,IAAI,QAAQ;AACrE,aAAO;AAIX,SAAO;AACT;AAEA,SAAS,qBAAqB,YAAyB;AACrD,QAAM,YACJ,eAAe,KACX,gBACA,eAAe,KACb,CAAC,IACD,MAAM,QAAQ,UAAU,IACtB,aACA,CAAC,UAAU,GACf,MAAM,IAAI,IAAI,SAAS;AAE7B,SAAI,IAAI,IAAI,QAAQ,MAElB,IAAI,IAAI,SAAS,GACjB,IAAI,IAAI,KAAK,GACb,IAAI,OAAO,QAAQ,IAEd;AACT;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export * from "./clamp";
|
|
|
3
3
|
export * from "./composeEventHandlers";
|
|
4
4
|
export * from "./concatClassName";
|
|
5
5
|
export * from "./types";
|
|
6
|
-
export * from "./
|
|
6
|
+
export * from "./shouldRenderNativePlatform";
|
|
7
7
|
export * from "./validStyleProps";
|
|
8
8
|
export * from "./withStaticProperties";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,6 +3,6 @@ export * from "./clamp.mjs";
|
|
|
3
3
|
export * from "./composeEventHandlers.mjs";
|
|
4
4
|
export * from "./concatClassName.mjs";
|
|
5
5
|
export * from "./types.mjs";
|
|
6
|
-
export * from "./
|
|
6
|
+
export * from "./shouldRenderNativePlatform.mjs";
|
|
7
7
|
export * from "./validStyleProps.mjs";
|
|
8
8
|
export * from "./withStaticProperties.mjs";
|
package/dist/esm/index.native.js
CHANGED
|
@@ -3,7 +3,7 @@ export * from "./clamp";
|
|
|
3
3
|
export * from "./composeEventHandlers";
|
|
4
4
|
export * from "./concatClassName";
|
|
5
5
|
export * from "./types";
|
|
6
|
-
export * from "./
|
|
6
|
+
export * from "./shouldRenderNativePlatform";
|
|
7
7
|
export * from "./validStyleProps";
|
|
8
8
|
export * from "./withStaticProperties";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { currentPlatform } from "@tamagui/constants";
|
|
2
|
+
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
3
|
+
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
+
if (!nativeProp)
|
|
5
|
+
return null;
|
|
6
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
7
|
+
for (const platform of ALL_PLATFORMS)
|
|
8
|
+
if (platform === currentPlatform && userRequestedPlatforms.has(platform))
|
|
9
|
+
return platform;
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
function resolvePlatformNames(nativeProp) {
|
|
13
|
+
const platforms = nativeProp === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms);
|
|
14
|
+
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
shouldRenderNativePlatform
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=shouldRenderNativePlatform.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shouldRenderNativePlatform.ts"],
|
|
4
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAuBhC,MAAM,gBAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAAS,2BAA2B,YAA0B;AACnE,MAAI,CAAC;AACH,WAAO;AAET,QAAM,yBAAyB,qBAAqB,UAAU;AAE9D,aAAW,YAAY;AACrB,QAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ;AACrE,aAAO;AAIX,SAAO;AACT;AAEA,SAAS,qBAAqB,YAAyB;AACrD,QAAM,YACJ,eAAe,KACX,gBACA,eAAe,KACb,CAAC,IACD,MAAM,QAAQ,UAAU,IACtB,aACA,CAAC,UAAU,GACf,MAAM,IAAI,IAAI,SAAS;AAE7B,SAAI,IAAI,IAAI,QAAQ,MAElB,IAAI,IAAI,SAAS,GACjB,IAAI,IAAI,KAAK,GACb,IAAI,OAAO,QAAQ,IAEd;AACT;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { currentPlatform } from "@tamagui/constants";
|
|
2
|
+
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
3
|
+
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
+
if (!nativeProp) return null;
|
|
5
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
6
|
+
for (const platform of ALL_PLATFORMS) if (platform === currentPlatform && userRequestedPlatforms.has(platform)) return platform;
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
function resolvePlatformNames(nativeProp) {
|
|
10
|
+
const platforms = nativeProp === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp],
|
|
11
|
+
set = new Set(platforms);
|
|
12
|
+
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
13
|
+
}
|
|
14
|
+
export { shouldRenderNativePlatform };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { currentPlatform } from "@tamagui/constants";
|
|
2
|
+
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
3
|
+
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
+
if (!nativeProp)
|
|
5
|
+
return null;
|
|
6
|
+
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
7
|
+
for (const platform of ALL_PLATFORMS)
|
|
8
|
+
if (platform === currentPlatform && userRequestedPlatforms.has(platform))
|
|
9
|
+
return platform;
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
function resolvePlatformNames(nativeProp) {
|
|
13
|
+
const platforms = nativeProp === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms);
|
|
14
|
+
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
shouldRenderNativePlatform
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=shouldRenderNativePlatform.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shouldRenderNativePlatform.ts"],
|
|
4
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAuBhC,MAAM,gBAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAAS,2BAA2B,YAA0B;AACnE,MAAI,CAAC;AACH,WAAO;AAET,QAAM,yBAAyB,qBAAqB,UAAU;AAE9D,aAAW,YAAY;AACrB,QAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ;AACrE,aAAO;AAIX,SAAO;AACT;AAEA,SAAS,qBAAqB,YAAyB;AACrD,QAAM,YACJ,eAAe,KACX,gBACA,eAAe,KACb,CAAC,IACD,MAAM,QAAQ,UAAU,IACtB,aACA,CAAC,UAAU,GACf,MAAM,IAAI,IAAI,SAAS;AAE7B,SAAI,IAAI,IAAI,QAAQ,MAElB,IAAI,IAAI,SAAS,GACjB,IAAI,IAAI,KAAK,GACb,IAAI,OAAO,QAAQ,IAEd;AACT;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.3",
|
|
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.89.
|
|
23
|
-
"@tamagui/simple-hash": "1.89.
|
|
22
|
+
"@tamagui/constants": "1.89.3",
|
|
23
|
+
"@tamagui/simple-hash": "1.89.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "1.89.
|
|
26
|
+
"@tamagui/build": "1.89.3"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,6 @@ export * from './clamp'
|
|
|
3
3
|
export * from './composeEventHandlers'
|
|
4
4
|
export * from './concatClassName'
|
|
5
5
|
export * from './types'
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './shouldRenderNativePlatform'
|
|
7
7
|
export * from './validStyleProps'
|
|
8
8
|
export * from './withStaticProperties'
|
package/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './clamp';
|
|
|
3
3
|
export * from './composeEventHandlers';
|
|
4
4
|
export * from './concatClassName';
|
|
5
5
|
export * from './types';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './shouldRenderNativePlatform';
|
|
7
7
|
export * from './validStyleProps';
|
|
8
8
|
export * from './withStaticProperties';
|
|
9
9
|
//# 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.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type NativePlatform = 'web' | 'mobile' | 'android' | 'ios';
|
|
2
|
+
export type ExplicitNativePlatform = Exclude<NativePlatform, 'mobile'>;
|
|
3
|
+
export type NativeValue<Platform extends NativePlatform = NativePlatform> = boolean | Platform | Platform[];
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* takes in what user has inputted the native-supporting component and returns the name of the native platform we should render
|
|
7
|
+
*
|
|
8
|
+
* @example ['android'] => 'android' (when current platform is android)
|
|
9
|
+
* @example ['android'] => null (when current platform is not android)
|
|
10
|
+
* @example ['mobile'] => 'ios' (when current platform is ios)
|
|
11
|
+
*
|
|
12
|
+
* @param supportedSpecificNativeValues the platforms your component/system supports
|
|
13
|
+
* @param nativeProp the platforms your user is requesting you to use
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function shouldRenderNativePlatform(nativeProp?: NativeValue): ExplicitNativePlatform | null;
|
|
17
|
+
//# sourceMappingURL=shouldRenderNativePlatform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shouldRenderNativePlatform.d.ts","sourceRoot":"","sources":["../src/shouldRenderNativePlatform.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,QAAQ,GACR,SAAS,GACT,KAAK,CAAA;AAET,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;AAEtE,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,IACpE,OAAO,GACP,QAAQ,GACR,QAAQ,EAAE,CAAA;AAGd;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,CAAC,EAAE,WAAW,iCAalE"}
|
|
File without changes
|