@motion-proto/live-tokens 0.89.1 → 0.90.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,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.90.0 — Thumbnail ratio for ImageLightbox
4
+
5
+ ### Added
6
+
7
+ - **ImageLightbox takes a `thumbAspect`.** The prop sets the thumbnail box's
8
+ ratio, such as `thumbAspect={4 / 3}`, and pairs with `fit="cover"` to crop
9
+ the thumbnail. The image still opens whole, at its own ratio. VideoLightbox
10
+ has had the same prop. A page no longer overrides the wrapper's inline
11
+ `aspect-ratio` with `!important`.
12
+
13
+ ### Fixed
14
+
15
+ - **A page's footer sits at the bottom of the page.** The router wrapper
16
+ added 12rem of padding under every page, in production as well as in dev,
17
+ so a footer ended above an empty band. The wrapper no longer pads the
18
+ page, and each page sets its own bottom spacing.
19
+
20
+ ## 0.89.2 — Faster component tests
21
+
22
+ ### Changed
23
+
24
+ - **`check-component --tests` runs faster.** The declared-paint check probes
25
+ each view's properties in one browser call, and the token-selector check
26
+ clicks through one selector per component and opens every other property's
27
+ dropdown in one call per view. Across the 29 shipped components the two
28
+ checks drop from 321s to 191s. They still fail on the same defects: a
29
+ wrong or missing part, a pseudo-element, an SVG paint, and a dropdown with
30
+ nothing to pick.
31
+ - **The npm publish waits for Verify.** A release push no longer runs the
32
+ unit tests and the live-editing suite twice. The publish workflow gates on
33
+ the Verify run for the tagged commit and runs only the packaging checks.
34
+
3
35
  ## 0.89.1 — Publish gate stops its dev server
4
36
 
5
37
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motion-proto/live-tokens",
3
- "version": "0.89.1",
3
+ "version": "0.90.0",
4
4
  "type": "module",
5
5
  "description": "Design token editor with live CSS variable editing. Svelte 5 + Vite 8.",
