mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Update to stable Svelte 5 release (#3513)
* Update to stable Svelte 5 release This causes a bunch of warnings to be omitted: ts/routes/graphs/RangeBox.svelte:52:18 Warn: Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update (svelte) break; case RevlogRange.All: $days = 0; They are triggered on enum references, and it appears to be a bug. May need to report it to Svelte? * Deps update * Silence spurious errors + fix a real one https://github.com/sveltejs/svelte/issues/13811
This commit is contained in:
parent
a9ebf842ea
commit
014620ab65
11 changed files with 496 additions and 417 deletions
|
@ -20,7 +20,7 @@
|
|||
"@sqltools/formatter": "^1.2.2",
|
||||
"@sveltejs/adapter-static": "^3.0.0",
|
||||
"@sveltejs/kit": "^2.4.1",
|
||||
"@sveltejs/vite-plugin-svelte": "4.0.0-next.7",
|
||||
"@sveltejs/vite-plugin-svelte": "4.0.0",
|
||||
"@types/bootstrap": "^5.0.12",
|
||||
"@types/codemirror": "^5.60.0",
|
||||
"@types/d3": "^7.0.0",
|
||||
|
@ -47,7 +47,8 @@
|
|||
"license-checker-rseidelsohn": "=4.3.0",
|
||||
"prettier": "^2.4.1",
|
||||
"prettier-plugin-svelte": "^3.2.6",
|
||||
"svelte": "5.0.0-next.179",
|
||||
"sass": "<1.77",
|
||||
"svelte": "5.0.0",
|
||||
"svelte-check": "^3.4.4",
|
||||
"svelte-preprocess": "^5.0.4",
|
||||
"svelte-preprocess-esbuild": "^3.0.1",
|
||||
|
@ -56,8 +57,7 @@
|
|||
"tsx": "^3.12.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vite": "=5.4.7",
|
||||
"vitest": "^1.2.1",
|
||||
"sass": "<1.77"
|
||||
"vitest": "^1.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^1.2.1",
|
||||
|
|
|
@ -224,7 +224,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
Number(actualWidth) <= maxWidth && Number(actualHeight) <= maxHeight;
|
||||
|
||||
let restoringDisabled: boolean;
|
||||
$: restoringDisabled = !activeImage?.hasAttribute("width") ?? true;
|
||||
$: restoringDisabled = !(activeImage?.hasAttribute("width") ?? true);
|
||||
|
||||
const widthObserver = new MutationObserver(() => {
|
||||
restoringDisabled = !activeImage!.hasAttribute("width");
|
||||
|
|
|
@ -17,7 +17,7 @@ export function supportsVerticalText(): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
export function direction(): string {
|
||||
export function direction(): "ltr" | "rtl" {
|
||||
const firstLang = firstLanguage();
|
||||
if (
|
||||
firstLang.startsWith("ar")
|
||||
|
|
|
@ -5,21 +5,21 @@
|
|||
"path": "node_modules/@bufbuild/protobuf",
|
||||
"licenseFile": "node_modules/@bufbuild/protobuf/README.md"
|
||||
},
|
||||
"@floating-ui/core@1.6.7": {
|
||||
"@floating-ui/core@1.6.8": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/floating-ui/floating-ui",
|
||||
"publisher": "atomiks",
|
||||
"path": "node_modules/@floating-ui/core",
|
||||
"licenseFile": "node_modules/@floating-ui/core/LICENSE"
|
||||
},
|
||||
"@floating-ui/dom@1.6.10": {
|
||||
"@floating-ui/dom@1.6.11": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/floating-ui/floating-ui",
|
||||
"publisher": "atomiks",
|
||||
"path": "node_modules/@floating-ui/dom",
|
||||
"licenseFile": "node_modules/@floating-ui/dom/LICENSE"
|
||||
},
|
||||
"@floating-ui/utils@0.2.7": {
|
||||
"@floating-ui/utils@0.2.8": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/floating-ui/floating-ui",
|
||||
"publisher": "atomiks",
|
||||
|
@ -84,7 +84,7 @@
|
|||
"path": "node_modules/acorn-globals/node_modules/acorn",
|
||||
"licenseFile": "node_modules/acorn-globals/node_modules/acorn/LICENSE"
|
||||
},
|
||||
"acorn@8.12.1": {
|
||||
"acorn@8.13.0": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/acornjs/acorn",
|
||||
"path": "node_modules/acorn",
|
||||
|
@ -127,7 +127,7 @@
|
|||
"path": "node_modules/browser-process-hrtime",
|
||||
"licenseFile": "node_modules/browser-process-hrtime/LICENSE"
|
||||
},
|
||||
"codemirror@5.65.17": {
|
||||
"codemirror@5.65.18": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/codemirror/CodeMirror",
|
||||
"publisher": "Marijn Haverbeke",
|
||||
|
@ -398,7 +398,7 @@
|
|||
"path": "node_modules/data-urls",
|
||||
"licenseFile": "node_modules/data-urls/LICENSE.txt"
|
||||
},
|
||||
"debug@4.3.6": {
|
||||
"debug@4.3.7": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/debug-js/debug",
|
||||
"publisher": "Josh Junon",
|
||||
|
@ -474,7 +474,7 @@
|
|||
"path": "node_modules/fabric",
|
||||
"licenseFile": "node_modules/fabric/LICENSE"
|
||||
},
|
||||
"form-data@4.0.0": {
|
||||
"form-data@4.0.1": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/form-data/form-data",
|
||||
"publisher": "Felix Geisendörfer",
|
||||
|
@ -597,13 +597,13 @@
|
|||
"path": "node_modules/mime-types",
|
||||
"licenseFile": "node_modules/mime-types/LICENSE"
|
||||
},
|
||||
"ms@2.1.2": {
|
||||
"ms@2.1.3": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/zeit/ms",
|
||||
"repository": "https://github.com/vercel/ms",
|
||||
"path": "node_modules/ms",
|
||||
"licenseFile": "node_modules/ms/license.md"
|
||||
},
|
||||
"nwsapi@2.2.12": {
|
||||
"nwsapi@2.2.13": {
|
||||
"licenses": "MIT",
|
||||
"repository": "https://github.com/dperini/nwsapi",
|
||||
"publisher": "Diego Perini",
|
||||
|
|
|
@ -17,6 +17,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
export let ctx: MapContext;
|
||||
|
||||
let unusedMsg: string;
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: unusedMsg =
|
||||
ctx === MapContext.Field
|
||||
? tr.changeNotetypeWillDiscardContent()
|
||||
|
|
|
@ -18,6 +18,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
$: info = state.info;
|
||||
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: unused =
|
||||
$info.isCloze && ctx === MapContext.Template ? [] : $info.unusedItems(ctx);
|
||||
</script>
|
||||
|
|
|
@ -38,6 +38,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
const currentDeck = "\n\n" + tr.deckConfigDisplayOrderWillUseCurrentDeck();
|
||||
|
||||
let disabledNewSortOrders: number[] = [];
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: {
|
||||
switch ($config.newCardGatherPriority) {
|
||||
case GatherOrder.RANDOM_NOTES:
|
||||
|
|
|
@ -51,6 +51,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
? tr.deckConfigGoodAboveEasy()
|
||||
: "";
|
||||
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: insertionOrderRandom =
|
||||
$config.newCardInsertOrder == DeckConfig_Config_NewCardInsertOrder.RANDOM
|
||||
? tr.deckConfigNewInsertionOrderRandomWithV3()
|
||||
|
|
|
@ -49,6 +49,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
);
|
||||
}
|
||||
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: {
|
||||
if (revlogRange < RevlogRange.Year) {
|
||||
minYear = maxYear;
|
||||
|
|
|
@ -44,6 +44,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
}
|
||||
}
|
||||
|
||||
// svelte-ignore reactive_declaration_non_reactive_property
|
||||
$: {
|
||||
switch (revlogRange as RevlogRange) {
|
||||
case RevlogRange.Year:
|
||||
|
|
Loading…
Reference in a new issue