@samva/markup 0.2.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.
@@ -1,4 +1,4 @@
1
- import { matchesTemplateFacets, registerPublicCorpusEntry } from "./corpus.js";
1
+ import { brandRecreationProvenance, matchesTemplateFacets, registerPublicCorpusEntry } from "./corpus.js";
2
2
  import { Result } from "effect";
3
3
  //#region presets/public-gallery.ts
4
4
  const templateUseCases = [
@@ -14,238 +14,233 @@ const templateCollectionFamilies = [
14
14
  "stage",
15
15
  "style"
16
16
  ];
17
- const isMadeWithSamvaTemplate = (template) => template.corpus._tag === "OwnedEditablePreset";
17
+ const isMadeWithSamvaTemplate = (template) => template.corpus._tag === "OwnedEditablePreset" || template.corpus._tag === "BrandRecreationPreset";
18
18
  /** Explicit evidence for every owned preset reviewed in the 2026-08-31 catalog pass. */
19
19
  const ownedPresetReviewManifest = {
20
20
  welcome: {
21
- sourcePath: "packages/markup/presets/welcome.tsx",
21
+ sourcePath: "examples/email-showcase/emails/welcome.tsx",
22
22
  reviewedBy: "Samva catalog review",
23
- reviewedAt: "2026-08-31T00:00:00.000Z",
24
- notes: "Reviewed welcome editable SML, public preview data, and gallery identity."
23
+ reviewedAt: "2026-09-08T00:00:00.000Z",
24
+ notes: "Reviewed welcome editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
25
25
  },
26
26
  "email-verification": {
27
- sourcePath: "packages/markup/presets/email-verification.tsx",
27
+ sourcePath: "examples/email-showcase/emails/email-verification.tsx",
28
28
  reviewedBy: "Samva catalog review",
29
- reviewedAt: "2026-08-31T00:00:00.000Z",
30
- notes: "Reviewed email-verification editable SML, public preview data, and gallery identity."
29
+ reviewedAt: "2026-09-08T00:00:00.000Z",
30
+ notes: "Reviewed email-verification editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
31
31
  },
32
32
  otp: {
33
- sourcePath: "packages/markup/presets/otp.tsx",
33
+ sourcePath: "examples/email-showcase/emails/otp.tsx",
34
34
  reviewedBy: "Samva catalog review",
35
- reviewedAt: "2026-08-31T00:00:00.000Z",
36
- notes: "Reviewed otp editable SML, public preview data, and gallery identity."
35
+ reviewedAt: "2026-09-08T00:00:00.000Z",
36
+ notes: "Reviewed otp editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
37
37
  },
38
38
  "password-reset": {
39
- sourcePath: "packages/markup/presets/password-reset.tsx",
39
+ sourcePath: "examples/email-showcase/emails/password-reset.tsx",
40
40
  reviewedBy: "Samva catalog review",
41
- reviewedAt: "2026-08-31T00:00:00.000Z",
42
- notes: "Reviewed password-reset editable SML, public preview data, and gallery identity."
43
- },
44
- receipt: {
45
- sourcePath: "packages/markup/presets/receipt.tsx",
46
- reviewedBy: "Samva catalog review",
47
- reviewedAt: "2026-08-31T00:00:00.000Z",
48
- notes: "Reviewed receipt editable SML, public preview data, and gallery identity."
41
+ reviewedAt: "2026-09-08T00:00:00.000Z",
42
+ notes: "Reviewed password-reset editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
49
43
  },
50
44
  "payment-failed": {
51
- sourcePath: "packages/markup/presets/payment-failed.tsx",
45
+ sourcePath: "examples/email-showcase/emails/payment-failed.tsx",
52
46
  reviewedBy: "Samva catalog review",
53
- reviewedAt: "2026-08-31T00:00:00.000Z",
54
- notes: "Reviewed payment-failed editable SML, public preview data, and gallery identity."
47
+ reviewedAt: "2026-09-08T00:00:00.000Z",
48
+ notes: "Reviewed payment-failed editable project with stylesheet and original Fernhollow assets, public preview data, and gallery identity."
55
49
  },
56
50
  "shipping-update": {
57
- sourcePath: "packages/markup/presets/shipping-update.tsx",
51
+ sourcePath: "examples/email-showcase/emails/shipping-update.tsx",
58
52
  reviewedBy: "Samva catalog review",
59
- reviewedAt: "2026-08-31T00:00:00.000Z",
60
- notes: "Reviewed shipping-update editable SML, public preview data, and gallery identity."
53
+ reviewedAt: "2026-09-08T00:00:00.000Z",
54
+ notes: "Reviewed shipping-update editable project with stylesheet and original Fernhollow assets, public preview data, and gallery identity."
61
55
  },
62
56
  notification: {
63
- sourcePath: "packages/markup/presets/notification.tsx",
57
+ sourcePath: "examples/email-showcase/emails/notification.tsx",
64
58
  reviewedBy: "Samva catalog review",
65
- reviewedAt: "2026-08-31T00:00:00.000Z",
66
- notes: "Reviewed notification editable SML, public preview data, and gallery identity."
59
+ reviewedAt: "2026-09-08T00:00:00.000Z",
60
+ notes: "Reviewed notification editable project with stylesheet and original Meridian assets, public preview data, and gallery identity."
67
61
  },
68
62
  "team-invite": {
69
- sourcePath: "packages/markup/presets/team-invite.tsx",
63
+ sourcePath: "examples/email-showcase/emails/team-invite.tsx",
70
64
  reviewedBy: "Samva catalog review",
71
- reviewedAt: "2026-08-31T00:00:00.000Z",
72
- notes: "Reviewed team-invite editable SML, public preview data, and gallery identity."
65
+ reviewedAt: "2026-09-08T00:00:00.000Z",
66
+ notes: "Reviewed team-invite editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
73
67
  },
74
- "product-digest": {
75
- sourcePath: "packages/markup/presets/product-digest.tsx",
68
+ "product-newsletter": {
69
+ sourcePath: "examples/email-showcase/emails/product-newsletter.tsx",
76
70
  reviewedBy: "Samva catalog review",
77
- reviewedAt: "2026-08-31T00:00:00.000Z",
78
- notes: "Reviewed product-digest editable SML, public preview data, and gallery identity."
71
+ reviewedAt: "2026-09-08T00:00:00.000Z",
72
+ notes: "Reviewed product-newsletter editable SML project, authored assets, public preview data, and gallery identity."
79
73
  },
80
- newsletter: {
81
- sourcePath: "packages/markup/presets/newsletter.tsx",
74
+ "product-digest": {
75
+ sourcePath: "examples/email-showcase/emails/product-digest.tsx",
82
76
  reviewedBy: "Samva catalog review",
83
- reviewedAt: "2026-08-31T00:00:00.000Z",
84
- notes: "Reviewed newsletter editable SML, public preview data, and gallery identity."
77
+ reviewedAt: "2026-09-08T00:00:00.000Z",
78
+ notes: "Reviewed product-digest editable SML project, authored assets, public preview data, and gallery identity."
85
79
  },
86
80
  announcement: {
87
- sourcePath: "packages/markup/presets/announcement.tsx",
88
- reviewedBy: "Samva catalog review",
89
- reviewedAt: "2026-08-31T00:00:00.000Z",
90
- notes: "Reviewed announcement editable SML, public preview data, and gallery identity."
91
- },
92
- promo: {
93
- sourcePath: "packages/markup/presets/promo.tsx",
81
+ sourcePath: "examples/email-showcase/emails/announcement.tsx",
94
82
  reviewedBy: "Samva catalog review",
95
- reviewedAt: "2026-08-31T00:00:00.000Z",
96
- notes: "Reviewed promo editable SML, public preview data, and gallery identity."
83
+ reviewedAt: "2026-09-08T00:00:00.000Z",
84
+ notes: "Reviewed announcement editable SML project, original Northwick assets, public preview data, and gallery identity."
97
85
  },
98
86
  "event-invite": {
99
- sourcePath: "packages/markup/presets/event-invite.tsx",
87
+ sourcePath: "examples/email-showcase/emails/event-invite.tsx",
100
88
  reviewedBy: "Samva catalog review",
101
- reviewedAt: "2026-08-31T00:00:00.000Z",
102
- notes: "Reviewed event-invite editable SML, public preview data, and gallery identity."
89
+ reviewedAt: "2026-09-08T00:00:00.000Z",
90
+ notes: "Reviewed event-invite editable SML project, original Northwick assets, public preview data, and gallery identity."
103
91
  },
104
92
  "membership-promo": {
105
- sourcePath: "packages/markup/presets/membership-promo.tsx",
93
+ sourcePath: "examples/email-showcase/emails/membership-promo.tsx",
106
94
  reviewedBy: "Samva catalog review",
107
- reviewedAt: "2026-08-31T00:00:00.000Z",
108
- notes: "Reviewed membership-promo editable SML, public preview data, and gallery identity."
95
+ reviewedAt: "2026-09-08T00:00:00.000Z",
96
+ notes: "Reviewed membership-promo editable SML project, original Northwick assets, public preview data, and gallery identity."
109
97
  },
110
98
  "onboarding-step": {
111
- sourcePath: "packages/markup/presets/onboarding-step.tsx",
99
+ sourcePath: "examples/email-showcase/emails/onboarding-step.tsx",
112
100
  reviewedBy: "Samva catalog review",
113
- reviewedAt: "2026-08-31T00:00:00.000Z",
114
- notes: "Reviewed onboarding-step editable SML, public preview data, and gallery identity."
101
+ reviewedAt: "2026-09-08T00:00:00.000Z",
102
+ notes: "Reviewed onboarding-step editable project with stylesheet and original assets, public preview data, and gallery identity."
115
103
  },
116
104
  "trial-ending": {
117
- sourcePath: "packages/markup/presets/trial-ending.tsx",
105
+ sourcePath: "examples/email-showcase/emails/trial-ending.tsx",
118
106
  reviewedBy: "Samva catalog review",
119
- reviewedAt: "2026-08-31T00:00:00.000Z",
120
- notes: "Reviewed trial-ending editable SML, public preview data, and gallery identity."
107
+ reviewedAt: "2026-09-08T00:00:00.000Z",
108
+ notes: "Reviewed trial-ending editable project with stylesheet and original assets, public preview data, and gallery identity."
121
109
  },
122
110
  "win-back": {
123
- sourcePath: "packages/markup/presets/win-back.tsx",
111
+ sourcePath: "examples/email-showcase/emails/win-back.tsx",
124
112
  reviewedBy: "Samva catalog review",
125
- reviewedAt: "2026-08-31T00:00:00.000Z",
126
- notes: "Reviewed win-back editable SML, public preview data, and gallery identity."
113
+ reviewedAt: "2026-09-08T00:00:00.000Z",
114
+ notes: "Reviewed win-back editable project with stylesheet and original assets, public preview data, and gallery identity."
127
115
  },
128
116
  "feedback-request": {
129
- sourcePath: "packages/markup/presets/feedback-request.tsx",
117
+ sourcePath: "examples/email-showcase/emails/feedback-request.tsx",
130
118
  reviewedBy: "Samva catalog review",
131
- reviewedAt: "2026-08-31T00:00:00.000Z",
132
- notes: "Reviewed feedback-request editable SML, public preview data, and gallery identity."
119
+ reviewedAt: "2026-09-08T00:00:00.000Z",
120
+ notes: "Reviewed feedback-request editable project with stylesheet and original assets, public preview data, and gallery identity."
133
121
  },
134
122
  "editorial-newsletter": {
135
- sourcePath: "packages/markup/presets/editorial-newsletter.tsx",
123
+ sourcePath: "examples/email-showcase/emails/editorial-newsletter.tsx",
136
124
  reviewedBy: "Samva catalog review",
137
- reviewedAt: "2026-08-31T00:00:00.000Z",
138
- notes: "Reviewed editorial-newsletter editable SML, public preview data, and gallery identity."
125
+ reviewedAt: "2026-09-08T00:00:00.000Z",
126
+ notes: "Reviewed editorial-newsletter editable SML project, authored assets, public preview data, and gallery identity."
139
127
  },
140
128
  "member-referral-offer": {
141
- sourcePath: "packages/markup/presets/member-referral-offer.tsx",
129
+ sourcePath: "examples/email-showcase/emails/member-referral-offer.tsx",
142
130
  reviewedBy: "Samva catalog review",
143
- reviewedAt: "2026-08-31T00:00:00.000Z",
144
- notes: "Reviewed member-referral-offer editable SML, public preview data, and gallery identity."
131
+ reviewedAt: "2026-09-08T00:00:00.000Z",
132
+ notes: "Reviewed member-referral-offer editable SML project, original Northwick assets, public preview data, and gallery identity."
145
133
  },
146
134
  "catalog-sale-newsletter": {
147
- sourcePath: "packages/markup/presets/catalog-sale-newsletter.tsx",
135
+ sourcePath: "examples/email-showcase/emails/catalog-sale-newsletter.tsx",
148
136
  reviewedBy: "Samva catalog review",
149
- reviewedAt: "2026-08-31T00:00:00.000Z",
150
- notes: "Reviewed catalog-sale-newsletter editable SML, public preview data, and gallery identity."
137
+ reviewedAt: "2026-09-08T00:00:00.000Z",
138
+ notes: "Reviewed catalog-sale-newsletter editable SML project, original Northwick assets, public preview data, and gallery identity."
151
139
  },
152
140
  "limited-time-savings": {
153
- sourcePath: "packages/markup/presets/limited-time-savings.tsx",
141
+ sourcePath: "examples/email-showcase/emails/limited-time-savings.tsx",
154
142
  reviewedBy: "Samva catalog review",
155
- reviewedAt: "2026-08-31T00:00:00.000Z",
156
- notes: "Reviewed limited-time-savings editable SML, public preview data, and gallery identity."
143
+ reviewedAt: "2026-09-08T00:00:00.000Z",
144
+ notes: "Reviewed limited-time-savings editable SML project, original Northwick assets, public preview data, and gallery identity."
157
145
  },
158
146
  "rewards-milestone": {
159
- sourcePath: "packages/markup/presets/rewards-milestone.tsx",
147
+ sourcePath: "examples/email-showcase/emails/rewards-milestone.tsx",
160
148
  reviewedBy: "Samva catalog review",
161
- reviewedAt: "2026-08-31T00:00:00.000Z",
162
- notes: "Reviewed rewards-milestone editable SML, public preview data, and gallery identity."
149
+ reviewedAt: "2026-09-08T00:00:00.000Z",
150
+ notes: "Reviewed rewards-milestone editable SML project, original Northwick assets, public preview data, and gallery identity."
163
151
  },
164
- "order-delivered": {
165
- sourcePath: "packages/markup/presets/order-delivered.tsx",
152
+ "order-receipt": {
153
+ sourcePath: "examples/email-showcase/emails/order-receipt.tsx",
166
154
  reviewedBy: "Samva catalog review",
167
- reviewedAt: "2026-08-31T00:00:00.000Z",
168
- notes: "Reviewed order-delivered editable SML, public preview data, and gallery identity."
155
+ reviewedAt: "2026-09-08T00:00:00.000Z",
156
+ notes: "Reviewed order-receipt editable project with stylesheet and original assets, public preview data, and gallery identity."
169
157
  },
170
158
  "travel-rewards-promo": {
171
- sourcePath: "packages/markup/presets/travel-rewards-promo.tsx",
159
+ sourcePath: "examples/email-showcase/emails/travel-rewards-promo.tsx",
172
160
  reviewedBy: "Samva catalog review",
173
- reviewedAt: "2026-08-31T00:00:00.000Z",
174
- notes: "Reviewed travel-rewards-promo editable SML, public preview data, and gallery identity."
161
+ reviewedAt: "2026-09-08T00:00:00.000Z",
162
+ notes: "Reviewed travel-rewards-promo editable project with stylesheet and original Wayfare assets, public preview data, and gallery identity."
175
163
  },
176
164
  "events-roundup": {
177
- sourcePath: "packages/markup/presets/events-roundup.tsx",
165
+ sourcePath: "examples/email-showcase/emails/events-roundup.tsx",
178
166
  reviewedBy: "Samva catalog review",
179
- reviewedAt: "2026-08-31T00:00:00.000Z",
180
- notes: "Reviewed events-roundup editable SML, public preview data, and gallery identity."
167
+ reviewedAt: "2026-09-08T00:00:00.000Z",
168
+ notes: "Reviewed events-roundup editable SML project, authored assets, public preview data, and gallery identity."
181
169
  },
182
170
  "product-onboarding-tour": {
183
- sourcePath: "packages/markup/presets/product-onboarding-tour.tsx",
171
+ sourcePath: "examples/email-showcase/emails/product-onboarding-tour.tsx",
184
172
  reviewedBy: "Samva catalog review",
185
- reviewedAt: "2026-08-31T00:00:00.000Z",
186
- notes: "Reviewed product-onboarding-tour editable SML, public preview data, and gallery identity."
173
+ reviewedAt: "2026-09-08T00:00:00.000Z",
174
+ notes: "Reviewed product-onboarding-tour editable project with stylesheet and original assets, public preview data, and gallery identity."
187
175
  },
188
176
  "product-updates-roundup": {
189
- sourcePath: "packages/markup/presets/product-updates-roundup.tsx",
177
+ sourcePath: "examples/email-showcase/emails/product-updates-roundup.tsx",
190
178
  reviewedBy: "Samva catalog review",
191
- reviewedAt: "2026-08-31T00:00:00.000Z",
192
- notes: "Reviewed product-updates-roundup editable SML, public preview data, and gallery identity."
179
+ reviewedAt: "2026-09-08T00:00:00.000Z",
180
+ notes: "Reviewed product-updates-roundup editable project with stylesheet and original Basalt assets, public preview data, and gallery identity."
193
181
  },
194
182
  "flash-getaway-offer": {
195
- sourcePath: "packages/markup/presets/flash-getaway-offer.tsx",
183
+ sourcePath: "examples/email-showcase/emails/flash-getaway-offer.tsx",
196
184
  reviewedBy: "Samva catalog review",
197
- reviewedAt: "2026-08-31T00:00:00.000Z",
198
- notes: "Reviewed flash-getaway-offer editable SML, public preview data, and gallery identity."
185
+ reviewedAt: "2026-09-08T00:00:00.000Z",
186
+ notes: "Reviewed flash-getaway-offer editable project with stylesheet and original Wayfare assets, public preview data, and gallery identity."
199
187
  },
200
188
  "membership-benefits-promo": {
201
- sourcePath: "packages/markup/presets/membership-benefits-promo.tsx",
189
+ sourcePath: "examples/email-showcase/emails/membership-benefits-promo.tsx",
202
190
  reviewedBy: "Samva catalog review",
203
- reviewedAt: "2026-08-31T00:00:00.000Z",
204
- notes: "Reviewed membership-benefits-promo editable SML, public preview data, and gallery identity."
191
+ reviewedAt: "2026-09-08T00:00:00.000Z",
192
+ notes: "Reviewed membership-benefits-promo editable project with stylesheet and original Wayfare assets, public preview data, and gallery identity."
205
193
  },
206
194
  "industry-news-digest": {
207
- sourcePath: "packages/markup/presets/industry-news-digest.tsx",
195
+ sourcePath: "examples/email-showcase/emails/industry-news-digest.tsx",
208
196
  reviewedBy: "Samva catalog review",
209
- reviewedAt: "2026-08-31T00:00:00.000Z",
210
- notes: "Reviewed industry-news-digest editable SML, public preview data, and gallery identity."
197
+ reviewedAt: "2026-09-08T00:00:00.000Z",
198
+ notes: "Reviewed industry-news-digest editable SML project, authored assets, public preview data, and gallery identity."
211
199
  },
212
200
  "weekly-deals-circular": {
213
- sourcePath: "packages/markup/presets/weekly-deals-circular.tsx",
201
+ sourcePath: "examples/email-showcase/emails/weekly-deals-circular.tsx",
214
202
  reviewedBy: "Samva catalog review",
215
- reviewedAt: "2026-08-31T00:00:00.000Z",
216
- notes: "Reviewed weekly-deals-circular editable SML, public preview data, and gallery identity."
203
+ reviewedAt: "2026-09-08T00:00:00.000Z",
204
+ notes: "Reviewed weekly-deals-circular editable project with stylesheet and original Oakline assets, public preview data, and gallery identity."
217
205
  },
218
206
  "data-sharing-review": {
219
- sourcePath: "packages/markup/presets/data-sharing-review.tsx",
207
+ sourcePath: "examples/email-showcase/emails/data-sharing-review.tsx",
220
208
  reviewedBy: "Samva catalog review",
221
- reviewedAt: "2026-08-31T00:00:00.000Z",
222
- notes: "Reviewed data-sharing-review editable SML, public preview data, and gallery identity."
209
+ reviewedAt: "2026-09-08T00:00:00.000Z",
210
+ notes: "Reviewed data-sharing-review editable project with stylesheet and original Northloop assets, public preview data, and gallery identity."
223
211
  },
224
212
  "seasonal-sale-flyer": {
225
- sourcePath: "packages/markup/presets/seasonal-sale-flyer.tsx",
213
+ sourcePath: "examples/email-showcase/emails/seasonal-sale-flyer.tsx",
226
214
  reviewedBy: "Samva catalog review",
227
- reviewedAt: "2026-08-31T00:00:00.000Z",
228
- notes: "Reviewed seasonal-sale-flyer editable SML, public preview data, and gallery identity."
215
+ reviewedAt: "2026-09-08T00:00:00.000Z",
216
+ notes: "Reviewed seasonal-sale-flyer editable project with stylesheet and original Oakline assets, public preview data, and gallery identity."
229
217
  },
230
218
  "setup-checklist": {
231
- sourcePath: "packages/markup/presets/setup-checklist.tsx",
219
+ sourcePath: "examples/email-showcase/emails/setup-checklist.tsx",
232
220
  reviewedBy: "Samva catalog review",
233
- reviewedAt: "2026-08-31T00:00:00.000Z",
234
- notes: "Reviewed setup-checklist editable SML, public preview data, and gallery identity."
221
+ reviewedAt: "2026-09-08T00:00:00.000Z",
222
+ notes: "Reviewed setup-checklist editable project with stylesheet and original assets, public preview data, and gallery identity."
235
223
  },
236
224
  "feature-release-roundup": {
237
- sourcePath: "packages/markup/presets/feature-release-roundup.tsx",
225
+ sourcePath: "examples/email-showcase/emails/feature-release-roundup.tsx",
238
226
  reviewedBy: "Samva catalog review",
239
- reviewedAt: "2026-08-31T00:00:00.000Z",
240
- notes: "Reviewed feature-release-roundup editable SML, public preview data, and gallery identity."
227
+ reviewedAt: "2026-09-08T00:00:00.000Z",
228
+ notes: "Reviewed feature-release-roundup editable project with stylesheet and original Basalt assets, public preview data, and gallery identity."
241
229
  },
242
230
  "season-clearance-promo": {
243
- sourcePath: "packages/markup/presets/season-clearance-promo.tsx",
231
+ sourcePath: "examples/email-showcase/emails/season-clearance-promo.tsx",
244
232
  reviewedBy: "Samva catalog review",
245
- reviewedAt: "2026-08-31T00:00:00.000Z",
246
- notes: "Reviewed season-clearance-promo editable SML, public preview data, and gallery identity."
233
+ reviewedAt: "2026-09-08T00:00:00.000Z",
234
+ notes: "Reviewed season-clearance-promo editable project with stylesheet and original Oakline assets, public preview data, and gallery identity."
235
+ },
236
+ "product-launch-promo": {
237
+ sourcePath: "examples/email-showcase/emails/product-launch-promo.tsx",
238
+ reviewedBy: "Samva catalog review",
239
+ reviewedAt: "2026-09-08T00:00:00.000Z",
240
+ notes: "Reviewed product-launch-promo editable project, original Oakline assets, public preview data, and gallery identity."
247
241
  }
248
242
  };
243
+ const isBrandRecreationPresetId = (presetId) => Object.hasOwn(brandRecreationProvenance, presetId);
249
244
  const audienceFor = (useCase) => {
250
245
  switch (useCase) {
251
246
  case "account-access": return ["product-users"];
@@ -261,35 +256,64 @@ const audienceFor = (useCase) => {
261
256
  };
262
257
  const facetValues = (collections, prefix) => collections.filter((id) => id.startsWith(`${prefix}:`)).map((id) => id.slice(prefix.length + 1));
263
258
  const template = (value) => {
264
- const review = ownedPresetReviewManifest[value.presetId];
265
- const corpus = {
266
- _tag: "OwnedEditablePreset",
267
- corpusKind: "owned-editable-sml",
268
- provenance: {
269
- owner: "Samva",
270
- sourcePath: review.sourcePath,
271
- recordedAt: review.reviewedAt
272
- },
273
- review: {
274
- state: "approved",
275
- reviewedBy: review.reviewedBy,
276
- reviewedAt: review.reviewedAt,
277
- notes: review.notes
278
- },
279
- display: {
280
- state: "public",
281
- attributionLabel: "Made with Samva"
282
- },
283
- retention: {
284
- policy: "retain-until-withdrawn",
285
- reviewedAt: review.reviewedAt
286
- },
287
- takedown: {
288
- state: "active",
289
- contact: "legal@samva.dev",
290
- procedureUrl: "https://samva.dev/contact?subject=Template%20takedown"
259
+ const corpus = (() => {
260
+ if (isBrandRecreationPresetId(value.presetId)) {
261
+ const provenance = brandRecreationProvenance[value.presetId];
262
+ return {
263
+ _tag: "BrandRecreationPreset",
264
+ corpusKind: "brand-recreation-sml",
265
+ provenance,
266
+ review: {
267
+ state: "approved",
268
+ reviewedBy: "Samva catalog review",
269
+ reviewedAt: provenance.recordedAt,
270
+ notes: provenance.reviewedNote
271
+ },
272
+ display: {
273
+ state: "public",
274
+ attributionLabel: `Recreated with Samva. ${provenance.brand} does not endorse or have an affiliation with this example.`
275
+ },
276
+ retention: {
277
+ policy: "retain-until-withdrawn",
278
+ reviewedAt: provenance.recordedAt
279
+ },
280
+ takedown: {
281
+ state: "active",
282
+ contact: "legal@samva.dev",
283
+ procedureUrl: "https://samva.dev/contact?subject=Template%20takedown"
284
+ }
285
+ };
291
286
  }
292
- };
287
+ const review = ownedPresetReviewManifest[value.presetId];
288
+ return {
289
+ _tag: "OwnedEditablePreset",
290
+ corpusKind: "owned-editable-sml",
291
+ provenance: {
292
+ owner: "Samva",
293
+ sourcePath: review.sourcePath,
294
+ recordedAt: review.reviewedAt
295
+ },
296
+ review: {
297
+ state: "approved",
298
+ reviewedBy: review.reviewedBy,
299
+ reviewedAt: review.reviewedAt,
300
+ notes: review.notes
301
+ },
302
+ display: {
303
+ state: "public",
304
+ attributionLabel: "Made with Samva"
305
+ },
306
+ retention: {
307
+ policy: "retain-until-withdrawn",
308
+ reviewedAt: review.reviewedAt
309
+ },
310
+ takedown: {
311
+ state: "active",
312
+ contact: "legal@samva.dev",
313
+ procedureUrl: "https://samva.dev/contact?subject=Template%20takedown"
314
+ }
315
+ };
316
+ })();
293
317
  const facets = {
294
318
  jobType: [value.useCase],
295
319
  lifecycle: facetValues(value.collections, "stage"),
@@ -297,7 +321,7 @@ const template = (value) => {
297
321
  season: value.presetId === "seasonal-sale-flyer" || value.presetId === "season-clearance-promo" ? ["seasonal"] : ["evergreen"],
298
322
  audience: audienceFor(value.useCase),
299
323
  design: facetValues(value.collections, "style"),
300
- brandProvenance: ["samva-original"]
324
+ brandProvenance: [corpus._tag === "BrandRecreationPreset" ? "third-party-reference" : "samva-original"]
301
325
  };
302
326
  const registration = registerPublicCorpusEntry({
303
327
  id: value.presetId,
@@ -367,18 +391,6 @@ const publicTemplates = [
367
391
  ],
368
392
  relatedTemplates: ["otp", "email-verification"]
369
393
  }),
370
- template({
371
- presetId: "receipt",
372
- slug: "receipt",
373
- useCase: "commerce",
374
- collections: [
375
- "category:transactional",
376
- "industry:ecommerce",
377
- "stage:transaction",
378
- "style:data-heavy"
379
- ],
380
- relatedTemplates: ["payment-failed", "shipping-update"]
381
- }),
382
394
  template({
383
395
  presetId: "payment-failed",
384
396
  slug: "payment-failed",
@@ -391,7 +403,7 @@ const publicTemplates = [
391
403
  "style:data-heavy",
392
404
  "style:single-cta"
393
405
  ],
394
- relatedTemplates: ["receipt", "trial-ending"]
406
+ relatedTemplates: ["order-receipt", "trial-ending"]
395
407
  }),
396
408
  template({
397
409
  presetId: "shipping-update",
@@ -404,7 +416,7 @@ const publicTemplates = [
404
416
  "style:data-heavy",
405
417
  "style:single-cta"
406
418
  ],
407
- relatedTemplates: ["receipt", "notification"]
419
+ relatedTemplates: ["order-receipt", "notification"]
408
420
  }),
409
421
  template({
410
422
  presetId: "notification",
@@ -446,20 +458,7 @@ const publicTemplates = [
446
458
  "style:editorial",
447
459
  "style:data-heavy"
448
460
  ],
449
- relatedTemplates: ["notification", "newsletter"]
450
- }),
451
- template({
452
- presetId: "newsletter",
453
- slug: "newsletter",
454
- useCase: "publishing-campaigns",
455
- collections: [
456
- "category:digest-editorial",
457
- "industry:newsletters-media",
458
- "stage:engagement",
459
- "style:editorial",
460
- "style:branded"
461
- ],
462
- relatedTemplates: ["product-digest", "announcement"]
461
+ relatedTemplates: ["notification", "product-newsletter"]
463
462
  }),
464
463
  template({
465
464
  presetId: "announcement",
@@ -473,20 +472,7 @@ const publicTemplates = [
473
472
  "style:branded",
474
473
  "style:single-cta"
475
474
  ],
476
- relatedTemplates: ["newsletter", "event-invite"]
477
- }),
478
- template({
479
- presetId: "promo",
480
- slug: "promotion",
481
- useCase: "publishing-campaigns",
482
- collections: [
483
- "category:marketing",
484
- "industry:ecommerce",
485
- "stage:acquisition",
486
- "style:branded",
487
- "style:single-cta"
488
- ],
489
- relatedTemplates: ["announcement", "event-invite"]
475
+ relatedTemplates: ["product-newsletter", "event-invite"]
490
476
  }),
491
477
  template({
492
478
  presetId: "event-invite",
@@ -499,7 +485,7 @@ const publicTemplates = [
499
485
  "style:branded",
500
486
  "style:single-cta"
501
487
  ],
502
- relatedTemplates: ["announcement", "promo"]
488
+ relatedTemplates: ["announcement", "product-launch-promo"]
503
489
  }),
504
490
  template({
505
491
  presetId: "membership-promo",
@@ -512,7 +498,7 @@ const publicTemplates = [
512
498
  "style:branded",
513
499
  "style:data-heavy"
514
500
  ],
515
- relatedTemplates: ["promo", "announcement"]
501
+ relatedTemplates: ["product-launch-promo", "announcement"]
516
502
  }),
517
503
  template({
518
504
  presetId: "onboarding-step",
@@ -578,7 +564,7 @@ const publicTemplates = [
578
564
  "style:editorial",
579
565
  "style:data-heavy"
580
566
  ],
581
- relatedTemplates: ["newsletter", "product-digest"]
567
+ relatedTemplates: ["product-newsletter", "product-digest"]
582
568
  }),
583
569
  template({
584
570
  presetId: "member-referral-offer",
@@ -591,7 +577,7 @@ const publicTemplates = [
591
577
  "style:branded",
592
578
  "style:data-heavy"
593
579
  ],
594
- relatedTemplates: ["promo", "membership-promo"]
580
+ relatedTemplates: ["product-launch-promo", "membership-promo"]
595
581
  }),
596
582
  template({
597
583
  presetId: "catalog-sale-newsletter",
@@ -604,7 +590,7 @@ const publicTemplates = [
604
590
  "style:editorial",
605
591
  "style:data-heavy"
606
592
  ],
607
- relatedTemplates: ["announcement", "promo"]
593
+ relatedTemplates: ["announcement", "product-launch-promo"]
608
594
  }),
609
595
  template({
610
596
  presetId: "limited-time-savings",
@@ -617,7 +603,7 @@ const publicTemplates = [
617
603
  "style:minimal",
618
604
  "style:single-cta"
619
605
  ],
620
- relatedTemplates: ["promo", "membership-promo"]
606
+ relatedTemplates: ["product-launch-promo", "membership-promo"]
621
607
  }),
622
608
  template({
623
609
  presetId: "rewards-milestone",
@@ -630,19 +616,21 @@ const publicTemplates = [
630
616
  "style:branded",
631
617
  "style:data-heavy"
632
618
  ],
633
- relatedTemplates: ["membership-promo", "promo"]
619
+ relatedTemplates: ["membership-promo", "product-launch-promo"]
634
620
  }),
635
621
  template({
636
- presetId: "order-delivered",
637
- slug: "order-delivered",
622
+ presetId: "order-receipt",
623
+ slug: "order-receipt",
638
624
  useCase: "commerce",
639
625
  collections: [
640
626
  "category:transactional",
641
627
  "industry:ecommerce",
642
628
  "stage:transaction",
643
- "style:data-heavy"
629
+ "style:minimal",
630
+ "style:data-heavy",
631
+ "style:single-cta"
644
632
  ],
645
- relatedTemplates: ["shipping-update", "receipt"]
633
+ relatedTemplates: ["shipping-update", "payment-failed"]
646
634
  }),
647
635
  template({
648
636
  presetId: "travel-rewards-promo",
@@ -655,7 +643,7 @@ const publicTemplates = [
655
643
  "style:branded",
656
644
  "style:data-heavy"
657
645
  ],
658
- relatedTemplates: ["membership-promo", "promo"]
646
+ relatedTemplates: ["membership-promo", "product-launch-promo"]
659
647
  }),
660
648
  template({
661
649
  presetId: "events-roundup",
@@ -668,7 +656,7 @@ const publicTemplates = [
668
656
  "style:editorial",
669
657
  "style:data-heavy"
670
658
  ],
671
- relatedTemplates: ["newsletter", "event-invite"]
659
+ relatedTemplates: ["product-newsletter", "event-invite"]
672
660
  }),
673
661
  template({
674
662
  presetId: "product-onboarding-tour",
@@ -707,7 +695,7 @@ const publicTemplates = [
707
695
  "style:branded",
708
696
  "style:single-cta"
709
697
  ],
710
- relatedTemplates: ["promo", "membership-promo"]
698
+ relatedTemplates: ["product-launch-promo", "membership-promo"]
711
699
  }),
712
700
  template({
713
701
  presetId: "membership-benefits-promo",
@@ -720,7 +708,7 @@ const publicTemplates = [
720
708
  "style:branded",
721
709
  "style:data-heavy"
722
710
  ],
723
- relatedTemplates: ["membership-promo", "promo"]
711
+ relatedTemplates: ["membership-promo", "product-launch-promo"]
724
712
  }),
725
713
  template({
726
714
  presetId: "industry-news-digest",
@@ -733,7 +721,7 @@ const publicTemplates = [
733
721
  "style:editorial",
734
722
  "style:data-heavy"
735
723
  ],
736
- relatedTemplates: ["newsletter", "product-digest"]
724
+ relatedTemplates: ["product-newsletter", "product-digest"]
737
725
  }),
738
726
  template({
739
727
  presetId: "weekly-deals-circular",
@@ -746,7 +734,7 @@ const publicTemplates = [
746
734
  "style:branded",
747
735
  "style:data-heavy"
748
736
  ],
749
- relatedTemplates: ["promo", "membership-promo"]
737
+ relatedTemplates: ["product-launch-promo", "membership-promo"]
750
738
  }),
751
739
  template({
752
740
  presetId: "data-sharing-review",
@@ -772,7 +760,7 @@ const publicTemplates = [
772
760
  "style:branded",
773
761
  "style:data-heavy"
774
762
  ],
775
- relatedTemplates: ["promo", "announcement"]
763
+ relatedTemplates: ["product-launch-promo", "announcement"]
776
764
  }),
777
765
  template({
778
766
  presetId: "setup-checklist",
@@ -811,7 +799,64 @@ const publicTemplates = [
811
799
  "style:branded",
812
800
  "style:single-cta"
813
801
  ],
814
- relatedTemplates: ["promo", "announcement"]
802
+ relatedTemplates: ["product-launch-promo", "announcement"]
803
+ }),
804
+ template({
805
+ presetId: "linear-login-code",
806
+ slug: "linear-login-code",
807
+ useCase: "account-access",
808
+ collections: [
809
+ "category:transactional",
810
+ "industry:saas",
811
+ "industry:developer-tools",
812
+ "stage:activation",
813
+ "style:minimal",
814
+ "style:branded",
815
+ "style:single-cta"
816
+ ],
817
+ relatedTemplates: ["otp", "email-verification"]
818
+ }),
819
+ template({
820
+ presetId: "product-newsletter",
821
+ slug: "product-newsletter",
822
+ useCase: "publishing-campaigns",
823
+ collections: [
824
+ "category:digest-editorial",
825
+ "industry:saas",
826
+ "industry:developer-tools",
827
+ "stage:engagement",
828
+ "style:editorial",
829
+ "style:branded"
830
+ ],
831
+ relatedTemplates: ["product-digest", "editorial-newsletter"]
832
+ }),
833
+ template({
834
+ presetId: "product-launch-promo",
835
+ slug: "product-launch-promotion",
836
+ useCase: "commerce",
837
+ collections: [
838
+ "category:marketing",
839
+ "industry:ecommerce",
840
+ "stage:engagement",
841
+ "style:branded",
842
+ "style:single-cta"
843
+ ],
844
+ relatedTemplates: ["season-clearance-promo", "membership-promo"]
845
+ }),
846
+ template({
847
+ presetId: "vercel-invitation",
848
+ slug: "vercel-team-invitation",
849
+ useCase: "product-communication",
850
+ collections: [
851
+ "category:transactional",
852
+ "industry:saas",
853
+ "industry:developer-tools",
854
+ "stage:activation",
855
+ "style:minimal",
856
+ "style:branded",
857
+ "style:single-cta"
858
+ ],
859
+ relatedTemplates: ["team-invite", "welcome"]
815
860
  })
816
861
  ];
817
862
  const publicTemplateIds = publicTemplates.map((item) => item.presetId);