dirk-cfx-react 1.1.73 → 1.1.76

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,4 +1,4 @@
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';
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, 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, 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';
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, 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
@@ -1,15 +1,16 @@
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';
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, Switch, ColorInput, Popover, 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, useCallback, useMemo, useLayoutEffect } from 'react';
4
4
  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, 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, 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';
12
12
  import { QueryClient, QueryClientProvider, useInfiniteQuery } from '@tanstack/react-query';
13
+ import { generateColors } from '@mantine/colors-generator';
13
14
  import '@mantine/core/styles.css';
14
15
  import '@mantine/notifications/styles.css';
15
16
  import './styles/fonts.css';
@@ -4826,7 +4827,22 @@ function ConfigPanelInner({
4826
4827
  if (result?.success) {
4827
4828
  const { store } = getScriptConfigInstance();
4828
4829
  form.reinitialize(cloneConfig(store.getState()));
4830
+ notifications.show({
4831
+ color: "green",
4832
+ title: locale("ConfigResetSuccessTitle"),
4833
+ message: locale("ConfigResetSuccessBody"),
4834
+ autoClose: 3e3
4835
+ });
4836
+ return;
4829
4837
  }
4838
+ const err = result?._error || "Unknown";
4839
+ console.warn(`[ConfigPanel] config reset failed: ${err}`);
4840
+ notifications.show({
4841
+ color: "red",
4842
+ title: locale("ConfigResetFailedTitle"),
4843
+ message: locale("ConfigResetFailedBody", err),
4844
+ autoClose: 6e3
4845
+ });
4830
4846
  },
4831
4847
  onClose: () => setResetOpen(false),
4832
4848
  zIndex: 300
@@ -6001,6 +6017,282 @@ function TestBed({
6001
6017
  }
6002
6018
  );
6003
6019
  }
