Merge branch 'misskey-develop' into merge/2025-03-24

# Conflicts:
#	package.json
#	packages/backend/src/core/entities/NotificationEntityService.ts
#	packages/backend/src/types.ts
#	packages/frontend/src/pages/admin/modlog.ModLog.vue
#	packages/misskey-js/src/consts.ts
#	packages/misskey-js/src/entities.ts
This commit is contained in:
Hazelnoot 2025-03-25 16:17:34 -04:00
commit 40975719ec
82 changed files with 1563 additions and 298 deletions

View file

@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { onUnmounted, watch } from 'vue';
import type { Ref, ShallowRef } from 'vue';
export function useMutationObserver(targetNodeRef: Ref<HTMLElement | undefined>, options: MutationObserverInit, callback: MutationCallback): void {
const observer = new MutationObserver(callback);
watch(targetNodeRef, (targetNode) => {
if (targetNode) {
observer.observe(targetNode, options);
}
}, { immediate: true });
onUnmounted(() => {
observer.disconnect();
});
}