mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 08:21:34 +08:00
chore(deps): lock file maintenance npm dependencies (#6015)
* chore(deps): lock file maintenance npm dependencies * chore(deps): bump npm deps * chore: fix eslint ref-name --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Slinetrac <realakayuki@gmail.com>
This commit is contained in:
parent
256a3f697b
commit
2128e1f788
14
package.json
14
package.json
@ -45,7 +45,7 @@
|
|||||||
"@mui/lab": "7.0.0-beta.17",
|
"@mui/lab": "7.0.0-beta.17",
|
||||||
"@mui/material": "^7.3.6",
|
"@mui/material": "^7.3.6",
|
||||||
"@tanstack/react-table": "^8.21.3",
|
"@tanstack/react-table": "^8.21.3",
|
||||||
"@tanstack/react-virtual": "^3.13.13",
|
"@tanstack/react-virtual": "^3.13.16",
|
||||||
"@tauri-apps/api": "2.9.1",
|
"@tauri-apps/api": "2.9.1",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
|
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
|
||||||
"@tauri-apps/plugin-dialog": "^2.4.2",
|
"@tauri-apps/plugin-dialog": "^2.4.2",
|
||||||
@ -66,12 +66,12 @@
|
|||||||
"nanoid": "^5.1.6",
|
"nanoid": "^5.1.6",
|
||||||
"react": "19.2.3",
|
"react": "19.2.3",
|
||||||
"react-dom": "19.2.3",
|
"react-dom": "19.2.3",
|
||||||
"react-error-boundary": "6.0.1",
|
"react-error-boundary": "6.0.2",
|
||||||
"react-hook-form": "^7.69.0",
|
"react-hook-form": "^7.70.0",
|
||||||
"react-i18next": "16.5.1",
|
"react-i18next": "16.5.1",
|
||||||
"react-markdown": "10.1.0",
|
"react-markdown": "10.1.0",
|
||||||
"react-router": "^7.11.0",
|
"react-router": "^7.11.0",
|
||||||
"react-virtuoso": "^4.18.0",
|
"react-virtuoso": "^4.18.1",
|
||||||
"rehype-raw": "^7.0.0",
|
"rehype-raw": "^7.0.0",
|
||||||
"swr": "^2.3.8",
|
"swr": "^2.3.8",
|
||||||
"tauri-plugin-mihomo-api": "github:clash-verge-rev/tauri-plugin-mihomo#main",
|
"tauri-plugin-mihomo-api": "github:clash-verge-rev/tauri-plugin-mihomo#main",
|
||||||
@ -79,7 +79,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^6.0.1",
|
"@actions/github": "^6.0.1",
|
||||||
"@eslint-react/eslint-plugin": "^2.4.0",
|
"@eslint-react/eslint-plugin": "^2.5.1",
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.2",
|
||||||
"@tauri-apps/cli": "2.9.6",
|
"@tauri-apps/cli": "2.9.6",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
@ -114,7 +114,7 @@
|
|||||||
"tar": "^7.5.2",
|
"tar": "^7.5.2",
|
||||||
"terser": "^5.44.1",
|
"terser": "^5.44.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.50.1",
|
"typescript-eslint": "^8.51.0",
|
||||||
"vite": "^7.3.0",
|
"vite": "^7.3.0",
|
||||||
"vite-plugin-svgr": "^4.5.0"
|
"vite-plugin-svgr": "^4.5.0"
|
||||||
},
|
},
|
||||||
@ -128,7 +128,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.26.1",
|
"packageManager": "pnpm@10.27.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@parcel/watcher",
|
"@parcel/watcher",
|
||||||
|
|||||||
1714
pnpm-lock.yaml
generated
1714
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -82,8 +82,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
const resolvedTitle = title ?? t("profiles.components.menu.editFile");
|
const resolvedTitle = title ?? t("profiles.components.menu.editFile");
|
||||||
|
|
||||||
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined);
|
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined);
|
||||||
const prevData = useRef<string | undefined>("");
|
const prevDataRef = useRef<string | undefined>("");
|
||||||
const currData = useRef<string | undefined>("");
|
const currDataRef = useRef<string | undefined>("");
|
||||||
// Hold the latest loader without making effects depend on its identity
|
// Hold the latest loader without making effects depend on its identity
|
||||||
const initialDataRef = useRef<Props<T>["initialData"]>(initialData);
|
const initialDataRef = useRef<Props<T>["initialData"]>(initialData);
|
||||||
// Track mount/open state to prevent setState after unmount/close
|
// Track mount/open state to prevent setState after unmount/close
|
||||||
@ -154,10 +154,10 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Only update when untouched and value changed
|
// Only update when untouched and value changed
|
||||||
const userUntouched = currData.current === prevData.current;
|
const userUntouched = currDataRef.current === prevDataRef.current;
|
||||||
if (userUntouched && next !== prevData.current) {
|
if (userUntouched && next !== prevDataRef.current) {
|
||||||
prevData.current = next;
|
prevDataRef.current = next;
|
||||||
currData.current = next;
|
currDataRef.current = next;
|
||||||
editorRef.current?.setValue(next);
|
editorRef.current?.setValue(next);
|
||||||
}
|
}
|
||||||
// Ensure any previous error state is cleared after a successful refresh
|
// Ensure any previous error state is cleared after a successful refresh
|
||||||
@ -219,8 +219,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
setHasLoadedOnce(false);
|
setHasLoadedOnce(false);
|
||||||
// We will perform an explicit initial load below; skip the first background refresh.
|
// We will perform an explicit initial load below; skip the first background refresh.
|
||||||
skipNextRefreshRef.current = true;
|
skipNextRefreshRef.current = true;
|
||||||
prevData.current = undefined;
|
prevDataRef.current = undefined;
|
||||||
currData.current = undefined;
|
currDataRef.current = undefined;
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
@ -231,8 +231,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
: (dataSource ?? Promise.resolve(""));
|
: (dataSource ?? Promise.resolve(""));
|
||||||
const data = await dataPromise;
|
const data = await dataPromise;
|
||||||
if (cancelled) return;
|
if (cancelled) return;
|
||||||
prevData.current = data;
|
prevDataRef.current = data;
|
||||||
currData.current = data;
|
currDataRef.current = data;
|
||||||
|
|
||||||
setInitialText(data);
|
setInitialText(data);
|
||||||
// Build a stable model path and avoid "undefined" in the name
|
// Build a stable model path and avoid "undefined" in the name
|
||||||
@ -250,8 +250,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
showNotice.error(err);
|
showNotice.error(err);
|
||||||
|
|
||||||
// Align refs with fallback text after a load failure
|
// Align refs with fallback text after a load failure
|
||||||
prevData.current = "";
|
prevDataRef.current = "";
|
||||||
currData.current = "";
|
currDataRef.current = "";
|
||||||
|
|
||||||
setInitialText("");
|
setInitialText("");
|
||||||
const pathParts = [String(dataKey ?? nanoid()), instanceIdRef.current];
|
const pathParts = [String(dataKey ?? nanoid()), instanceIdRef.current];
|
||||||
@ -288,8 +288,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
|
|
||||||
const handleChange = useLockFn(async (value?: string) => {
|
const handleChange = useLockFn(async (value?: string) => {
|
||||||
try {
|
try {
|
||||||
currData.current = value ?? editorRef.current?.getValue();
|
currDataRef.current = value ?? editorRef.current?.getValue();
|
||||||
onChange?.(prevData.current, currData.current);
|
onChange?.(prevDataRef.current, currDataRef.current);
|
||||||
// If the initial load failed, allow saving after the user makes an edit.
|
// If the initial load failed, allow saving after the user makes an edit.
|
||||||
if (!hasLoadedOnce) {
|
if (!hasLoadedOnce) {
|
||||||
setHasLoadedOnce(true);
|
setHasLoadedOnce(true);
|
||||||
@ -307,11 +307,11 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
if (!editorRef.current) {
|
if (!editorRef.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currData.current = editorRef.current.getValue();
|
currDataRef.current = editorRef.current.getValue();
|
||||||
if (onSave) {
|
if (onSave) {
|
||||||
await onSave(prevData.current, currData.current);
|
await onSave(prevDataRef.current, currDataRef.current);
|
||||||
// If save succeeds, align prev with current
|
// If save succeeds, align prev with current
|
||||||
prevData.current = currData.current;
|
prevDataRef.current = currDataRef.current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClose();
|
onClose();
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export default function useFilterSort(
|
|||||||
const lastInputRef = useRef<{ text: string; sort: ProxySortType } | null>(
|
const lastInputRef = useRef<{ text: string; sort: ProxySortType } | null>(
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
const debounceTimer = useRef<number | null>(null);
|
const debounceTimerRef = useRef<number | null>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let last = 0;
|
let last = 0;
|
||||||
@ -68,9 +68,9 @@ export default function useFilterSort(
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (debounceTimer.current !== null) {
|
if (debounceTimerRef.current !== null) {
|
||||||
window.clearTimeout(debounceTimer.current);
|
window.clearTimeout(debounceTimerRef.current);
|
||||||
debounceTimer.current = null;
|
debounceTimerRef.current = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prev = lastInputRef.current;
|
const prev = lastInputRef.current;
|
||||||
@ -80,15 +80,15 @@ export default function useFilterSort(
|
|||||||
lastInputRef.current = { text: filterText, sort: sortType };
|
lastInputRef.current = { text: filterText, sort: sortType };
|
||||||
|
|
||||||
const delay = stableInputs ? 0 : 150;
|
const delay = stableInputs ? 0 : 150;
|
||||||
debounceTimer.current = window.setTimeout(() => {
|
debounceTimerRef.current = window.setTimeout(() => {
|
||||||
setResult(compute);
|
setResult(compute);
|
||||||
debounceTimer.current = null;
|
debounceTimerRef.current = null;
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (debounceTimer.current !== null) {
|
if (debounceTimerRef.current !== null) {
|
||||||
window.clearTimeout(debounceTimer.current);
|
window.clearTimeout(debounceTimerRef.current);
|
||||||
debounceTimer.current = null;
|
debounceTimerRef.current = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [compute, filterText, sortType]);
|
}, [compute, filterText, sortType]);
|
||||||
|
|||||||
@ -3,12 +3,12 @@ import { listen, UnlistenFn, EventCallback } from "@tauri-apps/api/event";
|
|||||||
import { useCallback, useRef } from "react";
|
import { useCallback, useRef } from "react";
|
||||||
|
|
||||||
export const useListen = () => {
|
export const useListen = () => {
|
||||||
const unlistenFns = useRef<UnlistenFn[]>([]);
|
const unlistenFnsRef = useRef<UnlistenFn[]>([]);
|
||||||
|
|
||||||
const addListener = useCallback(
|
const addListener = useCallback(
|
||||||
async <T>(eventName: string, handler: EventCallback<T>) => {
|
async <T>(eventName: string, handler: EventCallback<T>) => {
|
||||||
const unlisten = await listen(eventName, handler);
|
const unlisten = await listen(eventName, handler);
|
||||||
unlistenFns.current.push(unlisten);
|
unlistenFnsRef.current.push(unlisten);
|
||||||
return unlisten;
|
return unlisten;
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
@ -17,7 +17,7 @@ export const useListen = () => {
|
|||||||
const removeAllListeners = useCallback(() => {
|
const removeAllListeners = useCallback(() => {
|
||||||
const errors: Error[] = [];
|
const errors: Error[] = [];
|
||||||
|
|
||||||
unlistenFns.current.forEach((unlisten) => {
|
unlistenFnsRef.current.forEach((unlisten) => {
|
||||||
try {
|
try {
|
||||||
unlisten();
|
unlisten();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -32,7 +32,7 @@ export const useListen = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlistenFns.current.length = 0;
|
unlistenFnsRef.current.length = 0;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const setupCloseListener = useCallback(async () => {
|
const setupCloseListener = useCallback(async () => {
|
||||||
|
|||||||
@ -109,19 +109,19 @@ export const useLogData = () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const previousLogLevel = useRef<string | undefined>(undefined);
|
const previousLogLevelRef = useRef<string | undefined>(undefined);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!logLevel) {
|
if (!logLevel) {
|
||||||
previousLogLevel.current = logLevel ?? undefined;
|
previousLogLevelRef.current = logLevel ?? undefined;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (previousLogLevel.current === logLevel) {
|
if (previousLogLevelRef.current === logLevel) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
previousLogLevel.current = logLevel;
|
previousLogLevelRef.current = logLevel;
|
||||||
refresh();
|
refresh();
|
||||||
}, [logLevel, refresh]);
|
}, [logLevel, refresh]);
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export const useMihomoWsSubscription = <T>(
|
|||||||
const subscriptionCacheKey = subscriptKey ? `$sub$${subscriptKey}` : null;
|
const subscriptionCacheKey = subscriptKey ? `$sub$${subscriptKey}` : null;
|
||||||
|
|
||||||
const wsRef = useRef<MihomoWebSocket | null>(null);
|
const wsRef = useRef<MihomoWebSocket | null>(null);
|
||||||
const wsFirstConnection = useRef<boolean>(true);
|
const wsFirstConnectionRef = useRef<boolean>(true);
|
||||||
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||||
|
|
||||||
const response = useSWRSubscription<T, any, string | null>(
|
const response = useSWRSubscription<T, any, string | null>(
|
||||||
@ -124,15 +124,15 @@ export const useMihomoWsSubscription = <T>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wsFirstConnection.current || !wsRef.current) {
|
if (wsFirstConnectionRef.current || !wsRef.current) {
|
||||||
wsFirstConnection.current = false;
|
wsFirstConnectionRef.current = false;
|
||||||
cleanupAll();
|
cleanupAll();
|
||||||
void connectWs();
|
void connectWs();
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
isMounted = false;
|
isMounted = false;
|
||||||
wsFirstConnection.current = true;
|
wsFirstConnectionRef.current = true;
|
||||||
cleanupAll();
|
cleanupAll();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@ -126,7 +126,7 @@ const Layout = () => {
|
|||||||
const [menuContextPosition, setMenuContextPosition] =
|
const [menuContextPosition, setMenuContextPosition] =
|
||||||
useState<MenuContextPosition | null>(null);
|
useState<MenuContextPosition | null>(null);
|
||||||
|
|
||||||
const windowControls = useRef<any>(null);
|
const windowControlsRef = useRef<any>(null);
|
||||||
const { decorated } = useWindowDecorations();
|
const { decorated } = useWindowDecorations();
|
||||||
|
|
||||||
const sensors = useSensors(
|
const sensors = useSensors(
|
||||||
@ -206,7 +206,7 @@ const Layout = () => {
|
|||||||
() =>
|
() =>
|
||||||
!decorated ? (
|
!decorated ? (
|
||||||
<div className="the_titlebar" data-tauri-drag-region="true">
|
<div className="the_titlebar" data-tauri-drag-region="true">
|
||||||
<WindowControls ref={windowControls} />
|
<WindowControls ref={windowControlsRef} />
|
||||||
</div>
|
</div>
|
||||||
) : null,
|
) : null,
|
||||||
[decorated],
|
[decorated],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user