@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.
Files changed (87) hide show
  1. package/dist/cjs/clamp.cjs +12 -10
  2. package/dist/cjs/clamp.native.js +12 -10
  3. package/dist/cjs/clamp.native.js.map +1 -1
  4. package/dist/cjs/composeEventHandlers.cjs +22 -14
  5. package/dist/cjs/composeEventHandlers.native.js +23 -15
  6. package/dist/cjs/composeEventHandlers.native.js.map +1 -1
  7. package/dist/cjs/index.cjs +7 -5
  8. package/dist/cjs/index.native.js +7 -5
  9. package/dist/cjs/index.native.js.map +1 -1
  10. package/dist/cjs/shouldRenderNativePlatform.cjs +28 -15
  11. package/dist/cjs/shouldRenderNativePlatform.native.js +44 -28
  12. package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
  13. package/dist/cjs/types.cjs +17 -15
  14. package/dist/cjs/types.native.js +17 -15
  15. package/dist/cjs/types.native.js.map +1 -1
  16. package/dist/cjs/validStyleProps.cjs +308 -273
  17. package/dist/cjs/validStyleProps.native.js +303 -268
  18. package/dist/cjs/validStyleProps.native.js.map +1 -1
  19. package/dist/cjs/webOnlyStyleProps.cjs +88 -78
  20. package/dist/cjs/webOnlyStyleProps.native.js +88 -78
  21. package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
  22. package/dist/cjs/withStaticProperties.cjs +18 -12
  23. package/dist/cjs/withStaticProperties.native.js +18 -14
  24. package/dist/cjs/withStaticProperties.native.js.map +1 -1
  25. package/dist/esm/composeEventHandlers.mjs +10 -4
  26. package/dist/esm/composeEventHandlers.mjs.map +1 -1
  27. package/dist/esm/composeEventHandlers.native.js +11 -5
  28. package/dist/esm/composeEventHandlers.native.js.map +1 -1
  29. package/dist/esm/index.js +7 -7
  30. package/dist/esm/index.js.map +1 -6
  31. package/dist/esm/shouldRenderNativePlatform.mjs +16 -5
  32. package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
  33. package/dist/esm/shouldRenderNativePlatform.native.js +30 -16
  34. package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
  35. package/dist/esm/types.mjs +5 -5
  36. package/dist/esm/types.mjs.map +1 -1
  37. package/dist/esm/types.native.js +5 -5
  38. package/dist/esm/types.native.js.map +1 -1
  39. package/dist/esm/validStyleProps.mjs +294 -263
  40. package/dist/esm/validStyleProps.mjs.map +1 -1
  41. package/dist/esm/validStyleProps.native.js +288 -257
  42. package/dist/esm/validStyleProps.native.js.map +1 -1
  43. package/dist/esm/webOnlyStyleProps.mjs +75 -69
  44. package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
  45. package/dist/esm/webOnlyStyleProps.native.js +75 -69
  46. package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
  47. package/dist/esm/withStaticProperties.mjs +6 -2
  48. package/dist/esm/withStaticProperties.mjs.map +1 -1
  49. package/dist/esm/withStaticProperties.native.js +6 -4
  50. package/dist/esm/withStaticProperties.native.js.map +1 -1
  51. package/package.json +7 -10
  52. package/src/validStyleProps.ts +104 -38
  53. package/src/webOnlyStyleProps.ts +40 -29
  54. package/types/validStyleProps.d.ts +337 -238
  55. package/types/validStyleProps.d.ts.map +1 -1
  56. package/types/webOnlyStyleProps.d.ts +60 -20
  57. package/types/webOnlyStyleProps.d.ts.map +1 -1
  58. package/dist/cjs/clamp.js +0 -23
  59. package/dist/cjs/clamp.js.map +0 -6
  60. package/dist/cjs/composeEventHandlers.js +0 -27
  61. package/dist/cjs/composeEventHandlers.js.map +0 -6
  62. package/dist/cjs/index.js +0 -22
  63. package/dist/cjs/index.js.map +0 -6
  64. package/dist/cjs/shouldRenderNativePlatform.js +0 -35
  65. package/dist/cjs/shouldRenderNativePlatform.js.map +0 -6
  66. package/dist/cjs/types.js +0 -25
  67. package/dist/cjs/types.js.map +0 -6
  68. package/dist/cjs/validStyleProps.js +0 -283
  69. package/dist/cjs/validStyleProps.js.map +0 -6
  70. package/dist/cjs/webOnlyStyleProps.js +0 -89
  71. package/dist/cjs/webOnlyStyleProps.js.map +0 -6
  72. package/dist/cjs/withStaticProperties.js +0 -21
  73. package/dist/cjs/withStaticProperties.js.map +0 -6
  74. package/dist/esm/clamp.js +0 -7
  75. package/dist/esm/clamp.js.map +0 -6
  76. package/dist/esm/composeEventHandlers.js +0 -11
  77. package/dist/esm/composeEventHandlers.js.map +0 -6
  78. package/dist/esm/shouldRenderNativePlatform.js +0 -19
  79. package/dist/esm/shouldRenderNativePlatform.js.map +0 -6
  80. package/dist/esm/types.js +0 -9
  81. package/dist/esm/types.js.map +0 -6
  82. package/dist/esm/validStyleProps.js +0 -268
  83. package/dist/esm/validStyleProps.js.map +0 -6
  84. package/dist/esm/webOnlyStyleProps.js +0 -73
  85. package/dist/esm/webOnlyStyleProps.js.map +0 -6
  86. package/dist/esm/withStaticProperties.js +0 -5
  87. package/dist/esm/withStaticProperties.js.map +0 -6
