@getvitops/create 0.3.2 → 0.3.4
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 +76 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/templates/emdash/AGENTS.md +11 -2
- package/templates/emdash/README.md +12 -1
- package/templates/emdash/_gitignore +1 -1
- package/templates/emdash/astro.config.mjs +2 -2
- package/templates/emdash/design-system.json +4 -4
- package/templates/emdash/src/assets/logo.svg +1 -1
- package/templates/emdash/src/layouts/Layout.astro +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# @getvitops/create
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bb92a14: Update the `emdash` template for the target-prefixed colour grammar.
|
|
8
|
+
|
|
9
|
+
The template's `design-system.json` and layout referenced tokens the generator no longer
|
|
10
|
+
emits — `--surface-bg`, `--surface-bg-muted`, `--neutral-border` — so a freshly scaffolded
|
|
11
|
+
project rendered a transparent card on a borderless footer. They now read
|
|
12
|
+
`--color-bg-surface-muted`, `--color-bg-surface-x-muted` and `--color-border-neutral`, and
|
|
13
|
+
`colors.utilities` picks up the new `icon` tier.
|
|
14
|
+
|
|
15
|
+
Existing scaffolds are unaffected until you upgrade `@getvitops/*`; when you do, the
|
|
16
|
+
[colour grammar migration table](https://www.npmjs.com/package/@getvitops/generator) applies
|
|
17
|
+
to your own `design-system.json` the same way.
|
|
18
|
+
|
|
19
|
+
- bb92a14: Docs: import the Astro integration as `vitops`, and document the fourth output format.
|
|
20
|
+
|
|
21
|
+
Every example now reads `import vitops from '@getvitops/astro'` and calls `vitops({ … })`,
|
|
22
|
+
including the scaffolded `emdash` template. The default export is unchanged, so this is a
|
|
23
|
+
naming convention in the docs rather than an API change — existing configs that bind it as
|
|
24
|
+
`getvitops` keep working.
|
|
25
|
+
|
|
26
|
+
The `@getvitops/generator` and `@getvitops/cli` docs also describe the `design` format, which
|
|
27
|
+
was shipped without a mention in either package's output table: `--format design` writes a
|
|
28
|
+
single `DESIGN.md` and no CSS, so a run that composes it with a stylesheet wants its own
|
|
29
|
+
`--out` (the brief conventionally sits at a repo root, the stylesheet does not).
|
|
30
|
+
|
|
31
|
+
## 0.3.3
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- **Fixed: `vitops init` and `vp create` scaffolded configs referencing tokens that no longer
|
|
36
|
+
exist.** `defaultConfig()` and the EmDash template still pointed at `--color-surface-xl` and
|
|
37
|
+
`--color-surface-xxl`, aliases from the named-step colour scale removed in 0.6. A scaffolded
|
|
38
|
+
project therefore got a `card` with no background and an invalid default border colour, with
|
|
39
|
+
nothing reporting it. Both now use `--surface-bg` / `--surface-bg-muted`. The EmDash template
|
|
40
|
+
also dropped its `patterns.radii.card` key, which collided with the `card` pattern on
|
|
41
|
+
`--br-card` — the collision `validate()` has been warning about (the `panel` group already
|
|
42
|
+
supplies the same radius, so nothing changes visually).
|
|
43
|
+
|
|
44
|
+
**Fixed: `.text-reveal` rendered invisible text.** Its gradient consumed
|
|
45
|
+
`--text-reveal-color-from`/`-to` with no defaults, so unless a consumer set both, the `var()`
|
|
46
|
+
substitution failed, `background` became invalid at computed-value time, and the accompanying
|
|
47
|
+
`color: transparent` left the text with no way to render. Both tones now default to the
|
|
48
|
+
functional text tokens.
|
|
49
|
+
|
|
50
|
+
**Fixed: `.bordered` fell back to `currentColor`** via a reference to `--color-surface-xl`,
|
|
51
|
+
which the generator never emitted. It now resolves `--surface-border`.
|
|
52
|
+
|
|
53
|
+
**New: `validate()` warns when a required role is missing.** `colors.roles` is an open map —
|
|
54
|
+
any name works and generates a full token set — but the shipped component CSS references
|
|
55
|
+
`brand-primary`, `danger`, `neutral`, `surface`, `ui-primary` and `warning` with no fallback,
|
|
56
|
+
so omitting one leaves those components uncoloured. This is a warning, not an error; the
|
|
57
|
+
required list is re-derived from the CSS partials by a test so it cannot drift.
|
|
58
|
+
|
|
59
|
+
`vitops docs` and `vitops agents` now surface config warnings (on stderr, so piping `docs` is
|
|
60
|
+
unaffected). They previously discarded them, unlike `generate` and `validate`.
|
|
61
|
+
|
|
62
|
+
Docs corrections, all in the generated bundle:
|
|
63
|
+
- **Raw scale classes are frozen and do not remap in dark mode** — stated explicitly for the
|
|
64
|
+
first time, with a migration table to the role equivalents. The dark-mode guarantee only ever
|
|
65
|
+
applied to functional role tokens, and nothing said so.
|
|
66
|
+
- **Roles are extensible over a required core** — the schema description and class reference
|
|
67
|
+
read as a closed enumeration, which is why a consumer forked their own colour layer rather
|
|
68
|
+
than adding a role.
|
|
69
|
+
- **The `md:` / `@md:` / `md-` distinction** in the tailwind format: `@md:` uses the framework's
|
|
70
|
+
breakpoints, `md:` works but uses Tailwind's (which differ — `sm:` is 40rem, `@sm:` is 30rem),
|
|
71
|
+
and `md-` is silently inert. Plus a note that registering `--container-*` also re-points
|
|
72
|
+
Tailwind's `max-w-*` scale.
|
|
73
|
+
- The css and bricks bundles now carry a `/*!` banner pointing at `npx vitops docs classes`
|
|
74
|
+
(the previous plain comment was stripped by the minifier, so it never reached the file).
|
|
75
|
+
|
|
76
|
+
Contrast checking now covers **every** background plane a role emits (`bg`, `bg-muted`, and
|
|
77
|
+
`bg-bold`), not just `bg` — body text on a `card` was previously unguaranteed.
|
|
78
|
+
|
|
3
79
|
## 0.3.2
|
|
4
80
|
|
|
5
81
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ vp create @getvitops:emdash
|
|
|
24
24
|
An [EmDash CMS](https://docs.emdashcms.com) website on Cloudflare Workers,
|
|
25
25
|
with every relevant `@getvitops/*` package pre-wired:
|
|
26
26
|
|
|
27
|
-
- **`@getvitops/astro`** — the `
|
|
27
|
+
- **`@getvitops/astro`** — the `vitops()` integration: design-system CSS
|
|
28
28
|
generated from `design-system.json` (Tailwind v4 format, layout-scoped via
|
|
29
29
|
`css.inject: false`), favicons/PWA from `src/assets/logo.svg`, and the
|
|
30
30
|
web-component runtime copied into `public/vitops/`.
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ styled by the Vitops design system.
|
|
|
6
6
|
- `design-system.json` is the single source of truth for the design system
|
|
7
7
|
(colors, type, spacing, patterns, animations). Never edit
|
|
8
8
|
`src/styles/tailwind.css` — it is generated from the JSON by the
|
|
9
|
-
`
|
|
9
|
+
`vitops()` integration on every dev/build and is gitignored.
|
|
10
10
|
- Content lives in the EmDash database, not in the repo. Query it with
|
|
11
11
|
`getEmDashCollection` / `getEmDashEntry` from `emdash`; render Portable Text
|
|
12
12
|
with `<PortableText />` from `emdash/ui` (the Vitops blocks from
|
|
@@ -39,7 +39,16 @@ styled by the Vitops design system.
|
|
|
39
39
|
auto-merge; merging deploys prod. Only run it when the user explicitly asks
|
|
40
40
|
to promote/ship to production.
|
|
41
41
|
- Sample legal pages (`/terms`, `/privacy`) ship as seeded placeholder content
|
|
42
|
-
— remind the user to replace them before launch.
|
|
42
|
+
— remind the user to replace them before launch. They are deliberately short
|
|
43
|
+
and obviously unfinished; do not "improve" them into something that reads as
|
|
44
|
+
a finished policy, because the risk here is a plausible-looking document
|
|
45
|
+
getting shipped unread.
|
|
46
|
+
To replace them properly, write a site config and run
|
|
47
|
+
`npx vitops legal --format portable-text --out ./legal`, then paste each
|
|
48
|
+
document's blocks into the page in the admin. That renders a real policy from
|
|
49
|
+
what the site actually does — the analytics provider it uses, the fields its
|
|
50
|
+
forms collect, where it deploys — rather than from guesses. It still needs
|
|
51
|
+
review before launch.
|
|
43
52
|
|
|
44
53
|
## Docs MCP servers
|
|
45
54
|
|
|
@@ -37,6 +37,17 @@ the seed: home, about, terms (`/terms`), and privacy policy (`/privacy`).
|
|
|
37
37
|
Until then the home route shows a friendly empty state. Unknown paths render
|
|
38
38
|
`src/pages/404.astro`.
|
|
39
39
|
|
|
40
|
+
The two legal pages are placeholders. To generate real ones from what your site
|
|
41
|
+
actually does, describe it in a site config and run:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx vitops legal --format portable-text --out ./legal
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then paste each document's blocks into the matching page in the admin. The
|
|
48
|
+
output is generated from your config, not legal advice — have it reviewed
|
|
49
|
+
before you publish.
|
|
50
|
+
|
|
40
51
|
## Deploy
|
|
41
52
|
|
|
42
53
|
```bash
|
|
@@ -132,7 +143,7 @@ and media in the storage backend (bucket/directory copy).
|
|
|
132
143
|
## The design system
|
|
133
144
|
|
|
134
145
|
`design-system.json` is the single source of truth for colors, type, spacing,
|
|
135
|
-
shadows, patterns, and animations. The `
|
|
146
|
+
shadows, patterns, and animations. The `vitops()` integration regenerates
|
|
136
147
|
`src/styles/tailwind.css` from it on dev/build (the file is gitignored — edit
|
|
137
148
|
the JSON, not the CSS). `Layout.astro` imports the stylesheet so the admin
|
|
138
149
|
routes stay unstyled by it.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from '@astrojs/react';
|
|
2
|
-
import
|
|
2
|
+
import vitops from '@getvitops/astro';
|
|
3
3
|
import { vitopsEmdash, vitopsHosting } from '@getvitops/emdash';
|
|
4
4
|
import { defineConfig } from 'astro/config';
|
|
5
5
|
import emdash from 'emdash/astro';
|
|
@@ -32,7 +32,7 @@ export default defineConfig({
|
|
|
32
32
|
// which emits the web-component runtime tags.
|
|
33
33
|
plugins: [vitopsEmdash()],
|
|
34
34
|
}),
|
|
35
|
-
|
|
35
|
+
vitops({
|
|
36
36
|
favicon: {
|
|
37
37
|
source: 'src/assets/logo.svg',
|
|
38
38
|
name: 'My EmDash Site',
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"warning": "sun",
|
|
19
19
|
"danger": "rose"
|
|
20
20
|
},
|
|
21
|
-
"utilities": ["bg", "text", "border"]
|
|
21
|
+
"utilities": ["bg", "text", "icon", "border"]
|
|
22
22
|
},
|
|
23
23
|
"shadows": {
|
|
24
24
|
"sm": "0 1px 2px rgb(0 0 0 / 0.08)",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"patterns": {
|
|
50
50
|
"defaults": {
|
|
51
51
|
"ds": "none",
|
|
52
|
-
"b": "1px solid var(--color-surface-
|
|
52
|
+
"b": "1px solid var(--color-bg-surface-x-muted)",
|
|
53
53
|
"br": "0.375rem",
|
|
54
54
|
"p": "1rem",
|
|
55
55
|
"fs": "1rem"
|
|
56
56
|
},
|
|
57
|
-
"radii": { "pill": "999px", "circle": "50%"
|
|
57
|
+
"radii": { "pill": "999px", "circle": "50%" },
|
|
58
58
|
"groups": {
|
|
59
59
|
"control": {
|
|
60
60
|
"ds": "var(--ds-default)",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"base": {
|
|
100
100
|
"border-radius": "var(--br-card-group)",
|
|
101
101
|
"padding": "1.5rem",
|
|
102
|
-
"background": "var(--color-surface-
|
|
102
|
+
"background": "var(--color-bg-surface-muted)",
|
|
103
103
|
"border": "var(--b-card-group)",
|
|
104
104
|
"box-shadow": "var(--ds-card-group)"
|
|
105
105
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
2
|
<!-- Placeholder mark — replace with your brand. This file is also the
|
|
3
|
-
favicon/PWA source (see astro.config.mjs →
|
|
3
|
+
favicon/PWA source (see astro.config.mjs → vitops({ favicon })). -->
|
|
4
4
|
<rect width="64" height="64" rx="14" fill="#2e9b73" />
|
|
5
5
|
<path d="M18 24l14 20 14-20" fill="none" stroke="#fff" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
6
6
|
</svg>
|
|
@@ -3,7 +3,7 @@ import VitopsHead from '@getvitops/astro/Head.astro';
|
|
|
3
3
|
import { getMenu, getSiteSettings } from 'emdash';
|
|
4
4
|
import { createPublicPageContext } from 'emdash/page';
|
|
5
5
|
import { EmDashHead } from 'emdash/ui';
|
|
6
|
-
// Design-system CSS, layout-scoped (
|
|
6
|
+
// Design-system CSS, layout-scoped (vitops css.inject: false): only pages
|
|
7
7
|
// rendered through this layout get it — keeps it out of /_emdash/admin, while
|
|
8
8
|
// EmDash previews (rendered through this layout) keep it.
|
|
9
9
|
import '../styles/tailwind.css';
|
|
@@ -126,7 +126,7 @@ const year = new Date().getFullYear();
|
|
|
126
126
|
footer {
|
|
127
127
|
margin-block-start: var(--space-2xl);
|
|
128
128
|
padding-block: var(--space-l);
|
|
129
|
-
border-block-start: 1px solid var(--
|
|
129
|
+
border-block-start: 1px solid var(--color-border-neutral);
|
|
130
130
|
}
|
|
131
131
|
</style>
|
|
132
132
|
</body>
|