dirk-cfx-react 1.1.66 → 1.1.68

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- export { AdminPageTitle, AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, Counter, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
2
- export { FrameworkGrade, FrameworkGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, gameToMap, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.cjs';
1
+ export { AdminPageTitle, AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
2
+ export { FrameworkGrade, FrameworkGroup, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GtaControl, GtaControlGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.cjs';
3
3
  export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, ScriptConfigHistoryChange, ScriptConfigHistoryEntry, ScriptConfigHistoryRequest, ScriptConfigHistoryResponse, ScriptConfigInstance, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptConfig, getScriptConfigInstance, useAudio, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.cjs';
4
4
  export { DirkProvider, DirkProviderProps } from './providers/index.cjs';
5
5
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { AdminPageTitle, AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, Counter, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
2
- export { FrameworkGrade, FrameworkGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, gameToMap, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.js';
1
+ export { AdminPageTitle, AdminPageTitleProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4Value, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
2
+ export { FrameworkGrade, FrameworkGroup, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GtaControl, GtaControlGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.js';
3
3
  export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, ScriptConfigHistoryChange, ScriptConfigHistoryEntry, ScriptConfigHistoryRequest, ScriptConfigHistoryResponse, ScriptConfigInstance, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptConfig, getScriptConfigInstance, useAudio, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.js';
4
4
  export { DirkProvider, DirkProviderProps } from './providers/index.js';
5
5
  import 'react/jsx-runtime';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Flex, Text, Image as Image$1, createTheme, Box, Stack, Title as Title$1, Code, TextInput, Select, useMantineTheme, Tooltip, alpha, Progress, RingProgress, Portal, Button, NumberInput, Loader, ActionIcon, MantineProvider, BackgroundImage, Group, JsonInput } from '@mantine/core';
1
+ import { Flex, Text, Image as Image$1, createTheme, Box, Stack, Title as Title$1, Code, TextInput, Select, useMantineTheme, Tooltip, alpha, Progress, RingProgress, Portal, Button, NumberInput, MultiSelect, Loader, ActionIcon, MantineProvider, BackgroundImage, Group, JsonInput } from '@mantine/core';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import React6, { createContext, useContext, useEffect, useRef, useState, useMemo, useLayoutEffect } from 'react';
4
4
  import { create, useStore, createStore } from 'zustand';
@@ -2253,6 +2253,122 @@ function extractDefaults(schema) {
2253
2253
  }
2254
2254
  return void 0;
2255
2255
  }
2256
+
2257
+ // src/utils/gtaControls.ts
2258
+ var GTA_CONTROLS = [
2259
+ // ── Camera ─────────────────────────────────────────────────────────────────
2260
+ { id: 0, symbol: "INPUT_NEXT_CAMERA", label: "Switch Camera", defaultKey: "V", group: "Camera" },
2261
+ { id: 1, symbol: "INPUT_LOOK_LR", label: "Look Left/Right", defaultKey: "Mouse X", group: "Camera" },
2262
+ { id: 2, symbol: "INPUT_LOOK_UD", label: "Look Up/Down", defaultKey: "Mouse Y", group: "Camera" },
2263
+ { id: 3, symbol: "INPUT_LOOK_UP_ONLY", label: "Look Up Only", group: "Camera" },
2264
+ { id: 4, symbol: "INPUT_LOOK_DOWN_ONLY", label: "Look Down Only", group: "Camera" },
2265
+ { id: 5, symbol: "INPUT_LOOK_LEFT_ONLY", label: "Look Left Only", group: "Camera" },
2266
+ { id: 6, symbol: "INPUT_LOOK_RIGHT_ONLY", label: "Look Right Only", group: "Camera" },
2267
+ { id: 8, symbol: "INPUT_CINEMATIC_SLOWMO", label: "Cinematic Slowmo", defaultKey: "Insert", group: "Camera" },
2268
+ { id: 26, symbol: "INPUT_LOOK_BEHIND", label: "Look Behind", defaultKey: "C", group: "Camera" },
2269
+ { id: 27, symbol: "INPUT_PHONE", label: "Phone", defaultKey: "Up Arrow", group: "Phone" },
2270
+ // ── Movement ───────────────────────────────────────────────────────────────
2271
+ { id: 21, symbol: "INPUT_SPRINT", label: "Sprint", defaultKey: "Left Shift", group: "Movement" },
2272
+ { id: 22, symbol: "INPUT_JUMP", label: "Jump", defaultKey: "Space", group: "Movement" },
2273
+ { id: 23, symbol: "INPUT_ENTER", label: "Enter Vehicle", defaultKey: "F", group: "Movement" },
2274
+ { id: 30, symbol: "INPUT_MOVE_LR", label: "Move Left/Right", group: "Movement" },
2275
+ { id: 31, symbol: "INPUT_MOVE_UD", label: "Move Up/Down", group: "Movement" },
2276
+ { id: 32, symbol: "INPUT_MOVE_UP_ONLY", label: "Move Forward (W)", group: "Movement" },
2277
+ { id: 33, symbol: "INPUT_MOVE_DOWN_ONLY", label: "Move Back (S)", group: "Movement" },
2278
+ { id: 34, symbol: "INPUT_MOVE_LEFT_ONLY", label: "Move Left (A)", group: "Movement" },
2279
+ { id: 35, symbol: "INPUT_MOVE_RIGHT_ONLY", label: "Move Right (D)", group: "Movement" },
2280
+ { id: 36, symbol: "INPUT_DUCK", label: "Duck / Stealth", defaultKey: "Left Ctrl", group: "Movement" },
2281
+ { id: 37, symbol: "INPUT_SELECT_WEAPON", label: "Weapon Wheel", defaultKey: "Tab", group: "Combat" },
2282
+ { id: 38, symbol: "INPUT_PICKUP", label: "Pickup / Interact", defaultKey: "E", group: "Movement" },
2283
+ // ── Combat ─────────────────────────────────────────────────────────────────
2284
+ { id: 24, symbol: "INPUT_ATTACK", label: "Attack / Fire", defaultKey: "Mouse 1", group: "Combat" },
2285
+ { id: 25, symbol: "INPUT_AIM", label: "Aim", defaultKey: "Mouse 2", group: "Combat" },
2286
+ { id: 45, symbol: "INPUT_RELOAD", label: "Reload", defaultKey: "R", group: "Combat" },
2287
+ { id: 47, symbol: "INPUT_DETONATE", label: "Detonate", defaultKey: "G", group: "Combat" },
2288
+ { id: 257, symbol: "INPUT_ATTACK2", label: "Attack 2", group: "Combat" },
2289
+ { id: 140, symbol: "INPUT_MELEE_ATTACK_LIGHT", label: "Melee Light", defaultKey: "R", group: "Combat" },
2290
+ { id: 141, symbol: "INPUT_MELEE_ATTACK_HEAVY", label: "Melee Heavy", defaultKey: "Q", group: "Combat" },
2291
+ { id: 142, symbol: "INPUT_MELEE_ATTACK_ALTERNATE", label: "Melee Alternate", defaultKey: "Mouse 1", group: "Combat" },
2292
+ { id: 263, symbol: "INPUT_MELEE_ATTACK1", label: "Melee Attack 1", group: "Combat" },
2293
+ { id: 264, symbol: "INPUT_MELEE_ATTACK2", label: "Melee Attack 2", group: "Combat" },
2294
+ // ── Cover ──────────────────────────────────────────────────────────────────
2295
+ { id: 44, symbol: "INPUT_COVER", label: "Cover", defaultKey: "Q", group: "Cover" },
2296
+ // ── Vehicle (general) ──────────────────────────────────────────────────────
2297
+ { id: 59, symbol: "INPUT_VEH_MOVE_LR", label: "Vehicle Steering", group: "Vehicle" },
2298
+ { id: 63, symbol: "INPUT_VEH_MOVE_LEFT_ONLY", label: "Vehicle Steer Left", group: "Vehicle" },
2299
+ { id: 64, symbol: "INPUT_VEH_MOVE_RIGHT_ONLY", label: "Vehicle Steer Right", group: "Vehicle" },
2300
+ { id: 71, symbol: "INPUT_VEH_ACCELERATE", label: "Vehicle Accelerate", defaultKey: "W", group: "Vehicle" },
2301
+ { id: 72, symbol: "INPUT_VEH_BRAKE", label: "Vehicle Brake", defaultKey: "S", group: "Vehicle" },
2302
+ { id: 73, symbol: "INPUT_VEH_DUCK", label: "Vehicle Duck", defaultKey: "X", group: "Vehicle" },
2303
+ { id: 74, symbol: "INPUT_VEH_HEADLIGHT", label: "Headlights", defaultKey: "H", group: "Vehicle" },
2304
+ { id: 75, symbol: "INPUT_VEH_EXIT", label: "Exit Vehicle", defaultKey: "F", group: "Vehicle" },
2305
+ { id: 76, symbol: "INPUT_VEH_HANDBRAKE", label: "Handbrake", defaultKey: "Space", group: "Vehicle" },
2306
+ { id: 80, symbol: "INPUT_VEH_CIN_CAM", label: "Cinematic Cam", defaultKey: "R", group: "Vehicle" },
2307
+ { id: 81, symbol: "INPUT_VEH_NEXT_RADIO", label: "Radio Next", group: "Vehicle" },
2308
+ { id: 82, symbol: "INPUT_VEH_PREV_RADIO", label: "Radio Prev", group: "Vehicle" },
2309
+ { id: 83, symbol: "INPUT_VEH_NEXT_RADIO_TRACK", label: "Radio Next Track", group: "Vehicle" },
2310
+ { id: 84, symbol: "INPUT_VEH_PREV_RADIO_TRACK", label: "Radio Prev Track", group: "Vehicle" },
2311
+ { id: 85, symbol: "INPUT_VEH_RADIO_WHEEL", label: "Radio Wheel", defaultKey: "Q", group: "Vehicle" },
2312
+ { id: 86, symbol: "INPUT_VEH_HORN", label: "Horn", defaultKey: "E", group: "Vehicle" },
2313
+ { id: 90, symbol: "INPUT_VEH_AIM", label: "Vehicle Aim", group: "Vehicle" },
2314
+ { id: 91, symbol: "INPUT_VEH_ATTACK", label: "Vehicle Attack", group: "Vehicle" },
2315
+ { id: 92, symbol: "INPUT_VEH_ATTACK2", label: "Vehicle Attack 2", group: "Vehicle" },
2316
+ { id: 99, symbol: "INPUT_VEH_SELECT_NEXT_WEAPON", label: "Veh Next Weapon", group: "Vehicle" },
2317
+ { id: 100, symbol: "INPUT_VEH_SELECT_PREV_WEAPON", label: "Veh Prev Weapon", group: "Vehicle" },
2318
+ // ── Vehicle (Plane/Heli) ───────────────────────────────────────────────────
2319
+ { id: 152, symbol: "INPUT_VEH_FLY_THROTTLE_UP", label: "Plane Throttle Up", defaultKey: "W", group: "Vehicle (Plane/Heli)" },
2320
+ { id: 153, symbol: "INPUT_VEH_FLY_THROTTLE_DOWN", label: "Plane Throttle Down", defaultKey: "S", group: "Vehicle (Plane/Heli)" },
2321
+ { id: 154, symbol: "INPUT_VEH_FLY_YAW_LEFT", label: "Plane Yaw Left", defaultKey: "A", group: "Vehicle (Plane/Heli)" },
2322
+ { id: 155, symbol: "INPUT_VEH_FLY_YAW_RIGHT", label: "Plane Yaw Right", defaultKey: "D", group: "Vehicle (Plane/Heli)" },
2323
+ { id: 158, symbol: "INPUT_VEH_FLY_ATTACK", label: "Plane Attack", defaultKey: "Mouse 1", group: "Vehicle (Plane/Heli)" },
2324
+ // ── Vehicle (Boat / Bike) ──────────────────────────────────────────────────
2325
+ { id: 198, symbol: "INPUT_VEH_BICYCLE_PEDAL", label: "Bike Pedal", group: "Vehicle (Boat/Bike)" },
2326
+ // ── Phone ──────────────────────────────────────────────────────────────────
2327
+ { id: 137, symbol: "INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY", label: "Toggle Phone (alt)", group: "Phone" },
2328
+ // ── Frontend / UI ──────────────────────────────────────────────────────────
2329
+ { id: 199, symbol: "INPUT_FRONTEND_PAUSE", label: "Pause Menu", defaultKey: "P", group: "Frontend / UI" },
2330
+ { id: 200, symbol: "INPUT_FRONTEND_PAUSE_ALTERNATE", label: "Pause Menu (alt)", defaultKey: "Esc", group: "Frontend / UI" },
2331
+ { id: 201, symbol: "INPUT_FRONTEND_ACCEPT", label: "Accept", defaultKey: "Enter", group: "Frontend / UI" },
2332
+ { id: 202, symbol: "INPUT_FRONTEND_CANCEL", label: "Cancel", defaultKey: "Esc", group: "Frontend / UI" },
2333
+ { id: 244, symbol: "INPUT_INTERACTION_MENU", label: "Interaction Menu", defaultKey: "M", group: "Frontend / UI" },
2334
+ // ── Multiplayer ────────────────────────────────────────────────────────────
2335
+ { id: 245, symbol: "INPUT_MP_TEXT_CHAT_ALL", label: "Chat (All)", defaultKey: "T", group: "Multiplayer" },
2336
+ { id: 246, symbol: "INPUT_MP_TEXT_CHAT_TEAM", label: "Chat (Team)", defaultKey: "Y", group: "Multiplayer" },
2337
+ { id: 247, symbol: "INPUT_MP_TEXT_CHAT_FRIENDS", label: "Chat (Friends)", group: "Multiplayer" },
2338
+ { id: 248, symbol: "INPUT_MP_TEXT_CHAT_CREW", label: "Chat (Crew)", group: "Multiplayer" },
2339
+ { id: 249, symbol: "INPUT_PUSH_TO_TALK", label: "Push To Talk", defaultKey: "N", group: "Multiplayer" },
2340
+ // ── Misc ───────────────────────────────────────────────────────────────────
2341
+ { id: 51, symbol: "INPUT_CONTEXT", label: "Context (E)", defaultKey: "E", group: "Misc" },
2342
+ { id: 52, symbol: "INPUT_CONTEXT_SECONDARY", label: "Context Secondary", defaultKey: "Q", group: "Misc" },
2343
+ { id: 73, symbol: "INPUT_CHARACTER_WHEEL", label: "Character Wheel", defaultKey: "Left Alt", group: "Misc" },
2344
+ { id: 105, symbol: "INPUT_HUD_SPECIAL", label: "Special Ability", defaultKey: "Caps Lock", group: "Misc" },
2345
+ { id: 121, symbol: "INPUT_MULTIPLAYER_INFO", label: "Player List", defaultKey: "Z", group: "Misc" },
2346
+ { id: 170, symbol: "INPUT_SAVE_REPLAY_CLIP", label: "Save Replay Clip", defaultKey: "F1", group: "Misc" },
2347
+ { id: 288, symbol: "INPUT_REPLAY_START_STOP_RECORDING", label: "Replay Record", defaultKey: "F1", group: "Misc" },
2348
+ { id: 289, symbol: "INPUT_REPLAY_START_STOP_RECORDING_SECONDARY", label: "Replay Record (alt)", group: "Misc" }
2349
+ ];
2350
+ var BY_ID = new Map(GTA_CONTROLS.map((c) => [c.id, c]));
2351
+ function getGtaControl(id) {
2352
+ return BY_ID.get(id);
2353
+ }
2354
+ function formatGtaControl(id) {
2355
+ const c = BY_ID.get(id);
2356
+ if (!c) return `Control ${id}`;
2357
+ return c.defaultKey ? `${c.label} (${id} \xB7 ${c.defaultKey})` : `${c.label} (${id})`;
2358
+ }
2359
+ var GTA_CONTROL_GROUP_ORDER = [
2360
+ "Camera",
2361
+ "Movement",
2362
+ "Combat",
2363
+ "Cover",
2364
+ "Vehicle",
2365
+ "Vehicle (Plane/Heli)",
2366
+ "Vehicle (Boat/Bike)",
2367
+ "Phone",
2368
+ "Frontend / UI",
2369
+ "Multiplayer",
2370
+ "Misc"
2371
+ ];
2256
2372
  function BorderedIcon(props) {
2257
2373
  const theme2 = useMantineTheme();
2258
2374
  return /* @__PURE__ */ jsx(
@@ -4755,6 +4871,7 @@ function SelectItem(props) {
4755
4871
  data: formattedItems,
4756
4872
  allowDeselect: false,
4757
4873
  searchable: true,
4874
+ comboboxProps: { withinPortal: true, zIndex: 2e3 },
4758
4875
  leftSectionWidth: "4vh",
4759
4876
  leftSection: props.value ? /* @__PURE__ */ jsx(
4760
4877
  Image$1,
@@ -5160,6 +5277,83 @@ var FiveMKeyBindInput = Object.assign(Root, {
5160
5277
  Category,
5161
5278
  Key
5162
5279
  });
5280
+ function buildGroupedData(extraIds = []) {
5281
+ const groups = /* @__PURE__ */ new Map();
5282
+ for (const c of GTA_CONTROLS) {
5283
+ if (!groups.has(c.group)) groups.set(c.group, []);
5284
+ groups.get(c.group).push(c);
5285
+ }
5286
+ const data = GTA_CONTROL_GROUP_ORDER.flatMap((g) => {
5287
+ const items = groups.get(g);
5288
+ if (!items || items.length === 0) return [];
5289
+ return [
5290
+ {
5291
+ group: g,
5292
+ items: items.map((c) => ({
5293
+ value: String(c.id),
5294
+ label: formatGtaControl(c.id)
5295
+ }))
5296
+ }
5297
+ ];
5298
+ });
5299
+ const knownIds = new Set(GTA_CONTROLS.map((c) => c.id));
5300
+ const customs = extraIds.filter((id) => !knownIds.has(id));
5301
+ if (customs.length > 0) {
5302
+ data.push({
5303
+ group: "Custom",
5304
+ items: customs.map((id) => ({ value: String(id), label: `Control ${id}` }))
5305
+ });
5306
+ }
5307
+ return data;
5308
+ }
5309
+ function ControlSelect({
5310
+ value,
5311
+ onChange,
5312
+ label: label2 = "Control",
5313
+ size = "xs",
5314
+ searchable = true,
5315
+ ...rest
5316
+ }) {
5317
+ const data = buildGroupedData(value != null ? [value] : []);
5318
+ return /* @__PURE__ */ jsx(
5319
+ Select,
5320
+ {
5321
+ label: label2,
5322
+ size,
5323
+ searchable,
5324
+ maxDropdownHeight: 320,
5325
+ nothingFoundMessage: "No matching controls",
5326
+ ...rest,
5327
+ data,
5328
+ value: value != null ? String(value) : null,
5329
+ onChange: (v) => onChange(v == null ? null : Number(v))
5330
+ }
5331
+ );
5332
+ }
5333
+ function ControlMultiSelect({
5334
+ value,
5335
+ onChange,
5336
+ label: label2 = "Controls",
5337
+ size = "xs",
5338
+ searchable = true,
5339
+ ...rest
5340
+ }) {
5341
+ const data = buildGroupedData(value);
5342
+ return /* @__PURE__ */ jsx(
5343
+ MultiSelect,
5344
+ {
5345
+ label: label2,
5346
+ size,
5347
+ searchable,
5348
+ maxDropdownHeight: 320,
5349
+ nothingFoundMessage: "No matching controls",
5350
+ ...rest,
5351
+ data,
5352
+ value: value.map(String),
5353
+ onChange: (vals) => onChange(vals.map((v) => Number(v)).filter((n) => Number.isFinite(n)))
5354
+ }
5355
+ );
5356
+ }
5163
5357
  function AsyncSaveButton({
5164
5358
  onSave,
5165
5359
  color,
@@ -5674,6 +5868,6 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
5674
5868
  return /* @__PURE__ */ jsx(MantineProvider, { theme: mergedTheme, defaultColorScheme: "dark", children: /* @__PURE__ */ jsx(DirkErrorBoundary, { children: content }) });
5675
5869
  }
5676
5870
 
5677
- export { AdminPageTitle, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, Counter, DirkProvider, FiveMKeyBindInput, FloatingParticles, FormProvider, GroupName, GroupRank, GroupSelect, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InfoBox, InputContainer, LevelBanner, LevelPanel, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, Title, TornEdgeSVGFilter, colorWithAlpha, copyToClipboard, createFormStore, createScriptConfig, createSkill, extractDefaults, fetchLuaTable, fetchNui, gameToMap, getImageShape, getItemImageUrl, getScriptConfigInstance, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAudio, useAutoFetcher, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useFrameworkGroups, useItems, useItemsList, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
5871
+ export { AdminPageTitle, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, ControlMultiSelect, ControlSelect, Counter, DirkProvider, FiveMKeyBindInput, FloatingParticles, FormProvider, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GroupName, GroupRank, GroupSelect, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InfoBox, InputContainer, LevelBanner, LevelPanel, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, Title, TornEdgeSVGFilter, colorWithAlpha, copyToClipboard, createFormStore, createScriptConfig, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, getScriptConfigInstance, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAudio, useAutoFetcher, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useFrameworkGroups, useItems, useItemsList, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
5678
5872
  //# sourceMappingURL=index.js.map
5679
5873
  //# sourceMappingURL=index.js.map