@tamagui/text 2.7.7 → 3.0.0-beta.643.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cjs/Emphasis.cjs +22 -25
  2. package/dist/cjs/Emphasis.native.cjs +40 -0
  3. package/dist/cjs/Emphasis.native.js +22 -24
  4. package/dist/cjs/Emphasis.native.js.map +1 -1
  5. package/dist/cjs/Headings.cjs +51 -100
  6. package/dist/cjs/Headings.native.cjs +80 -0
  7. package/dist/cjs/Headings.native.js +51 -99
  8. package/dist/cjs/Headings.native.js.map +1 -1
  9. package/dist/cjs/Paragraph.cjs +21 -24
  10. package/dist/cjs/Paragraph.native.cjs +36 -0
  11. package/dist/cjs/Paragraph.native.js +21 -23
  12. package/dist/cjs/Paragraph.native.js.map +1 -1
  13. package/dist/cjs/SizableText.cjs +29 -45
  14. package/dist/cjs/SizableText.native.cjs +46 -0
  15. package/dist/cjs/SizableText.native.js +31 -45
  16. package/dist/cjs/SizableText.native.js.map +1 -1
  17. package/dist/cjs/index.cjs +10 -11
  18. package/dist/cjs/index.native.cjs +26 -0
  19. package/dist/cjs/index.native.js +10 -10
  20. package/dist/cjs/index.native.js.map +1 -1
  21. package/dist/cjs/types.cjs +10 -11
  22. package/dist/cjs/types.native.cjs +19 -0
  23. package/dist/cjs/types.native.js +10 -10
  24. package/dist/cjs/types.native.js.map +1 -1
  25. package/dist/cjs/wrapChildrenInText.cjs +57 -67
  26. package/dist/cjs/wrapChildrenInText.native.cjs +74 -0
  27. package/dist/cjs/wrapChildrenInText.native.js +56 -66
  28. package/dist/cjs/wrapChildrenInText.native.js.map +1 -1
  29. package/dist/esm/Emphasis.mjs +8 -8
  30. package/dist/esm/Emphasis.mjs.map +1 -1
  31. package/dist/esm/Emphasis.native.js +8 -8
  32. package/dist/esm/Emphasis.native.js.map +1 -1
  33. package/dist/esm/Headings.mjs +32 -78
  34. package/dist/esm/Headings.mjs.map +1 -1
  35. package/dist/esm/Headings.native.js +32 -78
  36. package/dist/esm/Headings.native.js.map +1 -1
  37. package/dist/esm/Paragraph.mjs +8 -6
  38. package/dist/esm/Paragraph.mjs.map +1 -1
  39. package/dist/esm/Paragraph.native.js +8 -6
  40. package/dist/esm/Paragraph.native.js.map +1 -1
  41. package/dist/esm/SizableText.mjs +17 -28
  42. package/dist/esm/SizableText.mjs.map +1 -1
  43. package/dist/esm/SizableText.native.js +18 -28
  44. package/dist/esm/SizableText.native.js.map +1 -1
  45. package/dist/esm/index.js +11 -7
  46. package/dist/esm/index.mjs +11 -7
  47. package/dist/esm/index.native.js +11 -7
  48. package/dist/esm/types.mjs +0 -2
  49. package/dist/esm/types.native.js +0 -2
  50. package/dist/esm/wrapChildrenInText.mjs +40 -41
  51. package/dist/esm/wrapChildrenInText.mjs.map +1 -1
  52. package/dist/esm/wrapChildrenInText.native.js +41 -42
  53. package/dist/esm/wrapChildrenInText.native.js.map +1 -1
  54. package/dist/jsx/Emphasis.mjs +8 -8
  55. package/dist/jsx/Emphasis.mjs.map +1 -1
  56. package/dist/jsx/Emphasis.native.cjs +40 -0
  57. package/dist/jsx/Emphasis.native.js +22 -24
  58. package/dist/jsx/Emphasis.native.js.map +1 -1
  59. package/dist/jsx/Headings.mjs +32 -78
  60. package/dist/jsx/Headings.mjs.map +1 -1
  61. package/dist/jsx/Headings.native.cjs +80 -0
  62. package/dist/jsx/Headings.native.js +51 -99
  63. package/dist/jsx/Headings.native.js.map +1 -1
  64. package/dist/jsx/Paragraph.mjs +8 -6
  65. package/dist/jsx/Paragraph.mjs.map +1 -1
  66. package/dist/jsx/Paragraph.native.cjs +36 -0
  67. package/dist/jsx/Paragraph.native.js +21 -23
  68. package/dist/jsx/Paragraph.native.js.map +1 -1
  69. package/dist/jsx/SizableText.mjs +17 -28
  70. package/dist/jsx/SizableText.mjs.map +1 -1
  71. package/dist/jsx/SizableText.native.cjs +46 -0
  72. package/dist/jsx/SizableText.native.js +31 -45
  73. package/dist/jsx/SizableText.native.js.map +1 -1
  74. package/dist/jsx/index.js +11 -7
  75. package/dist/jsx/index.mjs +11 -7
  76. package/dist/jsx/index.native.cjs +26 -0
  77. package/dist/jsx/index.native.js +10 -10
  78. package/dist/jsx/index.native.js.map +1 -1
  79. package/dist/jsx/types.mjs +0 -2
  80. package/dist/jsx/types.native.cjs +19 -0
  81. package/dist/jsx/types.native.js +10 -10
  82. package/dist/jsx/types.native.js.map +1 -1
  83. package/dist/jsx/wrapChildrenInText.mjs +40 -41
  84. package/dist/jsx/wrapChildrenInText.mjs.map +1 -1
  85. package/dist/jsx/wrapChildrenInText.native.cjs +74 -0
  86. package/dist/jsx/wrapChildrenInText.native.js +56 -66
  87. package/dist/jsx/wrapChildrenInText.native.js.map +1 -1
  88. package/package.json +5 -5
  89. package/src/Headings.tsx +15 -15
  90. package/src/Paragraph.tsx +3 -3
  91. package/src/SizableText.tsx +6 -18
  92. package/src/wrapChildrenInText.tsx +32 -11
  93. package/types/Emphasis.d.ts +15 -3
  94. package/types/Emphasis.d.ts.map +1 -1
  95. package/types/Headings.d.ts +89 -22
  96. package/types/Headings.d.ts.map +1 -1
  97. package/types/Paragraph.d.ts +11 -4
  98. package/types/Paragraph.d.ts.map +1 -1
  99. package/types/SizableText.d.ts +11 -4
  100. package/types/SizableText.d.ts.map +1 -1
  101. package/types/wrapChildrenInText.d.ts +2 -4
  102. package/types/wrapChildrenInText.d.ts.map +1 -1
  103. package/dist/esm/index.js.map +0 -1
  104. package/dist/esm/index.mjs.map +0 -1
  105. package/dist/esm/index.native.js.map +0 -1
  106. package/dist/esm/types.mjs.map +0 -1
  107. package/dist/esm/types.native.js.map +0 -1
  108. package/dist/jsx/index.js.map +0 -1
  109. package/dist/jsx/index.mjs.map +0 -1
  110. package/dist/jsx/types.mjs.map +0 -1
