Skip to content

Commit 57f3963

Browse files
authoredAug 31, 2024··
[v3] remove intersection-observer polyfill (#3177)
1 parent d5d89a0 commit 57f3963

File tree

6 files changed

+10
-24
lines changed

6 files changed

+10
-24
lines changed
 

‎.changeset/clever-dots-unite.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'nextra-theme-docs': patch
3+
---
4+
5+
Remove intersection-observer polyfill

‎examples/swr-site/components/video.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useCallback, useEffect, useRef } from 'react'
22
import { useInView } from 'react-intersection-observer'
3-
import 'intersection-observer'
43

54
export default function Video({ src, caption, ratio }) {
65
const [inViewRef, inView] = useInView({ threshold: 1 })

‎examples/swr-site/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"types:check": "tsc --noEmit"
1717
},
1818
"dependencies": {
19-
"intersection-observer": "^0.10.0",
2019
"markdown-to-jsx": "^6.11.4",
2120
"next": "^14.2.5",
2221
"nextra": "workspace:*",

‎packages/nextra-theme-docs/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"clsx": "^2.0.0",
4242
"escape-string-regexp": "^5.0.0",
4343
"flexsearch": "^0.7.43",
44-
"intersection-observer": "^0.12.2",
4544
"next-themes": "^0.3.0",
4645
"scroll-into-view-if-needed": "^3.1.0",
4746
"zod": "^3.22.3"

‎packages/nextra-theme-docs/src/contexts/active-anchor.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Dispatch, ReactElement, ReactNode, SetStateAction } from 'react'
2-
import 'intersection-observer'
32
import { createContext, useContext, useRef, useState } from 'react'
43
import { IS_BROWSER } from '../constants'
54

‎pnpm-lock.yaml

+5-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.