format: apply repo prettier (3.8.1) to the folded skills tree
963 markdown files reformatted with the repository's pinned prettier so pnpm format:check covers the folded tree like every other repo file. The formatter's embedded-language pass also normalized code fences (TS semicolons, closed HTML tags in examples, lowercased CSS hex colors, one renumbered list that skipped an index). Alphanumeric token deltas vs the fold commit were audited file-by-file; all are formatter-equivalent markup normalizations plus the four sanitized skills.
This commit is contained in:
+21
-25
@@ -10,33 +10,32 @@ Watch for changes being made to the DOM tree. [MutationObserver MDN](https://dev
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { useMutationObserver } from '@vueuse/core'
|
||||
import { ref, useTemplateRef } from 'vue'
|
||||
import { useMutationObserver } from '@vueuse/core';
|
||||
import { ref, useTemplateRef } from 'vue';
|
||||
|
||||
const el = useTemplateRef('el')
|
||||
const messages = ref([])
|
||||
const el = useTemplateRef('el');
|
||||
const messages = ref([]);
|
||||
|
||||
useMutationObserver(el, (mutations) => {
|
||||
if (mutations[0])
|
||||
messages.value.push(mutations[0].attributeName)
|
||||
}, {
|
||||
attributes: true,
|
||||
})
|
||||
useMutationObserver(
|
||||
el,
|
||||
(mutations) => {
|
||||
if (mutations[0]) messages.value.push(mutations[0].attributeName);
|
||||
},
|
||||
{
|
||||
attributes: true,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="el">
|
||||
Hello VueUse
|
||||
</div>
|
||||
<div ref="el">Hello VueUse</div>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
export interface UseMutationObserverOptions
|
||||
extends MutationObserverInit,
|
||||
ConfigurableWindow {}
|
||||
export interface UseMutationObserverOptions extends MutationObserverInit, ConfigurableWindow {}
|
||||
/**
|
||||
* Watch for changes being made to the DOM tree.
|
||||
*
|
||||
@@ -47,16 +46,13 @@ export interface UseMutationObserverOptions
|
||||
* @param options
|
||||
*/
|
||||
export declare function useMutationObserver(
|
||||
target:
|
||||
| MaybeComputedElementRef
|
||||
| MaybeComputedElementRef[]
|
||||
| MaybeRefOrGetter<MaybeElement[]>,
|
||||
target: MaybeComputedElementRef | MaybeComputedElementRef[] | MaybeRefOrGetter<MaybeElement[]>,
|
||||
callback: MutationCallback,
|
||||
options?: UseMutationObserverOptions,
|
||||
): {
|
||||
isSupported: ComputedRef<boolean>
|
||||
stop: () => void
|
||||
takeRecords: () => MutationRecord[] | undefined
|
||||
}
|
||||
export type UseMutationObserverReturn = ReturnType<typeof useMutationObserver>
|
||||
isSupported: ComputedRef<boolean>;
|
||||
stop: () => void;
|
||||
takeRecords: () => MutationRecord[] | undefined;
|
||||
};
|
||||
export type UseMutationObserverReturn = ReturnType<typeof useMutationObserver>;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user