1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 17:45:51 +02:00

refactor(frontend): Formまわりの型強化 (#16260)

* refactor(frontend): Formまわりの型強化

* fix

* avoid non-null assertion and add null check for safety

* refactor

* avoid non-null assertion and add null check for safety

* Update clip.vue

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-07-06 19:36:11 +09:00
committed by GitHub
parent c2a01551a7
commit a8abb03d17
45 changed files with 344 additions and 239 deletions

View File

@@ -13,16 +13,16 @@ SPDX-License-Identifier: AGPL-3.0-only
import { onMounted, onUnmounted, useTemplateRef } from 'vue';
import { useWidgetPropsManager } from './widget.js';
import type { WidgetComponentProps, WidgetComponentEmits, WidgetComponentExpose } from './widget.js';
import type { GetFormResultType } from '@/utility/form.js';
import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
const name = 'ai';
const widgetPropsDef = {
transparent: {
type: 'boolean' as const,
type: 'boolean',
default: false,
},
};
} satisfies FormWithDefault;
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
@@ -42,6 +42,8 @@ const touched = () => {
};
const onMousemove = (ev: MouseEvent) => {
if (!live2d.value || !live2d.value.contentWindow) return;
const iframeRect = live2d.value.getBoundingClientRect();
live2d.value.contentWindow.postMessage({
type: 'moveCursor',