@thorprovider/create-thor-app 4.1.7 → 4.1.9
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
|
@@ -45,6 +45,11 @@ ALWAYS import from @thorprovider/types — NEVER define Product, Cart, Collectio
|
|
|
45
45
|
- Do NOT replace the commerce runtime globally with local demo data
|
|
46
46
|
- Do NOT gate storefront rendering on environment-variable checks
|
|
47
47
|
|
|
48
|
+
## Dark Mode
|
|
49
|
+
ThemeProvider is pre-configured in `app-providers.tsx` — do NOT create a new `theme-provider.tsx`.
|
|
50
|
+
Toggle theme with `useTheme()` from 'next-themes': `const { setTheme } = useTheme()`.
|
|
51
|
+
Dark mode tokens are in `styles/tokens.css` under `.dark { ... }` — use CSS variables, never hardcode colors.
|
|
52
|
+
|
|
48
53
|
## Stack
|
|
49
54
|
Next.js 16, React 19, TS strict, Tailwind 4, shadcn/ui.
|
|
50
55
|
Server Components default. 'use client' only for interactivity.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# ---------------------------------------------------------------------------
|
|
8
8
|
# Commerce Backend (optional)
|
|
9
9
|
# ---------------------------------------------------------------------------
|
|
10
|
-
# Which commerce platform to use: mock | medusa |
|
|
10
|
+
# Which commerce platform to use: mock | medusa | stelorder | custom
|
|
11
11
|
# Use `mock` to design/layout the storefront before a real backend is connected.
|
|
12
12
|
NEXT_PUBLIC_COMMERCE_PROVIDER=mock
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ import type { ProviderTypeString } from '@thorprovider/types'
|
|
|
15
15
|
import { isSupportedProviderType } from '@thorprovider/types'
|
|
16
16
|
|
|
17
17
|
/** Real-backend provider identifiers (must stay in sync with env.ts realProviderSchema) */
|
|
18
|
-
const REAL_BACKEND_PROVIDERS = new Set(['medusa', '
|
|
18
|
+
const REAL_BACKEND_PROVIDERS = new Set(['medusa', 'stelorder'])
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Serializable commerce config — safe to pass across the RSC boundary.
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import { z } from 'zod'
|
|
9
9
|
|
|
10
|
-
const realProviderSchema = z.enum(['medusa', '
|
|
10
|
+
const realProviderSchema = z.enum(['medusa', 'stelorder'])
|
|
11
11
|
|
|
12
12
|
const BaseEnvSchema = z.object({
|
|
13
13
|
NEXT_PUBLIC_COMMERCE_PROVIDER: z
|
|
14
|
-
.enum(['mock', 'medusa', '
|
|
14
|
+
.enum(['mock', 'medusa', 'stelorder', 'custom'])
|
|
15
15
|
.default('mock'),
|
|
16
16
|
|
|
17
17
|
NEXT_PUBLIC_DEFAULT_CURRENCY: z
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"generate:agent-index": "node ../../scripts/generate-core-agents-index.cjs"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@thorprovider/adapters": "^
|
|
15
|
-
"@thorprovider/types": "^3.
|
|
14
|
+
"@thorprovider/adapters": "^5.0.0",
|
|
15
|
+
"@thorprovider/types": "^3.3.0",
|
|
16
16
|
"clsx": "^2.1.1",
|
|
17
17
|
"next": "16.0.10",
|
|
18
18
|
"next-themes": "^0.4.6",
|