diff --git a/package.json b/package.json index 208d2280d..5fc270278 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,9 @@ "codemirror": "^5.63.1", "css-browser-selector": "^0.6.5", "d3": "^7.0.0", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-simple-import-sort": "^7.0.0", + "eslint-plugin-svelte3": "^3.4.0", "intl-pluralrules": "^1.2.2", "jquery": "^3.5.1", "jquery-ui-dist": "^1.12.1", @@ -83,9 +86,9 @@ ], "browserslist": [ "defaults", - "not IE 11", "not op_mini all", + "not < 1%", "Chrome 77", - "iOS 12" + "iOS 13.4" ] } diff --git a/ts/.eslintrc.js b/ts/.eslintrc.js index 9ac39c7ab..1b9095107 100644 --- a/ts/.eslintrc.js +++ b/ts/.eslintrc.js @@ -1,22 +1,53 @@ module.exports = { - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:compat/recommended", - ], + extends: ["eslint:recommended", "plugin:compat/recommended"], parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint"], + plugins: [ + "svelte3", + "import", + "simple-import-sort", + "@typescript-eslint", + "@typescript-eslint/eslint-plugin", + ], rules: { - "prefer-const": "warn", - "no-nested-ternary": "warn", "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-unused-vars": [ "warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, ], + "import/newline-after-import": "warn", + "import/no-useless-path-segments": "warn", + "simple-import-sort/imports": "warn", + "simple-import-sort/exports": "warn", + "prefer-const": "warn", + "no-nested-ternary": "warn", }, + overrides: [ + { + files: "**/*.ts", + extends: [ + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + ], + rules: { + "@typescript-eslint/no-non-null-assertion": "off", + }, + }, + { + files: "**/*.svelte", + processor: "svelte3/svelte3", + rules: { + "no-redeclare": "off", + "no-global-assign": "off", + }, + }, + ], env: { browser: true }, ignorePatterns: ["backend_proto.d.ts", "*.svelte.d.ts"], + globals: { + globalThis: false, + NodeListOf: false, + }, + settings: { + "svelte3/typescript": () => require("typescript"), + }, }; diff --git a/ts/card-info/CardInfo.svelte b/ts/card-info/CardInfo.svelte index 507bb8ee6..d16b0e6aa 100644 --- a/ts/card-info/CardInfo.svelte +++ b/ts/card-info/CardInfo.svelte @@ -3,12 +3,12 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/change-notetype/MapperRow.svelte b/ts/change-notetype/MapperRow.svelte index 4104b78b7..71caf78cf 100644 --- a/ts/change-notetype/MapperRow.svelte +++ b/ts/change-notetype/MapperRow.svelte @@ -3,15 +3,15 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/AdvancedOptions.svelte b/ts/deck-options/AdvancedOptions.svelte index 133b512cd..8ac9919c2 100644 --- a/ts/deck-options/AdvancedOptions.svelte +++ b/ts/deck-options/AdvancedOptions.svelte @@ -3,21 +3,21 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/AudioOptions.svelte b/ts/deck-options/AudioOptions.svelte index a25864146..ef78c89a8 100644 --- a/ts/deck-options/AudioOptions.svelte +++ b/ts/deck-options/AudioOptions.svelte @@ -3,18 +3,18 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/BuryOptions.svelte b/ts/deck-options/BuryOptions.svelte index 3048e186b..1785b5d16 100644 --- a/ts/deck-options/BuryOptions.svelte +++ b/ts/deck-options/BuryOptions.svelte @@ -3,18 +3,18 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/CardStateCustomizer.svelte b/ts/deck-options/CardStateCustomizer.svelte index 01a7e866c..08505b481 100644 --- a/ts/deck-options/CardStateCustomizer.svelte +++ b/ts/deck-options/CardStateCustomizer.svelte @@ -3,11 +3,11 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/ConfigSelector.svelte b/ts/deck-options/ConfigSelector.svelte index 8871919da..699df67fc 100644 --- a/ts/deck-options/ConfigSelector.svelte +++ b/ts/deck-options/ConfigSelector.svelte @@ -3,23 +3,23 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/TooltipLabel.svelte b/ts/deck-options/TooltipLabel.svelte index 8291a07a5..a0c477fe3 100644 --- a/ts/deck-options/TooltipLabel.svelte +++ b/ts/deck-options/TooltipLabel.svelte @@ -4,10 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/deck-options/icons.ts b/ts/deck-options/icons.ts index c275be3f3..c2c28366f 100644 --- a/ts/deck-options/icons.ts +++ b/ts/deck-options/icons.ts @@ -5,5 +5,5 @@ // Import icons from bootstrap export { default as revertIcon } from "bootstrap-icons/icons/arrow-counterclockwise.svg"; -export { default as infoCircle } from "bootstrap-icons/icons/info-circle.svg"; export { default as gearIcon } from "bootstrap-icons/icons/gear.svg"; +export { default as infoCircle } from "bootstrap-icons/icons/info-circle.svg"; diff --git a/ts/deck-options/index.ts b/ts/deck-options/index.ts index d114b003b..9841e237d 100644 --- a/ts/deck-options/index.ts +++ b/ts/deck-options/index.ts @@ -6,16 +6,15 @@ */ import "../sveltelib/export-runtime"; - -import { DeckOptionsState } from "./lib"; -import { setupI18n, ModuleName } from "../lib/i18n"; -import { deckConfig } from "../lib/proto"; -import { checkNightMode } from "../lib/nightmode"; -import { touchDeviceKey, modalsKey } from "../components/context-keys"; - -import DeckOptionsPage from "./DeckOptionsPage.svelte"; import "./deck-options-base.css"; +import { modalsKey, touchDeviceKey } from "../components/context-keys"; +import { ModuleName, setupI18n } from "../lib/i18n"; +import { checkNightMode } from "../lib/nightmode"; +import { deckConfig } from "../lib/proto"; +import DeckOptionsPage from "./DeckOptionsPage.svelte"; +import { DeckOptionsState } from "./lib"; + const i18n = setupI18n({ modules: [ ModuleName.SCHEDULING, @@ -45,11 +44,11 @@ export async function setupDeckOptions(did: number): Promise { }); } -import TitledContainer from "./TitledContainer.svelte"; -import SpinBoxRow from "./SpinBoxRow.svelte"; -import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte"; import EnumSelectorRow from "./EnumSelectorRow.svelte"; +import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte"; +import SpinBoxRow from "./SpinBoxRow.svelte"; import SwitchRow from "./SwitchRow.svelte"; +import TitledContainer from "./TitledContainer.svelte"; export const components = { TitledContainer, diff --git a/ts/deck-options/lib.test.ts b/ts/deck-options/lib.test.ts index 0ff19e28a..69bb2d0bb 100644 --- a/ts/deck-options/lib.test.ts +++ b/ts/deck-options/lib.test.ts @@ -5,9 +5,10 @@ @typescript-eslint/no-explicit-any: "off", */ +import { get } from "svelte/store"; + import { DeckConfig } from "../lib/proto"; import { DeckOptionsState } from "./lib"; -import { get } from "svelte/store"; const exampleData = { allConfig: [ diff --git a/ts/deck-options/lib.ts b/ts/deck-options/lib.ts index 41d524080..80f2e1d4d 100644 --- a/ts/deck-options/lib.ts +++ b/ts/deck-options/lib.ts @@ -1,10 +1,11 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { DeckConfig, deckConfig } from "../lib/proto"; -import { Writable, writable, get, Readable, readable } from "svelte/store"; -import { isEqual, cloneDeep } from "lodash-es"; +import { cloneDeep, isEqual } from "lodash-es"; +import { get, Readable, readable, Writable, writable } from "svelte/store"; + import { localeCompare } from "../lib/i18n"; +import { DeckConfig, deckConfig } from "../lib/proto"; import type { DynamicSvelteComponent } from "../sveltelib/dynamicComponent"; export type DeckOptionsId = number; diff --git a/ts/deck-options/steps.ts b/ts/deck-options/steps.ts index a16eb285f..c123dd960 100644 --- a/ts/deck-options/steps.ts +++ b/ts/deck-options/steps.ts @@ -1,7 +1,7 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { TimespanUnit, naturalWholeUnit, unitAmount, unitSeconds } from "../lib/time"; +import { naturalWholeUnit, TimespanUnit, unitAmount, unitSeconds } from "../lib/time"; function unitSuffix(unit: TimespanUnit): string { switch (unit) { diff --git a/ts/domlib/index.ts b/ts/domlib/index.ts index 4808c7ce5..4d5ff72f4 100644 --- a/ts/domlib/index.ts +++ b/ts/domlib/index.ts @@ -2,6 +2,6 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export * from "./location"; -export * from "./surround"; export * from "./move-nodes"; export * from "./place-caret"; +export * from "./surround"; diff --git a/ts/domlib/location/document.ts b/ts/domlib/location/document.ts index f16586d4e..fae485cce 100644 --- a/ts/domlib/location/document.ts +++ b/ts/domlib/location/document.ts @@ -1,10 +1,10 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +import { getSelection } from "../../lib/cross-browser"; +import { findNodeFromCoordinates } from "./node"; import type { SelectionLocation, SelectionLocationContent } from "./selection"; import { getSelectionLocation } from "./selection"; -import { findNodeFromCoordinates } from "./node"; -import { getSelection } from "../../lib/cross-browser"; export function saveSelection(base: Node): SelectionLocation | null { return getSelectionLocation(base); diff --git a/ts/domlib/location/index.ts b/ts/domlib/location/index.ts index 1e7f748f8..3434d5812 100644 --- a/ts/domlib/location/index.ts +++ b/ts/domlib/location/index.ts @@ -2,8 +2,7 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { registerPackage } from "../../lib/runtime-require"; - -import { saveSelection, restoreSelection } from "./document"; +import { restoreSelection, saveSelection } from "./document"; import { Position } from "./location"; registerPackage("anki/location", { @@ -12,5 +11,5 @@ registerPackage("anki/location", { Position, }); -export { saveSelection, restoreSelection, Position }; +export { Position, restoreSelection, saveSelection }; export type { SelectionLocation } from "./selection"; diff --git a/ts/domlib/location/range.ts b/ts/domlib/location/range.ts index 38796ca34..8bf02c001 100644 --- a/ts/domlib/location/range.ts +++ b/ts/domlib/location/range.ts @@ -1,8 +1,8 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { getNodeCoordinates } from "./node"; import type { CaretLocation } from "./location"; +import { getNodeCoordinates } from "./node"; interface RangeCoordinatesCollapsed { readonly start: CaretLocation; diff --git a/ts/domlib/location/selection.ts b/ts/domlib/location/selection.ts index 948b9e248..6fa53ebd7 100644 --- a/ts/domlib/location/selection.ts +++ b/ts/domlib/location/selection.ts @@ -1,10 +1,10 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { getNodeCoordinates } from "./node"; +import { getRange, getSelection } from "../../lib/cross-browser"; import type { CaretLocation } from "./location"; import { compareLocations, Position } from "./location"; -import { getSelection, getRange } from "../../lib/cross-browser"; +import { getNodeCoordinates } from "./node"; export interface SelectionLocationCollapsed { readonly anchor: CaretLocation; diff --git a/ts/domlib/surround/ascend.ts b/ts/domlib/surround/ascend.ts index 8d86b34a9..02ed8b4c0 100644 --- a/ts/domlib/surround/ascend.ts +++ b/ts/domlib/surround/ascend.ts @@ -1,8 +1,8 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { ascend, isOnlyChild } from "../../lib/node"; import { elementIsBlock } from "../../lib/dom"; +import { ascend, isOnlyChild } from "../../lib/node"; export function ascendWhileSingleInline(node: Node, base: Node): Node { if (node === base) { diff --git a/ts/domlib/surround/child-node-range.ts b/ts/domlib/surround/child-node-range.ts index 9cd659542..cf8863661 100644 --- a/ts/domlib/surround/child-node-range.ts +++ b/ts/domlib/surround/child-node-range.ts @@ -1,8 +1,8 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +import { elementIsEmpty, nodeIsElement } from "../../lib/dom"; import { ascend } from "../../lib/node"; -import { nodeIsElement, elementIsEmpty } from "../../lib/dom"; export interface ChildNodeRange { parent: Node; diff --git a/ts/domlib/surround/find-above.ts b/ts/domlib/surround/find-above.ts index f3625bf4b..98c067040 100644 --- a/ts/domlib/surround/find-above.ts +++ b/ts/domlib/surround/find-above.ts @@ -2,7 +2,7 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { nodeIsElement } from "../../lib/dom"; -import type { FoundMatch, ElementMatcher } from "./matcher"; +import type { ElementMatcher, FoundMatch } from "./matcher"; export function findClosest( node: Node, diff --git a/ts/domlib/surround/find-adjacent.test.ts b/ts/domlib/surround/find-adjacent.test.ts index 508c9106a..d18925ad5 100644 --- a/ts/domlib/surround/find-adjacent.test.ts +++ b/ts/domlib/surround/find-adjacent.test.ts @@ -1,8 +1,8 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { findBefore, findAfter } from "./find-adjacent"; import { nodeToChildNodeRange } from "./child-node-range"; +import { findAfter, findBefore } from "./find-adjacent"; import { matchTagName } from "./matcher"; const parser = new DOMParser(); diff --git a/ts/domlib/surround/find-adjacent.ts b/ts/domlib/surround/find-adjacent.ts index 1cb630090..3e3ab7f0c 100644 --- a/ts/domlib/surround/find-adjacent.ts +++ b/ts/domlib/surround/find-adjacent.ts @@ -1,11 +1,11 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { nodeIsElement, nodeIsText, elementIsEmpty } from "../../lib/dom"; +import { elementIsEmpty, nodeIsElement, nodeIsText } from "../../lib/dom"; import { hasOnlyChild } from "../../lib/node"; import type { ChildNodeRange } from "./child-node-range"; +import type { ElementMatcher, FoundAdjacent, FoundAlong } from "./matcher"; import { MatchResult } from "./matcher"; -import type { ElementMatcher, FoundAlong, FoundAdjacent } from "./matcher"; /** * These functions will not ascend on the starting node, but will descend on the neighbor node diff --git a/ts/domlib/surround/find-within.ts b/ts/domlib/surround/find-within.ts index c6bfbd132..789b4fca7 100644 --- a/ts/domlib/surround/find-within.ts +++ b/ts/domlib/surround/find-within.ts @@ -2,9 +2,9 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { nodeIsElement } from "../../lib/dom"; -import { nodeWithinRange } from "./within-range"; import type { ChildNodeRange } from "./child-node-range"; -import type { FoundMatch, ElementMatcher } from "./matcher"; +import type { ElementMatcher, FoundMatch } from "./matcher"; +import { nodeWithinRange } from "./within-range"; /** * Elements returned should be in post-order diff --git a/ts/domlib/surround/index.ts b/ts/domlib/surround/index.ts index f56c93381..fec230ddc 100644 --- a/ts/domlib/surround/index.ts +++ b/ts/domlib/surround/index.ts @@ -2,11 +2,10 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { registerPackage } from "../../lib/runtime-require"; - -import { surroundNoSplitting } from "./no-splitting"; -import { unsurround } from "./unsurround"; import { findClosest } from "./find-above"; import { MatchResult, matchTagName } from "./matcher"; +import { surroundNoSplitting } from "./no-splitting"; +import { unsurround } from "./unsurround"; registerPackage("anki/surround", { surroundNoSplitting, @@ -16,5 +15,5 @@ registerPackage("anki/surround", { matchTagName, }); -export { surroundNoSplitting, unsurround, findClosest, MatchResult, matchTagName }; -export type { ElementMatcher, ElementClearer } from "./matcher"; +export { findClosest, MatchResult, matchTagName, surroundNoSplitting, unsurround }; +export type { ElementClearer, ElementMatcher } from "./matcher"; diff --git a/ts/domlib/surround/merge-match.ts b/ts/domlib/surround/merge-match.ts index d8a1de7ea..97510d22d 100644 --- a/ts/domlib/surround/merge-match.ts +++ b/ts/domlib/surround/merge-match.ts @@ -1,14 +1,14 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +import { ascendWhileSingleInline } from "./ascend"; import type { ChildNodeRange } from "./child-node-range"; import { - nodeToChildNodeRange, areSiblingChildNodeRanges, - mergeChildNodeRanges, coversWholeParent, + mergeChildNodeRanges, + nodeToChildNodeRange, } from "./child-node-range"; -import { ascendWhileSingleInline } from "./ascend"; interface MergeMatch { mismatch: boolean; diff --git a/ts/domlib/surround/no-splitting.ts b/ts/domlib/surround/no-splitting.ts index 16f94eb57..7bfcc2cb5 100644 --- a/ts/domlib/surround/no-splitting.ts +++ b/ts/domlib/surround/no-splitting.ts @@ -1,18 +1,18 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { getRangeAnchors } from "./range-anchors"; -import { nodeWithinRange } from "./within-range"; -import { findTextNodesWithin } from "./text-node"; -import { - surroundChildNodeRangeWithNode, - nodeToChildNodeRange, -} from "./child-node-range"; -import { mergeMatchChildNodeRanges } from "./merge-match"; import { ascendWhileSingleInline } from "./ascend"; -import { normalizeInsertionRanges } from "./normalize-insertion-ranges"; +import { + nodeToChildNodeRange, + surroundChildNodeRangeWithNode, +} from "./child-node-range"; +import type { ElementClearer, ElementMatcher } from "./matcher"; import { matchTagName } from "./matcher"; -import type { ElementMatcher, ElementClearer } from "./matcher"; +import { mergeMatchChildNodeRanges } from "./merge-match"; +import { normalizeInsertionRanges } from "./normalize-insertion-ranges"; +import { getRangeAnchors } from "./range-anchors"; +import { findTextNodesWithin } from "./text-node"; +import { nodeWithinRange } from "./within-range"; export interface NodesResult { addedNodes: Node[]; diff --git a/ts/domlib/surround/normalize-insertion-ranges.ts b/ts/domlib/surround/normalize-insertion-ranges.ts index 58a4a5136..64fa8ddff 100644 --- a/ts/domlib/surround/normalize-insertion-ranges.ts +++ b/ts/domlib/surround/normalize-insertion-ranges.ts @@ -1,16 +1,16 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { findBefore, findAfter } from "./find-adjacent"; -import { findWithin, findWithinNode } from "./find-within"; -import { MatchResult } from "./matcher"; -import type { - FoundMatch, - ElementMatcher, - ElementClearer, - FoundAdjacent, -} from "./matcher"; import type { ChildNodeRange } from "./child-node-range"; +import { findAfter, findBefore } from "./find-adjacent"; +import { findWithin, findWithinNode } from "./find-within"; +import type { + ElementClearer, + ElementMatcher, + FoundAdjacent, + FoundMatch, +} from "./matcher"; +import { MatchResult } from "./matcher"; function countChildNodesRespectiveToParent(parent: Node, element: Element): number { return element.parentNode === parent ? element.childNodes.length : 1; diff --git a/ts/domlib/surround/unsurround.ts b/ts/domlib/surround/unsurround.ts index 2432cdc26..8d564b907 100644 --- a/ts/domlib/surround/unsurround.ts +++ b/ts/domlib/surround/unsurround.ts @@ -1,13 +1,13 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import { getRangeAnchors } from "./range-anchors"; -import type { NodesResult, SurroundNoSplittingResult } from "./no-splitting"; -import { MatchResult, matchTagName } from "./matcher"; -import type { FoundMatch, ElementMatcher, ElementClearer } from "./matcher"; import { findFarthest } from "./find-above"; -import { findWithinRange, findWithinNode } from "./find-within"; +import { findWithinNode, findWithinRange } from "./find-within"; +import type { ElementClearer, ElementMatcher, FoundMatch } from "./matcher"; +import { MatchResult, matchTagName } from "./matcher"; +import type { NodesResult, SurroundNoSplittingResult } from "./no-splitting"; import { surround } from "./no-splitting"; +import { getRangeAnchors } from "./range-anchors"; function findBetween( range: Range, diff --git a/ts/editable/ContentEditable.svelte b/ts/editable/ContentEditable.svelte index 680010fba..861d141f3 100644 --- a/ts/editable/ContentEditable.svelte +++ b/ts/editable/ContentEditable.svelte @@ -8,15 +8,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/* prevent triggering Bootstrap dropdown */ event.stopImmediatePropagation()} style="--left: {left}px; --top: {top}px; --width: {width}px; --height: {height}px; --offsetX: {offsetX}px; --offsetY: {offsetY}px;" diff --git a/ts/editor/LabelContainer.svelte b/ts/editor/LabelContainer.svelte index 26514fd41..770e0a9fc 100644 --- a/ts/editor/LabelContainer.svelte +++ b/ts/editor/LabelContainer.svelte @@ -3,8 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/editor/MathjaxElement.svelte b/ts/editor/MathjaxElement.svelte index 710db7414..5dbf2441e 100644 --- a/ts/editor/MathjaxElement.svelte +++ b/ts/editor/MathjaxElement.svelte @@ -3,8 +3,8 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/editor/editor-toolbar/ItalicButton.svelte b/ts/editor/editor-toolbar/ItalicButton.svelte index 6a344e0e9..61fff80c2 100644 --- a/ts/editor/editor-toolbar/ItalicButton.svelte +++ b/ts/editor/editor-toolbar/ItalicButton.svelte @@ -3,17 +3,17 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/graphs/TodayStats.svelte b/ts/graphs/TodayStats.svelte index cbe40ef44..9023b0a1e 100644 --- a/ts/graphs/TodayStats.svelte +++ b/ts/graphs/TodayStats.svelte @@ -4,9 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -->