@tamagui/text 1.14.1 → 1.14.3

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 (63) hide show
  1. package/dist/cjs/Headings.js +79 -1
  2. package/dist/cjs/Headings.js.map +2 -2
  3. package/dist/cjs/Paragraph.js +36 -1
  4. package/dist/cjs/Paragraph.js.map +2 -2
  5. package/dist/cjs/SizableText.js +39 -1
  6. package/dist/cjs/SizableText.js.map +2 -2
  7. package/dist/cjs/index.js +22 -1
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/types.js +16 -1
  10. package/dist/cjs/types.js.map +2 -2
  11. package/dist/cjs/wrapChildrenInText.js +103 -1
  12. package/dist/cjs/wrapChildrenInText.js.map +2 -2
  13. package/dist/cjs/wrapChildrenInText.test.js +30 -1
  14. package/dist/cjs/wrapChildrenInText.test.js.map +2 -2
  15. package/dist/esm/Headings.js +49 -1
  16. package/dist/esm/Headings.js.map +2 -2
  17. package/dist/esm/Headings.mjs +49 -1
  18. package/dist/esm/Headings.mjs.map +2 -2
  19. package/dist/esm/Paragraph.js +12 -1
  20. package/dist/esm/Paragraph.js.map +2 -2
  21. package/dist/esm/Paragraph.mjs +12 -1
  22. package/dist/esm/Paragraph.mjs.map +2 -2
  23. package/dist/esm/SizableText.js +15 -1
  24. package/dist/esm/SizableText.js.map +2 -2
  25. package/dist/esm/SizableText.mjs +15 -1
  26. package/dist/esm/SizableText.mjs.map +2 -2
  27. package/dist/esm/index.js +5 -1
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/index.mjs +5 -1
  30. package/dist/esm/index.mjs.map +1 -1
  31. package/dist/esm/wrapChildrenInText.js +69 -1
  32. package/dist/esm/wrapChildrenInText.js.map +2 -2
  33. package/dist/esm/wrapChildrenInText.mjs +69 -1
  34. package/dist/esm/wrapChildrenInText.mjs.map +2 -2
  35. package/dist/esm/wrapChildrenInText.test.js +29 -1
  36. package/dist/esm/wrapChildrenInText.test.js.map +2 -2
  37. package/dist/esm/wrapChildrenInText.test.mjs +29 -1
  38. package/dist/esm/wrapChildrenInText.test.mjs.map +2 -2
  39. package/dist/jsx/Headings.js +49 -1
  40. package/dist/jsx/Headings.js.map +2 -2
  41. package/dist/jsx/Headings.mjs +49 -1
  42. package/dist/jsx/Headings.mjs.map +2 -2
  43. package/dist/jsx/Paragraph.js +12 -1
  44. package/dist/jsx/Paragraph.js.map +2 -2
  45. package/dist/jsx/Paragraph.mjs +12 -1
  46. package/dist/jsx/Paragraph.mjs.map +2 -2
  47. package/dist/jsx/SizableText.js +15 -1
  48. package/dist/jsx/SizableText.js.map +2 -2
  49. package/dist/jsx/SizableText.mjs +15 -1
  50. package/dist/jsx/SizableText.mjs.map +2 -2
  51. package/dist/jsx/index.js +5 -1
  52. package/dist/jsx/index.js.map +1 -1
  53. package/dist/jsx/index.mjs +5 -1
  54. package/dist/jsx/index.mjs.map +1 -1
  55. package/dist/jsx/wrapChildrenInText.js +68 -1
  56. package/dist/jsx/wrapChildrenInText.js.map +2 -2
  57. package/dist/jsx/wrapChildrenInText.mjs +68 -1
  58. package/dist/jsx/wrapChildrenInText.mjs.map +2 -2
  59. package/dist/jsx/wrapChildrenInText.test.js +28 -1
  60. package/dist/jsx/wrapChildrenInText.test.js.map +2 -2
  61. package/dist/jsx/wrapChildrenInText.test.mjs +28 -1
  62. package/dist/jsx/wrapChildrenInText.test.mjs.map +2 -2
  63. package/package.json +5 -5
@@ -1,2 +1,13 @@
1
- import{styled as r}from"@tamagui/web";import{SizableText as a}from"./SizableText";const p=r(a,{name:"Paragraph",tag:"p",userSelect:"auto",color:"$color",size:"$true"});export{p as Paragraph};
1
+ import { styled } from "@tamagui/web";
2
+ import { SizableText } from "./SizableText";
3
+ const Paragraph = styled(SizableText, {
4
+ name: "Paragraph",
5
+ tag: "p",
6
+ userSelect: "auto",
7
+ color: "$color",
8
+ size: "$true"
9
+ });
10
+ export {
11
+ Paragraph
12
+ };
2
13
  //# sourceMappingURL=Paragraph.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Paragraph.tsx"],
4
4
  "sourcesContent": ["import { GetProps, styled } from '@tamagui/web'\n\nimport { SizableText } from './SizableText'\n\nexport const Paragraph = styled(SizableText, {\n name: 'Paragraph',\n tag: 'p',\n userSelect: 'auto',\n color: '$color',\n size: '$true',\n})\n\nexport type ParagraphProps = GetProps<typeof Paragraph>\n"],
5
- "mappings": "AAAA,OAAmB,UAAAA,MAAc,eAEjC,OAAS,eAAAC,MAAmB,gBAErB,MAAMC,EAAYF,EAAOC,EAAa,CAC3C,KAAM,YACN,IAAK,IACL,WAAY,OACZ,MAAO,SACP,KAAM,OACR,CAAC",
6
- "names": ["styled", "SizableText", "Paragraph"]
5
+ "mappings": "AAAA,SAAmB,cAAc;AAEjC,SAAS,mBAAmB;AAErB,MAAM,YAAY,OAAO,aAAa;AAAA,EAC3C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AACR,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,16 @@
1
- import{getFontSized as e}from"@tamagui/get-font-sized";import{Text as t,styled as o}from"@tamagui/web";const s=o(t,{name:"SizableText",fontFamily:"$body",variants:{size:e},defaultVariants:{size:"$true"}});export{s as SizableText};
1
+ import { getFontSized } from "@tamagui/get-font-sized";
2
+ import { Text, styled } from "@tamagui/web";
3
+ const SizableText = styled(Text, {
4
+ name: "SizableText",
5
+ fontFamily: "$body",
6
+ variants: {
7
+ size: getFontSized
8
+ },
9
+ defaultVariants: {
10
+ size: "$true"
11
+ }
12
+ });
13
+ export {
14
+ SizableText
15
+ };
2
16
  //# sourceMappingURL=SizableText.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableText.tsx"],
