This commit is contained in:
abearxiong 2025-03-02 22:49:17 +08:00
parent d2c13c43a8
commit f8b874ae61
6 changed files with 651 additions and 191 deletions

View File

@ -24,11 +24,12 @@
"@ant-design/icons": "^5.6.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@kevisual/query": "0.0.7-alpha.3",
"@kevisual/router": "0.0.6",
"@kevisual/cache": "^0.0.1",
"@kevisual/query": "0.0.9-alpha.2",
"@kevisual/router": "0.0.7",
"@kevisual/system-ui": "^0.0.3",
"@kevisual/ui": "^0.0.4-alpha-1",
"@mui/material": "^6.4.5",
"@mui/material": "^6.4.6",
"@tiptap/core": "^2.11.5",
"@tiptap/extension-code-block-lowlight": "^2.11.5",
"@tiptap/extension-highlight": "^2.11.5",
@ -36,7 +37,7 @@
"@tiptap/starter-kit": "^2.11.5",
"@types/lodash-es": "^4.17.12",
"@types/turndown": "^5.0.5",
"@xyflow/react": "^12.4.3",
"@xyflow/react": "^12.4.4",
"antd": "^5.24.2",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
@ -47,7 +48,7 @@
"immer": "^10.1.1",
"lodash-es": "^4.17.21",
"lowlight": "^3.3.0",
"lucide-react": "^0.475.0",
"lucide-react": "^0.477.0",
"marked": "^15.0.7",
"nanoid": "^5.1.2",
"react": "^19.0.0",
@ -62,20 +63,20 @@
"devDependencies": {
"@eslint/js": "^9.21.0",
"@kevisual/types": "^0.0.6",
"@tailwindcss/vite": "^4.0.8",
"@types/node": "^22.13.5",
"@tailwindcss/vite": "^4.0.9",
"@types/node": "^22.13.8",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@vitejs/plugin-basic-ssl": "^1.2.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.21.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.8",
"tailwindcss": "^4.0.9",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.3",
"typescript": "^5.8.2",
"typescript-eslint": "^8.25.0",
"vite": "^6.2.0"
}

799
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,14 @@
import { useReactFlow } from '@xyflow/react';
import { useEffect } from 'react';
import { useWallStore } from '../store/wall';
import { useShallow } from 'zustand/react/shallow';
export const useTabNode = () => {
const reactFlowInstance = useReactFlow();
const open = useWallStore(useShallow((state) => state.open));
useEffect(() => {
if (open) return;
const listener = (event: any) => {
if (event.key === 'Tab') {
console.log('tab');
const nodes = reactFlowInstance.getNodes();
const selectedNode = nodes.find((node) => node.selected);
if (!selectedNode) return;
@ -58,5 +60,5 @@ export const useTabNode = () => {
return () => {
window.removeEventListener('keydown', listener);
};
}, [reactFlowInstance]);
}, [reactFlowInstance, open]);
};

View File

@ -1,14 +1,16 @@
import { get, set, clear } from 'idb-keyval';
import { MyCache } from '@kevisual/cache';
const cache = new MyCache('cacheWall');
export async function getWallData() {
const data = await get('cacheWall');
const data = await cache.getData();
return data;
}
export async function setWallData(data: any) {
await set('cacheWall', data);
await cache.setData(data);
}
export async function clearWallData() {
await clear();
await cache.del();
}

1
template/app.ts Normal file
View File

@ -0,0 +1 @@
import { QueryAI } from '@kevisual/query/query-ai';

View File

@ -26,7 +26,8 @@ if(isKevisual) {
changeOrigin: true,
},
'/api/router': {
target: 'ws://localhost:3000',
// target: 'ws://localhost:3000',
target: 'https://kevisual.xiongxiao.me',
changeOrigin: true,
ws: true,
rewriteWsOrigin: true,