@@ -1,7 +1,11 @@
1
- export * from "./Emphasis.mjs";
2
- export * from "./SizableText.mjs";
3
- export * from "./Paragraph.mjs";
4
- export * from "./Headings.mjs";
5
- export * from "./wrapChildrenInText.mjs";
6
- export * from "./types.mjs";
7
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Emphasis.mjs"
2
+
3
+ export * from "./SizableText.mjs"
4
+
5
+ export * from "./Paragraph.mjs"
6
+
7
+ export * from "./Headings.mjs"
8
+
9
+ export * from "./wrapChildrenInText.mjs"
10
+
11
+ export * from "./types.mjs"
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ module.exports = __toCommonJS(index_exports);
21
+ __reExport(index_exports, require("./Emphasis.native.js"), module.exports);
22
+ __reExport(index_exports, require("./SizableText.native.js"), module.exports);
23
+ __reExport(index_exports, require("./Paragraph.native.js"), module.exports);
24
+ __reExport(index_exports, require("./Headings.native.js"), module.exports);
25
+ __reExport(index_exports, require("./wrapChildrenInText.native.js"), module.exports);
26
+ __reExport(index_exports, require("./types.native.js"), module.exports);
@@ -1,22 +1,21 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
15
16
  };
16
17
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
- value: true
19
- }), mod);
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
19
  var index_exports = {};
