@rkmodules/rules 0.0.159 → 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 +16 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.css +3 -2
- package/dist/index.esm.mjs +12 -3
- 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
|
@@ -6333,7 +6333,7 @@ var usePrompts = function () {
|
|
|
6333
6333
|
|
|
6334
6334
|
var InputString = React.memo(function (_a) {
|
|
6335
6335
|
var value = _a.value, onChange = _a.onChange;
|
|
6336
|
-
var _b = __read(useInner(value), 2), inner = _b[0], setInner = _b[1];
|
|
6336
|
+
var _b = __read(useInner.useInner(value), 2), inner = _b[0], setInner = _b[1];
|
|
6337
6337
|
var handleBlur = React.useCallback(function () {
|
|
6338
6338
|
if (inner !== value) {
|
|
6339
6339
|
onChange === null || onChange === void 0 ? void 0 : onChange(inner);
|
|
@@ -6352,7 +6352,7 @@ var InputString = React.memo(function (_a) {
|
|
|
6352
6352
|
|
|
6353
6353
|
var InputText = React.memo(function (_a) {
|
|
6354
6354
|
var value = _a.value, onChange = _a.onChange;
|
|
6355
|
-
var _b = __read(useInner(value), 2), inner = _b[0], setInner = _b[1];
|
|
6355
|
+
var _b = __read(useInner.useInner(value), 2), inner = _b[0], setInner = _b[1];
|
|
6356
6356
|
var handleBlur = React.useCallback(function () {
|
|
6357
6357
|
if (inner !== value) {
|
|
6358
6358
|
onChange === null || onChange === void 0 ? void 0 : onChange(inner);
|
|
@@ -6675,7 +6675,7 @@ function GenericNode(_a) {
|
|
|
6675
6675
|
var engine = useEngine();
|
|
6676
6676
|
var _d = __read(React.useState({}), 2), result = _d[0], setResult = _d[1];
|
|
6677
6677
|
var _e = __read(React.useState(null), 2), duration = _e[0], setDuration = _e[1];
|
|
6678
|
-
var _f = __read(useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [outputs, data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
6678
|
+
var _f = __read(useInner.useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [outputs, data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
6679
6679
|
var _g = __read(React.useState(false), 2), showPreview = _g[0], setShowPreview = _g[1];
|
|
6680
6680
|
var previewValue = focus ? result[focus] : Object.values(result)[0];
|
|
6681
6681
|
React.useEffect(function () {
|
|
@@ -6929,7 +6929,7 @@ var OutputNode = React.memo(function (_a) {
|
|
|
6929
6929
|
var paramEntries = Object.entries(data.paramDefs || {});
|
|
6930
6930
|
var _d = __read(React.useState({}), 2), result = _d[0], setResult = _d[1];
|
|
6931
6931
|
var _e = __read(React.useState(null), 2), duration = _e[0], setDuration = _e[1];
|
|
6932
|
-
var _f = __read(useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
6932
|
+
var _f = __read(useInner.useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
6933
6933
|
var _g = __read(React.useState(false), 2), showPreview = _g[0], setShowPreview = _g[1];
|
|
6934
6934
|
var previewValue = focus ? result[focus] : Object.values(result)[0];
|
|
6935
6935
|
React.useEffect(function () {
|
|
@@ -7075,7 +7075,7 @@ var NamedInput = function (_a) {
|
|
|
7075
7075
|
var paramEntries = Object.entries(data.paramDefs || {});
|
|
7076
7076
|
var _d = __read(React.useState({}), 2), result = _d[0], setResult = _d[1];
|
|
7077
7077
|
var _e = __read(React.useState(null), 2), duration = _e[0], setDuration = _e[1];
|
|
7078
|
-
var _f = __read(useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
7078
|
+
var _f = __read(useInner.useInner(((_c = outputEntries[0]) === null || _c === void 0 ? void 0 : _c[0]) || null, [data.outputDefs]), 2), focus = _f[0], setFocus = _f[1];
|
|
7079
7079
|
var _g = __read(React.useState(false), 2), showPreview = _g[0], setShowPreview = _g[1];
|
|
7080
7080
|
var previewValue = focus ? result[focus] : Object.values(result)[0];
|
|
7081
7081
|
React.useEffect(function () {
|
|
@@ -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
|
},
|