@pieai/swimmer-ui-kit 3.1.0 → 3.2.1
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 +24 -1
- package/README.md +1 -1
- package/dist/{GameAvatar-CRJ1r8l5.js → GameAvatar-Cs5KVYFf.js} +4 -1
- package/dist/{GameStageTile-F41PxXDG.js → GameStageTile-BdG3tMV-.js} +221 -174
- package/dist/index.d.ts +56 -0
- package/dist/index.js +465 -222
- package/dist/liquid-presence.js +1 -1
- package/dist/preview.js +66 -66
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
6
6
|
import { HTMLAttributes } from 'react';
|
|
7
7
|
import { InputHTMLAttributes } from 'react';
|
|
8
8
|
import { JSX } from 'react';
|
|
9
|
+
import { ReactElement } from 'react';
|
|
9
10
|
import { ReactNode } from 'react';
|
|
10
11
|
import { Ref } from 'react';
|
|
11
12
|
import { RefAttributes } from 'react';
|
|
@@ -691,6 +692,61 @@ export declare interface GameFieldProps {
|
|
|
691
692
|
className?: string;
|
|
692
693
|
}
|
|
693
694
|
|
|
695
|
+
/**
|
|
696
|
+
* A non-modal hover/focus/tap card that teaches one short idea. Floating UI owns
|
|
697
|
+
* collision, hover intent, focus order and dismissal, as in GameHelpTip. The
|
|
698
|
+
* card is portalled into the closest native dialog and built on the static
|
|
699
|
+
* droplet surface, so it adds no liquid engine and no LiquidPopover.
|
|
700
|
+
*/
|
|
701
|
+
export declare function GameHelpCard({ children, label, topics, link, placement, align, openDelay, }: GameHelpCardProps): ReactNode;
|
|
702
|
+
|
|
703
|
+
export declare interface GameHelpCardProps {
|
|
704
|
+
/** One focusable trigger element (e.g. a GameIconButton link or button). */
|
|
705
|
+
children: ReactElement;
|
|
706
|
+
/** Accessible name of the card, e.g. "怎么用". */
|
|
707
|
+
label: string;
|
|
708
|
+
/** 1 to 4 topics; more than one shows tabs. */
|
|
709
|
+
topics: readonly GameHelpCardTopic[];
|
|
710
|
+
/** Optional link at the bottom, e.g. the full guide. */
|
|
711
|
+
link?: {
|
|
712
|
+
href: string;
|
|
713
|
+
label: string;
|
|
714
|
+
};
|
|
715
|
+
placement?: 'top' | 'bottom';
|
|
716
|
+
align?: 'start' | 'center' | 'end';
|
|
717
|
+
/** Hover intent delay in ms; default 200. */
|
|
718
|
+
openDelay?: number;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export declare interface GameHelpCardTopic {
|
|
722
|
+
id: string;
|
|
723
|
+
/** Tab label when there are several topics. */
|
|
724
|
+
label: string;
|
|
725
|
+
title: string;
|
|
726
|
+
/** 1–3 short lines; "\n" breaks a line. */
|
|
727
|
+
body: string;
|
|
728
|
+
media?: GameHelpMedia;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export declare type GameHelpMedia = {
|
|
732
|
+
kind: 'video';
|
|
733
|
+
/** Ordered sources, e.g. webm then mp4. */
|
|
734
|
+
sources: readonly {
|
|
735
|
+
src: string;
|
|
736
|
+
type: 'video/webm' | 'video/mp4';
|
|
737
|
+
}[];
|
|
738
|
+
poster: string;
|
|
739
|
+
alt: string;
|
|
740
|
+
width: number;
|
|
741
|
+
height: number;
|
|
742
|
+
} | {
|
|
743
|
+
kind: 'image';
|
|
744
|
+
src: string;
|
|
745
|
+
alt: string;
|
|
746
|
+
width: number;
|
|
747
|
+
height: number;
|
|
748
|
+
};
|
|
749
|
+
|
|
694
750
|
/** Optional help, not an action menu or a place to hide required information.
|
|
695
751
|
* Floating UI owns collision avoidance, hover/focus/click and dismissal. The
|
|
696
752
|
* native help button never submits its surrounding form. Inside a native modal
|