21
20
  module.exports = __toCommonJS(index_exports);
22
21
  __reExport(index_exports, require("./Emphasis.native.js"), module.exports);
@@ -25,4 +24,5 @@ __reExport(index_exports, require("./Paragraph.native.js"), module.exports);
25
24
  __reExport(index_exports, require("./Headings.native.js"), module.exports);
26
25
  __reExport(index_exports, require("./wrapChildrenInText.native.js"), module.exports);
27
26
  __reExport(index_exports, require("./types.native.js"), module.exports);
27
+
28
28
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA;AACd,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA;AACd,IAAAC,iBAAc,GAAAJ,MAAA,CAAAK,mBAAA;AACd,IAAAC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AACd,IAAAC,WAAc,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Emphasis\"), module.exports);\n__reExport(index_exports, require(\"./SizableText\"), module.exports);\n__reExport(index_exports, require(\"./Paragraph\"), module.exports);\n__reExport(index_exports, require(\"./Headings\"), module.exports);\n__reExport(index_exports, require(\"./wrapChildrenInText\"), module.exports);\n__reExport(index_exports, require(\"./types\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,sBAAY,GAAG,OAAO,OAAO;AAC/D,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,sBAAY,GAAG,OAAO,OAAO;AAC/D,WAAW,eAAe,QAAQ,gCAAsB,GAAG,OAAO,OAAO;AACzE,WAAW,eAAe,QAAQ,mBAAS,GAAG,OAAO,OAAO"}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.mjs.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var types_exports = {};
19
+ module.exports = __toCommonJS(types_exports);
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
15
16
  };
16
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
17
- value: true
18
- }), mod);
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
18
  var types_exports = {};
20
19
  module.exports = __toCommonJS(types_exports);
20
+
21
21
  //# sourceMappingURL=types.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.native.js","names":[],"sources":["jsx/types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar types_exports = {};\nmodule.exports = __toCommonJS(types_exports);\n//# sourceMappingURL=types.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa"}
@@ -1,47 +1,46 @@
1
1
  import React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
+
3
4
  function wrapChildrenInText(TextComponent, propsIn, extraProps) {
4
- const {
5
- children,
6
- textProps,
7
- size,
8
- noTextWrap,
9
- color,
10
- fontFamily,
11
- fontSize,
12
- fontWeight,
13
- letterSpacing,
14
- textAlign,
15
- fontStyle,
16
- ellipsis,
17
- maxFontSizeMultiplier
18
- } = propsIn;
19
- if (noTextWrap || !children) {
20
- return [children];
21
- }
22
- const props = {
23
- ...extraProps
24
- };
25
- if (color) props.color = color;
26
- if (fontFamily) props.fontFamily = fontFamily;
27
- if (fontSize) props.fontSize = fontSize;
28
- if (fontWeight) props.fontWeight = fontWeight;
29
- if (letterSpacing) props.letterSpacing = letterSpacing;
30
- if (textAlign) props.textAlign = textAlign;
31
- if (size) props.size = size;
32
- if (fontStyle) props.fontStyle = fontStyle;
33
- if (ellipsis !== void 0) props.ellipsis = ellipsis;
34
- if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
35
- return React.Children.toArray(children).map((child, index) => {
36
- return typeof child === "string" ?
37
- // so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
38
- /* @__PURE__ */
39
- jsx(TextComponent, {
40
- ...props,
41
- ...textProps,
42
- children: child
43
- }, index) : child;
44
- });
5
+ const { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, ellipsis, maxFontSizeMultiplier } = propsIn;
6
+ if (noTextWrap || !children) {
7
+ return [children];
8
+ }
9
+ const props = { ...extraProps };
10
+ if (color) props.color = color;
11
+ if (fontFamily) props.fontFamily = fontFamily;
12
+ if (fontSize) props.fontSize = fontSize;
13
+ if (fontWeight) props.fontWeight = fontWeight;
14
+ if (letterSpacing) props.letterSpacing = letterSpacing;
15
+ if (textAlign) props.textAlign = textAlign;
16
+ if (size) props.size = size;
17
+ if (fontStyle) props.fontStyle = fontStyle;
18
+ if (ellipsis !== void 0) props.ellipsis = ellipsis;
19
+ if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
20
+ const out = [];
21
+ let run = [];
22
+ let runKey = 0;
23
+ const flushRun = () => {
24
+ if (!run.length) return;
25
+ out.push(/* @__PURE__ */ jsx(TextComponent, {
26
+ ...props,
27
+ ...textProps,
28
+ children: run.length === 1 ? run[0] : run.join("")
29
+ }, `text-${runKey}`));
30
+ run = [];
31
+ };
32
+ React.Children.toArray(children).forEach((child, index) => {
33
+ if (typeof child === "string" || typeof child === "number") {
34
+ if (!run.length) runKey = index;
35
+ run.push(child);
36
+ return;
37
+ }
38
+ flushRun();
39
+ out.push(child);
40
+ });
41
+ flushRun();
42
+ return out;
45
43
  }
