@thorprovider/storefront 0.15.4 → 0.16.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/README.md
CHANGED
|
@@ -113,10 +113,11 @@ storefront create my-shop \
|
|
|
113
113
|
| `--brand <color>` | named brand color (`orange`, `blue`, …) applied as a chromatic primary family (primary/foreground/ring/nav) over the starter theme (never prompted) | none |
|
|
114
114
|
| `--force`, `-f` | overwrite files that already exist | off |
|
|
115
115
|
|
|
116
|
-
Every scaffold ships
|
|
117
|
-
|
|
118
|
-
white cards, and `0.25rem` corners
|
|
119
|
-
modes. It is applied through the same
|
|
116
|
+
Every scaffold ships an **ember-and-graphite starter theme** before any brand
|
|
117
|
+
override: a burnt-orange call-to-action with warm white text on it, neutral
|
|
118
|
+
graphite chrome, a warm paper page field with white cards, and `0.25rem` corners
|
|
119
|
+
— every color pair clears WCAG AA in both modes. It is applied through the same
|
|
120
|
+
theme plan as `storefront theme --set`
|
|
120
121
|
(`scripts/theme/starter-theme.mjs`), so a starter palette and a hand-applied one
|
|
121
122
|
cannot drift; `--brand` is applied last and still wins for the primary family. A
|
|
122
123
|
later `sync` never reverts a theme change.
|
|
@@ -354,9 +354,13 @@ const DEMO_PROMOTION: UniversalMainMenuData['promotion'] = {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
|
-
* The header's DEMO navigation source: the full design-B taxonomy.
|
|
358
|
-
*
|
|
359
|
-
*
|
|
357
|
+
* The header's DEMO navigation source: the full design-B taxonomy.
|
|
358
|
+
*
|
|
359
|
+
* It deliberately carries no `preview` flags: this data reaches every page of a
|
|
360
|
+
* running storefront, and `preview.defaultOpen` would mount the panel open on
|
|
361
|
+
* each navigation — a visible flash that also covers page content. Design
|
|
362
|
+
* previews that want the panel open pass `preview` from their own fixture (see
|
|
363
|
+
* `blocks/audit/fixtures`), never from shipped runtime data.
|
|
360
364
|
*/
|
|
361
365
|
export function buildDemoHeaderMenu(): UniversalMainMenuData {
|
|
362
366
|
return {
|
|
@@ -364,7 +368,6 @@ export function buildDemoHeaderMenu(): UniversalMainMenuData {
|
|
|
364
368
|
config: buildMenuConfig(),
|
|
365
369
|
labels: DEMO_MENU_LABELS,
|
|
366
370
|
promotion: DEMO_PROMOTION,
|
|
367
|
-
preview: { defaultOpen: true },
|
|
368
371
|
}
|
|
369
372
|
}
|
|
370
373
|
|
package/bin/storefront.js
CHANGED
|
@@ -806,9 +806,10 @@ function runYarn(yarnSpec, cmdArgs, cwd, env) {
|
|
|
806
806
|
return res.status ?? 1
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
-
// Apply the starter
|
|
810
|
-
// through the same theme-plan pipeline the `theme` command uses. The
|
|
811
|
-
// the default every scaffold ships (orange CTA,
|
|
809
|
+
// Apply the starter ember-and-graphite palette and then a named brand color,
|
|
810
|
+
// both through the same theme-plan pipeline the `theme` command uses. The
|
|
811
|
+
// starter is the default every scaffold ships (burnt-orange CTA, graphite
|
|
812
|
+
// chrome, warm paper page, tight corners); a
|
|
812
813
|
// `--brand` on top of it overrides the primary family, so `create --brand` and
|
|
813
814
|
// `theme --brand` still agree. Returns `{ css }` or `{ error }`.
|
|
814
815
|
function applyCreateTheme(globalsCss, brand) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thorprovider/storefront",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Deterministic storefront scaffolder and installable OpenCode skill suite for Thor Commerce (Next.js, @thorprovider/blocks, @thorprovider/adapters, Medusa)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "bin/storefront.js",
|
package/scripts/candidate.mjs
CHANGED
|
@@ -47,7 +47,7 @@ export const CANDIDATE_TOOLSET = Object.freeze({
|
|
|
47
47
|
'@json-render/next': '0.21.0',
|
|
48
48
|
}),
|
|
49
49
|
local: Object.freeze({
|
|
50
|
-
'@thorprovider/blocks': '4.11.
|
|
50
|
+
'@thorprovider/blocks': '4.11.1',
|
|
51
51
|
'@thorprovider/adapters': '5.8.1',
|
|
52
52
|
'@thorprovider/runtime': '0.10.1',
|
|
53
53
|
'@thorprovider/types': '7.8.0',
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
// The starter theme every `create` installs before any brand override.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// tests/starter-theme.test.ts).
|
|
3
|
+
// An ember-and-graphite identity: a burnt-orange call-to-action with warm white
|
|
4
|
+
// text on it, neutral graphite chrome (no corporate navy), a warm paper page
|
|
5
|
+
// field with white cards, and tight corners. Values are OKLCH so the lightness
|
|
6
|
+
// channel predicts contrast without a checker; every background/foreground pair
|
|
7
|
+
// the theme plan reports clears WCAG AA (see tests/starter-theme.test.ts).
|
|
8
|
+
//
|
|
9
|
+
// The chrome stays at chroma <= 0.005 on purpose: a neutral graphite reads as
|
|
10
|
+
// premium retail, while the old navy chrome plus #ff9900 orange read as a
|
|
11
|
+
// marketplace clone. Orange is the only chromatic voice in the shell.
|
|
8
12
|
//
|
|
9
13
|
// One source of truth: `create` applies this through the same theme-plan
|
|
10
14
|
// pipeline as `storefront theme --set`, so a starter palette and a hand-applied
|
|
@@ -16,70 +20,70 @@ import { normalizeOperation, planCss } from './theme-plan.mjs'
|
|
|
16
20
|
export const STARTER_THEME = {
|
|
17
21
|
radius: '0.25rem',
|
|
18
22
|
light: {
|
|
19
|
-
background: 'oklch(0.
|
|
20
|
-
foreground: 'oklch(0.
|
|
23
|
+
background: 'oklch(0.972 0.004 70)',
|
|
24
|
+
foreground: 'oklch(0.195 0.004 70)',
|
|
21
25
|
card: 'oklch(1 0 0)',
|
|
22
|
-
'card-foreground': 'oklch(0.
|
|
26
|
+
'card-foreground': 'oklch(0.195 0.004 70)',
|
|
23
27
|
popover: 'oklch(1 0 0)',
|
|
24
|
-
'popover-foreground': 'oklch(0.
|
|
25
|
-
primary: 'oklch(0.
|
|
26
|
-
'primary-foreground': 'oklch(0.
|
|
27
|
-
'primary-hover': 'oklch(0.
|
|
28
|
-
'primary-soft': 'oklch(0.
|
|
29
|
-
secondary: 'oklch(0.
|
|
30
|
-
'secondary-foreground': 'oklch(0.
|
|
31
|
-
muted: 'oklch(0.
|
|
32
|
-
'muted-foreground': 'oklch(0.
|
|
33
|
-
accent: 'oklch(0.
|
|
34
|
-
'accent-foreground': 'oklch(0.
|
|
35
|
-
border: 'oklch(0.
|
|
36
|
-
input: 'oklch(0.
|
|
37
|
-
ring: 'oklch(0.
|
|
28
|
+
'popover-foreground': 'oklch(0.195 0.004 70)',
|
|
29
|
+
primary: 'oklch(0.545 0.152 42)',
|
|
30
|
+
'primary-foreground': 'oklch(0.985 0.004 60)',
|
|
31
|
+
'primary-hover': 'oklch(0.49 0.142 40)',
|
|
32
|
+
'primary-soft': 'oklch(0.955 0.022 55)',
|
|
33
|
+
secondary: 'oklch(0.955 0.004 70)',
|
|
34
|
+
'secondary-foreground': 'oklch(0.195 0.004 70)',
|
|
35
|
+
muted: 'oklch(0.955 0.004 70)',
|
|
36
|
+
'muted-foreground': 'oklch(0.50 0.005 70)',
|
|
37
|
+
accent: 'oklch(0.952 0.028 55)',
|
|
38
|
+
'accent-foreground': 'oklch(0.195 0.004 70)',
|
|
39
|
+
border: 'oklch(0.895 0.005 70)',
|
|
40
|
+
input: 'oklch(0.895 0.005 70)',
|
|
41
|
+
ring: 'oklch(0.545 0.152 42)',
|
|
38
42
|
destructive: 'oklch(0.497 0.178 33.5)',
|
|
39
43
|
'destructive-foreground': 'oklch(0.985 0.004 33.5)',
|
|
40
|
-
nav: 'oklch(0.
|
|
41
|
-
promo: 'oklch(0.
|
|
42
|
-
'promo-foreground': 'oklch(0.
|
|
43
|
-
stock: 'oklch(0.
|
|
44
|
+
nav: 'oklch(0.185 0.004 70)',
|
|
45
|
+
promo: 'oklch(0.545 0.152 42)',
|
|
46
|
+
'promo-foreground': 'oklch(0.985 0.004 60)',
|
|
47
|
+
stock: 'oklch(0.50 0.095 165)',
|
|
44
48
|
urgent: 'oklch(0.497 0.178 33.5)',
|
|
45
|
-
success: 'oklch(0.
|
|
46
|
-
'success-foreground': 'oklch(0.985 0.
|
|
47
|
-
warning: 'oklch(0.
|
|
48
|
-
'warning-foreground': 'oklch(0.
|
|
49
|
+
success: 'oklch(0.50 0.095 165)',
|
|
50
|
+
'success-foreground': 'oklch(0.985 0.008 165)',
|
|
51
|
+
warning: 'oklch(0.78 0.15 70)',
|
|
52
|
+
'warning-foreground': 'oklch(0.19 0.01 70)',
|
|
49
53
|
error: 'oklch(0.497 0.178 33.5)',
|
|
50
54
|
},
|
|
51
55
|
dark: {
|
|
52
|
-
background: 'oklch(0.
|
|
53
|
-
foreground: 'oklch(0.
|
|
54
|
-
card: 'oklch(0.
|
|
55
|
-
'card-foreground': 'oklch(0.
|
|
56
|
-
popover: 'oklch(0.
|
|
57
|
-
'popover-foreground': 'oklch(0.
|
|
58
|
-
primary: 'oklch(0.
|
|
59
|
-
'primary-foreground': 'oklch(0.175 0.
|
|
60
|
-
'primary-hover': 'oklch(0.
|
|
61
|
-
'primary-soft': 'oklch(0.
|
|
62
|
-
secondary: 'oklch(0.
|
|
63
|
-
'secondary-foreground': 'oklch(0.
|
|
64
|
-
muted: 'oklch(0.
|
|
65
|
-
'muted-foreground': 'oklch(0.
|
|
66
|
-
accent: 'oklch(0.
|
|
67
|
-
'accent-foreground': 'oklch(0.
|
|
68
|
-
border: 'oklch(0.
|
|
69
|
-
input: 'oklch(0.
|
|
70
|
-
ring: 'oklch(0.
|
|
71
|
-
destructive: 'oklch(0.
|
|
72
|
-
'destructive-foreground': 'oklch(0.
|
|
73
|
-
nav: 'oklch(0.
|
|
74
|
-
promo: 'oklch(0.
|
|
75
|
-
'promo-foreground': 'oklch(0.175 0.
|
|
76
|
-
stock: 'oklch(0.
|
|
77
|
-
urgent: 'oklch(0.
|
|
78
|
-
success: 'oklch(0.
|
|
79
|
-
'success-foreground': 'oklch(0.
|
|
80
|
-
warning: 'oklch(0.
|
|
81
|
-
'warning-foreground': 'oklch(0.
|
|
82
|
-
error: 'oklch(0.
|
|
56
|
+
background: 'oklch(0.175 0.004 70)',
|
|
57
|
+
foreground: 'oklch(0.965 0.003 70)',
|
|
58
|
+
card: 'oklch(0.225 0.005 70)',
|
|
59
|
+
'card-foreground': 'oklch(0.965 0.003 70)',
|
|
60
|
+
popover: 'oklch(0.225 0.005 70)',
|
|
61
|
+
'popover-foreground': 'oklch(0.965 0.003 70)',
|
|
62
|
+
primary: 'oklch(0.70 0.145 52)',
|
|
63
|
+
'primary-foreground': 'oklch(0.175 0.004 70)',
|
|
64
|
+
'primary-hover': 'oklch(0.76 0.14 55)',
|
|
65
|
+
'primary-soft': 'oklch(0.30 0.045 45)',
|
|
66
|
+
secondary: 'oklch(0.27 0.005 70)',
|
|
67
|
+
'secondary-foreground': 'oklch(0.965 0.003 70)',
|
|
68
|
+
muted: 'oklch(0.27 0.005 70)',
|
|
69
|
+
'muted-foreground': 'oklch(0.75 0.006 70)',
|
|
70
|
+
accent: 'oklch(0.30 0.045 45)',
|
|
71
|
+
'accent-foreground': 'oklch(0.965 0.003 70)',
|
|
72
|
+
border: 'oklch(0.31 0.005 70)',
|
|
73
|
+
input: 'oklch(0.31 0.005 70)',
|
|
74
|
+
ring: 'oklch(0.70 0.145 52)',
|
|
75
|
+
destructive: 'oklch(0.50 0.16 30)',
|
|
76
|
+
'destructive-foreground': 'oklch(0.985 0.004 33.5)',
|
|
77
|
+
nav: 'oklch(0.145 0.004 70)',
|
|
78
|
+
promo: 'oklch(0.70 0.145 52)',
|
|
79
|
+
'promo-foreground': 'oklch(0.175 0.004 70)',
|
|
80
|
+
stock: 'oklch(0.70 0.105 165)',
|
|
81
|
+
urgent: 'oklch(0.68 0.16 32)',
|
|
82
|
+
success: 'oklch(0.70 0.105 165)',
|
|
83
|
+
'success-foreground': 'oklch(0.15 0.02 165)',
|
|
84
|
+
warning: 'oklch(0.80 0.14 72)',
|
|
85
|
+
'warning-foreground': 'oklch(0.15 0.015 72)',
|
|
86
|
+
error: 'oklch(0.68 0.16 32)',
|
|
83
87
|
},
|
|
84
88
|
}
|
|
85
89
|
|