@getvitops/astro 2.1.0 → 3.0.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,5 +1,183 @@
1
1
  # @getvitops/astro
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 6e68ace: **Breaking:** the site config is now a three-section `Config` — `designSystem`,
8
+ `organization`, `site`.
9
+
10
+ The flat `SiteConfig` held the company (`organization`, `contact`, `locations`) and the
11
+ deployment (`analytics`, `environments`, `seo`, `legal`) as peers, so no single noun
12
+ described it, and a second site sharing the same company had no way to say so. The three
13
+ sections split those apart: several sites can now carry one `organization` and differ only
14
+ in `site`.
15
+
16
+ **Migrating.** `designSystem` stays at the root, and the fields already under
17
+ `organization` stay where they are. Everything else moves into one of two sections:
18
+ - → `site`: `defaultLocale`, `locales`, `domains`, `dns`, `cloudflare`, `environments`,
19
+ `abTesting`, `fonts`, `tags`, `postTypes`, `galleries`, `testimonials`, `templates`,
20
+ `navigation`, `seo`, `analytics`, `notifications`, `tracking`, `security`, `legal`,
21
+ `icons`, `favicon`, `deployment`
22
+ - → `organization`: `contact`, `primaryLocation`, `locations`, `services`, `links`
23
+
24
+ You do not have to work this out from the list: `vitops validate` detects a pre-3.0 flat
25
+ config and prints every move by name, rather than reporting a dozen unknown keys.
26
+
27
+ ```jsonc
28
+ {
29
+ "designSystem": {
30
+ "themes": {
31
+ "default": {
32
+ /* … */
33
+ },
34
+ },
35
+ },
36
+ "organization": {
37
+ "name": "Acme",
38
+ "contact": "hq",
39
+ "locations": {
40
+ "hq": {
41
+ /* … */
42
+ },
43
+ },
44
+ },
45
+ "site": {
46
+ "defaultLocale": "en",
47
+ "domains": {
48
+ /* … */
49
+ },
50
+ "analytics": {
51
+ /* … */
52
+ },
53
+ },
54
+ }
55
+ ```
56
+
57
+ **Renamed exports** (`@getvitops/generator`): `SiteConfigSchema` → `ConfigSchema`,
58
+ `SiteConfig` → `Config`, `validateSite` → `validateConfig`, `resolveSiteConfig` →
59
+ `resolveConfig`, `isSiteConfig` → `isConfig`, `siteJsonSchema` → `configJsonSchema`,
60
+ `SITE_SCHEMA_URL` → `CONFIG_SCHEMA_URL`, `SiteValidationResult` →
61
+ `ConfigValidationResult`. `ResolvedInput.site` is now `ResolvedInput.config`. New:
62
+ `OrganizationConfig` and `SiteSection` for the two sections.
63
+
64
+ **Renamed schema file:** `@getvitops/generator/site.schema.json` →
65
+ `@getvitops/generator/config.schema.json`. Update the `$schema` key in your config.
66
+
67
+ Option names are unchanged — `vitops({ site: { input } })`, the Vite plugin's `site`,
68
+ and `generate({ site })` still point at the config file.
69
+
70
+ **The Astro integration is now `vitops()`, not `getvitops()`.** It is a default export,
71
+ so the name is yours and nothing breaks on upgrade, but every example now reads
72
+ `import vitops from '@getvitops/astro'` — matching the Vite plugin, which has always been
73
+ `vitops`. The `@getvitops/*` package scope and the internal `virtual:getvitops/*` module
74
+ ids are unchanged; neither is an import name.
75
+
76
+ **Added:** a generated config authoring reference — `vitops docs config`, `docs/config.md`
77
+ in the OKF bundle, and _Config reference_ on the docs site. It is walked from the published
78
+ JSON Schema by the same helper that renders the `design-system.json` reference, so it
79
+ cannot describe a field validation does not accept.
80
+
81
+ - b115993: Nav shells, a top-layer animation driver, and a pile of fixes to things that never worked
82
+
83
+ ### Breaking
84
+ - **Two custom elements renamed.** `<copy-button>` → `<wc-copy>`, `<multi-field>` →
85
+ `<wc-multifield>`. Update your markup. The Bricks element keys
86
+ (`vitops-copy-button`, `vitops-multi-field`) are **unchanged**, so elements already
87
+ placed on a Bricks page keep working; so are the `--multi-field-*` custom properties
88
+ and the `multi-field-*` events.
89
+ - **`<details>` now animates open and closed** where `prefers-reduced-motion` allows.
90
+ It was previously instant by deliberate choice — the transition used to deadlock the
91
+ disclosure shut. Re-verified on Chrome 149 with a real click; both `block-size` and
92
+ `content-visibility` must stay in the transition list, and dropping the latter
93
+ reproduces the deadlock.
94
+ - **Drawers and dialogs now animate on close.** Both drove their entry with
95
+ `animation:` on `[open]`, which by construction plays once — so the close was
96
+ instant. They now use the top-layer driver and animate both ways.
97
+ - **`.rhythm` gives every non-heading block heading-spacing before a heading.** The
98
+ pairs used to enumerate `p` (later `p, pre, blockquote, table, dl, ul, ol`), so a
99
+ heading after anything else got paragraph spacing. They are now defined by what a
100
+ heading _is_ — `h1`–`h6` plus the `font-display` / `font-title` / `font-heading` type
101
+ roles — and inverted to `:not(<heading>) + <heading>`. Expect slightly more space
102
+ above headings that follow a code block, table, figure-like `<div>` or component.
103
+ - **`popover.css` no longer pins `[popover]:popover-open { opacity: 1 }`.** It never
104
+ animated anything on its own, but it outranked `.transition` and made every
105
+ top-layer fade impossible. Removing it is what lets the driver work.
106
+ - **`nav.css`'s `.drawer-menu` timing** now follows `--animation-duration` /
107
+ `--custom-ease-out` instead of hand-set 0.4s / 0.7s.
108
+
109
+ ### Fixed
110
+ - **`.sitenav--bp-sm` dropdowns could never open.** Its desktop block had drifted onto
111
+ an older markup shape, selecting `.sitenav__disclosure > .sitenav__submenu` where the
112
+ submenu is the disclosure's _sibling_. The four "intentionally parallel" breakpoint
113
+ blocks are now one shared block behind a style query — `md`/`lg`/`xl` were
114
+ byte-identical and only `sm` had rotted, which is exactly the drift the arrangement
115
+ invited. 583 → 361 lines.
116
+ - **Hover dropdowns rendered off-screen.** A closed popover is not in the top layer but
117
+ keeps the UA's `position: fixed`, and `.dropdown--show-on-hover` reset only `inset` —
118
+ so the panel faithfully faded in ~3300px from its trigger. Now anchored to it, and it
119
+ follows on scroll. Affects `.split-link--show-on-hover` too.
120
+ - **Horizontal overflow on narrow screens.** `.centered > *` floors at
121
+ `min-inline-size: 0`; `body` gets `overflow-wrap: break-word`; `patterns/code.css`
122
+ gains the `pre` rules it never had (`max-inline-size: 100%`, `overflow-x: auto`) and
123
+ gives inline `<code>` `overflow-wrap: anywhere`. Note a scroll container does _not_
124
+ zero its min-content contribution in Chrome, which is what made a single `<pre>` hold
125
+ a 390px viewport open at 797px.
126
+ - **`.split-<a>-<b>` now publishes `--_flex-direction: row`.** Only `.flex-*` did, so
127
+ `class="split flex-col md-split-1-2"` left the variable reading `column` at every
128
+ width and a nested `.grouped` collapsed its borders on the wrong axis.
129
+ - **`.toc-layout` uses `minmax(0, 1fr)`** instead of a bare `1fr`, whose automatic
130
+ minimum is min-content.
131
+
132
+ ### Added
133
+ - **`patterns/navshell.css` + `<NavShell>` / `<NavShellToggle>`** — a navigation aside
134
+ beside content at width, collapsing to a toggle and drawer below it. **It nests**: a
135
+ site nav wrapping an on-this-page nav, each promoting at its own breakpoint, via a
136
+ style query on an inherited flag rather than four copied blocks. Its content column
137
+ is a container, so an inner shell measures the space it actually has. The toggle can
138
+ live outside the shell (a site header) with `toggle="external"`.
139
+ - **`patterns/navbar.css`** — `.navbar` extracted from `nav.css`, where it was only
140
+ half of that file's drawer⇄navbar pair, plus `--start` / `--center` / `--end`,
141
+ `__spacer` and `--sticky` (old `.navbar-sticky` aliased).
142
+ - **A top-layer animation driver.** `animation.css` gained the fourth driver alongside
143
+ `animate-view` / `animate-scroll` / `animate-trigger` / `transition`, and every effect
144
+ gained an `open-<fx>` state variant. Overlays now state _where they start_
145
+ (`--translate-x-from`) instead of owning a keyframe: `class="drawer drawer--right
146
+ open-fade-in"` composes slide and fade. Applied at zero specificity with identity
147
+ defaults, so a popover that sets no effect vars is unchanged.
148
+ - **One scrim.** `--scrim` / `--scrim-filter` tokens and `.no-scrim` in `popover.css`,
149
+ replacing 18 `::backdrop` blocks across seven partials. `.drawer--modeless` is aliased.
150
+ - **`<wc-marquee>`** — clones the content enough times to cover the track, so every gap
151
+ matches including the seam. The CSS-only `.marquee` is unchanged and still works
152
+ without it; the element only makes the spacing right. `--marquee-gap` added.
153
+ - **`--width-nav`** joins `--width-measure` / `-breakout` / `-spotlight` as the nav
154
+ column width.
155
+ - **`.skip-link`** in `patterns/anchor-link.css`, using a clip rather than the
156
+ `-100vw` idiom (which overflows in RTL and ignores the scrollbar gutter).
157
+ - **`.table-wrapper`** documented as the scroll wrapper for wide tables.
158
+
159
+ ### Notes
160
+ - `patterns/nav.css` is marked legacy. Its header promised a Lit nav component that was
161
+ never written and is not planned — the house pattern is native. Use `navbar`,
162
+ `sitenav` or `navshell`; removal is a later change.
163
+ - `scroll-target.css`'s `.is-current` no longer claims to be a JS scroll-spy fallback.
164
+ There is no such code; `:target-current` is the only working highlight, which today
165
+ means Chrome.
166
+ - `elements.js` gains one element (`wc-marquee`), so the shared bundle is slightly
167
+ larger for every consumer.
168
+ - A registered custom property's `initial-value` must be computationally independent —
169
+ `16rem` is not, so `@property` silently drops the whole rule. `navshell` uses an
170
+ inline fallback instead.
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [6e68ace]
175
+ - Updated dependencies [b115993]
176
+ - @getvitops/generator@3.0.0
177
+ - @getvitops/utils@3.0.0
178
+ - @getvitops/core@3.0.0
179
+ - @getvitops/vite@3.0.0
180
+
3
181
  ## 2.1.0
