@samva/markup 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +17 -0
- package/dist/{ast-63I-VLQx.d.ts → ast-BLybiDxp.d.ts} +34 -60
- package/dist/ast.d.ts +2 -2
- package/dist/ast.js +4 -52
- package/dist/catalog-Db0UcCTg.d.ts +356 -0
- package/dist/{checks-DXuERO4B.js → checks-CmmITP6j.js} +14 -14
- package/dist/checks.d.ts +1 -1
- package/dist/checks.js +1 -1
- package/dist/classes.d.ts +1 -1
- package/dist/compile-sms.d.ts +3 -3
- package/dist/compile-whatsapp.d.ts +5 -5
- package/dist/compile-whatsapp.js +3 -3
- package/dist/compile.d.ts +5 -5
- package/dist/compile.js +5 -5
- package/dist/compiler.d.ts +4 -4
- package/dist/compiler.js +6 -6
- package/dist/components.d.ts +4 -4
- package/dist/conditionals.js +3 -3
- package/dist/corpus-CM7rKX41.d.ts +106 -0
- package/dist/{css-ar2lU3NC.d.ts → css-DoNc7CiC.d.ts} +4 -5
- package/dist/diagnostics-CqepLcpI.d.ts +47 -0
- package/dist/diagnostics-eFM9A_TU.d.ts +46 -0
- package/dist/diagnostics.d.ts +2 -2
- package/dist/diagnostics.js +15 -29
- package/dist/{elements-DtwKlFVH.d.ts → elements-ChJULZlh.d.ts} +40 -161
- package/dist/email/components.d.ts +1 -1
- package/dist/email/diagnostics.d.ts +1 -1
- package/dist/email/diagnostics.js +8 -43
- package/dist/email/elements.d.ts +1 -1
- package/dist/email/html.d.ts +2 -2
- package/dist/email/html.js +9 -9
- package/dist/email/jsx-dev-runtime.d.ts +3 -21
- package/dist/email/jsx-runtime.d.ts +1 -1
- package/dist/email/jsx-runtime.js +29 -3
- package/dist/email/render.d.ts +4 -4
- package/dist/email/render.js +1 -1
- package/dist/email/selection.d.ts +20 -31
- package/dist/email/selection.js +1 -53
- package/dist/email/source-edit.d.ts +1 -1
- package/dist/email/source-edit.js +2 -2
- package/dist/email/stylesheets.d.ts +1 -1
- package/dist/email/text.d.ts +1 -1
- package/dist/email/text.js +3 -3
- package/dist/emit.d.ts +2 -2
- package/dist/emit.js +5 -5
- package/dist/guards-eV1qLbf2.js +9 -0
- package/dist/{input-schema-BIfzI63B.d.ts → input-schema-7dPFVvNE.d.ts} +2 -2
- package/dist/input-schema-zjkgrXn2.js +455 -0
- package/dist/input-schema.d.ts +1 -1
- package/dist/input-schema.js +1 -169
- package/dist/interpolate.d.ts +9 -12
- package/dist/interpolate.js +1 -19
- package/dist/jsx-dev-runtime.d.ts +2 -2
- package/dist/{jsx-runtime-C5k_Zq0A.d.ts → jsx-runtime-BI4gI19E.d.ts} +3 -3
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +3 -3
- package/dist/model.d.ts +18 -33
- package/dist/model.js +4 -17
- package/dist/ops.d.ts +78 -172
- package/dist/ops.js +51 -117
- package/dist/{parser-CGBS73Gz.d.ts → parser-b_Kp5MT6.d.ts} +5 -5
- package/dist/parser.d.ts +1 -1
- package/dist/parser.js +8 -8
- package/dist/{predicate-G2SeSvoN.d.ts → predicate-Bmvgw7Ao.d.ts} +4 -4
- package/dist/{predicate-CvkzT-a2.js → predicate-DwXzmqIY.js} +11 -11
- package/dist/predicate.d.ts +1 -1
- package/dist/predicate.js +1 -1
- package/dist/presets/category-mapping.d.ts +1 -1
- package/dist/presets/corpus.d.ts +1 -1
- package/dist/presets/corpus.js +87 -140
- package/dist/presets/public-gallery.d.ts +106 -130
- package/dist/presets/public-gallery.js +131 -209
- package/dist/presets/public-handoff.d.ts +4 -4
- package/dist/presets/public-handoff.js +13 -11
- package/dist/presets/public-preview-artifacts.d.ts +5 -5
- package/dist/presets/public-preview-artifacts.js +9 -9
- package/dist/presets/public-preview.d.ts +0 -4
- package/dist/presets/public-preview.js +37 -362
- package/dist/presets/showcase.d.ts +2 -0
- package/dist/presets/showcase.js +627 -0
- package/dist/presets/sources.d.ts +1 -1
- package/dist/presets/sources.js +5767 -2023
- package/dist/presets.d.ts +2 -384
- package/dist/presets.js +299 -765
- package/dist/printer.d.ts +1 -1
- package/dist/{render-ykQhtMs_.js → render-T6IFPnP4.js} +12 -12
- package/dist/render-template.d.ts +7 -7
- package/dist/render-template.js +6 -6
- package/dist/showcase-dvJMn-Lo.d.ts +456 -0
- package/dist/{source-locations-BCJQnIfU.d.ts → source-locations-D6Te6Gy1.d.ts} +4 -26
- package/dist/source-locations.d.ts +2 -2
- package/dist/source-locations.js +3 -26
- package/dist/{template-Dy5yOPyp.d.ts → template-G-QPcfmn.d.ts} +4 -4
- package/dist/template.d.ts +1 -1
- package/dist/template.js +3 -3
- package/dist/theme-css.d.ts +3 -3
- package/dist/theme-css.js +3 -3
- package/dist/tsx-source-instrumentation.d.ts +1 -3
- package/dist/tsx-source-instrumentation.js +6 -6
- package/dist/tsx-tracer.d.ts +7 -11
- package/dist/tsx-tracer.js +164 -164
- package/dist/{variables-if1VrV34.d.ts → variables-BnKs1iqb.d.ts} +2 -2
- package/dist/variables.d.ts +1 -1
- package/dist/variables.js +4 -4
- package/package.json +8 -3
- package/dist/corpus-qrUD5O6r.d.ts +0 -254
- package/dist/diagnostics-Djd9ckLg.d.ts +0 -90
- package/dist/diagnostics-oveE-laV.d.ts +0 -79
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as PredicateAst } from "./predicate-
|
|
1
|
+
import { r as PredicateAst } from "./predicate-Bmvgw7Ao.js";
|
|
2
2
|
//#region src/variables.d.ts
|
|
3
3
|
/** Brand carried by every VariableRef, keyed off a private symbol. */
|
|
4
4
|
declare const VARIABLE_REF: unique symbol;
|
|
@@ -74,4 +74,4 @@ declare const createVariablesProxy: <T extends Record<string, unknown>>() => {
|
|
|
74
74
|
};
|
|
75
75
|
//#endregion
|
|
76
76
|
export { VariableKind as a, VariableRefBrand as c, isPredicateRef as d, isVariableRef as f, VARIABLE_REF as i, Variables as l, PREDICATE_REF as n, VariableRecorder as o, printPredicateRef as p, PredicateRef as r, VariableRef as s, CollectedVariable as t, createVariablesProxy as u };
|
|
77
|
-
//# sourceMappingURL=variables-
|
|
77
|
+
//# sourceMappingURL=variables-BnKs1iqb.d.ts.map
|
package/dist/variables.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VariableKind, c as VariableRefBrand, d as isPredicateRef, f as isVariableRef, i as VARIABLE_REF, l as Variables, n as PREDICATE_REF, o as VariableRecorder, p as printPredicateRef, r as PredicateRef, s as VariableRef, t as CollectedVariable, u as createVariablesProxy } from "./variables-
|
|
1
|
+
import { a as VariableKind, c as VariableRefBrand, d as isPredicateRef, f as isVariableRef, i as VARIABLE_REF, l as Variables, n as PREDICATE_REF, o as VariableRecorder, p as printPredicateRef, r as PredicateRef, s as VariableRef, t as CollectedVariable, u as createVariablesProxy } from "./variables-BnKs1iqb.js";
|
|
2
2
|
export { CollectedVariable, PREDICATE_REF, PredicateRef, VARIABLE_REF, VariableKind, VariableRecorder, VariableRef, VariableRefBrand, Variables, createVariablesProxy, isPredicateRef, isVariableRef, printPredicateRef };
|
package/dist/variables.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as hasProperty } from "./guards-eV1qLbf2.js";
|
|
2
|
+
import { a as printPredicate } from "./predicate-DwXzmqIY.js";
|
|
3
3
|
//#region src/variables.ts
|
|
4
4
|
const PLACEHOLDER_SPAN = {
|
|
5
5
|
start: 0,
|
|
@@ -10,8 +10,8 @@ const VARIABLE_REF = Symbol.for("@samva/markup/VariableRef");
|
|
|
10
10
|
/** Brand carried by every PredicateRef. */
|
|
11
11
|
const PREDICATE_REF = Symbol.for("@samva/markup/PredicateRef");
|
|
12
12
|
const COERCION_MESSAGE = "variables are send-time values; branch on build-time data instead";
|
|
13
|
-
const isVariableRef = (value) =>
|
|
14
|
-
const isPredicateRef = (value) =>
|
|
13
|
+
const isVariableRef = (value) => hasProperty(value, VARIABLE_REF);
|
|
14
|
+
const isPredicateRef = (value) => hasProperty(value, PREDICATE_REF);
|
|
15
15
|
const literalFor = (value) => typeof value === "number" ? {
|
|
16
16
|
kind: "number",
|
|
17
17
|
value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/markup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Type-safe authoring and compilation primitives for Samva templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -152,6 +152,10 @@
|
|
|
152
152
|
"types": "./dist/presets/public-preview-artifacts.d.ts",
|
|
153
153
|
"import": "./dist/presets/public-preview-artifacts.js"
|
|
154
154
|
},
|
|
155
|
+
"./presets/showcase": {
|
|
156
|
+
"types": "./dist/presets/showcase.d.ts",
|
|
157
|
+
"import": "./dist/presets/showcase.js"
|
|
158
|
+
},
|
|
155
159
|
"./presets/sources": {
|
|
156
160
|
"types": "./dist/presets/sources.d.ts",
|
|
157
161
|
"import": "./dist/presets/sources.js"
|
|
@@ -269,8 +273,8 @@
|
|
|
269
273
|
},
|
|
270
274
|
"dependencies": {
|
|
271
275
|
"@cfworker/json-schema": "4.1.1",
|
|
272
|
-
"
|
|
273
|
-
"
|
|
276
|
+
"@standard-schema/spec": "1.1.0",
|
|
277
|
+
"better-result": "3.0.1"
|
|
274
278
|
},
|
|
275
279
|
"devDependencies": {
|
|
276
280
|
"@babel/parser": "^8.0.4",
|
|
@@ -279,6 +283,7 @@
|
|
|
279
283
|
"@types/css-tree": "3.2.0",
|
|
280
284
|
"caniemail": "2.0.2",
|
|
281
285
|
"css-tree": "3.2.1",
|
|
286
|
+
"effect": "4.0.0-rc.112",
|
|
282
287
|
"tailwindcss": "^4.3.3",
|
|
283
288
|
"tsdown": "^0.22.13",
|
|
284
289
|
"typescript": "^7.0.2",
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { Result, Schema } from "effect";
|
|
2
|
-
//#region presets/corpus.d.ts
|
|
3
|
-
declare const TemplateCorpusKind: Schema.Literals<readonly ["owned-editable-sml", "brand-recreation-sml", "inspiration-reference"]>;
|
|
4
|
-
type TemplateCorpusKind = typeof TemplateCorpusKind.Type;
|
|
5
|
-
declare const templateFacetOptions: {
|
|
6
|
-
readonly jobType: readonly ["account-access", "commerce", "product-communication", "lifecycle", "publishing-campaigns"];
|
|
7
|
-
readonly lifecycle: readonly ["acquisition", "activation", "engagement", "transaction", "retention", "recovery"];
|
|
8
|
-
readonly industry: readonly ["saas", "ecommerce", "developer-tools", "newsletters-media"];
|
|
9
|
-
readonly season: readonly ["evergreen", "seasonal"];
|
|
10
|
-
readonly audience: readonly ["product-users", "customers", "members", "readers", "shoppers", "teams"];
|
|
11
|
-
readonly design: readonly ["minimal", "branded", "editorial", "data-heavy", "single-cta"];
|
|
12
|
-
readonly brandProvenance: readonly ["samva-original", "third-party-reference"];
|
|
13
|
-
};
|
|
14
|
-
declare const TemplateFacetSet: Schema.Struct<{
|
|
15
|
-
readonly jobType: Schema.$Array<Schema.Literals<readonly ["account-access", "commerce", "product-communication", "lifecycle", "publishing-campaigns"]>>;
|
|
16
|
-
readonly lifecycle: Schema.$Array<Schema.Literals<readonly ["acquisition", "activation", "engagement", "transaction", "retention", "recovery"]>>;
|
|
17
|
-
readonly industry: Schema.$Array<Schema.Literals<readonly ["saas", "ecommerce", "developer-tools", "newsletters-media"]>>;
|
|
18
|
-
readonly season: Schema.$Array<Schema.Literals<readonly ["evergreen", "seasonal"]>>;
|
|
19
|
-
readonly audience: Schema.$Array<Schema.Literals<readonly ["product-users", "customers", "members", "readers", "shoppers", "teams"]>>;
|
|
20
|
-
readonly design: Schema.$Array<Schema.Literals<readonly ["minimal", "branded", "editorial", "data-heavy", "single-cta"]>>;
|
|
21
|
-
readonly brandProvenance: Schema.$Array<Schema.Literals<readonly ["samva-original", "third-party-reference"]>>;
|
|
22
|
-
}>;
|
|
23
|
-
interface TemplateFacetSet extends Schema.Schema.Type<typeof TemplateFacetSet> {}
|
|
24
|
-
declare const OwnedEditablePreset: Schema.TaggedStruct<"OwnedEditablePreset", {
|
|
25
|
-
readonly corpusKind: Schema.Literal<"owned-editable-sml">;
|
|
26
|
-
readonly provenance: Schema.Struct<{
|
|
27
|
-
readonly owner: Schema.Literal<"Samva">;
|
|
28
|
-
readonly sourcePath: Schema.String;
|
|
29
|
-
readonly recordedAt: Schema.String;
|
|
30
|
-
}>;
|
|
31
|
-
readonly review: Schema.Struct<{
|
|
32
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
33
|
-
readonly reviewedBy: Schema.String;
|
|
34
|
-
readonly reviewedAt: Schema.String;
|
|
35
|
-
readonly notes: Schema.String;
|
|
36
|
-
}>;
|
|
37
|
-
readonly display: Schema.Struct<{
|
|
38
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
39
|
-
readonly attributionLabel: Schema.String;
|
|
40
|
-
}>;
|
|
41
|
-
readonly retention: Schema.Struct<{
|
|
42
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
43
|
-
readonly reviewedAt: Schema.String;
|
|
44
|
-
}>;
|
|
45
|
-
readonly takedown: Schema.Struct<{
|
|
46
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
47
|
-
readonly contact: Schema.String;
|
|
48
|
-
readonly procedureUrl: Schema.String;
|
|
49
|
-
}>;
|
|
50
|
-
}>;
|
|
51
|
-
interface OwnedEditablePreset extends Schema.Schema.Type<typeof OwnedEditablePreset> {}
|
|
52
|
-
declare const BrandRecreationPreset: Schema.TaggedStruct<"BrandRecreationPreset", {
|
|
53
|
-
readonly corpusKind: Schema.Literal<"brand-recreation-sml">;
|
|
54
|
-
readonly provenance: Schema.Struct<{
|
|
55
|
-
readonly owner: Schema.Literal<"Samva">;
|
|
56
|
-
readonly sourcePath: Schema.String;
|
|
57
|
-
readonly recordedAt: Schema.String;
|
|
58
|
-
/** The brand whose own email is recreated, named on every public surface. */
|
|
59
|
-
readonly brand: Schema.String;
|
|
60
|
-
/** What that brand's email does, in the customer's words. */
|
|
61
|
-
readonly subject: Schema.String;
|
|
62
|
-
readonly reviewedNote: Schema.String;
|
|
63
|
-
}>;
|
|
64
|
-
readonly review: Schema.Struct<{
|
|
65
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
66
|
-
readonly reviewedBy: Schema.String;
|
|
67
|
-
readonly reviewedAt: Schema.String;
|
|
68
|
-
readonly notes: Schema.String;
|
|
69
|
-
}>;
|
|
70
|
-
readonly display: Schema.Struct<{
|
|
71
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
72
|
-
readonly attributionLabel: Schema.String;
|
|
73
|
-
}>;
|
|
74
|
-
readonly retention: Schema.Struct<{
|
|
75
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
76
|
-
readonly reviewedAt: Schema.String;
|
|
77
|
-
}>;
|
|
78
|
-
readonly takedown: Schema.Struct<{
|
|
79
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
80
|
-
readonly contact: Schema.String;
|
|
81
|
-
readonly procedureUrl: Schema.String;
|
|
82
|
-
}>;
|
|
83
|
-
}>;
|
|
84
|
-
interface BrandRecreationPreset extends Schema.Schema.Type<typeof BrandRecreationPreset> {}
|
|
85
|
-
/** Clean-room recreations of a named brand's own email, authored as editable Samva projects. */
|
|
86
|
-
declare const brandRecreationProvenance: {
|
|
87
|
-
readonly "linear-login-code": {
|
|
88
|
-
readonly owner: "Samva";
|
|
89
|
-
readonly sourcePath: "examples/email-showcase/emails/linear-login-code.tsx";
|
|
90
|
-
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
91
|
-
readonly brand: "Linear";
|
|
92
|
-
readonly subject: "login code";
|
|
93
|
-
readonly reviewedNote: "Reviewed recreation of Linear's login code email, its canonical project assets, and its brand attribution.";
|
|
94
|
-
};
|
|
95
|
-
readonly "vercel-invitation": {
|
|
96
|
-
readonly owner: "Samva";
|
|
97
|
-
readonly sourcePath: "examples/email-showcase/emails/vercel-invitation.tsx";
|
|
98
|
-
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
99
|
-
readonly brand: "Vercel";
|
|
100
|
-
readonly subject: "team invitation";
|
|
101
|
-
readonly reviewedNote: "Reviewed recreation of Vercel's team invitation email, its canonical project assets, and its brand attribution.";
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Owned presets authored as complete showcase projects with their own stylesheet and assets.
|
|
106
|
-
* Every other owned preset is the single module `packages/markup/presets/<id>.tsx`.
|
|
107
|
-
*/
|
|
108
|
-
declare const ownedShowcasePresetSources: {
|
|
109
|
-
readonly "order-receipt": "examples/email-showcase/emails/order-receipt.tsx";
|
|
110
|
-
readonly "product-launch-promo": "examples/email-showcase/emails/product-launch-promo.tsx";
|
|
111
|
-
readonly "product-newsletter": "examples/email-showcase/emails/product-newsletter.tsx";
|
|
112
|
-
};
|
|
113
|
-
declare const ownedPresetSourcePath: (id: string) => string;
|
|
114
|
-
declare const InspirationReference: Schema.TaggedStruct<"InspirationReference", {
|
|
115
|
-
readonly corpusKind: Schema.Literal<"inspiration-reference">;
|
|
116
|
-
readonly provenance: Schema.Struct<{
|
|
117
|
-
readonly publisher: Schema.String;
|
|
118
|
-
readonly sourceUrl: Schema.String;
|
|
119
|
-
readonly capturedAt: Schema.String;
|
|
120
|
-
readonly rightsBasis: Schema.Literals<readonly ["display-link-and-commentary", "permission"]>;
|
|
121
|
-
}>;
|
|
122
|
-
readonly review: Schema.Struct<{
|
|
123
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
124
|
-
readonly reviewedBy: Schema.String;
|
|
125
|
-
readonly reviewedAt: Schema.String;
|
|
126
|
-
readonly notes: Schema.String;
|
|
127
|
-
}>;
|
|
128
|
-
readonly display: Schema.Struct<{
|
|
129
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
130
|
-
readonly attributionLabel: Schema.String;
|
|
131
|
-
}>;
|
|
132
|
-
readonly retention: Schema.Struct<{
|
|
133
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
134
|
-
readonly reviewedAt: Schema.String;
|
|
135
|
-
}>;
|
|
136
|
-
readonly takedown: Schema.Struct<{
|
|
137
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
138
|
-
readonly contact: Schema.String;
|
|
139
|
-
readonly procedureUrl: Schema.String;
|
|
140
|
-
}>;
|
|
141
|
-
}>;
|
|
142
|
-
interface InspirationReference extends Schema.Schema.Type<typeof InspirationReference> {}
|
|
143
|
-
declare const TemplateCorpusRecord: Schema.Union<readonly [Schema.TaggedStruct<"OwnedEditablePreset", {
|
|
144
|
-
readonly corpusKind: Schema.Literal<"owned-editable-sml">;
|
|
145
|
-
readonly provenance: Schema.Struct<{
|
|
146
|
-
readonly owner: Schema.Literal<"Samva">;
|
|
147
|
-
readonly sourcePath: Schema.String;
|
|
148
|
-
readonly recordedAt: Schema.String;
|
|
149
|
-
}>;
|
|
150
|
-
readonly review: Schema.Struct<{
|
|
151
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
152
|
-
readonly reviewedBy: Schema.String;
|
|
153
|
-
readonly reviewedAt: Schema.String;
|
|
154
|
-
readonly notes: Schema.String;
|
|
155
|
-
}>;
|
|
156
|
-
readonly display: Schema.Struct<{
|
|
157
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
158
|
-
readonly attributionLabel: Schema.String;
|
|
159
|
-
}>;
|
|
160
|
-
readonly retention: Schema.Struct<{
|
|
161
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
162
|
-
readonly reviewedAt: Schema.String;
|
|
163
|
-
}>;
|
|
164
|
-
readonly takedown: Schema.Struct<{
|
|
165
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
166
|
-
readonly contact: Schema.String;
|
|
167
|
-
readonly procedureUrl: Schema.String;
|
|
168
|
-
}>;
|
|
169
|
-
}>, Schema.TaggedStruct<"BrandRecreationPreset", {
|
|
170
|
-
readonly corpusKind: Schema.Literal<"brand-recreation-sml">;
|
|
171
|
-
readonly provenance: Schema.Struct<{
|
|
172
|
-
readonly owner: Schema.Literal<"Samva">;
|
|
173
|
-
readonly sourcePath: Schema.String;
|
|
174
|
-
readonly recordedAt: Schema.String;
|
|
175
|
-
/** The brand whose own email is recreated, named on every public surface. */
|
|
176
|
-
readonly brand: Schema.String;
|
|
177
|
-
/** What that brand's email does, in the customer's words. */
|
|
178
|
-
readonly subject: Schema.String;
|
|
179
|
-
readonly reviewedNote: Schema.String;
|
|
180
|
-
}>;
|
|
181
|
-
readonly review: Schema.Struct<{
|
|
182
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
183
|
-
readonly reviewedBy: Schema.String;
|
|
184
|
-
readonly reviewedAt: Schema.String;
|
|
185
|
-
readonly notes: Schema.String;
|
|
186
|
-
}>;
|
|
187
|
-
readonly display: Schema.Struct<{
|
|
188
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
189
|
-
readonly attributionLabel: Schema.String;
|
|
190
|
-
}>;
|
|
191
|
-
readonly retention: Schema.Struct<{
|
|
192
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
193
|
-
readonly reviewedAt: Schema.String;
|
|
194
|
-
}>;
|
|
195
|
-
readonly takedown: Schema.Struct<{
|
|
196
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
197
|
-
readonly contact: Schema.String;
|
|
198
|
-
readonly procedureUrl: Schema.String;
|
|
199
|
-
}>;
|
|
200
|
-
}>, Schema.TaggedStruct<"InspirationReference", {
|
|
201
|
-
readonly corpusKind: Schema.Literal<"inspiration-reference">;
|
|
202
|
-
readonly provenance: Schema.Struct<{
|
|
203
|
-
readonly publisher: Schema.String;
|
|
204
|
-
readonly sourceUrl: Schema.String;
|
|
205
|
-
readonly capturedAt: Schema.String;
|
|
206
|
-
readonly rightsBasis: Schema.Literals<readonly ["display-link-and-commentary", "permission"]>;
|
|
207
|
-
}>;
|
|
208
|
-
readonly review: Schema.Struct<{
|
|
209
|
-
readonly state: Schema.Literals<readonly ["draft", "approved", "rejected"]>;
|
|
210
|
-
readonly reviewedBy: Schema.String;
|
|
211
|
-
readonly reviewedAt: Schema.String;
|
|
212
|
-
readonly notes: Schema.String;
|
|
213
|
-
}>;
|
|
214
|
-
readonly display: Schema.Struct<{
|
|
215
|
-
readonly state: Schema.Literals<readonly ["hidden", "public"]>;
|
|
216
|
-
readonly attributionLabel: Schema.String;
|
|
217
|
-
}>;
|
|
218
|
-
readonly retention: Schema.Struct<{
|
|
219
|
-
readonly policy: Schema.Literals<readonly ["retain-until-withdrawn", "retain-while-linked"]>;
|
|
220
|
-
readonly reviewedAt: Schema.String;
|
|
221
|
-
}>;
|
|
222
|
-
readonly takedown: Schema.Struct<{
|
|
223
|
-
readonly state: Schema.Literals<readonly ["active", "removed"]>;
|
|
224
|
-
readonly contact: Schema.String;
|
|
225
|
-
readonly procedureUrl: Schema.String;
|
|
226
|
-
}>;
|
|
227
|
-
}>]>;
|
|
228
|
-
type TemplateCorpusRecord = typeof TemplateCorpusRecord.Type;
|
|
229
|
-
interface PublicCorpusRegistration {
|
|
230
|
-
readonly id: string;
|
|
231
|
-
readonly corpus: TemplateCorpusRecord;
|
|
232
|
-
readonly facets: TemplateFacetSet;
|
|
233
|
-
}
|
|
234
|
-
interface PublicCorpusRegistrationIssue {
|
|
235
|
-
readonly id: string;
|
|
236
|
-
readonly message: string;
|
|
237
|
-
}
|
|
238
|
-
/** Decode and gate a record before it can enter any public projection. */
|
|
239
|
-
declare const registerPublicCorpusEntry: (input: unknown) => Result.Result<PublicCorpusRegistration, PublicCorpusRegistrationIssue>;
|
|
240
|
-
declare const TemplateFacetQuery: Schema.Struct<{
|
|
241
|
-
readonly jobType: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["account-access", "commerce", "product-communication", "lifecycle", "publishing-campaigns"]>>>;
|
|
242
|
-
readonly lifecycle: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["acquisition", "activation", "engagement", "transaction", "retention", "recovery"]>>>;
|
|
243
|
-
readonly industry: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["saas", "ecommerce", "developer-tools", "newsletters-media"]>>>;
|
|
244
|
-
readonly season: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["evergreen", "seasonal"]>>>;
|
|
245
|
-
readonly audience: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["product-users", "customers", "members", "readers", "shoppers", "teams"]>>>;
|
|
246
|
-
readonly design: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["minimal", "branded", "editorial", "data-heavy", "single-cta"]>>>;
|
|
247
|
-
readonly brandProvenance: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["samva-original", "third-party-reference"]>>>;
|
|
248
|
-
}>;
|
|
249
|
-
interface TemplateFacetQuery extends Schema.Schema.Type<typeof TemplateFacetQuery> {}
|
|
250
|
-
/** Strict intersection: every selected value in every selected dimension must match. */
|
|
251
|
-
declare const matchesTemplateFacets: (facets: TemplateFacetSet, query: TemplateFacetQuery) => boolean;
|
|
252
|
-
//#endregion
|
|
253
|
-
export { PublicCorpusRegistrationIssue as a, TemplateFacetQuery as c, matchesTemplateFacets as d, ownedPresetSourcePath as f, templateFacetOptions as h, PublicCorpusRegistration as i, TemplateFacetSet as l, registerPublicCorpusEntry as m, InspirationReference as n, TemplateCorpusKind as o, ownedShowcasePresetSources as p, OwnedEditablePreset as r, TemplateCorpusRecord as s, BrandRecreationPreset as t, brandRecreationProvenance as u };
|
|
254
|
-
//# sourceMappingURL=corpus-qrUD5O6r.d.ts.map
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
//#region src/email/diagnostics.d.ts
|
|
3
|
-
declare const EmailDiagnosticSeverity: Schema.Literals<readonly ["error", "warning", "info"]>;
|
|
4
|
-
type EmailDiagnosticSeverity = typeof EmailDiagnosticSeverity.Type;
|
|
5
|
-
/** What the emitted document establishes beyond the client feature matrix. */
|
|
6
|
-
declare const EmailCompatibilityAssessment: Schema.Struct<{
|
|
7
|
-
readonly assessment: Schema.Literals<readonly ["risk", "degradation", "unverified", "not-applicable"]>;
|
|
8
|
-
/** A short description of the consequence or the remaining verification. */
|
|
9
|
-
readonly title: Schema.String;
|
|
10
|
-
}>;
|
|
11
|
-
type EmailCompatibilityAssessment = typeof EmailCompatibilityAssessment.Type;
|
|
12
|
-
declare const EmailDiagnostic: Schema.Struct<{
|
|
13
|
-
/** Stable identifier, e.g. `unsupported-element` or `caniemail/css-border-radius`. */
|
|
14
|
-
readonly code: Schema.String;
|
|
15
|
-
readonly severity: Schema.Literals<readonly ["error", "warning", "info"]>;
|
|
16
|
-
/** States what is wrong and what to write instead. */
|
|
17
|
-
readonly message: Schema.String;
|
|
18
|
-
/** Innermost authoring element first, then each enclosing component call site. */
|
|
19
|
-
readonly origins: Schema.$Array<Schema.Struct<{
|
|
20
|
-
readonly fileName: Schema.String;
|
|
21
|
-
readonly lineNumber: Schema.Int;
|
|
22
|
-
readonly columnNumber: Schema.Int;
|
|
23
|
-
}>>;
|
|
24
|
-
/** Target clients a compatibility finding applies to. */
|
|
25
|
-
readonly clients: Schema.optional<Schema.$Array<Schema.String>>;
|
|
26
|
-
/** Partial-support notes and other caveats a client matrix carries. */
|
|
27
|
-
readonly notes: Schema.optional<Schema.String>;
|
|
28
|
-
/** Which pinned rule data produced the finding. */
|
|
29
|
-
readonly provenance: Schema.optional<Schema.String>;
|
|
30
|
-
/** Declared fixtures whose rendered output produced this finding. */
|
|
31
|
-
readonly fixtures: Schema.optional<Schema.$Array<Schema.String>>;
|
|
32
|
-
/** Source chains for every located emitted occurrence; origins identifies the first. */
|
|
33
|
-
readonly occurrences: Schema.optional<Schema.$Array<Schema.$Array<Schema.Struct<{
|
|
34
|
-
readonly fileName: Schema.String;
|
|
35
|
-
readonly lineNumber: Schema.Int;
|
|
36
|
-
readonly columnNumber: Schema.Int;
|
|
37
|
-
}>>>>;
|
|
38
|
-
/** Compatibility observations are not automatically defects or proof of client rendering. */
|
|
39
|
-
readonly compatibility: Schema.optional<Schema.Struct<{
|
|
40
|
-
readonly assessment: Schema.Literals<readonly ["risk", "degradation", "unverified", "not-applicable"]>;
|
|
41
|
-
/** A short description of the consequence or the remaining verification. */
|
|
42
|
-
readonly title: Schema.String;
|
|
43
|
-
}>>;
|
|
44
|
-
}>;
|
|
45
|
-
interface EmailDiagnostic extends Schema.Schema.Type<typeof EmailDiagnostic> {}
|
|
46
|
-
declare const EmailCompileError_base: Schema.Class<EmailCompileError, Schema.TaggedStruct<"EmailCompileError", {
|
|
47
|
-
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
48
|
-
/** Stable identifier, e.g. `unsupported-element` or `caniemail/css-border-radius`. */
|
|
49
|
-
readonly code: Schema.String;
|
|
50
|
-
readonly severity: Schema.Literals<readonly ["error", "warning", "info"]>;
|
|
51
|
-
/** States what is wrong and what to write instead. */
|
|
52
|
-
readonly message: Schema.String;
|
|
53
|
-
/** Innermost authoring element first, then each enclosing component call site. */
|
|
54
|
-
readonly origins: Schema.$Array<Schema.Struct<{
|
|
55
|
-
readonly fileName: Schema.String;
|
|
56
|
-
readonly lineNumber: Schema.Int;
|
|
57
|
-
readonly columnNumber: Schema.Int;
|
|
58
|
-
}>>;
|
|
59
|
-
/** Target clients a compatibility finding applies to. */
|
|
60
|
-
readonly clients: Schema.optional<Schema.$Array<Schema.String>>;
|
|
61
|
-
/** Partial-support notes and other caveats a client matrix carries. */
|
|
62
|
-
readonly notes: Schema.optional<Schema.String>;
|
|
63
|
-
/** Which pinned rule data produced the finding. */
|
|
64
|
-
readonly provenance: Schema.optional<Schema.String>;
|
|
65
|
-
/** Declared fixtures whose rendered output produced this finding. */
|
|
66
|
-
readonly fixtures: Schema.optional<Schema.$Array<Schema.String>>;
|
|
67
|
-
/** Source chains for every located emitted occurrence; origins identifies the first. */
|
|
68
|
-
readonly occurrences: Schema.optional<Schema.$Array<Schema.$Array<Schema.Struct<{
|
|
69
|
-
readonly fileName: Schema.String;
|
|
70
|
-
readonly lineNumber: Schema.Int;
|
|
71
|
-
readonly columnNumber: Schema.Int;
|
|
72
|
-
}>>>>;
|
|
73
|
-
/** Compatibility observations are not automatically defects or proof of client rendering. */
|
|
74
|
-
readonly compatibility: Schema.optional<Schema.Struct<{
|
|
75
|
-
readonly assessment: Schema.Literals<readonly ["risk", "degradation", "unverified", "not-applicable"]>;
|
|
76
|
-
/** A short description of the consequence or the remaining verification. */
|
|
77
|
-
readonly title: Schema.String;
|
|
78
|
-
}>>;
|
|
79
|
-
}>>;
|
|
80
|
-
}>, import("effect/Cause").YieldableError>;
|
|
81
|
-
declare class EmailCompileError extends EmailCompileError_base {
|
|
82
|
-
get message(): string;
|
|
83
|
-
}
|
|
84
|
-
/** `emails/welcome.tsx:12:3 unsupported-element: …` — the shape agents iterate on. */
|
|
85
|
-
declare const formatEmailDiagnostic: (diagnostic: EmailDiagnostic) => string;
|
|
86
|
-
/** True when a set of findings must stop the compile or refuse a publication. */
|
|
87
|
-
declare const hasBlockingDiagnostic: (diagnostics: readonly EmailDiagnostic[]) => boolean;
|
|
88
|
-
//#endregion
|
|
89
|
-
export { formatEmailDiagnostic as a, EmailDiagnosticSeverity as i, EmailCompileError as n, hasBlockingDiagnostic as o, EmailDiagnostic as r, EmailCompatibilityAssessment as t };
|
|
90
|
-
//# sourceMappingURL=diagnostics-Djd9ckLg.d.ts.map
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
//#region src/diagnostics.d.ts
|
|
3
|
-
declare const SpanSchema: Schema.Struct<{
|
|
4
|
-
readonly start: Schema.Finite;
|
|
5
|
-
readonly end: Schema.Finite;
|
|
6
|
-
}>;
|
|
7
|
-
interface Span extends Schema.Schema.Type<typeof SpanSchema> {}
|
|
8
|
-
declare const DiagnosticRepairSchema: Schema.Struct<{
|
|
9
|
-
readonly kind: Schema.Literals<readonly ["replace-class", "remove-class", "rewrite-node", "use-primitive"]>;
|
|
10
|
-
readonly raw: Schema.optional<Schema.String>;
|
|
11
|
-
readonly suggestions: Schema.$Array<Schema.String>;
|
|
12
|
-
readonly explanation: Schema.String;
|
|
13
|
-
}>;
|
|
14
|
-
interface DiagnosticRepair extends Schema.Schema.Type<typeof DiagnosticRepairSchema> {}
|
|
15
|
-
declare const DiagnosticSchema: Schema.Struct<{
|
|
16
|
-
readonly code: Schema.String;
|
|
17
|
-
readonly message: Schema.String;
|
|
18
|
-
readonly span: Schema.Struct<{
|
|
19
|
-
readonly start: Schema.Finite;
|
|
20
|
-
readonly end: Schema.Finite;
|
|
21
|
-
}>;
|
|
22
|
-
readonly repair: Schema.optional<Schema.Struct<{
|
|
23
|
-
readonly kind: Schema.Literals<readonly ["replace-class", "remove-class", "rewrite-node", "use-primitive"]>;
|
|
24
|
-
readonly raw: Schema.optional<Schema.String>;
|
|
25
|
-
readonly suggestions: Schema.$Array<Schema.String>;
|
|
26
|
-
readonly explanation: Schema.String;
|
|
27
|
-
}>>;
|
|
28
|
-
}>;
|
|
29
|
-
interface Diagnostic extends Schema.Schema.Type<typeof DiagnosticSchema> {}
|
|
30
|
-
declare const SmlParseError_base: Schema.Class<SmlParseError, Schema.TaggedStruct<"SmlParseError", {
|
|
31
|
-
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
32
|
-
readonly code: Schema.String;
|
|
33
|
-
readonly message: Schema.String;
|
|
34
|
-
readonly span: Schema.Struct<{
|
|
35
|
-
readonly start: Schema.Finite;
|
|
36
|
-
readonly end: Schema.Finite;
|
|
37
|
-
}>;
|
|
38
|
-
readonly repair: Schema.optional<Schema.Struct<{
|
|
39
|
-
readonly kind: Schema.Literals<readonly ["replace-class", "remove-class", "rewrite-node", "use-primitive"]>;
|
|
40
|
-
readonly raw: Schema.optional<Schema.String>;
|
|
41
|
-
readonly suggestions: Schema.$Array<Schema.String>;
|
|
42
|
-
readonly explanation: Schema.String;
|
|
43
|
-
}>>;
|
|
44
|
-
}>>;
|
|
45
|
-
}>, import("effect/Cause").YieldableError>;
|
|
46
|
-
declare class SmlParseError extends SmlParseError_base {
|
|
47
|
-
get message(): string;
|
|
48
|
-
}
|
|
49
|
-
declare const SmlCompileError_base: Schema.Class<SmlCompileError, Schema.TaggedStruct<"SmlCompileError", {
|
|
50
|
-
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
51
|
-
readonly code: Schema.String;
|
|
52
|
-
readonly message: Schema.String;
|
|
53
|
-
readonly span: Schema.Struct<{
|
|
54
|
-
readonly start: Schema.Finite;
|
|
55
|
-
readonly end: Schema.Finite;
|
|
56
|
-
}>;
|
|
57
|
-
readonly repair: Schema.optional<Schema.Struct<{
|
|
58
|
-
readonly kind: Schema.Literals<readonly ["replace-class", "remove-class", "rewrite-node", "use-primitive"]>;
|
|
59
|
-
readonly raw: Schema.optional<Schema.String>;
|
|
60
|
-
readonly suggestions: Schema.$Array<Schema.String>;
|
|
61
|
-
readonly explanation: Schema.String;
|
|
62
|
-
}>>;
|
|
63
|
-
}>>;
|
|
64
|
-
}>, import("effect/Cause").YieldableError>;
|
|
65
|
-
declare class SmlCompileError extends SmlCompileError_base {
|
|
66
|
-
get message(): string;
|
|
67
|
-
}
|
|
68
|
-
/** Newline-offset line map. Build once per source, query with `lineColumn`. */
|
|
69
|
-
declare const buildLineMap: (source: string) => ReadonlyArray<number>;
|
|
70
|
-
/** 1-based line/column for an absolute offset, via binary search. */
|
|
71
|
-
declare const lineColumn: (lineMap: ReadonlyArray<number>, offset: number) => {
|
|
72
|
-
readonly line: number;
|
|
73
|
-
readonly column: number;
|
|
74
|
-
};
|
|
75
|
-
/** "line 12:8 unknown class ..." — the shape agents iterate on. */
|
|
76
|
-
declare const formatDiagnostic: (source: string, diagnostic: Diagnostic) => string;
|
|
77
|
-
//#endregion
|
|
78
|
-
export { SmlCompileError as a, SpanSchema as c, lineColumn as d, DiagnosticSchema as i, buildLineMap as l, DiagnosticRepair as n, SmlParseError as o, DiagnosticRepairSchema as r, Span as s, Diagnostic as t, formatDiagnostic as u };
|
|
79
|
-
//# sourceMappingURL=diagnostics-oveE-laV.d.ts.map
|