@samva/markup 0.8.0 → 0.9.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.
Files changed (171) hide show
  1. package/AGENTS.md +90 -37
  2. package/README.md +188 -52
  3. package/dist/assets-C5duwTya.d.ts +40 -0
  4. package/dist/{brand-DcoVkh_S.d.ts → brand-B-0bN_Ir.d.ts} +2 -2
  5. package/dist/{render-vAv_4r9v.js → cascade-t6kxlgEI.js} +93 -280
  6. package/dist/channel-edit.d.ts +121 -0
  7. package/dist/channel-edit.js +609 -0
  8. package/dist/channel-specs-B6M_HlaV.js +29 -0
  9. package/dist/channel-specs-C2feJwuP.d.ts +13 -0
  10. package/dist/compatibility-DbISoFIq.js +589 -0
  11. package/dist/compiler.d.ts +10 -257
  12. package/dist/compiler.js +10 -730
  13. package/dist/{css-CS2jLID6.d.ts → css-BVQKICKC.d.ts} +3 -3
  14. package/dist/diagnostic-codes.d.ts +403 -0
  15. package/dist/diagnostic-codes.js +399 -0
  16. package/dist/{diagnostics-BMYtBCQk.d.ts → diagnostics-B-Gym34R.d.ts} +8 -4
  17. package/dist/diagnostics.d.ts +31 -2
  18. package/dist/diagnostics.js +1 -19
  19. package/dist/{elements-BzjjnoCS.d.ts → elements-cqldpaJt.d.ts} +3 -3
  20. package/dist/email/assets.d.ts +2 -40
  21. package/dist/email/brand-footer.d.ts +2 -2
  22. package/dist/email/brand-footer.js +4 -3
  23. package/dist/email/brand.d.ts +1 -1
  24. package/dist/email/brand.js +1 -1
  25. package/dist/email/components.d.ts +21 -10
  26. package/dist/email/components.js +46 -11
  27. package/dist/email/diagnostics.d.ts +2 -2
  28. package/dist/email/diagnostics.js +2 -1
  29. package/dist/email/elements.d.ts +1 -1
  30. package/dist/email/html.d.ts +2 -2
  31. package/dist/email/html.js +45 -2
  32. package/dist/email/jsx-dev-runtime.d.ts +2 -2
  33. package/dist/email/jsx-runtime.d.ts +1 -1
  34. package/dist/email/render.d.ts +8 -18
  35. package/dist/email/render.js +163 -3
  36. package/dist/email/text.d.ts +1 -1
  37. package/dist/fmt.d.ts +32 -0
  38. package/dist/fmt.js +174 -0
  39. package/dist/{html-Bl9BAdqc.d.ts → html-BJepOwZ4.d.ts} +19 -5
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +2 -0
  42. package/dist/ir-aaqNE987.d.ts +252 -0
  43. package/dist/ir.d.ts +2 -0
  44. package/dist/ir.js +7 -0
  45. package/dist/preview-Ekdg1dXG.d.ts +100 -0
  46. package/dist/preview.d.ts +2 -0
  47. package/dist/preview.js +160 -0
  48. package/dist/profile-BH-OtdDA.js +3670 -0
  49. package/dist/render-ir.d.ts +19 -0
  50. package/dist/render-ir.js +826 -0
  51. package/dist/sms-segments.d.ts +13 -2
  52. package/dist/sms.d.ts +16 -0
  53. package/dist/sms.js +12 -0
  54. package/dist/{email/source-edit.d.ts → source-edit.d.ts} +55 -6
  55. package/dist/source-edit.js +343 -0
  56. package/dist/source-locations-C8wCsiAy.d.ts +23 -0
  57. package/dist/source-locations.d.ts +2 -2
  58. package/dist/source-locations.js +3 -89
  59. package/dist/static.d.ts +57 -0
  60. package/dist/static.js +69 -0
  61. package/dist/tailwind-CMYpZf1v.js +614 -0
  62. package/dist/template-_QE_rQND.d.ts +65 -0
  63. package/dist/template.d.ts +2 -2
  64. package/dist/template.js +15 -10
  65. package/dist/theme-css.d.ts +1 -1
  66. package/dist/theme-imports-lvBw3AD1.js +109 -0
  67. package/dist/transform-Ct2OMkFN.d.ts +153 -0
  68. package/dist/whatsapp.d.ts +57 -0
  69. package/dist/whatsapp.js +22 -0
  70. package/generated/contract.json +1782 -0
  71. package/generated/reference.md +353 -0
  72. package/package.json +41 -151
  73. package/skills/sml/SKILL.md +123 -0
  74. package/dist/ast-BrDtApwS.d.ts +0 -107
  75. package/dist/ast.d.ts +0 -2
  76. package/dist/ast.js +0 -124
  77. package/dist/candidate.d.ts +0 -29
  78. package/dist/candidate.js +0 -88
  79. package/dist/catalog-CKuOooB8.d.ts +0 -354
  80. package/dist/checks-D73Xizbw.js +0 -59366
  81. package/dist/checks.d.ts +0 -33
  82. package/dist/checks.js +0 -2
  83. package/dist/classes.d.ts +0 -26
  84. package/dist/classes.js +0 -184
  85. package/dist/compile-sms.d.ts +0 -28
  86. package/dist/compile-sms.js +0 -44
  87. package/dist/compile-whatsapp.d.ts +0 -56
  88. package/dist/compile-whatsapp.js +0 -186
  89. package/dist/compile.d.ts +0 -18
  90. package/dist/compile.js +0 -29
  91. package/dist/components.d.ts +0 -289
  92. package/dist/components.js +0 -106
  93. package/dist/conditionals.d.ts +0 -10
  94. package/dist/conditionals.js +0 -74
  95. package/dist/corpus-CPPfgAHN.d.ts +0 -106
  96. package/dist/diagnostics-OcQKQYSY.d.ts +0 -49
  97. package/dist/email/selection.d.ts +0 -2
  98. package/dist/email/selection.js +0 -91
  99. package/dist/email/source-edit.js +0 -185
  100. package/dist/email/stylesheets.d.ts +0 -15
  101. package/dist/email/stylesheets.js +0 -48
  102. package/dist/emit.d.ts +0 -51
  103. package/dist/emit.js +0 -151
  104. package/dist/interpolate.d.ts +0 -24
  105. package/dist/interpolate.js +0 -43
  106. package/dist/jsx-dev-runtime.d.ts +0 -11
  107. package/dist/jsx-dev-runtime.js +0 -15
  108. package/dist/jsx-runtime-I-1nCtl2.d.ts +0 -57
  109. package/dist/jsx-runtime.d.ts +0 -2
  110. package/dist/jsx-runtime.js +0 -121
  111. package/dist/lexer.d.ts +0 -60
  112. package/dist/lexer.js +0 -281
  113. package/dist/model.d.ts +0 -24
  114. package/dist/model.js +0 -77
  115. package/dist/ops-BvwqHl7V.js +0 -630
  116. package/dist/ops.d.ts +0 -114
  117. package/dist/ops.js +0 -2
  118. package/dist/parser-t29cHLVL.d.ts +0 -396
  119. package/dist/parser.d.ts +0 -2
  120. package/dist/parser.js +0 -859
  121. package/dist/predicate-BI6uRRM-.js +0 -549
  122. package/dist/predicate-M-05Nd7R.d.ts +0 -56
  123. package/dist/predicate.d.ts +0 -2
  124. package/dist/predicate.js +0 -2
  125. package/dist/printer.d.ts +0 -6
  126. package/dist/printer.js +0 -122
  127. package/dist/registry-Dcp6QEK_.d.ts +0 -73
  128. package/dist/registry.d.ts +0 -2
  129. package/dist/registry.js +0 -646
  130. package/dist/render-template.d.ts +0 -45
  131. package/dist/render-template.js +0 -76
  132. package/dist/selection-CCArx9lU.d.ts +0 -91
  133. package/dist/showcase-egkusQBf.d.ts +0 -415
  134. package/dist/sms-segments-y4FpPilJ.d.ts +0 -13
  135. package/dist/source-locations-DrCM82Ym.d.ts +0 -67
  136. package/dist/starters/category-mapping.d.ts +0 -13
  137. package/dist/starters/category-mapping.js +0 -49
  138. package/dist/starters/corpus.d.ts +0 -2
  139. package/dist/starters/corpus.js +0 -194
  140. package/dist/starters/library.d.ts +0 -18
  141. package/dist/starters/library.js +0 -692
  142. package/dist/starters/public-gallery.d.ts +0 -266
  143. package/dist/starters/public-gallery.js +0 -916
  144. package/dist/starters/public-handoff.d.ts +0 -164
  145. package/dist/starters/public-handoff.js +0 -361
  146. package/dist/starters/public-preview-artifacts.d.ts +0 -43
  147. package/dist/starters/public-preview-artifacts.js +0 -104
  148. package/dist/starters/public-preview.d.ts +0 -61
  149. package/dist/starters/public-preview.js +0 -83
  150. package/dist/starters/showcase.d.ts +0 -2
  151. package/dist/starters/showcase.js +0 -335
  152. package/dist/starters/sources.d.ts +0 -45
  153. package/dist/starters/sources.js +0 -7762
  154. package/dist/starters/theme.d.ts +0 -45
  155. package/dist/starters/theme.js +0 -77
  156. package/dist/starters.d.ts +0 -2
  157. package/dist/starters.js +0 -874
  158. package/dist/tailwind-BYq7Lo6u.js +0 -727
  159. package/dist/template-DWftqh4x.d.ts +0 -60
  160. package/dist/tsx-source-instrumentation.d.ts +0 -30
  161. package/dist/tsx-source-instrumentation.js +0 -115
  162. package/dist/tsx-tracer.d.ts +0 -112
  163. package/dist/tsx-tracer.js +0 -985
  164. package/dist/variables-J_L3qxRa.d.ts +0 -77
  165. package/dist/variables.d.ts +0 -2
  166. package/dist/variables.js +0 -141
  167. package/dist/version-BITr58kk.js +0 -96
  168. package/generated/sml-agent-contract.json +0 -709
  169. package/generated/sml-email-agent-contract.json +0 -615
  170. package/generated/sml-email-language-reference.md +0 -94
  171. package/generated/sml-language-reference.md +0 -195
