@tamagui/helpers 2.0.0-rc.4 → 2.0.0-rc.40
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/clamp.cjs +12 -10
- package/dist/cjs/clamp.native.js +12 -10
- package/dist/cjs/clamp.native.js.map +1 -1
- package/dist/cjs/composeEventHandlers.cjs +22 -14
- package/dist/cjs/composeEventHandlers.native.js +23 -15
- package/dist/cjs/composeEventHandlers.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shouldRenderNativePlatform.cjs +28 -15
- package/dist/cjs/shouldRenderNativePlatform.native.js +44 -28
- package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/cjs/types.cjs +17 -15
- package/dist/cjs/types.native.js +17 -15
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/validStyleProps.cjs +308 -273
- package/dist/cjs/validStyleProps.native.js +303 -268
- package/dist/cjs/validStyleProps.native.js.map +1 -1
- package/dist/cjs/webOnlyStyleProps.cjs +88 -78
- package/dist/cjs/webOnlyStyleProps.native.js +88 -78
- package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
- package/dist/cjs/withStaticProperties.cjs +18 -12
- package/dist/cjs/withStaticProperties.native.js +18 -14
- package/dist/cjs/withStaticProperties.native.js.map +1 -1
- package/dist/esm/composeEventHandlers.mjs +10 -4
- package/dist/esm/composeEventHandlers.mjs.map +1 -1
- package/dist/esm/composeEventHandlers.native.js +11 -5
- package/dist/esm/composeEventHandlers.native.js.map +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/shouldRenderNativePlatform.mjs +16 -5
- package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
- package/dist/esm/shouldRenderNativePlatform.native.js +30 -16
- package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/esm/types.mjs +5 -5
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +5 -5
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/validStyleProps.mjs +294 -263
- package/dist/esm/validStyleProps.mjs.map +1 -1
- package/dist/esm/validStyleProps.native.js +288 -257
- package/dist/esm/validStyleProps.native.js.map +1 -1
- package/dist/esm/webOnlyStyleProps.mjs +75 -69
- package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
- package/dist/esm/webOnlyStyleProps.native.js +75 -69
- package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
- package/dist/esm/withStaticProperties.mjs +6 -2
- package/dist/esm/withStaticProperties.mjs.map +1 -1
- package/dist/esm/withStaticProperties.native.js +6 -4
- package/dist/esm/withStaticProperties.native.js.map +1 -1
- package/package.json +7 -10
- package/src/validStyleProps.ts +104 -38
- package/src/webOnlyStyleProps.ts +40 -29
- package/types/validStyleProps.d.ts +337 -238
- package/types/validStyleProps.d.ts.map +1 -1
- package/types/webOnlyStyleProps.d.ts +60 -20
- package/types/webOnlyStyleProps.d.ts.map +1 -1
- package/dist/cjs/clamp.js +0 -23
- package/dist/cjs/clamp.js.map +0 -6
- package/dist/cjs/composeEventHandlers.js +0 -27
- package/dist/cjs/composeEventHandlers.js.map +0 -6
- package/dist/cjs/index.js +0 -22
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/shouldRenderNativePlatform.js +0 -35
- package/dist/cjs/shouldRenderNativePlatform.js.map +0 -6
- package/dist/cjs/types.js +0 -25
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/validStyleProps.js +0 -283
- package/dist/cjs/validStyleProps.js.map +0 -6
- package/dist/cjs/webOnlyStyleProps.js +0 -89
- package/dist/cjs/webOnlyStyleProps.js.map +0 -6
- package/dist/cjs/withStaticProperties.js +0 -21
- package/dist/cjs/withStaticProperties.js.map +0 -6
- package/dist/esm/clamp.js +0 -7
- package/dist/esm/clamp.js.map +0 -6
- package/dist/esm/composeEventHandlers.js +0 -11
- package/dist/esm/composeEventHandlers.js.map +0 -6
- package/dist/esm/shouldRenderNativePlatform.js +0 -19
- package/dist/esm/shouldRenderNativePlatform.js.map +0 -6
- package/dist/esm/types.js +0 -9
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/validStyleProps.js +0 -268
- package/dist/esm/validStyleProps.js.map +0 -6
- package/dist/esm/webOnlyStyleProps.js +0 -73
- package/dist/esm/webOnlyStyleProps.js.map +0 -6
- package/dist/esm/withStaticProperties.js +0 -5
- package/dist/esm/withStaticProperties.js.map +0 -6
package/dist/cjs/clamp.cjs
CHANGED
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var clamp_exports = {};
|
|
22
24
|
__export(clamp_exports, {
|
package/dist/cjs/clamp.native.js
CHANGED
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var clamp_exports = {};
|
|
24
26
|
__export(clamp_exports, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","clamp_exports","__export","clamp","module","exports","param","min","max"],"sources":["../../src/clamp.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","clamp_exports","__export","clamp","module","exports","param","min","max"],"sources":["../../src/clamp.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAMT,YAAqB,CAAAK,aAAgC;AACzE,SAAOE,KAAKA,CAAAH,KAAI,EAAAM,KAAK,EAAK;EAC5B,KAAAC,GAAA,EAAAC,GAAA,IAAAF,KAAA","ignoreList":[]}
|
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var composeEventHandlers_exports = {};
|
|
22
24
|
__export(composeEventHandlers_exports, {
|
|
@@ -24,11 +26,17 @@ __export(composeEventHandlers_exports, {
|
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
26
28
|
function composeEventHandlers(og, next, {
|
|
27
|
-
checkDefaultPrevented =
|
|
29
|
+
checkDefaultPrevented = true
|
|
28
30
|
} = {}) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
if (!og || !next) {
|
|
32
|
+
return next || og || void 0;
|
|
33
|
+
}
|
|
34
|
+
return event => {
|
|
35
|
+
og?.(event);
|
|
36
|
+
if (!event || !(checkDefaultPrevented && typeof event === "object" && "defaultPrevented" in event) ||
|
|
31
37
|
// @ts-ignore
|
|
32
|
-
"defaultPrevented" in event && !event.defaultPrevented)
|
|
38
|
+
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
39
|
+
return next?.(event);
|
|
40
|
+
}
|
|
33
41
|
};
|
|
34
42
|
}
|
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var composeEventHandlers_exports = {};
|
|
24
26
|
__export(composeEventHandlers_exports, {
|
|
@@ -28,16 +30,22 @@ module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
|
28
30
|
function _type_of(obj) {
|
|
29
31
|
"@swc/helpers - typeof";
|
|
30
32
|
|
|
31
|
-
return obj && typeof Symbol
|
|
33
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
32
34
|
}
|
|
33
35
|
function composeEventHandlers(og, next) {
|
|
34
36
|
var {
|
|
35
|
-
checkDefaultPrevented =
|
|
37
|
+
checkDefaultPrevented = true
|
|
36
38
|
} = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
if (!og || !next) {
|
|
40
|
+
return next || og || void 0;
|
|
41
|
+
}
|
|
42
|
+
return function (event) {
|
|
43
|
+
og === null || og === void 0 ? void 0 : og(event);
|
|
44
|
+
if (!event || !(checkDefaultPrevented && (typeof event === "undefined" ? "undefined" : _type_of(event)) === "object" && "defaultPrevented" in event) ||
|
|
39
45
|
// @ts-ignore
|
|
40
|
-
"defaultPrevented" in event && !event.defaultPrevented)
|
|
46
|
+
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
47
|
+
return next === null || next === void 0 ? void 0 : next(event);
|
|
48
|
+
}
|
|
41
49
|
};
|
|
42
50
|
}
|
|
43
51
|
//# sourceMappingURL=composeEventHandlers.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","composeEventHandlers_exports","__export","composeEventHandlers","module","exports","_type_of","obj","Symbol","constructor","og","next","checkDefaultPrevented","arguments","length"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","composeEventHandlers_exports","__export","composeEventHandlers","module","exports","_type_of","obj","Symbol","constructor","og","next","checkDefaultPrevented","arguments","length","event"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAIOC,MAAA,CAAAC,OAAS,GAAAT,YAAA,CACdK,4BAEE;AAEF,SAAKK,QAAOA,CAAAC,GAAM;EAChB,uBAAqB;;EACvB,OAAAA,GAAA,WAAAC,MAAA,oBAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AACA;AACE,SAAKJ,oBAAKA,CAAAO,EAAA,EAAAC,IAAA;EACV;IACEC,qBAEE;EAAA,IAAAC,SACA,CAAAC,MAAO,QAAUD,SACjB,iBAAAA,SAAsB;EAAA,IAGvB,CAAAH,EAAA,KAAAC,IAAA;IAED,OAAAA,IAAO,IAAAD,EAAO,IAAK;EAAA;EAEvB,iBAAAK,KAAA;IACFL,EAAA,aAAAA,EAAA,uBAAAA,EAAA,CAAAK,KAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBADd,GAAAH,MAAA,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAAA,CAAAC,OAAA,CAFd;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mCAHd,GAAAH,MAAA,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAAA,CAAAC,OAAA;AACdC,UAAA,CAAAH,aAAA,EAAcI,OAAA,yCALd,GAAAH,MAAA,CAAAC,OAAA;AAMAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MANd,CAAAC,OAAA;AAOAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mCAPd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var shouldRenderNativePlatform_exports = {};
|
|
22
24
|
__export(shouldRenderNativePlatform_exports, {
|
|
@@ -26,13 +28,24 @@ module.exports = __toCommonJS(shouldRenderNativePlatform_exports);
|
|
|
26
28
|
var import_constants = require("@tamagui/constants");
|
|
27
29
|
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
28
30
|
function shouldRenderNativePlatform(nativeProp) {
|
|
29
|
-
if (!nativeProp)
|
|
31
|
+
if (!nativeProp) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
30
34
|
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
31
|
-
for (const platform of ALL_PLATFORMS)
|
|
35
|
+
for (const platform of ALL_PLATFORMS) {
|
|
36
|
+
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform)) {
|
|
37
|
+
return platform;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
32
40
|
return null;
|
|
33
41
|
}
|
|
34
42
|
function resolvePlatformNames(nativeProp) {
|
|
35
|
-
const platforms = nativeProp ===
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
|
|
44
|
+
const set = new Set(platforms);
|
|
45
|
+
if (set.has("mobile")) {
|
|
46
|
+
set.add("android");
|
|
47
|
+
set.add("ios");
|
|
48
|
+
set.delete("mobile");
|
|
49
|
+
}
|
|
50
|
+
return set;
|
|
38
51
|
}
|
|
@@ -5,57 +5,73 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var shouldRenderNativePlatform_exports = {};
|
|
24
26
|
__export(shouldRenderNativePlatform_exports, {
|
|
25
27
|
shouldRenderNativePlatform: () => shouldRenderNativePlatform
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(shouldRenderNativePlatform_exports);
|
|
28
|
-
var import_constants = require("@tamagui/constants")
|
|
29
|
-
|
|
30
|
+
var import_constants = require("@tamagui/constants");
|
|
31
|
+
var ALL_PLATFORMS = ["web", "android", "ios"];
|
|
30
32
|
function shouldRenderNativePlatform(nativeProp) {
|
|
31
|
-
if (!nativeProp)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (!nativeProp) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
var userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
37
|
+
var _iteratorNormalCompletion = true,
|
|
38
|
+
_didIteratorError = false,
|
|
35
39
|
_iteratorError = void 0;
|
|
36
40
|
try {
|
|
37
|
-
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion =
|
|
41
|
+
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
38
42
|
var platform = _step.value;
|
|
39
|
-
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform))
|
|
43
|
+
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform)) {
|
|
44
|
+
return platform;
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
} catch (err) {
|
|
42
|
-
_didIteratorError =
|
|
48
|
+
_didIteratorError = true;
|
|
49
|
+
_iteratorError = err;
|
|
43
50
|
} finally {
|
|
44
51
|
try {
|
|
45
|
-
!_iteratorNormalCompletion && _iterator.return != null
|
|
52
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
53
|
+
_iterator.return();
|
|
54
|
+
}
|
|
46
55
|
} finally {
|
|
47
|
-
if (_didIteratorError)
|
|
56
|
+
if (_didIteratorError) {
|
|
57
|
+
throw _iteratorError;
|
|
58
|
+
}
|
|
48
59
|
}
|
|
49
60
|
}
|
|
50
61
|
return null;
|
|
51
62
|
}
|
|
52
63
|
function resolvePlatformNames(nativeProp) {
|
|
53
|
-
var platforms = nativeProp ===
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
var platforms = nativeProp === true ?
|
|
65
|
+
// all native platforms
|
|
66
|
+
ALL_PLATFORMS : nativeProp === false ?
|
|
67
|
+
// no native platform
|
|
68
|
+
[] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
|
|
69
|
+
var set = new Set(platforms);
|
|
70
|
+
if (set.has("mobile")) {
|
|
71
|
+
set.add("android");
|
|
72
|
+
set.add("ios");
|
|
73
|
+
set.delete("mobile");
|
|
74
|
+
}
|
|
75
|
+
return set;
|
|
60
76
|
}
|
|
61
77
|
//# sourceMappingURL=shouldRenderNativePlatform.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","shouldRenderNativePlatform_exports","__export","shouldRenderNativePlatform","module","exports","import_constants","require","ALL_PLATFORMS","nativeProp","userRequestedPlatforms","resolvePlatformNames","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","platform","currentPlatform","has"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","shouldRenderNativePlatform_exports","__export","shouldRenderNativePlatform","module","exports","import_constants","require","ALL_PLATFORMS","nativeProp","userRequestedPlatforms","resolvePlatformNames","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","platform","currentPlatform","has","err"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kCAAA;AAAAC,QAAA,CAAAD,kCAAA;EAAAE,0BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAgC,CAAAK,kCAAA;AAuBhC,IAAAK,gBAAM,GAA2CC,OAAO,qBAAgB;AAajE,IAAAC,aAAS,IACd,KAAK,EACH,SAAO,EACT,MACA;AAEA,SAAAL,0BAAuBA,CAAAM,UAAe;EACpC,KAAAA,UAAI;IACF,WAAO;EAAA;EAEX,IAAAC,sBAAA,GAAAC,oBAAA,CAAAF,UAAA;EAEA,IAAAG,yBAAO;IAAAC,iBAAA;IAAAC,cAAA;EACT;IAEA,KAAS,IAAAC,SAAA,GAAAP,aAAqB,CAAAQ,MAAyB,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MACrD,IAAMS,QAAA,GACJH,KAAA,CAAAlB,KAAA;MAOF,IAAMqB,QAAU,KAAIf,gBAAS,CAAAgB,eAAA,IAAAZ,sBAAA,CAAAa,GAAA,CAAAF,QAAA;QAEzB,OAAQA,QAAQ;MAElB;IACA;EACA,SAAIG,GAAA,EAAO;IACbX,iBAAA;IACAC,cAAO,GAAAU,GAAA;EACT","ignoreList":[]}
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var types_exports = {};
|
|
22
24
|
__export(types_exports, {
|
|
@@ -27,8 +29,8 @@ __export(types_exports, {
|
|
|
27
29
|
StyleObjectValue: () => StyleObjectValue
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(types_exports);
|
|
30
|
-
const StyleObjectProperty = 0
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const StyleObjectProperty = 0;
|
|
33
|
+
const StyleObjectValue = 1;
|
|
34
|
+
const StyleObjectIdentifier = 2;
|
|
35
|
+
const StyleObjectPseudo = 3;
|
|
36
|
+
const StyleObjectRules = 4;
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var types_exports = {};
|
|
24
26
|
__export(types_exports, {
|
|
@@ -29,9 +31,9 @@ __export(types_exports, {
|
|
|
29
31
|
StyleObjectValue: () => StyleObjectValue
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(types_exports);
|
|
32
|
-
var StyleObjectProperty = 0
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
var StyleObjectProperty = 0;
|
|
35
|
+
var StyleObjectValue = 1;
|
|
36
|
+
var StyleObjectIdentifier = 2;
|
|
37
|
+
var StyleObjectPseudo = 3;
|
|
38
|
+
var StyleObjectRules = 4;
|
|
37
39
|
//# sourceMappingURL=types.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports","__export","StyleObjectIdentifier","StyleObjectProperty","StyleObjectPseudo","StyleObjectRules","StyleObjectValue","module","exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports","__export","StyleObjectIdentifier","StyleObjectProperty","StyleObjectPseudo","StyleObjectRules","StyleObjectValue","module","exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA,mBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAQOC,MAAM,CAAAC,OAAA,GAAAb,YAAsB,CAAAK,aAAA;AAC5B,IAAAG,mBAAM,GAAmB;AACzB,IAAAG,gBAAM;AACN,IAAAJ,qBAAM,GAAoB;AAC1B,IAAAE,iBAAM,IAAmB","ignoreList":[]}
|