@fraku/video 0.1.39 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export declare function ensureRef<T>(ref: T | null, name: string): T;
@@ -1,4 +1,5 @@
1
1
  import { SessionProviderProps } from './types';
2
+ import { VideoPluginProviderHandle } from '../VideoPluginProvider/VideoPluginProvider';
2
3
 
3
- declare const SessionProvider: import('react').ForwardRefExoticComponent<SessionProviderProps & import('react').RefAttributes<unknown>>;
4
+ declare const SessionProvider: import('react').ForwardRefExoticComponent<SessionProviderProps & import('react').RefAttributes<VideoPluginProviderHandle>>;
4
5
  export default SessionProvider;
@@ -2,6 +2,18 @@ import { ReactNode } from 'react';
2
2
  import { SessionStatus, UserRole } from './context';
3
3
  import { Credentials } from '../../types';
4
4
 
5
+ /**
6
+ * Internal provider API exposed upward to VideoPlugin
7
+ */
8
+ export type VideoPluginProviderHandle = {
9
+ isReady: () => boolean;
10
+ cleanup: () => Promise<void>;
11
+ getSessionStarted: () => boolean;
12
+ joinSession: () => Promise<void>;
13
+ leaveSession: (options: {
14
+ finishForAll?: boolean;
15
+ }) => Promise<void>;
16
+ };
5
17
  export type VideoPluginProviderProps = {
6
18
  credentials: Credentials;
7
19
  children: ReactNode;
@@ -14,5 +26,5 @@ export type VideoPluginProviderProps = {
14
26
  onInitVotingSession?: () => Promise<void>;
15
27
  onCloseVotingSession?: () => Promise<void>;
16
28
  };
17
- declare const VideoPluginProvider: import('react').ForwardRefExoticComponent<VideoPluginProviderProps & import('react').RefAttributes<unknown>>;
29
+ declare const VideoPluginProvider: import('react').ForwardRefExoticComponent<VideoPluginProviderProps & import('react').RefAttributes<VideoPluginProviderHandle>>;
18
30
  export default VideoPluginProvider;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fraku/video",
3
3
  "private": false,
4
- "version": "0.1.39",
4
+ "version": "0.1.41",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@playwright/test": "^1.57.0",
63
- "@storybook/react-vite": "^10.2.0",
63
+ "@storybook/react-vite": "^10.2.6",
64
64
  "@storybook/test-runner": "^0.24.2",
65
65
  "@tailwindcss/container-queries": "^0.1.1",
66
66
  "@testing-library/jest-dom": "^6.9.1",
@@ -81,13 +81,13 @@
81
81
  "eslint-plugin-react": "^7.37.5",
82
82
  "eslint-plugin-react-hooks": "^4.6.0",
83
83
  "eslint-plugin-react-refresh": "^0.4.5",
84
- "eslint-plugin-storybook": "^10.2.4",
84
+ "eslint-plugin-storybook": "^10.2.6",
85
85
  "husky": "^9.1.7",
86
86
  "jsdom": "^27.4.0",
87
87
  "postcss": "^8.5.6",
88
88
  "react": "^18.2.0",
89
89
  "react-dom": "^18.2.0",
90
- "storybook": "^10.2.4",
90
+ "storybook": "^10.2.6",
91
91
  "tailwindcss": "^3.4.17",
92
92
  "typescript": "^5.2.2",
93
93
  "vite": "^6.0.7",