diff --git a/bun.lock b/bun.lock index a8c5d2ab..9d995b94 100644 --- a/bun.lock +++ b/bun.lock @@ -25,7 +25,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^25.0.10", + "@types/node": "^25.1.0", "@types/plotly.js": "^3.0.9", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", @@ -388,7 +388,7 @@ "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + "@types/node": ["@types/node@25.1.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA=="], "@types/plist": ["@types/plist@3.0.5", "", { "dependencies": { "@types/node": "*", "xmlbuilder": ">=11.0.1" } }, "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA=="], @@ -1320,6 +1320,18 @@ "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "@types/cacheable-request/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + + "@types/fs-extra/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + + "@types/keyv/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + + "@types/plist/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + + "@types/responselike/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + + "@types/yauzl/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + "ajv-keywords/ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], "app-builder-lib/fs-extra": ["fs-extra@10.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="], diff --git a/package.json b/package.json index 66fb8b1d..74fcf5c5 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "url": "git+https://github.com/opencor/webapp.git" }, "type": "module", - "version": "0.20260129.0", + "version": "0.20260129.1", "scripts": { "archive:web": "bun src/renderer/scripts/archive.web.js", "build": "electron-vite build", @@ -67,7 +67,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^25.0.10", + "@types/node": "^25.1.0", "@types/plotly.js": "^3.0.9", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", diff --git a/src/renderer/bun.lock b/src/renderer/bun.lock index f018c218..d597596f 100644 --- a/src/renderer/bun.lock +++ b/src/renderer/bun.lock @@ -22,7 +22,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^25.0.10", + "@types/node": "^25.1.0", "@types/plotly.js": "^3.0.9", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", @@ -292,7 +292,7 @@ "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], - "@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="], + "@types/node": ["@types/node@25.1.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA=="], "@types/plotly.js": ["@types/plotly.js@3.0.9", "", {}, "sha512-nHKn7czWIPN7rT5wWI5qhML2O1Prm/Gx0NNe1MVr5GUL1zuzxbvIDmG7hlKMMtDsEtNfNQLMlMwk0CRtd3uqhg=="], diff --git a/src/renderer/package.json b/src/renderer/package.json index ce89709f..96089f1e 100644 --- a/src/renderer/package.json +++ b/src/renderer/package.json @@ -39,7 +39,7 @@ }, "./style.css": "./dist/opencor.css" }, - "version": "0.20260129.0", + "version": "0.20260129.1", "scripts": { "build": "vite build", "build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts", @@ -74,7 +74,7 @@ "@tailwindcss/postcss": "^4.1.18", "@tailwindcss/vite": "^4.1.18", "@types/crypto-js": "^4.2.2", - "@types/node": "^25.0.10", + "@types/node": "^25.1.0", "@types/plotly.js": "^3.0.9", "@vitejs/plugin-vue": "^6.0.3", "@vue/tsconfig": "^0.8.1", diff --git a/src/renderer/src/components/dialogs/AboutDialog.vue b/src/renderer/src/components/dialogs/AboutDialog.vue index d0914a8f..ca2d7fcd 100644 --- a/src/renderer/src/components/dialogs/AboutDialog.vue +++ b/src/renderer/src/components/dialogs/AboutDialog.vue @@ -45,9 +45,7 @@ import { COPYRIGHT } from '../../common/constants.ts'; import { electronApi } from '../../common/electronApi.ts'; import * as locApi from '../../libopencor/locApi.ts'; -defineEmits<{ - (event: 'close'): void; -}>(); +defineEmits<(event: 'close') => void>(); import { version } from '../../../package.json'; diff --git a/src/renderer/src/components/dialogs/BaseDialog.vue b/src/renderer/src/components/dialogs/BaseDialog.vue index 3160c3a7..25ef2c60 100644 --- a/src/renderer/src/components/dialogs/BaseDialog.vue +++ b/src/renderer/src/components/dialogs/BaseDialog.vue @@ -24,9 +24,7 @@ import * as vue from 'vue'; import { enableDisableMainMenu } from '../../common/common.ts'; -const emit = defineEmits<{ - (event: 'cancel'): void; -}>(); +const emit = defineEmits<(event: 'cancel') => void>(); const { incrementDialogs, decrementDialogs } = useDialogState(); diff --git a/src/renderer/src/components/dialogs/OkMessageDialog.vue b/src/renderer/src/components/dialogs/OkMessageDialog.vue index 3be99137..5ce7cb35 100644 --- a/src/renderer/src/components/dialogs/OkMessageDialog.vue +++ b/src/renderer/src/components/dialogs/OkMessageDialog.vue @@ -10,9 +10,7 @@ diff --git a/src/renderer/src/components/widgets/InputWidget.vue b/src/renderer/src/components/widgets/InputWidget.vue index e7456516..f0e6ec89 100644 --- a/src/renderer/src/components/widgets/InputWidget.vue +++ b/src/renderer/src/components/widgets/InputWidget.vue @@ -13,25 +13,15 @@
- - - - - +
@@ -42,9 +32,7 @@ import * as vue from 'vue'; import type * as locApi from '../../libopencor/locApi.ts'; const value = defineModel({ required: true }); -const emits = defineEmits<{ - (event: 'change', name: string, newValue: number): void; -}>(); +const emits = defineEmits<(event: 'change', name: string, newValue: number) => void>(); const props = defineProps<{ maximumValue?: number; minimumValue?: number; @@ -58,9 +46,8 @@ const discreteValue = vue.ref possibleValue.value === value.value) ); const scalarValue = vue.ref(value.value); -const scalarValueString = vue.ref(String(value.value)); -// Some methods to handle a scalar value using an input text and a slider. +// Some methods to handle a scalar value using an input component and a slider. function emitChange(newValue: number) { void vue.nextTick(() => { @@ -68,7 +55,6 @@ function emitChange(newValue: number) { if (!props.possibleValues) { scalarValue.value = newValue; - scalarValueString.value = String(newValue); // This will properly format the input text. } oldValue = newValue; @@ -90,33 +76,25 @@ function selectChange(event: ISelectChangeEvent) { } } -function inputTextChange(newValueString: string) { - if (!newValueString) { - newValueString = String(props.minimumValue); - } - - if (props.minimumValue !== undefined && Number(newValueString) < props.minimumValue) { - newValueString = String(props.minimumValue); - } +function inputTextValueUpdated(newValue: number | undefined) { + if (newValue === undefined) { + scalarValue.value = oldValue; - if (props.maximumValue !== undefined && Number(newValueString) > props.maximumValue) { - newValueString = String(props.maximumValue); + return; } - const newValue = Number(newValueString); - if (newValue !== oldValue) { - emitChange(newValue); - } -} + let constrainedValue = newValue; -function inputTextFocusOut(event: Event) { - inputTextChange((event.target as HTMLInputElement).value); -} + if (props.minimumValue !== undefined && constrainedValue < props.minimumValue) { + constrainedValue = props.minimumValue; + } + + if (props.maximumValue !== undefined && constrainedValue > props.maximumValue) { + constrainedValue = props.maximumValue; + } -function inputTextKeyPress(event: KeyboardEvent) { - if (event.key === 'Enter') { - inputTextChange((event.target as HTMLInputElement).value); + emitChange(constrainedValue); } }