diff --git a/docs/components/attachment-selector.md b/docs/components/attachment-selector.md new file mode 100644 index 0000000..54422cb --- /dev/null +++ b/docs/components/attachment-selector.md @@ -0,0 +1,36 @@ +# AttachmentSelector 附件选择器 + +用于展示、预览和选择图片、视频及其他附件。组件只管理界面状态;上传、删除保存和业务分类由调用方处理。 + +## 基础用法 + +```vue + +``` + +`select` 事件携带文件、原生输入框和选择来源。调用方完成上传后,将附件列表写回 `items`。组件不会发起网络请求,也不会替调用方保存删除操作。 + +`select-start` 在打开文件选择器之前触发,携带 `file`、`photo` 或 `video` 来源,可用于在用户选完文件前设置业务分类。 + +## 附件条目 + +`AttachmentSelectorItem` 至少包含 `url`。`previewUrl` 可指定原始预览地址,`thumbnailUrl` 可指定缩略图,`mimeType` 和 `name` 用于识别及展示文件。未知业务字段会随条目更新一并保留。 + +图片和视频由组件预览。其他文件显示文件卡片,并通过 `open` 事件交由调用方打开。 + +## 自定义操作 + +- 默认操作包含“拍摄”菜单(拍照片、录视频)和“选择”按钮。 +- `capture-actions` 插槽可在默认拍摄菜单中追加业务操作,作用域提供 `capturePhoto` 方法。调用该方法会按拍照片流程打开相机。 +- `add-actions` 插槽可替换整个默认操作区域,并获得 `selectFiles`、`capturePhoto`、`captureVideo` 方法。只需增加拍摄菜单项时,优先使用 `capture-actions`。 +- `item-label` 插槽可展示业务分类或其他标签。 +- `item-actions` 插槽可替换条目角标操作。 +- `viewer-actions` 插槽可在预览器中加入业务操作,作用域包含当前条目、原列表索引和关闭预览的 `close` 方法。 + +## API + + diff --git a/docs/components/index.md b/docs/components/index.md index 86222f6..ad720cd 100644 --- a/docs/components/index.md +++ b/docs/components/index.md @@ -1,6 +1,6 @@ # 组件总览 -共 16 个组件,分为布局、编辑器、交互与 AI 对话四类。 +共 17 个组件,分为布局、编辑器、交互与 AI 对话四类。 ## 布局组件 @@ -28,6 +28,7 @@ | --- | --- | | [BottomPopup](/components/bottom-popup) | 从底部升起的操作面板,可带标题与左右按钮。 | | [DurationPicker](/components/duration-picker) | 按时长值选择并回填,单位与候选项由组件内部推导。 | +| [AttachmentSelector](/components/attachment-selector) | 选择并预览图片、视频及其他附件,上传和业务数据处理由调用方负责。 | ## AI 对话组件 diff --git a/docs/index.md b/docs/index.md index c4eb9aa..f331e60 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,7 +4,7 @@ layout: home hero: name: timi-tdesign-mobile text: 移动端 TDesign 组件库 - tagline: 15 个业务组件,配套可交互演示与由源码自动生成的 API 文档 + tagline: 16 个业务组件,配套可交互演示与由源码自动生成的 API 文档 actions: - theme: brand text: 快速开始 diff --git a/package.json b/package.json index b06b2bb..c3d6308 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "node": ">=16.0.0" }, "dependencies": { - "tdesign-mobile-vue": "^1.13.2", + "tdesign-mobile-vue": "^1.16.2", "timi-web": "link:E:/WebProject/timi-web" }, "peerDependencies": { @@ -63,11 +63,10 @@ "unplugin-auto-import": "^19.3.0", "unplugin-vue-components": "^28.7.0", "vite-plugin-dts": "^4.5.4", - "vite-plugin-vue-setup-extend": "^0.4.0", "@vue/tsconfig": "^0.7.0", "vue": "3.5.26", "vue-router": "4.5.0", - "vite": "7.1.11", + "vite": "8.0.16", "vue-tsc": "^2.2.12" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82ca51b..08a9f47 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: tdesign-mobile-vue: - specifier: ^1.13.2 - version: 1.13.2(vue@3.5.26(typescript@5.8.3)) + specifier: ^1.16.2 + version: 1.16.2(vue@3.5.26(typescript@5.8.3)) timi-web: specifier: link:E:/WebProject/timi-web version: link:../timi-web @@ -26,10 +26,10 @@ importers: version: 8.26.0(eslint@9.26.0)(typescript@5.8.3) '@vitejs/plugin-basic-ssl': specifier: ^2.0.0 - version: 2.0.0(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)) + version: 2.0.0(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)) '@vitejs/plugin-vue': specifier: ^5.2.4 - version: 5.2.4(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))(vue@3.5.26(typescript@5.8.3)) + version: 5.2.4(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))(vue@3.5.26(typescript@5.8.3)) '@vue/cli-plugin-babel': specifier: ^5.0.8 version: 5.0.8(@vue/cli-service@5.0.8(@vue/compiler-sfc@3.5.16)(lodash@4.17.21)(prettier@3.5.3)(vue@3.5.26(typescript@5.8.3))(webpack-sources@3.2.3))(vue@3.5.26(typescript@5.8.3)) @@ -76,14 +76,11 @@ importers: specifier: ^28.7.0 version: 28.7.0(@babel/parser@7.29.8)(vue@3.5.26(typescript@5.8.3)) vite: - specifier: 7.1.11 - version: 7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) + specifier: 8.0.16 + version: 8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@22.13.9)(rollup@4.57.1)(typescript@5.8.3)(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)) - vite-plugin-vue-setup-extend: - specifier: ^0.4.0 - version: 0.4.0(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)) + version: 4.5.4(@types/node@22.13.9)(rollup@4.57.1)(typescript@5.8.3)(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)) vue: specifier: 3.5.26 version: 3.5.26(typescript@5.8.3) @@ -663,155 +660,14 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - '@esbuild/aix-ppc64@0.25.0': - resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} - '@esbuild/android-arm64@0.25.0': - resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@esbuild/android-arm@0.25.0': - resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.25.0': - resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.25.0': - resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.25.0': - resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.25.0': - resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.25.0': - resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.25.0': - resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.25.0': - resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.25.0': - resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.25.0': - resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.25.0': - resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.25.0': - resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.25.0': - resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.25.0': - resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.25.0': - resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-arm64@0.25.0': - resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.25.0': - resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.25.0': - resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.25.0': - resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.25.0': - resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.25.0': - resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.25.0': - resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.25.0': - resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} @@ -933,6 +789,13 @@ packages: '@cfworker/json-schema': optional: true + '@napi-rs/wasm-runtime@1.2.5': + resolution: {integrity: sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4 + '@node-ipc/js-queue@2.0.3': resolution: {integrity: sha512-fL1wpr8hhD5gT2dA1qifeVaoDFlQR5es8tFuKqjHX+kdOtdNHnxkVZbtIrR2rxnMFvehkjaZRNV2H/gPXlb0hw==} engines: {node: '>=1.0.0'} @@ -949,6 +812,9 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oxc-project/types@0.133.0': + resolution: {integrity: sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==} + '@pkgr/core@0.1.1': resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -956,6 +822,104 @@ packages: '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@rolldown/binding-android-arm64@1.0.3': + resolution: {integrity: sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.3': + resolution: {integrity: sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.3': + resolution: {integrity: sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.3': + resolution: {integrity: sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + resolution: {integrity: sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.3': + resolution: {integrity: sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.0.3': + resolution: {integrity: sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.0.3': + resolution: {integrity: sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.0.3': + resolution: {integrity: sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.0.3': + resolution: {integrity: sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.0.3': + resolution: {integrity: sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.0.3': + resolution: {integrity: sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.3': + resolution: {integrity: sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.3': + resolution: {integrity: sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.3': + resolution: {integrity: sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -1147,6 +1111,9 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} + '@tybys/wasm-util@0.10.4': + resolution: {integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==} + '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -2399,6 +2366,10 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} @@ -2511,11 +2482,6 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} - esbuild@0.25.0: - resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} - engines: {node: '>=18'} - hasBin: true - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -3251,6 +3217,80 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -3330,9 +3370,6 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - magic-string@0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -3476,11 +3513,6 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanoid@3.3.11: - resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3724,8 +3756,8 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} pify@4.0.1: @@ -3965,10 +3997,6 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} - postcss@8.5.6: - resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} - engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -4136,6 +4164,11 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + rolldown@1.0.3: + resolution: {integrity: sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rollup@4.57.1: resolution: {integrity: sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4298,10 +4331,6 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -4426,13 +4455,13 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - tdesign-icons-vue-next@0.4.4: - resolution: {integrity: sha512-UPKyR5pea840aeI5p/k8VLVgfyVzndSyE4t1yRBD8uYWiuV0p29jZbDn8hMnes9Tz5JPgywCGzbk4QJzt684NA==} + tdesign-icons-vue-next@0.4.11: + resolution: {integrity: sha512-lBkRUy8bdb6lQLFOOkSb1LPdl4CmZRewrc8SOUlmWkDD/DG3BTsSd/ZQ4Z767pPSlypyvxwSwcJgRv6+zjubAQ==} peerDependencies: vue: ^3.0.0 - tdesign-mobile-vue@1.13.2: - resolution: {integrity: sha512-ZsSKWnulrEVocHKLNQLR6qLfItxqMTc3xoGsNL7E2K38DymRUOL1wpStIurku0I4WLBY56tbe17zglj16KRcMQ==} + tdesign-mobile-vue@1.16.2: + resolution: {integrity: sha512-05lOApsyGeIFzlOuJvvm+P0o3h7FeHM9HsPcslRFPwOQXIZW1AvJhnvP7aon3mdFtUEFdeja6yq7uJB8Os4haQ==} engines: {node: '>=12.0.0'} peerDependencies: vue: ^3.2.6 @@ -4485,8 +4514,8 @@ packages: resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} engines: {node: '>=12.0.0'} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} to-regex-range@5.0.1: @@ -4665,20 +4694,16 @@ packages: vite: optional: true - vite-plugin-vue-setup-extend@0.4.0: - resolution: {integrity: sha512-WMbjPCui75fboFoUTHhdbXzu4Y/bJMv5N9QT9a7do3wNMNHHqrk+Tn2jrSJU0LS5fGl/EG+FEDBYVUeWIkDqXQ==} - peerDependencies: - vite: '>=2.0.0' - - vite@7.1.11: - resolution: {integrity: sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==} + vite@8.0.16: + resolution: {integrity: sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.18 + esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 - lightningcss: ^1.21.0 sass: ^1.70.0 sass-embedded: ^1.70.0 stylus: '>=0.54.8' @@ -4689,12 +4714,14 @@ packages: peerDependenciesMeta: '@types/node': optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true jiti: optional: true less: optional: true - lightningcss: - optional: true sass: optional: true sass-embedded: @@ -5691,79 +5718,20 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@esbuild/aix-ppc64@0.25.0': + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 optional: true - '@esbuild/android-arm64@0.25.0': + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/android-arm@0.25.0': - optional: true - - '@esbuild/android-x64@0.25.0': - optional: true - - '@esbuild/darwin-arm64@0.25.0': - optional: true - - '@esbuild/darwin-x64@0.25.0': - optional: true - - '@esbuild/freebsd-arm64@0.25.0': - optional: true - - '@esbuild/freebsd-x64@0.25.0': - optional: true - - '@esbuild/linux-arm64@0.25.0': - optional: true - - '@esbuild/linux-arm@0.25.0': - optional: true - - '@esbuild/linux-ia32@0.25.0': - optional: true - - '@esbuild/linux-loong64@0.25.0': - optional: true - - '@esbuild/linux-mips64el@0.25.0': - optional: true - - '@esbuild/linux-ppc64@0.25.0': - optional: true - - '@esbuild/linux-riscv64@0.25.0': - optional: true - - '@esbuild/linux-s390x@0.25.0': - optional: true - - '@esbuild/linux-x64@0.25.0': - optional: true - - '@esbuild/netbsd-arm64@0.25.0': - optional: true - - '@esbuild/netbsd-x64@0.25.0': - optional: true - - '@esbuild/openbsd-arm64@0.25.0': - optional: true - - '@esbuild/openbsd-x64@0.25.0': - optional: true - - '@esbuild/sunos-x64@0.25.0': - optional: true - - '@esbuild/win32-arm64@0.25.0': - optional: true - - '@esbuild/win32-ia32@0.25.0': - optional: true - - '@esbuild/win32-x64@0.25.0': + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 optional: true '@eslint-community/eslint-utils@4.4.1(eslint@9.26.0)': @@ -5916,6 +5884,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@napi-rs/wasm-runtime@1.2.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.4 + optional: true + '@node-ipc/js-queue@2.0.3': dependencies: easy-stack: 1.0.1 @@ -5932,10 +5907,63 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 + '@oxc-project/types@0.133.0': {} + '@pkgr/core@0.1.1': {} '@polka/url@1.0.0-next.28': {} + '@rolldown/binding-android-arm64@1.0.3': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.3': + optional: true + + '@rolldown/binding-darwin-x64@1.0.3': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.3': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.3': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.3': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.3': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.3': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.2.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.3': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.3': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + '@rollup/pluginutils@5.1.4(rollup@4.57.1)': dependencies: '@types/estree': 1.0.6 @@ -6073,6 +6101,11 @@ snapshots: '@trysound/sax@0.2.0': {} + '@tybys/wasm-util@0.10.4': + dependencies: + tslib: 2.8.1 + optional: true + '@types/argparse@1.0.38': {} '@types/body-parser@1.19.5': @@ -6105,7 +6138,8 @@ snapshots: '@types/estree@1.0.6': {} - '@types/estree@1.0.8': {} + '@types/estree@1.0.8': + optional: true '@types/express-serve-static-core@4.19.6': dependencies: @@ -6268,13 +6302,13 @@ snapshots: dependencies: '@use-gesture/core': 10.3.1 - '@vitejs/plugin-basic-ssl@2.0.0(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))': + '@vitejs/plugin-basic-ssl@2.0.0(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))': dependencies: - vite: 7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) + vite: 8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) - '@vitejs/plugin-vue@5.2.4(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))(vue@3.5.26(typescript@5.8.3))': + '@vitejs/plugin-vue@5.2.4(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0))(vue@3.5.26(typescript@5.8.3))': dependencies: - vite: 7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) + vite: 8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) vue: 3.5.26(typescript@5.8.3) '@volar/language-core@2.4.12': @@ -7590,6 +7624,8 @@ snapshots: destroy@1.2.0: {} + detect-libc@2.1.2: {} + detect-node@2.1.0: {} dir-glob@3.0.1: @@ -7691,34 +7727,6 @@ snapshots: dependencies: es-errors: 1.3.0 - esbuild@0.25.0: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.0 - '@esbuild/android-arm': 0.25.0 - '@esbuild/android-arm64': 0.25.0 - '@esbuild/android-x64': 0.25.0 - '@esbuild/darwin-arm64': 0.25.0 - '@esbuild/darwin-x64': 0.25.0 - '@esbuild/freebsd-arm64': 0.25.0 - '@esbuild/freebsd-x64': 0.25.0 - '@esbuild/linux-arm': 0.25.0 - '@esbuild/linux-arm64': 0.25.0 - '@esbuild/linux-ia32': 0.25.0 - '@esbuild/linux-loong64': 0.25.0 - '@esbuild/linux-mips64el': 0.25.0 - '@esbuild/linux-ppc64': 0.25.0 - '@esbuild/linux-riscv64': 0.25.0 - '@esbuild/linux-s390x': 0.25.0 - '@esbuild/linux-x64': 0.25.0 - '@esbuild/netbsd-arm64': 0.25.0 - '@esbuild/netbsd-x64': 0.25.0 - '@esbuild/openbsd-arm64': 0.25.0 - '@esbuild/openbsd-x64': 0.25.0 - '@esbuild/sunos-x64': 0.25.0 - '@esbuild/win32-arm64': 0.25.0 - '@esbuild/win32-ia32': 0.25.0 - '@esbuild/win32-x64': 0.25.0 - escalade@3.2.0: {} escape-html@1.0.3: {} @@ -8007,9 +8015,9 @@ snapshots: optionalDependencies: picomatch: 4.0.2 - fdir@6.5.0(picomatch@4.0.3): + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: - picomatch: 4.0.3 + picomatch: 4.0.7 figures@2.0.0: dependencies: @@ -8498,6 +8506,55 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + lilconfig@2.1.0: {} lines-and-columns@1.2.4: {} @@ -8576,10 +8633,6 @@ snapshots: dependencies: yallist: 4.0.0 - magic-string@0.25.9: - dependencies: - sourcemap-codec: 1.4.8 - magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -8705,8 +8758,6 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nanoid@3.3.11: {} - nanoid@3.3.18: {} nanoid@3.3.8: {} @@ -8917,7 +8968,7 @@ snapshots: picomatch@4.0.2: {} - picomatch@4.0.3: {} + picomatch@4.0.7: {} pify@4.0.1: optional: true @@ -9154,12 +9205,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - postcss@8.5.6: - dependencies: - nanoid: 3.3.11 - picocolors: 1.1.1 - source-map-js: 1.2.1 - prelude-ls@1.2.1: {} prettier-linter-helpers@1.0.0: @@ -9336,6 +9381,27 @@ snapshots: dependencies: glob: 7.2.3 + rolldown@1.0.3: + dependencies: + '@oxc-project/types': 0.133.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.3 + '@rolldown/binding-darwin-arm64': 1.0.3 + '@rolldown/binding-darwin-x64': 1.0.3 + '@rolldown/binding-freebsd-x64': 1.0.3 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.3 + '@rolldown/binding-linux-arm64-gnu': 1.0.3 + '@rolldown/binding-linux-arm64-musl': 1.0.3 + '@rolldown/binding-linux-ppc64-gnu': 1.0.3 + '@rolldown/binding-linux-s390x-gnu': 1.0.3 + '@rolldown/binding-linux-x64-gnu': 1.0.3 + '@rolldown/binding-linux-x64-musl': 1.0.3 + '@rolldown/binding-openharmony-arm64': 1.0.3 + '@rolldown/binding-wasm32-wasi': 1.0.3 + '@rolldown/binding-win32-arm64-msvc': 1.0.3 + '@rolldown/binding-win32-x64-msvc': 1.0.3 + rollup@4.57.1: dependencies: '@types/estree': 1.0.8 @@ -9366,6 +9432,7 @@ snapshots: '@rollup/rollup-win32-x64-gnu': 4.57.1 '@rollup/rollup-win32-x64-msvc': 4.57.1 fsevents: 2.3.3 + optional: true router@2.2.0: dependencies: @@ -9580,8 +9647,6 @@ snapshots: source-map@0.6.1: {} - sourcemap-codec@1.4.8: {} - spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 @@ -9711,19 +9776,19 @@ snapshots: tapable@2.2.1: {} - tdesign-icons-vue-next@0.4.4(vue@3.5.26(typescript@5.8.3)): + tdesign-icons-vue-next@0.4.11(vue@3.5.26(typescript@5.8.3)): dependencies: '@babel/runtime': 7.26.9 vue: 3.5.26(typescript@5.8.3) - tdesign-mobile-vue@1.13.2(vue@3.5.26(typescript@5.8.3)): + tdesign-mobile-vue@1.16.2(vue@3.5.26(typescript@5.8.3)): dependencies: '@babel/runtime': 7.26.9 '@use-gesture/vanilla': 10.3.1 '@vueuse/core': 10.7.0(vue@3.5.26(typescript@5.8.3)) dayjs: 1.11.13 lodash-es: 4.17.21 - tdesign-icons-vue-next: 0.4.4(vue@3.5.26(typescript@5.8.3)) + tdesign-icons-vue-next: 0.4.11(vue@3.5.26(typescript@5.8.3)) tinycolor2: 1.6.0 validator: 13.12.0 vue: 3.5.26(typescript@5.8.3) @@ -9777,10 +9842,10 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 - tinyglobby@0.2.15: + tinyglobby@0.2.17: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 to-regex-range@5.0.1: dependencies: @@ -9934,7 +9999,7 @@ snapshots: vary@1.1.2: {} - vite-plugin-dts@4.5.4(@types/node@22.13.9)(rollup@4.57.1)(typescript@5.8.3)(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)): + vite-plugin-dts@4.5.4(@types/node@22.13.9)(rollup@4.57.1)(typescript@5.8.3)(vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)): dependencies: '@microsoft/api-extractor': 7.51.1(@types/node@22.13.9) '@rollup/pluginutils': 5.1.4(rollup@4.57.1) @@ -9947,26 +10012,19 @@ snapshots: magic-string: 0.30.17 typescript: 5.8.3 optionalDependencies: - vite: 7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) + vite: 8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-vue-setup-extend@0.4.0(vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0)): + vite@8.0.16(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0): dependencies: - '@vue/compiler-sfc': 3.5.16 - magic-string: 0.25.9 - vite: 7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0) - - vite@7.1.11(@types/node@22.13.9)(less@4.3.0)(terser@5.46.0): - dependencies: - esbuild: 0.25.0 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.57.1 - tinyglobby: 0.2.15 + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.26 + rolldown: 1.0.3 + tinyglobby: 0.2.17 optionalDependencies: '@types/node': 22.13.9 fsevents: 2.3.3 diff --git a/src/components/attachment-selector/AttachmentSelectorAdd.vue b/src/components/attachment-selector/AttachmentSelectorAdd.vue new file mode 100644 index 0000000..a24e58c --- /dev/null +++ b/src/components/attachment-selector/AttachmentSelectorAdd.vue @@ -0,0 +1,206 @@ + + + + + + + + + 拍摄 + + + + + + + + 拍照片 + + + + + + 录视频 + + + + + + + + + + 选择 + + + + + + + + + + + diff --git a/src/components/attachment-selector/AttachmentSelectorItem.vue b/src/components/attachment-selector/AttachmentSelectorItem.vue new file mode 100644 index 0000000..82b6922 --- /dev/null +++ b/src/components/attachment-selector/AttachmentSelectorItem.vue @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/attachment-selector/AttachmentSelectorViewer.vue b/src/components/attachment-selector/AttachmentSelectorViewer.vue new file mode 100644 index 0000000..6a618e8 --- /dev/null +++ b/src/components/attachment-selector/AttachmentSelectorViewer.vue @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/attachment-selector/index.ts b/src/components/attachment-selector/index.ts new file mode 100644 index 0000000..880237b --- /dev/null +++ b/src/components/attachment-selector/index.ts @@ -0,0 +1,12 @@ +import view from "./index.vue"; +import { WebToolkit } from "timi-web"; + +export type { + AttachmentSelectorItem, + AttachmentSelectorProps, + AttachmentSelectorSelection, + AttachmentSelectorViewerItem +} from "./types"; + +export const AttachmentSelector = WebToolkit.withInstall(view); +export default AttachmentSelector; diff --git a/src/components/attachment-selector/index.vue b/src/components/attachment-selector/index.vue new file mode 100644 index 0000000..ad51297 --- /dev/null +++ b/src/components/attachment-selector/index.vue @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/attachment-selector/types.ts b/src/components/attachment-selector/types.ts new file mode 100644 index 0000000..c8fd742 --- /dev/null +++ b/src/components/attachment-selector/types.ts @@ -0,0 +1,45 @@ +/** 附件选择器展示的条目。 */ +export interface AttachmentSelectorItem { + /** 附件地址。 */ + url: string; + /** 可选的稳定标识。 */ + id?: string | number; + /** 原始预览地址。 */ + previewUrl?: string; + /** 列表缩略图地址。 */ + thumbnailUrl?: string; + /** MIME 类型。 */ + mimeType?: string; + /** 文件名称。 */ + name?: string; +} + +/** 从文件选择器中选择的文件。 */ +export interface AttachmentSelectorSelection { + files: File[]; + input: HTMLInputElement; + source: "file" | "photo" | "video"; +} + +/** 当前预览条目及其在原列表中的位置。 */ +export type AttachmentSelectorViewerItem = AttachmentSelectorItem & { + sourceIndex: number; +}; + +/** 附件选择器属性。 */ +export interface AttachmentSelectorProps { + /** 当前附件条目。 */ + items: readonly AttachmentSelectorItem[]; + /** 是否正在处理附件操作。 */ + busy?: boolean; + /** 列表为空时显示的文案。 */ + emptyText?: string; + /** 是否只读。 */ + readonly?: boolean; + /** 是否显示必填标记。 */ + required?: boolean; + /** 列表标题。 */ + title?: string; + /** 预览器层级。 */ + viewerZIndex?: number; +} diff --git a/src/components/attachment-selector/utils.ts b/src/components/attachment-selector/utils.ts new file mode 100644 index 0000000..4c80575 --- /dev/null +++ b/src/components/attachment-selector/utils.ts @@ -0,0 +1,59 @@ +import type { AttachmentSelectorItem } from "./types"; + +export type MediaKind = "image" | "video" | "file"; + +/** 取得媒体预览地址。 */ +export function getMediaPreviewURL(item: AttachmentSelectorItem): string { + return item.previewUrl || item.url; +} + +/** 根据 MIME 类型和文件扩展名判断媒体类型。 */ +export function getMediaKind(item: AttachmentSelectorItem): MediaKind { + const mimeType = (item.mimeType || "").toLowerCase(); + if (mimeType.startsWith("video/")) { + return "video"; + } + if (mimeType.startsWith("image/")) { + return "image"; + } + if (mimeType) { + return "file"; + } + + const url = item.url.split(/[?#]/, 1)[0] || ""; + if (/\.(avi|m4v|mkv|mov|mp4|mpeg|mpg|ogv|webm|wmv)$/i.test(url)) { + return "video"; + } + if (/\.(pdf|docx?|xlsx?|pptx?|zip|rar|txt)$/i.test(url)) { + return "file"; + } + + return "image"; +} + +/** 取得媒体列表的缩略图地址。 */ +export function getMediaThumbnailURL(item: AttachmentSelectorItem): string { + if (item.thumbnailUrl) { + return item.thumbnailUrl; + } + + return getMediaKind(item) === "image" ? item.url : ""; +} + +/** 取得可读的文件名称。 */ +export function getMediaName(item: AttachmentSelectorItem): string { + if (item.name) { + return item.name; + } + + const url = item.url.split(/[?#]/, 1)[0] || ""; + const fileName = url.split("/").pop(); + if (!fileName) { + return "文件"; + } + try { + return decodeURIComponent(fileName); + } catch { + return fileName; + } +} diff --git a/src/components/index.ts b/src/components/index.ts index 1d565d8..e144a31 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -10,6 +10,7 @@ import ArticleView from "./article-view"; import NotifyEditor from "./notify-editor"; import NotifyView from "./notify-view"; import BottomPopup from "./bottom-popup"; +import AttachmentSelector from "./attachment-selector"; import Space from "./space"; import CardContainer from "./card-container"; import { @@ -31,6 +32,7 @@ export default [ NotifyEditor, NotifyView, BottomPopup, + AttachmentSelector, Space, CardContainer, AiChatComposer, @@ -51,6 +53,7 @@ export { NotifyEditor, NotifyView, BottomPopup, + AttachmentSelector, Space, CardContainer, AiChatComposer, @@ -98,6 +101,13 @@ export type { CardContainerProps } from "./card-container"; +export type { + AttachmentSelectorItem, + AttachmentSelectorProps, + AttachmentSelectorSelection, + AttachmentSelectorViewerItem +} from "./attachment-selector"; + export type { PageTransitionBackground, PageTransitionClass, diff --git a/vite.config.ts b/vite.config.ts index 24ec5ee..7f09cf9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,6 @@ import { resolve } from "path"; import { Alias, defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; -import VueSetupExtend from "vite-plugin-vue-setup-extend"; import AutoImport from "unplugin-auto-import/vite"; import Components from "unplugin-vue-components/vite"; import { TDesignResolver } from "unplugin-vue-components/resolvers"; @@ -53,7 +52,6 @@ export default defineConfig({ vue({ include: [/\.vue$/, /\.md$/] }), - VueSetupExtend(), dts({ pathsToAliases: false, aliasesExclude: [/^timi-web\/editor$/]