@pieai/swimmer-ui-kit 2.9.0 → 2.11.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
@@ -3,6 +3,55 @@
3
3
  All notable changes to `@pieai/swimmer-ui-kit`.
4
4
  Format: [Keep a Changelog](https://keepachangelog.com); versioning: semver.
5
5
 
6
+ ## Unreleased
7
+
8
+ ## 2.11.0 — 2026-09-28
9
+
10
+ Minor: University's V7 opening screen and card album, and the liquid fix
11
+ NerveKit 0.6 pairs with.
12
+
13
+ - Add `GameSplash`, the opening and scene-change screen: rotating selling
14
+ lines with a highlighted phrase, a progress bar that tracks real readiness,
15
+ and an enter button offered only once ready (the tap that also lets a web
16
+ page start sound). `mode="transition"` shows one line and the bar with no
17
+ button; `useGameSplashDelay` shows it only after a wait outlasts its delay.
18
+ All text comes from the product. First consumer: University's V7 opening.
19
+ - Add `GameCollectibleCard` and `GameCollectibleCardSlot`: a printed card that
20
+ tilts toward the pointer with a glare that follows it and flips on a tap
21
+ (a drag that tilted it is not a tap). Framed by rarity: `common` silver,
22
+ `rare` violet with a gem, `legendary` gold with a crown, a foil kept off the
23
+ words, and an optional `spotlight` light turning behind it for the reveal.
24
+ The slot shows an uncollected card and what unlocks it. Card inks are theme
25
+ tokens (`--game-ui-collect-card-*`) that stay the same on every theme; band
26
+ inks meet 4.5:1. Reduced motion drops tilt, shine and the turning light.
27
+ - Add `playGameCardRevealSound`: a synthesized flip, with bell notes for the
28
+ rarer cards. First consumer: University's V7 card album.
29
+ - Fix the optional liquid styles yielding to the host: `liquid-presence.css`
30
+ now sits in `@layer swimmer-ui` like the main styles, so a product's
31
+ unlayered rules win without special selectors. `LiquidAnchor` reports the
32
+ area it occupies to the family's destination labels, which step around open
33
+ panels instead of needing a host z-index workaround. A `GameButton` with
34
+ `data-game-ui-control="liquid-presence"` lets its liquid body paint the
35
+ button and keeps native interaction. Paired with NerveKit 0.6.
36
+
37
+ ## 2.10.0 — 2026-09-24
38
+
39
+ Minor: publish the reviewed optional liquid interaction surface required by
40
+ NerveKit's human-paced guidance, companion settings and selection comparison.
41
+
42
+ - `LiquidPresence` accepts interactive guide content, an expanded review size,
43
+ explicit ambient motion and bounded material settings. Ordinary controls and
44
+ the omitted-option defaults remain unchanged.
45
+ - Export `LiquidAnchor` and `LiquidReveal` from the existing optional leaf for
46
+ host-positioned surfaces. These are presentation only, not agent, credential,
47
+ microphone, task or persistence implementations.
48
+ - Preserve native-dialog placement, reduced motion, visibility suspension,
49
+ original target hit boxes and shared rendering budgets. Final accepted model
50
+ results and user actions remain owned by the consuming application.
51
+
52
+ This release packages the previously committed and reviewed liquid work; it
53
+ does not replace a product's live-provider or deployment acceptance.
54
+
6
55
  ## 2.9.0 — 2026-09-21
7
56
 
8
57
  Minor: publish the optional liquid presence leaf for products that already own
package/dist/index.d.ts CHANGED
@@ -1460,6 +1460,67 @@ export declare interface GameCollapsiblePanelProps extends Omit<HTMLAttributes<H
1460
1460
  tone?: 'default' | 'strong';
1461
1461
  }
1462
1462
 