44
+
46
45
  export { wrapChildrenInText };
47
46
  //# sourceMappingURL=wrapChildrenInText.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","jsx","wrapChildrenInText","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","ellipsis","maxFontSizeMultiplier","props","Children","toArray","map","child","index"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,OAAOA,KAAA,MAAW;AAuDZ,SAAAC,GAAA;AA9CC,SAASC,mBACdC,aAAA,EACAC,OAAA,EAGAC,UAAA,EACA;EACA,MAAM;IACJC,QAAA;IACAC,SAAA;IACAC,IAAA;IACAC,UAAA;IACAC,KAAA;IACAC,UAAA;IACAC,QAAA;IACAC,UAAA;IACAC,aAAA;IACAC,SAAA;IACAC,SAAA;IACAC,QAAA;IACAC;EACF,IAAId,OAAA;EAEJ,IAAIK,UAAA,IAAc,CAACH,QAAA,EAAU;IAC3B,OAAO,CAACA,QAAQ;EAClB;EAEA,MAAMa,KAAA,GAAQ;IACZ,GAAGd;EACL;EAGA,IAAIK,KAAA,EAAOS,KAAA,CAAMT,KAAA,GAAQA,KAAA;EACzB,IAAIC,UAAA,EAAYQ,KAAA,CAAMR,UAAA,GAAaA,UAAA;EACnC,IAAIC,QAAA,EAAUO,KAAA,CAAMP,QAAA,GAAWA,QAAA;EAC/B,IAAIC,UAAA,EAAYM,KAAA,CAAMN,UAAA,GAAaA,UAAA;EACnC,IAAIC,aAAA,EAAeK,KAAA,CAAML,aAAA,GAAgBA,aAAA;EACzC,IAAIC,SAAA,EAAWI,KAAA,CAAMJ,SAAA,GAAYA,SAAA;EACjC,IAAIP,IAAA,EAAMW,KAAA,CAAMX,IAAA,GAAOA,IAAA;EACvB,IAAIQ,SAAA,EAAWG,KAAA,CAAMH,SAAA,GAAYA,SAAA;EACjC,IAAIC,QAAA,KAAa,QAAWE,KAAA,CAAMF,QAAA,GAAWA,QAAA;EAC7C,IAAIC,qBAAA,IAAyB,MAAMC,KAAA,CAAMD,qBAAA,GAAwBA,qBAAA;EAEjE,OAAOlB,KAAA,CAAMoB,QAAA,CAASC,OAAA,CAAQf,QAAQ,EAAEgB,GAAA,CAAI,CAACC,KAAA,EAAOC,KAAA,KAAU;IAC5D,OAAO,OAAOD,KAAA,KAAU;IAAA;IAEtB;IAAAtB,GAAA,CAACE,aAAA;MAA2B,GAAGgB,KAAA;MAAQ,GAAGZ,SAAA;MACvCD,QAAA,EAAAiB;IAAA,GADiBC,KAEpB,IAEAD,KAAA;EAEJ,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"wrapChildrenInText.js","names":[],"sources":["jsx/wrapChildrenInText.js"],"sourcesContent":["import React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction wrapChildrenInText(TextComponent, propsIn, extraProps) {\n const {\n children,\n textProps,\n size,\n noTextWrap,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n letterSpacing,\n textAlign,\n fontStyle,\n ellipsis,\n maxFontSizeMultiplier\n } = propsIn;\n if (noTextWrap || !children) {\n return [children];\n }\n const props = {\n ...extraProps\n };\n if (color) props.color = color;\n if (fontFamily) props.fontFamily = fontFamily;\n if (fontSize) props.fontSize = fontSize;\n if (fontWeight) props.fontWeight = fontWeight;\n if (letterSpacing) props.letterSpacing = letterSpacing;\n if (textAlign) props.textAlign = textAlign;\n if (size) props.size = size;\n if (fontStyle) props.fontStyle = fontStyle;\n if (ellipsis !== void 0) props.ellipsis = ellipsis;\n if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;\n const out = [];\n let run = [];\n let runKey = 0;\n const flushRun = () => {\n if (!run.length) return;\n out.push(\n // data-disable-theme keeps wrapped text from adding another theme boundary\n /* @__PURE__ */ jsx(TextComponent, { ...props, ...textProps, children: run.length === 1 ? run[0] : run.join(\"\") }, `text-${runKey}`)\n );\n run = [];\n };\n React.Children.toArray(children).forEach((child, index) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n if (!run.length) runKey = index;\n run.push(child);\n return;\n }\n flushRun();\n out.push(child);\n });\n flushRun();\n return out;\n}\nexport {\n wrapChildrenInText\n};\n//# sourceMappingURL=wrapChildrenInText.js.map\n"],"mappings":";;;;AAEA,SAAS,mBAAmB,eAAe,SAAS,YAAY;CAC9D,MAAM,EACJ,UACA,WACA,MACA,YACA,OACA,YACA,UACA,YACA,eACA,WACA,WACA,UACA,0BACE;CACJ,IAAI,cAAc,CAAC,UAAU;EAC3B,OAAO,CAAC,QAAQ;CAClB;CACA,MAAM,QAAQ,EACZ,GAAG,WACL;CACA,IAAI,OAAO,MAAM,QAAQ;CACzB,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,UAAU,MAAM,WAAW;CAC/B,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,MAAM,MAAM,OAAO;CACvB,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,aAAa,KAAK,GAAG,MAAM,WAAW;CAC1C,IAAI,yBAAyB,MAAM,MAAM,wBAAwB;CACjE,MAAM,MAAM,CAAC;CACb,IAAI,MAAM,CAAC;CACX,IAAI,SAAS;CACb,MAAM,iBAAiB;EACrB,IAAI,CAAC,IAAI,QAAQ;EACjB,IAAI,KAEc,oBAAI,eAAe;GAAE,GAAG;GAAO,GAAG;GAAW,UAAU,IAAI,WAAW,IAAI,IAAI,KAAK,IAAI,KAAK,EAAE;EAAE,GAAG,QAAQ,QAAQ,CACrI;EACA,MAAM,CAAC;CACT;CACA,MAAM,SAAS,QAAQ,QAAQ,EAAE,SAAS,OAAO,UAAU;EACzD,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;GAC1D,IAAI,CAAC,IAAI,QAAQ,SAAS;GAC1B,IAAI,KAAK,KAAK;GACd;EACF;EACA,SAAS;EACT,IAAI,KAAK,KAAK;CAChB,CAAC;CACD,SAAS;CACT,OAAO;AACT"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var wrapChildrenInText_exports = {};
