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 { BsInfoCircle } from 'react-icons/bs'
|
||||
import styles from './NewTransmissionModal.module.css'
|
||||
import type { Transmission } from '../types'
|
||||
import type { Transmission } from '@shared/types'
|
||||
|
||||
interface Props {
|
||||
open: boolean
|
||||
|
||||
@ -9,7 +9,7 @@ import Header from './Header'
|
||||
import TransmissionsTable from './TransmissionsTable'
|
||||
import { NewTransmissionModal } from '@shared/components'
|
||||
import Studio from './Studio'
|
||||
import type { Transmission } from '../types'
|
||||
import type { Transmission } from '@shared/types'
|
||||
|
||||
const STORAGE_KEY = 'broadcast_transmissions'
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import { SkeletonTable } from './Skeleton'
|
||||
import styles from './TransmissionsTable.module.css'
|
||||
import InviteGuestsModal from './InviteGuestsModal'
|
||||
import { NewTransmissionModal } from '@shared/components'
|
||||
import type { Transmission } from '../types'
|
||||
import type { Transmission } from '@shared/types'
|
||||
|
||||
interface Props {
|
||||
transmissions: Transmission[]
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"ignoreDeprecations": "6.0",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "node_modules/.cache/broadcast-panel.tsbuildinfo",
|
||||
"baseUrl": "../..",
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
export type Asset = { id: string; name: string; type: 'image' | 'video' }
|
||||
import type { Asset } from '@shared/types'
|
||||
|
||||
export function useAssets() {
|
||||
const [assets, setAssets] = useState<Asset[]>([])
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
export type ChatMessage = { id: string; user: string; text: string }
|
||||
import type { ChatMessage } from '@shared/types'
|
||||
|
||||
export function useChat() {
|
||||
const [messages, setMessages] = useState<ChatMessage[]>([])
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
export type Person = { id: string; name: string; role?: string }
|
||||
import type { Person } from '@shared/types'
|
||||
|
||||
export function usePeople() {
|
||||
const [people, setPeople] = useState<Person[]>([])
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Hook minimal de ejemplo para exponer la escena (interface ligera)
|
||||
import { useState } from 'react'
|
||||
import type { SceneConfig } from '../types'
|
||||
import type { SceneConfig } from '@shared/types'
|
||||
|
||||
export function useScene() {
|
||||
const [sceneConfig, setSceneConfig] = useState<SceneConfig>({
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { useState } from 'react'
|
||||
|
||||
export type StyleConfig = { themeColor: string; showLogo: boolean }
|
||||
import type { StyleConfig } from '@shared/types'
|
||||
|
||||
export function useStyle() {
|
||||
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 { BsInfoCircle } from 'react-icons/bs'
|
||||
import styles from './NewTransmissionModal.module.css'
|
||||
import type { Transmission, Destination } from '../types'
|
||||
import type { Transmission, Destination } from '@shared/types'
|
||||
|
||||
interface Props {
|
||||
open: boolean
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/// <reference path="../../types/media.d.ts" />
|
||||
|
||||
export interface Transmission {
|
||||
id: string
|
||||
title: string
|
||||
@ -158,6 +160,35 @@ export interface BackgroundSource {
|
||||
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
|
||||
export interface Guest {
|
||||
id: string;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"ignoreDeprecations": "6.0",
|
||||
"target": "ES2021",
|
||||
"useDefineForClassFields": true,
|
||||
"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