mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix: resolve TypeScript build errors across packages
- Fix core packages: @vjs-10/media-store export conflicts, @vjs-10/media interface compatibility - Fix HTML packages: Add @ts-ignore for @open-wc/context-protocol module resolution and custom element constructor compatibility - Fix React packages: Update imports to use monorepo packages, fix state type issues - Add @ts-ignore comments for acceptable workarounds per user guidance - Core architecture now compiles successfully with remaining placeholder package errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
4b472ec49c
commit
374db7afc0
@@ -12,7 +12,7 @@ import {
|
||||
} from 'react';
|
||||
/** @TODO Improve types crud (CJP) */
|
||||
import ConnectedComponent from '../connected/Video';
|
||||
import { createMediaStateOwner } from '../../../../core/src/media/playable';
|
||||
import { createMediaStateOwner } from '@vjs-10/media';
|
||||
|
||||
// These are the first steps/WIP POC of decoupling the Media State Owner from the DOM.
|
||||
// Note that everything will still work if you use:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// NOTE: This is an example of a "skeletal" connected component definition of a Mute Button. It "knows about" A Media (UI) Store and expects
|
||||
// to be provided a non-connected component
|
||||
import { useMediaDispatch, useMediaSelector } from '../../MediaProvider';
|
||||
import { useMediaDispatch, useMediaSelector } from '@vjs-10/react-media-store';
|
||||
import type { CSSProperties, ElementType, PropsWithChildren } from 'react';
|
||||
|
||||
/** @TODO Export more types. Define more contracts (CJP) */
|
||||
@@ -35,6 +35,7 @@ const MuteButton = ({
|
||||
}>) => {
|
||||
const Component = component;
|
||||
const dispatch = useMediaDispatch();
|
||||
// @ts-ignore - State type issues
|
||||
const mediaVolumeLevel = useMediaSelector((state) => state.mediaVolumeLevel);
|
||||
console.log('mediaVolumeLevel', mediaVolumeLevel);
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useMediaDispatch, useMediaSelector } from '../../MediaProvider';
|
||||
import { useMediaDispatch, useMediaSelector } from '@vjs-10/react-media-store';
|
||||
import type { CSSProperties, ElementType, PropsWithChildren } from 'react';
|
||||
|
||||
/** @TODO Export more types. Define more contracts (CJP) */
|
||||
@@ -34,6 +34,7 @@ const PlayButton = ({
|
||||
const Component = component;
|
||||
const dispatch = useMediaDispatch();
|
||||
const mediaPaused = useMediaSelector(
|
||||
// @ts-ignore - State type issues
|
||||
(state) => typeof state.mediaPaused !== 'boolean' || state.mediaPaused,
|
||||
);
|
||||
console.log('mediaPaused', mediaPaused);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { useMediaRef } from '../../MediaProvider';
|
||||
import { useMediaRef } from '@vjs-10/react-media-store';
|
||||
import {
|
||||
ElementType,
|
||||
VideoHTMLAttributes,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
// @ts-ignore - React import not used directly\nimport * as React from 'react';
|
||||
|
||||
export * from '@vjs-10/react-media-store';
|
||||
export * from './skins/MediaSkinDefault';
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import * as React from 'react';
|
||||
// @ts-ignore - Icon module resolution
|
||||
import PauseIcon from '../icons/PauseIcon';
|
||||
// @ts-ignore - Icon module resolution
|
||||
import PlayIcon from '../icons/PlayIcon';
|
||||
import PlayButton from '../components/connected-with-defaults/PlayButton';
|
||||
import MuteButton from '../components/connected-with-defaults/MuteButton';
|
||||
// @ts-ignore - Icon module resolution
|
||||
import VolumeHighIcon from '../icons/VolumeHighIcon';
|
||||
// @ts-ignore - Icon module resolution
|
||||
import VolumeLowIcon from '../icons/VolumeLowIcon';
|
||||
// @ts-ignore - Icon module resolution
|
||||
import VolumeOffIcon from '../icons/VolumeOffIcon';
|
||||
/** @ts-ignore */
|
||||
import styles from './styles.module.css';
|
||||
|
||||
Reference in New Issue
Block a user