@rkmodules/rules 0.0.160 → 0.0.161
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.cjs.css +3 -2
- package/dist/index.cjs.js +11 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.css +3 -2
- package/dist/index.esm.mjs +11 -2
- package/dist/index.esm.mjs.map +1 -1
- package/dist/lib/Flow/index.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +82 -22
package/dist/index.cjs.css
CHANGED
|
@@ -114,8 +114,9 @@
|
|
|
114
114
|
--ln: var(--node-line);
|
|
115
115
|
--bg: var(--node-background);
|
|
116
116
|
border: 1px solid var(--ln);
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
background
|
|
117
|
+
border-radius: var(--node-radius, 4px);
|
|
118
|
+
background: var(--bg);
|
|
119
|
+
box-shadow: var(--node-shadow);
|
|
119
120
|
min-width: 200px;
|
|
120
121
|
cursor: default;
|
|
121
122
|
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -7464,7 +7464,7 @@ var ConnectionLine = (function (_a) {
|
|
|
7464
7464
|
*/
|
|
7465
7465
|
var emptyObject = {};
|
|
7466
7466
|
function FlowInner(_a) {
|
|
7467
|
-
var fn = _a.function, _b = _a.positions, defaultPositions = _b === void 0 ? emptyObject : _b, engine = _a.engine, _c = _a.center, center = _c === void 0 ? true : _c, fitView = _a.fitView, _d = _a.customNodes, customNodes = _d === void 0 ? {} : _d, onChange = _a.onChange, onClick = _a.onClick, onSelect = _a.onSelect, onInit = _a.onInit;
|
|
7467
|
+
var fn = _a.function, _b = _a.positions, defaultPositions = _b === void 0 ? emptyObject : _b, engine = _a.engine, _c = _a.center, center = _c === void 0 ? true : _c, fitView = _a.fitView, _d = _a.customNodes, customNodes = _d === void 0 ? {} : _d, onChange = _a.onChange, onClick = _a.onClick, onContextMenu = _a.onContextMenu, onSelect = _a.onSelect, onInit = _a.onInit;
|
|
7468
7468
|
var _e = __read(React.useState(null), 2), instance = _e[0], setInstance = _e[1];
|
|
7469
7469
|
var handleInit = function (instance) {
|
|
7470
7470
|
setInstance(instance);
|
|
@@ -7576,6 +7576,15 @@ function FlowInner(_a) {
|
|
|
7576
7576
|
onClick === null || onClick === void 0 ? void 0 : onClick(e, position);
|
|
7577
7577
|
}
|
|
7578
7578
|
};
|
|
7579
|
+
var handleContextMenu = function (e) {
|
|
7580
|
+
if (instance) {
|
|
7581
|
+
var position = instance.screenToFlowPosition({
|
|
7582
|
+
x: e.clientX,
|
|
7583
|
+
y: e.clientY,
|
|
7584
|
+
});
|
|
7585
|
+
onContextMenu === null || onContextMenu === void 0 ? void 0 : onContextMenu(e, position);
|
|
7586
|
+
}
|
|
7587
|
+
};
|
|
7579
7588
|
var onNodesChange = React.useCallback(function (changes) {
|
|
7580
7589
|
changes = changes.filter(function (change) {
|
|
7581
7590
|
if (change.id === "output" && change.type === "remove")
|
|
@@ -7596,7 +7605,7 @@ function FlowInner(_a) {
|
|
|
7596
7605
|
return react.applyEdgeChanges(changes, edgesSnapshot);
|
|
7597
7606
|
});
|
|
7598
7607
|
}, []);
|
|
7599
|
-
return (React.createElement(react.ReactFlow, { ref: drop, nodes: nodes, edges: edges, nodeTypes: __assign(__assign({}, nodeTypes), customNodes), onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onNodesDelete: onNodesDelete, onEdgesDelete: onEdgesDelete, onNodeDragStop: function (e, n) { return updatePosition(n.id, n.position); }, onConnect: onConnect, onInit: handleInit, onPaneClick: handleClick, fitView: center || fitView, fitViewOptions: {
|
|
7608
|
+
return (React.createElement(react.ReactFlow, { ref: drop, nodes: nodes, edges: edges, nodeTypes: __assign(__assign({}, nodeTypes), customNodes), onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onNodesDelete: onNodesDelete, onEdgesDelete: onEdgesDelete, onNodeDragStop: function (e, n) { return updatePosition(n.id, n.position); }, onConnect: onConnect, onInit: handleInit, onPaneClick: handleClick, onPaneContextMenu: handleContextMenu, fitView: center || fitView, fitViewOptions: {
|
|
7600
7609
|
minZoom: fitView ? undefined : 1,
|
|
7601
7610
|
maxZoom: fitView ? undefined : 1,
|
|
7602
7611
|
},
|