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