@tamagui/shapes 2.7.7 → 3.0.0-beta.1091.1

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 (66) hide show
  1. package/dist/cjs/Circle.cjs +16 -20
  2. package/dist/cjs/Circle.native.cjs +31 -0
  3. package/dist/cjs/Circle.native.js +16 -19
  4. package/dist/cjs/Circle.native.js.map +1 -1
  5. package/dist/cjs/Square.cjs +23 -30
  6. package/dist/cjs/Square.native.cjs +38 -0
  7. package/dist/cjs/Square.native.js +24 -30
  8. package/dist/cjs/Square.native.js.map +1 -1
  9. package/dist/cjs/getShapeSize.cjs +29 -31
  10. package/dist/cjs/getShapeSize.native.cjs +42 -0
  11. package/dist/cjs/getShapeSize.native.js +31 -34
  12. package/dist/cjs/getShapeSize.native.js.map +1 -1
  13. package/dist/cjs/index.cjs +9 -11
  14. package/dist/cjs/index.native.cjs +22 -0
  15. package/dist/cjs/index.native.js +9 -10
  16. package/dist/cjs/index.native.js.map +1 -1
  17. package/dist/esm/Circle.mjs +4 -2
  18. package/dist/esm/Circle.mjs.map +1 -1
  19. package/dist/esm/Circle.native.js +4 -2
  20. package/dist/esm/Circle.native.js.map +1 -1
  21. package/dist/esm/Square.mjs +13 -14
  22. package/dist/esm/Square.mjs.map +1 -1
  23. package/dist/esm/Square.native.js +13 -14
  24. package/dist/esm/Square.native.js.map +1 -1
  25. package/dist/esm/getShapeSize.mjs +18 -14
  26. package/dist/esm/getShapeSize.mjs.map +1 -1
  27. package/dist/esm/getShapeSize.native.js +19 -17
  28. package/dist/esm/getShapeSize.native.js.map +1 -1
  29. package/dist/esm/index.js +5 -4
  30. package/dist/esm/index.mjs +5 -4
  31. package/dist/esm/index.native.js +5 -4
  32. package/dist/jsx/Circle.mjs +4 -2
  33. package/dist/jsx/Circle.mjs.map +1 -1
  34. package/dist/jsx/Circle.native.cjs +31 -0
  35. package/dist/jsx/Circle.native.js +16 -19
  36. package/dist/jsx/Circle.native.js.map +1 -1
  37. package/dist/jsx/Square.mjs +13 -14
  38. package/dist/jsx/Square.mjs.map +1 -1
  39. package/dist/jsx/Square.native.cjs +38 -0
  40. package/dist/jsx/Square.native.js +24 -30
  41. package/dist/jsx/Square.native.js.map +1 -1
  42. package/dist/jsx/getShapeSize.mjs +18 -14
  43. package/dist/jsx/getShapeSize.mjs.map +1 -1
  44. package/dist/jsx/getShapeSize.native.cjs +42 -0
  45. package/dist/jsx/getShapeSize.native.js +31 -34
  46. package/dist/jsx/getShapeSize.native.js.map +1 -1
  47. package/dist/jsx/index.js +5 -4
  48. package/dist/jsx/index.mjs +5 -4
  49. package/dist/jsx/index.native.cjs +22 -0
  50. package/dist/jsx/index.native.js +9 -10
  51. package/dist/jsx/index.native.js.map +1 -1
  52. package/package.json +7 -5
  53. package/src/Circle.tsx +1 -1
  54. package/src/Square.tsx +16 -6
  55. package/src/getShapeSize.tsx +14 -9
  56. package/types/Circle.d.ts +22 -8
  57. package/types/Circle.d.ts.map +1 -1
  58. package/types/Square.d.ts +22 -8
  59. package/types/Square.d.ts.map +1 -1
  60. package/types/getShapeSize.d.ts +1 -3
  61. package/types/getShapeSize.d.ts.map +1 -1
  62. package/dist/esm/index.js.map +0 -1
  63. package/dist/esm/index.mjs.map +0 -1
  64. package/dist/esm/index.native.js.map +0 -1
  65. package/dist/jsx/index.js.map +0 -1
  66. package/dist/jsx/index.mjs.map +0 -1
