astrogators-shared-ui 0.4.1 → 0.4.3
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/package.json +1 -1
- package/dist/components/display/Badge.d.ts +0 -13
- package/dist/components/display/Card.d.ts +0 -20
- package/dist/components/display/Modal.d.ts +0 -16
- package/dist/components/display/index.d.ts +0 -6
- package/dist/components/feedback/Loader.d.ts +0 -12
- package/dist/components/feedback/index.d.ts +0 -2
- package/dist/components/forms/AllyCodeDropdown.d.ts +0 -12
- package/dist/components/forms/Button.d.ts +0 -16
- package/dist/components/forms/Input.d.ts +0 -14
- package/dist/components/forms/Select.d.ts +0 -21
- package/dist/components/forms/index.d.ts +0 -8
- package/dist/components/layout/Container.d.ts +0 -13
- package/dist/components/layout/Footer.d.ts +0 -11
- package/dist/components/layout/TopBar.d.ts +0 -13
- package/dist/components/layout/index.d.ts +0 -6
- package/dist/contexts/AuthContext.d.ts +0 -41
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -789
- package/dist/services/allyCodeStorage.d.ts +0 -16
- package/dist/services/api.d.ts +0 -24
- package/dist/services/auth.d.ts +0 -13
- package/dist/style.css +0 -1
- package/dist/types/api.d.ts +0 -20
- package/dist/types/index.d.ts +0 -3
- package/dist/types/mod.d.ts +0 -64
- package/dist/types/user.d.ts +0 -85
- package/dist/utils/formatAllyCode.d.ts +0 -8
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BadgeProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Badge component
|
|
11
|
-
* Small label for status, tags, or categories
|
|
12
|
-
*/
|
|
13
|
-
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface CardProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
variant?: 'default' | 'elevated' | 'outline';
|
|
6
|
-
chamfered?: boolean;
|
|
7
|
-
chamferSize?: 'sm' | 'md' | 'lg' | 'asymmetric';
|
|
8
|
-
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
9
|
-
hoverable?: boolean;
|
|
10
|
-
showDiagonalBorders?: boolean;
|
|
11
|
-
diagonalBorderColor?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Card component
|
|
18
|
-
* Container for content with optional chamfered corners and diagonal borders
|
|
19
|
-
*/
|
|
20
|
-
export declare const Card: React.FC<CardProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ModalProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
title?: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
-
closeOnOverlayClick?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Modal component
|
|
14
|
-
* Overlay dialog for focused user interaction
|
|
15
|
-
*/
|
|
16
|
-
export declare const Modal: React.FC<ModalProps>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface LoaderProps {
|
|
4
|
-
size?: 'sm' | 'md' | 'lg';
|
|
5
|
-
variant?: 'spinner' | 'dots';
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Loader component
|
|
10
|
-
* Loading indicator with spinner or dots animation
|
|
11
|
-
*/
|
|
12
|
-
export declare const Loader: React.FC<LoaderProps>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface AllyCodeDropdownProps {
|
|
4
|
-
onAllyCodeSelected?: (allyCode: string | null) => void;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* AllyCodeDropdown component
|
|
9
|
-
* Dropdown for selecting and managing saved ally codes
|
|
10
|
-
* Shows all saved codes with player names, allows quick switching
|
|
11
|
-
*/
|
|
12
|
-
export declare const AllyCodeDropdown: React.FC<AllyCodeDropdownProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Button component
|
|
14
|
-
* Reusable button with multiple variants and sizes
|
|
15
|
-
*/
|
|
16
|
-
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
-
label?: string;
|
|
5
|
-
error?: string;
|
|
6
|
-
helperText?: string;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Input component
|
|
12
|
-
* Text input field with label, error, and helper text support
|
|
13
|
-
*/
|
|
14
|
-
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface SelectOption {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
9
|
-
label?: string;
|
|
10
|
-
error?: string;
|
|
11
|
-
helperText?: string;
|
|
12
|
-
options?: SelectOption[];
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
fullWidth?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Select component
|
|
19
|
-
* Dropdown select with label, error, and helper text support
|
|
20
|
-
*/
|
|
21
|
-
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button';
|
|
2
|
-
export type { ButtonProps } from './Button';
|
|
3
|
-
export { Input } from './Input';
|
|
4
|
-
export type { InputProps } from './Input';
|
|
5
|
-
export { Select } from './Select';
|
|
6
|
-
export type { SelectProps, SelectOption } from './Select';
|
|
7
|
-
export { AllyCodeDropdown } from './AllyCodeDropdown';
|
|
8
|
-
export type { AllyCodeDropdownProps } from './AllyCodeDropdown';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ContainerProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
6
|
-
padding?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Container component
|
|
11
|
-
* Centers content and applies max-width constraints
|
|
12
|
-
*/
|
|
13
|
-
export declare const Container: React.FC<ContainerProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface FooterProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Footer component
|
|
9
|
-
* Global footer shown across all applications
|
|
10
|
-
*/
|
|
11
|
-
export declare const Footer: React.FC<FooterProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface TopBarProps {
|
|
4
|
-
logo?: React.ReactNode;
|
|
5
|
-
leftContent?: React.ReactNode;
|
|
6
|
-
rightContent?: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* TopBar component
|
|
11
|
-
* Global navigation bar shown across all applications
|
|
12
|
-
*/
|
|
13
|
-
export declare const TopBar: React.FC<TopBarProps>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { User, LoginRequest, RegisterRequest, ForgotPasswordRequest, ResetPasswordRequest, ResendVerificationRequest, AllyCode, AllyCodeMigrationPrompt } from '../types';
|
|
3
|
-
import { StoredAllyCode } from '../services/allyCodeStorage';
|
|
4
|
-
|
|
5
|
-
export interface AuthContextValue {
|
|
6
|
-
user: User | null;
|
|
7
|
-
isAuthenticated: boolean;
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
login: (credentials: LoginRequest) => Promise<void>;
|
|
10
|
-
register: (data: RegisterRequest) => Promise<void>;
|
|
11
|
-
logout: () => void;
|
|
12
|
-
refreshUser: () => Promise<void>;
|
|
13
|
-
forgotPassword: (data: ForgotPasswordRequest) => Promise<string>;
|
|
14
|
-
resetPassword: (data: ResetPasswordRequest) => Promise<string>;
|
|
15
|
-
resendVerification: (data: ResendVerificationRequest) => Promise<string>;
|
|
16
|
-
allyCodes: AllyCode[] | StoredAllyCode[];
|
|
17
|
-
selectedAllyCode: string | null;
|
|
18
|
-
isLoadingAllyCodes: boolean;
|
|
19
|
-
fetchAllyCodes: () => Promise<void>;
|
|
20
|
-
addAllyCode: (allyCode: string) => Promise<void>;
|
|
21
|
-
removeAllyCode: (allyCodeId: number | string) => Promise<void>;
|
|
22
|
-
selectAllyCode: (allyCode: string | null) => void;
|
|
23
|
-
updateAllyCodeLastUsed: (allyCodeId: number | string) => Promise<void>;
|
|
24
|
-
migrationPrompt: AllyCodeMigrationPrompt;
|
|
25
|
-
dismissMigrationPrompt: () => void;
|
|
26
|
-
migrateLocalStorageCodes: () => Promise<void>;
|
|
27
|
-
}
|
|
28
|
-
export interface AuthProviderProps {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
apiBaseUrl: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* AuthProvider
|
|
34
|
-
* Provides authentication state and methods to the entire application
|
|
35
|
-
*/
|
|
36
|
-
export declare const AuthProvider: React.FC<AuthProviderProps>;
|
|
37
|
-
/**
|
|
38
|
-
* useAuth hook
|
|
39
|
-
* Access authentication state and methods
|
|
40
|
-
*/
|
|
41
|
-
export declare const useAuth: () => AuthContextValue;
|
package/dist/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export { Container, TopBar, Footer } from './components/layout';
|
|
3
|
-
export type { ContainerProps, TopBarProps, FooterProps } from './components/layout';
|
|
4
|
-
export { Button, Input, Select, AllyCodeDropdown } from './components/forms';
|
|
5
|
-
export type { ButtonProps, InputProps, SelectProps, SelectOption, AllyCodeDropdownProps } from './components/forms';
|
|
6
|
-
export { Card, Badge, Modal } from './components/display';
|
|
7
|
-
export type { CardProps, BadgeProps, ModalProps } from './components/display';
|
|
8
|
-
export { Loader } from './components/feedback';
|
|
9
|
-
export type { LoaderProps } from './components/feedback';
|
|
10
|
-
export { AuthProvider, useAuth } from './contexts/AuthContext';
|
|
11
|
-
export type { AuthContextValue, AuthProviderProps } from './contexts/AuthContext';
|
|
12
|
-
export { ApiClient, apiClient, initializeApiClient } from './services/api';
|
|
13
|
-
export type { ApiClientConfig } from './services/api';
|
|
14
|
-
export { getAccessToken, setAccessToken, removeAccessToken, getRefreshToken, setRefreshToken, removeRefreshToken, setTokens, clearTokens, isAuthenticated, } from './services/auth';
|
|
15
|
-
export { getAllyCodesFromStorage, saveAllyCodeToStorage, removeAllyCodeFromStorage, updateAllyCodeLastUsed, getSelectedAllyCode, setSelectedAllyCode, clearAllyCodes, } from './services/allyCodeStorage';
|
|
16
|
-
export type { StoredAllyCode } from './services/allyCodeStorage';
|
|
17
|
-
export { formatAllyCode, unformatAllyCode } from './utils/formatAllyCode';
|
|
18
|
-
export type { User, LoginRequest, LoginResponse, RegisterRequest, RegisterResponse, RefreshTokenRequest, RefreshTokenResponse, ForgotPasswordRequest, ForgotPasswordResponse, ResetPasswordRequest, ResetPasswordResponse, VerifyEmailRequest, VerifyEmailResponse, ResendVerificationRequest, ResendVerificationResponse, AllyCode, AllyCodeCreate, AllyCodeListResponse, AllyCodeMigrationPrompt, ApiResponse, ApiError, PaginatedResponse, ModStat, ParsedMod, ModListResponse, EvaluationScores, ModEvaluation, EvaluationRequest, EvaluationResponse, } from './types';
|