This commit is contained in:
熊潇 2025-05-17 01:11:48 +08:00
parent 0bc4d054d9
commit 5b0c87520d
12 changed files with 1260 additions and 1955 deletions

View File

@ -1,21 +1,12 @@
{
"name": "Node.js 22 Development Environment",
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
"runArgs": [
"--env",
"TZ=Asia/Shanghai"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "/bin/bash"
"terminal.integrated.env.linux": {
"TZ": "Asia/Shanghai"
}
},
"remoteEnv": {
"TZ": "Asia/Shanghai"
},
"name": "kevisual dev",
"image": "docker.cnb.cool/kevisual/dev-env:latest",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint"
],
"postCreateCommand": "sudo ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai | sudo tee /etc/timezone && pnpm install -g @kevisual/envision-cli@latest && npm install"
]
}
},
"postCreateCommand": ""
}

View File

@ -1,31 +0,0 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/no-explicit-any': 'off',
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
'@typescript-eslint/no-unused-vars': 'off',
'no-debugger': 'off',
},
},
);

View File

@ -1,62 +1,50 @@
{
"name": "assistant-base-app",
"private": true,
"version": "0.0.1",
"version": "0.0.2",
"type": "module",
"basename": "/root/assistant-base-app",
"scripts": {
"dev": "vite",
"dev:web": "cross-env WEB_DEV=true vite --mode web",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
"pub": "envision deploy ./dist -k assistant-base-app -v 0.0.1 ",
"pub": "envision deploy ./dist -k assistant-base-app -v 0.0.2 -o root ",
"ev": "npm run build && npm run deploy"
},
"stackblitz": {
"startCommand": "npm dev:web"
},
"author": "abearxiong <xiongxiao@xiongxiao.me>",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^5.6.1",
"@kevisual/query": "0.0.7-alpha.3",
"@kevisual/router": "0.0.7",
"@kevisual/system-ui": "^0.0.3",
"@kevisual/ui": "^0.0.4-alpha-1",
"antd": "^5.24.2",
"@ant-design/icons": "^6.0.0",
"@kevisual/query": "0.0.18",
"@kevisual/query-awesome": "^0.0.1",
"@kevisual/router": "0.0.20",
"antd": "^5.25.1",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"immer": "^10.1.1",
"lodash-es": "^4.17.21",
"lucide": "^0.479.0",
"lucide-react": "^0.479.0",
"nanoid": "^5.1.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.2.0",
"react-router-dom": "^7.2.0",
"lucide-react": "^0.511.0",
"nanoid": "^5.1.5",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router": "^7.6.0",
"react-router-dom": "^7.6.0",
"react-toastify": "^11.0.5",
"zustand": "^5.0.3"
"zustand": "^5.0.4"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
"@kevisual/types": "^0.0.6",
"@tailwindcss/vite": "^4.0.9",
"@types/node": "^22.13.5",
"@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-refresh": "^0.4.19",
"globals": "^16.0.0",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.9",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.3",
"typescript-eslint": "^8.25.0",
"vite": "^6.2.0"
}
"@kevisual/types": "^0.0.10",
"@tailwindcss/vite": "^4.1.7",
"@types/node": "^22.15.18",
"@types/react": "^19.1.4",
"@types/react-dom": "^19.1.5",
"@vitejs/plugin-basic-ssl": "^2.0.0",
"@vitejs/plugin-react": "^4.4.1",
"globals": "^16.1.0",
"tailwindcss": "^4.1.7",
"typescript": "^5.8.3",
"vite": "^6.3.5"
},
"packageManager": "pnpm@10.11.0"
}

2977
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,2 @@
onlyBuiltDependencies:
- '@tailwindcss/oxide'

View File

@ -1,4 +1,5 @@
import { QueryClient } from '@kevisual/query';
export const client = new QueryClient({
url: '/client/router',
io: false,

View File

@ -75,8 +75,9 @@ export const PackageManager = () => {
window.open(`${baseUrl}${path}`, '_blank');
};
const handleOpenClientWindow = (pkg: Package) => {
if (!pageApi) return;
const baseUrl = pageApi;
// if (!pageApi) return;
// const baseUrl = pageApi;
const baseUrl = new URL(window.location.href).origin;
const path = `/${pkg.user}/${pkg.key}`;
window.open(`${baseUrl}${path}`, '_blank');
};

View File

@ -38,10 +38,15 @@ export const usePackageStore = create<PackageStore>((set, get) => ({
},
getShopPackages: async () => {
// path=app&key=public-list
const res = await query.post({
const res = await query.post(
{
path: 'app',
key: 'public-list',
});
},
{
url: 'https://kevisual.silkyai.cn/api/router',
},
);
if (res.code === 200) {
set({ shopPackages: res.data });
}

7
src/test/q.ts Normal file
View File

@ -0,0 +1,7 @@
import { Query } from '@kevisual/query';
import { QueryApp } from '@kevisual/query-awesome/query-app.mjs';
const query = new Query();
const qa = new QueryApp({ query });
console.log(qa.appDefine.get('getApp'));

View File

@ -1,43 +0,0 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
// "jsx": "react",
// "jsxFragmentFactory": "Fragment",
// "jsxFactory": "h",
"jsx": "react-jsx",
"baseUrl": "./",
"typeRoots": [
"node_modules/@types",
"node_modules/@kevisual/types",
],
"paths": {
"@/*": [
"src/*"
]
},
/* Linting */
"strict": true,
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true
},
"include": [
"src",
"typings.d.ts"
]
}

View File

@ -1,7 +1,18 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
"extends": "@kevisual/types/json/frontend.json",
"compilerOptions": {
"baseUrl": ".",
"typeRoots": [
"./node_modules/@types",
"./node_modules/@kevisual"
],
"paths": {
"@/*": [
"src/*"
]
},
},
"include": [
"src/**/*",
],
}

View File

@ -1,22 +0,0 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["vite.config.ts"]
}