@getvitops/cli 7.0.0 → 8.0.1

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,133 @@
1
1
  # @getvitops/cli
2
2
 
3
+ ## 8.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - `vitops icons`'s `--site` flag is renamed to `--input`, matching `legal`/`robots`/`reviews` and
8
+ every other `Config`-anchored command. Same default (`./site.json`) and the same short flag
9
+ (`-i`); only the long name changes.
10
+
11
+ **Migration:** replace `vitops icons --site <path>` with `vitops icons --input <path>` (or `-i`).
12
+ Deferred out of 8.0.0 as a rename not worth a major bump on its own; landing now as a patch since
13
+ 8.0.0 has no adopters yet to carry the deprecated name for.
14
+ - @getvitops/generator@8.0.1
15
+ - @getvitops/utils@8.0.1
16
+
17
+ ## 8.0.0
18
+
19
+ ### Major Changes
20
+
21
+ - Rebuild the lightbox on one dialog + the existing carousel, fixing the flicker on
22
+ prev/next and the stutter on open.
23
+
24
+ **Breaking (`css`/`bricks` and `tailwind` formats — `.lightbox-dialog`'s markup
25
+ contract changed):**
26
+
27
+ - `<Gallery />` now emits ONE `<dialog class="lightbox-dialog">` per gallery,
28
+ wrapping a `<Carousel />`, instead of one dialog per image. A `.gallery__trigger`
29
+ is now a plain `<a href="#slide-id">`, not a `command="show-modal"` button.
30
+ - `.lightbox-dialog__content` / `__image` / `__nav` / `__nav-button` /
31
+ `__caption` are gone. The dialog's child is `.lightbox-dialog__track` (a
32
+ `.carousel`) — prev/next, dots, arrow keys and swipe are the carousel's,
33
+ reused rather than reimplemented. `.lightbox-dialog__close` is unchanged.
34
+ - `<wc-gallery>` no longer builds nav buttons or steps between images — the
35
+ nested `<wc-carousel>` does. It fires `gallery-open` (unchanged shape) and
36
+ re-emits the carousel's own stepping as `gallery-change`.
37
+ - `packages/core/src/web-components/utils/gallery.ts` dropped `keyToAction` and
38
+ `swipeAction` (the carousel's own key/swipe handling covers both now).
39
+ `stepIndex`/`preloadTargets` are unchanged.
40
+
41
+ **Why:** stepping used to close one `<dialog>` and open another, which made
42
+ `animation.css`'s top-layer driver play a full exit-then-entry transition on
43
+ every step — visible as a flicker on prev/next, by construction, not a bug to
44
+ tune away. Opening also awaited the full image's `decode()` before starting the
45
+ view-transition morph, so the dialog visibly stalled on a slow network. One
46
+ dialog containing one carousel makes the first failure mode unrepresentable
47
+ (stepping is a scroll, not a close/open pair) and removes the wait for the
48
+ second (the morph starts immediately, painting the thumbnail as a CSS
49
+ background placeholder until the full image arrives).
50
+
51
+ **Also improved, not just fixed:** the no-JS fallback is no longer a _stripped_
52
+ lightbox — it's a genuine one. Each trigger is ordinary fragment navigation
53
+ (`:has(:target)` in `lightbox.css` reveals the dialog), which needs no Invoker
54
+ Commands polyfill in any engine, and it now has working prev/next with no
55
+ JavaScript at all — the previous per-dialog fallback had no way to express that.
56
+
57
+ **Migration:** a consumer using `<Gallery />` needs no changes — the component's
58
+ props are unchanged. Anyone who hand-authored `.lightbox-dialog` markup (per
59
+ `docs/concepts/patterns.md` / `docs/css/classes.md`) must move to the new single-
60
+ dialog-wrapping-a-carousel shape; see `patterns.astro`'s "Gallery, hand-authored"
61
+ demo for the reference markup. `<wc-gallery>` consumers listening for
62
+ `gallery-change` keep the same event shape (`{ index, total }`).
63
+
64
+ ### Minor Changes
65
+
66
+ - Add Google Business Profile reviews: fetch, cache, render.
67
+
68
+ - **`vitops reviews`** (new CLI command) fetches a client's GBP reviews (legacy v4 API — the only
69
+ one that has them) and writes them to `.vitops/reviews.json`, meant to be committed so a build
70
+ never needs a live Google credential. `--dry` prints the plan; `--check` diffs against the cache
71
+ without writing. Requires the same `VITOPS_GOOGLE_CLIENT_ID`/`_CLIENT_SECRET`/`_REFRESH_TOKEN` (or
72
+ ADC login) `search setup` uses, scoped to `business.manage` — **and the calling GCP project must
73
+ be allowlisted by Google first**, a separate one-time approval from every other Google API here.
74
+ - **`site.reviews`** (config): which `organization.locations` to fetch, and per-location
75
+ `featured`/`minRating`/`sort`/`limit` selection. `schema` (JSON-LD) and `avatars` both default to
76
+ **off** — see the migration notes below.
77
+ - **`@getvitops/utils/reviews`** (new subpath): the pure plan/select/merge functions plus the GBP
78
+ fetcher and cache reader/writer, mirroring `./indexing`'s pure/IO split.
79
+ - **`<ReviewCard>`** (new Astro component, `@getvitops/astro`): one review card from a cache entry.
80
+ No web component — nothing here needs progressive enhancement. Composes the existing
81
+ `schemas/Review.astro` for JSON-LD only when both `schema` and `itemReviewed` are passed.
82
+ - **`<Marquee>`** (new Astro component): the tier-3 wrapper `wc-marquee`/`marquee.css` was missing.
83
+ - **`.review` pattern** (`css`/`bricks` and `tailwind` formats): a new config-generated
84
+ `patterns.items.review` entry plus `packages/core/css/patterns/review.css` for the structural
85
+ parts (rating, identity, body, reply, source link). Two new semantic icon names, `star` and
86
+ `star-half`, across every icon set.
87
+
88
+ **Migration:** no breaking change. A site adding `site.reviews` should read the "Google reviews"
89
+ section in AGENTS.md before enabling `schema` — Google's structured-data policy treats a business
90
+ marking up reviews of itself as ineligible for review rich results and risks a manual action, which
91
+ is why it defaults off.
92
+
93
+ - Repo-wide simplification pass: de-boilerplate the CLI, dedupe shared cache/plan
94
+ primitives in `@getvitops/utils`, drop dead code, and tighten dependency hygiene.
95
+
96
+ No breaking changes. (`vitops icons`'s `--site` flag was briefly going to be renamed to
97
+ `--input` for consistency with the other `Config`-anchored commands — deferred rather than
98
+ spending a major bump on a rename with no other breaking change riding along; it stays
99
+ `--site` for now.)
100
+
101
+ **Fixed:**
102
+
103
+ - `@getvitops/core`'s 12 runtime deps (`lit`, both `@oddbird` polyfills, both
104
+ `@webcomponents` packages, `colorjs.io`, etc.) were listed as `dependencies` despite
105
+ being bundled into `dist/elements.js`/`dist/polyfills.js`/`dist/deferred.js` — a
106
+ consumer installed them twice for nothing. Moved to `devDependencies`; no change to
107
+ what ships.
108
+ - Deleted `old-css-lib/` (59 files), superseded by `packages/core/css/` since the
109
+ in-memory bundling change — no consumer-facing effect, it was not part of any
110
+ published output.
111
+ - Deleted a dead Astro module (`packages/astro/src/scripts/deferred.ts`) that had
112
+ silently diverged from `packages/core/src/js/deferred.ts` and had zero importers.
113
+
114
+ **No consumer-facing change in `@getvitops/vite`** beyond the fixed-group version bump —
115
+ task-graph and caching fixes internal to this repo's own build.
116
+
117
+ Everything else (the `cli.ts` file split into `commands/{search,ads}.ts`, shared
118
+ `json-store.ts`/`plan-format.ts` helpers in `@getvitops/utils`, a `.github/actions/setup`
119
+ composite action, restatement-comment cleanup) is internal refactoring with no change to
120
+ any published API, CLI flag, or generated output.
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies
125
+ - Updated dependencies
126
+ - Updated dependencies
127
+ - Updated dependencies [a84839b]
128
+ - @getvitops/generator@8.0.0
129
+ - @getvitops/utils@8.0.0
130
+
3
131
  ## 7.0.0