4
4
  "sourcesContent": ["import { getFontSized } from '@tamagui/get-font-sized'\nimport { GetProps, Text, styled } from '@tamagui/web'\n\nexport const SizableText = styled(Text, {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFontSized,\n } as const,\n\n defaultVariants: {\n size: '$true',\n },\n})\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
- "mappings": "AAAA,OAAS,gBAAAA,MAAoB,0BAC7B,OAAmB,QAAAC,EAAM,UAAAC,MAAc,eAEhC,MAAMC,EAAcD,EAAOD,EAAM,CACtC,KAAM,cACN,WAAY,QAEZ,SAAU,CACR,KAAMD,CACR,EAEA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC",
6
- "names": ["getFontSized", "Text", "styled", "SizableText"]
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAmB,MAAM,cAAc;AAEhC,MAAM,cAAc,OAAO,MAAM;AAAA,EACtC,MAAM;AAAA,EACN,YAAY;AAAA,EAEZ,UAAU;AAAA,IACR,MAAM;AAAA,EACR;AAAA,EAEA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,16 @@
1
- import{getFontSized as e}from"@tamagui/get-font-sized";import{Text as t,styled as o}from"@tamagui/web";const s=o(t,{name:"SizableText",fontFamily:"$body",variants:{size:e},defaultVariants:{size:"$true"}});export{s as SizableText};
1
+ import { getFontSized } from "@tamagui/get-font-sized";
2
+ import { Text, styled } from "@tamagui/web";
3
+ const SizableText = styled(Text, {
4
+ name: "SizableText",
5
+ fontFamily: "$body",
6
+ variants: {
7
+ size: getFontSized
8
+ },
9
+ defaultVariants: {
10
+ size: "$true"
11
+ }
12
+ });
13
+ export {
14
+ SizableText
15
+ };
2
16
  //# sourceMappingURL=SizableText.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableText.tsx"],
4
4
  "sourcesContent": ["import { getFontSized } from '@tamagui/get-font-sized'\nimport { GetProps, Text, styled } from '@tamagui/web'\n\nexport const SizableText = styled(Text, {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFontSized,\n } as const,\n\n defaultVariants: {\n size: '$true',\n },\n})\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
- "mappings": "AAAA,OAAS,gBAAAA,MAAoB,0BAC7B,OAAmB,QAAAC,EAAM,UAAAC,MAAc,eAEhC,MAAMC,EAAcD,EAAOD,EAAM,CACtC,KAAM,cACN,WAAY,QAEZ,SAAU,CACR,KAAMD,CACR,EAEA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC",
6
- "names": ["getFontSized", "Text", "styled", "SizableText"]
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAmB,MAAM,cAAc;AAEhC,MAAM,cAAc,OAAO,MAAM;AAAA,EACtC,MAAM;AAAA,EACN,YAAY;AAAA,EAEZ,UAAU;AAAA,IACR,MAAM;AAAA,EACR;AAAA,EAEA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;",
6
+ "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,2 +1,6 @@
1
- export*from"./SizableText";export*from"./Paragraph";export*from"./Headings";export*from"./wrapChildrenInText";export*from"./types";
1
+ export * from "./SizableText";
2
+ export * from "./Paragraph";
3
+ export * from "./Headings";
4
+ export * from "./wrapChildrenInText";
5
+ export * from "./types";
2
6
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './SizableText'\nexport * from './Paragraph'\nexport * from './Headings'\nexport * from './wrapChildrenInText'\nexport * from './types'\n"],
5
- "mappings": "AAAA,WAAc,gBACd,WAAc,cACd,WAAc,aACd,WAAc,uBACd,WAAc",
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,6 @@
1
- export*from"./SizableText";export*from"./Paragraph";export*from"./Headings";export*from"./wrapChildrenInText";export*from"./types";
1
+ export * from "./SizableText";
2
+ export * from "./Paragraph";
3
+ export * from "./Headings";
4
+ export * from "./wrapChildrenInText";
5
+ export * from "./types";
2
6
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './SizableText'\nexport * from './Paragraph'\nexport * from './Headings'\nexport * from './wrapChildrenInText'\nexport * from './types'\n"],
5
- "mappings": "AAAA,WAAc,gBACd,WAAc,cACd,WAAc,aACd,WAAc,uBACd,WAAc",
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,70 @@
1
- import{jsx as P}from"react/jsx-runtime";import C from"react";function W(d,x,m){const{children:i,textProps:u,size:l,noTextWrap:z,color:s,fontFamily:f,fontSize:c,fontWeight:a,letterSpacing:p,textAlign:h,fontStyle:g}=x;if(z||!i)return[i];const T=C.Children.toArray(i),e=[];let o=!1;const t={...m};s&&(t.color=s),f&&(t.fontFamily=f),c&&(t.fontSize=c),a&&(t.fontWeight=a),p&&(t.letterSpacing=p),h&&(t.textAlign=h),l&&(t.size=l),g&&(t.fontStyle=g);function y(){if(!o)return;const n=e.length-1,r=e[n];e[n]=P(d,{...t,...u,children:r},n)}for(const n of T){const r=e[e.length-1],S=typeof n=="string";S?o?r.push(n):e.push([n]):(y(),e.push(n)),o=S}return y(),e}export{W as wrapChildrenInText};
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ 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
+ } = propsIn;
17
+ if (noTextWrap || !children) {
18
+ return [children];
19
+ }
20
+ const allChildren = React.Children.toArray(children);
21
+ const nextChildren = [];
22
+ let lastIsString = false;
23
+ const props = {
24
+ ...extraProps
25
+ };
26
+ if (color)
27
+ props.color = color;
28
+ if (fontFamily)
29
+ props.fontFamily = fontFamily;
30
+ if (fontSize)
31
+ props.fontSize = fontSize;
32
+ if (fontWeight)
33
+ props.fontWeight = fontWeight;
34
+ if (letterSpacing)
35
+ props.letterSpacing = letterSpacing;
36
+ if (textAlign)
37
+ props.textAlign = textAlign;
38
+ if (size)
39
+ props.size = size;
40
+ if (fontStyle)
41
+ props.fontStyle = fontStyle;
42
+ function concatStringChildren() {
43
+ if (!lastIsString)
44
+ return;
45
+ const index = nextChildren.length - 1;
46
+ const childrenStrings = nextChildren[index];
47
+ nextChildren[index] = /* @__PURE__ */ jsx(TextComponent, { ...props, ...textProps, children: childrenStrings }, index);
48
+ }
49
+ for (const child of allChildren) {
50
+ const last = nextChildren[nextChildren.length - 1];
51
+ const isString = typeof child === "string";
52
+ if (isString) {
53
+ if (lastIsString) {
54
+ last.push(child);
55
+ } else {
56
+ nextChildren.push([child]);
57
+ }
58
+ } else {
59
+ concatStringChildren();
60
+ nextChildren.push(child);
61
+ }
62
+ lastIsString = isString;
63
+ }
64
+ concatStringChildren();
65
+ return nextChildren;
66
+ }
67
+ export {
68
+ wrapChildrenInText
69
+ };
2
70
  //# sourceMappingURL=wrapChildrenInText.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/wrapChildrenInText.tsx"],
