mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 03:15:12 +00:00
fix lint errors in SkFormula.vue
This commit is contained in:
parent
2bd87fa481
commit
5f3cb09eb1
3 changed files with 56 additions and 46 deletions
|
@ -98,6 +98,7 @@
|
|||
"@storybook/vue3-vite": "8.3.3",
|
||||
"@testing-library/vue": "8.1.0",
|
||||
"@types/estree": "1.0.6",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/matter-js": "0.19.7",
|
||||
"@types/micromatch": "4.0.9",
|
||||
"@types/node": "20.14.12",
|
||||
|
|
|
@ -4,26 +4,26 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
-->
|
||||
|
||||
<template>
|
||||
<div v-if="block" :class="$style.block" v-html="renderedFormula"></div>
|
||||
<span v-else v-html="renderedFormula"></span>
|
||||
<div v-if="block" :class="$style.block" v-html="renderedFormula"></div>
|
||||
<span v-else v-html="renderedFormula"></span>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import katex from 'katex';
|
||||
import 'katex/dist/katex.min.css';
|
||||
import { computed } from 'vue';
|
||||
import katex from 'katex';
|
||||
import 'katex/dist/katex.min.css';
|
||||
|
||||
const props = defineProps<{
|
||||
const props = defineProps<{
|
||||
formula: string;
|
||||
block: boolean;
|
||||
}>();
|
||||
|
||||
const renderedFormula = computed(() =>
|
||||
katex.renderToString(props.formula, {
|
||||
throwOnError: false,
|
||||
trust: false,
|
||||
displayMode: props.block,
|
||||
} as any));
|
||||
const renderedFormula = computed(() =>
|
||||
katex.renderToString(props.formula, {
|
||||
throwOnError: false,
|
||||
trust: false,
|
||||
displayMode: props.block,
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
@ -943,6 +943,9 @@ importers:
|
|||
'@types/estree':
|
||||
specifier: 1.0.6
|
||||
version: 1.0.6
|
||||
'@types/katex':
|
||||
specifier: ^0.16.7
|
||||
version: 0.16.7
|
||||
'@types/matter-js':
|
||||
specifier: 0.19.7
|
||||
version: 0.19.7
|
||||
|
@ -4737,6 +4740,9 @@ packages:
|
|||
'@types/jsrsasign@10.5.14':
|
||||
resolution: {integrity: sha512-lppSlfK6etu+cuKs40K4rg8As79PH6hzIB+v55zSqImbSH3SE6Fm8MBHCiI91cWlAP3Z4igtJK1VL3fSN09blQ==}
|
||||
|
||||
'@types/katex@0.16.7':
|
||||
resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==}
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
|
||||
|
||||
|
@ -6784,6 +6790,7 @@ packages:
|
|||
eslint@8.57.0:
|
||||
resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
|
||||
hasBin: true
|
||||
|
||||
eslint@9.8.0:
|
||||
|
@ -12216,7 +12223,7 @@ snapshots:
|
|||
'@babel/traverse': 7.23.5
|
||||
'@babel/types': 7.24.7
|
||||
convert-source-map: 2.0.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
gensync: 1.0.0-beta.2
|
||||
json5: 2.2.3
|
||||
semver: 6.3.1
|
||||
|
@ -12236,7 +12243,7 @@ snapshots:
|
|||
'@babel/traverse': 7.24.7
|
||||
'@babel/types': 7.24.7
|
||||
convert-source-map: 2.0.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
gensync: 1.0.0-beta.2
|
||||
json5: 2.2.3
|
||||
semver: 6.3.1
|
||||
|
@ -12541,7 +12548,7 @@ snapshots:
|
|||
'@babel/helper-split-export-declaration': 7.24.7
|
||||
'@babel/parser': 7.24.7
|
||||
'@babel/types': 7.24.7
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -12556,7 +12563,7 @@ snapshots:
|
|||
'@babel/helper-split-export-declaration': 7.24.7
|
||||
'@babel/parser': 7.24.7
|
||||
'@babel/types': 7.24.7
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -13093,7 +13100,7 @@ snapshots:
|
|||
'@eslint/config-array@0.17.1':
|
||||
dependencies:
|
||||
'@eslint/object-schema': 2.1.4
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
minimatch: 3.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -13101,7 +13108,7 @@ snapshots:
|
|||
'@eslint/eslintrc@2.1.4':
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
espree: 9.6.1
|
||||
globals: 13.24.0
|
||||
ignore: 5.3.1
|
||||
|
@ -13115,7 +13122,7 @@ snapshots:
|
|||
'@eslint/eslintrc@3.1.0':
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
espree: 10.1.0
|
||||
globals: 14.0.0
|
||||
ignore: 5.3.1
|
||||
|
@ -13273,7 +13280,7 @@ snapshots:
|
|||
'@humanwhocodes/config-array@0.11.14':
|
||||
dependencies:
|
||||
'@humanwhocodes/object-schema': 2.0.3
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
minimatch: 3.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -15537,6 +15544,8 @@ snapshots:
|
|||
|
||||
'@types/jsrsasign@10.5.14': {}
|
||||
|
||||
'@types/katex@0.16.7': {}
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
dependencies:
|
||||
'@types/node': 20.14.12
|
||||
|
@ -15758,7 +15767,7 @@ snapshots:
|
|||
'@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.1.6)
|
||||
'@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.1.6)
|
||||
'@typescript-eslint/visitor-keys': 6.21.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 8.57.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.1
|
||||
|
@ -15832,7 +15841,7 @@ snapshots:
|
|||
'@typescript-eslint/types': 6.21.0
|
||||
'@typescript-eslint/typescript-estree': 6.21.0(typescript@5.1.6)
|
||||
'@typescript-eslint/visitor-keys': 6.21.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 8.57.0
|
||||
optionalDependencies:
|
||||
typescript: 5.1.6
|
||||
|
@ -15858,7 +15867,7 @@ snapshots:
|
|||
'@typescript-eslint/types': 7.17.0
|
||||
'@typescript-eslint/typescript-estree': 7.17.0(typescript@5.5.4)
|
||||
'@typescript-eslint/visitor-keys': 7.17.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 9.8.0
|
||||
optionalDependencies:
|
||||
typescript: 5.5.4
|
||||
|
@ -15871,7 +15880,7 @@ snapshots:
|
|||
'@typescript-eslint/types': 7.17.0
|
||||
'@typescript-eslint/typescript-estree': 7.17.0(typescript@5.6.2)
|
||||
'@typescript-eslint/visitor-keys': 7.17.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 9.8.0
|
||||
optionalDependencies:
|
||||
typescript: 5.6.2
|
||||
|
@ -15897,7 +15906,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 6.21.0(typescript@5.1.6)
|
||||
'@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.1.6)
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 8.57.0
|
||||
ts-api-utils: 1.3.0(typescript@5.1.6)
|
||||
optionalDependencies:
|
||||
|
@ -15921,7 +15930,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 7.17.0(typescript@5.5.4)
|
||||
'@typescript-eslint/utils': 7.17.0(eslint@9.8.0)(typescript@5.5.4)
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 9.8.0
|
||||
ts-api-utils: 1.3.0(typescript@5.5.4)
|
||||
optionalDependencies:
|
||||
|
@ -15933,7 +15942,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 7.17.0(typescript@5.6.2)
|
||||
'@typescript-eslint/utils': 7.17.0(eslint@9.8.0)(typescript@5.6.2)
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
eslint: 9.8.0
|
||||
ts-api-utils: 1.3.0(typescript@5.6.2)
|
||||
optionalDependencies:
|
||||
|
@ -15951,7 +15960,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/types': 6.21.0
|
||||
'@typescript-eslint/visitor-keys': 6.21.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.3
|
||||
|
@ -15981,7 +15990,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/types': 7.17.0
|
||||
'@typescript-eslint/visitor-keys': 7.17.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.4
|
||||
|
@ -15996,7 +16005,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@typescript-eslint/types': 7.17.0
|
||||
'@typescript-eslint/visitor-keys': 7.17.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.4
|
||||
|
@ -16083,7 +16092,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@ampproject/remapping': 2.2.1
|
||||
'@bcoe/v8-coverage': 0.2.3
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
istanbul-lib-report: 3.0.1
|
||||
istanbul-lib-source-maps: 5.0.4
|
||||
|
@ -16102,7 +16111,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@ampproject/remapping': 2.2.1
|
||||
'@bcoe/v8-coverage': 0.2.3
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
istanbul-lib-report: 3.0.1
|
||||
istanbul-lib-source-maps: 5.0.4
|
||||
|
@ -16391,7 +16400,7 @@ snapshots:
|
|||
|
||||
agent-base@7.1.0:
|
||||
dependencies:
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
|
@ -18082,7 +18091,7 @@ snapshots:
|
|||
|
||||
esbuild-register@3.5.0(esbuild@0.23.1):
|
||||
dependencies:
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
esbuild: 0.23.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -18360,7 +18369,7 @@ snapshots:
|
|||
ajv: 6.12.6
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.3
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
doctrine: 3.0.0
|
||||
escape-string-regexp: 4.0.0
|
||||
eslint-scope: 7.2.2
|
||||
|
@ -18403,7 +18412,7 @@ snapshots:
|
|||
ajv: 6.12.6
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.3
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
escape-string-regexp: 4.0.0
|
||||
eslint-scope: 8.0.2
|
||||
eslint-visitor-keys: 4.0.0
|
||||
|
@ -19338,7 +19347,7 @@ snapshots:
|
|||
http-proxy-agent@7.0.2:
|
||||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
|
@ -19370,7 +19379,7 @@ snapshots:
|
|||
https-proxy-agent@7.0.5:
|
||||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
|
@ -19728,7 +19737,7 @@ snapshots:
|
|||
|
||||
istanbul-lib-source-maps@4.0.1:
|
||||
dependencies:
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
source-map: 0.6.1
|
||||
transitivePeerDependencies:
|
||||
|
@ -19737,7 +19746,7 @@ snapshots:
|
|||
istanbul-lib-source-maps@5.0.4:
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -20157,7 +20166,7 @@ snapshots:
|
|||
whatwg-encoding: 3.1.1
|
||||
whatwg-mimetype: 4.0.0
|
||||
whatwg-url: 14.0.0
|
||||
ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)
|
||||
ws: 8.18.0(bufferutil@4.0.7)(utf-8-validate@6.0.3)
|
||||
xml-name-validator: 5.0.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
|
@ -20852,7 +20861,7 @@ snapshots:
|
|||
micromark@4.0.0:
|
||||
dependencies:
|
||||
'@types/debug': 4.1.12
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
decode-named-character-reference: 1.0.2
|
||||
devlop: 1.1.0
|
||||
micromark-core-commonmark: 2.0.0
|
||||
|
@ -22314,7 +22323,7 @@ snapshots:
|
|||
|
||||
require-in-the-middle@7.3.0:
|
||||
dependencies:
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
module-details-from-path: 1.0.3
|
||||
resolve: 1.22.8
|
||||
transitivePeerDependencies:
|
||||
|
@ -22657,7 +22666,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@hapi/hoek': 11.0.4
|
||||
'@hapi/wreck': 18.0.1
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
joi: 17.11.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -22757,7 +22766,7 @@ snapshots:
|
|||
socks-proxy-agent@8.0.2:
|
||||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
socks: 2.7.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -23616,7 +23625,7 @@ snapshots:
|
|||
vite-node@1.6.0(@types/node@20.14.12)(sass@1.79.3)(terser@5.33.0):
|
||||
dependencies:
|
||||
cac: 6.7.14
|
||||
debug: 4.3.5(supports-color@8.1.1)
|
||||
debug: 4.3.5(supports-color@5.5.0)
|
||||
pathe: 1.1.2
|
||||
picocolors: 1.0.1
|
||||
vite: 5.4.8(@types/node@20.14.12)(sass@1.79.3)(terser@5.33.0)
|
||||
|
|
Loading…
Reference in a new issue