@wakastellar/ui 2.1.1 → 2.1.2
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/dist/blocks/auth-2fa/index.d.ts +38 -0
- package/dist/blocks/chat-interface/index.d.ts +66 -0
- package/dist/blocks/checkout-flow/index.d.ts +76 -0
- package/dist/blocks/dashboard-kpi/index.d.ts +69 -0
- package/dist/blocks/deployment-dashboard/index.d.ts +68 -0
- package/dist/blocks/index.d.ts +7 -0
- package/dist/blocks/player-profile/index.d.ts +78 -0
- package/dist/index.cjs.js +136 -134
- package/dist/index.es.js +17304 -15120
- package/package.json +1 -1
- package/src/blocks/auth-2fa/index.tsx +655 -0
- package/src/blocks/chat-interface/index.tsx +611 -0
- package/src/blocks/checkout-flow/index.tsx +771 -0
- package/src/blocks/dashboard-kpi/index.tsx +424 -0
- package/src/blocks/deployment-dashboard/index.tsx +609 -0
- package/src/blocks/index.ts +24 -0
- package/src/blocks/player-profile/index.tsx +541 -0
- package/src/components/language-selector/index.tsx +21 -11
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type TwoFactorMethod = "authenticator" | "sms" | "email" | "hardware";
|
|
2
|
+
export interface BackupCode {
|
|
3
|
+
code: string;
|
|
4
|
+
used: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TwoFactorStatus {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
method?: TwoFactorMethod;
|
|
9
|
+
phone?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
lastVerified?: Date | string;
|
|
12
|
+
}
|
|
13
|
+
export interface Auth2FAProps {
|
|
14
|
+
/** Current 2FA status */
|
|
15
|
+
status?: TwoFactorStatus;
|
|
16
|
+
/** Available methods */
|
|
17
|
+
availableMethods?: TwoFactorMethod[];
|
|
18
|
+
/** QR code data URL for authenticator setup */
|
|
19
|
+
qrCodeUrl?: string;
|
|
20
|
+
/** Secret key for manual entry */
|
|
21
|
+
secretKey?: string;
|
|
22
|
+
/** Backup codes */
|
|
23
|
+
backupCodes?: BackupCode[];
|
|
24
|
+
/** Handler for enabling 2FA */
|
|
25
|
+
onEnable?: (method: TwoFactorMethod, verificationCode: string) => Promise<boolean>;
|
|
26
|
+
/** Handler for disabling 2FA */
|
|
27
|
+
onDisable?: (verificationCode: string) => Promise<boolean>;
|
|
28
|
+
/** Handler for regenerating backup codes */
|
|
29
|
+
onRegenerateBackupCodes?: () => Promise<BackupCode[]>;
|
|
30
|
+
/** Handler for sending verification code */
|
|
31
|
+
onSendCode?: (method: TwoFactorMethod) => Promise<boolean>;
|
|
32
|
+
/** Custom className */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function Auth2FA({ status, availableMethods, qrCodeUrl, secretKey, backupCodes, onEnable, onDisable, onRegenerateBackupCodes, onSendCode, className, }: Auth2FAProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const defaultBackupCodes: BackupCode[];
|
|
37
|
+
export declare const defaultStatus: TwoFactorStatus;
|
|
38
|
+
export default Auth2FA;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface ChatUser {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
avatar?: string;
|
|
5
|
+
status?: "online" | "offline" | "away" | "busy";
|
|
6
|
+
lastSeen?: Date | string;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatMessage {
|
|
9
|
+
id: string;
|
|
10
|
+
content: string;
|
|
11
|
+
senderId: string;
|
|
12
|
+
timestamp: Date | string;
|
|
13
|
+
status?: "sending" | "sent" | "delivered" | "read";
|
|
14
|
+
replyTo?: string;
|
|
15
|
+
attachments?: ChatAttachment[];
|
|
16
|
+
reactions?: ChatReaction[];
|
|
17
|
+
}
|
|
18
|
+
export interface ChatAttachment {
|
|
19
|
+
id: string;
|
|
20
|
+
type: "image" | "file" | "audio";
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
size?: string;
|
|
24
|
+
thumbnail?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ChatReaction {
|
|
27
|
+
emoji: string;
|
|
28
|
+
userId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ChatConversation {
|
|
31
|
+
id: string;
|
|
32
|
+
participants: ChatUser[];
|
|
33
|
+
lastMessage?: ChatMessage;
|
|
34
|
+
unreadCount?: number;
|
|
35
|
+
isPinned?: boolean;
|
|
36
|
+
isGroup?: boolean;
|
|
37
|
+
groupName?: string;
|
|
38
|
+
groupAvatar?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ChatInterfaceProps {
|
|
41
|
+
/** Current user */
|
|
42
|
+
currentUser: ChatUser;
|
|
43
|
+
/** List of conversations */
|
|
44
|
+
conversations?: ChatConversation[];
|
|
45
|
+
/** Currently selected conversation */
|
|
46
|
+
selectedConversation?: ChatConversation;
|
|
47
|
+
/** Messages in selected conversation */
|
|
48
|
+
messages?: ChatMessage[];
|
|
49
|
+
/** Handler for sending message */
|
|
50
|
+
onSendMessage?: (content: string, attachments?: File[]) => void;
|
|
51
|
+
/** Handler for selecting conversation */
|
|
52
|
+
onSelectConversation?: (conversation: ChatConversation) => void;
|
|
53
|
+
/** Handler for typing indicator */
|
|
54
|
+
onTyping?: () => void;
|
|
55
|
+
/** Users currently typing */
|
|
56
|
+
typingUsers?: ChatUser[];
|
|
57
|
+
/** Show sidebar */
|
|
58
|
+
showSidebar?: boolean;
|
|
59
|
+
/** Custom className */
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function ChatInterface({ currentUser, conversations, selectedConversation, messages, onSendMessage, onSelectConversation, onTyping, typingUsers, showSidebar, className, }: ChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const defaultUsers: ChatUser[];
|
|
64
|
+
export declare const defaultConversations: ChatConversation[];
|
|
65
|
+
export declare const defaultMessages: ChatMessage[];
|
|
66
|
+
export default ChatInterface;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface CartItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
price: number;
|
|
7
|
+
quantity: number;
|
|
8
|
+
image?: string;
|
|
9
|
+
variant?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ShippingMethod {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
price: number;
|
|
16
|
+
estimatedDays: string;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface PaymentMethod {
|
|
20
|
+
id: string;
|
|
21
|
+
type: "card" | "paypal" | "apple" | "google" | "bank";
|
|
22
|
+
label: string;
|
|
23
|
+
icon?: React.ReactNode;
|
|
24
|
+
last4?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CheckoutAddress {
|
|
27
|
+
firstName: string;
|
|
28
|
+
lastName: string;
|
|
29
|
+
email: string;
|
|
30
|
+
phone: string;
|
|
31
|
+
address: string;
|
|
32
|
+
apartment?: string;
|
|
33
|
+
city: string;
|
|
34
|
+
state: string;
|
|
35
|
+
postalCode: string;
|
|
36
|
+
country: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CheckoutFlowProps {
|
|
39
|
+
/** Cart items */
|
|
40
|
+
items: CartItem[];
|
|
41
|
+
/** Available shipping methods */
|
|
42
|
+
shippingMethods?: ShippingMethod[];
|
|
43
|
+
/** Available payment methods */
|
|
44
|
+
paymentMethods?: PaymentMethod[];
|
|
45
|
+
/** Coupon code handler */
|
|
46
|
+
onApplyCoupon?: (code: string) => Promise<{
|
|
47
|
+
discount: number;
|
|
48
|
+
type: "percent" | "fixed";
|
|
49
|
+
} | null>;
|
|
50
|
+
/** Applied discount */
|
|
51
|
+
discount?: {
|
|
52
|
+
code: string;
|
|
53
|
+
amount: number;
|
|
54
|
+
type: "percent" | "fixed";
|
|
55
|
+
};
|
|
56
|
+
/** Remove discount */
|
|
57
|
+
onRemoveDiscount?: () => void;
|
|
58
|
+
/** Submit order handler */
|
|
59
|
+
onSubmitOrder?: (data: {
|
|
60
|
+
address: CheckoutAddress;
|
|
61
|
+
shippingMethod: string;
|
|
62
|
+
paymentMethod: string;
|
|
63
|
+
saveInfo: boolean;
|
|
64
|
+
}) => Promise<void>;
|
|
65
|
+
/** Currency symbol */
|
|
66
|
+
currency?: string;
|
|
67
|
+
/** Tax rate (percentage) */
|
|
68
|
+
taxRate?: number;
|
|
69
|
+
/** Custom className */
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function CheckoutFlow({ items, shippingMethods, paymentMethods, onApplyCoupon, discount, onRemoveDiscount, onSubmitOrder, currency, taxRate, className, }: CheckoutFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare const defaultShippingMethods: ShippingMethod[];
|
|
74
|
+
export declare const defaultPaymentMethods: PaymentMethod[];
|
|
75
|
+
export declare const defaultCartItems: CartItem[];
|
|
76
|
+
export default CheckoutFlow;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface KPIMetric {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
previousValue?: string | number;
|
|
7
|
+
change?: number;
|
|
8
|
+
changeLabel?: string;
|
|
9
|
+
trend?: "up" | "down" | "neutral";
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
color?: "default" | "blue" | "green" | "yellow" | "red" | "purple";
|
|
12
|
+
sparkline?: number[];
|
|
13
|
+
target?: number;
|
|
14
|
+
current?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface KPIChartData {
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DashboardKPIProps {
|
|
22
|
+
/** Title of the dashboard */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Description */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** Main KPI metrics */
|
|
27
|
+
metrics: KPIMetric[];
|
|
28
|
+
/** Period selector options */
|
|
29
|
+
periods?: {
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
/** Selected period */
|
|
34
|
+
selectedPeriod?: string;
|
|
35
|
+
/** Period change handler */
|
|
36
|
+
onPeriodChange?: (period: string) => void;
|
|
37
|
+
/** Refresh handler */
|
|
38
|
+
onRefresh?: () => void;
|
|
39
|
+
/** Export handler */
|
|
40
|
+
onExport?: () => void;
|
|
41
|
+
/** Custom chart component */
|
|
42
|
+
chart?: React.ReactNode;
|
|
43
|
+
/** Secondary metrics for the bottom section */
|
|
44
|
+
secondaryMetrics?: KPIMetric[];
|
|
45
|
+
/** Goals/targets section */
|
|
46
|
+
goals?: {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
current: number;
|
|
50
|
+
target: number;
|
|
51
|
+
unit?: string;
|
|
52
|
+
}[];
|
|
53
|
+
/** Loading state */
|
|
54
|
+
isLoading?: boolean;
|
|
55
|
+
/** Last updated timestamp */
|
|
56
|
+
lastUpdated?: string | Date;
|
|
57
|
+
/** Custom className */
|
|
58
|
+
className?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare function DashboardKPI({ title, description, metrics, periods, selectedPeriod, onPeriodChange, onRefresh, onExport, chart, secondaryMetrics, goals, isLoading, lastUpdated, className, }: DashboardKPIProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare const defaultKPIMetrics: KPIMetric[];
|
|
62
|
+
export declare const defaultGoals: {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
current: number;
|
|
66
|
+
target: number;
|
|
67
|
+
unit: string;
|
|
68
|
+
}[];
|
|
69
|
+
export default DashboardKPI;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type DeploymentStatus = "pending" | "building" | "deploying" | "success" | "failed" | "cancelled" | "rollback";
|
|
2
|
+
export type Environment = "development" | "staging" | "production";
|
|
3
|
+
export interface Deployment {
|
|
4
|
+
id: string;
|
|
5
|
+
status: DeploymentStatus;
|
|
6
|
+
environment: Environment;
|
|
7
|
+
branch: string;
|
|
8
|
+
commit: string;
|
|
9
|
+
commitMessage: string;
|
|
10
|
+
author: {
|
|
11
|
+
name: string;
|
|
12
|
+
avatar?: string;
|
|
13
|
+
};
|
|
14
|
+
startedAt: Date | string;
|
|
15
|
+
finishedAt?: Date | string;
|
|
16
|
+
duration?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
logs?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface Pipeline {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
status: DeploymentStatus;
|
|
24
|
+
stages: PipelineStage[];
|
|
25
|
+
trigger: string;
|
|
26
|
+
branch: string;
|
|
27
|
+
startedAt: Date | string;
|
|
28
|
+
}
|
|
29
|
+
export interface PipelineStage {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
status: DeploymentStatus;
|
|
33
|
+
duration?: string;
|
|
34
|
+
logs?: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface EnvironmentStatus {
|
|
37
|
+
name: Environment;
|
|
38
|
+
status: "healthy" | "degraded" | "down";
|
|
39
|
+
url: string;
|
|
40
|
+
lastDeployment?: Deployment;
|
|
41
|
+
uptime?: string;
|
|
42
|
+
responseTime?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface DeploymentDashboardProps {
|
|
45
|
+
/** Recent deployments */
|
|
46
|
+
deployments?: Deployment[];
|
|
47
|
+
/** Active pipelines */
|
|
48
|
+
pipelines?: Pipeline[];
|
|
49
|
+
/** Environment statuses */
|
|
50
|
+
environments?: EnvironmentStatus[];
|
|
51
|
+
/** Handler for deploying */
|
|
52
|
+
onDeploy?: (environment: Environment, branch: string) => void;
|
|
53
|
+
/** Handler for rollback */
|
|
54
|
+
onRollback?: (deploymentId: string) => void;
|
|
55
|
+
/** Handler for cancelling */
|
|
56
|
+
onCancel?: (deploymentId: string) => void;
|
|
57
|
+
/** Handler for retrying */
|
|
58
|
+
onRetry?: (deploymentId: string) => void;
|
|
59
|
+
/** Available branches */
|
|
60
|
+
branches?: string[];
|
|
61
|
+
/** Custom className */
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function DeploymentDashboard({ deployments, pipelines, environments, onDeploy, onRollback, onCancel, onRetry, branches, className, }: DeploymentDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare const defaultDeployments: Deployment[];
|
|
66
|
+
export declare const defaultPipelines: Pipeline[];
|
|
67
|
+
export declare const defaultEnvironments: EnvironmentStatus[];
|
|
68
|
+
export default DeploymentDashboard;
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -30,3 +30,10 @@ export * from './landing';
|
|
|
30
30
|
export * from './pricing';
|
|
31
31
|
export * from './wizard';
|
|
32
32
|
export * from './i18n-editor';
|
|
33
|
+
export * from './dashboard-kpi';
|
|
34
|
+
export * from './checkout-flow';
|
|
35
|
+
export * from './player-profile';
|
|
36
|
+
export * from './auth-2fa';
|
|
37
|
+
export { ChatInterface, defaultUsers as defaultChatInterfaceUsers, defaultConversations as defaultChatInterfaceConversations, defaultMessages as defaultChatInterfaceMessages, } from './chat-interface';
|
|
38
|
+
export type { ChatInterfaceProps, ChatUser as ChatInterfaceUser, ChatMessage as ChatInterfaceMessage, ChatConversation as ChatInterfaceConversation, ChatAttachment as ChatInterfaceAttachment, ChatReaction as ChatInterfaceReaction, } from './chat-interface';
|
|
39
|
+
export * from './deployment-dashboard';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PlayerStats {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
color?: "default" | "blue" | "green" | "yellow" | "red" | "purple";
|
|
7
|
+
}
|
|
8
|
+
export interface Achievement {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
rarity?: "common" | "rare" | "epic" | "legendary";
|
|
14
|
+
unlockedAt?: Date | string;
|
|
15
|
+
progress?: number;
|
|
16
|
+
maxProgress?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PlayerBadge {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
color?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface MatchHistory {
|
|
25
|
+
id: string;
|
|
26
|
+
result: "win" | "loss" | "draw";
|
|
27
|
+
score?: string;
|
|
28
|
+
opponent?: string;
|
|
29
|
+
mode?: string;
|
|
30
|
+
date: Date | string;
|
|
31
|
+
xpGained?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface PlayerProfileProps {
|
|
34
|
+
/** Player name */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Player avatar URL */
|
|
37
|
+
avatar?: string;
|
|
38
|
+
/** Player title/rank */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Current level */
|
|
41
|
+
level: number;
|
|
42
|
+
/** Current XP */
|
|
43
|
+
currentXP: number;
|
|
44
|
+
/** XP needed for next level */
|
|
45
|
+
maxXP: number;
|
|
46
|
+
/** Total XP earned */
|
|
47
|
+
totalXP?: number;
|
|
48
|
+
/** Current rank */
|
|
49
|
+
rank?: string;
|
|
50
|
+
/** Rank icon */
|
|
51
|
+
rankIcon?: React.ReactNode;
|
|
52
|
+
/** Player stats */
|
|
53
|
+
stats?: PlayerStats[];
|
|
54
|
+
/** Achievements */
|
|
55
|
+
achievements?: Achievement[];
|
|
56
|
+
/** Badges */
|
|
57
|
+
badges?: PlayerBadge[];
|
|
58
|
+
/** Match history */
|
|
59
|
+
matchHistory?: MatchHistory[];
|
|
60
|
+
/** Streak count */
|
|
61
|
+
streak?: number;
|
|
62
|
+
/** Join date */
|
|
63
|
+
joinDate?: Date | string;
|
|
64
|
+
/** Total playtime */
|
|
65
|
+
playtime?: string;
|
|
66
|
+
/** Friends count */
|
|
67
|
+
friendsCount?: number;
|
|
68
|
+
/** Is online */
|
|
69
|
+
isOnline?: boolean;
|
|
70
|
+
/** Custom className */
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare function PlayerProfile({ name, avatar, title, level, currentXP, maxXP, totalXP, rank, rankIcon, stats, achievements, badges, matchHistory, streak, joinDate, playtime, friendsCount, isOnline, className, }: PlayerProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare const defaultPlayerStats: PlayerStats[];
|
|
75
|
+
export declare const defaultAchievements: Achievement[];
|
|
76
|
+
export declare const defaultBadges: PlayerBadge[];
|
|
77
|
+
export declare const defaultMatchHistory: MatchHistory[];
|
|
78
|
+
export default PlayerProfile;
|