4
4
  "sourcesContent": ["import type { SizeTokens } from '@tamagui/web'\nimport React from 'react'\n\nimport { TextParentStyles } from './types'\n\ntype Props = TextParentStyles & {\n children?: React.ReactNode\n size?: SizeTokens\n}\n\nexport function wrapChildrenInText(\n TextComponent: any,\n propsIn: Props & {\n unstyled?: boolean\n },\n extraProps?: Record<string, any>\n) {\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 } = propsIn\n\n if (noTextWrap || !children) {\n return [children]\n }\n\n // in the case of using variables, like so:\n // <ListItem>Hello, {name}</ListItem>\n // it gives us props.children as ['Hello, ', 'name']\n // but we don't want to wrap multiple SizableText around each part\n // so we group them\n const allChildren = React.Children.toArray(children)\n const nextChildren: any[] = []\n let lastIsString = false\n const props = {\n ...extraProps,\n }\n\n // to avoid setting undefined\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\n function concatStringChildren() {\n if (!lastIsString) return\n const index = nextChildren.length - 1\n const childrenStrings = nextChildren[index]\n nextChildren[index] = (\n <TextComponent key={index} {...props} {...textProps}>\n {childrenStrings}\n </TextComponent>\n )\n }\n\n for (const child of allChildren) {\n const last = nextChildren[nextChildren.length - 1]\n const isString = typeof child === 'string'\n if (isString) {\n if (lastIsString) {\n last.push(child)\n } else {\n nextChildren.push([child])\n }\n } else {\n concatStringChildren()\n nextChildren.push(child)\n }\n lastIsString = isString\n }\n concatStringChildren()\n\n return nextChildren\n}\n"],
5
- "mappings": "AA8DM,cAAAA,MAAA,oBA7DN,OAAOC,MAAW,QASX,SAASC,EACdC,EACAC,EAGAC,EACA,CACA,KAAM,CACJ,SAAAC,EACA,UAAAC,EACA,KAAAC,EACA,WAAAC,EACA,MAAAC,EACA,WAAAC,EACA,SAAAC,EACA,WAAAC,EACA,cAAAC,EACA,UAAAC,EACA,UAAAC,CACF,EAAIZ,EAEJ,GAAIK,GAAc,CAACH,EACjB,MAAO,CAACA,CAAQ,EAQlB,MAAMW,EAAchB,EAAM,SAAS,QAAQK,CAAQ,EAC7CY,EAAsB,CAAC,EAC7B,IAAIC,EAAe,GACnB,MAAMC,EAAQ,CACZ,GAAGf,CACL,EAGIK,IAAOU,EAAM,MAAQV,GACrBC,IAAYS,EAAM,WAAaT,GAC/BC,IAAUQ,EAAM,SAAWR,GAC3BC,IAAYO,EAAM,WAAaP,GAC/BC,IAAeM,EAAM,cAAgBN,GACrCC,IAAWK,EAAM,UAAYL,GAC7BP,IAAMY,EAAM,KAAOZ,GACnBQ,IAAWI,EAAM,UAAYJ,GAEjC,SAASK,GAAuB,CAC9B,GAAI,CAACF,EAAc,OACnB,MAAMG,EAAQJ,EAAa,OAAS,EAC9BK,EAAkBL,EAAaI,CAAK,EAC1CJ,EAAaI,CAAK,EAChBtB,EAACG,EAAA,CAA2B,GAAGiB,EAAQ,GAAGb,EACvC,SAAAgB,GADiBD,CAEpB,CAEJ,CAEA,UAAWE,KAASP,EAAa,CAC/B,MAAMQ,EAAOP,EAAaA,EAAa,OAAS,CAAC,EAC3CQ,EAAW,OAAOF,GAAU,SAC9BE,EACEP,EACFM,EAAK,KAAKD,CAAK,EAEfN,EAAa,KAAK,CAACM,CAAK,CAAC,GAG3BH,EAAqB,EACrBH,EAAa,KAAKM,CAAK,GAEzBL,EAAeO,CACjB,CACA,OAAAL,EAAqB,EAEdH,CACT",
6
- "names": ["jsx", "React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "allChildren", "nextChildren", "lastIsString", "props", "concatStringChildren", "index", "childrenStrings", "child", "last", "isString"]
5
+ "mappings": "AA8DM;AA7DN,OAAO,WAAW;AASX,SAAS,mBACd,eACA,SAGA,YACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,MAAI,cAAc,CAAC,UAAU;AAC3B,WAAO,CAAC,QAAQ;AAAA,EAClB;AAOA,QAAM,cAAc,MAAM,SAAS,QAAQ,QAAQ;AACnD,QAAM,eAAsB,CAAC;AAC7B,MAAI,eAAe;AACnB,QAAM,QAAQ;AAAA,IACZ,GAAG;AAAA,EACL;AAGA,MAAI;AAAO,UAAM,QAAQ;AACzB,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAU,UAAM,WAAW;AAC/B,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAe,UAAM,gBAAgB;AACzC,MAAI;AAAW,UAAM,YAAY;AACjC,MAAI;AAAM,UAAM,OAAO;AACvB,MAAI;AAAW,UAAM,YAAY;AAEjC,WAAS,uBAAuB;AAC9B,QAAI,CAAC;AAAc;AACnB,UAAM,QAAQ,aAAa,SAAS;AACpC,UAAM,kBAAkB,aAAa,KAAK;AAC1C,iBAAa,KAAK,IAChB,oBAAC,iBAA2B,GAAG,OAAQ,GAAG,WACvC,6BADiB,KAEpB;AAAA,EAEJ;AAEA,aAAW,SAAS,aAAa;AAC/B,UAAM,OAAO,aAAa,aAAa,SAAS,CAAC;AACjD,UAAM,WAAW,OAAO,UAAU;AAClC,QAAI,UAAU;AACZ,UAAI,cAAc;AAChB,aAAK,KAAK,KAAK;AAAA,MACjB,OAAO;AACL,qBAAa,KAAK,CAAC,KAAK,CAAC;AAAA,MAC3B;AAAA,IACF,OAAO;AACL,2BAAqB;AACrB,mBAAa,KAAK,KAAK;AAAA,IACzB;AACA,mBAAe;AAAA,EACjB;AACA,uBAAqB;AAErB,SAAO;AACT;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,70 @@
1
- import{jsx as P}from"react/jsx-runtime";import C from"react";function W(d,x,m){const{children:i,textProps:u,size:l,noTextWrap:z,color:s,fontFamily:f,fontSize:c,fontWeight:a,letterSpacing:p,textAlign:h,fontStyle:g}=x;if(z||!i)return[i];const T=C.Children.toArray(i),e=[];let o=!1;const t={...m};s&&(t.color=s),f&&(t.fontFamily=f),c&&(t.fontSize=c),a&&(t.fontWeight=a),p&&(t.letterSpacing=p),h&&(t.textAlign=h),l&&(t.size=l),g&&(t.fontStyle=g);function y(){if(!o)return;const n=e.length-1,r=e[n];e[n]=P(d,{...t,...u,children:r},n)}for(const n of T){const r=e[e.length-1],S=typeof n=="string";S?o?r.push(n):e.push([n]):(y(),e.push(n)),o=S}return y(),e}export{W as wrapChildrenInText};
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ 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
+ } = propsIn;
17
+ if (noTextWrap || !children) {
18
+ return [children];
19
+ }
20
+ const allChildren = React.Children.toArray(children);
21
+ const nextChildren = [];
22
+ let lastIsString = false;
23
+ const props = {
24
+ ...extraProps
25
+ };
26
+ if (color)
27
+ props.color = color;
28
+ if (fontFamily)
29
+ props.fontFamily = fontFamily;
30
+ if (fontSize)
31
+ props.fontSize = fontSize;
32
+ if (fontWeight)
33
+ props.fontWeight = fontWeight;
34
+ if (letterSpacing)
35
+ props.letterSpacing = letterSpacing;
36
+ if (textAlign)
37
+ props.textAlign = textAlign;
38
+ if (size)
39
+ props.size = size;
40
+ if (fontStyle)
41
+ props.fontStyle = fontStyle;
42
+ function concatStringChildren() {
43
+ if (!lastIsString)
44
+ return;
45
+ const index = nextChildren.length - 1;
46
+ const childrenStrings = nextChildren[index];
47
+ nextChildren[index] = /* @__PURE__ */ jsx(TextComponent, { ...props, ...textProps, children: childrenStrings }, index);
48
+ }
49
+ for (const child of allChildren) {
50
+ const last = nextChildren[nextChildren.length - 1];
51
+ const isString = typeof child === "string";
52
+ if (isString) {
53
+ if (lastIsString) {
54
+ last.push(child);
55
+ } else {
56
+ nextChildren.push([child]);
57
+ }
58
+ } else {
59
+ concatStringChildren();
60
+ nextChildren.push(child);
61
+ }
62
+ lastIsString = isString;
63
+ }
64
+ concatStringChildren();
65
+ return nextChildren;
66
+ }
67
+ export {
68
+ wrapChildrenInText
69
+ };
2
70
  //# sourceMappingURL=wrapChildrenInText.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/wrapChildrenInText.tsx"],
