mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
1 parent
4b9d7ab637
commit
4613423f01
5 files changed
+42
-10
No files matched your search
Vendored
+5
-2
@@ -268,18 +268,19 @@ declare module '@vue/runtime-core' {
|
||||
NanoMemo: typeof import('./src/tools/nano-memo/nano-memo.vue')['default']
|
||||
'NanoMemo.content': typeof import('./src/tools/nano-memo/nano-memo.content.md')['default']
|
||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NginxFormatter: typeof import('./src/tools/nginx-formatter/nginx-formatter.vue')['default']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NumberInput: typeof import('./src/tools/pomodoro-timer/app/components/NumberInput.vue')['default']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default']
|
||||
@@ -302,6 +303,8 @@ declare module '@vue/runtime-core' {
|
||||
PhpArrayToJson: typeof import('./src/tools/php-array-to-json/php-array-to-json.vue')['default']
|
||||
PinCodeGenerator: typeof import('./src/tools/pin-code-generator/pin-code-generator.vue')['default']
|
||||
PlayPauseBtn: typeof import('./src/tools/pomodoro-timer/app/components/PlayPauseBtn.vue')['default']
|
||||
PomodoroAbout: typeof import('./src/tools/pomodoro-timer/app/views/PomodoroAbout.vue')['default']
|
||||
PomodoroApp: typeof import('./src/tools/pomodoro-timer/app/PomodoroApp.vue')['default']
|
||||
PomodoroTimer: typeof import('./src/tools/pomodoro-timer/pomodoro-timer.vue')['default']
|
||||
PortNumbers: typeof import('./src/tools/port-numbers/port-numbers.vue')['default']
|
||||
Potrace: typeof import('./src/tools/potrace/potrace.vue')['default']
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
"md-editor-v3": "^4.21.3",
|
||||
"memorystream": "^0.3.1",
|
||||
"mime-types": "^2.1.35",
|
||||
"mitex-wasm": "^0.2.5",
|
||||
"monaco-editor": "^0.43.0",
|
||||
"morsee": "^1.0.10",
|
||||
"naive-ui": "^2.35.0",
|
||||
@@ -343,6 +344,7 @@
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-pwa": "^1.0.0",
|
||||
"vite-plugin-vue-markdown": "^0.23.5",
|
||||
"vite-plugin-wasm": "^3.4.1",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vitest": "^0.34.6",
|
||||
"workbox-window": "^7.3.0",
|
||||
|
||||
Generated
+18
@@ -482,6 +482,9 @@ dependencies:
|
||||
mime-types:
|
||||
specifier: ^2.1.35
|
||||
version: 2.1.35
|
||||
mitex-wasm:
|
||||
specifier: ^0.2.5
|
||||
version: 0.2.5
|
||||
monaco-editor:
|
||||
specifier: ^0.43.0
|
||||
version: 0.43.0
|
||||
@@ -919,6 +922,9 @@ devDependencies:
|
||||
vite-plugin-vue-markdown:
|
||||
specifier: ^0.23.5
|
||||
version: 0.23.5(rollup@2.79.2)(vite@4.4.9)
|
||||
vite-plugin-wasm:
|
||||
specifier: ^3.4.1
|
||||
version: 3.4.1(vite@4.4.9)
|
||||
vite-svg-loader:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
@@ -13658,6 +13664,10 @@ packages:
|
||||
rimraf: 5.0.10
|
||||
dev: false
|
||||
|
||||
/mitex-wasm@0.2.5:
|
||||
resolution: {integrity: sha512-pGIaSWmcfFEW/zjsNwgg2Y/Xthiah8ZLWU8QlF21dJPql8ifr1D268V5A5AwDZcGzfe2t44D4uEpGj81DUGCsA==}
|
||||
dev: false
|
||||
|
||||
/mkdirp-classic@0.5.3:
|
||||
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
|
||||
dev: false
|
||||
@@ -17787,6 +17797,14 @@ packages:
|
||||
- rollup
|
||||
dev: true
|
||||
|
||||
/vite-plugin-wasm@3.4.1(vite@4.4.9):
|
||||
resolution: {integrity: sha512-ja3nSo2UCkVeitltJGkS3pfQHAanHv/DqGatdI39ja6McgABlpsZ5hVgl6wuR8Qx5etY3T5qgDQhOWzc5RReZA==}
|
||||
peerDependencies:
|
||||
vite: ^2 || ^3 || ^4 || ^5 || ^6
|
||||
dependencies:
|
||||
vite: 4.4.9(@types/node@18.19.75)(less@4.2.2)
|
||||
dev: true
|
||||
|
||||
/vite-svg-loader@4.0.0:
|
||||
resolution: {integrity: sha512-0MMf1yzzSYlV4MGePsLVAOqXsbF5IVxbn4EEzqRnWxTQl8BJg/cfwIzfQNmNQxZp5XXwd4kyRKF1LytuHZTnqA==}
|
||||
dependencies:
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useScriptTag } from '@vueuse/core';
|
||||
import { convert_math } from 'mitex-wasm';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const base = import.meta.env.BASE_URL ?? '/';
|
||||
|
||||
const { load: loadPlurimath } = useScriptTag(`${base}plurimath/index.js`, undefined, { type: 'module', manual: true });
|
||||
const { load: loadPlurimath } = useScriptTag('/plurimath/index.js', undefined, { type: 'module', manual: true });
|
||||
|
||||
const formats = [
|
||||
{ value: 'asciimath', label: 'AsciiMath' },
|
||||
@@ -48,6 +47,9 @@ const target = computedAsync(async () => {
|
||||
case 'omml':
|
||||
result = formula.toOmml();
|
||||
break;
|
||||
case 'typst':
|
||||
result = convert_math(formula.toLatex(), new Uint8Array());
|
||||
break;
|
||||
default:
|
||||
result = '# unknown format';
|
||||
break;
|
||||
@@ -74,17 +76,22 @@ const target = computedAsync(async () => {
|
||||
/>
|
||||
<c-select
|
||||
v-model:value="sourceFormat"
|
||||
label="Source format:"
|
||||
:options="formats"
|
||||
placeholder="Source format"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<c-select
|
||||
v-model:value="targetFormat"
|
||||
:options="formats"
|
||||
placeholder="Source format"
|
||||
label="Target format:"
|
||||
:options="[...formats, { value: 'typst', label: 'Typst' }]"
|
||||
placeholder="Target format"
|
||||
mb-2
|
||||
/>
|
||||
<textarea-copyable v-if="target" :value="target" :language="targetFormat" word-wrap />
|
||||
|
||||
<c-card title="Converted expression:">
|
||||
<textarea-copyable :value="target" :language="targetFormat" word-wrap />
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,6 +1,7 @@
|
||||
import { URL, fileURLToPath } from 'node:url';
|
||||
import { resolve } from 'node:path';
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import wasm from 'vite-plugin-wasm';
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
@@ -103,6 +104,7 @@ export default defineConfig({
|
||||
}),
|
||||
Unocss(),
|
||||
nodePolyfills(),
|
||||
wasm(),
|
||||
],
|
||||
base: baseUrl,
|
||||
resolve: {
|
||||
|
||||
Reference in new issue
Block a user