feat(html): refactor attach contexts to carry state and setter (#1024)

Co-authored-by: Wesley Luyten <luwes@users.noreply.github.com>
This commit is contained in:
rahim
2026-03-19 00:49:40 -07:00
committed by GitHub
co-authored by Wesley Luyten
parent eabd06550d
commit c07da27ead
13 changed files with 143 additions and 52 deletions
+7 -1
View File
@@ -34,7 +34,13 @@ export function createMockStore(state: Record<string, unknown> = {}) {
*/
export function createPlayerWrapper(storeState: Record<string, unknown> = {}) {
const store = createMockStore(storeState);
const value: PlayerContextValue = { store: store as any, media: null, setMedia: vi.fn(), setContainer: vi.fn() };
const value: PlayerContextValue = {
store: store as any,
media: null,
setMedia: vi.fn(),
container: null,
setContainer: vi.fn(),
};
return {
store,