@getvitops/vite 7.0.0 → 8.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +93 -14
  2. package/package.json +15 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,92 @@
1
1
  # @getvitops/vite
2
2
 
3
+ ## 8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Rebuild the lightbox on one dialog + the existing carousel, fixing the flicker on
8
+ prev/next and the stutter on open.
9
+
10
+ **Breaking (`css`/`bricks` and `tailwind` formats — `.lightbox-dialog`'s markup
11
+ contract changed):**
12
+
13
+ - `<Gallery />` now emits ONE `<dialog class="lightbox-dialog">` per gallery,
14
+ wrapping a `<Carousel />`, instead of one dialog per image. A `.gallery__trigger`
15
+ is now a plain `<a href="#slide-id">`, not a `command="show-modal"` button.
16
+ - `.lightbox-dialog__content` / `__image` / `__nav` / `__nav-button` /
17
+ `__caption` are gone. The dialog's child is `.lightbox-dialog__track` (a
18
+ `.carousel`) — prev/next, dots, arrow keys and swipe are the carousel's,
19
+ reused rather than reimplemented. `.lightbox-dialog__close` is unchanged.
20
+ - `<wc-gallery>` no longer builds nav buttons or steps between images — the
21
+ nested `<wc-carousel>` does. It fires `gallery-open` (unchanged shape) and
22
+ re-emits the carousel's own stepping as `gallery-change`.
23
+ - `packages/core/src/web-components/utils/gallery.ts` dropped `keyToAction` and
24
+ `swipeAction` (the carousel's own key/swipe handling covers both now).
25
+ `stepIndex`/`preloadTargets` are unchanged.
26
+
27
+ **Why:** stepping used to close one `<dialog>` and open another, which made
28
+ `animation.css`'s top-layer driver play a full exit-then-entry transition on
29
+ every step — visible as a flicker on prev/next, by construction, not a bug to
30
+ tune away. Opening also awaited the full image's `decode()` before starting the
31
+ view-transition morph, so the dialog visibly stalled on a slow network. One
32
+ dialog containing one carousel makes the first failure mode unrepresentable
33
+ (stepping is a scroll, not a close/open pair) and removes the wait for the
34
+ second (the morph starts immediately, painting the thumbnail as a CSS
35
+ background placeholder until the full image arrives).
36
+
37
+ **Also improved, not just fixed:** the no-JS fallback is no longer a _stripped_
38
+ lightbox — it's a genuine one. Each trigger is ordinary fragment navigation
39
+ (`:has(:target)` in `lightbox.css` reveals the dialog), which needs no Invoker
40
+ Commands polyfill in any engine, and it now has working prev/next with no
41
+ JavaScript at all — the previous per-dialog fallback had no way to express that.
42
+
43
+ **Migration:** a consumer using `<Gallery />` needs no changes — the component's
44
+ props are unchanged. Anyone who hand-authored `.lightbox-dialog` markup (per
45
+ `docs/concepts/patterns.md` / `docs/css/classes.md`) must move to the new single-
46
+ dialog-wrapping-a-carousel shape; see `patterns.astro`'s "Gallery, hand-authored"
47
+ demo for the reference markup. `<wc-gallery>` consumers listening for
48
+ `gallery-change` keep the same event shape (`{ index, total }`).
49
+
50
+ ### Minor Changes
51
+
52
+ - Repo-wide simplification pass: de-boilerplate the CLI, dedupe shared cache/plan
53
+ primitives in `@getvitops/utils`, drop dead code, and tighten dependency hygiene.
54
+
55
+ No breaking changes. (`vitops icons`'s `--site` flag was briefly going to be renamed to
56
+ `--input` for consistency with the other `Config`-anchored commands — deferred rather than
57
+ spending a major bump on a rename with no other breaking change riding along; it stays
58
+ `--site` for now.)
59
+
60
+ **Fixed:**
61
+
62
+ - `@getvitops/core`'s 12 runtime deps (`lit`, both `@oddbird` polyfills, both
63
+ `@webcomponents` packages, `colorjs.io`, etc.) were listed as `dependencies` despite
64
+ being bundled into `dist/elements.js`/`dist/polyfills.js`/`dist/deferred.js` — a
65
+ consumer installed them twice for nothing. Moved to `devDependencies`; no change to
66
+ what ships.
67
+ - Deleted `old-css-lib/` (59 files), superseded by `packages/core/css/` since the
68
+ in-memory bundling change — no consumer-facing effect, it was not part of any
69
+ published output.
70
+ - Deleted a dead Astro module (`packages/astro/src/scripts/deferred.ts`) that had
71
+ silently diverged from `packages/core/src/js/deferred.ts` and had zero importers.
72
+
73
+ **No consumer-facing change in `@getvitops/vite`** beyond the fixed-group version bump —
74
+ task-graph and caching fixes internal to this repo's own build.
75
+
76
+ Everything else (the `cli.ts` file split into `commands/{search,ads}.ts`, shared
77
+ `json-store.ts`/`plan-format.ts` helpers in `@getvitops/utils`, a `.github/actions/setup`
78
+ composite action, restatement-comment cleanup) is internal refactoring with no change to
79
+ any published API, CLI flag, or generated output.
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies
84
+ - Updated dependencies
85
+ - Updated dependencies
86
+ - Updated dependencies [a84839b]
87
+ - @getvitops/generator@8.0.0
88
+ - @getvitops/utils@8.0.0
89
+
3
90
  ## 7.0.0
