@flowgram.ai/free-layout-core 0.1.0-alpha.19 → 0.1.0-alpha.20

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/index.js CHANGED
@@ -2189,7 +2189,8 @@ var WorkflowDocument = class extends import_document8.FlowDocument {
2189
2189
  */
2190
2190
  _createWorkflowNode(json, options) {
2191
2191
  const { parentID, onNodeCreated, onEdgeCreated } = options ?? {};
2192
- const isExistedNode = this.getNode(json.id);
2192
+ const existedNode = this.getNode(json.id);
2193
+ const isExistedNode = existedNode && existedNode.flowNodeType === json.type;
2193
2194
  const parent = this.getNode(parentID ?? this.root.id) ?? this.root;
2194
2195
  const node = this.addNode(
2195
2196
  {
@@ -3713,7 +3714,7 @@ function usePlaygroundReadonlyState(listenChange) {
3713
3714
  function checkTargetDraggable(el) {
3714
3715
  return el && el.tagName !== "INPUT" && el.tagName !== "TEXTAREA" && !el.closest(".flow-canvas-not-draggable");
3715
3716
  }
3716
- var isFirefox = navigator?.userAgent?.includes?.("Firefox");
3717
+ var isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes?.("Firefox");
3717
3718
  function useNodeRender(nodeFromProps) {
3718
3719
  const node = nodeFromProps || (0, import_react2.useContext)(import_core21.PlaygroundEntityContext);
3719
3720
  const renderData = node.getData(import_document13.FlowNodeRenderData);