From 738138599985564d3ce1bc64a826773fda555f03 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 19:42:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`tsdown`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @chintan9. * https://github.com/chintan9/plyr-react/pull/1189#issuecomment-3243151356 The following files were modified: * `example/plyr-example/src/App.jsx` * `src/index.tsx` --- example/plyr-example/src/App.jsx | 5 +++++ src/index.tsx | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/example/plyr-example/src/App.jsx b/example/plyr-example/src/App.jsx index b9e98466..eaba3084 100644 --- a/example/plyr-example/src/App.jsx +++ b/example/plyr-example/src/App.jsx @@ -14,6 +14,11 @@ const youtubeVideoSrc = { ], }; +/** + * Root React component that renders a heading and a Plyr video player configured with `youtubeVideoSrc`. + * + * @returns {JSX.Element} The app UI containing a header and the Plyr player. + */ function App() { const ref = useRef(null); diff --git a/src/index.tsx b/src/index.tsx index c3411dde..1f78b977 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -71,6 +71,19 @@ const getAPI: GetAPI = ( }); }; +/** + * Connects a video element ref to a Plyr instance and exposes a forwarded API ref. + * + * Initializes and manages the Plyr lifecycle using the provided `params`. The returned ref + * should be attached to the underlying