@articles-media/articles-dev-box 1.0.17 → 1.0.23
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/README.md +6 -5
- package/dist/Ad-Ck5UdTq3.js +387 -0
- package/dist/Ad.js +2 -604
- package/dist/AdConfirmExitModal-CJ-HtcVC.js +56 -0
- package/dist/AdDetailsModal-DRNRTL2W.js +108 -0
- package/dist/ArticlesAd.js +16 -15
- package/dist/Button-BlAdEbSd.js +30 -0
- package/dist/CreditsModal.js +56 -0
- package/dist/DarkModeHandler.js +17 -16
- package/dist/FriendsList.js +77 -121
- package/dist/GameScoreboard-CBY3JsFa.js +165 -0
- package/dist/GameScoreboard.js +2 -190
- package/dist/GlobalBody.js +36 -7
- package/dist/GlobalHead.js +10 -12
- package/dist/Link-MFZblBb4.js +17 -0
- package/dist/Modal-BX1s6CCU.js +1631 -0
- package/dist/ReturnToLauncherButton.js +39 -54
- package/dist/SettingsModal-XI2dMI09.js +247 -0
- package/dist/SettingsModal.js +2 -658
- package/dist/StatusModal-elrPJvX1.js +70 -0
- package/dist/ViewUserModal-DDjWLpyM.js +3094 -0
- package/dist/ViewUserModal.js +3 -3149
- package/dist/articles-dev-box.css +2 -1
- package/dist/classnames-DP6dWde5.js +31 -0
- package/dist/index.js +16 -28
- package/dist/jsx-runtime-VZk6y-ec.js +191 -0
- package/dist/numberWithCommas-BSKBdR-e.js +18 -0
- package/dist/useAuthSiteStatus-1rHjYC4N.js +29 -0
- package/dist/useFullscreen.js +24 -0
- package/dist/useUserDetails.js +22 -32
- package/dist/useUserFriends.js +29 -51
- package/dist/useUserToken.js +16 -21
- package/package.json +26 -67
- package/dist/Ad.cjs +0 -1
- package/dist/AdConfirmExitModal-Bhz-lt9w.js +0 -72
- package/dist/AdConfirmExitModal-N3Lvhb4y.cjs +0 -1
- package/dist/AdDetailsModal-BMj8DjV0.cjs +0 -1
- package/dist/AdDetailsModal-DXvfmyKK.js +0 -83
- package/dist/ArticlesAd.cjs +0 -1
- package/dist/Button-0ZK0NKiK.cjs +0 -1
- package/dist/Button-_Quon8UV.js +0 -54
- package/dist/DarkModeHandler.cjs +0 -1
- package/dist/ElementChildren-DN3RWY2E.js +0 -51
- package/dist/ElementChildren-eAwIENLl.cjs +0 -1
- package/dist/FriendsList.cjs +0 -1
- package/dist/GameScoreboard.cjs +0 -1
- package/dist/GlobalBody-BrrtfBBs.js +0 -123
- package/dist/GlobalBody-weON_TbJ.cjs +0 -33
- package/dist/GlobalBody.cjs +0 -1
- package/dist/GlobalHead.cjs +0 -1
- package/dist/Modal-Bdhkgkwr.cjs +0 -2
- package/dist/Modal-nux8R77F.js +0 -2087
- package/dist/ReturnToLauncherButton.cjs +0 -1
- package/dist/SettingsModal.cjs +0 -1
- package/dist/StatusModal-B086BgSW.js +0 -71
- package/dist/StatusModal-CzPyqQQA.cjs +0 -1
- package/dist/ViewUserModal.cjs +0 -1
- package/dist/index-BlP2-uOi.cjs +0 -1
- package/dist/index-C8MeSLnR.js +0 -2504
- package/dist/index-DWV8myok.cjs +0 -6
- package/dist/index-YnD2EP-S.js +0 -43
- package/dist/index.cjs +0 -1
- package/dist/jsx-runtime-nZSsnGb7.cjs +0 -6
- package/dist/jsx-runtime-tc70JA_2.js +0 -264
- package/dist/numberWithCommas-CRgrb58X.cjs +0 -1
- package/dist/numberWithCommas-DnAkiOFL.js +0 -1256
- package/dist/useUserDetails.cjs +0 -1
- package/dist/useUserFriends.cjs +0 -1
- package/dist/useUserToken.cjs +0 -1
package/dist/GameScoreboard.js
CHANGED
|
@@ -1,190 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { M as i } from "./Modal-nux8R77F.js";
|
|
4
|
-
import N from "./ViewUserModal.js";
|
|
5
|
-
import { A as o } from "./Button-_Quon8UV.js";
|
|
6
|
-
import { u as v, a as j } from "./index-C8MeSLnR.js";
|
|
7
|
-
function y({
|
|
8
|
-
setChecked: s,
|
|
9
|
-
checked: a,
|
|
10
|
-
readOnly: r
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ e.jsxs("label", { className: `articles-switch mb-0 ${a && "checked"}`, children: [
|
|
13
|
-
/* @__PURE__ */ e.jsx(
|
|
14
|
-
"input",
|
|
15
|
-
{
|
|
16
|
-
type: "checkbox",
|
|
17
|
-
readOnly: !!r,
|
|
18
|
-
checked: a,
|
|
19
|
-
onChange: () => {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
),
|
|
23
|
-
/* @__PURE__ */ e.jsx(
|
|
24
|
-
"span",
|
|
25
|
-
{
|
|
26
|
-
onClick: (l) => {
|
|
27
|
-
if (s) {
|
|
28
|
-
s(!a);
|
|
29
|
-
return;
|
|
30
|
-
} else {
|
|
31
|
-
l.preventDefault();
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
className: "slider"
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
const g = async (s) => {
|
|
41
|
-
if (process.env.NODE_ENV === "development")
|
|
42
|
-
try {
|
|
43
|
-
return (await j.get("http://localhost:3001/api/community/games/scoreboard", {
|
|
44
|
-
params: {
|
|
45
|
-
game: s.game
|
|
46
|
-
}
|
|
47
|
-
})).data;
|
|
48
|
-
} catch {
|
|
49
|
-
}
|
|
50
|
-
return j.get(s.url, {
|
|
51
|
-
params: {
|
|
52
|
-
game: s.game
|
|
53
|
-
}
|
|
54
|
-
}).then((a) => a.data);
|
|
55
|
-
}, w = {
|
|
56
|
-
dedupingInterval: 1e3 * 60 * 30,
|
|
57
|
-
refreshInterval: 0,
|
|
58
|
-
revalidateOnFocus: !1,
|
|
59
|
-
revalidateIfStale: !1,
|
|
60
|
-
shouldRetryOnError: !1
|
|
61
|
-
// fallbackData: []
|
|
62
|
-
}, S = (s) => {
|
|
63
|
-
const { data: a, error: r, isLoading: l, isValidating: n, mutate: c } = v(
|
|
64
|
-
s?.game ? {
|
|
65
|
-
// url: "/api/community/games/scoreboard",
|
|
66
|
-
url: "https://articles.media/api/community/games/scoreboard",
|
|
67
|
-
game: s.game
|
|
68
|
-
} : null,
|
|
69
|
-
g,
|
|
70
|
-
w
|
|
71
|
-
);
|
|
72
|
-
return {
|
|
73
|
-
data: a,
|
|
74
|
-
error: r,
|
|
75
|
-
isLoading: l,
|
|
76
|
-
isValidating: n,
|
|
77
|
-
mutate: c
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
function V({
|
|
81
|
-
game: s,
|
|
82
|
-
reloadScoreboard: a,
|
|
83
|
-
setReloadScoreboard: r,
|
|
84
|
-
prepend: l,
|
|
85
|
-
append: n
|
|
86
|
-
}) {
|
|
87
|
-
const [c, d] = f(!1), [m, p] = f(!1), {
|
|
88
|
-
data: h,
|
|
89
|
-
mutate: u
|
|
90
|
-
} = S({
|
|
91
|
-
game: s
|
|
92
|
-
});
|
|
93
|
-
return x(() => {
|
|
94
|
-
}, []), x(() => {
|
|
95
|
-
a && (r(!1), u());
|
|
96
|
-
}, [a]), /* @__PURE__ */ e.jsxs("div", { className: "scoreboard", children: [
|
|
97
|
-
/* @__PURE__ */ e.jsxs(i, { show: c, size: "md", className: "articles-modal", centered: !0, onHide: () => d(!1), children: [
|
|
98
|
-
/* @__PURE__ */ e.jsx(i.Header, { children: /* @__PURE__ */ e.jsx(i.Title, { children: "Scoreboard Settings" }) }),
|
|
99
|
-
/* @__PURE__ */ e.jsx(i.Body, { children: /* @__PURE__ */ e.jsxs(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
className: "d-flex justify-content-between align-items-center",
|
|
103
|
-
onClick: () => p(!m),
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
106
|
-
/* @__PURE__ */ e.jsx("i", { className: "fas fa-trophy-alt" }),
|
|
107
|
-
/* @__PURE__ */ e.jsx("span", { children: "Join Scoreboard?" })
|
|
108
|
-
] }),
|
|
109
|
-
/* @__PURE__ */ e.jsx(
|
|
110
|
-
y,
|
|
111
|
-
{
|
|
112
|
-
checked: m
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
) }),
|
|
118
|
-
/* @__PURE__ */ e.jsx(i.Footer, { className: "justify-content-between", children: /* @__PURE__ */ e.jsx(
|
|
119
|
-
o,
|
|
120
|
-
{
|
|
121
|
-
variant: "articles",
|
|
122
|
-
onClick: () => {
|
|
123
|
-
d(!1);
|
|
124
|
-
},
|
|
125
|
-
children: "Close"
|
|
126
|
-
}
|
|
127
|
-
) })
|
|
128
|
-
] }),
|
|
129
|
-
/* @__PURE__ */ e.jsx("div", { className: "prepend-container", children: l }),
|
|
130
|
-
/* @__PURE__ */ e.jsxs("div", { className: "card card-articles card-sm mb-3 mb-lg-0", children: [
|
|
131
|
-
/* @__PURE__ */ e.jsxs("div", { className: "card-header d-flex justify-content-between align-items-center", children: [
|
|
132
|
-
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
133
|
-
s,
|
|
134
|
-
" Scoreboard"
|
|
135
|
-
] }),
|
|
136
|
-
/* @__PURE__ */ e.jsx(
|
|
137
|
-
o,
|
|
138
|
-
{
|
|
139
|
-
onClick: () => {
|
|
140
|
-
u();
|
|
141
|
-
},
|
|
142
|
-
small: !0,
|
|
143
|
-
children: /* @__PURE__ */ e.jsx("i", { className: "fad fa-redo me-0" })
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
] }),
|
|
147
|
-
/* @__PURE__ */ e.jsxs("div", { className: "card-body p-0", children: [
|
|
148
|
-
(h?.length || 0) == 0 && /* @__PURE__ */ e.jsx("div", { className: "small p-2", children: "No scores yet" }),
|
|
149
|
-
h?.map(
|
|
150
|
-
(t, b) => /* @__PURE__ */ e.jsxs("div", { className: "result d-flex flex-column justify-content-between border-bottom p-2", children: [
|
|
151
|
-
/* @__PURE__ */ e.jsxs("div", { className: "d-flex justify-content-between lh-sm", children: [
|
|
152
|
-
/* @__PURE__ */ e.jsxs("div", { className: "d-flex", children: [
|
|
153
|
-
/* @__PURE__ */ e.jsx("h5", { className: "mb-0 me-3", children: b + 1 }),
|
|
154
|
-
/* @__PURE__ */ e.jsx("div", { className: "lh-sm", children: /* @__PURE__ */ e.jsx(
|
|
155
|
-
N,
|
|
156
|
-
{
|
|
157
|
-
populated_user: t.populated_user,
|
|
158
|
-
user_id: t.user_id
|
|
159
|
-
}
|
|
160
|
-
) })
|
|
161
|
-
] }),
|
|
162
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("h5", { className: "mb-0", children: t.score || t.total }) })
|
|
163
|
-
] }),
|
|
164
|
-
t.last_play && t.public_last_play && /* @__PURE__ */ e.jsxs("small", { className: "mt-1", style: { fontSize: "0.75rem" }, children: [
|
|
165
|
-
"Played: ",
|
|
166
|
-
format(new Date(t.last_play), "MM/d/yy hh:mmaa")
|
|
167
|
-
] })
|
|
168
|
-
] }, t._id)
|
|
169
|
-
)
|
|
170
|
-
] }),
|
|
171
|
-
/* @__PURE__ */ e.jsxs("div", { className: "card-footer d-flex justify-content-between align-items-center", children: [
|
|
172
|
-
/* @__PURE__ */ e.jsx("div", { className: "small", children: "Play to get on the board!" }),
|
|
173
|
-
/* @__PURE__ */ e.jsx(
|
|
174
|
-
o,
|
|
175
|
-
{
|
|
176
|
-
small: !0,
|
|
177
|
-
onClick: () => {
|
|
178
|
-
d(!0);
|
|
179
|
-
},
|
|
180
|
-
children: /* @__PURE__ */ e.jsx("i", { className: "fad fa-cog me-0" })
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
] })
|
|
184
|
-
] }),
|
|
185
|
-
/* @__PURE__ */ e.jsx("div", { className: "append-container", children: n })
|
|
186
|
-
] });
|
|
187
|
-
}
|
|
188
|
-
export {
|
|
189
|
-
V as default
|
|
190
|
-
};
|
|
1
|
+
import { t as e } from "./GameScoreboard-CBY3JsFa.js";
|
|
2
|
+
export { e as default };
|
package/dist/GlobalBody.js
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { r as e, t } from "./jsx-runtime-VZk6y-ec.js";
|
|
3
|
+
import { t as n } from "./classnames-DP6dWde5.js";
|
|
4
|
+
import { n as r, t as i } from "./useAuthSiteStatus-1rHjYC4N.js";
|
|
5
|
+
import { Suspense as a, lazy as o, memo as s, useState as c } from "react";
|
|
6
|
+
//#region src/components/Global/GlobalBody.jsx
|
|
7
|
+
var l = /* @__PURE__ */ e(n(), 1), u = t(), d = o(() => import("./StatusModal-elrPJvX1.js"));
|
|
8
|
+
function f(e) {
|
|
9
|
+
let [t, n] = c(!1), { data: o, error: s, isLoading: f, mutate: p } = r({ disable: process.env.NODE_ENV !== "development" }), { data: m, error: h, isLoading: g, mutate: _ } = i({ disable: process.env.NODE_ENV !== "development" });
|
|
10
|
+
return /* @__PURE__ */ (0, u.jsxs)(u.Fragment, { children: [/* @__PURE__ */ (0, u.jsx)("link", {
|
|
11
|
+
rel: "stylesheet",
|
|
12
|
+
href: "https://cdn.articles.media/fonts/fontawesome/css/all.min.css"
|
|
13
|
+
}), process.env.NODE_ENV === "development" && /* @__PURE__ */ (0, u.jsxs)(u.Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ (0, u.jsx)("style", { children: " \n @keyframes grow-shrink {\n 0% { transform: translateY(-50px); }\n 50% { transform: translateY(0px); }\n 100% { transform: translateY(-50px); }\n }\n .articles-global-body {\n transform: translateY(-40px);\n z-index: 1055!important;\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n margin: 0;\n padding: 0;\n background-color: yellow;\n color: #FFFFFF;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n animation: grow-shrink 2s ease-in;\n border: 4px solid red;\n cursor: pointer;\n }\n .articles-global-body.main-connected {\n background-color: green;\n }\n .articles-global-body.auth-connected {\n border-color: blue;\n } \n " }),
|
|
15
|
+
/* @__PURE__ */ (0, u.jsx)("div", {
|
|
16
|
+
onClick: () => {
|
|
17
|
+
n(!0);
|
|
18
|
+
},
|
|
19
|
+
className: (0, l.default)("articles-global-body", {
|
|
20
|
+
"main-connected": o,
|
|
21
|
+
"auth-connected": m
|
|
22
|
+
}),
|
|
23
|
+
children: /* @__PURE__ */ (0, u.jsx)("div", {
|
|
24
|
+
className: "content",
|
|
25
|
+
children: /* @__PURE__ */ (0, u.jsx)("i", { className: "fas fa-thumbs-up" })
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
t && /* @__PURE__ */ (0, u.jsx)(a, { children: /* @__PURE__ */ (0, u.jsx)(d, {
|
|
29
|
+
show: t,
|
|
30
|
+
setShow: n
|
|
31
|
+
}) })
|
|
32
|
+
] })] });
|
|
33
|
+
}
|
|
34
|
+
var p = s(f);
|
|
35
|
+
//#endregion
|
|
36
|
+
export { p as default };
|
package/dist/GlobalHead.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
) });
|
|
1
|
+
import { t as e } from "./jsx-runtime-VZk6y-ec.js";
|
|
2
|
+
//#region src/components/Global/GlobalHead.jsx
|
|
3
|
+
var t = e();
|
|
4
|
+
function n() {
|
|
5
|
+
return /* @__PURE__ */ (0, t.jsx)(t.Fragment, { children: /* @__PURE__ */ (0, t.jsx)("link", {
|
|
6
|
+
rel: "stylesheet",
|
|
7
|
+
href: "https://cdn.articles.media/fonts/fontawesome/css/all.min.css"
|
|
8
|
+
}) });
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as e } from "./jsx-runtime-VZk6y-ec.js";
|
|
2
|
+
//#region src/components/UI/Link.jsx
|
|
3
|
+
var t = e();
|
|
4
|
+
function n(e) {
|
|
5
|
+
let { href: n, children: r, newPage: i, ...a } = e;
|
|
6
|
+
return /* @__PURE__ */ (0, t.jsx)("a", {
|
|
7
|
+
href: n,
|
|
8
|
+
...a,
|
|
9
|
+
...i && {
|
|
10
|
+
target: "_blank",
|
|
11
|
+
rel: "noopener noreferrer"
|
|
12
|
+
},
|
|
13
|
+
children: r
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as t };
|