dirk-cfx-react 1.1.67 → 1.1.69
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/components/index.cjs +195 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +13 -2
- package/dist/components/index.d.ts +13 -2
- package/dist/components/index.js +195 -2
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +202 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +198 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +120 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +21 -1
- package/dist/utils/index.d.ts +21 -1
- package/dist/utils/index.js +117 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { SelectProps, FlexProps } from '@mantine/core';
|
|
2
|
+
import { SelectProps, FlexProps, MultiSelectProps } from '@mantine/core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import * as framer_motion from 'framer-motion';
|
|
@@ -914,6 +914,17 @@ declare const FiveMKeyBindInput: typeof Root & {
|
|
|
914
914
|
Key: typeof Key;
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
+
type ControlSelectProps = Omit<SelectProps, "data" | "value" | "onChange"> & {
|
|
918
|
+
value: number | null | undefined;
|
|
919
|
+
onChange: (id: number | null) => void;
|
|
920
|
+
};
|
|
921
|
+
declare function ControlSelect({ value, onChange, label, size, searchable, ...rest }: ControlSelectProps): react_jsx_runtime.JSX.Element;
|
|
922
|
+
type ControlMultiSelectProps = Omit<MultiSelectProps, "data" | "value" | "onChange"> & {
|
|
923
|
+
value: number[];
|
|
924
|
+
onChange: (ids: number[]) => void;
|
|
925
|
+
};
|
|
926
|
+
declare function ControlMultiSelect({ value, onChange, label, size, searchable, ...rest }: ControlMultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
927
|
+
|
|
917
928
|
declare function AsyncSaveButton({ onSave, color, label, style, }: {
|
|
918
929
|
onSave: () => Promise<any>;
|
|
919
930
|
color: string;
|
|
@@ -945,4 +956,4 @@ interface TestBedProps {
|
|
|
945
956
|
}
|
|
946
957
|
declare function TestBed({ items, storageKey, disablePersistence, title, }: TestBedProps): react_jsx_runtime.JSX.Element | null;
|
|
947
958
|
|
|
948
|
-
export { AdminPageTitle, type AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, type BlipColorSelectProps, BlipDisplaySelect, type BlipDisplaySelectProps, BlipIconSelect, type BlipIconSelectProps, BorderedIcon, type BorderedIconProps, type ButtonProps, ConfigPanel, type ConfigPanelProps, ConfirmModal, type ConfirmModalProps, Counter, type FiveMControls, FiveMKeyBindInput, FloatingParticles, type FloatingParticlesProps, GroupName, type GroupNameProps, GroupRank, type GroupRankProps, GroupSelect, type GroupSelectProps, type GroupType, type GroupValue, InfoBox, type InfoBoxProps, InputContainer, type InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, type ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, type NavItem, NavigationContext, NavigationProvider, type NavigationStore, type ParticleState, PositionPicker, type PositionPickerProps, type ProgressProps, type Prompt, type PromptButton, PromptModal, type SegmentProps, SegmentedControl, type SegmentedControlProps, SegmentedProgress, SelectItem, type SelectItemProps, type StoreModalProps, TestBed, type TestBedItem, type TestBedProps, Title, type TitleProps, type Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
959
|
+
export { AdminPageTitle, type AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, type BlipColorSelectProps, BlipDisplaySelect, type BlipDisplaySelectProps, BlipIconSelect, type BlipIconSelectProps, BorderedIcon, type BorderedIconProps, type ButtonProps, ConfigPanel, type ConfigPanelProps, ConfirmModal, type ConfirmModalProps, ControlMultiSelect, type ControlMultiSelectProps, ControlSelect, type ControlSelectProps, Counter, type FiveMControls, FiveMKeyBindInput, FloatingParticles, type FloatingParticlesProps, GroupName, type GroupNameProps, GroupRank, type GroupRankProps, GroupSelect, type GroupSelectProps, type GroupType, type GroupValue, InfoBox, type InfoBoxProps, InputContainer, type InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, type ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, type NavItem, NavigationContext, NavigationProvider, type NavigationStore, type ParticleState, PositionPicker, type PositionPickerProps, type ProgressProps, type Prompt, type PromptButton, PromptModal, type SegmentProps, SegmentedControl, type SegmentedControlProps, SegmentedProgress, SelectItem, type SelectItemProps, type StoreModalProps, TestBed, type TestBedItem, type TestBedProps, Title, type TitleProps, type Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { SelectProps, FlexProps } from '@mantine/core';
|
|
2
|
+
import { SelectProps, FlexProps, MultiSelectProps } from '@mantine/core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import * as framer_motion from 'framer-motion';
|
|
@@ -914,6 +914,17 @@ declare const FiveMKeyBindInput: typeof Root & {
|
|
|
914
914
|
Key: typeof Key;
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
+
type ControlSelectProps = Omit<SelectProps, "data" | "value" | "onChange"> & {
|
|
918
|
+
value: number | null | undefined;
|
|
919
|
+
onChange: (id: number | null) => void;
|
|
920
|
+
};
|
|
921
|
+
declare function ControlSelect({ value, onChange, label, size, searchable, ...rest }: ControlSelectProps): react_jsx_runtime.JSX.Element;
|
|
922
|
+
type ControlMultiSelectProps = Omit<MultiSelectProps, "data" | "value" | "onChange"> & {
|
|
923
|
+
value: number[];
|
|
924
|
+
onChange: (ids: number[]) => void;
|
|
925
|
+
};
|
|
926
|
+
declare function ControlMultiSelect({ value, onChange, label, size, searchable, ...rest }: ControlMultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
927
|
+
|
|
917
928
|
declare function AsyncSaveButton({ onSave, color, label, style, }: {
|
|
918
929
|
onSave: () => Promise<any>;
|
|
919
930
|
color: string;
|
|
@@ -945,4 +956,4 @@ interface TestBedProps {
|
|
|
945
956
|
}
|
|
946
957
|
declare function TestBed({ items, storageKey, disablePersistence, title, }: TestBedProps): react_jsx_runtime.JSX.Element | null;
|
|
947
958
|
|
|
948
|
-
export { AdminPageTitle, type AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, type BlipColorSelectProps, BlipDisplaySelect, type BlipDisplaySelectProps, BlipIconSelect, type BlipIconSelectProps, BorderedIcon, type BorderedIconProps, type ButtonProps, ConfigPanel, type ConfigPanelProps, ConfirmModal, type ConfirmModalProps, Counter, type FiveMControls, FiveMKeyBindInput, FloatingParticles, type FloatingParticlesProps, GroupName, type GroupNameProps, GroupRank, type GroupRankProps, GroupSelect, type GroupSelectProps, type GroupType, type GroupValue, InfoBox, type InfoBoxProps, InputContainer, type InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, type ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, type NavItem, NavigationContext, NavigationProvider, type NavigationStore, type ParticleState, PositionPicker, type PositionPickerProps, type ProgressProps, type Prompt, type PromptButton, PromptModal, type SegmentProps, SegmentedControl, type SegmentedControlProps, SegmentedProgress, SelectItem, type SelectItemProps, type StoreModalProps, TestBed, type TestBedItem, type TestBedProps, Title, type TitleProps, type Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
959
|
+
export { AdminPageTitle, type AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, type BlipColorSelectProps, BlipDisplaySelect, type BlipDisplaySelectProps, BlipIconSelect, type BlipIconSelectProps, BorderedIcon, type BorderedIconProps, type ButtonProps, ConfigPanel, type ConfigPanelProps, ConfirmModal, type ConfirmModalProps, ControlMultiSelect, type ControlMultiSelectProps, ControlSelect, type ControlSelectProps, Counter, type FiveMControls, FiveMKeyBindInput, FloatingParticles, type FloatingParticlesProps, GroupName, type GroupNameProps, GroupRank, type GroupRankProps, GroupSelect, type GroupSelectProps, type GroupType, type GroupValue, InfoBox, type InfoBoxProps, InputContainer, type InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, type ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, type NavItem, NavigationContext, NavigationProvider, type NavigationStore, type ParticleState, PositionPicker, type PositionPickerProps, type ProgressProps, type Prompt, type PromptButton, PromptModal, type SegmentProps, SegmentedControl, type SegmentedControlProps, SegmentedProgress, SelectItem, type SelectItemProps, type StoreModalProps, TestBed, type TestBedItem, type TestBedProps, Title, type TitleProps, type Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore };
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Flex, Text, Image, TextInput, Select, Box, useMantineTheme, Tooltip, alpha, Progress, RingProgress, Portal, Button, NumberInput, Loader, ActionIcon, Stack, Group, JsonInput } from '@mantine/core';
|
|
1
|
+
import { Flex, Text, Image, TextInput, Select, Box, useMantineTheme, Tooltip, alpha, Progress, RingProgress, Portal, Button, NumberInput, MultiSelect, Loader, ActionIcon, Stack, Group, JsonInput } from '@mantine/core';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { createContext, useContext, useRef, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { create, useStore, createStore } from 'zustand';
|
|
@@ -1647,6 +1647,119 @@ var INPUT_MAPPER_KEYS_BY_PRIMARY = {
|
|
|
1647
1647
|
TOUCHPAD_ABSOLUTE_AXIS: [],
|
|
1648
1648
|
TOUCHPAD_CENTERED_AXIS: []
|
|
1649
1649
|
};
|
|
1650
|
+
|
|
1651
|
+
// src/utils/gtaControls.ts
|
|
1652
|
+
var GTA_CONTROLS = [
|
|
1653
|
+
// ── Camera ─────────────────────────────────────────────────────────────────
|
|
1654
|
+
{ id: 0, symbol: "INPUT_NEXT_CAMERA", label: "Switch Camera", defaultKey: "V", group: "Camera" },
|
|
1655
|
+
{ id: 1, symbol: "INPUT_LOOK_LR", label: "Look Left/Right", defaultKey: "Mouse X", group: "Camera" },
|
|
1656
|
+
{ id: 2, symbol: "INPUT_LOOK_UD", label: "Look Up/Down", defaultKey: "Mouse Y", group: "Camera" },
|
|
1657
|
+
{ id: 3, symbol: "INPUT_LOOK_UP_ONLY", label: "Look Up Only", group: "Camera" },
|
|
1658
|
+
{ id: 4, symbol: "INPUT_LOOK_DOWN_ONLY", label: "Look Down Only", group: "Camera" },
|
|
1659
|
+
{ id: 5, symbol: "INPUT_LOOK_LEFT_ONLY", label: "Look Left Only", group: "Camera" },
|
|
1660
|
+
{ id: 6, symbol: "INPUT_LOOK_RIGHT_ONLY", label: "Look Right Only", group: "Camera" },
|
|
1661
|
+
{ id: 8, symbol: "INPUT_CINEMATIC_SLOWMO", label: "Cinematic Slowmo", defaultKey: "Insert", group: "Camera" },
|
|
1662
|
+
{ id: 26, symbol: "INPUT_LOOK_BEHIND", label: "Look Behind", defaultKey: "C", group: "Camera" },
|
|
1663
|
+
{ id: 27, symbol: "INPUT_PHONE", label: "Phone", defaultKey: "Up Arrow", group: "Phone" },
|
|
1664
|
+
// ── Movement ───────────────────────────────────────────────────────────────
|
|
1665
|
+
{ id: 21, symbol: "INPUT_SPRINT", label: "Sprint", defaultKey: "Left Shift", group: "Movement" },
|
|
1666
|
+
{ id: 22, symbol: "INPUT_JUMP", label: "Jump", defaultKey: "Space", group: "Movement" },
|
|
1667
|
+
{ id: 23, symbol: "INPUT_ENTER", label: "Enter Vehicle", defaultKey: "F", group: "Movement" },
|
|
1668
|
+
{ id: 30, symbol: "INPUT_MOVE_LR", label: "Move Left/Right", group: "Movement" },
|
|
1669
|
+
{ id: 31, symbol: "INPUT_MOVE_UD", label: "Move Up/Down", group: "Movement" },
|
|
1670
|
+
{ id: 32, symbol: "INPUT_MOVE_UP_ONLY", label: "Move Forward (W)", group: "Movement" },
|
|
1671
|
+
{ id: 33, symbol: "INPUT_MOVE_DOWN_ONLY", label: "Move Back (S)", group: "Movement" },
|
|
1672
|
+
{ id: 34, symbol: "INPUT_MOVE_LEFT_ONLY", label: "Move Left (A)", group: "Movement" },
|
|
1673
|
+
{ id: 35, symbol: "INPUT_MOVE_RIGHT_ONLY", label: "Move Right (D)", group: "Movement" },
|
|
1674
|
+
{ id: 36, symbol: "INPUT_DUCK", label: "Duck / Stealth", defaultKey: "Left Ctrl", group: "Movement" },
|
|
1675
|
+
{ id: 37, symbol: "INPUT_SELECT_WEAPON", label: "Weapon Wheel", defaultKey: "Tab", group: "Combat" },
|
|
1676
|
+
{ id: 38, symbol: "INPUT_PICKUP", label: "Pickup / Interact", defaultKey: "E", group: "Movement" },
|
|
1677
|
+
// ── Combat ─────────────────────────────────────────────────────────────────
|
|
1678
|
+
{ id: 24, symbol: "INPUT_ATTACK", label: "Attack / Fire", defaultKey: "Mouse 1", group: "Combat" },
|
|
1679
|
+
{ id: 25, symbol: "INPUT_AIM", label: "Aim", defaultKey: "Mouse 2", group: "Combat" },
|
|
1680
|
+
{ id: 45, symbol: "INPUT_RELOAD", label: "Reload", defaultKey: "R", group: "Combat" },
|
|
1681
|
+
{ id: 47, symbol: "INPUT_DETONATE", label: "Detonate", defaultKey: "G", group: "Combat" },
|
|
1682
|
+
{ id: 257, symbol: "INPUT_ATTACK2", label: "Attack 2", group: "Combat" },
|
|
1683
|
+
{ id: 140, symbol: "INPUT_MELEE_ATTACK_LIGHT", label: "Melee Light", defaultKey: "R", group: "Combat" },
|
|
1684
|
+
{ id: 141, symbol: "INPUT_MELEE_ATTACK_HEAVY", label: "Melee Heavy", defaultKey: "Q", group: "Combat" },
|
|
1685
|
+
{ id: 142, symbol: "INPUT_MELEE_ATTACK_ALTERNATE", label: "Melee Alternate", defaultKey: "Mouse 1", group: "Combat" },
|
|
1686
|
+
{ id: 263, symbol: "INPUT_MELEE_ATTACK1", label: "Melee Attack 1", group: "Combat" },
|
|
1687
|
+
{ id: 264, symbol: "INPUT_MELEE_ATTACK2", label: "Melee Attack 2", group: "Combat" },
|
|
1688
|
+
// ── Cover ──────────────────────────────────────────────────────────────────
|
|
1689
|
+
{ id: 44, symbol: "INPUT_COVER", label: "Cover", defaultKey: "Q", group: "Cover" },
|
|
1690
|
+
// ── Vehicle (general) ──────────────────────────────────────────────────────
|
|
1691
|
+
{ id: 59, symbol: "INPUT_VEH_MOVE_LR", label: "Vehicle Steering", group: "Vehicle" },
|
|
1692
|
+
{ id: 63, symbol: "INPUT_VEH_MOVE_LEFT_ONLY", label: "Vehicle Steer Left", group: "Vehicle" },
|
|
1693
|
+
{ id: 64, symbol: "INPUT_VEH_MOVE_RIGHT_ONLY", label: "Vehicle Steer Right", group: "Vehicle" },
|
|
1694
|
+
{ id: 71, symbol: "INPUT_VEH_ACCELERATE", label: "Vehicle Accelerate", defaultKey: "W", group: "Vehicle" },
|
|
1695
|
+
{ id: 72, symbol: "INPUT_VEH_BRAKE", label: "Vehicle Brake", defaultKey: "S", group: "Vehicle" },
|
|
1696
|
+
{ id: 73, symbol: "INPUT_VEH_DUCK", label: "Vehicle Duck", defaultKey: "X", group: "Vehicle" },
|
|
1697
|
+
{ id: 74, symbol: "INPUT_VEH_HEADLIGHT", label: "Headlights", defaultKey: "H", group: "Vehicle" },
|
|
1698
|
+
{ id: 75, symbol: "INPUT_VEH_EXIT", label: "Exit Vehicle", defaultKey: "F", group: "Vehicle" },
|
|
1699
|
+
{ id: 76, symbol: "INPUT_VEH_HANDBRAKE", label: "Handbrake", defaultKey: "Space", group: "Vehicle" },
|
|
1700
|
+
{ id: 80, symbol: "INPUT_VEH_CIN_CAM", label: "Cinematic Cam", defaultKey: "R", group: "Vehicle" },
|
|
1701
|
+
{ id: 81, symbol: "INPUT_VEH_NEXT_RADIO", label: "Radio Next", group: "Vehicle" },
|
|
1702
|
+
{ id: 82, symbol: "INPUT_VEH_PREV_RADIO", label: "Radio Prev", group: "Vehicle" },
|
|
1703
|
+
{ id: 83, symbol: "INPUT_VEH_NEXT_RADIO_TRACK", label: "Radio Next Track", group: "Vehicle" },
|
|
1704
|
+
{ id: 84, symbol: "INPUT_VEH_PREV_RADIO_TRACK", label: "Radio Prev Track", group: "Vehicle" },
|
|
1705
|
+
{ id: 85, symbol: "INPUT_VEH_RADIO_WHEEL", label: "Radio Wheel", defaultKey: "Q", group: "Vehicle" },
|
|
1706
|
+
{ id: 86, symbol: "INPUT_VEH_HORN", label: "Horn", defaultKey: "E", group: "Vehicle" },
|
|
1707
|
+
{ id: 90, symbol: "INPUT_VEH_AIM", label: "Vehicle Aim", group: "Vehicle" },
|
|
1708
|
+
{ id: 91, symbol: "INPUT_VEH_ATTACK", label: "Vehicle Attack", group: "Vehicle" },
|
|
1709
|
+
{ id: 92, symbol: "INPUT_VEH_ATTACK2", label: "Vehicle Attack 2", group: "Vehicle" },
|
|
1710
|
+
{ id: 99, symbol: "INPUT_VEH_SELECT_NEXT_WEAPON", label: "Veh Next Weapon", group: "Vehicle" },
|
|
1711
|
+
{ id: 100, symbol: "INPUT_VEH_SELECT_PREV_WEAPON", label: "Veh Prev Weapon", group: "Vehicle" },
|
|
1712
|
+
// ── Vehicle (Plane/Heli) ───────────────────────────────────────────────────
|
|
1713
|
+
{ id: 152, symbol: "INPUT_VEH_FLY_THROTTLE_UP", label: "Plane Throttle Up", defaultKey: "W", group: "Vehicle (Plane/Heli)" },
|
|
1714
|
+
{ id: 153, symbol: "INPUT_VEH_FLY_THROTTLE_DOWN", label: "Plane Throttle Down", defaultKey: "S", group: "Vehicle (Plane/Heli)" },
|
|
1715
|
+
{ id: 154, symbol: "INPUT_VEH_FLY_YAW_LEFT", label: "Plane Yaw Left", defaultKey: "A", group: "Vehicle (Plane/Heli)" },
|
|
1716
|
+
{ id: 155, symbol: "INPUT_VEH_FLY_YAW_RIGHT", label: "Plane Yaw Right", defaultKey: "D", group: "Vehicle (Plane/Heli)" },
|
|
1717
|
+
{ id: 158, symbol: "INPUT_VEH_FLY_ATTACK", label: "Plane Attack", defaultKey: "Mouse 1", group: "Vehicle (Plane/Heli)" },
|
|
1718
|
+
// ── Vehicle (Boat / Bike) ──────────────────────────────────────────────────
|
|
1719
|
+
{ id: 198, symbol: "INPUT_VEH_BICYCLE_PEDAL", label: "Bike Pedal", group: "Vehicle (Boat/Bike)" },
|
|
1720
|
+
// ── Phone ──────────────────────────────────────────────────────────────────
|
|
1721
|
+
{ id: 137, symbol: "INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY", label: "Toggle Phone (alt)", group: "Phone" },
|
|
1722
|
+
// ── Frontend / UI ──────────────────────────────────────────────────────────
|
|
1723
|
+
{ id: 199, symbol: "INPUT_FRONTEND_PAUSE", label: "Pause Menu", defaultKey: "P", group: "Frontend / UI" },
|
|
1724
|
+
{ id: 200, symbol: "INPUT_FRONTEND_PAUSE_ALTERNATE", label: "Pause Menu (alt)", defaultKey: "Esc", group: "Frontend / UI" },
|
|
1725
|
+
{ id: 201, symbol: "INPUT_FRONTEND_ACCEPT", label: "Accept", defaultKey: "Enter", group: "Frontend / UI" },
|
|
1726
|
+
{ id: 202, symbol: "INPUT_FRONTEND_CANCEL", label: "Cancel", defaultKey: "Esc", group: "Frontend / UI" },
|
|
1727
|
+
{ id: 244, symbol: "INPUT_INTERACTION_MENU", label: "Interaction Menu", defaultKey: "M", group: "Frontend / UI" },
|
|
1728
|
+
// ── Multiplayer ────────────────────────────────────────────────────────────
|
|
1729
|
+
{ id: 245, symbol: "INPUT_MP_TEXT_CHAT_ALL", label: "Chat (All)", defaultKey: "T", group: "Multiplayer" },
|
|
1730
|
+
{ id: 246, symbol: "INPUT_MP_TEXT_CHAT_TEAM", label: "Chat (Team)", defaultKey: "Y", group: "Multiplayer" },
|
|
1731
|
+
{ id: 247, symbol: "INPUT_MP_TEXT_CHAT_FRIENDS", label: "Chat (Friends)", group: "Multiplayer" },
|
|
1732
|
+
{ id: 248, symbol: "INPUT_MP_TEXT_CHAT_CREW", label: "Chat (Crew)", group: "Multiplayer" },
|
|
1733
|
+
{ id: 249, symbol: "INPUT_PUSH_TO_TALK", label: "Push To Talk", defaultKey: "N", group: "Multiplayer" },
|
|
1734
|
+
// ── Misc ───────────────────────────────────────────────────────────────────
|
|
1735
|
+
{ id: 51, symbol: "INPUT_CONTEXT", label: "Context (E)", defaultKey: "E", group: "Misc" },
|
|
1736
|
+
{ id: 52, symbol: "INPUT_CONTEXT_SECONDARY", label: "Context Secondary", defaultKey: "Q", group: "Misc" },
|
|
1737
|
+
{ id: 19, symbol: "INPUT_CHARACTER_WHEEL", label: "Character Wheel", defaultKey: "Left Alt", group: "Misc" },
|
|
1738
|
+
{ id: 105, symbol: "INPUT_HUD_SPECIAL", label: "Special Ability", defaultKey: "Caps Lock", group: "Misc" },
|
|
1739
|
+
{ id: 121, symbol: "INPUT_MULTIPLAYER_INFO", label: "Player List", defaultKey: "Z", group: "Misc" },
|
|
1740
|
+
{ id: 170, symbol: "INPUT_SAVE_REPLAY_CLIP", label: "Save Replay Clip", defaultKey: "F1", group: "Misc" },
|
|
1741
|
+
{ id: 288, symbol: "INPUT_REPLAY_START_STOP_RECORDING", label: "Replay Record", defaultKey: "F1", group: "Misc" },
|
|
1742
|
+
{ id: 289, symbol: "INPUT_REPLAY_START_STOP_RECORDING_SECONDARY", label: "Replay Record (alt)", group: "Misc" }
|
|
1743
|
+
];
|
|
1744
|
+
var BY_ID = new Map(GTA_CONTROLS.map((c) => [c.id, c]));
|
|
1745
|
+
function formatGtaControl(id) {
|
|
1746
|
+
const c = BY_ID.get(id);
|
|
1747
|
+
if (!c) return `Control ${id}`;
|
|
1748
|
+
return c.defaultKey ? `${c.label} (${id} \xB7 ${c.defaultKey})` : `${c.label} (${id})`;
|
|
1749
|
+
}
|
|
1750
|
+
var GTA_CONTROL_GROUP_ORDER = [
|
|
1751
|
+
"Camera",
|
|
1752
|
+
"Movement",
|
|
1753
|
+
"Combat",
|
|
1754
|
+
"Cover",
|
|
1755
|
+
"Vehicle",
|
|
1756
|
+
"Vehicle (Plane/Heli)",
|
|
1757
|
+
"Vehicle (Boat/Bike)",
|
|
1758
|
+
"Phone",
|
|
1759
|
+
"Frontend / UI",
|
|
1760
|
+
"Multiplayer",
|
|
1761
|
+
"Misc"
|
|
1762
|
+
];
|
|
1650
1763
|
function BorderedIcon(props) {
|
|
1651
1764
|
const theme = useMantineTheme();
|
|
1652
1765
|
return /* @__PURE__ */ jsx(
|
|
@@ -4431,6 +4544,86 @@ var FiveMKeyBindInput = Object.assign(Root, {
|
|
|
4431
4544
|
Category,
|
|
4432
4545
|
Key
|
|
4433
4546
|
});
|
|
4547
|
+
function buildGroupedData(extraIds = []) {
|
|
4548
|
+
const groups = /* @__PURE__ */ new Map();
|
|
4549
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4550
|
+
for (const c of GTA_CONTROLS) {
|
|
4551
|
+
if (seen.has(c.id)) continue;
|
|
4552
|
+
seen.add(c.id);
|
|
4553
|
+
if (!groups.has(c.group)) groups.set(c.group, []);
|
|
4554
|
+
groups.get(c.group).push(c);
|
|
4555
|
+
}
|
|
4556
|
+
const data = GTA_CONTROL_GROUP_ORDER.flatMap((g) => {
|
|
4557
|
+
const items = groups.get(g);
|
|
4558
|
+
if (!items || items.length === 0) return [];
|
|
4559
|
+
return [
|
|
4560
|
+
{
|
|
4561
|
+
group: g,
|
|
4562
|
+
items: items.map((c) => ({
|
|
4563
|
+
value: String(c.id),
|
|
4564
|
+
label: formatGtaControl(c.id)
|
|
4565
|
+
}))
|
|
4566
|
+
}
|
|
4567
|
+
];
|
|
4568
|
+
});
|
|
4569
|
+
const knownIds = new Set(GTA_CONTROLS.map((c) => c.id));
|
|
4570
|
+
const customs = extraIds.filter((id) => !knownIds.has(id));
|
|
4571
|
+
if (customs.length > 0) {
|
|
4572
|
+
data.push({
|
|
4573
|
+
group: "Custom",
|
|
4574
|
+
items: customs.map((id) => ({ value: String(id), label: `Control ${id}` }))
|
|
4575
|
+
});
|
|
4576
|
+
}
|
|
4577
|
+
return data;
|
|
4578
|
+
}
|
|
4579
|
+
function ControlSelect({
|
|
4580
|
+
value,
|
|
4581
|
+
onChange,
|
|
4582
|
+
label = "Control",
|
|
4583
|
+
size = "xs",
|
|
4584
|
+
searchable = true,
|
|
4585
|
+
...rest
|
|
4586
|
+
}) {
|
|
4587
|
+
const data = buildGroupedData(value != null ? [value] : []);
|
|
4588
|
+
return /* @__PURE__ */ jsx(
|
|
4589
|
+
Select,
|
|
4590
|
+
{
|
|
4591
|
+
label,
|
|
4592
|
+
size,
|
|
4593
|
+
searchable,
|
|
4594
|
+
maxDropdownHeight: 320,
|
|
4595
|
+
nothingFoundMessage: "No matching controls",
|
|
4596
|
+
...rest,
|
|
4597
|
+
data,
|
|
4598
|
+
value: value != null ? String(value) : null,
|
|
4599
|
+
onChange: (v) => onChange(v == null ? null : Number(v))
|
|
4600
|
+
}
|
|
4601
|
+
);
|
|
4602
|
+
}
|
|
4603
|
+
function ControlMultiSelect({
|
|
4604
|
+
value,
|
|
4605
|
+
onChange,
|
|
4606
|
+
label = "Controls",
|
|
4607
|
+
size = "xs",
|
|
4608
|
+
searchable = true,
|
|
4609
|
+
...rest
|
|
4610
|
+
}) {
|
|
4611
|
+
const data = buildGroupedData(value);
|
|
4612
|
+
return /* @__PURE__ */ jsx(
|
|
4613
|
+
MultiSelect,
|
|
4614
|
+
{
|
|
4615
|
+
label,
|
|
4616
|
+
size,
|
|
4617
|
+
searchable,
|
|
4618
|
+
maxDropdownHeight: 320,
|
|
4619
|
+
nothingFoundMessage: "No matching controls",
|
|
4620
|
+
...rest,
|
|
4621
|
+
data,
|
|
4622
|
+
value: value.map(String),
|
|
4623
|
+
onChange: (vals) => onChange(vals.map((v) => Number(v)).filter((n) => Number.isFinite(n)))
|
|
4624
|
+
}
|
|
4625
|
+
);
|
|
4626
|
+
}
|
|
4434
4627
|
function AsyncSaveButton({
|
|
4435
4628
|
onSave,
|
|
4436
4629
|
color,
|
|
@@ -4640,6 +4833,6 @@ function TestBed({
|
|
|
4640
4833
|
);
|
|
4641
4834
|
}
|
|
4642
4835
|
|
|
4643
|
-
export { AdminPageTitle, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, Counter, FiveMKeyBindInput, FloatingParticles, GroupName, GroupRank, GroupSelect, InfoBox, InputContainer, LevelBanner, LevelPanel, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, Title, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
4836
|
+
export { AdminPageTitle, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, ControlMultiSelect, ControlSelect, Counter, FiveMKeyBindInput, FloatingParticles, GroupName, GroupRank, GroupSelect, InfoBox, InputContainer, LevelBanner, LevelPanel, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, Title, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
4644
4837
|
//# sourceMappingURL=index.js.map
|
|
4645
4838
|
//# sourceMappingURL=index.js.map
|