@tamagui/text 2.0.0-rc.4 → 2.0.0-rc.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Emphasis.cjs +22 -20
- package/dist/cjs/Emphasis.native.js +24 -22
- package/dist/cjs/Emphasis.native.js.map +1 -1
- package/dist/cjs/Headings.cjs +93 -91
- package/dist/cjs/Headings.native.js +94 -92
- package/dist/cjs/Headings.native.js.map +1 -1
- package/dist/cjs/Paragraph.cjs +14 -12
- package/dist/cjs/Paragraph.native.js +22 -20
- package/dist/cjs/Paragraph.native.js.map +1 -1
- package/dist/cjs/SizableText.cjs +22 -18
- package/dist/cjs/SizableText.native.js +37 -33
- package/dist/cjs/SizableText.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/wrapChildrenInText.cjs +47 -32
- package/dist/cjs/wrapChildrenInText.native.js +40 -27
- package/dist/cjs/wrapChildrenInText.native.js.map +1 -1
- package/dist/esm/Emphasis.mjs +10 -10
- package/dist/esm/Emphasis.mjs.map +1 -1
- package/dist/esm/Emphasis.native.js +10 -10
- package/dist/esm/Emphasis.native.js.map +1 -1
- package/dist/esm/Headings.mjs +79 -79
- package/dist/esm/Headings.mjs.map +1 -1
- package/dist/esm/Headings.native.js +79 -79
- package/dist/esm/Headings.native.js.map +1 -1
- package/dist/esm/SizableText.mjs +8 -6
- package/dist/esm/SizableText.mjs.map +1 -1
- package/dist/esm/SizableText.native.js +8 -6
- package/dist/esm/SizableText.native.js.map +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/wrapChildrenInText.mjs +22 -9
- package/dist/esm/wrapChildrenInText.mjs.map +1 -1
- package/dist/esm/wrapChildrenInText.native.js +14 -3
- package/dist/esm/wrapChildrenInText.native.js.map +1 -1
- package/dist/jsx/Emphasis.mjs +10 -10
- package/dist/jsx/Emphasis.mjs.map +1 -1
- package/dist/jsx/Emphasis.native.js +24 -22
- package/dist/jsx/Emphasis.native.js.map +1 -1
- package/dist/jsx/Headings.mjs +79 -79
- package/dist/jsx/Headings.mjs.map +1 -1
- package/dist/jsx/Headings.native.js +94 -92
- package/dist/jsx/Headings.native.js.map +1 -1
- package/dist/jsx/Paragraph.native.js +22 -20
- package/dist/jsx/Paragraph.native.js.map +1 -1
- package/dist/jsx/SizableText.mjs +8 -6
- package/dist/jsx/SizableText.mjs.map +1 -1
- package/dist/jsx/SizableText.native.js +37 -33
- package/dist/jsx/SizableText.native.js.map +1 -1
- package/dist/jsx/index.js +6 -6
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/dist/jsx/types.native.js +7 -5
- package/dist/jsx/wrapChildrenInText.mjs +22 -9
- package/dist/jsx/wrapChildrenInText.mjs.map +1 -1
- package/dist/jsx/wrapChildrenInText.native.js +40 -27
- package/dist/jsx/wrapChildrenInText.native.js.map +1 -1
- package/package.json +8 -11
- package/dist/cjs/Emphasis.js +0 -32
- package/dist/cjs/Emphasis.js.map +0 -6
- package/dist/cjs/Headings.js +0 -113
- package/dist/cjs/Headings.js.map +0 -6
- package/dist/cjs/Paragraph.js +0 -29
- package/dist/cjs/Paragraph.js.map +0 -6
- package/dist/cjs/SizableText.js +0 -45
- package/dist/cjs/SizableText.js.map +0 -6
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/wrapChildrenInText.js +0 -54
- package/dist/cjs/wrapChildrenInText.js.map +0 -6
- package/dist/esm/Emphasis.js +0 -16
- package/dist/esm/Emphasis.js.map +0 -6
- package/dist/esm/Headings.js +0 -98
- package/dist/esm/Headings.js.map +0 -6
- package/dist/esm/Paragraph.js +0 -14
- package/dist/esm/Paragraph.js.map +0 -6
- package/dist/esm/SizableText.js +0 -30
- package/dist/esm/SizableText.js.map +0 -6
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/wrapChildrenInText.js +0 -31
- package/dist/esm/wrapChildrenInText.js.map +0 -6
- package/dist/jsx/Emphasis.js +0 -16
- package/dist/jsx/Emphasis.js.map +0 -6
- package/dist/jsx/Headings.js +0 -98
- package/dist/jsx/Headings.js.map +0 -6
- package/dist/jsx/Paragraph.js +0 -14
- package/dist/jsx/Paragraph.js.map +0 -6
- package/dist/jsx/SizableText.js +0 -30
- package/dist/jsx/SizableText.js.map +0 -6
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -6
- package/dist/jsx/wrapChildrenInText.js +0 -31
- package/dist/jsx/wrapChildrenInText.js.map +0 -6
|
@@ -5,34 +5,36 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var Paragraph_exports = {};
|
|
24
26
|
__export(Paragraph_exports, {
|
|
25
27
|
Paragraph: () => Paragraph
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(Paragraph_exports);
|
|
28
|
-
var import_web = require("@tamagui/web")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
var import_web = require("@tamagui/web");
|
|
31
|
+
var import_SizableText = require("./SizableText.native.js");
|
|
32
|
+
var Paragraph = (0, import_web.styled)(import_SizableText.SizableText, {
|
|
33
|
+
name: "Paragraph",
|
|
34
|
+
render: "p",
|
|
35
|
+
userSelect: "auto",
|
|
36
|
+
color: "$color",
|
|
37
|
+
size: "$true",
|
|
38
|
+
whiteSpace: "normal"
|
|
39
|
+
});
|
|
38
40
|
//# sourceMappingURL=Paragraph.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Paragraph_exports","__export","Paragraph","module","exports","import_web","require","import_SizableText","styled","SizableText","name","render","userSelect","color","size","whiteSpace"],"sources":["../../src/Paragraph.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Paragraph_exports","__export","Paragraph","module","exports","import_web","require","import_SizableText","styled","SizableText","name","render","userSelect","color","size","whiteSpace"],"sources":["../../src/Paragraph.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAuBT,YAAA,CAAAK,iBAAA;AAEvB,IAAAK,UAAA,GAAAC,OAAA,CAA4B;AAErB,IAAAC,kBAAkB,GAAAD,OAAA,0BAAO;AAAa,IAC3CJ,SAAM,OAAAG,UAAA,CAAAG,MAAA,EAAAD,kBAAA,CAAAE,WAAA;EACNC,IAAA,aAAQ;EACRC,MAAA;EACAC,UAAO;EACPC,KAAA,EAAM;EACNC,IAAA,SAAY;EACbC,UAAA","ignoreList":[]}
|
package/dist/cjs/SizableText.cjs
CHANGED
|
@@ -3,28 +3,30 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var SizableText_exports = {};
|
|
22
24
|
__export(SizableText_exports, {
|
|
23
25
|
SizableText: () => SizableText
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(SizableText_exports);
|
|
26
|
-
var import_get_font_sized = require("@tamagui/get-font-sized")
|
|
27
|
-
|
|
28
|
+
var import_get_font_sized = require("@tamagui/get-font-sized");
|
|
29
|
+
var import_web = require("@tamagui/web");
|
|
28
30
|
const SizableText = (0, import_web.styled)(import_web.Text, {
|
|
29
31
|
name: "SizableText",
|
|
30
32
|
fontFamily: "$body",
|
|
@@ -43,12 +45,14 @@ const SizableText = (0, import_web.styled)(import_web.Text, {
|
|
|
43
45
|
});
|
|
44
46
|
SizableText.staticConfig.variants.fontFamily = {
|
|
45
47
|
"...": (val, extras) => {
|
|
46
|
-
if (val === "inherit")
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
if (val === "inherit") {
|
|
49
|
+
return {
|
|
50
|
+
fontFamily: "inherit"
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const sizeProp = extras.props["size"];
|
|
54
|
+
const fontSizeProp = extras.props["fontSize"];
|
|
55
|
+
const size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props["size"] || "$true";
|
|
52
56
|
return (0, import_get_font_sized.getFontSized)(size, extras);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
@@ -5,52 +5,56 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var SizableText_exports = {};
|
|
24
26
|
__export(SizableText_exports, {
|
|
25
27
|
SizableText: () => SizableText
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(SizableText_exports);
|
|
28
|
-
var import_get_font_sized = require("@tamagui/get-font-sized")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
size: import_get_font_sized.getFontSized
|
|
30
|
+
var import_get_font_sized = require("@tamagui/get-font-sized");
|
|
31
|
+
var import_web = require("@tamagui/web");
|
|
32
|
+
var SizableText = (0, import_web.styled)(import_web.Text, {
|
|
33
|
+
name: "SizableText",
|
|
34
|
+
fontFamily: "$body",
|
|
35
|
+
variants: {
|
|
36
|
+
unstyled: {
|
|
37
|
+
false: {
|
|
38
|
+
size: "$true",
|
|
39
|
+
color: "$color"
|
|
40
|
+
}
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
size: import_get_font_sized.getFontSized
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
46
48
|
SizableText.staticConfig.variants.fontFamily = {
|
|
47
49
|
"...": function (val, extras) {
|
|
48
|
-
if (val === "inherit")
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
if (val === "inherit") {
|
|
51
|
+
return {
|
|
52
|
+
fontFamily: "inherit"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var sizeProp = extras.props["size"];
|
|
56
|
+
var fontSizeProp = extras.props["fontSize"];
|
|
57
|
+
var size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props["size"] || "$true";
|
|
54
58
|
return (0, import_get_font_sized.getFontSized)(size, extras);
|
|
55
59
|
}
|
|
56
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SizableText_exports","__export","SizableText","module","exports","import_get_font_sized","require","import_web","styled","Text","name","fontFamily","variants","unstyled","false","size","color","getFontSized","defaultVariants","process","env","TAMAGUI_HEADLESS","staticConfig","...","val","extras","sizeProp","props","fontSizeProp"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SizableText_exports","__export","SizableText","module","exports","import_get_font_sized","require","import_web","styled","Text","name","fontFamily","variants","unstyled","false","size","color","getFontSized","defaultVariants","process","env","TAMAGUI_HEADLESS","staticConfig","...","val","extras","sizeProp","props","fontSizeProp"],"sources":["../../src/SizableText.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA6B,CAAAK,mBAAA;AAE7B,IAAAK,qBAA6B,GAAAC,OAAA;AAEtB,IAAAC,UAAM,GAAAD,OAAc;AAAa,IACtCJ,WAAM,OAAAK,UAAA,CAAAC,MAAA,EAAAD,UAAA,CAAAE,IAAA;EACNC,IAAA,eAAY;EAEZC,UAAU;EAAAC,QACR;IAAUC,QACR,EAAO;MAAAC,KACL;QACAC,IAAA,SAAO;QACTC,KAAA;MACF;IAEA;IACFD,IAAA,EAAAV,qBAAA,CAAAY;EAEA;EAAiBC,eACL;IACZL,QAAA,EAAAM,OAAA,CAAAC,GAAA,CAAAC,gBAAA;EACD;AAID;AAAgDnB,WACtC,CAAAoB,YAAK,CAAAV,QAAW,CAAAD,UAAA;EAEtB,OAAI,SAAAY,CAAQC,GAAA,EAAAC,MAAW;IACrB,IAAAD,GAAA,KAAS,WAAY;MACvB;QAEAb,UAAM;MACN;IACA;IAIA,IAAAe,QAAO,GAAAD,MAAA,CAAAE,KAAA;IACT,IAAAC,YAAA,GAAAH,MAAA,CAAAE,KAAA;IACF,IAAAZ,IAAA,GAAAW,QAAA,gBAAAE,YAAA,GAAAA,YAAA,GAAAH,MAAA,CAAAE,KAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
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, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,2BAFd,EAAAH,MAAA,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,2BAHdH,MAAA,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BAAAH,MAAA,CAAAC,OAJd;AAKAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCALd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
10
12
|
return to;
|
|
11
13
|
};
|
|
12
14
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
13
|
-
value:
|
|
15
|
+
value: true
|
|
14
16
|
}), mod);
|
|
15
17
|
var types_exports = {};
|
|
16
18
|
module.exports = __toCommonJS(types_exports);
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
+
}
|
|
12
14
|
return to;
|
|
13
15
|
};
|
|
14
16
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value:
|
|
17
|
+
value: true
|
|
16
18
|
}), mod);
|
|
17
19
|
var types_exports = {};
|
|
18
20
|
module.exports = __toCommonJS(types_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
|
|
@@ -2,42 +2,44 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
6
|
-
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
32
34
|
var wrapChildrenInText_exports = {};
|
|
33
35
|
__export(wrapChildrenInText_exports, {
|
|
34
36
|
wrapChildrenInText: () => wrapChildrenInText
|
|
35
37
|
});
|
|
36
38
|
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
37
|
-
var import_react = __toESM(require("react"), 1)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
var import_react = __toESM(require("react"), 1);
|
|
40
|
+
var import_jsx_runtime =
|
|
41
|
+
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
42
|
+
require("react/jsx-runtime");
|
|
41
43
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
42
44
|
const {
|
|
43
45
|
children,
|
|
@@ -53,13 +55,26 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
53
55
|
fontStyle,
|
|
54
56
|
maxFontSizeMultiplier
|
|
55
57
|
} = propsIn;
|
|
56
|
-
if (noTextWrap || !children)
|
|
58
|
+
if (noTextWrap || !children) {
|
|
59
|
+
return [children];
|
|
60
|
+
}
|
|
57
61
|
const props = {
|
|
58
62
|
...extraProps
|
|
59
63
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
if (color) props.color = color;
|
|
65
|
+
if (fontFamily) props.fontFamily = fontFamily;
|
|
66
|
+
if (fontSize) props.fontSize = fontSize;
|
|
67
|
+
if (fontWeight) props.fontWeight = fontWeight;
|
|
68
|
+
if (letterSpacing) props.letterSpacing = letterSpacing;
|
|
69
|
+
if (textAlign) props.textAlign = textAlign;
|
|
70
|
+
if (size) props.size = size;
|
|
71
|
+
if (fontStyle) props.fontStyle = fontStyle;
|
|
72
|
+
if (maxFontSizeMultiplier) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
73
|
+
return import_react.default.Children.toArray(children).map((child, index) => {
|
|
74
|
+
return typeof child === "string" ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(TextComponent, {
|
|
75
|
+
...props,
|
|
76
|
+
...textProps,
|
|
77
|
+
children: child
|
|
78
|
+
}, index) : child;
|
|
79
|
+
});
|
|
65
80
|
}
|
|
@@ -4,40 +4,42 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
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, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var wrapChildrenInText_exports = {};
|
|
35
37
|
__export(wrapChildrenInText_exports, {
|
|
36
38
|
wrapChildrenInText: () => wrapChildrenInText
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
40
|
-
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_react = __toESM(require("react"), 1);
|
|
41
43
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
42
44
|
var {
|
|
43
45
|
children,
|
|
@@ -53,12 +55,23 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
53
55
|
fontStyle,
|
|
54
56
|
maxFontSizeMultiplier
|
|
55
57
|
} = propsIn;
|
|
56
|
-
if (noTextWrap || !children)
|
|
58
|
+
if (noTextWrap || !children) {
|
|
59
|
+
return [children];
|
|
60
|
+
}
|
|
57
61
|
var props = {
|
|
58
62
|
...extraProps
|
|
59
63
|
};
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
if (color) props.color = color;
|
|
65
|
+
if (fontFamily) props.fontFamily = fontFamily;
|
|
66
|
+
if (fontSize) props.fontSize = fontSize;
|
|
67
|
+
if (fontWeight) props.fontWeight = fontWeight;
|
|
68
|
+
if (letterSpacing) props.letterSpacing = letterSpacing;
|
|
69
|
+
if (textAlign) props.textAlign = textAlign;
|
|
70
|
+
if (size) props.size = size;
|
|
71
|
+
if (fontStyle) props.fontStyle = fontStyle;
|
|
72
|
+
if (maxFontSizeMultiplier) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
73
|
+
return import_react.default.Children.toArray(children).map(function (child, index) {
|
|
74
|
+
return typeof child === "string" ?
|
|
62
75
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
63
76
|
/* @__PURE__ */
|
|
64
77
|
(0, import_jsx_runtime.jsx)(TextComponent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","wrapChildrenInText_exports","__export","wrapChildrenInText","module","exports","import_jsx_runtime","require","import_react","__toESM","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","maxFontSizeMultiplier","props","default","Children","toArray","map","child","index","jsx"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","wrapChildrenInText_exports","__export","wrapChildrenInText","module","exports","import_jsx_runtime","require","import_react","__toESM","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","maxFontSizeMultiplier","props","default","Children","toArray","map","child","index","jsx"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,0BAAA;AAqDZ,IAAAK,kBAAA,GAAAC,OAAA;AAAA,IAAAC,YAAA,GAAAC,OAAA,CAAAF,OAAA;AAAA,SAAAJ,mBAAAO,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;EAAA,IAAAb,OAAA;EA5CC,IAAAK,UAAS,KAAAH,QACd;IAMA,OAAM,CACJA,QAAA,CACA;EAAA;EACA,IACAY,KAAA;IACA,GAAAb;EAAA;EACA,IACAK,KAAA,EAAAQ,KAAA,CAAAR,KAAA,GAAAA,KAAA;EAAA,IACAC,UAAA,EAAAO,KAAA,CAAAP,UAAA,GAAAA,UAAA;EAAA,IACAC,QAAA,EAAAM,KAAA,CAAAN,QAAA,GAAAA,QAAA;EAAA,IACAC,UAAA,EAAAK,KAAA,CAAAL,UAAA,GAAAA,UAAA;EAAA,IACAC,aAAA,EAAAI,KAAA,CAAAJ,aAAA,GAAAA,aAAA;EAAA,IACAC,SAAA,EAAAG,KAAA,CAAAH,SAAA,GAAAA,SAAA;EACF,IAAIP,IAAA,EAAAU,KAAA,CAAAV,IAAA,GAAAA,IAAA;EAEJ,IAAIQ,SAAA,EAAAE,KAAe,CAAAF,SAAU,GAAAA,SAAA;EAC3B,IAAAC,qBAAgB,EAAAC,KAAA,CAAAD,qBAAA,GAAAA,qBAAA;EAClB,OAAAhB,YAAA,CAAAkB,OAAA,CAAAC,QAAA,CAAAC,OAAA,CAAAf,QAAA,EAAAgB,GAAA,WAAAC,KAAA,EAAAC,KAAA;IAEA,OAAM,OAAQD,KAAA;IACZ;IACF;IAAA,IAAAxB,kBAAA,CAAA0B,GAAA,EAAAtB,aAAA;MAGI,GAAAe,KAAO;MACP,GAAAX,SAAY;MACZD,QAAU,EAAAiB;IACV,GAAAC,KAAA,IACAD,KAAA;EACJ;AACA","ignoreList":[]}
|
package/dist/esm/Emphasis.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { styled, Text } from "@tamagui/web";
|
|
2
2
|
const Strong = styled(Text, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
render: "strong",
|
|
4
|
+
fontWeight: "bold"
|
|
5
|
+
});
|
|
6
|
+
const Span = styled(Text, {
|
|
7
|
+
render: "span"
|
|
8
|
+
});
|
|
9
|
+
const Em = styled(Text, {
|
|
10
|
+
render: "em",
|
|
11
|
+
fontStyle: "italic"
|
|
12
|
+
});
|
|
13
13
|
export { Em, Span, Strong };
|
|
14
14
|
//# sourceMappingURL=Emphasis.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styled","Text","Strong","render","fontWeight","Span","Em","fontStyle"],"sources":["../../src/Emphasis.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,EAAQC,IAAA,QAAY;AAEtB,MAAMC,MAAA,GAASF,MAAA,CAAOC,IAAA,EAAM;
|
|
1
|
+
{"version":3,"names":["styled","Text","Strong","render","fontWeight","Span","Em","fontStyle"],"sources":["../../src/Emphasis.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,EAAQC,IAAA,QAAY;AAEtB,MAAMC,MAAA,GAASF,MAAA,CAAOC,IAAA,EAAM;EACjCE,MAAA,EAAQ;EACRC,UAAA,EAAY;AACd,CAAC;AAEM,MAAMC,IAAA,GAAOL,MAAA,CAAOC,IAAA,EAAM;EAC/BE,MAAA,EAAQ;AACV,CAAC;AAEM,MAAMG,EAAA,GAAKN,MAAA,CAAOC,IAAA,EAAM;EAC7BE,MAAA,EAAQ;EACRI,SAAA,EAAW;AACb,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { styled, Text } from "@tamagui/web";
|
|
2
2
|
var Strong = styled(Text, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
render: "strong",
|
|
4
|
+
fontWeight: "bold"
|
|
5
|
+
});
|
|
6
|
+
var Span = styled(Text, {
|
|
7
|
+
render: "span"
|
|
8
|
+
});
|
|
9
|
+
var Em = styled(Text, {
|
|
10
|
+
render: "em",
|
|
11
|
+
fontStyle: "italic"
|
|
12
|
+
});
|
|
13
13
|
export { Em, Span, Strong };
|
|
14
14
|
//# sourceMappingURL=Emphasis.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styled","Text","Strong","render","fontWeight","Span","Em","fontStyle"],"sources":["../../src/Emphasis.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,EAAQC,IAAA,QAAY;AAEtB,IAAAC,MAAM,GAAAF,MAAS,CAAAC,IAAO;
|
|
1
|
+
{"version":3,"names":["styled","Text","Strong","render","fontWeight","Span","Em","fontStyle"],"sources":["../../src/Emphasis.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,EAAQC,IAAA,QAAY;AAEtB,IAAAC,MAAM,GAAAF,MAAS,CAAAC,IAAO;EAC3BE,MAAA,EAAQ;EACRC,UAAA,EAAY;AACd,CAAC;AAEM,IAAAC,IAAM,GAAAL,MAAO,CAAAC,IAAO;EACzBE,MAAA,EAAQ;AACV,CAAC;AAEM,IAAAG,EAAM,GAAAN,MAAK,CAAAC,IAAO;EACvBE,MAAA,EAAQ;EACRI,SAAA,EAAW;AACb,CAAC","ignoreList":[]}
|