@tamagui/get-font-sized 3.0.0-beta.831.1 → 3.0.0-beta.889.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.
@@ -24,55 +24,40 @@ __export(index_exports, {
24
24
  getFontSized: () => getFontSized
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
- var import_constants = require("@tamagui/constants");
28
27
  var import_size = require("@tamagui/size");
29
28
  var import_web = require("@tamagui/web");
30
- const getFontSized = (sizeTokenIn = true, { font, fontFamily, props }) => {
29
+ const getFontSized = import_web.styled.dynamic((sizeTokenIn = true, { font, fontFamily }) => {
31
30
  if (!font) {
32
31
  return { fontSize: sizeTokenIn };
33
32
  }
34
33
  const sizeToken = (0, import_size.resolveSizeToken)(sizeTokenIn, "fontSize");
35
- const style = {};
36
34
  if (typeof sizeToken === "number") {
37
- style.fontSize = sizeToken;
38
- if (fontFamily) style.fontFamily = fontFamily;
39
- if (props.fontStyle) style.fontStyle = props.fontStyle;
40
- if (props.color) style.color = props.color;
41
- return style;
35
+ return {
36
+ fontSize: sizeToken,
37
+ fontFamily
38
+ };
42
39
  }
43
40
  const fontSize = font.size[sizeToken];
44
41
  const lineHeight = font.lineHeight?.[sizeToken];
45
42
  const fontWeight = font.weight?.[sizeToken];
46
43
  const letterSpacing = font.letterSpacing?.[sizeToken];
47
44
  const textTransform = font.transform?.[sizeToken];
48
- const fontStyle = props.fontStyle ?? font.style?.[sizeToken];
49
- const color = props.color ?? font.color?.[sizeToken];
50
- if (fontStyle) style.fontStyle = fontStyle;
51
- if (textTransform) style.textTransform = textTransform;
52
- if (fontFamily) style.fontFamily = fontFamily;
53
- if (fontWeight) style.fontWeight = fontWeight;
54
- if (letterSpacing) style.letterSpacing = letterSpacing;
55
- if (fontSize) style.fontSize = fontSize;
56
- if (lineHeight) style.lineHeight = lineHeight;
57
- if (color) style.color = color;
58
- if (process.env.NODE_ENV === "development") {
59
- if (props["debug"] && props["debug"] === "verbose") {
60
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
61
- if (import_constants.isClient) {
62
- console.info({
63
- style,
64
- props,
65
- font
66
- });
67
- }
68
- console.groupEnd();
69
- }
70
- }
71
- return style;
72
- };
45
+ const fontStyle = font.style?.[sizeToken];
46
+ const color = font.color?.[sizeToken];
47
+ return {
48
+ color,
49
+ fontFamily,
50
+ fontSize,
51
+ fontStyle,
52
+ fontWeight,
53
+ letterSpacing,
54
+ lineHeight,
55
+ textTransform
56
+ };
57
+ });
73
58
  const SizableText = (0, import_web.styled)(import_web.Text, {
74
59
  displayName: "SizableText",
75
60
  fontFamily: "body",
76
- variants: { size: { FontSize: getFontSized } },
61
+ variants: { size: getFontSized },
77
62
  defaultVariants: { size: true }
78
63
  });
@@ -26,59 +26,42 @@ __export(index_exports, {
26
26
  getFontSized: () => getFontSized
27
27
  });
28
28
  module.exports = __toCommonJS(index_exports);
29
- var import_constants = require("@tamagui/constants");
30
29
  var import_size = require("@tamagui/size");
31
30
  var import_web = require("@tamagui/web");
32
- var getFontSized = function() {
33
- var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0;
31
+ var getFontSized = import_web.styled.dynamic(function() {
32
+ var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily } = arguments.length > 1 ? arguments[1] : void 0;
34
33
  var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
35
34
  if (!font) {
36
35
  return { fontSize: sizeTokenIn };
37
36
  }
38
37
  var sizeToken = (0, import_size.resolveSizeToken)(sizeTokenIn, "fontSize");
39
- var style = {};
40
38
  if (typeof sizeToken === "number") {
41
- style.fontSize = sizeToken;
42
- if (fontFamily) style.fontFamily = fontFamily;
43
- if (props.fontStyle) style.fontStyle = props.fontStyle;
44
- if (props.color) style.color = props.color;
45
- return style;
39
+ return {
40
+ fontSize: sizeToken,
41
+ fontFamily
42
+ };
46
43
  }
47
44
  var fontSize = font.size[sizeToken];
48
45
  var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];
49
46
  var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];
50
47
  var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];
51
48
  var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];
52
- var _props_fontStyle;
53
- var fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
54
- var _props_color;
55
- var color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
56
- if (fontStyle) style.fontStyle = fontStyle;
57
- if (textTransform) style.textTransform = textTransform;
58
- if (fontFamily) style.fontFamily = fontFamily;
59
- if (fontWeight) style.fontWeight = fontWeight;
60
- if (letterSpacing) style.letterSpacing = letterSpacing;
61
- if (fontSize) style.fontSize = fontSize;
62
- if (lineHeight) style.lineHeight = lineHeight;
63
- if (color) style.color = color;
64
- if (process.env.NODE_ENV === "development") {
65
- if (props["debug"] && props["debug"] === "verbose") {
66
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
67
- if (import_constants.isClient) {
68
- console.info({
69
- style,
70
- props,
71
- font
72
- });
73
- }
74
- console.groupEnd();
75
- }
76
- }
77
- return style;
78
- };
49
+ var fontStyle = (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
50
+ var color = (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
51
+ return {
52
+ color,
53
+ fontFamily,
54
+ fontSize,
55
+ fontStyle,
56
+ fontWeight,
57
+ letterSpacing,
58
+ lineHeight,
59
+ textTransform
60
+ };
61
+ });
79
62
  var SizableText = (0, import_web.styled)(import_web.Text, {
80
63
  displayName: "SizableText",
81
64
  fontFamily: "body",
82
- variants: { size: { FontSize: getFontSized } },
65
+ variants: { size: getFontSized },
83
66
  defaultVariants: { size: true }
84
67
  });
