y-mxgraph 0.2.1 → 0.3.0

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/y-mxgraph.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("xml-js"), require("yjs"), require("lodash-es"), require("colord")) : typeof define === "function" && define.amd ? define(["exports", "xml-js", "yjs", "lodash-es", "colord"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.YMXGraph = {}, global.xmljs, global.Y, global._, global.colord));
3
- })(this, function(exports2, xmlJs, Y, lodashEs, colord) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("xml-js"), require("yjs"), require("lodash-es"), require("colord"), require("@y-mxgraph/iframe-bridge")) : typeof define === "function" && define.amd ? define(["exports", "xml-js", "yjs", "lodash-es", "colord", "@y-mxgraph/iframe-bridge"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.YMXGraph = {}, global.xmljs, global.Y, global._, global.colord, global.YMxGraphIframeBridge));
3
+ })(this, function(exports2, xmlJs, Y, lodashEs, colord, iframeBridge) {
4
4
  "use strict";
5
5
  function _interopNamespaceDefault(e) {
6
6
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1621,7 +1621,7 @@
1621
1621
  generatePatch(events);
1622
1622
  return;
1623
1623
  }
1624
- if (this.shouldReplaceWhenDocHasData) {
1624
+ if (this.shouldReplaceWhenDocHasData && !transaction.local) {
1625
1625
  const mxfileMap = doc.getMap(key);
1626
1626
  const diagramMap = mxfileMap.get(key$1);
1627
1627
  if (diagramMap && diagramMap.size > 0) {
@@ -1723,6 +1723,14 @@
1723
1723
  return new Binding(file, options);
1724
1724
  }
1725
1725
  }
1726
+ Object.defineProperty(exports2, "createIframeBridgeProvider", {
1727
+ enumerable: true,
1728
+ get: () => iframeBridge.createIframeBridgeProvider
1729
+ });
1730
+ Object.defineProperty(exports2, "createIframeBridgeServer", {
1731
+ enumerable: true,
1732
+ get: () => iframeBridge.createIframeBridgeServer
1733
+ });
1726
1734
  exports2.Binding = Binding;
1727
1735
  exports2.DEFAULT_USER_COLOR_KEY = DEFAULT_USER_COLOR_KEY;
1728
1736
  exports2.DEFAULT_USER_NAME_KEY = DEFAULT_USER_NAME_KEY;