@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.
- package/dist/cjs/Emphasis.cjs +22 -25
- package/dist/cjs/Emphasis.native.cjs +40 -0
- package/dist/cjs/Emphasis.native.js +22 -24
- package/dist/cjs/Emphasis.native.js.map +1 -1
- package/dist/cjs/Headings.cjs +51 -100
- package/dist/cjs/Headings.native.cjs +80 -0
- package/dist/cjs/Headings.native.js +51 -99
- package/dist/cjs/Headings.native.js.map +1 -1
- package/dist/cjs/Paragraph.cjs +21 -24
- package/dist/cjs/Paragraph.native.cjs +36 -0
- package/dist/cjs/Paragraph.native.js +21 -23
- package/dist/cjs/Paragraph.native.js.map +1 -1
- package/dist/cjs/SizableText.cjs +29 -45
- package/dist/cjs/SizableText.native.cjs +46 -0
- package/dist/cjs/SizableText.native.js +31 -45
- package/dist/cjs/SizableText.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +26 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +10 -11
- package/dist/cjs/types.native.cjs +19 -0
- package/dist/cjs/types.native.js +10 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/wrapChildrenInText.cjs +57 -67
- package/dist/cjs/wrapChildrenInText.native.cjs +74 -0
- package/dist/cjs/wrapChildrenInText.native.js +56 -66
- package/dist/cjs/wrapChildrenInText.native.js.map +1 -1
- package/dist/esm/Emphasis.mjs +8 -8
- package/dist/esm/Emphasis.mjs.map +1 -1
- package/dist/esm/Emphasis.native.js +8 -8
- package/dist/esm/Emphasis.native.js.map +1 -1
- package/dist/esm/Headings.mjs +32 -78
- package/dist/esm/Headings.mjs.map +1 -1
- package/dist/esm/Headings.native.js +32 -78
- package/dist/esm/Headings.native.js.map +1 -1
- package/dist/esm/Paragraph.mjs +8 -6
- package/dist/esm/Paragraph.mjs.map +1 -1
- package/dist/esm/Paragraph.native.js +8 -6
- package/dist/esm/Paragraph.native.js.map +1 -1
- package/dist/esm/SizableText.mjs +17 -28
- package/dist/esm/SizableText.mjs.map +1 -1
- package/dist/esm/SizableText.native.js +18 -28
- package/dist/esm/SizableText.native.js.map +1 -1
- package/dist/esm/index.js +11 -7
- package/dist/esm/index.mjs +11 -7
- package/dist/esm/index.native.js +11 -7
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/wrapChildrenInText.mjs +40 -41
- package/dist/esm/wrapChildrenInText.mjs.map +1 -1
- package/dist/esm/wrapChildrenInText.native.js +41 -42
- package/dist/esm/wrapChildrenInText.native.js.map +1 -1
- package/dist/jsx/Emphasis.mjs +8 -8
- package/dist/jsx/Emphasis.mjs.map +1 -1
- package/dist/jsx/Emphasis.native.cjs +40 -0
- package/dist/jsx/Emphasis.native.js +22 -24
- package/dist/jsx/Emphasis.native.js.map +1 -1
- package/dist/jsx/Headings.mjs +32 -78
- package/dist/jsx/Headings.mjs.map +1 -1
- package/dist/jsx/Headings.native.cjs +80 -0
- package/dist/jsx/Headings.native.js +51 -99
- package/dist/jsx/Headings.native.js.map +1 -1
- package/dist/jsx/Paragraph.mjs +8 -6
- package/dist/jsx/Paragraph.mjs.map +1 -1
- package/dist/jsx/Paragraph.native.cjs +36 -0
- package/dist/jsx/Paragraph.native.js +21 -23
- package/dist/jsx/Paragraph.native.js.map +1 -1
- package/dist/jsx/SizableText.mjs +17 -28
- package/dist/jsx/SizableText.mjs.map +1 -1
- package/dist/jsx/SizableText.native.cjs +46 -0
- package/dist/jsx/SizableText.native.js +31 -45
- package/dist/jsx/SizableText.native.js.map +1 -1
- package/dist/jsx/index.js +11 -7
- package/dist/jsx/index.mjs +11 -7
- package/dist/jsx/index.native.cjs +26 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +19 -0
- package/dist/jsx/types.native.js +10 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/dist/jsx/wrapChildrenInText.mjs +40 -41
- package/dist/jsx/wrapChildrenInText.mjs.map +1 -1
- package/dist/jsx/wrapChildrenInText.native.cjs +74 -0
- package/dist/jsx/wrapChildrenInText.native.js +56 -66
- package/dist/jsx/wrapChildrenInText.native.js.map +1 -1
- package/package.json +5 -5
- package/src/Headings.tsx +15 -15
- package/src/Paragraph.tsx +3 -3
- package/src/SizableText.tsx +6 -18
- package/src/wrapChildrenInText.tsx +32 -11
- package/types/Emphasis.d.ts +15 -3
- package/types/Emphasis.d.ts.map +1 -1
- package/types/Headings.d.ts +89 -22
- package/types/Headings.d.ts.map +1 -1
- package/types/Paragraph.d.ts +11 -4
- package/types/Paragraph.d.ts.map +1 -1
- package/types/SizableText.d.ts +11 -4
- package/types/SizableText.d.ts.map +1 -1
- package/types/wrapChildrenInText.d.ts +2 -4
- package/types/wrapChildrenInText.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
|
@@ -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);
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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,"
|
|
1
|
+
{"version":3,"file":"types.native.js","names":[],"sources":["cjs/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,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -5,78 +6,67 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
30
26
|
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
28
|
var wrapChildrenInText_exports = {};
|
|
35
|
-
__export(wrapChildrenInText_exports, {
|
|
36
|
-
wrapChildrenInText: () => wrapChildrenInText
|
|
37
|
-
});
|
|
29
|
+
__export(wrapChildrenInText_exports, { wrapChildrenInText: () => wrapChildrenInText });
|
|
38
30
|
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
39
31
|
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");
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
33
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
34
|
+
const { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, ellipsis, maxFontSizeMultiplier } = propsIn;
|
|
35
|
+
if (noTextWrap || !children) {
|
|
36
|
+
return [children];
|
|
37
|
+
}
|
|
38
|
+
const props = { ...extraProps };
|
|
39
|
+
if (color) props.color = color;
|
|
40
|
+
if (fontFamily) props.fontFamily = fontFamily;
|
|
41
|
+
if (fontSize) props.fontSize = fontSize;
|
|
42
|
+
if (fontWeight) props.fontWeight = fontWeight;
|
|
43
|
+
if (letterSpacing) props.letterSpacing = letterSpacing;
|
|
44
|
+
if (textAlign) props.textAlign = textAlign;
|
|
45
|
+
if (size) props.size = size;
|
|
46
|
+
if (fontStyle) props.fontStyle = fontStyle;
|
|
47
|
+
if (ellipsis !== void 0) props.ellipsis = ellipsis;
|
|
48
|
+
if (maxFontSizeMultiplier != null) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
49
|
+
const out = [];
|
|
50
|
+
let run = [];
|
|
51
|
+
let runKey = 0;
|
|
52
|
+
const flushRun = () => {
|
|
53
|
+
if (!run.length) return;
|
|
54
|
+
out.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
|
|
55
|
+
...props,
|
|
56
|
+
...textProps,
|
|
57
|
+
children: run.length === 1 ? run[0] : run.join("")
|
|
58
|
+
}, `text-${runKey}`));
|
|
59
|
+
run = [];
|
|
60
|
+
};
|
|
61
|
+
import_react.default.Children.toArray(children).forEach((child, index) => {
|
|
62
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
63
|
+
if (!run.length) runKey = index;
|
|
64
|
+
run.push(child);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
flushRun();
|
|
68
|
+
out.push(child);
|
|
69
|
+
});
|
|
70
|
+
flushRun();
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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,"
|
|
1
|
+
{"version":3,"file":"wrapChildrenInText.native.js","names":[],"sources":["cjs/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/dist/esm/Emphasis.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Text, styled } from "@tamagui/web";
|
|
2
|
+
|
|
2
3
|
const Strong = styled(Text, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
const Span = styled(Text, {
|
|
7
|
-
render: "span"
|
|
4
|
+
render: "strong",
|
|
5
|
+
fontWeight: "bold"
|
|
8
6
|
});
|
|
7
|
+
const Span = styled(Text, { render: "span" });
|
|
9
8
|
const Em = styled(Text, {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
render: "em",
|
|
10
|
+
fontStyle: "italic"
|
|
12
11
|
});
|
|
12
|
+
|
|
13
13
|
export { Em, Span, Strong };
|
|
14
14
|
//# sourceMappingURL=Emphasis.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Emphasis.js","names":[],"sources":["esm/Emphasis.js"],"sourcesContent":["import { styled, Text } from \"@tamagui/web\";\nconst Strong = styled(Text, {\n render: \"strong\",\n fontWeight: \"bold\"\n});\nconst Span = styled(Text, {\n render: \"span\"\n});\nconst Em = styled(Text, {\n render: \"em\",\n fontStyle: \"italic\"\n});\nexport {\n Em,\n Span,\n Strong\n};\n//# sourceMappingURL=Emphasis.js.map\n"],"mappings":";;;AACA,MAAM,SAAS,OAAO,MAAM;CAC1B,QAAQ;CACR,YAAY;AACd,CAAC;AACD,MAAM,OAAO,OAAO,MAAM,EACxB,QAAQ,OACV,CAAC;AACD,MAAM,KAAK,OAAO,MAAM;CACtB,QAAQ;CACR,WAAW;AACb,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Text, styled } from "@tamagui/web";
|
|
2
|
+
|
|
2
3
|
var Strong = styled(Text, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
var Span = styled(Text, {
|
|
7
|
-
render: "span"
|
|
4
|
+
render: "strong",
|
|
5
|
+
fontWeight: "bold"
|
|
8
6
|
});
|
|
7
|
+
var Span = styled(Text, { render: "span" });
|
|
9
8
|
var Em = styled(Text, {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
render: "em",
|
|
10
|
+
fontStyle: "italic"
|
|
12
11
|
});
|
|
12
|
+
|
|
13
13
|
export { Em, Span, Strong };
|
|
14
14
|
//# sourceMappingURL=Emphasis.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Emphasis.native.js","names":[],"sources":["esm/Emphasis.native.js"],"sourcesContent":["import { styled, Text } from \"@tamagui/web\";\nvar Strong = styled(Text, {\n render: \"strong\",\n fontWeight: \"bold\"\n});\nvar Span = styled(Text, {\n render: \"span\"\n});\nvar Em = styled(Text, {\n render: \"em\",\n fontStyle: \"italic\"\n});\nexport {\n Em,\n Span,\n Strong\n};\n//# sourceMappingURL=Emphasis.js.map\n"],"mappings":";;;AACA,IAAI,SAAS,OAAO,MAAM;CACxB,QAAQ;CACR,YAAY;AACd,CAAC;AACD,IAAI,OAAO,OAAO,MAAM,EACtB,QAAQ,OACV,CAAC;AACD,IAAI,KAAK,OAAO,MAAM;CACpB,QAAQ;CACR,WAAW;AACb,CAAC"}
|
package/dist/esm/Headings.mjs
CHANGED
|
@@ -1,96 +1,50 @@
|
|
|
1
1
|
import { styled } from "@tamagui/web";
|
|
2
2
|
import { Paragraph } from "./Paragraph.mjs";
|
|
3
|
+
|
|
3
4
|
const Heading = styled(Paragraph, {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
render: "span",
|
|
6
|
+
displayName: "Heading",
|
|
7
|
+
role: "heading",
|
|
8
|
+
fontFamily: "heading",
|
|
9
|
+
margin: 0,
|
|
10
|
+
size: "8"
|
|
10
11
|
});
|
|
11
12
|
const H1 = styled(Heading, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
false: {
|
|
17
|
-
size: "$10"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
23
|
-
}
|
|
13
|
+
displayName: "H1",
|
|
14
|
+
render: "h1",
|
|
15
|
+
variants: { unstyled: { false: { size: "10" } } },
|
|
16
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
24
17
|
});
|
|
25
18
|
const H2 = styled(Heading, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
false: {
|
|
31
|
-
size: "$9"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
37
|
-
}
|
|
19
|
+
displayName: "H2",
|
|
20
|
+
render: "h2",
|
|
21
|
+
variants: { unstyled: { false: { size: "9" } } },
|
|
22
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
38
23
|
});
|
|
39
24
|
const H3 = styled(Heading, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
false: {
|
|
45
|
-
size: "$8"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
defaultVariants: {
|
|
50
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
51
|
-
}
|
|
25
|
+
displayName: "H3",
|
|
26
|
+
render: "h3",
|
|
27
|
+
variants: { unstyled: { false: { size: "8" } } },
|
|
28
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
52
29
|
});
|
|
53
30
|
const H4 = styled(Heading, {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
false: {
|
|
59
|
-
size: "$7"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
defaultVariants: {
|
|
64
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
65
|
-
}
|
|
31
|
+
displayName: "H4",
|
|
32
|
+
render: "h4",
|
|
33
|
+
variants: { unstyled: { false: { size: "7" } } },
|
|
34
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
66
35
|
});
|
|
67
36
|
const H5 = styled(Heading, {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
false: {
|
|
73
|
-
size: "$6"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
defaultVariants: {
|
|
78
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
79
|
-
}
|
|
37
|
+
displayName: "H5",
|
|
38
|
+
render: "h5",
|
|
39
|
+
variants: { unstyled: { false: { size: "6" } } },
|
|
40
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
80
41
|
});
|
|
81
42
|
const H6 = styled(Heading, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
false: {
|
|
87
|
-
size: "$5"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
defaultVariants: {
|
|
92
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false
|
|
93
|
-
}
|
|
43
|
+
displayName: "H6",
|
|
44
|
+
render: "h6",
|
|
45
|
+
variants: { unstyled: { false: { size: "5" } } },
|
|
46
|
+
defaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === "1" ? true : false }
|
|
94
47
|
});
|
|
48
|
+
|
|
95
49
|
export { H1, H2, H3, H4, H5, H6, Heading };
|
|
96
50
|
//# sourceMappingURL=Headings.mjs.map
|