1463
+ /**
1464
+ * A collectible card: tilts toward the pointer with a glare that follows it,
1465
+ * flips on a tap, and is framed by rarity. Built for a card album where
1466
+ * collecting and reviewing are the same act, but it holds nothing about
1467
+ * learning: every word and picture comes from the product.
1468
+ *
1469
+ * Under reduced motion the card does not tilt, shine or spin its light, and a
1470
+ * flip is instant.
1471
+ */
1472
+ export declare function GameCollectibleCard({ rarity, title, caption, setLabel, rarityLabel, art, pips, sticker, back, label, faceDown, defaultFaceDown, onFlip, spotlight, sound, className, }: GameCollectibleCardProps): ReactNode;
1473
+
1474
+ export declare interface GameCollectibleCardProps {
1475
+ readonly rarity: GameCollectibleCardRarity;
1476
+ /** The card's name, large on the face. */
1477
+ readonly title: string;
1478
+ /** One line under the name. */
1479
+ readonly caption?: string;
1480
+ /** The set it belongs to, on the band at the top. */
1481
+ readonly setLabel?: string;
1482
+ /** The rarity's short word, in the band's chip. */
1483
+ readonly rarityLabel?: string;
1484
+ /** The illustration; the product supplies it. */
1485
+ readonly art?: ReactNode;
1486
+ /** A row of pips under the caption, such as progress toward the next rarity. */
1487
+ readonly pips?: {
1488
+ readonly filled: number;
1489
+ readonly total: number;
1490
+ };
1491
+ /** A sticker on the corner, such as "NEW!". */
1492
+ readonly sticker?: string;
1493
+ /** The back of the card; the kit draws a plain emblem when omitted. */
1494
+ readonly back?: ReactNode;
1495
+ /** The full accessible name, including what a tap does. */
1496
+ readonly label: string;
1497
+ /** Controlled: whether the back is showing. */
1498
+ readonly faceDown?: boolean;
1499
+ /** Uncontrolled start. */
1500
+ readonly defaultFaceDown?: boolean;
1501
+ readonly onFlip?: (faceDown: boolean) => void;
1502
+ /** A soft light turns behind the card: the moment the rarest card is revealed. */
1503
+ readonly spotlight?: boolean;
1504
+ /** Play a synthesized flip sound; browsers allow it only after the page has been tapped. */
1505
+ readonly sound?: boolean;
1506
+ readonly className?: string;
1507
+ }
1508
+
1509
+ /**
1510
+ * How rare the card is, which is how it is framed: `common` a plain silver
1511
+ * frame, `rare` a violet frame with a gem set in the top, `legendary` a gold
1512
+ * frame with a crown, a foil that shifts as the card tilts and a soft light
1513
+ * behind it. The product decides what earns each; the kit only draws them.
1514
+ */
1515
+ export declare type GameCollectibleCardRarity = 'common' | 'rare' | 'legendary';
1516
+
1517
+ /** A card not collected yet: its place in the set, and what unlocks it. Not interactive. */
1518
+ export declare function GameCollectibleCardSlot({ label, className, }: {
1519
+ /** What unlocks it, shown on the slot and read as its name. */
1520
+ readonly label: string;
1521
+ readonly className?: string;
1522
+ }): ReactNode;
1523
+
1463
1524
  export declare function GameCompactGameDrawer({ children, className, closeIcon, closeLabel, disabled, label, onOpenChange, open, panelId: providedPanelId, title, triggerIcon, triggerLabel, variant, 'data-testid': testId, }: GameCompactGameDrawerProps): ReactNode;
1464
1525
 
1465
1526
  export declare interface GameCompactGameDrawerProps {
@@ -2067,6 +2128,53 @@ export declare interface GameSliderProps extends Pick<InputHTMLAttributes<HTMLIn
2067
2128
  onChange?: (value: number) => void;
2068
2129
  }
2069
2130
 