@@ -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,wBADdH,MAAA,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,wBAAAH,MAFd,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Square\"), module.exports);\n__reExport(index_exports, require(\"./Circle\"), module.exports);\n__reExport(index_exports, require(\"./getShapeSize\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO;AAC7D,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO;AAC7D,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
@@ -1,8 +1,10 @@
1
1
  import { styled } from "@tamagui/web";
2
2
  import { Square } from "./Square.mjs";
3
+
3
4
  const Circle = styled(Square, {
4
- name: "Circle",
5
- borderRadius: 1e8
5
+ displayName: "Circle",
6
+ borderRadius: 1e8
6
7
  });
8
+
7
9
  export { Circle };
8
10
  //# sourceMappingURL=Circle.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["styled","Square","Circle","name","borderRadius"],"sources":["../../src/Circle.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,MAAA,QAAc;AAEvB,SAASC,MAAA,QAAc;AAEhB,MAAMC,MAAA,GAASF,MAAA,CAAOC,MAAA,EAAQ;EACnCE,IAAA,EAAM;EACNC,YAAA,EAAc;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Circle.js","names":[],"sources":["esm/Circle.js"],"sourcesContent":["import { styled } from \"@tamagui/web\";\nimport { Square } from \"./Square\";\nconst Circle = styled(Square, {\n displayName: \"Circle\",\n borderRadius: 1e8\n});\nexport {\n Circle\n};\n//# sourceMappingURL=Circle.js.map\n"],"mappings":";;;;AAEA,MAAM,SAAS,OAAO,QAAQ;CAC5B,aAAa;CACb,cAAc;AAChB,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { styled } from "@tamagui/web";
2
2
  import { Square } from "./Square.native.js";
3
+
3
4
  var Circle = styled(Square, {
4
- name: "Circle",
5
- borderRadius: 1e8
5
+ displayName: "Circle",
6
+ borderRadius: 1e8
6
7
  });
8
+
7
9
  export { Circle };
8
10
  //# sourceMappingURL=Circle.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["styled","Square","Circle","name","borderRadius"],"sources":["../../src/Circle.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,MAAA,QAAc;AAEvB,SAASC,MAAA,QAAc;AAEhB,IAAAC,MAAM,GAAAF,MAAS,CAAAC,MAAO;EAC3BE,IAAA,EAAM;EACNC,YAAA,EAAc;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Circle.native.js","names":[],"sources":["esm/Circle.native.js"],"sourcesContent":["import { styled } from \"@tamagui/web\";\nimport { Square } from \"./Square\";\nvar Circle = styled(Square, {\n displayName: \"Circle\",\n borderRadius: 1e8\n});\nexport {\n Circle\n};\n//# sourceMappingURL=Circle.js.map\n"],"mappings":";;;;AAEA,IAAI,SAAS,OAAO,QAAQ;CAC1B,aAAa;CACb,cAAc;AAChB,CAAC"}
@@ -1,18 +1,17 @@
1
- import { ThemeableStack } from "@tamagui/stacks";
1
+ import { YStack } from "@tamagui/stacks";
2
2
  import { styled } from "@tamagui/web";
3
3
  import { getShapeSize } from "./getShapeSize.mjs";
4
- const Square = styled(ThemeableStack, {
5
- name: "Square",
6
- alignItems: "center",
7
- justifyContent: "center",
8
- variants: {
9
- size: {
10
- "...size": getShapeSize,
11
- ":number": getShapeSize
12
- }
13
- }
14
- }, {
15
- memo: true
16
- });
4
+
5
+ const Square = styled(YStack, {
6
+ displayName: "Square",
7
+ alignItems: "center",
8
+ justifyContent: "center",
9
+ variants: {
10
+ size: getShapeSize,
11
+ circular: { true: { borderRadius: 1e5 } },
12
+ transparent: { true: { backgroundColor: "transparent" } }
13
+ }
14
+ }, { memo: true });
15
+
17
16
  export { Square };
