fix(tracker): fix assist build

This commit is contained in:
nick-delirium 2023-12-01 09:45:15 +01:00
parent 39ca414137
commit 3a1fb49866
4 changed files with 24 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker-assist",
"description": "Tracker plugin for screen assistance through the WebRTC",
"version": "7.0.0-beta.1",
"version": "7.0.0-beta.2",
"keywords": [
"WebRTC",
"assistance",

View file

@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import {hasTag,} from '@openreplay/tracker/lib/app/guards'
import type { Socket, } from 'socket.io-client'
import { connect, } from 'socket.io-client'
import Peer, { MediaConnection, } from 'peerjs'
@ -7,6 +6,7 @@ import type { Properties, } from 'csstype'
import { App, } from '@openreplay/tracker'
import RequestLocalStream, { LocalStream, } from './LocalStream.js'
import {hasTag,} from './guards.js'
import RemoteControl, { RCStatus, } from './RemoteControl.js'
import CallWindow from './CallWindow.js'
import AnnotationCanvas from './AnnotationCanvas.js'

View file

@ -0,0 +1,21 @@
type TagTypeMap = {
html: HTMLHtmlElement
body: HTMLBodyElement
img: HTMLImageElement
input: HTMLInputElement
textarea: HTMLTextAreaElement
select: HTMLSelectElement
label: HTMLLabelElement
iframe: HTMLIFrameElement
style: HTMLStyleElement | SVGStyleElement
link: HTMLLinkElement
canvas: HTMLCanvasElement
}
export function hasTag<T extends keyof TagTypeMap>(
el: Node,
tagName: T,
): el is TagTypeMap[typeof tagName] {
// @ts-ignore
return el.localName === tagName
}

View file

@ -1 +1 @@
export const pkgVersion = '7.0.0-beta.1'
export const pkgVersion = '7.0.0-beta.2'