31
+ __export(wrapChildrenInText_exports, { wrapChildrenInText: () => wrapChildrenInText });
32
+ module.exports = __toCommonJS(wrapChildrenInText_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_react = __toESM(require("react"), 1);
35
+ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
36
+ var { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, ellipsis, maxFontSizeMultiplier } = propsIn;
37
+ if (noTextWrap || !children) {
38
+ return [children];
39
+ }
40
+ var props = { ...extraProps };
41
+ if (color) props.color = color;
42
+ if (fontFamily) props.fontFamily = fontFamily;
43
+ if (fontSize) props.fontSize = fontSize;
44
+ if (fontWeight) props.fontWeight = fontWeight;
45
+ if (letterSpacing) props.letterSpacing = letterSpacing;
46
+ if (textAlign) props.textAlign = textAlign;
47
+ if (size) props.size = size;
48
+ if (fontStyle) props.fontStyle = fontStyle;
49
+ if (ellipsis !== void 0) props.ellipsis = ellipsis;
50
+ if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
51
+ var out = [];
52
+ var run = [];
53
+ var runKey = 0;
54
+ var flushRun = function() {
55
+ if (!run.length) return;
56
+ out.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
57
+ ...props,
58
+ ...textProps,
59
+ children: run.length === 1 ? run[0] : run.join("")
60
+ }, `text-${runKey}`));
61
+ run = [];
62
+ };
63
+ import_react.default.Children.toArray(children).forEach(function(child, index) {
64
+ if (typeof child === "string" || typeof child === "number") {
65
+ if (!run.length) runKey = index;
66
+ run.push(child);
67
+ return;
68
+ }
69
+ flushRun();
70
+ out.push(child);
71
+ });
72
+ flushRun();
73
+ return out;
74
+ }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,80 +8,69 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var wrapChildrenInText_exports = {};
37
- __export(wrapChildrenInText_exports, {
38
- wrapChildrenInText: () => wrapChildrenInText
39
- });
31
+ __export(wrapChildrenInText_exports, { wrapChildrenInText: () => wrapChildrenInText });
40
32
  module.exports = __toCommonJS(wrapChildrenInText_exports);
