create-cogenta 0.2.1 → 0.5.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/blueprint-defaults.d.ts.map +1 -1
- package/dist/blueprint-defaults.js +6 -0
- package/dist/blueprint-defaults.js.map +1 -1
- package/dist/blueprints/assets/photos/association/community-cleanup.jpg +0 -0
- package/dist/blueprints/assets/photos/association/fundraising-dinner.jpg +0 -0
- package/dist/blueprints/assets/photos/association/garden-planting.jpg +0 -0
- package/dist/blueprints/assets/photos/association/harvest-food-drive.jpg +0 -0
- package/dist/blueprints/assets/photos/association/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/association/volunteer-orientation.jpg +0 -0
- package/dist/blueprints/assets/photos/association/winter-coat-collection.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/blog-runs-itself.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/desk-setup.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/editing.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/notebooks.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/plain-text-editor.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/reading-nonfiction.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/small-tool.jpg +0 -0
- package/dist/blueprints/assets/photos/blog/writing-schedule.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/business-2.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/business-3.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/business.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/culture-2.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/culture-3.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/culture.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/news-2.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/news-3.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/news.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/opinion-2.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/opinion-3.jpg +0 -0
- package/dist/blueprints/assets/photos/magazine/opinion.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/adatum-publishing.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/contoso-mobile-app.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/fabrikam-annual-report.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/litware-signage.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/northwind-rebrand.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/proseware-launch.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/tailspin-streaming.jpg +0 -0
- package/dist/blueprints/assets/photos/portfolio/wingtip-wayfinding.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/charred-octopus.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/chocolate-tart.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/creme-brulee.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/house-red.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/house-white.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/pan-seared-trout.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/poached-pear.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/roasted-beet-salad.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/slow-roast-duck-leg.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/soup-of-the-day.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/sparkling-water.jpg +0 -0
- package/dist/blueprints/assets/photos/restaurant/wild-mushroom-risotto.jpg +0 -0
- package/dist/blueprints/assets/photos/saas/avatar-1.jpg +0 -0
- package/dist/blueprints/assets/photos/saas/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/store/camp-blanket.jpg +0 -0
- package/dist/blueprints/assets/photos/store/canvas-tote.jpg +0 -0
- package/dist/blueprints/assets/photos/store/cast-iron-skillet.jpg +0 -0
- package/dist/blueprints/assets/photos/store/ceramic-pour-over-set.jpg +0 -0
- package/dist/blueprints/assets/photos/store/enamel-mug.jpg +0 -0
- package/dist/blueprints/assets/photos/store/everyday-tee.jpg +0 -0
- package/dist/blueprints/assets/photos/store/field-jacket.jpg +0 -0
- package/dist/blueprints/assets/photos/store/hero.jpg +0 -0
- package/dist/blueprints/assets/photos/store/leather-card-holder.jpg +0 -0
- package/dist/blueprints/assets/photos/store/linen-table-runner.jpg +0 -0
- package/dist/blueprints/assets/photos/store/trail-tote.jpg +0 -0
- package/dist/blueprints/assets/photos/store/wool-beanie.jpg +0 -0
- package/dist/blueprints/assets/photos/store/wool-overshirt.jpg +0 -0
- package/dist/blueprints/assets/photos/vitrine/avatar-1.jpg +0 -0
- package/dist/blueprints/assets/photos/vitrine/avatar-2.jpg +0 -0
- package/dist/blueprints/assets/photos/vitrine/avatar-3.jpg +0 -0
- package/dist/blueprints/assets/photos/vitrine/dashboard.jpg +0 -0
- package/dist/blueprints/assets/photos/vitrine/hero.jpg +0 -0
- package/dist/blueprints/association.d.ts +93 -15
- package/dist/blueprints/association.d.ts.map +1 -1
- package/dist/blueprints/association.js +637 -130
- package/dist/blueprints/association.js.map +1 -1
- package/dist/blueprints/blog.d.ts +81 -94
- package/dist/blueprints/blog.d.ts.map +1 -1
- package/dist/blueprints/blog.js +513 -177
- package/dist/blueprints/blog.js.map +1 -1
- package/dist/blueprints/content-pack.d.ts +83 -2
- package/dist/blueprints/content-pack.d.ts.map +1 -1
- package/dist/blueprints/content-pack.js +54 -1
- package/dist/blueprints/content-pack.js.map +1 -1
- package/dist/blueprints/content-packs.d.ts +4 -3
- package/dist/blueprints/content-packs.d.ts.map +1 -1
- package/dist/blueprints/content-packs.js +6 -3
- package/dist/blueprints/content-packs.js.map +1 -1
- package/dist/blueprints/demo-media.d.ts +39 -0
- package/dist/blueprints/demo-media.d.ts.map +1 -0
- package/dist/blueprints/demo-media.js +30 -0
- package/dist/blueprints/demo-media.js.map +1 -0
- package/dist/blueprints/documentation.d.ts +78 -15
- package/dist/blueprints/documentation.d.ts.map +1 -1
- package/dist/blueprints/documentation.js +585 -104
- package/dist/blueprints/documentation.js.map +1 -1
- package/dist/blueprints/magazine.d.ts +81 -15
- package/dist/blueprints/magazine.d.ts.map +1 -1
- package/dist/blueprints/magazine.js +431 -85
- package/dist/blueprints/magazine.js.map +1 -1
- package/dist/blueprints/menus.d.ts +25 -0
- package/dist/blueprints/menus.d.ts.map +1 -0
- package/dist/blueprints/menus.js +33 -0
- package/dist/blueprints/menus.js.map +1 -0
- package/dist/blueprints/photo-assets.d.ts +3 -0
- package/dist/blueprints/photo-assets.d.ts.map +1 -0
- package/dist/blueprints/photo-assets.js +33 -0
- package/dist/blueprints/photo-assets.js.map +1 -0
- package/dist/blueprints/portfolio.d.ts +81 -13
- package/dist/blueprints/portfolio.d.ts.map +1 -1
- package/dist/blueprints/portfolio.js +605 -102
- package/dist/blueprints/portfolio.js.map +1 -1
- package/dist/blueprints/registry.d.ts +3 -1
- package/dist/blueprints/registry.d.ts.map +1 -1
- package/dist/blueprints/registry.js +4 -1
- package/dist/blueprints/registry.js.map +1 -1
- package/dist/blueprints/restaurant.d.ts +65 -20
- package/dist/blueprints/restaurant.d.ts.map +1 -1
- package/dist/blueprints/restaurant.js +350 -117
- package/dist/blueprints/restaurant.js.map +1 -1
- package/dist/blueprints/saas.d.ts +81 -14
- package/dist/blueprints/saas.d.ts.map +1 -1
- package/dist/blueprints/saas.js +469 -132
- package/dist/blueprints/saas.js.map +1 -1
- package/dist/blueprints/site-settings-seed.d.ts +17 -0
- package/dist/blueprints/site-settings-seed.d.ts.map +1 -0
- package/dist/blueprints/site-settings-seed.js +45 -0
- package/dist/blueprints/site-settings-seed.js.map +1 -0
- package/dist/blueprints/starting-skins.d.ts +19 -0
- package/dist/blueprints/starting-skins.d.ts.map +1 -0
- package/dist/blueprints/starting-skins.js +301 -0
- package/dist/blueprints/starting-skins.js.map +1 -0
- package/dist/blueprints/store.d.ts +173 -0
- package/dist/blueprints/store.d.ts.map +1 -0
- package/dist/blueprints/store.js +643 -0
- package/dist/blueprints/store.js.map +1 -0
- package/dist/blueprints/vitrine.d.ts +94 -16
- package/dist/blueprints/vitrine.d.ts.map +1 -1
- package/dist/blueprints/vitrine.js +421 -142
- package/dist/blueprints/vitrine.js.map +1 -1
- package/dist/demo-art/compositions.d.ts +48 -0
- package/dist/demo-art/compositions.d.ts.map +1 -0
- package/dist/demo-art/compositions.js +690 -0
- package/dist/demo-art/compositions.js.map +1 -0
- package/dist/demo-art/index.d.ts +8 -0
- package/dist/demo-art/index.d.ts.map +1 -0
- package/dist/demo-art/index.js +5 -0
- package/dist/demo-art/index.js.map +1 -0
- package/dist/demo-art/oklch.d.ts +39 -0
- package/dist/demo-art/oklch.d.ts.map +1 -0
- package/dist/demo-art/oklch.js +79 -0
- package/dist/demo-art/oklch.js.map +1 -0
- package/dist/demo-art/png.d.ts +24 -0
- package/dist/demo-art/png.d.ts.map +1 -0
- package/dist/demo-art/png.js +110 -0
- package/dist/demo-art/png.js.map +1 -0
- package/dist/demo-art/render.d.ts +228 -0
- package/dist/demo-art/render.d.ts.map +1 -0
- package/dist/demo-art/render.js +478 -0
- package/dist/demo-art/render.js.map +1 -0
- package/dist/llm-setup.d.ts +10 -1
- package/dist/llm-setup.d.ts.map +1 -1
- package/dist/llm-setup.js +12 -2
- package/dist/llm-setup.js.map +1 -1
- package/dist/playground-reset.d.ts.map +1 -1
- package/dist/playground-reset.js +22 -4
- package/dist/playground-reset.js.map +1 -1
- package/dist/prompts.d.ts +12 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +32 -0
- package/dist/prompts.js.map +1 -1
- package/dist/recap.d.ts.map +1 -1
- package/dist/recap.js +6 -0
- package/dist/recap.js.map +1 -1
- package/dist/scaffold.d.ts +22 -2
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +185 -23
- package/dist/scaffold.js.map +1 -1
- package/dist/wizard.d.ts.map +1 -1
- package/dist/wizard.js +4 -1
- package/dist/wizard.js.map +1 -1
- package/package.json +14 -11
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
import { CogentaError } from '@cogenta/core';
|
|
2
|
+
import { createContentStore, defineCollection, f, validateCollectionSet, } from '@cogenta/schema';
|
|
3
|
+
import { avatarArt, coverArt, heroArt, logoArt, productArt, } from '../demo-art/compositions.js';
|
|
4
|
+
import { definePageCollection, richTextParagraph, SEO_FIELDS, toBlockZoneEntry, } from './content-pack.js';
|
|
5
|
+
import { STARTING_SKINS } from './starting-skins.js';
|
|
6
|
+
/**
|
|
7
|
+
* The `store` blueprint's content model (L22 task 10, L25 "templates pro"
|
|
8
|
+
* passe pro): an online store's public catalogue — a `product` collection,
|
|
9
|
+
* grouped by `category`.
|
|
10
|
+
*
|
|
11
|
+
* **Deliberately contract A only, not `@cogenta/commerce` (contract E,
|
|
12
|
+
* ADR-0024).** A blueprint here writes `cogenta.schema.mjs` and seeds demo
|
|
13
|
+
* *content* — it has no way to also provision commerce's own tables
|
|
14
|
+
* (`Product`/`Variant`/`Cart`/`Order`/…), and even if it did, there is
|
|
15
|
+
* nowhere for a shopper to act on them yet: `docs/lots/L10-cms-complet.md`
|
|
16
|
+
* § L15 records, honestly, that the storefront has no admin screens
|
|
17
|
+
* (`packages/admin` gets its design system in L11) and no vitrine blocks
|
|
18
|
+
* for cart/checkout (contract B is figed — a new block needs an RFC, not a
|
|
19
|
+
* side effect of an installer blueprint). Shipping a `product` collection
|
|
20
|
+
* with a browsable catalogue, real photos, prices and categories is a
|
|
21
|
+
* genuine, useful starting point on its own — a lookbook a shop owner can
|
|
22
|
+
* publish, edit and link to an external checkout — and it is exactly what
|
|
23
|
+
* `contentRef` (contract E) is for the day `@cogenta/commerce` is wired to a
|
|
24
|
+
* real site: it points *at* an entry in a collection shaped like this one,
|
|
25
|
+
* it does not require one to already exist.
|
|
26
|
+
*/
|
|
27
|
+
const CATEGORIES = ['Apparel', 'Home', 'Accessories', 'Outdoor'];
|
|
28
|
+
/**
|
|
29
|
+
* A real bundled product photo standing in for each category's own gallery
|
|
30
|
+
* tile on the home page (L26) — one photo per category, each an actual
|
|
31
|
+
* demo product that belongs to it, rather than the abstract procedural
|
|
32
|
+
* cover art `coverArt` renders. Falls back to that procedural art anyway
|
|
33
|
+
* (`STORE_MEDIA_SPECS` still sets `spec`) if a photo file is ever missing.
|
|
34
|
+
*/
|
|
35
|
+
const CATEGORY_PHOTOS = {
|
|
36
|
+
Apparel: 'store/field-jacket.jpg',
|
|
37
|
+
Home: 'store/cast-iron-skillet.jpg',
|
|
38
|
+
Accessories: 'store/canvas-tote.jpg',
|
|
39
|
+
Outdoor: 'store/camp-blanket.jpg',
|
|
40
|
+
};
|
|
41
|
+
export const product = defineCollection({
|
|
42
|
+
name: 'product',
|
|
43
|
+
labels: { singular: 'Product', plural: 'Products' },
|
|
44
|
+
routing: { pattern: '/shop/:slug' },
|
|
45
|
+
fields: {
|
|
46
|
+
name: f.text({ required: true, max: 120 }),
|
|
47
|
+
slug: f.slug({ from: 'name', unique: true }),
|
|
48
|
+
description: f.text({ max: 300, multiline: true }),
|
|
49
|
+
price: f.number({ required: true, min: 0 }),
|
|
50
|
+
category: f.select({ options: [...CATEGORIES], required: true }),
|
|
51
|
+
inStock: f.boolean(),
|
|
52
|
+
photo: f.media({ accept: ['image'] }),
|
|
53
|
+
...SEO_FIELDS,
|
|
54
|
+
},
|
|
55
|
+
indexes: [['slug'], ['category']],
|
|
56
|
+
permissions: {
|
|
57
|
+
read: ['public'],
|
|
58
|
+
create: ['editor', 'admin'],
|
|
59
|
+
update: ['editor', 'admin'],
|
|
60
|
+
delete: ['admin'],
|
|
61
|
+
publish: ['admin'],
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
export const page = definePageCollection('/:slug');
|
|
65
|
+
export const STORE_COLLECTIONS = [product, page];
|
|
66
|
+
validateCollectionSet(STORE_COLLECTIONS);
|
|
67
|
+
/**
|
|
68
|
+
* Twelve products, three per category, real prices, real (if brief)
|
|
69
|
+
* copy — the "New arrivals"/"Best sellers" home sections and the `/shop`,
|
|
70
|
+
* `/new` and `/categories` pages all read from this one list rather than
|
|
71
|
+
* three divergent ones. Three are `inStock: false`, spread across three
|
|
72
|
+
* different categories, so the out-of-stock badge (`theme-ecommerce`'s
|
|
73
|
+
* `collection-list.ts`) is exercised on more than one card in the demo.
|
|
74
|
+
*/
|
|
75
|
+
export const STORE_DEMO_PRODUCTS = [
|
|
76
|
+
// Apparel
|
|
77
|
+
{
|
|
78
|
+
name: 'Field jacket',
|
|
79
|
+
slug: 'field-jacket',
|
|
80
|
+
description: 'Ten-ounce waxed cotton with brass hardware and a two-way front zip. Layers over a sweater in October and a flannel by December — re-wax it once a season and it will outlast most of what you own.',
|
|
81
|
+
price: 168,
|
|
82
|
+
category: 'Apparel',
|
|
83
|
+
inStock: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'Everyday tee',
|
|
87
|
+
slug: 'everyday-tee',
|
|
88
|
+
description: 'Heavyweight combed cotton, garment-dyed in small batches so no two runs match exactly, softening more with every wash. Boxy through the body, true to size through the shoulder.',
|
|
89
|
+
price: 32,
|
|
90
|
+
category: 'Apparel',
|
|
91
|
+
inStock: true,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Wool overshirt',
|
|
95
|
+
slug: 'wool-overshirt',
|
|
96
|
+
description: 'Brushed merino in a shirt-jacket cut, heavy enough alone through the coldest months and roomy enough to layer over a sweater. Between batches right now — back once the next run of merino clears the mill.',
|
|
97
|
+
price: 98,
|
|
98
|
+
category: 'Apparel',
|
|
99
|
+
inStock: false,
|
|
100
|
+
},
|
|
101
|
+
// Home
|
|
102
|
+
{
|
|
103
|
+
name: 'Ceramic pour-over set',
|
|
104
|
+
slug: 'ceramic-pour-over-set',
|
|
105
|
+
description: 'A dripper, a server and two cups, thrown and glazed by the same potter in a single afternoon, so the set you receive is one piece of work, not three. Dishwasher-safe, though the glaze keeps its shine longer if you hand-wash it.',
|
|
106
|
+
price: 74,
|
|
107
|
+
category: 'Home',
|
|
108
|
+
inStock: true,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'Linen table runner',
|
|
112
|
+
slug: 'linen-table-runner',
|
|
113
|
+
description: 'Stonewashed European linen, hemmed by hand at both ends, softening and lightening with every wash until it drapes like cloth twice its age. Restocking once the current linen order clears customs.',
|
|
114
|
+
price: 38,
|
|
115
|
+
category: 'Home',
|
|
116
|
+
inStock: false,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Cast-iron skillet',
|
|
120
|
+
slug: 'cast-iron-skillet',
|
|
121
|
+
description: 'Pre-seasoned, ten inches across, cast in one pour so there is no weak seam to eventually crack. Season it twice before the first fried egg and it will outlast this kitchen, then the next one.',
|
|
122
|
+
price: 56,
|
|
123
|
+
category: 'Home',
|
|
124
|
+
inStock: true,
|
|
125
|
+
},
|
|
126
|
+
// Accessories
|
|
127
|
+
{
|
|
128
|
+
name: 'Canvas tote',
|
|
129
|
+
slug: 'canvas-tote',
|
|
130
|
+
description: 'Fourteen-ounce cotton canvas with a base cut wide enough for a week of groceries, stitched twice at every stress point. Undyed, so it only gets more itself the longer you carry it.',
|
|
131
|
+
price: 28,
|
|
132
|
+
category: 'Accessories',
|
|
133
|
+
inStock: true,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'Leather card holder',
|
|
137
|
+
slug: 'leather-card-holder',
|
|
138
|
+
description: 'Vegetable-tanned leather folded and glued, not stitched, into four slots — nothing to catch on a pocket seam, nothing to fray. Arrives pale and darkens to honey wherever your thumb rests most.',
|
|
139
|
+
price: 46,
|
|
140
|
+
category: 'Accessories',
|
|
141
|
+
inStock: true,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Wool beanie',
|
|
145
|
+
slug: 'wool-beanie',
|
|
146
|
+
description: 'Ribbed merino, one size, blocked on a wooden form so it keeps its shape through the first dozen washes rather than stretching out by the second. Back in stock with the next merino delivery.',
|
|
147
|
+
price: 24,
|
|
148
|
+
category: 'Accessories',
|
|
149
|
+
inStock: false,
|
|
150
|
+
},
|
|
151
|
+
// Outdoor
|
|
152
|
+
{
|
|
153
|
+
name: 'Camp blanket',
|
|
154
|
+
slug: 'camp-blanket',
|
|
155
|
+
description: 'A dense double-wool weave, wide enough for two around a fire and tight enough to actually block the wind. Rolls small enough to strap under a pack, the only test that matters.',
|
|
156
|
+
price: 64,
|
|
157
|
+
category: 'Outdoor',
|
|
158
|
+
inStock: true,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'Enamel mug',
|
|
162
|
+
slug: 'enamel-mug',
|
|
163
|
+
description: 'A chip-resistant steel core under two coats of enamel, holding heat longer than aluminium and surviving the bottom of a pack better than ceramic. The first chip in the rim only proves it has been used.',
|
|
164
|
+
price: 18,
|
|
165
|
+
category: 'Outdoor',
|
|
166
|
+
inStock: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Trail tote',
|
|
170
|
+
slug: 'trail-tote',
|
|
171
|
+
description: 'Ripstop nylon with a roll-top closure that keeps rain out without a single zipper to jam. Folds flat into its own pocket and weighs little enough to forget you packed it until you need it.',
|
|
172
|
+
price: 42,
|
|
173
|
+
category: 'Outdoor',
|
|
174
|
+
inStock: true,
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
const BLOCK_VERSION = '1.0.0';
|
|
178
|
+
function richProse(key, text) {
|
|
179
|
+
return {
|
|
180
|
+
_key: key,
|
|
181
|
+
_type: 'prose',
|
|
182
|
+
_version: BLOCK_VERSION,
|
|
183
|
+
body: richTextParagraph(`${key}-body`, text),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* A category's own filtered grid — `filter: { category }` (contract B's
|
|
188
|
+
* `collectionList.filter`, a flat field/value record `cogenta serve`
|
|
189
|
+
* resolves to a real equality query, `theme-render.ts`'s `toApiFilter`) —
|
|
190
|
+
* so `/categories` is a genuine browse-by-category page, not a second copy
|
|
191
|
+
* of `/shop`.
|
|
192
|
+
*/
|
|
193
|
+
function categoryGrid(key, category) {
|
|
194
|
+
return {
|
|
195
|
+
_key: key,
|
|
196
|
+
_type: 'collectionList',
|
|
197
|
+
_version: BLOCK_VERSION,
|
|
198
|
+
title: category,
|
|
199
|
+
collection: 'product',
|
|
200
|
+
filter: { category },
|
|
201
|
+
sort: { field: 'createdAt', direction: 'desc' },
|
|
202
|
+
limit: 6,
|
|
203
|
+
layout: 'grid',
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* `home` (the ten-block composition the L25 brief asks for: hero → category
|
|
208
|
+
* tiles → new arrivals → promo → why-buy-from-us → best sellers →
|
|
209
|
+
* testimonial → trust badges → faq → newsletter), `shop` (the full
|
|
210
|
+
* catalogue), `new` (a dedicated arrivals page — what the header's "New"
|
|
211
|
+
* link actually goes to), `categories` (one filtered grid per category),
|
|
212
|
+
* `about`, `help` (the shipping/returns questions, what the footer's "Help"
|
|
213
|
+
* link and the header's old "Shipping & Returns" item both point at now),
|
|
214
|
+
* and `legal` (a short, honest placeholder — this is a demo store, not a
|
|
215
|
+
* real merchant, and a footer link that goes nowhere is worse than one that
|
|
216
|
+
* says so).
|
|
217
|
+
*
|
|
218
|
+
* A function of `media` (`SeedContext.media`, L25 task A0b), not a static
|
|
219
|
+
* const: the hero's `media`, the category tiles and the testimonial avatar
|
|
220
|
+
* all need ids only `seedDemoMedia` knows at scaffold time.
|
|
221
|
+
*/
|
|
222
|
+
export function buildStoreDemoPages(media) {
|
|
223
|
+
// `gallery` (blocks@2.0) requires at least one item — a media map with no
|
|
224
|
+
// `category-*` entries (a scaffold with no demo-art seeded, or this
|
|
225
|
+
// function called directly, as the blueprint test does) must therefore
|
|
226
|
+
// omit the whole block rather than emit an empty, contract-invalid one.
|
|
227
|
+
const categoryTiles = CATEGORIES.map((category, index) => ({
|
|
228
|
+
category,
|
|
229
|
+
media: media[`category-${index}`],
|
|
230
|
+
})).filter((item) => item.media !== undefined);
|
|
231
|
+
// `logoStrip` (blocks@2.0) requires at least one logo — same reasoning.
|
|
232
|
+
const logoItems = [0, 1, 2, 3, 4]
|
|
233
|
+
.map((index) => media[`logo-${index}`])
|
|
234
|
+
.filter((id) => id !== undefined)
|
|
235
|
+
.map((id, index) => ({ _key: `demo-logo-${index}`, media: id }));
|
|
236
|
+
return [
|
|
237
|
+
{
|
|
238
|
+
title: 'Home',
|
|
239
|
+
slug: 'home',
|
|
240
|
+
blocks: [
|
|
241
|
+
{
|
|
242
|
+
_key: 'demo-home-hero',
|
|
243
|
+
_type: 'hero',
|
|
244
|
+
_version: BLOCK_VERSION,
|
|
245
|
+
eyebrow: 'Atelier Goods',
|
|
246
|
+
title: 'Made to be used, not shelved',
|
|
247
|
+
subtitle: 'Canvas, cast iron, waxed cotton and wool — small-batch goods built to be repaired for a decade rather than replaced after one season.',
|
|
248
|
+
...(media.hero === undefined ? {} : { media: media.hero }),
|
|
249
|
+
actions: [{ label: 'Shop now', target: { href: '/shop' }, emphasis: 'primary' }],
|
|
250
|
+
},
|
|
251
|
+
...(categoryTiles.length === 0
|
|
252
|
+
? []
|
|
253
|
+
: [
|
|
254
|
+
{
|
|
255
|
+
_key: 'demo-home-categories',
|
|
256
|
+
_type: 'gallery',
|
|
257
|
+
_version: BLOCK_VERSION,
|
|
258
|
+
layout: 'grid',
|
|
259
|
+
items: categoryTiles.map((tile, index) => ({
|
|
260
|
+
_key: `demo-category-${index}`,
|
|
261
|
+
media: tile.media,
|
|
262
|
+
})),
|
|
263
|
+
},
|
|
264
|
+
]),
|
|
265
|
+
{
|
|
266
|
+
_key: 'demo-home-new-arrivals',
|
|
267
|
+
_type: 'collectionList',
|
|
268
|
+
_version: BLOCK_VERSION,
|
|
269
|
+
title: 'New arrivals',
|
|
270
|
+
collection: 'product',
|
|
271
|
+
sort: { field: 'createdAt', direction: 'desc' },
|
|
272
|
+
limit: 8,
|
|
273
|
+
layout: 'grid',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
_key: 'demo-home-promo',
|
|
277
|
+
_type: 'cta',
|
|
278
|
+
_version: BLOCK_VERSION,
|
|
279
|
+
title: 'Free shipping over $75',
|
|
280
|
+
text: 'No code needed — it applies automatically at checkout on every order that qualifies.',
|
|
281
|
+
actions: [{ label: 'Browse the shop', target: { href: '/shop' }, emphasis: 'primary' }],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
_key: 'demo-home-trust',
|
|
285
|
+
_type: 'featureGrid',
|
|
286
|
+
_version: BLOCK_VERSION,
|
|
287
|
+
title: 'Why buy from us',
|
|
288
|
+
items: [
|
|
289
|
+
{
|
|
290
|
+
_key: 'demo-trust-1',
|
|
291
|
+
icon: 'truck',
|
|
292
|
+
title: 'Fast, tracked shipping',
|
|
293
|
+
text: 'Two to four business days on every in-stock order, a tracking number the moment it leaves.',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
_key: 'demo-trust-2',
|
|
297
|
+
icon: 'refresh',
|
|
298
|
+
title: 'Thirty-day returns',
|
|
299
|
+
text: "If it doesn't fit or isn't right, send it back — no restocking fee, no questions.",
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
_key: 'demo-trust-3',
|
|
303
|
+
icon: 'shield',
|
|
304
|
+
title: 'Made to be repaired',
|
|
305
|
+
text: 'Torn a seam or lost a strap? We fix what we sell, at cost, for as long as we sell it.',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
_key: 'demo-trust-4',
|
|
309
|
+
icon: 'credit-card',
|
|
310
|
+
title: 'Secure checkout',
|
|
311
|
+
text: 'Encrypted payment, every time — your card details never touch our own servers.',
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
_key: 'demo-home-best-sellers',
|
|
317
|
+
_type: 'collectionList',
|
|
318
|
+
_version: BLOCK_VERSION,
|
|
319
|
+
title: 'Best sellers',
|
|
320
|
+
collection: 'product',
|
|
321
|
+
// Deliberately a different sort from "New arrivals" above — not a
|
|
322
|
+
// real popularity signal (no such field exists in contract A, and
|
|
323
|
+
// `SortField` is closed to `id`/`createdAt`/`updatedAt`), but a
|
|
324
|
+
// visibly distinct cut of the same catalogue rather than a
|
|
325
|
+
// reshuffled duplicate of the section above it.
|
|
326
|
+
sort: { field: 'createdAt', direction: 'asc' },
|
|
327
|
+
limit: 4,
|
|
328
|
+
layout: 'grid',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
_key: 'demo-home-testimonial',
|
|
332
|
+
_type: 'testimonial',
|
|
333
|
+
_version: BLOCK_VERSION,
|
|
334
|
+
quote: richTextParagraph('demo-testimonial-quote', 'Ordered the field jacket on a Tuesday, wore it hiking that Saturday. Still my favourite thing I own a year on.'),
|
|
335
|
+
attribution: {
|
|
336
|
+
name: 'Rosa Ibarra',
|
|
337
|
+
role: 'Verified buyer',
|
|
338
|
+
...(media.avatar === undefined ? {} : { avatar: media.avatar }),
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
...(logoItems.length === 0
|
|
342
|
+
? []
|
|
343
|
+
: [
|
|
344
|
+
{
|
|
345
|
+
_key: 'demo-home-logos',
|
|
346
|
+
_type: 'logoStrip',
|
|
347
|
+
_version: BLOCK_VERSION,
|
|
348
|
+
logos: logoItems,
|
|
349
|
+
caption: 'As seen in',
|
|
350
|
+
},
|
|
351
|
+
]),
|
|
352
|
+
{
|
|
353
|
+
_key: 'demo-home-faq',
|
|
354
|
+
_type: 'faq',
|
|
355
|
+
_version: BLOCK_VERSION,
|
|
356
|
+
title: 'Before you order',
|
|
357
|
+
items: [
|
|
358
|
+
{
|
|
359
|
+
_key: 'demo-home-faq-1',
|
|
360
|
+
question: 'How long does shipping take?',
|
|
361
|
+
answer: richTextParagraph('demo-home-faq-1-a', 'Two to four business days for in-stock items. An item marked out of stock ships as soon as the next batch is ready — the product page says when.'),
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
_key: 'demo-home-faq-2',
|
|
365
|
+
question: 'Can I return something?',
|
|
366
|
+
answer: richTextParagraph('demo-home-faq-2-a', 'Yes, within thirty days, unworn and with its tag on. Return shipping is on us for a wrong size.'),
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
_key: 'demo-home-faq-3',
|
|
370
|
+
question: 'How do I know what size to order?',
|
|
371
|
+
answer: richTextParagraph('demo-home-faq-3-a', 'Every product page lists true-to-size guidance; when in doubt, size up — exchanges are free within thirty days.'),
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
_key: 'demo-home-faq-4',
|
|
375
|
+
question: 'What payment methods do you accept?',
|
|
376
|
+
answer: richTextParagraph('demo-home-faq-4-a', 'Every major card, plus the wallet your browser already offers at checkout — no account required to buy.'),
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
_key: 'demo-home-newsletter',
|
|
382
|
+
_type: 'cta',
|
|
383
|
+
_version: BLOCK_VERSION,
|
|
384
|
+
title: 'Get 10% off your first order',
|
|
385
|
+
text: 'Sign up for restock alerts and the occasional sale — no spam, unsubscribe in one click.',
|
|
386
|
+
actions: [{ label: 'Sign up', target: { href: '/shop' }, emphasis: 'primary' }],
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
title: 'Shop',
|
|
392
|
+
slug: 'shop',
|
|
393
|
+
blocks: [
|
|
394
|
+
richProse('demo-shop-prose', 'Every piece below is part of the same running catalogue, priced and photographed the way it ships — no placeholder pricing, no filler categories. Sort by newest for what just landed, or jump to a single category from the header if you already know what you are after.'),
|
|
395
|
+
{
|
|
396
|
+
_key: 'demo-shop-products',
|
|
397
|
+
_type: 'collectionList',
|
|
398
|
+
_version: BLOCK_VERSION,
|
|
399
|
+
title: 'All products',
|
|
400
|
+
collection: 'product',
|
|
401
|
+
sort: { field: 'createdAt', direction: 'desc' },
|
|
402
|
+
limit: 24,
|
|
403
|
+
layout: 'grid',
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
title: 'New Arrivals',
|
|
409
|
+
slug: 'new',
|
|
410
|
+
blocks: [
|
|
411
|
+
richProse('demo-new-prose', 'The latest additions to the catalogue, newest first — usually a small batch that ran out fast the first time and finally got another run, or a piece we finished testing long enough to be confident selling it.'),
|
|
412
|
+
{
|
|
413
|
+
_key: 'demo-new-products',
|
|
414
|
+
_type: 'collectionList',
|
|
415
|
+
_version: BLOCK_VERSION,
|
|
416
|
+
title: 'New in',
|
|
417
|
+
collection: 'product',
|
|
418
|
+
sort: { field: 'createdAt', direction: 'desc' },
|
|
419
|
+
limit: 12,
|
|
420
|
+
layout: 'grid',
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
title: 'Categories',
|
|
426
|
+
slug: 'categories',
|
|
427
|
+
blocks: [
|
|
428
|
+
richProse('demo-categories-prose', 'Four ways into the same catalogue, grouped by what a piece is made for rather than when it was added. Apparel and Accessories are what you wear or carry every day; Home and Outdoor are what stays put or comes with you.'),
|
|
429
|
+
...CATEGORIES.map((category, index) => categoryGrid(`demo-categories-${index}`, category)),
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
title: 'About',
|
|
434
|
+
slug: 'about',
|
|
435
|
+
blocks: [
|
|
436
|
+
richProse('demo-about-prose-1', 'Atelier Goods started in a two-car garage in 2016, the year the founder got tired of replacing a twenty-dollar tote every winter. The first run was three samples: one canvas bag, one cast-iron pan bought secondhand and re-seasoned, one wool blanket from a mill an hour away that was about to close its doors for lack of orders.'),
|
|
437
|
+
richProse('demo-about-prose-2', "Ten years on, the workshop has moved twice and the catalogue has grown to a few dozen pieces, but the rule from that first year hasn't changed: nothing ships that the person making it wouldn't want to own for a decade. Canvas, cast iron, waxed cotton, vegetable-tanned leather, ribbed merino — materials chosen because they age instead of wearing out, and because every one of them can be mended rather than thrown away."),
|
|
438
|
+
richProse('demo-about-prose-3', "That's also why the repair program in the trust section above exists in the first place. A torn strap, a lost button, a seam that finally gives after five years of daily use — send it back and it comes home fixed, at cost, for as long as Atelier Goods sells the piece. Made to be used, not shelved, and the shop tries to mean that literally."),
|
|
439
|
+
{
|
|
440
|
+
_key: 'demo-about-testimonial',
|
|
441
|
+
_type: 'testimonial',
|
|
442
|
+
_version: BLOCK_VERSION,
|
|
443
|
+
quote: richTextParagraph('demo-about-testimonial-quote', 'I emailed on a Sunday about a sizing question, expecting a bot. A real person answered within the hour, from the workshop, mid-repair on someone else’s jacket.'),
|
|
444
|
+
attribution: { name: 'Devon Marsh', role: 'Verified buyer, field jacket' },
|
|
445
|
+
},
|
|
446
|
+
],
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
title: 'Help',
|
|
450
|
+
slug: 'help',
|
|
451
|
+
blocks: [
|
|
452
|
+
richProse('demo-help-prose', 'Shipping, returns and sizing, in one place — most questions about an order end up being one of these three. Anything not covered here goes straight to a real person, not a ticket queue: the same team that packs the order answers the inbox.'),
|
|
453
|
+
{
|
|
454
|
+
_key: 'demo-help-faq',
|
|
455
|
+
_type: 'faq',
|
|
456
|
+
_version: BLOCK_VERSION,
|
|
457
|
+
title: 'Shipping & returns',
|
|
458
|
+
items: [
|
|
459
|
+
{
|
|
460
|
+
_key: 'demo-help-faq-1',
|
|
461
|
+
question: 'How long does shipping take?',
|
|
462
|
+
answer: richTextParagraph('demo-help-faq-1-a', 'Two to four business days for in-stock items. An item marked out of stock ships as soon as the next batch is ready — the product page says when.'),
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
_key: 'demo-help-faq-2',
|
|
466
|
+
question: 'Can I return something?',
|
|
467
|
+
answer: richTextParagraph('demo-help-faq-2-a', 'Yes, within thirty days, unworn and with its tag on. Return shipping is on us for a wrong size.'),
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
_key: 'demo-help-faq-3',
|
|
471
|
+
question: 'Do you ship internationally?',
|
|
472
|
+
answer: richTextParagraph('demo-help-faq-3-a', 'To most countries, at checkout-calculated rates. Duties are the buyer’s, and we say so before payment, not after.'),
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
title: 'Legal',
|
|
480
|
+
slug: 'legal',
|
|
481
|
+
blocks: [
|
|
482
|
+
richProse('demo-legal-prose', '"Atelier Goods" is a demo storefront, scaffolded by create-cogenta from the "store" blueprint — there is no real merchant, no real transaction, and no real terms of sale behind any of it. A real shop replaces this page with its own terms of sale, privacy notice and returns policy before it takes a single order, since this text carries none of them.'),
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
];
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* `store`'s own starting skin (`starting-skins.js`) — asserted present with
|
|
489
|
+
* a real check, not a `!`, since `STARTING_SKINS` is keyed by blueprint id
|
|
490
|
+
* and TypeScript cannot see that this particular key is always populated.
|
|
491
|
+
*/
|
|
492
|
+
function storePalette() {
|
|
493
|
+
const skin = STARTING_SKINS.store;
|
|
494
|
+
if (skin === undefined) {
|
|
495
|
+
// Same code `resolveBlueprint` (`registry.ts`) uses for its own
|
|
496
|
+
// "this cannot happen unless the registry itself is broken" guard —
|
|
497
|
+
// this is a bug in starting-skins.ts, never a user-facing condition.
|
|
498
|
+
throw new CogentaError({
|
|
499
|
+
code: 'BLUEPRINT_REGISTRY_CORRUPT',
|
|
500
|
+
message: 'STARTING_SKINS.store is missing.',
|
|
501
|
+
hint: 'The "store" entry must stay declared in starting-skins.ts for this blueprint to render its demo art.',
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
return skin.color;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Visuals this blueprint seeds (L25 task A0b, extended by the L25
|
|
508
|
+
* "templates pro" passe pro and by L26): a real bundled photo for the hero,
|
|
509
|
+
* each of the twelve products, and — new in L26 — each of the four category
|
|
510
|
+
* tiles (`CATEGORY_PHOTOS`, one real product photo standing in for its whole
|
|
511
|
+
* category, rather than the abstract procedural art the home page's gallery
|
|
512
|
+
* previously showed there). The gallery tiles' own caption is that
|
|
513
|
+
* category's picture's `alt` text — `gallery`'s item has no caption field of
|
|
514
|
+
* its own. Only the testimonial avatar and the five trust-badge marks stay
|
|
515
|
+
* procedural: no bundled photo honestly stands in for an anonymous
|
|
516
|
+
* customer's face or a press/payment mark. Every `spec` here is the
|
|
517
|
+
* fallback `seedDemoMedia` uses if its matching `photo` file is ever
|
|
518
|
+
* missing, all from the same starting-skin palette (`starting-skins.js`)
|
|
519
|
+
* this blueprint already ships, keyed so
|
|
520
|
+
* `seedStoreDemoContent`/`buildStoreDemoPages` can look each one up without
|
|
521
|
+
* caring what id the media store assigned it.
|
|
522
|
+
*/
|
|
523
|
+
export const STORE_MEDIA_SPECS = [
|
|
524
|
+
{
|
|
525
|
+
name: 'hero',
|
|
526
|
+
spec: heroArt(storePalette(), 'blocks', 11),
|
|
527
|
+
alt: 'A flat lay of the collection',
|
|
528
|
+
photo: 'store/hero.jpg',
|
|
529
|
+
},
|
|
530
|
+
...CATEGORIES.map((category, index) => ({
|
|
531
|
+
name: `category-${index}`,
|
|
532
|
+
spec: coverArt(storePalette(), 50 + index),
|
|
533
|
+
alt: category,
|
|
534
|
+
photo: CATEGORY_PHOTOS[category],
|
|
535
|
+
})),
|
|
536
|
+
...STORE_DEMO_PRODUCTS.map((demo, index) => ({
|
|
537
|
+
name: `product-${demo.slug}`,
|
|
538
|
+
spec: productArt(storePalette(), index + 1),
|
|
539
|
+
alt: `${demo.name} product photo`,
|
|
540
|
+
photo: `store/${demo.slug}.jpg`,
|
|
541
|
+
})),
|
|
542
|
+
{
|
|
543
|
+
name: 'avatar',
|
|
544
|
+
spec: avatarArt(storePalette(), 60),
|
|
545
|
+
alt: 'Abstract avatar mark for the testimonial',
|
|
546
|
+
},
|
|
547
|
+
...[0, 1, 2, 3, 4].map((index) => ({
|
|
548
|
+
name: `logo-${index}`,
|
|
549
|
+
spec: logoArt(70 + index),
|
|
550
|
+
alt: `Press or payment mark ${index + 1}`,
|
|
551
|
+
})),
|
|
552
|
+
];
|
|
553
|
+
/** Header/footer navigation and the header call-to-action button (L25 task A0b, D4). */
|
|
554
|
+
export const STORE_MENUS = {
|
|
555
|
+
header: [
|
|
556
|
+
{ label: 'Home' },
|
|
557
|
+
{ label: 'Shop', url: '/shop' },
|
|
558
|
+
{ label: 'New', url: '/new' },
|
|
559
|
+
{ label: 'Categories', url: '/categories' },
|
|
560
|
+
{ label: 'About', url: '/about' },
|
|
561
|
+
],
|
|
562
|
+
footer: [
|
|
563
|
+
{ label: 'Shop', url: '/shop' },
|
|
564
|
+
{ label: 'Help', url: '/help' },
|
|
565
|
+
{ label: 'Legal', url: '/legal' },
|
|
566
|
+
],
|
|
567
|
+
headerAction: { label: 'Shop now', url: '/shop' },
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* `general.tagline` is already a declared registry key. `general.socialLinks`
|
|
571
|
+
* and `general.footerNote` are seeded by Phase 0 (task A0a) — three links
|
|
572
|
+
* (L25 "templates pro" passe pro: Instagram, Pinterest, X — a lookbook-style
|
|
573
|
+
* shop leans on visual channels first).
|
|
574
|
+
*/
|
|
575
|
+
export const STORE_SITE_SETTINGS = {
|
|
576
|
+
'general.tagline': 'Made to be used, not shelved.',
|
|
577
|
+
'general.socialLinks': [
|
|
578
|
+
{ label: 'Instagram', url: 'https://instagram.com/example' },
|
|
579
|
+
{ label: 'Pinterest', url: 'https://pinterest.com/example' },
|
|
580
|
+
{ label: 'X', url: 'https://x.com/example' },
|
|
581
|
+
],
|
|
582
|
+
'general.footerNote': 'A demo store, scaffolded by create-cogenta.',
|
|
583
|
+
};
|
|
584
|
+
export const STORE_RECOMMENDED_AGENTS = [
|
|
585
|
+
{
|
|
586
|
+
name: 'performanceAgent',
|
|
587
|
+
package: '@cogenta/agents-builtin',
|
|
588
|
+
reason: 'Catches oversized product photography before it slows the shop grid down.',
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: 'seoAgent',
|
|
592
|
+
package: '@cogenta/agents-builtin',
|
|
593
|
+
reason: 'Audits product pages so each one is findable by name, not only from the grid.',
|
|
594
|
+
},
|
|
595
|
+
];
|
|
596
|
+
/**
|
|
597
|
+
* Inserts the `store` blueprint's demo content through the real
|
|
598
|
+
* `ContentStore` — never mocked (house rule). Each product's `photo` and the
|
|
599
|
+
* home hero's `media` come from `ctx.media`
|
|
600
|
+
* (`seedDemoMedia`/`STORE_MEDIA_SPECS`) — absent (e.g. a blueprint seeded
|
|
601
|
+
* with `seedDemoContent: false`, or a caller that never ran
|
|
602
|
+
* `seedDemoMedia`) simply leaves those fields unset, since neither is
|
|
603
|
+
* `required` on its collection/block.
|
|
604
|
+
*/
|
|
605
|
+
async function seedStoreDemoContent(ctx) {
|
|
606
|
+
const { db, defaultLocale, adminId, media } = ctx;
|
|
607
|
+
const productStore = createContentStore({ db, collection: product, defaultLocale });
|
|
608
|
+
const pageStore = createContentStore({ db, collection: page, defaultLocale });
|
|
609
|
+
for (const demo of STORE_DEMO_PRODUCTS) {
|
|
610
|
+
const photo = media[`product-${demo.slug}`];
|
|
611
|
+
await productStore.create({
|
|
612
|
+
status: 'published',
|
|
613
|
+
createdBy: adminId,
|
|
614
|
+
values: {
|
|
615
|
+
name: demo.name,
|
|
616
|
+
slug: demo.slug,
|
|
617
|
+
description: demo.description,
|
|
618
|
+
price: demo.price,
|
|
619
|
+
category: demo.category,
|
|
620
|
+
inStock: demo.inStock,
|
|
621
|
+
...(photo === undefined ? {} : { photo }),
|
|
622
|
+
},
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
for (const demo of buildStoreDemoPages(media)) {
|
|
626
|
+
await pageStore.create({
|
|
627
|
+
status: 'published',
|
|
628
|
+
createdBy: adminId,
|
|
629
|
+
values: { title: demo.title, slug: demo.slug },
|
|
630
|
+
blocks: { blocks: demo.blocks.map(toBlockZoneEntry) },
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
export const storeContentPack = {
|
|
635
|
+
collections: STORE_COLLECTIONS,
|
|
636
|
+
recommendedAgents: STORE_RECOMMENDED_AGENTS,
|
|
637
|
+
seedDemoContent: seedStoreDemoContent,
|
|
638
|
+
defaultTheme: '@cogenta/theme-ecommerce',
|
|
639
|
+
menus: STORE_MENUS,
|
|
640
|
+
siteSettings: STORE_SITE_SETTINGS,
|
|
641
|
+
mediaSpecs: STORE_MEDIA_SPECS,
|
|
642
|
+
};
|
|
643
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/blueprints/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,CAAC,EACD,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAO,EAEP,UAAU,GACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAEL,oBAAoB,EAEpB,iBAAiB,EACjB,UAAU,EAEV,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,CAAU,CAAA;AAGzE;;;;;;GAMG;AACH,MAAM,eAAe,GAA8C;IACjE,OAAO,EAAE,wBAAw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