@pieai/swimmer-ui-kit 2.12.0 → 2.14.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 +37 -0
- package/README.md +10 -2
- package/dist/index.d.ts +105 -34
- package/dist/index.js +1142 -957
- package/dist/liquid-presence.css +1 -1
- package/dist/liquid-presence.js +224 -206
- package/dist/{liquidGooeySpring-WwyGKGPL.js → liquidGooeySpring-r7c1S2ZB.js} +12 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ Format: [Keep a Changelog](https://keepachangelog.com); versioning: semver.
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 2.14.0 — 2026-10-01
|
|
9
|
+
|
|
10
|
+
- Fix the stair-stepped top edge on every glossy liquid body: the gloss pass
|
|
11
|
+
added its light's alpha to the body's, so a half-covered edge pixel turned
|
|
12
|
+
opaque wherever the highlight was bright. The light is now clipped to the
|
|
13
|
+
body eroded by a pixel and feathered; the highlight itself is unchanged.
|
|
14
|
+
- Add `LiquidFill`: `LiquidGroup` and `LiquidSurface` take `fill={{ top,
|
|
15
|
+
bottom?, sheen? }}` for the coloured-liquid light (a narrow brighter band at
|
|
16
|
+
the top, a deeper foot). Colours may be tokens; bands are CSS `color-mix`.
|
|
17
|
+
- `LiquidSurface` takes `gloss` and `outline={{ amplitude, lobes? }}` to
|
|
18
|
+
override its form's light and rest lobing.
|
|
19
|
+
- 涟 (`LiquidPresence`, `LiquidReveal` material surface): the face carries its
|
|
20
|
+
light in the fill (top to foot) and casts a soft contact shadow along its
|
|
21
|
+
own outline through the new `--game-ui-liquid-presence-shadow` token; the
|
|
22
|
+
material panel drops its raised rim and stroke. The dark surface is unchanged.
|
|
23
|
+
- Compatibility: additive API; visual change to glossy edges and to 涟's
|
|
24
|
+
material face. Owner approved publication on 2026-10-01 (University
|
|
25
|
+
session, "品牌UI包要发布成新版"), with the repository kept to one main line.
|
|
26
|
+
|
|
27
|
+
## 2.13.0 — 2026-09-29
|
|
28
|
+
|
|
29
|
+
- Add opt-in `surface="plaque"` to `GameButton`, `GameIconButton` and
|
|
30
|
+
`GameAvatar`, with opaque light/night copper token pairs derived from
|
|
31
|
+
Directing's reviewed D1-03 cabinet material. Default controls stay unchanged.
|
|
32
|
+
- Add controlled `GameOtpInput`: numeric slots, paste/autofill, keyboard and
|
|
33
|
+
backspace, localized descriptions and input-method composition handling.
|
|
34
|
+
Only changed user input completes a code; verification stays in the host.
|
|
35
|
+
- Add vertical `GameTabs` with Up/Down navigation and an accessible name.
|
|
36
|
+
- Add `GameListRow` with thumbnail, text, current indicator and independent
|
|
37
|
+
selection/actions; no nested buttons.
|
|
38
|
+
- Add browser regressions, six stories and contrast guards. Redirect fresh
|
|
39
|
+
modal-test screenshots to `.devspace-visual/`, preserving retained scratch
|
|
40
|
+
evidence and all existing assertions.
|
|
41
|
+
- Compatibility: additive only; no new dependency or React peer change.
|
|
42
|
+
Published through the existing npm Trusted Publishing workflow after
|
|
43
|
+
Owner clarified public publication (AuthKit remains private).
|
|
44
|
+
|
|
8
45
|
## 2.12.0 — 2026-09-29
|
|
9
46
|
|
|
10
47
|
- Add optional `useGameCardOrientation` and the bounded `GameCardTilt` input
|
package/README.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Self-contained clay game UI kit for PieAI web, game, and wrapped
|
|
4
4
|
(mobile/desktop WebView) surfaces. React 19 + TypeScript strict.
|
|
5
|
-
**
|
|
6
|
-
|
|
5
|
+
**100% standard CSS** — consumers need no Tailwind, no PostCSS, no CSS
|
|
6
|
+
processor of any kind. The optional `GameHelpTip` uses the existing Floating UI
|
|
7
|
+
dependency; ordinary controls remain native.
|
|
7
8
|
|
|
8
9
|
Source is publicly readable. Use is governed by the
|
|
9
10
|
[PieAI Limited Use License](./LICENSE), not an open-source license. The visual
|
|
@@ -56,6 +57,13 @@ import '@pieai/swimmer-ui-kit/tailwind.css';
|
|
|
56
57
|
|
|
57
58
|
## What's inside
|
|
58
59
|
|
|
60
|
+
- **Account primitives (2.13.0)**:
|
|
61
|
+
opt-in copper `surface="plaque"`, `GameOtpInput`, vertical `GameTabs`,
|
|
62
|
+
and `GameListRow` with independent actions. See the
|
|
63
|
+
[account-controls contract](docs/reference/design-system-guide.md#账号界面原件)
|
|
64
|
+
and Storybook `Clay / Account / AccountControls`. Account requests and
|
|
65
|
+
business state stay in the host.
|
|
66
|
+
|
|
59
67
|
- **Ready-to-use components** across: core controls (`GameButton`,
|
|
60
68
|
`LiquidMetalButton`, `GameTabs`,
|
|
61
69
|
`GameSlider`, `GameToggle`, `GameForms` inputs…), panels and windows
|
package/dist/index.d.ts
CHANGED
|
@@ -1259,9 +1259,11 @@ export declare type GameAssetSource = 'starter' | 'generated' | 'imported';
|
|
|
1259
1259
|
|
|
1260
1260
|
export declare type GameAssetStatus = 'ready' | 'generating' | 'missing' | 'placed' | 'selected' | 'error';
|
|
1261
1261
|
|
|
1262
|
-
export declare function GameAvatar({ className, name, size, src, status, }: GameAvatarProps): ReactNode;
|
|
1262
|
+
export declare function GameAvatar({ className, name, size, src, status, surface, }: GameAvatarProps): ReactNode;
|
|
1263
1263
|
|
|
1264
1264
|
export declare interface GameAvatarProps {
|
|
1265
|
+
/** Optional copper frame; omitted keeps the existing avatar surface. */
|
|
1266
|
+
surface?: 'flat' | 'plaque';
|
|
1265
1267
|
/** Display name — used as image alt text and for the initials fallback. */
|
|
1266
1268
|
name: string;
|
|
1267
1269
|
/** Optional image URL; when missing, initials are shown instead. */
|
|
@@ -1397,7 +1399,7 @@ export declare interface GameButtonProps extends ButtonHTMLAttributes<HTMLButton
|
|
|
1397
1399
|
variant?: GameButtonVariant;
|
|
1398
1400
|
}
|
|
1399
1401
|
|
|
1400
|
-
export declare type GameButtonSurface = 'flat' | 'liquid';
|
|
1402
|
+
export declare type GameButtonSurface = 'flat' | 'liquid' | 'plaque';
|
|
1401
1403
|
|
|
1402
1404
|
export declare type GameButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'success';
|
|
1403
1405
|
|
|
@@ -1892,6 +1894,22 @@ export declare interface GameLanguageMenuProps {
|
|
|
1892
1894
|
onSelect?: (id: string) => void;
|
|
1893
1895
|
}
|
|
1894
1896
|
|
|
1897
|
+
/** A quiet list surface, with sibling controls rather than buttons inside a button. */
|
|
1898
|
+
export declare function GameListRow({ title, description, thumbnail, current, selected, disabled, onSelect, selectLabel, actions, className, ...props }: GameListRowProps): ReactNode;
|
|
1899
|
+
|
|
1900
|
+
export declare interface GameListRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onSelect' | 'children'> {
|
|
1901
|
+
title: string;
|
|
1902
|
+
description?: ReactNode;
|
|
1903
|
+
thumbnail?: ReactNode;
|
|
1904
|
+
current?: boolean;
|
|
1905
|
+
selected?: boolean;
|
|
1906
|
+
disabled?: boolean;
|
|
1907
|
+
onSelect?: () => void;
|
|
1908
|
+
/** Optional name for the row's selection control, independent of its actions. */
|
|
1909
|
+
selectLabel?: string;
|
|
1910
|
+
actions?: ReactNode;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1895
1913
|
export declare function GameLoadingState({ label, tone }: GameLoadingStateProps): ReactNode;
|
|
1896
1914
|
|
|
1897
1915
|
export declare interface GameLoadingStateProps {
|
|
@@ -1978,6 +1996,24 @@ export declare interface GameOrientationGateProps {
|
|
|
1978
1996
|
title: string;
|
|
1979
1997
|
}
|
|
1980
1998
|
|
|
1999
|
+
/** Numeric entry only. Sending, expiry, validation and retries belong to the host. */
|
|
2000
|
+
export declare function GameOtpInput({ length, value, onChange, onComplete, invalid, disabled, readOnly, getSlotLabel, getSlotDescription, className, 'aria-describedby': describedBy, ...props }: GameOtpInputProps): ReactNode;
|
|
2001
|
+
|
|
2002
|
+
export declare interface GameOtpInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onInput' | 'children'> {
|
|
2003
|
+
/** Number of numeric slots; defaults to six. */
|
|
2004
|
+
length?: number;
|
|
2005
|
+
value: string;
|
|
2006
|
+
onChange: (value: string) => void;
|
|
2007
|
+
/** Only user input completes a code; mounting or changing props never submits. */
|
|
2008
|
+
onComplete?: (value: string) => void;
|
|
2009
|
+
invalid?: boolean;
|
|
2010
|
+
disabled?: boolean;
|
|
2011
|
+
readOnly?: boolean;
|
|
2012
|
+
/** Zero-based slot index, followed by the configured length. */
|
|
2013
|
+
getSlotLabel?: (index: number, length: number) => string;
|
|
2014
|
+
getSlotDescription?: (index: number, length: number) => string;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
1981
2017
|
export declare function GamePanel({ children, className, title, tone, ...props }: GamePanelProps): ReactNode;
|
|
1982
2018
|
|
|
1983
2019
|
export declare interface GamePanelProps extends HTMLAttributes<HTMLElement> {
|
|
@@ -2009,7 +2045,7 @@ export declare function GameProgress({ className, label, max, showValue, tone, v
|
|
|
2009
2045
|
|
|
2010
2046
|
export declare interface GameProgressProps {
|
|
2011
2047
|
/** Defaults to the existing liquid leading edge. Flat adds no SVG filter. */
|
|
2012
|
-
surface?: GameButtonSurface
|
|
2048
|
+
surface?: Exclude<GameButtonSurface, 'plaque'>;
|
|
2013
2049
|
liquidFinish?: LiquidFinish;
|
|
2014
2050
|
/** Current value, between 0 and `max`. */
|
|
2015
2051
|
value: number;
|
|
@@ -2084,7 +2120,7 @@ export declare interface GameSegmentedControlProps {
|
|
|
2084
2120
|
onSelect?: (id: string) => void;
|
|
2085
2121
|
options: readonly GameSegmentedOption[];
|
|
2086
2122
|
/** Existing default is liquid. Flat provides a quiet, filter-free option. */
|
|
2087
|
-
surface?: GameButtonSurface
|
|
2123
|
+
surface?: Exclude<GameButtonSurface, 'plaque'>;
|
|
2088
2124
|
liquidFinish?: LiquidFinish;
|
|
2089
2125
|
disabled?: boolean;
|
|
2090
2126
|
}
|
|
@@ -2104,7 +2140,7 @@ export declare const GameSelect: ForwardRefExoticComponent<GameSelectProps & Ref
|
|
|
2104
2140
|
|
|
2105
2141
|
export declare interface GameSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
2106
2142
|
invalid?: boolean;
|
|
2107
|
-
surface?: GameButtonSurface
|
|
2143
|
+
surface?: Exclude<GameButtonSurface, 'plaque'>;
|
|
2108
2144
|
liquidFinish?: LiquidFinish;
|
|
2109
2145
|
}
|
|
2110
2146
|
|
|
@@ -2213,9 +2249,12 @@ export declare interface GameTabItem {
|
|
|
2213
2249
|
panelId?: string;
|
|
2214
2250
|
}
|
|
2215
2251
|
|
|
2216
|
-
export declare function GameTabs({ activeId, id, onSelect, tabs }: GameTabsProps): ReactNode;
|
|
2252
|
+
export declare function GameTabs({ activeId, id, onSelect, tabs, orientation, 'aria-label': label, 'aria-labelledby': labelledBy, }: GameTabsProps): ReactNode;
|
|
2217
2253
|
|
|
2218
2254
|
export declare interface GameTabsProps {
|
|
2255
|
+
orientation?: 'horizontal' | 'vertical';
|
|
2256
|
+
'aria-label'?: string;
|
|
2257
|
+
'aria-labelledby'?: string;
|
|
2219
2258
|
activeId: string;
|
|
2220
2259
|
/**
|
|
2221
2260
|
* Base id for this tabs instance (defaults to a generated one). Each tab
|
|
@@ -2366,7 +2405,7 @@ export declare function GameToggle({ checked, disabled, label, onClick, surface,
|
|
|
2366
2405
|
export declare interface GameToggleProps extends Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'onClick'> {
|
|
2367
2406
|
checked: boolean;
|
|
2368
2407
|
label: string;
|
|
2369
|
-
surface?: GameButtonSurface
|
|
2408
|
+
surface?: Exclude<GameButtonSurface, 'plaque'>;
|
|
2370
2409
|
liquidFinish?: LiquidFinish;
|
|
2371
2410
|
}
|
|
2372
2411
|
|
|
@@ -2517,6 +2556,45 @@ export declare const LIQUID_FORMS: Readonly<Record<LiquidForm, LiquidFormSpec>>;
|
|
|
2517
2556
|
*/
|
|
2518
2557
|
export declare const LIQUID_GOOEY_WAVINESS_MAX_FRACTION = 0.3;
|
|
2519
2558
|
|
|
2559
|
+
/**
|
|
2560
|
+
* A shared liquid silhouette behind crisp item content.
|
|
2561
|
+
*
|
|
2562
|
+
* Put the visual treatment on the group: `fill`, `stroke`, and `shadow` are
|
|
2563
|
+
* rebuilt on the merged silhouette. Do NOT add border, outline, or box-shadow
|
|
2564
|
+
* to children directly; those styles live on the content layer and cannot
|
|
2565
|
+
* merge with the liquid shape.
|
|
2566
|
+
*
|
|
2567
|
+
* Its motion vocabulary is intentionally small and semantic:
|
|
2568
|
+
*
|
|
2569
|
+
* | gesture | meaning |
|
|
2570
|
+
* | --- | --- |
|
|
2571
|
+
* | **merge** (Morph) | two things become one: reward settling, collecting, confirming |
|
|
2572
|
+
* | **follow** (Move) | selection, progress, dragging |
|
|
2573
|
+
* | **shape** (Morph shape) | the liquid changes size and corners like jelly |
|
|
2574
|
+
* | **bend** | speed bows the surface while content stays glued to it |
|
|
2575
|
+
* | **dissolve** | replacement, transition |
|
|
2576
|
+
* | **still** | THE DEFAULT |
|
|
2577
|
+
*
|
|
2578
|
+
* Liquid appears only on a state change the user caused. There is no ambient,
|
|
2579
|
+
* idle, or decorative liquid; keep the filter-area budget visible when more
|
|
2580
|
+
* than one group is on a screen.
|
|
2581
|
+
*/
|
|
2582
|
+
/**
|
|
2583
|
+
* A liquid body's paint.
|
|
2584
|
+
*
|
|
2585
|
+
* A colour paints the body flat. `{ top, bottom }` is the light the coloured
|
|
2586
|
+
* liquid theme settled on (University, 2026-09-30): a narrow brighter band at
|
|
2587
|
+
* the top, the colour falling from `top` to `bottom`, and the foot a touch
|
|
2588
|
+
* deeper, so a body reads as having thickness without a white rim. `sheen` is
|
|
2589
|
+
* how far the top band leans to white (0–1, default 0.3). Colours may be tokens:
|
|
2590
|
+
* the bands are mixed with CSS `color-mix`, not computed here.
|
|
2591
|
+
*/
|
|
2592
|
+
export declare type LiquidFill = string | {
|
|
2593
|
+
readonly top: string;
|
|
2594
|
+
readonly bottom?: string;
|
|
2595
|
+
readonly sheen?: number;
|
|
2596
|
+
};
|
|
2597
|
+
|
|
2520
2598
|
/** Material is independent of a widget's meaning and a form's motion. */
|
|
2521
2599
|
export declare type LiquidFinish = 'matte' | 'glossy';
|
|
2522
2600
|
|
|
@@ -2664,29 +2742,6 @@ export declare const LiquidGroup: ForwardRefExoticComponent<LiquidGroupProps & R
|
|
|
2664
2742
|
Item: ForwardRefExoticComponent<LiquidItemProps & RefAttributes<HTMLDivElement>>;
|
|
2665
2743
|
};
|
|
2666
2744
|
|
|
2667
|
-
/**
|
|
2668
|
-
* A shared liquid silhouette behind crisp item content.
|
|
2669
|
-
*
|
|
2670
|
-
* Put the visual treatment on the group: `fill`, `stroke`, and `shadow` are
|
|
2671
|
-
* rebuilt on the merged silhouette. Do NOT add border, outline, or box-shadow
|
|
2672
|
-
* to children directly; those styles live on the content layer and cannot
|
|
2673
|
-
* merge with the liquid shape.
|
|
2674
|
-
*
|
|
2675
|
-
* Its motion vocabulary is intentionally small and semantic:
|
|
2676
|
-
*
|
|
2677
|
-
* | gesture | meaning |
|
|
2678
|
-
* | --- | --- |
|
|
2679
|
-
* | **merge** (Morph) | two things become one: reward settling, collecting, confirming |
|
|
2680
|
-
* | **follow** (Move) | selection, progress, dragging |
|
|
2681
|
-
* | **shape** (Morph shape) | the liquid changes size and corners like jelly |
|
|
2682
|
-
* | **bend** | speed bows the surface while content stays glued to it |
|
|
2683
|
-
* | **dissolve** | replacement, transition |
|
|
2684
|
-
* | **still** | THE DEFAULT |
|
|
2685
|
-
*
|
|
2686
|
-
* Liquid appears only on a state change the user caused. There is no ambient,
|
|
2687
|
-
* idle, or decorative liquid; keep the filter-area budget visible when more
|
|
2688
|
-
* than one group is on a screen.
|
|
2689
|
-
*/
|
|
2690
2745
|
export declare interface LiquidGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2691
2746
|
children: ReactNode;
|
|
2692
2747
|
/** Goo blur sigma in px. Larger values bridge larger gaps. */
|
|
@@ -2700,8 +2755,11 @@ export declare interface LiquidGroupProps extends Omit<HTMLAttributes<HTMLDivEle
|
|
|
2700
2755
|
gloss?: number;
|
|
2701
2756
|
/** Optional named finish. An explicit raw gloss wins; omitted preserves the old rendering. */
|
|
2702
2757
|
liquidFinish?: LiquidFinish;
|
|
2703
|
-
/**
|
|
2704
|
-
|
|
2758
|
+
/**
|
|
2759
|
+
* Surface fill. Defaults to the kit's theme surface token. A colour paints
|
|
2760
|
+
* the body flat; `{ top, bottom }` gives it light (see `LiquidFill`).
|
|
2761
|
+
*/
|
|
2762
|
+
fill?: LiquidFill;
|
|
2705
2763
|
/** Extra filter-region slack in px for the silhouette's painted edges. */
|
|
2706
2764
|
filterPadding?: number;
|
|
2707
2765
|
/** Optional token-based box-shadow syntax rebuilt on the merged silhouette. */
|
|
@@ -2792,7 +2850,7 @@ export declare interface LiquidMetalButtonProps extends ButtonHTMLAttributes<HTM
|
|
|
2792
2850
|
|
|
2793
2851
|
export declare type LiquidMetalRendererMode = 'auto' | 'css' | 'webgl';
|
|
2794
2852
|
|
|
2795
|
-
export declare function LiquidSurface({ children, liquidFinish, form, active, fill, stroke, shadow: shadowOverride, radius, className, style, }: LiquidSurfaceProps): ReactNode;
|
|
2853
|
+
export declare function LiquidSurface({ children, liquidFinish, form, active, fill, stroke, shadow: shadowOverride, gloss: glossOverride, outline, radius, className, style, }: LiquidSurfaceProps): ReactNode;
|
|
2796
2854
|
|
|
2797
2855
|
export declare interface LiquidSurfaceProps {
|
|
2798
2856
|
children: ReactNode;
|
|
@@ -2806,7 +2864,20 @@ export declare interface LiquidSurfaceProps {
|
|
|
2806
2864
|
*/
|
|
2807
2865
|
active?: boolean;
|
|
2808
2866
|
/** Silhouette paint. Defaults to the kit's raised surface token. */
|
|
2809
|
-
fill?:
|
|
2867
|
+
fill?: LiquidFill;
|
|
2868
|
+
/**
|
|
2869
|
+
* The body's light, overriding the form's own. The coloured liquid theme
|
|
2870
|
+
* uses a low value; with `liquidFinish="matte"` omitted, 0 means flat.
|
|
2871
|
+
*/
|
|
2872
|
+
gloss?: number;
|
|
2873
|
+
/**
|
|
2874
|
+
* The rest outline's lobing, overriding the form's own: `amplitude` in px
|
|
2875
|
+
* swells outward, `lobes` is how many go round (2 lazy, 5 busy).
|
|
2876
|
+
*/
|
|
2877
|
+
outline?: {
|
|
2878
|
+
readonly amplitude: number;
|
|
2879
|
+
readonly lobes?: number;
|
|
2880
|
+
};
|
|
2810
2881
|
stroke?: string;
|
|
2811
2882
|
/** Overrides the form's own cast shadow. `none` removes it. */
|
|
2812
2883
|
shadow?: string;
|