@tamagui/helpers 1.61.2 → 1.62.0

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.js CHANGED
@@ -1,21 +1,17 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var clamp_exports = {};
20
16
  __export(clamp_exports, {
21
17
  clamp: () => clamp
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/clamp.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,28 @@
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 clamp_exports = {};
17
+ __export(clamp_exports, {
18
+ clamp: () => clamp
19
+ });
20
+ module.exports = __toCommonJS(clamp_exports);
21
+ function clamp(value, [min, max]) {
22
+ return Math.min(max, Math.max(min, value));
23
+ }
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ clamp
27
+ });
28
+ //# sourceMappingURL=clamp.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clamp.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
5
+ "names": []
6
+ }
@@ -1,36 +1,27 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var composeEventHandlers_exports = {};
20
16
  __export(composeEventHandlers_exports, {
21
17
  composeEventHandlers: () => composeEventHandlers
22
18
  });
23
19
  module.exports = __toCommonJS(composeEventHandlers_exports);
24
- function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
25
- if (!og || !next) {
26
- return next || og || void 0;
27
- }
28
- return function(event) {
29
- og == null ? void 0 : og(event);
30
- if (!event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
31
- "defaultPrevented" in event && !event.defaultPrevented) {
32
- return next == null ? void 0 : next(event);
33
- }
20
+ function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
21
+ return !og || !next ? next || og || void 0 : function(event) {
22
+ if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
23
+ "defaultPrevented" in event && !event.defaultPrevented)
24
+ return next?.(event);
34
25
  };
35
26
  }
36
27
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/composeEventHandlers.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,KAAK,IAAI,CAAC,GACpC;AACA,MAAI,CAAC,MAAM,CAAC,MAAM;AAChB,WAAO,QAAQ,MAAM;AAAA,EACvB;AACA,SAAO,SAAU,OAAU;AACzB,6BAAK;AACL,QACE,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,6BAAO;AAAA,IAChB;AAAA,EACF;AACF;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,SAAU,OAAU;AAEzB,QADA,KAAK,KAAK,GAER,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,OAAO,KAAK;AAAA,EAEvB;AACF;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,32 @@
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 composeEventHandlers_exports = {};
17
+ __export(composeEventHandlers_exports, {
18
+ composeEventHandlers: () => composeEventHandlers
19
+ });
20
+ module.exports = __toCommonJS(composeEventHandlers_exports);
21
+ function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
22
+ return !og || !next ? next || og || void 0 : function(event) {
23
+ if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
24
+ "defaultPrevented" in event && !event.defaultPrevented)
25
+ return next?.(event);
26
+ };
27
+ }
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ composeEventHandlers
31
+ });
32
+ //# sourceMappingURL=composeEventHandlers.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/composeEventHandlers.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,GAAK,IAAI,CAAC,GACpC;AACA,SAAI,CAAC,MAAM,CAAC,OACH,QAAQ,MAAM,SAEhB,SAAU,OAAU;AAEzB,QADA,KAAK,KAAK,GAER,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM;AAEvC,aAAO,OAAO,KAAK;AAAA,EAEvB;AACF;",
5
+ "names": []
6
+ }
@@ -1,29 +1,24 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var concatClassName_exports = {};
20
16
  __export(concatClassName_exports, {
21
17
  concatClassName: () => concatClassName
22
18
  });
23
19
  module.exports = __toCommonJS(concatClassName_exports);