@@ -26,60 +26,43 @@ __export(index_exports, {
26
26
  getFontSized: () => getFontSized
27
27
  });
28
28
  module.exports = __toCommonJS(index_exports);
29
- var import_constants = require("@tamagui/constants");
30
29
  var import_size = require("@tamagui/size");
31
30
  var import_web = require("@tamagui/web");
32
- var getFontSized = function() {
33
- var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0;
31
+ var getFontSized = import_web.styled.dynamic(function() {
32
+ var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily } = arguments.length > 1 ? arguments[1] : void 0;
34
33
  var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
35
34
  if (!font) {
36
35
  return { fontSize: sizeTokenIn };
37
36
  }
38
37
  var sizeToken = (0, import_size.resolveSizeToken)(sizeTokenIn, "fontSize");
39
- var style = {};
40
38
  if (typeof sizeToken === "number") {
41
- style.fontSize = sizeToken;
42
- if (fontFamily) style.fontFamily = fontFamily;
43
- if (props.fontStyle) style.fontStyle = props.fontStyle;
44
- if (props.color) style.color = props.color;
45
- return style;
39
+ return {
40
+ fontSize: sizeToken,
41
+ fontFamily
42
+ };
46
43
  }
47
44
  var fontSize = font.size[sizeToken];
48
45
  var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];
49
46
  var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];
50
47
  var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];
51
48
  var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];
52
- var _props_fontStyle;
53
- var fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
54
- var _props_color;
55
- var color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
56
- if (fontStyle) style.fontStyle = fontStyle;
57
- if (textTransform) style.textTransform = textTransform;
58
- if (fontFamily) style.fontFamily = fontFamily;
59
- if (fontWeight) style.fontWeight = fontWeight;
60
- if (letterSpacing) style.letterSpacing = letterSpacing;
61
- if (fontSize) style.fontSize = fontSize;
62
- if (lineHeight) style.lineHeight = lineHeight;
63
- if (color) style.color = color;
64
- if (process.env.NODE_ENV === "development") {
65
- if (props["debug"] && props["debug"] === "verbose") {
66
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
67
- if (import_constants.isClient) {
68
- console.info({
69
- style,
70
- props,
71
- font
72
- });
73
- }
74
- console.groupEnd();
75
- }
76
- }
77
- return style;
78
- };
49
+ var fontStyle = (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
50
+ var color = (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
51
+ return {
52
+ color,
53
+ fontFamily,
54
+ fontSize,
55
+ fontStyle,
56
+ fontWeight,
57
+ letterSpacing,
58
+ lineHeight,
59
+ textTransform
60
+ };
61
+ });
79
62
  var SizableText = (0, import_web.styled)(import_web.Text, {
80
63
  displayName: "SizableText",
81
64
  fontFamily: "body",
82
- variants: { size: { FontSize: getFontSized } },
65
+ variants: { size: getFontSized },
83
66
  defaultVariants: { size: true }
84
67
  });
85
68
 
