temp
This commit is contained in:
parent
ab204155f8
commit
ef83dc5a30
@ -8,7 +8,6 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="a-[123]">sdfsdf</div>
|
|
||||||
<script src="./src/main.tsx" type="module"></script>
|
<script src="./src/main.tsx" type="module"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
21
package.json
21
package.json
@ -12,29 +12,30 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kevisual/router": "0.0.6-alpha-2",
|
"@kevisual/router": "0.0.7",
|
||||||
"@kevisual/store": "0.0.1-alpha.7",
|
"@kevisual/store": "0.0.1",
|
||||||
"@kevisual/tab-leader": "^0.0.1",
|
"@kevisual/tab-leader": "^0.0.1",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"eventemitter3": "^5.0.1",
|
"eventemitter3": "^5.0.1",
|
||||||
"highlight.js": "^11.10.0",
|
"highlight.js": "^11.11.1",
|
||||||
"immer": "^10.1.1",
|
"immer": "^10.1.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"marked": "^15.0.3",
|
"marked": "^15.0.7",
|
||||||
"marked-highlight": "^2.2.1",
|
"marked-highlight": "^2.2.1",
|
||||||
"nanoid": "^5.0.9",
|
"nanoid": "^5.1.2",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"zustand": "^5.0.2"
|
"zustand": "^5.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@build/tailwind": "1.0.2-alpha-2",
|
"@build/tailwind": "1.0.2-alpha-2",
|
||||||
"@kevisual/types": "^0.0.3",
|
"@kevisual/types": "^0.0.6",
|
||||||
|
"@tailwindcss/vite": "^4.0.9",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/react": "^19.0.1",
|
"@types/react": "^19.0.10",
|
||||||
"@types/umami": "^2.10.0",
|
"@types/umami": "^2.10.0",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"tailwindcss": "^3.4.16",
|
"tailwindcss": "^4.0.9",
|
||||||
"vite": "^6.0.3"
|
"vite": "^6.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
1659
pnpm-lock.yaml
generated
Normal file
1659
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
src/main.css
15
src/main.css
@ -1,7 +1,6 @@
|
|||||||
@tailwind components;
|
@import 'tailwindcss';
|
||||||
|
|
||||||
@layer components {
|
.chat-message {
|
||||||
.chat-message {
|
|
||||||
@apply flex flex-col gap-2;
|
@apply flex flex-col gap-2;
|
||||||
.message-content {
|
.message-content {
|
||||||
@apply px-8 mt-2;
|
@apply px-8 mt-2;
|
||||||
@ -17,5 +16,13 @@
|
|||||||
}
|
}
|
||||||
.message-assistant {
|
.message-assistant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { h } from '@/h';
|
import { h } from '@/h';
|
||||||
import '@build/tailwind/main.css';
|
import './main.css';
|
||||||
// tab的app-routes模块
|
// tab的app-routes模块
|
||||||
// import './tab';
|
// import './tab';
|
||||||
import './app.ts';
|
import './app.ts';
|
||||||
import { start } from '@kevisual/tab-leader';
|
import { start } from '@kevisual/tab-leader';
|
||||||
import './page/index.css';
|
import './page/index.css';
|
||||||
import './main.css';
|
|
||||||
|
|
||||||
import { Page } from '@kevisual/store/page';
|
import { Page } from '@kevisual/store/page';
|
||||||
import { useContextKey } from '@kevisual/store/config';
|
import { useContextKey } from '@kevisual/store/config';
|
||||||
|
@ -119,12 +119,12 @@ export const AiChat = () => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className='w-full h-full bg-blue-400 flex justify-center'
|
className='w-full h-full bg-gray-100 flex justify-center'
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
// console.log('onLoad======', e, ref.current);
|
// console.log('onLoad======', e, ref.current);
|
||||||
}}>
|
}}>
|
||||||
<div className='w-[80%] border p-2 shadow bg-white mt-2 mb-2 rounded-lg flex flex-col'>
|
<div className='w-[80%] border border-gray-200 p-2 shadow bg-white mt-2 mb-2 rounded-lg flex flex-col'>
|
||||||
<h1 className='text-2xl font-bold text-gray-800 text-center'>AI聊天</h1>
|
<h1 className='text-2xl font-bold text-gray-800 text-center'>kevisual助手</h1>
|
||||||
<div className='relative flex-grow overflow-auto scrollbar' ref={scrollContainer}>
|
<div className='relative flex-grow overflow-auto scrollbar' ref={scrollContainer}>
|
||||||
<div className='message mt-2 mb-5 m-h-[40px]' id='ai-message-content' ref={aiMessageRef}></div>
|
<div className='message mt-2 mb-5 m-h-[40px]' id='ai-message-content' ref={aiMessageRef}></div>
|
||||||
<div className='ai-message-bottom mb-4'></div>
|
<div className='ai-message-bottom mb-4'></div>
|
||||||
@ -145,7 +145,7 @@ export const AiChat = () => {
|
|||||||
onSend();
|
onSend();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className='w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition duration-200'
|
className='w-full px-4 py-2 border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition duration-200'
|
||||||
placeholder='请输入内容'
|
placeholder='请输入内容'
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
import path from 'path';
|
|
||||||
|
|
||||||
const root = path.resolve(process.cwd());
|
|
||||||
const contents = ['./src/**/*.{ts,tsx,html}', './src/**/*.css'];
|
|
||||||
const content = contents.map((item) => path.join(root, item));
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
export default {
|
|
||||||
// darkMode: ['class'],
|
|
||||||
content: contents,
|
|
||||||
plugins: [
|
|
||||||
require('@tailwindcss/aspect-ratio'), //
|
|
||||||
require('@tailwindcss/typography'),
|
|
||||||
require('tailwindcss-animate'),
|
|
||||||
require('@build/tailwind'),
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
extend: {
|
|
||||||
fontFamily: {
|
|
||||||
mon: ['Montserrat', 'sans-serif'], // 定义自定义字体族
|
|
||||||
rob: ['Roboto', 'sans-serif'],
|
|
||||||
int: ['Inter', 'sans-serif'],
|
|
||||||
orb: ['Orbitron', 'sans-serif'],
|
|
||||||
din: ['DIN', 'sans-serif'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
screen: {
|
|
||||||
sm: '640px',
|
|
||||||
// => @media (min-width: 640px) { ... }
|
|
||||||
|
|
||||||
md: '768px',
|
|
||||||
// => @media (min-width: 768px) { ... }
|
|
||||||
|
|
||||||
lg: '1024px',
|
|
||||||
// => @media (min-width: 1024px) { ... }
|
|
||||||
|
|
||||||
xl: '1280px',
|
|
||||||
// => @media (min-width: 1280px) { ... }
|
|
||||||
|
|
||||||
'2xl': '1536px',
|
|
||||||
// => @media (min-width: 1536px) { ... }
|
|
||||||
'3xl': '1920px',
|
|
||||||
// => @media (min-width: 1920) { ... }
|
|
||||||
'4xl': '2560px',
|
|
||||||
// => @media (min-width: 2560) { ... }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
@ -1,21 +1,14 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
// import react from '@vitejs/plugin-react';
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
import tailwindcss from 'tailwindcss';
|
|
||||||
import autoprefixer from 'autoprefixer';
|
|
||||||
import nesting from 'tailwindcss/nesting';
|
|
||||||
import pkgs from './package.json' with { type: 'json' };
|
import pkgs from './package.json' with { type: 'json' };
|
||||||
const version = pkgs.version || '0.0.1';
|
const version = pkgs.version || '0.0.1';
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
console.log('isDev', isDev);
|
console.log('isDev', isDev);
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
root: '.',
|
root: '.',
|
||||||
css: {
|
plugins: [tailwindcss()],
|
||||||
postcss: {
|
|
||||||
// @ts-ignore
|
|
||||||
plugins: [nesting, tailwindcss, autoprefixer],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user