dirk-cfx-react 1.0.0 → 1.0.1
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.mjs → index.cjs} +116 -96
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +94 -114
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/{index.mjs → index.cjs} +9 -7
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.js +5 -7
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +150 -114
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +4 -4
- package/dist/index.js +112 -148
- package/dist/index.js.map +1 -1
- package/dist/providers/{index.mjs → index.cjs} +25 -22
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.js +20 -23
- package/dist/providers/index.js.map +1 -1
- package/dist/utils/{index.mjs → index.cjs} +19 -5
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.js +3 -17
- package/dist/utils/index.js.map +1 -1
- package/package.json +21 -5
- package/dist/components/index.mjs.map +0 -1
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/providers/index.mjs.map +0 -1
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/components/{index.d.mts → index.d.cts} +0 -0
- /package/dist/hooks/{index.d.mts → index.d.cts} +0 -0
- /package/dist/providers/{index.d.mts → index.d.cts} +0 -0
- /package/dist/utils/{index.d.mts → index.d.cts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var freeRegularSvgIcons = require('@fortawesome/free-regular-svg-icons');
|
|
16
|
-
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
1
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
import { Flex, Text, Image, createTheme, useMantineTheme, MantineProvider, BackgroundImage } from '@mantine/core';
|
|
3
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { motion, AnimatePresence, useMotionValue } from 'framer-motion';
|
|
5
|
+
import { createContext, useRef, useState, useEffect, useContext } from 'react';
|
|
6
|
+
import { create, useStore } from 'zustand';
|
|
7
|
+
import '@mantine/notifications/styles.css';
|
|
8
|
+
import '@mantine/core/styles.css';
|
|
9
|
+
import '@/styles/niceFont.css';
|
|
10
|
+
import '@/styles/scrollBar.css';
|
|
11
|
+
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
12
|
+
import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
13
|
+
import { far } from '@fortawesome/free-regular-svg-icons';
|
|
14
|
+
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
17
15
|
|
|
18
16
|
// src/components/BorderedIcon.tsx
|
|
19
17
|
|
|
@@ -185,9 +183,9 @@ function colorWithAlpha(color, alpha) {
|
|
|
185
183
|
return color;
|
|
186
184
|
}
|
|
187
185
|
function BorderedIcon(props) {
|
|
188
|
-
const theme2 =
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
|
|
186
|
+
const theme2 = useMantineTheme();
|
|
187
|
+
return /* @__PURE__ */ jsx(
|
|
188
|
+
FontAwesomeIcon,
|
|
191
189
|
{
|
|
192
190
|
icon: props.icon,
|
|
193
191
|
color: colorWithAlpha(props.color ? props.color : theme2.colors[theme2.primaryColor][theme2.primaryShade], props.hovered ? 0.9 : 0.9),
|
|
@@ -206,12 +204,12 @@ function BorderedIcon(props) {
|
|
|
206
204
|
}
|
|
207
205
|
);
|
|
208
206
|
}
|
|
209
|
-
var MotionFlex =
|
|
210
|
-
var MotionText =
|
|
211
|
-
var MotionIcon =
|
|
212
|
-
var MotionImage =
|
|
207
|
+
var MotionFlex = motion(Flex);
|
|
208
|
+
var MotionText = motion(Text);
|
|
209
|
+
var MotionIcon = motion(FontAwesomeIcon);
|
|
210
|
+
var MotionImage = motion(Image);
|
|
213
211
|
function Counter(props) {
|
|
214
|
-
return /* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: props.count > 0 && /* @__PURE__ */ jsx(
|
|
215
213
|
MotionFlex,
|
|
216
214
|
{
|
|
217
215
|
initial: { opacity: 0 },
|
|
@@ -246,10 +244,10 @@ var FloatingParticles = ({
|
|
|
246
244
|
mouseRepelStrength = 50,
|
|
247
245
|
backgroundColor = "transparent"
|
|
248
246
|
}) => {
|
|
249
|
-
const containerRef =
|
|
250
|
-
const [particles, setParticles] =
|
|
251
|
-
const mouseX =
|
|
252
|
-
const mouseY =
|
|
247
|
+
const containerRef = useRef(null);
|
|
248
|
+
const [particles, setParticles] = useState([]);
|
|
249
|
+
const mouseX = useMotionValue(0);
|
|
250
|
+
const mouseY = useMotionValue(0);
|
|
253
251
|
const durationMap = {
|
|
254
252
|
slow: { base: 10, variance: 10 },
|
|
255
253
|
medium: { base: 2, variance: 2 },
|
|
@@ -260,7 +258,7 @@ var FloatingParticles = ({
|
|
|
260
258
|
const x = Math.sin(seed) * 1e4;
|
|
261
259
|
return x - Math.floor(x);
|
|
262
260
|
};
|
|
263
|
-
|
|
261
|
+
useEffect(() => {
|
|
264
262
|
if (!containerRef.current) return;
|
|
265
263
|
const bounds = containerRef.current.getBoundingClientRect();
|
|
266
264
|
const newParticles = [...Array(particleCount)].map((_, i) => {
|
|
@@ -281,7 +279,7 @@ var FloatingParticles = ({
|
|
|
281
279
|
});
|
|
282
280
|
setParticles(newParticles);
|
|
283
281
|
}, [particleCount, icons.length, duration.base, duration.variance]);
|
|
284
|
-
|
|
282
|
+
useEffect(() => {
|
|
285
283
|
if (!containerRef.current) return;
|
|
286
284
|
const handleMouseMove = (e) => {
|
|
287
285
|
const bounds = containerRef.current.getBoundingClientRect();
|
|
@@ -330,7 +328,7 @@ var FloatingParticles = ({
|
|
|
330
328
|
container.removeEventListener("mouseleave", handleMouseLeave);
|
|
331
329
|
};
|
|
332
330
|
}, [mouseX, mouseY, mouseRepelDistance, mouseRepelStrength]);
|
|
333
|
-
|
|
331
|
+
useEffect(() => {
|
|
334
332
|
const handleResize = () => {
|
|
335
333
|
if (!containerRef.current) return;
|
|
336
334
|
const bounds = containerRef.current.getBoundingClientRect();
|
|
@@ -353,7 +351,7 @@ var FloatingParticles = ({
|
|
|
353
351
|
window.addEventListener("resize", handleResize);
|
|
354
352
|
return () => window.removeEventListener("resize", handleResize);
|
|
355
353
|
}, []);
|
|
356
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ jsx(
|
|
357
355
|
"div",
|
|
358
356
|
{
|
|
359
357
|
ref: containerRef,
|
|
@@ -366,8 +364,8 @@ var FloatingParticles = ({
|
|
|
366
364
|
backgroundColor,
|
|
367
365
|
...style
|
|
368
366
|
},
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
|
|
367
|
+
children: /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: particles.map((particle) => /* @__PURE__ */ jsx(
|
|
368
|
+
motion.div,
|
|
371
369
|
{
|
|
372
370
|
style: {
|
|
373
371
|
position: "absolute",
|
|
@@ -407,7 +405,7 @@ var FloatingParticles = ({
|
|
|
407
405
|
ease: "easeInOut"
|
|
408
406
|
}
|
|
409
407
|
},
|
|
410
|
-
children: particle.icon ? /* @__PURE__ */
|
|
408
|
+
children: particle.icon ? /* @__PURE__ */ jsx("div", { style: { width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: particle.icon, style: { width: "70%", height: "70%" } }) }) : /* @__PURE__ */ jsx(
|
|
411
409
|
"div",
|
|
412
410
|
{
|
|
413
411
|
style: {
|
|
@@ -425,12 +423,12 @@ var FloatingParticles = ({
|
|
|
425
423
|
);
|
|
426
424
|
};
|
|
427
425
|
function Icon(props) {
|
|
428
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
429
427
|
}
|
|
430
428
|
function InfoBox(props) {
|
|
431
|
-
const theme2 =
|
|
432
|
-
return /* @__PURE__ */
|
|
433
|
-
|
|
429
|
+
const theme2 = useMantineTheme();
|
|
430
|
+
return /* @__PURE__ */ jsxs(
|
|
431
|
+
Flex,
|
|
434
432
|
{
|
|
435
433
|
w: "fit-content",
|
|
436
434
|
h: "fit-content",
|
|
@@ -441,8 +439,8 @@ function InfoBox(props) {
|
|
|
441
439
|
},
|
|
442
440
|
align: "center",
|
|
443
441
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
442
|
+
/* @__PURE__ */ jsx(
|
|
443
|
+
Flex,
|
|
446
444
|
{
|
|
447
445
|
miw: "4vh",
|
|
448
446
|
p: "xxs",
|
|
@@ -450,8 +448,8 @@ function InfoBox(props) {
|
|
|
450
448
|
direction: "column",
|
|
451
449
|
justify: "center",
|
|
452
450
|
align: "center",
|
|
453
|
-
children: /* @__PURE__ */
|
|
454
|
-
|
|
451
|
+
children: /* @__PURE__ */ jsx(
|
|
452
|
+
Text,
|
|
455
453
|
{
|
|
456
454
|
c: "lightgrey",
|
|
457
455
|
size: "xxs",
|
|
@@ -465,8 +463,8 @@ function InfoBox(props) {
|
|
|
465
463
|
)
|
|
466
464
|
}
|
|
467
465
|
),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
|
|
466
|
+
/* @__PURE__ */ jsx(
|
|
467
|
+
Flex,
|
|
470
468
|
{
|
|
471
469
|
p: "xxs",
|
|
472
470
|
flex: 1,
|
|
@@ -475,8 +473,8 @@ function InfoBox(props) {
|
|
|
475
473
|
direction: "column",
|
|
476
474
|
align: "center",
|
|
477
475
|
justify: "center",
|
|
478
|
-
children: /* @__PURE__ */
|
|
479
|
-
|
|
476
|
+
children: /* @__PURE__ */ jsx(
|
|
477
|
+
Text,
|
|
480
478
|
{
|
|
481
479
|
c: "lightgrey",
|
|
482
480
|
size: "xxs",
|
|
@@ -495,8 +493,8 @@ function InfoBox(props) {
|
|
|
495
493
|
);
|
|
496
494
|
}
|
|
497
495
|
function InputContainer(props) {
|
|
498
|
-
const theme2 =
|
|
499
|
-
return /* @__PURE__ */
|
|
496
|
+
const theme2 = useMantineTheme();
|
|
497
|
+
return /* @__PURE__ */ jsxs(
|
|
500
498
|
MotionFlex,
|
|
501
499
|
{
|
|
502
500
|
w: props.w || "100%",
|
|
@@ -514,20 +512,20 @@ function InputContainer(props) {
|
|
|
514
512
|
},
|
|
515
513
|
variants: props.variants,
|
|
516
514
|
children: [
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
|
|
515
|
+
/* @__PURE__ */ jsxs(
|
|
516
|
+
Flex,
|
|
519
517
|
{
|
|
520
518
|
align: "center",
|
|
521
519
|
gap: "xs",
|
|
522
520
|
children: [
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
-
|
|
521
|
+
/* @__PURE__ */ jsxs(
|
|
522
|
+
Flex,
|
|
525
523
|
{
|
|
526
524
|
direction: "column",
|
|
527
525
|
gap: "xxs",
|
|
528
526
|
children: [
|
|
529
|
-
props.title && /* @__PURE__ */
|
|
530
|
-
|
|
527
|
+
props.title && /* @__PURE__ */ jsx(
|
|
528
|
+
Text,
|
|
531
529
|
{
|
|
532
530
|
size: "sm",
|
|
533
531
|
style: {
|
|
@@ -539,8 +537,8 @@ function InputContainer(props) {
|
|
|
539
537
|
children: props.title
|
|
540
538
|
}
|
|
541
539
|
),
|
|
542
|
-
props.description && /* @__PURE__ */
|
|
543
|
-
|
|
540
|
+
props.description && /* @__PURE__ */ jsx(
|
|
541
|
+
Text,
|
|
544
542
|
{
|
|
545
543
|
size: "xs",
|
|
546
544
|
c: "rgba(255, 255, 255, 0.8)",
|
|
@@ -551,8 +549,8 @@ function InputContainer(props) {
|
|
|
551
549
|
]
|
|
552
550
|
}
|
|
553
551
|
),
|
|
554
|
-
props.error && /* @__PURE__ */
|
|
555
|
-
|
|
552
|
+
props.error && /* @__PURE__ */ jsx(
|
|
553
|
+
Text,
|
|
556
554
|
{
|
|
557
555
|
size: "xs",
|
|
558
556
|
c: theme2.colors.red[9],
|
|
@@ -562,8 +560,8 @@ function InputContainer(props) {
|
|
|
562
560
|
children: props.error
|
|
563
561
|
}
|
|
564
562
|
),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
|
|
563
|
+
/* @__PURE__ */ jsx(
|
|
564
|
+
Flex,
|
|
567
565
|
{
|
|
568
566
|
ml: "auto",
|
|
569
567
|
children: props.rightSection
|
|
@@ -585,7 +583,7 @@ var click_sound_default = "./click_sound-PNCRRTM4.mp3";
|
|
|
585
583
|
var hover_sound_default = "./hover_sound-NBUA222C.mp3";
|
|
586
584
|
|
|
587
585
|
// src/hooks/useAudio/store.ts
|
|
588
|
-
var useAudio =
|
|
586
|
+
var useAudio = create(() => {
|
|
589
587
|
const audioRefs = {};
|
|
590
588
|
const sounds = {
|
|
591
589
|
click: click_sound_default,
|
|
@@ -687,7 +685,7 @@ var internalEvent = (events, timer = 1e3) => {
|
|
|
687
685
|
}
|
|
688
686
|
}
|
|
689
687
|
};
|
|
690
|
-
var localeStore =
|
|
688
|
+
var localeStore = create((set, get) => {
|
|
691
689
|
return {
|
|
692
690
|
locales: {
|
|
693
691
|
"OccupantsDesc": "Here you can view and manage the occupants of your traphouse. These occupants can be used mainly for selling drugs to the NPCs surrounding your traphouse. However they have other uses to so be careful who you add as an occupant."
|
|
@@ -707,7 +705,7 @@ fetchOnLoad("GET_LOCALES").then((data) => {
|
|
|
707
705
|
localeStore.setState({ locales: data });
|
|
708
706
|
});
|
|
709
707
|
function SegmentedControl(props) {
|
|
710
|
-
const theme2 =
|
|
708
|
+
const theme2 = useMantineTheme();
|
|
711
709
|
const play = useAudio((state) => state.play);
|
|
712
710
|
const handleChange = (newValue) => {
|
|
713
711
|
if (props.sounds) play("click");
|
|
@@ -715,8 +713,8 @@ function SegmentedControl(props) {
|
|
|
715
713
|
props.onChange(newValue);
|
|
716
714
|
}
|
|
717
715
|
};
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
|
|
716
|
+
return /* @__PURE__ */ jsx(
|
|
717
|
+
Flex,
|
|
720
718
|
{
|
|
721
719
|
bg: "rgba(33, 33, 33, 0.6)",
|
|
722
720
|
w: props.w || "fit-content",
|
|
@@ -725,8 +723,8 @@ function SegmentedControl(props) {
|
|
|
725
723
|
overflow: "hidden"
|
|
726
724
|
},
|
|
727
725
|
...props,
|
|
728
|
-
children: props.items.map((item, index) => /* @__PURE__ */
|
|
729
|
-
|
|
726
|
+
children: props.items.map((item, index) => /* @__PURE__ */ jsx(
|
|
727
|
+
motion.div,
|
|
730
728
|
{
|
|
731
729
|
initial: { x: -100, opacity: 0 },
|
|
732
730
|
animate: { x: 0, opacity: 1 },
|
|
@@ -737,7 +735,7 @@ function SegmentedControl(props) {
|
|
|
737
735
|
alignItems: "center",
|
|
738
736
|
flex: 1
|
|
739
737
|
},
|
|
740
|
-
children: /* @__PURE__ */
|
|
738
|
+
children: /* @__PURE__ */ jsx(
|
|
741
739
|
Segment,
|
|
742
740
|
{
|
|
743
741
|
label: item.label,
|
|
@@ -764,8 +762,8 @@ function SegmentedControl(props) {
|
|
|
764
762
|
);
|
|
765
763
|
}
|
|
766
764
|
function Segment(props) {
|
|
767
|
-
const theme2 =
|
|
768
|
-
return /* @__PURE__ */
|
|
765
|
+
const theme2 = useMantineTheme();
|
|
766
|
+
return /* @__PURE__ */ jsxs(
|
|
769
767
|
MotionFlex,
|
|
770
768
|
{
|
|
771
769
|
onClick: props.onClick,
|
|
@@ -783,14 +781,14 @@ function Segment(props) {
|
|
|
783
781
|
whileHover: { scale: 1.05 },
|
|
784
782
|
whileTap: { scale: 0.95 },
|
|
785
783
|
children: [
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
|
|
784
|
+
/* @__PURE__ */ jsxs(
|
|
785
|
+
Flex,
|
|
788
786
|
{
|
|
789
787
|
align: "center",
|
|
790
788
|
gap: "xs",
|
|
791
789
|
p: "xs",
|
|
792
790
|
children: [
|
|
793
|
-
props.icon && /* @__PURE__ */
|
|
791
|
+
props.icon && /* @__PURE__ */ jsx(
|
|
794
792
|
MotionIcon,
|
|
795
793
|
{
|
|
796
794
|
icon: props.icon,
|
|
@@ -809,7 +807,7 @@ function Segment(props) {
|
|
|
809
807
|
}
|
|
810
808
|
}
|
|
811
809
|
),
|
|
812
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ jsx(
|
|
813
811
|
MotionText,
|
|
814
812
|
{
|
|
815
813
|
size: props.fz || "xs",
|
|
@@ -834,8 +832,8 @@ function Segment(props) {
|
|
|
834
832
|
]
|
|
835
833
|
}
|
|
836
834
|
),
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
|
|
835
|
+
/* @__PURE__ */ jsx(
|
|
836
|
+
motion.div,
|
|
839
837
|
{
|
|
840
838
|
initial: false,
|
|
841
839
|
animate: {
|
|
@@ -862,33 +860,33 @@ function Segment(props) {
|
|
|
862
860
|
}
|
|
863
861
|
);
|
|
864
862
|
}
|
|
865
|
-
var NavigationContext =
|
|
863
|
+
var NavigationContext = createContext(null);
|
|
866
864
|
function useNavigation(selector) {
|
|
867
|
-
const navigation =
|
|
865
|
+
const navigation = useContext(NavigationContext);
|
|
868
866
|
if (!navigation) {
|
|
869
867
|
throw new Error("useNavigation must be used within a NavigationProvider");
|
|
870
868
|
}
|
|
871
|
-
return
|
|
869
|
+
return useStore(navigation, selector);
|
|
872
870
|
}
|
|
873
871
|
function useNavigationStore() {
|
|
874
|
-
const navigation =
|
|
872
|
+
const navigation = useContext(NavigationContext);
|
|
875
873
|
if (!navigation) {
|
|
876
874
|
throw new Error("useNavigationStore must be used within a NavigationProvider");
|
|
877
875
|
}
|
|
878
876
|
return navigation;
|
|
879
877
|
}
|
|
880
878
|
function NavigationProvider({ children, defaultPage }) {
|
|
881
|
-
const storeRef =
|
|
882
|
-
|
|
879
|
+
const storeRef = useRef(
|
|
880
|
+
create(() => ({
|
|
883
881
|
pageId: defaultPage || "home"
|
|
884
882
|
}))
|
|
885
883
|
);
|
|
886
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ jsx(NavigationContext.Provider, { value: storeRef.current, children });
|
|
887
885
|
}
|
|
888
886
|
function NavBar(props) {
|
|
889
887
|
const pageId = useNavigation((state) => state.pageId);
|
|
890
888
|
const store = useNavigationStore();
|
|
891
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsx(
|
|
892
890
|
SegmentedControl,
|
|
893
891
|
{
|
|
894
892
|
sounds: true,
|
|
@@ -947,7 +945,7 @@ function SegmentedProgress(props) {
|
|
|
947
945
|
const progressPerSegment = 100 / props.segments;
|
|
948
946
|
const filledSegments = Math.floor(props.progress / progressPerSegment);
|
|
949
947
|
const partialFill = props.progress % progressPerSegment / progressPerSegment;
|
|
950
|
-
return /* @__PURE__ */
|
|
948
|
+
return /* @__PURE__ */ jsx(
|
|
951
949
|
MotionFlex,
|
|
952
950
|
{
|
|
953
951
|
w: "100%",
|
|
@@ -959,8 +957,8 @@ function SegmentedProgress(props) {
|
|
|
959
957
|
children: [...Array(props.segments)].map((_, index) => {
|
|
960
958
|
const isFilled = index < filledSegments;
|
|
961
959
|
const isPartial = index === filledSegments;
|
|
962
|
-
return /* @__PURE__ */
|
|
963
|
-
|
|
960
|
+
return /* @__PURE__ */ jsx(
|
|
961
|
+
motion.div,
|
|
964
962
|
{
|
|
965
963
|
variants: itemVariants,
|
|
966
964
|
style: {
|
|
@@ -978,9 +976,9 @@ function SegmentedProgress(props) {
|
|
|
978
976
|
);
|
|
979
977
|
}
|
|
980
978
|
function Title(props) {
|
|
981
|
-
const theme2 =
|
|
982
|
-
return /* @__PURE__ */
|
|
983
|
-
|
|
979
|
+
const theme2 = useMantineTheme();
|
|
980
|
+
return /* @__PURE__ */ jsx(
|
|
981
|
+
Flex,
|
|
984
982
|
{
|
|
985
983
|
mt: props.mt,
|
|
986
984
|
direction: "column",
|
|
@@ -992,20 +990,20 @@ function Title(props) {
|
|
|
992
990
|
userSelect: "none",
|
|
993
991
|
borderBottom: props.removeBorder ? "none" : `0.2vh solid ${props.borderColor || colorWithAlpha(theme2.colors[theme2.primaryColor][9], 0.5)}`
|
|
994
992
|
},
|
|
995
|
-
children: /* @__PURE__ */
|
|
996
|
-
|
|
993
|
+
children: /* @__PURE__ */ jsxs(
|
|
994
|
+
Flex,
|
|
997
995
|
{
|
|
998
996
|
align: "center",
|
|
999
997
|
justify: "center",
|
|
1000
998
|
children: [
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
|
|
999
|
+
/* @__PURE__ */ jsxs(
|
|
1000
|
+
Flex,
|
|
1003
1001
|
{
|
|
1004
1002
|
align: "center",
|
|
1005
1003
|
gap: "sm",
|
|
1006
1004
|
pr: "xs",
|
|
1007
1005
|
children: [
|
|
1008
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ jsx(
|
|
1009
1007
|
BorderedIcon,
|
|
1010
1008
|
{
|
|
1011
1009
|
icon: props.icon,
|
|
@@ -1013,20 +1011,20 @@ function Title(props) {
|
|
|
1013
1011
|
color: props.iconColor
|
|
1014
1012
|
}
|
|
1015
1013
|
),
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
|
|
1014
|
+
/* @__PURE__ */ jsxs(
|
|
1015
|
+
Flex,
|
|
1018
1016
|
{
|
|
1019
1017
|
direction: "column",
|
|
1020
1018
|
gap: "0.25vh",
|
|
1021
1019
|
children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsx(Text, { p: "0", size: "sm", style: {
|
|
1023
1021
|
lineHeight: theme2.fontSizes.md,
|
|
1024
1022
|
fontFamily: "Akrobat Bold",
|
|
1025
1023
|
letterSpacing: "0.05em",
|
|
1026
1024
|
textTransform: "uppercase"
|
|
1027
1025
|
}, children: props.title }),
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
|
|
1026
|
+
/* @__PURE__ */ jsx(
|
|
1027
|
+
Text,
|
|
1030
1028
|
{
|
|
1031
1029
|
size: "xs",
|
|
1032
1030
|
c: "grey",
|
|
@@ -1040,8 +1038,8 @@ function Title(props) {
|
|
|
1040
1038
|
]
|
|
1041
1039
|
}
|
|
1042
1040
|
),
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
|
|
1041
|
+
/* @__PURE__ */ jsx(
|
|
1042
|
+
Flex,
|
|
1045
1043
|
{
|
|
1046
1044
|
ml: "auto",
|
|
1047
1045
|
align: "center",
|
|
@@ -1056,11 +1054,11 @@ function Title(props) {
|
|
|
1056
1054
|
);
|
|
1057
1055
|
}
|
|
1058
1056
|
var useNuiEvent = (action, handler) => {
|
|
1059
|
-
const savedHandler =
|
|
1060
|
-
|
|
1057
|
+
const savedHandler = useRef(noop);
|
|
1058
|
+
useEffect(() => {
|
|
1061
1059
|
savedHandler.current = handler;
|
|
1062
1060
|
}, [handler]);
|
|
1063
|
-
|
|
1061
|
+
useEffect(() => {
|
|
1064
1062
|
const eventListener = (event) => {
|
|
1065
1063
|
const { action: eventAction, data } = event.data;
|
|
1066
1064
|
if (savedHandler.current) {
|
|
@@ -1073,7 +1071,7 @@ var useNuiEvent = (action, handler) => {
|
|
|
1073
1071
|
return () => window.removeEventListener("message", eventListener);
|
|
1074
1072
|
}, [action]);
|
|
1075
1073
|
};
|
|
1076
|
-
var theme =
|
|
1074
|
+
var theme = createTheme({
|
|
1077
1075
|
primaryColor: "dirk",
|
|
1078
1076
|
primaryShade: 9,
|
|
1079
1077
|
defaultRadius: "xxs",
|
|
@@ -1190,8 +1188,8 @@ var theme = core.createTheme({
|
|
|
1190
1188
|
}
|
|
1191
1189
|
});
|
|
1192
1190
|
var theme_default = theme;
|
|
1193
|
-
|
|
1194
|
-
var useSettings =
|
|
1191
|
+
library.add(fas, far, fab);
|
|
1192
|
+
var useSettings = create((set) => ({
|
|
1195
1193
|
game: "rdr3",
|
|
1196
1194
|
primaryColor: "teal",
|
|
1197
1195
|
primaryShade: 6,
|
|
@@ -1201,12 +1199,12 @@ function DirkProvider(props) {
|
|
|
1201
1199
|
useSettings((data) => data.primaryColor);
|
|
1202
1200
|
useSettings((data) => data.primaryShade);
|
|
1203
1201
|
useSettings((data) => data.customTheme);
|
|
1204
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ jsx(MantineProvider, { theme: theme_default, defaultColorScheme: "dark", children: /* @__PURE__ */ jsx(Wrapper, { children: props.children }) });
|
|
1205
1203
|
}
|
|
1206
1204
|
function Wrapper({ children }) {
|
|
1207
1205
|
const game = useSettings((data) => data.game);
|
|
1208
|
-
return isEnvBrowser() ? /* @__PURE__ */
|
|
1209
|
-
|
|
1206
|
+
return isEnvBrowser() ? /* @__PURE__ */ jsx(
|
|
1207
|
+
BackgroundImage,
|
|
1210
1208
|
{
|
|
1211
1209
|
w: "100vw",
|
|
1212
1210
|
h: "100vh",
|
|
@@ -1214,43 +1212,9 @@ function Wrapper({ children }) {
|
|
|
1214
1212
|
src: game === "fivem" ? "https://i.ytimg.com/vi/TOxuNbXrO28/maxresdefault.jpg" : "https://raw.githubusercontent.com/Jump-On-Studios/RedM-jo_libs/refs/heads/main/source-repositories/Menu/public/assets/images/background_dev.jpg",
|
|
1215
1213
|
children
|
|
1216
1214
|
}
|
|
1217
|
-
) : /* @__PURE__ */
|
|
1215
|
+
) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
1218
1216
|
}
|
|
1219
1217
|
|
|
1220
|
-
|
|
1221
|
-
exports.Counter = Counter;
|
|
1222
|
-
exports.DirkProvider = DirkProvider;
|
|
1223
|
-
exports.FloatingParticles = FloatingParticles;
|
|
1224
|
-
exports.Icon = Icon;
|
|
1225
|
-
exports.InfoBox = InfoBox;
|
|
1226
|
-
exports.InputContainer = InputContainer;
|
|
1227
|
-
exports.MotionFlex = MotionFlex;
|
|
1228
|
-
exports.MotionIcon = MotionIcon;
|
|
1229
|
-
exports.MotionImage = MotionImage;
|
|
1230
|
-
exports.MotionText = MotionText;
|
|
1231
|
-
exports.NavBar = NavBar;
|
|
1232
|
-
exports.NavigationContext = NavigationContext;
|
|
1233
|
-
exports.NavigationProvider = NavigationProvider;
|
|
1234
|
-
exports.Segment = Segment;
|
|
1235
|
-
exports.SegmentedControl = SegmentedControl;
|
|
1236
|
-
exports.SegmentedProgress = SegmentedProgress;
|
|
1237
|
-
exports.Title = Title;
|
|
1238
|
-
exports.colorWithAlpha = colorWithAlpha;
|
|
1239
|
-
exports.copyToClipboard = copyToClipboard;
|
|
1240
|
-
exports.fetchLuaTable = fetchLuaTable;
|
|
1241
|
-
exports.fetchNui = fetchNui;
|
|
1242
|
-
exports.fetchOnLoad = fetchOnLoad;
|
|
1243
|
-
exports.internalEvent = internalEvent;
|
|
1244
|
-
exports.isEnvBrowser = isEnvBrowser;
|
|
1245
|
-
exports.locale = locale;
|
|
1246
|
-
exports.localeStore = localeStore;
|
|
1247
|
-
exports.noop = noop;
|
|
1248
|
-
exports.numberToRoman = numberToRoman;
|
|
1249
|
-
exports.openLink = openLink;
|
|
1250
|
-
exports.splitFAString = splitFAString;
|
|
1251
|
-
exports.useNavigation = useNavigation;
|
|
1252
|
-
exports.useNavigationStore = useNavigationStore;
|
|
1253
|
-
exports.useNuiEvent = useNuiEvent;
|
|
1254
|
-
exports.useSettings = useSettings;
|
|
1218
|
+
export { BorderedIcon, Counter, DirkProvider, FloatingParticles, Icon, InfoBox, InputContainer, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, Segment, SegmentedControl, SegmentedProgress, Title, colorWithAlpha, copyToClipboard, fetchLuaTable, fetchNui, fetchOnLoad, internalEvent, isEnvBrowser, locale, localeStore, noop, numberToRoman, openLink, splitFAString, useNavigation, useNavigationStore, useNuiEvent, useSettings };
|
|
1255
1219
|
//# sourceMappingURL=index.js.map
|
|
1256
1220
|
//# sourceMappingURL=index.js.map
|