4
4
  "sourcesContent": ["import type { SizeTokens } from '@tamagui/web'\nimport React from 'react'\n\nimport { TextParentStyles } from './types'\n\ntype Props = TextParentStyles & {\n children?: React.ReactNode\n size?: SizeTokens\n}\n\nexport function wrapChildrenInText(\n TextComponent: any,\n propsIn: Props & {\n unstyled?: boolean\n },\n extraProps?: Record<string, any>\n) {\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 } = propsIn\n\n if (noTextWrap || !children) {\n return [children]\n }\n\n // in the case of using variables, like so:\n // <ListItem>Hello, {name}</ListItem>\n // it gives us props.children as ['Hello, ', 'name']\n // but we don't want to wrap multiple SizableText around each part\n // so we group them\n const allChildren = React.Children.toArray(children)\n const nextChildren: any[] = []\n let lastIsString = false\n const props = {\n ...extraProps,\n }\n\n // to avoid setting undefined\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\n function concatStringChildren() {\n if (!lastIsString) return\n const index = nextChildren.length - 1\n const childrenStrings = nextChildren[index]\n nextChildren[index] = (\n <TextComponent key={index} {...props} {...textProps}>\n {childrenStrings}\n </TextComponent>\n )\n }\n\n for (const child of allChildren) {\n const last = nextChildren[nextChildren.length - 1]\n const isString = typeof child === 'string'\n if (isString) {\n if (lastIsString) {\n last.push(child)\n } else {\n nextChildren.push([child])\n }\n } else {\n concatStringChildren()\n nextChildren.push(child)\n }\n lastIsString = isString\n }\n concatStringChildren()\n\n return nextChildren\n}\n"],
