@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.cjs.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.cjs.js
CHANGED
|
@@ -273,10 +273,10 @@ function mapTree(tree, fn) {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function mapTreeBranch(tree, fn) {
|
|
276
|
-
return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b) {
|
|
276
|
+
return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b, index) {
|
|
277
277
|
var _c = __read(_a, 1), branch = _c[0];
|
|
278
278
|
var _d = __read(_b, 1), path = _d[0];
|
|
279
|
-
return fn(branch || [], path);
|
|
279
|
+
return fn(branch || [], path, index);
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -300,7 +300,7 @@ function nAryOnTreeBranch(trees, fn) {
|
|
|
300
300
|
// get all the paths of which the trees are the longest, use the first
|
|
301
301
|
var maxPaths = paths.filter(function (_, i) { return allKeys[i].length === maxBranches; });
|
|
302
302
|
var path = maxPaths[0];
|
|
303
|
-
var newBranch = fn(branches, paths);
|
|
303
|
+
var newBranch = fn(branches, paths, i);
|
|
304
304
|
if (newBranch !== DISCARD) {
|
|
305
305
|
result[path] = newBranch;
|
|
306
306
|
}
|
|
@@ -366,10 +366,10 @@ function nAryOnTree(trees, fn, fill) {
|
|
|
366
366
|
* @returns
|
|
367
367
|
*/
|
|
368
368
|
function binaryOnTreeBranch(treeA, treeB, fn) {
|
|
369
|
-
return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b) {
|
|
369
|
+
return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b, index) {
|
|
370
370
|
var _c = __read(_a, 2), branchA = _c[0], branchB = _c[1];
|
|
371
371
|
var _d = __read(_b, 2), pathA = _d[0], pathB = _d[1];
|
|
372
|
-
return fn(branchA || [], branchB || [], pathA, pathB);
|
|
372
|
+
return fn(branchA || [], branchB || [], pathA, pathB, index);
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
@@ -5073,7 +5073,7 @@ var Output = function (_a) {
|
|
|
5073
5073
|
normalized.label || name)));
|
|
5074
5074
|
};
|
|
5075
5075
|
|
|
5076
|
-
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"};
|
|
5076
|
+
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"};
|
|
5077
5077
|
|
|
5078
5078
|
function NodeContainer(_a) {
|
|
5079
5079
|
var _b;
|
|
@@ -5422,24 +5422,23 @@ var InputNode = React.memo(function (_a) {
|
|
|
5422
5422
|
}); };
|
|
5423
5423
|
return (React.createElement(NodeContainer, { label: data.label, selected: selected, id: id, noDelete: true },
|
|
5424
5424
|
React.createElement("div", { className: styles.Description }, data.description),
|
|
5425
|
-
React.createElement("div", { className: styles.Ports },
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
React.createElement("
|
|
5442
|
-
React.createElement("button", { onClick: function () { return onAdd(); } }, "+")))));
|
|
5425
|
+
React.createElement("div", { className: styles.Ports }, Object.entries(outputs || {}).map(function (_a) {
|
|
5426
|
+
var _b = __read(_a, 2), name = _b[0], normalized = _b[1];
|
|
5427
|
+
return (React.createElement(react.Handle, { key: name, type: "source", position: react.Position.Right, id: "".concat(id, "-").concat(name), className: classNames(styles$1.Output, styles$1.Port, styles$1["type-".concat(normalized.type)]), style: {
|
|
5428
|
+
"--type-color": "var(--color-".concat(normalized.type, ")"),
|
|
5429
|
+
gridColumn: "1/3",
|
|
5430
|
+
} },
|
|
5431
|
+
React.createElement(Menu, { handle: React.createElement("button", null, "...") },
|
|
5432
|
+
React.createElement(MenuItem, { onClick: function () {
|
|
5433
|
+
return onRename(name, normalized.label || name);
|
|
5434
|
+
} }, "Rename"),
|
|
5435
|
+
React.createElement(MenuItem, { onClick: function () { return onDelete(name); } }, "Delete"),
|
|
5436
|
+
React.createElement(MenuItem, { onClick: function () { return onDefault(name); } }, "Set Default"),
|
|
5437
|
+
React.createElement(MenuItem, { onClick: function () { return onType(name); } }, "Set Type")),
|
|
5438
|
+
React.createElement("span", { className: styles$1.PortLabel }, normalized.label || name)));
|
|
5439
|
+
})),
|
|
5440
|
+
React.createElement("div", { className: styles.Body },
|
|
5441
|
+
React.createElement("button", { onClick: function () { return onAdd(); } }, "+"))));
|
|
5443
5442
|
});
|
|
5444
5443
|
InputNode.displayName = "InputNode";
|
|
5445
5444
|
|
|
@@ -5582,10 +5581,11 @@ var OutputNode = React.memo(function (_a) {
|
|
|
5582
5581
|
"--type-color": "var(--color-".concat(varDef.type, ")"),
|
|
5583
5582
|
} },
|
|
5584
5583
|
React.createElement("span", { className: styles$1.PortLabel }, name),
|
|
5585
|
-
React.createElement("
|
|
5586
|
-
|
|
5587
|
-
React.createElement(
|
|
5588
|
-
|
|
5584
|
+
React.createElement("div", { style: { display: "flex" } },
|
|
5585
|
+
React.createElement("span", { style: { flex: 1 } }),
|
|
5586
|
+
React.createElement(Menu, { handle: React.createElement("button", null, "...") },
|
|
5587
|
+
React.createElement(MenuItem, { onClick: function () { return onRename(name); } }, "Rename"),
|
|
5588
|
+
React.createElement(MenuItem, { onClick: function () { return onDelete(name); } }, "Delete")))));
|
|
5589
5589
|
})),
|
|
5590
5590
|
React.createElement("div", { className: styles.Body },
|
|
5591
5591
|
React.createElement("button", { onClick: function () { return onAdd(); } }, "+"))));
|