@tamagui/shapes 2.7.7 → 3.0.0-beta.637.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.
- package/dist/cjs/Circle.cjs +17 -20
- package/dist/cjs/Circle.native.cjs +32 -0
- package/dist/cjs/Circle.native.js +17 -19
- package/dist/cjs/Circle.native.js.map +1 -1
- package/dist/cjs/Square.cjs +27 -30
- package/dist/cjs/Square.native.cjs +42 -0
- package/dist/cjs/Square.native.js +28 -30
- package/dist/cjs/Square.native.js.map +1 -1
- package/dist/cjs/getShapeSize.cjs +29 -31
- package/dist/cjs/getShapeSize.native.cjs +43 -0
- package/dist/cjs/getShapeSize.native.js +31 -33
- package/dist/cjs/getShapeSize.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +23 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Circle.mjs +4 -2
- package/dist/esm/Circle.mjs.map +1 -1
- package/dist/esm/Circle.native.js +4 -2
- package/dist/esm/Circle.native.js.map +1 -1
- package/dist/esm/Square.mjs +16 -14
- package/dist/esm/Square.mjs.map +1 -1
- package/dist/esm/Square.native.js +16 -14
- package/dist/esm/Square.native.js.map +1 -1
- package/dist/esm/getShapeSize.mjs +16 -13
- package/dist/esm/getShapeSize.mjs.map +1 -1
- package/dist/esm/getShapeSize.native.js +18 -16
- package/dist/esm/getShapeSize.native.js.map +1 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.mjs +5 -4
- package/dist/esm/index.native.js +5 -4
- package/dist/jsx/Circle.mjs +4 -2
- package/dist/jsx/Circle.mjs.map +1 -1
- package/dist/jsx/Circle.native.cjs +32 -0
- package/dist/jsx/Circle.native.js +17 -19
- package/dist/jsx/Circle.native.js.map +1 -1
- package/dist/jsx/Square.mjs +16 -14
- package/dist/jsx/Square.mjs.map +1 -1
- package/dist/jsx/Square.native.cjs +42 -0
- package/dist/jsx/Square.native.js +28 -30
- package/dist/jsx/Square.native.js.map +1 -1
- package/dist/jsx/getShapeSize.mjs +16 -13
- package/dist/jsx/getShapeSize.mjs.map +1 -1
- package/dist/jsx/getShapeSize.native.cjs +43 -0
- package/dist/jsx/getShapeSize.native.js +31 -33
- package/dist/jsx/getShapeSize.native.js.map +1 -1
- package/dist/jsx/index.js +5 -4
- package/dist/jsx/index.mjs +5 -4
- package/dist/jsx/index.native.cjs +23 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +5 -4
- package/src/Circle.tsx +1 -1
- package/src/Square.tsx +18 -5
- package/src/getShapeSize.tsx +12 -4
- package/types/Circle.d.ts +22 -8
- package/types/Circle.d.ts.map +1 -1
- package/types/Square.d.ts +22 -8
- package/types/Square.d.ts.map +1 -1
- package/types/getShapeSize.d.ts +2 -2
- package/types/getShapeSize.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { resolveSizeToken } from "@tamagui/size";
|
|
2
|
+
|
|
3
|
+
const getShapeSize = (size, { tokens }) => {
|
|
4
|
+
const sizeToken = resolveSizeToken(size, "size");
|
|
5
|
+
const resolved = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;
|
|
6
|
+
const width = resolved;
|
|
7
|
+
const height = resolved;
|
|
8
|
+
return {
|
|
9
|
+
width,
|
|
10
|
+
height,
|
|
11
|
+
minWidth: width,
|
|
12
|
+
maxWidth: width,
|
|
13
|
+
maxHeight: height,
|
|
14
|
+
minHeight: height
|
|
15
|
+
};
|
|
14
16
|
};
|
|
17
|
+
|
|
15
18
|
export { getShapeSize };
|
|
16
19
|
//# sourceMappingURL=getShapeSize.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getShapeSize.js","names":[],"sources":["jsx/getShapeSize.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nconst getShapeSize = (size, { tokens }) => {\n const sizeToken = resolveSizeToken(size, \"size\");\n const resolved = typeof sizeToken === \"number\" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;\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":";;;AACA,MAAM,gBAAgB,MAAM,EAAE,aAAa;CACzC,MAAM,YAAY,iBAAiB,MAAM,MAAM;CAC/C,MAAM,WAAW,OAAO,cAAc,WAAW,YAAY,OAAO,KAAK,cAAc;CACvF,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var getShapeSize_exports = {};
|
|
25
|
+
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
26
|
+
module.exports = __toCommonJS(getShapeSize_exports);
|
|
27
|
+
var import_size = require("@tamagui/size");
|
|
28
|
+
var getShapeSize = function(size, param) {
|
|
29
|
+
var { tokens } = param;
|
|
30
|
+
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
31
|
+
var _tokens_size_sizeToken;
|
|
32
|
+
var resolved = typeof sizeToken === "number" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;
|
|
33
|
+
var width = resolved;
|
|
34
|
+
var height = resolved;
|
|
35
|
+
return {
|
|
36
|
+
width,
|
|
37
|
+
height,
|
|
38
|
+
minWidth: width,
|
|
39
|
+
maxWidth: width,
|
|
40
|
+
maxHeight: height,
|
|
41
|
+
minHeight: height
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -1,47 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var getShapeSize_exports = {};
|
|
26
|
-
__export(getShapeSize_exports, {
|
|
27
|
-
getShapeSize: () => getShapeSize
|
|
28
|
-
});
|
|
25
|
+
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
29
26
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
var import_size = require("@tamagui/size");
|
|
28
|
+
var getShapeSize = function(size, param) {
|
|
29
|
+
var { tokens } = param;
|
|
30
|
+
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
31
|
+
var _tokens_size_sizeToken;
|
|
32
|
+
var resolved = typeof sizeToken === "number" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;
|
|
33
|
+
var width = resolved;
|
|
34
|
+
var height = resolved;
|
|
35
|
+
return {
|
|
36
|
+
width,
|
|
37
|
+
height,
|
|
38
|
+
minWidth: width,
|
|
39
|
+
maxWidth: width,
|
|
40
|
+
maxHeight: height,
|
|
41
|
+
minHeight: height
|
|
42
|
+
};
|
|
46
43
|
};
|
|
44
|
+
|
|
47
45
|
//# sourceMappingURL=getShapeSize.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["jsx/getShapeSize.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 getShapeSize_exports = {};\n__export(getShapeSize_exports, {\n getShapeSize: () => getShapeSize\n});\nmodule.exports = __toCommonJS(getShapeSize_exports);\nvar import_size = require(\"@tamagui/size\");\nvar getShapeSize = function(size, param) {\n var { tokens } = param;\n var sizeToken = (0, import_size.resolveSizeToken)(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\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};\n//# sourceMappingURL=getShapeSize.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,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,SAAS,MAAM,OAAO;CACvC,IAAI,EAAE,WAAW;CACjB,IAAI,aAAa,GAAG,YAAY,kBAAkB,MAAM,MAAM;CAC9D,IAAI;CACJ,IAAI,WAAW,OAAO,cAAc,WAAW,aAAa,yBAAyB,OAAO,KAAK,gBAAgB,QAAQ,2BAA2B,KAAK,IAAI,yBAAyB;CACtL,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF"}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./Square.mjs"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
1
|
+
export * from "./Square.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./Circle.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./getShapeSize.mjs"
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./Square.mjs"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
1
|
+
export * from "./Square.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./Circle.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./getShapeSize.mjs"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./Square.native.js"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./Circle.native.js"), module.exports);
|
|
23
|
+
__reExport(index_exports, require("./getShapeSize.native.js"), module.exports);
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
15
16
|
};
|
|
16
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var index_exports = {};
|
|
21
20
|
module.exports = __toCommonJS(index_exports);
|
|
22
21
|
__reExport(index_exports, require("./Square.native.js"), module.exports);
|
|
23
22
|
__reExport(index_exports, require("./Circle.native.js"), module.exports);
|
|
24
23
|
__reExport(index_exports, require("./getShapeSize.native.js"), module.exports);
|
|
24
|
+
|
|
25
25
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/shapes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.637.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,11 +34,12 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/
|
|
38
|
-
"@tamagui/
|
|
37
|
+
"@tamagui/size": "3.0.0-beta.637.1",
|
|
38
|
+
"@tamagui/stacks": "3.0.0-beta.637.1",
|
|
39
|
+
"@tamagui/web": "3.0.0-beta.637.1"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "
|
|
42
|
+
"@tamagui/build": "3.0.0-beta.637.1",
|
|
42
43
|
"react": ">=19"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
package/src/Circle.tsx
CHANGED
package/src/Square.tsx
CHANGED
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { YStack } from '@tamagui/stacks'
|
|
2
2
|
import type { GetProps } from '@tamagui/web'
|
|
3
3
|
import { styled } from '@tamagui/web'
|
|
4
4
|
|
|
5
5
|
import { getShapeSize } from './getShapeSize'
|
|
6
6
|
|
|
7
7
|
export const Square = styled(
|
|
8
|
-
|
|
8
|
+
YStack,
|
|
9
9
|
{
|
|
10
|
-
|
|
10
|
+
displayName: 'Square',
|
|
11
11
|
alignItems: 'center',
|
|
12
12
|
justifyContent: 'center',
|
|
13
13
|
|
|
14
14
|
variants: {
|
|
15
15
|
size: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
number: getShapeSize,
|
|
17
|
+
Size: getShapeSize,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
// shape modifiers formerly inherited from ThemeableStack (now removed).
|
|
21
|
+
circular: {
|
|
22
|
+
true: {
|
|
23
|
+
borderRadius: 100_000,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
transparent: {
|
|
28
|
+
true: {
|
|
29
|
+
backgroundColor: 'transparent',
|
|
30
|
+
},
|
|
18
31
|
},
|
|
19
32
|
} as const,
|
|
20
33
|
},
|
package/src/getShapeSize.tsx
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { YStackProps } from '@tamagui/stacks'
|
|
2
|
+
import { resolveSizeToken } from '@tamagui/size'
|
|
2
3
|
import type { SizeVariantSpreadFunction } from '@tamagui/web'
|
|
3
4
|
|
|
4
|
-
export const getShapeSize: SizeVariantSpreadFunction<
|
|
5
|
+
export const getShapeSize: SizeVariantSpreadFunction<YStackProps> = (
|
|
5
6
|
size,
|
|
6
7
|
{ tokens }
|
|
7
8
|
) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
9
|
+
const sizeToken = resolveSizeToken(size, 'size')
|
|
10
|
+
// a numeric size is a literal pixel value, never a token index. the size
|
|
11
|
+
// scale is keyed by numeric-looking strings ('60'), so indexing it with a
|
|
12
|
+
// number silently turns <Square size={60} /> into that token's value.
|
|
13
|
+
// resolveTokenSize in @tamagui/size draws the same line.
|
|
14
|
+
const resolved =
|
|
15
|
+
typeof sizeToken === 'number' ? sizeToken : (tokens.size[sizeToken] ?? sizeToken)
|
|
16
|
+
const width = resolved
|
|
17
|
+
const height = resolved
|
|
10
18
|
return {
|
|
11
19
|
width,
|
|
12
20
|
height,
|
package/types/Circle.d.ts
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import type { GetProps } from '@tamagui/web';
|
|
2
|
-
export declare const Circle: import("
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const Circle: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
3
|
+
circular?: boolean | undefined;
|
|
4
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
5
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
5
6
|
transparent?: boolean | undefined;
|
|
6
|
-
|
|
7
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & {
|
|
8
|
+
ref?: import("react").Ref<import("@tamagui/web").TamaguiElement> | undefined;
|
|
9
|
+
}> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
7
10
|
circular?: boolean | undefined;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
12
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
13
|
+
transparent?: boolean | undefined;
|
|
11
14
|
}, import("@tamagui/web").StaticConfigPublic & {
|
|
12
15
|
memo: true;
|
|
13
|
-
}
|
|
16
|
+
}> & Omit<import("@tamagui/web").StaticConfigPublic & {
|
|
17
|
+
memo: true;
|
|
18
|
+
}, "staticConfig"> & {
|
|
19
|
+
__tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
20
|
+
circular?: boolean | undefined;
|
|
21
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
22
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
23
|
+
transparent?: boolean | undefined;
|
|
24
|
+
}, import("@tamagui/web").StaticConfigPublic & {
|
|
25
|
+
memo: true;
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
14
28
|
export type CircleProps = GetProps<typeof Circle>;
|
|
15
29
|
//# sourceMappingURL=Circle.d.ts.map
|
package/types/Circle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../src/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../src/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CAGjB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA"}
|
package/types/Square.d.ts
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import type { GetProps } from '@tamagui/web';
|
|
2
|
-
export declare const Square: import("
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const Square: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
3
|
+
circular?: boolean | undefined;
|
|
4
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
5
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
5
6
|
transparent?: boolean | undefined;
|
|
6
|
-
|
|
7
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & {
|
|
8
|
+
ref?: import("react").Ref<import("@tamagui/web").TamaguiElement> | undefined;
|
|
9
|
+
}> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
7
10
|
circular?: boolean | undefined;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
12
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
13
|
+
transparent?: boolean | undefined;
|
|
11
14
|
}, import("@tamagui/web").StaticConfigPublic & {
|
|
12
15
|
memo: true;
|
|
13
|
-
}
|
|
16
|
+
}> & Omit<import("@tamagui/web").StaticConfigPublic & {
|
|
17
|
+
memo: true;
|
|
18
|
+
}, "staticConfig"> & {
|
|
19
|
+
__tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
20
|
+
circular?: boolean | undefined;
|
|
21
|
+
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
22
|
+
size?: number | import("@tamagui/web").Size | undefined;
|
|
23
|
+
transparent?: boolean | undefined;
|
|
24
|
+
}, import("@tamagui/web").StaticConfigPublic & {
|
|
25
|
+
memo: true;
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
14
28
|
export type SquareProps = GetProps<typeof Square>;
|
|
15
29
|
//# sourceMappingURL=Square.d.ts.map
|
package/types/Square.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.d.ts","sourceRoot":"","sources":["../src/Square.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"Square.d.ts","sourceRoot":"","sources":["../src/Square.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CA8BlB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA"}
|
package/types/getShapeSize.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { YStackProps } from '@tamagui/stacks';
|
|
2
2
|
import type { SizeVariantSpreadFunction } from '@tamagui/web';
|
|
3
|
-
export declare const getShapeSize: SizeVariantSpreadFunction<
|
|
3
|
+
export declare const getShapeSize: SizeVariantSpreadFunction<YStackProps>;
|
|
4
4
|
//# sourceMappingURL=getShapeSize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.d.ts","sourceRoot":"","sources":["../src/getShapeSize.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"getShapeSize.d.ts","sourceRoot":"","sources":["../src/getShapeSize.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAE7D,eAAO,MAAM,YAAY,EAAE,yBAAyB,CAAC,WAAW,CAqB/D,CAAA"}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/jsx/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/jsx/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|