@samva/markup 0.7.0 → 0.8.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/AGENTS.md +14 -0
- package/dist/brand-DcoVkh_S.d.ts +88 -0
- package/dist/{catalog-60eaYC7b.d.ts → catalog-CKuOooB8.d.ts} +13 -15
- package/dist/{checks-DBweSIPN.js → checks-D73Xizbw.js} +414 -2
- package/dist/checks.js +1 -1
- package/dist/classes.d.ts +2 -3
- package/dist/compiler.d.ts +62 -45
- package/dist/compiler.js +179 -857
- package/dist/{corpus-BjYMqOoY.d.ts → corpus-CPPfgAHN.d.ts} +14 -14
- package/dist/{css-COcFOT1y.d.ts → css-CS2jLID6.d.ts} +28 -2
- package/dist/email/assets.d.ts +40 -0
- package/dist/email/assets.js +63 -0
- package/dist/email/brand-footer.d.ts +34 -0
- package/dist/email/brand-footer.js +62 -0
- package/dist/email/brand.d.ts +2 -0
- package/dist/email/brand.js +148 -0
- package/dist/email/html.d.ts +2 -42
- package/dist/email/html.js +11 -0
- package/dist/email/render.d.ts +12 -5
- package/dist/email/render.js +2 -5
- package/dist/email/selection.d.ts +2 -91
- package/dist/email/stylesheets.d.ts +1 -1
- package/dist/email/stylesheets.js +3 -0
- package/dist/html-Bl9BAdqc.d.ts +42 -0
- package/dist/{ops-2aiiYO7m.js → ops-BvwqHl7V.js} +2 -2
- package/dist/ops.js +1 -1
- package/dist/registry-Dcp6QEK_.d.ts +73 -0
- package/dist/registry.d.ts +2 -42
- package/dist/{render-aaJBnsXK.js → render-vAv_4r9v.js} +174 -17
- package/dist/selection-CCArx9lU.d.ts +91 -0
- package/dist/{showcase-DGZAWn4Z.d.ts → showcase-egkusQBf.d.ts} +15 -56
- package/dist/{presets → starters}/category-mapping.d.ts +5 -5
- package/dist/{presets → starters}/category-mapping.js +5 -5
- package/dist/starters/corpus.d.ts +2 -0
- package/dist/{presets → starters}/corpus.js +15 -15
- package/dist/starters/library.d.ts +18 -0
- package/dist/starters/library.js +692 -0
- package/dist/{presets → starters}/public-gallery.d.ts +47 -47
- package/dist/{presets → starters}/public-gallery.js +92 -92
- package/dist/{presets → starters}/public-handoff.d.ts +14 -14
- package/dist/{presets → starters}/public-handoff.js +40 -40
- package/dist/{presets → starters}/public-preview-artifacts.d.ts +4 -4
- package/dist/{presets → starters}/public-preview-artifacts.js +15 -15
- package/dist/{presets → starters}/public-preview.d.ts +1 -1
- package/dist/{presets → starters}/public-preview.js +3 -3
- package/dist/starters/showcase.d.ts +2 -0
- package/dist/starters/showcase.js +335 -0
- package/dist/starters/sources.d.ts +45 -0
- package/dist/{presets → starters}/sources.js +1951 -272
- package/dist/starters/theme.d.ts +45 -0
- package/dist/starters/theme.js +77 -0
- package/dist/starters.d.ts +2 -0
- package/dist/{presets.js → starters.js} +4 -11
- package/dist/tailwind-BYq7Lo6u.js +727 -0
- package/dist/theme-css-hFqcPSar.js +587 -0
- package/dist/theme-css.d.ts +56 -15
- package/dist/theme-css.js +2 -509
- package/dist/tsx-tracer.js +1 -1
- package/dist/unsubscribe-link-CoesnQDU.js +26 -0
- package/package.json +53 -41
- package/samva-brand.d.ts +14 -0
- package/dist/footer.d.ts +0 -66
- package/dist/footer.js +0 -93
- package/dist/presets/corpus.d.ts +0 -2
- package/dist/presets/showcase.d.ts +0 -2
- package/dist/presets/showcase.js +0 -627
- package/dist/presets/sources.d.ts +0 -38
- package/dist/presets.d.ts +0 -2
- package/dist/theme-6ApjjiBo.d.ts +0 -116
- package/dist/theme.d.ts +0 -2
- package/dist/theme.js +0 -118
- package/dist/tokens.d.ts +0 -6
- package/dist/tokens.js +0 -417
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { i as JsxSourceLocation } from "./source-locations-DrCM82Ym.js";
|
|
2
|
+
//#region src/email/selection.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The attribute a preview stamps so a click in a rendered document resolves to
|
|
5
|
+
* exactly one rendered element. A delivered message never carries it.
|
|
6
|
+
*/
|
|
7
|
+
declare const INSTANCE_PATH_ATTRIBUTE = "data-samva-instance";
|
|
8
|
+
/** Where one element sits in the emitted document, with the authoring that produced it. */
|
|
9
|
+
interface EmittedPosition {
|
|
10
|
+
readonly start: number;
|
|
11
|
+
readonly end: number;
|
|
12
|
+
readonly origins: ReadonlyArray<JsxSourceLocation>;
|
|
13
|
+
/**
|
|
14
|
+
* Dot-separated element indices from the document root, assigned as the
|
|
15
|
+
* document is written. It is the identity of one rendered instance.
|
|
16
|
+
*/
|
|
17
|
+
readonly instancePath: string;
|
|
18
|
+
readonly tag: string;
|
|
19
|
+
/** False when a compiler primitive generated this element. */
|
|
20
|
+
readonly authored: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** One rendered element, and the authoring it came from. */
|
|
23
|
+
interface EmailElementSelection {
|
|
24
|
+
/**
|
|
25
|
+
* Dot-separated element indices from the document root. It is the identity
|
|
26
|
+
* of one rendered instance, which is what tells two iterations of the same
|
|
27
|
+
* authored element apart: their origins are identical.
|
|
28
|
+
*/
|
|
29
|
+
readonly instancePath: string;
|
|
30
|
+
readonly tag: string;
|
|
31
|
+
/**
|
|
32
|
+
* The authored JSX element first, then each enclosing component call site,
|
|
33
|
+
* innermost first. Empty when the compiler generated this element with no
|
|
34
|
+
* authoring on the stack — the hidden preheader block, for instance.
|
|
35
|
+
*/
|
|
36
|
+
readonly origins: ReadonlyArray<JsxSourceLocation>;
|
|
37
|
+
/**
|
|
38
|
+
* False when a compiler primitive generated this element. `origins[0]` is
|
|
39
|
+
* then the authoring element that asked for it rather than this element
|
|
40
|
+
* itself, so the wrapper selects the primitive the author wrote.
|
|
41
|
+
*/
|
|
42
|
+
readonly authored: boolean;
|
|
43
|
+
/** 1-based position among the rendered elements sharing this origin chain and tag. */
|
|
44
|
+
readonly occurrence: number;
|
|
45
|
+
/**
|
|
46
|
+
* How many rendered elements share that chain and tag. Above one, one piece
|
|
47
|
+
* of authoring produced several rendered elements — a loop over a component,
|
|
48
|
+
* or a primitive that generates a repeated cell — so an edit there changes
|
|
49
|
+
* all of them.
|
|
50
|
+
*/
|
|
51
|
+
readonly occurrences: number;
|
|
52
|
+
/** Absent for the document root. */
|
|
53
|
+
readonly parentPath?: string;
|
|
54
|
+
/** Offset range in the rendered HTML this selection was taken from. */
|
|
55
|
+
readonly start: number;
|
|
56
|
+
readonly end: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Turn one render's emitted positions into selections, in document order.
|
|
60
|
+
*
|
|
61
|
+
* The serializer records an element once its content is written, so positions
|
|
62
|
+
* arrive innermost-first; document order is what an outline and an ancestry
|
|
63
|
+
* walk both need.
|
|
64
|
+
*/
|
|
65
|
+
declare const emailSelections: (positions: readonly EmittedPosition[]) => readonly EmailElementSelection[];
|
|
66
|
+
/** Look selections up by the instance path a rendered document carries. */
|
|
67
|
+
declare const emailSelectionIndex: (selections: readonly EmailElementSelection[]) => ReadonlyMap<string, EmailElementSelection>;
|
|
68
|
+
/**
|
|
69
|
+
* The authoring element a selection edits. For an authored element that is the
|
|
70
|
+
* element itself; for a generated wrapper it is the primitive that asked for
|
|
71
|
+
* it. Undefined only where the compiler generated markup with no authoring on
|
|
72
|
+
* the stack, which nothing can edit in place.
|
|
73
|
+
*/
|
|
74
|
+
declare const emailAuthoringTarget: (selection: EmailElementSelection) => JsxSourceLocation | undefined;
|
|
75
|
+
/** Root-first ancestry of a selection, itself last. */
|
|
76
|
+
declare const emailSelectionAncestry: (index: ReadonlyMap<string, EmailElementSelection>, instancePath: string) => readonly EmailElementSelection[];
|
|
77
|
+
/**
|
|
78
|
+
* Every rendered instance produced through the same call site, in document
|
|
79
|
+
* order. One entry means the call ran once; several mean it repeated.
|
|
80
|
+
*/
|
|
81
|
+
declare const emailSelectionSiblings: (selections: readonly EmailElementSelection[], selection: EmailElementSelection) => readonly EmailElementSelection[];
|
|
82
|
+
/**
|
|
83
|
+
* Every rendered instance of the same authored element, across every call site
|
|
84
|
+
* that reaches it. A shared component edited at its definition changes all of
|
|
85
|
+
* these; edited at one call site it changes only `emailSelectionSiblings`. A
|
|
86
|
+
* control has to say which of the two it is doing before it applies.
|
|
87
|
+
*/
|
|
88
|
+
declare const emailDefinitionInstances: (selections: readonly EmailElementSelection[], selection: EmailElementSelection) => readonly EmailElementSelection[];
|
|
89
|
+
//#endregion
|
|
90
|
+
export { emailDefinitionInstances as a, emailSelectionSiblings as c, emailAuthoringTarget as i, emailSelections as l, EmittedPosition as n, emailSelectionAncestry as o, INSTANCE_PATH_ATTRIBUTE as r, emailSelectionIndex as s, EmailElementSelection as t };
|
|
91
|
+
//# sourceMappingURL=selection-CCArx9lU.d.ts.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
//#region
|
|
1
|
+
import { r as StarterCategory } from "./catalog-CKuOooB8.js";
|
|
2
|
+
//#region starters/showcase.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* The showcase projects:
|
|
5
|
-
* `examples/email-showcase` rather than as the single module
|
|
4
|
+
* The showcase projects: starters authored as complete editable projects under
|
|
5
|
+
* `examples/email-showcase/starters` rather than as the single module
|
|
6
|
+
* `packages/markup/starters/<id>.tsx`.
|
|
6
7
|
*
|
|
7
|
-
* This registry is the one place a showcase project is declared.
|
|
8
|
-
*
|
|
8
|
+
* This registry is the one place a showcase project is declared. Each project is the directory
|
|
9
|
+
* `examples/email-showcase/starters/<id>`, whose files `starter-manifest.json` lists. Codegen reads
|
|
10
|
+
* both to bundle the project, the corpus reads the registry for provenance and canonical source paths, and
|
|
9
11
|
* `showcase.test.ts` fails when an entry here is missing from the catalog, the public gallery or
|
|
10
12
|
* the previews — so a project cannot be half-registered.
|
|
11
13
|
*/
|
|
@@ -21,26 +23,23 @@ type ShowcaseProvenance = {
|
|
|
21
23
|
readonly reviewedNote: string;
|
|
22
24
|
};
|
|
23
25
|
interface ShowcaseProject {
|
|
24
|
-
/** The
|
|
26
|
+
/** The starter id, matching its catalog row and its entry file's stem. */
|
|
25
27
|
readonly id: string;
|
|
26
|
-
/** The project's TSX entry, relative to the
|
|
28
|
+
/** The project's TSX entry, relative to the starter's own directory. */
|
|
27
29
|
readonly entryPath: `emails/${string}.tsx`;
|
|
28
|
-
/** Every other file that travels with the entry: stylesheet, assets, retained notices. */
|
|
29
|
-
readonly files: ReadonlyArray<string>;
|
|
30
30
|
readonly provenance: ShowcaseProvenance;
|
|
31
31
|
/** Must equal the catalog row's category. */
|
|
32
|
-
readonly category:
|
|
32
|
+
readonly category: StarterCategory;
|
|
33
33
|
/** Must equal the public gallery entry's slug. */
|
|
34
34
|
readonly gallerySlug: string;
|
|
35
35
|
/** Stable ISO-8601 timestamp recorded on the corpus entry. */
|
|
36
36
|
readonly recordedAt: string;
|
|
37
37
|
}
|
|
38
|
-
/** Repository-relative
|
|
39
|
-
declare const SHOWCASE_ROOT = "examples/email-showcase";
|
|
38
|
+
/** Repository-relative directory holding one directory per showcase project. */
|
|
39
|
+
declare const SHOWCASE_ROOT = "examples/email-showcase/starters";
|
|
40
40
|
declare const showcaseProjects: readonly [{
|
|
41
41
|
readonly id: "data-sharing-review";
|
|
42
42
|
readonly entryPath: "emails/data-sharing-review.tsx";
|
|
43
|
-
readonly files: readonly ["emails/data-sharing-review.css", "emails/assets/data-sharing-review-connection.png", "emails/assets/data-sharing-review-wordmark.png"];
|
|
44
43
|
readonly provenance: {
|
|
45
44
|
readonly kind: "owned";
|
|
46
45
|
};
|
|
@@ -50,7 +49,6 @@ declare const showcaseProjects: readonly [{
|
|
|
50
49
|
}, {
|
|
51
50
|
readonly id: "editorial-newsletter";
|
|
52
51
|
readonly entryPath: "emails/editorial-newsletter.tsx";
|
|
53
|
-
readonly files: readonly ["emails/editorial-newsletter.css", "emails/assets/editorial-newsletter-author.png", "emails/assets/editorial-newsletter-hero.png", "emails/assets/editorial-newsletter-sponsor.png", "emails/assets/editorial-newsletter-wordmark.png"];
|
|
54
52
|
readonly provenance: {
|
|
55
53
|
readonly kind: "owned";
|
|
56
54
|
};
|
|
@@ -60,7 +58,6 @@ declare const showcaseProjects: readonly [{
|
|
|
60
58
|
}, {
|
|
61
59
|
readonly id: "email-verification";
|
|
62
60
|
readonly entryPath: "emails/email-verification.tsx";
|
|
63
|
-
readonly files: readonly ["emails/email-verification.css", "emails/assets/email-verification-badge.png", "emails/assets/email-verification-wordmark.png"];
|
|
64
61
|
readonly provenance: {
|
|
65
62
|
readonly kind: "owned";
|
|
66
63
|
};
|
|
@@ -70,7 +67,6 @@ declare const showcaseProjects: readonly [{
|
|
|
70
67
|
}, {
|
|
71
68
|
readonly id: "events-roundup";
|
|
72
69
|
readonly entryPath: "emails/events-roundup.tsx";
|
|
73
|
-
readonly files: readonly ["emails/events-roundup.css", "emails/assets/events-roundup-spotlight.png", "emails/assets/events-roundup-tile-five.png", "emails/assets/events-roundup-tile-four.png", "emails/assets/events-roundup-tile-one.png", "emails/assets/events-roundup-tile-six.png", "emails/assets/events-roundup-tile-three.png", "emails/assets/events-roundup-tile-two.png", "emails/assets/events-roundup-wordmark.png"];
|
|
74
70
|
readonly provenance: {
|
|
75
71
|
readonly kind: "owned";
|
|
76
72
|
};
|
|
@@ -80,7 +76,6 @@ declare const showcaseProjects: readonly [{
|
|
|
80
76
|
}, {
|
|
81
77
|
readonly id: "feature-release-roundup";
|
|
82
78
|
readonly entryPath: "emails/feature-release-roundup.tsx";
|
|
83
|
-
readonly files: readonly ["emails/feature-release-roundup.css", "emails/assets/feature-release-roundup-release-activity.png", "emails/assets/feature-release-roundup-release-branching.png", "emails/assets/feature-release-roundup-release-keys.png", "emails/assets/feature-release-roundup-release-nodes.png", "emails/assets/feature-release-roundup-release-regions.png", "emails/assets/feature-release-roundup-wordmark.png"];
|
|
84
79
|
readonly provenance: {
|
|
85
80
|
readonly kind: "owned";
|
|
86
81
|
};
|
|
@@ -90,7 +85,6 @@ declare const showcaseProjects: readonly [{
|
|
|
90
85
|
}, {
|
|
91
86
|
readonly id: "feedback-request";
|
|
92
87
|
readonly entryPath: "emails/feedback-request.tsx";
|
|
93
|
-
readonly files: readonly ["emails/feedback-request.css", "emails/assets/feedback-request-avatar.png", "emails/assets/feedback-request-wordmark.png"];
|
|
94
88
|
readonly provenance: {
|
|
95
89
|
readonly kind: "owned";
|
|
96
90
|
};
|
|
@@ -100,7 +94,6 @@ declare const showcaseProjects: readonly [{
|
|
|
100
94
|
}, {
|
|
101
95
|
readonly id: "flash-getaway-offer";
|
|
102
96
|
readonly entryPath: "emails/flash-getaway-offer.tsx";
|
|
103
|
-
readonly files: readonly ["emails/flash-getaway-offer.css", "emails/assets/flash-getaway-offer-banner.png", "emails/assets/flash-getaway-offer-city-harbour.png", "emails/assets/flash-getaway-offer-desert-canyon.png", "emails/assets/flash-getaway-offer-reef-bay.png", "emails/assets/flash-getaway-offer-snow-ridge.png", "emails/assets/flash-getaway-offer-wordmark.png"];
|
|
104
97
|
readonly provenance: {
|
|
105
98
|
readonly kind: "owned";
|
|
106
99
|
};
|
|
@@ -110,7 +103,6 @@ declare const showcaseProjects: readonly [{
|
|
|
110
103
|
}, {
|
|
111
104
|
readonly id: "industry-news-digest";
|
|
112
105
|
readonly entryPath: "emails/industry-news-digest.tsx";
|
|
113
|
-
readonly files: readonly ["emails/industry-news-digest.css", "emails/assets/industry-news-digest-lead.png", "emails/assets/industry-news-digest-sponsor.png", "emails/assets/industry-news-digest-wordmark.png"];
|
|
114
106
|
readonly provenance: {
|
|
115
107
|
readonly kind: "owned";
|
|
116
108
|
};
|
|
@@ -120,7 +112,6 @@ declare const showcaseProjects: readonly [{
|
|
|
120
112
|
}, {
|
|
121
113
|
readonly id: "rewards-milestone";
|
|
122
114
|
readonly entryPath: "emails/rewards-milestone.tsx";
|
|
123
|
-
readonly files: readonly ["emails/assets/rewards-milestone-banner.png", "emails/assets/rewards-milestone-tier-amber.png", "emails/assets/rewards-milestone-tier-brass.png", "emails/assets/rewards-milestone-tier-copper.png", "emails/assets/rewards-milestone-tier-slate.png", "emails/assets/rewards-milestone-wordmark.png", "emails/rewards-milestone.css"];
|
|
124
115
|
readonly provenance: {
|
|
125
116
|
readonly kind: "owned";
|
|
126
117
|
};
|
|
@@ -130,7 +121,6 @@ declare const showcaseProjects: readonly [{
|
|
|
130
121
|
}, {
|
|
131
122
|
readonly id: "member-referral-offer";
|
|
132
123
|
readonly entryPath: "emails/member-referral-offer.tsx";
|
|
133
|
-
readonly files: readonly ["emails/assets/member-referral-offer-hero.png", "emails/assets/member-referral-offer-step-earn.png", "emails/assets/member-referral-offer-step-join.png", "emails/assets/member-referral-offer-step-share.png", "emails/assets/member-referral-offer-wordmark.png", "emails/member-referral-offer.css"];
|
|
134
124
|
readonly provenance: {
|
|
135
125
|
readonly kind: "owned";
|
|
136
126
|
};
|
|
@@ -140,7 +130,6 @@ declare const showcaseProjects: readonly [{
|
|
|
140
130
|
}, {
|
|
141
131
|
readonly id: "catalog-sale-newsletter";
|
|
142
132
|
readonly entryPath: "emails/catalog-sale-newsletter.tsx";
|
|
143
|
-
readonly files: readonly ["emails/assets/catalog-sale-newsletter-banner.png", "emails/assets/catalog-sale-newsletter-item-blanket.png", "emails/assets/catalog-sale-newsletter-item-crate.png", "emails/assets/catalog-sale-newsletter-item-kettle.png", "emails/assets/catalog-sale-newsletter-item-lantern.png", "emails/assets/catalog-sale-newsletter-wordmark.png", "emails/catalog-sale-newsletter.css"];
|
|
144
133
|
readonly provenance: {
|
|
145
134
|
readonly kind: "owned";
|
|
146
135
|
};
|
|
@@ -150,7 +139,6 @@ declare const showcaseProjects: readonly [{
|
|
|
150
139
|
}, {
|
|
151
140
|
readonly id: "event-invite";
|
|
152
141
|
readonly entryPath: "emails/event-invite.tsx";
|
|
153
|
-
readonly files: readonly ["emails/assets/event-invite-hero.png", "emails/assets/event-invite-wordmark.png", "emails/event-invite.css"];
|
|
154
142
|
readonly provenance: {
|
|
155
143
|
readonly kind: "owned";
|
|
156
144
|
};
|
|
@@ -160,7 +148,6 @@ declare const showcaseProjects: readonly [{
|
|
|
160
148
|
}, {
|
|
161
149
|
readonly id: "limited-time-savings";
|
|
162
150
|
readonly entryPath: "emails/limited-time-savings.tsx";
|
|
163
|
-
readonly files: readonly ["emails/assets/limited-time-savings-banner.png", "emails/assets/limited-time-savings-wordmark.png", "emails/limited-time-savings.css"];
|
|
164
151
|
readonly provenance: {
|
|
165
152
|
readonly kind: "owned";
|
|
166
153
|
};
|
|
@@ -170,7 +157,6 @@ declare const showcaseProjects: readonly [{
|
|
|
170
157
|
}, {
|
|
171
158
|
readonly id: "membership-promo";
|
|
172
159
|
readonly entryPath: "emails/membership-promo.tsx";
|
|
173
|
-
readonly files: readonly ["emails/assets/membership-promo-hero.png", "emails/assets/membership-promo-tier-cellar.png", "emails/assets/membership-promo-tier-market.png", "emails/assets/membership-promo-tier-pantry.png", "emails/assets/membership-promo-wordmark.png", "emails/membership-promo.css"];
|
|
174
160
|
readonly provenance: {
|
|
175
161
|
readonly kind: "owned";
|
|
176
162
|
};
|
|
@@ -180,7 +166,6 @@ declare const showcaseProjects: readonly [{
|
|
|
180
166
|
}, {
|
|
181
167
|
readonly id: "announcement";
|
|
182
168
|
readonly entryPath: "emails/announcement.tsx";
|
|
183
|
-
readonly files: readonly ["emails/announcement.css", "emails/assets/announcement-hero.png", "emails/assets/announcement-wordmark.png"];
|
|
184
169
|
readonly provenance: {
|
|
185
170
|
readonly kind: "owned";
|
|
186
171
|
};
|
|
@@ -190,7 +175,6 @@ declare const showcaseProjects: readonly [{
|
|
|
190
175
|
}, {
|
|
191
176
|
readonly id: "linear-login-code";
|
|
192
177
|
readonly entryPath: "emails/linear-login-code.tsx";
|
|
193
|
-
readonly files: readonly ["emails/linear-login-code.css", "README.md", "emails/assets/linear-logo.png"];
|
|
194
178
|
readonly provenance: {
|
|
195
179
|
readonly kind: "brand-recreation";
|
|
196
180
|
readonly brand: "Linear";
|
|
@@ -203,7 +187,6 @@ declare const showcaseProjects: readonly [{
|
|
|
203
187
|
}, {
|
|
204
188
|
readonly id: "membership-benefits-promo";
|
|
205
189
|
readonly entryPath: "emails/membership-benefits-promo.tsx";
|
|
206
|
-
readonly files: readonly ["emails/membership-benefits-promo.css", "emails/assets/membership-benefits-promo-icon-concierge.png", "emails/assets/membership-benefits-promo-icon-lounge.png", "emails/assets/membership-benefits-promo-icon-shield.png", "emails/assets/membership-benefits-promo-icon-suitcase.png", "emails/assets/membership-benefits-promo-icon-table.png", "emails/assets/membership-benefits-promo-icon-ticket.png", "emails/assets/membership-benefits-promo-panel.png", "emails/assets/membership-benefits-promo-wordmark.png"];
|
|
207
190
|
readonly provenance: {
|
|
208
191
|
readonly kind: "owned";
|
|
209
192
|
};
|
|
@@ -213,7 +196,6 @@ declare const showcaseProjects: readonly [{
|
|
|
213
196
|
}, {
|
|
214
197
|
readonly id: "notification";
|
|
215
198
|
readonly entryPath: "emails/notification.tsx";
|
|
216
|
-
readonly files: readonly ["emails/notification.css", "emails/assets/notification-avatar-one.png", "emails/assets/notification-avatar-three.png", "emails/assets/notification-avatar-two.png", "emails/assets/notification-wordmark.png"];
|
|
217
199
|
readonly provenance: {
|
|
218
200
|
readonly kind: "owned";
|
|
219
201
|
};
|
|
@@ -223,7 +205,6 @@ declare const showcaseProjects: readonly [{
|
|
|
223
205
|
}, {
|
|
224
206
|
readonly id: "onboarding-step";
|
|
225
207
|
readonly entryPath: "emails/onboarding-step.tsx";
|
|
226
|
-
readonly files: readonly ["emails/onboarding-step.css", "emails/assets/onboarding-step-illustration.png", "emails/assets/onboarding-step-wordmark.png"];
|
|
227
208
|
readonly provenance: {
|
|
228
209
|
readonly kind: "owned";
|
|
229
210
|
};
|
|
@@ -233,7 +214,6 @@ declare const showcaseProjects: readonly [{
|
|
|
233
214
|
}, {
|
|
234
215
|
readonly id: "order-receipt";
|
|
235
216
|
readonly entryPath: "emails/order-receipt.tsx";
|
|
236
|
-
readonly files: readonly ["emails/order-receipt.css", "emails/assets/order-receipt-candles.png", "emails/assets/order-receipt-mug.png", "emails/assets/order-receipt-napkins.png", "emails/assets/order-receipt-throw.png", "emails/assets/order-receipt-wordmark.png"];
|
|
237
217
|
readonly provenance: {
|
|
238
218
|
readonly kind: "owned";
|
|
239
219
|
};
|
|
@@ -243,7 +223,6 @@ declare const showcaseProjects: readonly [{
|
|
|
243
223
|
}, {
|
|
244
224
|
readonly id: "otp";
|
|
245
225
|
readonly entryPath: "emails/otp.tsx";
|
|
246
|
-
readonly files: readonly ["emails/otp.css", "emails/assets/otp-wordmark.png"];
|
|
247
226
|
readonly provenance: {
|
|
248
227
|
readonly kind: "owned";
|
|
249
228
|
};
|
|
@@ -253,7 +232,6 @@ declare const showcaseProjects: readonly [{
|
|
|
253
232
|
}, {
|
|
254
233
|
readonly id: "password-reset";
|
|
255
234
|
readonly entryPath: "emails/password-reset.tsx";
|
|
256
|
-
readonly files: readonly ["emails/password-reset.css", "emails/assets/password-reset-lock.png", "emails/assets/password-reset-wordmark.png"];
|
|
257
235
|
readonly provenance: {
|
|
258
236
|
readonly kind: "owned";
|
|
259
237
|
};
|
|
@@ -263,7 +241,6 @@ declare const showcaseProjects: readonly [{
|
|
|
263
241
|
}, {
|
|
264
242
|
readonly id: "payment-failed";
|
|
265
243
|
readonly entryPath: "emails/payment-failed.tsx";
|
|
266
|
-
readonly files: readonly ["emails/payment-failed.css", "emails/assets/payment-failed-bowls.png", "emails/assets/payment-failed-kettle.png", "emails/assets/payment-failed-tray.png", "emails/assets/payment-failed-wordmark.png"];
|
|
267
244
|
readonly provenance: {
|
|
268
245
|
readonly kind: "owned";
|
|
269
246
|
};
|
|
@@ -273,7 +250,6 @@ declare const showcaseProjects: readonly [{
|
|
|
273
250
|
}, {
|
|
274
251
|
readonly id: "product-digest";
|
|
275
252
|
readonly entryPath: "emails/product-digest.tsx";
|
|
276
|
-
readonly files: readonly ["emails/product-digest.css", "emails/assets/product-digest-podcast.png", "emails/assets/product-digest-wordmark.png"];
|
|
277
253
|
readonly provenance: {
|
|
278
254
|
readonly kind: "owned";
|
|
279
255
|
};
|
|
@@ -283,7 +259,6 @@ declare const showcaseProjects: readonly [{
|
|
|
283
259
|
}, {
|
|
284
260
|
readonly id: "product-launch-promo";
|
|
285
261
|
readonly entryPath: "emails/product-launch-promo.tsx";
|
|
286
|
-
readonly files: readonly ["emails/product-launch-promo.css", "emails/assets/oakline-hero.png", "emails/assets/oakline-wordmark.png", "emails/assets/product-chair.png", "emails/assets/product-lamp.png", "emails/assets/product-mirror.png", "emails/assets/product-stool.png", "emails/assets/product-throw.png", "emails/assets/product-vase.png"];
|
|
287
262
|
readonly provenance: {
|
|
288
263
|
readonly kind: "owned";
|
|
289
264
|
};
|
|
@@ -293,7 +268,6 @@ declare const showcaseProjects: readonly [{
|
|
|
293
268
|
}, {
|
|
294
269
|
readonly id: "product-newsletter";
|
|
295
270
|
readonly entryPath: "emails/product-newsletter.tsx";
|
|
296
|
-
readonly files: readonly ["emails/product-newsletter.css", "emails/assets/newsletter-lead.png", "emails/assets/newsletter-story-five.png", "emails/assets/newsletter-story-four.png", "emails/assets/newsletter-story-one.png", "emails/assets/newsletter-story-three.png", "emails/assets/newsletter-story-two.png", "emails/assets/newsletter-wordmark.png"];
|
|
297
271
|
readonly provenance: {
|
|
298
272
|
readonly kind: "owned";
|
|
299
273
|
};
|
|
@@ -303,7 +277,6 @@ declare const showcaseProjects: readonly [{
|
|
|
303
277
|
}, {
|
|
304
278
|
readonly id: "product-onboarding-tour";
|
|
305
279
|
readonly entryPath: "emails/product-onboarding-tour.tsx";
|
|
306
|
-
readonly files: readonly ["emails/product-onboarding-tour.css", "emails/assets/product-onboarding-tour-feature-alerts.png", "emails/assets/product-onboarding-tour-feature-digest.png", "emails/assets/product-onboarding-tour-feature-questions.png", "emails/assets/product-onboarding-tour-read-alerts.png", "emails/assets/product-onboarding-tour-read-metrics.png", "emails/assets/product-onboarding-tour-wordmark.png"];
|
|
307
280
|
readonly provenance: {
|
|
308
281
|
readonly kind: "owned";
|
|
309
282
|
};
|
|
@@ -313,7 +286,6 @@ declare const showcaseProjects: readonly [{
|
|
|
313
286
|
}, {
|
|
314
287
|
readonly id: "product-updates-roundup";
|
|
315
288
|
readonly entryPath: "emails/product-updates-roundup.tsx";
|
|
316
|
-
readonly files: readonly ["emails/product-updates-roundup.css", "emails/assets/product-updates-roundup-access-matrix.png", "emails/assets/product-updates-roundup-import-pipeline.png", "emails/assets/product-updates-roundup-query-timeline.png", "emails/assets/product-updates-roundup-status-board.png", "emails/assets/product-updates-roundup-usage-chart.png", "emails/assets/product-updates-roundup-webhook-retry.png", "emails/assets/product-updates-roundup-wordmark.png"];
|
|
317
289
|
readonly provenance: {
|
|
318
290
|
readonly kind: "owned";
|
|
319
291
|
};
|
|
@@ -323,7 +295,6 @@ declare const showcaseProjects: readonly [{
|
|
|
323
295
|
}, {
|
|
324
296
|
readonly id: "season-clearance-promo";
|
|
325
297
|
readonly entryPath: "emails/season-clearance-promo.tsx";
|
|
326
|
-
readonly files: readonly ["emails/season-clearance-promo.css", "emails/assets/season-clearance-promo-banner.png", "emails/assets/season-clearance-promo-cushions.png", "emails/assets/season-clearance-promo-planter.png", "emails/assets/season-clearance-promo-secondary.png", "emails/assets/season-clearance-promo-side-table.png", "emails/assets/season-clearance-promo-wall-clock.png", "emails/assets/season-clearance-promo-wordmark.png"];
|
|
327
298
|
readonly provenance: {
|
|
328
299
|
readonly kind: "owned";
|
|
329
300
|
};
|
|
@@ -333,7 +304,6 @@ declare const showcaseProjects: readonly [{
|
|
|
333
304
|
}, {
|
|
334
305
|
readonly id: "seasonal-sale-flyer";
|
|
335
306
|
readonly entryPath: "emails/seasonal-sale-flyer.tsx";
|
|
336
|
-
readonly files: readonly ["emails/seasonal-sale-flyer.css", "emails/assets/seasonal-sale-flyer-bedding.png", "emails/assets/seasonal-sale-flyer-cookware.png", "emails/assets/seasonal-sale-flyer-hero.png", "emails/assets/seasonal-sale-flyer-lighting.png", "emails/assets/seasonal-sale-flyer-outdoor.png", "emails/assets/seasonal-sale-flyer-storage.png", "emails/assets/seasonal-sale-flyer-tableware.png", "emails/assets/seasonal-sale-flyer-wordmark.png"];
|
|
337
307
|
readonly provenance: {
|
|
338
308
|
readonly kind: "owned";
|
|
339
309
|
};
|
|
@@ -343,7 +313,6 @@ declare const showcaseProjects: readonly [{
|
|
|
343
313
|
}, {
|
|
344
314
|
readonly id: "setup-checklist";
|
|
345
315
|
readonly entryPath: "emails/setup-checklist.tsx";
|
|
346
|
-
readonly files: readonly ["emails/setup-checklist.css", "emails/assets/setup-checklist-step-invite.png", "emails/assets/setup-checklist-step-publish.png", "emails/assets/setup-checklist-step-source.png", "emails/assets/setup-checklist-wordmark.png"];
|
|
347
316
|
readonly provenance: {
|
|
348
317
|
readonly kind: "owned";
|
|
349
318
|
};
|
|
@@ -353,7 +322,6 @@ declare const showcaseProjects: readonly [{
|
|
|
353
322
|
}, {
|
|
354
323
|
readonly id: "shipping-update";
|
|
355
324
|
readonly entryPath: "emails/shipping-update.tsx";
|
|
356
|
-
readonly files: readonly ["emails/shipping-update.css", "emails/assets/shipping-update-runner.png", "emails/assets/shipping-update-teapot.png", "emails/assets/shipping-update-tumblers.png", "emails/assets/shipping-update-wordmark.png"];
|
|
357
325
|
readonly provenance: {
|
|
358
326
|
readonly kind: "owned";
|
|
359
327
|
};
|
|
@@ -363,7 +331,6 @@ declare const showcaseProjects: readonly [{
|
|
|
363
331
|
}, {
|
|
364
332
|
readonly id: "team-invite";
|
|
365
333
|
readonly entryPath: "emails/team-invite.tsx";
|
|
366
|
-
readonly files: readonly ["emails/team-invite.css", "emails/assets/team-invite-inviter.png", "emails/assets/team-invite-teammate-one.png", "emails/assets/team-invite-teammate-three.png", "emails/assets/team-invite-teammate-two.png", "emails/assets/team-invite-wordmark.png"];
|
|
367
334
|
readonly provenance: {
|
|
368
335
|
readonly kind: "owned";
|
|
369
336
|
};
|
|
@@ -373,7 +340,6 @@ declare const showcaseProjects: readonly [{
|
|
|
373
340
|
}, {
|
|
374
341
|
readonly id: "travel-rewards-promo";
|
|
375
342
|
readonly entryPath: "emails/travel-rewards-promo.tsx";
|
|
376
|
-
readonly files: readonly ["emails/travel-rewards-promo.css", "emails/assets/travel-rewards-promo-hero.png", "emails/assets/travel-rewards-promo-partner-dining.png", "emails/assets/travel-rewards-promo-partner-drives.png", "emails/assets/travel-rewards-promo-partner-lounges.png", "emails/assets/travel-rewards-promo-partner-stays.png", "emails/assets/travel-rewards-promo-wordmark.png"];
|
|
377
343
|
readonly provenance: {
|
|
378
344
|
readonly kind: "owned";
|
|
379
345
|
};
|
|
@@ -383,7 +349,6 @@ declare const showcaseProjects: readonly [{
|
|
|
383
349
|
}, {
|
|
384
350
|
readonly id: "trial-ending";
|
|
385
351
|
readonly entryPath: "emails/trial-ending.tsx";
|
|
386
|
-
readonly files: readonly ["emails/trial-ending.css", "emails/assets/trial-ending-countdown.png", "emails/assets/trial-ending-wordmark.png"];
|
|
387
352
|
readonly provenance: {
|
|
388
353
|
readonly kind: "owned";
|
|
389
354
|
};
|
|
@@ -393,7 +358,6 @@ declare const showcaseProjects: readonly [{
|
|
|
393
358
|
}, {
|
|
394
359
|
readonly id: "vercel-invitation";
|
|
395
360
|
readonly entryPath: "emails/vercel-invitation.tsx";
|
|
396
|
-
readonly files: readonly ["emails/vercel-invitation.css", "README.md", "emails/assets/vercel-arrow.png", "emails/assets/vercel-logo.png", "emails/assets/vercel-team.png", "emails/assets/vercel-user.png"];
|
|
397
361
|
readonly provenance: {
|
|
398
362
|
readonly kind: "brand-recreation";
|
|
399
363
|
readonly brand: "Vercel";
|
|
@@ -406,7 +370,6 @@ declare const showcaseProjects: readonly [{
|
|
|
406
370
|
}, {
|
|
407
371
|
readonly id: "weekly-deals-circular";
|
|
408
372
|
readonly entryPath: "emails/weekly-deals-circular.tsx";
|
|
409
|
-
readonly files: readonly ["emails/weekly-deals-circular.css", "emails/assets/weekly-deals-circular-banner.png", "emails/assets/weekly-deals-circular-basket.png", "emails/assets/weekly-deals-circular-board.png", "emails/assets/weekly-deals-circular-bowls.png", "emails/assets/weekly-deals-circular-duvet.png", "emails/assets/weekly-deals-circular-kettle.png", "emails/assets/weekly-deals-circular-rug.png", "emails/assets/weekly-deals-circular-wordmark.png"];
|
|
410
373
|
readonly provenance: {
|
|
411
374
|
readonly kind: "owned";
|
|
412
375
|
};
|
|
@@ -416,7 +379,6 @@ declare const showcaseProjects: readonly [{
|
|
|
416
379
|
}, {
|
|
417
380
|
readonly id: "welcome";
|
|
418
381
|
readonly entryPath: "emails/welcome.tsx";
|
|
419
|
-
readonly files: readonly ["emails/welcome.css", "emails/assets/welcome-hero.png", "emails/assets/welcome-wordmark.png"];
|
|
420
382
|
readonly provenance: {
|
|
421
383
|
readonly kind: "owned";
|
|
422
384
|
};
|
|
@@ -426,7 +388,6 @@ declare const showcaseProjects: readonly [{
|
|
|
426
388
|
}, {
|
|
427
389
|
readonly id: "win-back";
|
|
428
390
|
readonly entryPath: "emails/win-back.tsx";
|
|
429
|
-
readonly files: readonly ["emails/win-back.css", "emails/assets/win-back-update-alerts.png", "emails/assets/win-back-update-exports.png", "emails/assets/win-back-update-mobile.png", "emails/assets/win-back-update-speed.png", "emails/assets/win-back-update-workspaces.png", "emails/assets/win-back-wordmark.png"];
|
|
430
391
|
readonly provenance: {
|
|
431
392
|
readonly kind: "owned";
|
|
432
393
|
};
|
|
@@ -449,8 +410,6 @@ declare const isShowcaseProjectId: (id: string) => id is ShowcaseProjectId;
|
|
|
449
410
|
declare const showcaseProject: (id: string) => ShowcaseProject | undefined;
|
|
450
411
|
/** Repository-relative path of a showcase project's TSX entry. */
|
|
451
412
|
declare const showcaseSourcePath: (project: ShowcaseProject) => string;
|
|
452
|
-
/** Every file the project bundles, entry first in sorted order — the shape codegen writes. */
|
|
453
|
-
declare const showcaseProjectPaths: (project: ShowcaseProject) => ReadonlyArray<string>;
|
|
454
413
|
//#endregion
|
|
455
|
-
export { ShowcaseProjectId as a, showcaseProject as c,
|
|
456
|
-
//# sourceMappingURL=showcase-
|
|
414
|
+
export { ShowcaseProjectId as a, showcaseProject as c, ShowcaseProject as i, showcaseProjects as l, OwnedShowcaseId as n, ShowcaseProvenance as o, SHOWCASE_ROOT as r, isShowcaseProjectId as s, BrandRecreationShowcaseId as t, showcaseSourcePath as u };
|
|
415
|
+
//# sourceMappingURL=showcase-egkusQBf.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as StarterCategory } from "../catalog-CKuOooB8.js";
|
|
2
2
|
import { TemplateCollectionId } from "./public-gallery.js";
|
|
3
|
-
//#region
|
|
3
|
+
//#region starters/category-mapping.d.ts
|
|
4
4
|
declare const LAB_DIMENSIONS: readonly ["newsletter", "receipt", "security", "product-update", "onboarding", "promotion", "shipping", "social-notification"];
|
|
5
5
|
type LabDimension = (typeof LAB_DIMENSIONS)[number];
|
|
6
6
|
declare const LAB_KINDS: readonly ["newsletter", "receipt", "security", "product-update", "onboarding", "promotion", "shipping", "social-notification", "digest", "invoice", "account", "event", "statement", "developer-notification", "unknown"];
|
|
7
7
|
type LabKind = (typeof LAB_KINDS)[number];
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
8
|
+
declare const labKindToStarterCategory: Record<LabKind, StarterCategory>;
|
|
9
|
+
declare const starterCategoryToCollection: Record<StarterCategory, TemplateCollectionId>;
|
|
10
10
|
declare const labKindToCollection: (kind: LabKind) => TemplateCollectionId;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { LAB_DIMENSIONS, LAB_KINDS, LabDimension, LabKind, labKindToCollection,
|
|
12
|
+
export { LAB_DIMENSIONS, LAB_KINDS, LabDimension, LabKind, labKindToCollection, labKindToStarterCategory, starterCategoryToCollection };
|
|
13
13
|
//# sourceMappingURL=category-mapping.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region starters/category-mapping.ts
|
|
2
2
|
const LAB_DIMENSIONS = [
|
|
3
3
|
"newsletter",
|
|
4
4
|
"receipt",
|
|
@@ -19,7 +19,7 @@ const LAB_KINDS = [
|
|
|
19
19
|
"developer-notification",
|
|
20
20
|
"unknown"
|
|
21
21
|
];
|
|
22
|
-
const
|
|
22
|
+
const labKindToStarterCategory = {
|
|
23
23
|
newsletter: "digest",
|
|
24
24
|
receipt: "transactional",
|
|
25
25
|
security: "transactional",
|
|
@@ -36,14 +36,14 @@ const labKindToPresetCategory = {
|
|
|
36
36
|
"developer-notification": "transactional",
|
|
37
37
|
unknown: "transactional"
|
|
38
38
|
};
|
|
39
|
-
const
|
|
39
|
+
const starterCategoryToCollection = {
|
|
40
40
|
transactional: "category:transactional",
|
|
41
41
|
digest: "category:digest-editorial",
|
|
42
42
|
marketing: "category:marketing",
|
|
43
43
|
lifecycle: "category:lifecycle"
|
|
44
44
|
};
|
|
45
|
-
const labKindToCollection = (kind) =>
|
|
45
|
+
const labKindToCollection = (kind) => starterCategoryToCollection[labKindToStarterCategory[kind]];
|
|
46
46
|
//#endregion
|
|
47
|
-
export { LAB_DIMENSIONS, LAB_KINDS, labKindToCollection,
|
|
47
|
+
export { LAB_DIMENSIONS, LAB_KINDS, labKindToCollection, labKindToStarterCategory, starterCategoryToCollection };
|
|
48
48
|
|
|
49
49
|
//# sourceMappingURL=category-mapping.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as PublicCorpusRegistrationIssue, c as TemplateFacetQuery, d as matchesTemplateFacets, f as ownedShowcaseStarterSources, h as templateFacetOptions, i as PublicCorpusRegistration, l as TemplateFacetSet, m as registerPublicCorpusEntry, n as InspirationReference, o as TemplateCorpusKind, p as ownedStarterSourcePath, r as OwnedEditableStarter, s as TemplateCorpusRecord, t as BrandRecreationStarter, u as brandRecreationProvenance } from "../corpus-CPPfgAHN.js";
|
|
2
|
+
export { BrandRecreationStarter, InspirationReference, OwnedEditableStarter, PublicCorpusRegistration, PublicCorpusRegistrationIssue, TemplateCorpusKind, TemplateCorpusRecord, TemplateFacetQuery, TemplateFacetSet, brandRecreationProvenance, matchesTemplateFacets, ownedShowcaseStarterSources, ownedStarterSourcePath, registerPublicCorpusEntry, templateFacetOptions };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as isObject } from "../guards-eV1qLbf2.js";
|
|
2
|
-
import {
|
|
2
|
+
import { starterCatalog } from "../starters.js";
|
|
3
3
|
import { showcaseProject, showcaseProjects, showcaseSourcePath } from "./showcase.js";
|
|
4
4
|
import { Result } from "better-result";
|
|
5
|
-
//#region
|
|
5
|
+
//#region starters/corpus.ts
|
|
6
6
|
const templateFacetOptions = {
|
|
7
7
|
jobType: [
|
|
8
8
|
"account-access",
|
|
@@ -53,13 +53,13 @@ const brandRecreationProvenance = Object.fromEntries(showcaseProjects.flatMap((p
|
|
|
53
53
|
reviewedNote: project.provenance.reviewedNote
|
|
54
54
|
}]] : []));
|
|
55
55
|
/**
|
|
56
|
-
* Owned
|
|
57
|
-
* Every other owned
|
|
56
|
+
* Owned starters authored as complete showcase projects with their own stylesheet and assets.
|
|
57
|
+
* Every other owned starter is the single module `packages/markup/starters/<id>.tsx`.
|
|
58
58
|
*/
|
|
59
|
-
const
|
|
60
|
-
const
|
|
59
|
+
const ownedShowcaseStarterSources = Object.fromEntries(showcaseProjects.flatMap((project) => project.provenance.kind === "owned" ? [[project.id, showcaseSourcePath(project)]] : []));
|
|
60
|
+
const ownedStarterSourcePath = (id) => {
|
|
61
61
|
const project = showcaseProject(id);
|
|
62
|
-
return project === void 0 || project.provenance.kind !== "owned" ? `packages/markup/
|
|
62
|
+
return project === void 0 || project.provenance.kind !== "owned" ? `packages/markup/starters/${id}.tsx` : showcaseSourcePath(project);
|
|
63
63
|
};
|
|
64
64
|
const ISO_TIMESTAMP = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
|
|
65
65
|
const nonEmpty = (value) => value.trim().length > 0;
|
|
@@ -111,12 +111,12 @@ const CORPUS_KEYS = [
|
|
|
111
111
|
const isCorpusRecord = (value) => {
|
|
112
112
|
if (!exactKeys(value, CORPUS_KEYS) || !hasGovernance(value)) return false;
|
|
113
113
|
const provenance = value.provenance;
|
|
114
|
-
if (value.type === "
|
|
114
|
+
if (value.type === "OwnedEditableStarter") return value.corpusKind === "owned-editable-sml" && exactKeys(provenance, [
|
|
115
115
|
"owner",
|
|
116
116
|
"sourcePath",
|
|
117
117
|
"recordedAt"
|
|
118
118
|
]) && provenance.owner === "Samva" && typeof provenance.sourcePath === "string" && typeof provenance.recordedAt === "string";
|
|
119
|
-
if (value.type === "
|
|
119
|
+
if (value.type === "BrandRecreationStarter") return value.corpusKind === "brand-recreation-sml" && exactKeys(provenance, [
|
|
120
120
|
"owner",
|
|
121
121
|
"sourcePath",
|
|
122
122
|
"recordedAt",
|
|
@@ -137,7 +137,7 @@ const isCorpusEntry = (value) => exactKeys(value, [
|
|
|
137
137
|
"corpus",
|
|
138
138
|
"facets"
|
|
139
139
|
]) && typeof value.id === "string" && isCorpusRecord(value.corpus) && isFacetSet(value.facets);
|
|
140
|
-
const
|
|
140
|
+
const canonicalOwnedStarterSources = new Map(starterCatalog.filter((starter) => starter.channel === "email" && !Object.hasOwn(brandRecreationProvenance, starter.id)).map((starter) => [starter.id, ownedStarterSourcePath(starter.id)]));
|
|
141
141
|
/** Decode and gate a record before it can enter any public projection. */
|
|
142
142
|
const registerPublicCorpusEntry = (input) => {
|
|
143
143
|
if (!isCorpusEntry(input)) return Result.err({
|
|
@@ -154,12 +154,12 @@ const registerPublicCorpusEntry = (input) => {
|
|
|
154
154
|
id,
|
|
155
155
|
message: "public corpus records require approved review, display, retention, and takedown metadata"
|
|
156
156
|
});
|
|
157
|
-
if (corpus.type === "
|
|
157
|
+
if (corpus.type === "OwnedEditableStarter" && (canonicalOwnedStarterSources.get(id) !== corpus.provenance.sourcePath || corpus.retention.policy !== "retain-until-withdrawn" || facets.brandProvenance.some((value) => value !== "samva-original"))) return Result.err({
|
|
158
158
|
id,
|
|
159
|
-
message: "owned
|
|
159
|
+
message: "owned starters require a canonical editable TSX source"
|
|
160
160
|
});
|
|
161
|
-
if (corpus.type === "
|
|
162
|
-
const canonical = Object.entries(brandRecreationProvenance).find(([
|
|
161
|
+
if (corpus.type === "BrandRecreationStarter") {
|
|
162
|
+
const canonical = Object.entries(brandRecreationProvenance).find(([starterId]) => starterId === id)?.[1];
|
|
163
163
|
if (canonical === void 0 || Object.entries(canonical).some(([key, value]) => corpus.provenance[key] !== value) || !nonEmpty(corpus.provenance.brand) || !nonEmpty(corpus.provenance.subject) || corpus.retention.policy !== "retain-until-withdrawn" || facets.brandProvenance.some((value) => value !== "third-party-reference")) return Result.err({
|
|
164
164
|
id,
|
|
165
165
|
message: "brand recreations require a canonical source, a referenced brand and subject, and third-party provenance"
|
|
@@ -189,6 +189,6 @@ const matchesTemplateFacets = (facets, query) => requiredFacetDimensions.every((
|
|
|
189
189
|
return selected === void 0 || selected.every((value) => available.has(value));
|
|
190
190
|
});
|
|
191
191
|
//#endregion
|
|
192
|
-
export { brandRecreationProvenance, matchesTemplateFacets,
|
|
192
|
+
export { brandRecreationProvenance, matchesTemplateFacets, ownedShowcaseStarterSources, ownedStarterSourcePath, registerPublicCorpusEntry, templateFacetOptions };
|
|
193
193
|
|
|
194
194
|
//# sourceMappingURL=corpus.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region starters/library.gen.d.ts
|
|
2
|
+
/** One public gallery template whose project the Agents Worker serves at `/library/<digest>.json`. */
|
|
3
|
+
interface LibraryTemplate {
|
|
4
|
+
readonly slug: string;
|
|
5
|
+
readonly starterId: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
/** SHA-256 of the served project bytes, lowercase hex. */
|
|
8
|
+
readonly digest: string;
|
|
9
|
+
/** Project-relative paths, so a listing needs no fetch. */
|
|
10
|
+
readonly paths: ReadonlyArray<string>;
|
|
11
|
+
readonly byteSize: number;
|
|
12
|
+
}
|
|
13
|
+
declare const libraryTemplates: ReadonlyArray<LibraryTemplate>;
|
|
14
|
+
/** Identifies this exact library; a workspace records it to notice a changed gallery. */
|
|
15
|
+
declare const libraryManifestDigest = "60bd511a973a6d1fe17bc6a03990118dd2a0e8a1f14556f09aaf54713420fd53";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { LibraryTemplate, libraryManifestDigest, libraryTemplates };
|
|
18
|
+
//# sourceMappingURL=library.d.ts.map
|