@drincs/pixi-vn-ink
Version:
Pixi'VN gives you the ability to write your own narrative using Ink
1 lines • 1.02 kB
JavaScript
import {d,c}from'./chunk-NNMPUGJZ.mjs';import {a,b}from'./chunk-I6LBNKYY.mjs';import {e}from'./chunk-CYMNGEOH.mjs';import y from'zod';function m(e){if(e instanceof RegExp)return {type:"regexp",source:e.source,flags:e.flags};if(typeof e=="string")return {type:"literal",value:e};if(e&&typeof e=="object"&&"_zod"in e)try{return {type:"zod",schema:y.toJSONSchema(e)}}catch{}return {type:"literal",value:String(e)}}async function s(){if(!import.meta.hot)return;let e$1=e.info().map(({name:t,description:o,validation:n})=>({name:t,description:o,validation:m(n)})),c$1=c.info().map(({name:t,description:o,type:n,validation:I})=>({name:t,description:o,type:n,validation:m(I)}));await Promise.allSettled([fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e$1)}),fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c$1)})]);}function h(){import.meta.hot&&(s(),import.meta.hot.on("ink-updated",async e=>{await d(e),s();}));}export{h as setupInkHmrListener};