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:
+22
-32
@@ -10,18 +10,15 @@ Detects that a target element's visibility.
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { useIntersectionObserver } from '@vueuse/core'
|
||||
import { shallowRef, useTemplateRef } from 'vue'
|
||||
import { useIntersectionObserver } from '@vueuse/core';
|
||||
import { shallowRef, useTemplateRef } from 'vue';
|
||||
|
||||
const target = useTemplateRef('target')
|
||||
const targetIsVisible = shallowRef(false)
|
||||
const target = useTemplateRef('target');
|
||||
const targetIsVisible = shallowRef(false);
|
||||
|
||||
const { stop } = useIntersectionObserver(
|
||||
target,
|
||||
([entry], observerElement) => {
|
||||
targetIsVisible.value = entry?.isIntersecting || false
|
||||
},
|
||||
)
|
||||
const { stop } = useIntersectionObserver(target, ([entry], observerElement) => {
|
||||
targetIsVisible.value = entry?.isIntersecting || false;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -35,23 +32,21 @@ const { stop } = useIntersectionObserver(
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { vIntersectionObserver } from '@vueuse/components'
|
||||
import { shallowRef, useTemplateRef } from 'vue'
|
||||
import { vIntersectionObserver } from '@vueuse/components';
|
||||
import { shallowRef, useTemplateRef } from 'vue';
|
||||
|
||||
const root = useTemplateRef('root')
|
||||
const root = useTemplateRef('root');
|
||||
|
||||
const isVisible = shallowRef(false)
|
||||
const isVisible = shallowRef(false);
|
||||
|
||||
function onIntersectionObserver([entry]: IntersectionObserverEntry[]) {
|
||||
isVisible.value = entry?.isIntersecting || false
|
||||
isVisible.value = entry?.isIntersecting || false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>
|
||||
Scroll me down!
|
||||
</p>
|
||||
<p>Scroll me down!</p>
|
||||
<div v-intersection-observer="onIntersectionObserver">
|
||||
<p>Hello world!</p>
|
||||
</div>
|
||||
@@ -59,9 +54,7 @@ function onIntersectionObserver([entry]: IntersectionObserverEntry[]) {
|
||||
|
||||
<!-- with options -->
|
||||
<div ref="root">
|
||||
<p>
|
||||
Scroll me down!
|
||||
</p>
|
||||
<p>Scroll me down!</p>
|
||||
<div v-intersection-observer="[onIntersectionObserver, { root }]">
|
||||
<p>Hello world!</p>
|
||||
</div>
|
||||
@@ -80,24 +73,24 @@ export interface UseIntersectionObserverOptions extends ConfigurableWindow {
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
immediate?: boolean
|
||||
immediate?: boolean;
|
||||
/**
|
||||
* The Element or Document whose bounds are used as the bounding box when testing for intersection.
|
||||
*/
|
||||
root?: MaybeComputedElementRef | Document
|
||||
root?: MaybeComputedElementRef | Document;
|
||||
/**
|
||||
* A string which specifies a set of offsets to add to the root's bounding_box when calculating intersections.
|
||||
*/
|
||||
rootMargin?: string
|
||||
rootMargin?: string;
|
||||
/**
|
||||
* Either a single number or an array of numbers between 0.0 and 1.
|
||||
* @default 0
|
||||
*/
|
||||
threshold?: number | number[]
|
||||
threshold?: number | number[];
|
||||
}
|
||||
export interface UseIntersectionObserverReturn extends Pausable {
|
||||
isSupported: ComputedRef<boolean>
|
||||
stop: () => void
|
||||
isSupported: ComputedRef<boolean>;
|
||||
stop: () => void;
|
||||
}
|
||||
/**
|
||||
* Detects that a target element's visibility.
|
||||
@@ -108,11 +101,8 @@ export interface UseIntersectionObserverReturn extends Pausable {
|
||||
* @param options
|
||||
*/
|
||||
export declare function useIntersectionObserver(
|
||||
target:
|
||||
| MaybeComputedElementRef
|
||||
| MaybeRefOrGetter<MaybeElement[]>
|
||||
| MaybeComputedElementRef[],
|
||||
target: MaybeComputedElementRef | MaybeRefOrGetter<MaybeElement[]> | MaybeComputedElementRef[],
|
||||
callback: IntersectionObserverCallback,
|
||||
options?: UseIntersectionObserverOptions,
|
||||
): UseIntersectionObserverReturn
|
||||
): UseIntersectionObserverReturn;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user