@@ -1,76 +0,0 @@
1
- import { mapJsxSourceLocations } from "./source-locations.js";
2
- import { i as parsePredicate, n as collectPredicateVariables } from "./predicate-BI6uRRM-.js";
3
- import { isRootTag } from "./ast.js";
4
- import { createVariablesProxy } from "./variables.js";
5
- import { parseSml } from "./parser.js";
6
- import { printSml } from "./printer.js";
7
- import { Result } from "better-result";
8
- //#region src/render-template.ts
9
- /**
10
- * Runs a template function and returns its canonical document, source, and
11
- * inferred variable schema. Grammar violations in the constructed tree surface
12
- * as a parse `SmlParseError` (Result failure) with spans into the printed
13
- * source. The template function itself may throw (e.g. the coercion guard) —
14
- * that is a programmer error in the user's build, so it propagates rather than
15
- * becoming a diagnostic.
16
- */
17
- const renderTemplate = (template) => {
18
- const { proxy, recorder } = createVariablesProxy();
19
- const root = template(proxy);
20
- if (root.kind !== "element" || !isRootTag(root.tag)) throw new TypeError("a template must return a single channel root element (<Email>, <Sms>, or <WhatsApp>), not a Fragment or other node");
21
- const source = printSml({
22
- kind: "document",
23
- root
24
- });
25
- const parsed = parseSml(source);
26
- if (Result.isError(parsed)) return Result.err(parsed.error);
27
- const document = parsed.value;
28
- return Result.ok({
29
- document,
30
- source,
31
- variables: collectVariableSchema(document, recorder),
32
- sourceLocations: mapJsxSourceLocations(root, document.root)
33
- });
34
- };
35
- /**
36
- * Merges the recorder's kind evidence with structural required-ness read off the
37
- * parsed document. A name referenced anywhere outside an `<If>` subtree is
38
- * required; names seen only inside conditional branches are optional.
39
- */
40
- const collectVariableSchema = (document, recorder) => {
41
- const unconditional = /* @__PURE__ */ new Set();
42
- const conditional = /* @__PURE__ */ new Set();
43
- const kindOf = new Map(recorder.collected().map((variable) => [variable.name, variable.kind]));
44
- const visit = (node, insideIf) => {
45
- if (node.kind === "interpolation") {
46
- (insideIf ? conditional : unconditional).add(node.name);
47
- return;
48
- }
49
- if (node.kind === "text") return;
50
- const nowInsideIf = insideIf || node.tag === "If";
51
- for (const attribute of node.attributes) {
52
- if (attribute.value.kind !== "string") continue;
53
- if (node.tag === "If" && attribute.name === "test") {
54
- const parsed = parsePredicate(attribute.value.value, 0);
55
- if (Result.isOk(parsed)) for (const name of collectPredicateVariables(parsed.value)) (insideIf ? conditional : unconditional).add(name);
56
- continue;
57
- }
58
- for (const match of attribute.value.value.matchAll(INTERPOLATION_PATTERN)) {
59
- const name = match[1] ?? match[2];
60
- if (name !== void 0) (nowInsideIf ? conditional : unconditional).add(name);
61
- }
62
- }
63
- for (const child of node.children) visit(child, nowInsideIf);
64
- };
65
- visit(document.root, false);
66
- return [.../* @__PURE__ */ new Set([...unconditional, ...conditional])].map((name) => ({
67
- name,
68
- kind: kindOf.get(name) ?? "unknown",
69
- required: unconditional.has(name)
70
- }));
71
- };
72
- const INTERPOLATION_PATTERN = /\$\{\s*\/?([\w.]+)\s*\}|\{\{\s*([\w.]+)\s*\}\}/g;
73
- //#endregion
74
- export { renderTemplate };
75
-
76
- //# sourceMappingURL=render-template.js.map
@@ -1,91 +0,0 @@
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,415 +0,0 @@
1
- import { r as StarterCategory } from "./catalog-CKuOooB8.js";
2
- //#region starters/showcase.d.ts
3
- /**
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`.
7
- *
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
11
- * `showcase.test.ts` fails when an entry here is missing from the catalog, the public gallery or
12
- * the previews — so a project cannot be half-registered.
13
- */
14
- /** How a showcase project's design came about, and what a public surface must say about it. */
15
- type ShowcaseProvenance = {
16
- readonly kind: "owned";
17
- } | {
18
- readonly kind: "brand-recreation";
19
- /** The brand whose own email is recreated, named on every public surface. */
20
- readonly brand: string;
21
- /** What that brand's email does, in the customer's words. */
22
- readonly subject: string;
23
- readonly reviewedNote: string;
24
- };
25
- interface ShowcaseProject {
26
- /** The starter id, matching its catalog row and its entry file's stem. */
27
- readonly id: string;
28
- /** The project's TSX entry, relative to the starter's own directory. */
29
- readonly entryPath: `emails/${string}.tsx`;
30
- readonly provenance: ShowcaseProvenance;
31
- /** Must equal the catalog row's category. */
32
- readonly category: StarterCategory;
33
- /** Must equal the public gallery entry's slug. */
34
- readonly gallerySlug: string;
35
- /** Stable ISO-8601 timestamp recorded on the corpus entry. */
36
- readonly recordedAt: string;
37
- }
38
- /** Repository-relative directory holding one directory per showcase project. */
39
- declare const SHOWCASE_ROOT = "examples/email-showcase/starters";
40
- declare const showcaseProjects: readonly [{
41
- readonly id: "data-sharing-review";
42
- readonly entryPath: "emails/data-sharing-review.tsx";
43
- readonly provenance: {
44
- readonly kind: "owned";
45
- };
46
- readonly category: "transactional";
47
- readonly gallerySlug: "data-sharing-review";
48
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
49
- }, {
50
- readonly id: "editorial-newsletter";
51
- readonly entryPath: "emails/editorial-newsletter.tsx";
52
- readonly provenance: {
53
- readonly kind: "owned";
54
- };
55
- readonly category: "digest";
56
- readonly gallerySlug: "editorial-newsletter";
57
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
58
- }, {
59
- readonly id: "email-verification";
60
- readonly entryPath: "emails/email-verification.tsx";
61
- readonly provenance: {
62
- readonly kind: "owned";
63
- };
64
- readonly category: "transactional";
65
- readonly gallerySlug: "email-verification";
66
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
67
- }, {
68
- readonly id: "events-roundup";
69
- readonly entryPath: "emails/events-roundup.tsx";
70
- readonly provenance: {
71
- readonly kind: "owned";
72
- };
73
- readonly category: "digest";
74
- readonly gallerySlug: "events-roundup";
75
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
76
- }, {
77
- readonly id: "feature-release-roundup";
78
- readonly entryPath: "emails/feature-release-roundup.tsx";
79
- readonly provenance: {
80
- readonly kind: "owned";
81
- };
82
- readonly category: "marketing";
83
- readonly gallerySlug: "feature-release-roundup";
84
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
85
- }, {
86
- readonly id: "feedback-request";
87
- readonly entryPath: "emails/feedback-request.tsx";
88
- readonly provenance: {
89
- readonly kind: "owned";
90
- };
91
- readonly category: "lifecycle";
92
- readonly gallerySlug: "feedback-request";
93
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
94
- }, {
95
- readonly id: "flash-getaway-offer";
96
- readonly entryPath: "emails/flash-getaway-offer.tsx";
97
- readonly provenance: {
98
- readonly kind: "owned";
99
- };
100
- readonly category: "marketing";
101
- readonly gallerySlug: "flash-getaway-offer";
102
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
103
- }, {
104
- readonly id: "industry-news-digest";
105
- readonly entryPath: "emails/industry-news-digest.tsx";
106
- readonly provenance: {
107
- readonly kind: "owned";
108
- };
109
- readonly category: "digest";
110
- readonly gallerySlug: "industry-news-digest";
111
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
112
- }, {
113
- readonly id: "rewards-milestone";
114
- readonly entryPath: "emails/rewards-milestone.tsx";
115
- readonly provenance: {
116
- readonly kind: "owned";
117
- };
118
- readonly category: "marketing";
119
- readonly gallerySlug: "rewards-milestone";
120
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
121
- }, {
122
- readonly id: "member-referral-offer";
123
- readonly entryPath: "emails/member-referral-offer.tsx";
124
- readonly provenance: {
125
- readonly kind: "owned";
126
- };
127
- readonly category: "marketing";
128
- readonly gallerySlug: "member-referral-offer";
129
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
130
- }, {
131
- readonly id: "catalog-sale-newsletter";
132
- readonly entryPath: "emails/catalog-sale-newsletter.tsx";
133
- readonly provenance: {
134
- readonly kind: "owned";
135
- };
136
- readonly category: "marketing";
137
- readonly gallerySlug: "catalog-sale-newsletter";
138
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
139
- }, {
140
- readonly id: "event-invite";
141
- readonly entryPath: "emails/event-invite.tsx";
142
- readonly provenance: {
143
- readonly kind: "owned";
144
- };
145
- readonly category: "marketing";
146
- readonly gallerySlug: "event-invite";
147
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
148
- }, {
149
- readonly id: "limited-time-savings";
150
- readonly entryPath: "emails/limited-time-savings.tsx";
151
- readonly provenance: {
152
- readonly kind: "owned";
153
- };
154
- readonly category: "marketing";
155
- readonly gallerySlug: "limited-time-savings";
156
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
157
- }, {
158
- readonly id: "membership-promo";
159
- readonly entryPath: "emails/membership-promo.tsx";
160
- readonly provenance: {
161
- readonly kind: "owned";
162
- };
163
- readonly category: "marketing";
164
- readonly gallerySlug: "membership-promotion";
165
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
166
- }, {
167
- readonly id: "announcement";
168
- readonly entryPath: "emails/announcement.tsx";
169
- readonly provenance: {
170
- readonly kind: "owned";
171
- };
172
- readonly category: "marketing";
173
- readonly gallerySlug: "feature-announcement";
174
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
175
- }, {
176
- readonly id: "linear-login-code";
177
- readonly entryPath: "emails/linear-login-code.tsx";
178
- readonly provenance: {
179
- readonly kind: "brand-recreation";
180
- readonly brand: "Linear";
181
- readonly subject: "login code";
182
- readonly reviewedNote: "Reviewed recreation of Linear's login code email, its canonical project assets, and its brand attribution.";
183
- };
184
- readonly category: "transactional";
185
- readonly gallerySlug: "linear-login-code";
186
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
187
- }, {
188
- readonly id: "membership-benefits-promo";
189
- readonly entryPath: "emails/membership-benefits-promo.tsx";
190
- readonly provenance: {
191
- readonly kind: "owned";
192
- };
193
- readonly category: "marketing";
194
- readonly gallerySlug: "membership-benefits-promo";
195
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
196
- }, {
197
- readonly id: "notification";
198
- readonly entryPath: "emails/notification.tsx";
199
- readonly provenance: {
200
- readonly kind: "owned";
201
- };
202
- readonly category: "transactional";
203
- readonly gallerySlug: "activity-notification";
204
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
205
- }, {
206
- readonly id: "onboarding-step";
207
- readonly entryPath: "emails/onboarding-step.tsx";
208
- readonly provenance: {
209
- readonly kind: "owned";
210
- };
211
- readonly category: "lifecycle";
212
- readonly gallerySlug: "onboarding-step";
213
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
214
- }, {
215
- readonly id: "order-receipt";
216
- readonly entryPath: "emails/order-receipt.tsx";
217
- readonly provenance: {
218
- readonly kind: "owned";
219
- };
220
- readonly category: "transactional";
221
- readonly gallerySlug: "order-receipt";
222
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
223
- }, {
224
- readonly id: "otp";
225
- readonly entryPath: "emails/otp.tsx";
226
- readonly provenance: {
227
- readonly kind: "owned";
228
- };
229
- readonly category: "transactional";
230
- readonly gallerySlug: "one-time-passcode";
231
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
232
- }, {
233
- readonly id: "password-reset";
234
- readonly entryPath: "emails/password-reset.tsx";
235
- readonly provenance: {
236
- readonly kind: "owned";
237
- };
238
- readonly category: "transactional";
239
- readonly gallerySlug: "password-reset";
240
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
241
- }, {
242
- readonly id: "payment-failed";
243
- readonly entryPath: "emails/payment-failed.tsx";
244
- readonly provenance: {
245
- readonly kind: "owned";
246
- };
247
- readonly category: "transactional";
248
- readonly gallerySlug: "payment-failed";
249
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
250
- }, {
251
- readonly id: "product-digest";
252
- readonly entryPath: "emails/product-digest.tsx";
253
- readonly provenance: {
254
- readonly kind: "owned";
255
- };
256
- readonly category: "digest";
257
- readonly gallerySlug: "product-digest";
258
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
259
- }, {
260
- readonly id: "product-launch-promo";
261
- readonly entryPath: "emails/product-launch-promo.tsx";
262
- readonly provenance: {
263
- readonly kind: "owned";
264
- };
265
- readonly category: "marketing";
266
- readonly gallerySlug: "product-launch-promotion";
267
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
268
- }, {
269
- readonly id: "product-newsletter";
270
- readonly entryPath: "emails/product-newsletter.tsx";
271
- readonly provenance: {
272
- readonly kind: "owned";
273
- };
274
- readonly category: "digest";
275
- readonly gallerySlug: "product-newsletter";
276
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
277
- }, {
278
- readonly id: "product-onboarding-tour";
279
- readonly entryPath: "emails/product-onboarding-tour.tsx";
280
- readonly provenance: {
281
- readonly kind: "owned";
282
- };
283
- readonly category: "lifecycle";
284
- readonly gallerySlug: "product-onboarding-tour";
285
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
286
- }, {
287
- readonly id: "product-updates-roundup";
288
- readonly entryPath: "emails/product-updates-roundup.tsx";
289
- readonly provenance: {
290
- readonly kind: "owned";
291
- };
292
- readonly category: "marketing";
293
- readonly gallerySlug: "product-updates-roundup";
294
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
295
- }, {
296
- readonly id: "season-clearance-promo";
297
- readonly entryPath: "emails/season-clearance-promo.tsx";
298
- readonly provenance: {
299
- readonly kind: "owned";
300
- };
301
- readonly category: "marketing";
302
- readonly gallerySlug: "season-clearance-promo";
303
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
304
- }, {
305
- readonly id: "seasonal-sale-flyer";
306
- readonly entryPath: "emails/seasonal-sale-flyer.tsx";
307
- readonly provenance: {
308
- readonly kind: "owned";
309
- };
310
- readonly category: "marketing";
311
- readonly gallerySlug: "seasonal-sale-flyer";
312
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
313
- }, {
314
- readonly id: "setup-checklist";
315
- readonly entryPath: "emails/setup-checklist.tsx";
316
- readonly provenance: {
317
- readonly kind: "owned";
318
- };
319
- readonly category: "lifecycle";
320
- readonly gallerySlug: "setup-checklist";
321
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
322
- }, {
323
- readonly id: "shipping-update";
324
- readonly entryPath: "emails/shipping-update.tsx";
325
- readonly provenance: {
326
- readonly kind: "owned";
327
- };
328
- readonly category: "transactional";
329
- readonly gallerySlug: "shipping-update";
330
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
331
- }, {
332
- readonly id: "team-invite";
333
- readonly entryPath: "emails/team-invite.tsx";
334
- readonly provenance: {
335
- readonly kind: "owned";
336
- };
337
- readonly category: "transactional";
338
- readonly gallerySlug: "team-invite";
339
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
340
- }, {
341
- readonly id: "travel-rewards-promo";
342
- readonly entryPath: "emails/travel-rewards-promo.tsx";
343
- readonly provenance: {
344
- readonly kind: "owned";
345
- };
346
- readonly category: "marketing";
347
- readonly gallerySlug: "travel-rewards-promo";
348
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
349
- }, {
350
- readonly id: "trial-ending";
351
- readonly entryPath: "emails/trial-ending.tsx";
352
- readonly provenance: {
353
- readonly kind: "owned";
354
- };
355
- readonly category: "lifecycle";
356
- readonly gallerySlug: "trial-ending";
357
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
358
- }, {
359
- readonly id: "vercel-invitation";
360
- readonly entryPath: "emails/vercel-invitation.tsx";
361
- readonly provenance: {
362
- readonly kind: "brand-recreation";
363
- readonly brand: "Vercel";
364
- readonly subject: "team invitation";
365
- readonly reviewedNote: "Reviewed recreation of Vercel's team invitation email, its canonical project assets, and its brand attribution.";
366
- };
367
- readonly category: "transactional";
368
- readonly gallerySlug: "vercel-team-invitation";
369
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
370
- }, {
371
- readonly id: "weekly-deals-circular";
372
- readonly entryPath: "emails/weekly-deals-circular.tsx";
373
- readonly provenance: {
374
- readonly kind: "owned";
375
- };
376
- readonly category: "marketing";
377
- readonly gallerySlug: "weekly-deals-circular";
378
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
379
- }, {
380
- readonly id: "welcome";
381
- readonly entryPath: "emails/welcome.tsx";
382
- readonly provenance: {
383
- readonly kind: "owned";
384
- };
385
- readonly category: "transactional";
386
- readonly gallerySlug: "welcome-email";
387
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
388
- }, {
389
- readonly id: "win-back";
390
- readonly entryPath: "emails/win-back.tsx";
391
- readonly provenance: {
392
- readonly kind: "owned";
393
- };
394
- readonly category: "lifecycle";
395
- readonly gallerySlug: "win-back";
396
- readonly recordedAt: "2026-09-08T00:00:00.000Z";
397
- }];
398
- type ShowcaseProjectId = (typeof showcaseProjects)[number]["id"];
399
- type BrandRecreationShowcaseId = Extract<(typeof showcaseProjects)[number], {
400
- readonly provenance: {
401
- readonly kind: "brand-recreation";
402
- };
403
- }>["id"];
404
- type OwnedShowcaseId = Extract<(typeof showcaseProjects)[number], {
405
- readonly provenance: {
406
- readonly kind: "owned";
407
- };
408
- }>["id"];
409
- declare const isShowcaseProjectId: (id: string) => id is ShowcaseProjectId;
410
- declare const showcaseProject: (id: string) => ShowcaseProject | undefined;
411
- /** Repository-relative path of a showcase project's TSX entry. */
412
- declare const showcaseSourcePath: (project: ShowcaseProject) => string;
413
- //#endregion
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 +0,0 @@
1
- //#region src/sms-segments.d.ts
2
- /** Lowercase per the CompiledSms union (document's "GSM-7"/"UCS-2" renamed). */
3
- type SmsEncoding = "gsm7" | "ucs2";
4
- interface SmsSegmentInfo {
5
- readonly encoding: SmsEncoding;
6
- readonly characterCount: number;
7
- readonly segmentCount: number;
8
- }
9
- declare const smsSegmentInfo: (text: string) => SmsSegmentInfo;
10
- declare const hasSmsOptOut: (text: string) => boolean;
11
- //#endregion
12
- export { smsSegmentInfo as i, SmsSegmentInfo as n, hasSmsOptOut as r, SmsEncoding as t };
13
- //# sourceMappingURL=sms-segments-y4FpPilJ.d.ts.map
@@ -1,67 +0,0 @@
1
- import { f as ElementNode, x as SmlNode } from "./ast-BrDtApwS.js";
2
- //#region src/source-locations.d.ts
3
- /**
4
- * The source payload emitted by the JSX development transform. The transform
5
- * may omit any field for synthetic calls; only a complete payload can identify
6
- * a source origin safely.
7
- */
8
- interface JsxSource {
9
- readonly fileName?: string | undefined;
10
- readonly lineNumber?: number | undefined;
11
- readonly columnNumber?: number | undefined;
12
- }
13
- /** A complete, normalized source origin for a JSX element. */
14
- interface JsxSourceLocation {
15
- readonly fileName: string;
16
- readonly lineNumber: number;
17
- readonly columnNumber: number;
18
- }
19
- /**
20
- * Runtime-only carrier for JSX source metadata. It is global so separately
21
- * bundled `jsx-dev-runtime` and `render-template` entries still agree on the
22
- * sidecar key, and it is a Symbol so it cannot enter SML, HTML, or JSON.
23
- */
24
- declare const JSX_SOURCE_LOCATION: unique symbol;
25
- /** Internal JSX prop used only by an editor preview source transform. */
26
- declare const JSX_SOURCE_LOCATION_PROP: "__samva_source_location";
27
- /**
28
- * A source map is useful only when it is trustworthy. Production `jsx`/`jsxs`
29
- * currently provide no source metadata, so that path reports a typed absence
30
- * rather than guessing from output order.
31
- */
32
- type SourceLocationUnavailableReason = "no-source-metadata" | "structure-mismatch" | "duplicate-source-origin" | "render-failed" | "stale-preview";
33
- type UnboundTemplateSourceLocations = {
34
- readonly kind: "available";
35
- /** Parsed SML node id → the JSX origin that produced that element. */
36
- readonly byNodeId: Readonly<Record<string, JsxSourceLocation>>;
37
- } | {
38
- readonly kind: "unavailable";
39
- readonly reason: SourceLocationUnavailableReason;
40
- };
41
- /** Revision-fenced source map exposed by a mutable workspace preview. */
42
- type TemplateSourceLocations = {
43
- readonly kind: "available";
44
- readonly revision: string;
45
- /** Parsed SML node id → the JSX origin that produced that element. */
46
- readonly byNodeId: Readonly<Record<string, JsxSourceLocation>>;
47
- } | {
48
- readonly kind: "unavailable";
49
- readonly reason: SourceLocationUnavailableReason;
50
- };
51
- /** Normalize the optional payload accepted by `jsxDEV`. */
52
- declare const completeJsxSourceLocation: (source: JsxSource | null | undefined) => JsxSourceLocation | undefined;
53
- /** Attach a source origin without changing the serialized draft shape. */
54
- declare const attachJsxSourceLocation: (node: ElementNode, source: JsxSourceLocation) => void;
55
- /** Read the ephemeral origin, if this draft element has one. */
56
- declare const jsxSourceLocationOf: (node: SmlNode) => JsxSourceLocation | undefined;
57
- /**
58
- * Pair a draft tree with its parsed SML tree by element preorder. Text nodes
59
- * are intentionally ignored: the SML parser normalizes inline whitespace, so
60
- * only the element structure is stable enough to be a source-map contract.
61
- */
62
- declare const mapJsxSourceLocations: (draft: ElementNode, parsed: ElementNode) => UnboundTemplateSourceLocations;
63
- /** Compare source-map statuses for the emission determinism guard. */
64
- declare const sameTemplateSourceLocations: (left: UnboundTemplateSourceLocations, right: UnboundTemplateSourceLocations) => boolean;
65
- //#endregion
66
- export { SourceLocationUnavailableReason as a, attachJsxSourceLocation as c, mapJsxSourceLocations as d, sameTemplateSourceLocations as f, JsxSourceLocation as i, completeJsxSourceLocation as l, JSX_SOURCE_LOCATION_PROP as n, TemplateSourceLocations as o, JsxSource as r, UnboundTemplateSourceLocations as s, JSX_SOURCE_LOCATION as t, jsxSourceLocationOf as u };
67
- //# sourceMappingURL=source-locations-DrCM82Ym.d.ts.map
@@ -1,13 +0,0 @@
1
- import { r as StarterCategory } from "../catalog-CKuOooB8.js";
2
- import { TemplateCollectionId } from "./public-gallery.js";
3
- //#region starters/category-mapping.d.ts
4
- declare const LAB_DIMENSIONS: readonly ["newsletter", "receipt", "security", "product-update", "onboarding", "promotion", "shipping", "social-notification"];
5
- type LabDimension = (typeof LAB_DIMENSIONS)[number];
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
- type LabKind = (typeof LAB_KINDS)[number];
8
- declare const labKindToStarterCategory: Record<LabKind, StarterCategory>;
9
- declare const starterCategoryToCollection: Record<StarterCategory, TemplateCollectionId>;
10
- declare const labKindToCollection: (kind: LabKind) => TemplateCollectionId;
11
- //#endregion
12
- export { LAB_DIMENSIONS, LAB_KINDS, LabDimension, LabKind, labKindToCollection, labKindToStarterCategory, starterCategoryToCollection };
13
- //# sourceMappingURL=category-mapping.d.ts.map