@@ -1 +1 @@
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 __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 index_exports = {};\n__export(index_exports, {\n SizableText: () => SizableText,\n getFontSized: () => getFontSized\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_size = require(\"@tamagui/size\");\nvar import_web = require(\"@tamagui/web\");\nvar getFontSized = function() {\n var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0;\n var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n var sizeToken = (0, import_size.resolveSizeToken)(sizeTokenIn, \"fontSize\");\n var style = {};\n if (typeof sizeToken === \"number\") {\n style.fontSize = sizeToken;\n if (fontFamily) style.fontFamily = fontFamily;\n if (props.fontStyle) style.fontStyle = props.fontStyle;\n if (props.color) style.color = props.color;\n return style;\n }\n var fontSize = font.size[sizeToken];\n var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];\n var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];\n var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];\n var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];\n var _props_fontStyle;\n var fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];\n var _props_color;\n var color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];\n if (fontStyle) style.fontStyle = fontStyle;\n if (textTransform) style.textTransform = textTransform;\n if (fontFamily) style.fontFamily = fontFamily;\n if (fontWeight) style.fontWeight = fontWeight;\n if (letterSpacing) style.letterSpacing = letterSpacing;\n if (fontSize) style.fontSize = fontSize;\n if (lineHeight) style.lineHeight = lineHeight;\n if (color) style.color = color;\n if (process.env.NODE_ENV === \"development\") {\n if (props[\"debug\"] && props[\"debug\"] === \"verbose\") {\n console.groupCollapsed(\" \\u{1F539} getFontSized\", sizeTokenIn, sizeToken);\n if (import_constants.isClient) {\n console.info({\n style,\n props,\n font\n });\n }\n console.groupEnd();\n }\n }\n return style;\n};\nvar SizableText = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: {\n FontSize: getFontSized\n }\n },\n defaultVariants: {\n size: true\n }\n});\n//# sourceMappingURL=index.js.map\n"],"mappings":"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"}
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 __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 index_exports = {};\n__export(index_exports, {\n SizableText: () => SizableText,\n getFontSized: () => getFontSized\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_size = require(\"@tamagui/size\");\nvar import_web = require(\"@tamagui/web\");\nvar getFontSized = import_web.styled.dynamic(function() {\n var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily } = arguments.length > 1 ? arguments[1] : void 0;\n var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n var sizeToken = (0, import_size.resolveSizeToken)(sizeTokenIn, \"fontSize\");\n if (typeof sizeToken === \"number\") {\n return {\n fontSize: sizeToken,\n fontFamily\n };\n }\n var fontSize = font.size[sizeToken];\n var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];\n var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];\n var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];\n var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];\n var fontStyle = (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];\n var color = (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];\n return {\n color,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n letterSpacing,\n lineHeight,\n textTransform\n };\n});\nvar SizableText = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: getFontSized\n },\n defaultVariants: {\n size: true\n }\n});\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,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,gBAAgB,CAAC;AACrB,SAAS,eAAe;CACtB,mBAAmB;CACnB,oBAAoB;AACtB,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,WAAW,OAAO,QAAQ,WAAW;CACtD,IAAI,cAAc,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,MAAM,EAAE,MAAM,eAAe,UAAU,SAAS,IAAI,UAAU,KAAK,KAAK;CAC3J,IAAI,kBAAkB,cAAc,qBAAqB,iBAAiB,aAAa;CACvF,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,IAAI,aAAa,GAAG,YAAY,iBAAgB,CAAE,aAAa,UAAU;CACzE,IAAI,OAAO,cAAc,UAAU;EACjC,OAAO;GACL,UAAU;GACV;EACF;CACF;CACA,IAAI,WAAW,KAAK,KAAK;CACzB,IAAI,cAAc,mBAAmB,KAAK,gBAAgB,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB;CAC1H,IAAI,cAAc,eAAe,KAAK,YAAY,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;CAC1G,IAAI,iBAAiB,sBAAsB,KAAK,mBAAmB,QAAQ,wBAAwB,KAAK,IAAI,KAAK,IAAI,oBAAoB;CACzI,IAAI,iBAAiB,kBAAkB,KAAK,eAAe,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB;CACzH,IAAI,aAAa,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACrG,IAAI,SAAS,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACjG,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC;AACD,IAAI,eAAe,GAAG,WAAW,OAAM,CAAE,WAAW,MAAM;CACxD,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,aACR;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,54 +1,39 @@
1
- import { isClient } from "@tamagui/constants";
2
1
  import { resolveSizeToken } from "@tamagui/size";
3
2
  import { Text, styled } from "@tamagui/web";
4
3
 
5
- const getFontSized = (sizeTokenIn = true, { font, fontFamily, props }) => {
4
+ const getFontSized = styled.dynamic((sizeTokenIn = true, { font, fontFamily }) => {
6
5
  if (!font) {
7
6
  return { fontSize: sizeTokenIn };
8
7
  }
9
8
  const sizeToken = resolveSizeToken(sizeTokenIn, "fontSize");
10
- const style = {};
11
9
  if (typeof sizeToken === "number") {
12
- style.fontSize = sizeToken;
13
- if (fontFamily) style.fontFamily = fontFamily;
14
- if (props.fontStyle) style.fontStyle = props.fontStyle;
15
- if (props.color) style.color = props.color;
16
- return style;
10
+ return {
11
+ fontSize: sizeToken,
12
+ fontFamily
13
+ };
17
14
  }
18
15
  const fontSize = font.size[sizeToken];
19
16
  const lineHeight = font.lineHeight?.[sizeToken];
20
17
  const fontWeight = font.weight?.[sizeToken];
21
18
  const letterSpacing = font.letterSpacing?.[sizeToken];
22
19
  const textTransform = font.transform?.[sizeToken];
23
- const fontStyle = props.fontStyle ?? font.style?.[sizeToken];
24
- const color = props.color ?? font.color?.[sizeToken];
25
- if (fontStyle) style.fontStyle = fontStyle;
26
- if (textTransform) style.textTransform = textTransform;
27
- if (fontFamily) style.fontFamily = fontFamily;
28
- if (fontWeight) style.fontWeight = fontWeight;
29
- if (letterSpacing) style.letterSpacing = letterSpacing;
30
- if (fontSize) style.fontSize = fontSize;
31
- if (lineHeight) style.lineHeight = lineHeight;
32
- if (color) style.color = color;
33
- if (process.env.NODE_ENV === "development") {
34
- if (props["debug"] && props["debug"] === "verbose") {
35
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
36
- if (isClient) {
37
- console.info({
38
- style,
39
- props,
40
- font
41
- });
42
- }
43
- console.groupEnd();
44
- }
45
- }
46
- return style;
47
- };
20
+ const fontStyle = font.style?.[sizeToken];
21
+ const color = font.color?.[sizeToken];
22
+ return {
23
+ color,
24
+ fontFamily,
25
+ fontSize,
26
+ fontStyle,
27
+ fontWeight,
28
+ letterSpacing,
29
+ lineHeight,
30
+ textTransform
31
+ };
32
+ });
48
33
  const SizableText = styled(Text, {
49
34
  displayName: "SizableText",
50
35
  fontFamily: "body",
51
- variants: { size: { FontSize: getFontSized } },
36
+ variants: { size: getFontSized },
52
37
  defaultVariants: { size: true }
53
38
  });
54
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { isClient } from \"@tamagui/constants\";\nimport { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nconst getFontSized = (sizeTokenIn = true, { font, fontFamily, props }) => {\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n const sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n const style = {};\n if (typeof sizeToken === \"number\") {\n style.fontSize = sizeToken;\n if (fontFamily) style.fontFamily = fontFamily;\n if (props.fontStyle) style.fontStyle = props.fontStyle;\n if (props.color) style.color = props.color;\n return style;\n }\n const fontSize = font.size[sizeToken];\n const lineHeight = font.lineHeight?.[sizeToken];\n const fontWeight = font.weight?.[sizeToken];\n const letterSpacing = font.letterSpacing?.[sizeToken];\n const textTransform = font.transform?.[sizeToken];\n const fontStyle = props.fontStyle ?? font.style?.[sizeToken];\n const color = props.color ?? font.color?.[sizeToken];\n if (fontStyle) style.fontStyle = fontStyle;\n if (textTransform) style.textTransform = textTransform;\n if (fontFamily) style.fontFamily = fontFamily;\n if (fontWeight) style.fontWeight = fontWeight;\n if (letterSpacing) style.letterSpacing = letterSpacing;\n if (fontSize) style.fontSize = fontSize;\n if (lineHeight) style.lineHeight = lineHeight;\n if (color) style.color = color;\n if (process.env.NODE_ENV === \"development\") {\n if (props[\"debug\"] && props[\"debug\"] === \"verbose\") {\n console.groupCollapsed(\" \\u{1F539} getFontSized\", sizeTokenIn, sizeToken);\n if (isClient) {\n console.info({ style, props, font });\n }\n console.groupEnd();\n }\n }\n return style;\n};\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: {\n FontSize: getFontSized\n }\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB,cAAc,MAAM,EAAE,MAAM,YAAY,YAAY;CACxE,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,MAAM,YAAY,iBAAiB,aAAa,UAAU;CAC1D,MAAM,QAAQ,CAAC;CACf,IAAI,OAAO,cAAc,UAAU;EACjC,MAAM,WAAW;EACjB,IAAI,YAAY,MAAM,aAAa;EACnC,IAAI,MAAM,WAAW,MAAM,YAAY,MAAM;EAC7C,IAAI,MAAM,OAAO,MAAM,QAAQ,MAAM;EACrC,OAAO;CACT;CACA,MAAM,WAAW,KAAK,KAAK;CAC3B,MAAM,aAAa,KAAK,aAAa;CACrC,MAAM,aAAa,KAAK,SAAS;CACjC,MAAM,gBAAgB,KAAK,gBAAgB;CAC3C,MAAM,gBAAgB,KAAK,YAAY;CACvC,MAAM,YAAY,MAAM,aAAa,KAAK,QAAQ;CAClD,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,UAAU,MAAM,WAAW;CAC/B,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,OAAO,MAAM,QAAQ;CACzB,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,IAAI,MAAM,YAAY,MAAM,aAAa,WAAW;GAClD,QAAQ,eAAe,qBAA4B,aAAa,SAAS;GACzE,IAAI,UAAU;IACZ,QAAQ,KAAK;KAAE;KAAO;KAAO;IAAK,CAAC;GACrC;GACA,QAAQ,SAAS;EACnB;CACF;CACA,OAAO;AACT;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,EACJ,UAAU,aACZ,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nconst getFontSized = styled.dynamic(\n (sizeTokenIn = true, { font, fontFamily }) => {\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n const sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n if (typeof sizeToken === \"number\") {\n return {\n fontSize: sizeToken,\n fontFamily\n };\n }\n const fontSize = font.size[sizeToken];\n const lineHeight = font.lineHeight?.[sizeToken];\n const fontWeight = font.weight?.[sizeToken];\n const letterSpacing = font.letterSpacing?.[sizeToken];\n const textTransform = font.transform?.[sizeToken];\n const fontStyle = font.style?.[sizeToken];\n const color = font.color?.[sizeToken];\n return {\n color,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n letterSpacing,\n lineHeight,\n textTransform\n };\n }\n);\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: getFontSized\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SACzB,cAAc,MAAM,EAAE,MAAM,iBAAiB;CAC5C,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,MAAM,YAAY,iBAAiB,aAAa,UAAU;CAC1D,IAAI,OAAO,cAAc,UAAU;EACjC,OAAO;GACL,UAAU;GACV;EACF;CACF;CACA,MAAM,WAAW,KAAK,KAAK;CAC3B,MAAM,aAAa,KAAK,aAAa;CACrC,MAAM,aAAa,KAAK,SAAS;CACjC,MAAM,gBAAgB,KAAK,gBAAgB;CAC3C,MAAM,gBAAgB,KAAK,YAAY;CACvC,MAAM,YAAY,KAAK,QAAQ;CAC/B,MAAM,QAAQ,KAAK,QAAQ;CAC3B,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CACF;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,aACR;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
@@ -1,54 +1,39 @@
1
- import { isClient } from "@tamagui/constants";
2
1
  import { resolveSizeToken } from "@tamagui/size";
3
2
  import { Text, styled } from "@tamagui/web";
4
3
 
5
- const getFontSized = (sizeTokenIn = true, { font, fontFamily, props }) => {
4
+ const getFontSized = styled.dynamic((sizeTokenIn = true, { font, fontFamily }) => {
6
5
  if (!font) {
7
6
  return { fontSize: sizeTokenIn };
8
7
  }
9
8
  const sizeToken = resolveSizeToken(sizeTokenIn, "fontSize");
10
- const style = {};
11
9
  if (typeof sizeToken === "number") {
12
- style.fontSize = sizeToken;
13
- if (fontFamily) style.fontFamily = fontFamily;
14
- if (props.fontStyle) style.fontStyle = props.fontStyle;
15
- if (props.color) style.color = props.color;
16
- return style;
10
+ return {
11
+ fontSize: sizeToken,
12
+ fontFamily
13
+ };
17
14
  }
18
15
  const fontSize = font.size[sizeToken];
19
16
  const lineHeight = font.lineHeight?.[sizeToken];
20
17
  const fontWeight = font.weight?.[sizeToken];
21
18
  const letterSpacing = font.letterSpacing?.[sizeToken];
22
19
  const textTransform = font.transform?.[sizeToken];
23
- const fontStyle = props.fontStyle ?? font.style?.[sizeToken];
24
- const color = props.color ?? font.color?.[sizeToken];
25
- if (fontStyle) style.fontStyle = fontStyle;
26
- if (textTransform) style.textTransform = textTransform;
27
- if (fontFamily) style.fontFamily = fontFamily;
28
- if (fontWeight) style.fontWeight = fontWeight;
29
- if (letterSpacing) style.letterSpacing = letterSpacing;
30
- if (fontSize) style.fontSize = fontSize;
31
- if (lineHeight) style.lineHeight = lineHeight;
32
- if (color) style.color = color;
33
- if (process.env.NODE_ENV === "development") {
34
- if (props["debug"] && props["debug"] === "verbose") {
35
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
36
- if (isClient) {
37
- console.info({
38
- style,
39
- props,
40
- font
41
- });
42
- }
43
- console.groupEnd();
44
- }
45
- }
46
- return style;
47
- };
20
+ const fontStyle = font.style?.[sizeToken];
21
+ const color = font.color?.[sizeToken];
22
+ return {
23
+ color,
24
+ fontFamily,
25
+ fontSize,
26
+ fontStyle,
27
+ fontWeight,
28
+ letterSpacing,
29
+ lineHeight,
30
+ textTransform
31
+ };
32
+ });
48
33
  const SizableText = styled(Text, {
49
34
  displayName: "SizableText",
50
35
  fontFamily: "body",
51
- variants: { size: { FontSize: getFontSized } },
36
+ variants: { size: getFontSized },
52
37
  defaultVariants: { size: true }
53
38
  });
54
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { isClient } from \"@tamagui/constants\";\nimport { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nconst getFontSized = (sizeTokenIn = true, { font, fontFamily, props }) => {\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n const sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n const style = {};\n if (typeof sizeToken === \"number\") {\n style.fontSize = sizeToken;\n if (fontFamily) style.fontFamily = fontFamily;\n if (props.fontStyle) style.fontStyle = props.fontStyle;\n if (props.color) style.color = props.color;\n return style;\n }\n const fontSize = font.size[sizeToken];\n const lineHeight = font.lineHeight?.[sizeToken];\n const fontWeight = font.weight?.[sizeToken];\n const letterSpacing = font.letterSpacing?.[sizeToken];\n const textTransform = font.transform?.[sizeToken];\n const fontStyle = props.fontStyle ?? font.style?.[sizeToken];\n const color = props.color ?? font.color?.[sizeToken];\n if (fontStyle) style.fontStyle = fontStyle;\n if (textTransform) style.textTransform = textTransform;\n if (fontFamily) style.fontFamily = fontFamily;\n if (fontWeight) style.fontWeight = fontWeight;\n if (letterSpacing) style.letterSpacing = letterSpacing;\n if (fontSize) style.fontSize = fontSize;\n if (lineHeight) style.lineHeight = lineHeight;\n if (color) style.color = color;\n if (process.env.NODE_ENV === \"development\") {\n if (props[\"debug\"] && props[\"debug\"] === \"verbose\") {\n console.groupCollapsed(\" \\u{1F539} getFontSized\", sizeTokenIn, sizeToken);\n if (isClient) {\n console.info({ style, props, font });\n }\n console.groupEnd();\n }\n }\n return style;\n};\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: {\n FontSize: getFontSized\n }\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB,cAAc,MAAM,EAAE,MAAM,YAAY,YAAY;CACxE,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,MAAM,YAAY,iBAAiB,aAAa,UAAU;CAC1D,MAAM,QAAQ,CAAC;CACf,IAAI,OAAO,cAAc,UAAU;EACjC,MAAM,WAAW;EACjB,IAAI,YAAY,MAAM,aAAa;EACnC,IAAI,MAAM,WAAW,MAAM,YAAY,MAAM;EAC7C,IAAI,MAAM,OAAO,MAAM,QAAQ,MAAM;EACrC,OAAO;CACT;CACA,MAAM,WAAW,KAAK,KAAK;CAC3B,MAAM,aAAa,KAAK,aAAa;CACrC,MAAM,aAAa,KAAK,SAAS;CACjC,MAAM,gBAAgB,KAAK,gBAAgB;CAC3C,MAAM,gBAAgB,KAAK,YAAY;CACvC,MAAM,YAAY,MAAM,aAAa,KAAK,QAAQ;CAClD,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,UAAU,MAAM,WAAW;CAC/B,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,OAAO,MAAM,QAAQ;CACzB,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,IAAI,MAAM,YAAY,MAAM,aAAa,WAAW;GAClD,QAAQ,eAAe,qBAA4B,aAAa,SAAS;GACzE,IAAI,UAAU;IACZ,QAAQ,KAAK;KAAE;KAAO;KAAO;IAAK,CAAC;GACrC;GACA,QAAQ,SAAS;EACnB;CACF;CACA,OAAO;AACT;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,EACJ,UAAU,aACZ,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nconst getFontSized = styled.dynamic(\n (sizeTokenIn = true, { font, fontFamily }) => {\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n const sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n if (typeof sizeToken === \"number\") {\n return {\n fontSize: sizeToken,\n fontFamily\n };\n }\n const fontSize = font.size[sizeToken];\n const lineHeight = font.lineHeight?.[sizeToken];\n const fontWeight = font.weight?.[sizeToken];\n const letterSpacing = font.letterSpacing?.[sizeToken];\n const textTransform = font.transform?.[sizeToken];\n const fontStyle = font.style?.[sizeToken];\n const color = font.color?.[sizeToken];\n return {\n color,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n letterSpacing,\n lineHeight,\n textTransform\n };\n }\n);\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: getFontSized\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SACzB,cAAc,MAAM,EAAE,MAAM,iBAAiB;CAC5C,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,MAAM,YAAY,iBAAiB,aAAa,UAAU;CAC1D,IAAI,OAAO,cAAc,UAAU;EACjC,OAAO;GACL,UAAU;GACV;EACF;CACF;CACA,MAAM,WAAW,KAAK,KAAK;CAC3B,MAAM,aAAa,KAAK,aAAa;CACrC,MAAM,aAAa,KAAK,SAAS;CACjC,MAAM,gBAAgB,KAAK,gBAAgB;CAC3C,MAAM,gBAAgB,KAAK,YAAY;CACvC,MAAM,YAAY,KAAK,QAAQ;CAC/B,MAAM,QAAQ,KAAK,QAAQ;CAC3B,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CACF;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,aACR;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
@@ -1,58 +1,41 @@
1
- import { isClient } from "@tamagui/constants";
2
1
  import { resolveSizeToken } from "@tamagui/size";
3
2
  import { Text, styled } from "@tamagui/web";
4
3
 
5
- var getFontSized = function() {
6
- var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0;
4
+ var getFontSized = styled.dynamic(function() {
5
+ var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily } = arguments.length > 1 ? arguments[1] : void 0;
7
6
  var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
8
7
  if (!font) {
9
8
  return { fontSize: sizeTokenIn };
10
9
  }
11
10
  var sizeToken = resolveSizeToken(sizeTokenIn, "fontSize");
12
- var style = {};
13
11
  if (typeof sizeToken === "number") {
14
- style.fontSize = sizeToken;
15
- if (fontFamily) style.fontFamily = fontFamily;
16
- if (props.fontStyle) style.fontStyle = props.fontStyle;
17
- if (props.color) style.color = props.color;
18
- return style;
12
+ return {
13
+ fontSize: sizeToken,
14
+ fontFamily
15
+ };
19
16
  }
20
17
  var fontSize = font.size[sizeToken];
21
18
  var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];
22
19
  var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];
23
20
  var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];
24
21
  var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];
25
- var _props_fontStyle;
26
- var fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
27
- var _props_color;
28
- var color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
29
- if (fontStyle) style.fontStyle = fontStyle;
30
- if (textTransform) style.textTransform = textTransform;
31
- if (fontFamily) style.fontFamily = fontFamily;
32
- if (fontWeight) style.fontWeight = fontWeight;
33
- if (letterSpacing) style.letterSpacing = letterSpacing;
34
- if (fontSize) style.fontSize = fontSize;
35
- if (lineHeight) style.lineHeight = lineHeight;
36
- if (color) style.color = color;
37
- if (process.env.NODE_ENV === "development") {
38
- if (props["debug"] && props["debug"] === "verbose") {
39
- console.groupCollapsed(" 🔹 getFontSized", sizeTokenIn, sizeToken);
40
- if (isClient) {
41
- console.info({
42
- style,
43
- props,
44
- font
45
- });
46
- }
47
- console.groupEnd();
48
- }
49
- }
50
- return style;
51
- };
22
+ var fontStyle = (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];
23
+ var color = (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
24
+ return {
25
+ color,
26
+ fontFamily,
27
+ fontSize,
28
+ fontStyle,
29
+ fontWeight,
30
+ letterSpacing,
31
+ lineHeight,
32
+ textTransform
33
+ };
34
+ });
52
35
  var SizableText = styled(Text, {
53
36
  displayName: "SizableText",
54
37
  fontFamily: "body",
55
- variants: { size: { FontSize: getFontSized } },
38
+ variants: { size: getFontSized },
56
39
  defaultVariants: { size: true }
57
40
  });
