temp
This commit is contained in:
parent
ab204155f8
commit
ef83dc5a30
@ -8,7 +8,6 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="a-[123]">sdfsdf</div>
|
||||
<script src="./src/main.tsx" type="module"></script>
|
||||
</body>
|
||||
|
||||
|
21
package.json
21
package.json
@ -12,29 +12,30 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@kevisual/router": "0.0.6-alpha-2",
|
||||
"@kevisual/store": "0.0.1-alpha.7",
|
||||
"@kevisual/router": "0.0.7",
|
||||
"@kevisual/store": "0.0.1",
|
||||
"@kevisual/tab-leader": "^0.0.1",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"clsx": "^2.1.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"highlight.js": "^11.10.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"immer": "^10.1.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^15.0.3",
|
||||
"marked": "^15.0.7",
|
||||
"marked-highlight": "^2.2.1",
|
||||
"nanoid": "^5.0.9",
|
||||
"nanoid": "^5.1.2",
|
||||
"react": "^19.0.0",
|
||||
"zustand": "^5.0.2"
|
||||
"zustand": "^5.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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/react": "^19.0.1",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/umami": "^2.10.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"tailwindcss": "^3.4.16",
|
||||
"vite": "^6.0.3"
|
||||
"tailwindcss": "^4.0.9",
|
||||
"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
39
src/main.css
39
src/main.css
@ -1,21 +1,28 @@
|
||||
@tailwind components;
|
||||
@import 'tailwindcss';
|
||||
|
||||
@layer components {
|
||||
.chat-message {
|
||||
@apply flex flex-col gap-2;
|
||||
.chat-message {
|
||||
@apply flex flex-col gap-2;
|
||||
.message-content {
|
||||
@apply px-8 mt-2;
|
||||
}
|
||||
.message-user {
|
||||
@apply flex-row-reverse;
|
||||
.message-content-wrapper {
|
||||
@apply max-w-[66%];
|
||||
}
|
||||
.message-content {
|
||||
@apply px-8 mt-2;
|
||||
}
|
||||
.message-user {
|
||||
@apply flex-row-reverse;
|
||||
.message-content-wrapper {
|
||||
@apply max-w-[66%];
|
||||
}
|
||||
.message-content {
|
||||
@apply bg-gray-200 px-4 py-2 rounded-lg;
|
||||
}
|
||||
}
|
||||
.message-assistant {
|
||||
@apply bg-gray-200 px-4 py-2 rounded-lg;
|
||||
}
|
||||
}
|
||||
.message-assistant {
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { h } from '@/h';
|
||||
import '@build/tailwind/main.css';
|
||||
import './main.css';
|
||||
// tab的app-routes模块
|
||||
// import './tab';
|
||||
import './app.ts';
|
||||
import { start } from '@kevisual/tab-leader';
|
||||
import './page/index.css';
|
||||
import './main.css';
|
||||
|
||||
import { Page } from '@kevisual/store/page';
|
||||
import { useContextKey } from '@kevisual/store/config';
|
||||
|
@ -119,18 +119,18 @@ export const AiChat = () => {
|
||||
return (
|
||||
<div
|
||||
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) => {
|
||||
// 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'>
|
||||
<h1 className='text-2xl font-bold text-gray-800 text-center'>AI聊天</h1>
|
||||
<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'>kevisual助手</h1>
|
||||
<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='ai-message-bottom mb-4'></div>
|
||||
<div className='flex w-full sticky justify-center bottom-0'>
|
||||
<div className='w-[80%] flex flex-col gap-2 '>
|
||||
<label htmlFor='inputField' className='text-lg font-medium text-gray-700'>
|
||||
<label htmlFor='inputField' className='text-lg font-medium text-gray-700'>
|
||||
输入框
|
||||
</label>
|
||||
<textarea
|
||||
@ -145,7 +145,7 @@ export const AiChat = () => {
|
||||
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='请输入内容'
|
||||
/>
|
||||
<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 path from 'path';
|
||||
// import react from '@vitejs/plugin-react';
|
||||
import tailwindcss from 'tailwindcss';
|
||||
import autoprefixer from 'autoprefixer';
|
||||
import nesting from 'tailwindcss/nesting';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
import pkgs from './package.json' with { type: 'json' };
|
||||
const version = pkgs.version || '0.0.1';
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
console.log('isDev', isDev);
|
||||
export default defineConfig({
|
||||
root: '.',
|
||||
css: {
|
||||
postcss: {
|
||||
// @ts-ignore
|
||||
plugins: [nesting, tailwindcss, autoprefixer],
|
||||
},
|
||||
},
|
||||
plugins: [tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user