41
33
  var import_jsx_runtime = require("react/jsx-runtime");
42
34
  var import_react = __toESM(require("react"), 1);
43
35
  function wrapChildrenInText(TextComponent, propsIn, extraProps) {
44
- var {
45
- children,
46
- textProps,
47
- size,
48
- noTextWrap,
49
- color,
50
- fontFamily,
51
- fontSize,
52
- fontWeight,
53
- letterSpacing,
54
- textAlign,
55
- fontStyle,
56
- ellipsis,
57
- maxFontSizeMultiplier
58
- } = propsIn;
59
- if (noTextWrap || !children) {
60
- return [children];
61
- }
62
- var props = {
63
- ...extraProps
64
- };
65
- if (color) props.color = color;
66
- if (fontFamily) props.fontFamily = fontFamily;
67
- if (fontSize) props.fontSize = fontSize;
68
- if (fontWeight) props.fontWeight = fontWeight;
69
- if (letterSpacing) props.letterSpacing = letterSpacing;
70
- if (textAlign) props.textAlign = textAlign;
71
- if (size) props.size = size;
72
- if (fontStyle) props.fontStyle = fontStyle;
73
- if (ellipsis !== void 0) props.ellipsis = ellipsis;
74
- if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
75
- return import_react.default.Children.toArray(children).map(function (child, index) {
76
- return typeof child === "string" ?
77
- // so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
78
- /* @__PURE__ */
79
- (0, import_jsx_runtime.jsx)(TextComponent, {
80
- ...props,
81
- ...textProps,
82
- children: child
83
- }, index) : child;
84
- });
36
+ var { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, ellipsis, maxFontSizeMultiplier } = propsIn;
37
+ if (noTextWrap || !children) {
38
+ return [children];
39
+ }
40
+ var props = { ...extraProps };
41
+ if (color) props.color = color;
42
+ if (fontFamily) props.fontFamily = fontFamily;
43
+ if (fontSize) props.fontSize = fontSize;
44
+ if (fontWeight) props.fontWeight = fontWeight;
45
+ if (letterSpacing) props.letterSpacing = letterSpacing;
46
+ if (textAlign) props.textAlign = textAlign;
47
+ if (size) props.size = size;
48
+ if (fontStyle) props.fontStyle = fontStyle;
49
+ if (ellipsis !== void 0) props.ellipsis = ellipsis;
50
+ if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
51
+ var out = [];
52
+ var run = [];
53
+ var runKey = 0;
54
+ var flushRun = function() {
55
+ if (!run.length) return;
56
+ out.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
57
+ ...props,
58
+ ...textProps,
59
+ children: run.length === 1 ? run[0] : run.join("")
60
+ }, `text-${runKey}`));
61
+ run = [];
62
+ };
63
+ import_react.default.Children.toArray(children).forEach(function(child, index) {
64
+ if (typeof child === "string" || typeof child === "number") {
65
+ if (!run.length) runKey = index;
66
+ run.push(child);
67
+ return;
68
+ }
69
+ flushRun();
70
+ out.push(child);
71
+ });
72
+ flushRun();
73
+ return out;
85
74
  }
