@shop-on/theme-react 0.3.0 → 0.4.0
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/cody-logo.d.ts +4 -0
- package/dist/cody-logo.js +50 -0
- package/dist/font-stylesheet.d.ts +5 -0
- package/dist/font-stylesheet.js +23 -0
- package/package.json +5 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
//#region src/cody-logo.tsx
|
|
4
|
+
function CodyLogo(props) {
|
|
5
|
+
const gradientId = useId();
|
|
6
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 189.36 73.9",
|
|
9
|
+
...props,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsxs("linearGradient", {
|
|
12
|
+
id: gradientId,
|
|
13
|
+
x1: "181.55",
|
|
14
|
+
x2: "162.84",
|
|
15
|
+
y1: "762.83",
|
|
16
|
+
y2: "706.7",
|
|
17
|
+
gradientTransform: "matrix(1 0 0 -1 0 779.58)",
|
|
18
|
+
gradientUnits: "userSpaceOnUse",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("stop", {
|
|
21
|
+
offset: "0",
|
|
22
|
+
stopColor: "#f89725"
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsx("stop", {
|
|
25
|
+
offset: ".63",
|
|
26
|
+
stopColor: "#ff007b"
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsx("stop", {
|
|
29
|
+
offset: "1",
|
|
30
|
+
stopColor: "#2a7ecb"
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("g", {
|
|
35
|
+
fill: "currentColor",
|
|
36
|
+
children: /* @__PURE__ */ jsx("path", { d: "M55.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@__PURE__ */ jsx("path", {
|
|
43
|
+
fill: "currentColor",
|
|
44
|
+
d: "M156.6 47.1 146 16.5c-.5-1.6.6-3.2 2.3-3.2h9c1.3 0 2.4.8 2.8 2l4.3 12.4c.3.8.3 1.8 0 2.6l-6 16.9c-.3.7-1.5.7-1.8-.1M136.6 0H128c-1.2 0-2.2 1-2.2 2.2v13.4c-3.5-1.8-7.5-2.7-11.8-2.5-12.2.6-22 10.7-22.3 22.8-.4 14.9 13 26.8 28.4 23.7 11.3-2.3 19.1-12.7 18.6-24.2V2.2c.1-1.2-.9-2.2-2.1-2.2m-21.3 47.2c-5.9 0-10.6-4.7-10.6-10.6S109.4 26 115.3 26s10.6 4.8 10.6 10.6-4.7 10.6-10.6 10.6"
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { CodyLogo };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/font-stylesheet.tsx
|
|
3
|
+
const SWAP_SCRIPT = { __html: "(function(l){if(l.sheet)l.media=\"all\";else l.addEventListener(\"load\",function(){l.media=\"all\"})})(document.currentScript.previousElementSibling)" };
|
|
4
|
+
function FontStylesheet({ href }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6
|
+
/* @__PURE__ */ jsx("link", {
|
|
7
|
+
rel: "stylesheet",
|
|
8
|
+
href,
|
|
9
|
+
media: "print",
|
|
10
|
+
onLoad: (event) => {
|
|
11
|
+
event.currentTarget.media = "all";
|
|
12
|
+
},
|
|
13
|
+
suppressHydrationWarning: true
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: SWAP_SCRIPT }),
|
|
16
|
+
/* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("link", {
|
|
17
|
+
rel: "stylesheet",
|
|
18
|
+
href
|
|
19
|
+
}) })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { FontStylesheet };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shop-on/theme-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "SEE LICENSE IN dist/LICENSE.md",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
"./analytics": "./dist/analytics.js",
|
|
12
12
|
"./article-json-ld": "./dist/article-json-ld.js",
|
|
13
13
|
"./breadcrumb-json-ld": "./dist/breadcrumb-json-ld.js",
|
|
14
|
+
"./cody-logo": "./dist/cody-logo.js",
|
|
14
15
|
"./custom-css": "./dist/custom-css.js",
|
|
15
16
|
"./editor-preview-bridge": "./dist/editor-preview-bridge.js",
|
|
16
17
|
"./editor-preview-bridge-utils": "./dist/editor-preview-bridge-utils.js",
|
|
17
18
|
"./faq-json-ld": "./dist/faq-json-ld.js",
|
|
19
|
+
"./font-stylesheet": "./dist/font-stylesheet.js",
|
|
18
20
|
"./hreflang-links": "./dist/hreflang-links.js",
|
|
19
21
|
"./link-utils": "./dist/link-utils.js",
|
|
20
22
|
"./preview-guard": "./dist/preview-guard.js",
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"./package.json": "./package.json"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@shop-on/theme-contract": "0.
|
|
33
|
-
"@shop-on/theme-runtime": "0.
|
|
34
|
+
"@shop-on/theme-contract": "0.4.0",
|
|
35
|
+
"@shop-on/theme-runtime": "0.4.0"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@tanstack/react-router": "1.170.45",
|