Initial Commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { hostKind, send } from "./transport"
|
||||
|
||||
/** 데스크톱 호스트 안에서 실행 중이면 true. 기존 소비자 이름은 유지함. */
|
||||
export function isWebView(): boolean {
|
||||
return hostKind() !== "browser"
|
||||
}
|
||||
|
||||
/** 데스크톱 창 숨김(트레이로 내림). */
|
||||
export const hideWindow = () => send({ type: "window.hide" })
|
||||
|
||||
/** 코드를 소환 직전 앱에 붙여넣음. */
|
||||
export const pasteToApp = (text: string) => send({ type: "paste.code", text })
|
||||
|
||||
/** 현재 React route를 데스크톱 호스트에 알림. */
|
||||
export const reportRoute = (path: string) => send({ type: "route.changed", path })
|
||||
|
||||
/** 프레임리스 창을 native 창 이동으로 끌 수 있게 함. */
|
||||
export const startWindowDrag = () => send({ type: "window.drag" })
|
||||
Reference in New Issue
Block a user