@tamagui/text 1.89.28 → 1.89.30
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/wrapChildrenInText.native.js +22 -7
- package/dist/cjs/wrapChildrenInText.native.js.map +2 -2
- package/dist/esm/wrapChildrenInText.native.js +22 -6
- package/dist/esm/wrapChildrenInText.native.js.map +2 -2
- package/dist/jsx/wrapChildrenInText.native.js +22 -6
- package/dist/jsx/wrapChildrenInText.native.js.map +2 -2
- package/package.json +5 -5
|
@@ -26,7 +26,7 @@ __export(wrapChildrenInText_exports, {
|
|
|
26
26
|
wrapChildrenInText: () => wrapChildrenInText
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
29
|
-
var import_react = __toESM(require("react"));
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react"));
|
|
30
30
|
function _define_property(obj, key, value) {
|
|
31
31
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
32
32
|
value,
|
|
@@ -37,15 +37,30 @@ function _define_property(obj, key, value) {
|
|
|
37
37
|
}
|
|
38
38
|
function _object_spread(target) {
|
|
39
39
|
for (var i = 1; i < arguments.length; i++) {
|
|
40
|
-
var source = arguments[i] != null ? arguments[i] : {},
|
|
41
|
-
typeof Object.getOwnPropertySymbols == "function" && (
|
|
40
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
41
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
42
42
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
43
|
-
}))),
|
|
43
|
+
}))), ownKeys2.forEach(function(key) {
|
|
44
44
|
_define_property(target, key, source[key]);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
return target;
|
|
48
48
|
}
|
|
49
|
+
function ownKeys(object, enumerableOnly) {
|
|
50
|
+
var keys = Object.keys(object);
|
|
51
|
+
if (Object.getOwnPropertySymbols) {
|
|
52
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
53
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
54
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
55
|
+
})), keys.push.apply(keys, symbols);
|
|
56
|
+
}
|
|
57
|
+
return keys;
|
|
58
|
+
}
|
|
59
|
+
function _object_spread_props(target, source) {
|
|
60
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
61
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
62
|
+
}), target;
|
|
63
|
+
}
|
|
49
64
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
50
65
|
var children = propsIn.children, textProps = propsIn.textProps, size = propsIn.size, noTextWrap = propsIn.noTextWrap, color = propsIn.color, fontFamily = propsIn.fontFamily, fontSize = propsIn.fontSize, fontWeight = propsIn.fontWeight, letterSpacing = propsIn.letterSpacing, textAlign = propsIn.textAlign, fontStyle = propsIn.fontStyle, maxFontSizeMultiplier = propsIn.maxFontSizeMultiplier;
|
|
51
66
|
if (noTextWrap || !children)
|
|
@@ -56,9 +71,9 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
56
71
|
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), import_react.default.Children.toArray(children).map(function(child, index) {
|
|
57
72
|
return typeof child == "string" ? (
|
|
58
73
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
}
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, _object_spread_props(_object_spread({}, props, textProps), {
|
|
75
|
+
children: child
|
|
76
|
+
}), index)
|
|
62
77
|
) : child;
|
|
63
78
|
});
|
|
64
79
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/text/src/wrapChildrenInText.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
5
|
-
"names": ["wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "React", "Children", "toArray", "map", "child", "index", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDACA,eAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASX,SAASA,mBACdC,eACAC,SAGAC,YAAgC;AAEhC,MACEC,WAYEF,QAZFE,UACAC,YAWEH,QAXFG,WACAC,OAUEJ,QAVFI,MACAC,aASEL,QATFK,YACAC,QAQEN,QARFM,OACAC,aAOEP,QAPFO,YACAC,WAMER,QANFQ,UACAC,aAKET,QALFS,YACAC,gBAIEV,QAJFU,eACAC,YAGEX,QAHFW,WACAC,YAEEZ,QAFFY,WACAC,wBACEb,QADFa;AAGF,MAAIR,cAAc,CAACH;AACjB,WAAO;MAACA;;AAGV,MAAMY,QAAQ,eAAA,CAAA,GACTb,UAAAA;AAIL,SAAIK,UAAOQ,MAAMR,QAAQA,QACrBC,eAAYO,MAAMP,aAAaA,aAC/BC,aAAUM,MAAMN,WAAWA,WAC3BC,eAAYK,MAAML,aAAaA,aAC/BC,kBAAeI,MAAMJ,gBAAgBA,gBACrCC,cAAWG,MAAMH,YAAYA,YAC7BP,SAAMU,MAAMV,OAAOA,OACnBQ,cAAWE,MAAMF,YAAYA,YAC7BC,0BAAuBC,MAAMD,wBAAwBA,wBAElDE,aAAAA,QAAMC,SAASC,QAAQf,QAAAA,EAAUgB,IAAI,SAACC,OAAOC,OAAAA;AAClD,WAAO,OAAOD,SAAU;;MAEtB,uCAAAE,KAACtB,eAAAA,qBAAAA,eAAAA,CAAAA,GAA8Be,OAAWX,SAAAA,GAAAA;kBACvCgB;UADiBC,KAAAA;QAIpBD;EAEJ,CAAA;AACF;",
|
|
5
|
+
"names": ["wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "React", "Children", "toArray", "map", "child", "index", "_jsx"]
|
|
6
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
function _define_property(obj, key, value) {
|
|
3
4
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -9,15 +10,30 @@ function _define_property(obj, key, value) {
|
|
|
9
10
|
}
|
|
10
11
|
function _object_spread(target) {
|
|
11
12
|
for (var i = 1; i < arguments.length; i++) {
|
|
12
|
-
var source = arguments[i] != null ? arguments[i] : {},
|
|
13
|
-
typeof Object.getOwnPropertySymbols == "function" && (
|
|
13
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
14
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
14
15
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
15
|
-
}))),
|
|
16
|
+
}))), ownKeys2.forEach(function(key) {
|
|
16
17
|
_define_property(target, key, source[key]);
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
return target;
|
|
20
21
|
}
|
|
22
|
+
function ownKeys(object, enumerableOnly) {
|
|
23
|
+
var keys = Object.keys(object);
|
|
24
|
+
if (Object.getOwnPropertySymbols) {
|
|
25
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
27
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
28
|
+
})), keys.push.apply(keys, symbols);
|
|
29
|
+
}
|
|
30
|
+
return keys;
|
|
31
|
+
}
|
|
32
|
+
function _object_spread_props(target, source) {
|
|
33
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
34
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
35
|
+
}), target;
|
|
36
|
+
}
|
|
21
37
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
22
38
|
var children = propsIn.children, textProps = propsIn.textProps, size = propsIn.size, noTextWrap = propsIn.noTextWrap, color = propsIn.color, fontFamily = propsIn.fontFamily, fontSize = propsIn.fontSize, fontWeight = propsIn.fontWeight, letterSpacing = propsIn.letterSpacing, textAlign = propsIn.textAlign, fontStyle = propsIn.fontStyle, maxFontSizeMultiplier = propsIn.maxFontSizeMultiplier;
|
|
23
39
|
if (noTextWrap || !children)
|
|
@@ -28,9 +44,9 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
28
44
|
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), React.Children.toArray(children).map(function(child, index) {
|
|
29
45
|
return typeof child == "string" ? (
|
|
30
46
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
}
|
|
47
|
+
/* @__PURE__ */ _jsx(TextComponent, _object_spread_props(_object_spread({}, props, textProps), {
|
|
48
|
+
children: child
|
|
49
|
+
}), index)
|
|
34
50
|
) : child;
|
|
35
51
|
});
|
|
36
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/text/src/wrapChildrenInText.tsx"],
|
|
4
|
-
"mappings": "AACA,OAAOA,WAAW
|
|
5
|
-
"names": ["React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "Children", "toArray", "map", "child", "index"
|
|
4
|
+
"mappings": ";AACA,OAAOA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASX,SAASC,mBACdC,eACAC,SAGAC,YAAgC;AAEhC,MACEC,WAYEF,QAZFE,UACAC,YAWEH,QAXFG,WACAC,OAUEJ,QAVFI,MACAC,aASEL,QATFK,YACAC,QAQEN,QARFM,OACAC,aAOEP,QAPFO,YACAC,WAMER,QANFQ,UACAC,aAKET,QALFS,YACAC,gBAIEV,QAJFU,eACAC,YAGEX,QAHFW,WACAC,YAEEZ,QAFFY,WACAC,wBACEb,QADFa;AAGF,MAAIR,cAAc,CAACH;AACjB,WAAO;MAACA;;AAGV,MAAMY,QAAQ,eAAA,CAAA,GACTb,UAAAA;AAIL,SAAIK,UAAOQ,MAAMR,QAAQA,QACrBC,eAAYO,MAAMP,aAAaA,aAC/BC,aAAUM,MAAMN,WAAWA,WAC3BC,eAAYK,MAAML,aAAaA,aAC/BC,kBAAeI,MAAMJ,gBAAgBA,gBACrCC,cAAWG,MAAMH,YAAYA,YAC7BP,SAAMU,MAAMV,OAAOA,OACnBQ,cAAWE,MAAMF,YAAYA,YAC7BC,0BAAuBC,MAAMD,wBAAwBA,wBAElDhB,MAAMkB,SAASC,QAAQd,QAAAA,EAAUe,IAAI,SAACC,OAAOC,OAAAA;AAClD,WAAO,OAAOD,SAAU;;MAEtB,qBAACnB,eAAAA,qBAAAA,eAAAA,CAAAA,GAA8Be,OAAWX,SAAAA,GAAAA;kBACvCe;UADiBC,KAAAA;QAIpBD;EAEJ,CAAA;AACF;",
|
|
5
|
+
"names": ["React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "Children", "toArray", "map", "child", "index"]
|
|
6
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
function _define_property(obj, key, value) {
|
|
3
4
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -9,15 +10,30 @@ function _define_property(obj, key, value) {
|
|
|
9
10
|
}
|
|
10
11
|
function _object_spread(target) {
|
|
11
12
|
for (var i = 1; i < arguments.length; i++) {
|
|
12
|
-
var source = arguments[i] != null ? arguments[i] : {},
|
|
13
|
-
typeof Object.getOwnPropertySymbols == "function" && (
|
|
13
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
14
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
14
15
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
15
|
-
}))),
|
|
16
|
+
}))), ownKeys2.forEach(function(key) {
|
|
16
17
|
_define_property(target, key, source[key]);
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
return target;
|
|
20
21
|
}
|
|
22
|
+
function ownKeys(object, enumerableOnly) {
|
|
23
|
+
var keys = Object.keys(object);
|
|
24
|
+
if (Object.getOwnPropertySymbols) {
|
|
25
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
27
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
28
|
+
})), keys.push.apply(keys, symbols);
|
|
29
|
+
}
|
|
30
|
+
return keys;
|
|
31
|
+
}
|
|
32
|
+
function _object_spread_props(target, source) {
|
|
33
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
34
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
35
|
+
}), target;
|
|
36
|
+
}
|
|
21
37
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
22
38
|
var children = propsIn.children, textProps = propsIn.textProps, size = propsIn.size, noTextWrap = propsIn.noTextWrap, color = propsIn.color, fontFamily = propsIn.fontFamily, fontSize = propsIn.fontSize, fontWeight = propsIn.fontWeight, letterSpacing = propsIn.letterSpacing, textAlign = propsIn.textAlign, fontStyle = propsIn.fontStyle, maxFontSizeMultiplier = propsIn.maxFontSizeMultiplier;
|
|
23
39
|
if (noTextWrap || !children)
|
|
@@ -28,9 +44,9 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
28
44
|
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), React.Children.toArray(children).map(function(child, index) {
|
|
29
45
|
return typeof child == "string" ? (
|
|
30
46
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
}
|
|
47
|
+
/* @__PURE__ */ _jsx(TextComponent, _object_spread_props(_object_spread({}, props, textProps), {
|
|
48
|
+
children: child
|
|
49
|
+
}), index)
|
|
34
50
|
) : child;
|
|
35
51
|
});
|
|
36
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/text/src/wrapChildrenInText.tsx"],
|
|
4
|
-
"mappings": "AACA,OAAOA,WAAW
|
|
5
|
-
"names": ["React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "Children", "toArray", "map", "child", "index"
|
|
4
|
+
"mappings": ";AACA,OAAOA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASX,SAASC,mBACdC,eACAC,SAGAC,YAAgC;AAEhC,MACEC,WAYEF,QAZFE,UACAC,YAWEH,QAXFG,WACAC,OAUEJ,QAVFI,MACAC,aASEL,QATFK,YACAC,QAQEN,QARFM,OACAC,aAOEP,QAPFO,YACAC,WAMER,QANFQ,UACAC,aAKET,QALFS,YACAC,gBAIEV,QAJFU,eACAC,YAGEX,QAHFW,WACAC,YAEEZ,QAFFY,WACAC,wBACEb,QADFa;AAGF,MAAIR,cAAc,CAACH;AACjB,WAAO;MAACA;;AAGV,MAAMY,QAAQ,eAAA,CAAA,GACTb,UAAAA;AAIL,SAAIK,UAAOQ,MAAMR,QAAQA,QACrBC,eAAYO,MAAMP,aAAaA,aAC/BC,aAAUM,MAAMN,WAAWA,WAC3BC,eAAYK,MAAML,aAAaA,aAC/BC,kBAAeI,MAAMJ,gBAAgBA,gBACrCC,cAAWG,MAAMH,YAAYA,YAC7BP,SAAMU,MAAMV,OAAOA,OACnBQ,cAAWE,MAAMF,YAAYA,YAC7BC,0BAAuBC,MAAMD,wBAAwBA,wBAElDhB,MAAMkB,SAASC,QAAQd,QAAAA,EAAUe,IAAI,SAACC,OAAOC,OAAAA;AAClD,WAAO,OAAOD,SAAU;;MAEtB,qBAACnB,eAAAA,qBAAAA,eAAAA,CAAAA,GAA8Be,OAAWX,SAAAA,GAAAA;kBACvCe;UADiBC,KAAAA;QAIpBD;EAEJ,CAAA;AACF;",
|
|
5
|
+
"names": ["React", "wrapChildrenInText", "TextComponent", "propsIn", "extraProps", "children", "textProps", "size", "noTextWrap", "color", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "textAlign", "fontStyle", "maxFontSizeMultiplier", "props", "Children", "toArray", "map", "child", "index"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/text",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.30",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tamagui/get-font-sized": "1.89.
|
|
36
|
-
"@tamagui/helpers-tamagui": "1.89.
|
|
37
|
-
"@tamagui/web": "1.89.
|
|
35
|
+
"@tamagui/get-font-sized": "1.89.30",
|
|
36
|
+
"@tamagui/helpers-tamagui": "1.89.30",
|
|
37
|
+
"@tamagui/web": "1.89.30"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "*"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@tamagui/build": "1.89.
|
|
43
|
+
"@tamagui/build": "1.89.30",
|
|
44
44
|
"react": "^18.2.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|