4
182
 
5
183
  ### Minor Changes
package/README.md CHANGED
@@ -363,7 +363,7 @@ Behaviour worth knowing:
363
363
  ### Keep it in step with your cookie notice
364
364
 
365
365
  `vitops legal` derives the privacy policy and cookie notice from your **site config**, and
366
- `getvitops({ analytics })` is a separate surface. Declare each provider in both:
366
+ `vitops({ analytics })` is a separate surface. Declare each provider in both:
367
367
 
368
368
  ```jsonc
369
369
  // site config — what the documents disclose
package/dist/index.d.mts CHANGED
@@ -131,7 +131,7 @@ interface ResolvedAnalytics {
131
131
  warnings: string[];
132
132
  }
133
133
  interface ResolveAnalyticsContext {
134
- /** Is the consent gate enabled on this site (`getvitops({ consent })`)? */
134
+ /** Is the consent gate enabled on this site (`vitops({ consent })`)? */
135
135
  consent?: boolean;
136
136
  }
137
137
  /**
@@ -162,11 +162,11 @@ type SeoTwitterCard = 'summary' | 'summary_large_image' | 'app' | 'player';
162
162
  /** Open Graph object types this component knows how to describe. */
163
163
  type SeoOgType = 'website' | 'article' | 'profile';
164
164
  /**
165
- * Site-level SEO defaults, passed to `getvitops({ seo })` and baked into the
165
+ * Site-level SEO defaults, passed to `vitops({ seo })` and baked into the
166
166
  * `virtual:getvitops/head` module. Per-page `<Seo />` props override these.
167
167
  *
168
168
  * The vocabulary mirrors the site-config schema's `seo` block
169
- * (`@getvitops/generator`, `src/site.ts`) so a `SiteConfig` → these adapter would
169
+ * (`@getvitops/generator`, `src/config.ts`) so a `Config` → these adapter would
170
170
  * be a flat field map — but it is not imported from there. This is the
171
171
  * integration's own option surface, and it must stay JSON-serialisable: it is
172
172
  * `JSON.stringify`d into the virtual module, so no functions, no `URL`s, no dates.
@@ -406,7 +406,7 @@ interface GetvitopsCssOptions {
406
406
  *
407
407
  * The site config's `designSystem.defaultColorScheme: "system"` says the same thing and is the
408
408
  * better home for it when you have one — this option wins if both are set, and
409
- * exists because requiring a whole `SiteConfig` to set one boolean would be out
409
+ * exists because requiring a whole `Config` to set one boolean would be out
410
410
  * of proportion.
411
411
  */
412
412
  systemColorScheme?: boolean;
@@ -498,7 +498,7 @@ interface GetvitopsOptions {
498
498
  /**
499
499
  * Your site config — the one place to name it.
500
500
  *
501
- * A `SiteConfig` records site-level facts, several of which other options here
501
+ * A `Config` records site-level facts, several of which other options here
502
502
  * need: `designSystem.defaultColorScheme` decides whether the generated colour layer
503
503
  * carries a `prefers-color-scheme` block, `fonts` can supply the webfont
504
504
  * declarations, and `legal` renders from it. Set this and each of those reads
@@ -570,7 +570,7 @@ interface GetvitopsOptions {
570
570
  * `cssVariable` rather than at a literal stack the browser has no file for:
571
571
  *
572
572
  * ```js
