@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.esm.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.esm.mjs
CHANGED
|
@@ -7462,7 +7462,7 @@ var ConnectionLine = (function (_a) {
|
|
|
7462
7462
|
*/
|
|
7463
7463
|
var emptyObject = {};
|
|
7464
7464
|
function FlowInner(_a) {
|
|
7465
|
-
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;
|
|
7465
|
+
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;
|
|
7466
7466
|
var _e = __read(React.useState(null), 2), instance = _e[0], setInstance = _e[1];
|
|
7467
7467
|
var handleInit = function (instance) {
|
|
7468
7468
|
setInstance(instance);
|
|
@@ -7574,6 +7574,15 @@ function FlowInner(_a) {
|
|
|
7574
7574
|
onClick === null || onClick === void 0 ? void 0 : onClick(e, position);
|
|
7575
7575
|
}
|
|
7576
7576
|
};
|
|
7577
|
+
var handleContextMenu = function (e) {
|
|
7578
|
+
if (instance) {
|
|
7579
|
+
var position = instance.screenToFlowPosition({
|
|
7580
|
+
x: e.clientX,
|
|
7581
|
+
y: e.clientY,
|
|
7582
|
+
});
|
|
7583
|
+
onContextMenu === null || onContextMenu === void 0 ? void 0 : onContextMenu(e, position);
|
|
7584
|
+
}
|
|
7585
|
+
};
|
|
7577
7586
|
var onNodesChange = React.useCallback(function (changes) {
|
|
7578
7587
|
changes = changes.filter(function (change) {
|
|
7579
7588
|
if (change.id === "output" && change.type === "remove")
|
|
@@ -7594,7 +7603,7 @@ function FlowInner(_a) {
|
|
|
7594
7603
|
return applyEdgeChanges(changes, edgesSnapshot);
|
|
7595
7604
|
});
|
|
7596
7605
|
}, []);
|
|
7597
|
-
return (React.createElement(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: {
|
|
7606
|
+
return (React.createElement(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: {
|
|
7598
7607
|
minZoom: fitView ? undefined : 1,
|
|
7599
7608
|
maxZoom: fitView ? undefined : 1,
|
|
7600
7609
|
},
|