Merge branch 'upgrade-svelte'

This commit is contained in:
frostime 2024-04-19 19:09:30 +08:00
commit 1a1c267b46
3 changed files with 26 additions and 6 deletions

View file

@ -11,10 +11,10 @@
"make-link": "node --no-warnings ./scripts/make_dev_link.js", "make-link": "node --no-warnings ./scripts/make_dev_link.js",
"dev": "vite build --watch", "dev": "vite build --watch",
"build": "vite build", "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": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.1", "@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tsconfig/svelte": "^4.0.1", "@tsconfig/svelte": "^4.0.1",
"@types/node": "^20.3.0", "@types/node": "^20.3.0",
"eslint": "^8.42.0", "eslint": "^8.42.0",
@ -24,12 +24,12 @@
"minimist": "^1.2.8", "minimist": "^1.2.8",
"rollup-plugin-livereload": "^2.0.5", "rollup-plugin-livereload": "^2.0.5",
"sass": "^1.63.3", "sass": "^1.63.3",
"siyuan": "0.9.4", "siyuan": "0.9.7",
"svelte": "^3.59.1", "svelte": "^4.2.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.1.3", "typescript": "^5.1.3",
"vite": "^4.5.2", "vite": "^5.0.0",
"vite-plugin-static-copy": "^0.15.0", "vite-plugin-static-copy": "^1.0.2",
"vite-plugin-zip-pack": "^1.0.5" "vite-plugin-zip-pack": "^1.0.5"
} }
} }

View file

@ -63,6 +63,7 @@
<div class="fn__flex-1 fn__flex config__panel"> <div class="fn__flex-1 fn__flex config__panel">
<ul class="b3-tab-bar b3-list b3-list--background"> <ul class="b3-tab-bar b3-list b3-list--background">
{#each groups as group} {#each groups as group}
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<li <li
data-name="editor" data-name="editor"
class:b3-list-item--focus={group === focusGroup} class:b3-list-item--focus={group === focusGroup}

View file

@ -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" 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 { export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors // for more information about preprocessors
preprocess: vitePreprocess(), 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);
}
} }