@flowgram.ai/document 0.1.29 → 0.1.31

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/esm/index.js CHANGED
@@ -22,8 +22,13 @@ var FlowNodeBaseType = /* @__PURE__ */ ((FlowNodeBaseType2) => {
22
22
  FlowNodeBaseType2["BLOCK_ORDER_ICON"] = "blockOrderIcon";
23
23
  FlowNodeBaseType2["GROUP"] = "group";
24
24
  FlowNodeBaseType2["END"] = "end";
25
+ FlowNodeBaseType2["BREAK"] = "break";
25
26
  FlowNodeBaseType2["CONDITION"] = "condition";
26
27
  FlowNodeBaseType2["SUB_CANVAS"] = "subCanvas";
28
+ FlowNodeBaseType2["MULTI_INPUTS"] = "multiInputs";
29
+ FlowNodeBaseType2["MULTI_OUTPUTS"] = "multiOutputs";
30
+ FlowNodeBaseType2["INPUT"] = "input";
31
+ FlowNodeBaseType2["OUTPUT"] = "output";
27
32
  return FlowNodeBaseType2;
28
33
  })(FlowNodeBaseType || {});
29
34
  var FlowNodeSplitType = /* @__PURE__ */ ((FlowNodeSplitType2) => {
@@ -1857,18 +1862,16 @@ var FlowDocument = class {
1857
1862
  parent: node
1858
1863
  });
1859
1864
  addedNodes.push(blockIconNode);
1860
- if (blocks.length > 0) {
1861
- const inlineBlocksNode = this.addNode({
1862
- id: `$inlineBlocks$${node.id}`,
1863
- type: "inlineBlocks" /* INLINE_BLOCKS */,
1864
- originParent: node,
1865
- parent: node
1866
- });
1867
- addedNodes.push(inlineBlocksNode);
1868
- blocks.forEach((blockData) => {
1869
- this.addBlock(node, blockData, addedNodes);
1870
- });
1871
- }
1865
+ const inlineBlocksNode = this.addNode({
1866
+ id: `$inlineBlocks$${node.id}`,
1867
+ type: "inlineBlocks" /* INLINE_BLOCKS */,
1868
+ originParent: node,
1869
+ parent: node
1870
+ });
1871
+ addedNodes.push(inlineBlocksNode);
1872
+ blocks.forEach((blockData) => {
1873
+ this.addBlock(node, blockData, addedNodes);
1874
+ });
1872
1875
  return addedNodes;
1873
1876
  }
1874
1877
  /**
@@ -1960,6 +1963,7 @@ var FlowDocument = class {
1960
1963
  const customDefaultRegistry = this.options.getNodeDefaultRegistry?.(type);
1961
1964
  let register = this.registers.get(type) || { type };
1962
1965
  const extendRegisters = [];
1966
+ const extendKey = register.extend;
1963
1967
  if (register.extend && this.registers.has(register.extend)) {
1964
1968
  register = FlowNodeRegistry.merge(
1965
1969
  this.getNodeRegistry(register.extend),
@@ -1990,6 +1994,9 @@ var FlowDocument = class {
1990
1994
  ...register.meta
1991
1995
  }
1992
1996
  };
1997
+ if (extendKey) {
1998
+ res.extend = extendKey;
1999
+ }
1993
2000
  this.nodeRegistryCache.set(typeKey, res);
1994
2001
  return res;
1995
2002
  }