@mriqbox/ui-kit 3.3.2 → 3.4.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/bin/cli.js CHANGED
@@ -51,6 +51,8 @@ const COMPONENT_MAP = {
51
51
  'MriSectionHeader': 'molecules',
52
52
  'MriDatePicker': 'molecules',
53
53
  'MriDrawer': 'molecules',
54
+ 'MriPlayerVitals': 'molecules',
55
+ 'MriVitalAdjustModal': 'molecules',
54
56
 
55
57
  // Organisms
56
58
  'MriCalendar': 'organisms',
@@ -59,6 +61,7 @@ const COMPONENT_MAP = {
59
61
  'MriSidebar': 'organisms',
60
62
  'MriTopbar': 'organisms',
61
63
  'MriTable': 'organisms',
64
+ 'MriPlayerScreenStream': 'organisms',
62
65
  };
63
66
 
64
67
  function toPascalCase(str) {
@@ -174,7 +177,7 @@ async function checkDependencies(filePath, installDir) {
174
177
  program
175
178
  .name('mri-ui')
176
179
  .description('Add Mri UI components to your project')
177
- .version('3.3.2');
180
+ .version('3.4.1');
178
181
 
179
182
  program
180
183
  .command('add <component>')
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MriScrollArea } from './MriScrollArea';
3
+
4
+ declare const meta: Meta<typeof MriScrollArea>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MriScrollArea>;
7
+ export declare const Vertical: Story;
8
+ export declare const Horizontal: Story;
@@ -0,0 +1,19 @@
1
+ export interface MriMultiSelectOption {
2
+ label: string;
3
+ value: string | number;
4
+ }
5
+ interface MriMultiSelectProps {
6
+ options: MriMultiSelectOption[];
7
+ value: (string | number)[];
8
+ onChange: (value: (string | number)[]) => void;
9
+ placeholder?: string;
10
+ searchPlaceholder?: string;
11
+ emptyMessage?: string;
12
+ className?: string;
13
+ disabled?: boolean;
14
+ maxVisibleValues?: number;
15
+ isLoading?: boolean;
16
+ error?: boolean | string;
17
+ }
18
+ export declare function MriMultiSelect({ options, value, onChange, placeholder, searchPlaceholder, emptyMessage, className, disabled, maxVisibleValues, isLoading, error, }: MriMultiSelectProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MriMultiSelect } from './MriMultiSelect';
3
+
4
+ declare const meta: Meta<typeof MriMultiSelect>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MriMultiSelect>;
7
+ export declare const Default: Story;
8
+ export declare const ManySelected: Story;
9
+ export declare const Error: Story;
10
+ export declare const Loading: Story;
11
+ export declare const Disabled: Story;
@@ -0,0 +1,26 @@
1
+ export interface VitalsData {
2
+ health: number;
3
+ armor: number;
4
+ metadata?: {
5
+ hunger?: number;
6
+ thirst?: number;
7
+ stress?: number;
8
+ isdead?: boolean;
9
+ [key: string]: unknown;
10
+ };
11
+ [key: string]: unknown;
12
+ }
13
+ export interface MriPlayerVitalsProps {
14
+ vitals: VitalsData;
15
+ size?: 'mini' | 'compact' | 'full';
16
+ onAction?: (vital: string, label: string, value: number) => void;
17
+ className?: string;
18
+ labels?: {
19
+ health?: string;
20
+ armor?: string;
21
+ hunger?: string;
22
+ thirst?: string;
23
+ stress?: string;
24
+ };
25
+ }
26
+ export declare function MriPlayerVitals({ vitals, size, onAction, className, labels }: MriPlayerVitalsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MriPlayerVitals } from './MriPlayerVitals';
3
+
4
+ declare const meta: Meta<typeof MriPlayerVitals>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MriPlayerVitals>;
7
+ export declare const Compact: Story;
8
+ export declare const Mini: Story;
9
+ export declare const Full: Story;
10
+ export declare const CriticalState: Story;
@@ -0,0 +1,29 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+
3
+ export interface MriVitalAdjustModalProps {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ onSubmit: (value: number) => void;
7
+ vital: 'health' | 'armor' | 'hunger' | 'thirst' | 'stress';
8
+ currentValue: number;
9
+ playerName: string;
10
+ title?: string;
11
+ description?: string;
12
+ icon?: LucideIcon;
13
+ confirmLabel?: string;
14
+ cancelLabel?: string;
15
+ newValueLabel?: string;
16
+ showFullProgress?: boolean;
17
+ labels?: {
18
+ health?: string;
19
+ armor?: string;
20
+ hunger?: string;
21
+ thirst?: string;
22
+ stress?: string;
23
+ newValue?: string;
24
+ confirm?: string;
25
+ cancel?: string;
26
+ playerNameLabel?: string;
27
+ };
28
+ }
29
+ export declare function MriVitalAdjustModal({ isOpen, onClose, onSubmit, vital, currentValue, playerName, labels, icon, showFullProgress, title, description, confirmLabel, cancelLabel, newValueLabel }: MriVitalAdjustModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MriVitalAdjustModal } from './MriVitalAdjustModal';
3
+
4
+ declare const meta: Meta<typeof MriVitalAdjustModal>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MriVitalAdjustModal>;
7
+ export declare const Health: Story;
8
+ export declare const CustomIcon: Story;
9
+ export declare const CustomLabels: Story;
10
+ export declare const HiddenProgress: Story;
11
+ export declare const Armor: Story;
12
+ export declare const Hunger: Story;
13
+ export declare const Thirst: Story;
14
+ export declare const Stress: Story;
@@ -0,0 +1,41 @@
1
+ export interface MriPlayerScreenStreamProps {
2
+ playerId: number | string;
3
+ playerName?: string;
4
+ className?: string;
5
+ onFpsUpdate?: (fps: number) => void;
6
+ autoPlay?: boolean;
7
+ muted?: boolean;
8
+ isMock?: boolean;
9
+ showKeyboard?: boolean;
10
+ onSendNui?: (method: string, data?: unknown) => Promise<unknown>;
11
+ onNuiEvent?: (event: string, callback: (data: unknown) => void) => () => void;
12
+ signaling?: {
13
+ init: (url: string | null, id: string, provider: string) => void;
14
+ disconnect: () => void;
15
+ send: (msg: unknown) => void;
16
+ onMessage: (callback: (msg: unknown) => void) => () => void;
17
+ onConnect: (callback: () => void) => void;
18
+ isConnected?: () => boolean;
19
+ };
20
+ subscribeFromCF?: (sessionId: string, trackName: string) => Promise<{
21
+ pc: RTCPeerConnection;
22
+ stream: MediaStream;
23
+ }>;
24
+ webrtcConfig?: {
25
+ url: string | null;
26
+ provider: 'websocket' | 'fivem-native' | 'cloudflare-sfu';
27
+ iceServers?: RTCIceServer[];
28
+ };
29
+ selfId?: string | number;
30
+ labels?: {
31
+ connecting?: string;
32
+ error_title?: string;
33
+ error_desc?: string;
34
+ retry?: string;
35
+ live?: string;
36
+ stable?: string;
37
+ mock_active?: string;
38
+ simulator?: string;
39
+ };
40
+ }
41
+ export declare function MriPlayerScreenStream({ playerId, className, onFpsUpdate, autoPlay, muted, isMock, showKeyboard, onSendNui, onNuiEvent, signaling, subscribeFromCF, webrtcConfig, selfId, labels }: MriPlayerScreenStreamProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MriPlayerScreenStream } from './MriPlayerScreenStream';
3
+
4
+ declare const meta: Meta<typeof MriPlayerScreenStream>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MriPlayerScreenStream>;
7
+ export declare const MockFeed: Story;
8
+ export declare const WithKeyboard: Story;
9
+ export declare const Loading: Story;
package/dist/index.d.ts CHANGED
@@ -29,10 +29,14 @@ export * from './components/molecules/MriSectionHeader';
29
29
  export * from './components/molecules/MriDatePicker';
30
30
  export * from './components/molecules/MriColorPicker';
31
31
  export * from './components/molecules/MriCreatableCombobox';
32
+ export * from './components/molecules/MriPlayerVitals';
33
+ export * from './components/molecules/MriVitalAdjustModal';
34
+ export * from './components/molecules/MriMultiSelect';
32
35
  export * from './components/organisms/MriCalendar';
33
36
  export * from './components/organisms/MriPageHeader';
34
37
  export * from './components/organisms/MriSidebar';
35
38
  export * from './components/organisms/MriTopbar';
36
- export * from './components/organisms/MriTable';
39
+ export * from './components/organisms/MriTopbar';
37
40
  export * from './components/organisms/MriKeyboardVisualizer';
41
+ export * from './components/organisms/MriPlayerScreenStream';
38
42
  export * from './lib/utils';