@getvitops/emdash 2.0.0-alpha.4 → 2.0.0-alpha.5
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 +23 -0
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
- package/src/astro/MegaPanel.astro +25 -0
- package/src/astro/index.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @getvitops/emdash
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4d94c8b: **Added: `site.chrome` — a configurable masthead and nav behaviour.** Non-breaking.
|
|
8
|
+
|
|
9
|
+
- `site.chrome.masthead` (new `@getvitops/config` schema): `position` (`static|sticky|fixed`), `behavior` (`always|hide-on-scroll`), `surface` (`solid|glass|transparent|transparent-until-scrolled`), `tone` (a `colors.roles` key), `layout` (`full|inset|floating`), `width`, `elevation` (`shadow`, `border`, `onScroll`), `height` and `inset`. `height` and `inset` take fluid lengths (`calc()`, `clamp()`, `min()`, `max()`, with `cqi`/`vw`/… units), checked against a closed grammar because they are written into CSS. `validateConfig` rejects a `tone` or `shadow` the design system does not define (only when the default theme states them directly, not via `extends`).
|
|
10
|
+
- `site.chrome.nav`: `compact` (`drawer|dropdown`), `drawerSide`, `breakpoint`/`mobileBreakpoint`/`megaBreakpoint`, `depth`, `megaDepth`.
|
|
11
|
+
- `<Masthead config={site}>` (`@getvitops/astro`, slots `brand`/default/`actions`) and `resolveMasthead()` / `resolveNavOptions()`. A prop overrides one field per layout. The key is `chrome`/`masthead` on purpose: `<header>` is valid in any section and `banner` already means the announcement bar and the landmark role.
|
|
12
|
+
- `<SiteNav>` gains `compact="dropdown"` (a columnar panel anchored under the toggle), `drawerSide` (previously hardcoded to the end edge in Astro), `megaDepth` and `megaPanel`. `.sitenav--mega` now styles second-level items as column headings and has an optional featured column.
|
|
13
|
+
- `@getvitops/emdash`: `VitopsMegaPanel` fills that column from the widget area `mega-<item url slug>` (or a `mega-area:<name>` class on the menu item). No area means no column.
|
|
14
|
+
- `@getvitops/create` (emdash template): the layout renders through `<Masthead>`; `site.json` ships a sticky glass masthead with a shadow once scrolled. The hand-written `.navbar { block-size: 64px }` is gone (use `masthead.height`).
|
|
15
|
+
- CSS (`patterns/masthead.css`, `patterns/sitenav.css`): **all formats**, including tailwind, where the patterns are inlined into `@layer components`. Hide-on-scroll and the `*-on-scroll` states are `scroll-state()` container queries that only subtract from a settled (solid, elevated, visible) bar, so a browser without them (Firefox today) shows that bar rather than a transparent one. A sticky or fixed masthead sets `--header-offset` / `--top-offset` so anchors land below it.
|
|
16
|
+
- `@getvitops/generator`: new `TIERS.masthead`; `TIERS.sitenav` documents the new props.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [785b8b3]
|
|
21
|
+
- Updated dependencies [bb61a35]
|
|
22
|
+
- Updated dependencies [4d94c8b]
|
|
23
|
+
- @getvitops/utils@8.3.0-alpha.5
|
|
24
|
+
- @getvitops/generator@8.3.0-alpha.5
|
|
25
|
+
|
|
3
26
|
## 2.0.0-alpha.4
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getvitops/emdash",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"description": "EmDash CMS native plugin for the Vitops design system — Portable Text block types editors can insert from the admin, rendered with the design-system web components and CSS framework.",
|
|
5
5
|
"homepage": "https://docs.vitops.ca",
|
|
6
6
|
"bugs": "https://github.com/getvitops/design-system/issues",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@getvitops/generator": "8.3.0-alpha.
|
|
35
|
-
"@getvitops/utils": "8.3.0-alpha.
|
|
34
|
+
"@getvitops/generator": "8.3.0-alpha.5",
|
|
35
|
+
"@getvitops/utils": "8.3.0-alpha.5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@astrojs/cloudflare": "^14.0.0",
|
|
39
39
|
"@astrojs/react": "^7.0.0",
|
|
40
40
|
"@emdash-cms/cloudflare": "^1.4.0",
|
|
41
|
-
"@getvitops/astro": "8.3.0-alpha.
|
|
42
|
-
"@getvitops/core": "8.3.0-alpha.
|
|
41
|
+
"@getvitops/astro": "8.3.0-alpha.5",
|
|
42
|
+
"@getvitops/core": "8.3.0-alpha.5",
|
|
43
43
|
"@types/react": "^19.3.0",
|
|
44
44
|
"@types/react-dom": "^19.3.0",
|
|
45
45
|
"astro": "^7.4.4",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* The extra column of a mega-menu panel, from an EmDash widget area. Pass it to `<SiteNav>`:
|
|
4
|
+
*
|
|
5
|
+
* import { VitopsMegaPanel } from '@getvitops/emdash/astro';
|
|
6
|
+
* <SiteNav {...nav} megaPanel={VitopsMegaPanel} />
|
|
7
|
+
*
|
|
8
|
+
* `<SiteNav>` renders it inside each top-level item's panel on the `primary-mega` tier, passing
|
|
9
|
+
* `{ item }`. The area is named `mega-<last URL segment>` (`/services/` → `mega-services`), or
|
|
10
|
+
* by a `mega-area:<name>` class on the menu item, which wins because labels are translated and
|
|
11
|
+
* so unstable. An item with neither, or whose area is missing or empty, renders nothing — an
|
|
12
|
+
* editor adds a column by creating the widget area, with no code change.
|
|
13
|
+
*/
|
|
14
|
+
import { megaAreaName, type NavItem } from '@getvitops/astro/components/sitenav.ts';
|
|
15
|
+
import WidgetArea from './WidgetArea.astro';
|
|
16
|
+
|
|
17
|
+
interface Props {
|
|
18
|
+
item: NavItem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { item } = Astro.props;
|
|
22
|
+
const name = megaAreaName(item);
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
{name && <WidgetArea name={name} level={3} class="sitenav__mega-area" />}
|
package/src/astro/index.ts
CHANGED
|
@@ -67,6 +67,9 @@ export const blockTypeComponents = {
|
|
|
67
67
|
/** The framework-styled widget area, for a site layout (the block form is `vitops_widgetArea`). */
|
|
68
68
|
export { default as VitopsWidgetArea } from './WidgetArea.astro';
|
|
69
69
|
|
|
70
|
+
/** A mega-menu panel's extra column from a widget area, for `<SiteNav megaPanel={VitopsMegaPanel} />`. */
|
|
71
|
+
export { default as VitopsMegaPanel } from './MegaPanel.astro';
|
|
72
|
+
|
|
70
73
|
/**
|
|
71
74
|
* `themeAttrs('surface')` → `{ class, style }` for the layout's `<body>` (or any element a site owns):
|
|
72
75
|
* the same backdrop-and-readable-text every block's `theme` field gives, from the site's own roles.
|