dirk-cfx-react 1.1.72 → 1.1.73
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 +70 -60
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +12 -2
- package/dist/components/index.d.ts +12 -2
- package/dist/components/index.js +70 -60
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.cjs +5 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +89 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +87 -61
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +5 -1
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +5 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/utils/index.cjs +5 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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, 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, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/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, 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, TestBed, TestBedItem, TestBedPlacement, TestBedProps, 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';
|
|
5
|
+
import { z } from 'zod';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
6
7
|
import '@mantine/core';
|
|
7
8
|
import 'react';
|
|
@@ -9,3 +10,35 @@ import 'framer-motion';
|
|
|
9
10
|
import '@fortawesome/fontawesome-svg-core';
|
|
10
11
|
import 'zustand';
|
|
11
12
|
import 'lucide-react';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 2-component vector (x, y). FiveM `vec2(x, y)`.
|
|
16
|
+
*/
|
|
17
|
+
declare const Vector2Schema: z.ZodObject<{
|
|
18
|
+
x: z.ZodNumber;
|
|
19
|
+
y: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type Vector2 = z.infer<typeof Vector2Schema>;
|
|
22
|
+
/**
|
|
23
|
+
* 3-component vector (x, y, z). FiveM `vec3(x, y, z)`.
|
|
24
|
+
* Used for positions, rotations, camera offsets.
|
|
25
|
+
*/
|
|
26
|
+
declare const Vector3Schema: z.ZodObject<{
|
|
27
|
+
x: z.ZodNumber;
|
|
28
|
+
y: z.ZodNumber;
|
|
29
|
+
z: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
type Vector3 = z.infer<typeof Vector3Schema>;
|
|
32
|
+
/**
|
|
33
|
+
* 4-component vector (x, y, z, w). FiveM `vec4(x, y, z, w)`.
|
|
34
|
+
* `w` is typically heading (degrees) in worldspace positions.
|
|
35
|
+
*/
|
|
36
|
+
declare const Vector4Schema: z.ZodObject<{
|
|
37
|
+
x: z.ZodNumber;
|
|
38
|
+
y: z.ZodNumber;
|
|
39
|
+
z: z.ZodNumber;
|
|
40
|
+
w: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type Vector4 = z.infer<typeof Vector4Schema>;
|
|
43
|
+
|
|
44
|
+
export { type Vector2, Vector2Schema, type Vector3, Vector3Schema, type Vector4, Vector4Schema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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, 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, TestBed, TestBedItem, TestBedProps, Title, TitleProps, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/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, 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, TestBed, TestBedItem, TestBedPlacement, TestBedProps, 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';
|
|
5
|
+
import { z } from 'zod';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
6
7
|
import '@mantine/core';
|
|
7
8
|
import 'react';
|
|
@@ -9,3 +10,35 @@ import 'framer-motion';
|
|
|
9
10
|
import '@fortawesome/fontawesome-svg-core';
|
|
10
11
|
import 'zustand';
|
|
11
12
|
import 'lucide-react';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 2-component vector (x, y). FiveM `vec2(x, y)`.
|
|
16
|
+
*/
|
|
17
|
+
declare const Vector2Schema: z.ZodObject<{
|
|
18
|
+
x: z.ZodNumber;
|
|
19
|
+
y: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type Vector2 = z.infer<typeof Vector2Schema>;
|
|
22
|
+
/**
|
|
23
|
+
* 3-component vector (x, y, z). FiveM `vec3(x, y, z)`.
|
|
24
|
+
* Used for positions, rotations, camera offsets.
|
|
25
|
+
*/
|
|
26
|
+
declare const Vector3Schema: z.ZodObject<{
|
|
27
|
+
x: z.ZodNumber;
|
|
28
|
+
y: z.ZodNumber;
|
|
29
|
+
z: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
type Vector3 = z.infer<typeof Vector3Schema>;
|
|
32
|
+
/**
|
|
33
|
+
* 4-component vector (x, y, z, w). FiveM `vec4(x, y, z, w)`.
|
|
34
|
+
* `w` is typically heading (degrees) in worldspace positions.
|
|
35
|
+
*/
|
|
36
|
+
declare const Vector4Schema: z.ZodObject<{
|
|
37
|
+
x: z.ZodNumber;
|
|
38
|
+
y: z.ZodNumber;
|
|
39
|
+
z: z.ZodNumber;
|
|
40
|
+
w: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type Vector4 = z.infer<typeof Vector4Schema>;
|
|
43
|
+
|
|
44
|
+
export { type Vector2, Vector2Schema, type Vector3, Vector3Schema, type Vector4, Vector4Schema };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { library } from '@fortawesome/fontawesome-svg-core';
|
|
|
20
20
|
import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
21
21
|
import { far } from '@fortawesome/free-regular-svg-icons';
|
|
22
22
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
23
|
+
import { z } from 'zod';
|
|
23
24
|
|
|
24
25
|
var __defProp = Object.defineProperty;
|
|
25
26
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -1331,7 +1332,11 @@ async function fetchNui(eventName, data, mockData) {
|
|
|
1331
1332
|
return {};
|
|
1332
1333
|
}
|
|
1333
1334
|
const overrideResourceName = useSettings.getState().overideResourceName;
|
|
1334
|
-
const
|
|
1335
|
+
const hasResourceContext = typeof window.GetParentResourceName === "function" || !!overrideResourceName;
|
|
1336
|
+
if (!hasResourceContext) {
|
|
1337
|
+
return mockData ?? {};
|
|
1338
|
+
}
|
|
1339
|
+
const resourceName = window.GetParentResourceName ? window.GetParentResourceName() : overrideResourceName;
|
|
1335
1340
|
try {
|
|
1336
1341
|
const resp = await fetch(`https://${resourceName}/${eventName}`, options);
|
|
1337
1342
|
return await resp.json();
|
|
@@ -3074,9 +3079,25 @@ function SegmentedProgress(props) {
|
|
|
3074
3079
|
}
|
|
3075
3080
|
);
|
|
3076
3081
|
}
|
|
3082
|
+
function getSizePreset(size, themeMdFontSize) {
|
|
3083
|
+
switch (size) {
|
|
3084
|
+
case "xs":
|
|
3085
|
+
return { iconFontSize: "1.2vh", iconPadding: "xxs", titleSize: "xxs", titleLineHeight: "1.2vh", descriptionSize: "xxs", innerGap: "xs", bottomPad: "xs" };
|
|
3086
|
+
case "sm":
|
|
3087
|
+
return { iconFontSize: "1.6vh", iconPadding: "xxs", titleSize: "xs", titleLineHeight: "1.6vh", descriptionSize: "xxs", innerGap: "xs", bottomPad: "xs" };
|
|
3088
|
+
case "lg":
|
|
3089
|
+
return { iconFontSize: "2.6vh", iconPadding: "sm", titleSize: "md", titleLineHeight: "2.6vh", descriptionSize: "sm", innerGap: "sm", bottomPad: "sm" };
|
|
3090
|
+
case "xl":
|
|
3091
|
+
return { iconFontSize: "3.2vh", iconPadding: "sm", titleSize: "lg", titleLineHeight: "3.2vh", descriptionSize: "md", innerGap: "md", bottomPad: "md" };
|
|
3092
|
+
case "md":
|
|
3093
|
+
default:
|
|
3094
|
+
return { iconFontSize: themeMdFontSize, iconPadding: "xs", titleSize: "sm", titleLineHeight: themeMdFontSize, descriptionSize: "xs", innerGap: "sm", bottomPad: "sm" };
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3077
3097
|
function Title(props) {
|
|
3078
3098
|
const game = useSettings((state) => state.game);
|
|
3079
3099
|
const theme2 = useMantineTheme();
|
|
3100
|
+
const preset = getSizePreset(props.size ?? "md", theme2.fontSizes.md);
|
|
3080
3101
|
return /* @__PURE__ */ jsx(
|
|
3081
3102
|
Flex,
|
|
3082
3103
|
{
|
|
@@ -3085,71 +3106,50 @@ function Title(props) {
|
|
|
3085
3106
|
gap: "xs",
|
|
3086
3107
|
w: props.w || "100%",
|
|
3087
3108
|
p: props.p || "unset",
|
|
3088
|
-
pb: !props.p ?
|
|
3109
|
+
pb: !props.p ? preset.bottomPad : props.p,
|
|
3089
3110
|
style: {
|
|
3090
3111
|
userSelect: "none",
|
|
3091
3112
|
borderBottom: props.removeBorder ? "none" : `0.3vh solid ${props.borderColor || colorWithAlpha(theme2.colors[theme2.primaryColor][9], 0.5)}`
|
|
3092
3113
|
},
|
|
3093
|
-
children: /* @__PURE__ */ jsxs(
|
|
3094
|
-
Flex,
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3114
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "center", children: [
|
|
3115
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: preset.innerGap, pr: "xs", children: [
|
|
3116
|
+
/* @__PURE__ */ jsx(
|
|
3117
|
+
BorderedIcon,
|
|
3118
|
+
{
|
|
3119
|
+
icon: props.icon,
|
|
3120
|
+
fontSize: preset.iconFontSize,
|
|
3121
|
+
color: props.iconColor,
|
|
3122
|
+
p: preset.iconPadding
|
|
3123
|
+
}
|
|
3124
|
+
),
|
|
3125
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "0.25vh", children: [
|
|
3126
|
+
/* @__PURE__ */ jsx(
|
|
3127
|
+
Text,
|
|
3101
3128
|
{
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
color: props.iconColor
|
|
3112
|
-
}
|
|
3113
|
-
),
|
|
3114
|
-
/* @__PURE__ */ jsxs(
|
|
3115
|
-
Flex,
|
|
3116
|
-
{
|
|
3117
|
-
direction: "column",
|
|
3118
|
-
gap: "0.25vh",
|
|
3119
|
-
children: [
|
|
3120
|
-
/* @__PURE__ */ jsx(Text, { p: "0", size: "sm", style: {
|
|
3121
|
-
lineHeight: theme2.fontSizes.md,
|
|
3122
|
-
fontFamily: game == "fivem" ? "Akrobat Bold" : "Red Dead",
|
|
3123
|
-
letterSpacing: "0.05em",
|
|
3124
|
-
textTransform: "uppercase"
|
|
3125
|
-
}, children: props.title }),
|
|
3126
|
-
/* @__PURE__ */ jsx(
|
|
3127
|
-
Text,
|
|
3128
|
-
{
|
|
3129
|
-
size: "xs",
|
|
3130
|
-
c: "grey",
|
|
3131
|
-
style: { whiteSpace: "normal", wordWrap: "break-word" },
|
|
3132
|
-
children: props.description
|
|
3133
|
-
}
|
|
3134
|
-
)
|
|
3135
|
-
]
|
|
3136
|
-
}
|
|
3137
|
-
)
|
|
3138
|
-
]
|
|
3129
|
+
p: "0",
|
|
3130
|
+
size: preset.titleSize,
|
|
3131
|
+
style: {
|
|
3132
|
+
lineHeight: preset.titleLineHeight,
|
|
3133
|
+
fontFamily: game == "fivem" ? "Akrobat Bold" : "Red Dead",
|
|
3134
|
+
letterSpacing: "0.05em",
|
|
3135
|
+
textTransform: "uppercase"
|
|
3136
|
+
},
|
|
3137
|
+
children: props.title
|
|
3139
3138
|
}
|
|
3140
3139
|
),
|
|
3141
3140
|
/* @__PURE__ */ jsx(
|
|
3142
|
-
|
|
3141
|
+
Text,
|
|
3143
3142
|
{
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
children: props.
|
|
3143
|
+
size: preset.descriptionSize,
|
|
3144
|
+
c: "grey",
|
|
3145
|
+
style: { whiteSpace: "normal", wordWrap: "break-word" },
|
|
3146
|
+
children: props.description
|
|
3148
3147
|
}
|
|
3149
3148
|
)
|
|
3150
|
-
]
|
|
3151
|
-
}
|
|
3152
|
-
|
|
3149
|
+
] })
|
|
3150
|
+
] }),
|
|
3151
|
+
/* @__PURE__ */ jsx(Flex, { ml: "auto", align: "center", gap: "xs", children: props.rightSection })
|
|
3152
|
+
] })
|
|
3153
3153
|
}
|
|
3154
3154
|
);
|
|
3155
3155
|
}
|
|
@@ -4894,8 +4894,8 @@ function ConfigPanelInner({
|
|
|
4894
4894
|
children: /* @__PURE__ */ jsx(ArrowLeft, { size: "1.4vh", color })
|
|
4895
4895
|
}
|
|
4896
4896
|
),
|
|
4897
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", style: { minWidth: 0, lineHeight: 1 }, children: [
|
|
4898
|
-
/* @__PURE__ */ jsx(Text, { size: "
|
|
4897
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", style: { minWidth: 0, flex: 1, lineHeight: 1, overflow: "hidden" }, children: [
|
|
4898
|
+
/* @__PURE__ */ jsx(Text, { size: "md", ff: "Akrobat Bold", tt: "uppercase", lts: "0.04em", truncate: true, children: title }),
|
|
4899
4899
|
subtitle && /* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xxs", tt: "uppercase", lts: "0.08em", c: color, truncate: true, children: subtitle })
|
|
4900
4900
|
] })
|
|
4901
4901
|
] }),
|
|
@@ -5836,6 +5836,17 @@ function AdminPageTitle(props) {
|
|
|
5836
5836
|
/* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", tt: "uppercase", lts: "0.1em", size: "sm", c: "rgba(255,255,255,0.6)", children: locale(props.title) })
|
|
5837
5837
|
] });
|
|
5838
5838
|
}
|
|
5839
|
+
var placementStyle = (placement) => {
|
|
5840
|
+
switch (placement) {
|
|
5841
|
+
case "top-center":
|
|
5842
|
+
return { top: "1vh", left: "50%", transform: "translateX(-50%)" };
|
|
5843
|
+
case "top-right":
|
|
5844
|
+
return { top: "1vh", right: "1vh" };
|
|
5845
|
+
case "top-left":
|
|
5846
|
+
default:
|
|
5847
|
+
return { top: "1vh", left: "1vh" };
|
|
5848
|
+
}
|
|
5849
|
+
};
|
|
5839
5850
|
var loadPersistedState = (storageKey) => {
|
|
5840
5851
|
try {
|
|
5841
5852
|
const raw = localStorage.getItem(storageKey);
|
|
@@ -5854,7 +5865,8 @@ function TestBed({
|
|
|
5854
5865
|
items,
|
|
5855
5866
|
storageKey = "testbed:open-state",
|
|
5856
5867
|
disablePersistence = false,
|
|
5857
|
-
title = "TestBed"
|
|
5868
|
+
title = "TestBed",
|
|
5869
|
+
placement = "top-left"
|
|
5858
5870
|
}) {
|
|
5859
5871
|
const [open, setOpen] = useState(false);
|
|
5860
5872
|
const itemsRef = useRef(items);
|
|
@@ -5884,8 +5896,7 @@ function TestBed({
|
|
|
5884
5896
|
{
|
|
5885
5897
|
style: {
|
|
5886
5898
|
position: "fixed",
|
|
5887
|
-
|
|
5888
|
-
left: "1vh",
|
|
5899
|
+
...placementStyle(placement),
|
|
5889
5900
|
zIndex: 2147483647,
|
|
5890
5901
|
pointerEvents: "auto",
|
|
5891
5902
|
fontSize: "1.4vh"
|
|
@@ -6295,7 +6306,22 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
|
|
|
6295
6306
|
) : children;
|
|
6296
6307
|
return /* @__PURE__ */ jsx(MantineProvider, { theme: mergedTheme, defaultColorScheme: "dark", children: /* @__PURE__ */ jsx(DirkErrorBoundary, { children: content }) });
|
|
6297
6308
|
}
|
|
6309
|
+
var Vector2Schema = z.object({
|
|
6310
|
+
x: z.number(),
|
|
6311
|
+
y: z.number()
|
|
6312
|
+
});
|
|
6313
|
+
var Vector3Schema = z.object({
|
|
6314
|
+
x: z.number(),
|
|
6315
|
+
y: z.number(),
|
|
6316
|
+
z: z.number()
|
|
6317
|
+
});
|
|
6318
|
+
var Vector4Schema = z.object({
|
|
6319
|
+
x: z.number(),
|
|
6320
|
+
y: z.number(),
|
|
6321
|
+
z: z.number(),
|
|
6322
|
+
w: z.number()
|
|
6323
|
+
});
|
|
6298
6324
|
|
|
6299
|
-
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, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, Title, TornEdgeSVGFilter, Vector4DeleteButton, Vector4Display, 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 };
|
|
6325
|
+
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, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, SegmentedControl, SegmentedProgress, SelectItem, TestBed, 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 };
|
|
6300
6326
|
//# sourceMappingURL=index.js.map
|
|
6301
6327
|
//# sourceMappingURL=index.js.map
|