temp
This commit is contained in:
parent
59b4683b64
commit
73de223d56
60
package.json
60
package.json
@ -5,7 +5,8 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"build": "vite build",
|
||||
"dev:kv": "cross-env VITE_USE_KV=true vite",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview",
|
||||
"prune": "pnpm store prune && rimraf node_modules/.vite",
|
||||
@ -13,18 +14,18 @@
|
||||
"pub": "pnpm run build && pnpm run deploy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kevisual/container": "0.0.2-alpha.1",
|
||||
"@abearxiong/flows": "0.0.1-alpha.9",
|
||||
"@abearxiong/ui": "0.0.1-alpha.0",
|
||||
"@ant-design/icons": "^5.5.1",
|
||||
"@ant-design/icons": "^5.5.2",
|
||||
"@icon-park/react": "^1.4.2",
|
||||
"@kevisual/codemirror": "^0.0.2",
|
||||
"@kevisual/container": "1.0.0",
|
||||
"@kevisual/query": "^0.0.6",
|
||||
"@kevisual/ui": "^0.0.2",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@uiw/react-textarea-code-editor": "^3.1.0",
|
||||
"@xyflow/react": "^12.3.2",
|
||||
"antd": "^5.21.4",
|
||||
"@xyflow/react": "^12.3.6",
|
||||
"antd": "^5.22.7",
|
||||
"classnames": "^2.5.1",
|
||||
"clsx": "^2.1.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
@ -32,42 +33,43 @@
|
||||
"eventemitter3": "^5.0.1",
|
||||
"immer": "^10.1.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^14.1.3",
|
||||
"nanoid": "^5.0.7",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-resizable-panels": "^2.1.4",
|
||||
"react-router": "^6.27.0",
|
||||
"react-router-dom": "^6.27.0",
|
||||
"react-toastify": "^10.0.6",
|
||||
"marked": "^15.0.5",
|
||||
"nanoid": "^5.0.9",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-resizable-panels": "^2.1.7",
|
||||
"react-router": "^7.1.1",
|
||||
"react-router-dom": "^7.1.1",
|
||||
"react-toastify": "^11.0.2",
|
||||
"vite-plugin-tsconfig-paths": "^1.4.1",
|
||||
"zustand": "^5.0.0"
|
||||
"zustand": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.13.0",
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.2",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.7.7",
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"@types/react": "^19.0.2",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.12",
|
||||
"globals": "^15.11.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.16",
|
||||
"globals": "^15.14.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"postcss-import": "^16.1.0",
|
||||
"pretty-bytes": "^6.1.1",
|
||||
"react-is": "^18.3.1",
|
||||
"tailwind-merge": "^2.5.4",
|
||||
"tailwindcss": "^3.4.14",
|
||||
"react-is": "18.3.1",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.6.3",
|
||||
"typescript-eslint": "^8.10.0",
|
||||
"vite": "^5.4.9"
|
||||
"typescript": "^5.7.2",
|
||||
"typescript-eslint": "^8.19.0",
|
||||
"vite": "^6.0.7"
|
||||
}
|
||||
}
|
1959
pnpm-lock.yaml
generated
1959
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ import { App as UserAppApp } from './pages/app';
|
||||
import { App as FileApp } from './pages/file';
|
||||
import { App as OrgApp } from './pages/org';
|
||||
|
||||
import '@kevisual/container/container.css';
|
||||
// import '@kevisual/container/container.css';
|
||||
|
||||
export const App = () => {
|
||||
return (
|
||||
|
@ -27,7 +27,7 @@ import { NodeProperties } from './properties/NodeProperties';
|
||||
import { emitter } from '@kevisual/container';
|
||||
// router: Router
|
||||
const nodeTypes = {
|
||||
container: Container,
|
||||
// container: Container,
|
||||
};
|
||||
|
||||
export const Flow = () => {
|
||||
@ -139,7 +139,7 @@ const ReactFlowApp = () => {
|
||||
message.error('developing');
|
||||
},
|
||||
});
|
||||
const { onNeedAdd, onAdd, onMouseMove, adding } = useAddNode();
|
||||
// const { onNeedAdd, onAdd, onMouseMove, adding } = useAddNode();
|
||||
const onSave = useCallback(() => {
|
||||
panelStore.saveNodesEdges({
|
||||
nodes,
|
||||
@ -171,15 +171,15 @@ const ReactFlowApp = () => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
onPaneClick={(e) => {
|
||||
if (adding) {
|
||||
onAdd();
|
||||
}
|
||||
// if (adding) {
|
||||
// onAdd();
|
||||
// }
|
||||
}}
|
||||
onNodeContextMenu={(e, node) => {
|
||||
console.log('context menu', e, node);
|
||||
onContextMenu(e as any, node);
|
||||
}}
|
||||
onMouseMove={(e) => onMouseMove(e)}
|
||||
// onMouseMove={(e) => onMouseMove(e)}
|
||||
onClick={(e) => {
|
||||
onClose();
|
||||
}}>
|
||||
@ -194,7 +194,7 @@ const ReactFlowApp = () => {
|
||||
<Button
|
||||
icon={<PlusOutlined />}
|
||||
onClick={(e) => {
|
||||
onNeedAdd({ id: 'flow' + generateId(), data: { label: '容器' }, type: 'container' }, e);
|
||||
// onNeedAdd({ id: 'flow' + generateId(), data: { label: '容器' }, type: 'container' }, e);
|
||||
}}></Button>
|
||||
</Tooltip>
|
||||
<Tooltip title='save'>
|
||||
|
@ -4,7 +4,7 @@ import { usePanelStore } from '../store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { DialogModal } from '@kevisual/ui';
|
||||
import '@kevisual/ui';
|
||||
// import '@kevisual/ui';
|
||||
export const App = () => {
|
||||
const param = useParams();
|
||||
const id = param.id;
|
||||
|
@ -13,11 +13,11 @@ export const NodeProperties = () => {
|
||||
const reactflow = useReactFlow();
|
||||
const [open, setOpen] = useState(false);
|
||||
const [form] = Form.useForm();
|
||||
const panelStore = usePanelStore((state) => {
|
||||
const panelStore = usePanelStore(useShallow((state) => {
|
||||
return {
|
||||
updateNodeData: state.updateNodeData,
|
||||
};
|
||||
});
|
||||
}));
|
||||
const aiStore = useAiStore(
|
||||
useShallow((state) => {
|
||||
return {
|
||||
@ -36,7 +36,7 @@ export const NodeProperties = () => {
|
||||
return item;
|
||||
});
|
||||
// console.log('newNodes', newNodes);
|
||||
// state.setNodes(newNodes); // 会丢失数据,因为最终没有调用context的setNodes方法
|
||||
state.setNodes(newNodes); // 会丢失数据,因为最终没有调用context的setNodes方法
|
||||
emitter.emit('setNodes', newNodes);
|
||||
};
|
||||
return {
|
||||
|
2
theme
2
theme
@ -1 +1 @@
|
||||
Subproject commit c5a509e4e8a63b19e4e5fbbc5a142d550957ed8a
|
||||
Subproject commit 6c8effeaf330690d23ac4810cec84caface2ca5f
|
@ -5,6 +5,7 @@ import autoprefixer from 'autoprefixer';
|
||||
import path from 'path';
|
||||
import nesting from 'tailwindcss/nesting';
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isKV = process.env.VITE_USE_KV === 'true';
|
||||
const unamiPlugin = {
|
||||
name: 'html-transform',
|
||||
transformIndexHtml(html: string) {
|
||||
@ -18,17 +19,36 @@ const plugins = [];
|
||||
if (!isDev) {
|
||||
plugins.push(unamiPlugin);
|
||||
}
|
||||
let proxy = {};
|
||||
if (isKV) {
|
||||
proxy = {
|
||||
'/api': {
|
||||
target: 'https://envision.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/api/router': {
|
||||
target: 'wss://envision.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewriteWsOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/resources': {
|
||||
target: 'https://envision.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/resources/, '/resources'),
|
||||
},
|
||||
};
|
||||
}
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), ...plugins],
|
||||
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
nesting, // 作用是可以使用@import导入css文件
|
||||
tailwindcss,
|
||||
autoprefixer,
|
||||
],
|
||||
// @ts-ignore
|
||||
plugins: [nesting, tailwindcss, autoprefixer],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
@ -60,6 +80,7 @@ export default defineConfig({
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/resources/, '/resources'),
|
||||
},
|
||||
...proxy,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user