gitxelectron 1.2.4 → 1.2.6
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.
|
@@ -13751,21 +13751,23 @@ const LogicGame2048 = () => {
|
|
|
13751
13751
|
};
|
|
13752
13752
|
const getRotation = (value, spins) => {
|
|
13753
13753
|
const s = spins * 360;
|
|
13754
|
+
const tiltX = -10;
|
|
13755
|
+
const tiltY = -15;
|
|
13754
13756
|
switch (value) {
|
|
13755
13757
|
case 1:
|
|
13756
|
-
return `rotateX(${s}deg) rotateY(${s}deg)`;
|
|
13758
|
+
return `rotateX(${s + tiltX}deg) rotateY(${s + tiltY}deg)`;
|
|
13757
13759
|
case 2:
|
|
13758
|
-
return `rotateX(${s}deg) rotateY(${s + 180}deg)`;
|
|
13760
|
+
return `rotateX(${s + tiltX}deg) rotateY(${s + 180 + tiltY}deg)`;
|
|
13759
13761
|
case 3:
|
|
13760
|
-
return `rotateX(${s}deg) rotateY(${s - 90}deg)`;
|
|
13762
|
+
return `rotateX(${s + tiltX}deg) rotateY(${s - 90 + tiltY}deg)`;
|
|
13761
13763
|
case 4:
|
|
13762
|
-
return `rotateX(${s}deg) rotateY(${s + 90}deg)`;
|
|
13764
|
+
return `rotateX(${s + tiltX}deg) rotateY(${s + 90 + tiltY}deg)`;
|
|
13763
13765
|
case 5:
|
|
13764
|
-
return `rotateX(${s - 90}deg) rotateY(${s}deg)`;
|
|
13766
|
+
return `rotateX(${s - 90 + tiltX}deg) rotateY(${s + tiltY}deg)`;
|
|
13765
13767
|
case 6:
|
|
13766
|
-
return `rotateX(${s + 90}deg) rotateY(${s}deg)`;
|
|
13768
|
+
return `rotateX(${s + 90 + tiltX}deg) rotateY(${s + tiltY}deg)`;
|
|
13767
13769
|
default:
|
|
13768
|
-
return `rotateX(
|
|
13770
|
+
return `rotateX(${tiltX}deg) rotateY(${tiltY}deg)`;
|
|
13769
13771
|
}
|
|
13770
13772
|
};
|
|
13771
13773
|
const DiceGame = () => {
|
|
@@ -13775,12 +13777,17 @@ const DiceGame = () => {
|
|
|
13775
13777
|
const [dice2, setDice2] = reactExports.useState(3);
|
|
13776
13778
|
const [spins, setSpins] = reactExports.useState(0);
|
|
13777
13779
|
const [gameResult, setGameResult] = reactExports.useState("idle");
|
|
13780
|
+
const [movesLeft, setMovesLeft] = reactExports.useState(5);
|
|
13781
|
+
const [score, setScore] = reactExports.useState(() => {
|
|
13782
|
+
return parseInt(localStorage.getItem("gitelectron-dice-score") || "0", 10);
|
|
13783
|
+
});
|
|
13778
13784
|
const handleRoll = (e) => {
|
|
13779
|
-
e.preventDefault();
|
|
13780
|
-
if (isRolling) return;
|
|
13785
|
+
if (e) e.preventDefault();
|
|
13786
|
+
if (isRolling || movesLeft <= 0) return;
|
|
13781
13787
|
setIsRolling(true);
|
|
13782
13788
|
setGameResult("idle");
|
|
13783
13789
|
setSpins((s) => s + 2);
|
|
13790
|
+
setMovesLeft((m) => m - 1);
|
|
13784
13791
|
const d1 = Math.floor(Math.random() * 6) + 1;
|
|
13785
13792
|
const d2 = Math.floor(Math.random() * 6) + 1;
|
|
13786
13793
|
setTimeout(() => {
|
|
@@ -13789,13 +13796,33 @@ const DiceGame = () => {
|
|
|
13789
13796
|
setIsRolling(false);
|
|
13790
13797
|
if (d1 + d2 === targetNumber) {
|
|
13791
13798
|
setGameResult("win");
|
|
13799
|
+
const newScore = score + 10;
|
|
13800
|
+
setScore(newScore);
|
|
13801
|
+
localStorage.setItem("gitelectron-dice-score", newScore.toString());
|
|
13792
13802
|
} else {
|
|
13793
13803
|
setGameResult("lose");
|
|
13794
13804
|
}
|
|
13795
13805
|
}, 1e3);
|
|
13796
13806
|
};
|
|
13797
|
-
|
|
13798
|
-
|
|
13807
|
+
const handleResetGame = () => {
|
|
13808
|
+
setMovesLeft(5);
|
|
13809
|
+
setGameResult("idle");
|
|
13810
|
+
};
|
|
13811
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center justify-center h-full w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "card flex flex-col items-center gap-6 p-8 relative overflow-visible mt-20 min-w-[350px]", children: [
|
|
13812
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute -top-12 left-0 right-0 flex justify-between items-center px-4 w-full", children: [
|
|
13813
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-start bg-surface-hover/80 px-4 py-2 rounded-xl border border-border/50 backdrop-blur-sm", children: [
|
|
13814
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-secondary font-bold uppercase tracking-wider", children: "Daily Score" }),
|
|
13815
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xl font-black text-brand", children: score })
|
|
13816
|
+
] }),
|
|
13817
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-end bg-surface-hover/80 px-4 py-2 rounded-xl border border-border/50 backdrop-blur-sm", children: [
|
|
13818
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-secondary font-bold uppercase tracking-wider", children: "Moves Left" }),
|
|
13819
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: `text-xl font-black ${movesLeft === 0 ? "text-danger" : "text-accent"}`, children: [
|
|
13820
|
+
movesLeft,
|
|
13821
|
+
" / 5"
|
|
13822
|
+
] })
|
|
13823
|
+
] })
|
|
13824
|
+
] }),
|
|
13825
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-2 mb-2 z-20 mt-4", children: [
|
|
13799
13826
|
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-primary font-bold text-lg", children: "Guess the total (2-12):" }),
|
|
13800
13827
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
13801
13828
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -13884,10 +13911,17 @@ const DiceGame = () => {
|
|
|
13884
13911
|
},
|
|
13885
13912
|
idx
|
|
13886
13913
|
)) }),
|
|
13887
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "controls mt-8 z-20", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className:
|
|
13914
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "controls mt-8 z-20 h-16 flex items-center justify-center", children: movesLeft > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: `dice-btn ${isRolling ? "opacity-80" : ""}`, onClick: handleRoll, children: [
|
|
13888
13915
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dice-btn-text", children: "ROLL" }),
|
|
13889
13916
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dice-btn-text-stop", children: "ROLLING" })
|
|
13890
|
-
] })
|
|
13917
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13918
|
+
"button",
|
|
13919
|
+
{
|
|
13920
|
+
onClick: handleResetGame,
|
|
13921
|
+
className: "px-8 py-3 bg-brand hover:bg-brand-hover text-white font-black text-lg rounded-xl shadow-lg transition-transform hover:scale-105 active:scale-95",
|
|
13922
|
+
children: "PLAY AGAIN"
|
|
13923
|
+
}
|
|
13924
|
+
) })
|
|
13891
13925
|
] }) });
|
|
13892
13926
|
};
|
|
13893
13927
|
const SpaceScene = ({ fullScreen, onGameActiveChange }) => {
|
|
@@ -24054,9 +24088,10 @@ const AuthCodePrinter = ({ code }) => {
|
|
|
24054
24088
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter" }) })
|
|
24055
24089
|
] }) });
|
|
24056
24090
|
};
|
|
24057
|
-
const CommitReceiptPrinter = ({ commit }) => {
|
|
24091
|
+
const CommitReceiptPrinter = ({ commit, onClose }) => {
|
|
24058
24092
|
const [isPrinted, setIsPrinted] = reactExports.useState(false);
|
|
24059
24093
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `commit-printer-wrapper ${isPrinted ? "is-printed" : ""}`, children: [
|
|
24094
|
+
onClose && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "printer-close-btn", onClick: onClose, title: "Close Printer", children: "✕" }),
|
|
24060
24095
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer" }),
|
|
24061
24096
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "printer-display", children: [
|
|
24062
24097
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children: " Click to print changes" }),
|
|
@@ -24723,6 +24758,8 @@ function App() {
|
|
|
24723
24758
|
localStorage.getItem("gitelectron-enable-space") !== "false"
|
|
24724
24759
|
);
|
|
24725
24760
|
const [isGameActive, setIsGameActive] = reactExports.useState(false);
|
|
24761
|
+
const [leftPanelWidth, setLeftPanelWidth] = reactExports.useState(50);
|
|
24762
|
+
const [isResizing, setIsResizing] = reactExports.useState(false);
|
|
24726
24763
|
const { t, lang, setLang } = useTranslation();
|
|
24727
24764
|
const [appVersion, setAppVersion] = reactExports.useState("");
|
|
24728
24765
|
reactExports.useEffect(() => {
|
|
@@ -24736,6 +24773,25 @@ function App() {
|
|
|
24736
24773
|
};
|
|
24737
24774
|
initVersion();
|
|
24738
24775
|
}, []);
|
|
24776
|
+
reactExports.useEffect(() => {
|
|
24777
|
+
if (!isResizing) return;
|
|
24778
|
+
const handleMouseMove = (e) => {
|
|
24779
|
+
const container = document.getElementById("split-pane-container");
|
|
24780
|
+
if (!container) return;
|
|
24781
|
+
const containerRect = container.getBoundingClientRect();
|
|
24782
|
+
const newWidth = (e.clientX - containerRect.left) / containerRect.width * 100;
|
|
24783
|
+
setLeftPanelWidth(Math.max(20, Math.min(newWidth, 80)));
|
|
24784
|
+
};
|
|
24785
|
+
const handleMouseUp = () => {
|
|
24786
|
+
setIsResizing(false);
|
|
24787
|
+
};
|
|
24788
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
24789
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
24790
|
+
return () => {
|
|
24791
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
24792
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
24793
|
+
};
|
|
24794
|
+
}, [isResizing]);
|
|
24739
24795
|
const handleNumpadPress = (key) => {
|
|
24740
24796
|
if (pinInput.length < 3) {
|
|
24741
24797
|
setPinError(false);
|
|
@@ -26296,7 +26352,7 @@ function App() {
|
|
|
26296
26352
|
}
|
|
26297
26353
|
)
|
|
26298
26354
|
] }),
|
|
26299
|
-
expandedCommits[commit.hash] && commit.diff && commit.diff.files && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 flex justify-center pb-8 border-t border-border/40 pt-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CommitReceiptPrinter, { commit }) })
|
|
26355
|
+
expandedCommits[commit.hash] && commit.diff && commit.diff.files && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 flex justify-center pb-8 border-t border-border/40 pt-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CommitReceiptPrinter, { commit, onClose: () => toggleCommit(commit.hash) }) })
|
|
26300
26356
|
]
|
|
26301
26357
|
},
|
|
26302
26358
|
commit.hash
|
|
@@ -27414,9 +27470,9 @@ function App() {
|
|
|
27414
27470
|
}
|
|
27415
27471
|
)
|
|
27416
27472
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
27417
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden flex flex-col lg:flex-row
|
|
27418
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
|
27419
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-
|
|
27473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "split-pane-container", className: "flex-1 overflow-hidden flex flex-col lg:flex-row pb-2", children: [
|
|
27474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: leftPanelWidth }, className: "bg-surface/70 backdrop-blur-md rounded-xl border border-border flex flex-col transition-colors duration-300 overflow-hidden min-h-[250px]", children: [
|
|
27475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-nowrap overflow-x-auto custom-scrollbar items-center border-b border-border px-4 pt-3 pb-1 gap-y-2 gap-x-1", children: [
|
|
27420
27476
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27421
27477
|
"button",
|
|
27422
27478
|
{
|
|
@@ -27638,7 +27694,18 @@ function App() {
|
|
|
27638
27694
|
] })
|
|
27639
27695
|
] })
|
|
27640
27696
|
] }),
|
|
27641
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
27697
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27698
|
+
"div",
|
|
27699
|
+
{
|
|
27700
|
+
className: "hidden lg:flex w-6 cursor-col-resize items-center justify-center group relative z-10",
|
|
27701
|
+
onMouseDown: (e) => {
|
|
27702
|
+
e.preventDefault();
|
|
27703
|
+
setIsResizing(true);
|
|
27704
|
+
},
|
|
27705
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `h-12 w-1 rounded-full transition-colors ${isResizing ? "bg-accent" : "bg-border group-hover:bg-accent/50"}` })
|
|
27706
|
+
}
|
|
27707
|
+
),
|
|
27708
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: 100 - leftPanelWidth }, className: "bg-surface/70 backdrop-blur-md rounded-xl p-4 border border-border flex flex-col transition-colors duration-300 min-h-[250px]", children: [
|
|
27642
27709
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "font-semibold mb-4 text-primary text-sm", children: "Staged Changes" }),
|
|
27643
27710
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto pr-2 custom-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
|
|
27644
27711
|
status.staged.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
package/out/renderer/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
|
|
22
22
|
rel="stylesheet"
|
|
23
23
|
/>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
24
|
+
<script type="module" crossorigin src="./assets/index-C-5ryxXi.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="./assets/index-ByoEJy2t.css">
|
|
26
26
|
</head>
|
|
27
27
|
|
|
28
28
|
<body class="bg-gray-900 text-white font-sans antialiased overflow-hidden">
|