@shop-on/create-theme 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shop-on/create-theme",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Scaffolds a Shop-On storefront theme: `npm create @shop-on/theme <dir>`.",
5
5
  "license": "SEE LICENSE IN dist/LICENSE.md",
6
6
  "bin": {
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@bprogress/core": "1.3.4",
20
- "@shop-on/i18n": "^0.3.0",
21
- "@shop-on/theme-contract": "^0.3.0",
22
- "@shop-on/theme-loader": "^0.3.0",
23
- "@shop-on/theme-react": "^0.3.0",
24
- "@shop-on/theme-routes": "^0.3.0",
25
- "@shop-on/theme-runtime": "^0.3.0",
26
- "@shop-on/theme-server": "^0.3.0",
27
- "@shop-on/theme-system": "^0.3.0",
20
+ "@shop-on/i18n": "^0.4.0",
21
+ "@shop-on/theme-contract": "^0.4.0",
22
+ "@shop-on/theme-loader": "^0.4.0",
23
+ "@shop-on/theme-react": "^0.4.0",
24
+ "@shop-on/theme-routes": "^0.4.0",
25
+ "@shop-on/theme-runtime": "^0.4.0",
26
+ "@shop-on/theme-server": "^0.4.0",
27
+ "@shop-on/theme-system": "^0.4.0",
28
28
  "@tailwindcss/vite": "4.3.3",
29
29
  "@tanstack/react-router": "1.170.45",
30
30
  "@tanstack/react-start": "1.169.3",
@@ -35,8 +35,8 @@
35
35
  "tailwindcss": "4.3.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@shop-on/theme-config": "^0.3.0",
39
- "@shop-on/theme-dev-host": "^0.3.0",
38
+ "@shop-on/theme-config": "^0.4.0",
39
+ "@shop-on/theme-dev-host": "^0.4.0",
40
40
  "@spiriit/vite-plugin-svg-spritemap": "7.2.0",
41
41
  "@types/node": "26.6.5",
42
42
  "@types/react": "19.3.0",
@@ -7,6 +7,10 @@
7
7
  "empty": "Your cart is empty.",
8
8
  "heading": "Your cart"
9
9
  },
10
+ "footer": {
11
+ "platform_name": "Cody",
12
+ "powered_by": "Powered by"
13
+ },
10
14
  "password": {
11
15
  "placeholder": "Password",
12
16
  "submit": "Enter"
@@ -7,6 +7,10 @@
7
7
  "empty": "Таны сагс хоосон байна.",
8
8
  "heading": "Таны сагс"
9
9
  },
10
+ "footer": {
11
+ "platform_name": "Cody",
12
+ "powered_by": "Powered by"
13
+ },
10
14
  "password": {
11
15
  "placeholder": "Нууц үг",
12
16
  "submit": "Орох"
@@ -1,3 +1,10 @@
1
+ import { useTranslations } from "@shop-on/i18n";
2
+ import { CodyLogo } from "@shop-on/theme-react/cody-logo";
3
+
4
+ // The platform credit ("Powered by" + the Cody mark, linked to cody.mn) is
5
+ // required in every theme (docs/theme-development.md, "Platform credit"). Keep
6
+ // it when you restyle the footer: the label stays English in every locale and
7
+ // the mark's letters take the main text color.
1
8
  export default function Footer({
2
9
  sectionId,
3
10
  copyright = "© Starter",
@@ -5,9 +12,23 @@ export default function Footer({
5
12
  sectionId?: string;
6
13
  copyright?: string;
7
14
  }) {
15
+ const t = useTranslations("footer");
8
16
  return (
9
17
  <footer data-section-id={sectionId} className="border-t border-border">
10
- <div className="mx-auto max-w-6xl px-6 py-10 text-sm text-muted">{copyright}</div>
18
+ <div className="mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-4 px-6 py-10 text-sm text-muted">
19
+ <span>{copyright}</span>
20
+ <span>
21
+ {t("powered_by")}{" "}
22
+ <a
23
+ href="https://cody.mn"
24
+ target="_blank"
25
+ rel="noopener noreferrer"
26
+ className="ml-1 inline-block align-middle text-foreground"
27
+ >
28
+ <CodyLogo className="h-[1.4em] w-auto" role="img" aria-label={t("platform_name")} />
29
+ </a>
30
+ </span>
31
+ </div>
11
32
  </footer>
12
33
  );
13
34
  }
@@ -1,6 +1,9 @@
1
1
  import { createStart } from "@tanstack/react-start";
2
2
  import { storefrontActivityMiddleware } from "@shop-on/theme-server/activity";
3
+ import { storefrontAvailabilityMiddleware } from "@shop-on/theme-server/availability";
3
4
 
5
+ // Order matters: the activity middleware answers `/health` before the
6
+ // availability check can turn a closed store's probe into a 503.
4
7
  export const startInstance = createStart(() => ({
5
- requestMiddleware: [storefrontActivityMiddleware],
8
+ requestMiddleware: [storefrontActivityMiddleware, storefrontAvailabilityMiddleware],
6
9
  }));