1
0
Fork 0

worked on GarageApp stuff

This commit is contained in:
Techognito 2025-08-25 17:46:11 +02:00
parent 60aaf17af3
commit eb606572b0
51919 changed files with 2168177 additions and 18 deletions

2
node_modules/@mui/utils/esm/useTimeout/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./useTimeout.js";
export { Timeout } from "./useTimeout.js";

2
node_modules/@mui/utils/esm/useTimeout/index.js generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./useTimeout.js";
export { Timeout } from "./useTimeout.js";

11
node_modules/@mui/utils/esm/useTimeout/useTimeout.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
export declare class Timeout {
static create(): Timeout;
currentId: ReturnType<typeof setTimeout> | null;
/**
* Executes `fn` after `delay`, clearing any previously scheduled call.
*/
start(delay: number, fn: Function): void;
clear: () => void;
disposeEffect: () => () => void;
}
export default function useTimeout(): Timeout;

35
node_modules/@mui/utils/esm/useTimeout/useTimeout.js generated vendored Normal file
View file

@ -0,0 +1,35 @@
'use client';
import useLazyRef from "../useLazyRef/useLazyRef.js";
import useOnMount from "../useOnMount/useOnMount.js";
export class Timeout {
static create() {
return new Timeout();
}
currentId = null;
/**
* Executes `fn` after `delay`, clearing any previously scheduled call.
*/
start(delay, fn) {
this.clear();
this.currentId = setTimeout(() => {
this.currentId = null;
fn();
}, delay);
}
clear = () => {
if (this.currentId !== null) {
clearTimeout(this.currentId);
this.currentId = null;
}
};
disposeEffect = () => {
return this.clear;
};
}
export default function useTimeout() {
const timeout = useLazyRef(Timeout.create).current;
useOnMount(timeout.disposeEffect);
return timeout;
}