@tamagui/text 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.
@@ -23,20 +23,31 @@ __export(SizableText_exports, { SizableText: () => SizableText });
23
23
  module.exports = __toCommonJS(SizableText_exports);
24
24
  var import_get_font_sized = require("@tamagui/get-font-sized");
25
25
  var import_web = require("@tamagui/web");
26
- const SizableText = (0, import_web.styled)(import_web.Text, {
26
+ const SizableTextFrame = (0, import_web.styled)(import_web.Text, {
27
27
  displayName: "SizableText",
28
28
  fontFamily: "body",
29
29
  color: "color",
30
30
  size: true,
31
31
  variants: { size: import_get_font_sized.getFontSized }
32
32
  });
33
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
34
- SizableText.staticConfig.variants.fontFamily = { any: (val, extras) => {
35
- if (val === "inherit") {
33
+ const SizableText = SizableTextFrame.resolve((props, env) => {
34
+ if (props.fontFamily === "inherit") {
36
35
  return { fontFamily: "inherit" };
37
36
  }
38
- const sizeProp = extras.props["size"];
39
- const fontSizeProp = extras.props["fontSize"];
40
- const size = sizeProp === true && fontSizeProp ? fontSizeProp : extras.props["size"] ?? true;
41
- return (0, import_get_font_sized.getFontSized)(size, extras);
42
- } };
37
+ if (props.fontFamily === void 0) {
38
+ return {};
39
+ }
40
+ const size = props.size === true && props.fontSize ? props.fontSize : props.size ?? true;
41
+ const sized = (0, import_get_font_sized.getFontSized)(size, env);
42
+ return {
43
+ color: sized?.color,
44
+ fontFamily: sized?.fontFamily,
45
+ fontSize: sized?.fontSize,
46
+ fontStyle: sized?.fontStyle,
47
+ fontWeight: sized?.fontWeight,
48
+ letterSpacing: sized?.letterSpacing,
49
+ lineHeight: sized?.lineHeight,
50
+ textTransform: sized?.textTransform
51
+ };
52
+ });
53
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
@@ -25,21 +25,32 @@ __export(SizableText_exports, { SizableText: () => SizableText });
25
25
  module.exports = __toCommonJS(SizableText_exports);
26
26
  var import_get_font_sized = require("@tamagui/get-font-sized");
27
27
  var import_web = require("@tamagui/web");
28
- var SizableText = (0, import_web.styled)(import_web.Text, {
28
+ var SizableTextFrame = (0, import_web.styled)(import_web.Text, {
29
29
  displayName: "SizableText",
30
30
  fontFamily: "body",
31
31
  color: "color",
32
32
  size: true,
33
33
  variants: { size: import_get_font_sized.getFontSized }
34
34
  });
35
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
36
- SizableText.staticConfig.variants.fontFamily = { any: function(val, extras) {
37
- if (val === "inherit") {
35
+ var SizableText = SizableTextFrame.resolve(function(props, env) {
36
+ if (props.fontFamily === "inherit") {
38
37
  return { fontFamily: "inherit" };
39
38
  }
40
- var sizeProp = extras.props["size"];
41
- var fontSizeProp = extras.props["fontSize"];
42
- var _extras_props_size;
43
- var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props["size"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;
44
- return (0, import_get_font_sized.getFontSized)(size, extras);
45
- } };
39
+ if (props.fontFamily === void 0) {
40
+ return {};
41
+ }
42
+ var _props_size;
43
+ var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;
44
+ var sized = (0, import_get_font_sized.getFontSized)(size, env);
45
+ return {
46
+ color: sized === null || sized === void 0 ? void 0 : sized.color,
47
+ fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,
48
+ fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,
49
+ fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,
50
+ fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,
51
+ letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,
52
+ lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,
53
+ textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform
54
+ };
55
+ });
56
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
@@ -25,23 +25,34 @@ __export(SizableText_exports, { SizableText: () => SizableText });
25
25
  module.exports = __toCommonJS(SizableText_exports);
26
26
  var import_get_font_sized = require("@tamagui/get-font-sized");
27
27
  var import_web = require("@tamagui/web");
28
- var SizableText = (0, import_web.styled)(import_web.Text, {
28
+ var SizableTextFrame = (0, import_web.styled)(import_web.Text, {
29
29
  displayName: "SizableText",
30
30
  fontFamily: "body",
31
31
  color: "color",
32
32
  size: true,
33
33
  variants: { size: import_get_font_sized.getFontSized }
34
34
  });
35
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
36
- SizableText.staticConfig.variants.fontFamily = { any: function(val, extras) {
37
- if (val === "inherit") {
35
+ var SizableText = SizableTextFrame.resolve(function(props, env) {
36
+ if (props.fontFamily === "inherit") {
38
37
  return { fontFamily: "inherit" };
39
38
  }
40
- var sizeProp = extras.props["size"];
41
- var fontSizeProp = extras.props["fontSize"];
42
- var _extras_props_size;
43
- var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props["size"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;
44
- return (0, import_get_font_sized.getFontSized)(size, extras);
45
- } };
39
+ if (props.fontFamily === void 0) {
40
+ return {};
41
+ }
42
+ var _props_size;
43
+ var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;
44
+ var sized = (0, import_get_font_sized.getFontSized)(size, env);
45
+ return {
46
+ color: sized === null || sized === void 0 ? void 0 : sized.color,
47
+ fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,
48
+ fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,
49
+ fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,
50
+ fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,
51
+ letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,
52
+ lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,
53
+ textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform
54
+ };
55
+ });
56
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
46
57
 
47
58
  //# sourceMappingURL=SizableText.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.native.js","names":[],"sources":["cjs/SizableText.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 SizableText_exports = {};\n__export(SizableText_exports, {\n SizableText: () => SizableText\n});\nmodule.exports = __toCommonJS(SizableText_exports);\nvar import_get_font_sized = require(\"@tamagui/get-font-sized\");\nvar import_web = require(\"@tamagui/web\");\nvar SizableText = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: import_get_font_sized.getFontSized\n }\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nSizableText.staticConfig.variants.fontFamily = {\n any: function(val, extras) {\n if (val === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n var sizeProp = extras.props[\"size\"];\n var fontSizeProp = extras.props[\"fontSize\"];\n var _extras_props_size;\n var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props[\"size\"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;\n return (0, import_get_font_sized.getFontSized)(size, extras);\n }\n};\n//# sourceMappingURL=SizableText.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,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB,EAC5B,mBAAmB,YACrB,CAAC;AACD,OAAO,UAAU,aAAa,mBAAmB;AACjD,IAAI,wBAAwB,QAAQ,yBAAyB;AAC7D,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,GAAG,WAAW,OAAM,CAAE,WAAW,MAAM;CACxD,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,sBAAsB,aAC9B;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC;AACD,YAAY,aAAa,SAAS,aAAa,EAC7C,KAAK,SAAS,KAAK,QAAQ;CACzB,IAAI,QAAQ,WAAW;EACrB,OAAO,EACL,YAAY,UACd;CACF;CACA,IAAI,WAAW,OAAO,MAAM;CAC5B,IAAI,eAAe,OAAO,MAAM;CAChC,IAAI;CACJ,IAAI,OAAO,aAAa,QAAQ,eAAe,gBAAgB,qBAAqB,OAAO,MAAM,aAAa,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CAC3K,QAAQ,GAAG,sBAAsB,aAAY,CAAE,MAAM,MAAM;AAC7D,EACF"}
1
+ {"version":3,"file":"SizableText.native.js","names":[],"sources":["cjs/SizableText.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 SizableText_exports = {};\n__export(SizableText_exports, {\n SizableText: () => SizableText\n});\nmodule.exports = __toCommonJS(SizableText_exports);\nvar import_get_font_sized = require(\"@tamagui/get-font-sized\");\nvar import_web = require(\"@tamagui/web\");\nvar SizableTextFrame = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: import_get_font_sized.getFontSized\n }\n});\nvar SizableText = SizableTextFrame.resolve(function(props, env) {\n if (props.fontFamily === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n if (props.fontFamily === void 0) {\n return {};\n }\n var _props_size;\n var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;\n var sized = (0, import_get_font_sized.getFontSized)(size, env);\n return {\n color: sized === null || sized === void 0 ? void 0 : sized.color,\n fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,\n fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,\n fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,\n fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,\n letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,\n lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,\n textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform\n };\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\n//# sourceMappingURL=SizableText.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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IAAI,KAAK,IAAI,MAAM;EAC/D,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAChE,eAAe,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EACnE,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAChE,eAAe,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;CACrE;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC"}
@@ -1,23 +1,34 @@
1
1
  import { getFontSized } from "@tamagui/get-font-sized";
2
2
  import { Text, styled } from "@tamagui/web";
3
3
 
4
- const SizableText = styled(Text, {
4
+ const SizableTextFrame = styled(Text, {
5
5
  displayName: "SizableText",
6
6
  fontFamily: "body",
7
7
  color: "color",
8
8
  size: true,
9
9
  variants: { size: getFontSized }
10
10
  });
11
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
12
- SizableText.staticConfig.variants.fontFamily = { any: (val, extras) => {
13
- if (val === "inherit") {
11
+ const SizableText = SizableTextFrame.resolve((props, env) => {
12
+ if (props.fontFamily === "inherit") {
14
13
  return { fontFamily: "inherit" };
15
14
  }
16
- const sizeProp = extras.props["size"];
17
- const fontSizeProp = extras.props["fontSize"];
18
- const size = sizeProp === true && fontSizeProp ? fontSizeProp : extras.props["size"] ?? true;
19
- return getFontSized(size, extras);
20
- } };
15
+ if (props.fontFamily === void 0) {
16
+ return {};
17
+ }
18
+ const size = props.size === true && props.fontSize ? props.fontSize : props.size ?? true;
19
+ const sized = getFontSized(size, env);
20
+ return {
21
+ color: sized?.color,
22
+ fontFamily: sized?.fontFamily,
23
+ fontSize: sized?.fontSize,
24
+ fontStyle: sized?.fontStyle,
25
+ fontWeight: sized?.fontWeight,
26
+ letterSpacing: sized?.letterSpacing,
27
+ lineHeight: sized?.lineHeight,
28
+ textTransform: sized?.textTransform
29
+ };
30
+ });
31
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
21
32
 
22
33
  export { SizableText };
23
34
  //# sourceMappingURL=SizableText.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.js","names":[],"sources":["esm/SizableText.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nSizableText.staticConfig.variants.fontFamily = {\n any: (val, extras) => {\n if (val === \"inherit\") {\n return { fontFamily: \"inherit\" };\n }\n const sizeProp = extras.props[\"size\"];\n const fontSizeProp = extras.props[\"fontSize\"];\n const size = sizeProp === true && fontSizeProp ? fontSizeProp : extras.props[\"size\"] ?? true;\n return getFontSized(size, extras);\n }\n};\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC;AACD,YAAY,aAAa,SAAS,aAAa,EAC7C,MAAM,KAAK,WAAW;CACpB,IAAI,QAAQ,WAAW;EACrB,OAAO,EAAE,YAAY,UAAU;CACjC;CACA,MAAM,WAAW,OAAO,MAAM;CAC9B,MAAM,eAAe,OAAO,MAAM;CAClC,MAAM,OAAO,aAAa,QAAQ,eAAe,eAAe,OAAO,MAAM,WAAW;CACxF,OAAO,aAAa,MAAM,MAAM;AAClC,EACF"}
1
+ {"version":3,"file":"SizableText.js","names":[],"sources":["esm/SizableText.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nconst SizableTextFrame = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nconst SizableText = SizableTextFrame.resolve((props, env) => {\n if (props.fontFamily === \"inherit\") {\n return { fontFamily: \"inherit\" };\n }\n if (props.fontFamily === void 0) {\n return {};\n }\n const size = props.size === true && props.fontSize ? props.fontSize : props.size ?? true;\n const sized = getFontSized(size, env);\n return {\n color: sized?.color,\n fontFamily: sized?.fontFamily,\n fontSize: sized?.fontSize,\n fontStyle: sized?.fontStyle,\n fontWeight: sized?.fontWeight,\n letterSpacing: sized?.letterSpacing,\n lineHeight: sized?.lineHeight,\n textTransform: sized?.textTransform\n };\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,MAAM,mBAAmB,OAAO,MAAM;CACpC,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,MAAM,cAAc,iBAAiB,SAAS,OAAO,QAAQ;CAC3D,IAAI,MAAM,eAAe,WAAW;EAClC,OAAO,EAAE,YAAY,UAAU;CACjC;CACA,IAAI,MAAM,eAAe,KAAK,GAAG;EAC/B,OAAO,CAAC;CACV;CACA,MAAM,OAAO,MAAM,SAAS,QAAQ,MAAM,WAAW,MAAM,WAAW,MAAM,QAAQ;CACpF,MAAM,QAAQ,aAAa,MAAM,GAAG;CACpC,OAAO;EACL,OAAO,OAAO;EACd,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,WAAW,OAAO;EAClB,YAAY,OAAO;EACnB,eAAe,OAAO;EACtB,YAAY,OAAO;EACnB,eAAe,OAAO;CACxB;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC"}
@@ -1,24 +1,35 @@
1
1
  import { getFontSized } from "@tamagui/get-font-sized";
2
2
  import { Text, styled } from "@tamagui/web";
3
3
 
4
- var SizableText = styled(Text, {
4
+ var SizableTextFrame = styled(Text, {
5
5
  displayName: "SizableText",
6
6
  fontFamily: "body",
7
7
  color: "color",
8
8
  size: true,
9
9
  variants: { size: getFontSized }
10
10
  });
11
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
12
- SizableText.staticConfig.variants.fontFamily = { any: function(val, extras) {
13
- if (val === "inherit") {
11
+ var SizableText = SizableTextFrame.resolve(function(props, env) {
12
+ if (props.fontFamily === "inherit") {
14
13
  return { fontFamily: "inherit" };
15
14
  }
16
- var sizeProp = extras.props["size"];
17
- var fontSizeProp = extras.props["fontSize"];
18
- var _extras_props_size;
19
- var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props["size"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;
20
- return getFontSized(size, extras);
21
- } };
15
+ if (props.fontFamily === void 0) {
16
+ return {};
17
+ }
18
+ var _props_size;
19
+ var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;
20
+ var sized = getFontSized(size, env);
21
+ return {
22
+ color: sized === null || sized === void 0 ? void 0 : sized.color,
23
+ fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,
24
+ fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,
25
+ fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,
26
+ fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,
27
+ letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,
28
+ lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,
29
+ textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform
30
+ };
31
+ });
32
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
22
33
 
23
34
  export { SizableText };
24
35
  //# sourceMappingURL=SizableText.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.native.js","names":[],"sources":["esm/SizableText.native.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nvar SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nSizableText.staticConfig.variants.fontFamily = {\n any: function(val, extras) {\n if (val === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n var sizeProp = extras.props[\"size\"];\n var fontSizeProp = extras.props[\"fontSize\"];\n var _extras_props_size;\n var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props[\"size\"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;\n return getFontSized(size, extras);\n }\n};\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,IAAI,cAAc,OAAO,MAAM;CAC7B,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC;AACD,YAAY,aAAa,SAAS,aAAa,EAC7C,KAAK,SAAS,KAAK,QAAQ;CACzB,IAAI,QAAQ,WAAW;EACrB,OAAO,EACL,YAAY,UACd;CACF;CACA,IAAI,WAAW,OAAO,MAAM;CAC5B,IAAI,eAAe,OAAO,MAAM;CAChC,IAAI;CACJ,IAAI,OAAO,aAAa,QAAQ,eAAe,gBAAgB,qBAAqB,OAAO,MAAM,aAAa,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CAC3K,OAAO,aAAa,MAAM,MAAM;AAClC,EACF"}
1
+ {"version":3,"file":"SizableText.native.js","names":[],"sources":["esm/SizableText.native.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nvar SizableTextFrame = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nvar SizableText = SizableTextFrame.resolve(function(props, env) {\n if (props.fontFamily === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n if (props.fontFamily === void 0) {\n return {};\n }\n var _props_size;\n var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;\n var sized = getFontSized(size, env);\n return {\n color: sized === null || sized === void 0 ? void 0 : sized.color,\n fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,\n fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,\n fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,\n fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,\n letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,\n lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,\n textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform\n };\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,IAAI,mBAAmB,OAAO,MAAM;CAClC,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,IAAI,cAAc,iBAAiB,QAAQ,SAAS,OAAO,KAAK;CAC9D,IAAI,MAAM,eAAe,WAAW;EAClC,OAAO,EACL,YAAY,UACd;CACF;CACA,IAAI,MAAM,eAAe,KAAK,GAAG;EAC/B,OAAO,CAAC;CACV;CACA,IAAI;CACJ,IAAI,OAAO,MAAM,SAAS,QAAQ,MAAM,WAAW,MAAM,YAAY,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc;CAClJ,IAAI,QAAQ,aAAa,MAAM,GAAG;CAClC,OAAO;EACL,OAAO,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAC3D,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAChE,UAAU,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAC9D,WAAW,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAC/D,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAChE,eAAe,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EACnE,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;EAChE,eAAe,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;CACrE;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC"}
@@ -1,23 +1,34 @@
1
1
  import { getFontSized } from "@tamagui/get-font-sized";
2
2
  import { Text, styled } from "@tamagui/web";
3
3
 
4
- const SizableText = styled(Text, {
4
+ const SizableTextFrame = styled(Text, {
5
5
  displayName: "SizableText",
6
6
  fontFamily: "body",
7
7
  color: "color",
8
8
  size: true,
9
9
  variants: { size: getFontSized }
10
10
  });
11
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
12
- SizableText.staticConfig.variants.fontFamily = { any: (val, extras) => {
13
- if (val === "inherit") {
11
+ const SizableText = SizableTextFrame.resolve((props, env) => {
12
+ if (props.fontFamily === "inherit") {
14
13
  return { fontFamily: "inherit" };
15
14
  }
16
- const sizeProp = extras.props["size"];
17
- const fontSizeProp = extras.props["fontSize"];
18
- const size = sizeProp === true && fontSizeProp ? fontSizeProp : extras.props["size"] ?? true;
19
- return getFontSized(size, extras);
20
- } };
15
+ if (props.fontFamily === void 0) {
16
+ return {};
17
+ }
18
+ const size = props.size === true && props.fontSize ? props.fontSize : props.size ?? true;
19
+ const sized = getFontSized(size, env);
20
+ return {
21
+ color: sized?.color,
22
+ fontFamily: sized?.fontFamily,
23
+ fontSize: sized?.fontSize,
24
+ fontStyle: sized?.fontStyle,
25
+ fontWeight: sized?.fontWeight,
26
+ letterSpacing: sized?.letterSpacing,
27
+ lineHeight: sized?.lineHeight,
28
+ textTransform: sized?.textTransform
29
+ };
30
+ });
31
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
21
32
 
22
33
  export { SizableText };
23
34
  //# sourceMappingURL=SizableText.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.js","names":[],"sources":["jsx/SizableText.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nconst SizableText = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nSizableText.staticConfig.variants.fontFamily = {\n any: (val, extras) => {\n if (val === \"inherit\") {\n return { fontFamily: \"inherit\" };\n }\n const sizeProp = extras.props[\"size\"];\n const fontSizeProp = extras.props[\"fontSize\"];\n const size = sizeProp === true && fontSizeProp ? fontSizeProp : extras.props[\"size\"] ?? true;\n return getFontSized(size, extras);\n }\n};\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,MAAM,cAAc,OAAO,MAAM;CAC/B,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC;AACD,YAAY,aAAa,SAAS,aAAa,EAC7C,MAAM,KAAK,WAAW;CACpB,IAAI,QAAQ,WAAW;EACrB,OAAO,EAAE,YAAY,UAAU;CACjC;CACA,MAAM,WAAW,OAAO,MAAM;CAC9B,MAAM,eAAe,OAAO,MAAM;CAClC,MAAM,OAAO,aAAa,QAAQ,eAAe,eAAe,OAAO,MAAM,WAAW;CACxF,OAAO,aAAa,MAAM,MAAM;AAClC,EACF"}
1
+ {"version":3,"file":"SizableText.js","names":[],"sources":["jsx/SizableText.js"],"sourcesContent":["import { getFontSized } from \"@tamagui/get-font-sized\";\nimport { Text, styled } from \"@tamagui/web\";\nconst SizableTextFrame = styled(Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: getFontSized\n }\n});\nconst SizableText = SizableTextFrame.resolve((props, env) => {\n if (props.fontFamily === \"inherit\") {\n return { fontFamily: \"inherit\" };\n }\n if (props.fontFamily === void 0) {\n return {};\n }\n const size = props.size === true && props.fontSize ? props.fontSize : props.size ?? true;\n const sized = getFontSized(size, env);\n return {\n color: sized?.color,\n fontFamily: sized?.fontFamily,\n fontSize: sized?.fontSize,\n fontStyle: sized?.fontStyle,\n fontWeight: sized?.fontWeight,\n letterSpacing: sized?.letterSpacing,\n lineHeight: sized?.lineHeight,\n textTransform: sized?.textTransform\n };\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nexport {\n SizableText\n};\n//# sourceMappingURL=SizableText.js.map\n"],"mappings":";;;;AAEA,MAAM,mBAAmB,OAAO,MAAM;CACpC,aAAa;CACb,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU,EACR,MAAM,aACR;AACF,CAAC;AACD,MAAM,cAAc,iBAAiB,SAAS,OAAO,QAAQ;CAC3D,IAAI,MAAM,eAAe,WAAW;EAClC,OAAO,EAAE,YAAY,UAAU;CACjC;CACA,IAAI,MAAM,eAAe,KAAK,GAAG;EAC/B,OAAO,CAAC;CACV;CACA,MAAM,OAAO,MAAM,SAAS,QAAQ,MAAM,WAAW,MAAM,WAAW,MAAM,QAAQ;CACpF,MAAM,QAAQ,aAAa,MAAM,GAAG;CACpC,OAAO;EACL,OAAO,OAAO;EACd,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,WAAW,OAAO;EAClB,YAAY,OAAO;EACnB,eAAe,OAAO;EACtB,YAAY,OAAO;EACnB,eAAe,OAAO;CACxB;AACF,CAAC;AACD,YAAY,aAAa,8BAA8B,IAAI,IAAI,CAC7D,GAAG,YAAY,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC"}
@@ -25,21 +25,32 @@ __export(SizableText_exports, { SizableText: () => SizableText });
25
25
  module.exports = __toCommonJS(SizableText_exports);
26
26
  var import_get_font_sized = require("@tamagui/get-font-sized");
27
27
  var import_web = require("@tamagui/web");
28
- var SizableText = (0, import_web.styled)(import_web.Text, {
28
+ var SizableTextFrame = (0, import_web.styled)(import_web.Text, {
29
29
  displayName: "SizableText",
30
30
  fontFamily: "body",
31
31
  color: "color",
32
32
  size: true,
33
33
  variants: { size: import_get_font_sized.getFontSized }
34
34
  });
35
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
36
- SizableText.staticConfig.variants.fontFamily = { any: function(val, extras) {
37
- if (val === "inherit") {
35
+ var SizableText = SizableTextFrame.resolve(function(props, env) {
36
+ if (props.fontFamily === "inherit") {
38
37
  return { fontFamily: "inherit" };
39
38
  }
40
- var sizeProp = extras.props["size"];
41
- var fontSizeProp = extras.props["fontSize"];
42
- var _extras_props_size;
43
- var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props["size"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;
44
- return (0, import_get_font_sized.getFontSized)(size, extras);
45
- } };
39
+ if (props.fontFamily === void 0) {
40
+ return {};
41
+ }
42
+ var _props_size;
43
+ var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;
44
+ var sized = (0, import_get_font_sized.getFontSized)(size, env);
45
+ return {
46
+ color: sized === null || sized === void 0 ? void 0 : sized.color,
47
+ fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,
48
+ fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,
49
+ fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,
50
+ fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,
51
+ letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,
52
+ lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,
53
+ textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform
54
+ };
55
+ });
56
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
@@ -25,23 +25,34 @@ __export(SizableText_exports, { SizableText: () => SizableText });
25
25
  module.exports = __toCommonJS(SizableText_exports);
26
26
  var import_get_font_sized = require("@tamagui/get-font-sized");
27
27
  var import_web = require("@tamagui/web");
28
- var SizableText = (0, import_web.styled)(import_web.Text, {
28
+ var SizableTextFrame = (0, import_web.styled)(import_web.Text, {
29
29
  displayName: "SizableText",
30
30
  fontFamily: "body",
31
31
  color: "color",
32
32
  size: true,
33
33
  variants: { size: import_get_font_sized.getFontSized }
34
34
  });
35
- SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
36
- SizableText.staticConfig.variants.fontFamily = { any: function(val, extras) {
37
- if (val === "inherit") {
35
+ var SizableText = SizableTextFrame.resolve(function(props, env) {
36
+ if (props.fontFamily === "inherit") {
38
37
  return { fontFamily: "inherit" };
39
38
  }
40
- var sizeProp = extras.props["size"];
41
- var fontSizeProp = extras.props["fontSize"];
42
- var _extras_props_size;
43
- var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props["size"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;
44
- return (0, import_get_font_sized.getFontSized)(size, extras);
45
- } };
39
+ if (props.fontFamily === void 0) {
40
+ return {};
41
+ }
42
+ var _props_size;
43
+ var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;
44
+ var sized = (0, import_get_font_sized.getFontSized)(size, env);
45
+ return {
46
+ color: sized === null || sized === void 0 ? void 0 : sized.color,
47
+ fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,
48
+ fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,
49
+ fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,
50
+ fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,
51
+ letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,
52
+ lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,
53
+ textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform
54
+ };
55
+ });
56
+ SizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([...SizableText.staticConfig.inlineProps || [], "maxFontSizeMultiplier"]);
46
57
 
47
58
  //# sourceMappingURL=SizableText.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.native.js","names":[],"sources":["jsx/SizableText.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 SizableText_exports = {};\n__export(SizableText_exports, {\n SizableText: () => SizableText\n});\nmodule.exports = __toCommonJS(SizableText_exports);\nvar import_get_font_sized = require(\"@tamagui/get-font-sized\");\nvar import_web = require(\"@tamagui/web\");\nvar SizableText = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: import_get_font_sized.getFontSized\n }\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\nSizableText.staticConfig.variants.fontFamily = {\n any: function(val, extras) {\n if (val === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n var sizeProp = extras.props[\"size\"];\n var fontSizeProp = extras.props[\"fontSize\"];\n var _extras_props_size;\n var size = sizeProp === true && fontSizeProp ? fontSizeProp : (_extras_props_size = extras.props[\"size\"]) !== null && _extras_props_size !== void 0 ? _extras_props_size : true;\n return (0, import_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ACrB,OAAO,EACL,YAAY,UACd;CACF;CACA,IAAI,WAAW,OAAO,MAAM;CAC5B,IAAI,eAAe,OAAO,MAAM;CAChC,IAAI;CACJ,IAAI,OAAO,aAAa,QAAQ,eAAe,gBAAgB,qBAAqB,OAAO,MAAM,aAAa,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CAC3K,QAAQ,GAAG,sBAAsB,aAAY,CAAE,MAAM,MAAM;AAC7D,EACF"}
1
+ {"version":3,"file":"SizableText.native.js","names":[],"sources":["jsx/SizableText.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 SizableText_exports = {};\n__export(SizableText_exports, {\n SizableText: () => SizableText\n});\nmodule.exports = __toCommonJS(SizableText_exports);\nvar import_get_font_sized = require(\"@tamagui/get-font-sized\");\nvar import_web = require(\"@tamagui/web\");\nvar SizableTextFrame = (0, import_web.styled)(import_web.Text, {\n displayName: \"SizableText\",\n fontFamily: \"body\",\n color: \"color\",\n size: true,\n variants: {\n size: import_get_font_sized.getFontSized\n }\n});\nvar SizableText = SizableTextFrame.resolve(function(props, env) {\n if (props.fontFamily === \"inherit\") {\n return {\n fontFamily: \"inherit\"\n };\n }\n if (props.fontFamily === void 0) {\n return {};\n }\n var _props_size;\n var size = props.size === true && props.fontSize ? props.fontSize : (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : true;\n var sized = (0, import_get_font_sized.getFontSized)(size, env);\n return {\n color: sized === null || sized === void 0 ? void 0 : sized.color,\n fontFamily: sized === null || sized === void 0 ? void 0 : sized.fontFamily,\n fontSize: sized === null || sized === void 0 ? void 0 : sized.fontSize,\n fontStyle: sized === null || sized === void 0 ? void 0 : sized.fontStyle,\n fontWeight: sized === null || sized === void 0 ? void 0 : sized.fontWeight,\n letterSpacing: sized === null || sized === void 0 ? void 0 : sized.letterSpacing,\n lineHeight: sized === null || sized === void 0 ? void 0 : sized.lineHeight,\n textTransform: sized === null || sized === void 0 ? void 0 : sized.textTransform\n };\n});\nSizableText.staticConfig.inlineProps = /* @__PURE__ */ new Set([\n ...SizableText.staticConfig.inlineProps || [],\n \"maxFontSizeMultiplier\"\n]);\n//# sourceMappingURL=SizableText.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,sBAAsB,CAAC;A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Y,aAAa,eAAe,CAAC,GAC5C,uBACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/text",
3
- "version": "3.0.0-beta.831.1",
3
+ "version": "3.0.0-beta.889.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.tsx",
6
6
  "files": [
@@ -35,12 +35,12 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/get-font-sized": "3.0.0-beta.831.1",
39
- "@tamagui/helpers-tamagui": "3.0.0-beta.831.1",
40
- "@tamagui/web": "3.0.0-beta.831.1"
38
+ "@tamagui/get-font-sized": "3.0.0-beta.889.1",
39
+ "@tamagui/helpers-tamagui": "3.0.0-beta.889.1",
40
+ "@tamagui/web": "3.0.0-beta.889.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@tamagui/build": "3.0.0-beta.831.1",
43
+ "@tamagui/build": "3.0.0-beta.889.1",
44
44
  "react": "19.2.3"
45
45
  },
46
46
  "peerDependencies": {
@@ -2,7 +2,7 @@ import { getFontSized } from '@tamagui/get-font-sized'
2
2
  import type { GetProps } from '@tamagui/web'
3
3
  import { Text, styled } from '@tamagui/web'
4
4
 
5
- export const SizableText = styled(Text, {
5
+ const SizableTextFrame = styled(Text, {
6
6
  displayName: 'SizableText',
7
7
  fontFamily: 'body',
8
8
  color: 'color',
@@ -12,26 +12,37 @@ export const SizableText = styled(Text, {
12
12
  },
13
13
  })
14
14
 
15
+ export const SizableText = SizableTextFrame.resolve((props, env) => {
16
+ if (props.fontFamily === 'inherit') {
17
+ return { fontFamily: 'inherit' }
18
+ }
19
+
20
+ // This replaces the old `fontFamily: { any: ... }` variant. Only an
21
+ // authored fontFamily prop triggered that variant; running it for the
22
+ // component's inherited base family would let this resolver overwrite a
23
+ // later variant's size (for example H1's unstyled=false -> size=10).
24
+ if (props.fontFamily === undefined) {
25
+ return {}
26
+ }
27
+
28
+ const size =
29
+ props.size === true && props.fontSize ? props.fontSize : (props.size ?? true)
30
+ const sized = getFontSized(size as any, env)
31
+ return {
32
+ color: sized?.color,
33
+ fontFamily: sized?.fontFamily,
34
+ fontSize: sized?.fontSize,
35
+ fontStyle: sized?.fontStyle,
36
+ fontWeight: sized?.fontWeight,
37
+ letterSpacing: sized?.letterSpacing,
38
+ lineHeight: sized?.lineHeight,
39
+ textTransform: sized?.textTransform,
40
+ }
41
+ })
42
+
15
43
  SizableText.staticConfig.inlineProps = new Set([
16
44
  ...(SizableText.staticConfig.inlineProps || []),
17
45
  'maxFontSizeMultiplier',
18
46
  ])
19
47
 
20
- // we are doing weird stuff to avoid bad types
21
- // TODO make this just work
22
- SizableText.staticConfig.variants!.fontFamily = {
23
- any: (val, extras) => {
24
- // pass through inherit directly without font variant expansion
25
- if (val === 'inherit') {
26
- return { fontFamily: 'inherit' }
27
- }
28
-
29
- const sizeProp = extras.props['size']
30
- const fontSizeProp = extras.props['fontSize']
31
- const size =
32
- sizeProp === true && fontSizeProp ? fontSizeProp : (extras.props['size'] ?? true)
33
- return getFontSized(size, extras)
34
- },
35
- }
36
-
37
48
  export type SizableTextProps = GetProps<typeof SizableText>
@@ -1,14 +1,6 @@
1
1
  import type { GetProps } from '@tamagui/web';
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<{
2
+ export declare const SizableText: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
3
3
  size?: import("@tamagui/web").FontSize | undefined;
4
- }> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").TextStylePropsBase>> & {
5
- ref?: import("react").Ref<import("@tamagui/web").TamaguiTextElement> | undefined;
6
- }> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
7
- size?: import("@tamagui/web").FontSize | undefined;
8
- }, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig"> & {
9
- __tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
10
- size?: import("@tamagui/web").FontSize | undefined;
11
- }, import("@tamagui/web").StaticConfigPublic];
12
- };
4
+ }, import("@tamagui/web").StaticConfigPublic>;
13
5
  export type SizableTextProps = GetProps<typeof SizableText>;
14
6
  //# sourceMappingURL=SizableText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SizableText.d.ts","sourceRoot":"","sources":["../src/SizableText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAG5C,eAAO,MAAM,WAAW;;;;;;;;;;CAQtB,CAAA;AAwBF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA"}
1
+ {"version":3,"file":"SizableText.d.ts","sourceRoot":"","sources":["../src/SizableText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAa5C,eAAO,MAAM,WAAW;;6CA0BtB,CAAA;AAOF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA"}
package/types/types.d.ts CHANGED
@@ -1,34 +1,34 @@
1
1
  import { type Shorthands, type TextStyle, type TextStylePropsBase, type WithShorthands } from '@tamagui/web';
2
2
  import type { SizableTextProps } from './SizableText';
3
3
  export declare const textParentProps: {
4
- readonly whiteSpace?: boolean | undefined;
5
- readonly wordWrap?: boolean | undefined;
6
- readonly textOverflow?: boolean | undefined;
7
- readonly WebkitBoxOrient?: boolean | undefined;
8
- readonly textDecorationDistance?: boolean | undefined;
9
- readonly WebkitLineClamp?: boolean | undefined;
10
- readonly color: boolean;
11
- readonly textDecorationColor: boolean;
12
- readonly textShadowColor: boolean;
13
- readonly fontFamily: boolean;
14
- readonly fontStyle: boolean;
15
- readonly fontVariant: boolean;
16
- readonly textTransform: boolean;
17
- readonly textAlign: boolean;
18
- readonly textDecorationLine: boolean;
19
- readonly textDecorationStyle: boolean;
20
- readonly userSelect: boolean;
21
- readonly writingDirection: boolean;
22
- readonly fontSize: boolean;
23
- readonly fontWeight: boolean;
24
- readonly letterSpacing: boolean;
25
- readonly lineHeight: boolean;
26
- readonly textShadow: boolean;
27
- readonly textShadowOffset: boolean;
28
- readonly textShadowRadius: boolean;
29
- readonly textDecoration: boolean;
30
- readonly font: boolean;
31
- readonly verticalAlign: boolean;
4
+ readonly WebkitBoxOrient: true;
5
+ readonly WebkitLineClamp: true;
6
+ readonly color: true;
7
+ readonly font: true;
8
+ readonly fontFamily: true;
9
+ readonly fontSize: true;
10
+ readonly fontStyle: true;
11
+ readonly fontVariant: true;
12
+ readonly fontWeight: true;
13
+ readonly letterSpacing: true;
14
+ readonly lineHeight: true;
15
+ readonly textAlign: true;
16
+ readonly textDecoration: true;
17
+ readonly textDecorationColor: true;
18
+ readonly textDecorationDistance: true;
19
+ readonly textDecorationLine: true;
20
+ readonly textDecorationStyle: true;
21
+ readonly textOverflow: true;
22
+ readonly textShadow: true;
23
+ readonly textShadowColor: true;
24
+ readonly textShadowOffset: true;
25
+ readonly textShadowRadius: true;
26
+ readonly textTransform: true;
27
+ readonly userSelect: true;
28
+ readonly verticalAlign: true;
29
+ readonly whiteSpace: true;
30
+ readonly wordWrap: true;
31
+ readonly writingDirection: true;
32
32
  readonly ellipsis: true;
33
33
  readonly maxFontSizeMultiplier: true;
34
34
  readonly noTextWrap: true;