diff --git a/package.json b/package.json index fdcce30..df94e90 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "make-link": "node --no-warnings ./scripts/make_dev_link.js", "dev": "vite build --watch", "build": "vite build", - "install": "vite build && node --no-warnings ./scripts/make_install.js" + "make-install": "vite build && node --no-warnings ./scripts/make_install.js" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.4.1", + "@sveltejs/vite-plugin-svelte": "^3.0.0", "@tsconfig/svelte": "^4.0.1", "@types/node": "^20.3.0", "eslint": "^8.42.0", @@ -24,12 +24,12 @@ "minimist": "^1.2.8", "rollup-plugin-livereload": "^2.0.5", "sass": "^1.63.3", - "siyuan": "0.9.4", - "svelte": "^3.59.1", + "siyuan": "0.9.7", + "svelte": "^4.2.0", "ts-node": "^10.9.1", "typescript": "^5.1.3", - "vite": "^4.5.2", - "vite-plugin-static-copy": "^0.15.0", + "vite": "^5.0.0", + "vite-plugin-static-copy": "^1.0.2", "vite-plugin-zip-pack": "^1.0.5" } } diff --git a/src/setting-example.svelte b/src/setting-example.svelte index 3ae156a..5f8958b 100644 --- a/src/setting-example.svelte +++ b/src/setting-example.svelte @@ -63,6 +63,7 @@ <div class="fn__flex-1 fn__flex config__panel"> <ul class="b3-tab-bar b3-list b3-list--background"> {#each groups as group} + <!-- svelte-ignore a11y-no-noninteractive-element-interactions --> <li data-name="editor" class:b3-list-item--focus={group === focusGroup} diff --git a/svelte.config.js b/svelte.config.js index 7c8df62..d62a343 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,7 +1,26 @@ +/* + * Copyright (c) 2024 by frostime. All Rights Reserved. + * @Author : frostime + * @Date : 2023-05-19 19:49:13 + * @FilePath : /svelte.config.js + * @LastEditTime : 2024-04-19 19:01:55 + * @Description : + */ import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" +const NoWarns = new Set([ + "a11y-click-events-have-key-events", + "a11y-no-static-element-interactions", + "a11y-no-noninteractive-element-interactions" +]); + export default { // Consult https://svelte.dev/docs#compile-time-svelte-preprocess // for more information about preprocessors preprocess: vitePreprocess(), + onwarn: (warning, handler) => { + // suppress warnings on `vite dev` and `vite build`; but even without this, things still work + if (NoWarns.has(warning.code)) return; + handler(warning); + } }