@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.esm.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.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { create, all } from 'mathjs';
|
|
2
2
|
import React, { createContext, memo, useEffect, useLayoutEffect, useState, useCallback, useMemo, isValidElement, cloneElement, useContext } from 'react';
|
|
3
|
-
import { Handle, Position, useConnection, getSimpleBezierPath, ReactFlowProvider, useOnSelectionChange, applyNodeChanges, applyEdgeChanges, ReactFlow, Background, BackgroundVariant, Controls } from '@xyflow/react';
|
|
3
|
+
import { Handle, Position, useReactFlow, useConnection, getSimpleBezierPath, ReactFlowProvider, useOnSelectionChange, applyNodeChanges, applyEdgeChanges, ReactFlow, Background, BackgroundVariant, Controls } from '@xyflow/react';
|
|
4
4
|
import katex from 'katex';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import rcin from 'rc-input-number';
|
|
7
|
+
import { useLongPress } from 'use-long-press';
|
|
7
8
|
import { create as create$1 } from 'zustand';
|
|
8
9
|
import { persist } from 'zustand/middleware';
|
|
9
10
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1361,6 +1362,32 @@ var cartesianGroups = {
|
|
|
1361
1362
|
}); },
|
|
1362
1363
|
};
|
|
1363
1364
|
|
|
1365
|
+
var concat = {
|
|
1366
|
+
name: "concat",
|
|
1367
|
+
label: "Concat",
|
|
1368
|
+
description: "Concatenates two lists back to back",
|
|
1369
|
+
inputs: {
|
|
1370
|
+
treeA: "any",
|
|
1371
|
+
treeB: "any",
|
|
1372
|
+
},
|
|
1373
|
+
outputs: {
|
|
1374
|
+
result: "any",
|
|
1375
|
+
},
|
|
1376
|
+
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1377
|
+
return __generator(this, function (_a) {
|
|
1378
|
+
return [2 /*return*/, {
|
|
1379
|
+
result: binaryOnTreeBranch(inputs.treeA || {}, inputs.treeB || {}, function (branchA, branchB) {
|
|
1380
|
+
if (branchA === undefined)
|
|
1381
|
+
return branchB || DISCARD;
|
|
1382
|
+
if (branchB === undefined)
|
|
1383
|
+
return branchA || DISCARD;
|
|
1384
|
+
return branchA.concat(branchB);
|
|
1385
|
+
}),
|
|
1386
|
+
}];
|
|
1387
|
+
});
|
|
1388
|
+
}); },
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1364
1391
|
var _a$4;
|
|
1365
1392
|
var primitives$4 = (_a$4 = {},
|
|
1366
1393
|
_a$4[splitGroup.name] = splitGroup,
|
|
@@ -1370,6 +1397,7 @@ var primitives$4 = (_a$4 = {},
|
|
|
1370
1397
|
_a$4[filterList.name] = filterList,
|
|
1371
1398
|
_a$4[shiftList.name] = shiftList,
|
|
1372
1399
|
_a$4[cartesianGroups.name] = cartesianGroups,
|
|
1400
|
+
_a$4[concat.name] = concat,
|
|
1373
1401
|
_a$4);
|
|
1374
1402
|
|
|
1375
1403
|
var series = {
|
|
@@ -4791,13 +4819,20 @@ var Output = function (_a) {
|
|
|
4791
4819
|
normalized.label || name)));
|
|
4792
4820
|
};
|
|
4793
4821
|
|
|
4794
|
-
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"};
|
|
4822
|
+
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"};
|
|
4795
4823
|
|
|
4796
4824
|
function NodeContainer(_a) {
|
|
4797
4825
|
var _b;
|
|
4798
4826
|
var id = _a.id, label = _a.label, className = _a.className, selected = _a.selected, children = _a.children;
|
|
4799
4827
|
var engine = useEngine();
|
|
4800
4828
|
var _c = __read(React.useState(false), 2), active = _c[0], setActive = _c[1];
|
|
4829
|
+
var _d = __read(React.useState(false), 2), deleteMode = _d[0], setDeleteMode = _d[1];
|
|
4830
|
+
var instance = useReactFlow();
|
|
4831
|
+
React.useEffect(function () {
|
|
4832
|
+
if (!selected) {
|
|
4833
|
+
setDeleteMode(false);
|
|
4834
|
+
}
|
|
4835
|
+
}, [selected]);
|
|
4801
4836
|
React.useEffect(function () {
|
|
4802
4837
|
if (!id)
|
|
4803
4838
|
return;
|
|
@@ -4818,11 +4853,20 @@ function NodeContainer(_a) {
|
|
|
4818
4853
|
removeOnResult();
|
|
4819
4854
|
};
|
|
4820
4855
|
}, [id]);
|
|
4856
|
+
var handlers = useLongPress(function () {
|
|
4857
|
+
setDeleteMode(true);
|
|
4858
|
+
});
|
|
4859
|
+
var handleDelete = function () {
|
|
4860
|
+
instance.deleteElements({ nodes: [{ id: id }] });
|
|
4861
|
+
};
|
|
4821
4862
|
return (React.createElement("div", { className: classNames(className, styles.DefaultNode, (_b = {},
|
|
4822
4863
|
_b[styles.selected] = selected,
|
|
4823
4864
|
_b[styles.active] = active,
|
|
4824
4865
|
_b)) },
|
|
4825
|
-
React.createElement("div", { className: styles.Label },
|
|
4866
|
+
React.createElement("div", __assign({ className: styles.Label }, handlers()),
|
|
4867
|
+
React.createElement("span", null),
|
|
4868
|
+
label,
|
|
4869
|
+
React.createElement("span", null, deleteMode && (React.createElement("button", { className: styles.DeleteButton, onClick: handleDelete }, "\u2715")))),
|
|
4826
4870
|
children));
|
|
4827
4871
|
}
|
|
4828
4872
|
|