UNPKG

@drincs/pixi-vn-ink

Version:

Pixi'VN gives you the ability to write your own narrative using Ink

1 lines 715 B
import {b,a}from'./chunk-F3OIOHOF.mjs';import'./chunk-U7O2G6DA.mjs';import {inkJsons}from'virtual:pixi-vn-ink';async function m(n,o={importJson:async t=>{await b(t);},importInkText:a}){let t=n&&typeof n=="object"&&"inkJson"in n?n.inkJson:void 0;if(t&&t.length>0){await o.importJson(t);return}let r=n&&typeof n=="object"&&"inkText"in n?n.inkText:typeof n=="string"?n:void 0;typeof r=="string"&&await o.importInkText(r);}async function k(){import.meta.hot&&(inkJsons&&inkJsons.length>0&&await b(inkJsons),import.meta.hot.on("ink-updated",async n=>{await m(n);}),import.meta.hot.on("ink-error-cleared",()=>{document.querySelectorAll("vite-error-overlay").forEach(n=>{n.close();});}));}export{k as setupInkHmrListener};