@getvitops/vite 6.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.
- package/CHANGELOG.md +135 -14
- package/package.json +15 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,134 @@
|
|
|
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
|
+
|
|
90
|
+
## 7.0.0
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- **Added — `utils`.** `itemListGraph()`, a pure schema.org `ItemList` JSON-LD builder — a sibling
|
|
95
|
+
of `breadcrumbGraph()`/`localBusinessGraph()`. Extracted from `@getvitops/astro`'s `<Carousel />`
|
|
96
|
+
so any consumer can build a valid `ItemList` (Google's "all-in-one page" carousel format:
|
|
97
|
+
`ListItem.item` carrying `@type`/`name`/`url`) for content that isn't one of the six Google
|
|
98
|
+
carousel rich-result types (`Article`/`Recipe`/`Movie`/`Course`/`Restaurant`/`Product`) — the
|
|
99
|
+
entity type is no longer constrained to that set.
|
|
100
|
+
|
|
101
|
+
**Changed — `astro`.** `<Carousel />`'s `CarouselItem['type']` now accepts any string, not just
|
|
102
|
+
the six carousel rich-result types — non-breaking, the union only widens. It's a thin wrapper
|
|
103
|
+
over `itemListGraph()` now; behaviour for existing callers is unchanged.
|
|
104
|
+
|
|
105
|
+
No consumer-facing change in this release outside `utils` and `astro` — `generator`, `cli` and
|
|
106
|
+
`vite` still ship in this release only because the six share one version.
|
|
107
|
+
|
|
108
|
+
**Fixed — `core` (`css`/`bricks`/`tailwind` build output, all formats).** The CSS and HTML
|
|
109
|
+
authored inside Lit's `css`/`html` tagged templates in `<wc-*>` component sources previously
|
|
110
|
+
survived JS minification verbatim — a JS minifier treats a template literal's cooked text as
|
|
111
|
+
opaque, so `elements.js` shipped ~690 lines of indented, unminified CSS (and the equivalent in
|
|
112
|
+
HTML) inside an otherwise-minified 886-line file. Two source-level build transforms now collapse
|
|
113
|
+
both before bundling: `postcss` + `postcss-lit` + `cssnano` for `css` templates, `minify-html-literals`
|
|
114
|
+
(`conservativeCollapse: true`, so whitespace between inline elements in light-DOM components never
|
|
115
|
+
collapses to zero) for `html` templates. `elements.js` drops from 886 lines / ~101 KB to 49 lines /
|
|
116
|
+
~96 KB. A second build step deduplicates the 17 `@license` comment blocks (only 6 are textually
|
|
117
|
+
distinct) down to one verbatim copy of each — required by BSD-3/MIT/Apache-2.0's notice-retention
|
|
118
|
+
terms either way, just no longer repeated once per source file that carries it. No API change;
|
|
119
|
+
build-time only, and none of the added tooling (`postcss`, `postcss-lit`, `cssnano`,
|
|
120
|
+
`minify-html-literals`) is a runtime or published dependency.
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [c0c092b]
|
|
123
|
+
- Updated dependencies
|
|
124
|
+
- Updated dependencies [aad43b7]
|
|
125
|
+
- Updated dependencies [2b50f9e]
|
|
126
|
+
- Updated dependencies [a6a8b39]
|
|
127
|
+
- Updated dependencies [7b391b3]
|
|
128
|
+
- Updated dependencies [eb9ac79]
|
|
129
|
+
- @getvitops/utils@7.0.0
|
|
130
|
+
- @getvitops/generator@7.0.0
|
|
131
|
+
|
|
3
132
|
## 6.0.0
|
|
4
133
|
|
|
5
134
|
**No consumer-facing change in this package.** The major is the toolchain's shared version, bumped
|
|
@@ -181,28 +310,20 @@ options, watch behaviour and dev-server endpoints are unchanged.
|
|
|
181
310
|
{
|
|
182
311
|
"designSystem": {
|
|
183
312
|
"themes": {
|
|
184
|
-
"default": {
|
|
185
|
-
/* … */
|
|
186
|
-
},
|
|
313
|
+
"default": {/* … */},
|
|
187
314
|
},
|
|
188
315
|
},
|
|
189
316
|
"organization": {
|
|
190
317
|
"name": "Acme",
|
|
191
318
|
"contact": "hq",
|
|
192
319
|
"locations": {
|
|
193
|
-
"hq": {
|
|
194
|
-
/* … */
|
|
195
|
-
},
|
|
320
|
+
"hq": {/* … */},
|
|
196
321
|
},
|
|
197
322
|
},
|
|
198
323
|
"site": {
|
|
199
324
|
"defaultLocale": "en",
|
|
200
|
-
"domains": {
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
"analytics": {
|
|
204
|
-
/* … */
|
|
205
|
-
},
|
|
325
|
+
"domains": {/* … */},
|
|
326
|
+
"analytics": {/* … */},
|
|
206
327
|
},
|
|
207
328
|
}
|
|
208
329
|
```
|
|
@@ -310,7 +431,7 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
|
|
|
310
431
|
|
|
311
432
|
```js
|
|
312
433
|
// astro.config.mjs
|
|
313
|
-
getvitops({ css: { input:
|
|
434
|
+
getvitops({ css: { input: "company.json", format: "css" } });
|
|
314
435
|
```
|
|
315
436
|
|
|
316
437
|
```
|
|
@@ -621,7 +742,7 @@ ffmpeg`, `apt install ffmpeg`, `winget install Gyan.FFmpeg`). The command fails
|
|
|
621
742
|
```js
|
|
622
743
|
// astro.config.mjs
|
|
623
744
|
getvitops({
|
|
624
|
-
css: { input:
|
|
745
|
+
css: { input: "design-system.json", format: "css", out: "src/styles" },
|
|
625
746
|
editor: true,
|
|
626
747
|
});
|
|
627
748
|
```
|
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getvitops/vite",
|
|
3
|
-
"version": "
|
|
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": "
|
|
22
|
-
"@getvitops/utils": "
|
|
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": "
|
|
34
|
+
"vitest": "4.1.9"
|
|
27
35
|
},
|
|
28
36
|
"peerDependencies": {
|
|
29
37
|
"vite": ">=5"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=24"
|
|
30
41
|
}
|
|
31
42
|
}
|