From 42479f2265c8a99609ea799f1bef81f694bbe333 Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Mon, 17 Mar 2025 20:23:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=BB=E8=BE=91=EF=BC=8C=E5=8A=A0=E5=85=A5?= =?UTF-8?q?tailwind=E6=94=AF=E6=8C=81=EF=BC=8C=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- README.md | 120 ++++++- package.json | 3 +- pnpm-lock.yaml | 329 ++++++++++++++++-- src/class/VirtualPage.ts | 3 + src/components/miaoDraggableDiv.vue | 18 +- src/components/miaoDropHandler.vue | 4 +- src/main.ts | 1 + src/plugins/browser_llm/browser_llm.vue | 6 + .../components/miaoDirectoryItem.vue | 31 +- src/plugins/miaoImages/miaoImages.vue | 49 +-- src/styles/default.scss | 1 - src/styles/tailwind.css | 1 + vite.config.ts | 4 +- 14 files changed, 477 insertions(+), 95 deletions(-) create mode 100644 src/styles/tailwind.css diff --git a/.gitignore b/.gitignore index bdaa565..7ca7554 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,4 @@ auto-imports.d.ts components.d.ts -src/plugins/onnx_demo +src/plugins/onnx_demo_* diff --git a/README.md b/README.md index 2890010..c670e54 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,122 @@ ## 碎碎念: -写的真潦草 \ No newline at end of file +写的真潦草 + +## 让cursor生成了个架构图,可能不是很专业,不过我看了感觉没啥问题: +``` +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ miaoDirectory前端架构 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ▲ + │ + │ HTTP API通信 + │ +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 后端服务 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ + + +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 应用入口 (App.vue) │ +│ ┌──────────────────────────┐ ┌────────────────────────────┐ ┌────────────────────────────────┐ │ +│ │ 全局状态初始化 │ │ 全局消息提供器 │ │ 全局导航菜单 │ │ +│ │ (初始化各个系统核心实例) │ │ (miaoAlertTipProvider) │ │ │ │ +│ └──────────────┬───────────┘ └─────────────┬──────────────┘ └────────────────────────────────┘ │ +│ │ │ │ +│ ▼ ▼ │ +│ ┌──────────────────────────┐ ┌────────────────────────────┐ │ +│ │ 视图控制器渲染 │ │ 视图容器渲染 │ │ +│ │ (ViewController) │ │ (ViewContainer) │ │ +│ └──────────────────────────┘ └────────────────────────────┘ │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ + │ │ + │ │ + ▼ ▼ +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 多页面系统 │ +│ │ +│ ┌──────────────────────────────────────────┐ ┌───────────────────────────────────────────────┐ │ +│ │ VirtualPages类 │ │ VirtualPage类 │ │ +│ │ ┌────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────┐ │ │ +│ │ │ _views │ │ │ │ component: 页面使用的组件 │ │ │ +│ │ │ (存储所有虚拟页面的响应式数组) │ │ │ │ name: 页面名 │ │ │ +│ │ └────────────────────────────────────┘ │ │ │ visible: 是否可见 │ │ │ +│ │ │ │ │ currentDirectories: 当前使用的目录 │ │ │ +│ │ ┌────────────────────────────────────┐ │ │ │ currentFiles: 当前使用的文件 │ │ │ +│ │ │ getIndex(): 获取页面索引 │ │ │ │ id: 唯一标识符 │ │ │ +│ │ │ getView(): 根据ID获取页面 │ │ │ │ color: 页面颜色 │ │ │ +│ │ │ push(): 添加新页面 │◄──┼────┼─┤ title: 页面标题 │ │ │ +│ │ │ deleteView(): 删除页面 │ │ │ │ exitConfirm: 关闭时是否需要确认 │ │ │ +│ │ │ find(): 查找页面 │ │ │ │ allowCopy: 是否允许复制页面 │ │ │ +│ │ └────────────────────────────────────┘ │ │ └─────────────────────────────────────────┘ │ │ +│ └──────────────────────────────────────────┘ │ │ │ +│ ▲ │ ┌─────────────────────────────────────────┐ │ │ +│ │ │ │ setTitle(): 设置标题 │ │ │ +│ │ │ │ switchShow(): 切换显示状态 │ │ │ +│ │ │ │ refresh(): 刷新页面 │ │ │ +│ │ │ └─────────────────────────────────────────┘ │ │ +│ │ └───────────────────────────────────────────────┘ │ +│ │ ▲ │ +│ │ │ │ +│ useVirtualPages() │ │ +│ (全局单例访问钩子) │ │ +│ │ │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ + │ │ + │ │ + ▼ │ +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 插件系统 │ +│ │ +│ ┌──────────────────────────────────────────┐ ┌───────────────────────────────────────────────┐ │ +│ │ PluginCenter类 │ │ 插件接口定义 │ │ +│ │ ┌────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────┐ │ │ +│ │ │ pluginsMap │ │ │ │ name: 插件名称 │ │ │ +│ │ │ (存储已注册插件的映射表) │ │ │ │ icon: 插件图标 │ │ │ +│ │ └────────────────────────────────────┘ │ │ │ disable: 是否禁用 │ │ │ +│ │ │ │ │ group: 所属插件组 │ │ │ +│ │ ┌────────────────────────────────────┐ │ │ │ priority: 优先级 │ │ │ +│ │ │ register(): 注册插件 │ │ │ │ filter(): 适用性过滤函数 │ │ │ +│ │ │ deregister(): 注销插件 │ │ │ │ func(): 插件主函数 │ │ │ +│ │ │ registerComponent(): 注册组件插件 │ │ │ └─────────────────────────────────────────┘ │ │ +│ │ │ getUsablePlugin(): 获取可用插件 │───┼────┼─► 创建虚拟页面 │ │ +│ │ │ usePlugin(): 使用插件 │ │ │ │ │ +│ │ └────────────────────────────────────┘ │ │ ┌─────────────────────────────────────────┐ │ │ +│ └──────────────────────────────────────────┘ │ │ 插件分组(PluginGroup) │ │ │ +│ ▲ │ │ │ │ │ +│ │ │ │ default: 默认组 │ │ │ +│ │ │ │ mainMenu: 主菜单组 │ │ │ +│ │ │ │ immediately: 立即执行组 │ │ │ +│ │ │ └─────────────────────────────────────────┘ │ │ +│ │ └───────────────────────────────────────────────┘ │ +│ │ │ +│ usePluginCenter() │ +│ (全局单例访问钩子) │ +│ │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ + │ + │ + ▼ +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 虚拟文件系统 │ +│ │ +│ ┌──────────────────────────────────────────┐ ┌───────────────────────────────────────────────┐ │ +│ │ VirtualDirectory类 │ │ VirtualFile类 │ │ +│ │ ┌────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────┐ │ │ +│ │ │ name: 目录名 │ │ │ │ name: 文件名 │ │ │ +│ │ │ path: 完整路径 │ │ │ │ size: 文件大小 │ │ │ +│ │ │ stats: 文件状态信息 │ │ │ │ stats: 文件状态信息 │ │ │ +│ │ │ files: 文件列表 │◄──┼────┼─► parent: 父目录 │ │ │ +│ │ │ directories: 子目录列表 │ │ │ │ id: 唯一标识符 │ │ │ +│ │ │ parent?: 父目录 │ │ │ │ path: 完整路径(计算属性) │ │ │ +│ │ └────────────────────────────────────┘ │ │ └─────────────────────────────────────────┘ │ │ +│ └──────────────────────────────────────────┘ └───────────────────────────────────────────────┘ │ +│ ▲ │ +│ │ │ +│ │ │ +│ useRootVDirectory() │ +│ (获取根目录实例钩子) │ +│ │ +└────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` \ No newline at end of file diff --git a/package.json b/package.json index c52af71..714ac9a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@codemirror/lang-xml": "^6.1.0", "@codemirror/lang-yaml": "^6.1.1", "@mediapipe/tasks-genai": "^0.10.22", - "@mlc-ai/web-llm": "^0.2.78", + "@tailwindcss/vite": "^4.0.13", "@types/sortablejs": "^1.15.8", "@vicons/ionicons5": "^0.12.0", "aes-js": "^3.1.2", @@ -41,6 +41,7 @@ "pdfjs-dist": "^4.5.136", "sass": "^1.77.8", "sortablejs": "^1.15.3", + "tailwindcss": "^4.0.13", "vue": "3.5.0", "vue-codemirror": "^6.1.1", "vue-draggable-plus": "^0.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b01691..3014394 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,9 @@ importers: '@mediapipe/tasks-genai': specifier: ^0.10.22 version: 0.10.22 - '@mlc-ai/web-llm': - specifier: ^0.2.78 - version: 0.2.78 + '@tailwindcss/vite': + specifier: ^4.0.13 + version: 4.0.13(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8)) '@types/sortablejs': specifier: ^1.15.8 version: 1.15.8 @@ -92,6 +92,9 @@ importers: sortablejs: specifier: ^1.15.3 version: 1.15.3 + tailwindcss: + specifier: ^4.0.13 + version: 4.0.13 vue: specifier: 3.5.0 version: 3.5.0(typescript@5.5.4) @@ -125,7 +128,7 @@ importers: version: 2.10.378 '@vitejs/plugin-vue': specifier: ^5.1.2 - version: 5.1.2(vite@5.4.0(@types/node@22.1.0)(sass@1.77.8))(vue@3.5.0(typescript@5.5.4)) + version: 5.1.2(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8))(vue@3.5.0(typescript@5.5.4)) prettier: specifier: ^3.4.2 version: 3.4.2 @@ -146,10 +149,10 @@ importers: version: 28.4.1(@babel/parser@7.25.3)(vue@3.5.0(typescript@5.5.4)) vite: specifier: ^5.4.0 - version: 5.4.0(@types/node@22.1.0)(sass@1.77.8) + version: 5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8) vite-plugin-singlefile: specifier: ^2.0.2 - version: 2.0.2(rollup@4.20.0)(vite@5.4.0(@types/node@22.1.0)(sass@1.77.8)) + version: 2.0.2(rollup@4.20.0)(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8)) vue-tsc: specifier: ^2.0.29 version: 2.0.29(typescript@5.5.4) @@ -442,9 +445,6 @@ packages: '@mediapipe/tasks-genai@0.10.22': resolution: {integrity: sha512-nAFOptwdeg0h3D2jLm4JDR+rTHu9l2Nd7em7HId/2hyUU77jvNFeqwTXC4CNm9oW9+jBUG/6l8wJdhg+T8SrTQ==} - '@mlc-ai/web-llm@0.2.78': - resolution: {integrity: sha512-ptqDNzHnfDyNZj7vjp9IaY5U/QDweXMe5wNzErOmRT1gqj8AaMvcqbj7HroPDzhXJGM7BZpDjANV5MhXhKOosA==} - '@rollup/rollup-android-arm-eabi@4.20.0': resolution: {integrity: sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==} cpu: [arm] @@ -534,6 +534,88 @@ packages: cpu: [x64] os: [win32] + '@tailwindcss/node@4.0.13': + resolution: {integrity: sha512-P9TmtE9Vew0vv5FwyD4bsg/dHHsIsAuUXkenuGUc5gm8fYgaxpdoxIKngCyEMEQxyCKR8PQY5V5VrrKNOx7exg==} + + '@tailwindcss/oxide-android-arm64@4.0.13': + resolution: {integrity: sha512-+9zmwaPQ8A9ycDcdb+hRkMn6NzsmZ4YJBsW5Xqq5EdOu9xlIgmuMuJauVzDPB5BSbIWfhPdZ+le8NeRZpl1coA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.0.13': + resolution: {integrity: sha512-Bj1QGlEJSjs/205CIRfb5/jeveOqzJ4pFMdRxu0gyiYWxBRyxsExXqaD+7162wnLP/EDKh6S1MC9E/1GwEhLtA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.0.13': + resolution: {integrity: sha512-lRTkxjTpMGXhLLM5GjZ0MtjPczMuhAo9j7PeSsaU6Imkm7W7RbrXfT8aP934kS7cBBV+HKN5U19Z0WWaORfb8Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.0.13': + resolution: {integrity: sha512-p/YLyKhs+xFibVeAPlpMGDVMKgjChgzs12VnDFaaqRSJoOz+uJgRSKiir2tn50e7Nm4YYw35q/DRBwpDBNo1MQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.0.13': + resolution: {integrity: sha512-Ua/5ydE/QOTX8jHuc7M9ICWnaLi6K2MV/r+Ws2OppsOjy8tdlPbqYainJJ6Kl7ofm524K+4Fk9CQITPzeIESPw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.0.13': + resolution: {integrity: sha512-/W1+Q6tBAVgZWh/bhfOHo4n7Ryh6E7zYj4bJd9SRbkPyLtRioyK3bi6RLuDj57sa7Amk/DeomSV9iycS0xqIPA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@tailwindcss/oxide-linux-arm64-musl@4.0.13': + resolution: {integrity: sha512-GQj6TWevNxwsYw20FdT2r2d1f7uiRsF07iFvNYxPIvIyPEV74eZ0zgFEsAH1daK1OxPy+LXdZ4grV17P5tVzhQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@tailwindcss/oxide-linux-x64-gnu@4.0.13': + resolution: {integrity: sha512-sQRH09faifF9w9WS6TKDWr1oLi4hoPx0EIWXZHQK/jcjarDpXGQ2DbF0KnALJCwWBxOIP/1nrmU01fZwwMzY3g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@tailwindcss/oxide-linux-x64-musl@4.0.13': + resolution: {integrity: sha512-Or1N8DIF3tP+LsloJp+UXLTIMMHMUcWXFhJLCsM4T7MzFzxkeReewRWXfk5mk137cdqVeUEH/R50xAhY1mOkTQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@tailwindcss/oxide-win32-arm64-msvc@4.0.13': + resolution: {integrity: sha512-u2mQyqCFrr9vVTP6sfDRfGE6bhOX3/7rInehzxNhHX1HYRIx09H3sDdXzTxnZWKOjIg3qjFTCrYFUZckva5PIg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.0.13': + resolution: {integrity: sha512-sOEc4iCanp1Yqyeu9suQcEzfaUcHnqjBUgDg0ZXpjUMUwdSi37S1lu1RGoV1BYInvvGu3y3HHTmvsSfDhx2L8w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.0.13': + resolution: {integrity: sha512-pTH3Ex5zAWC9LbS+WsYAFmkXQW3NRjmvxkKJY3NP1x0KHBWjz0Q2uGtdGMJzsa0EwoZ7wq9RTbMH1UNPceCpWw==} + engines: {node: '>= 10'} + + '@tailwindcss/vite@4.0.13': + resolution: {integrity: sha512-0XTd/NoVUAktIDaA4MdXhve0QWYh7WlZg20EHCuBFR80F8FhbVkRX+AY5cjbUP/IO2itHzt0iHc0iSE5kBUMhQ==} + peerDependencies: + vite: ^5.2.0 || ^6 + '@types/aes-js@3.1.4': resolution: {integrity: sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==} @@ -841,6 +923,10 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + enhanced-resolve@5.18.1: + resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} + engines: {node: '>=10.13.0'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -952,6 +1038,9 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} @@ -1009,12 +1098,84 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} lie@3.1.1: resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} + lightningcss-darwin-arm64@1.29.2: + resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.29.2: + resolution: {integrity: sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.29.2: + resolution: {integrity: sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.29.2: + resolution: {integrity: sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.29.2: + resolution: {integrity: sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.29.2: + resolution: {integrity: sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.29.2: + resolution: {integrity: sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.29.2: + resolution: {integrity: sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.29.2: + resolution: {integrity: sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.29.2: + resolution: {integrity: sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.29.2: + resolution: {integrity: sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==} + engines: {node: '>= 12.0.0'} + linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} @@ -1031,10 +1192,6 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - loglevel@1.9.2: - resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} - engines: {node: '>= 0.6.0'} - magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -1323,6 +1480,13 @@ packages: style-mod@4.1.2: resolution: {integrity: sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==} + tailwindcss@4.0.13: + resolution: {integrity: sha512-gbvFrB0fOsTv/OugXWi2PtflJ4S6/ctu6Mmn3bCftmLY/6xRsQVEJPgIIpABwpZ52DpONkCA3bEj5b54MHxF2Q==} + + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} @@ -1887,10 +2051,6 @@ snapshots: '@mediapipe/tasks-genai@0.10.22': {} - '@mlc-ai/web-llm@0.2.78': - dependencies: - loglevel: 1.9.2 - '@rollup/rollup-android-arm-eabi@4.20.0': optional: true @@ -1939,6 +2099,67 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.20.0': optional: true + '@tailwindcss/node@4.0.13': + dependencies: + enhanced-resolve: 5.18.1 + jiti: 2.4.2 + tailwindcss: 4.0.13 + + '@tailwindcss/oxide-android-arm64@4.0.13': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.0.13': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.0.13': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.0.13': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.0.13': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.0.13': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.0.13': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.0.13': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.0.13': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.0.13': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.0.13': + optional: true + + '@tailwindcss/oxide@4.0.13': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.0.13 + '@tailwindcss/oxide-darwin-arm64': 4.0.13 + '@tailwindcss/oxide-darwin-x64': 4.0.13 + '@tailwindcss/oxide-freebsd-x64': 4.0.13 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.0.13 + '@tailwindcss/oxide-linux-arm64-gnu': 4.0.13 + '@tailwindcss/oxide-linux-arm64-musl': 4.0.13 + '@tailwindcss/oxide-linux-x64-gnu': 4.0.13 + '@tailwindcss/oxide-linux-x64-musl': 4.0.13 + '@tailwindcss/oxide-win32-arm64-msvc': 4.0.13 + '@tailwindcss/oxide-win32-x64-msvc': 4.0.13 + + '@tailwindcss/vite@4.0.13(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8))': + dependencies: + '@tailwindcss/node': 4.0.13 + '@tailwindcss/oxide': 4.0.13 + lightningcss: 1.29.2 + tailwindcss: 4.0.13 + vite: 5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8) + '@types/aes-js@3.1.4': {} '@types/estree@1.0.5': {} @@ -1975,9 +2196,9 @@ snapshots: '@vicons/ionicons5@0.12.0': {} - '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@22.1.0)(sass@1.77.8))(vue@3.5.0(typescript@5.5.4))': + '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8))(vue@3.5.0(typescript@5.5.4))': dependencies: - vite: 5.4.0(@types/node@22.1.0)(sass@1.77.8) + vite: 5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8) vue: 3.5.0(typescript@5.5.4) '@volar/language-core@2.4.0-alpha.18': @@ -2280,8 +2501,7 @@ snapshots: delegates@1.0.0: optional: true - detect-libc@2.0.3: - optional: true + detect-libc@2.0.3: {} downloadjs@1.4.7: {} @@ -2289,6 +2509,11 @@ snapshots: emoji-regex@8.0.0: {} + enhanced-resolve@5.18.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + entities@4.5.0: {} entities@5.0.0: {} @@ -2425,6 +2650,8 @@ snapshots: path-is-absolute: 1.0.1 optional: true + graceful-fs@4.2.11: {} + has-unicode@2.0.1: optional: true @@ -2473,12 +2700,59 @@ snapshots: dependencies: is-docker: 2.2.1 + jiti@2.4.2: {} + js-tokens@9.0.1: {} lie@3.1.1: dependencies: immediate: 3.0.6 + lightningcss-darwin-arm64@1.29.2: + optional: true + + lightningcss-darwin-x64@1.29.2: + optional: true + + lightningcss-freebsd-x64@1.29.2: + optional: true + + lightningcss-linux-arm-gnueabihf@1.29.2: + optional: true + + lightningcss-linux-arm64-gnu@1.29.2: + optional: true + + lightningcss-linux-arm64-musl@1.29.2: + optional: true + + lightningcss-linux-x64-gnu@1.29.2: + optional: true + + lightningcss-linux-x64-musl@1.29.2: + optional: true + + lightningcss-win32-arm64-msvc@1.29.2: + optional: true + + lightningcss-win32-x64-msvc@1.29.2: + optional: true + + lightningcss@1.29.2: + dependencies: + detect-libc: 2.0.3 + optionalDependencies: + lightningcss-darwin-arm64: 1.29.2 + lightningcss-darwin-x64: 1.29.2 + lightningcss-freebsd-x64: 1.29.2 + lightningcss-linux-arm-gnueabihf: 1.29.2 + lightningcss-linux-arm64-gnu: 1.29.2 + lightningcss-linux-arm64-musl: 1.29.2 + lightningcss-linux-x64-gnu: 1.29.2 + lightningcss-linux-x64-musl: 1.29.2 + lightningcss-win32-arm64-msvc: 1.29.2 + lightningcss-win32-x64-msvc: 1.29.2 + linkify-it@5.0.0: dependencies: uc.micro: 2.1.0 @@ -2497,8 +2771,6 @@ snapshots: lodash@4.17.21: {} - loglevel@1.9.2: {} - magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -2819,6 +3091,10 @@ snapshots: style-mod@4.1.2: {} + tailwindcss@4.0.13: {} + + tapable@2.2.1: {} + tar@6.2.1: dependencies: chownr: 2.0.0 @@ -2917,13 +3193,13 @@ snapshots: evtd: 0.2.4 vue: 3.5.0(typescript@5.5.4) - vite-plugin-singlefile@2.0.2(rollup@4.20.0)(vite@5.4.0(@types/node@22.1.0)(sass@1.77.8)): + vite-plugin-singlefile@2.0.2(rollup@4.20.0)(vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8)): dependencies: micromatch: 4.0.7 rollup: 4.20.0 - vite: 5.4.0(@types/node@22.1.0)(sass@1.77.8) + vite: 5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8) - vite@5.4.0(@types/node@22.1.0)(sass@1.77.8): + vite@5.4.0(@types/node@22.1.0)(lightningcss@1.29.2)(sass@1.77.8): dependencies: esbuild: 0.21.5 postcss: 8.4.41 @@ -2931,6 +3207,7 @@ snapshots: optionalDependencies: '@types/node': 22.1.0 fsevents: 2.3.3 + lightningcss: 1.29.2 sass: 1.77.8 vooks@0.2.12(vue@3.5.0(typescript@5.5.4)): diff --git a/src/class/VirtualPage.ts b/src/class/VirtualPage.ts index 1af2e36..c865bec 100644 --- a/src/class/VirtualPage.ts +++ b/src/class/VirtualPage.ts @@ -42,6 +42,7 @@ export default class VirtualPage { this.color = getRandomWebSafeColor() this.exitConfirm = initObjects?.option?.exitConfirm ?? false this.allowCopy = initObjects?.option?.allowCopy ?? true + this.pageStorage = {} } // 页面使用的组件 component: Component @@ -53,6 +54,8 @@ export default class VirtualPage { currentDirectories: VirtualDirectory[] // 当前正在使用的文件 currentFiles: VirtualFile[] + // 页面数据存储 + pageStorage: { [key: string]: any } // 区分每一个页面的唯一id id: number // 当refreshKey改变时需要刷新页面,目前还没接入刷新 diff --git a/src/components/miaoDraggableDiv.vue b/src/components/miaoDraggableDiv.vue index 52b9790..4795ef0 100644 --- a/src/components/miaoDraggableDiv.vue +++ b/src/components/miaoDraggableDiv.vue @@ -1,17 +1,20 @@