dshmarket 1.31.2 → 1.32.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/client/client.js +24 -2
- package/client/client.js.map +1 -1
- package/lib/pnpm-compat.js +52 -0
- package/lib/types/pnpm-compat.d.ts +1 -1
- package/package.json +1 -1
- package/src/client/MarketSection.tsx +21 -2
- package/src/pnpm-compat.ts +50 -1
package/client/client.js
CHANGED
|
@@ -4428,12 +4428,16 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
4428
4428
|
* clock instead of letting it fire again moments later: without that, a
|
|
4429
4429
|
* deliberate "go back one" reads as broken when it auto-advances right past
|
|
4430
4430
|
* where the user just navigated to.
|
|
4431
|
+
*
|
|
4432
|
+
* `intervalMs <= 0` disables the timer entirely (no auto-advance at all);
|
|
4433
|
+
* manual jumps still work. The lightbox uses this: a full-bleed image needs
|
|
4434
|
+
* to stay put until the viewer moves on, so it must never page itself.
|
|
4431
4435
|
*/
|
|
4432
4436
|
function useAutoCarousel(count, initial, intervalMs = 3500) {
|
|
4433
4437
|
const [index, setIndexState] = (0, react.useState)(initial);
|
|
4434
4438
|
const [resetTick, setResetTick] = (0, react.useState)(0);
|
|
4435
4439
|
(0, react.useEffect)(() => {
|
|
4436
|
-
if (count <= 1) return;
|
|
4440
|
+
if (count <= 1 || intervalMs <= 0) return;
|
|
4437
4441
|
const timer = setInterval(() => {
|
|
4438
4442
|
setIndexState((i) => (i + 1) % count);
|
|
4439
4443
|
}, intervalMs);
|
|
@@ -4779,7 +4783,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
4779
4783
|
* vs "full size" asset to fetch.
|
|
4780
4784
|
*/
|
|
4781
4785
|
function ScreenshotLightbox({ shots, startIndex, onClose, t }) {
|
|
4782
|
-
const [index, setIndex] = useAutoCarousel(shots.length, startIndex,
|
|
4786
|
+
const [index, setIndex] = useAutoCarousel(shots.length, startIndex, 0);
|
|
4783
4787
|
(0, react.useEffect)(() => {
|
|
4784
4788
|
const onKey = (e) => {
|
|
4785
4789
|
if (e.key === "Escape") {
|
|
@@ -5610,6 +5614,24 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
5610
5614
|
else el.scrollTop = 0;
|
|
5611
5615
|
}
|
|
5612
5616
|
};
|
|
5617
|
+
(0, react.useLayoutEffect)(() => {
|
|
5618
|
+
const el = bodyRef.current;
|
|
5619
|
+
if (el !== null) el.scrollTop = 0;
|
|
5620
|
+
setShowTop(false);
|
|
5621
|
+
}, [
|
|
5622
|
+
tab,
|
|
5623
|
+
q,
|
|
5624
|
+
cat,
|
|
5625
|
+
sortField,
|
|
5626
|
+
sortDir,
|
|
5627
|
+
timeRange,
|
|
5628
|
+
qThemes,
|
|
5629
|
+
themeSortField,
|
|
5630
|
+
themeSortDir,
|
|
5631
|
+
themeTimeRange,
|
|
5632
|
+
qInstalled,
|
|
5633
|
+
installedView
|
|
5634
|
+
]);
|
|
5613
5635
|
const plugins = (0, react.useMemo)(() => data === null ? [] : visiblePlugins(data.plugins, {
|
|
5614
5636
|
category: cat,
|
|
5615
5637
|
query: q,
|