@articles-media/articles-dev-box 1.3.1 → 1.3.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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Shared code, functions, and components that are commonly used across Articles Media projects.
6
6
 
7
7
  # Warning
8
- None of this is meant to work outside the Articles Media frontend React ecosystem. Breaking changes are being made in between patch releases until 1.1.0, when we switch to major release for breaking.
8
+ A lot of this package is expected to be consumed in a Articles Media related React ecosystem. See Package Exports section for more details.
9
9
 
10
10
  ## Getting Started
11
11
 
package/dist/InfoModal.js CHANGED
@@ -29,12 +29,15 @@ function InfoModal({ show, setShow, useStore, packageInfo, infoModalConfig }) {
29
29
  children: [/* @__PURE__ */ jsx("div", {
30
30
  className: "ratio ratio-16x9",
31
31
  children: darkMode ? /* @__PURE__ */ jsx("img", { src: infoModalConfig?.previewImage }) : /* @__PURE__ */ jsx("img", { src: infoModalConfig?.previewImage })
32
- }), /* @__PURE__ */ jsx("div", {
32
+ }), /* @__PURE__ */ jsxs("div", {
33
33
  className: "p-3",
34
- children: /* @__PURE__ */ jsx("div", {
34
+ children: [/* @__PURE__ */ jsx("div", {
35
35
  className: "",
36
36
  children: packageInfo?.description
37
- })
37
+ }), infoModalConfig?.appendContent && /* @__PURE__ */ jsx("div", {
38
+ className: "mt-2",
39
+ children: infoModalConfig.appendContent
40
+ })]
38
41
  })]
39
42
  }),
40
43
  /* @__PURE__ */ jsxs(Modal.Footer, {
@@ -11,7 +11,7 @@ var SessionButton = lazy(() => import("./SessionButton.js"));
11
11
  var ReturnToLauncherButton = lazy(() => import("./ReturnToLauncherButton.js"));
12
12
  var GameScoreboard = lazy(() => import("./GameScoreboard.js"));
13
13
  var Ad = lazy(() => import("./Ad.js"));
14
- function PageTemplateLandingPage({ useStore, useSocketStore, RotatingMascot, Link, logoImage, backgroundImage, CardBodyOverride, singlePlayerConfig, multiplayerConfig, brandingTextClass, disableHero, disableAd, disableGameScoreboard, maxInnerWidth = "20rem", AdditionalContent = null, PostCardContent = null, PostExtrasContent = null, PreHeroContent = null, PostHeroContent = null, NicknameInputConfig = null, CardOverride = null, LandingBackgroundAnimation = null }) {
14
+ function PageTemplateLandingPage({ useStore, useSocketStore, RotatingMascot, Link, logoImage, backgroundImage, CardBodyOverride, singlePlayerConfig, multiplayerConfig, brandingTextClass, disableHero, heroOverride, disableAd, disableGameScoreboard, gameScoreboardConfig, maxInnerWidth = "20rem", AdditionalContent = null, PostCardContent = null, PostExtrasContent = null, PreHeroContent = null, PostHeroContent = null, NicknameInputConfig = null, CardOverride = null, LandingBackgroundAnimation = null }) {
15
15
  const { data: userToken, error: userTokenError, isLoading: userTokenLoading, mutate: userTokenMutate } = useUserToken(process.env.NEXT_PUBLIC_GAME_PORT);
16
16
  const { data: userDetails, error: userDetailsError, isLoading: userDetailsLoading, mutate: userDetailsMutate } = useUserDetails({ token: userToken });
17
17
  const darkMode = useStore((state) => state.darkMode);
@@ -42,7 +42,7 @@ function PageTemplateLandingPage({ useStore, useSocketStore, RotatingMascot, Lin
42
42
  style: { "width": maxInnerWidth },
43
43
  children: [
44
44
  PreHeroContent && PreHeroContent,
45
- !disableHero && /* @__PURE__ */ jsxs("div", {
45
+ heroOverride ? heroOverride : !disableHero && /* @__PURE__ */ jsxs("div", {
46
46
  className: "landing-hero text-center mb-2",
47
47
  children: [/* @__PURE__ */ jsx("img", {
48
48
  src: logoImage,
@@ -157,7 +157,7 @@ function PageTemplateLandingPage({ useStore, useSocketStore, RotatingMascot, Lin
157
157
  ]
158
158
  }),
159
159
  PostCardContent && PostCardContent,
160
- /* @__PURE__ */ jsxs("div", {
160
+ process.env.NEXT_PUBLIC_ENABLE_ARTICLES !== "false" && /* @__PURE__ */ jsxs("div", {
161
161
  className: "extras",
162
162
  children: [/* @__PURE__ */ jsx(SessionButton, {
163
163
  port: process.env.NEXT_PUBLIC_GAME_PORT,
@@ -180,7 +180,8 @@ function PageTemplateLandingPage({ useStore, useSocketStore, RotatingMascot, Lin
180
180
  alignItems: "center"
181
181
  },
182
182
  children: /* @__PURE__ */ jsx(RotatingMascot, {})
183
- }) })
183
+ }) }),
184
+ ...gameScoreboardConfig
184
185
  }),
185
186
  !disableAd && /* @__PURE__ */ jsx(Ad, {
186
187
  style: "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.3.1",
249
+ version: "1.3.2",
250
250
  type: "module",
251
251
  sideEffects: false,
252
252
  imports: { "#root/src/*": "./src/*" },
@@ -1,2 +1,2 @@
1
- import { t as SettingsModal } from "./SettingsModal-BguWq4Q_.js";
1
+ import { t as SettingsModal } from "./SettingsModal-Cg15aSoE.js";
2
2
  export { SettingsModal as default };
package/dist/index.js CHANGED
@@ -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-BguWq4Q_.js";
19
+ import { t as SettingsModal } from "./SettingsModal-Cg15aSoE.js";
20
20
  import CreditsModal from "./CreditsModal.js";
21
21
  import InfoModal from "./InfoModal.js";
22
22
  import DarkModeHandler from "./DarkModeHandler.js";
@@ -101,7 +101,9 @@ var typicalZustandStoreStateSlice = (set, get, generateRandomNickname) => ({
101
101
  hasNoMouse: null,
102
102
  setHasNoMouse: (value) => set({ hasNoMouse: value }),
103
103
  isTouchCapable: null,
104
- setIsTouchCapable: (value) => set({ isTouchCapable: value })
104
+ setIsTouchCapable: (value) => set({ isTouchCapable: value }),
105
+ modelSource: process.env.NEXT_PUBLIC_MODEL_SOURCE || "Local",
106
+ setModelSource: (value) => set({ modelSource: value })
105
107
  });
106
108
  //#endregion
107
109
  export { typicalZustandStoreStateSlice as default };
@@ -5,7 +5,7 @@ var fetcher = (url) => fetch(url).then((res) => {
5
5
  return res.json();
6
6
  });
7
7
  var useUserToken = (port) => {
8
- const { data, error, isLoading, mutate } = useSWR(process.env.NODE_ENV === "development" ? `http://localhost:${port}/api/token` : "/api/token", fetcher, {
8
+ const { data, error, isLoading, mutate } = useSWR(process.env.NEXT_PUBLIC_ENABLE_ARTICLES !== "false" ? process.env.NODE_ENV === "development" ? `http://localhost:${port}/api/token` : "/api/token" : false, fetcher, {
9
9
  revalidateOnFocus: false,
10
10
  revalidateOnReconnect: false,
11
11
  shouldRetryOnError: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@articles-media/articles-dev-box",
3
3
  "description": "Shared code, functions, and components for different Articles Media projects.",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "imports": {