diff --git a/package.json b/package.json index c0f593ce1..6ecbd109d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@comfyorg/litegraph", - "version": "0.7.22", + "version": "0.7.23", "description": "A graph node editor similar to PD or UDK Blueprints. It works in an HTML5 Canvas and allows to export graphs to be included in applications.", "main": "src/litegraph.js", "types": "src/litegraph.d.ts", diff --git a/src/litegraph.js b/src/litegraph.js index 04362d7ce..09b3f4477 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -1,4 +1,3 @@ -const global = {}; (function(global) { // ************************************************************* @@ -14434,6 +14433,15 @@ LGraphNode.prototype.executeAction = function(action) window.setTimeout(callback, 1000 / 60); }; } -})(global); +})(this); -export const { LiteGraph, LGraph, LLink, LGraphNode, LGraphGroup, DragAndScale, LGraphCanvas, ContextMenu } = global; +if (typeof exports != "undefined") { + exports.LiteGraph = this.LiteGraph; + exports.LGraph = this.LGraph; + exports.LLink = this.LLink; + exports.LGraphNode = this.LGraphNode; + exports.LGraphGroup = this.LGraphGroup; + exports.DragAndScale = this.DragAndScale; + exports.LGraphCanvas = this.LGraphCanvas; + exports.ContextMenu = this.ContextMenu; +}