dirk-cfx-react 1.1.81 → 1.1.83
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 +499 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +39 -1
- package/dist/components/index.d.ts +39 -1
- package/dist/components/index.js +499 -2
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +499 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +499 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, 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, MissingItemsBanner, 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, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
|
|
1
|
+
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
|
|
2
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, 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, MissingItemsBanner, 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, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
|
|
1
|
+
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
|
|
2
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';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { create, useStore, createStore } from 'zustand';
|
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
7
|
import { motion, AnimatePresence, useMotionValue } from 'framer-motion';
|
|
8
|
-
import { Info, X, AlertTriangle, Trash2, RefreshCw, ChevronDown, Check, Copy, MapPin, Crosshair, EyeOff, Eye, RotateCcw, FlaskConical, ChevronUp, Palette, ArrowLeft, Undo2, Redo2, Save, History, XCircle, Code2, Search, Filter, User } from 'lucide-react';
|
|
8
|
+
import { Info, X, AlertTriangle, Trash2, RefreshCw, ChevronDown, Check, Copy, MapPin, Crosshair, EyeOff, Eye, RotateCcw, FlaskConical, ChevronUp, Palette, ArrowLeft, Undo2, Redo2, Save, History, XCircle, Code2, ExternalLink, Search, Filter, User } from 'lucide-react';
|
|
9
9
|
import clickSoundUrl from './click_sound-PNCRRTM4.mp3';
|
|
10
10
|
import hoverSoundUrl from './hover_sound-NBUA222C.mp3';
|
|
11
11
|
import { notifications } from '@mantine/notifications';
|
|
@@ -6575,6 +6575,503 @@ function AnimPostFxSelect({
|
|
|
6575
6575
|
}
|
|
6576
6576
|
);
|
|
6577
6577
|
}
|
|
6578
|
+
|
|
6579
|
+
// src/utils/gtaScenarios.ts
|
|
6580
|
+
var GTA_SCENARIO_GROUP_ORDER = [
|
|
6581
|
+
"Sitting",
|
|
6582
|
+
"Standing & Idle",
|
|
6583
|
+
"Eating & Drinking",
|
|
6584
|
+
"Smoking & Substances",
|
|
6585
|
+
"Working",
|
|
6586
|
+
"Sports & Fitness",
|
|
6587
|
+
"Cops & Security",
|
|
6588
|
+
"Crime & Streets",
|
|
6589
|
+
"Tourists & Crowds",
|
|
6590
|
+
"Props (Misc)",
|
|
6591
|
+
"Movement",
|
|
6592
|
+
"Animals",
|
|
6593
|
+
"Vehicles",
|
|
6594
|
+
"Code (Advanced)"
|
|
6595
|
+
];
|
|
6596
|
+
var GTA_SCENARIOS = [
|
|
6597
|
+
// ── Sitting ────────────────────────────────────────────────────────────────
|
|
6598
|
+
{ name: "PROP_HUMAN_SEAT_ARMCHAIR", group: "Sitting" },
|
|
6599
|
+
{ name: "PROP_HUMAN_SEAT_BAR", group: "Sitting" },
|
|
6600
|
+
{ name: "PROP_HUMAN_SEAT_BENCH", group: "Sitting" },
|
|
6601
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_FACILITY", group: "Sitting" },
|
|
6602
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_DRINK", group: "Sitting" },
|
|
6603
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_DRINK_FACILITY", group: "Sitting" },
|
|
6604
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_DRINK_BEER", group: "Sitting" },
|
|
6605
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_FOOD", group: "Sitting" },
|
|
6606
|
+
{ name: "PROP_HUMAN_SEAT_BENCH_FOOD_FACILITY", group: "Sitting" },
|
|
6607
|
+
{ name: "PROP_HUMAN_SEAT_BUS_STOP_WAIT", group: "Sitting" },
|
|
6608
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR", group: "Sitting" },
|
|
6609
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_DRINK", group: "Sitting" },
|
|
6610
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_DRINK_BEER", group: "Sitting" },
|
|
6611
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_FOOD", group: "Sitting" },
|
|
6612
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_UPRIGHT", group: "Sitting" },
|
|
6613
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_UPRIGHT_SHOWROOM", group: "Sitting" },
|
|
6614
|
+
{ name: "PROP_HUMAN_SEAT_CHAIR_MP_PLAYER", group: "Sitting" },
|
|
6615
|
+
{ name: "PROP_HUMAN_SEAT_COMPUTER", group: "Sitting" },
|
|
6616
|
+
{ name: "PROP_HUMAN_SEAT_COMPUTER_LOW", group: "Sitting" },
|
|
6617
|
+
{ name: "PROP_HUMAN_SEAT_DECKCHAIR", group: "Sitting" },
|
|
6618
|
+
{ name: "PROP_HUMAN_SEAT_DECKCHAIR_DRINK", group: "Sitting" },
|
|
6619
|
+
{ name: "PROP_HUMAN_SEAT_SEWING", group: "Sitting" },
|
|
6620
|
+
{ name: "PROP_HUMAN_SEAT_STRIP_WATCH", group: "Sitting" },
|
|
6621
|
+
{ name: "PROP_HUMAN_SEAT_SUNLOUNGER", group: "Sitting" },
|
|
6622
|
+
{ name: "WORLD_HUMAN_SEAT_LEDGE", group: "Sitting" },
|
|
6623
|
+
{ name: "WORLD_HUMAN_SEAT_LEDGE_EATING", group: "Sitting" },
|
|
6624
|
+
{ name: "WORLD_HUMAN_SEAT_STEPS", group: "Sitting" },
|
|
6625
|
+
{ name: "WORLD_HUMAN_SEAT_WALL", group: "Sitting" },
|
|
6626
|
+
{ name: "WORLD_HUMAN_SEAT_WALL_EATING", group: "Sitting" },
|
|
6627
|
+
{ name: "WORLD_HUMAN_SEAT_WALL_TABLET", group: "Sitting" },
|
|
6628
|
+
// ── Standing & Idle ────────────────────────────────────────────────────────
|
|
6629
|
+
{ name: "Standing", group: "Standing & Idle" },
|
|
6630
|
+
{ name: "WORLD_HUMAN_HANG_OUT_STREET", group: "Standing & Idle" },
|
|
6631
|
+
{ name: "WORLD_HUMAN_HANG_OUT_STREET_CLUBHOUSE", group: "Standing & Idle" },
|
|
6632
|
+
{ name: "WORLD_HUMAN_LEANING", group: "Standing & Idle" },
|
|
6633
|
+
{ name: "WORLD_HUMAN_LEANING_CASINO_TERRACE", group: "Standing & Idle" },
|
|
6634
|
+
{ name: "WORLD_HUMAN_STAND_IMPATIENT", group: "Standing & Idle" },
|
|
6635
|
+
{ name: "WORLD_HUMAN_STAND_IMPATIENT_CLUBHOUSE", group: "Standing & Idle" },
|
|
6636
|
+
{ name: "WORLD_HUMAN_STAND_IMPATIENT_FACILITY", group: "Standing & Idle" },
|
|
6637
|
+
{ name: "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", group: "Standing & Idle" },
|
|
6638
|
+
{ name: "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT_FACILITY", group: "Standing & Idle" },
|
|
6639
|
+
{ name: "WORLD_HUMAN_STAND_MOBILE", group: "Standing & Idle" },
|
|
6640
|
+
{ name: "WORLD_HUMAN_STAND_MOBILE_CLUBHOUSE", group: "Standing & Idle" },
|
|
6641
|
+
{ name: "WORLD_HUMAN_STAND_MOBILE_FACILITY", group: "Standing & Idle" },
|
|
6642
|
+
{ name: "WORLD_HUMAN_STAND_MOBILE_UPRIGHT", group: "Standing & Idle" },
|
|
6643
|
+
{ name: "WORLD_HUMAN_STAND_MOBILE_UPRIGHT_CLUBHOUSE", group: "Standing & Idle" },
|
|
6644
|
+
{ name: "WORLD_HUMAN_STAND_FIRE", group: "Standing & Idle" },
|
|
6645
|
+
{ name: "WORLD_HUMAN_STAND_FISHING", group: "Standing & Idle" },
|
|
6646
|
+
{ name: "PROP_HUMAN_STAND_IMPATIENT", group: "Standing & Idle" },
|
|
6647
|
+
// ── Eating & Drinking ──────────────────────────────────────────────────────
|
|
6648
|
+
{ name: "WORLD_HUMAN_DRINKING", group: "Eating & Drinking" },
|
|
6649
|
+
{ name: "WORLD_HUMAN_DRINKING_FACILITY", group: "Eating & Drinking" },
|
|
6650
|
+
{ name: "WORLD_HUMAN_DRINKING_CASINO_TERRACE", group: "Eating & Drinking" },
|
|
6651
|
+
{ name: "WORLD_HUMAN_PICNIC", group: "Eating & Drinking" },
|
|
6652
|
+
// ── Smoking & Substances ───────────────────────────────────────────────────
|
|
6653
|
+
{ name: "WORLD_HUMAN_AA_COFFEE", group: "Smoking & Substances" },
|
|
6654
|
+
{ name: "WORLD_HUMAN_AA_SMOKE", group: "Smoking & Substances" },
|
|
6655
|
+
{ name: "WORLD_HUMAN_SMOKING", group: "Smoking & Substances" },
|
|
6656
|
+
{ name: "WORLD_HUMAN_SMOKING_CLUBHOUSE", group: "Smoking & Substances" },
|
|
6657
|
+
{ name: "WORLD_HUMAN_SMOKING_POT", group: "Smoking & Substances" },
|
|
6658
|
+
{ name: "WORLD_HUMAN_SMOKING_POT_CLUBHOUSE", group: "Smoking & Substances" },
|
|
6659
|
+
{ name: "WORLD_HUMAN_STUPOR", group: "Smoking & Substances" },
|
|
6660
|
+
{ name: "WORLD_HUMAN_STUPOR_CLUBHOUSE", group: "Smoking & Substances" },
|
|
6661
|
+
// ── Working ────────────────────────────────────────────────────────────────
|
|
6662
|
+
{ name: "WORLD_HUMAN_CAR_PARK_ATTENDANT", group: "Working" },
|
|
6663
|
+
{ name: "WORLD_HUMAN_CLIPBOARD", group: "Working" },
|
|
6664
|
+
{ name: "WORLD_HUMAN_CLIPBOARD_FACILITY", group: "Working" },
|
|
6665
|
+
{ name: "WORLD_HUMAN_CONST_DRILL", group: "Working" },
|
|
6666
|
+
{ name: "WORLD_HUMAN_GARDENER_LEAF_BLOWER", group: "Working" },
|
|
6667
|
+
{ name: "WORLD_HUMAN_GARDENER_PLANT", group: "Working" },
|
|
6668
|
+
{ name: "WORLD_HUMAN_HAMMERING", group: "Working" },
|
|
6669
|
+
{ name: "WORLD_HUMAN_JANITOR", group: "Working" },
|
|
6670
|
+
{ name: "WORLD_HUMAN_MAID_CLEAN", group: "Working" },
|
|
6671
|
+
{ name: "WORLD_HUMAN_MUSICIAN", group: "Working" },
|
|
6672
|
+
{ name: "WORLD_HUMAN_VALET", group: "Working" },
|
|
6673
|
+
{ name: "WORLD_HUMAN_VEHICLE_MECHANIC", group: "Working" },
|
|
6674
|
+
{ name: "WORLD_HUMAN_WELDING", group: "Working" },
|
|
6675
|
+
// ── Sports & Fitness ───────────────────────────────────────────────────────
|
|
6676
|
+
{ name: "WORLD_HUMAN_GOLF_PLAYER", group: "Sports & Fitness" },
|
|
6677
|
+
{ name: "WORLD_HUMAN_HIKER", group: "Sports & Fitness" },
|
|
6678
|
+
{ name: "WORLD_HUMAN_HIKER_STANDING", group: "Sports & Fitness" },
|
|
6679
|
+
{ name: "WORLD_HUMAN_JOG", group: "Sports & Fitness" },
|
|
6680
|
+
{ name: "WORLD_HUMAN_JOG_STANDING", group: "Sports & Fitness" },
|
|
6681
|
+
{ name: "WORLD_HUMAN_MUSCLE_FLEX", group: "Sports & Fitness" },
|
|
6682
|
+
{ name: "WORLD_HUMAN_MUSCLE_FREE_WEIGHTS", group: "Sports & Fitness" },
|
|
6683
|
+
{ name: "WORLD_HUMAN_POWER_WALKER", group: "Sports & Fitness" },
|
|
6684
|
+
{ name: "WORLD_HUMAN_PUSH_UPS", group: "Sports & Fitness" },
|
|
6685
|
+
{ name: "WORLD_HUMAN_SIT_UPS", group: "Sports & Fitness" },
|
|
6686
|
+
{ name: "WORLD_HUMAN_SUNBATHE", group: "Sports & Fitness" },
|
|
6687
|
+
{ name: "WORLD_HUMAN_SUNBATHE_BACK", group: "Sports & Fitness" },
|
|
6688
|
+
{ name: "WORLD_HUMAN_SWIMMING", group: "Sports & Fitness" },
|
|
6689
|
+
{ name: "WORLD_HUMAN_TENNIS_PLAYER", group: "Sports & Fitness" },
|
|
6690
|
+
{ name: "WORLD_HUMAN_YOGA", group: "Sports & Fitness" },
|
|
6691
|
+
{ name: "PROP_HUMAN_MUSCLE_CHIN_UPS", group: "Sports & Fitness" },
|
|
6692
|
+
{ name: "PROP_HUMAN_MUSCLE_CHIN_UPS_ARMY", group: "Sports & Fitness" },
|
|
6693
|
+
{ name: "PROP_HUMAN_MUSCLE_CHIN_UPS_PRISON", group: "Sports & Fitness" },
|
|
6694
|
+
{ name: "PROP_HUMAN_SEAT_MUSCLE_BENCH_PRESS", group: "Sports & Fitness" },
|
|
6695
|
+
{ name: "PROP_HUMAN_SEAT_MUSCLE_BENCH_PRESS_PRISON", group: "Sports & Fitness" },
|
|
6696
|
+
// ── Cops & Security ────────────────────────────────────────────────────────
|
|
6697
|
+
{ name: "WORLD_HUMAN_COP_IDLES", group: "Cops & Security" },
|
|
6698
|
+
{ name: "WORLD_HUMAN_GUARD_PATROL", group: "Cops & Security" },
|
|
6699
|
+
{ name: "WORLD_HUMAN_GUARD_STAND", group: "Cops & Security" },
|
|
6700
|
+
{ name: "WORLD_HUMAN_GUARD_STAND_CASINO", group: "Cops & Security" },
|
|
6701
|
+
{ name: "WORLD_HUMAN_GUARD_STAND_CLUBHOUSE", group: "Cops & Security" },
|
|
6702
|
+
{ name: "WORLD_HUMAN_GUARD_STAND_FACILITY", group: "Cops & Security" },
|
|
6703
|
+
{ name: "WORLD_HUMAN_GUARD_STAND_ARMY", group: "Cops & Security" },
|
|
6704
|
+
{ name: "WORLD_HUMAN_SECURITY_SHINE_TORCH", group: "Cops & Security" },
|
|
6705
|
+
// ── Crime & Streets ────────────────────────────────────────────────────────
|
|
6706
|
+
{ name: "WORLD_HUMAN_DRUG_DEALER", group: "Crime & Streets" },
|
|
6707
|
+
{ name: "WORLD_HUMAN_DRUG_DEALER_HARD", group: "Crime & Streets" },
|
|
6708
|
+
{ name: "WORLD_HUMAN_DRUG_FIELD_WORKERS_RAKE", group: "Crime & Streets" },
|
|
6709
|
+
{ name: "WORLD_HUMAN_DRUG_FIELD_WORKERS_WEEDING", group: "Crime & Streets" },
|
|
6710
|
+
{ name: "WORLD_HUMAN_DRUG_PROCESSORS_COKE", group: "Crime & Streets" },
|
|
6711
|
+
{ name: "WORLD_HUMAN_DRUG_PROCESSORS_WEED", group: "Crime & Streets" },
|
|
6712
|
+
{ name: "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", group: "Crime & Streets" },
|
|
6713
|
+
{ name: "WORLD_HUMAN_PROSTITUTE_LOW_CLASS", group: "Crime & Streets" },
|
|
6714
|
+
{ name: "WORLD_HUMAN_BUM_FREEWAY", group: "Crime & Streets" },
|
|
6715
|
+
{ name: "WORLD_HUMAN_BUM_SLUMPED", group: "Crime & Streets" },
|
|
6716
|
+
{ name: "WORLD_HUMAN_BUM_STANDING", group: "Crime & Streets" },
|
|
6717
|
+
{ name: "WORLD_HUMAN_BUM_WASH", group: "Crime & Streets" },
|
|
6718
|
+
{ name: "PROP_HUMAN_BUM_BIN", group: "Crime & Streets" },
|
|
6719
|
+
{ name: "PROP_HUMAN_BUM_SHOPPING_CART", group: "Crime & Streets" },
|
|
6720
|
+
// ── Tourists & Crowds ──────────────────────────────────────────────────────
|
|
6721
|
+
{ name: "WORLD_HUMAN_BINOCULARS", group: "Tourists & Crowds" },
|
|
6722
|
+
{ name: "WORLD_HUMAN_CHEERING", group: "Tourists & Crowds" },
|
|
6723
|
+
{ name: "WORLD_HUMAN_HUMAN_STATUE", group: "Tourists & Crowds" },
|
|
6724
|
+
{ name: "WORLD_HUMAN_INSPECT_CROUCH", group: "Tourists & Crowds" },
|
|
6725
|
+
{ name: "WORLD_HUMAN_INSPECT_STAND", group: "Tourists & Crowds" },
|
|
6726
|
+
{ name: "WORLD_HUMAN_MOBILE_FILM_SHOCKING", group: "Tourists & Crowds" },
|
|
6727
|
+
{ name: "WORLD_HUMAN_PAPARAZZI", group: "Tourists & Crowds" },
|
|
6728
|
+
{ name: "WORLD_HUMAN_PARTYING", group: "Tourists & Crowds" },
|
|
6729
|
+
{ name: "WORLD_HUMAN_STRIP_WATCH_STAND", group: "Tourists & Crowds" },
|
|
6730
|
+
{ name: "WORLD_HUMAN_SUPERHERO", group: "Tourists & Crowds" },
|
|
6731
|
+
{ name: "WORLD_HUMAN_TOURIST_MAP", group: "Tourists & Crowds" },
|
|
6732
|
+
{ name: "WORLD_HUMAN_TOURIST_MOBILE", group: "Tourists & Crowds" },
|
|
6733
|
+
{ name: "WORLD_HUMAN_WINDOW_SHOP_BROWSE", group: "Tourists & Crowds" },
|
|
6734
|
+
{ name: "WORLD_HUMAN_WINDOW_SHOP_BROWSE_SHOWROOM", group: "Tourists & Crowds" },
|
|
6735
|
+
// ── Props (Misc) ───────────────────────────────────────────────────────────
|
|
6736
|
+
{ name: "PROP_HUMAN_ATM", group: "Props (Misc)" },
|
|
6737
|
+
{ name: "PROP_HUMAN_BBQ", group: "Props (Misc)" },
|
|
6738
|
+
{ name: "PROP_HUMAN_PARKING_METER", group: "Props (Misc)" },
|
|
6739
|
+
{ name: "PROP_HUMAN_MOVIE_BULB", group: "Props (Misc)" },
|
|
6740
|
+
{ name: "PROP_HUMAN_MOVIE_STUDIO_LIGHT", group: "Props (Misc)" },
|
|
6741
|
+
{ name: "PROP_BIRD_IN_TREE", group: "Props (Misc)" },
|
|
6742
|
+
{ name: "PROP_BIRD_TELEGRAPH_POLE", group: "Props (Misc)" },
|
|
6743
|
+
// ── Movement ───────────────────────────────────────────────────────────────
|
|
6744
|
+
{ name: "Walk", group: "Movement" },
|
|
6745
|
+
{ name: "Walk_Facility", group: "Movement" },
|
|
6746
|
+
// ── Animals ────────────────────────────────────────────────────────────────
|
|
6747
|
+
{ name: "WORLD_BOAR_GRAZING", group: "Animals" },
|
|
6748
|
+
{ name: "WORLD_CAT_SLEEPING_GROUND", group: "Animals" },
|
|
6749
|
+
{ name: "WORLD_CAT_SLEEPING_LEDGE", group: "Animals" },
|
|
6750
|
+
{ name: "WORLD_COW_GRAZING", group: "Animals" },
|
|
6751
|
+
{ name: "WORLD_COYOTE_HOWL", group: "Animals" },
|
|
6752
|
+
{ name: "WORLD_COYOTE_REST", group: "Animals" },
|
|
6753
|
+
{ name: "WORLD_COYOTE_WANDER", group: "Animals" },
|
|
6754
|
+
{ name: "WORLD_COYOTE_WALK", group: "Animals" },
|
|
6755
|
+
{ name: "WORLD_CHICKENHAWK_FEEDING", group: "Animals" },
|
|
6756
|
+
{ name: "WORLD_CHICKENHAWK_STANDING", group: "Animals" },
|
|
6757
|
+
{ name: "WORLD_CORMORANT_STANDING", group: "Animals" },
|
|
6758
|
+
{ name: "WORLD_CROW_FEEDING", group: "Animals" },
|
|
6759
|
+
{ name: "WORLD_CROW_STANDING", group: "Animals" },
|
|
6760
|
+
{ name: "WORLD_DEER_GRAZING", group: "Animals" },
|
|
6761
|
+
{ name: "WORLD_DOG_BARKING_ROTTWEILER", group: "Animals" },
|
|
6762
|
+
{ name: "WORLD_DOG_BARKING_RETRIEVER", group: "Animals" },
|
|
6763
|
+
{ name: "WORLD_DOG_BARKING_SHEPHERD", group: "Animals" },
|
|
6764
|
+
{ name: "WORLD_DOG_BARKING_SMALL", group: "Animals" },
|
|
6765
|
+
{ name: "WORLD_DOG_SITTING_ROTTWEILER", group: "Animals" },
|
|
6766
|
+
{ name: "WORLD_DOG_SITTING_RETRIEVER", group: "Animals" },
|
|
6767
|
+
{ name: "WORLD_DOG_SITTING_SHEPHERD", group: "Animals" },
|
|
6768
|
+
{ name: "WORLD_DOG_SITTING_SMALL", group: "Animals" },
|
|
6769
|
+
{ name: "WORLD_DOLPHIN_SWIM", group: "Animals" },
|
|
6770
|
+
{ name: "WORLD_FISH_FLEE", group: "Animals" },
|
|
6771
|
+
{ name: "WORLD_FISH_IDLE", group: "Animals" },
|
|
6772
|
+
{ name: "WORLD_GULL_FEEDING", group: "Animals" },
|
|
6773
|
+
{ name: "WORLD_GULL_STANDING", group: "Animals" },
|
|
6774
|
+
{ name: "WORLD_HEN_FLEE", group: "Animals" },
|
|
6775
|
+
{ name: "WORLD_HEN_PECKING", group: "Animals" },
|
|
6776
|
+
{ name: "WORLD_HEN_STANDING", group: "Animals" },
|
|
6777
|
+
{ name: "WORLD_MOUNTAIN_LION_REST", group: "Animals" },
|
|
6778
|
+
{ name: "WORLD_MOUNTAIN_LION_WANDER", group: "Animals" },
|
|
6779
|
+
{ name: "WORLD_ORCA_SWIM", group: "Animals" },
|
|
6780
|
+
{ name: "WORLD_PIG_GRAZING", group: "Animals" },
|
|
6781
|
+
{ name: "WORLD_PIGEON_FEEDING", group: "Animals" },
|
|
6782
|
+
{ name: "WORLD_PIGEON_STANDING", group: "Animals" },
|
|
6783
|
+
{ name: "WORLD_RABBIT_EATING", group: "Animals" },
|
|
6784
|
+
{ name: "WORLD_RABBIT_FLEE", group: "Animals" },
|
|
6785
|
+
{ name: "WORLD_RATS_EATING", group: "Animals" },
|
|
6786
|
+
{ name: "WORLD_RATS_FLEEING", group: "Animals" },
|
|
6787
|
+
{ name: "WORLD_SHARK_SWIM", group: "Animals" },
|
|
6788
|
+
{ name: "WORLD_SHARK_HAMMERHEAD_SWIM", group: "Animals" },
|
|
6789
|
+
{ name: "WORLD_STINGRAY_SWIM", group: "Animals" },
|
|
6790
|
+
{ name: "WORLD_WHALE_SWIM", group: "Animals" },
|
|
6791
|
+
// ── Vehicles ───────────────────────────────────────────────────────────────
|
|
6792
|
+
{ name: "DRIVE", group: "Vehicles" },
|
|
6793
|
+
{ name: "PARK_VEHICLE", group: "Vehicles" },
|
|
6794
|
+
{ name: "WORLD_VEHICLE_ATTRACTOR", group: "Vehicles" },
|
|
6795
|
+
{ name: "WORLD_VEHICLE_AMBULANCE", group: "Vehicles" },
|
|
6796
|
+
{ name: "WORLD_VEHICLE_BICYCLE_BMX", group: "Vehicles" },
|
|
6797
|
+
{ name: "WORLD_VEHICLE_BICYCLE_BMX_BALLAS", group: "Vehicles" },
|
|
6798
|
+
{ name: "WORLD_VEHICLE_BICYCLE_BMX_FAMILY", group: "Vehicles" },
|
|
6799
|
+
{ name: "WORLD_VEHICLE_BICYCLE_BMX_HARMONY", group: "Vehicles" },
|
|
6800
|
+
{ name: "WORLD_VEHICLE_BICYCLE_BMX_VAGOS", group: "Vehicles" },
|
|
6801
|
+
{ name: "WORLD_VEHICLE_BICYCLE_MOUNTAIN", group: "Vehicles" },
|
|
6802
|
+
{ name: "WORLD_VEHICLE_BICYCLE_ROAD", group: "Vehicles" },
|
|
6803
|
+
{ name: "WORLD_VEHICLE_BIKE_OFF_ROAD_RACE", group: "Vehicles" },
|
|
6804
|
+
{ name: "WORLD_VEHICLE_BIKER", group: "Vehicles" },
|
|
6805
|
+
{ name: "WORLD_VEHICLE_BOAT_IDLE", group: "Vehicles" },
|
|
6806
|
+
{ name: "WORLD_VEHICLE_BOAT_IDLE_ALAMO", group: "Vehicles" },
|
|
6807
|
+
{ name: "WORLD_VEHICLE_BOAT_IDLE_MARQUIS", group: "Vehicles" },
|
|
6808
|
+
{ name: "WORLD_VEHICLE_BROKEN_DOWN", group: "Vehicles" },
|
|
6809
|
+
{ name: "WORLD_VEHICLE_BUSINESSMEN", group: "Vehicles" },
|
|
6810
|
+
{ name: "WORLD_VEHICLE_CLUCKIN_BELL_TRAILER", group: "Vehicles" },
|
|
6811
|
+
{ name: "WORLD_VEHICLE_CONSTRUCTION_SOLO", group: "Vehicles" },
|
|
6812
|
+
{ name: "WORLD_VEHICLE_CONSTRUCTION_PASSENGERS", group: "Vehicles" },
|
|
6813
|
+
{ name: "WORLD_VEHICLE_DISTANT_EMPTY_GROUND", group: "Vehicles" },
|
|
6814
|
+
{ name: "WORLD_VEHICLE_DRIVE_PASSENGERS", group: "Vehicles" },
|
|
6815
|
+
{ name: "WORLD_VEHICLE_DRIVE_PASSENGERS_LIMITED", group: "Vehicles" },
|
|
6816
|
+
{ name: "WORLD_VEHICLE_DRIVE_SOLO", group: "Vehicles" },
|
|
6817
|
+
{ name: "WORLD_VEHICLE_EMPTY", group: "Vehicles" },
|
|
6818
|
+
{ name: "WORLD_VEHICLE_FARM_WORKER", group: "Vehicles" },
|
|
6819
|
+
{ name: "WORLD_VEHICLE_FIRE_TRUCK", group: "Vehicles" },
|
|
6820
|
+
{ name: "WORLD_VEHICLE_HELI_LIFEGUARD", group: "Vehicles" },
|
|
6821
|
+
{ name: "WORLD_VEHICLE_MARIACHI", group: "Vehicles" },
|
|
6822
|
+
{ name: "WORLD_VEHICLE_MECHANIC", group: "Vehicles" },
|
|
6823
|
+
{ name: "WORLD_VEHICLE_MILITARY_PLANES_BIG", group: "Vehicles" },
|
|
6824
|
+
{ name: "WORLD_VEHICLE_MILITARY_PLANES_SMALL", group: "Vehicles" },
|
|
6825
|
+
{ name: "WORLD_VEHICLE_PARK_PARALLEL", group: "Vehicles" },
|
|
6826
|
+
{ name: "WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN", group: "Vehicles" },
|
|
6827
|
+
{ name: "WORLD_VEHICLE_PASSENGER_EXIT", group: "Vehicles" },
|
|
6828
|
+
{ name: "WORLD_VEHICLE_POLICE_BIKE", group: "Vehicles" },
|
|
6829
|
+
{ name: "WORLD_VEHICLE_POLICE_CAR", group: "Vehicles" },
|
|
6830
|
+
{ name: "WORLD_VEHICLE_POLICE_NEXT_TO_CAR", group: "Vehicles" },
|
|
6831
|
+
{ name: "WORLD_VEHICLE_QUARRY", group: "Vehicles" },
|
|
6832
|
+
{ name: "WORLD_VEHICLE_SALTON", group: "Vehicles" },
|
|
6833
|
+
{ name: "WORLD_VEHICLE_SALTON_DIRT_BIKE", group: "Vehicles" },
|
|
6834
|
+
{ name: "WORLD_VEHICLE_SECURITY_CAR", group: "Vehicles" },
|
|
6835
|
+
{ name: "WORLD_VEHICLE_STREETRACE", group: "Vehicles" },
|
|
6836
|
+
{ name: "WORLD_VEHICLE_TANDL", group: "Vehicles" },
|
|
6837
|
+
{ name: "WORLD_VEHICLE_TOURBUS", group: "Vehicles" },
|
|
6838
|
+
{ name: "WORLD_VEHICLE_TOURIST", group: "Vehicles" },
|
|
6839
|
+
{ name: "WORLD_VEHICLE_TRACTOR", group: "Vehicles" },
|
|
6840
|
+
{ name: "WORLD_VEHICLE_TRACTOR_BEACH", group: "Vehicles" },
|
|
6841
|
+
{ name: "WORLD_VEHICLE_TRUCK_LOGS", group: "Vehicles" },
|
|
6842
|
+
{ name: "WORLD_VEHICLE_TRUCKS_TRAILERS", group: "Vehicles" },
|
|
6843
|
+
// ── Code (Advanced) ────────────────────────────────────────────────────────
|
|
6844
|
+
// These are engine-internal scenarios — rarely the right pick for cinematic
|
|
6845
|
+
// ped placements, but exposed because the game-data dump includes them.
|
|
6846
|
+
{ name: "CODE_HUMAN_COWER", group: "Code (Advanced)" },
|
|
6847
|
+
{ name: "CODE_HUMAN_CROSS_ROAD_WAIT", group: "Code (Advanced)" },
|
|
6848
|
+
{ name: "CODE_HUMAN_PARK_CAR", group: "Code (Advanced)" },
|
|
6849
|
+
{ name: "CODE_HUMAN_MEDIC_KNEEL", group: "Code (Advanced)" },
|
|
6850
|
+
{ name: "CODE_HUMAN_MEDIC_TEND_TO_DEAD", group: "Code (Advanced)" },
|
|
6851
|
+
{ name: "CODE_HUMAN_MEDIC_TIME_OF_DEATH", group: "Code (Advanced)" },
|
|
6852
|
+
{ name: "CODE_HUMAN_POLICE_CROWD_CONTROL", group: "Code (Advanced)" },
|
|
6853
|
+
{ name: "CODE_HUMAN_POLICE_INVESTIGATE", group: "Code (Advanced)" },
|
|
6854
|
+
{ name: "CODE_HUMAN_STAND_COWER", group: "Code (Advanced)" },
|
|
6855
|
+
{ name: "CHAINING_ENTRY", group: "Code (Advanced)" },
|
|
6856
|
+
{ name: "CHAINING_EXIT", group: "Code (Advanced)" },
|
|
6857
|
+
{ name: "EAR_TO_TEXT", group: "Code (Advanced)" },
|
|
6858
|
+
{ name: "EAR_TO_TEXT_FAT", group: "Code (Advanced)" },
|
|
6859
|
+
{ name: "WORLD_LOOKAT_POINT", group: "Code (Advanced)" }
|
|
6860
|
+
];
|
|
6861
|
+
var PREFIX_RE = /^(WORLD|PROP|CODE)_(HUMAN_|BIRD_|VEHICLE_|CAT_|DOG_|COYOTE_|FISH_|HEN_|GULL_|CROW_|RABBIT_|RATS_|SHARK_|PIGEON_|ORCA_|WHALE_|STINGRAY_|DOLPHIN_|MOUNTAIN_LION_|PIG_|COW_|DEER_|BOAR_|CHICKENHAWK_|CORMORANT_)?/;
|
|
6862
|
+
function formatGtaScenario(name) {
|
|
6863
|
+
if (!name) return "";
|
|
6864
|
+
const stripped = name.replace(PREFIX_RE, "");
|
|
6865
|
+
const cleaned = stripped.length > 0 ? stripped : name;
|
|
6866
|
+
return cleaned.toLowerCase().split("_").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
6867
|
+
}
|
|
6868
|
+
function buildGroupedData3(extraNames = []) {
|
|
6869
|
+
const groups = /* @__PURE__ */ new Map();
|
|
6870
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6871
|
+
for (const sc of GTA_SCENARIOS) {
|
|
6872
|
+
if (seen.has(sc.name)) continue;
|
|
6873
|
+
seen.add(sc.name);
|
|
6874
|
+
if (!groups.has(sc.group)) groups.set(sc.group, []);
|
|
6875
|
+
groups.get(sc.group).push(sc);
|
|
6876
|
+
}
|
|
6877
|
+
const data = GTA_SCENARIO_GROUP_ORDER.flatMap((g) => {
|
|
6878
|
+
const items = groups.get(g);
|
|
6879
|
+
if (!items || items.length === 0) return [];
|
|
6880
|
+
return [
|
|
6881
|
+
{
|
|
6882
|
+
group: g,
|
|
6883
|
+
items: items.map((sc) => ({
|
|
6884
|
+
value: sc.name,
|
|
6885
|
+
label: sc.label ?? formatGtaScenario(sc.name)
|
|
6886
|
+
}))
|
|
6887
|
+
}
|
|
6888
|
+
];
|
|
6889
|
+
});
|
|
6890
|
+
const knownNames = new Set(GTA_SCENARIOS.map((sc) => sc.name));
|
|
6891
|
+
const customs = extraNames.filter((n) => n && !knownNames.has(n));
|
|
6892
|
+
if (customs.length > 0) {
|
|
6893
|
+
data.push({
|
|
6894
|
+
group: "Custom",
|
|
6895
|
+
items: customs.map((n) => ({ value: n, label: n }))
|
|
6896
|
+
});
|
|
6897
|
+
}
|
|
6898
|
+
return data;
|
|
6899
|
+
}
|
|
6900
|
+
function ScenarioSelect({
|
|
6901
|
+
value,
|
|
6902
|
+
onChange,
|
|
6903
|
+
label: label2 = "Scenario",
|
|
6904
|
+
size = "xs",
|
|
6905
|
+
searchable = true,
|
|
6906
|
+
clearable = true,
|
|
6907
|
+
...rest
|
|
6908
|
+
}) {
|
|
6909
|
+
const data = buildGroupedData3([value]);
|
|
6910
|
+
return /* @__PURE__ */ jsx(
|
|
6911
|
+
Select,
|
|
6912
|
+
{
|
|
6913
|
+
label: label2,
|
|
6914
|
+
size,
|
|
6915
|
+
searchable,
|
|
6916
|
+
clearable,
|
|
6917
|
+
maxDropdownHeight: 320,
|
|
6918
|
+
nothingFoundMessage: "No matching scenarios",
|
|
6919
|
+
placeholder: "Pick a scenario...",
|
|
6920
|
+
...rest,
|
|
6921
|
+
data,
|
|
6922
|
+
value: value || null,
|
|
6923
|
+
onChange: (v) => onChange(v ?? "")
|
|
6924
|
+
}
|
|
6925
|
+
);
|
|
6926
|
+
}
|
|
6927
|
+
function decimalToHex(color) {
|
|
6928
|
+
if (!color || color === 0) return null;
|
|
6929
|
+
return "#" + color.toString(16).padStart(6, "0");
|
|
6930
|
+
}
|
|
6931
|
+
function RoleOption({ role }) {
|
|
6932
|
+
const swatch = decimalToHex(role.color) || "rgba(255,255,255,0.25)";
|
|
6933
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "0.6vh", children: [
|
|
6934
|
+
/* @__PURE__ */ jsx(
|
|
6935
|
+
"div",
|
|
6936
|
+
{
|
|
6937
|
+
style: {
|
|
6938
|
+
width: "1vh",
|
|
6939
|
+
height: "1vh",
|
|
6940
|
+
borderRadius: "50%",
|
|
6941
|
+
background: swatch,
|
|
6942
|
+
flexShrink: 0,
|
|
6943
|
+
boxShadow: role.color ? `0 0 0.4vh ${swatch}` : void 0
|
|
6944
|
+
}
|
|
6945
|
+
}
|
|
6946
|
+
),
|
|
6947
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "rgba(255,255,255,0.9)", children: role.name })
|
|
6948
|
+
] });
|
|
6949
|
+
}
|
|
6950
|
+
function NotConfiguredBanner({ label: label2 }) {
|
|
6951
|
+
const theme2 = useMantineTheme();
|
|
6952
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "xxs", children: [
|
|
6953
|
+
label2 && /* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xxs", tt: "uppercase", lts: "0.05em", c: "rgba(255,255,255,0.55)", children: label2 }),
|
|
6954
|
+
/* @__PURE__ */ jsxs(
|
|
6955
|
+
Flex,
|
|
6956
|
+
{
|
|
6957
|
+
align: "center",
|
|
6958
|
+
gap: "xs",
|
|
6959
|
+
px: "xs",
|
|
6960
|
+
py: "xxs",
|
|
6961
|
+
style: {
|
|
6962
|
+
background: "rgba(0,0,0,0.3)",
|
|
6963
|
+
border: "0.1vh dashed rgba(255,255,255,0.12)",
|
|
6964
|
+
borderRadius: theme2.radius.xs
|
|
6965
|
+
},
|
|
6966
|
+
children: [
|
|
6967
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: "1.4vh", color: "rgba(255,255,255,0.4)" }),
|
|
6968
|
+
/* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xxs", c: "rgba(255,255,255,0.55)", style: { flex: 1 }, children: locale("DiscordNotConfigured") || "Discord bot not configured \u2014 run /dirk_lib and set a bot token + guild ID." })
|
|
6969
|
+
]
|
|
6970
|
+
}
|
|
6971
|
+
)
|
|
6972
|
+
] });
|
|
6973
|
+
}
|
|
6974
|
+
function DiscordRoleSelect(props) {
|
|
6975
|
+
const { endpoint, label: label2, size = "xs", placeholder, disabled, style, styles } = props;
|
|
6976
|
+
const [roles, setRoles] = useState(null);
|
|
6977
|
+
const [loading, setLoading] = useState(false);
|
|
6978
|
+
const [errorCode, setErrorCode] = useState(null);
|
|
6979
|
+
const refresh = async () => {
|
|
6980
|
+
setLoading(true);
|
|
6981
|
+
try {
|
|
6982
|
+
const res = await fetchNui(endpoint, {}, {
|
|
6983
|
+
// Browser dev fallback so the component renders something useful
|
|
6984
|
+
// outside FiveM.
|
|
6985
|
+
ok: true,
|
|
6986
|
+
roles: [
|
|
6987
|
+
{ id: "1", name: "Admin", color: 15548997, position: 5 },
|
|
6988
|
+
{ id: "2", name: "VIP Gold", color: 16426522, position: 4 },
|
|
6989
|
+
{ id: "3", name: "Member", color: 5763719, position: 3 },
|
|
6990
|
+
{ id: "4", name: "Guest", color: 0, position: 2 }
|
|
6991
|
+
]
|
|
6992
|
+
});
|
|
6993
|
+
if (res?.ok) {
|
|
6994
|
+
setRoles(res.roles ?? []);
|
|
6995
|
+
setErrorCode(null);
|
|
6996
|
+
} else {
|
|
6997
|
+
setRoles(null);
|
|
6998
|
+
setErrorCode(res?._error || "FetchFailed");
|
|
6999
|
+
}
|
|
7000
|
+
} finally {
|
|
7001
|
+
setLoading(false);
|
|
7002
|
+
}
|
|
7003
|
+
};
|
|
7004
|
+
useEffect(() => {
|
|
7005
|
+
refresh();
|
|
7006
|
+
}, [endpoint]);
|
|
7007
|
+
const rolesById = useMemo(() => {
|
|
7008
|
+
const map = {};
|
|
7009
|
+
for (const r of roles ?? []) map[r.id] = r;
|
|
7010
|
+
return map;
|
|
7011
|
+
}, [roles]);
|
|
7012
|
+
if (errorCode === "NotConfigured") {
|
|
7013
|
+
return /* @__PURE__ */ jsx(NotConfiguredBanner, { label: label2 });
|
|
7014
|
+
}
|
|
7015
|
+
const data = (roles ?? []).map((r) => ({
|
|
7016
|
+
value: r.id,
|
|
7017
|
+
label: r.name
|
|
7018
|
+
}));
|
|
7019
|
+
const renderOption = ({ option }) => {
|
|
7020
|
+
const role = rolesById[option.value];
|
|
7021
|
+
return role ? /* @__PURE__ */ jsx(RoleOption, { role }) : /* @__PURE__ */ jsx(Text, { size: "xs", children: option.label });
|
|
7022
|
+
};
|
|
7023
|
+
const refreshButton = /* @__PURE__ */ jsx(
|
|
7024
|
+
ActionIcon,
|
|
7025
|
+
{
|
|
7026
|
+
size: "xs",
|
|
7027
|
+
variant: "subtle",
|
|
7028
|
+
onClick: refresh,
|
|
7029
|
+
title: locale("Refresh") || "Refresh",
|
|
7030
|
+
loading,
|
|
7031
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { size: "1.2vh" })
|
|
7032
|
+
}
|
|
7033
|
+
);
|
|
7034
|
+
if (props.multi) {
|
|
7035
|
+
return /* @__PURE__ */ jsx(
|
|
7036
|
+
MultiSelect,
|
|
7037
|
+
{
|
|
7038
|
+
label: label2,
|
|
7039
|
+
size,
|
|
7040
|
+
placeholder: placeholder || locale("PickRoles") || "Pick roles...",
|
|
7041
|
+
data,
|
|
7042
|
+
value: props.value || [],
|
|
7043
|
+
onChange: (ids) => props.onChange(ids),
|
|
7044
|
+
renderOption,
|
|
7045
|
+
searchable: true,
|
|
7046
|
+
clearable: true,
|
|
7047
|
+
disabled: disabled || loading && !roles,
|
|
7048
|
+
rightSection: refreshButton,
|
|
7049
|
+
style,
|
|
7050
|
+
styles,
|
|
7051
|
+
nothingFoundMessage: errorCode ? `${locale("Error") || "Error"} (${errorCode})` : locale("NoRoles") || "No roles found"
|
|
7052
|
+
}
|
|
7053
|
+
);
|
|
7054
|
+
}
|
|
7055
|
+
return /* @__PURE__ */ jsx(
|
|
7056
|
+
Select,
|
|
7057
|
+
{
|
|
7058
|
+
label: label2,
|
|
7059
|
+
size,
|
|
7060
|
+
placeholder: placeholder || locale("PickRole") || "Pick a role...",
|
|
7061
|
+
data,
|
|
7062
|
+
value: props.value || null,
|
|
7063
|
+
onChange: (id) => props.onChange(id),
|
|
7064
|
+
renderOption,
|
|
7065
|
+
searchable: true,
|
|
7066
|
+
clearable: true,
|
|
7067
|
+
disabled: disabled || loading && !roles,
|
|
7068
|
+
rightSection: refreshButton,
|
|
7069
|
+
style,
|
|
7070
|
+
styles,
|
|
7071
|
+
nothingFoundMessage: errorCode ? `${locale("Error") || "Error"} (${errorCode})` : locale("NoRoles") || "No roles found"
|
|
7072
|
+
}
|
|
7073
|
+
);
|
|
7074
|
+
}
|
|
6578
7075
|
function useTornEdges() {
|
|
6579
7076
|
const game = useSettings((state) => state.game);
|
|
6580
7077
|
return game === "rdr3" ? "torn-edge-wrapper" : "";
|
|
@@ -6935,6 +7432,6 @@ var Vector4Schema = z.object({
|
|
|
6935
7432
|
w: z.number()
|
|
6936
7433
|
});
|
|
6937
7434
|
|
|
6938
|
-
export { AdminPageTitle, AnimPostFxSelect, 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, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, SwitchPanel, TestBed, ThemeOverrideSection, Title, TornEdgeSVGFilter, Vector2Schema, Vector3Schema, Vector4DeleteButton, Vector4Display, Vector4Schema, WorldPositionGotoButton, WorldPositionSetButton, 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, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
|
|
7435
|
+
export { AdminPageTitle, AnimPostFxSelect, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, ControlMultiSelect, ControlSelect, Counter, DirkProvider, DiscordRoleSelect, 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, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, ScenarioSelect, SegmentedControl, SegmentedProgress, SelectItem, SwitchPanel, TestBed, ThemeOverrideSection, Title, TornEdgeSVGFilter, Vector2Schema, Vector3Schema, Vector4DeleteButton, Vector4Display, Vector4Schema, WorldPositionGotoButton, WorldPositionSetButton, 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, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
|
|
6939
7436
|
//# sourceMappingURL=index.js.map
|
|
6940
7437
|
//# sourceMappingURL=index.js.map
|