@samva/markup 0.7.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.
- package/AGENTS.md +104 -37
- package/README.md +188 -52
- package/dist/assets-C5duwTya.d.ts +40 -0
- package/dist/brand-B-0bN_Ir.d.ts +88 -0
- package/dist/{render-aaJBnsXK.js → cascade-t6kxlgEI.js} +130 -160
- package/dist/channel-edit.d.ts +121 -0
- package/dist/channel-edit.js +609 -0
- package/dist/channel-specs-B6M_HlaV.js +29 -0
- package/dist/channel-specs-C2feJwuP.d.ts +13 -0
- package/dist/compatibility-DbISoFIq.js +589 -0
- package/dist/compiler.d.ts +19 -249
- package/dist/compiler.js +10 -1408
- package/dist/{css-COcFOT1y.d.ts → css-BVQKICKC.d.ts} +30 -4
- package/dist/diagnostic-codes.d.ts +403 -0
- package/dist/diagnostic-codes.js +399 -0
- package/dist/{diagnostics-BMYtBCQk.d.ts → diagnostics-B-Gym34R.d.ts} +8 -4
- package/dist/diagnostics.d.ts +31 -2
- package/dist/diagnostics.js +1 -19
- package/dist/{elements-BzjjnoCS.d.ts → elements-cqldpaJt.d.ts} +3 -3
- package/dist/email/assets.d.ts +2 -0
- package/dist/email/assets.js +63 -0
- package/dist/email/brand-footer.d.ts +34 -0
- package/dist/email/brand-footer.js +63 -0
- package/dist/email/brand.d.ts +2 -0
- package/dist/email/brand.js +148 -0
- package/dist/email/components.d.ts +21 -10
- package/dist/email/components.js +46 -11
- package/dist/email/diagnostics.d.ts +2 -2
- package/dist/email/diagnostics.js +2 -1
- package/dist/email/elements.d.ts +1 -1
- package/dist/email/html.d.ts +2 -42
- package/dist/email/html.js +56 -2
- package/dist/email/jsx-dev-runtime.d.ts +2 -2
- package/dist/email/jsx-runtime.d.ts +1 -1
- package/dist/email/render.d.ts +10 -13
- package/dist/email/render.js +163 -6
- package/dist/email/text.d.ts +1 -1
- package/dist/fmt.d.ts +32 -0
- package/dist/fmt.js +174 -0
- package/dist/html-BJepOwZ4.d.ts +56 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/ir-aaqNE987.d.ts +252 -0
- package/dist/ir.d.ts +2 -0
- package/dist/ir.js +7 -0
- package/dist/preview-Ekdg1dXG.d.ts +100 -0
- package/dist/preview.d.ts +2 -0
- package/dist/preview.js +160 -0
- package/dist/profile-BH-OtdDA.js +3670 -0
- package/dist/render-ir.d.ts +19 -0
- package/dist/render-ir.js +826 -0
- package/dist/sms-segments.d.ts +13 -2
- package/dist/sms.d.ts +16 -0
- package/dist/sms.js +12 -0
- package/dist/{email/source-edit.d.ts → source-edit.d.ts} +55 -6
- package/dist/source-edit.js +343 -0
- package/dist/source-locations-C8wCsiAy.d.ts +23 -0
- package/dist/source-locations.d.ts +2 -2
- package/dist/source-locations.js +3 -89
- package/dist/static.d.ts +57 -0
- package/dist/static.js +69 -0
- package/dist/tailwind-CMYpZf1v.js +614 -0
- package/dist/template-_QE_rQND.d.ts +65 -0
- package/dist/template.d.ts +2 -2
- package/dist/template.js +15 -10
- package/dist/theme-css-hFqcPSar.js +587 -0
- package/dist/theme-css.d.ts +57 -16
- package/dist/theme-css.js +2 -509
- package/dist/theme-imports-lvBw3AD1.js +109 -0
- package/dist/transform-Ct2OMkFN.d.ts +153 -0
- package/dist/unsubscribe-link-CoesnQDU.js +26 -0
- package/dist/whatsapp.d.ts +57 -0
- package/dist/whatsapp.js +22 -0
- package/generated/contract.json +1782 -0
- package/generated/reference.md +353 -0
- package/package.json +56 -154
- package/samva-brand.d.ts +14 -0
- package/skills/sml/SKILL.md +123 -0
- package/dist/ast-BrDtApwS.d.ts +0 -107
- package/dist/ast.d.ts +0 -2
- package/dist/ast.js +0 -124
- package/dist/candidate.d.ts +0 -29
- package/dist/candidate.js +0 -88
- package/dist/catalog-60eaYC7b.d.ts +0 -356
- package/dist/checks-DBweSIPN.js +0 -58954
- package/dist/checks.d.ts +0 -33
- package/dist/checks.js +0 -2
- package/dist/classes.d.ts +0 -27
- package/dist/classes.js +0 -184
- package/dist/compile-sms.d.ts +0 -28
- package/dist/compile-sms.js +0 -44
- package/dist/compile-whatsapp.d.ts +0 -56
- package/dist/compile-whatsapp.js +0 -186
- package/dist/compile.d.ts +0 -18
- package/dist/compile.js +0 -29
- package/dist/components.d.ts +0 -289
- package/dist/components.js +0 -106
- package/dist/conditionals.d.ts +0 -10
- package/dist/conditionals.js +0 -74
- package/dist/corpus-BjYMqOoY.d.ts +0 -106
- package/dist/diagnostics-OcQKQYSY.d.ts +0 -49
- package/dist/email/selection.d.ts +0 -91
- package/dist/email/selection.js +0 -91
- package/dist/email/source-edit.js +0 -185
- package/dist/email/stylesheets.d.ts +0 -15
- package/dist/email/stylesheets.js +0 -45
- package/dist/emit.d.ts +0 -51
- package/dist/emit.js +0 -151
- package/dist/footer.d.ts +0 -66
- package/dist/footer.js +0 -93
- package/dist/interpolate.d.ts +0 -24
- package/dist/interpolate.js +0 -43
- package/dist/jsx-dev-runtime.d.ts +0 -11
- package/dist/jsx-dev-runtime.js +0 -15
- package/dist/jsx-runtime-I-1nCtl2.d.ts +0 -57
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -121
- package/dist/lexer.d.ts +0 -60
- package/dist/lexer.js +0 -281
- package/dist/model.d.ts +0 -24
- package/dist/model.js +0 -77
- package/dist/ops-2aiiYO7m.js +0 -630
- package/dist/ops.d.ts +0 -114
- package/dist/ops.js +0 -2
- package/dist/parser-t29cHLVL.d.ts +0 -396
- package/dist/parser.d.ts +0 -2
- package/dist/parser.js +0 -859
- package/dist/predicate-BI6uRRM-.js +0 -549
- package/dist/predicate-M-05Nd7R.d.ts +0 -56
- package/dist/predicate.d.ts +0 -2
- package/dist/predicate.js +0 -2
- package/dist/presets/category-mapping.d.ts +0 -13
- package/dist/presets/category-mapping.js +0 -49
- package/dist/presets/corpus.d.ts +0 -2
- package/dist/presets/corpus.js +0 -194
- package/dist/presets/public-gallery.d.ts +0 -266
- package/dist/presets/public-gallery.js +0 -916
- package/dist/presets/public-handoff.d.ts +0 -164
- package/dist/presets/public-handoff.js +0 -361
- package/dist/presets/public-preview-artifacts.d.ts +0 -43
- package/dist/presets/public-preview-artifacts.js +0 -104
- package/dist/presets/public-preview.d.ts +0 -61
- package/dist/presets/public-preview.js +0 -83
- 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/sources.js +0 -6083
- package/dist/presets.d.ts +0 -2
- package/dist/presets.js +0 -881
- package/dist/printer.d.ts +0 -6
- package/dist/printer.js +0 -122
- package/dist/registry.d.ts +0 -42
- package/dist/registry.js +0 -646
- package/dist/render-template.d.ts +0 -45
- package/dist/render-template.js +0 -76
- package/dist/showcase-DGZAWn4Z.d.ts +0 -456
- package/dist/sms-segments-y4FpPilJ.d.ts +0 -13
- package/dist/source-locations-DrCM82Ym.d.ts +0 -67
- package/dist/template-DWftqh4x.d.ts +0 -60
- 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
- package/dist/tsx-source-instrumentation.d.ts +0 -30
- package/dist/tsx-source-instrumentation.js +0 -115
- package/dist/tsx-tracer.d.ts +0 -112
- package/dist/tsx-tracer.js +0 -985
- package/dist/variables-J_L3qxRa.d.ts +0 -77
- package/dist/variables.d.ts +0 -2
- package/dist/variables.js +0 -141
- package/dist/version-BITr58kk.js +0 -96
- package/generated/sml-agent-contract.json +0 -709
- package/generated/sml-email-agent-contract.json +0 -615
- package/generated/sml-email-language-reference.md +0 -94
- package/generated/sml-language-reference.md +0 -195
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { r as EmailDiagnostic } from "./diagnostics-B-Gym34R.js";
|
|
2
|
+
import { n as EmittedPosition } from "./preview-Ekdg1dXG.js";
|
|
3
|
+
import { i as Stylesheet } from "./css-BVQKICKC.js";
|
|
4
|
+
import { n as AssetEntry } from "./assets-C5duwTya.js";
|
|
5
|
+
import { a as EmailBrand } from "./brand-B-0bN_Ir.js";
|
|
6
|
+
import { caniemail } from "caniemail";
|
|
7
|
+
//#region src/email/compatibility.d.ts
|
|
8
|
+
type CaniemailClient = Parameters<typeof caniemail>[0]["clients"][number];
|
|
9
|
+
/** One client this compiler makes claims about. */
|
|
10
|
+
interface EmailClientTarget {
|
|
11
|
+
readonly id: CaniemailClient;
|
|
12
|
+
readonly label: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The pinned matrix. Every finding is reported per client, and a client absent
|
|
16
|
+
* from this list is a client Samva makes no claim about.
|
|
17
|
+
*/
|
|
18
|
+
declare const EMAIL_CLIENT_MATRIX: readonly EmailClientTarget[];
|
|
19
|
+
interface CompatibilityProvenance {
|
|
20
|
+
/** The exact rules package a finding came from. */
|
|
21
|
+
readonly rules: string;
|
|
22
|
+
readonly apiVersion: string;
|
|
23
|
+
/** The day caniemail last changed the data this build was checked against. */
|
|
24
|
+
readonly lastUpdate: string;
|
|
25
|
+
}
|
|
26
|
+
declare const COMPATIBILITY_PROVENANCE: CompatibilityProvenance;
|
|
27
|
+
/**
|
|
28
|
+
* The constructs whose loss actually breaks a message: the recipient reads
|
|
29
|
+
* something different, in a different order, follows a link that does not work,
|
|
30
|
+
* or sees a layout that has collapsed. A target client dropping one of these
|
|
31
|
+
* blocks publication.
|
|
32
|
+
*
|
|
33
|
+
* The list is deliberately short and enumerated, because the contract is to
|
|
34
|
+
* block *known* failures. Nonessential differences require an assessment of
|
|
35
|
+
* emitted values: a concrete risk warns, expected differences and unverified
|
|
36
|
+
* behavior remain compatibility observations.
|
|
37
|
+
*/
|
|
38
|
+
declare const ESSENTIAL_CONSTRUCTS: ReadonlySet<string>;
|
|
39
|
+
interface CompatibilityInput {
|
|
40
|
+
/** The document the recipient receives. */
|
|
41
|
+
readonly html: string;
|
|
42
|
+
/** The declared fixture checked by this invocation. */
|
|
43
|
+
readonly fixture?: string | undefined;
|
|
44
|
+
/** Retained head rules, when they are not already inside the HTML. */
|
|
45
|
+
readonly css?: string | undefined;
|
|
46
|
+
/** Emitted-offset ranges with the origins of the node that produced them. */
|
|
47
|
+
readonly positions?: readonly EmittedPosition[] | undefined;
|
|
48
|
+
readonly clients?: readonly EmailClientTarget[] | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check the emitted document against the pinned matrix.
|
|
52
|
+
*
|
|
53
|
+
* Findings are grouped by construct rather than repeated per client, so one
|
|
54
|
+
* unsupported property is one diagnostic naming every client that drops it.
|
|
55
|
+
*/
|
|
56
|
+
declare const checkEmailCompatibility: (input: CompatibilityInput) => readonly EmailDiagnostic[];
|
|
57
|
+
/**
|
|
58
|
+
* Constructs the pinned data says nothing about for a target client. These are
|
|
59
|
+
* reported so "we did not check that" is never mistaken for "that works".
|
|
60
|
+
*/
|
|
61
|
+
declare const unknownCoverage: (titles: Iterable<string>) => readonly EmailDiagnostic[];
|
|
62
|
+
/** A publication carrying one of these is refused; the message would arrive broken. */
|
|
63
|
+
declare const hasBlockingCompatibility: (findings: readonly EmailDiagnostic[]) => boolean;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/email/tailwind.d.ts
|
|
66
|
+
interface TailwindOptions {
|
|
67
|
+
/**
|
|
68
|
+
* Project CSS appended to the compiled entry: `@theme` overrides, `@utility`
|
|
69
|
+
* definitions and ordinary rules. This is the project's pinned configuration.
|
|
70
|
+
*/
|
|
71
|
+
readonly css?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The project path `css` was read from (`theme.css` by default). Its
|
|
74
|
+
* relative `@import`s resolve from this file's directory.
|
|
75
|
+
*/
|
|
76
|
+
readonly cssPath?: string | undefined;
|
|
77
|
+
/** Classes the compiler cannot discover, declared by the project on purpose. */
|
|
78
|
+
readonly safelist?: readonly string[] | undefined;
|
|
79
|
+
/** Tailwind's browser reset is off by default; email clients do not want it. */
|
|
80
|
+
readonly preflight?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Bounds on what the compiler may generate. Class discovery reads authored
|
|
83
|
+
* source, so a project can hand it an unbounded candidate set and get an
|
|
84
|
+
* unbounded stylesheet back — inside a build that has a wall clock and a
|
|
85
|
+
* bundle a Worker then has to load. A host that publishes supplies these.
|
|
86
|
+
*/
|
|
87
|
+
readonly limits?: TailwindLimits | undefined;
|
|
88
|
+
}
|
|
89
|
+
interface TailwindLimits {
|
|
90
|
+
/** Distinct classes handed to the compiler. */
|
|
91
|
+
readonly candidates: number;
|
|
92
|
+
/** Bytes of generated CSS. */
|
|
93
|
+
readonly cssBytes: number;
|
|
94
|
+
}
|
|
95
|
+
interface TailwindOutput {
|
|
96
|
+
readonly css: string;
|
|
97
|
+
readonly version: string;
|
|
98
|
+
/** Every candidate handed to the compiler, sorted, for the build manifest. */
|
|
99
|
+
readonly candidates: readonly string[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* What the project theme's `@import`s resolve to, already checked by
|
|
103
|
+
* `resolveThemeImports`: project stylesheets by path, and the brand theme
|
|
104
|
+
* `samva:brand` stands for.
|
|
105
|
+
*/
|
|
106
|
+
interface TailwindImports {
|
|
107
|
+
readonly stylesheets: ReadonlyMap<string, string>;
|
|
108
|
+
readonly brandCss?: string | undefined;
|
|
109
|
+
}
|
|
110
|
+
/** Compile the discovered class set into CSS with the pinned Tailwind release. */
|
|
111
|
+
declare const compileTailwind: (candidates: Iterable<string>, options?: TailwindOptions, imports?: TailwindImports) => Promise<TailwindOutput>;
|
|
112
|
+
interface ClassDiscovery {
|
|
113
|
+
readonly candidates: readonly string[];
|
|
114
|
+
readonly diagnostics: readonly EmailDiagnostic[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Collect the class names one module states literally, and report the positions
|
|
118
|
+
* where a class is assembled from values the compiler cannot see.
|
|
119
|
+
*/
|
|
120
|
+
declare const discoverClassCandidates: (source: string, fileName: string) => ClassDiscovery;
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/email/transform.d.ts
|
|
123
|
+
/** Where this build serves assets from, and how Tailwind is configured. */
|
|
124
|
+
interface TransformOptions {
|
|
125
|
+
readonly assetBase: string;
|
|
126
|
+
/** `false` compiles no Tailwind at all. */
|
|
127
|
+
readonly tailwind?: TailwindOptions | false | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* The brand `samva:brand` resolves to, supplied by the host. A project that
|
|
130
|
+
* imports `samva:brand` with no brand here fails to compile.
|
|
131
|
+
*/
|
|
132
|
+
readonly brand?: EmailBrand | undefined;
|
|
133
|
+
}
|
|
134
|
+
interface ProjectTransform {
|
|
135
|
+
readonly assets: readonly AssetEntry[];
|
|
136
|
+
/** The compiled Tailwind sheet, when the project used any utility class. */
|
|
137
|
+
readonly tailwindSheet: Stylesheet | undefined;
|
|
138
|
+
/** Every project stylesheet, parsed, by path. */
|
|
139
|
+
readonly stylesheets: ReadonlyMap<string, Stylesheet>;
|
|
140
|
+
readonly diagnostics: readonly EmailDiagnostic[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The `samva:brand` specifier a project imports — from its theme's `@import`s
|
|
144
|
+
* or its TSX — so a host can fetch that brand before it compiles. `undefined`
|
|
145
|
+
* when the project imports no brand. A project that names two brands gets the
|
|
146
|
+
* first here and a refusal from the compile.
|
|
147
|
+
*/
|
|
148
|
+
declare const projectBrandSpecifier: (files: Readonly<Record<string, string | Uint8Array>>, themePath?: string) => string | undefined;
|
|
149
|
+
/** Read a whole project, then compile the classes its scripts used. */
|
|
150
|
+
declare const transformProject: (files: Readonly<Record<string, string | Uint8Array>>, options: TransformOptions) => Promise<ProjectTransform>;
|
|
151
|
+
//#endregion
|
|
152
|
+
export { checkEmailCompatibility as _, ClassDiscovery as a, TailwindOutput as c, COMPATIBILITY_PROVENANCE as d, CompatibilityInput as f, EmailClientTarget as g, ESSENTIAL_CONSTRUCTS as h, transformProject as i, compileTailwind as l, EMAIL_CLIENT_MATRIX as m, TransformOptions as n, TailwindLimits as o, CompatibilityProvenance as p, projectBrandSpecifier as r, TailwindOptions as s, ProjectTransform as t, discoverClassCandidates as u, hasBlockingCompatibility as v, unknownCoverage as y };
|
|
153
|
+
//# sourceMappingURL=transform-Ct2OMkFN.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/internal/unsubscribe-link.ts
|
|
2
|
+
/**
|
|
3
|
+
* Marks the one link the serializer lets carry the unsubscribe placeholder as
|
|
4
|
+
* its href. Only `BrandFooter` sets it; nothing public exports it, so no
|
|
5
|
+
* author-written link can claim the exemption.
|
|
6
|
+
*/
|
|
7
|
+
const UNSUBSCRIBE_LINK = Symbol("samva.unsubscribe-link");
|
|
8
|
+
/**
|
|
9
|
+
* The per-recipient unsubscribe URL is not known at render: the send path
|
|
10
|
+
* substitutes each delivery's link for this placeholder, or removes the
|
|
11
|
+
* unsubscribe row when the send resolved no unsubscribe group.
|
|
12
|
+
*/
|
|
13
|
+
const UNSUBSCRIBE_URL_PLACEHOLDER = "%samva:unsubscribe-url%";
|
|
14
|
+
/**
|
|
15
|
+
* Marks the elements `BrandFooter` writes the send path's footer markers on.
|
|
16
|
+
* The serializer emits `data-samva-footer` and `data-samva-unsubscribe` only
|
|
17
|
+
* for an element carrying it, so an author cannot claim a footer the send
|
|
18
|
+
* path would then not append.
|
|
19
|
+
*/
|
|
20
|
+
const BRAND_FOOTER_MARKER = Symbol("samva.brand-footer-marker");
|
|
21
|
+
/** The attributes only `BrandFooter` writes. */
|
|
22
|
+
const RESERVED_FOOTER_ATTRIBUTES = /* @__PURE__ */ new Set(["data-samva-footer", "data-samva-unsubscribe"]);
|
|
23
|
+
//#endregion
|
|
24
|
+
export { UNSUBSCRIBE_URL_PLACEHOLDER as i, RESERVED_FOOTER_ATTRIBUTES as n, UNSUBSCRIBE_LINK as r, BRAND_FOOTER_MARKER as t };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=unsubscribe-link-CoesnQDU.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { n as WhatsAppCategory, r as WhatsAppHeaderType } from "./channel-specs-C2feJwuP.js";
|
|
2
|
+
import { f as EmailChild, m as EmailNode } from "./elements-cqldpaJt.js";
|
|
3
|
+
//#region src/whatsapp.d.ts
|
|
4
|
+
interface WhatsAppProps {
|
|
5
|
+
readonly name?: string | undefined;
|
|
6
|
+
/** The Meta language code, for example `en_US`. */
|
|
7
|
+
readonly language: string;
|
|
8
|
+
readonly category: WhatsAppCategory;
|
|
9
|
+
readonly children?: EmailChild;
|
|
10
|
+
}
|
|
11
|
+
interface WhatsAppHeaderProps {
|
|
12
|
+
/** `text` by default; for `image`, `video` and `document` the child is the media URL. */
|
|
13
|
+
readonly type?: WhatsAppHeaderType | undefined;
|
|
14
|
+
readonly children?: EmailChild;
|
|
15
|
+
}
|
|
16
|
+
interface WhatsAppTextProps {
|
|
17
|
+
readonly children?: EmailChild;
|
|
18
|
+
}
|
|
19
|
+
interface WhatsAppButtonsProps {
|
|
20
|
+
readonly children?: EmailChild;
|
|
21
|
+
}
|
|
22
|
+
interface WhatsAppUrlButtonProps {
|
|
23
|
+
readonly url: string;
|
|
24
|
+
/** The button label. */
|
|
25
|
+
readonly children?: EmailChild;
|
|
26
|
+
}
|
|
27
|
+
interface WhatsAppPhoneButtonProps {
|
|
28
|
+
readonly phone: string;
|
|
29
|
+
/** The button label. */
|
|
30
|
+
readonly children?: EmailChild;
|
|
31
|
+
}
|
|
32
|
+
interface WhatsAppQuickReplyButtonProps {
|
|
33
|
+
/** The button label. */
|
|
34
|
+
readonly children?: EmailChild;
|
|
35
|
+
}
|
|
36
|
+
interface WhatsAppCopyCodeButtonProps {
|
|
37
|
+
/** The code the button copies. */
|
|
38
|
+
readonly children?: EmailChild;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The root of a WhatsApp body. Meta's template anatomy is the vocabulary: `WhatsApp.Header`,
|
|
42
|
+
* `WhatsApp.Body`, `WhatsApp.Footer` and `WhatsApp.Buttons`, whose children are the four button
|
|
43
|
+
* kinds.
|
|
44
|
+
*/
|
|
45
|
+
declare const WhatsApp: ((props: WhatsAppProps) => EmailNode) & {
|
|
46
|
+
Header: (props: WhatsAppHeaderProps) => EmailNode;
|
|
47
|
+
Body: (props: WhatsAppTextProps) => EmailNode;
|
|
48
|
+
Footer: (props: WhatsAppTextProps) => EmailNode;
|
|
49
|
+
Buttons: (props: WhatsAppButtonsProps) => EmailNode;
|
|
50
|
+
UrlButton: (props: WhatsAppUrlButtonProps) => EmailNode;
|
|
51
|
+
QuickReplyButton: (props: WhatsAppQuickReplyButtonProps) => EmailNode;
|
|
52
|
+
PhoneButton: (props: WhatsAppPhoneButtonProps) => EmailNode;
|
|
53
|
+
CopyCodeButton: (props: WhatsAppCopyCodeButtonProps) => EmailNode;
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { WhatsApp, WhatsAppButtonsProps, type WhatsAppCategory, WhatsAppCopyCodeButtonProps, WhatsAppHeaderProps, type WhatsAppHeaderType, WhatsAppPhoneButtonProps, WhatsAppProps, WhatsAppQuickReplyButtonProps, WhatsAppTextProps, WhatsAppUrlButtonProps };
|
|
57
|
+
//# sourceMappingURL=whatsapp.d.ts.map
|
package/dist/whatsapp.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Fragment, jsx } from "./email/jsx-runtime.js";
|
|
2
|
+
//#region src/whatsapp.ts
|
|
3
|
+
const fragment = (children) => jsx(Fragment, { children });
|
|
4
|
+
/**
|
|
5
|
+
* The root of a WhatsApp body. Meta's template anatomy is the vocabulary: `WhatsApp.Header`,
|
|
6
|
+
* `WhatsApp.Body`, `WhatsApp.Footer` and `WhatsApp.Buttons`, whose children are the four button
|
|
7
|
+
* kinds.
|
|
8
|
+
*/
|
|
9
|
+
const WhatsApp = Object.assign((props) => fragment(props.children), {
|
|
10
|
+
Header: (props) => fragment(props.children),
|
|
11
|
+
Body: (props) => fragment(props.children),
|
|
12
|
+
Footer: (props) => fragment(props.children),
|
|
13
|
+
Buttons: (props) => fragment(props.children),
|
|
14
|
+
UrlButton: (props) => fragment(props.children),
|
|
15
|
+
QuickReplyButton: (props) => fragment(props.children),
|
|
16
|
+
PhoneButton: (props) => fragment(props.children),
|
|
17
|
+
CopyCodeButton: (props) => fragment(props.children)
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { WhatsApp };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=whatsapp.js.map
|