@pieai/swimmer-ui-kit 1.11.0 → 1.11.2

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
@@ -5,37 +5,58 @@ Format: [Keep a Changelog](https://keepachangelog.com); versioning: semver.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 1.11.2
9
+
10
+ ### Fixed
11
+
12
+ - **The budget warnings were dead in every published build.** Both budget
13
+ fallbacks — the animation engine's and Melt/dissolve's — were gated on
14
+ `import.meta.env.DEV`. That flag resolves when *this package* is built, not
15
+ when the app importing it is, so it was baked to `false` in the artifact and
16
+ the guard minified to `if (this.budgetWarningEmitted || !0) return;` — an
17
+ unconditional early return. The kit degraded to static rendering silently,
18
+ which is precisely the behaviour those warnings were added to make visible.
19
+ They are no longer gated on build mode: a group that stops animating says so
20
+ once, in whatever build the consumer is running. `isDev()` is gone entirely,
21
+ along with the two authoring warnings it silenced; a library cannot detect
22
+ its consumer's build mode, and trying to is what caused this.
23
+
8
24
  ### Added
9
25
 
10
- - **Morph shape evolution and content cross-blur.** `LiquidGroup.Item` now
11
- accepts `morph={{ shape, speed, bounce, contentBlur }}`. The adopted centre
12
- size corner timeline makes the liquid change form like jelly, while the
13
- default `contentBlur: 7` is written to the content wrapper only and clears as
14
- the motion settles. The brand-kit token default deliberately enables shape;
15
- pass `shape: false` for a calm opt-out.
16
- - **Surface-glued Bend.** `effect="bend"` follows an externally moved child,
17
- bows its long edges and deforms its rounded caps without a lagging body or
18
- tail. It publishes `--lg-bend-x`, `--lg-bend-y`, `--lg-bend-xn`, and
19
- `--lg-bend-yn` on the item for content tilt/rotation.
20
- - **Knob stories and budget evidence.** Storybook now exposes conservative,
21
- default, and bold points for Morph and Bend, plus contentBlur off/default/bold
22
- comparisons and a combined filter-area readout.
23
-
24
- ### Performance
25
-
26
- - Morph content-blur and Bend deformation slack are part of the existing
27
- 480,000 CSS-pixel filter-area ceiling. The shared requestAnimationFrame clock
28
- remains event-driven and sleeps completely after stillness; an over-budget
29
- group snaps to static filtered rendering with a development warning.
30
- - **Image Melt and contact dissolve for `LiquidGroup.Item`.** The first two
31
- `effect="melt"` items now render the donor-shaped measured image pair with
32
- crisp-face seam masks, two-palette colour mixing, and a visible marbling
33
- pass. `dissolve` is an image-only contact modifier with liquid displacement
34
- and release hysteresis; DOM text stays in the crisp content layer, and the
35
- modifier is ignored with a development warning under `effect="move"`.
36
- Numeric knobs are token-backed, share the 480,000 px² filter-area and
37
- process-wide concurrency budgets, degrade visibly with a one-time warning
38
- when over budget, and sleep their requestAnimationFrame clock at rest.
26
+ - **`scripts/check-warnings-survive-build.mjs`, wired into `build`.** The defect
27
+ above is invisible in the source and invisible to the test suite; it exists
28
+ only in the bundled output. So the check reads the bundled output, and fails
29
+ if a promised warning is missing or its guard has been folded to a constant.
30
+ Verified by reintroducing the bug and watching it fail.
31
+
32
+ ### Note
33
+
34
+ - The previous `Unreleased` section listed Morph shape, Bend, Melt and the knob
35
+ stories as unshipped. They shipped in 1.11.0. The entries were left behind by
36
+ the branch merges and have been removed rather than re-dated, since 1.11.0
37
+ already describes the same work.
38
+
39
+ ## 1.11.1
40
+
41
+ ### Fixed
42
+
43
+ - **Waviness now scales to the element it decorates.** `waviness` is an absolute
44
+ pixel amount, and 6px is 11.5% of a 52px segmented control and 42.9% of a 14px
45
+ progress bar the same token reading as texture in one place and as bites
46
+ taken out of the bar in the other. The effective amplitude is capped at a
47
+ fraction of the shorter side, so the default is safe wherever it lands instead
48
+ of requiring every consumer to remember a rule that fails silently.
49
+
50
+ - **A clean contour after displacement.** The wavy silhouette is made by moving
51
+ the alpha edge between pixels and nothing reconstructed it afterwards. A 0.5px
52
+ blur on the displaced shape gives the rasteriser something to antialias, and
53
+ the filter region grows to fit it — a blur with no room to spread would have
54
+ traded a ragged edge for a clipped one.
55
+
56
+ This addresses the reconstruction, not the noise. Two octaves at a low base
57
+ frequency is blocky, and a displacement inherits the shape of what drives it;
58
+ the rectangular notches visible on a 14px bar are consistent with that, and
59
+ that hypothesis is still open.
39
60
 
40
61
  ## 1.11.0
41
62
 
package/dist/index.d.ts CHANGED
@@ -2313,6 +2313,13 @@ export declare interface ImageMeltOptions {
2313
2313
  waviness?: number;
2314
2314
  }
2315
2315
 
2316
+ /**
2317
+ * The default fraction is intentionally derived from the rendered surface,
2318
+ * not from the requested waviness token. A fixed pixel displacement is safe
2319
+ * on a large blob but can consume a thin control's whole visual height.
2320
+ */
2321
+ export declare const LIQUID_GOOEY_WAVINESS_MAX_FRACTION = 0.3;
2322
+
2316
2323
  declare interface LiquidGooeyBudgetOptions {
2317
2324
  maxAnimatedGroups?: number;
2318
2325
  maxFilterArea?: number;
@@ -2376,6 +2383,11 @@ export declare interface LiquidGroupProps extends Omit<HTMLAttributes<HTMLDivEle
2376
2383
  waviness?: number;
2377
2384
  /** Noise frequency of the undulation; lower values make longer waves. */
2378
2385
  wavinessFreq?: number;
2386
+ /**
2387
+ * Max fraction of the group's shorter side allowed for waviness. Defaults
2388
+ * to 0.3; pass `false` to explicitly disable the size clamp.
2389
+ */
2390
+ wavinessClamp?: number | false;
2379
2391
  /**
2380
2392
  * `auto` follows the existing component transition clock, `follow` adopts
2381
2393
  * the Move surface for an explicit user-caused selection/progress gesture,