@getvitops/core 8.3.0-alpha.1 → 8.3.0-alpha.3
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 +30 -0
- package/css/patterns/card.css +6 -0
- package/css/patterns/counter.css +17 -0
- package/css/patterns/logos.css +20 -0
- package/css/patterns/sitenav.css +19 -1
- package/css/patterns/stats.css +3 -0
- package/css/patterns/steps.css +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @getvitops/core
|
|
2
2
|
|
|
3
|
+
## 8.3.0-alpha.3
|
|
4
|
+
|
|
5
|
+
## 8.3.0-alpha.2
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 0a47856: Build correctness and gaps from the second upstream round.
|
|
10
|
+
|
|
11
|
+
- **`@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.
|
|
12
|
+
- **`@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>`.
|
|
13
|
+
- **`@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).
|
|
14
|
+
- **`@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).
|
|
15
|
+
- **`@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.
|
|
16
|
+
- **`@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.
|
|
17
|
+
- **`@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).
|
|
18
|
+
- **`@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..
|
|
19
|
+
- **`@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).
|
|
20
|
+
- **`@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>`.
|
|
21
|
+
- **`@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.
|
|
22
|
+
- **`@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`.
|
|
23
|
+
- **`@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).
|
|
24
|
+
- **`@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).
|
|
25
|
+
- **`@getvitops/create`:** the template's `site.json` lists its contact form under `site.templates`, so the privacy policy inventory and the new check agree.
|
|
26
|
+
- **`@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.
|
|
27
|
+
- **`@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.
|
|
28
|
+
- **`@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.
|
|
29
|
+
- **`@getvitops/utils`: `hasFormDelivery`** (`@getvitops/utils/notify`): the one test for "has this form anywhere to go", used by `check-prerender`.
|
|
30
|
+
- **`@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.
|
|
31
|
+
- **`@getvitops/create`:** the template redirects `/home` to `/`, and the guides use `vp exec` instead of `vpx`.
|
|
32
|
+
|
|
3
33
|
## 8.3.0-alpha.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/css/patterns/card.css
CHANGED
|
@@ -33,3 +33,9 @@ wc-cards {
|
|
|
33
33
|
[data-card-link] {
|
|
34
34
|
cursor: pointer;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/* A card's title keeps the heading role's size unless `--card-title-size` is set on the block
|
|
38
|
+
(its `style` field). The role utility reads --heading-fs; `inherit` passes through the site's. */
|
|
39
|
+
.card__title {
|
|
40
|
+
--heading-fs: var(--card-title-size, inherit);
|
|
41
|
+
}
|
package/css/patterns/counter.css
CHANGED
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
* `display: none`/`visibility: hidden` stops contributing to the accessible
|
|
18
18
|
* name, and that name must read the final value for the whole animation, not
|
|
19
19
|
* just at rest.
|
|
20
|
+
*
|
|
21
|
+
* The visually-hidden rule is restated here for `.counter__value.sr-only` rather than left to the
|
|
22
|
+
* utility: a site whose build does not emit `.sr-only` (the tailwind format only generates
|
|
23
|
+
* utilities it sees used, and does not scan packages) would otherwise show the figure twice
|
|
24
|
+
* while it counts, once as text and once as the animation.
|
|
20
25
|
*/
|
|
21
26
|
@property --_n {
|
|
22
27
|
syntax: '<number>';
|
|
@@ -28,6 +33,18 @@
|
|
|
28
33
|
display: none;
|
|
29
34
|
}
|
|
30
35
|
|
|
36
|
+
.counter__value.sr-only {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inline-size: 1px;
|
|
39
|
+
block-size: 1px;
|
|
40
|
+
margin: -1px;
|
|
41
|
+
padding: 0;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
clip-path: inset(50%);
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
border: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
wc-counter[running] .counter__presentation {
|
|
32
49
|
display: inline;
|
|
33
50
|
animation: counter-run var(--counter-duration, 1.2s) var(--counter-easing, var(--custom-ease-out))
|
package/css/patterns/logos.css
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Each item is a plain image, or a link around one. Marks are normalised to a common
|
|
7
7
|
* height rather than a common width, because logos vary far more in aspect ratio than
|
|
8
8
|
* in how tall they should read. `--grayscale` quiets them until hover or focus.
|
|
9
|
+
*
|
|
10
|
+
* An entry with no image is its name set as text (`.logos__name`): a partner without a wordmark
|
|
11
|
+
* still belongs in the row. The name is sized from the same `--logos-height` so it reads as a mark.
|
|
9
12
|
*/
|
|
10
13
|
.logos {
|
|
11
14
|
display: flex;
|
|
@@ -30,6 +33,23 @@
|
|
|
30
33
|
object-fit: contain;
|
|
31
34
|
}
|
|
32
35
|
|
|
36
|
+
.logos__name {
|
|
37
|
+
font-size: calc(var(--logos-height, 2.5rem) * 0.55);
|
|
38
|
+
line-height: 1.1;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
text-align: center;
|
|
41
|
+
text-wrap: balance;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.logos--grayscale .logos__item .logos__name {
|
|
45
|
+
opacity: 0.7;
|
|
46
|
+
transition: opacity 0.2s;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.logos--grayscale .logos__item:is(:hover, :focus-within) .logos__name {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
&.logos--grayscale .logos__item img {
|
|
34
54
|
filter: grayscale(1);
|
|
35
55
|
opacity: 0.7;
|
package/css/patterns/sitenav.css
CHANGED
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
/* ── In-page menu (`
|
|
539
|
+
/* ── In-page menu (`vitops_nav` block) ─────────────────────────────────────────
|
|
540
540
|
*
|
|
541
541
|
* A menu read in the body of a page — a site map, a section's links, footer-style columns —
|
|
542
542
|
* as plain nested lists. No disclosure and no drawer: that is the header's job (`.sitenav`).
|
|
@@ -613,6 +613,14 @@
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
+
/* Header buttons that are not menu items (`<SiteNav><a slot="actions" class="cta">…`). */
|
|
617
|
+
.sitenav__actions {
|
|
618
|
+
display: flex;
|
|
619
|
+
flex-wrap: wrap;
|
|
620
|
+
align-items: center;
|
|
621
|
+
gap: 0.5rem;
|
|
622
|
+
}
|
|
623
|
+
|
|
616
624
|
/* ── Footer (`<SiteFooter>`) ───────────────────────────────────────────────── */
|
|
617
625
|
.sitefooter {
|
|
618
626
|
margin-block-start: var(--space-2xl, 3rem);
|
|
@@ -639,6 +647,16 @@
|
|
|
639
647
|
gap: 0.25rem 1.25rem;
|
|
640
648
|
}
|
|
641
649
|
|
|
650
|
+
.sitefooter__heading {
|
|
651
|
+
margin: 0 0 0.5rem;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/* A column from a menu item with children: a heading over a stacked list. */
|
|
655
|
+
.sitefooter__list--column {
|
|
656
|
+
flex-direction: column;
|
|
657
|
+
gap: 0.125rem;
|
|
658
|
+
}
|
|
659
|
+
|
|
642
660
|
.sitefooter__link {
|
|
643
661
|
color: inherit;
|
|
644
662
|
text-decoration: underline;
|
package/css/patterns/stats.css
CHANGED
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.stats__figure {
|
|
37
|
+
/* Display size by default; --stats-figure-size on the block overrides it (the role utility
|
|
38
|
+
reads --display-fs). `inherit` passes through whatever the site set for the role. */
|
|
39
|
+
--display-fs: var(--stats-figure-size, inherit);
|
|
37
40
|
color: var(--tone-fg, inherit);
|
|
38
41
|
font-variant-numeric: tabular-nums;
|
|
39
42
|
}
|
package/css/patterns/steps.css
CHANGED
|
@@ -69,6 +69,13 @@
|
|
|
69
69
|
.steps__text {
|
|
70
70
|
margin: 0;
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
/* A step title is a sub-heading, not a section heading: one notch down from the role's size.
|
|
74
|
+
Set --steps-title-size on the block (its `style` field) to change it. The role utility reads
|
|
75
|
+
--heading-fs, so this sets the property it already consumes rather than fighting its layer. */
|
|
76
|
+
.steps__title {
|
|
77
|
+
--heading-fs: var(--steps-title-size, var(--text-l, 1.2rem));
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
/* Side by side once there is room: the marker sits above its text and the line runs across. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getvitops/core",
|
|
3
|
-
"version": "8.3.0-alpha.
|
|
3
|
+
"version": "8.3.0-alpha.3",
|
|
4
4
|
"description": "The Vitops design-system framework — CSS partials, Lit web components, and browser polyfills.",
|
|
5
5
|
"homepage": "https://docs.vitops.ca",
|
|
6
6
|
"bugs": "https://github.com/getvitops/design-system/issues",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@getvitops/utils": "8.3.0-alpha.
|
|
32
|
+
"@getvitops/utils": "8.3.0-alpha.3",
|
|
33
33
|
"@lit-labs/signals": "^0.3.0",
|
|
34
34
|
"@oddbird/css-anchor-positioning": "^0.9.0",
|
|
35
35
|
"@oddbird/popover-polyfill": "^0.7.0",
|