@pieai/swimmer-ui-kit 1.8.1 → 1.10.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 +59 -0
- package/NOTICE +55 -0
- package/dist/index.d.ts +220 -0
- package/dist/index.js +2121 -991
- package/dist/preview.css +1 -1
- package/dist/styles.css +1 -1
- package/donors-individual-lock.json +31 -0
- package/donors-individual.md +64 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,65 @@
|
|
|
3
3
|
All notable changes to `@pieai/swimmer-ui-kit`.
|
|
4
4
|
Format: [Keep a Changelog](https://keepachangelog.com); versioning: semver.
|
|
5
5
|
|
|
6
|
+
## 1.10.0
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **`motion="follow"` for selection and progress.** `<LiquidGroup>` now carries
|
|
11
|
+
the donor's Move surface through the token layer and shared animation and
|
|
12
|
+
filter-area budgets. It is used only by `GameSegmentedControl`'s selected
|
|
13
|
+
indicator and `GameProgress`'s leading edge; the shared clock sleeps
|
|
14
|
+
completely at rest.
|
|
15
|
+
- **Optional static waviness on `<LiquidGroup>`.** The new group-level
|
|
16
|
+
`waviness` and `wavinessFreq` knobs adapt the pinned liquid-gooey noise
|
|
17
|
+
displacement so merged silhouettes read as fluid instead of as two rounded
|
|
18
|
+
rectangles. The displaced `shape` feeds both SVG shadow passes and the final
|
|
19
|
+
SVG raster shadow, so the shadow follows the same edge. The token default is
|
|
20
|
+
`0` to preserve existing output; the recommended brand preset is `6px` at
|
|
21
|
+
`0.018`, with `3px`/`0.022` and `10px`/`0.014` available as conservative and
|
|
22
|
+
bold points on the same intensity axis. The noise is fixed-seed and static,
|
|
23
|
+
so it adds no idle animation clock. Its maximum displacement is reserved in
|
|
24
|
+
the filter region and counted by the 480,000 px² budget.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **`<LiquidGroup>` drew nothing under React StrictMode.** The effect cleanup
|
|
29
|
+
marked the memoized engine disposed for good, so StrictMode's second mount
|
|
30
|
+
acquired its budget, reported an active group, and then returned early from
|
|
31
|
+
`wake()`. The merged path's `d` stayed empty, which meant every app rendering
|
|
32
|
+
under StrictMode — that is, every app we ship — got no Morph and no Move at
|
|
33
|
+
all, with nothing in the console to say so. `register()` now revives a
|
|
34
|
+
disposed engine and resets the observer and listener state with it, a
|
|
35
|
+
StrictMode regression test asserts the path is not empty, and the
|
|
36
|
+
budget-exhausted path warns once in development instead of degrading in
|
|
37
|
+
silence. Storybook runs with StrictMode on.
|
|
38
|
+
|
|
39
|
+
## 1.9.0
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- **`<LiquidGroup>`, a budgeted liquid-merge primitive.** Two or more nearby
|
|
44
|
+
children share one gooey silhouette while their own content stays crisp: an
|
|
45
|
+
SVG blur-plus-contrast filter builds the merged shape, and the content is
|
|
46
|
+
drawn unfiltered on top. It is a one-shot primitive for celebrations, merge
|
|
47
|
+
moments and transitions — not a resident background, not behind body text,
|
|
48
|
+
and not on navigation. `blur`, `contrast` and `filterPadding` are the shape
|
|
49
|
+
knobs; `motion="reduced"` snaps instead of springing.
|
|
50
|
+
- **`stroke` on `<LiquidGroup>`.** The border belongs to the merged silhouette,
|
|
51
|
+
not to the pieces. Passing a CSS border shorthand draws one continuous
|
|
52
|
+
outline that deforms with the merge, including across the liquid bridge. A
|
|
53
|
+
child that draws its own `border` will show a static circle that refuses to
|
|
54
|
+
merge — that is the bug this prop exists to remove, and the story documents
|
|
55
|
+
it as a rule rather than a preference.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- **The `LiquidGroup` stories now demonstrate the supported composition.** The
|
|
60
|
+
demo buttons reset their browser border and background so they do not paint
|
|
61
|
+
hard-edged content-layer circles over the merged silhouette. The stories now
|
|
62
|
+
show the continuous outline on `LiquidGroup`, with a dedicated
|
|
63
|
+
`stroke` + `shadow` example that makes the group-owned treatment explicit.
|
|
64
|
+
|
|
6
65
|
## 1.8.1
|
|
7
66
|
|
|
8
67
|
### Fixed
|
package/NOTICE
CHANGED
|
@@ -32,6 +32,61 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
32
32
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
33
|
SOFTWARE.
|
|
34
34
|
|
|
35
|
+
Liquid-gooey morph filter
|
|
36
|
+
-------------------------
|
|
37
|
+
The liquid morph primitive in `src/LiquidGroup.tsx` and its supporting filter,
|
|
38
|
+
geometry, shadow, and spring modules is an original SwimmerUIKit
|
|
39
|
+
implementation informed by the `liquid-gooey` package in the Libraries
|
|
40
|
+
repository (https://github.com/Jakubantalik/Libraries/tree/main/packages/liquid-gooey),
|
|
41
|
+
Copyright (c) 2026 Jakub Antalik, licensed under the MIT License.
|
|
42
|
+
|
|
43
|
+
The reviewed upstream state is pinned in `donors-individual-lock.json` at commit
|
|
44
|
+
`3862ffa345217443b63696a8c331a0664eea4b04`; the package source lives at
|
|
45
|
+
`packages/liquid-gooey/` in that repository. The combined-workspace review
|
|
46
|
+
checkout is `<portfolio-root>/_donors-individual/for_SwimmerUIKit/` and is not
|
|
47
|
+
packaged or loaded at runtime.
|
|
48
|
+
|
|
49
|
+
We took the donor's morph-specific ideas and small implementation patterns:
|
|
50
|
+
the SVG silhouette/content split, the Gaussian-blur plus alpha color-matrix
|
|
51
|
+
filter, rounded-rectangle geometry, token-compatible shadow passes, and spring
|
|
52
|
+
to easing compilation. We also adapted its Move center spring, velocity-axis
|
|
53
|
+
stretch, and lagging tail/mid-droplet physics for the selected segmented
|
|
54
|
+
indicator and progress leading edge. This package now directly adapts the
|
|
55
|
+
donor's group-level `waviness` / `wavinessFreq` filter pass: a fixed-seed
|
|
56
|
+
`feTurbulence` field and `feDisplacementMap` move the silhouette before its
|
|
57
|
+
shadow passes consume it, so the shadow follows the same edge. We did not take
|
|
58
|
+
the donor's melt, bend, or dissolve systems, its general observer, or its
|
|
59
|
+
image-melt engine. We changed the implementation for this kit by making fill
|
|
60
|
+
and shadow values token-driven, keeping waviness static with a shipped-off
|
|
61
|
+
token default, adding a process-wide animated-group and filter-area budget
|
|
62
|
+
that includes the displacement slack, and putting the shared
|
|
63
|
+
requestAnimationFrame clock to sleep after stillness. The actual interactive
|
|
64
|
+
content remains outside the filtered SVG layer.
|
|
65
|
+
|
|
66
|
+
The MIT License text for that material:
|
|
67
|
+
|
|
68
|
+
MIT License
|
|
69
|
+
|
|
70
|
+
Copyright (c) 2026 Jakub
|
|
71
|
+
|
|
72
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
73
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
74
|
+
in the Software without restriction, including without limitation the rights
|
|
75
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
76
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
77
|
+
furnished to do so, subject to the following conditions:
|
|
78
|
+
|
|
79
|
+
The above copyright notice and this permission notice shall be included in all
|
|
80
|
+
copies or substantial portions of the Software.
|
|
81
|
+
|
|
82
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
83
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
84
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
85
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
86
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
87
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
88
|
+
SOFTWARE.
|
|
89
|
+
|
|
35
90
|
Fonts
|
|
36
91
|
-----
|
|
37
92
|
Baloo 2 and Geist Variable are licensed under the SIL Open Font License.
|
package/dist/index.d.ts
CHANGED
|
@@ -268,6 +268,45 @@ export declare const CLAY_LAYER_TOKENS: {
|
|
|
268
268
|
readonly toast: "var(--game-ui-z-toast)";
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
+
/**
|
|
272
|
+
* Token references for the adopted liquid-gooey Move physics. The values are
|
|
273
|
+
* deliberately numeric custom properties so a host theme can tune the feel
|
|
274
|
+
* without putting physics constants in the engine.
|
|
275
|
+
*/
|
|
276
|
+
declare const CLAY_LIQUID_GOOEY_TOKENS: {
|
|
277
|
+
readonly moveStiffness: "var(--game-ui-liquid-gooey-move-stiffness)";
|
|
278
|
+
readonly moveDamping: "var(--game-ui-liquid-gooey-move-damping)";
|
|
279
|
+
readonly moveStretch: "var(--game-ui-liquid-gooey-move-stretch)";
|
|
280
|
+
readonly moveTail: "var(--game-ui-liquid-gooey-move-tail)";
|
|
281
|
+
readonly moveForce: "var(--game-ui-liquid-gooey-move-force)";
|
|
282
|
+
readonly moveTailSpringStiffness: "var(--game-ui-liquid-gooey-move-tail-spring-stiffness)";
|
|
283
|
+
readonly moveTailSpringDamping: "var(--game-ui-liquid-gooey-move-tail-spring-damping)";
|
|
284
|
+
readonly moveStretchSpeed: "var(--game-ui-liquid-gooey-move-stretch-speed)";
|
|
285
|
+
readonly moveStretchSquash: "var(--game-ui-liquid-gooey-move-stretch-squash)";
|
|
286
|
+
readonly moveSpeedThreshold: "var(--game-ui-liquid-gooey-move-speed-threshold)";
|
|
287
|
+
readonly moveTailOnsetSpeed: "var(--game-ui-liquid-gooey-move-tail-onset-speed)";
|
|
288
|
+
readonly moveTailOnsetRange: "var(--game-ui-liquid-gooey-move-tail-onset-range)";
|
|
289
|
+
readonly moveTailRamp: "var(--game-ui-liquid-gooey-move-tail-ramp)";
|
|
290
|
+
readonly moveTailMinRadius: "var(--game-ui-liquid-gooey-move-tail-min-radius)";
|
|
291
|
+
readonly moveTailWobble: "var(--game-ui-liquid-gooey-move-tail-wobble)";
|
|
292
|
+
readonly moveTailPhaseSpeed: "var(--game-ui-liquid-gooey-move-tail-phase-speed)";
|
|
293
|
+
readonly moveTailMidpointA: "var(--game-ui-liquid-gooey-move-tail-midpoint-a)";
|
|
294
|
+
readonly moveTailMidpointB: "var(--game-ui-liquid-gooey-move-tail-midpoint-b)";
|
|
295
|
+
readonly moveTailMidRadiusA: "var(--game-ui-liquid-gooey-move-tail-mid-radius-a)";
|
|
296
|
+
readonly moveTailMidRadiusB: "var(--game-ui-liquid-gooey-move-tail-mid-radius-b)";
|
|
297
|
+
readonly moveTailWobblePhase: "var(--game-ui-liquid-gooey-move-tail-wobble-phase)";
|
|
298
|
+
readonly moveMinPerpendicular: "var(--game-ui-liquid-gooey-move-min-perpendicular)";
|
|
299
|
+
readonly moveLagBase: "var(--game-ui-liquid-gooey-move-lag-base)";
|
|
300
|
+
readonly moveLagForce: "var(--game-ui-liquid-gooey-move-lag-force)";
|
|
301
|
+
readonly moveSettleDistance: "var(--game-ui-liquid-gooey-move-settle-distance)";
|
|
302
|
+
readonly moveSettleSpeed: "var(--game-ui-liquid-gooey-move-settle-speed)";
|
|
303
|
+
readonly moveIntegrationRate: "var(--game-ui-liquid-gooey-move-integration-rate)";
|
|
304
|
+
readonly waviness: "var(--game-ui-liquid-gooey-waviness)";
|
|
305
|
+
readonly wavinessFreq: "var(--game-ui-liquid-gooey-waviness-freq)";
|
|
306
|
+
};
|
|
307
|
+
export { CLAY_LIQUID_GOOEY_TOKENS }
|
|
308
|
+
export { CLAY_LIQUID_GOOEY_TOKENS as GAME_UI_LIQUID_GOOEY_TOKENS }
|
|
309
|
+
|
|
271
310
|
/**
|
|
272
311
|
* Effect knobs for `<LiquidMetalButton>`. Face/ink are real colours (both
|
|
273
312
|
* themes must set them); accent aliases `--game-ui-accent` so a host can
|
|
@@ -552,6 +591,37 @@ export declare const CLAY_UI_TOKENS: {
|
|
|
552
591
|
readonly rest: "var(--game-ui-liquid-metal-rest)";
|
|
553
592
|
readonly bloom: "var(--game-ui-liquid-metal-bloom)";
|
|
554
593
|
};
|
|
594
|
+
readonly liquidGooey: {
|
|
595
|
+
readonly moveStiffness: "var(--game-ui-liquid-gooey-move-stiffness)";
|
|
596
|
+
readonly moveDamping: "var(--game-ui-liquid-gooey-move-damping)";
|
|
597
|
+
readonly moveStretch: "var(--game-ui-liquid-gooey-move-stretch)";
|
|
598
|
+
readonly moveTail: "var(--game-ui-liquid-gooey-move-tail)";
|
|
599
|
+
readonly moveForce: "var(--game-ui-liquid-gooey-move-force)";
|
|
600
|
+
readonly moveTailSpringStiffness: "var(--game-ui-liquid-gooey-move-tail-spring-stiffness)";
|
|
601
|
+
readonly moveTailSpringDamping: "var(--game-ui-liquid-gooey-move-tail-spring-damping)";
|
|
602
|
+
readonly moveStretchSpeed: "var(--game-ui-liquid-gooey-move-stretch-speed)";
|
|
603
|
+
readonly moveStretchSquash: "var(--game-ui-liquid-gooey-move-stretch-squash)";
|
|
604
|
+
readonly moveSpeedThreshold: "var(--game-ui-liquid-gooey-move-speed-threshold)";
|
|
605
|
+
readonly moveTailOnsetSpeed: "var(--game-ui-liquid-gooey-move-tail-onset-speed)";
|
|
606
|
+
readonly moveTailOnsetRange: "var(--game-ui-liquid-gooey-move-tail-onset-range)";
|
|
607
|
+
readonly moveTailRamp: "var(--game-ui-liquid-gooey-move-tail-ramp)";
|
|
608
|
+
readonly moveTailMinRadius: "var(--game-ui-liquid-gooey-move-tail-min-radius)";
|
|
609
|
+
readonly moveTailWobble: "var(--game-ui-liquid-gooey-move-tail-wobble)";
|
|
610
|
+
readonly moveTailPhaseSpeed: "var(--game-ui-liquid-gooey-move-tail-phase-speed)";
|
|
611
|
+
readonly moveTailMidpointA: "var(--game-ui-liquid-gooey-move-tail-midpoint-a)";
|
|
612
|
+
readonly moveTailMidpointB: "var(--game-ui-liquid-gooey-move-tail-midpoint-b)";
|
|
613
|
+
readonly moveTailMidRadiusA: "var(--game-ui-liquid-gooey-move-tail-mid-radius-a)";
|
|
614
|
+
readonly moveTailMidRadiusB: "var(--game-ui-liquid-gooey-move-tail-mid-radius-b)";
|
|
615
|
+
readonly moveTailWobblePhase: "var(--game-ui-liquid-gooey-move-tail-wobble-phase)";
|
|
616
|
+
readonly moveMinPerpendicular: "var(--game-ui-liquid-gooey-move-min-perpendicular)";
|
|
617
|
+
readonly moveLagBase: "var(--game-ui-liquid-gooey-move-lag-base)";
|
|
618
|
+
readonly moveLagForce: "var(--game-ui-liquid-gooey-move-lag-force)";
|
|
619
|
+
readonly moveSettleDistance: "var(--game-ui-liquid-gooey-move-settle-distance)";
|
|
620
|
+
readonly moveSettleSpeed: "var(--game-ui-liquid-gooey-move-settle-speed)";
|
|
621
|
+
readonly moveIntegrationRate: "var(--game-ui-liquid-gooey-move-integration-rate)";
|
|
622
|
+
readonly waviness: "var(--game-ui-liquid-gooey-waviness)";
|
|
623
|
+
readonly wavinessFreq: "var(--game-ui-liquid-gooey-waviness-freq)";
|
|
624
|
+
};
|
|
555
625
|
};
|
|
556
626
|
|
|
557
627
|
export declare type ClayAssetGroup = keyof typeof CLAY_ASSETS;
|
|
@@ -589,6 +659,20 @@ export declare type ClayIconStyle = 'game' | 'line';
|
|
|
589
659
|
|
|
590
660
|
export declare type ClayTokenCategory = keyof typeof CLAY_UI_TOKENS;
|
|
591
661
|
|
|
662
|
+
declare type CornerRadii = [number, number, number, number];
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Process-wide budget for animated liquid-gooey groups.
|
|
666
|
+
*
|
|
667
|
+
* SVG filters do not consume WebGL contexts, but they can still be expensive
|
|
668
|
+
* to repaint. The default allows two animated groups and rejects regions
|
|
669
|
+
* larger than the configured filter-area ceiling. A rejected group keeps its
|
|
670
|
+
* SVG filter and snaps its content to each new state without animating.
|
|
671
|
+
*/
|
|
672
|
+
export declare const DEFAULT_LIQUID_GOOEY_ANIMATION_BUDGET = 2;
|
|
673
|
+
|
|
674
|
+
export declare const DEFAULT_LIQUID_GOOEY_FILTER_AREA_BUDGET = 480000;
|
|
675
|
+
|
|
592
676
|
/**
|
|
593
677
|
* Process-wide ledger for liquid-metal WebGL2 contexts.
|
|
594
678
|
*
|
|
@@ -708,6 +792,35 @@ export declare const GAME_UI_TARGETS: {
|
|
|
708
792
|
export declare const GAME_UI_THEME_CONTRACT: readonly ["--game-ui-bg", "--game-ui-surface", "--game-ui-surface-raised", "--game-ui-panel", "--game-ui-panel-strong", "--game-ui-panel-deep", "--game-ui-text", "--game-ui-text-muted", "--game-ui-accent", "--game-ui-accent-bright", "--game-ui-secondary", "--game-ui-success", "--game-ui-success-bright", "--game-ui-danger", "--game-ui-danger-bright", "--game-ui-warning", "--game-ui-focus-ring", "--game-ui-border-subtle", "--game-ui-border-strong", "--game-ui-disabled", "--game-ui-ink-deep", "--game-ui-border-ink", "--game-ui-wood", "--game-ui-ink-title", "--game-ui-ink-heading", "--game-ui-liquid-metal-face", "--game-ui-liquid-metal-ink"];
|
|
709
793
|
|
|
710
794
|
export declare const GAME_UI_TOKENS: {
|
|
795
|
+
readonly moveStiffness: "var(--game-ui-liquid-gooey-move-stiffness)";
|
|
796
|
+
readonly moveDamping: "var(--game-ui-liquid-gooey-move-damping)";
|
|
797
|
+
readonly moveStretch: "var(--game-ui-liquid-gooey-move-stretch)";
|
|
798
|
+
readonly moveTail: "var(--game-ui-liquid-gooey-move-tail)";
|
|
799
|
+
readonly moveForce: "var(--game-ui-liquid-gooey-move-force)";
|
|
800
|
+
readonly moveTailSpringStiffness: "var(--game-ui-liquid-gooey-move-tail-spring-stiffness)";
|
|
801
|
+
readonly moveTailSpringDamping: "var(--game-ui-liquid-gooey-move-tail-spring-damping)";
|
|
802
|
+
readonly moveStretchSpeed: "var(--game-ui-liquid-gooey-move-stretch-speed)";
|
|
803
|
+
readonly moveStretchSquash: "var(--game-ui-liquid-gooey-move-stretch-squash)";
|
|
804
|
+
readonly moveSpeedThreshold: "var(--game-ui-liquid-gooey-move-speed-threshold)";
|
|
805
|
+
readonly moveTailOnsetSpeed: "var(--game-ui-liquid-gooey-move-tail-onset-speed)";
|
|
806
|
+
readonly moveTailOnsetRange: "var(--game-ui-liquid-gooey-move-tail-onset-range)";
|
|
807
|
+
readonly moveTailRamp: "var(--game-ui-liquid-gooey-move-tail-ramp)";
|
|
808
|
+
readonly moveTailMinRadius: "var(--game-ui-liquid-gooey-move-tail-min-radius)";
|
|
809
|
+
readonly moveTailWobble: "var(--game-ui-liquid-gooey-move-tail-wobble)";
|
|
810
|
+
readonly moveTailPhaseSpeed: "var(--game-ui-liquid-gooey-move-tail-phase-speed)";
|
|
811
|
+
readonly moveTailMidpointA: "var(--game-ui-liquid-gooey-move-tail-midpoint-a)";
|
|
812
|
+
readonly moveTailMidpointB: "var(--game-ui-liquid-gooey-move-tail-midpoint-b)";
|
|
813
|
+
readonly moveTailMidRadiusA: "var(--game-ui-liquid-gooey-move-tail-mid-radius-a)";
|
|
814
|
+
readonly moveTailMidRadiusB: "var(--game-ui-liquid-gooey-move-tail-mid-radius-b)";
|
|
815
|
+
readonly moveTailWobblePhase: "var(--game-ui-liquid-gooey-move-tail-wobble-phase)";
|
|
816
|
+
readonly moveMinPerpendicular: "var(--game-ui-liquid-gooey-move-min-perpendicular)";
|
|
817
|
+
readonly moveLagBase: "var(--game-ui-liquid-gooey-move-lag-base)";
|
|
818
|
+
readonly moveLagForce: "var(--game-ui-liquid-gooey-move-lag-force)";
|
|
819
|
+
readonly moveSettleDistance: "var(--game-ui-liquid-gooey-move-settle-distance)";
|
|
820
|
+
readonly moveSettleSpeed: "var(--game-ui-liquid-gooey-move-settle-speed)";
|
|
821
|
+
readonly moveIntegrationRate: "var(--game-ui-liquid-gooey-move-integration-rate)";
|
|
822
|
+
readonly waviness: "var(--game-ui-liquid-gooey-waviness)";
|
|
823
|
+
readonly wavinessFreq: "var(--game-ui-liquid-gooey-waviness-freq)";
|
|
711
824
|
readonly iconSm: "var(--game-ui-asset-icon-sm)";
|
|
712
825
|
readonly iconMd: "var(--game-ui-asset-icon-md)";
|
|
713
826
|
readonly iconLg: "var(--game-ui-asset-icon-lg)";
|
|
@@ -1924,11 +2037,101 @@ export declare function getClayIconStyles(icon: ClayIconName): ClayIconStyle[];
|
|
|
1924
2037
|
|
|
1925
2038
|
export declare function getClaySourceAssetPath(icon: ClayIconName, style?: ClayIconStyle): string;
|
|
1926
2039
|
|
|
2040
|
+
export declare function getLiquidGooeyBudget(): LiquidGooeyBudgetState;
|
|
2041
|
+
|
|
1927
2042
|
export declare function getLiquidMetalContextBudget(): {
|
|
1928
2043
|
limit: number;
|
|
1929
2044
|
used: number;
|
|
1930
2045
|
};
|
|
1931
2046
|
|
|
2047
|
+
declare interface LiquidGooeyBudgetOptions {
|
|
2048
|
+
maxAnimatedGroups?: number;
|
|
2049
|
+
maxFilterArea?: number;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
declare interface LiquidGooeyBudgetState {
|
|
2053
|
+
maxAnimatedGroups: number;
|
|
2054
|
+
maxFilterArea: number;
|
|
2055
|
+
activeGroups: number;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Merges nearby item silhouettes into one shape while leaving their content
|
|
2060
|
+
* accessible and unfiltered. Do NOT add border, outline, or box-shadow to
|
|
2061
|
+
* children directly; pass the shared treatment to <LiquidGroup>.
|
|
2062
|
+
*/
|
|
2063
|
+
export declare const LiquidGroup: ForwardRefExoticComponent<LiquidGroupProps & RefAttributes<HTMLDivElement>> & {
|
|
2064
|
+
Item: ForwardRefExoticComponent<LiquidItemProps & RefAttributes<HTMLDivElement>>;
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* A shared liquid silhouette behind crisp item content.
|
|
2069
|
+
*
|
|
2070
|
+
* Put the visual treatment on the group: `fill`, `stroke`, and `shadow` are
|
|
2071
|
+
* rebuilt on the merged silhouette. Do NOT add border, outline, or box-shadow
|
|
2072
|
+
* to children directly; those styles live on the content layer and cannot
|
|
2073
|
+
* merge with the liquid shape.
|
|
2074
|
+
*
|
|
2075
|
+
* Its motion vocabulary is intentionally small and semantic:
|
|
2076
|
+
*
|
|
2077
|
+
* | gesture | meaning |
|
|
2078
|
+
* | --- | --- |
|
|
2079
|
+
* | **merge** (Morph) | two things become one: reward settling, collecting, confirming |
|
|
2080
|
+
* | **follow** (Move) | selection, progress, dragging |
|
|
2081
|
+
* | **dissolve** | replacement, transition |
|
|
2082
|
+
* | **still** | THE DEFAULT |
|
|
2083
|
+
*
|
|
2084
|
+
* Liquid appears only on a state change the user caused. There is no ambient,
|
|
2085
|
+
* idle, or decorative liquid; keep the filter-area budget visible when more
|
|
2086
|
+
* than one group is on a screen.
|
|
2087
|
+
*/
|
|
2088
|
+
export declare interface LiquidGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2089
|
+
children: ReactNode;
|
|
2090
|
+
/** Goo blur sigma in px. Larger values bridge larger gaps. */
|
|
2091
|
+
blur?: number;
|
|
2092
|
+
/** Alpha-contrast slope. Larger values make the liquid edge harder. */
|
|
2093
|
+
contrast?: number;
|
|
2094
|
+
/** Surface fill. Defaults to the kit's theme surface token. */
|
|
2095
|
+
fill?: string;
|
|
2096
|
+
/** Extra filter-region slack in px for the silhouette's painted edges. */
|
|
2097
|
+
filterPadding?: number;
|
|
2098
|
+
/** Optional token-based box-shadow syntax rebuilt on the merged silhouette. */
|
|
2099
|
+
shadow?: string;
|
|
2100
|
+
/** Optional stroke syntax rebuilt on the merged silhouette. Note: Do NOT add border to children directly! */
|
|
2101
|
+
stroke?: string;
|
|
2102
|
+
/** Max px the liquid boundary undulates. Defaults to the CSS token (0). */
|
|
2103
|
+
waviness?: number;
|
|
2104
|
+
/** Noise frequency of the undulation; lower values make longer waves. */
|
|
2105
|
+
wavinessFreq?: number;
|
|
2106
|
+
/**
|
|
2107
|
+
* `auto` follows the existing component transition clock, `follow` adopts
|
|
2108
|
+
* the Move surface for an explicit user-caused selection/progress gesture,
|
|
2109
|
+
* and `reduced` snaps. Still remains the house default gesture.
|
|
2110
|
+
*/
|
|
2111
|
+
motion?: 'auto' | 'follow' | 'reduced';
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
export declare const LiquidItem: ForwardRefExoticComponent<LiquidItemProps & RefAttributes<HTMLDivElement>>;
|
|
2115
|
+
|
|
2116
|
+
export declare interface LiquidItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2117
|
+
/**
|
|
2118
|
+
* Crisp content rendered above the merged silhouette. Do NOT add border,
|
|
2119
|
+
* outline, or box-shadow to children directly; put the shared treatment on
|
|
2120
|
+
* the parent <LiquidGroup> instead.
|
|
2121
|
+
*/
|
|
2122
|
+
children: ReactNode;
|
|
2123
|
+
/** Mirrored translation applied to the content wrapper and SVG silhouette. */
|
|
2124
|
+
x?: number;
|
|
2125
|
+
y?: number;
|
|
2126
|
+
scale?: number;
|
|
2127
|
+
/** Spring preset/config or an explicit duration/easing pair. */
|
|
2128
|
+
transition?: Transition;
|
|
2129
|
+
/** Delay before this item starts its group-clock transition, in ms. */
|
|
2130
|
+
delay?: number;
|
|
2131
|
+
/** Override the measured content border radius for the silhouette. */
|
|
2132
|
+
radius?: number | CornerRadii;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
1932
2135
|
export declare function LiquidMetalButton({ children, className, onClick, sound, type, renderer, ...props }: LiquidMetalButtonProps): ReactNode;
|
|
1933
2136
|
|
|
1934
2137
|
export declare interface LiquidMetalButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -1970,6 +2173,23 @@ export declare function setClayAssetBasePath(basePath: string): void;
|
|
|
1970
2173
|
*/
|
|
1971
2174
|
export declare function setClayAssetMode(mode: ClayAssetMode): void;
|
|
1972
2175
|
|
|
2176
|
+
/** Update one or both host-side performance limits. */
|
|
2177
|
+
export declare function setLiquidGooeyBudget(next: number | LiquidGooeyBudgetOptions): void;
|
|
2178
|
+
|
|
1973
2179
|
export declare function setLiquidMetalContextBudget(nextLimit: number): void;
|
|
1974
2180
|
|
|
2181
|
+
/** Small spring-to-easing compiler used by the shared group clock. */
|
|
2182
|
+
declare interface SpringConfig {
|
|
2183
|
+
stiffness?: number;
|
|
2184
|
+
damping?: number;
|
|
2185
|
+
mass?: number;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
declare type Transition = TransitionPreset | SpringConfig | {
|
|
2189
|
+
duration: number;
|
|
2190
|
+
ease?: string;
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2193
|
+
declare type TransitionPreset = 'snappy' | 'smooth' | 'bouncy';
|
|
2194
|
+
|
|
1975
2195
|
export { }
|