24
20
  function concatClassName(_cn) {
25
- const args = arguments;
26
- const usedPrefixes = [];
21
+ const args = arguments, usedPrefixes = [];
27
22
  let final = "";
28
23
  const len = args.length;
29
24
  let propObjects = null;
@@ -31,13 +26,11 @@ function concatClassName(_cn) {
31
26
  const cns = args[x];
32
27
  if (!cns)
33
28
  continue;
34
- if (!Array.isArray(cns) && typeof cns !== "string") {
35
- propObjects = propObjects || [];
36
- propObjects.push(cns);
29
+ if (!Array.isArray(cns) && typeof cns != "string") {
30
+ propObjects = propObjects || [], propObjects.push(cns);
37
31
  continue;
38
32
  }
39
- const names = Array.isArray(cns) ? cns : cns.split(" ");
40
- const numNames = names.length;
33
+ const names = Array.isArray(cns) ? cns : cns.split(" "), numNames = names.length;
41
34
  for (let i = numNames - 1; i >= 0; i--) {
42
35
  const name = names[i];
43
36
  if (!name || name === " ")
@@ -51,29 +44,18 @@ function concatClassName(_cn) {
51
44
  final = name + " " + final;
52
45
  continue;
53
46
  }
54
- const nextChar = name[splitIndex + 1];
55
- const isMediaQuery = nextChar === "_";
56
- const styleKey = name.slice(1, name.lastIndexOf("-"));
57
- const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
58
- const uid = mediaKey ? styleKey + mediaKey : styleKey;
59
- if (usedPrefixes.indexOf(uid) > -1) {
47
+ const isMediaQuery = name[splitIndex + 1] === "_", styleKey = name.slice(1, name.lastIndexOf("-")), mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null, uid = mediaKey ? styleKey + mediaKey : styleKey;
48
+ if (usedPrefixes.indexOf(uid) > -1)
60
49
  continue;
61
- }
62
50
  usedPrefixes.push(uid);
63
51
  const propName = styleKey;
64
- if (propName && propObjects) {
65
- if (propObjects.some((po) => {
66
- if (mediaKey) {
67
- const propKey = pseudoInvert[mediaKey];
68
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
69
- }
70
- const res = po && propName in po && po[propName] !== null;
71
- return res;
72
- })) {
73
- continue;
52
+ propName && propObjects && propObjects.some((po) => {
53
+ if (mediaKey) {
54
+ const propKey = pseudoInvert[mediaKey];
55
+ return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
74
56
  }
75
- }
76
- final = name + " " + final;
57
+ return po && propName in po && po[propName] !== null;
58
+ }) || (final = name + " " + final);
77
59
  }
78
60
  }
79
61
  return final;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/concatClassName.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,gBAAgB,KAAqD;AACnF,QAAM,OAAO;AACb,QAAM,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,KAAK;AACjB,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,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AAY,KAAK,CAAC,OAAO;AACvB,YAAI,UAAU;AACZ,gBAAM,UAAU,aAAa,QAAQ;AACrC,iBAAO,MAAM,GAAG,OAAO,KAAK,YAAY,GAAG,OAAO,KAAK,GAAG,OAAO,MAAM;AAAA,QACzE;AAEA,eADY,MAAM,YAAY,MAAM,GAAG,QAAQ,MAAM;AAAA,MAEvD,CAAC,MAOL,QAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,73 @@
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 concatClassName_exports = {};
17
+ __export(concatClassName_exports, {
18
+ concatClassName: () => concatClassName
19
+ });
20
+ module.exports = __toCommonJS(concatClassName_exports);
21
+ function concatClassName(_cn) {
22
+ const args = arguments, usedPrefixes = [];
23
+ let final = "";
24
+ const len = args.length;
25
+ let propObjects = null;
26
+ for (let x = len; x >= 0; x--) {
27
+ const cns = args[x];
28
+ if (!cns)
29
+ continue;
30
+ if (!Array.isArray(cns) && typeof cns != "string") {
31
+ propObjects = propObjects || [], propObjects.push(cns);
32
+ continue;
33
+ }
34
+ const names = Array.isArray(cns) ? cns : cns.split(" "), numNames = names.length;
35
+ for (let i = numNames - 1; i >= 0; i--) {
36
+ const name = names[i];
37
+ if (!name || name === " ")
38
+ continue;
39
+ if (name[0] !== "_") {
40
+ final = name + " " + final;
41
+ continue;
42
+ }
43
+ const splitIndex = name.indexOf("-");
44
+ if (splitIndex < 1) {
45
+ final = name + " " + final;
46
+ continue;
47
+ }
48
+ const isMediaQuery = name[splitIndex + 1] === "_", styleKey = name.slice(1, name.lastIndexOf("-")), mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null, uid = mediaKey ? styleKey + mediaKey : styleKey;
49
+ if (usedPrefixes.indexOf(uid) > -1)
50
+ continue;
51
+ usedPrefixes.push(uid);
52
+ const propName = styleKey;
53
+ propName && propObjects && propObjects.some((po) => {
54
+ if (mediaKey) {
55
+ const propKey = pseudoInvert[mediaKey];
56
+ return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
57
+ }
58
+ return po && propName in po && po[propName] !== null;
59
+ }) || (final = name + " " + final);
60
+ }
61
+ }
62
+ return final;
63
+ }
64
+ const pseudoInvert = {
65
+ hover: "hoverStyle",
66
+ focus: "focusStyle",
67
+ press: "pressStyle"
68
+ };
69
+ // Annotate the CommonJS export names for ESM import in node:
70
+ 0 && (module.exports = {
71
+ concatClassName
72
+ });
73
+ //# sourceMappingURL=concatClassName.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/concatClassName.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,gBAAgB,KAAqD;AACnF,QAAM,OAAO,WACP,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,KAAK;AACjB,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,KAAK,CAAC;AAElB,QAAI,CAAC;AAAK;AACV,QAAI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-1,18 +1,14 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
8
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
9
  return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
10
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
12
  var src_exports = {};
17
13
  module.exports = __toCommonJS(src_exports);
18
14
  __reExport(src_exports, require("./clamp"), module.exports);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,oBAAd;AACA,wBAAc,mCADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,iCALd;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,oBAAd;AACA,wBAAc,mCADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,iCALd;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,30 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var src_exports = {};
14
+ module.exports = __toCommonJS(src_exports);
15
+ __reExport(src_exports, require("./clamp"), module.exports);
16
+ __reExport(src_exports, require("./composeEventHandlers"), module.exports);
17
+ __reExport(src_exports, require("./concatClassName"), module.exports);
18
+ __reExport(src_exports, require("./validStyleProps"), module.exports);
19
+ __reExport(src_exports, require("./types"), module.exports);
20
+ __reExport(src_exports, require("@tamagui/simple-hash"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("./clamp"),
24
+ ...require("./composeEventHandlers"),
25
+ ...require("./concatClassName"),
26
+ ...require("./validStyleProps"),
27
+ ...require("./types"),
28
+ ...require("@tamagui/simple-hash")
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,oBAAd;AACA,wBAAc,mCADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,iCALd;",
5
+ "names": []
6
+ }
package/dist/cjs/types.js CHANGED
@@ -1,17 +1,14 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
8
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
9
  return to;
13
10
  };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
11
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
12
  var types_exports = {};
16
13
  module.exports = __toCommonJS(types_exports);
17
14
  //# sourceMappingURL=types.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,15 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var types_exports = {};
14
+ module.exports = __toCommonJS(types_exports);
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/types.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
5
+ "names": []
6
+ }