@getvitops/astro 8.3.0-alpha.0 → 8.3.0-alpha.2

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,5 +1,79 @@
1
1
  # @getvitops/astro
2
2
 
3
+ ## 8.3.0-alpha.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 0a47856: Build correctness and gaps from the second upstream round.
8
+
9
+ - **`@getvitops/emdash`: fixes a circular import that emptied the plugin block map in the static build.** `Section.astro` and `WidgetArea.astro` imported `emdash/ui` statically, which imports `virtual:emdash/block-components`, which is `@getvitops/emdash/astro` again. Depending on import order, every `vitops_*` block inside a section body was dropped from prerendered pages with only a `PortableText [components.type] is missing …` warning. Both now import it lazily, and a test fails if any renderer imports `emdash/ui` statically. No code change needed in sites.
10
+ - **`@getvitops/cli`: `vitops emdash build`** runs `astro build` and then `check-prerender`, and fails when the build reports a block type with no component (reported once per type). The template's `build`, `deploy` and `deploy:dev` scripts use it; existing sites replace `astro build && vitops emdash check-prerender` with `vitops emdash build`. `check-prerender` also warns (fails with `--strict`) on a page without exactly one `<h1>`.
11
+ - **`@getvitops/emdash`: `vitops_hero` and `vitops_section` heading level** accepts `h1`–`h6` and `p` (a heading that is styled but not in the outline). The hero defaults to `h1`; set the level to `2` on a page whose layout already renders an `h1` (the template's seed does).
12
+ - **`@getvitops/emdash`: `vitops_logos`** shows an entry's name as text (`.logos__name`) when it has no image. `@getvitops/core` adds the rule (all formats).
13
+ - **`@getvitops/emdash`: an empty content widget** (no text, no blocks) no longer renders its title, and an area whose widgets are all empty renders nothing.
14
+ - **`@getvitops/create`:** the template's `pages` collection gets `urlPattern: "/{slug}"` (the sitemap listed `/pages/<slug>`, which 404s; existing sites change it under Content Types), and `.gitignore` ignores only `src/styles/tailwind.css` and `tokens.json`, so site CSS kept in `src/styles/` is committed.
15
+ - **`@getvitops/emdash`: per-item colour.** The rows of `vitops_cards`, `vitops_stats`, `vitops_steps` and the hero's `cards` take their own `tone` / `color` (blank inherits the block's), so one block can hold a pine item and an amber one. Hero cards also take an `eyebrow` and a button (`ctaLabel` / `ctaHref`; with a button the card is no longer a stretched link).
16
+ - **`@getvitops/generator` / `@getvitops/emdash`: solid fills read.** The generator emits `--color-<hue>-<step>-on` for every step of every hue, the foreground for a fill at that step picked by the same APCA rule as `text-on-<role>` (css and tailwind formats, a plain `:root`, not `@theme`). A block fill chosen by `color` (hue and step) uses it instead of a fixed white..
17
+ - **`@getvitops/core`: `.counter__value.sr-only`** hides itself, so a build that never emitted the `.sr-only` utility no longer shows a counting figure twice (all formats).
18
+ - **`@getvitops/astro` / `@getvitops/core`: `SiteFooter` groups.** A top-level item of the `footer-sitemap` menu with children becomes a column (its label is the heading, its children the links, one level only); childless items stay in the flat list. Each column is a named `<nav>`.
19
+ - **`@getvitops/astro`: planned links and header buttons.** A menu item with `draft` in its CSS classes stays in the menu but is not rendered (at every level, in the header and the footer). `<SiteNav>` has an `actions` slot for header buttons that are not menu items, and an item with `cta` in its CSS classes renders as a button.
20
+ - **`@getvitops/cli`: `check-prerender` warnings** (fail with `--strict`): links to pages the build did not produce, a form with no delivery address (no `site.notifications.email`, location `email` or `site.crm`), and form fields missing from every `site.templates` form entry (the generated privacy policy reads those). It reads `./site.json`, or `--site=<path>`. `vitops setup … --dry-run` is accepted as `--dry`.
21
+ - **`@getvitops/emdash` / `@getvitops/astro`: "tick any number" form field** (`vitops_form` field kind `checkboxes`): a fieldset of checkboxes sharing one name. The conversion route joins repeated values (`IT, Marketing`) instead of keeping the last. The "required" toggle is not applied to the group (HTML cannot require one of several).
22
+ - **`@getvitops/core`: size hooks.** `.steps__title`, `.stats__figure` and `.card__title` read `--steps-title-size` (default one step below `heading`), `--stats-figure-size` and `--card-title-size`, set on the block through its `style` field. They set the `--heading-fs` / `--display-fs` properties the type-role utilities already read, so no extra class or prop is needed (all formats).
23
+ - **`@getvitops/create`:** the template's `site.json` lists its contact form under `site.templates`, so the privacy policy inventory and the new check agree.
24
+ - **`@getvitops/emdash`: `theme` on every block, on widget areas and on your own markup.** A `theme` select (`<role>` tinted, `<role>:solid` filled, populated from the site's roles by a new `themes/list` route) is a common field on every `vitops_*` block, applied to the block's own root with the role's computed readable text. `<VitopsWidgetArea theme="…">` takes the same, and `themeAttrs('surface')` gives `{ class, style }` for a layout `<body>`. `vitops_section`'s existing `theme` now goes through the same path.
25
+ - **`@getvitops/cli` / `@getvitops/emdash`: pages with a dropped block fail the build.** `vitops_section` and widget areas emit an invisible `<template data-vitops-unrendered="…">` for any body block with no renderer, and `check-prerender` fails the page naming the types (nested bodies only; `vitops emdash build` also scans the build log, which covers top-level bodies). A regression test imports the plugin entry first with a mock of the real virtual module, so the old import cycle fails it.
26
+ - **`@getvitops/emdash`: `formTemplateFromBlock(block)`** turns a saved `vitops_form` value into a `site.templates` form entry (names as submitted, a `checkboxes` field as a `checkbox` with options), to paste into `site.json` so the generated privacy policy lists what the form collects. The build cannot read the CMS database, so this is run by hand; `check-prerender` warns when fields are missing.
27
+ - **`@getvitops/utils`: `hasFormDelivery`** (`@getvitops/utils/notify`): the one test for "has this form anywhere to go", used by `check-prerender`.
28
+ - **`@getvitops/emdash`:** a `color` hue tint now flips with the colour scheme (`light-dark()`); hero option cards sit at `h2` under an `h1` hero; menu items also accept `hidden: true` (same as the `draft` class); `vitops docs blocks` documents `theme`, the per-row colours, the `--<role>-fs` type-size hook and the form checks.
29
+ - **`@getvitops/create`:** the template redirects `/home` to `/`, and the guides use `vp exec` instead of `vpx`.
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [0a47856]
34
+ - Updated dependencies [0a47856]
35
+ - @getvitops/generator@8.3.0-alpha.2
36
+ - @getvitops/core@8.3.0-alpha.2
37
+ - @getvitops/utils@8.3.0-alpha.2
38
+ - @getvitops/vite@8.3.0-alpha.2
39
+ - @getvitops/config@8.3.0-alpha.2
40
+
41
+ ## 8.3.0-alpha.1
42
+
43
+ ### Minor Changes
44
+
45
+ - 24c568b: Escape hatches on every block, a section theme, widget areas, a badges block, Tailwind scanning of package renderers, and a sturdier `vitops audit`.
46
+
47
+ **@getvitops/emdash**
48
+
49
+ - Every `vitops.*` block and `vitops_section` gains three fields: `anchor` (rendered as the `id`, so `#contact` works), `className` (`class_name` on the section type: block-type slugs are lowercase) and `style`. `style` takes CSS custom properties only (`--p-card: 2rem`); any other declaration, and any value containing `url(`, `@`, `{`, `}` or a backslash, is dropped. With the `tailwind` format a class typed in the CMS only works if the site already uses it. They are applied to the block's own outermost element (the grid `<ul>` for `vitops.cards`), never an extra wrapper, so a block's markup is the same whether or not an editor fills them in.
50
+ - `vitops_section` gains a `theme` select: a role, or `<role>:solid`, with readable text chosen by the generator's contrast rules. It overrides `tone`/`color`/`solid`, which stay for existing content. Other site roles still go through `tone`.
51
+ - New `vitops.badges` block (a row of `.badge` or `.tag` labels, each with an optional tone, icon and link) and `vitops.widgetArea` block, plus `<VitopsWidgetArea name level />` from `@getvitops/emdash/astro`. A widget area is content defined once under Widgets and shown wherever it is placed. An area cannot hold another area, and an area containing a `core:*` component widget is rendered by EmDash's own renderer.
52
+ - Existing sites: re-run the block-type seed only on a new database; on an existing one add the `theme`, `anchor`, `className` and `style` fields to the `vitops_section` block type in the admin.
53
+
54
+ **@getvitops/create**: the emdash template seeds `announcement` and `pre-footer` widget areas, renders them in `Layout.astro`, and documents when to use a Section, a block or a widget area. Sites scaffolded earlier add the two `<VitopsWidgetArea>` lines and the `widgetAreas` seed entries by hand.
55
+
56
+ **@getvitops/generator / astro / vite** (`tailwind` format only): the Astro integration now adds `@source` lines for `@getvitops/astro` and `@getvitops/emdash`, because Tailwind v4 does not scan `node_modules`; utilities used only by their renderers (`font-display`, `font-caption`, `font-footnote`) were never emitted and the page silently rendered at body size. New `sources` option on `generate()` and the Vite plugin. A site's `src/package-classes.txt` workaround can be deleted. css and bricks: no change.
57
+
58
+ **@getvitops/cli**: `vitops emdash check-prerender` now also warns when a page uses a type-role class (`font-display`, …) the built CSS has no rule for; `--strict` makes it fail. `vitops audit` checks for its optional packages and a Chromium binary before starting the preview server (so a failed run no longer leaves port 4398 busy), stops the server on Ctrl+C and termination, and takes its page list from the built sitemap, then the menus; the guessed defaults (`/privacy`, `/contact`, …) are used only when neither exists.
59
+
60
+ **@getvitops/utils**: the audit helpers behind the above (`preflight`, `fetchSitemapPaths`, `sitemapLocs`, `pathsFromSitemapLocs`).
61
+
62
+ **@getvitops/core** (all formats): new `.block-anchor` rule gives an anchored block `scroll-margin-top: var(--header-offset, 5rem)`; set `--header-offset` to a sticky header's height. New `widget-area.css` partial. No other consumer-facing change.
63
+
64
+ The other fixed-group packages: no consumer-facing change beyond the above.
65
+
66
+ **Also fixed in the emdash template** (`site.json`): it defined only the `display`, `heading` and `body` type roles while the blocks use `title`, `eyebrow`, `lead`, `caption` and `footnote`, so those rendered at body size with no rule behind them. The roles are added with the reference design system's specs. A site scaffolded earlier adds the same five entries under `designSystem.themes.default.typography.roles`; `vitops emdash check-prerender` now names any that are missing.
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [24c568b]
71
+ - @getvitops/generator@8.3.0-alpha.1
72
+ - @getvitops/vite@8.3.0-alpha.1
73
+ - @getvitops/utils@8.3.0-alpha.1
74
+ - @getvitops/core@8.3.0-alpha.1
75
+ - @getvitops/config@8.3.0-alpha.1
76
+
3
77
  ## 8.3.0-alpha.0
4
78
 
5
79
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["MediaOutputKind"],"sources":["../src/analytics.ts","../src/seo.ts","../src/integration.ts","../src/ads.ts","../src/csp.ts","../src/lastmod.ts","../src/seo-defaults.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BY;;;;;;;KAQA;KAEA,0BAA0B,QAAQ;UAE7B;;EAEf;;;;;EAKA,WAAW;;EAEX,SAAS;;UAGM;;EAEf;EACA,WAAW;;UAGI;;EAEf;;EAEA;;;;;;;;;EASA;;UAGe;;E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wBCjEa,cAAc;UAIb;;EAEf;;EAEA;;;;;;;;wBASc,mBAAmB,OAAM;UAOxB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;;;;;;wBAYK,sBAAsB,OAAM;UCpC3B;;EAEf;;EAEA;;EAEA,UAAU;;;;;;;;;wBAUI,cAAc;;wBAad,gBAAgB;;;;;;;;;wBAoDV,WACpB,UAAS,oBACR,SAAS,MAAM,0BAA0B;UC1G3B;;EAEf;;EAEA;;wBAUc,mBACd,QAAQ,QACR,UAAS,4BACR;;;;;wBAmDa,iBACd,YAAY,qBACZ,UAAU,kCACT"}
1
+ {"version":3,"file":"index.d.mts","names":["MediaOutputKind"],"sources":["../src/analytics.ts","../src/seo.ts","../src/integration.ts","../src/ads.ts","../src/csp.ts","../src/lastmod.ts","../src/seo-defaults.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BY;;;;;;;KAQA;KAEA,0BAA0B,QAAQ;UAE7B;;EAEf;;;;;EAKA,WAAW;;EAEX,SAAS;;UAGM;;EAEf;EACA,WAAW;;UAGI;;EAEf;;EAEA;;;;;;;;;EASA;;UAGe;;EAEf;;EAEA;;UAGe;EACf,2BAA2B;EAC3B,mBAAmB;EACnB,SAAS;EACT,qBAAqB;;EAErB,WAAW;;;;;;;;;;UAWI;;;;;EAKf,aAAa;;EAEb;;;;;;;;;;;;;;;;;UAkBe;;EAEf;EACA,UAAU;EACV;;EAEA;EACA,UAAU;;;;;;EAMV;;EAEA;EACA;EACA,OAAO;;;UAIQ,oBAAoB;EACnC;;UAGe;EACf,MAAM;;EAEN;;EAEA;;UAGe;;EAEf;;;;;;;;;EASA,cAAc;IAAiB;;;EAE/B,4BAA4B;;;;;;;;;wBAiNd,iBACd,MAAM,uCACN,MAAK,0BACJ;;wBA2Ca,kBAAkB,MAAM,aAAa;;;;;;;;;;;;;KC1ZzC;;KAGA;;;;;;;;;;;;UAaK;;EAEf;;;;;;;;;;;;EAY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ENDPOINT, r as resolveTracking, t as TRACKING_COOKIE } from "./tracking-Cb3A0BrC.mjs";
3
+ import { createRequire } from "node:module";
3
4
  import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
5
  import { dirname, join, relative, resolve } from "node:path";
5
6
  import { fileURLToPath } from "node:url";
@@ -385,6 +386,40 @@ function localeConsistencyWarnings(site, i18n) {
385
386
  return warnings;
386
387
  }
387
388
 
389
+ // src/tailwind-sources.ts
390
+ /**
391
+ * The `@source` paths a site's Tailwind needs so classes used only by installed packages'
392
+ * renderers are generated. Tailwind v4 does not scan `node_modules`, so `font-display` (used by
393
+ * `vitops_stats`) or a class in an `@getvitops/astro` component produced no rule and the page
394
+ * rendered at body size with no error anywhere.
395
+ *
396
+ * Resolution is injected so the choice is testable; an absent package is skipped, not an error —
397
+ * a site without `@getvitops/emdash` has nothing of its to scan.
398
+ */
399
+ /** Package → directory (relative to the package root) holding the markup that uses classes. */
400
+ const RENDERER_DIRS = {
401
+ "@getvitops/astro": "src/components",
402
+ "@getvitops/emdash": "src/astro"
403
+ };
404
+ /**
405
+ * @param cssDir directory of the emitted `tailwind.css`; `@source` paths are relative to it.
406
+ * @param resolvePackageJson returns the absolute path of a package's `package.json`, or throws.
407
+ */
408
+ function tailwindSources(cssDir, resolvePackageJson) {
409
+ const out = [];
410
+ for (const [pkg, dir] of Object.entries(RENDERER_DIRS)) {
411
+ let manifest;
412
+ try {
413
+ manifest = resolvePackageJson(pkg);
414
+ } catch {
415
+ continue;
416
+ }
417
+ const rel = relative(cssDir, join(dirname(manifest), dir)).split("\\").join("/");
418
+ out.push(rel.startsWith(".") ? rel : `./${rel}`);
419
+ }
420
+ return out;
421
+ }
422
+
388
423
  // src/seo-defaults.ts
389
424
  /** Drop `undefined`/empty-string keys so the result carries only what the config actually states. */
390
425
  function compact(value) {
@@ -701,7 +736,7 @@ const REVIEWS_ID = "virtual:getvitops/reviews";
701
736
  const RESOLVED_REVIEWS_ID = `\0${REVIEWS_ID}`;
702
737
  /**
703
738
  * The committed `.vitops/reviews.json` cache as a build-time import, for server-rendered
704
- * components that cannot read the filesystem (the EmDash `vitops.reviews` block runs in a
739
+ * components that cannot read the filesystem (the EmDash `vitops_reviews` block runs in a
705
740
  * Worker — and, with pages prerendered, inside the Cloudflare adapter's local workerd).
706
741
  *
707
742
  * **An absent or unusable file serves an EMPTY cache, never an error.** A fresh scaffold has
@@ -1123,7 +1158,8 @@ function vitops(opts = {}) {
1123
1158
  } } : {},
1124
1159
  ...opts.media ? { media: opts.media } : {},
1125
1160
  ...opts.site ? { site: opts.site } : {},
1126
- ...opts.css.systemColorScheme != null ? { systemColorScheme: opts.css.systemColorScheme } : {}
1161
+ ...opts.css.systemColorScheme != null ? { systemColorScheme: opts.css.systemColorScheme } : {},
1162
+ ...format === "tailwind" ? { sources: tailwindSources(resolve(root, out), (pkg) => createRequire(resolve(root, "package.json")).resolve(`${pkg}/package.json`)) } : {}
1127
1163
  })];
1128
1164
  if (format === "tailwind") {
1129
1165
  let tailwindcss;