58
41
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import { isClient } from \"@tamagui/constants\";\nimport { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nvar getFontSized = function() {\n var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0;\n var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n var sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n var style = {};\n if (typeof sizeToken === \"number\") {\n style.fontSize = sizeToken;\n if (fontFamily) style.fontFamily = fontFamily;\n if (props.fontStyle) style.fontStyle = props.fontStyle;\n if (props.color) style.color = props.color;\n return style;\n }\n var fontSize = font.size[sizeToken];\n var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];\n var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];\n var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];\n var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];\n var _props_fontStyle;\n var fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];\n var _props_color;\n var color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];\n if (fontStyle) style.fontStyle = fontStyle;\n if (textTransform) style.textTransform = textTransform;\n if (fontFamily) style.fontFamily = fontFamily;\n if (fontWeight) style.fontWeight = fontWeight;\n if (letterSpacing) style.letterSpacing = letterSpacing;\n if (fontSize) style.fontSize = fontSize;\n if (lineHeight) style.lineHeight = lineHeight;\n if (color) style.color = color;\n if (process.env.NODE_ENV === \"development\") {\n if (props[\"debug\"] && props[\"debug\"] === \"verbose\") {\n console.groupCollapsed(\" \\u{1F539} getFontSized\", sizeTokenIn, sizeToken);\n if (isClient) {\n console.info({\n style,\n props,\n font\n });\n }\n console.groupEnd();\n }\n }\n return style;\n};\nvar SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: {\n FontSize: getFontSized\n }\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,IAAI,eAAe,WAAW;CAC5B,IAAI,cAAc,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,MAAM,EAAE,MAAM,YAAY,UAAU,UAAU,SAAS,IAAI,UAAU,KAAK,KAAK;CAClK,IAAI,kBAAkB,cAAc,qBAAqB,iBAAiB,aAAa;CACvF,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,IAAI,YAAY,iBAAiB,aAAa,UAAU;CACxD,IAAI,QAAQ,CAAC;CACb,IAAI,OAAO,cAAc,UAAU;EACjC,MAAM,WAAW;EACjB,IAAI,YAAY,MAAM,aAAa;EACnC,IAAI,MAAM,WAAW,MAAM,YAAY,MAAM;EAC7C,IAAI,MAAM,OAAO,MAAM,QAAQ,MAAM;EACrC,OAAO;CACT;CACA,IAAI,WAAW,KAAK,KAAK;CACzB,IAAI,cAAc,mBAAmB,KAAK,gBAAgB,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB;CAC1H,IAAI,cAAc,eAAe,KAAK,YAAY,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;CAC1G,IAAI,iBAAiB,sBAAsB,KAAK,mBAAmB,QAAQ,wBAAwB,KAAK,IAAI,KAAK,IAAI,oBAAoB;CACzI,IAAI,iBAAiB,kBAAkB,KAAK,eAAe,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB;CACzH,IAAI;CACJ,IAAI,aAAa,mBAAmB,MAAM,eAAe,QAAQ,qBAAqB,KAAK,IAAI,oBAAoB,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACvM,IAAI;CACJ,IAAI,SAAS,eAAe,MAAM,WAAW,QAAQ,iBAAiB,KAAK,IAAI,gBAAgB,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACnL,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,UAAU,MAAM,WAAW;CAC/B,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,OAAO,MAAM,QAAQ;CACzB,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,IAAI,MAAM,YAAY,MAAM,aAAa,WAAW;GAClD,QAAQ,eAAe,qBAA4B,aAAa,SAAS;GACzE,IAAI,UAAU;IACZ,QAAQ,KAAK;KACX;KACA;KACA;IACF,CAAC;GACH;GACA,QAAQ,SAAS;EACnB;CACF;CACA,OAAO;AACT;AACA,IAAI,cAAc,OAAO,MAAM;CAC7B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,EACJ,UAAU,aACZ,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled, Text } from \"@tamagui/web\";\nvar getFontSized = styled.dynamic(function() {\n var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, { font, fontFamily } = arguments.length > 1 ? arguments[1] : void 0;\n var _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;\n if (!font) {\n return {\n fontSize: sizeTokenIn\n };\n }\n var sizeToken = resolveSizeToken(sizeTokenIn, \"fontSize\");\n if (typeof sizeToken === \"number\") {\n return {\n fontSize: sizeToken,\n fontFamily\n };\n }\n var fontSize = font.size[sizeToken];\n var lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken];\n var fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken];\n var letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken];\n var textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken];\n var fontStyle = (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken];\n var color = (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];\n return {\n color,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n letterSpacing,\n lineHeight,\n textTransform\n };\n});\nvar SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n variants: {\n size: getFontSized\n },\n defaultVariants: {\n size: true\n }\n});\nexport {\n SizableText,\n getFontSized\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,IAAI,eAAe,OAAO,QAAQ,WAAW;CAC3C,IAAI,cAAc,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,MAAM,EAAE,MAAM,eAAe,UAAU,SAAS,IAAI,UAAU,KAAK,KAAK;CAC3J,IAAI,kBAAkB,cAAc,qBAAqB,iBAAiB,aAAa;CACvF,IAAI,CAAC,MAAM;EACT,OAAO,EACL,UAAU,YACZ;CACF;CACA,IAAI,YAAY,iBAAiB,aAAa,UAAU;CACxD,IAAI,OAAO,cAAc,UAAU;EACjC,OAAO;GACL,UAAU;GACV;EACF;CACF;CACA,IAAI,WAAW,KAAK,KAAK;CACzB,IAAI,cAAc,mBAAmB,KAAK,gBAAgB,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB;CAC1H,IAAI,cAAc,eAAe,KAAK,YAAY,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;CAC1G,IAAI,iBAAiB,sBAAsB,KAAK,mBAAmB,QAAQ,wBAAwB,KAAK,IAAI,KAAK,IAAI,oBAAoB;CACzI,IAAI,iBAAiB,kBAAkB,KAAK,eAAe,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB;CACzH,IAAI,aAAa,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACrG,IAAI,SAAS,cAAc,KAAK,WAAW,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CACjG,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC;AACD,IAAI,cAAc,OAAO,MAAM;CAC7B,aAAa;CACb,YAAY;CACZ,UAAU,EACR,MAAM,aACR;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/get-font-sized",
3
- "version": "3.0.0-beta.831.1",
3
+ "version": "3.0.0-beta.889.1",
4
4
  "files": [
5
5
  "src",
6
6
  "types",
@@ -33,12 +33,11 @@
33
33
  "clean:build": "tamagui-build clean:build"
34
34
  },
