@rkmodules/rules 0.0.69 → 0.0.71
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 +20 -1
- package/dist/index.cjs.js +46 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.css +20 -1
- package/dist/index.esm.js +47 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/Primitives/List/concat.d.ts +2 -0
- package/package.json +2 -1
package/dist/index.cjs.css
CHANGED
|
@@ -101,8 +101,27 @@
|
|
|
101
101
|
.Label_wBwWA {
|
|
102
102
|
border-bottom: 1px solid var(--ln);
|
|
103
103
|
padding: 4px 8px;
|
|
104
|
-
text-align: center;
|
|
105
104
|
font-weight: bold;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.Label_wBwWA span {
|
|
110
|
+
flex: 1;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
}
|
|
114
|
+
.DeleteButton_kglTP {
|
|
115
|
+
border: 1px solid var(--ln);
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
width: 20px;
|
|
118
|
+
height: 20px;
|
|
119
|
+
padding: 0;
|
|
120
|
+
margin: 0;
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
align-self: flex-end;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
106
125
|
}
|
|
107
126
|
|
|
108
127
|
.DefaultNode_R2P6c table {
|
package/dist/index.cjs.js
CHANGED
|
@@ -6,6 +6,7 @@ var react = require('@xyflow/react');
|
|
|
6
6
|
var katex = require('katex');
|
|
7
7
|
var classNames = require('classnames');
|
|
8
8
|
var rcin = require('rc-input-number');
|
|
9
|
+
var useLongPress = require('use-long-press');
|
|
9
10
|
var zustand = require('zustand');
|
|
10
11
|
var middleware = require('zustand/middleware');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -1363,6 +1364,32 @@ var cartesianGroups = {
|
|
|
1363
1364
|
}); },
|
|
1364
1365
|
};
|
|
1365
1366
|
|
|
1367
|
+
var concat = {
|
|
1368
|
+
name: "concat",
|
|
1369
|
+
label: "Concat",
|
|
1370
|
+
description: "Concatenates two lists back to back",
|
|
1371
|
+
inputs: {
|
|
1372
|
+
treeA: "any",
|
|
1373
|
+
treeB: "any",
|
|
1374
|
+
},
|
|
1375
|
+
outputs: {
|
|
1376
|
+
result: "any",
|
|
1377
|
+
},
|
|
1378
|
+
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1379
|
+
return __generator(this, function (_a) {
|
|
1380
|
+
return [2 /*return*/, {
|
|
1381
|
+
result: binaryOnTreeBranch(inputs.treeA || {}, inputs.treeB || {}, function (branchA, branchB) {
|
|
1382
|
+
if (branchA === undefined)
|
|
1383
|
+
return branchB || DISCARD;
|
|
1384
|
+
if (branchB === undefined)
|
|
1385
|
+
return branchA || DISCARD;
|
|
1386
|
+
return branchA.concat(branchB);
|
|
1387
|
+
}),
|
|
1388
|
+
}];
|
|
1389
|
+
});
|
|
1390
|
+
}); },
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1366
1393
|
var _a$4;
|
|
1367
1394
|
var primitives$4 = (_a$4 = {},
|
|
1368
1395
|
_a$4[splitGroup.name] = splitGroup,
|
|
@@ -1372,6 +1399,7 @@ var primitives$4 = (_a$4 = {},
|
|
|
1372
1399
|
_a$4[filterList.name] = filterList,
|
|
1373
1400
|
_a$4[shiftList.name] = shiftList,
|
|
1374
1401
|
_a$4[cartesianGroups.name] = cartesianGroups,
|
|
1402
|
+
_a$4[concat.name] = concat,
|
|
1375
1403
|
_a$4);
|
|
1376
1404
|
|
|
1377
1405
|
var series = {
|
|
@@ -4793,13 +4821,20 @@ var Output = function (_a) {
|
|
|
4793
4821
|
normalized.label || name)));
|
|
4794
4822
|
};
|
|
4795
4823
|
|
|
4796
|
-
var styles = {"DefaultNode":"DefaultNode_R2P6c","selected":"selected_VmB-F","active":"active_zjUzx","Log":"Log_dsq5e","Label":"Label_wBwWA","Description":"Description_f9s4l","PreviewHead":"PreviewHead_oFT4K","expanded":"expanded_3vnbi","Preview":"Preview_HbkZ6","Duration":"Duration_0jqWx","GroupHead":"GroupHead_QJhST","GroupName":"GroupName_Qvu4r","GroupCnt":"GroupCnt_3ctdd","GroupMore":"GroupMore_D1Kiz","GroupChildren":"GroupChildren_NKx-B","GroupLeaf":"GroupLeaf_eliT8"};
|
|
4824
|
+
var styles = {"DefaultNode":"DefaultNode_R2P6c","selected":"selected_VmB-F","active":"active_zjUzx","Log":"Log_dsq5e","Label":"Label_wBwWA","DeleteButton":"DeleteButton_kglTP","Description":"Description_f9s4l","PreviewHead":"PreviewHead_oFT4K","expanded":"expanded_3vnbi","Preview":"Preview_HbkZ6","Duration":"Duration_0jqWx","GroupHead":"GroupHead_QJhST","GroupName":"GroupName_Qvu4r","GroupCnt":"GroupCnt_3ctdd","GroupMore":"GroupMore_D1Kiz","GroupChildren":"GroupChildren_NKx-B","GroupLeaf":"GroupLeaf_eliT8"};
|
|
4797
4825
|
|
|
4798
4826
|
function NodeContainer(_a) {
|
|
4799
4827
|
var _b;
|
|
4800
4828
|
var id = _a.id, label = _a.label, className = _a.className, selected = _a.selected, children = _a.children;
|
|
4801
4829
|
var engine = useEngine();
|
|
4802
4830
|
var _c = __read(React.useState(false), 2), active = _c[0], setActive = _c[1];
|
|
4831
|
+
var _d = __read(React.useState(false), 2), deleteMode = _d[0], setDeleteMode = _d[1];
|
|
4832
|
+
var instance = react.useReactFlow();
|
|
4833
|
+
React.useEffect(function () {
|
|
4834
|
+
if (!selected) {
|
|
4835
|
+
setDeleteMode(false);
|
|
4836
|
+
}
|
|
4837
|
+
}, [selected]);
|
|
4803
4838
|
React.useEffect(function () {
|
|
4804
4839
|
if (!id)
|
|
4805
4840
|
return;
|
|
@@ -4820,11 +4855,20 @@ function NodeContainer(_a) {
|
|
|
4820
4855
|
removeOnResult();
|
|
4821
4856
|
};
|
|
4822
4857
|
}, [id]);
|
|
4858
|
+
var handlers = useLongPress.useLongPress(function () {
|
|
4859
|
+
setDeleteMode(true);
|
|
4860
|
+
});
|
|
4861
|
+
var handleDelete = function () {
|
|
4862
|
+
instance.deleteElements({ nodes: [{ id: id }] });
|
|
4863
|
+
};
|
|
4823
4864
|
return (React.createElement("div", { className: classNames(className, styles.DefaultNode, (_b = {},
|
|
4824
4865
|
_b[styles.selected] = selected,
|
|
4825
4866
|
_b[styles.active] = active,
|
|
4826
4867
|
_b)) },
|
|
4827
|
-
React.createElement("div", { className: styles.Label },
|
|
4868
|
+
React.createElement("div", __assign({ className: styles.Label }, handlers()),
|
|
4869
|
+
React.createElement("span", null),
|
|
4870
|
+
label,
|
|
4871
|
+
React.createElement("span", null, deleteMode && (React.createElement("button", { className: styles.DeleteButton, onClick: handleDelete }, "\u2715")))),
|
|
4828
4872
|
children));
|
|
4829
4873
|
}
|
|
4830
4874
|
|