@drincs/pixi-vn-json 1.13.13 → 1.13.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PixiVNJsonIfElse-B_OG8Qs1.d.cts +409 -0
- package/dist/PixiVNJsonIfElse-B_OG8Qs1.d.ts +409 -0
- package/dist/{PixiVNJsonLabelStep-DKmA62M_.d.cts → PixiVNJsonLabelStep-CELQY8TP.d.ts} +3 -408
- package/dist/{PixiVNJsonLabelStep-DKmA62M_.d.ts → PixiVNJsonLabelStep-D-FkTLeR.d.cts} +3 -408
- package/dist/actions.cjs +2 -2
- package/dist/actions.d.cts +2 -1
- package/dist/actions.d.ts +2 -1
- package/dist/actions.mjs +2 -2
- package/dist/constants.cjs +2 -0
- package/dist/constants.d.cts +30 -0
- package/dist/constants.d.ts +30 -0
- package/dist/constants.mjs +2 -0
- package/dist/core.d.cts +2 -1
- package/dist/core.d.ts +2 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -29
- package/dist/index.d.ts +4 -29
- package/dist/index.mjs +2 -2
- package/dist/interpreter.d.cts +2 -1
- package/dist/interpreter.d.ts +2 -1
- package/dist/schema.d.cts +4 -2
- package/dist/schema.d.ts +4 -2
- package/dist/translator.d.cts +2 -1
- package/dist/translator.d.ts +2 -1
- package/package.json +10 -1
package/dist/actions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {JsonUnifier}from'@drincs/pixi-vn-json/core';import {Assets,canvas,ImageSprite,showImage,VideoSprite,showVideo,ImageContainer,showImageContainer,Text,showText,shakeEffect,pushOut,zoomOut,moveOut,removeWithDissolve,removeWithFade,pushIn,zoomIn,moveIn,showWithDissolve,showWithFade}from'@drincs/pixi-vn/canvas';import {translator}from'@drincs/pixi-vn-json/translator';import {NarrationManagerStatic,narration}from'@drincs/pixi-vn/narration';import {sound}from'@drincs/pixi-vn/sound';import {createExportableElement,PixiError}from'@drincs/pixi-vn';import {storage}from'@drincs/pixi-vn/storage';async function Je(e){let t=JsonUnifier.getLogichValue(e,{});if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await Assets.load(t.aliases);break;case "lazyload":Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await Assets.loadBundle(t.aliases);break;case "lazyload":Assets.backgroundLoadBundle(t.aliases);break}break}}var n;(o=>(o.log=(r,...l)=>console.log(`[Pixi\u2019VN Json] ${r}`,...l),o.warn=(r,...l)=>console.warn(`[Pixi\u2019VN Json] ${r}`,...l),o.error=(r,...l)=>console.error(`[Pixi\u2019VN Json] ${r}`,...l),o.info=(r,...l)=>console.info(`[Pixi\u2019VN Json] ${r}`,...l)))(n||={});async function w(e,t,i){switch(i.type){case "fade":await showWithFade(t.alias,e,i.props,i.priority);break;case "dissolve":await showWithDissolve(t.alias,e,i.props,i.priority);break;case "movein":case "moveout":await moveIn(t.alias,e,i.props,i.priority);break;case "zoomin":case "zoomout":await zoomIn(t.alias,e,i.props,i.priority);break;case "pushin":case "pushout":await pushIn(t.alias,e,i.props,i.priority);break}}function v(e){if(e.transition)switch(e.transition.type){case "fade":removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.remove(e.alias);}async function Oe(e){switch(e.operationType){case "show":if(e.transition){let t=new ImageSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await showImage(e.alias,e.url,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Image with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Ae(e){switch(e.operationType){case "show":if(e.transition){let t=new VideoSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await showVideo(e.alias,e.url,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Video with alias ${e.alias} not found.`);break}case "remove":v(e);break;case "pause":case "resume":{let t=canvas.find(e.alias);t?t.paused=e.operationType==="pause":n.error(`Video with alias ${e.alias} not found.`);break}}}async function ke(e){switch(e.operationType){case "show":if(e.transition){let t=new ImageContainer(e.props,e.urls);await w(t,e,e.transition);}else await showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Le(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.t(e.text),e.transition){let t=new Text(e.props);await w(t,e,e.transition);}else showText(e.alias,e.text,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Text with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function je(e){switch(e.operationType){case "edit":try{let t=canvas.find(e.alias);t?e.props&&t.setMemory({...t.memory,...e.props}):n.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){n.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":v(e);break}}function Ie(e){e.operationType==="clear"&&canvas.removeAll();}async function Ee(e){e.type==="shake"&&await shakeEffect(e.alias,e.props,e.priority);}function Re(e){switch(e.type){case "animate":canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}function Me(e){switch(e.type){case "input":narration.requestInput({type:e.valueType},e.defaultValue);break;case "dialogue":narration.dialogue=void 0;break}}function Fe(e){switch(e.operationType){case "play":e.url?sound.play(e.alias,e.url,e.props):sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.stop(e.alias);break;case "all":sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.pause(e.alias);break;case "channel":sound.findChannel(e.alias).pauseAll();break;case "all":sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.resume(e.alias);break;case "channel":sound.findChannel(e.alias).resumeAll();break;case "all":sound.resumeAll();break}break;case "edit":Object.entries(e.props).forEach(([t,i])=>{let a=sound.find(e.alias);a&&(t==="volume"?a.volume.value=i:a.paused=i);});break}}var b="___param___";var h=class e{static init(t){t.loadAssets&&(e._loadAssets=t.loadAssets),t.soundOperation&&(e._soundOperation=t.soundOperation),t.imageOperation&&(e._imageOperation=t.imageOperation),t.videoOperation&&(e._videoOperation=t.videoOperation),t.imageContainerOperation&&(e._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(e._textOperation=t.textOperation),t.canvasElementOperation&&(e._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(e._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(e._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(e._narrationOperation=t.narrationOperation),t.effectOperation&&(e._effectOperation=t.effectOperation),t.animateOperation&&(e._animateOperation=t.animateOperation),t.canvasOperation&&(e._canvasOperation=t.canvasOperation),t.getLogichValue&&(e._getLogichValue=t.getLogichValue),t.getConditionalStep&&(e._getConditionalStep=t.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _imageContainerOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function _(e,t){if(t&&typeof t=="object"&&typeof e.functionName=="string"&&e.functionName in t){let i=t[e.functionName];if(typeof i=="function"){let a=e.args.map(o=>h.getLogichValue(o,t));return i(...a)}else n.warn(`getLogichValue function ${e.functionName} not found in props`);}}function z(e,t){let i=JsonUnifier.getLogichValue(e,t);return i&&typeof i=="object"&&"type"in i?JsonUnifier.getLogichValue(i,t):i}function ui(e,t={}){let i=z(e.value,t);switch(e.storageType){case "flagStorage":storage.setFlag(e.key,e.value);break;case "storage":storage.set(e.key,i);break;case "tempstorage":storage.setTempVariable(e.key,i);break;case "params":{let a=storage.get(`${b}${narration.openedLabels.length-1}`)||[];a.length>e.key&&(a[e.key]=i),storage.setTempVariable(`${b}${narration.openedLabels.length-1}`,a);break}}}function di(e,t={}){let i=z(e.value,t);switch(e.storageType){case "storage":case "tempstorage":storage.default={[e.key]:i};break}}function k(e,t={}){let i=L(e,t);if(i&&typeof i=="object"&&"type"in i)switch(i.type){case "value":return xe(i,t);case "arithmetic":case "arithmeticsingle":return me(i,t);case "compare":case "union":return ge(i,t);case "function":return _(i,t)}return i}function me(e,t){let i=JsonUnifier.getLogichValue(e.leftValue,t);switch(e.type){case "arithmetic":{let a=JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "*":return i*a;case "/":return i/a;case "+":return typeof i=="string"||typeof a=="string"?`${i}${a}`:Array.isArray(i)&&Array.isArray(a)?[...i,...a]:Array.isArray(i)?[...i,a]:Array.isArray(a)?[i,...a]:i+a;case "-":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>!a.includes(o));if(Array.isArray(i))return i.filter(o=>o!==a);if(Array.isArray(a)){n.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return i-a;case "%":return i%a;case "POW":return i**a;case "RANDOM":return narration.getRandomNumber(i,a);case "INTERSECTION":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>a.includes(o));n.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:n.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(i);case "FLOOR":return Math.floor(i);}break}}function xe(e,t){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.inputValue:storage.get(e.key);case "flagStorage":return storage.getFlag(e.key);case "label":return narration.getTimesLabelOpened(e.label);case "choice":return narration.getTimesChoiceMade(e.index);case "logic":return JsonUnifier.getLogichValue(e.operation,t);case "params":{let i=storage.get(`${b}${narration.openedLabels.length-1}`)||[];if(i&&i.length>e.key)return i[e.key];n.warn("getValue params not found");return}}return e}function ge(e,t){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let i=JsonUnifier.getLogichValue(e.leftValue,t),a=JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "==":return Array.isArray(i)&&Array.isArray(a)?i.length===a.length&&i.every(o=>a.includes(o)):i===a;case "!=":return Array.isArray(i)&&Array.isArray(a)?i.length!==a.length||!i.every(o=>a.includes(o)):i!==a;case "<":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<0:Array.isArray(i)&&Array.isArray(a)?i.length<a.length:i<a;case "<=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<=0:Array.isArray(i)&&Array.isArray(a)?i.length<=a.length:i<=a;case ">":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>0:Array.isArray(i)&&Array.isArray(a)?i.length>a.length:i>a;case ">=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>=0:Array.isArray(i)&&Array.isArray(a)?i.length>=a.length:i>=a;case "CONTAINS":return Array.isArray(i)&&Array.isArray(a)?a.every(o=>i.includes(o)):Array.isArray(i)?i.includes(a):i.toString().includes(a.toString())}break}case "value":{let i=JsonUnifier.getLogichValue(e,t);return Array.isArray(i)?i.length>0:i&&typeof i=="object"?Object.keys(i).length>0:!!i}case "union":return Ve(e,t)}return !!e}function Ve(e,t){if(e.unionType==="not"){let a=k(e.condition,t);return Array.isArray(a)?a.length===0:a&&typeof a=="object"?Object.keys(a).length===0:!a}let i=a=>JsonUnifier.getLogichValue(a,t)||false;return e.unionType==="and"?e.conditions.every(i):e.conditions.some(i)}function fe(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function L(e,t={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return ye(e,t);case "ifelse":return JsonUnifier.getLogichValue(e.condition,t)?JsonUnifier.getLogichValue(e.then,t):JsonUnifier.getLogichValue(e.else,t);case "stepswitch":{let i=JsonUnifier.getLogichValue(e.elements,t)||[];if(i.length===0){n.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let a=fe(0,i.length-1);return JsonUnifier.getLogichValue(i[a],t)}case "loop":{let a=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return a>i.length-1?(a=a%i.length,JsonUnifier.getLogichValue(i[a],t)):JsonUnifier.getLogichValue(i[a],t)}case "sequential":{let a,o=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(a=JsonUnifier.getLogichValue(i[i.length-1],t)),o>i.length-1?a:JsonUnifier.getLogichValue(i[o],t)}case "sequentialrandom":{let a=NarrationManagerStatic.getRandomNumber(0,i.length-1,{nestedId:e.nestedId,onceOnly:true});if(a===void 0&&e.end==="lastItem"){let o=NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!o?.usedRandomNumbers){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let r=o.usedRandomNumbers[`0-${i.length-1}`];return JsonUnifier.getLogichValue(i[r[r.length-1]],t)}if(a===void 0){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return JsonUnifier.getLogichValue(i[a],t)}}}}return e}function M(e,t={}){if(e.conditionalStep){let i=createExportableElement(JsonUnifier.getLogichValue(e.conditionalStep,t));if(i?.glueEnabled===void 0&&delete i?.glueEnabled,i?.goNextStep===void 0&&delete i?.goNextStep,i?.end===void 0&&delete i?.end,i?.choices===void 0&&delete i?.choices,i?.dialogue===void 0&&delete i?.dialogue,i?.labelToOpen===void 0&&delete i?.labelToOpen,i?.operations===void 0&&delete i?.operations,i){let a={...e,conditionalStep:void 0,...i};return M(a,t)}else narration.dialogGlue&&(narration.dialogGlue=false);}return e}function ye(e,t){let i=e.firstItem,a=(e.secondConditionalItem??[]).flatMap(r=>Array.isArray(r)?r.map(l=>JsonUnifier.getLogichValue(l,t)):[JsonUnifier.getLogichValue(r,t)]),o=i?[i,...a]:a;if(o.length===0){n.warn("combinateResult toCheck.length === 0");return}if(typeof o[0]=="string")return translator.t(o);if(typeof o[0]=="object"){let r=o,l,P=false,N=r.map((c,f)=>{c=M(c,t);let u=JsonUnifier.getLogichValue(c.dialogue,t)||"";return f===0?(l=JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u):(typeof u=="object"&&"text"in u&&(u=`${u.character}: ${u.text}`),l===false&&P&&(u=`
|
|
1
|
+
import {JsonUnifier}from'@drincs/pixi-vn-json/core';import {Assets,canvas,ImageSprite,showImage,VideoSprite,showVideo,ImageContainer,showImageContainer,Text,showText,shakeEffect,pushOut,zoomOut,moveOut,removeWithDissolve,removeWithFade,pushIn,zoomIn,moveIn,showWithDissolve,showWithFade}from'@drincs/pixi-vn/canvas';import {translator}from'@drincs/pixi-vn-json/translator';import {NarrationManagerStatic,narration}from'@drincs/pixi-vn/narration';import {sound}from'@drincs/pixi-vn/sound';import {createExportableElement,PixiError}from'@drincs/pixi-vn';import {storage}from'@drincs/pixi-vn/storage';async function Je(e){let t=JsonUnifier.getLogichValue(e,{});if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await Assets.load(t.aliases);break;case "lazyload":Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await Assets.loadBundle(t.aliases);break;case "lazyload":Assets.backgroundLoadBundle(t.aliases);break}break}}var n;(o=>(o.log=(r,...l)=>console.log(`[Pixi\u2019VN Json] ${r}`,...l),o.warn=(r,...l)=>console.warn(`[Pixi\u2019VN Json] ${r}`,...l),o.error=(r,...l)=>console.error(`[Pixi\u2019VN Json] ${r}`,...l),o.info=(r,...l)=>console.info(`[Pixi\u2019VN Json] ${r}`,...l)))(n||={});async function w(e,t,i){switch(i.type){case "fade":await showWithFade(t.alias,e,i.props,i.priority);break;case "dissolve":await showWithDissolve(t.alias,e,i.props,i.priority);break;case "movein":case "moveout":await moveIn(t.alias,e,i.props,i.priority);break;case "zoomin":case "zoomout":await zoomIn(t.alias,e,i.props,i.priority);break;case "pushin":case "pushout":await pushIn(t.alias,e,i.props,i.priority);break}}function v(e){if(e.transition)switch(e.transition.type){case "fade":removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.remove(e.alias);}async function Oe(e){switch(e.operationType){case "show":if(e.transition){let t=new ImageSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await showImage(e.alias,e.url,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Image with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Ae(e){switch(e.operationType){case "show":if(e.transition){let t=new VideoSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await showVideo(e.alias,e.url,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Video with alias ${e.alias} not found.`);break}case "remove":v(e);break;case "pause":case "resume":{let t=canvas.find(e.alias);t?t.paused=e.operationType==="pause":n.error(`Video with alias ${e.alias} not found.`);break}}}async function ke(e){switch(e.operationType){case "show":if(e.transition){let t=new ImageContainer(e.props,e.urls);await w(t,e,e.transition);}else await showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function je(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.t(e.text),e.transition){let t=new Text(e.props);await w(t,e,e.transition);}else showText(e.alias,e.text,e.props);break;case "edit":{let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Text with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Le(e){switch(e.operationType){case "edit":try{let t=canvas.find(e.alias);t?e.props&&t.setMemory({...t.memory,...e.props}):n.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){n.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":v(e);break}}function Ie(e){e.operationType==="clear"&&canvas.removeAll();}async function Ee(e){e.type==="shake"&&await shakeEffect(e.alias,e.props,e.priority);}function Re(e){switch(e.type){case "animate":canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}function Me(e){switch(e.type){case "input":narration.requestInput({type:e.valueType},e.defaultValue);break;case "dialogue":narration.dialogue=void 0;break}}function Fe(e){switch(e.operationType){case "play":e.url?sound.play(e.alias,e.url,e.props):sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.stop(e.alias);break;case "all":sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.pause(e.alias);break;case "channel":sound.findChannel(e.alias).pauseAll();break;case "all":sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.resume(e.alias);break;case "channel":sound.findChannel(e.alias).resumeAll();break;case "all":sound.resumeAll();break}break;case "edit":Object.entries(e.props).forEach(([t,i])=>{let a=sound.find(e.alias);a&&(t==="volume"?a.volume.value=i:a.paused=i);});break}}var b="___param___";var h=class e{static init(t){t.loadAssets&&(e._loadAssets=t.loadAssets),t.soundOperation&&(e._soundOperation=t.soundOperation),t.imageOperation&&(e._imageOperation=t.imageOperation),t.videoOperation&&(e._videoOperation=t.videoOperation),t.imageContainerOperation&&(e._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(e._textOperation=t.textOperation),t.canvasElementOperation&&(e._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(e._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(e._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(e._narrationOperation=t.narrationOperation),t.effectOperation&&(e._effectOperation=t.effectOperation),t.animateOperation&&(e._animateOperation=t.animateOperation),t.canvasOperation&&(e._canvasOperation=t.canvasOperation),t.getLogichValue&&(e._getLogichValue=t.getLogichValue),t.getConditionalStep&&(e._getConditionalStep=t.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _imageContainerOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function _(e,t){if(t&&typeof t=="object"&&typeof e.functionName=="string"&&e.functionName in t){let i=t[e.functionName];if(typeof i=="function"){let a=e.args.map(o=>h.getLogichValue(o,t));return i(...a)}else n.warn(`getLogichValue function ${e.functionName} not found in props`);}}function z(e,t){let i=JsonUnifier.getLogichValue(e,t);return i&&typeof i=="object"&&"type"in i?JsonUnifier.getLogichValue(i,t):i}function ui(e,t={}){let i=z(e.value,t);switch(e.storageType){case "flagStorage":storage.setFlag(e.key,e.value);break;case "storage":storage.set(e.key,i);break;case "tempstorage":storage.setTempVariable(e.key,i);break;case "params":{let a=storage.get(`${b}${narration.openedLabels.length-1}`)||[];a.length>e.key&&(a[e.key]=i),storage.setTempVariable(`${b}${narration.openedLabels.length-1}`,a);break}}}function di(e,t={}){let i=z(e.value,t);switch(e.storageType){case "storage":case "tempstorage":storage.default={[e.key]:i};break}}function k(e,t={}){let i=j(e,t);if(i&&typeof i=="object"&&"type"in i)switch(i.type){case "value":return xe(i,t);case "arithmetic":case "arithmeticsingle":return me(i,t);case "compare":case "union":return ge(i,t);case "function":return _(i,t)}return i}function me(e,t){let i=JsonUnifier.getLogichValue(e.leftValue,t);switch(e.type){case "arithmetic":{let a=JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "*":return i*a;case "/":return i/a;case "+":return typeof i=="string"||typeof a=="string"?`${i}${a}`:Array.isArray(i)&&Array.isArray(a)?[...i,...a]:Array.isArray(i)?[...i,a]:Array.isArray(a)?[i,...a]:i+a;case "-":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>!a.includes(o));if(Array.isArray(i))return i.filter(o=>o!==a);if(Array.isArray(a)){n.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return i-a;case "%":return i%a;case "POW":return i**a;case "RANDOM":return narration.getRandomNumber(i,a);case "INTERSECTION":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>a.includes(o));n.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:n.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(i);case "FLOOR":return Math.floor(i);}break}}function xe(e,t){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.inputValue:storage.get(e.key);case "flagStorage":return storage.getFlag(e.key);case "label":return narration.getTimesLabelOpened(e.label);case "choice":return narration.getTimesChoiceMade(e.index);case "logic":return JsonUnifier.getLogichValue(e.operation,t);case "params":{let i=storage.get(`${b}${narration.openedLabels.length-1}`)||[];if(i&&i.length>e.key)return i[e.key];n.warn("getValue params not found");return}}return e}function ge(e,t){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let i=JsonUnifier.getLogichValue(e.leftValue,t),a=JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "==":return Array.isArray(i)&&Array.isArray(a)?i.length===a.length&&i.every(o=>a.includes(o)):i===a;case "!=":return Array.isArray(i)&&Array.isArray(a)?i.length!==a.length||!i.every(o=>a.includes(o)):i!==a;case "<":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<0:Array.isArray(i)&&Array.isArray(a)?i.length<a.length:i<a;case "<=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<=0:Array.isArray(i)&&Array.isArray(a)?i.length<=a.length:i<=a;case ">":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>0:Array.isArray(i)&&Array.isArray(a)?i.length>a.length:i>a;case ">=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>=0:Array.isArray(i)&&Array.isArray(a)?i.length>=a.length:i>=a;case "CONTAINS":return Array.isArray(i)&&Array.isArray(a)?a.every(o=>i.includes(o)):Array.isArray(i)?i.includes(a):i.toString().includes(a.toString())}break}case "value":{let i=JsonUnifier.getLogichValue(e,t);return Array.isArray(i)?i.length>0:i&&typeof i=="object"?Object.keys(i).length>0:!!i}case "union":return Ve(e,t)}return !!e}function Ve(e,t){if(e.unionType==="not"){let a=k(e.condition,t);return Array.isArray(a)?a.length===0:a&&typeof a=="object"?Object.keys(a).length===0:!a}let i=a=>JsonUnifier.getLogichValue(a,t)||false;return e.unionType==="and"?e.conditions.every(i):e.conditions.some(i)}function fe(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function j(e,t={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return ye(e,t);case "ifelse":return JsonUnifier.getLogichValue(e.condition,t)?JsonUnifier.getLogichValue(e.then,t):JsonUnifier.getLogichValue(e.else,t);case "stepswitch":{let i=JsonUnifier.getLogichValue(e.elements,t)||[];if(i.length===0){n.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let a=fe(0,i.length-1);return JsonUnifier.getLogichValue(i[a],t)}case "loop":{let a=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return a>i.length-1?(a=a%i.length,JsonUnifier.getLogichValue(i[a],t)):JsonUnifier.getLogichValue(i[a],t)}case "sequential":{let a,o=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(a=JsonUnifier.getLogichValue(i[i.length-1],t)),o>i.length-1?a:JsonUnifier.getLogichValue(i[o],t)}case "sequentialrandom":{let a=NarrationManagerStatic.getRandomNumber(0,i.length-1,{nestedId:e.nestedId,onceOnly:true});if(a===void 0&&e.end==="lastItem"){let o=NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!o?.usedRandomNumbers){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let r=o.usedRandomNumbers[`0-${i.length-1}`];return JsonUnifier.getLogichValue(i[r[r.length-1]],t)}if(a===void 0){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return JsonUnifier.getLogichValue(i[a],t)}}}}return e}function M(e,t={}){if(e.conditionalStep){let i=createExportableElement(JsonUnifier.getLogichValue(e.conditionalStep,t));if(i?.glueEnabled===void 0&&delete i?.glueEnabled,i?.goNextStep===void 0&&delete i?.goNextStep,i?.end===void 0&&delete i?.end,i?.choices===void 0&&delete i?.choices,i?.dialogue===void 0&&delete i?.dialogue,i?.labelToOpen===void 0&&delete i?.labelToOpen,i?.operations===void 0&&delete i?.operations,i){let a={...e,conditionalStep:void 0,...i};return M(a,t)}else narration.dialogGlue&&(narration.dialogGlue=false);}return e}function ye(e,t){let i=e.firstItem,a=(e.secondConditionalItem??[]).flatMap(r=>Array.isArray(r)?r.map(l=>JsonUnifier.getLogichValue(l,t)):[JsonUnifier.getLogichValue(r,t)]),o=i?[i,...a]:a;if(o.length===0){n.warn("combinateResult toCheck.length === 0");return}if(typeof o[0]=="string")return translator.t(o);if(typeof o[0]=="object"){let r=o,l,P=false,N=r.map((c,f)=>{c=M(c,t);let u=JsonUnifier.getLogichValue(c.dialogue,t)||"";return f===0?(l=JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u):(typeof u=="object"&&"text"in u&&(u=`${u.character}: ${u.text}`),l===false&&P&&(u=`
|
|
2
2
|
|
|
3
|
-
${u}`),u&&(P=true),l=JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u)}),V=JsonUnifier.getLogichValue(N[0],t),y=typeof V=="object"&&"character"in V?V.character:void 0,J=N.flatMap(c=>{let f;c&&typeof c=="object"&&"text"in c?f=c.text:f=c;let u;return Array.isArray(f)?u=f.map(F=>{let D=JsonUnifier.getLogichValue(F,t);return translator.t(`${D}`)}):u=JsonUnifier.getLogichValue(f,t)||"",translator.t(u)}),C=r.find(c=>c.end),G=r.find(c=>c.choices),
|
|
3
|
+
${u}`),u&&(P=true),l=JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u)}),V=JsonUnifier.getLogichValue(N[0],t),y=typeof V=="object"&&"character"in V?V.character:void 0,J=N.flatMap(c=>{let f;c&&typeof c=="object"&&"text"in c?f=c.text:f=c;let u;return Array.isArray(f)?u=f.map(F=>{let D=JsonUnifier.getLogichValue(F,t);return translator.t(`${D}`)}):u=JsonUnifier.getLogichValue(f,t)||"",translator.t(u)}),C=r.find(c=>c.end),G=r.find(c=>c.choices),L=false,I=false;r.length>0&&(r[0].glueEnabled&&r[0].goNextStep&&r[0].dialogue===void 0&&(narration.dialogGlue=true),L=r[r.length-1].glueEnabled,I=r.reverse().find(c=>!(c.operations&&(!c.dialogue||!c.choices)))?.goNextStep);let $=r.find(c=>c.labelToOpen),O=[];return r.forEach(c=>{c.operations&&(O=[...O,...c.operations]);}),{dialogue:y?{character:y,text:J}:J,end:C?.end,choices:G?.choices,glueEnabled:L,goNextStep:I,labelToOpen:$?.labelToOpen,operations:O}}}var he;(o=>{let e=new Set;function t(r){e.add(r);}o.add=t;function i(){e.clear();}o.clear=i;function a(r,l={}){let P=y=>k(y,l)??void 0,N=j(r,l);if(e.size===0)return P(N);let V=P;for(let y of e){let J=V;V=C=>y(C,J)??void 0;}return V(N)}o.getLogichValue=a;})(he||={});export{he as VariableGetter,Re as animateOperation,Le as canvasElementOperation,Ie as canvasOperation,Ee as effectOperation,M as getConditionalStep,k as getLogichValue,j as getValueFromConditionalStatements,ke as imageContainerOperation,Oe as imageOperation,Je as loadAssets,Me as narrationOperation,di as setInitialStorageValue,ui as setStorageValue,Fe as soundOperation,je as textOperation,Ae as videoOperation};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { k as PixiVNJsonComparationOperatorsType } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
2
|
+
import '@drincs/pixi-vn';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Internal storage key prefix used to pass positional parameters to a called label.
|
|
6
|
+
* The full key is `PIXIVNJSON_PARAM_ID + <label-depth-index>`.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
declare const PIXIVNJSON_PARAM_ID = "___param___";
|
|
11
|
+
/**
|
|
12
|
+
* The URL of the JSON Schema for the current version of pixi-vn-json.
|
|
13
|
+
*
|
|
14
|
+
* You can use this constant as the value of the `$schema` field in your PixiVNJson documents
|
|
15
|
+
* so that editors can validate and auto-complete the document.
|
|
16
|
+
*
|
|
17
|
+
* Example:
|
|
18
|
+
* ```json
|
|
19
|
+
* {
|
|
20
|
+
* "$schema": "https://pixi-vn.com/schemas/1.13.0/schema.json"
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const PIXIVNJSON_SCHEMA_URL: string;
|
|
25
|
+
/**
|
|
26
|
+
* All comparison operators supported by {@link PixiVNJsonConditions} expressions.
|
|
27
|
+
*/
|
|
28
|
+
declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType[];
|
|
29
|
+
|
|
30
|
+
export { PIXIVNJSON_PARAM_ID, PIXIVNJSON_SCHEMA_URL, PixiVNJsonComparationOperators };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { k as PixiVNJsonComparationOperatorsType } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
2
|
+
import '@drincs/pixi-vn';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Internal storage key prefix used to pass positional parameters to a called label.
|
|
6
|
+
* The full key is `PIXIVNJSON_PARAM_ID + <label-depth-index>`.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
declare const PIXIVNJSON_PARAM_ID = "___param___";
|
|
11
|
+
/**
|
|
12
|
+
* The URL of the JSON Schema for the current version of pixi-vn-json.
|
|
13
|
+
*
|
|
14
|
+
* You can use this constant as the value of the `$schema` field in your PixiVNJson documents
|
|
15
|
+
* so that editors can validate and auto-complete the document.
|
|
16
|
+
*
|
|
17
|
+
* Example:
|
|
18
|
+
* ```json
|
|
19
|
+
* {
|
|
20
|
+
* "$schema": "https://pixi-vn.com/schemas/1.13.0/schema.json"
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const PIXIVNJSON_SCHEMA_URL: string;
|
|
25
|
+
/**
|
|
26
|
+
* All comparison operators supported by {@link PixiVNJsonConditions} expressions.
|
|
27
|
+
*/
|
|
28
|
+
declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType[];
|
|
29
|
+
|
|
30
|
+
export { PIXIVNJSON_PARAM_ID, PIXIVNJSON_SCHEMA_URL, PixiVNJsonComparationOperators };
|
package/dist/core.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild, StepLabelPropsType, StorageElementType } from '@drincs/pixi-vn';
|
|
2
|
-
import { P as
|
|
2
|
+
import { P as PixiVNJsonIfElse, a as PixiVNJsonValueSet, b as PixiVNJsonOnlyStorageSet, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, f as PixiVNJsonConditionalStatements } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
3
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, e as PixiVNJsonCanvasRemove, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, h as PixiVNJsonCanvasImageContainerShow, i as PixiVNJsonImageContainerEdit, j as PixiVNJsonCanvasTextShow, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, m as PixiVNJsonNarration, n as PixiVNJsonCanvasEffect, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
3
4
|
import '@drincs/pixi-vn/motion';
|
|
4
5
|
import 'pixi.js';
|
|
5
6
|
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild, StepLabelPropsType, StorageElementType } from '@drincs/pixi-vn';
|
|
2
|
-
import { P as
|
|
2
|
+
import { P as PixiVNJsonIfElse, a as PixiVNJsonValueSet, b as PixiVNJsonOnlyStorageSet, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, f as PixiVNJsonConditionalStatements } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
3
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, e as PixiVNJsonCanvasRemove, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, h as PixiVNJsonCanvasImageContainerShow, i as PixiVNJsonImageContainerEdit, j as PixiVNJsonCanvasTextShow, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, m as PixiVNJsonNarration, n as PixiVNJsonCanvasEffect, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
3
4
|
import '@drincs/pixi-vn/motion';
|
|
4
5
|
import 'pixi.js';
|
|
5
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var actions=require('@drincs/pixi-vn-json/actions'),core=require('@drincs/pixi-vn-json/core'),interpreter=require('@drincs/pixi-vn-json/interpreter'),translator=require('@drincs/pixi-vn-json/translator');var t={version:"1.13.
|
|
2
|
-
Object.defineProperty(exports,"VariableGetter",{enumerable:true,get:function(){return actions.VariableGetter}});exports.PIXIVNJSON_PARAM_ID=i;exports.PIXIVNJSON_SCHEMA_URL=
|
|
1
|
+
'use strict';var actions=require('@drincs/pixi-vn-json/actions'),core=require('@drincs/pixi-vn-json/core'),interpreter=require('@drincs/pixi-vn-json/interpreter'),translator=require('@drincs/pixi-vn-json/translator');var t={version:"1.13.15"};var i="___param___",e=`https://pixi-vn.com/schemas/${t.version}/schema.json`,r=["==","!=","<","<=",">",">=","CONTAINS"];function _(){core.JsonUnifier.init({animateOperation:actions.animateOperation,canvasElementOperation:actions.canvasElementOperation,canvasOperation:actions.canvasOperation,effectOperation:actions.effectOperation,imageContainerOperation:actions.imageContainerOperation,imageOperation:actions.imageOperation,textOperation:actions.textOperation,narrationOperation:actions.narrationOperation,loadAssets:actions.loadAssets,soundOperation:actions.soundOperation,videoOperation:actions.videoOperation,setStorageValue:actions.setStorageValue,setInitialStorageValue:actions.setInitialStorageValue,getLogichValue:actions.VariableGetter.getLogichValue,getConditionalStep:actions.getConditionalStep});}
|
|
2
|
+
Object.defineProperty(exports,"VariableGetter",{enumerable:true,get:function(){return actions.VariableGetter}});exports.PIXIVNJSON_PARAM_ID=i;exports.PIXIVNJSON_SCHEMA_URL=e;exports.PixiVNJsonComparationOperators=r;exports.init=_;Object.keys(interpreter).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return interpreter[k]}})});Object.keys(translator).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return translator[k]}})});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export { z as PixiVNJsonAnimateBase, A as PixiVNJsonAnimateSequence, u as PixiVNJsonArithmeticOperations, B as PixiVNJsonArithmeticOperationsArithmetic, C as PixiVNJsonArithmeticOperationsArithmeticSingle, D as PixiVNJsonCanvas, r as PixiVNJsonCanvasAnimate, s as PixiVNJsonCanvasClear, E as PixiVNJsonCanvasEdit, q as PixiVNJsonCanvasEffect, i as PixiVNJsonCanvasImageContainerShow, d as PixiVNJsonCanvasImageVideoShow, f as PixiVNJsonCanvasRemove, F as PixiVNJsonCanvasShow, k as PixiVNJsonCanvasTextShow, G as PixiVNJsonChoice, H as PixiVNJsonChoiceGet, I as PixiVNJsonChoices, J as PixiVNJsonComparation, K as PixiVNJsonConditionalOperation, L as PixiVNJsonConditionalResultToCombine, w as PixiVNJsonConditionalStatements, v as PixiVNJsonConditions, M as PixiVNJsonDialog, N as PixiVNJsonDialogText, O as PixiVNJsonDialogue, Q as PixiVNJsonFunction, a as PixiVNJsonIfElse, j as PixiVNJsonImageContainerEdit, e as PixiVNJsonImageEdit, R as PixiVNJsonInputRequest, S as PixiVNJsonLabelGet, x as PixiVNJsonLabelStep, T as PixiVNJsonLabelToOpen, U as PixiVNJsonLogicGet, V as PixiVNJsonMediaTransiotions, p as PixiVNJsonNarration, o as PixiVNJsonOnlyStorageSet, P as PixiVNJsonOperation, b as PixiVNJsonOperationString, W as PixiVNJsonParamGet, c as PixiVNJsonSound, X as PixiVNJsonSoundEdit, Y as PixiVNJsonSoundPauseResume, Z as PixiVNJsonSoundPlay, _ as PixiVNJsonSoundRemove, $ as PixiVNJsonStepSwitch, a0 as PixiVNJsonStepSwitchElementType, a1 as PixiVNJsonStepSwitchElementsType, a2 as PixiVNJsonStorageGet, l as PixiVNJsonTextEdit, a3 as PixiVNJsonUnionCondition, m as PixiVNJsonUnknownEdit, t as PixiVNJsonValueGet, n as PixiVNJsonValueSet, g as PixiVNJsonVideoEdit, h as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-DKmA62M_.cjs';
|
|
1
|
+
export { PIXIVNJSON_PARAM_ID, PIXIVNJSON_SCHEMA_URL, PixiVNJsonComparationOperators } from './constants.cjs';
|
|
3
2
|
export { PixiVNJson, PixiVNJsonLabels } from './schema.cjs';
|
|
3
|
+
export { d as PixiVNJsonArithmeticOperations, g as PixiVNJsonArithmeticOperationsArithmetic, h as PixiVNJsonArithmeticOperationsArithmeticSingle, i as PixiVNJsonChoiceGet, j as PixiVNJsonComparation, k as PixiVNJsonComparationOperatorsType, l as PixiVNJsonConditionalResultToCombine, f as PixiVNJsonConditionalStatements, e as PixiVNJsonConditions, m as PixiVNJsonFunction, P as PixiVNJsonIfElse, n as PixiVNJsonLabelGet, o as PixiVNJsonLogicGet, b as PixiVNJsonOnlyStorageSet, p as PixiVNJsonParamGet, q as PixiVNJsonStepSwitch, r as PixiVNJsonStepSwitchElementType, s as PixiVNJsonStepSwitchElementsType, t as PixiVNJsonStorageGet, u as PixiVNJsonUnionCondition, c as PixiVNJsonValueGet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
4
|
+
export { r as PixiVNJsonAnimateBase, s as PixiVNJsonAnimateSequence, t as PixiVNJsonCanvas, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, u as PixiVNJsonCanvasEdit, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, c as PixiVNJsonCanvasImageVideoShow, e as PixiVNJsonCanvasRemove, v as PixiVNJsonCanvasShow, j as PixiVNJsonCanvasTextShow, w as PixiVNJsonChoice, x as PixiVNJsonChoices, y as PixiVNJsonConditionalOperation, z as PixiVNJsonDialog, A as PixiVNJsonDialogText, B as PixiVNJsonDialogue, i as PixiVNJsonImageContainerEdit, d as PixiVNJsonImageEdit, C as PixiVNJsonInputRequest, q as PixiVNJsonLabelStep, D as PixiVNJsonLabelToOpen, E as PixiVNJsonMediaTransiotions, m as PixiVNJsonNarration, P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, F as PixiVNJsonSoundEdit, G as PixiVNJsonSoundPauseResume, H as PixiVNJsonSoundPlay, I as PixiVNJsonSoundRemove, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
4
5
|
export { V as VariableGetter, a as VariableGetterHandler } from './VariableGetter-ZDA6kdah.cjs';
|
|
5
6
|
export { LabelJson, importPixiVNJson } from './interpreter.cjs';
|
|
6
7
|
export { ReplaceHandler, ReplaceHandlerOptions, TextReplaces, translator } from './translator.cjs';
|
|
@@ -10,32 +11,6 @@ import 'pixi.js';
|
|
|
10
11
|
import '@drincs/pixi-vn/narration';
|
|
11
12
|
import 'zod';
|
|
12
13
|
|
|
13
|
-
/**
|
|
14
|
-
* Internal storage key prefix used to pass positional parameters to a called label.
|
|
15
|
-
* The full key is `PIXIVNJSON_PARAM_ID + <label-depth-index>`.
|
|
16
|
-
*
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
declare const PIXIVNJSON_PARAM_ID = "___param___";
|
|
20
|
-
/**
|
|
21
|
-
* The URL of the JSON Schema for the current version of pixi-vn-json.
|
|
22
|
-
*
|
|
23
|
-
* You can use this constant as the value of the `$schema` field in your PixiVNJson documents
|
|
24
|
-
* so that editors can validate and auto-complete the document.
|
|
25
|
-
*
|
|
26
|
-
* Example:
|
|
27
|
-
* ```json
|
|
28
|
-
* {
|
|
29
|
-
* "$schema": "https://pixi-vn.com/schemas/1.13.0/schema.json"
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
declare const PIXIVNJSON_SCHEMA_URL: string;
|
|
34
|
-
/**
|
|
35
|
-
* All comparison operators supported by {@link PixiVNJsonConditions} expressions.
|
|
36
|
-
*/
|
|
37
|
-
declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType[];
|
|
38
|
-
|
|
39
14
|
/**
|
|
40
15
|
* Initialises the pixi-vn-json system by registering all default operation handlers
|
|
41
16
|
* (canvas, sound, assets, storage, narration, etc.) into the {@link JsonUnifier}.
|
|
@@ -44,4 +19,4 @@ declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType
|
|
|
44
19
|
*/
|
|
45
20
|
declare function init(): void;
|
|
46
21
|
|
|
47
|
-
export {
|
|
22
|
+
export { init };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export { z as PixiVNJsonAnimateBase, A as PixiVNJsonAnimateSequence, u as PixiVNJsonArithmeticOperations, B as PixiVNJsonArithmeticOperationsArithmetic, C as PixiVNJsonArithmeticOperationsArithmeticSingle, D as PixiVNJsonCanvas, r as PixiVNJsonCanvasAnimate, s as PixiVNJsonCanvasClear, E as PixiVNJsonCanvasEdit, q as PixiVNJsonCanvasEffect, i as PixiVNJsonCanvasImageContainerShow, d as PixiVNJsonCanvasImageVideoShow, f as PixiVNJsonCanvasRemove, F as PixiVNJsonCanvasShow, k as PixiVNJsonCanvasTextShow, G as PixiVNJsonChoice, H as PixiVNJsonChoiceGet, I as PixiVNJsonChoices, J as PixiVNJsonComparation, K as PixiVNJsonConditionalOperation, L as PixiVNJsonConditionalResultToCombine, w as PixiVNJsonConditionalStatements, v as PixiVNJsonConditions, M as PixiVNJsonDialog, N as PixiVNJsonDialogText, O as PixiVNJsonDialogue, Q as PixiVNJsonFunction, a as PixiVNJsonIfElse, j as PixiVNJsonImageContainerEdit, e as PixiVNJsonImageEdit, R as PixiVNJsonInputRequest, S as PixiVNJsonLabelGet, x as PixiVNJsonLabelStep, T as PixiVNJsonLabelToOpen, U as PixiVNJsonLogicGet, V as PixiVNJsonMediaTransiotions, p as PixiVNJsonNarration, o as PixiVNJsonOnlyStorageSet, P as PixiVNJsonOperation, b as PixiVNJsonOperationString, W as PixiVNJsonParamGet, c as PixiVNJsonSound, X as PixiVNJsonSoundEdit, Y as PixiVNJsonSoundPauseResume, Z as PixiVNJsonSoundPlay, _ as PixiVNJsonSoundRemove, $ as PixiVNJsonStepSwitch, a0 as PixiVNJsonStepSwitchElementType, a1 as PixiVNJsonStepSwitchElementsType, a2 as PixiVNJsonStorageGet, l as PixiVNJsonTextEdit, a3 as PixiVNJsonUnionCondition, m as PixiVNJsonUnknownEdit, t as PixiVNJsonValueGet, n as PixiVNJsonValueSet, g as PixiVNJsonVideoEdit, h as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-DKmA62M_.js';
|
|
1
|
+
export { PIXIVNJSON_PARAM_ID, PIXIVNJSON_SCHEMA_URL, PixiVNJsonComparationOperators } from './constants.js';
|
|
3
2
|
export { PixiVNJson, PixiVNJsonLabels } from './schema.js';
|
|
3
|
+
export { d as PixiVNJsonArithmeticOperations, g as PixiVNJsonArithmeticOperationsArithmetic, h as PixiVNJsonArithmeticOperationsArithmeticSingle, i as PixiVNJsonChoiceGet, j as PixiVNJsonComparation, k as PixiVNJsonComparationOperatorsType, l as PixiVNJsonConditionalResultToCombine, f as PixiVNJsonConditionalStatements, e as PixiVNJsonConditions, m as PixiVNJsonFunction, P as PixiVNJsonIfElse, n as PixiVNJsonLabelGet, o as PixiVNJsonLogicGet, b as PixiVNJsonOnlyStorageSet, p as PixiVNJsonParamGet, q as PixiVNJsonStepSwitch, r as PixiVNJsonStepSwitchElementType, s as PixiVNJsonStepSwitchElementsType, t as PixiVNJsonStorageGet, u as PixiVNJsonUnionCondition, c as PixiVNJsonValueGet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
4
|
+
export { r as PixiVNJsonAnimateBase, s as PixiVNJsonAnimateSequence, t as PixiVNJsonCanvas, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, u as PixiVNJsonCanvasEdit, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, c as PixiVNJsonCanvasImageVideoShow, e as PixiVNJsonCanvasRemove, v as PixiVNJsonCanvasShow, j as PixiVNJsonCanvasTextShow, w as PixiVNJsonChoice, x as PixiVNJsonChoices, y as PixiVNJsonConditionalOperation, z as PixiVNJsonDialog, A as PixiVNJsonDialogText, B as PixiVNJsonDialogue, i as PixiVNJsonImageContainerEdit, d as PixiVNJsonImageEdit, C as PixiVNJsonInputRequest, q as PixiVNJsonLabelStep, D as PixiVNJsonLabelToOpen, E as PixiVNJsonMediaTransiotions, m as PixiVNJsonNarration, P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, F as PixiVNJsonSoundEdit, G as PixiVNJsonSoundPauseResume, H as PixiVNJsonSoundPlay, I as PixiVNJsonSoundRemove, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
4
5
|
export { V as VariableGetter, a as VariableGetterHandler } from './VariableGetter-ZDA6kdah.js';
|
|
5
6
|
export { LabelJson, importPixiVNJson } from './interpreter.js';
|
|
6
7
|
export { ReplaceHandler, ReplaceHandlerOptions, TextReplaces, translator } from './translator.js';
|
|
@@ -10,32 +11,6 @@ import 'pixi.js';
|
|
|
10
11
|
import '@drincs/pixi-vn/narration';
|
|
11
12
|
import 'zod';
|
|
12
13
|
|
|
13
|
-
/**
|
|
14
|
-
* Internal storage key prefix used to pass positional parameters to a called label.
|
|
15
|
-
* The full key is `PIXIVNJSON_PARAM_ID + <label-depth-index>`.
|
|
16
|
-
*
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
declare const PIXIVNJSON_PARAM_ID = "___param___";
|
|
20
|
-
/**
|
|
21
|
-
* The URL of the JSON Schema for the current version of pixi-vn-json.
|
|
22
|
-
*
|
|
23
|
-
* You can use this constant as the value of the `$schema` field in your PixiVNJson documents
|
|
24
|
-
* so that editors can validate and auto-complete the document.
|
|
25
|
-
*
|
|
26
|
-
* Example:
|
|
27
|
-
* ```json
|
|
28
|
-
* {
|
|
29
|
-
* "$schema": "https://pixi-vn.com/schemas/1.13.0/schema.json"
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
declare const PIXIVNJSON_SCHEMA_URL: string;
|
|
34
|
-
/**
|
|
35
|
-
* All comparison operators supported by {@link PixiVNJsonConditions} expressions.
|
|
36
|
-
*/
|
|
37
|
-
declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType[];
|
|
38
|
-
|
|
39
14
|
/**
|
|
40
15
|
* Initialises the pixi-vn-json system by registering all default operation handlers
|
|
41
16
|
* (canvas, sound, assets, storage, narration, etc.) into the {@link JsonUnifier}.
|
|
@@ -44,4 +19,4 @@ declare const PixiVNJsonComparationOperators: PixiVNJsonComparationOperatorsType
|
|
|
44
19
|
*/
|
|
45
20
|
declare function init(): void;
|
|
46
21
|
|
|
47
|
-
export {
|
|
22
|
+
export { init };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {getConditionalStep,VariableGetter,setInitialStorageValue,setStorageValue,videoOperation,soundOperation,loadAssets,narrationOperation,textOperation,imageOperation,imageContainerOperation,effectOperation,canvasOperation,canvasElementOperation,animateOperation}from'@drincs/pixi-vn-json/actions';export{VariableGetter}from'@drincs/pixi-vn-json/actions';import {JsonUnifier}from'@drincs/pixi-vn-json/core';export*from'@drincs/pixi-vn-json/interpreter';export*from'@drincs/pixi-vn-json/translator';var t={version:"1.13.
|
|
2
|
-
export{i as PIXIVNJSON_PARAM_ID,
|
|
1
|
+
import {getConditionalStep,VariableGetter,setInitialStorageValue,setStorageValue,videoOperation,soundOperation,loadAssets,narrationOperation,textOperation,imageOperation,imageContainerOperation,effectOperation,canvasOperation,canvasElementOperation,animateOperation}from'@drincs/pixi-vn-json/actions';export{VariableGetter}from'@drincs/pixi-vn-json/actions';import {JsonUnifier}from'@drincs/pixi-vn-json/core';export*from'@drincs/pixi-vn-json/interpreter';export*from'@drincs/pixi-vn-json/translator';var t={version:"1.13.15"};var i="___param___",e=`https://pixi-vn.com/schemas/${t.version}/schema.json`,r=["==","!=","<","<=",">",">=","CONTAINS"];function _(){JsonUnifier.init({animateOperation:animateOperation,canvasElementOperation:canvasElementOperation,canvasOperation:canvasOperation,effectOperation:effectOperation,imageContainerOperation:imageContainerOperation,imageOperation:imageOperation,textOperation:textOperation,narrationOperation:narrationOperation,loadAssets:loadAssets,soundOperation:soundOperation,videoOperation:videoOperation,setStorageValue:setStorageValue,setInitialStorageValue:setInitialStorageValue,getLogichValue:VariableGetter.getLogichValue,getConditionalStep:getConditionalStep});}
|
|
2
|
+
export{i as PIXIVNJSON_PARAM_ID,e as PIXIVNJSON_SCHEMA_URL,r as PixiVNJsonComparationOperators,_ as init};
|
package/dist/interpreter.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as PixiVNJsonLabelStep, P as PixiVNJsonOperation } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
2
2
|
import { LabelAbstract, LabelProps, StepLabelPropsType, StepLabelType } from '@drincs/pixi-vn/narration';
|
|
3
3
|
import { PixiVNJson } from './schema.cjs';
|
|
4
|
+
import './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
4
5
|
import '@drincs/pixi-vn';
|
|
5
6
|
import '@drincs/pixi-vn/motion';
|
|
6
7
|
import 'pixi.js';
|
package/dist/interpreter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as PixiVNJsonLabelStep, P as PixiVNJsonOperation } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
2
2
|
import { LabelAbstract, LabelProps, StepLabelPropsType, StepLabelType } from '@drincs/pixi-vn/narration';
|
|
3
3
|
import { PixiVNJson } from './schema.js';
|
|
4
|
+
import './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
4
5
|
import '@drincs/pixi-vn';
|
|
5
6
|
import '@drincs/pixi-vn/motion';
|
|
6
7
|
import 'pixi.js';
|
package/dist/schema.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as PixiVNJsonValueSet, P as PixiVNJsonIfElse } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
2
|
+
export { d as PixiVNJsonArithmeticOperations, g as PixiVNJsonArithmeticOperationsArithmetic, h as PixiVNJsonArithmeticOperationsArithmeticSingle, i as PixiVNJsonChoiceGet, j as PixiVNJsonComparation, k as PixiVNJsonComparationOperatorsType, l as PixiVNJsonConditionalResultToCombine, f as PixiVNJsonConditionalStatements, e as PixiVNJsonConditions, m as PixiVNJsonFunction, n as PixiVNJsonLabelGet, o as PixiVNJsonLogicGet, b as PixiVNJsonOnlyStorageSet, p as PixiVNJsonParamGet, q as PixiVNJsonStepSwitch, r as PixiVNJsonStepSwitchElementType, s as PixiVNJsonStepSwitchElementsType, t as PixiVNJsonStorageGet, u as PixiVNJsonUnionCondition, c as PixiVNJsonValueGet } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
3
|
+
import { q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
4
|
+
export { r as PixiVNJsonAnimateBase, s as PixiVNJsonAnimateSequence, t as PixiVNJsonCanvas, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, u as PixiVNJsonCanvasEdit, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, c as PixiVNJsonCanvasImageVideoShow, e as PixiVNJsonCanvasRemove, v as PixiVNJsonCanvasShow, j as PixiVNJsonCanvasTextShow, w as PixiVNJsonChoice, x as PixiVNJsonChoices, y as PixiVNJsonConditionalOperation, z as PixiVNJsonDialog, A as PixiVNJsonDialogText, B as PixiVNJsonDialogue, i as PixiVNJsonImageContainerEdit, d as PixiVNJsonImageEdit, C as PixiVNJsonInputRequest, D as PixiVNJsonLabelToOpen, E as PixiVNJsonMediaTransiotions, m as PixiVNJsonNarration, P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, F as PixiVNJsonSoundEdit, G as PixiVNJsonSoundPauseResume, H as PixiVNJsonSoundPlay, I as PixiVNJsonSoundRemove, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
3
5
|
import '@drincs/pixi-vn';
|
|
4
6
|
import '@drincs/pixi-vn/motion';
|
|
5
7
|
import 'pixi.js';
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as PixiVNJsonValueSet, P as PixiVNJsonIfElse } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
2
|
+
export { d as PixiVNJsonArithmeticOperations, g as PixiVNJsonArithmeticOperationsArithmetic, h as PixiVNJsonArithmeticOperationsArithmeticSingle, i as PixiVNJsonChoiceGet, j as PixiVNJsonComparation, k as PixiVNJsonComparationOperatorsType, l as PixiVNJsonConditionalResultToCombine, f as PixiVNJsonConditionalStatements, e as PixiVNJsonConditions, m as PixiVNJsonFunction, n as PixiVNJsonLabelGet, o as PixiVNJsonLogicGet, b as PixiVNJsonOnlyStorageSet, p as PixiVNJsonParamGet, q as PixiVNJsonStepSwitch, r as PixiVNJsonStepSwitchElementType, s as PixiVNJsonStepSwitchElementsType, t as PixiVNJsonStorageGet, u as PixiVNJsonUnionCondition, c as PixiVNJsonValueGet } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
3
|
+
import { q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
4
|
+
export { r as PixiVNJsonAnimateBase, s as PixiVNJsonAnimateSequence, t as PixiVNJsonCanvas, o as PixiVNJsonCanvasAnimate, p as PixiVNJsonCanvasClear, u as PixiVNJsonCanvasEdit, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, c as PixiVNJsonCanvasImageVideoShow, e as PixiVNJsonCanvasRemove, v as PixiVNJsonCanvasShow, j as PixiVNJsonCanvasTextShow, w as PixiVNJsonChoice, x as PixiVNJsonChoices, y as PixiVNJsonConditionalOperation, z as PixiVNJsonDialog, A as PixiVNJsonDialogText, B as PixiVNJsonDialogue, i as PixiVNJsonImageContainerEdit, d as PixiVNJsonImageEdit, C as PixiVNJsonInputRequest, D as PixiVNJsonLabelToOpen, E as PixiVNJsonMediaTransiotions, m as PixiVNJsonNarration, P as PixiVNJsonOperation, a as PixiVNJsonOperationString, b as PixiVNJsonSound, F as PixiVNJsonSoundEdit, G as PixiVNJsonSoundPauseResume, H as PixiVNJsonSoundPlay, I as PixiVNJsonSoundRemove, k as PixiVNJsonTextEdit, l as PixiVNJsonUnknownEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
3
5
|
import '@drincs/pixi-vn';
|
|
4
6
|
import '@drincs/pixi-vn/motion';
|
|
5
7
|
import 'pixi.js';
|
package/dist/translator.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
2
|
import { StepLabelPropsType } from '@drincs/pixi-vn';
|
|
3
|
-
import {
|
|
3
|
+
import { q as PixiVNJsonLabelStep, P as PixiVNJsonOperation } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
4
|
+
import './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
4
5
|
import '@drincs/pixi-vn/motion';
|
|
5
6
|
import 'pixi.js';
|
|
6
7
|
|
package/dist/translator.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
2
|
import { StepLabelPropsType } from '@drincs/pixi-vn';
|
|
3
|
-
import {
|
|
3
|
+
import { q as PixiVNJsonLabelStep, P as PixiVNJsonOperation } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
4
|
+
import './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
4
5
|
import '@drincs/pixi-vn/motion';
|
|
5
6
|
import 'pixi.js';
|
|
6
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drincs/pixi-vn-json",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pixi'VN can be integrated with JSON files to create a visual novel.",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"require": "./dist/core.cjs",
|
|
33
33
|
"default": "./dist/core.mjs"
|
|
34
34
|
},
|
|
35
|
+
"./constants": {
|
|
36
|
+
"types": "./dist/constants.d.ts",
|
|
37
|
+
"import": "./dist/constants.mjs",
|
|
38
|
+
"require": "./dist/constants.cjs",
|
|
39
|
+
"default": "./dist/constants.mjs"
|
|
40
|
+
},
|
|
35
41
|
"./importer": {
|
|
36
42
|
"types": "./dist/importer.d.ts",
|
|
37
43
|
"import": "./dist/importer.mjs",
|
|
@@ -68,6 +74,9 @@
|
|
|
68
74
|
"core": [
|
|
69
75
|
"./dist/core.d.ts"
|
|
70
76
|
],
|
|
77
|
+
"constants": [
|
|
78
|
+
"./dist/constants.d.ts"
|
|
79
|
+
],
|
|
71
80
|
"importer": [
|
|
72
81
|
"./dist/importer.d.ts"
|
|
73
82
|
],
|