@rkmodules/rules 0.0.92 → 0.0.94
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 +12 -0
- package/dist/index.cjs.js +28 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.css +12 -0
- package/dist/index.esm.js +28 -28
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/DataTree/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -10,12 +10,17 @@
|
|
|
10
10
|
transform: initial;
|
|
11
11
|
left: initial;
|
|
12
12
|
right: initial;
|
|
13
|
+
top: initial;
|
|
13
14
|
background: initial;
|
|
14
15
|
padding: 2px 8px;
|
|
15
16
|
display: flex;
|
|
16
17
|
gap: 8px;
|
|
17
18
|
align-items: center;
|
|
18
19
|
min-height: 22px;
|
|
20
|
+
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: subgrid;
|
|
23
|
+
grid-column: 1 / 3;
|
|
19
24
|
}
|
|
20
25
|
.Port_XWl7K.required_ofB6J {
|
|
21
26
|
font-weight: bold;
|
|
@@ -23,6 +28,7 @@
|
|
|
23
28
|
|
|
24
29
|
.Port_XWl7K.react-flow__handle-right {
|
|
25
30
|
text-align: right;
|
|
31
|
+
grid-column: 2 / 3;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
.Port_XWl7K.react-flow__handle::after {
|
|
@@ -186,6 +192,12 @@
|
|
|
186
192
|
max-width: 200px;
|
|
187
193
|
}
|
|
188
194
|
|
|
195
|
+
.Ports_fVs5I {
|
|
196
|
+
display: grid;
|
|
197
|
+
grid-template-columns: auto 1fr;
|
|
198
|
+
grid-auto-rows: 26px;
|
|
199
|
+
}
|
|
200
|
+
|
|
189
201
|
.Body_ptEZP {
|
|
190
202
|
margin: 2px auto;
|
|
191
203
|
padding: 8px;
|
package/dist/index.esm.js
CHANGED
|
@@ -271,10 +271,10 @@ function mapTree(tree, fn) {
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
function mapTreeBranch(tree, fn) {
|
|
274
|
-
return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b) {
|
|
274
|
+
return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b, index) {
|
|
275
275
|
var _c = __read(_a, 1), branch = _c[0];
|
|
276
276
|
var _d = __read(_b, 1), path = _d[0];
|
|
277
|
-
return fn(branch || [], path);
|
|
277
|
+
return fn(branch || [], path, index);
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
@@ -298,7 +298,7 @@ function nAryOnTreeBranch(trees, fn) {
|
|
|
298
298
|
// get all the paths of which the trees are the longest, use the first
|
|
299
299
|
var maxPaths = paths.filter(function (_, i) { return allKeys[i].length === maxBranches; });
|
|
300
300
|
var path = maxPaths[0];
|
|
301
|
-
var newBranch = fn(branches, paths);
|
|
301
|
+
var newBranch = fn(branches, paths, i);
|
|
302
302
|
if (newBranch !== DISCARD) {
|
|
303
303
|
result[path] = newBranch;
|
|
304
304
|
}
|
|
@@ -364,10 +364,10 @@ function nAryOnTree(trees, fn, fill) {
|
|
|
364
364
|
* @returns
|
|
365
365
|
*/
|
|
366
366
|
function binaryOnTreeBranch(treeA, treeB, fn) {
|
|
367
|
-
return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b) {
|
|
367
|
+
return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b, index) {
|
|
368
368
|
var _c = __read(_a, 2), branchA = _c[0], branchB = _c[1];
|
|
369
369
|
var _d = __read(_b, 2), pathA = _d[0], pathB = _d[1];
|
|
370
|
-
return fn(branchA || [], branchB || [], pathA, pathB);
|
|
370
|
+
return fn(branchA || [], branchB || [], pathA, pathB, index);
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
/**
|
|
@@ -5071,7 +5071,7 @@ var Output = function (_a) {
|
|
|
5071
5071
|
normalized.label || name)));
|
|
5072
5072
|
};
|
|
5073
5073
|
|
|
5074
|
-
var styles = {"NodeContainer":"NodeContainer_gSdHY","selected":"selected_VmB-F","active":"active_zjUzx","Log":"Log_dsq5e","Label":"Label_wBwWA","Description":"Description_f9s4l","Body":"Body_ptEZP","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"};
|
|
5074
|
+
var styles = {"NodeContainer":"NodeContainer_gSdHY","selected":"selected_VmB-F","active":"active_zjUzx","Log":"Log_dsq5e","Label":"Label_wBwWA","Description":"Description_f9s4l","Ports":"Ports_fVs5I","Body":"Body_ptEZP","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"};
|
|
5075
5075
|
|
|
5076
5076
|
function NodeContainer(_a) {
|
|
5077
5077
|
var _b;
|
|
@@ -5420,24 +5420,23 @@ var InputNode = React.memo(function (_a) {
|
|
|
5420
5420
|
}); };
|
|
5421
5421
|
return (React.createElement(NodeContainer, { label: data.label, selected: selected, id: id, noDelete: true },
|
|
5422
5422
|
React.createElement("div", { className: styles.Description }, data.description),
|
|
5423
|
-
React.createElement("div", { className: styles.Ports },
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
React.createElement("
|
|
5440
|
-
React.createElement("button", { onClick: function () { return onAdd(); } }, "+")))));
|
|
5423
|
+
React.createElement("div", { className: styles.Ports }, Object.entries(outputs || {}).map(function (_a) {
|
|
5424
|
+
var _b = __read(_a, 2), name = _b[0], normalized = _b[1];
|
|
5425
|
+
return (React.createElement(Handle, { key: name, type: "source", position: Position.Right, id: "".concat(id, "-").concat(name), className: classNames(styles$1.Output, styles$1.Port, styles$1["type-".concat(normalized.type)]), style: {
|
|
5426
|
+
"--type-color": "var(--color-".concat(normalized.type, ")"),
|
|
5427
|
+
gridColumn: "1/3",
|
|
5428
|
+
} },
|
|
5429
|
+
React.createElement(Menu, { handle: React.createElement("button", null, "...") },
|
|
5430
|
+
React.createElement(MenuItem, { onClick: function () {
|
|
5431
|
+
return onRename(name, normalized.label || name);
|
|
5432
|
+
} }, "Rename"),
|
|
5433
|
+
React.createElement(MenuItem, { onClick: function () { return onDelete(name); } }, "Delete"),
|
|
5434
|
+
React.createElement(MenuItem, { onClick: function () { return onDefault(name); } }, "Set Default"),
|
|
5435
|
+
React.createElement(MenuItem, { onClick: function () { return onType(name); } }, "Set Type")),
|
|
5436
|
+
React.createElement("span", { className: styles$1.PortLabel }, normalized.label || name)));
|
|
5437
|
+
})),
|
|
5438
|
+
React.createElement("div", { className: styles.Body },
|
|
5439
|
+
React.createElement("button", { onClick: function () { return onAdd(); } }, "+"))));
|
|
5441
5440
|
});
|
|
5442
5441
|
InputNode.displayName = "InputNode";
|
|
5443
5442
|
|
|
@@ -5580,10 +5579,11 @@ var OutputNode = React.memo(function (_a) {
|
|
|
5580
5579
|
"--type-color": "var(--color-".concat(varDef.type, ")"),
|
|
5581
5580
|
} },
|
|
5582
5581
|
React.createElement("span", { className: styles$1.PortLabel }, name),
|
|
5583
|
-
React.createElement("
|
|
5584
|
-
|
|
5585
|
-
React.createElement(
|
|
5586
|
-
|
|
5582
|
+
React.createElement("div", { style: { display: "flex" } },
|
|
5583
|
+
React.createElement("span", { style: { flex: 1 } }),
|
|
5584
|
+
React.createElement(Menu, { handle: React.createElement("button", null, "...") },
|
|
5585
|
+
React.createElement(MenuItem, { onClick: function () { return onRename(name); } }, "Rename"),
|
|
5586
|
+
React.createElement(MenuItem, { onClick: function () { return onDelete(name); } }, "Delete")))));
|
|
5587
5587
|
})),
|
|
5588
5588
|
React.createElement("div", { className: styles.Body },
|
|
5589
5589
|
React.createElement("button", { onClick: function () { return onAdd(); } }, "+"))));
|