@@ -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
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var clamp_exports = {};
22
24
  __export(clamp_exports, {
@@ -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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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":";;;;;;;;;;;;;;;;;;;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":[]}
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
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
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 = !0
29
+ checkDefaultPrevented = true
28
30
  } = {}) {
29
- return !og || !next ? next || og || void 0 : event => {
30
- if (og?.(event), !event || !(checkDefaultPrevented && typeof event == "object" && "defaultPrevented" in event) ||
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) return next?.(event);
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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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 < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
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 = !0
37
+ checkDefaultPrevented = true
36
38
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
37
- return !og || !next ? next || og || void 0 : function (event) {
38
- if (og?.(event), !event || !(checkDefaultPrevented && (typeof event > "u" ? "undefined" : _type_of(event)) === "object" && "defaultPrevented" in event) ||
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) return next?.(event);
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":";;;;;;;;;;;;;;;;;;;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,SAAIK,QAAQA,CAAAC,GAAA;EAKV,uBACG;;EAIuB,OAGvBA,GAAA,WAAAC,MAAsB,MAAS,IAACD,GAAM,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAEvC;AAAmB,SAEvBJ,qBAAAO,EAAA,EAAAC,IAAA;EACF;IAAAC,qBAAA;EAAA,IAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA","ignoreList":[]}
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":[]}
@@ -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
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -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
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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: !0
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":";;;;;;;;;;;;;;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":[]}
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
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
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) return null;
31
+ if (!nativeProp) {
32
+ return null;
33
+ }
30
34
  const userRequestedPlatforms = resolvePlatformNames(nativeProp);
31
- for (const platform of ALL_PLATFORMS) if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform)) return platform;
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 === !0 ? ALL_PLATFORMS : nativeProp === !1 ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp],
36
- set = new Set(platforms);
37
- return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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
- ALL_PLATFORMS = ["web", "android", "ios"];
30
+ var import_constants = require("@tamagui/constants");
31
+ var ALL_PLATFORMS = ["web", "android", "ios"];
30
32
  function shouldRenderNativePlatform(nativeProp) {
31
- if (!nativeProp) return null;
32
- var userRequestedPlatforms = resolvePlatformNames(nativeProp),
33
- _iteratorNormalCompletion = !0,
34
- _didIteratorError = !1,
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 = !0) {
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)) return platform;
43
+ if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform)) {
44
+ return platform;
45
+ }
40
46
  }
41
47
  } catch (err) {
42
- _didIteratorError = !0, _iteratorError = err;
48
+ _didIteratorError = true;
49
+ _iteratorError = err;
43
50
  } finally {
44
51
  try {
45
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
52
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
53
+ _iterator.return();
54
+ }
46
55
  } finally {
47
- if (_didIteratorError) throw _iteratorError;
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 === !0 ?
54
- // all native platforms
55
- ALL_PLATFORMS : nativeProp === !1 ?
56
- // no native platform
57
- [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp],
58
- set = new Set(platforms);
59
- return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
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":";;;;;;;;;;;;;;;;;;;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;EAAAC,aAAA,IAajE,OACL,SAAK,EACH,MAEF;AAEA,SAAAL,0BAAuBA,CAAAM,UAAA;EACrB,KAAAA,UAAI,EACF,WAAO;EAIX,IAAAC,sBAAO,GAAAC,oBAAA,CAAAF,UAAA;IAAAG,yBAAA;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;MASF,IAAIqB,QAAQ,KAAAf,gBAEF,CAAAgB,eACJ,IAAIZ,sBACG,CAAAa,GAAA,CAAQF,QAEd,GACT,OAAAA,QAAA","ignoreList":[]}
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":[]}
@@ -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
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
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
- StyleObjectValue = 1,
32
- StyleObjectIdentifier = 2,
33
- StyleObjectPseudo = 3,
34
- StyleObjectRules = 4;
32
+ const StyleObjectProperty = 0;
33
+ const StyleObjectValue = 1;
34
+ const StyleObjectIdentifier = 2;
35
+ const StyleObjectPseudo = 3;
36
+ const StyleObjectRules = 4;
@@ -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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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
- StyleObjectValue = 1,
34
- StyleObjectIdentifier = 2,
35
- StyleObjectPseudo = 3,
36
- StyleObjectRules = 4;
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":";;;;;;;;;;;;;;;;;;;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,aACtB","ignoreList":[]}
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":[]}