koin.js 1.0.3 → 1.0.5
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/index.js +53 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -3
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +525 -956
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4962,7 +4962,7 @@ function RASidebar({
|
|
|
4962
4962
|
if (filter === "unlocked") return unlocked;
|
|
4963
4963
|
return true;
|
|
4964
4964
|
});
|
|
4965
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4965
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "koin-scope", style: { display: "contents" }, children: [
|
|
4966
4966
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4967
4967
|
"div",
|
|
4968
4968
|
{
|
|
@@ -7440,8 +7440,39 @@ function usePlayerPersistence(onSettingsChange) {
|
|
|
7440
7440
|
updateSettings
|
|
7441
7441
|
};
|
|
7442
7442
|
}
|
|
7443
|
+
|
|
7444
|
+
// src/lib/telemetry.ts
|
|
7445
|
+
var sendTelemetry = (eventName, params = {}) => {
|
|
7446
|
+
if (typeof window === "undefined") return;
|
|
7447
|
+
try {
|
|
7448
|
+
fetch("https://koin.theretrosaga.com/api/telemetry", {
|
|
7449
|
+
method: "POST",
|
|
7450
|
+
headers: {
|
|
7451
|
+
"Content-Type": "application/json"
|
|
7452
|
+
},
|
|
7453
|
+
body: JSON.stringify({
|
|
7454
|
+
event_name: eventName,
|
|
7455
|
+
params: {
|
|
7456
|
+
...params,
|
|
7457
|
+
url: window.location.href,
|
|
7458
|
+
referrer: document.referrer,
|
|
7459
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
7460
|
+
}
|
|
7461
|
+
})
|
|
7462
|
+
}).catch(() => {
|
|
7463
|
+
});
|
|
7464
|
+
} catch (e) {
|
|
7465
|
+
}
|
|
7466
|
+
};
|
|
7443
7467
|
var GamePlayer = React5.memo(function GamePlayer2(props) {
|
|
7444
7468
|
const { settings, updateSettings, isLoaded: settingsLoaded } = usePlayerPersistence();
|
|
7469
|
+
React5.useEffect(() => {
|
|
7470
|
+
sendTelemetry("game_start", {
|
|
7471
|
+
system: props.system,
|
|
7472
|
+
core: props.core,
|
|
7473
|
+
game: props.title || "unknown"
|
|
7474
|
+
});
|
|
7475
|
+
}, [props.system, props.core, props.title]);
|
|
7445
7476
|
const [biosModalOpen, setBiosModalOpen] = React5.useState(false);
|
|
7446
7477
|
const [showShortcutsModal, setShowShortcutsModal] = React5.useState(false);
|
|
7447
7478
|
const effectiveShader = props.shader !== void 0 ? props.shader : settings.shader;
|
|
@@ -7539,6 +7570,13 @@ var GamePlayer = React5.memo(function GamePlayer2(props) {
|
|
|
7539
7570
|
status,
|
|
7540
7571
|
isPerformanceMode
|
|
7541
7572
|
} = nostalgist;
|
|
7573
|
+
React5.useEffect(() => {
|
|
7574
|
+
if (status === "running") {
|
|
7575
|
+
console.log("[Koin Debug] Status:", status);
|
|
7576
|
+
console.log("[Koin Debug] isPerformanceMode:", isPerformanceMode);
|
|
7577
|
+
console.log("[Koin Debug] crossOriginIsolated:", typeof window !== "undefined" ? window.crossOriginIsolated : "N/A");
|
|
7578
|
+
}
|
|
7579
|
+
}, [status, isPerformanceMode]);
|
|
7542
7580
|
React5.useEffect(() => {
|
|
7543
7581
|
if (settingsLoaded) {
|
|
7544
7582
|
setVolume(settings.volume);
|
|
@@ -7655,7 +7693,7 @@ var GamePlayer = React5.memo(function GamePlayer2(props) {
|
|
|
7655
7693
|
window.addEventListener("keydown", handleKeyDown);
|
|
7656
7694
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7657
7695
|
}, [handleToggleShortcuts, handleTogglePerformanceOverlay, handleToggleInputDisplay, handleToggleRecording, handleToggleMute, showShortcutsModal, resume]);
|
|
7658
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7696
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "koin-scope", style: { display: "contents" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7659
7697
|
"div",
|
|
7660
7698
|
{
|
|
7661
7699
|
ref: containerRef,
|
|
@@ -7732,6 +7770,18 @@ var GamePlayer = React5.memo(function GamePlayer2(props) {
|
|
|
7732
7770
|
]
|
|
7733
7771
|
}
|
|
7734
7772
|
),
|
|
7773
|
+
!isPerformanceMode && (status === "running" || status === "paused") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7774
|
+
"div",
|
|
7775
|
+
{
|
|
7776
|
+
className: "bg-red-900/80 backdrop-blur-md px-2 py-1 rounded border border-red-500/50 flex items-center gap-1.5",
|
|
7777
|
+
title: "Standard Mode (Single Threaded)",
|
|
7778
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] uppercase font-bold tracking-wider text-red-200", children: [
|
|
7779
|
+
"Standard (",
|
|
7780
|
+
typeof window !== "undefined" && window.crossOriginIsolated ? "Isolated" : "Not Isolated",
|
|
7781
|
+
")"
|
|
7782
|
+
] })
|
|
7783
|
+
}
|
|
7784
|
+
),
|
|
7735
7785
|
settings.showInputDisplay && (status === "running" || status === "paused") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7736
7786
|
InputDisplay_default,
|
|
7737
7787
|
{
|
|
@@ -7861,7 +7911,7 @@ var GamePlayer = React5.memo(function GamePlayer2(props) {
|
|
|
7861
7911
|
/* @__PURE__ */ jsxRuntime.jsx(ToastContainer, { toasts, onDismiss: dismissToast })
|
|
7862
7912
|
]
|
|
7863
7913
|
}
|
|
7864
|
-
);
|
|
7914
|
+
) });
|
|
7865
7915
|
});
|
|
7866
7916
|
var GamePlayer_default = GamePlayer;
|
|
7867
7917
|
function AchievementPopup({
|