feat: actualizar importaciones de tipos compartidos y agregar nuevos tipos en el módulo compartido
This commit is contained in:
parent
243615d2b7
commit
789ca92619
@ -19,7 +19,7 @@ import { FaYoutube, FaFacebook, FaLinkedin, FaTwitch, FaInstagram, FaKickstarter
|
|||||||
import { FaXTwitter } from 'react-icons/fa6'
|
import { FaXTwitter } from 'react-icons/fa6'
|
||||||
import { BsInfoCircle } from 'react-icons/bs'
|
import { BsInfoCircle } from 'react-icons/bs'
|
||||||
import styles from './NewTransmissionModal.module.css'
|
import styles from './NewTransmissionModal.module.css'
|
||||||
import type { Transmission } from '../types'
|
import type { Transmission } from '@shared/types'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
open: boolean
|
open: boolean
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import Header from './Header'
|
|||||||
import TransmissionsTable from './TransmissionsTable'
|
import TransmissionsTable from './TransmissionsTable'
|
||||||
import { NewTransmissionModal } from '@shared/components'
|
import { NewTransmissionModal } from '@shared/components'
|
||||||
import Studio from './Studio'
|
import Studio from './Studio'
|
||||||
import type { Transmission } from '../types'
|
import type { Transmission } from '@shared/types'
|
||||||
|
|
||||||
const STORAGE_KEY = 'broadcast_transmissions'
|
const STORAGE_KEY = 'broadcast_transmissions'
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { SkeletonTable } from './Skeleton'
|
|||||||
import styles from './TransmissionsTable.module.css'
|
import styles from './TransmissionsTable.module.css'
|
||||||
import InviteGuestsModal from './InviteGuestsModal'
|
import InviteGuestsModal from './InviteGuestsModal'
|
||||||
import { NewTransmissionModal } from '@shared/components'
|
import { NewTransmissionModal } from '@shared/components'
|
||||||
import type { Transmission } from '../types'
|
import type { Transmission } from '@shared/types'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
transmissions: Transmission[]
|
transmissions: Transmission[]
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"ignoreDeprecations": "6.0",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"tsBuildInfoFile": "node_modules/.cache/broadcast-panel.tsbuildinfo",
|
"tsBuildInfoFile": "node_modules/.cache/broadcast-panel.tsbuildinfo",
|
||||||
"baseUrl": "../..",
|
"baseUrl": "../..",
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
|
import type { Asset } from '@shared/types'
|
||||||
export type Asset = { id: string; name: string; type: 'image' | 'video' }
|
|
||||||
|
|
||||||
export function useAssets() {
|
export function useAssets() {
|
||||||
const [assets, setAssets] = useState<Asset[]>([])
|
const [assets, setAssets] = useState<Asset[]>([])
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
|
import type { ChatMessage } from '@shared/types'
|
||||||
export type ChatMessage = { id: string; user: string; text: string }
|
|
||||||
|
|
||||||
export function useChat() {
|
export function useChat() {
|
||||||
const [messages, setMessages] = useState<ChatMessage[]>([])
|
const [messages, setMessages] = useState<ChatMessage[]>([])
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
|
import type { Person } from '@shared/types'
|
||||||
export type Person = { id: string; name: string; role?: string }
|
|
||||||
|
|
||||||
export function usePeople() {
|
export function usePeople() {
|
||||||
const [people, setPeople] = useState<Person[]>([])
|
const [people, setPeople] = useState<Person[]>([])
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Hook minimal de ejemplo para exponer la escena (interface ligera)
|
// Hook minimal de ejemplo para exponer la escena (interface ligera)
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import type { SceneConfig } from '../types'
|
import type { SceneConfig } from '@shared/types'
|
||||||
|
|
||||||
export function useScene() {
|
export function useScene() {
|
||||||
const [sceneConfig, setSceneConfig] = useState<SceneConfig>({
|
const [sceneConfig, setSceneConfig] = useState<SceneConfig>({
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
import type { StyleConfig } from '@shared/types'
|
||||||
export type StyleConfig = { themeColor: string; showLogo: boolean }
|
|
||||||
|
|
||||||
export function useStyle() {
|
export function useStyle() {
|
||||||
const [style, setStyle] = useState<StyleConfig>({ themeColor: '#2563eb', showLogo: true })
|
const [style, setStyle] = useState<StyleConfig>({ themeColor: '#2563eb', showLogo: true })
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import { FaYoutube, FaFacebook, FaLinkedin, FaTwitch, FaInstagram, FaKickstarter
|
|||||||
import { FaXTwitter } from 'react-icons/fa6'
|
import { FaXTwitter } from 'react-icons/fa6'
|
||||||
import { BsInfoCircle } from 'react-icons/bs'
|
import { BsInfoCircle } from 'react-icons/bs'
|
||||||
import styles from './NewTransmissionModal.module.css'
|
import styles from './NewTransmissionModal.module.css'
|
||||||
import type { Transmission, Destination } from '../types'
|
import type { Transmission, Destination } from '@shared/types'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
open: boolean
|
open: boolean
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
/// <reference path="../../types/media.d.ts" />
|
||||||
|
|
||||||
export interface Transmission {
|
export interface Transmission {
|
||||||
id: string
|
id: string
|
||||||
title: string
|
title: string
|
||||||
@ -158,6 +160,35 @@ export interface BackgroundSource {
|
|||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SceneConfig moved from studio-panel to shared types
|
||||||
|
export type ParticipantLayoutType = 'single_speaker' | 'side_by_side' | 'grid_4' | 'grid_6' | 'focus_side' | 'presentation'
|
||||||
|
|
||||||
|
export type MediaSourceType =
|
||||||
|
| { type: 'screen'; stream: MediaStream }
|
||||||
|
| { type: 'file'; url: string }
|
||||||
|
| null
|
||||||
|
|
||||||
|
// Lightweight common types moved from studio-panel hooks
|
||||||
|
export type Asset = { id: string; name: string; type: 'image' | 'video' }
|
||||||
|
|
||||||
|
export type Person = { id: string; name: string; role?: string }
|
||||||
|
|
||||||
|
export type StyleConfig = { themeColor: string; showLogo: boolean }
|
||||||
|
|
||||||
|
export type ChatMessage = { id: string; user: string; text: string }
|
||||||
|
|
||||||
|
export type OverlayConfig = {
|
||||||
|
showLogo: boolean
|
||||||
|
showLowerThird: boolean
|
||||||
|
lowerThirdText?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SceneConfig = {
|
||||||
|
participantLayout: ParticipantLayoutType
|
||||||
|
mediaSource: MediaSourceType
|
||||||
|
overlays: OverlayConfig
|
||||||
|
}
|
||||||
|
|
||||||
// Guest types
|
// Guest types
|
||||||
export interface Guest {
|
export interface Guest {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"ignoreDeprecations": "6.0",
|
||||||
"target": "ES2021",
|
"target": "ES2021",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["DOM", "ESNext"],
|
"lib": ["DOM", "ESNext"],
|
||||||
|
|||||||
11
types/media.d.ts
vendored
Normal file
11
types/media.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Minimal MediaStream shim so packages can compile in isolated container environments
|
||||||
|
// This avoids requiring the full DOM lib in every package tsconfig.
|
||||||
|
declare global {
|
||||||
|
// Keep minimal surface area — expand if you rely on more MediaStream APIs
|
||||||
|
interface MediaStream {
|
||||||
|
id?: string
|
||||||
|
getTracks?: () => any[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {}
|
||||||
Loading…
x
Reference in New Issue
Block a user