573
- * getvitops({ fonts: [{ name: 'League Spartan', provider: 'fontsource',
573
+ * vitops({ fonts: [{ name: 'League Spartan', provider: 'fontsource',
574
574
  * cssVariable: '--font-league-spartan',
575
575
  * weights: ['100 900'], subsets: ['latin'], preload: true }] })
576
576
  * ```
@@ -716,7 +716,7 @@ interface GetvitopsIconsOptions {
716
716
  /** Aliases applied before the semantic map — legacy names, or values stored in CMS content. */
717
717
  overrides?: Record<string, string>;
718
718
  }
719
- declare function getvitops(opts?: GetvitopsOptions): AstroIntegration;
719
+ declare function vitops(opts?: GetvitopsOptions): AstroIntegration;
720
720
  //#endregion
721
721
  //#region src/lastmod.d.ts
722
722
  interface GitLastmodOptions {
@@ -747,5 +747,5 @@ declare function slugFromContent(file: string): string | undefined;
747
747
  */
748
748
  declare function gitLastmod(options?: GitLastmodOptions): Promise<(item: GetvitopsSitemapEntry) => GetvitopsSitemapEntry>;
749
749
  //#endregion
750
- export { type AnalyticsStrategy, type ClarityOptions, type ConsentCategory, type GetvitopsAnalyticsOptions, type GetvitopsConsentOptions, type GetvitopsCssOptions, type GetvitopsFaviconOptions, type GetvitopsMediaOptions, type GetvitopsOptions, type GetvitopsSeoOptions, type GetvitopsSitemapChangeFreq, type GetvitopsSitemapEntry, type GetvitopsSitemapOptions, type GitLastmodOptions, type GoogleAnalyticsOptions, type MatomoOptions, type OptionalConsentCategory, type PlausibleOptions, type ResolveAnalyticsContext, type ResolvedAnalytics, type ResolvedSeo, type ResolvedTag, type SeoContext, type SeoNameTag, type SeoOgType, type SeoPropertyTag, type SeoProps, type SeoTwitterCard, consentCategories, getvitops as default, gitLastmod, resolveAnalytics, resolveSeo, routeFromPage, slugFromContent };
750
+ export { type AnalyticsStrategy, type ClarityOptions, type ConsentCategory, type GetvitopsAnalyticsOptions, type GetvitopsConsentOptions, type GetvitopsCssOptions, type GetvitopsFaviconOptions, type GetvitopsMediaOptions, type GetvitopsOptions, type GetvitopsSeoOptions, type GetvitopsSitemapChangeFreq, type GetvitopsSitemapEntry, type GetvitopsSitemapOptions, type GitLastmodOptions, type GoogleAnalyticsOptions, type MatomoOptions, type OptionalConsentCategory, type PlausibleOptions, type ResolveAnalyticsContext, type ResolvedAnalytics, type ResolvedSeo, type ResolvedTag, type SeoContext, type SeoNameTag, type SeoOgType, type SeoPropertyTag, type SeoProps, type SeoTwitterCard, consentCategories, vitops as default, gitLastmod, resolveAnalytics, resolveSeo, routeFromPage, slugFromContent };
751
751
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/analytics.ts","../src/seo.ts","../src/integration.ts","../src/lastmod.ts"],"mappings":";;;;;;;;;;;;;;;AA2BA;;;;AAA6B;AAQ7B;;;;AAA2B;AAE3B;;;;AAA6D;AAE7D;;;AAF6D,KAVjD,iBAAA;;;;;;;KAQA,eAAA;AAAA,KAEA,uBAAA,GAA0B,OAAO,CAAC,eAAA;AAAA,UAE7B,sBAAA;;EAEf,EAAA;EAYA;;;;EAPA,QAAA,GAAW,uBAAA;EAWI;EATf,MAAA,GAAS,MAAM;AAAA;AAAA,UAGA,cAAA;EAQf;EANA,EAAA;EACA,QAAA,GAAW,uBAAuB;AAAA;AAAA,UAGnB,aAAA;EAgBA;EAdf,GAAA;;EAEA,MAAA;EAgBG;AAGL;;;;;;;EAVE,OAAA;AAAA;AAAA,UAGe,gBAAA;EAQf;EANA,MAAA;EAOA;EALA,GAAG;AAAA;AAAA,UAGY,yBAAA;EACf,eAAA,YAA2B,sBAAA;EAC3B,OAAA,YAAmB,cAAA;EACnB,MAAA,GAAS,aAAA;EACT,SAAA,YAAqB,gBAAA;EAEO;EAA5B,QAAA,GAAW,iBAAA;AAAA;;;;;;;;AAkBF;UAPM,uBAAA;EAWW;;;;EAN1B,UAAA,GAAa,uBAAuB;EAwBvB;EAtBb,SAAA;AAAA;;UAIe,WAAA;EACf,GAAA;EAIA;EAFA,QAAA;EACA,QAAA,EAAU,eAAA;EACV,WAAA;EASA;EAPA,OAAA;EACA,QAAA,EAAU,iBAAA;EAUV;;;AAAa;AAGf;EAPE,KAAA;;EAEA,MAAA;EACA,GAAA;EACA,KAAA,EAAO,MAAA;AAAA;AAAA,UAGQ,iBAAA;EACf,IAAA,EAAM,WAAW;EAIT;EAFR,YAAA;EAKsC;EAHtC,QAAA;AAAA;AAAA,UAGe,uBAAA;EA0ID;EAxId,OAAO;AA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AAAA,iBAqLU,MAAA,CAAO,IAAA,GAAM,gBAAA,GAAwB,gBAAgB;;;UClkB5D,iBAAA;;EAEf,IAAA;;EAEA,GAAA;;EAEA,MAAA,IAAU,OAAA;AAAA;;;;AHlBiB;AAQ7B;;;iBGoBgB,aAAA,CAAc,IAAY;AHpBf;AAAA,iBGiCX,eAAA,CAAgB,IAAY;;;;AH/BiB;AAE7D;;;;iBGiFsB,UAAA,CACpB,OAAA,GAAS,iBAAA,GACR,OAAA,EAAS,IAAA,EAAM,qBAAA,KAA0B,qBAAA"}
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join, relative, resolve } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { isSiteConfig, resolveSiteConfig } from "@getvitops/generator";
4
+ import { isConfig, resolveConfig } from "@getvitops/generator";
5
5
  import { collectIconRefs, faviconLinks, generateFavicons, generateIconInclude, resolveIcon, scanFiles, writeFaviconManifest } from "@getvitops/utils";
6
- import vitops from "@getvitops/vite";
6
+ import vitopsPlugin from "@getvitops/vite";
7
7
  import { fontProviders } from "astro/config";
8
8
  import { execFile } from "node:child_process";
9
9
  import { promisify } from "node:util";
@@ -204,10 +204,10 @@ function resolveFonts(decls) {
204
204
  const head = [];
205
205
  const seen = /* @__PURE__ */ new Set();
206
206
  for (const decl of decls) {
207
- if (!PROVIDERS.has(decl.provider)) throw new Error(`[getvitops] fonts: unknown provider "${decl.provider}" for "${decl.name}". Astro provides: ${[...PROVIDERS].sort().join(", ")}.`);
208
- if (NEEDS_OPTIONS.has(decl.provider)) throw new Error(`[getvitops] fonts: provider "${decl.provider}" needs an API id from your environment ("${decl.name}"), and a JSON declaration has nowhere to hold one. Declare this family in astro.config instead — fonts: [{ provider: fontProviders.${decl.provider}({ id: process.env.ADOBE_ID }), name: '${decl.name}', cssVariable: '${decl.cssVariable}' }] — and render its <Font /> yourself; the design-system token can still point at it.`);
209
- if (!decl.cssVariable.startsWith("--")) throw new Error(`[getvitops] fonts: cssVariable "${decl.cssVariable}" (${decl.name}) must start with "--".`);
210
- if (seen.has(decl.cssVariable)) throw new Error(`[getvitops] fonts: two families both declare ${decl.cssVariable} (the second is "${decl.name}"). Astro resolves one family per variable — give them separate variables, or drop one.`);
207
+ if (!PROVIDERS.has(decl.provider)) throw new Error(`[vitops] fonts: unknown provider "${decl.provider}" for "${decl.name}". Astro provides: ${[...PROVIDERS].sort().join(", ")}.`);
208
+ if (NEEDS_OPTIONS.has(decl.provider)) throw new Error(`[vitops] fonts: provider "${decl.provider}" needs an API id from your environment ("${decl.name}"), and a JSON declaration has nowhere to hold one. Declare this family in astro.config instead — fonts: [{ provider: fontProviders.${decl.provider}({ id: process.env.ADOBE_ID }), name: '${decl.name}', cssVariable: '${decl.cssVariable}' }] — and render its <Font /> yourself; the design-system token can still point at it.`);
209
+ if (!decl.cssVariable.startsWith("--")) throw new Error(`[vitops] fonts: cssVariable "${decl.cssVariable}" (${decl.name}) must start with "--".`);
210
+ if (seen.has(decl.cssVariable)) throw new Error(`[vitops] fonts: two families both declare ${decl.cssVariable} (the second is "${decl.name}"). Astro resolves one family per variable — give them separate variables, or drop one.`);
211
211
  seen.add(decl.cssVariable);
212
212
  const { provider, preload, ...rest } = decl;
213
213
  fonts.push({
@@ -237,11 +237,11 @@ function resolveFonts(decls) {
237
237
  * config from the `virtual:getvitops/head` module this integration provides.
238
238
  */
239
239
  /**
240
- * Which providers `getvitops({ analytics })` configures that the site config's
240
+ * Which providers `vitops({ analytics })` configures that the site config's
241
241
  * own `analytics` block does not.
242
242
  *
243
243
  * The two are separate surfaces on purpose — the integration must not import
244
- * `SiteConfig` — but they describe the same site, and a disagreement between them
244
+ * `Config` — but they describe the same site, and a disagreement between them
245
245
  * is a compliance defect rather than a style issue: `vitops legal` derives the
246
246
  * cookie notice from the site config, so a provider missing there is a tag the
247
247
  * site runs and its own notice never mentions. That is precisely what the
@@ -259,7 +259,7 @@ const SITE_CONFIG_KEYS = {
259
259
  function undisclosedProviders(configPath, analytics) {
260
260
  let declared;
261
261
  try {
262
- declared = JSON.parse(readFileSync(configPath, "utf8")).analytics ?? {};
262
+ declared = JSON.parse(readFileSync(configPath, "utf8")).site?.analytics ?? {};
263
263
  } catch {
264
264
  return [];
265
265
  }
@@ -328,14 +328,14 @@ async function probeIconPackage(name) {
328
328
  * the build here would turn "your JSON has a trailing comma" into an error about
329
329
  * an option the consumer never set.
330
330
  */
331
- function readsAsSiteConfig(path) {
331
+ function readsAsConfig(path) {
332
332
  try {
333
- return isSiteConfig(JSON.parse(readFileSync(path, "utf8")));
333
+ return isConfig(JSON.parse(readFileSync(path, "utf8")));
334
334
  } catch {
335
335
  return false;
336
336
  }
337
337
  }
338
- function getvitops(opts = {}) {
338
+ function vitops(opts = {}) {
339
339
  return {
340
340
  name: "@getvitops/astro",
341
341
  hooks: { "astro:config:setup": async ({ config, updateConfig, injectScript, logger }) => {
@@ -347,10 +347,10 @@ function getvitops(opts = {}) {
347
347
  if (opts.legal && !opts.css) logger.warn("legal: needs a `css` config — the generation runs in the Vite plugin that `css` registers. Run `npx vitops legal` instead if you do not use `css`.");
348
348
  if (opts.media && !opts.css) logger.warn("media: needs a `css` config — the encoding runs in the Vite plugin that `css` registers. Run `npx vitops media` instead if you do not use `css`.");
349
349
  const cssInput = opts.css ? opts.css.input ?? "design-system.json" : void 0;
350
- const siteInput = opts.site?.input ?? (cssInput != null && readsAsSiteConfig(resolve(root, cssInput)) ? cssInput : void 0);
350
+ const siteInput = opts.site?.input ?? (cssInput != null && readsAsConfig(resolve(root, cssInput)) ? cssInput : void 0);
351
351
  if (opts.site && !opts.css) logger.warn("site: needs a `css` config — it is read during generation, which runs in the Vite plugin that `css` registers. Without it the site config changes nothing here.");
352
352
  const legalInput = opts.legal?.input ?? siteInput;
353
- if (opts.legal && !legalInput) throw new Error("[getvitops] legal: needs `legal.input` (a site config path), the top-level `site` option, or a `css.input` that is itself a site config.");
353
+ if (opts.legal && !legalInput) throw new Error("[vitops] legal: needs `legal.input` (a site config path), the top-level `site` option, or a `css.input` that is itself a site config.");
354
354
  if (opts.seo) {
355
355
  if (!config.site) logger.warn("seo: needs the `site` astro.config option (your deployed URL) — without it <Seo /> omits canonical, og:url and any relative og:image rather than guessing an origin.");
356
356
  if (config.integrations.some((i) => i.name === "emdash")) logger.warn("seo: emdash() is registered, and its <EmDashHead> emits the same title/description/canonical/og tags from the CMS. Use one or the other — rendering both duplicates every tag.");
@@ -395,8 +395,8 @@ function getvitops(opts = {}) {
395
395
  };
396
396
  const declared = [];
397
397
  if (o.input) {
398
- const site = resolveSiteConfig(JSON.parse(readFileSync(resolve(root, o.input), "utf8")), o.siteEnv ?? "production");
399
- declared.push(...site.fonts ?? []);
398
+ const cfg = resolveConfig(JSON.parse(readFileSync(resolve(root, o.input), "utf8")), o.siteEnv ?? "production");
399
+ declared.push(...cfg.site.fonts ?? []);
400
400
  }
401
401
  declared.push(...o.families ?? []);
402
402
  if (declared.length === 0) logger.warn("fonts: nothing declared — no webfonts will load. Add families, or drop the option.");
@@ -441,7 +441,7 @@ function getvitops(opts = {}) {
441
441
  try {
442
442
  ({default: sitemap} = await import("@astrojs/sitemap"));
443
443
  } catch {
444
- throw new Error("[getvitops] sitemap requires `@astrojs/sitemap` in your devDependencies — install it, or drop the `sitemap` option.");
444
+ throw new Error("[vitops] sitemap requires `@astrojs/sitemap` in your devDependencies — install it, or drop the `sitemap` option.");
445
445
  }
446
446
  if (config.output === "server") logger.warn("sitemap: output: 'server' — @astrojs/sitemap lists prerendered routes only, so on-demand pages are left out. Add `export const prerender = true` to the pages you want indexed, or list them in `sitemap.customPages`.");
447
447
  const sitemapOpts = opts.sitemap === true ? void 0 : opts.sitemap;
@@ -451,7 +451,7 @@ function getvitops(opts = {}) {
451
451
  }
452
452
  }
453
453
  if (siteInput) try {
454
- const key = resolveSiteConfig(JSON.parse(readFileSync(resolve(root, siteInput), "utf8")), opts.site?.siteEnv ?? "production").seo?.indexing?.indexNow?.key;
454
+ const key = resolveConfig(JSON.parse(readFileSync(resolve(root, siteInput), "utf8")), opts.site?.siteEnv ?? "production").site.seo?.indexing?.indexNow?.key;
455
455
  if (key) {
456
456
  mkdirSync(publicDir, { recursive: true });
457
457
  writeFileSync(join(publicDir, `${key}.txt`), `${key}\n`);
@@ -562,9 +562,9 @@ function getvitops(opts = {}) {
562
562
  })] } });
563
563
  if (opts.css) {
564
564
  const format = opts.css.format ?? "tailwind";
565
- if (format === "design") throw new Error("[getvitops] css.format: 'design' emits only DESIGN.md, not a stylesheet. Run `npx vitops generate --format design --out .` for that file, and set css.format to 'tailwind' | 'css' | 'bricks' here.");
565
+ if (format === "design") throw new Error("[vitops] css.format: 'design' emits only DESIGN.md, not a stylesheet. Run `npx vitops generate --format design --out .` for that file, and set css.format to 'tailwind' | 'css' | 'bricks' here.");
566
566
  const out = opts.css.out ?? "src/styles";
567
- const plugins = [vitops({
567
+ const plugins = [vitopsPlugin({
568
568
  input: opts.css.input ?? "design-system.json",
569
569
  ...opts.css.theme != null ? { theme: opts.css.theme } : {},
570
570
  format,
@@ -587,7 +587,7 @@ function getvitops(opts = {}) {
587
587
  TAILWIND_VITE
588
588
  ));
589
589
  } catch {
590
- throw new Error("[getvitops] css.format: 'tailwind' requires `tailwindcss` and `@tailwindcss/vite` in your devDependencies — install them, or switch to css.format: 'css' for the standalone bundle.");
590
+ throw new Error("[vitops] css.format: 'tailwind' requires `tailwindcss` and `@tailwindcss/vite` in your devDependencies — install them, or switch to css.format: 'css' for the standalone bundle.");
591
591
  }
592
592
  plugins.push(...tailwindcss());
593
593
  }
@@ -714,7 +714,7 @@ async function commitDates(dirs, cwd) {
714
714
  */
715
715
  async function gitLastmod(options = {}) {
716
716
  const cwd = options.cwd ?? process.cwd();
717
- const warn = options.onWarn ?? ((m) => console.warn(`[getvitops] gitLastmod: ${m}`));
717
+ const warn = options.onWarn ?? ((m) => console.warn(`[vitops] gitLastmod: ${m}`));
718
718
  const dirs = (options.dirs ?? DEFAULT_DIRS).filter((d) => existsSync(`${cwd}/${d}`));
719
719
  const identity = (item) => item;
720
720
  if (dirs.length === 0) {
@@ -886,5 +886,5 @@ function resolveSeo(defaults, props, ctx) {
886
886
  }
887
887
 
888
888
  //#endregion
889
- export { consentCategories, getvitops as default, gitLastmod, resolveAnalytics, resolveSeo, routeFromPage, slugFromContent };
889
+ export { consentCategories, vitops as default, gitLastmod, resolveAnalytics, resolveSeo, routeFromPage, slugFromContent };
890
890
  //# sourceMappingURL=index.mjs.map