6
6
  "keywords": [
@@ -647,14 +647,13 @@
647
647
  /* Desktop: lock the docs surface to the viewport so only the content column
648
648
  scrolls — the rail is full-height and immovable, and there is never an
649
649
  empty band under the page. The router wrapper (.lt-app) assumes window-
650
- scroll pages (min-height + a 12rem bottom pad); neutralise that here, for
650
+ scroll pages (min-height); neutralise that here, for
651
651
  the docs route only, via :has. The doubled .lt-app outranks the wrapper's
652
652
  own scoped rule on a specificity tie. */
653
653
  @media (min-width: 961px) {
654
654
  :global(.lt-app.lt-app:has(.docs-page)) {
655
655
  height: 100vh;
656
656
  min-height: 0;
657
- padding-bottom: 0;
658
657
  overflow: hidden;
659
658
  }
660
659
  .docs-page { height: 100%; overflow: hidden; }
@@ -297,7 +297,6 @@
297
297
  width: 100%;
298
298
  min-height: 100vh;
299
299
  color: var(--text-primary);
300
- padding-bottom: 12rem;
301
300
  /* Set by LiveEditorOverlay when docked-open. Extends layout past the
302
301
  fixed panel so the viewport can scroll to reveal hidden content. */
303
302
  padding-right: var(--lt-overlay-scroll-pad, 0px);
@@ -305,14 +304,12 @@
305
304
 
306
305
  .lt-app.is-editor,
307
306
  .lt-app.is-colors {
308
- padding-bottom: 0;
309
307
  background: black;
310
308
  }
311
309
 
312
310
  .lt-app.is-component-editor {
313
311
  min-height: 0;
314
312
  height: 100vh;
315
- padding-bottom: 0;
316
313
  padding-right: 0;
317
314
  background: black;
318
315
  overflow: hidden;
@@ -9,6 +9,10 @@
9
9
  { when: 'a video clip the reader opens from its still.', use: 'videolightbox' },
10
10
  { when: 'slides or pages the reader reads in order.', use: 'slidepager' },
11
11
  ],
12
+ props: {
13
+ thumbAspect:
14
+ 'the ratio the thumbnail box holds, when it should not be the image\'s own. The image still opens whole, at its own ratio.',
15
+ },
12
16
  } satisfies CatalogueEntry;
13
17
  </script>
14
18
 
@@ -33,10 +37,12 @@
33
37
  single-entry array behaves exactly like a lone `src`. */
34
38
  images?: GalleryImage[];
35
39
  maxWidth?: number | string | undefined;
40
+ /** The thumbnail box's ratio, when it differs from the image's own. */
41
+ thumbAspect?: number | undefined;
36
42
  /** Closed-thumbnail object-fit. `cover` crops the thumbnail to fill its box;
37
43
  the expanded modal always uses `contain` so the whole image stays visible.
38
- `cover` only crops when the thumbnail has its own box (an aspect from
39
- `width`/`height`, or a CSS-constrained container). */
44
+ `cover` only crops when the thumbnail box differs from the image's shape
45
+ (a `thumbAspect`, or a CSS-constrained container). */
40
46
  fit?: 'contain' | 'cover';
41
47
  /** Where the tile's shadow lands. Both modes read
42
48
  `--imagelightbox-tile-shadow`: `box` casts it from the tile's rectangle,
@@ -94,6 +100,7 @@
94
100
  height = undefined,
95
101
  images = undefined,
96
102
  maxWidth = undefined,
103
+ thumbAspect = undefined,
97
104
  fit = 'contain',
98
105
  shadow = 'box',
99
106
  surface = undefined,
@@ -188,7 +195,7 @@
188
195
  return m ? m.w / m.h : undefined;
189
196
  };
190
197
  const naturalWidthOf = (it?: GalleryImage) => (it ? (it.width ?? measured[it.src]?.w) : undefined);
191
- const coverAspect = $derived(aspectOf(cover)); // inline thumbnail box
198
+ const tileAspect = $derived(thumbAspect ?? aspectOf(cover));
192
199
  const aspect = $derived(aspectOf(current)); // open modal box
193
200
 
194
201
  // Internal `scale` is relative to the fitted stage, so a natural-size cap is
@@ -620,7 +627,7 @@
620
627
 
621
628
  <div
622
629
  class="image-lightbox-wrapper"
623
- style:aspect-ratio={coverAspect ? `${coverAspect}` : undefined}
630
+ style:aspect-ratio={tileAspect ? `${tileAspect}` : undefined}
624
631
  style:max-width={typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth}
625
632
  >
626
633
  <button
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CONTRACTS_MODULE_ENV
3
- } from "./chunk-7VSUGI2C.js";
3
+ } from "./chunk-SHBYZUPD.js";
4
4
 
5
5
  // src/testing/vitest.ts
6
6
  import path from "path";
@@ -54,4 +54,4 @@ function createVitestConfig(viteConfig, options = {}) {
54
54
  export {
55
55
  createVitestConfig
56
56
  };
57
- //# sourceMappingURL=chunk-YFNMYU54.js.map
57
+ //# sourceMappingURL=chunk-GKO27NGN.js.map
@@ -1395,7 +1395,7 @@ var inputContract = {
1395
1395
  placeholder: { color: "--input-default-placeholder" }
1396
1396
  }
1397
1397
  },
1398
- // `assertPaintsFromToken` (here) drives a controlled pixel probe, so a
1398
+ // `assertProperties` (here) drives a controlled pixel probe, so a
1399
1399
  // unitless line-height round-trips fine. `assertPaintMap` (states, below)
1400
1400
  // reads the real, already-resolved value through `normalize()`, which
1401
1401
  // cannot recompute a unitless multiplier outside the field's own
@@ -3735,4 +3735,4 @@ export {
3735
3735
  allContracts,
3736
3736
  selectedContracts
3737
3737
  };
3738
- //# sourceMappingURL=chunk-7VSUGI2C.js.map
3738
+ //# sourceMappingURL=chunk-SHBYZUPD.js.map