4
91
 
5
92
  ### Patch Changes
@@ -223,28 +310,20 @@ options, watch behaviour and dev-server endpoints are unchanged.
223
310
  {
224
311
  "designSystem": {
225
312
  "themes": {
226
- "default": {
227
- /* … */
228
- },
313
+ "default": {/* … */},
229
314
  },
230
315
  },
231
316
  "organization": {
232
317
  "name": "Acme",
233
318
  "contact": "hq",
234
319
  "locations": {
235
- "hq": {
236
- /* … */
237
- },
320
+ "hq": {/* … */},
238
321
  },
239
322
  },
240
323
  "site": {
241
324
  "defaultLocale": "en",
242
- "domains": {
243
- /* … */
244
- },
245
- "analytics": {
246
- /* … */
247
- },
325
+ "domains": {/* … */},
326
+ "analytics": {/* … */},
248
327
  },
249
328
  }
250
329
  ```
@@ -352,7 +431,7 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
352
431
 
353
432
  ```js
354
433
  // astro.config.mjs
355
- getvitops({ css: { input: 'company.json', format: 'css' } });
434
+ getvitops({ css: { input: "company.json", format: "css" } });
356
435
  ```
357
436
 
358
437
  ```
@@ -663,7 +742,7 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
663
742
  ```js
664
743
  // astro.config.mjs
665
744
  getvitops({
666
- css: { input: 'design-system.json', format: 'css', out: 'src/styles' },
745
+ css: { input: "design-system.json", format: "css", out: "src/styles" },
667
746
  editor: true,
668
747
  });
669
748
  ```
package/package.json CHANGED
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "name": "@getvitops/vite",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "Vite plugin that generates Vitops design-system outputs from a design-system.json during a Vite/Astro build.",
5
+ "homepage": "https://docs.vitops.ca",
6
+ "bugs": "https://github.com/getvitops/design-system/issues",
5
7
  "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/getvitops/design-system.git",
11
+ "directory": "packages/vite"
12
+ },
6
13
  "files": [
7
14
  "dist",
8
15
  "CHANGELOG.md"
9
16
  ],
10
17
  "type": "module",
18
+ "sideEffects": false,
11
19
  "exports": {
12
20
  ".": {
13
21
  "types": "./dist/index.d.mts",
@@ -18,14 +26,17 @@
18
26
  "access": "public"
19
27
  },
20
28
  "dependencies": {
21
- "@getvitops/generator": "7.0.0",
22
- "@getvitops/utils": "7.0.0"
29
+ "@getvitops/generator": "8.0.0",
30
+ "@getvitops/utils": "8.0.0"
23
31
  },
24
32
  "devDependencies": {
25
33
  "vite": "^6.0.0",
26
- "vitest": "^4.1.9"
34
+ "vitest": "4.1.9"
27
35
  },
28
36
  "peerDependencies": {
29
37
  "vite": ">=5"
38
+ },
39
+ "engines": {
40
+ "node": ">=24"
30
41
  }
31
42
  }