6020
+ var MANTINE_COLOR_OPTIONS = [
6021
+ "dirk",
6022
+ "red",
6023
+ "pink",
6024
+ "grape",
6025
+ "violet",
6026
+ "indigo",
6027
+ "blue",
6028
+ "cyan",
6029
+ "teal",
6030
+ "green",
6031
+ "lime",
6032
+ "yellow",
6033
+ "orange"
6034
+ ].map((value) => ({ value, label: value }));
6035
+ var DEFAULT_PALETTE = [
6036
+ "#f0f4ff",
6037
+ "#d9e3ff",
6038
+ "#bfcfff",
6039
+ "#a6bbff",
6040
+ "#8ca7ff",
6041
+ "#7393ff",
6042
+ "#5a7fff",
6043
+ "#406bff",
6044
+ "#2547ff",
6045
+ "#0b33ff"
6046
+ ];
6047
+ var DEFAULT_VALUE = {
6048
+ useOverride: false,
6049
+ primaryColor: "dirk",
6050
+ primaryShade: 5,
6051
+ customTheme: DEFAULT_PALETTE
6052
+ };
6053
+ function GroupLabel({ label: label2 }) {
6054
+ return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", mt: "xxs", children: [
6055
+ /* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xxs", tt: "uppercase", lts: "0.07em", c: "rgba(255,255,255,0.2)", children: label2 }),
6056
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, height: "0.05vh", background: "rgba(255,255,255,0.06)" } })
6057
+ ] });
6058
+ }
6059
+ function ThemeOverrideSection({
6060
+ schemaKey = "theme",
6061
+ title
6062
+ }) {
6063
+ const mantineTheme = useMantineTheme();
6064
+ const color = mantineTheme.colors[mantineTheme.primaryColor][5];
6065
+ const raw = useFormField(schemaKey);
6066
+ const value = {
6067
+ useOverride: raw?.useOverride ?? DEFAULT_VALUE.useOverride,
6068
+ primaryColor: raw?.primaryColor ?? DEFAULT_VALUE.primaryColor,
6069
+ primaryShade: raw?.primaryShade ?? DEFAULT_VALUE.primaryShade,
6070
+ customTheme: Array.isArray(raw?.customTheme) && raw.customTheme.length === 10 ? raw.customTheme : DEFAULT_VALUE.customTheme
6071
+ };
6072
+ const { setValue } = useFormActions();
6073
+ const set = (key, val) => setValue(schemaKey, { ...value, [key]: val });
6074
+ const useCustom = value.primaryColor === "custom";
6075
+ const editable = value.useOverride;
6076
+ const setSwatch = (index, hex) => {
6077
+ const next = [...value.customTheme];
6078
+ next[index] = hex;
6079
+ set("customTheme", next);
6080
+ };
6081
+ const generateFromBase = (hex) => {
6082
+ try {
6083
+ const generated = generateColors(hex);
6084
+ set("customTheme", generated);
6085
+ } catch {
6086
+ }
6087
+ };
6088
+ const resetPalette = () => set("customTheme", DEFAULT_PALETTE);
6089
+ return /* @__PURE__ */ jsxs(
6090
+ Flex,
6091
+ {
6092
+ direction: "column",
6093
+ gap: "xs",
6094
+ p: "sm",
6095
+ style: { flex: 1, minHeight: 0, overflowY: "auto" },
6096
+ children: [
6097
+ /* @__PURE__ */ jsx(
6098
+ AdminPageTitle,
6099
+ {
6100
+ icon: Palette,
6101
+ title: title || locale("Theme") || "Theme",
6102
+ color
6103
+ }
6104
+ ),
6105
+ /* @__PURE__ */ jsxs(
6106
+ Flex,
6107
+ {
6108
+ align: "center",
6109
+ justify: "space-between",
6110
+ p: "xs",
6111
+ style: {
6112
+ background: `rgba(255,255,255,${editable ? 0.04 : 0.02})`,
6113
+ border: `0.1vh solid ${editable ? color : "rgba(255,255,255,0.08)"}`,
6114
+ borderRadius: mantineTheme.radius.xs,
6115
+ transition: "background 0.15s, border-color 0.15s"
6116
+ },
6117
+ children: [
6118
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "xxs", style: { flex: 1, minWidth: 0 }, children: [
6119
+ /* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xs", c: "rgba(255,255,255,0.9)", children: locale("OverrideGlobalTheme") || "Override global theme" }),
6120
+ /* @__PURE__ */ jsx(Text, { ff: "Akrobat Bold", size: "xxs", c: "rgba(255,255,255,0.4)", children: locale("OverrideGlobalThemeDesc") || "When on, this resource uses its own primary colour and palette instead of dirk_lib's. Turn off to fall back to the global theme \u2014 your custom palette is kept." })
6121
+ ] }),
6122
+ /* @__PURE__ */ jsx(
6123
+ Switch,
6124
+ {
6125
+ size: "md",
6126
+ checked: value.useOverride,
6127
+ onChange: (e) => set("useOverride", e.currentTarget.checked)
6128
+ }
6129
+ )
6130
+ ]
6131
+ }
6132
+ ),
6133
+ /* @__PURE__ */ jsxs(
6134
+ "div",
6135
+ {
6136
+ style: {
6137
+ opacity: editable ? 1 : 0.4,
6138
+ pointerEvents: editable ? "auto" : "none",
6139
+ transition: "opacity 0.15s"
6140
+ },
6141
+ children: [
6142
+ /* @__PURE__ */ jsx(GroupLabel, { label: locale("PrimaryColor") || "Primary Colour" }),
6143
+ /* @__PURE__ */ jsx(
6144
+ Switch,
6145
+ {
6146
+ label: locale("UseCustomPalette") || "Use custom palette",
6147
+ size: "md",
6148
+ mt: "xs",
6149
+ checked: useCustom,
6150
+ onChange: (e) => set("primaryColor", e.currentTarget.checked ? "custom" : "dirk"),
6151
+ styles: {
6152
+ label: {
6153
+ fontFamily: "Akrobat Bold",
6154
+ fontSize: "0.65em",
6155
+ letterSpacing: "0.06em",
6156
+ textTransform: "uppercase",
6157
+ color: "rgba(255,255,255,0.35)"
6158
+ }
6159
+ }
6160
+ }
6161
+ ),
6162
+ /* @__PURE__ */ jsxs(Flex, { gap: "xs", mt: "xs", children: [
6163
+ !useCustom && /* @__PURE__ */ jsx(
6164
+ Select,
6165
+ {
6166
+ label: locale("MantinePalette") || "Mantine palette",
6167
+ size: "xs",
6168
+ style: { flex: 1 },
6169
+ value: value.primaryColor,
6170
+ data: MANTINE_COLOR_OPTIONS,
6171
+ allowDeselect: false,
6172
+ onChange: (v) => v && set("primaryColor", v)
6173
+ }
6174
+ ),
6175
+ /* @__PURE__ */ jsx(
6176
+ NumberInput,
6177
+ {
6178
+ label: locale("Shade") || "Shade",
6179
+ size: "xs",
6180
+ style: { flex: 1 },
6181
+ min: 0,
6182
+ max: 9,
6183
+ value: value.primaryShade,
6184
+ onChange: (v) => set("primaryShade", Number(v))
6185
+ }
6186
+ )
6187
+ ] }),
6188
+ useCustom && /* @__PURE__ */ jsxs(Fragment, { children: [
6189
+ /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "space-between", mt: "sm", children: [
6190
+ /* @__PURE__ */ jsx(
6191
+ Text,
6192
+ {
6193
+ ff: "Akrobat Bold",
6194
+ size: "xxs",
6195
+ tt: "uppercase",
6196
+ lts: "0.07em",
6197
+ c: "rgba(255,255,255,0.2)",
6198
+ children: locale("CustomPalette") || "Custom palette"
6199
+ }
6200
+ ),
6201
+ /* @__PURE__ */ jsx(
6202
+ ActionIcon,
6203
+ {
6204
+ size: "sm",
6205
+ variant: "subtle",
6206
+ onClick: resetPalette,
6207
+ title: locale("ResetPalette") || "Reset palette",
6208
+ children: /* @__PURE__ */ jsx(RotateCcw, { size: "1.4vh" })
6209
+ }
6210
+ )
6211
+ ] }),
6212
+ /* @__PURE__ */ jsx(
6213
+ ColorInput,
6214
+ {
6215
+ label: locale("BaseColor") || "Base colour",
6216
+ size: "xs",
6217
+ value: value.customTheme[value.primaryShade] ?? value.customTheme[5] ?? "#000000",
6218
+ onChange: generateFromBase,
6219
+ eyeDropperIcon: /* @__PURE__ */ jsx(Fragment, {})
6220
+ }
6221
+ ),
6222
+ /* @__PURE__ */ jsx(Flex, { gap: "xxs", mt: "xxs", children: value.customTheme.map((swatch, i) => /* @__PURE__ */ jsx(
6223
+ SwatchTile,
6224
+ {
6225
+ index: i,
6226
+ value: swatch,
6227
+ isPrimary: i === value.primaryShade,
6228
+ onChange: (v) => setSwatch(i, v)
6229
+ },
6230
+ i
6231
+ )) })
6232
+ ] })
6233
+ ]
6234
+ }
6235
+ )
6236
+ ]
6237
+ }
6238
+ );
6239
+ }
6240
+ function SwatchTile({
6241
+ index,
6242
+ value,
6243
+ isPrimary,
6244
+ onChange
6245
+ }) {
6246
+ const [opened, setOpened] = useState(false);
6247
+ return /* @__PURE__ */ jsxs(Popover, { opened, onChange: setOpened, position: "bottom", withArrow: true, zIndex: 1e4, children: [
6248
+ /* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(
6249
+ "button",
6250
+ {
6251
+ onClick: () => setOpened((o) => !o),
6252
+ title: `${index} \xB7 ${value}`,
6253
+ style: {
6254
+ flex: 1,
6255
+ aspectRatio: "1 / 1",
6256
+ background: value,
6257
+ border: isPrimary ? "0.2vh solid rgba(255,255,255,0.85)" : "0.1vh solid rgba(255,255,255,0.15)",
6258
+ borderRadius: "0.4vh",
6259
+ cursor: "pointer",
6260
+ padding: 0,
6261
+ display: "flex",
6262
+ alignItems: "flex-end",
6263
+ justifyContent: "flex-end",
6264
+ position: "relative"
6265
+ },
6266
+ children: /* @__PURE__ */ jsx(
6267
+ "span",
6268
+ {
6269
+ style: {
6270
+ fontFamily: "Akrobat Bold",
6271
+ fontSize: "0.9vh",
6272
+ lineHeight: 1,
6273
+ padding: "0.2vh 0.3vh",
6274
+ color: "rgba(0,0,0,0.55)",
6275
+ background: "rgba(255,255,255,0.55)",
6276
+ borderRadius: "0.25vh",
6277
+ margin: "0.2vh"
6278
+ },
6279
+ children: index
6280
+ }
6281
+ )
6282
+ }
6283
+ ) }),
6284
+ /* @__PURE__ */ jsx(Popover.Dropdown, { p: "xs", children: /* @__PURE__ */ jsx(
6285
+ ColorInput,
6286
+ {
6287
+ size: "xs",
6288
+ value,
6289
+ onChange,
6290
+ format: "hex",
6291
+ eyeDropperIcon: /* @__PURE__ */ jsx(Fragment, {})
6292
+ }
6293
+ ) })
6294
+ ] });
6295
+ }
6004
6296
  function useTornEdges() {
6005
6297
  const game = useSettings((state) => state.game);
6006
6298
  return game === "rdr3" ? "torn-edge-wrapper" : "";
@@ -6282,6 +6574,12 @@ function DirkProvider({ children, overideResourceName, themeOverride }) {
6282
6574
  }, []);
6283
6575
  useNuiEvent("UPDATE_DIRK_LIB_SETTINGS", (data) => {
6284
6576
  if (!data || typeof data !== "object") return;
6577
+ const current = useSettings.getState();
6578
+ if (current.themeOverride) {
6579
+ const { primaryColor: _pc, primaryShade: _ps, customTheme: _ct, ...rest } = data;
6580
+ useSettings.setState(rest);
6581
+ return;
6582
+ }
6285
6583
  useSettings.setState(data);
6286
6584
  });
6287
6585
  const mergedTheme = useMemo(
@@ -6322,6 +6620,6 @@ var Vector4Schema = z.object({
6322
6620
  w: z.number()
6323
6621
  });
6324
6622
 
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 };
6623
+ 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, 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 };
6326
6624
  //# sourceMappingURL=index.js.map
6327
6625
  //# sourceMappingURL=index.js.map