75
+
86
76
  //# sourceMappingURL=wrapChildrenInText.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","wrapChildrenInText_exports","wrapChildrenInText","module","exports","import_jsx_runtime","require","import_react","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","ellipsis","maxFontSizeMultiplier"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAO;;AAuDD,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA;AA9CC,IAAAC,SAAS,GAAAF,MAAA,CAAAG,cACd;AAMA,IAAAC,gBAAM,GAAAJ,MAAA,CAAAK,wBAAA;AAAA,IACJC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAAA,IACAC,YAAA,GAAAR,MAAA,CAAAS,cAAA;AAAA,IACAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACA,IAAAC,IAAA,IAAAD,GAAA,EACAb,SAAA,CAAAY,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACA,IACAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACA,SAAAG,GAAA,IAAAlB,iBAAA,CAAAe,IAAA,GACA,KAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,CAAAiB,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAAA;EAEF,OAAIE,EAAA;AAEJ;AACE,IAAAM,OAAO,GAACA,CAAAC,GAAA,EAAQC,UAAA,EAAAd,MAAA,MAAAA,MAAA,GAAAa,GAAA,WAAA5B,QAAA,CAAAS,YAAA,CAAAmB,GAAA,SAAAR,WAAA;AAClB;AAEA;AAAc;AAEd;AAGAS,UAAW,KAAAD,GAAM,KAAAA,GAAQ,CAAAE,UAAA,GAAA3B,SAAA,CAAAY,MAAA;EAAAgB,KAAA,EAAAH,GAAA;EAAAT,UAAA;AAAA,KAAAJ,MAAA,EACzBa,GACA;AACA,IAAAI,YAAI,GAAYJ,GAAA,IAAMR,WAAa,CAAAjB,SAAA;EAAA4B,KAAA;AAAA,IAAAH,GAAA;AACnC,IAAAK,0BAAyB;AACzBnB,QAAI,CAAAmB,0BAA6B;EACjCC,kBAAgB,EAAAA,CAAA,KAAOA;AACvB;AACAC,MAAI,CAAAC,OAAA,GAAAJ,YAAwB,CAAAC,0BAAiB;AAC7C,IAAAI,kBAAI,GAAAC,OAAyB,oBAAY;AAEzC,IAAAC,YAAa,GAAAZ,OAAS,CAAAW,OAAQ,QAAU,IAAI,CAAC;AAC3C,SAAAJ,kBAAcA,CAAUM,aAAA,EAAAC,OAAA,EAAAC,UAAA;EAAA;IAAAC,QAAA;IAAAC,SAAA;IAAAC,IAAA;IAAAC,UAAA;IAAAC,KAAA;IAAAC,UAAA;IAAAC,QAAA;IAAAC,UAAA;IAAAC,aAAA;IAAAC,SAAA;IAAAC,SAAA;IAAAC,QAAA;IAAAC;EAAA,IAAAd,OAAA;EAAA,IAEtBK,UAAA,KAAAH,QAAC;IAED,OAEA,CAEHA,QAAA,CACH","ignoreList":[]}
