@articles-media/articles-dev-box 1.3.9 → 1.4.0
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/GamesDropdown-0vWEovcq.js +211 -0
- package/dist/GlobalClientModals.js +1 -1
- package/dist/ReturnToLauncherButton.js +19 -15
- package/dist/{SessionButton-DsXEzmff.js → SessionButton-D0EcgEPz.js} +1 -1
- package/dist/SessionButton.js +1 -1
- package/dist/{SettingsModal-Bs-HN9bH.js → SettingsModal-B7qntfk6.js} +1 -1
- package/dist/SettingsModal.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- /package/dist/{StatusModal-DrPXOA_k.js → StatusModal-DPkSqpaC.js} +0 -0
- /package/dist/{Textfit-XtAzfT0P.js → Textfit-BzE4CQik.js} +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Dropdown } from "react-bootstrap";
|
|
4
|
+
//#region src/constants/articlesGames.js
|
|
5
|
+
var articlesGames = [
|
|
6
|
+
{
|
|
7
|
+
"link": "https://four-frogs.articles.media",
|
|
8
|
+
"name": "Four Frogs",
|
|
9
|
+
"image": "https://cdn.articles.media/games/Four%20Frogs/thumbnail.webp"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"link": "https://race-game.articles.media",
|
|
13
|
+
"name": "Race Game",
|
|
14
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/race-game/refs/heads/main/public/img/preview.webp"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"link": "https://battle-trap.articles.media",
|
|
18
|
+
"name": "Battle Trap",
|
|
19
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/battle-trap/refs/heads/main/public/img/game-preview.webp"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"link": "https://plinko.articles.media",
|
|
23
|
+
"name": "Plinko",
|
|
24
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/plinko/refs/heads/main/public/img/background.webp"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"link": "https://blackjack.articles.media",
|
|
28
|
+
"name": "Blackjack",
|
|
29
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/blackjack/refs/heads/main/public/img/game-preview.webp"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"link": "https://eager-eagle.articles.media",
|
|
33
|
+
"name": "Eager Eagle",
|
|
34
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/eager-eagle/refs/heads/main/public/img/preview.webp"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"link": "https://assets-gallery.articles.media",
|
|
38
|
+
"name": "Assets Gallery",
|
|
39
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/assets-gallery/main/public/img/game-preview.gif"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"link": "https://glass-ceiling.articles.media",
|
|
43
|
+
"name": "Glass Ceiling",
|
|
44
|
+
"image": "https://cdn.articles.media/games/Glass Ceiling/preview.webp"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"link": "https://usa-tycoon.articles.media",
|
|
48
|
+
"name": "USA Tycoon",
|
|
49
|
+
"image": "https://cdn.articles.media/games/USA Tycoon/preview.webp"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"link": "https://carousel-of-progress.articles.media",
|
|
53
|
+
"name": "Carousel of Progress",
|
|
54
|
+
"image": "https://cdn.articles.media/games/Carousel of Progress/thumbnail.jpg"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"link": "https://pinball.articles.media",
|
|
58
|
+
"name": "Pinball",
|
|
59
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/pinball/main/public/img/game-preview.gif"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"link": "https://ocean-rings.articles.media",
|
|
63
|
+
"name": "Ocean Rings",
|
|
64
|
+
"image": "https://cdn.articles.media/games/Ocean Rings/video-preview.gif"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"link": "https://school-run.articles.media",
|
|
68
|
+
"name": "School Run",
|
|
69
|
+
"image": "https://cdn.articles.media/games/School Run/preview.webp"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"link": "https://move-match.articles.media",
|
|
73
|
+
"name": "Move Match",
|
|
74
|
+
"image": "https://cdn.articles.media/games/Move Match/move-match-thumbnail.jpg"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"link": "https://cannon.articles.media",
|
|
78
|
+
"name": "Cannon",
|
|
79
|
+
"image": "https://cdn.articles.media/games/Cannon/cannon-thumbnail.jpg"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"link": "https://death-race.articles.media",
|
|
83
|
+
"name": "Death Race",
|
|
84
|
+
"image": "https://cdn.articles.media/games/Death Race/death-race-thumbnail.jpg"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"link": "https://tag.articles.media",
|
|
88
|
+
"name": "Tag",
|
|
89
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/tag/refs/heads/main/public/img/preview.webp"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"link": "https://ice-slide.articles.media",
|
|
93
|
+
"name": "Ice Slide",
|
|
94
|
+
"image": "https://cdn.articles.media/games/Ice Slide/ice-slide-thumbnail.jpg"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"link": "https://8-ball-pool.articles.media",
|
|
98
|
+
"name": "8 Ball Pool",
|
|
99
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/8-ball-pool/refs/heads/main/public/img/game-preview.webp"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"link": "https://parkour.articles.media",
|
|
103
|
+
"name": "Parkour",
|
|
104
|
+
"image": "https://cdn.articles.media/games/Parkour/parkour-thumbnail.png"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"link": "https://tug-of-war.articles.media",
|
|
108
|
+
"name": "Tug of War",
|
|
109
|
+
"image": "https://cdn.articles.media/games/Tug of War/tug-of-war-thumbnail.png"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"link": "https://platformer-escape.articles.media",
|
|
113
|
+
"name": "Platformer Escape",
|
|
114
|
+
"image": "https://cdn.articles.media/games/Platformer Escape/preview.webp"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"link": "https://jungle-vines.articles.media",
|
|
118
|
+
"name": "Jungle Vines",
|
|
119
|
+
"image": "https://cdn.articles.media/games/Jungle Vines/preview.webp"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"link": "https://treasure-dive.articles.media",
|
|
123
|
+
"name": "Treasure Dive",
|
|
124
|
+
"image": "https://cdn.articles.media/games/Treasure Dive/treasure-dive-thumbnail.png"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"link": "https://memory-game.articles.media",
|
|
128
|
+
"name": "Memory Game",
|
|
129
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/memory-game/refs/heads/main/public/img/preview.webp"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"link": "https://catching-game.articles.media",
|
|
133
|
+
"name": "Catching Game",
|
|
134
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/catching-game/refs/heads/main/public/img/preview.webp"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"link": "https://stop-the-thieves.articles.media",
|
|
138
|
+
"name": "Stop the Thieves",
|
|
139
|
+
"image": "https://cdn.articles.media/games/Stop the Thiefs/preview.webp"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"link": "https://assassin.articles.media",
|
|
143
|
+
"name": "Assassin",
|
|
144
|
+
"image": "https://cdn.articles.media/games/Assassin/assassin-thumbnail.webp"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"link": "https://trash-chute.articles.media",
|
|
148
|
+
"name": "Trash Chute",
|
|
149
|
+
"image": "https://cdn.articles.media/games/Trash Chute/trash-chute-preview.webp"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"link": "https://spleef.articles.media",
|
|
153
|
+
"name": "Spleef",
|
|
154
|
+
"image": "https://raw.githubusercontent.com/Articles-Joey/spleef/refs/heads/main/public/img/background.webp"
|
|
155
|
+
}
|
|
156
|
+
];
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/Games/GamesDropdown.jsx
|
|
159
|
+
function GamesDropdown({}) {
|
|
160
|
+
const [gameSearch, setGameSearch] = useState("");
|
|
161
|
+
return /* @__PURE__ */ jsxs(Dropdown, {
|
|
162
|
+
drop: "up",
|
|
163
|
+
children: [/* @__PURE__ */ jsx(Dropdown.Toggle, {
|
|
164
|
+
variant: "articles",
|
|
165
|
+
size: "sm",
|
|
166
|
+
id: "dropdown-basic",
|
|
167
|
+
children: /* @__PURE__ */ jsx("i", { className: "fad fa-joystick" })
|
|
168
|
+
}), /* @__PURE__ */ jsxs(Dropdown.Menu, { children: [/* @__PURE__ */ jsxs("div", {
|
|
169
|
+
className: "px-2 mb-2 d-flex align-items-center",
|
|
170
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
171
|
+
type: "text",
|
|
172
|
+
placeholder: "Search Games",
|
|
173
|
+
className: "form-control form-control-sm",
|
|
174
|
+
value: gameSearch,
|
|
175
|
+
onChange: (e) => {
|
|
176
|
+
setGameSearch(e.target.value);
|
|
177
|
+
}
|
|
178
|
+
}), gameSearch && /* @__PURE__ */ jsx("i", {
|
|
179
|
+
className: "fad fa-times-circle ms-2",
|
|
180
|
+
style: { cursor: "pointer" },
|
|
181
|
+
onClick: () => setGameSearch("")
|
|
182
|
+
})]
|
|
183
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
184
|
+
style: {
|
|
185
|
+
maxHeight: "200px",
|
|
186
|
+
overflowY: "auto"
|
|
187
|
+
},
|
|
188
|
+
children: articlesGames.filter((game) => game.name.toLowerCase().includes(gameSearch.toLowerCase())).length > 0 ? articlesGames.filter((game) => game.name.toLowerCase().includes(gameSearch.toLowerCase())).map((game, index) => /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
189
|
+
rel: "noopener noreferrer",
|
|
190
|
+
href: `${game.link}?utm_source=${window.location.hostname}&utm_medium=GamesDropdown`,
|
|
191
|
+
className: "d-flex align-items-center",
|
|
192
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
193
|
+
src: game.image,
|
|
194
|
+
alt: game.name,
|
|
195
|
+
loading: "lazy",
|
|
196
|
+
style: {
|
|
197
|
+
width: "30px",
|
|
198
|
+
height: "30px",
|
|
199
|
+
objectFit: "cover",
|
|
200
|
+
marginRight: "10px"
|
|
201
|
+
}
|
|
202
|
+
}), game.name]
|
|
203
|
+
}, index)) : /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className: "px-3 py-1 small text-center text-muted",
|
|
205
|
+
children: "No results found"
|
|
206
|
+
})
|
|
207
|
+
})] })]
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
export { GamesDropdown as default };
|
|
@@ -63,7 +63,7 @@ var CreditsModal = lazy(() => import("./CreditsModal.js"));
|
|
|
63
63
|
var FriendsList = lazy(() => import("./FriendsList.js"));
|
|
64
64
|
var SettingsModal = lazy(() => import("./SettingsModal.js"));
|
|
65
65
|
var InviteModal = lazy(() => import("./InviteModal.js"));
|
|
66
|
-
var StatusModal = lazy(() => import("./StatusModal-
|
|
66
|
+
var StatusModal = lazy(() => import("./StatusModal-DPkSqpaC.js"));
|
|
67
67
|
function GlobalClientModals({ useStore, useAudioStore, useTouchControlsStore, useSocketStore, packageInfo, settingsModalConfig, infoModalConfig }) {
|
|
68
68
|
const showInfoModal = useStore((state) => state.showInfoModal);
|
|
69
69
|
const setShowInfoModal = useStore((state) => state.setShowInfoModal);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as ArticlesButton } from "./Button-DvEZjsVV.js";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
3
|
+
import { lazy, useEffect, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Games/ReturnToLauncherButton.jsx
|
|
6
|
-
|
|
6
|
+
var GamesDropdown = lazy(() => import("./GamesDropdown-0vWEovcq.js"));
|
|
7
|
+
function ReturnToLauncherButton({ className, id, hideGamesDropdown = false }) {
|
|
7
8
|
const [isMounted, setIsMounted] = useState(false);
|
|
8
9
|
useEffect(() => {
|
|
9
10
|
setIsMounted(true);
|
|
@@ -12,18 +13,21 @@ function ReturnToLauncherButton({ className, id }) {
|
|
|
12
13
|
const urlParams = new URL(window.location.href).searchParams;
|
|
13
14
|
let { launcher_mode } = Object.fromEntries(urlParams);
|
|
14
15
|
launcher_mode = launcher_mode === "1" ? true : false;
|
|
15
|
-
if (!launcher_mode) return /* @__PURE__ */ jsxs(
|
|
16
|
-
className:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
if (!launcher_mode) return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "d-flex",
|
|
18
|
+
children: [/* @__PURE__ */ jsxs(ArticlesButton, {
|
|
19
|
+
className: `${className} w-100`,
|
|
20
|
+
small: true,
|
|
21
|
+
id,
|
|
22
|
+
style: {
|
|
23
|
+
zIndex: 10,
|
|
24
|
+
position: "relative"
|
|
25
|
+
},
|
|
26
|
+
onClick: () => {
|
|
27
|
+
window.location.href = `https://games.articles.media?utm_source=${window.location.hostname}&utm_medium=GamesDropdown`;
|
|
28
|
+
},
|
|
29
|
+
children: [/* @__PURE__ */ jsx("i", { className: "fad fa-gamepad" }), "View our other games"]
|
|
30
|
+
}), !hideGamesDropdown && /* @__PURE__ */ jsx(GamesDropdown, {})]
|
|
27
31
|
});
|
|
28
32
|
return /* @__PURE__ */ jsxs(ArticlesButton, {
|
|
29
33
|
className: `${className} w-100`,
|
|
@@ -34,7 +38,7 @@ function ReturnToLauncherButton({ className, id }) {
|
|
|
34
38
|
position: "relative"
|
|
35
39
|
},
|
|
36
40
|
onClick: () => {
|
|
37
|
-
window.location.href = `https://games.articles.media`;
|
|
41
|
+
window.location.href = `https://games.articles.media?utm_source=${window.location.hostname}&utm_medium=GamesDropdown`;
|
|
38
42
|
},
|
|
39
43
|
children: [/* @__PURE__ */ jsx("i", { className: "fad fa-gamepad" }), "Return to Games"]
|
|
40
44
|
});
|
|
@@ -40,7 +40,7 @@ function SignOutModal({ show, setShow, action }) {
|
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/components/User/SessionButton.jsx
|
|
43
|
-
var Textfit = lazy(() => import("./Textfit-
|
|
43
|
+
var Textfit = lazy(() => import("./Textfit-BzE4CQik.js").then((module) => ({ default: module.Textfit })));
|
|
44
44
|
function SessionButton({ port, friendsButton, enableTextfit = false, size = "sm" }) {
|
|
45
45
|
const { data: userToken, error: userTokenError, isLoading: userTokenLoading, mutate: userTokenMutate } = useUserToken(port);
|
|
46
46
|
const { data: userDetails, error: userDetailsError, isLoading: userDetailsLoading, mutate: userDetailsMutate } = useUserDetails({ token: userToken });
|
package/dist/SessionButton.js
CHANGED
|
@@ -3,5 +3,5 @@ import "./SignInButton.js";
|
|
|
3
3
|
import "./useUserDetails.js";
|
|
4
4
|
import "./useUserToken.js";
|
|
5
5
|
import "./FriendsList.js";
|
|
6
|
-
import { t as SessionButton } from "./SessionButton-
|
|
6
|
+
import { t as SessionButton } from "./SessionButton-D0EcgEPz.js";
|
|
7
7
|
export { SessionButton as default };
|
|
@@ -246,7 +246,7 @@ function OtherTab({ useStore, config }) {
|
|
|
246
246
|
var package_default = {
|
|
247
247
|
name: "@articles-media/articles-dev-box",
|
|
248
248
|
description: "Shared code, functions, and components for different Articles Media projects.",
|
|
249
|
-
version: "1.
|
|
249
|
+
version: "1.4.0",
|
|
250
250
|
type: "module",
|
|
251
251
|
sideEffects: false,
|
|
252
252
|
imports: { "#root/src/*": "./src/*" },
|
package/dist/SettingsModal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
1
|
+
import { t as SettingsModal } from "./SettingsModal-B7qntfk6.js";
|
|
2
2
|
export { SettingsModal as default };
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { t as ViewUserModal } from "./ViewUserModal-Dgo1C4sR.js";
|
|
|
6
6
|
import { t as Ad_default } from "./Ad-bic8syS1.js";
|
|
7
7
|
import useUserFriends from "./useUserFriends.js";
|
|
8
8
|
import FriendsList from "./FriendsList.js";
|
|
9
|
-
import { t as SessionButton } from "./SessionButton-
|
|
9
|
+
import { t as SessionButton } from "./SessionButton-D0EcgEPz.js";
|
|
10
10
|
import ArticlesAd from "./ArticlesAd.js";
|
|
11
11
|
import { t as GameMenu } from "./GameMenu-CBn1r9Cq.js";
|
|
12
12
|
import useFullscreen from "./useFullscreen.js";
|
|
@@ -16,7 +16,7 @@ import { t as GameScoreboard } from "./GameScoreboard-BvE_sIDW.js";
|
|
|
16
16
|
import PageTemplateLandingPage from "./PageTemplateLandingPage.js";
|
|
17
17
|
import GlobalHead from "./GlobalHead.js";
|
|
18
18
|
import GlobalBody_default from "./GlobalBody.js";
|
|
19
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
19
|
+
import { t as SettingsModal } from "./SettingsModal-B7qntfk6.js";
|
|
20
20
|
import CreditsModal from "./CreditsModal.js";
|
|
21
21
|
import InfoModal from "./InfoModal.js";
|
|
22
22
|
import DarkModeHandler from "./DarkModeHandler.js";
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|