@pieai/swimmer-ui-kit 2.12.0 → 2.13.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
@@ -5,6 +5,24 @@ Format: [Keep a Changelog](https://keepachangelog.com); versioning: semver.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ### 2.13.0 candidate — WO-UI-1
9
+
10
+ - Add opt-in `surface="plaque"` to `GameButton`, `GameIconButton` and
11
+ `GameAvatar`, with opaque light/night copper token pairs derived from
12
+ Directing's reviewed D1-03 cabinet material. Default controls stay unchanged.
13
+ - Add controlled `GameOtpInput`: numeric slots, paste/autofill, keyboard and
14
+ backspace, localized descriptions and input-method composition handling.
15
+ Only changed user input completes a code; verification stays in the host.
16
+ - Add vertical `GameTabs` with Up/Down navigation and an accessible name.
17
+ - Add `GameListRow` with thumbnail, text, current indicator and independent
18
+ selection/actions; no nested buttons.
19
+ - Add browser regressions, six stories and contrast guards. Redirect fresh
20
+ modal-test screenshots to `.devspace-visual/`, preserving retained scratch
21
+ evidence and all existing assertions.
22
+ - Compatibility: additive only; no new dependency or React peer change.
23
+ This candidate is not published: Owner's private-publication instruction
24
+ needs clarification before using this repository's public npm workflow.
25
+
8
26
  ## 2.12.0 — 2026-09-29
9
27
 
10
28
  - 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
- **Zero runtime dependencies, 100% standard CSS** — consumers need no
6
- Tailwind, no PostCSS, no CSS processor of any kind.
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 local candidate, not published)**:
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