@samva/vite 0.13.0 → 0.14.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## @samva/vite@0.14.0
|
|
2
|
+
|
|
3
|
+
### A semantic theme vocabulary, one dark-mode mechanism and a contrast check
|
|
4
|
+
|
|
5
|
+
Every project compiles over a default theme in a shadcn-style vocabulary: `background`,
|
|
6
|
+
`foreground`, `card`, `primary`, `secondary`, `muted`, `accent` (each with its `-foreground`),
|
|
7
|
+
`border`, `--radius` (with `rounded-sm` to `rounded-xl` derived from it), `--font-sans` and
|
|
8
|
+
`--font-heading`. `starter.css`, a brand and the project's own `@theme` set the same names, so
|
|
9
|
+
`bg-card` or `text-primary-foreground` resolve in any project and a theme restyles every block that
|
|
10
|
+
reads them. `reference.md` and `contract.json` list the tokens, their roles and their defaults;
|
|
11
|
+
`@samva/markup/brand` exports `THEME_COLOR_ROLES`, `THEME_TOKENS` and `DEFAULT_THEME`.
|
|
12
|
+
|
|
13
|
+
Dark mode is one mechanism: the theme's `@media (prefers-color-scheme: dark) { @theme { … } }`
|
|
14
|
+
block, in project CSS and brand CSS alike. The compiler gives each element whose inlined styles
|
|
15
|
+
read a color that block redefines a generated `sml-dark-*` class with a dark-mode rule, so a block
|
|
16
|
+
writes `bg-card` once. Explicit `dark:` utilities still apply after it and resolve theme colors at
|
|
17
|
+
their dark values. A layer that sets a color in light mode only keeps it in dark mode, and a layer
|
|
18
|
+
that sets `--color-primary`, `--color-secondary` or `--color-accent` without its `-foreground` gets
|
|
19
|
+
black or white by contrast.
|
|
20
|
+
|
|
21
|
+
Breaking: the `-dark` suffix convention is gone. Nothing lowers a dark color to
|
|
22
|
+
`--color-<name>-dark` any more; move those values into the dark-mode block and drop the matching
|
|
23
|
+
`dark:…-dark` classes. `brandTailwindCss`, `brandThemeVariables`, `darkVariableName`,
|
|
24
|
+
`BRAND_COLOR_VARIABLE`, `BRAND_FOREGROUND_VARIABLE` and the `brand-css-dark-conflict` finding are
|
|
25
|
+
removed; `brandForegroundDefaults(brand)` is `foregroundDefaults(light, dark)` over the fills.
|
|
26
|
+
The brand footer and logo use `text-muted-foreground`.
|
|
27
|
+
|
|
28
|
+
The primitives read the theme. `Email` paints the page color (`--color-background` by default) on
|
|
29
|
+
the body and, as `bgcolor`, on the wrapper table, and pads its content 16px each side (`gutter`).
|
|
30
|
+
`Section` treats a pixel width as a maximum, so it fits a phone. `Columns` stacks its cells below
|
|
31
|
+
600px (`stack={false}` keeps a row) and spaces them with `gap` in both layouts. `Button`, `Link`
|
|
32
|
+
and `Divider` default to the primary fill, the primary color and the border color through classes
|
|
33
|
+
a utility on them overrides; their explicit props are inline styles as before. These change the
|
|
34
|
+
compiled output of every template, so the email-parity golden digests change.
|
|
35
|
+
|
|
36
|
+
`checkEmailCompatibility` adds `email-contrast`: each fixture is judged in light and dark mode,
|
|
37
|
+
and text below 3:1 or a button below 1.5:1 against its surroundings is an error located at the
|
|
38
|
+
element; normal-size text below 4.5:1 and a button below 3:1 are warnings. New diagnostic codes:
|
|
39
|
+
`email-contrast`, `invalid-columns-stack`, `invalid-columns-gap` and `invalid-number-prop`.
|
|
40
|
+
|
|
41
|
+
The email starter is redesigned on the vocabulary from copyable blocks in `templates/blocks/`.
|
|
42
|
+
|
|
1
43
|
## @samva/vite@0.11.2
|
|
2
44
|
|
|
3
45
|
### Published files no longer point at missing source maps
|
package/README.md
CHANGED
|
@@ -113,6 +113,8 @@ compatibility findings and inbox tests for client-specific proof.
|
|
|
113
113
|
|
|
114
114
|
A root `theme.css` uses Tailwind v4 `@theme` syntax and may `@import` other project `.css` files
|
|
115
115
|
and a brand import recognized by the configured brand plugin; any other import is a compile error.
|
|
116
|
+
It layers over the default theme in `@samva/markup`'s vocabulary (`reference.md`, under Theme),
|
|
117
|
+
and its `@media (prefers-color-scheme: dark) { @theme { … } }` block sets the dark-mode colors.
|
|
116
118
|
A change to the theme, a partial, or an imported stylesheet recompiles every template that reads it.
|
|
117
119
|
|
|
118
120
|
`samva templates check` and `buildTemplates()` compile every template, render every declared
|