2131
+ /**
2132
+ * The opening screen and the scene-change screen, one look for both.
2133
+ *
2134
+ * Its whole job is to make the wait worth watching and honest: the lines say
2135
+ * what the product is for, the bar tracks what is really loading, and entering
2136
+ * is offered only when the thing behind it is complete — nobody is held back
2137
+ * for effect, and nobody walks into a half-drawn scene.
2138
+ */
2139
+ export declare function GameSplash({ title, lines, progress, progressLabel, ready, mode, startLabel, onStart, autoStart, lineSeconds, className, }: GameSplashProps): ReactNode;
2140
+
2141
+ /**
2142
+ * One selling line on the splash. `highlight` is a word or phrase inside
2143
+ * `text` that lights up as the line appears; the product supplies both in the
2144
+ * learner's language, the kit supplies none.
2145
+ */
2146
+ export declare interface GameSplashLine {
2147
+ readonly text: string;
2148
+ readonly highlight?: string;
2149
+ }
2150
+
2151
+ export declare interface GameSplashProps {
2152
+ /** The product's name, shown large. */
2153
+ readonly title: string;
2154
+ /** Two or three lines a visit; they take turns while the product loads. */
2155
+ readonly lines: readonly GameSplashLine[];
2156
+ /** Real readiness, 0 to 1. Never a timer: a bar stuck at 99% is worse than none. */
2157
+ readonly progress: number;
2158
+ /** What the bar says, including the number if the product wants it shown. */
2159
+ readonly progressLabel: string;
2160
+ /** Everything the first screen needs has arrived and drawn once. */
2161
+ readonly ready: boolean;
2162
+ /**
2163
+ * `opening`: the first screen, with a tap to enter once ready (the tap is
2164
+ * also what lets a web page start sound). `transition`: the same look over a
2165
+ * scene change, one line and the bar, no button.
2166
+ */
2167
+ readonly mode?: 'opening' | 'transition';
2168
+ /** The enter button's text, opening mode only. */
2169
+ readonly startLabel?: string;
2170
+ readonly onStart?: () => void;
2171
+ /** Enter by itself when ready, for app shells that need no gesture for sound. */
2172
+ readonly autoStart?: boolean;
2173
+ /** Seconds each line stays before the next. */
2174
+ readonly lineSeconds?: number;
2175
+ readonly className?: string;
2176
+ }
2177
+
2070
2178
  export declare function GameStageTile({ badge, className, icon, kicker, selected, summary, title, tone, type, ...props }: GameStageTileProps): ReactNode;
2071
2179
 
2072
2180
  export declare interface GameStageTileProps extends ButtonHTMLAttributes<HTMLButtonElement> {
@@ -2710,6 +2818,15 @@ export declare interface MorphTuning {
2710
2818
  advanced?: Partial<EvolveOptions>;
2711
2819
  }
2712
2820
 
2821
+ export declare function playGameCardRevealSound(rarity: 'common' | 'rare' | 'legendary', options?: GameInteractionSoundOptions): boolean;
2822
+
2823
+ /**
2824
+ * A card turning over: a short falling sweep, and for a rarer card one or two
2825
+ * bell notes after it. Synthesized, so nothing is downloaded; like every kit
2826
+ * sound, the browser lets it play only once the page has been interacted with.
2827
+ */
2828
+ export declare function playGameCardRevealSoundForContext(audioContext: GameInteractionAudioContext, rarity: 'common' | 'rare' | 'legendary', options?: GameInteractionSoundOptions): boolean;
2829
+
2713
2830
  export declare function playGameInteractionSound(options?: GameInteractionSoundOptions): boolean;
2714
2831
 
2715
2832
  export declare function playGameInteractionSoundForContext(audioContext: GameInteractionAudioContext, options?: GameInteractionSoundOptions): boolean;
@@ -2776,4 +2893,11 @@ declare type Transition = TransitionPreset | SpringConfig | {
2776
2893
 
2777
2894
  declare type TransitionPreset = 'snappy' | 'smooth' | 'bouncy' | 'wobbly';
2778
2895
 
2896
+ /**
2897
+ * Whether a waiting screen should appear yet: only once `waiting` has stayed
2898
+ * true for `delayMs` without a break. A scene change that finishes inside the
2899
+ * delay never shows the screen at all.
2900
+ */
2901
+ export declare function useGameSplashDelay(waiting: boolean, delayMs?: number): boolean;
2902
+
2779
2903
  export { }