4
132
 
5
133
  ### Minor Changes
@@ -658,28 +786,20 @@ carousel vocabulary, because they render live from the generator.
658
786
  {
659
787
  "designSystem": {
660
788
  "themes": {
661
- "default": {
662
- /* … */
663
- },
789
+ "default": {/* … */},
664
790
  },
665
791
  },
666
792
  "organization": {
667
793
  "name": "Acme",
668
794
  "contact": "hq",
669
795
  "locations": {
670
- "hq": {
671
- /* … */
672
- },
796
+ "hq": {/* … */},
673
797
  },
674
798
  },
675
799
  "site": {
676
800
  "defaultLocale": "en",
677
- "domains": {
678
- /* … */
679
- },
680
- "analytics": {
681
- /* … */
682
- },
801
+ "domains": {/* … */},
802
+ "analytics": {/* … */},
683
803
  },
684
804
  }
685
805
  ```
@@ -755,7 +875,7 @@ carousel vocabulary, because they render live from the generator.
755
875
  Also new, and worth wiring at the same time — **`gitLastmod()` for real sitemap dates**:
756
876
 
757
877
  ```js
758
- import vitops, { gitLastmod } from '@getvitops/astro';
878
+ import vitops, { gitLastmod } from "@getvitops/astro";
759
879
  vitops({ sitemap: { serialize: await gitLastmod() } });
760
880
  ```
761
881
 
@@ -849,7 +969,7 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
849
969
 
850
970
  ```js
851
971
  // astro.config.mjs
852
- getvitops({ css: { input: 'company.json', format: 'css' } });
972
+ getvitops({ css: { input: "company.json", format: "css" } });
853
973
  ```
854
974
 
855
975
  ```
@@ -1336,15 +1456,15 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
1336
1456
  which `@getvitops/astro` re-exports wholesale. So from `astro.config.mjs`:
1337
1457
 
1338
1458
  ```js
1339
- import { generateIconInclude } from '@getvitops/astro';
1340
- import icon from 'astro-icon';
1459
+ import { generateIconInclude } from "@getvitops/astro";
1460
+ import icon from "astro-icon";
1341
1461
 
1342
1462
  integrations: [
1343
1463
  icon({
1344
1464
  include: generateIconInclude({
1345
- ui: 'fa7-solid',
1346
- brand: 'simple-icons',
1347
- semantic: ['menu', 'close', 'search', 'github'],
1465
+ ui: "fa7-solid",
1466
+ brand: "simple-icons",
1467
+ semantic: ["menu", "close", "search", "github"],
1348
1468
  }),
1349
1469
  }),
1350
1470
  ];