5
- "mappings": "AA8DM,cAAAA,MAAA,oBA7DN,OAAOC,MAAW,QASX,SAASC,EACdC,EACAC,EAGAC,EACA,CACA,KAAM,CACJ,SAAAC,EACA,UAAAC,EACA,KAAAC,EACA,WAAAC,EACA,MAAAC,EACA,WAAAC,EACA,SAAAC,EACA,WAAAC,EACA,cAAAC,EACA,UAAAC,EACA,UAAAC,CACF,EAAIZ,EAEJ,GAAIK,GAAc,CAACH,EACjB,MAAO,CAACA,CAAQ,EAQlB,MAAMW,EAAchB,EAAM,SAAS,QAAQK,CAAQ,EAC7CY,EAAsB,CAAC,EAC7B,IAAIC,EAAe,GACnB,MAAMC,EAAQ,CACZ,GAAGf,CACL,EAGIK,IAAOU,EAAM,MAAQV,GACrBC,IAAYS,EAAM,WAAaT,GAC/BC,IAAUQ,EAAM,SAAWR,GAC3BC,IAAYO,EAAM,WAAaP,GAC/BC,IAAeM,EAAM,cAAgBN,GACrCC,IAAWK,EAAM,UAAYL,GAC7BP,IAAMY,EAAM,KAAOZ,GACnBQ,IAAWI,EAAM,UAAYJ,GAEjC,SAASK,GAAuB,CAC9B,GAAI,CAACF,EAAc,OACnB,MAAMG,EAAQJ,EAAa,OAAS,EAC9BK,EAAkBL,EAAaI,CAAK,EAC1CJ,EAAaI,CAAK,EAChBtB,EAACG,EAAA,CAA2B,GAAGiB,EAAQ,GAAGb,EACvC,SAAAgB,GADiBD,CAEpB,CAEJ,CAEA,UAAWE,KAASP,EAAa,CAC/B,MAAMQ,EAAOP,EAAaA,EAAa,OAAS,CAAC,EAC3CQ,EAAW,OAAOF,GAAU,SAC9BE,EACEP,EACFM,EAAK,KAAKD,CAAK,EAEfN,EAAa,KAAK,CAACM,CAAK,CAAC,GAG3BH,EAAqB,EACrBH,EAAa,KAAKM,CAAK,GAEzBL,EAAeO,CACjB,CACA,OAAAL,EAAqB,EAEdH,CACT",
6
- "names": ["jsx", "React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "allChildren", "nextChildren", "lastIsString", "props", "concatStringChildren", "index", "childrenStrings", "child", "last", "isString"]
5
+ "mappings": "AA8DM;AA7DN,OAAO,WAAW;AASX,SAAS,mBACd,eACA,SAGA,YACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,MAAI,cAAc,CAAC,UAAU;AAC3B,WAAO,CAAC,QAAQ;AAAA,EAClB;AAOA,QAAM,cAAc,MAAM,SAAS,QAAQ,QAAQ;AACnD,QAAM,eAAsB,CAAC;AAC7B,MAAI,eAAe;AACnB,QAAM,QAAQ;AAAA,IACZ,GAAG;AAAA,EACL;AAGA,MAAI;AAAO,UAAM,QAAQ;AACzB,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAU,UAAM,WAAW;AAC/B,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAe,UAAM,gBAAgB;AACzC,MAAI;AAAW,UAAM,YAAY;AACjC,MAAI;AAAM,UAAM,OAAO;AACvB,MAAI;AAAW,UAAM,YAAY;AAEjC,WAAS,uBAAuB;AAC9B,QAAI,CAAC;AAAc;AACnB,UAAM,QAAQ,aAAa,SAAS;AACpC,UAAM,kBAAkB,aAAa,KAAK;AAC1C,iBAAa,KAAK,IAChB,oBAAC,iBAA2B,GAAG,OAAQ,GAAG,WACvC,6BADiB,KAEpB;AAAA,EAEJ;AAEA,aAAW,SAAS,aAAa;AAC/B,UAAM,OAAO,aAAa,aAAa,SAAS,CAAC;AACjD,UAAM,WAAW,OAAO,UAAU;AAClC,QAAI,UAAU;AACZ,UAAI,cAAc;AAChB,aAAK,KAAK,KAAK;AAAA,MACjB,OAAO;AACL,qBAAa,KAAK,CAAC,KAAK,CAAC;AAAA,MAC3B;AAAA,IACF,OAAO;AACL,2BAAqB;AACrB,mBAAa,KAAK,KAAK;AAAA,IACzB;AACA,mBAAe;AAAA,EACjB;AACA,uBAAqB;AAErB,SAAO;AACT;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,30 @@
1
- import{jsx as i}from"react/jsx-runtime";import{expect as o,test as d}from"vitest";import{wrapChildrenInText as e}from"./wrapChildrenInText";const r=()=>{},a=i("div",{"data-id":Math.random()}),p=a.props["data-id"];d("should wrap all string children, not wrap others",()=>{const t=e(r,{children:[a,"a","b",a,"c",a,"d"]});o(t[0].props["data-id"]).toBe(p),o(t[1].type).toBe(r),o(t[1].props.children).toStrictEqual(["a","b"]),o(t[2].props["data-id"]).toBe(p),o(t[3].type).toBe(r),o(t[3].props.children).toStrictEqual(["c"]),o(t[4].props["data-id"]).toBe(p),o(t[5].type).toBe(r),o(t[5].props.children).toStrictEqual(["d"])}),d("should first child string",()=>{const t=e(r,{children:["a",a]});o(t[0].type).toBe(r),o(t[0].props.children).toStrictEqual(["a"]),o(t[1].props["data-id"]).toBe(p)});
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { expect, test } from "vitest";
3
+ import { wrapChildrenInText } from "./wrapChildrenInText";
4
+ const Comp = () => {
5
+ };
6
+ const re = /* @__PURE__ */ jsx("div", { "data-id": Math.random() });
7
+ const reID = re.props["data-id"];
8
+ test("should wrap all string children, not wrap others", () => {
9
+ const out = wrapChildrenInText(Comp, {
10
+ children: [re, "a", "b", re, "c", re, "d"]
11
+ });
12
+ expect(out[0].props["data-id"]).toBe(reID);
13
+ expect(out[1].type).toBe(Comp);
14
+ expect(out[1].props.children).toStrictEqual(["a", "b"]);
15
+ expect(out[2].props["data-id"]).toBe(reID);
16
+ expect(out[3].type).toBe(Comp);
17
+ expect(out[3].props.children).toStrictEqual(["c"]);
18
+ expect(out[4].props["data-id"]).toBe(reID);
19
+ expect(out[5].type).toBe(Comp);
20
+ expect(out[5].props.children).toStrictEqual(["d"]);
21
+ });
22
+ test("should first child string", () => {
23
+ const out = wrapChildrenInText(Comp, {
24
+ children: ["a", re]
25
+ });
26
+ expect(out[0].type).toBe(Comp);
27
+ expect(out[0].props.children).toStrictEqual(["a"]);
28
+ expect(out[1].props["data-id"]).toBe(reID);
29
+ });
2
30
  //# sourceMappingURL=wrapChildrenInText.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/wrapChildrenInText.test.tsx"],
4
4
  "sourcesContent": ["import React from 'react'\nimport { expect, test } from 'vitest'\n\nimport { wrapChildrenInText } from './wrapChildrenInText'\n\nconst Comp = () => {}\nconst re = <div data-id={Math.random()} />\nconst reID = re.props['data-id']\n\ntest('should wrap all string children, not wrap others', () => {\n const out = wrapChildrenInText(Comp, {\n children: [re, 'a', 'b', re, 'c', re, 'd'],\n }) as any\n\n expect(out[0].props['data-id']).toBe(reID)\n\n expect(out[1].type).toBe(Comp)\n expect(out[1].props.children).toStrictEqual(['a', 'b'])\n\n expect(out[2].props['data-id']).toBe(reID)\n\n expect(out[3].type).toBe(Comp)\n expect(out[3].props.children).toStrictEqual(['c'])\n\n expect(out[4].props['data-id']).toBe(reID)\n\n expect(out[5].type).toBe(Comp)\n expect(out[5].props.children).toStrictEqual(['d'])\n})\n\ntest('should first child string', () => {\n const out = wrapChildrenInText(Comp, {\n children: ['a', re],\n }) as any\n\n expect(out[0].type).toBe(Comp)\n expect(out[0].props.children).toStrictEqual(['a'])\n\n expect(out[1].props['data-id']).toBe(reID)\n})\n"],
5
- "mappings": "AAMW,cAAAA,MAAA,oBALX,OAAS,UAAAC,EAAQ,QAAAC,MAAY,SAE7B,OAAS,sBAAAC,MAA0B,uBAEnC,MAAMC,EAAO,IAAM,CAAC,EACdC,EAAKL,EAAC,OAAI,UAAS,KAAK,OAAO,EAAG,EAClCM,EAAOD,EAAG,MAAM,SAAS,EAE/BH,EAAK,mDAAoD,IAAM,CAC7D,MAAMK,EAAMJ,EAAmBC,EAAM,CACnC,SAAU,CAACC,EAAI,IAAK,IAAKA,EAAI,IAAKA,EAAI,GAAG,CAC3C,CAAC,EAEDJ,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,IAAK,GAAG,CAAC,EAEtDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,EAEjDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CACnD,CAAC,EAEDL,EAAK,4BAA6B,IAAM,CACtC,MAAMK,EAAMJ,EAAmBC,EAAM,CACnC,SAAU,CAAC,IAAKC,CAAE,CACpB,CAAC,EAEDJ,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,EAEjDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,CAC3C,CAAC",
6
- "names": ["jsx", "expect", "test", "wrapChildrenInText", "Comp", "re", "reID", "out"]
5
+ "mappings": "AAMW;AALX,SAAS,QAAQ,YAAY;AAE7B,SAAS,0BAA0B;AAEnC,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,KAAK,oBAAC,SAAI,WAAS,KAAK,OAAO,GAAG;AACxC,MAAM,OAAO,GAAG,MAAM,SAAS;AAE/B,KAAK,oDAAoD,MAAM;AAC7D,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG;AAAA,EAC3C,CAAC;AAED,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,KAAK,GAAG,CAAC;AAEtD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AACnD,CAAC;AAED,KAAK,6BAA6B,MAAM;AACtC,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,KAAK,EAAE;AAAA,EACpB,CAAC;AAED,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAC3C,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,30 @@
1
- import{jsx as i}from"react/jsx-runtime";import{expect as o,test as d}from"vitest";import{wrapChildrenInText as e}from"./wrapChildrenInText";const r=()=>{},a=i("div",{"data-id":Math.random()}),p=a.props["data-id"];d("should wrap all string children, not wrap others",()=>{const t=e(r,{children:[a,"a","b",a,"c",a,"d"]});o(t[0].props["data-id"]).toBe(p),o(t[1].type).toBe(r),o(t[1].props.children).toStrictEqual(["a","b"]),o(t[2].props["data-id"]).toBe(p),o(t[3].type).toBe(r),o(t[3].props.children).toStrictEqual(["c"]),o(t[4].props["data-id"]).toBe(p),o(t[5].type).toBe(r),o(t[5].props.children).toStrictEqual(["d"])}),d("should first child string",()=>{const t=e(r,{children:["a",a]});o(t[0].type).toBe(r),o(t[0].props.children).toStrictEqual(["a"]),o(t[1].props["data-id"]).toBe(p)});
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { expect, test } from "vitest";
3
+ import { wrapChildrenInText } from "./wrapChildrenInText";
4
+ const Comp = () => {
5
+ };
6
+ const re = /* @__PURE__ */ jsx("div", { "data-id": Math.random() });
7
+ const reID = re.props["data-id"];
8
+ test("should wrap all string children, not wrap others", () => {
9
+ const out = wrapChildrenInText(Comp, {
10
+ children: [re, "a", "b", re, "c", re, "d"]
11
+ });
12
+ expect(out[0].props["data-id"]).toBe(reID);
13
+ expect(out[1].type).toBe(Comp);
14
+ expect(out[1].props.children).toStrictEqual(["a", "b"]);
15
+ expect(out[2].props["data-id"]).toBe(reID);
16
+ expect(out[3].type).toBe(Comp);
17
+ expect(out[3].props.children).toStrictEqual(["c"]);
18
+ expect(out[4].props["data-id"]).toBe(reID);
19
+ expect(out[5].type).toBe(Comp);
20
+ expect(out[5].props.children).toStrictEqual(["d"]);
21
+ });
22
+ test("should first child string", () => {
23
+ const out = wrapChildrenInText(Comp, {
24
+ children: ["a", re]
25
+ });
26
+ expect(out[0].type).toBe(Comp);
27
+ expect(out[0].props.children).toStrictEqual(["a"]);
28
+ expect(out[1].props["data-id"]).toBe(reID);
29
+ });
2
30
  //# sourceMappingURL=wrapChildrenInText.test.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/wrapChildrenInText.test.tsx"],
4
4
  "sourcesContent": ["import React from 'react'\nimport { expect, test } from 'vitest'\n\nimport { wrapChildrenInText } from './wrapChildrenInText'\n\nconst Comp = () => {}\nconst re = <div data-id={Math.random()} />\nconst reID = re.props['data-id']\n\ntest('should wrap all string children, not wrap others', () => {\n const out = wrapChildrenInText(Comp, {\n children: [re, 'a', 'b', re, 'c', re, 'd'],\n }) as any\n\n expect(out[0].props['data-id']).toBe(reID)\n\n expect(out[1].type).toBe(Comp)\n expect(out[1].props.children).toStrictEqual(['a', 'b'])\n\n expect(out[2].props['data-id']).toBe(reID)\n\n expect(out[3].type).toBe(Comp)\n expect(out[3].props.children).toStrictEqual(['c'])\n\n expect(out[4].props['data-id']).toBe(reID)\n\n expect(out[5].type).toBe(Comp)\n expect(out[5].props.children).toStrictEqual(['d'])\n})\n\ntest('should first child string', () => {\n const out = wrapChildrenInText(Comp, {\n children: ['a', re],\n }) as any\n\n expect(out[0].type).toBe(Comp)\n expect(out[0].props.children).toStrictEqual(['a'])\n\n expect(out[1].props['data-id']).toBe(reID)\n})\n"],
5
- "mappings": "AAMW,cAAAA,MAAA,oBALX,OAAS,UAAAC,EAAQ,QAAAC,MAAY,SAE7B,OAAS,sBAAAC,MAA0B,uBAEnC,MAAMC,EAAO,IAAM,CAAC,EACdC,EAAKL,EAAC,OAAI,UAAS,KAAK,OAAO,EAAG,EAClCM,EAAOD,EAAG,MAAM,SAAS,EAE/BH,EAAK,mDAAoD,IAAM,CAC7D,MAAMK,EAAMJ,EAAmBC,EAAM,CACnC,SAAU,CAACC,EAAI,IAAK,IAAKA,EAAI,IAAKA,EAAI,GAAG,CAC3C,CAAC,EAEDJ,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,IAAK,GAAG,CAAC,EAEtDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,EAEjDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,EAEzCL,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CACnD,CAAC,EAEDL,EAAK,4BAA6B,IAAM,CACtC,MAAMK,EAAMJ,EAAmBC,EAAM,CACnC,SAAU,CAAC,IAAKC,CAAE,CACpB,CAAC,EAEDJ,EAAOM,EAAI,CAAC,EAAE,IAAI,EAAE,KAAKH,CAAI,EAC7BH,EAAOM,EAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,EAEjDN,EAAOM,EAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAKD,CAAI,CAC3C,CAAC",
6
- "names": ["jsx", "expect", "test", "wrapChildrenInText", "Comp", "re", "reID", "out"]
5
+ "mappings": "AAMW;AALX,SAAS,QAAQ,YAAY;AAE7B,SAAS,0BAA0B;AAEnC,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,KAAK,oBAAC,SAAI,WAAS,KAAK,OAAO,GAAG;AACxC,MAAM,OAAO,GAAG,MAAM,SAAS;AAE/B,KAAK,oDAAoD,MAAM;AAC7D,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG;AAAA,EAC3C,CAAC;AAED,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,KAAK,GAAG,CAAC;AAEtD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AACnD,CAAC;AAED,KAAK,6BAA6B,MAAM;AACtC,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,KAAK,EAAE;AAAA,EACpB,CAAC;AAED,SAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,CAAC,EAAE,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,IAAI;AAC3C,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,50 @@
1
- import{styled as e}from"@tamagui/web";import{Paragraph as a}from"./Paragraph";const t=e(a,{tag:"span",name:"Heading",accessibilityRole:"header",fontFamily:"$heading",size:"$8",margin:0}),s=e(t,{name:"H1",tag:"h1",size:"$10"}),i=e(t,{name:"H2",tag:"h2",size:"$9"}),r=e(t,{name:"H3",tag:"h3",size:"$8"}),H=e(t,{name:"H4",tag:"h4",size:"$7"}),m=e(t,{name:"H5",tag:"h5",size:"$6"}),g=e(t,{name:"H6",tag:"h6",size:"$5"});export{s as H1,i as H2,r as H3,H as H4,m as H5,g as H6,t as Heading};
1
+ import { styled } from "@tamagui/web";
2
+ import { Paragraph } from "./Paragraph";
3
+ const Heading = styled(Paragraph, {
4
+ tag: "span",
5
+ name: "Heading",
6
+ accessibilityRole: "header",
7
+ fontFamily: "$heading",
8
+ size: "$8",
9
+ margin: 0
10
+ });
11
+ const H1 = styled(Heading, {
12
+ name: "H1",
13
+ tag: "h1",
14
+ size: "$10"
15
+ });
16
+ const H2 = styled(Heading, {
17
+ name: "H2",
18
+ tag: "h2",
19
+ size: "$9"
20
+ });
21
+ const H3 = styled(Heading, {
22
+ name: "H3",
23
+ tag: "h3",
24
+ size: "$8"
25
+ });
26
+ const H4 = styled(Heading, {
27
+ name: "H4",
28
+ tag: "h4",
29
+ size: "$7"
30
+ });
31
+ const H5 = styled(Heading, {
32
+ name: "H5",
33
+ tag: "h5",
34
+ size: "$6"
35
+ });
36
+ const H6 = styled(Heading, {
37
+ name: "H6",
38
+ tag: "h6",
39
+ size: "$5"
40
+ });
41
+ export {
42
+ H1,
43
+ H2,
44
+ H3,
45
+ H4,
46
+ H5,
47
+ H6,
48
+ Heading
49
+ };
2
50
  //# sourceMappingURL=Headings.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Headings.tsx"],
4
4
  "sourcesContent": ["import { styled } from '@tamagui/web'\n\nimport { Paragraph } from './Paragraph'\n\nexport const Heading = styled(Paragraph, {\n tag: 'span',\n name: 'Heading',\n accessibilityRole: 'header',\n fontFamily: '$heading',\n size: '$8',\n margin: 0,\n})\n\nexport const H1 = styled(Heading, {\n name: 'H1',\n tag: 'h1',\n size: '$10',\n})\n\nexport const H2 = styled(Heading, {\n name: 'H2',\n tag: 'h2',\n size: '$9',\n})\n\nexport const H3 = styled(Heading, {\n name: 'H3',\n tag: 'h3',\n size: '$8',\n})\n\nexport const H4 = styled(Heading, {\n name: 'H4',\n tag: 'h4',\n size: '$7',\n})\n\nexport const H5 = styled(Heading, {\n name: 'H5',\n tag: 'h5',\n size: '$6',\n})\n\nexport const H6 = styled(Heading, {\n name: 'H6',\n tag: 'h6',\n size: '$5',\n})\n"],
5
- "mappings": "AAAA,OAAS,UAAAA,MAAc,eAEvB,OAAS,aAAAC,MAAiB,cAEnB,MAAMC,EAAUF,EAAOC,EAAW,CACvC,IAAK,OACL,KAAM,UACN,kBAAmB,SACnB,WAAY,WACZ,KAAM,KACN,OAAQ,CACV,CAAC,EAEYE,EAAKH,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,KACR,CAAC,EAEYE,EAAKJ,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYG,EAAKL,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYI,EAAKN,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYK,EAAKP,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYM,EAAKR,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC",
6
- "names": ["styled", "Paragraph", "Heading", "H1", "H2", "H3", "H4", "H5", "H6"]
5
+ "mappings": "AAAA,SAAS,cAAc;AAEvB,SAAS,iBAAiB;AAEnB,MAAM,UAAU,OAAO,WAAW;AAAA,EACvC,KAAK;AAAA,EACL,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AACV,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,50 @@
1
- import{styled as e}from"@tamagui/web";import{Paragraph as a}from"./Paragraph";const t=e(a,{tag:"span",name:"Heading",accessibilityRole:"header",fontFamily:"$heading",size:"$8",margin:0}),s=e(t,{name:"H1",tag:"h1",size:"$10"}),i=e(t,{name:"H2",tag:"h2",size:"$9"}),r=e(t,{name:"H3",tag:"h3",size:"$8"}),H=e(t,{name:"H4",tag:"h4",size:"$7"}),m=e(t,{name:"H5",tag:"h5",size:"$6"}),g=e(t,{name:"H6",tag:"h6",size:"$5"});export{s as H1,i as H2,r as H3,H as H4,m as H5,g as H6,t as Heading};
1
+ import { styled } from "@tamagui/web";
2
+ import { Paragraph } from "./Paragraph";
3
+ const Heading = styled(Paragraph, {
4
+ tag: "span",
5
+ name: "Heading",
6
+ accessibilityRole: "header",
7
+ fontFamily: "$heading",
8
+ size: "$8",
9
+ margin: 0
10
+ });
11
+ const H1 = styled(Heading, {
12
+ name: "H1",
13
+ tag: "h1",
14
+ size: "$10"
15
+ });
16
+ const H2 = styled(Heading, {
17
+ name: "H2",
18
+ tag: "h2",
19
+ size: "$9"
20
+ });
21
+ const H3 = styled(Heading, {
22
+ name: "H3",
23
+ tag: "h3",
24
+ size: "$8"
25
+ });
26
+ const H4 = styled(Heading, {
27
+ name: "H4",
28
+ tag: "h4",
29
+ size: "$7"
30
+ });
31
+ const H5 = styled(Heading, {
32
+ name: "H5",
33
+ tag: "h5",
34
+ size: "$6"
35
+ });
36
+ const H6 = styled(Heading, {
37
+ name: "H6",
38
+ tag: "h6",
39
+ size: "$5"
40
+ });
41
+ export {
42
+ H1,
43
+ H2,
44
+ H3,
45
+ H4,
46
+ H5,
47
+ H6,
48
+ Heading
49
+ };
2
50
  //# sourceMappingURL=Headings.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Headings.tsx"],
4
4
  "sourcesContent": ["import { styled } from '@tamagui/web'\n\nimport { Paragraph } from './Paragraph'\n\nexport const Heading = styled(Paragraph, {\n tag: 'span',\n name: 'Heading',\n accessibilityRole: 'header',\n fontFamily: '$heading',\n size: '$8',\n margin: 0,\n})\n\nexport const H1 = styled(Heading, {\n name: 'H1',\n tag: 'h1',\n size: '$10',\n})\n\nexport const H2 = styled(Heading, {\n name: 'H2',\n tag: 'h2',\n size: '$9',\n})\n\nexport const H3 = styled(Heading, {\n name: 'H3',\n tag: 'h3',\n size: '$8',\n})\n\nexport const H4 = styled(Heading, {\n name: 'H4',\n tag: 'h4',\n size: '$7',\n})\n\nexport const H5 = styled(Heading, {\n name: 'H5',\n tag: 'h5',\n size: '$6',\n})\n\nexport const H6 = styled(Heading, {\n name: 'H6',\n tag: 'h6',\n size: '$5',\n})\n"],
5
- "mappings": "AAAA,OAAS,UAAAA,MAAc,eAEvB,OAAS,aAAAC,MAAiB,cAEnB,MAAMC,EAAUF,EAAOC,EAAW,CACvC,IAAK,OACL,KAAM,UACN,kBAAmB,SACnB,WAAY,WACZ,KAAM,KACN,OAAQ,CACV,CAAC,EAEYE,EAAKH,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,KACR,CAAC,EAEYE,EAAKJ,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYG,EAAKL,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYI,EAAKN,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYK,EAAKP,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC,EAEYM,EAAKR,EAAOE,EAAS,CAChC,KAAM,KACN,IAAK,KACL,KAAM,IACR,CAAC",
6
- "names": ["styled", "Paragraph", "Heading", "H1", "H2", "H3", "H4", "H5", "H6"]
5
+ "mappings": "AAAA,SAAS,cAAc;AAEvB,SAAS,iBAAiB;AAEnB,MAAM,UAAU,OAAO,WAAW;AAAA,EACvC,KAAK;AAAA,EACL,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AACV,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;AAEM,MAAM,KAAK,OAAO,SAAS;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,13 @@
1
- import{styled as r}from"@tamagui/web";import{SizableText as a}from"./SizableText";const p=r(a,{name:"Paragraph",tag:"p",userSelect:"auto",color:"$color",size:"$true"});export{p as Paragraph};
1
+ import { styled } from "@tamagui/web";
2
+ import { SizableText } from "./SizableText";
3
+ const Paragraph = styled(SizableText, {
4
+ name: "Paragraph",
5
+ tag: "p",
6
+ userSelect: "auto",
7
+ color: "$color",
8
+ size: "$true"
9
+ });
10
+ export {
11
+ Paragraph
12
+ };
2
13
  //# sourceMappingURL=Paragraph.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Paragraph.tsx"],
4
4
  "sourcesContent": ["import { GetProps, styled } from '@tamagui/web'\n\nimport { SizableText } from './SizableText'\n\nexport const Paragraph = styled(SizableText, {\n name: 'Paragraph',\n tag: 'p',\n userSelect: 'auto',\n color: '$color',\n size: '$true',\n})\n\nexport type ParagraphProps = GetProps<typeof Paragraph>\n"],
5
- "mappings": "AAAA,OAAmB,UAAAA,MAAc,eAEjC,OAAS,eAAAC,MAAmB,gBAErB,MAAMC,EAAYF,EAAOC,EAAa,CAC3C,KAAM,YACN,IAAK,IACL,WAAY,OACZ,MAAO,SACP,KAAM,OACR,CAAC",
6
- "names": ["styled", "SizableText", "Paragraph"]
5
+ "mappings": "AAAA,SAAmB,cAAc;AAEjC,SAAS,mBAAmB;AAErB,MAAM,YAAY,OAAO,aAAa;AAAA,EAC3C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AACR,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,13 @@
1
- import{styled as r}from"@tamagui/web";import{SizableText as a}from"./SizableText";const p=r(a,{name:"Paragraph",tag:"p",userSelect:"auto",color:"$color",size:"$true"});export{p as Paragraph};
1
+ import { styled } from "@tamagui/web";
2
+ import { SizableText } from "./SizableText";
3
+ const Paragraph = styled(SizableText, {
4
+ name: "Paragraph",
5
+ tag: "p",
6
+ userSelect: "auto",
7
+ color: "$color",
8
+ size: "$true"
9
+ });
10
+ export {
11
+ Paragraph
12
+ };
2
13
  //# sourceMappingURL=Paragraph.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Paragraph.tsx"],
4
4
  "sourcesContent": ["import { GetProps, styled } from '@tamagui/web'\n\nimport { SizableText } from './SizableText'\n\nexport const Paragraph = styled(SizableText, {\n name: 'Paragraph',\n tag: 'p',\n userSelect: 'auto',\n color: '$color',\n size: '$true',\n})\n\nexport type ParagraphProps = GetProps<typeof Paragraph>\n"],
5
- "mappings": "AAAA,OAAmB,UAAAA,MAAc,eAEjC,OAAS,eAAAC,MAAmB,gBAErB,MAAMC,EAAYF,EAAOC,EAAa,CAC3C,KAAM,YACN,IAAK,IACL,WAAY,OACZ,MAAO,SACP,KAAM,OACR,CAAC",
6
- "names": ["styled", "SizableText", "Paragraph"]
5
+ "mappings": "AAAA,SAAmB,cAAc;AAEjC,SAAS,mBAAmB;AAErB,MAAM,YAAY,OAAO,aAAa;AAAA,EAC3C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AACR,CAAC;",
6
+ "names": []
7
7
  }