1
+ {"version":3,"file":"wrapChildrenInText.native.js","names":[],"sources":["jsx/wrapChildrenInText.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar wrapChildrenInText_exports = {};\n__export(wrapChildrenInText_exports, {\n wrapChildrenInText: () => wrapChildrenInText\n});\nmodule.exports = __toCommonJS(wrapChildrenInText_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction wrapChildrenInText(TextComponent, propsIn, extraProps) {\n var { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, ellipsis, maxFontSizeMultiplier } = propsIn;\n if (noTextWrap || !children) {\n return [\n children\n ];\n }\n var props = {\n ...extraProps\n };\n if (color) props.color = color;\n if (fontFamily) props.fontFamily = fontFamily;\n if (fontSize) props.fontSize = fontSize;\n if (fontWeight) props.fontWeight = fontWeight;\n if (letterSpacing) props.letterSpacing = letterSpacing;\n if (textAlign) props.textAlign = textAlign;\n if (size) props.size = size;\n if (fontStyle) props.fontStyle = fontStyle;\n if (ellipsis !== void 0) props.ellipsis = ellipsis;\n if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;\n var out = [];\n var run = [];\n var runKey = 0;\n var flushRun = function() {\n if (!run.length) return;\n out.push(\n // data-disable-theme keeps wrapped text from adding another theme boundary\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {\n ...props,\n ...textProps,\n children: run.length === 1 ? run[0] : run.join(\"\")\n }, `text-${runKey}`)\n );\n run = [];\n };\n import_react.default.Children.toArray(children).forEach(function(child, index) {\n if (typeof child === \"string\" || typeof child === \"number\") {\n if (!run.length) runKey = index;\n run.push(child);\n return;\n }\n flushRun();\n out.push(child);\n });\n flushRun();\n return out;\n}\n//# sourceMappingURL=wrapChildrenInText.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B,EACnC,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,mBAAmB,eAAe,SAAS,YAAY;CAC9D,IAAI,EAAE,UAAU,WAAW,MAAM,YAAY,OAAO,YAAY,UAAU,YAAY,eAAe,WAAW,WAAW,UAAU,0BAA0B;CAC/J,IAAI,cAAc,CAAC,UAAU;EAC3B,OAAO,CACL,QACF;CACF;CACA,IAAI,QAAQ,EACV,GAAG,WACL;CACA,IAAI,OAAO,MAAM,QAAQ;CACzB,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,UAAU,MAAM,WAAW;CAC/B,IAAI,YAAY,MAAM,aAAa;CACnC,IAAI,eAAe,MAAM,gBAAgB;CACzC,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,MAAM,MAAM,OAAO;CACvB,IAAI,WAAW,MAAM,YAAY;CACjC,IAAI,aAAa,KAAK,GAAG,MAAM,WAAW;CAC1C,IAAI,yBAAyB,MAAM,MAAM,wBAAwB;CACjE,IAAI,MAAM,CAAC;CACX,IAAI,MAAM,CAAC;CACX,IAAI,SAAS;CACb,IAAI,WAAW,WAAW;EACxB,IAAI,CAAC,IAAI,QAAQ;EACjB,IAAI,KAEc,iBAAC,GAAG,mBAAmB,KAAK,eAAe;GACzD,GAAG;GACH,GAAG;GACH,UAAU,IAAI,WAAW,IAAI,IAAI,KAAK,IAAI,KAAK,EAAE;EACnD,GAAG,QAAQ,QAAQ,CACrB;EACA,MAAM,CAAC;CACT;CACA,aAAa,QAAQ,SAAS,QAAQ,QAAQ,EAAE,QAAQ,SAAS,OAAO,OAAO;EAC7E,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;GAC1D,IAAI,CAAC,IAAI,QAAQ,SAAS;GAC1B,IAAI,KAAK,KAAK;GACd;EACF;EACA,SAAS;EACT,IAAI,KAAK,KAAK;CAChB,CAAC;CACD,SAAS;CACT,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/text",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.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": "2.7.7",
39
- "@tamagui/helpers-tamagui": "2.7.7",
40
- "@tamagui/web": "2.7.7"
38
+ "@tamagui/get-font-sized": "3.0.0-beta.643.1",
39
+ "@tamagui/helpers-tamagui": "3.0.0-beta.643.1",
40
+ "@tamagui/web": "3.0.0-beta.643.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@tamagui/build": "2.7.7",
43
+ "@tamagui/build": "3.0.0-beta.643.1",
44
44
  "react": ">=19"
45
45
  },
46
46
  "peerDependencies": {