feat: Added Sogou Translate
This commit is contained in:
25
index.html
25
index.html
@@ -1,13 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>onin-web-translate</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>onin-web-translate</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="h-[100vh] w-full"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -13,6 +13,7 @@
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
||||
"@tsconfig/svelte": "^5.0.6",
|
||||
"@types/node": "^24.10.1",
|
||||
"daisyui": "^5.5.5",
|
||||
"svelte": "^5.43.8",
|
||||
"svelte-check": "^4.3.4",
|
||||
"typescript": "~5.9.3",
|
||||
@@ -20,7 +21,13 @@
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"vite": "npm:rolldown-vite@7.2.5"
|
||||
"vite": "npm:rolldown-vite@7.2.5",
|
||||
"baize-sdk": "link:../../../tauri/baize/plugins-sdk"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"baize-sdk": "link:../../../tauri/baize/plugins-sdk",
|
||||
"tailwindcss": "^4.1.17"
|
||||
}
|
||||
}
|
||||
|
||||
236
pnpm-lock.yaml
generated
236
pnpm-lock.yaml
generated
@@ -10,16 +10,29 @@ overrides:
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.1.17
|
||||
version: 4.1.17(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))
|
||||
baize-sdk:
|
||||
specifier: link:../../../tauri/baize/plugins-sdk
|
||||
version: link:../../../tauri/baize/plugins-sdk
|
||||
tailwindcss:
|
||||
specifier: ^4.1.17
|
||||
version: 4.1.17
|
||||
devDependencies:
|
||||
'@sveltejs/vite-plugin-svelte':
|
||||
specifier: ^6.2.1
|
||||
version: 6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3)
|
||||
version: 6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3)
|
||||
'@tsconfig/svelte':
|
||||
specifier: ^5.0.6
|
||||
version: 5.0.6
|
||||
'@types/node':
|
||||
specifier: ^24.10.1
|
||||
version: 24.10.1
|
||||
daisyui:
|
||||
specifier: ^5.5.5
|
||||
version: 5.5.5
|
||||
svelte:
|
||||
specifier: ^5.43.8
|
||||
version: 5.45.3
|
||||
@@ -31,7 +44,7 @@ importers:
|
||||
version: 5.9.3
|
||||
vite:
|
||||
specifier: npm:rolldown-vite@7.2.5
|
||||
version: rolldown-vite@7.2.5(@types/node@24.10.1)
|
||||
version: rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)
|
||||
|
||||
packages:
|
||||
|
||||
@@ -180,6 +193,100 @@ packages:
|
||||
svelte: ^5.0.0
|
||||
vite: ^6.3.0 || ^7.0.0
|
||||
|
||||
'@tailwindcss/node@4.1.17':
|
||||
resolution: {integrity: sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==}
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.17':
|
||||
resolution: {integrity: sha512-BMqpkJHgOZ5z78qqiGE6ZIRExyaHyuxjgrJ6eBO5+hfrfGkuya0lYfw8fRHG77gdTjWkNWEEm+qeG2cDMxArLQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.17':
|
||||
resolution: {integrity: sha512-EquyumkQweUBNk1zGEU/wfZo2qkp/nQKRZM8bUYO0J+Lums5+wl2CcG1f9BgAjn/u9pJzdYddHWBiFXJTcxmOg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.17':
|
||||
resolution: {integrity: sha512-gdhEPLzke2Pog8s12oADwYu0IAw04Y2tlmgVzIN0+046ytcgx8uZmCzEg4VcQh+AHKiS7xaL8kGo/QTiNEGRog==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.17':
|
||||
resolution: {integrity: sha512-hxGS81KskMxML9DXsaXT1H0DyA+ZBIbyG/sSAjWNe2EDl7TkPOBI42GBV3u38itzGUOmFfCzk1iAjDXds8Oh0g==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.17':
|
||||
resolution: {integrity: sha512-k7jWk5E3ldAdw0cNglhjSgv501u7yrMf8oeZ0cElhxU6Y2o7f8yqelOp3fhf7evjIS6ujTI3U8pKUXV2I4iXHQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.17':
|
||||
resolution: {integrity: sha512-HVDOm/mxK6+TbARwdW17WrgDYEGzmoYayrCgmLEw7FxTPLcp/glBisuyWkFz/jb7ZfiAXAXUACfyItn+nTgsdQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.17':
|
||||
resolution: {integrity: sha512-HvZLfGr42i5anKtIeQzxdkw/wPqIbpeZqe7vd3V9vI3RQxe3xU1fLjss0TjyhxWcBaipk7NYwSrwTwK1hJARMg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.17':
|
||||
resolution: {integrity: sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.17':
|
||||
resolution: {integrity: sha512-k7f+pf9eXLEey4pBlw+8dgfJHY4PZ5qOUFDyNf7SI6lHjQ9Zt7+NcscjpwdCEbYi6FI5c2KDTDWyf2iHcCSyyQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.17':
|
||||
resolution: {integrity: sha512-cEytGqSSoy7zK4JRWiTCx43FsKP/zGr0CsuMawhH67ONlH+T79VteQeJQRO/X7L0juEUA8ZyuYikcRBf0vsxhg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [wasm32]
|
||||
bundledDependencies:
|
||||
- '@napi-rs/wasm-runtime'
|
||||
- '@emnapi/core'
|
||||
- '@emnapi/runtime'
|
||||
- '@tybys/wasm-util'
|
||||
- '@emnapi/wasi-threads'
|
||||
- tslib
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.17':
|
||||
resolution: {integrity: sha512-JU5AHr7gKbZlOGvMdb4722/0aYbU+tN6lv1kONx0JK2cGsh7g148zVWLM0IKR3NeKLv+L90chBVYcJ8uJWbC9A==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.17':
|
||||
resolution: {integrity: sha512-SKWM4waLuqx0IH+FMDUw6R66Hu4OuTALFgnleKbqhgGU30DY20NORZMZUKgLRjQXNN2TLzKvh48QXTig4h4bGw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide@4.1.17':
|
||||
resolution: {integrity: sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
'@tailwindcss/vite@4.1.17':
|
||||
resolution: {integrity: sha512-4+9w8ZHOiGnpcGI6z1TVVfWaX/koK7fKeSYF3qlYg2xpBtbteP2ddBxiarL+HVgfSJGeK5RIxRQmKm4rTJJAwA==}
|
||||
peerDependencies:
|
||||
vite: ^5.2.0 || ^6 || ^7
|
||||
|
||||
'@tsconfig/svelte@5.0.6':
|
||||
resolution: {integrity: sha512-yGxYL0I9eETH1/DR9qVJey4DAsCdeau4a9wYPKuXfEhm8lFO8wg+LLYJjIpAm6Fw7HSlhepPhYPDop75485yWQ==}
|
||||
|
||||
@@ -213,6 +320,9 @@ packages:
|
||||
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
daisyui@5.5.5:
|
||||
resolution: {integrity: sha512-ekvI93ZkWIJoCOtDl0D2QMxnWvTejk9V5nWBqRv+7t0xjiBXqAK5U6o6JE2RPvlIC3EqwNyUoIZSdHX9MZK3nw==}
|
||||
|
||||
debug@4.4.3:
|
||||
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
|
||||
engines: {node: '>=6.0'}
|
||||
@@ -233,6 +343,10 @@ packages:
|
||||
devalue@5.5.0:
|
||||
resolution: {integrity: sha512-69sM5yrHfFLJt0AZ9QqZXGCPfJ7fQjvpln3Rq5+PS03LD32Ost1Q9N+eEnaQwGRIriKkMImXD56ocjQmfjbV3w==}
|
||||
|
||||
enhanced-resolve@5.18.3:
|
||||
resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
||||
esm-env@1.2.2:
|
||||
resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==}
|
||||
|
||||
@@ -253,9 +367,16 @@ packages:
|
||||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||
os: [darwin]
|
||||
|
||||
graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
is-reference@3.0.3:
|
||||
resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==}
|
||||
|
||||
jiti@2.6.1:
|
||||
resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==}
|
||||
hasBin: true
|
||||
|
||||
lightningcss-android-arm64@1.30.2:
|
||||
resolution: {integrity: sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
@@ -428,6 +549,13 @@ packages:
|
||||
resolution: {integrity: sha512-ngKXNhNvwPzF43QqEhDOue7TQTrG09em1sd4HBxVF0Wr2gopAmdEWan+rgbdgK4fhBtSOTJO8bYU4chUG7VXZQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
tailwindcss@4.1.17:
|
||||
resolution: {integrity: sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==}
|
||||
|
||||
tapable@2.3.0:
|
||||
resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
tinyglobby@0.2.15:
|
||||
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
@@ -552,27 +680,95 @@ snapshots:
|
||||
dependencies:
|
||||
acorn: 8.15.0
|
||||
|
||||
'@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3))(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3)':
|
||||
'@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3))(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3)':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3)
|
||||
'@sveltejs/vite-plugin-svelte': 6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3)
|
||||
debug: 4.4.3
|
||||
svelte: 5.45.3
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3)':
|
||||
'@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3)':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3))(rolldown-vite@7.2.5(@types/node@24.10.1))(svelte@5.45.3)
|
||||
'@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3))(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))(svelte@5.45.3)
|
||||
debug: 4.4.3
|
||||
deepmerge: 4.3.1
|
||||
magic-string: 0.30.21
|
||||
svelte: 5.45.3
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)
|
||||
vitefu: 1.1.1(rolldown-vite@7.2.5(@types/node@24.10.1))
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)
|
||||
vitefu: 1.1.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@tailwindcss/node@4.1.17':
|
||||
dependencies:
|
||||
'@jridgewell/remapping': 2.3.5
|
||||
enhanced-resolve: 5.18.3
|
||||
jiti: 2.6.1
|
||||
lightningcss: 1.30.2
|
||||
magic-string: 0.30.21
|
||||
source-map-js: 1.2.1
|
||||
tailwindcss: 4.1.17
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.17':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide@4.1.17':
|
||||
optionalDependencies:
|
||||
'@tailwindcss/oxide-android-arm64': 4.1.17
|
||||
'@tailwindcss/oxide-darwin-arm64': 4.1.17
|
||||
'@tailwindcss/oxide-darwin-x64': 4.1.17
|
||||
'@tailwindcss/oxide-freebsd-x64': 4.1.17
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.17
|
||||
'@tailwindcss/oxide-linux-arm64-gnu': 4.1.17
|
||||
'@tailwindcss/oxide-linux-arm64-musl': 4.1.17
|
||||
'@tailwindcss/oxide-linux-x64-gnu': 4.1.17
|
||||
'@tailwindcss/oxide-linux-x64-musl': 4.1.17
|
||||
'@tailwindcss/oxide-wasm32-wasi': 4.1.17
|
||||
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.17
|
||||
'@tailwindcss/oxide-win32-x64-msvc': 4.1.17
|
||||
|
||||
'@tailwindcss/vite@4.1.17(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1))':
|
||||
dependencies:
|
||||
'@tailwindcss/node': 4.1.17
|
||||
'@tailwindcss/oxide': 4.1.17
|
||||
tailwindcss: 4.1.17
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)
|
||||
|
||||
'@tsconfig/svelte@5.0.6': {}
|
||||
|
||||
'@tybys/wasm-util@0.10.1':
|
||||
@@ -598,6 +794,8 @@ snapshots:
|
||||
|
||||
clsx@2.1.1: {}
|
||||
|
||||
daisyui@5.5.5: {}
|
||||
|
||||
debug@4.4.3:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
@@ -608,6 +806,11 @@ snapshots:
|
||||
|
||||
devalue@5.5.0: {}
|
||||
|
||||
enhanced-resolve@5.18.3:
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
tapable: 2.3.0
|
||||
|
||||
esm-env@1.2.2: {}
|
||||
|
||||
esrap@2.2.1:
|
||||
@@ -621,10 +824,14 @@ snapshots:
|
||||
fsevents@2.3.3:
|
||||
optional: true
|
||||
|
||||
graceful-fs@4.2.11: {}
|
||||
|
||||
is-reference@3.0.3:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.8
|
||||
|
||||
jiti@2.6.1: {}
|
||||
|
||||
lightningcss-android-arm64@1.30.2:
|
||||
optional: true
|
||||
|
||||
@@ -698,7 +905,7 @@ snapshots:
|
||||
|
||||
readdirp@4.1.2: {}
|
||||
|
||||
rolldown-vite@7.2.5(@types/node@24.10.1):
|
||||
rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1):
|
||||
dependencies:
|
||||
'@oxc-project/runtime': 0.97.0
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
@@ -710,6 +917,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@types/node': 24.10.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
|
||||
rolldown@1.0.0-beta.50:
|
||||
dependencies:
|
||||
@@ -767,6 +975,10 @@ snapshots:
|
||||
magic-string: 0.30.21
|
||||
zimmerframe: 1.1.4
|
||||
|
||||
tailwindcss@4.1.17: {}
|
||||
|
||||
tapable@2.3.0: {}
|
||||
|
||||
tinyglobby@0.2.15:
|
||||
dependencies:
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
@@ -779,8 +991,8 @@ snapshots:
|
||||
|
||||
undici-types@7.16.0: {}
|
||||
|
||||
vitefu@1.1.1(rolldown-vite@7.2.5(@types/node@24.10.1)):
|
||||
vitefu@1.1.1(rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)):
|
||||
optionalDependencies:
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)
|
||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)(jiti@2.6.1)
|
||||
|
||||
zimmerframe@1.1.4: {}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,47 +1,58 @@
|
||||
<script lang="ts">
|
||||
import svelteLogo from './assets/svelte.svg'
|
||||
import viteLogo from '/vite.svg'
|
||||
import Counter from './lib/Counter.svelte'
|
||||
import { onMount } from "svelte";
|
||||
import { lifecycle, clipboard } from "baize-sdk";
|
||||
|
||||
let text = $state("");
|
||||
let urlMaps = $state({
|
||||
sougou: `https://fanyi.sogou.com`,
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
console.log("onMount");
|
||||
lifecycle.onWindowShow(async () => {
|
||||
console.log("onWindowShow");
|
||||
const metadata = await clipboard.getMetadata();
|
||||
console.log("meatadata", metadata);
|
||||
if ((metadata.age ?? 999) <= 5) {
|
||||
text = metadata.text ?? "";
|
||||
}
|
||||
});
|
||||
|
||||
lifecycle.onWindowHide(() => {
|
||||
console.log("onWindowHide");
|
||||
});
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
urlMaps.sougou = `https://fanyi.sogou.com/text?keyword=${text}%0A&transfrom=auto&transto=zh-CHS&model=general`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<main>
|
||||
<div>
|
||||
<a href="https://vite.dev" target="_blank" rel="noreferrer">
|
||||
<img src={viteLogo} class="logo" alt="Vite Logo" />
|
||||
</a>
|
||||
<a href="https://svelte.dev" target="_blank" rel="noreferrer">
|
||||
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
|
||||
</a>
|
||||
<main class="h-full">
|
||||
<!-- name of each tab group should be unique -->
|
||||
<div class="h-full tabs tabs-lift">
|
||||
<label class="tab tab-active">
|
||||
<input type="radio" name="my_tabs_4" />
|
||||
<svg
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
><path
|
||||
d="M569.997946 656.383345a307.685712 307.685712 0 0 1-66.509938 10.977989 524.647508 524.647508 0 0 1-174.665836-21.30898 723.851321 723.851321 0 0 1-120.749887-45.199957c2.259998 36.805965 4.196996 73.611931 6.456994 110.417896 21.954979 9.684991 44.231959 17.756983 66.831937 25.182977a950.176109 950.176109 0 0 0 197.267815 45.522957 718.039327 718.039327 0 0 0 134.309874 0 412.291613 412.291613 0 0 0 121.394887-27.765974 174.343837 174.343837 0 0 0 81.682923-64.57194 121.717886 121.717886 0 0 0 2.259998-121.394886 156.909853 156.909853 0 0 0-34.867967-41.003961 295.093723 295.093723 0 0 0-71.351934-42.293961 994.408068 994.408068 0 0 0-165.949844-50.689952 343.845678 343.845678 0 0 1-82.006923-26.796975 74.90393 74.90393 0 0 1-30.348972-25.505976 28.411973 28.411973 0 0 1-2.259998-25.504976 49.397954 49.397954 0 0 1 26.474976-22.599979 167.240843 167.240843 0 0 1 64.571939-9.685991 760.657287 760.657287 0 0 1 164.334846 22.922979 955.665104 955.665104 0 0 1 129.143879 41.002961l-5.810995-107.512899c-22.276979-8.070992-44.877958-14.850986-67.799936-20.98498a1424.456665 1424.456665 0 0 0-166.919844-33.254969 777.769271 777.769271 0 0 0-164.334845-6.779994 362.57166 362.57166 0 0 0-101.377905 21.95398 210.181803 210.181803 0 0 0-75.871929 49.397953 141.412867 141.412867 0 0 0-39.065964 77.485928 109.449897 109.449897 0 0 0 5.810995 59.406944 129.143879 129.143879 0 0 0 48.105955 53.916949A434.246593 434.246593 0 0 0 371.440132 534.020459c40.679962 11.622989 81.683923 20.016981 123.009884 28.733973a478.478551 478.478551 0 0 1 56.822947 16.465985 177.572834 177.572834 0 0 1 44.231959 23.891978 37.774965 37.774965 0 0 1 13.559987 19.693981 20.339981 20.339981 0 0 1-7.102993 18.402983 83.297922 83.297922 0 0 1-31.96297 15.173986z m37.774964 273.785743A438.120589 438.120589 0 0 1 204.198289 812.970198a407.449618 407.449618 0 0 1-53.27195-64.57194 435.214592 435.214592 0 0 1 0-487.195543 463.949565 463.949565 0 0 1 53.27195-64.571939 438.443589 438.443589 0 0 1 138.50687-93.306913 425.206601 425.206601 0 0 1 168.209842-34.222968 433.600593 433.600593 0 0 1 308.330711 129.143879 436.183591 436.183591 0 0 1 99.117907 463.949565 423.591603 423.591603 0 0 1-55.854948 102.023905 32.28597 32.28597 0 0 0 6.457994 45.845957 32.28597 32.28597 0 0 0 48.750955-5.165996A505.921526 505.921526 0 0 0 717.221808 43.272919a413.906612 413.906612 0 0 0-64.57194-23.567977A505.921526 505.921526 0 0 0 6.930474 503.994488a504.306527 504.306527 0 0 0 663.154378 479.76955 34.868967 34.868967 0 0 0 20.016981-49.074954 32.28597 32.28597 0 0 0-40.679962-16.465985c-13.882987 4.519996-28.411973 8.716992-41.649961 11.945989z m264.421752-64.571939a507.212524 507.212524 0 0 1-129.143879 93.951911 33.899968 33.899968 0 0 0-13.882987 46.169957 34.222968 34.222968 0 0 0 45.199958 14.849986A573.076463 573.076463 0 0 0 928.04961 904.340112a32.28597 32.28597 0 0 0-2.259998-48.428954l-27.442974-22.599979c-8.071992 10.65399-17.757983 20.98598-27.442974 30.993971z"
|
||||
fill="#E94924"
|
||||
></path></svg
|
||||
>
|
||||
<span class="ml-2"> 搜狗翻译 </span>
|
||||
</label>
|
||||
<div class="tab-content bg-base-100 border-base-300">
|
||||
<iframe title="搜狗翻译" class="w-full h-full" src={urlMaps["sougou"]}>
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Vite + Svelte</h1>
|
||||
|
||||
<div class="card">
|
||||
<Counter />
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Check out <a href="https://github.com/sveltejs/kit#readme" target="_blank" rel="noreferrer">SvelteKit</a>, the official Svelte app framework powered by Vite!
|
||||
</p>
|
||||
|
||||
<p class="read-the-docs">
|
||||
Click on the Vite and Svelte logos to learn more
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
}
|
||||
.logo:hover {
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
}
|
||||
.logo.svelte:hover {
|
||||
filter: drop-shadow(0 0 2em #ff3e00aa);
|
||||
}
|
||||
.read-the-docs {
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
|
||||
12
src/app.css
12
src/app.css
@@ -1,3 +1,6 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
|
||||
:root {
|
||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
@@ -18,6 +21,7 @@ a {
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
@@ -40,9 +44,7 @@ h1 {
|
||||
}
|
||||
|
||||
#app {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -57,9 +59,11 @@ button {
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border-color: #646cff;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:focus-visible {
|
||||
outline: 4px auto -webkit-focus-ring-color;
|
||||
@@ -70,10 +74,12 @@ button:focus-visible {
|
||||
color: #213547;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #747bff;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="26.6" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 308"><path fill="#FF3E00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056a86.566 86.566 0 0 0 8.536 55.576a82.425 82.425 0 0 0-12.296 30.719a87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057a86.601 86.601 0 0 0-8.53-55.577a82.409 82.409 0 0 0 12.29-30.718a87.573 87.573 0 0 0-14.963-66.244"></path><path fill="#FFF" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85a49.978 49.978 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.067 16.067 0 0 0 2.89 10.656a17.143 17.143 0 0 0 18.397 6.828a15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977a15.923 15.923 0 0 0-2.713-12.011a17.156 17.156 0 0 0-18.404-6.832a15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849a49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85a50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.099 16.099 0 0 0-2.89-10.656a17.143 17.143 0 0 0-18.398-6.828a15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.156 17.156 0 0 0 18.404 6.832a15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848a49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,10 +0,0 @@
|
||||
<script lang="ts">
|
||||
let count: number = $state(0)
|
||||
const increment = () => {
|
||||
count += 1
|
||||
}
|
||||
</script>
|
||||
|
||||
<button onclick={increment}>
|
||||
count is {count}
|
||||
</button>
|
||||
@@ -1,7 +1,12 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [svelte()],
|
||||
server: {
|
||||
port: 5173,
|
||||
cors: true, // 允许跨域访问
|
||||
},
|
||||
plugins: [svelte(), tailwindcss()],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user