35
35
  "dependencies": {
36
- "@tamagui/constants": "3.0.0-beta.831.1",
37
- "@tamagui/size": "3.0.0-beta.831.1",
38
- "@tamagui/web": "3.0.0-beta.831.1"
36
+ "@tamagui/size": "3.0.0-beta.889.1",
37
+ "@tamagui/web": "3.0.0-beta.889.1"
39
38
  },
40
39
  "devDependencies": {
41
- "@tamagui/build": "3.0.0-beta.831.1",
40
+ "@tamagui/build": "3.0.0-beta.889.1",
42
41
  "react": "19.2.3"
43
42
  },
44
43
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -1,83 +1,61 @@
1
- import { isClient } from '@tamagui/constants'
2
- import type {
3
- FontSizeTokens,
4
- TextProps,
5
- TextStyle,
6
- VariantSpreadFunction,
7
- } from '@tamagui/web'
1
+ import type { FontSizeTokens } from '@tamagui/web'
8
2
  import { resolveSizeToken } from '@tamagui/size'
9
3
  import { styled, Text } from '@tamagui/web'
10
4
 
11
- export const getFontSized: VariantSpreadFunction<TextProps, FontSizeTokens> = (
12
- sizeTokenIn = true,
13
- { font, fontFamily, props }
14
- ) => {
15
- if (!font) {
16
- return {
17
- fontSize: sizeTokenIn,
5
+ export const getFontSized = styled.dynamic<FontSizeTokens | number | true>(
6
+ (sizeTokenIn = true, { font, fontFamily }) => {
7
+ if (!font) {
8
+ return {
9
+ fontSize: sizeTokenIn,
10
+ }
18
11
  }
19
- }
20
12
 
21
- const sizeToken = resolveSizeToken(sizeTokenIn, 'fontSize') as Exclude<
22
- FontSizeTokens,
23
- true
24
- >
25
-
26
- const style: TextStyle = {}
27
-
28
- // A raw numeric size (e.g. `fontSize={32}`) is not a token key, so the
29
- // `font.size` / `font.lineHeight` maps have no entry for it and every lookup
30
- // below returns undefined. Treat the number as a literal fontSize and leave
31
- // lineHeight unset, otherwise a stale default token lineHeight survives and
32
- // clips glyph tops on iOS (see #4028). We don't scale the lineHeight here,
33
- // leaving it to the platform default for the given font size.
34
- if (typeof sizeToken === 'number') {
35
- style.fontSize = sizeToken
36
- if (fontFamily) style.fontFamily = fontFamily
37
- if (props.fontStyle) style.fontStyle = props.fontStyle
38
- if (props.color) style.color = props.color
39
- return style
40
- }
13
+ const sizeToken = resolveSizeToken(sizeTokenIn, 'fontSize') as Exclude<
14
+ FontSizeTokens,
15
+ true
16
+ >
41
17
 
42
- // size related, treat them as overrides
43
- const fontSize = font.size[sizeToken]
44
- const lineHeight = font.lineHeight?.[sizeToken]
45
- const fontWeight = font.weight?.[sizeToken]
46
- const letterSpacing = font.letterSpacing?.[sizeToken]
47
- const textTransform = font.transform?.[sizeToken]
48
- const fontStyle = props.fontStyle ?? font.style?.[sizeToken]
49
- const color = props.color ?? font.color?.[sizeToken]
18
+ // A raw numeric size (e.g. `fontSize={32}`) is not a token key, so the
19
+ // `font.size` / `font.lineHeight` maps have no entry for it and every lookup
20
+ // below returns undefined. Treat the number as a literal fontSize and leave
21
+ // lineHeight unset, otherwise a stale default token lineHeight survives and
22
+ // clips glyph tops on iOS (see #4028). We don't scale the lineHeight here,
23
+ // leaving it to the platform default for the given font size.
24
+ if (typeof sizeToken === 'number') {
25
+ return {
26
+ fontSize: sizeToken,
27
+ fontFamily,
28
+ }
29
+ }
50
30
 
51
- if (fontStyle) style.fontStyle = fontStyle
52
- if (textTransform) style.textTransform = textTransform
53
- if (fontFamily) style.fontFamily = fontFamily
54
- if (fontWeight) style.fontWeight = fontWeight
55
- if (letterSpacing) style.letterSpacing = letterSpacing
56
- if (fontSize) style.fontSize = fontSize
57
- if (lineHeight) style.lineHeight = lineHeight
58
- if (color) style.color = color
31
+ // size related, treat them as overrides
32
+ const fontSize = font.size[sizeToken]
33
+ const lineHeight = font.lineHeight?.[sizeToken]
34
+ const fontWeight = font.weight?.[sizeToken]
35
+ const letterSpacing = font.letterSpacing?.[sizeToken]
36
+ const textTransform = font.transform?.[sizeToken]
37
+ const fontStyle = font.style?.[sizeToken]
38
+ const color = font.color?.[sizeToken]
59
39
 
60
- if (process.env.NODE_ENV === 'development') {
61
- if (props['debug'] && props['debug'] === 'verbose') {
62
- console.groupCollapsed(' 🔹 getFontSized', sizeTokenIn, sizeToken)
63
- if (isClient) {
64
- console.info({ style, props, font })
65
- }
66
- console.groupEnd()
40
+ return {
41
+ color,
42
+ fontFamily,
43
+ fontSize,
44
+ fontStyle,
45
+ fontWeight,
46
+ letterSpacing,
47
+ lineHeight,
48
+ textTransform,
67
49
  }
68
50
  }
69
-
70
- return style
71
- }
51
+ )
72
52
 
73
53
  export const SizableText = styled(Text, {
74
54
  displayName: 'SizableText',
75
55
  fontFamily: 'body',
76
56
 
77
57
  variants: {
78
- size: {
79
- FontSize: getFontSized,
80
- },
58
+ size: getFontSized,
81
59
  } as const,
82
60
 
83
61
  defaultVariants: {
package/types/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type { FontSizeTokens, TextProps, VariantSpreadFunction } from '@tamagui/web';
2
- export declare const getFontSized: VariantSpreadFunction<TextProps, FontSizeTokens>;
1
+ export declare const getFontSized: import("@tamagui/web/types/types").StyledDynamicFn<import("@tamagui/web").FontSize, Record<string, any>>;
3
2
  export declare const SizableText: import("react").FunctionComponent<Omit<import("@tamagui/web").TextNonStyleProps, "size" | keyof import("@tamagui/web").TextStylePropsBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").TextStylePropsBase> & import("@tamagui/web").WithFlatVariantValues<{
4
3
  size?: import("@tamagui/web").FontSize | undefined;
5
4
  }> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").TextStylePropsBase>> & {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EAET,qBAAqB,EACtB,MAAM,cAAc,CAAA;AAIrB,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,SAAS,EAAE,cAAc,CA4DzE,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAatB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,0GA8CxB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAWtB,CAAA"}