unreal-toolkit 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -0
- package/dist/unreal.toolkit.d.ts +2 -0
- package/dist/unreal.toolkit.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -24,6 +24,8 @@ export declare class UnrealToolkit {
|
|
24
24
|
* @class UnrealMessageBus - All rights reserved (c) 2024 Mackey Kinard
|
25
25
|
*/
|
26
26
|
export declare class UnrealMessageBus {
|
27
|
+
/** Unreal Message Bus API Key */
|
28
|
+
static ApiKey: string;
|
27
29
|
constructor();
|
28
30
|
/** Handle event bus message
|
29
31
|
* @param message The message to handle
|
package/dist/unreal.toolkit.d.ts
CHANGED
@@ -24,6 +24,8 @@ export declare class UnrealToolkit {
|
|
24
24
|
* @class UnrealMessageBus - All rights reserved (c) 2024 Mackey Kinard
|
25
25
|
*/
|
26
26
|
export declare class UnrealMessageBus {
|
27
|
+
/** Unreal Message Bus API Key */
|
28
|
+
static ApiKey: string;
|
27
29
|
constructor();
|
28
30
|
/** Handle event bus message
|
29
31
|
* @param message The message to handle
|
package/dist/unreal.toolkit.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.TOOLKIT=n():e.TOOLKIT=n()}(this,(()=>(()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{default:()=>
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.TOOLKIT=n():e.TOOLKIT=n()}(this,(()=>(()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{default:()=>i});var t=function(){function e(){}return Object.defineProperty(e,"EventBus",{get:function(){return null==e._EventBus&&(e._EventBus=new o),e._EventBus},enumerable:!1,configurable:!0}),e._EventBus=null,e}(),o=function(){function e(){this.ListenerDictionary={},window&&window.top?(this.HandleWindowMessage=this.HandleWindowMessage.bind(this),window.top.addEventListener("message",this.HandleWindowMessage)):console.warn("UnrealMessageBus: No Top Window Available")}return e.prototype.OnMessage=function(e,n){var t;null==this.ListenerDictionary[e]?(t=[],this.ListenerDictionary[e]=t):t=this.ListenerDictionary[e],t.findIndex((function(e){return n==e}))<0&&t.push(n)},e.prototype.PostMessage=function(n,t){window&&window.top?window.top.postMessage({source:"unrealmessagebus",message:n,data:t,key:e.ApiKey}):console.warn("UnrealMessageBus: No Top Window Available")},e.prototype.RemoveHandler=function(e,n){var t=this.ListenerDictionary[e];if(null!=t){var o=t.findIndex((function(e){return n==e}));o>=0&&t.splice(o,1)}},e.prototype.ResetHandlers=function(){this.ListenerDictionary={}},e.prototype.Dispose=function(){this.ResetHandlers(),window&&window.top&&window.top.removeEventListener("message",this.HandleWindowMessage)},e.prototype.HandleWindowMessage=function(n){if(null!=n&&null!=n.data&&null!=n.data.message&&null!=n.data.source&&"unrealmessagebus"==n.data.source){if(null!=e.ApiKey&&""!==e.ApiKey&&(null==n.data.key||""===n.data.key||n.data.key!=e.ApiKey))return void console.warn("UnrealMessageBus: Missing Or Invalid API Key");this.OnDispatchMessage(n.data.message,null!=n.data.data?n.data.data:null)}},e.prototype.OnDispatchMessage=function(e,n){void 0===n&&(n=null);var t=this.ListenerDictionary[e];null!=t&&t.forEach((function(e){try{e&&e(n)}catch(e){console.warn(e)}}))},e.ApiKey=null,e}();"undefined"!=typeof window&&(window.UnrealToolkit=t),console.log("Unreal Toolkit Runtime - Version 0.0.1");const i=t;return n.default})()));
|