@tamagui/web 1.129.9 → 1.129.10
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/helpers/wrapStyleTags.cjs +10 -8
- package/dist/cjs/helpers/wrapStyleTags.js +3 -3
- package/dist/cjs/helpers/wrapStyleTags.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +2 -2
- package/dist/esm/helpers/wrapStyleTags.js +4 -4
- package/dist/esm/helpers/wrapStyleTags.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +11 -9
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/package.json +12 -12
- package/src/helpers/wrapStyleTags.tsx +19 -15
|
@@ -26,14 +26,16 @@ module.exports = __toCommonJS(wrapStyleTags_exports);
|
|
|
26
26
|
var import_constants = require("@tamagui/constants"),
|
|
27
27
|
import_helpers = require("@tamagui/helpers"),
|
|
28
28
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function getStyleTags(styles
|
|
30
|
-
if (import_constants.IS_REACT_19 && styles.length) return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
function getStyleTags(styles) {
|
|
30
|
+
if (import_constants.IS_REACT_19 && styles.length) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
31
|
+
children: styles.map(styleObject => {
|
|
32
|
+
const identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
33
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)("style", {
|
|
34
|
+
href: `t_${identifier}`,
|
|
35
|
+
precedence: "default",
|
|
36
|
+
children: styleObject[import_helpers.StyleObjectRules].join(`
|
|
36
37
|
`)
|
|
37
|
-
|
|
38
|
+
}, identifier);
|
|
39
|
+
})
|
|
38
40
|
});
|
|
39
41
|
}
|
|
@@ -18,9 +18,9 @@ __export(wrapStyleTags_exports, {
|
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(wrapStyleTags_exports);
|
|
20
20
|
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
function getStyleTags(styles
|
|
21
|
+
function getStyleTags(styles) {
|
|
22
22
|
if (import_constants.IS_REACT_19 && styles.length)
|
|
23
|
-
return styles.map((styleObject) => {
|
|
23
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: styles.map((styleObject) => {
|
|
24
24
|
const identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
25
25
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
26
26
|
"style",
|
|
@@ -32,6 +32,6 @@ function getStyleTags(styles, content) {
|
|
|
32
32
|
},
|
|
33
33
|
identifier
|
|
34
34
|
);
|
|
35
|
-
});
|
|
35
|
+
}) });
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=wrapStyleTags.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/wrapStyleTags.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA4B,+BAC5B,iBAAwD,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA4B,+BAC5B,iBAAwD,6BAShD;AAJD,SAAS,aAAa,QAAuB;AAClD,MAAI,gCACE,OAAO;AACT,WACE,2EACG,iBAAO,IAAI,CAAC,gBAAgB;AAC3B,YAAM,aAAa,YAAY,oCAAqB;AACpD,aACE;AAAA,QAAC;AAAA;AAAA,UAGC,MAAM,KAAK,UAAU;AAAA,UAErB,YAAW;AAAA,UAEV,sBAAY,+BAAgB,EAAE,KAAK;AAAA,CAAI;AAAA;AAAA,QANnC;AAAA,MAOP;AAAA,IAEJ,CAAC,GACH;AAIR;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -19,7 +19,7 @@ __export(wrapStyleTags_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(wrapStyleTags_exports);
|
|
21
21
|
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers");
|
|
22
|
-
function getStyleTags(styles
|
|
22
|
+
function getStyleTags(styles) {
|
|
23
23
|
import_constants.IS_REACT_19;
|
|
24
24
|
}
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/wrapStyleTags.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;uDAAA,mBAA4B,+BAC5B,iBAAwD;AAKjD,SAASA,aAAaC,
|
|
5
|
-
"names": ["getStyleTags", "styles", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;uDAAA,mBAA4B,+BAC5B,iBAAwD;AAKjD,SAASA,aAAaC,QAAqB;AAC5CC;AAsBN;",
|
|
5
|
+
"names": ["getStyleTags", "styles", "IS_REACT_19"]
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IS_REACT_19 } from "@tamagui/constants";
|
|
2
2
|
import { StyleObjectIdentifier, StyleObjectRules } from "@tamagui/helpers";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function getStyleTags(styles
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
function getStyleTags(styles) {
|
|
5
5
|
if (IS_REACT_19 && styles.length)
|
|
6
|
-
return styles.map((styleObject) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(Fragment, { children: styles.map((styleObject) => {
|
|
7
7
|
const identifier = styleObject[StyleObjectIdentifier];
|
|
8
8
|
return /* @__PURE__ */ jsx(
|
|
9
9
|
"style",
|
|
@@ -15,7 +15,7 @@ function getStyleTags(styles, content) {
|
|
|
15
15
|
},
|
|
16
16
|
identifier
|
|
17
17
|
);
|
|
18
|
-
});
|
|
18
|
+
}) });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
21
|
getStyleTags
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/wrapStyleTags.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB,wBAAwB;
|
|
4
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB,wBAAwB;AAShD,mBAIM,WAJN;AAJD,SAAS,aAAa,QAAuB;AAClD,MAAI,eACE,OAAO;AACT,WACE,gCACG,iBAAO,IAAI,CAAC,gBAAgB;AAC3B,YAAM,aAAa,YAAY,qBAAqB;AACpD,aACE;AAAA,QAAC;AAAA;AAAA,UAGC,MAAM,KAAK,UAAU;AAAA,UAErB,YAAW;AAAA,UAEV,sBAAY,gBAAgB,EAAE,KAAK;AAAA,CAAI;AAAA;AAAA,QANnC;AAAA,MAOP;AAAA,IAEJ,CAAC,GACH;AAIR;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { IS_REACT_19 } from "@tamagui/constants";
|
|
2
2
|
import { StyleObjectIdentifier, StyleObjectRules } from "@tamagui/helpers";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function getStyleTags(styles
|
|
5
|
-
if (IS_REACT_19 && styles.length) return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
function getStyleTags(styles) {
|
|
5
|
+
if (IS_REACT_19 && styles.length) return /* @__PURE__ */jsx(Fragment, {
|
|
6
|
+
children: styles.map(styleObject => {
|
|
7
|
+
const identifier = styleObject[StyleObjectIdentifier];
|
|
8
|
+
return /* @__PURE__ */jsx("style", {
|
|
9
|
+
href: `t_${identifier}`,
|
|
10
|
+
precedence: "default",
|
|
11
|
+
children: styleObject[StyleObjectRules].join(`
|
|
11
12
|
`)
|
|
12
|
-
|
|
13
|
+
}, identifier);
|
|
14
|
+
})
|
|
13
15
|
});
|
|
14
16
|
}
|
|
15
17
|
export { getStyleTags };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IS_REACT_19","StyleObjectIdentifier","StyleObjectRules","jsx","getStyleTags","styles","
|
|
1
|
+
{"version":3,"names":["IS_REACT_19","StyleObjectIdentifier","StyleObjectRules","Fragment","jsx","getStyleTags","styles","length","children","map","styleObject","identifier","href","precedence","join"],"sources":["../../../src/helpers/wrapStyleTags.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,SAASC,qBAAA,EAAuBC,gBAAA,QAAwB;AAShD,SAAAC,QAAA,EAIMC,GAAA,QAJN;AAJD,SAASC,aAAaC,MAAA,EAAuB;EAClD,IAAIN,WAAA,IACEM,MAAA,CAAOC,MAAA,EACT,OACE,eAAAH,GAAA,CAAAD,QAAA;IACGK,QAAA,EAAAF,MAAA,CAAOG,GAAA,CAAKC,WAAA,IAAgB;MAC3B,MAAMC,UAAA,GAAaD,WAAA,CAAYT,qBAAqB;MACpD,OACE,eAAAG,GAAA,CAAC;QAGCQ,IAAA,EAAM,KAAKD,UAAU;QAErBE,UAAA,EAAW;QAEVL,QAAA,EAAAE,WAAA,CAAYR,gBAAgB,EAAEY,IAAA,CAAK;AAAA,CAAI;MAAA,GANnCH,UAOP;IAEJ,CAAC;EAAA,CACH;AAIR","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IS_REACT_19","getStyleTags","styles"
|
|
1
|
+
{"version":3,"names":["IS_REACT_19","getStyleTags","styles"],"sources":["../../../src/helpers/wrapStyleTags.tsx"],"sourcesContent":[null],"mappings":"AAAA,0BAAS;AACT,SAASA,WAAA,4BAAuB;AASxB,yBAIM;AARP,SAASC,aAAaC,MAAA,EAAuB;EAClDF,WAAI;AAEA;AAGM,SACAC,YACE","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.129.
|
|
3
|
+
"version": "1.129.10",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.129.
|
|
31
|
-
"@tamagui/constants": "1.129.
|
|
32
|
-
"@tamagui/helpers": "1.129.
|
|
33
|
-
"@tamagui/is-equal-shallow": "1.129.
|
|
34
|
-
"@tamagui/normalize-css-color": "1.129.
|
|
35
|
-
"@tamagui/timer": "1.129.
|
|
36
|
-
"@tamagui/types": "1.129.
|
|
37
|
-
"@tamagui/use-did-finish-ssr": "1.129.
|
|
38
|
-
"@tamagui/use-event": "1.129.
|
|
39
|
-
"@tamagui/use-force-update": "1.129.
|
|
30
|
+
"@tamagui/compose-refs": "1.129.10",
|
|
31
|
+
"@tamagui/constants": "1.129.10",
|
|
32
|
+
"@tamagui/helpers": "1.129.10",
|
|
33
|
+
"@tamagui/is-equal-shallow": "1.129.10",
|
|
34
|
+
"@tamagui/normalize-css-color": "1.129.10",
|
|
35
|
+
"@tamagui/timer": "1.129.10",
|
|
36
|
+
"@tamagui/types": "1.129.10",
|
|
37
|
+
"@tamagui/use-did-finish-ssr": "1.129.10",
|
|
38
|
+
"@tamagui/use-event": "1.129.10",
|
|
39
|
+
"@tamagui/use-force-update": "1.129.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react-native": "*"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tamagui/build": "1.129.
|
|
47
|
+
"@tamagui/build": "1.129.10",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"csstype": "^3.0.10",
|
|
50
50
|
"react": "*",
|
|
@@ -4,23 +4,27 @@ import type { StyleObject } from '../types'
|
|
|
4
4
|
|
|
5
5
|
// turns out this is pretty slow, creating a bunch of extra tags...
|
|
6
6
|
|
|
7
|
-
export function getStyleTags(styles: StyleObject[]
|
|
7
|
+
export function getStyleTags(styles: StyleObject[]) {
|
|
8
8
|
if (IS_REACT_19 && process.env.TAMAGUI_TARGET !== 'native') {
|
|
9
9
|
if (styles.length) {
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
{styles.map((styleObject) => {
|
|
13
|
+
const identifier = styleObject[StyleObjectIdentifier]
|
|
14
|
+
return (
|
|
15
|
+
<style
|
|
16
|
+
key={identifier}
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
href={`t_${identifier}`}
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
precedence="default"
|
|
21
|
+
>
|
|
22
|
+
{styleObject[StyleObjectRules].join('\n')}
|
|
23
|
+
</style>
|
|
24
|
+
)
|
|
25
|
+
})}
|
|
26
|
+
</>
|
|
27
|
+
)
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
}
|