@samva/markup 0.1.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 +8 -0
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/ast-DAhnAvQN.d.ts +120 -0
- package/dist/ast.d.ts +2 -0
- package/dist/ast.js +159 -0
- package/dist/ast.js.map +1 -0
- package/dist/candidate.d.ts +29 -0
- package/dist/candidate.js +88 -0
- package/dist/candidate.js.map +1 -0
- package/dist/checks-CW0nFj5n.js +58922 -0
- package/dist/checks-CW0nFj5n.js.map +1 -0
- package/dist/checks.d.ts +26 -0
- package/dist/checks.js +2 -0
- package/dist/classes.d.ts +27 -0
- package/dist/classes.js +184 -0
- package/dist/classes.js.map +1 -0
- package/dist/compile-sms.d.ts +28 -0
- package/dist/compile-sms.js +44 -0
- package/dist/compile-sms.js.map +1 -0
- package/dist/compile-whatsapp.d.ts +56 -0
- package/dist/compile-whatsapp.js +186 -0
- package/dist/compile-whatsapp.js.map +1 -0
- package/dist/compile.d.ts +93 -0
- package/dist/compile.js +938 -0
- package/dist/compile.js.map +1 -0
- package/dist/components.d.ts +289 -0
- package/dist/components.js +106 -0
- package/dist/components.js.map +1 -0
- package/dist/conditionals.d.ts +10 -0
- package/dist/conditionals.js +42 -0
- package/dist/conditionals.js.map +1 -0
- package/dist/diagnostics-oveE-laV.d.ts +79 -0
- package/dist/diagnostics.d.ts +2 -0
- package/dist/diagnostics.js +62 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/emit.d.ts +50 -0
- package/dist/emit.js +151 -0
- package/dist/emit.js.map +1 -0
- package/dist/footer.d.ts +66 -0
- package/dist/footer.js +90 -0
- package/dist/footer.js.map +1 -0
- package/dist/interpolate.d.ts +27 -0
- package/dist/interpolate.js +61 -0
- package/dist/interpolate.js.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +10 -0
- package/dist/jsx-dev-runtime.js +7 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime-fSxcvlx4.d.ts +57 -0
- package/dist/jsx-runtime.d.ts +2 -0
- package/dist/jsx-runtime.js +102 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/lexer.d.ts +60 -0
- package/dist/lexer.js +269 -0
- package/dist/lexer.js.map +1 -0
- package/dist/model.d.ts +39 -0
- package/dist/model.js +90 -0
- package/dist/model.js.map +1 -0
- package/dist/ops.d.ts +208 -0
- package/dist/ops.js +546 -0
- package/dist/ops.js.map +1 -0
- package/dist/parser-yzjUOGhc.d.ts +387 -0
- package/dist/parser.d.ts +2 -0
- package/dist/parser.js +821 -0
- package/dist/parser.js.map +1 -0
- package/dist/predicate-DTtVtLK7.d.ts +49 -0
- package/dist/predicate.d.ts +2 -0
- package/dist/predicate.js +417 -0
- package/dist/predicate.js.map +1 -0
- package/dist/presets/category-mapping.d.ts +13 -0
- package/dist/presets/category-mapping.js +49 -0
- package/dist/presets/category-mapping.js.map +1 -0
- package/dist/presets/public-gallery.d.ts +490 -0
- package/dist/presets/public-gallery.js +563 -0
- package/dist/presets/public-gallery.js.map +1 -0
- package/dist/presets/public-handoff.d.ts +68 -0
- package/dist/presets/public-handoff.js +105 -0
- package/dist/presets/public-handoff.js.map +1 -0
- package/dist/presets/public-preview-artifacts.d.ts +41 -0
- package/dist/presets/public-preview-artifacts.js +109 -0
- package/dist/presets/public-preview-artifacts.js.map +1 -0
- package/dist/presets/public-preview.d.ts +1168 -0
- package/dist/presets/public-preview.js +1158 -0
- package/dist/presets/public-preview.js.map +1 -0
- package/dist/presets/sources.d.ts +7 -0
- package/dist/presets/sources.js +54 -0
- package/dist/presets/sources.js.map +1 -0
- package/dist/presets.d.ts +350 -0
- package/dist/presets.js +1251 -0
- package/dist/presets.js.map +1 -0
- package/dist/printer.d.ts +6 -0
- package/dist/printer.js +122 -0
- package/dist/printer.js.map +1 -0
- package/dist/registry.d.ts +42 -0
- package/dist/registry.js +646 -0
- package/dist/registry.js.map +1 -0
- package/dist/render-template.d.ts +42 -0
- package/dist/render-template.js +74 -0
- package/dist/render-template.js.map +1 -0
- package/dist/sms-segments-y4FpPilJ.d.ts +13 -0
- package/dist/sms-segments.d.ts +2 -0
- package/dist/sms-segments.js +46 -0
- package/dist/sms-segments.js.map +1 -0
- package/dist/theme-6ApjjiBo.d.ts +116 -0
- package/dist/theme-css.d.ts +24 -0
- package/dist/theme-css.js +509 -0
- package/dist/theme-css.js.map +1 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +95 -0
- package/dist/theme.js.map +1 -0
- package/dist/tokens.d.ts +6 -0
- package/dist/tokens.js +417 -0
- package/dist/tokens.js.map +1 -0
- package/dist/variables-3NGLpNTB.d.ts +77 -0
- package/dist/variables.d.ts +2 -0
- package/dist/variables.js +141 -0
- package/dist/variables.js.map +1 -0
- package/dist/version-BITr58kk.js +96 -0
- package/dist/version-BITr58kk.js.map +1 -0
- package/generated/sml-agent-contract.json +917 -0
- package/generated/sml-email-agent-contract.json +790 -0
- package/generated/sml-email-language-reference.md +160 -0
- package/generated/sml-language-reference.md +220 -0
- package/package.json +203 -0
package/dist/theme.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
//#region src/theme.ts
|
|
2
|
+
/**
|
|
3
|
+
* Escape a value interpolated inside a single-quoted CSS string — a
|
|
4
|
+
* `font-family` name or a `url('…')` src. A raw `'` closes the quote early (for
|
|
5
|
+
* a src that also lets a crafted value escape the `url()`), and a raw `\` is read
|
|
6
|
+
* as a CSS escape sequence. `family` and `src` are only min-length-validated
|
|
7
|
+
* upstream, so escaping both keeps every emitted CSS string grammar-safe. Used
|
|
8
|
+
* both here (the inline `font-{name}` stack) and by the compiler's @font-face
|
|
9
|
+
* block, so an escapable family never lands unescaped in either place.
|
|
10
|
+
*
|
|
11
|
+
* The `@font-face` block lives inside a `<style>` element, and an HTML parser
|
|
12
|
+
* scans raw-text elements for the literal `</style>` end tag BEFORE any CSS
|
|
13
|
+
* parsing. So a crafted `family`/`src` containing `</style>` would close the
|
|
14
|
+
* style element and let the remainder render as HTML in the delivered email
|
|
15
|
+
* (a stored-XSS breakout). Rewriting `</` to `<\/` neutralises this: in a
|
|
16
|
+
* quoted CSS string `\/` is identical to `/`, but the HTML tokenizer no longer
|
|
17
|
+
* matches `<\/style>` as a raw-text end tag.
|
|
18
|
+
*/
|
|
19
|
+
const escapeCssString = (value) => value.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/<\//g, "<\\/");
|
|
20
|
+
/**
|
|
21
|
+
* Flatten persisted font tokens into the compiler's two font fields, so the
|
|
22
|
+
* server (apps/api) and the in-browser canvas (apps/web) produce byte-identical
|
|
23
|
+
* output from ONE transform rather than two hand-synced copies:
|
|
24
|
+
* - `fontFamilies` = the inline stack the `font-{name}` utility emits — the
|
|
25
|
+
* family quoted (multi-word-safe) then the fallback (which the picker
|
|
26
|
+
* guarantees ends in a generic, so no client is ever fontless).
|
|
27
|
+
* - `fontFaces` = the @font-face set for tokens that self-host a webfont.
|
|
28
|
+
* Tokens without `faces` (system stacks) contribute a family but no face set.
|
|
29
|
+
*/
|
|
30
|
+
const flattenFontTokens = (tokens) => {
|
|
31
|
+
const fontFamilies = {};
|
|
32
|
+
const fontFaces = {};
|
|
33
|
+
for (const [name, token] of Object.entries(tokens)) {
|
|
34
|
+
fontFamilies[name] = `'${escapeCssString(token.family)}', ${token.fallback}`;
|
|
35
|
+
if (token.faces != null) fontFaces[name] = {
|
|
36
|
+
family: token.family,
|
|
37
|
+
faces: token.faces
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
fontFamilies,
|
|
42
|
+
fontFaces
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const mergeLayer = (table, overrides) => {
|
|
46
|
+
if (overrides === void 0) return table;
|
|
47
|
+
return {
|
|
48
|
+
colors: {
|
|
49
|
+
...table.colors,
|
|
50
|
+
...overrides.colors
|
|
51
|
+
},
|
|
52
|
+
colorsDark: {
|
|
53
|
+
...table.colorsDark,
|
|
54
|
+
...overrides.colorsDark
|
|
55
|
+
},
|
|
56
|
+
spacingPx: overrides.spacingPx ?? table.spacingPx,
|
|
57
|
+
text: {
|
|
58
|
+
...table.text,
|
|
59
|
+
...overrides.text
|
|
60
|
+
},
|
|
61
|
+
leading: {
|
|
62
|
+
...table.leading,
|
|
63
|
+
...overrides.leading
|
|
64
|
+
},
|
|
65
|
+
trackingEm: {
|
|
66
|
+
...table.trackingEm,
|
|
67
|
+
...overrides.trackingEm
|
|
68
|
+
},
|
|
69
|
+
radiusPx: {
|
|
70
|
+
...table.radiusPx,
|
|
71
|
+
...overrides.radiusPx
|
|
72
|
+
},
|
|
73
|
+
fontWeights: {
|
|
74
|
+
...table.fontWeights,
|
|
75
|
+
...overrides.fontWeights
|
|
76
|
+
},
|
|
77
|
+
fontFamilies: {
|
|
78
|
+
...table.fontFamilies,
|
|
79
|
+
...overrides.fontFamilies
|
|
80
|
+
},
|
|
81
|
+
fontFaces: {
|
|
82
|
+
...table.fontFaces,
|
|
83
|
+
...overrides.fontFaces
|
|
84
|
+
},
|
|
85
|
+
containerPx: {
|
|
86
|
+
...table.containerPx,
|
|
87
|
+
...overrides.containerPx
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
const resolveTokenTable = (layers) => (layers.overrides ?? []).reduce(mergeLayer, layers.base);
|
|
92
|
+
//#endregion
|
|
93
|
+
export { escapeCssString, flattenFontTokens, resolveTokenTable };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../src/theme.ts"],"sourcesContent":["// Layered design-token table. Classes resolve against a merged table:\n// base Tailwind tokens ← org theme ← template overrides. The layering is\n// the theming mechanism (`bg-brand` is just an org-theme color named \"brand\");\n// every resolver call takes the layered table.\n\nexport interface TextToken {\n readonly sizePx: number;\n readonly lineHeightPx: number;\n}\n\n/** One hosted @font-face: the served woff2 src + its weight/style, and the\n * css2 unicode-range (absent for a whole-file upload). */\nexport interface FontFace {\n readonly weight: number;\n readonly style: \"normal\" | \"italic\";\n readonly src: string;\n readonly unicodeRange?: string | undefined;\n}\n\n/** The @font-face set for one font token: the family the rules declare (and that\n * the token's inline stack leads with) plus its hosted faces. */\nexport interface FontFaceSet {\n readonly family: string;\n readonly faces: ReadonlyArray<FontFace>;\n}\n\n/**\n * Escape a value interpolated inside a single-quoted CSS string — a\n * `font-family` name or a `url('…')` src. A raw `'` closes the quote early (for\n * a src that also lets a crafted value escape the `url()`), and a raw `\\` is read\n * as a CSS escape sequence. `family` and `src` are only min-length-validated\n * upstream, so escaping both keeps every emitted CSS string grammar-safe. Used\n * both here (the inline `font-{name}` stack) and by the compiler's @font-face\n * block, so an escapable family never lands unescaped in either place.\n *\n * The `@font-face` block lives inside a `<style>` element, and an HTML parser\n * scans raw-text elements for the literal `</style>` end tag BEFORE any CSS\n * parsing. So a crafted `family`/`src` containing `</style>` would close the\n * style element and let the remainder render as HTML in the delivered email\n * (a stored-XSS breakout). Rewriting `</` to `<\\/` neutralises this: in a\n * quoted CSS string `\\/` is identical to `/`, but the HTML tokenizer no longer\n * matches `<\\/style>` as a raw-text end tag.\n */\nexport const escapeCssString = (value: string): string =>\n value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\").replace(/<\\//g, \"<\\\\/\");\n\n/** A persisted font token: the family the inline stack leads with, the fallback\n * appended after it, and (for a self-hosted webfont) the hosted faces. The\n * public compiler owns the single flatten transform for this shape. */\nexport interface FontToken {\n readonly family: string;\n readonly fallback: string;\n readonly faces?: ReadonlyArray<FontFace> | undefined;\n}\n\n/**\n * Flatten persisted font tokens into the compiler's two font fields, so the\n * server (apps/api) and the in-browser canvas (apps/web) produce byte-identical\n * output from ONE transform rather than two hand-synced copies:\n * - `fontFamilies` = the inline stack the `font-{name}` utility emits — the\n * family quoted (multi-word-safe) then the fallback (which the picker\n * guarantees ends in a generic, so no client is ever fontless).\n * - `fontFaces` = the @font-face set for tokens that self-host a webfont.\n * Tokens without `faces` (system stacks) contribute a family but no face set.\n */\nexport const flattenFontTokens = (\n tokens: Readonly<Record<string, FontToken>>,\n): {\n fontFamilies: Record<string, string>;\n fontFaces: Record<string, FontFaceSet>;\n} => {\n const fontFamilies: Record<string, string> = {};\n const fontFaces: Record<string, FontFaceSet> = {};\n for (const [name, token] of Object.entries(tokens)) {\n // The family leads a single-quoted CSS value here, so escape it — an\n // unescaped quote (`d'Font`) would produce `'d'Font', …`, invalid CSS the\n // browser drops entirely, falling back to (often) Times New Roman: exactly\n // the footgun webfonts exist to close. The @font-face block escapes the same\n // family again at emit, so both surfaces stay grammar-safe.\n fontFamilies[name] = `'${escapeCssString(token.family)}', ${token.fallback}`;\n if (token.faces != null) {\n fontFaces[name] = { family: token.family, faces: token.faces };\n }\n }\n return { fontFamilies, fontFaces };\n};\n\nexport interface TokenTable {\n /** Flattened color names (\"red-500\", \"white\", \"brand\") → 6-digit lowercase hex. */\n readonly colors: Readonly<Record<string, string>>;\n /**\n * Dark counterparts, colors namespace only (dark radius/fonts are not a\n * thing). Only tokens with a dark pair appear; a color-family utility that\n * resolves a paired token also emits the dark head rule automatically.\n */\n readonly colorsDark: Readonly<Record<string, string>>;\n /** px per spacing unit (`p-4` → 4 × spacingPx). */\n readonly spacingPx: number;\n /** text-{size} → font-size / line-height px pair. */\n readonly text: Readonly<Record<string, TextToken>>;\n /** leading-{name} → unitless line-height ratio. */\n readonly leading: Readonly<Record<string, number>>;\n /** tracking-{name} → letter-spacing em. */\n readonly trackingEm: Readonly<Record<string, number>>;\n /** rounded-{name} → border-radius px. */\n readonly radiusPx: Readonly<Record<string, number>>;\n /** font-{name} → font-weight number. */\n readonly fontWeights: Readonly<Record<string, number>>;\n /** font-{name} → the resolved inline font-family stack (family + fallback,\n * guaranteed to end in a generic). */\n readonly fontFamilies: Readonly<Record<string, string>>;\n /** font-{name} → its @font-face set, for tokens that self-host a webfont.\n * Tokens with no faces (system stacks) are absent. */\n readonly fontFaces: Readonly<Record<string, FontFaceSet>>;\n /** max-w-{name} → px. */\n readonly containerPx: Readonly<Record<string, number>>;\n}\n\nexport interface TokenOverrides {\n readonly colors?: Readonly<Record<string, string>> | undefined;\n readonly colorsDark?: Readonly<Record<string, string>> | undefined;\n readonly spacingPx?: number | undefined;\n readonly text?: Readonly<Record<string, TextToken>> | undefined;\n readonly leading?: Readonly<Record<string, number>> | undefined;\n readonly trackingEm?: Readonly<Record<string, number>> | undefined;\n readonly radiusPx?: Readonly<Record<string, number>> | undefined;\n readonly fontWeights?: Readonly<Record<string, number>> | undefined;\n readonly fontFamilies?: Readonly<Record<string, string>> | undefined;\n readonly fontFaces?: Readonly<Record<string, FontFaceSet>> | undefined;\n readonly containerPx?: Readonly<Record<string, number>> | undefined;\n}\n\nexport interface ThemeLayers {\n readonly base: TokenTable;\n /**\n * Ordered token-override layers, least → most specific (organization →\n * domain → template). Each is merged onto the running table in turn, so a\n * later layer's token wins. The caller (the settings cascade in apps/api)\n * owns assembling this list from the effective design.\n */\n readonly overrides?: ReadonlyArray<TokenOverrides> | undefined;\n}\n\nconst mergeLayer = (table: TokenTable, overrides: TokenOverrides | undefined): TokenTable => {\n if (overrides === undefined) return table;\n return {\n colors: { ...table.colors, ...overrides.colors },\n colorsDark: { ...table.colorsDark, ...overrides.colorsDark },\n spacingPx: overrides.spacingPx ?? table.spacingPx,\n text: { ...table.text, ...overrides.text },\n leading: { ...table.leading, ...overrides.leading },\n trackingEm: { ...table.trackingEm, ...overrides.trackingEm },\n radiusPx: { ...table.radiusPx, ...overrides.radiusPx },\n fontWeights: { ...table.fontWeights, ...overrides.fontWeights },\n fontFamilies: { ...table.fontFamilies, ...overrides.fontFamilies },\n fontFaces: { ...table.fontFaces, ...overrides.fontFaces },\n containerPx: { ...table.containerPx, ...overrides.containerPx },\n };\n};\n\nexport const resolveTokenTable = (layers: ThemeLayers): TokenTable =>\n (layers.overrides ?? []).reduce(m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,CAAG,OAAO,YAAY,OAAO,IAAI"}
|
package/dist/tokens.d.ts
ADDED
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
//#region src/tokens.ts
|
|
2
|
+
const baseTokens = {
|
|
3
|
+
colors: {
|
|
4
|
+
"red-50": "#fef2f2",
|
|
5
|
+
"red-100": "#ffe2e2",
|
|
6
|
+
"red-200": "#ffc9c9",
|
|
7
|
+
"red-300": "#ffa2a2",
|
|
8
|
+
"red-400": "#ff6467",
|
|
9
|
+
"red-500": "#fb2c36",
|
|
10
|
+
"red-600": "#e7000b",
|
|
11
|
+
"red-700": "#c10007",
|
|
12
|
+
"red-800": "#9f0712",
|
|
13
|
+
"red-900": "#82181a",
|
|
14
|
+
"red-950": "#460809",
|
|
15
|
+
"orange-50": "#fff7ed",
|
|
16
|
+
"orange-100": "#ffedd4",
|
|
17
|
+
"orange-200": "#ffd6a7",
|
|
18
|
+
"orange-300": "#ffb86a",
|
|
19
|
+
"orange-400": "#ff8904",
|
|
20
|
+
"orange-500": "#ff6900",
|
|
21
|
+
"orange-600": "#f54900",
|
|
22
|
+
"orange-700": "#ca3500",
|
|
23
|
+
"orange-800": "#9f2d00",
|
|
24
|
+
"orange-900": "#7e2a0c",
|
|
25
|
+
"orange-950": "#441306",
|
|
26
|
+
"amber-50": "#fffbeb",
|
|
27
|
+
"amber-100": "#fef3c6",
|
|
28
|
+
"amber-200": "#fee685",
|
|
29
|
+
"amber-300": "#ffd230",
|
|
30
|
+
"amber-400": "#ffb900",
|
|
31
|
+
"amber-500": "#fe9a00",
|
|
32
|
+
"amber-600": "#e17100",
|
|
33
|
+
"amber-700": "#bb4d00",
|
|
34
|
+
"amber-800": "#973c00",
|
|
35
|
+
"amber-900": "#7b3306",
|
|
36
|
+
"amber-950": "#461901",
|
|
37
|
+
"yellow-50": "#fefce8",
|
|
38
|
+
"yellow-100": "#fef9c2",
|
|
39
|
+
"yellow-200": "#fff085",
|
|
40
|
+
"yellow-300": "#ffdf20",
|
|
41
|
+
"yellow-400": "#fdc700",
|
|
42
|
+
"yellow-500": "#f0b100",
|
|
43
|
+
"yellow-600": "#d08700",
|
|
44
|
+
"yellow-700": "#a65f00",
|
|
45
|
+
"yellow-800": "#894b00",
|
|
46
|
+
"yellow-900": "#733e0a",
|
|
47
|
+
"yellow-950": "#432004",
|
|
48
|
+
"lime-50": "#f7fee7",
|
|
49
|
+
"lime-100": "#ecfcca",
|
|
50
|
+
"lime-200": "#d8f999",
|
|
51
|
+
"lime-300": "#bbf451",
|
|
52
|
+
"lime-400": "#9ae600",
|
|
53
|
+
"lime-500": "#7ccf00",
|
|
54
|
+
"lime-600": "#5ea500",
|
|
55
|
+
"lime-700": "#497d00",
|
|
56
|
+
"lime-800": "#3c6300",
|
|
57
|
+
"lime-900": "#35530e",
|
|
58
|
+
"lime-950": "#192e03",
|
|
59
|
+
"green-50": "#f0fdf4",
|
|
60
|
+
"green-100": "#dcfce7",
|
|
61
|
+
"green-200": "#b9f8cf",
|
|
62
|
+
"green-300": "#7bf1a8",
|
|
63
|
+
"green-400": "#05df72",
|
|
64
|
+
"green-500": "#00c950",
|
|
65
|
+
"green-600": "#00a63e",
|
|
66
|
+
"green-700": "#008236",
|
|
67
|
+
"green-800": "#016630",
|
|
68
|
+
"green-900": "#0d542b",
|
|
69
|
+
"green-950": "#032e15",
|
|
70
|
+
"emerald-50": "#ecfdf5",
|
|
71
|
+
"emerald-100": "#d0fae5",
|
|
72
|
+
"emerald-200": "#a4f4cf",
|
|
73
|
+
"emerald-300": "#5ee9b5",
|
|
74
|
+
"emerald-400": "#00d492",
|
|
75
|
+
"emerald-500": "#00bc7d",
|
|
76
|
+
"emerald-600": "#009966",
|
|
77
|
+
"emerald-700": "#007a55",
|
|
78
|
+
"emerald-800": "#006045",
|
|
79
|
+
"emerald-900": "#004f3b",
|
|
80
|
+
"emerald-950": "#002c22",
|
|
81
|
+
"teal-50": "#f0fdfa",
|
|
82
|
+
"teal-100": "#cbfbf1",
|
|
83
|
+
"teal-200": "#96f7e4",
|
|
84
|
+
"teal-300": "#46ecd5",
|
|
85
|
+
"teal-400": "#00d5be",
|
|
86
|
+
"teal-500": "#00bba7",
|
|
87
|
+
"teal-600": "#009689",
|
|
88
|
+
"teal-700": "#00786f",
|
|
89
|
+
"teal-800": "#005f5a",
|
|
90
|
+
"teal-900": "#0b4f4a",
|
|
91
|
+
"teal-950": "#022f2e",
|
|
92
|
+
"cyan-50": "#ecfeff",
|
|
93
|
+
"cyan-100": "#cefafe",
|
|
94
|
+
"cyan-200": "#a2f4fd",
|
|
95
|
+
"cyan-300": "#53eafd",
|
|
96
|
+
"cyan-400": "#00d3f2",
|
|
97
|
+
"cyan-500": "#00b8db",
|
|
98
|
+
"cyan-600": "#0092b8",
|
|
99
|
+
"cyan-700": "#007595",
|
|
100
|
+
"cyan-800": "#005f78",
|
|
101
|
+
"cyan-900": "#104e64",
|
|
102
|
+
"cyan-950": "#053345",
|
|
103
|
+
"sky-50": "#f0f9ff",
|
|
104
|
+
"sky-100": "#dff2fe",
|
|
105
|
+
"sky-200": "#b8e6fe",
|
|
106
|
+
"sky-300": "#74d4ff",
|
|
107
|
+
"sky-400": "#00bcff",
|
|
108
|
+
"sky-500": "#00a6f4",
|
|
109
|
+
"sky-600": "#0084d1",
|
|
110
|
+
"sky-700": "#0069a8",
|
|
111
|
+
"sky-800": "#00598a",
|
|
112
|
+
"sky-900": "#024a70",
|
|
113
|
+
"sky-950": "#052f4a",
|
|
114
|
+
"blue-50": "#eff6ff",
|
|
115
|
+
"blue-100": "#dbeafe",
|
|
116
|
+
"blue-200": "#bedbff",
|
|
117
|
+
"blue-300": "#8ec5ff",
|
|
118
|
+
"blue-400": "#51a2ff",
|
|
119
|
+
"blue-500": "#2b7fff",
|
|
120
|
+
"blue-600": "#155dfc",
|
|
121
|
+
"blue-700": "#1447e6",
|
|
122
|
+
"blue-800": "#193cb8",
|
|
123
|
+
"blue-900": "#1c398e",
|
|
124
|
+
"blue-950": "#162456",
|
|
125
|
+
"indigo-50": "#eef2ff",
|
|
126
|
+
"indigo-100": "#e0e7ff",
|
|
127
|
+
"indigo-200": "#c6d2ff",
|
|
128
|
+
"indigo-300": "#a3b3ff",
|
|
129
|
+
"indigo-400": "#7c86ff",
|
|
130
|
+
"indigo-500": "#615fff",
|
|
131
|
+
"indigo-600": "#4f39f6",
|
|
132
|
+
"indigo-700": "#432dd7",
|
|
133
|
+
"indigo-800": "#372aac",
|
|
134
|
+
"indigo-900": "#312c85",
|
|
135
|
+
"indigo-950": "#1e1a4d",
|
|
136
|
+
"violet-50": "#f5f3ff",
|
|
137
|
+
"violet-100": "#ede9fe",
|
|
138
|
+
"violet-200": "#ddd6ff",
|
|
139
|
+
"violet-300": "#c4b4ff",
|
|
140
|
+
"violet-400": "#a684ff",
|
|
141
|
+
"violet-500": "#8e51ff",
|
|
142
|
+
"violet-600": "#7f22fe",
|
|
143
|
+
"violet-700": "#7008e7",
|
|
144
|
+
"violet-800": "#5d0ec0",
|
|
145
|
+
"violet-900": "#4d179a",
|
|
146
|
+
"violet-950": "#2f0d68",
|
|
147
|
+
"purple-50": "#faf5ff",
|
|
148
|
+
"purple-100": "#f3e8ff",
|
|
149
|
+
"purple-200": "#e9d4ff",
|
|
150
|
+
"purple-300": "#dab2ff",
|
|
151
|
+
"purple-400": "#c27aff",
|
|
152
|
+
"purple-500": "#ad46ff",
|
|
153
|
+
"purple-600": "#9810fa",
|
|
154
|
+
"purple-700": "#8200db",
|
|
155
|
+
"purple-800": "#6e11b0",
|
|
156
|
+
"purple-900": "#59168b",
|
|
157
|
+
"purple-950": "#3c0366",
|
|
158
|
+
"fuchsia-50": "#fdf4ff",
|
|
159
|
+
"fuchsia-100": "#fae8ff",
|
|
160
|
+
"fuchsia-200": "#f6cfff",
|
|
161
|
+
"fuchsia-300": "#f4a8ff",
|
|
162
|
+
"fuchsia-400": "#ed6aff",
|
|
163
|
+
"fuchsia-500": "#e12afb",
|
|
164
|
+
"fuchsia-600": "#c800de",
|
|
165
|
+
"fuchsia-700": "#a800b7",
|
|
166
|
+
"fuchsia-800": "#8a0194",
|
|
167
|
+
"fuchsia-900": "#721378",
|
|
168
|
+
"fuchsia-950": "#4b004f",
|
|
169
|
+
"pink-50": "#fdf2f8",
|
|
170
|
+
"pink-100": "#fce7f3",
|
|
171
|
+
"pink-200": "#fccee8",
|
|
172
|
+
"pink-300": "#fda5d5",
|
|
173
|
+
"pink-400": "#fb64b6",
|
|
174
|
+
"pink-500": "#f6339a",
|
|
175
|
+
"pink-600": "#e60076",
|
|
176
|
+
"pink-700": "#c6005c",
|
|
177
|
+
"pink-800": "#a3004c",
|
|
178
|
+
"pink-900": "#861043",
|
|
179
|
+
"pink-950": "#510424",
|
|
180
|
+
"rose-50": "#fff1f2",
|
|
181
|
+
"rose-100": "#ffe4e6",
|
|
182
|
+
"rose-200": "#ffccd3",
|
|
183
|
+
"rose-300": "#ffa1ad",
|
|
184
|
+
"rose-400": "#ff637e",
|
|
185
|
+
"rose-500": "#ff2056",
|
|
186
|
+
"rose-600": "#ec003f",
|
|
187
|
+
"rose-700": "#c70036",
|
|
188
|
+
"rose-800": "#a50036",
|
|
189
|
+
"rose-900": "#8b0836",
|
|
190
|
+
"rose-950": "#4d0218",
|
|
191
|
+
"slate-50": "#f8fafc",
|
|
192
|
+
"slate-100": "#f1f5f9",
|
|
193
|
+
"slate-200": "#e2e8f0",
|
|
194
|
+
"slate-300": "#cad5e2",
|
|
195
|
+
"slate-400": "#90a1b9",
|
|
196
|
+
"slate-500": "#62748e",
|
|
197
|
+
"slate-600": "#45556c",
|
|
198
|
+
"slate-700": "#314158",
|
|
199
|
+
"slate-800": "#1d293d",
|
|
200
|
+
"slate-900": "#0f172b",
|
|
201
|
+
"slate-950": "#020618",
|
|
202
|
+
"gray-50": "#f9fafb",
|
|
203
|
+
"gray-100": "#f3f4f6",
|
|
204
|
+
"gray-200": "#e5e7eb",
|
|
205
|
+
"gray-300": "#d1d5dc",
|
|
206
|
+
"gray-400": "#99a1af",
|
|
207
|
+
"gray-500": "#6a7282",
|
|
208
|
+
"gray-600": "#4a5565",
|
|
209
|
+
"gray-700": "#364153",
|
|
210
|
+
"gray-800": "#1e2939",
|
|
211
|
+
"gray-900": "#101828",
|
|
212
|
+
"gray-950": "#030712",
|
|
213
|
+
"zinc-50": "#fafafa",
|
|
214
|
+
"zinc-100": "#f4f4f5",
|
|
215
|
+
"zinc-200": "#e4e4e7",
|
|
216
|
+
"zinc-300": "#d4d4d8",
|
|
217
|
+
"zinc-400": "#9f9fa9",
|
|
218
|
+
"zinc-500": "#71717b",
|
|
219
|
+
"zinc-600": "#52525c",
|
|
220
|
+
"zinc-700": "#3f3f46",
|
|
221
|
+
"zinc-800": "#27272a",
|
|
222
|
+
"zinc-900": "#18181b",
|
|
223
|
+
"zinc-950": "#09090b",
|
|
224
|
+
"neutral-50": "#fafafa",
|
|
225
|
+
"neutral-100": "#f5f5f5",
|
|
226
|
+
"neutral-200": "#e5e5e5",
|
|
227
|
+
"neutral-300": "#d4d4d4",
|
|
228
|
+
"neutral-400": "#a1a1a1",
|
|
229
|
+
"neutral-500": "#737373",
|
|
230
|
+
"neutral-600": "#525252",
|
|
231
|
+
"neutral-700": "#404040",
|
|
232
|
+
"neutral-800": "#262626",
|
|
233
|
+
"neutral-900": "#171717",
|
|
234
|
+
"neutral-950": "#0a0a0a",
|
|
235
|
+
"stone-50": "#fafaf9",
|
|
236
|
+
"stone-100": "#f5f5f4",
|
|
237
|
+
"stone-200": "#e7e5e4",
|
|
238
|
+
"stone-300": "#d6d3d1",
|
|
239
|
+
"stone-400": "#a6a09b",
|
|
240
|
+
"stone-500": "#79716b",
|
|
241
|
+
"stone-600": "#57534d",
|
|
242
|
+
"stone-700": "#44403b",
|
|
243
|
+
"stone-800": "#292524",
|
|
244
|
+
"stone-900": "#1c1917",
|
|
245
|
+
"stone-950": "#0c0a09",
|
|
246
|
+
"mauve-50": "#fafafa",
|
|
247
|
+
"mauve-100": "#f3f1f3",
|
|
248
|
+
"mauve-200": "#e7e4e7",
|
|
249
|
+
"mauve-300": "#d7d0d7",
|
|
250
|
+
"mauve-400": "#a89ea9",
|
|
251
|
+
"mauve-500": "#79697b",
|
|
252
|
+
"mauve-600": "#594c5b",
|
|
253
|
+
"mauve-700": "#463947",
|
|
254
|
+
"mauve-800": "#2a212c",
|
|
255
|
+
"mauve-900": "#1d161e",
|
|
256
|
+
"mauve-950": "#0c090c",
|
|
257
|
+
"olive-50": "#fbfbf9",
|
|
258
|
+
"olive-100": "#f4f4f0",
|
|
259
|
+
"olive-200": "#e8e8e3",
|
|
260
|
+
"olive-300": "#d8d8d0",
|
|
261
|
+
"olive-400": "#abab9c",
|
|
262
|
+
"olive-500": "#7c7c67",
|
|
263
|
+
"olive-600": "#5b5b4b",
|
|
264
|
+
"olive-700": "#474739",
|
|
265
|
+
"olive-800": "#2b2b22",
|
|
266
|
+
"olive-900": "#1d1d16",
|
|
267
|
+
"olive-950": "#0c0c09",
|
|
268
|
+
"mist-50": "#f9fbfb",
|
|
269
|
+
"mist-100": "#f1f3f3",
|
|
270
|
+
"mist-200": "#e3e7e8",
|
|
271
|
+
"mist-300": "#d0d6d8",
|
|
272
|
+
"mist-400": "#9ca8ab",
|
|
273
|
+
"mist-500": "#67787c",
|
|
274
|
+
"mist-600": "#4b585b",
|
|
275
|
+
"mist-700": "#394447",
|
|
276
|
+
"mist-800": "#22292b",
|
|
277
|
+
"mist-900": "#161b1d",
|
|
278
|
+
"mist-950": "#090b0c",
|
|
279
|
+
"taupe-50": "#fbfaf9",
|
|
280
|
+
"taupe-100": "#f3f1f1",
|
|
281
|
+
"taupe-200": "#e8e4e3",
|
|
282
|
+
"taupe-300": "#d8d2d0",
|
|
283
|
+
"taupe-400": "#aba09c",
|
|
284
|
+
"taupe-500": "#7c6d67",
|
|
285
|
+
"taupe-600": "#5b4f4b",
|
|
286
|
+
"taupe-700": "#473c39",
|
|
287
|
+
"taupe-800": "#2b2422",
|
|
288
|
+
"taupe-900": "#1d1816",
|
|
289
|
+
"taupe-950": "#0c0a09",
|
|
290
|
+
black: "#000000",
|
|
291
|
+
white: "#ffffff",
|
|
292
|
+
brand: "#171717",
|
|
293
|
+
"brand-foreground": "#fafafa"
|
|
294
|
+
},
|
|
295
|
+
colorsDark: {
|
|
296
|
+
brand: "#fafafa",
|
|
297
|
+
"brand-foreground": "#171717"
|
|
298
|
+
},
|
|
299
|
+
spacingPx: 4,
|
|
300
|
+
text: {
|
|
301
|
+
xs: {
|
|
302
|
+
sizePx: 12,
|
|
303
|
+
lineHeightPx: 16
|
|
304
|
+
},
|
|
305
|
+
sm: {
|
|
306
|
+
sizePx: 14,
|
|
307
|
+
lineHeightPx: 20
|
|
308
|
+
},
|
|
309
|
+
base: {
|
|
310
|
+
sizePx: 16,
|
|
311
|
+
lineHeightPx: 24
|
|
312
|
+
},
|
|
313
|
+
lg: {
|
|
314
|
+
sizePx: 18,
|
|
315
|
+
lineHeightPx: 28
|
|
316
|
+
},
|
|
317
|
+
xl: {
|
|
318
|
+
sizePx: 20,
|
|
319
|
+
lineHeightPx: 28
|
|
320
|
+
},
|
|
321
|
+
"2xl": {
|
|
322
|
+
sizePx: 24,
|
|
323
|
+
lineHeightPx: 32
|
|
324
|
+
},
|
|
325
|
+
"3xl": {
|
|
326
|
+
sizePx: 30,
|
|
327
|
+
lineHeightPx: 36
|
|
328
|
+
},
|
|
329
|
+
"4xl": {
|
|
330
|
+
sizePx: 36,
|
|
331
|
+
lineHeightPx: 40
|
|
332
|
+
},
|
|
333
|
+
"5xl": {
|
|
334
|
+
sizePx: 48,
|
|
335
|
+
lineHeightPx: 48
|
|
336
|
+
},
|
|
337
|
+
"6xl": {
|
|
338
|
+
sizePx: 60,
|
|
339
|
+
lineHeightPx: 60
|
|
340
|
+
},
|
|
341
|
+
"7xl": {
|
|
342
|
+
sizePx: 72,
|
|
343
|
+
lineHeightPx: 72
|
|
344
|
+
},
|
|
345
|
+
"8xl": {
|
|
346
|
+
sizePx: 96,
|
|
347
|
+
lineHeightPx: 96
|
|
348
|
+
},
|
|
349
|
+
"9xl": {
|
|
350
|
+
sizePx: 128,
|
|
351
|
+
lineHeightPx: 128
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
leading: {
|
|
355
|
+
tight: 1.25,
|
|
356
|
+
snug: 1.375,
|
|
357
|
+
normal: 1.5,
|
|
358
|
+
relaxed: 1.625,
|
|
359
|
+
loose: 2
|
|
360
|
+
},
|
|
361
|
+
trackingEm: {
|
|
362
|
+
tighter: -.05,
|
|
363
|
+
tight: -.025,
|
|
364
|
+
normal: 0,
|
|
365
|
+
wide: .025,
|
|
366
|
+
wider: .05,
|
|
367
|
+
widest: .1
|
|
368
|
+
},
|
|
369
|
+
radiusPx: {
|
|
370
|
+
brand: 8,
|
|
371
|
+
xs: 2,
|
|
372
|
+
sm: 4,
|
|
373
|
+
md: 6,
|
|
374
|
+
lg: 8,
|
|
375
|
+
xl: 12,
|
|
376
|
+
"2xl": 16,
|
|
377
|
+
"3xl": 24,
|
|
378
|
+
"4xl": 32
|
|
379
|
+
},
|
|
380
|
+
fontWeights: {
|
|
381
|
+
thin: 100,
|
|
382
|
+
extralight: 200,
|
|
383
|
+
light: 300,
|
|
384
|
+
normal: 400,
|
|
385
|
+
medium: 500,
|
|
386
|
+
semibold: 600,
|
|
387
|
+
bold: 700,
|
|
388
|
+
extrabold: 800,
|
|
389
|
+
black: 900
|
|
390
|
+
},
|
|
391
|
+
fontFamilies: {
|
|
392
|
+
body: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
|
|
393
|
+
sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
|
|
394
|
+
serif: "ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif",
|
|
395
|
+
mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
|
|
396
|
+
},
|
|
397
|
+
fontFaces: {},
|
|
398
|
+
containerPx: {
|
|
399
|
+
"3xs": 256,
|
|
400
|
+
"2xs": 288,
|
|
401
|
+
xs: 320,
|
|
402
|
+
sm: 384,
|
|
403
|
+
md: 448,
|
|
404
|
+
lg: 512,
|
|
405
|
+
xl: 576,
|
|
406
|
+
"2xl": 672,
|
|
407
|
+
"3xl": 768,
|
|
408
|
+
"4xl": 896,
|
|
409
|
+
"5xl": 1024,
|
|
410
|
+
"6xl": 1152,
|
|
411
|
+
"7xl": 1280
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
//#endregion
|
|
415
|
+
export { baseTokens };
|
|
416
|
+
|
|
417
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../src/tokens.ts"],"sourcesContent":["// GENERATED FILE — do not edit. Regenerate with `bun run codegen:tokens`.\n// Source: tailwindcss@4.3.2 theme.css. All values are literal hex/px —\n// oklch → sRGB and rem → px conversion happened at codegen time. The brand-*\n// entries are Samva's neutral defaults (codegen script), not Tailwind tokens;\n// org brand kits override them by key.\nimport type { TokenTable } from \"./theme\";\n\nexport const baseTokens: TokenTable = {\n colors: {\n \"red-50\": \"#fef2f2\",\n \"red-100\": \"#ffe2e2\",\n \"red-200\": \"#ffc9c9\",\n \"red-300\": \"#ffa2a2\",\n \"red-400\": \"#ff6467\",\n \"red-500\": \"#fb2c36\",\n \"red-600\": \"#e7000b\",\n \"red-700\": \"#c10007\",\n \"red-800\": \"#9f0712\",\n \"red-900\": \"#82181a\",\n \"red-950\": \"#460809\",\n \"orange-50\": \"#fff7ed\",\n \"orange-100\": \"#ffedd4\",\n \"orange-200\": \"#ffd6a7\",\n \"orange-300\": \"#ffb86a\",\n \"orange-400\": \"#ff8904\",\n \"orange-500\": \"#ff6900\",\n \"orange-600\": \"#f54900\",\n \"orange-700\": \"#ca3500\",\n \"orange-800\": \"#9f2d00\",\n \"orange-900\": \"#7e2a0c\",\n \"orange-950\": \"#441306\",\n \"amber-50\": \"#fffbeb\",\n \"amber-100\": \"#fef3c6\",\n \"amber-200\": \"#fee685\",\n \"amber-300\": \"#ffd230\",\n \"amber-400\": \"#ffb900\",\n \"amber-500\": \"#fe9a00\",\n \"amber-600\": \"#e17100\",\n \"amber-700\": \"#bb4d00\",\n \"amber-800\": \"#973c00\",\n \"amber-900\": \"#7b3306\",\n \"amber-950\": \"#461901\",\n \"yellow-50\": \"#fefce8\",\n \"yellow-100\": \"#fef9c2\",\n \"yellow-200\": \"#fff085\",\n \"yellow-300\": \"#ffdf20\",\n \"yellow-400\": \"#fdc700\",\n \"yellow-500\": \"#f0b100\",\n \"yellow-600\": \"#d08700\",\n \"yellow-700\": \"#a65f00\",\n \"yellow-800\": \"#894b00\",\n \"yellow-900\": \"#733e0a\",\n \"yellow-950\": \"#432004\",\n \"lime-50\": \"#f7fee7\",\n \"lime-100\": \"#ecfcca\",\n \"lime-200\": \"#d8f999\",\n \"lime-300\": \"#bbf451\",\n \"lime-400\": \"#9ae600\",\n \"lime-500\": \"#7ccf00\",\n \"lime-600\": \"#5ea500\",\n \"lime-700\": \"#497d00\",\n \"lime-800\": \"#3c6300\",\n \"lime-900\": \"#35530e\",\n \"lime-950\": \"#192e03\",\n \"green-50\": \"#f0fdf4\",\n \"green-100\": \"#dcfce7\",\n \"green-200\": \"#b9f8cf\",\n \"green-300\": \"#7bf1a8\",\n \"green-400\": \"#05df72\",\n \"green-500\": \"#00c950\",\n \"green-600\": \"#00a63e\",\n \"green-700\": \"#008236\",\n \"green-800\": \"#016630\",\n \"green-900\": \"#0d542b\",\n \"green-950\": \"#032e15\",\n \"emerald-50\": \"#ecfdf5\",\n \"emerald-100\": \"#d0fae5\",\n \"emerald-200\": \"#a4f4cf\",\n \"emerald-300\": \"#5ee9b5\",\n \"emerald-400\": \"#00d492\",\n \"emerald-500\": \"#00bc7d\",\n \"emerald-600\": \"#009966\",\n \"emerald-700\": \"#007a55\",\n \"emerald-800\": \"#006045\",\n \"emerald-900\": \"#004f3b\",\n \"emerald-950\": \"#002c22\",\n \"teal-50\": \"#f0fdfa\",\n \"teal-100\": \"#cbfbf1\",\n \"teal-200\": \"#96f7e4\",\n \"teal-300\": \"#46ecd5\",\n \"teal-400\": \"#00d5be\",\n \"teal-500\": \"#00bba7\",\n \"teal-600\": \"#009689\",\n \"teal-700\": \"#00786f\",\n \"teal-800\": \"#005f5a\",\n \"teal-900\": \"#0b4f4a\",\n \"teal-950\": \"#022f2e\",\n \"cyan-50\": \"#ecfeff\",\n \"cyan-100\": \"#cefafe\",\n \"cyan-200\": \"#a2f4fd\",\n \"cyan-300\": \"#53eafd\",\n \"cyan-400\": \"#00d3f2\",\n \"cyan-500\": \"#00b8db\",\n \"cyan-600\": \"#0092b8\",\n \"cyan-700\": \"#007595\",\n \"cyan-800\": \"#005f78\",\n \"cyan-900\": \"#104e64\",\n \"cyan-950\": \"#053345\",\n \"sky-50\": \"#f0f9ff\",\n \"sky-100\": \"#dff2fe\",\n \"sky-200\": \"#b8e6fe\",\n \"sky-300\": \"#74d4ff\",\n \"sky-400\": \"#00bcff\",\n \"sky-500\": \"#00a6f4\",\n \"sky-600\": \"#0084d1\",\n \"sky-700\": \"#0069a8\",\n \"sky-800\": \"#00598a\",\n \"sky-900\": \"#024a70\",\n \"sky-950\": \"#052f4a\",\n \"blue-50\": \"#eff6ff\",\n \"blue-100\": \"#dbeafe\",\n \"blue-200\": \"#bedbff\",\n \"blue-300\": \"#8ec5ff\",\n \"blue-400\": \"#51a2ff\",\n \"blue-500\": \"#2b7fff\",\n \"blue-600\": \"#155dfc\",\n \"blue-700\": \"#1447e6\",\n \"blue-800\": \"#193cb8\",\n \"blue-900\": \"#1c398e\",\n \"blue-950\": \"#162456\",\n \"indigo-50\": \"#eef2ff\",\n \"indigo-100\": \"#e0e7ff\",\n \"indigo-200\": \"#c6d2ff\",\n \"indigo-300\": \"#a3b3ff\",\n \"indigo-400\": \"#7c86ff\",\n \"indigo-500\": \"#615fff\",\n \"indigo-600\": \"#4f39f6\",\n \"indigo-700\": \"#432dd7\",\n \"indigo-800\": \"#372aac\",\n \"indigo-900\": \"#312c85\",\n \"indigo-950\": \"#1e1a4d\",\n \"violet-50\": \"#f5f3ff\",\n \"violet-100\": \"#ede9fe\",\n \"violet-200\": \"#ddd6ff\",\n \"violet-300\": \"#c4b4ff\",\n \"violet-400\": \"#a684ff\",\n \"violet-500\": \"#8e51ff\",\n \"violet-600\": \"#7f22fe\",\n \"violet-700\": \"#7008e7\",\n \"violet-800\": \"#5d0ec0\",\n \"violet-900\": \"#4d179a\",\n \"violet-950\": \"#2f0d68\",\n \"purple-50\": \"#faf5ff\",\n \"purple-100\": \"#f3e8ff\",\n \"purple-200\": \"#e9d4ff\",\n \"purple-300\": \"#dab2ff\",\n \"purple-400\": \"#c27aff\",\n \"purple-500\": \"#ad46ff\",\n \"purple-600\": \"#9810fa\",\n \"purple-700\": \"#8200db\",\n \"purple-800\": \"#6e11b0\",\n \"purple-900\": \"#59168b\",\n \"purple-950\": \"#3c0366\",\n \"fuchsia-50\": \"#fdf4ff\",\n \"fuchsia-100\": \"#fae8ff\",\n \"fuchsia-200\": \"#f6cfff\",\n \"fuchsia-300\": \"#f4a8ff\",\n \"fuchsia-400\": \"#ed6aff\",\n \"fuchsia-500\": \"#e12afb\",\n \"fuchsia-600\": \"#c800de\",\n \"fuchsia-700\": \"#a800b7\",\n \"fuchsia-800\": \"#8a0194\",\n \"fuchsia-900\": \"#721378\",\n \"fuchsia-950\": \"#4b004f\",\n \"pink-50\": \"#fdf2f8\",\n \"pink-100\": \"#fce7f3\",\n \"pink-200\": \"#fccee8\",\n \"pink-300\": \"#fda5d5\",\n \"pink-400\": \"#fb64b6\",\n \"pink-500\": \"#f6339a\",\n \"pink-600\": \"#e60076\",\n \"pink-700\": \"#c6005c\",\n \"pink-800\": \"#a3004c\",\n \"pink-900\": \"#861043\",\n \"pink-950\": \"#510424\",\n \"rose-50\": \"#fff1f2\",\n \"rose-100\": \"#ffe4e6\",\n \"rose-200\": \"#ffccd3\",\n \"rose-300\": \"#ffa1ad\",\n \"rose-400\": \"#ff637e\",\n \"rose-500\": \"#ff2056\",\n \"rose-600\": \"#ec003f\",\n \"rose-700\": \"#c70036\",\n \"rose-800\": \"#a50036\",\n \"rose-900\": \"#8b0836\",\n \"rose-950\": \"#4d0218\",\n \"slate-50\": \"#f8fafc\",\n \"slate-100\": \"#f1f5f9\",\n \"slate-200\": \"#e2e8f0\",\n \"slate-300\": \"#cad5e2\",\n \"slate-400\": \"#90a1b9\",\n \"slate-500\": \"#62748e\",\n \"slate-600\": \"#45556c\",\n \"slate-700\": \"#314158\",\n \"slate-800\": \"#1d293d\",\n \"slate-900\": \"#0f172b\",\n \"slate-950\": \"#020618\",\n \"gray-50\": \"#f9fafb\",\n \"gray-100\": \"#f3f4f6\",\n \"gray-200\": \"#e5e7eb\",\n \"gray-300\": \"#d1d5dc\",\n \"gray-400\": \"#99a1af\",\n \"gray-500\": \"#6a7282\",\n \"gray-600\": \"#4a5565\",\n \"gray-700\": \"#364153\",\n \"gray-800\": \"#1e2939\",\n \"gray-900\": \"#101828\",\n \"gray-950\": \"#030712\",\n \"zinc-50\": \"#fafafa\",\n \"zinc-100\": \"#f4f4f5\",\n \"zinc-200\": \"#e4e4e7\",\n \"zinc-300\": \"#d4d4d8\",\n \"zinc-400\": \"#9f9fa9\",\n \"zinc-500\": \"#71717b\",\n \"zinc-600\": \"#52525c\",\n \"zinc-700\": \"#3f3f46\",\n \"zinc-800\": \"#27272a\",\n \"zinc-900\": \"#18181b\",\n \"zinc-950\": \"#09090b\",\n \"neutral-50\": \"#fafafa\",\n \"neutral-100\": \"#f5f5f5\",\n \"neutral-200\": \"#e5e5e5\",\n \"neutral-300\": \"#d4d4d4\",\n \"neutral-400\": \"#a1a1a1\",\n \"neutral-500\": \"#737373\",\n \"neutral-600\": \"#525252\",\n \"neutral-700\": \"#404040\",\n \"neutral-800\": \"#262626\",\n \"neutral-900\": \"#171717\",\n \"neutral-950\": \"#0a0a0a\",\n \"stone-50\": \"#fafaf9\",\n \"stone-100\": \"#f5f5f4\",\n \"stone-200\": \"#e7e5e4\",\n \"stone-300\": \"#d6d3d1\",\n \"stone-400\": \"#a6a09b\",\n \"stone-500\": \"#79716b\",\n \"stone-600\": \"#57534d\",\n \"stone-700\": \"#44403b\",\n \"stone-800\": \"#292524\",\n \"stone-900\": \"#1c1917\",\n \"stone-950\": \"#0c0a09\",\n \"mauve-50\": \"#fafafa\",\n \"mauve-100\": \"#f3f1f3\",\n \"mauve-200\": \"#e7e4e7\",\n \"mauve-300\": \"#d7d0d7\",\n \"mauve-400\": \"#a89ea9\",\n \"mauve-500\": \"#79697b\",\n \"mauve-600\": \"#594c5b\",\n \"mauve-700\": \"#463947\",\n \"mauve-800\": \"#2a212c\",\n \"mauve-900\": \"#1d161e\",\n \"mauve-950\": \"#0c090c\",\n \"olive-50\": \"#fbfbf9\",\n \"olive-100\": \"#f4f4f0\",\n \"olive-200\": \"#e8e8e3\",\n \"olive-300\": \"#d8d8d0\",\n \"olive-400\": \"#abab9c\",\n \"olive-500\": \"#7c7c67\",\n \"olive-600\": \"#5b5b4b\",\n \"olive-700\": \"#474739\",\n \"olive-800\": \"#2b2b22\",\n \"olive-900\": \"#1d1d16\",\n \"olive-950\": \"#0c0c09\",\n \"mist-50\": \"#f9fbfb\",\n \"mist-100\": \"#f1f3f3\",\n \"mist-200\": \"#e3e7e8\",\n \"mist-300\": \"#d0d6d8\",\n \"mist-400\": \"#9ca8ab\",\n \"mist-500\": \"#67787c\",\n \"mist-600\": \"#4b585b\",\n \"mist-700\": \"#394447\",\n \"mist-800\": \"#22292b\",\n \"mist-900\": \"#161b1d\",\n \"mist-950\": \"#090b0c\",\n \"taupe-50\": \"#fbfaf9\",\n \"taupe-100\": \"#f3f1f1\",\n \"taupe-200\": \"#e8e4e3\",\n \"taupe-300\": \"#d8d2d0\",\n \"taupe-400\": \"#aba09c\",\n \"taupe-500\": \"#7c6d67\",\n \"taupe-600\": \"#5b4f4b\",\n \"taupe-700\": \"#473c39\",\n \"taupe-800\": \"#2b2422\",\n \"taupe-900\": \"#1d1816\",\n \"taupe-950\": \"#0c0a09\",\n black: \"#000000\",\n white: \"#ffffff\",\n brand: \"#171717\",\n \"brand-foreground\": \"#fafafa\",\n },\n colorsDark: {\n brand: \"#fafafa\",\n \"brand-foreground\": \"#171717\",\n },\n spacingPx: 4,\n text: {\n xs: { sizePx: 12, lineHeightPx: 16 },\n sm: { sizePx: 14, lineHeightPx: 20 },\n base: { sizePx: 16, lineHeightPx: 24 },\n lg: { sizePx: 18, lineHeightPx: 28 },\n xl: { sizePx: 20, lineHeightPx: 28 },\n \"2xl\": { sizePx: 24, lineHeightPx: 32 },\n \"3xl\": { sizePx: 30, lineHeightPx: 36 },\n \"4xl\": { sizePx: 36, lineHeightPx: 40 },\n \"5xl\": { sizePx: 48, lineHeightPx: 48 },\n \"6xl\": { sizePx: 60, lineHeightPx: 60 },\n \"7xl\": { sizePx: 72, lineHeightPx: 72 },\n \"8xl\": { sizePx: 96, lineHeightPx: 96 },\n \"9xl\": { sizePx: 128, lineHeightPx: 128 },\n },\n leading: {\n tight: 1.25,\n snug: 1.375,\n normal: 1.5,\n relaxed: 1.625,\n loose: 2,\n },\n trackingEm: {\n tighter: -0.05,\n tight: -0.025,\n normal: 0,\n wide: 0.025,\n wider: 0.05,\n widest: 0.1,\n },\n radiusPx: {\n brand: 8,\n xs: 2,\n sm: 4,\n md: 6,\n lg: 8,\n xl: 12,\n \"2xl\": 16,\n \"3xl\": 24,\n \"4xl\": 32,\n },\n fontWeights: {\n thin: 100,\n extralight: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n black: 900,\n },\n fontFamilies: {\n // The default body token — a Times-free system stack. Presets and the\n // <Email>/<Text> defaults author against `font-body`, so an un-themed org\n // never renders Times New Roman. An org opts a hosted webfont in via the\n // picker (which replaces this token's value with a `family, fallback` stack).\n body: \"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'\",\n sans: \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'\",\n serif: \"ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif\",\n mono: \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace\",\n },\n // No base webfont faces — a self-hosted face is opted in per token via the\n // org/template theme; the compiler emits @font-face only for tokens present here.\n fontFaces: {},\n containerPx: {\n \"3xs\": 256,\n \"2xs\": 288,\n xs: 320,\n sm: 384,\n md: 448,\n lg: 512,\n xl: 576,\n \"2xl\": 672,\n \"3xl\": 768,\n \"4xl\": 896,\n \"5xl\": 1024,\n \"6xl\": 1152,\n \"7xl\": 1280,\n },\n};\n"],"mappings":";AAOA,MAAa,aAAyB;CACpC,QAAQ;EACN,UAAU;EACV,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,WAAW;EACX,aAAa;EACb,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,YAAY;EACZ,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,aAAa;EACb,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cA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,OAAO;EACP,OAAO;CACT;CACA,aAAa;EACX,MAAM;EACN,YAAY;EACZ,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,MAAM;EACN,WAAW;EACX,OAAO;CACT;CACA,cAAc;EAKZ,MAAM;EACN,MAAM;EACN,OAAO;EACP,MAAM;CACR;CAGA,WAAW,CAAC;CACZ,aAAa;EACX,OAAO;EACP,OAAO;EACP,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { n as PredicateAst } from "./predicate-DTtVtLK7.js";
|
|
2
|
+
//#region src/variables.d.ts
|
|
3
|
+
/** Brand carried by every VariableRef, keyed off a private symbol. */
|
|
4
|
+
declare const VARIABLE_REF: unique symbol;
|
|
5
|
+
/** Brand carried by every PredicateRef. */
|
|
6
|
+
declare const PREDICATE_REF: unique symbol;
|
|
7
|
+
interface VariableRefBrand {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
/** The recorder shared across every ref/proxy from one template invocation. */
|
|
10
|
+
readonly recorder: VariableRecorder;
|
|
11
|
+
}
|
|
12
|
+
/** Builders present on every VariableRef regardless of field type. */
|
|
13
|
+
interface CommonPredicateBuilders {
|
|
14
|
+
eq(value: string | number): PredicateRef;
|
|
15
|
+
ne(value: string | number): PredicateRef;
|
|
16
|
+
exists(): PredicateRef;
|
|
17
|
+
notExists(): PredicateRef;
|
|
18
|
+
}
|
|
19
|
+
/** Ordering builders — only surfaced (by the `Variables<T>` mapping) on number fields. */
|
|
20
|
+
interface NumericPredicateBuilders {
|
|
21
|
+
gt(value: number): PredicateRef;
|
|
22
|
+
gte(value: number): PredicateRef;
|
|
23
|
+
lt(value: number): PredicateRef;
|
|
24
|
+
lte(value: number): PredicateRef;
|
|
25
|
+
}
|
|
26
|
+
/** A recorded reference to a send-time variable. See module docs. */
|
|
27
|
+
type VariableRef<T> = {
|
|
28
|
+
readonly [VARIABLE_REF]: VariableRefBrand;
|
|
29
|
+
} & CommonPredicateBuilders & (T extends number ? NumericPredicateBuilders : Record<never, never>);
|
|
30
|
+
/** A recorded predicate expression for `<If test={...}>`; chains with and/or/not. */
|
|
31
|
+
interface PredicateRef {
|
|
32
|
+
readonly [PREDICATE_REF]: {
|
|
33
|
+
readonly ast: PredicateAst;
|
|
34
|
+
};
|
|
35
|
+
and(other: PredicateRef): PredicateRef;
|
|
36
|
+
or(other: PredicateRef): PredicateRef;
|
|
37
|
+
not(): PredicateRef;
|
|
38
|
+
}
|
|
39
|
+
declare const isVariableRef: (value: unknown) => value is VariableRef<unknown>;
|
|
40
|
+
declare const isPredicateRef: (value: unknown) => value is PredicateRef;
|
|
41
|
+
/** The predicate source string (`test="..."`) for a PredicateRef. */
|
|
42
|
+
declare const printPredicateRef: (ref: PredicateRef) => string;
|
|
43
|
+
type VariableKind = "string" | "number" | "unknown";
|
|
44
|
+
interface CollectedVariable {
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly kind: VariableKind;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Shared across every ref produced from one template invocation. Records which
|
|
50
|
+
* variables were touched and the strongest kind evidence seen for each (a
|
|
51
|
+
* numeric comparison implies `number`; a string comparison implies `string`;
|
|
52
|
+
* bare interpolation/exists leaves it `unknown`).
|
|
53
|
+
*/
|
|
54
|
+
declare class VariableRecorder {
|
|
55
|
+
private readonly kinds;
|
|
56
|
+
observe(name: string, kind: VariableKind): void;
|
|
57
|
+
collected(): ReadonlyArray<CollectedVariable>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Maps a declared variable type to the recording-proxy shape a template
|
|
61
|
+
* receives: `export default function Welcome(v: Variables<{ firstName: string }>)`.
|
|
62
|
+
* Number fields additionally expose ordering builders.
|
|
63
|
+
*/
|
|
64
|
+
type Variables<T extends Record<string, unknown>> = { readonly [K in keyof T]: VariableRef<T[K]>; };
|
|
65
|
+
/**
|
|
66
|
+
* Builds the recording proxy for a template invocation. Every top-level
|
|
67
|
+
* property access records the variable (kind `unknown` until a typed comparison
|
|
68
|
+
* refines it) and returns a VariableRef. Returns the proxy plus the shared
|
|
69
|
+
* recorder so renderTemplate can read the collected schema.
|
|
70
|
+
*/
|
|
71
|
+
declare const createVariablesProxy: <T extends Record<string, unknown>>() => {
|
|
72
|
+
readonly proxy: Variables<T>;
|
|
73
|
+
readonly recorder: VariableRecorder;
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
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-3NGLpNTB.d.ts.map
|
|
@@ -0,0 +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-3NGLpNTB.js";
|
|
2
|
+
export { CollectedVariable, PREDICATE_REF, PredicateRef, VARIABLE_REF, VariableKind, VariableRecorder, VariableRef, VariableRefBrand, Variables, createVariablesProxy, isPredicateRef, isVariableRef, printPredicateRef };
|