From cfaf6ed8ecc940847f3e38d39c22aaeeaa5815ec Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2021年11月30日 10:29:14 +0100 Subject: [PATCH 01/13] Update ReactFlow_Types.res --- src/ReactFlow_Types.res | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ReactFlow_Types.res b/src/ReactFlow_Types.res index 9f683cd..741afd1 100644 --- a/src/ReactFlow_Types.res +++ b/src/ReactFlow_Types.res @@ -6,7 +6,11 @@ type elementId = string type transform = (int, int, int) -type position = [#left | #top | #right | #bottom] +type position = +|Left +|Right +|Top +|Bottom type arrowHeadType = [#Arrow | #ArrowClosed] From 5f74acdffc310ab565e1fdbefb49bf57ce52a7a1 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Ali Date: 2021年11月30日 10:41:09 +0100 Subject: [PATCH 02/13] Reverting changes --- package.json | 3 +++ src/ReactFlow_Types.res | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index aa9335e..84014bd 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,8 @@ }, "peerDependencies": { "@rescript/react": "^0.10.1" + }, + "scripts" : { + "start" : "bsb -make-world" } } diff --git a/src/ReactFlow_Types.res b/src/ReactFlow_Types.res index 741afd1..8426d0e 100644 --- a/src/ReactFlow_Types.res +++ b/src/ReactFlow_Types.res @@ -6,11 +6,7 @@ type elementId = string type transform = (int, int, int) -type position = -|Left -|Right -|Top -|Bottom +type position = [#left | #right | #top | #bottom] type arrowHeadType = [#Arrow | #ArrowClosed] From 61a59db5a16eaaa282a9e81f82fe428d63883d82 Mon Sep 17 00:00:00 2001 From: Fifthsegment Date: 2021年11月30日 13:58:27 +0100 Subject: [PATCH 03/13] Changing a callback funciton --- src/ReactFlow.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index cdbf3c6..e000098 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -10,7 +10,7 @@ module Edge = Types.Edge external make: ( ~elements: Types.rawElements, ~children: React.element=?, - ~onElementsClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, + ~onElementClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~snapToGrid: bool=?, ~onConnect: Types.rawElement => unit=?, ~onElementsRemove: Types.rawElements => unit=?, From 54234385dea3c55f2debb85a9c6521c22272e4bf Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: Mon, 6 Dec 2021 16:37:48 +0100 Subject: [PATCH 04/13] Update ReactFlow.res --- src/ReactFlow.res | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index e000098..eb6f54e 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -11,6 +11,7 @@ external make: ( ~elements: Types.rawElements, ~children: React.element=?, ~onElementClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, + ~onNodeDragStart: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~snapToGrid: bool=?, ~onConnect: Types.rawElement => unit=?, ~onElementsRemove: Types.rawElements => unit=?, @@ -24,6 +25,7 @@ external make: ( ~onConnectStart: Types.onConnectStartFunc=?, ~onConnectStop: Types.onConnectStopFunc=?, ~onConnectEnd: Types.onConnectEndFunc=?, + ~connectionMode: Types.connectionMode=? ) => React.element = "default" module Handle = { From 4683740c35c7eb752e8ac127e09b51c7377d07b3 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: Mon, 6 Dec 2021 16:38:33 +0100 Subject: [PATCH 05/13] Update ReactFlow_Types.res --- src/ReactFlow_Types.res | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ReactFlow_Types.res b/src/ReactFlow_Types.res index 8426d0e..87a1b37 100644 --- a/src/ReactFlow_Types.res +++ b/src/ReactFlow_Types.res @@ -28,7 +28,7 @@ module Node = { type data external toData: 'anything => data = "%identity" - + @deriving(abstract) type t = { id: elementId, @@ -55,6 +55,7 @@ module Node = { } let makeNode = t + external getId: t => string = "%identity" } module Edge = { From df8272f25e1fdc8cdbb217dcb434f944e81ec7e9 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: Mon, 6 Dec 2021 21:16:35 +0100 Subject: [PATCH 06/13] Update ReactFlow.res --- src/ReactFlow.res | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index eb6f54e..bd9d3bd 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -12,6 +12,7 @@ external make: ( ~children: React.element=?, ~onElementClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~onNodeDragStart: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, + ~onNodeDrag: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~snapToGrid: bool=?, ~onConnect: Types.rawElement => unit=?, ~onElementsRemove: Types.rawElements => unit=?, @@ -25,7 +26,8 @@ external make: ( ~onConnectStart: Types.onConnectStartFunc=?, ~onConnectStop: Types.onConnectStopFunc=?, ~onConnectEnd: Types.onConnectEndFunc=?, - ~connectionMode: Types.connectionMode=? + ~connectionMode: Types.connectionMode=?, + ~onSelectionChange: ( Js.Nullable.t> ) => unit = ?, ) => React.element = "default" module Handle = { From 32eb92460ff66c4138b6da7eaa30aa3b1b5b5eb4 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2021年12月15日 10:55:50 +0100 Subject: [PATCH 07/13] Update ReactFlow.res --- src/ReactFlow.res | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index bd9d3bd..14785f3 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -12,6 +12,7 @@ external make: ( ~children: React.element=?, ~onElementClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~onNodeDragStart: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, + ~onNodeDragStop: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~onNodeDrag: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, ~snapToGrid: bool=?, ~onConnect: Types.rawElement => unit=?, @@ -27,7 +28,8 @@ external make: ( ~onConnectStop: Types.onConnectStopFunc=?, ~onConnectEnd: Types.onConnectEndFunc=?, ~connectionMode: Types.connectionMode=?, - ~onSelectionChange: ( Js.Nullable.t> ) => unit = ?, + ~onSelectionChange: ( Js.Nullable.t> ) => unit = ?, + ~onEdgeUpdate: (Types.Edge.t, Types.connection) => unit = ?, ) => React.element = "default" module Handle = { @@ -68,6 +70,7 @@ module Controls = { ~onZoomOut: unit => unit=?, ~onFitView: unit => unit=?, ~onInteractiveChange: (~interactiveStatus: bool) => unit=?, + ~children: React.element=?, ) => React.element = "Controls" } @@ -88,6 +91,11 @@ module Provider = { external make: (~children: React.element) => React.element = "ReactFlowProvider" } +module ControlButton = { + @module("react-flow-renderer") @react.component + external make: (~children: React.element, ~onClick: unit => unit, ~disabled: bool) => React.element = "ControlButton" +} + module EdgeText = { @module("react-flow-renderer") @react.component external make: ( From 18e86308a68d37ee0fe245c9f0a64b36ece69649 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2021年12月15日 22:43:34 +0100 Subject: [PATCH 08/13] Update ReactFlow.res --- src/ReactFlow.res | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index 14785f3..bda5e6d 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -11,9 +11,9 @@ external make: ( ~elements: Types.rawElements, ~children: React.element=?, ~onElementClick: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, - ~onNodeDragStart: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, - ~onNodeDragStop: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, - ~onNodeDrag: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?) => unit=?, + ~onNodeDragStart: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?, unit ) => unit=?, + ~onNodeDragStop: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?, unit) => unit=?, + ~onNodeDrag: (~event: Dom.mouseEvent=?, ~element: Types.rawElement=?, unit) => unit=?, ~snapToGrid: bool=?, ~onConnect: Types.rawElement => unit=?, ~onElementsRemove: Types.rawElements => unit=?, From 52636ae0653b75e970a14834d3537bc823eb1c1a Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2021年12月27日 17:10:44 +0100 Subject: [PATCH 09/13] Update ReactFlow.res --- src/ReactFlow.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactFlow.res b/src/ReactFlow.res index bda5e6d..404ed83 100644 --- a/src/ReactFlow.res +++ b/src/ReactFlow.res @@ -114,7 +114,7 @@ module EdgeText = { external useStoredAction: unit => Types.Action.t = "useStoredAction" @module("react-flow-renderer") -external useStoreState: unit => Types.reactFlowState = "useStoreState" +external useStoreState: (Types.reactFlowState => 'anything) => unit = "useStoreState" @module("react-flow-renderer") external useZoomPanHelper: unit => Types.zoomPanHelperFunctions = "useZoomPanHelper" From 1bcad1e77fc684f9aaf459c2d5babf8e39b1b473 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2022年1月19日 11:44:24 +0100 Subject: [PATCH 10/13] Update ReactFlow_Utils.res --- src/ReactFlow_Utils.res | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ReactFlow_Utils.res b/src/ReactFlow_Utils.res index 455a495..da69251 100644 --- a/src/ReactFlow_Utils.res +++ b/src/ReactFlow_Utils.res @@ -24,6 +24,9 @@ external jsGetIncomers: (rawElement, rawElements) => rawElements = "getIncomers" @module("react-flow-renderer") external jsGetConnectedEdges: (rawElements, rawElements) => rawElements = "getConnectedEdges" +@module("react-flow-renderer") +external getMarkerEnd: (arrowHeadType, markerEndId) => rawElements = "getMarkerEnd" + @module("react-flow-renderer") external getTransformForBounds: ( ~bounds: rect, From e6b5ab63d7297d15089d46f1a0b12a121e48364e Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2022年1月19日 12:12:30 +0100 Subject: [PATCH 11/13] Update ReactFlow_Utils.res --- src/ReactFlow_Utils.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactFlow_Utils.res b/src/ReactFlow_Utils.res index da69251..7b6d224 100644 --- a/src/ReactFlow_Utils.res +++ b/src/ReactFlow_Utils.res @@ -25,7 +25,7 @@ external jsGetIncomers: (rawElement, rawElements) => rawElements = "getIncomers" external jsGetConnectedEdges: (rawElements, rawElements) => rawElements = "getConnectedEdges" @module("react-flow-renderer") -external getMarkerEnd: (arrowHeadType, markerEndId) => rawElements = "getMarkerEnd" +external getMarkerEnd: (arrowHeadType, string) => rawElements = "getMarkerEnd" @module("react-flow-renderer") external getTransformForBounds: ( From 6d37fda713fb106262fe80a009266506517413a1 Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2022年1月19日 12:18:35 +0100 Subject: [PATCH 12/13] Update ReactFlow_Utils.res --- src/ReactFlow_Utils.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactFlow_Utils.res b/src/ReactFlow_Utils.res index 7b6d224..2c40f2c 100644 --- a/src/ReactFlow_Utils.res +++ b/src/ReactFlow_Utils.res @@ -25,7 +25,7 @@ external jsGetIncomers: (rawElement, rawElements) => rawElements = "getIncomers" external jsGetConnectedEdges: (rawElements, rawElements) => rawElements = "getConnectedEdges" @module("react-flow-renderer") -external getMarkerEnd: (arrowHeadType, string) => rawElements = "getMarkerEnd" +external getMarkerEnd: (~arrowHeadType:arrowHeadType, ~markerEndId:string) => string = "getMarkerEnd" @module("react-flow-renderer") external getTransformForBounds: ( From 5a80d4ab428ff11346c6d8338576b2e7d313702f Mon Sep 17 00:00:00 2001 From: Abdullah Irfan Date: 2022年2月24日 14:25:02 +0100 Subject: [PATCH 13/13] Update ReactFlow_Types.res --- src/ReactFlow_Types.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactFlow_Types.res b/src/ReactFlow_Types.res index 87a1b37..c853350 100644 --- a/src/ReactFlow_Types.res +++ b/src/ReactFlow_Types.res @@ -8,7 +8,7 @@ type transform = (int, int, int) type position = [#left | #right | #top | #bottom] -type arrowHeadType = [#Arrow | #ArrowClosed] +type arrowHeadType = [#arrow | #arrowclosed | #arrowclosedhighlighted] type xyPosition = {x: int, y: int}

AltStyle によって変換されたページ (->オリジナル) /