18
17
  //# sourceMappingURL=Square.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["ThemeableStack","styled","getShapeSize","Square","name","alignItems","justifyContent","variants","size","memo"],"sources":["../../src/Square.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAE/B,SAASC,MAAA,QAAc;AAEvB,SAASC,YAAA,QAAoB;AAEtB,MAAMC,MAAA,GAASF,MAAA,CACpBD,cAAA,EACA;EACEI,IAAA,EAAM;EACNC,UAAA,EAAY;EACZC,cAAA,EAAgB;EAEhBC,QAAA,EAAU;IACRC,IAAA,EAAM;MACJ,WAAWN,YAAA;MACX,WAAWA;IACb;EACF;AACF,GACA;EACEO,IAAA,EAAM;AACR,CACF","ignoreList":[]}
1
+ {"version":3,"file":"Square.js","names":[],"sources":["esm/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n },\n {\n memo: true\n }\n);\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,OACb,QACA;CACE,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GACA,EACE,MAAM,KACR,CACF"}
@@ -1,18 +1,17 @@
1
- import { ThemeableStack } from "@tamagui/stacks";
1
+ import { YStack } from "@tamagui/stacks";
2
2
  import { styled } from "@tamagui/web";
3
3
  import { getShapeSize } from "./getShapeSize.native.js";
4
- var Square = styled(ThemeableStack, {
5
- name: "Square",
6
- alignItems: "center",
7
- justifyContent: "center",
8
- variants: {
9
- size: {
10
- "...size": getShapeSize,
11
- ":number": getShapeSize
12
- }
13
- }
14
- }, {
15
- memo: true
16
- });
4
+
5
+ var Square = styled(YStack, {
6
+ displayName: "Square",
7
+ alignItems: "center",
8
+ justifyContent: "center",
9
+ variants: {
10
+ size: getShapeSize,
11
+ circular: { true: { borderRadius: 1e5 } },
12
+ transparent: { true: { backgroundColor: "transparent" } }
13
+ }
14
+ }, { memo: true });
15
+
17
16
  export { Square };
18
17
  //# sourceMappingURL=Square.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ThemeableStack","styled","getShapeSize","Square","name","alignItems","justifyContent","variants","size","memo"],"sources":["../../src/Square.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAE/B,SAASC,MAAA,QAAc;AAEvB,SAASC,YAAA,QAAoB;AAEtB,IAAAC,MAAM,GAAAF,MAAS,CAAAD,cAAA;EACpBI,IAAA;EACAC,UAAA;EAAAC,cACQ;EAAAC,QACN;IACAC,IAAA;MAEA,SAAU,EAAAN,YAAA;MACR,SAAM,EAAAA;IAAA;EACO;AACA;EACbO,IACF;AAAA,EACF;AAAA,SACAN,MACE","ignoreList":[]}
1
+ {"version":3,"file":"Square.native.js","names":[],"sources":["esm/Square.native.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nvar Square = styled(YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n}, {\n memo: true\n});\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS,OAAO,QAAQ;CAC1B,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GAAG,EACD,MAAM,KACR,CAAC"}
@@ -1,16 +1,20 @@
1
- const getShapeSize = (size, {
2
- tokens
3
- }) => {
4
- const width = tokens.size[size] ?? size;
5
- const height = tokens.size[size] ?? size;
6
- return {
7
- width,
8
- height,
9
- minWidth: width,
10
- maxWidth: width,
11
- maxHeight: height,
12
- minHeight: height
13
- };
14
- };
1
+ import { resolveSize } from "@tamagui/size";
2
+ import { styled } from "@tamagui/web";
3
+
4
+ const getShapeSize = styled.dynamic((size, env) => {
5
+ const key = typeof size === "string" ? size.replace(/^\$/, "") : size;
6
+ const resolved = typeof key === "number" ? key : env.tokens.size[key] ?? resolveSize(size, env).controlHeight;
7
+ const width = resolved;
8
+ const height = resolved;
9
+ return {
10
+ width,
11
+ height,
12
+ minWidth: width,
13
+ maxWidth: width,
14
+ maxHeight: height,
15
+ minHeight: height
16
+ };
17
+ });
18
+
15
19
  export { getShapeSize };
16
20
  //# sourceMappingURL=getShapeSize.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["getShapeSize","size","tokens","width","height","minWidth","maxWidth","maxHeight","minHeight"],"sources":["../../src/getShapeSize.tsx"],"sourcesContent":[null],"mappings":"AAGO,MAAMA,YAAA,GAA6DA,CACxEC,IAAA,EACA;EAAEC;AAAO,MACN;EACH,MAAMC,KAAA,GAAQD,MAAA,CAAOD,IAAA,CAAKA,IAAI,KAAKA,IAAA;EACnC,MAAMG,MAAA,GAASF,MAAA,CAAOD,IAAA,CAAKA,IAAI,KAAKA,IAAA;EACpC,OAAO;IACLE,KAAA;IACAC,MAAA;IACAC,QAAA,EAAUF,KAAA;IACVG,QAAA,EAAUH,KAAA;IACVI,SAAA,EAAWH,MAAA;IACXI,SAAA,EAAWJ;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"getShapeSize.js","names":[],"sources":["esm/getShapeSize.js"],"sourcesContent":["import { resolveSize } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nconst getShapeSize = styled.dynamic((size, env) => {\n const key = typeof size === \"string\" ? size.replace(/^\\$/, \"\") : size;\n const resolved = typeof key === \"number\" ? key : env.tokens.size[key] ?? resolveSize(size, env).controlHeight;\n const width = resolved;\n const height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SAAS,MAAM,QAAQ;CACjD,MAAM,MAAM,OAAO,SAAS,WAAW,KAAK,QAAQ,OAAO,EAAE,IAAI;CACjE,MAAM,WAAW,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO,KAAK,QAAQ,YAAY,MAAM,GAAG,CAAC,CAAC;CAChG,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}
@@ -1,19 +1,21 @@
1
- var getShapeSize = function (size, param) {
2
- var {
3
- tokens
4
- } = param;
5
- var _tokens_size_size;
6
- var width = (_tokens_size_size = tokens.size[size]) !== null && _tokens_size_size !== void 0 ? _tokens_size_size : size;
7
- var _tokens_size_size1;
8
- var height = (_tokens_size_size1 = tokens.size[size]) !== null && _tokens_size_size1 !== void 0 ? _tokens_size_size1 : size;
9
- return {
10
- width,
11
- height,
12
- minWidth: width,
13
- maxWidth: width,
14
- maxHeight: height,
15
- minHeight: height
16
- };
17
- };
1
+ import { resolveSize } from "@tamagui/size";
2
+ import { styled } from "@tamagui/web";
3
+
4
+ var getShapeSize = styled.dynamic(function(size, env) {
5
+ var key = typeof size === "string" ? size.replace(/^\$/, "") : size;
6
+ var _env_tokens_size_key;
7
+ var resolved = typeof key === "number" ? key : (_env_tokens_size_key = env.tokens.size[key]) !== null && _env_tokens_size_key !== void 0 ? _env_tokens_size_key : resolveSize(size, env).controlHeight;
8
+ var width = resolved;
9
+ var height = resolved;
10
+ return {
11
+ width,
12
+ height,
13
+ minWidth: width,
14
+ maxWidth: width,
15
+ maxHeight: height,
16
+ minHeight: height
17
+ };
18
+ });
19
+
18
20
  export { getShapeSize };
19
21
  //# sourceMappingURL=getShapeSize.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getShapeSize","size","param","tokens","_tokens_size_size","width","_tokens_size_size1","height","minWidth","maxWidth","maxHeight"],"sources":["../../src/getShapeSize.tsx"],"sourcesContent":[null],"mappings":"AAGO,IAAAA,YAAM,YAAAA,CAEXC,IAAE,EAAAC,KAAO;EAET;IAAMC;EAAA,CAAQ,GAAAD,KAAO;EACrB,IAAAE,iBAAe;EACf,IAAAC,KAAO,IAAAD,iBAAA,GAAAD,MAAA,CAAAF,IAAA,CAAAA,IAAA,eAAAG,iBAAA,cAAAA,iBAAA,GAAAH,IAAA;EAAA,IACLK,kBAAA;EAAA,IACAC,MAAA,IAAAD,kBAAA,GAAAH,MAAA,CAAAF,IAAA,CAAAA,IAAA,eAAAK,kBAAA,cAAAA,kBAAA,GAAAL,IAAA;EAAA,OACA;IACAI,KAAA;IACAE,MAAA;IACAC,QAAA,EAAAH,KAAW;IACbI,QAAA,EAAAJ,KAAA;IACFK,SAAA,EAAAH,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"getShapeSize.native.js","names":[],"sources":["esm/getShapeSize.native.js"],"sourcesContent":["import { resolveSize } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nvar getShapeSize = styled.dynamic(function(size, env) {\n var key = typeof size === \"string\" ? size.replace(/^\\$/, \"\") : size;\n var _env_tokens_size_key;\n var resolved = typeof key === \"number\" ? key : (_env_tokens_size_key = env.tokens.size[key]) !== null && _env_tokens_size_key !== void 0 ? _env_tokens_size_key : resolveSize(size, env).controlHeight;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,IAAI,eAAe,OAAO,QAAQ,SAAS,MAAM,KAAK;CACpD,IAAI,MAAM,OAAO,SAAS,WAAW,KAAK,QAAQ,OAAO,EAAE,IAAI;CAC/D,IAAI;CACJ,IAAI,WAAW,OAAO,QAAQ,WAAW,OAAO,uBAAuB,IAAI,OAAO,KAAK,UAAU,QAAQ,yBAAyB,KAAK,IAAI,uBAAuB,YAAY,MAAM,GAAG,CAAC,CAAC;CACzL,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export * from "./Square.mjs";
2
- export * from "./Circle.mjs";
3
- export * from "./getShapeSize.mjs";
4
- //# sourceMappingURL=index.js.map
1
+ export * from "./Square.mjs"
2
+
3
+ export * from "./Circle.mjs"
4
+
5
+ export * from "./getShapeSize.mjs"
@@ -1,4 +1,5 @@
1
- export * from "./Square.mjs";
2
- export * from "./Circle.mjs";
3
- export * from "./getShapeSize.mjs";
4
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Square.mjs"
2
+
3
+ export * from "./Circle.mjs"
4
+
5
+ export * from "./getShapeSize.mjs"
@@ -1,4 +1,5 @@
1
- export * from "./Square.native.js";
2
- export * from "./Circle.native.js";
3
- export * from "./getShapeSize.native.js";
4
- //# sourceMappingURL=index.native.js.map
1
+ export * from "./Square.native.js"
2
+
3
+ export * from "./Circle.native.js"
4
+
5
+ export * from "./getShapeSize.native.js"
@@ -1,8 +1,10 @@
1
1
  import { styled } from "@tamagui/web";
2
2
  import { Square } from "./Square.mjs";
3
+
3
4
  const Circle = styled(Square, {
4
- name: "Circle",
5
- borderRadius: 1e8
5
+ displayName: "Circle",
6
+ borderRadius: 1e8
6
7
  });
8
+
7
9
  export { Circle };
8
10
  //# sourceMappingURL=Circle.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["styled","Square","Circle","name","borderRadius"],"sources":["../../src/Circle.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,MAAA,QAAc;AAEvB,SAASC,MAAA,QAAc;AAEhB,MAAMC,MAAA,GAASF,MAAA,CAAOC,MAAA,EAAQ;EACnCE,IAAA,EAAM;EACNC,YAAA,EAAc;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Circle.js","names":[],"sources":["jsx/Circle.js"],"sourcesContent":["import { styled } from \"@tamagui/web\";\nimport { Square } from \"./Square\";\nconst Circle = styled(Square, {\n displayName: \"Circle\",\n borderRadius: 1e8\n});\nexport {\n Circle\n};\n//# sourceMappingURL=Circle.js.map\n"],"mappings":";;;;AAEA,MAAM,SAAS,OAAO,QAAQ;CAC5B,aAAa;CACb,cAAc;AAChB,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var Circle_exports = {};
24
+ __export(Circle_exports, { Circle: () => Circle });
25
+ module.exports = __toCommonJS(Circle_exports);
26
+ var import_web = require("@tamagui/web");
27
+ var import_Square = require("./Square.native.js");
28
+ var Circle = (0, import_web.styled)(import_Square.Square, {
29
+ displayName: "Circle",
30
+ borderRadius: 1e8
31
+ });
@@ -5,32 +5,29 @@ 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: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var Circle_exports = {};
26
- __export(Circle_exports, {
27
- Circle: () => Circle
28
- });
24
+ __export(Circle_exports, { Circle: () => Circle });
29
25
  module.exports = __toCommonJS(Circle_exports);
30
26
  var import_web = require("@tamagui/web");
31
27
  var import_Square = require("./Square.native.js");
32
28
  var Circle = (0, import_web.styled)(import_Square.Square, {
33
- name: "Circle",
34
- borderRadius: 1e8
29
+ displayName: "Circle",
30
+ borderRadius: 1e8
35
31
  });
32
+
36
33
  //# sourceMappingURL=Circle.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all"],"sources":["../../src/Circle.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AAET,IAAAA,SAAS,GAAAC,MAAA,CAAcC,cAAA;AAEhB,IAAAC,gBAAe,GAAOF,MAAA,CAAQG,wBAAA;AAAA,IACnCC,iBAAM,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IACNC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAChB,IAACC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA","ignoreList":[]}
1
+ {"version":3,"file":"Circle.native.js","names":[],"sources":["jsx/Circle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Circle_exports = {};\n__export(Circle_exports, {\n Circle: () => Circle\n});\nmodule.exports = __toCommonJS(Circle_exports);\nvar import_web = require(\"@tamagui/web\");\nvar import_Square = require(\"./Square\");\nvar Circle = (0, import_web.styled)(import_Square.Square, {\n displayName: \"Circle\",\n borderRadius: 1e8\n});\n//# sourceMappingURL=Circle.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,gBAAgB,QAAQ,oBAAU;AACtC,IAAI,UAAU,GAAG,WAAW,OAAM,CAAE,cAAc,QAAQ;CACxD,aAAa;CACb,cAAc;AAChB,CAAC"}
@@ -1,18 +1,17 @@
1
- import { ThemeableStack } from "@tamagui/stacks";
1
+ import { YStack } from "@tamagui/stacks";
2
2
  import { styled } from "@tamagui/web";
3
3
  import { getShapeSize } from "./getShapeSize.mjs";
4
- const Square = styled(ThemeableStack, {
5
- name: "Square",
6
- alignItems: "center",
7
- justifyContent: "center",
8
- variants: {
9
- size: {
10
- "...size": getShapeSize,
11
- ":number": getShapeSize
12
- }
13
- }
14
- }, {
15
- memo: true
16
- });
4
+
5
+ const Square = styled(YStack, {
6
+ displayName: "Square",
7
+ alignItems: "center",
8
+ justifyContent: "center",
9
+ variants: {
10
+ size: getShapeSize,
11
+ circular: { true: { borderRadius: 1e5 } },
12
+ transparent: { true: { backgroundColor: "transparent" } }
13
+ }
14
+ }, { memo: true });
15
+
17
16
  export { Square };
18
17
  //# sourceMappingURL=Square.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["ThemeableStack","styled","getShapeSize","Square","name","alignItems","justifyContent","variants","size","memo"],"sources":["../../src/Square.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAE/B,SAASC,MAAA,QAAc;AAEvB,SAASC,YAAA,QAAoB;AAEtB,MAAMC,MAAA,GAASF,MAAA,CACpBD,cAAA,EACA;EACEI,IAAA,EAAM;EACNC,UAAA,EAAY;EACZC,cAAA,EAAgB;EAEhBC,QAAA,EAAU;IACRC,IAAA,EAAM;MACJ,WAAWN,YAAA;MACX,WAAWA;IACb;EACF;AACF,GACA;EACEO,IAAA,EAAM;AACR,CACF","ignoreList":[]}
1
+ {"version":3,"file":"Square.js","names":[],"sources":["jsx/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n },\n {\n memo: true\n }\n);\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,OACb,QACA;CACE,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GACA,EACE,MAAM,KACR,CACF"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var Square_exports = {};
24
+ __export(Square_exports, { Square: () => Square });
25
+ module.exports = __toCommonJS(Square_exports);
26
+ var import_stacks = require("@tamagui/stacks");
27
+ var import_web = require("@tamagui/web");
28
+ var import_getShapeSize = require("./getShapeSize.native.js");
29
+ var Square = (0, import_web.styled)(import_stacks.YStack, {
30
+ displayName: "Square",
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ variants: {
34
+ size: import_getShapeSize.getShapeSize,
35
+ circular: { true: { borderRadius: 1e5 } },
36
+ transparent: { true: { backgroundColor: "transparent" } }
37
+ }
38
+ }, { memo: true });
@@ -5,42 +5,36 @@ 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: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var Square_exports = {};
26
- __export(Square_exports, {
27
- Square: () => Square
28
- });
24
+ __export(Square_exports, { Square: () => Square });
29
25
  module.exports = __toCommonJS(Square_exports);
30
26
  var import_stacks = require("@tamagui/stacks");
31
27
  var import_web = require("@tamagui/web");
32
28
  var import_getShapeSize = require("./getShapeSize.native.js");
33
- var Square = (0, import_web.styled)(import_stacks.ThemeableStack, {
34
- name: "Square",
35
- alignItems: "center",
36
- justifyContent: "center",
37
- variants: {
38
- size: {
39
- "...size": import_getShapeSize.getShapeSize,
40
- ":number": import_getShapeSize.getShapeSize
41
- }
42
- }
43
- }, {
44
- memo: true
45
- });
29
+ var Square = (0, import_web.styled)(import_stacks.YStack, {
30
+ displayName: "Square",
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ variants: {
34
+ size: import_getShapeSize.getShapeSize,
35
+ circular: { true: { borderRadius: 1e5 } },
36
+ transparent: { true: { backgroundColor: "transparent" } }
37
+ }
38
+ }, { memo: true });
39
+
46
40
  //# sourceMappingURL=Square.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Square_exports"],"sources":["../../src/Square.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAET,IAAAA,SAAS,GAAAC,MAAA,CAAcC,cAAA;AAEvB,IAAAC,gBAAS,GAAAF,MAAoB,CAAAG,wBAAA;AAEtB,IAAAC,iBAAe,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IACpBC,YAAA,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACE,IAAMC,IAAA,IAAAD,GAAA,EACNZ,SAAA,CAAAW,MAAY,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACI,IAEhBC,WAAU,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACRF,IAAA,IAAM,OAAAA,IAAA,wBAAAA,IAAA;IAAA,KACJ,IAAAG,GAAA,IAAWhB,iBAAA,CAAAa,IAAA,OACX,CAAAX,YAAW,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACbnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAAA;EAEJ,OAAAE,EAAA;AAAA;AACA,IACEM,YAAM,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IACRE,cAAA;AACFhB,QAAA,CAAAgB,cAAA","ignoreList":[]}
1
+ {"version":3,"file":"Square.native.js","names":[],"sources":["jsx/Square.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Square_exports = {};\n__export(Square_exports, {\n Square: () => Square\n});\nmodule.exports = __toCommonJS(Square_exports);\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_web = require(\"@tamagui/web\");\nvar import_getShapeSize = require(\"./getShapeSize\");\nvar Square = (0, import_web.styled)(import_stacks.YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: import_getShapeSize.getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n}, {\n memo: true\n});\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,UAAU,GAAG,WAAW,OAAM,CAAE,cAAc,QAAQ;CACxD,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM,oBAAoB;EAE1B,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GAAG,EACD,MAAM,KACR,CAAC"}
@@ -1,16 +1,20 @@
1
- const getShapeSize = (size, {
2
- tokens
3
- }) => {
4
- const width = tokens.size[size] ?? size;
5
- const height = tokens.size[size] ?? size;
6
- return {
7
- width,
8
- height,
9
- minWidth: width,
10
- maxWidth: width,
11
- maxHeight: height,
12
- minHeight: height
13
- };
14
- };
1
+ import { resolveSize } from "@tamagui/size";
2
+ import { styled } from "@tamagui/web";
3
+
4
+ const getShapeSize = styled.dynamic((size, env) => {
5
+ const key = typeof size === "string" ? size.replace(/^\$/, "") : size;
6
+ const resolved = typeof key === "number" ? key : env.tokens.size[key] ?? resolveSize(size, env).controlHeight;
7
+ const width = resolved;
8
+ const height = resolved;
9
+ return {
10
+ width,
11
+ height,
12
+ minWidth: width,
13
+ maxWidth: width,
14
+ maxHeight: height,
15
+ minHeight: height
16
+ };
17
+ });
18
+
15
19
  export { getShapeSize };
16
20
  //# sourceMappingURL=getShapeSize.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["getShapeSize","size","tokens","width","height","minWidth","maxWidth","maxHeight","minHeight"],"sources":["../../src/getShapeSize.tsx"],"sourcesContent":[null],"mappings":"AAGO,MAAMA,YAAA,GAA6DA,CACxEC,IAAA,EACA;EAAEC;AAAO,MACN;EACH,MAAMC,KAAA,GAAQD,MAAA,CAAOD,IAAA,CAAKA,IAAI,KAAKA,IAAA;EACnC,MAAMG,MAAA,GAASF,MAAA,CAAOD,IAAA,CAAKA,IAAI,KAAKA,IAAA;EACpC,OAAO;IACLE,KAAA;IACAC,MAAA;IACAC,QAAA,EAAUF,KAAA;IACVG,QAAA,EAAUH,KAAA;IACVI,SAAA,EAAWH,MAAA;IACXI,SAAA,EAAWJ;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"getShapeSize.js","names":[],"sources":["jsx/getShapeSize.js"],"sourcesContent":["import { resolveSize } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nconst getShapeSize = styled.dynamic((size, env) => {\n const key = typeof size === \"string\" ? size.replace(/^\\$/, \"\") : size;\n const resolved = typeof key === \"number\" ? key : env.tokens.size[key] ?? resolveSize(size, env).controlHeight;\n const width = resolved;\n const height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SAAS,MAAM,QAAQ;CACjD,MAAM,MAAM,OAAO,SAAS,WAAW,KAAK,QAAQ,OAAO,EAAE,IAAI;CACjE,MAAM,WAAW,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO,KAAK,QAAQ,YAAY,MAAM,GAAG,CAAC,CAAC;CAChG,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}