@industry-theme/repository-composition-panels 0.6.8 → 0.6.10
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/{BufferResource-CJBT8_1D.js → BufferResource-BI0oVbZD.js} +2 -2
- package/dist/{BufferResource-CJBT8_1D.js.map → BufferResource-BI0oVbZD.js.map} +1 -1
- package/dist/{CanvasRenderer-Bjw_lWbh.js → CanvasRenderer-Dj5DlQFk.js} +3 -3
- package/dist/{CanvasRenderer-Bjw_lWbh.js.map → CanvasRenderer-Dj5DlQFk.js.map} +1 -1
- package/dist/{Filter-CSP75jUD.js → Filter-BB-hynFo.js} +2 -2
- package/dist/{Filter-CSP75jUD.js.map → Filter-BB-hynFo.js.map} +1 -1
- package/dist/{RenderTargetSystem-D702bPBS.js → RenderTargetSystem-BOYuvb3-.js} +3 -3
- package/dist/{RenderTargetSystem-D702bPBS.js.map → RenderTargetSystem-BOYuvb3-.js.map} +1 -1
- package/dist/{WebGLRenderer-CxCLwJCl.js → WebGLRenderer-Du5sLRYZ.js} +4 -4
- package/dist/{WebGLRenderer-CxCLwJCl.js.map → WebGLRenderer-Du5sLRYZ.js.map} +1 -1
- package/dist/{WebGPURenderer-DT7-x1xm.js → WebGPURenderer-Dc4lZALf.js} +4 -4
- package/dist/{WebGPURenderer-DT7-x1xm.js.map → WebGPURenderer-Dc4lZALf.js.map} +1 -1
- package/dist/{browserAll-BMFz0tFK.js → browserAll-BhoSaVBq.js} +3 -3
- package/dist/{browserAll-BMFz0tFK.js.map → browserAll-BhoSaVBq.js.map} +1 -1
- package/dist/{index-iJqxW9Dv.js → index-C70rwAR9.js} +377 -324
- package/dist/{index-iJqxW9Dv.js.map → index-C70rwAR9.js.map} +1 -1
- package/dist/{init-xJeeQHwI.js → init-DGoF4cVn.js} +3 -3
- package/dist/{init-xJeeQHwI.js.map → init-DGoF4cVn.js.map} +1 -1
- package/dist/panels/CollectionMapPanel.d.ts +2 -19
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/IsometricGridTest.d.ts.map +1 -1
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricInteractionManager.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts.map +1 -1
- package/dist/panels/overworld-map/genericMapper.d.ts +4 -0
- package/dist/panels/overworld-map/genericMapper.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/webworkerAll-NDSOaiUq.js +3 -0
- package/dist/webworkerAll-NDSOaiUq.js.map +1 -0
- package/package.json +5 -3
- package/dist/webworkerAll-DQUlWM-8.js +0 -3
- package/dist/webworkerAll-DQUlWM-8.js.map +0 -1
|
@@ -9409,135 +9409,152 @@ function getDefaultExportFromCjs(x2) {
|
|
|
9409
9409
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
9410
9410
|
}
|
|
9411
9411
|
var withSelector = { exports: {} };
|
|
9412
|
-
var
|
|
9412
|
+
var withSelector_production = {};
|
|
9413
9413
|
var shim = { exports: {} };
|
|
9414
|
-
var
|
|
9414
|
+
var useSyncExternalStoreShim_production = {};
|
|
9415
9415
|
/**
|
|
9416
9416
|
* @license React
|
|
9417
|
-
* use-sync-external-store-shim.production.
|
|
9417
|
+
* use-sync-external-store-shim.production.js
|
|
9418
9418
|
*
|
|
9419
|
-
* Copyright (c)
|
|
9419
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9420
9420
|
*
|
|
9421
9421
|
* This source code is licensed under the MIT license found in the
|
|
9422
9422
|
* LICENSE file in the root directory of this source tree.
|
|
9423
9423
|
*/
|
|
9424
|
-
var
|
|
9425
|
-
function
|
|
9426
|
-
if (
|
|
9427
|
-
|
|
9428
|
-
var
|
|
9429
|
-
function
|
|
9430
|
-
return
|
|
9431
|
-
}
|
|
9432
|
-
var
|
|
9433
|
-
function
|
|
9434
|
-
var
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9424
|
+
var hasRequiredUseSyncExternalStoreShim_production;
|
|
9425
|
+
function requireUseSyncExternalStoreShim_production() {
|
|
9426
|
+
if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
|
|
9427
|
+
hasRequiredUseSyncExternalStoreShim_production = 1;
|
|
9428
|
+
var React = React2__default;
|
|
9429
|
+
function is(x2, y2) {
|
|
9430
|
+
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
9431
|
+
}
|
|
9432
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect2 = React.useLayoutEffect, useDebugValue2 = React.useDebugValue;
|
|
9433
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
9434
|
+
var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
9435
|
+
useLayoutEffect2(
|
|
9436
|
+
function() {
|
|
9437
|
+
inst.value = value;
|
|
9438
|
+
inst.getSnapshot = getSnapshot;
|
|
9439
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
9440
|
+
},
|
|
9441
|
+
[subscribe, value, getSnapshot]
|
|
9442
|
+
);
|
|
9443
|
+
useEffect2(
|
|
9444
|
+
function() {
|
|
9445
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
9446
|
+
return subscribe(function() {
|
|
9447
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
9448
|
+
});
|
|
9449
|
+
},
|
|
9450
|
+
[subscribe]
|
|
9451
|
+
);
|
|
9452
|
+
useDebugValue2(value);
|
|
9453
|
+
return value;
|
|
9448
9454
|
}
|
|
9449
|
-
function
|
|
9450
|
-
var
|
|
9451
|
-
|
|
9455
|
+
function checkIfSnapshotChanged(inst) {
|
|
9456
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
9457
|
+
inst = inst.value;
|
|
9452
9458
|
try {
|
|
9453
|
-
var
|
|
9454
|
-
return !
|
|
9455
|
-
} catch (
|
|
9459
|
+
var nextValue = latestGetSnapshot();
|
|
9460
|
+
return !objectIs(inst, nextValue);
|
|
9461
|
+
} catch (error) {
|
|
9456
9462
|
return true;
|
|
9457
9463
|
}
|
|
9458
9464
|
}
|
|
9459
|
-
function
|
|
9460
|
-
return
|
|
9465
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
9466
|
+
return getSnapshot();
|
|
9461
9467
|
}
|
|
9462
|
-
var
|
|
9463
|
-
|
|
9464
|
-
return
|
|
9468
|
+
var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
9469
|
+
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
|
|
9470
|
+
return useSyncExternalStoreShim_production;
|
|
9465
9471
|
}
|
|
9466
9472
|
var hasRequiredShim;
|
|
9467
9473
|
function requireShim() {
|
|
9468
9474
|
if (hasRequiredShim) return shim.exports;
|
|
9469
9475
|
hasRequiredShim = 1;
|
|
9470
9476
|
{
|
|
9471
|
-
shim.exports =
|
|
9477
|
+
shim.exports = requireUseSyncExternalStoreShim_production();
|
|
9472
9478
|
}
|
|
9473
9479
|
return shim.exports;
|
|
9474
9480
|
}
|
|
9475
9481
|
/**
|
|
9476
9482
|
* @license React
|
|
9477
|
-
* use-sync-external-store-shim/with-selector.production.
|
|
9483
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
9478
9484
|
*
|
|
9479
|
-
* Copyright (c)
|
|
9485
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9480
9486
|
*
|
|
9481
9487
|
* This source code is licensed under the MIT license found in the
|
|
9482
9488
|
* LICENSE file in the root directory of this source tree.
|
|
9483
9489
|
*/
|
|
9484
|
-
var
|
|
9485
|
-
function
|
|
9486
|
-
if (
|
|
9487
|
-
|
|
9488
|
-
var
|
|
9489
|
-
function
|
|
9490
|
-
return
|
|
9491
|
-
}
|
|
9492
|
-
var
|
|
9493
|
-
|
|
9494
|
-
var
|
|
9495
|
-
if (null ===
|
|
9496
|
-
var
|
|
9497
|
-
|
|
9498
|
-
} else
|
|
9499
|
-
|
|
9500
|
-
function
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9490
|
+
var hasRequiredWithSelector_production;
|
|
9491
|
+
function requireWithSelector_production() {
|
|
9492
|
+
if (hasRequiredWithSelector_production) return withSelector_production;
|
|
9493
|
+
hasRequiredWithSelector_production = 1;
|
|
9494
|
+
var React = React2__default, shim2 = requireShim();
|
|
9495
|
+
function is(x2, y2) {
|
|
9496
|
+
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
9497
|
+
}
|
|
9498
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef2 = React.useRef, useEffect2 = React.useEffect, useMemo2 = React.useMemo, useDebugValue2 = React.useDebugValue;
|
|
9499
|
+
withSelector_production.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector2, isEqual) {
|
|
9500
|
+
var instRef = useRef2(null);
|
|
9501
|
+
if (null === instRef.current) {
|
|
9502
|
+
var inst = { hasValue: false, value: null };
|
|
9503
|
+
instRef.current = inst;
|
|
9504
|
+
} else inst = instRef.current;
|
|
9505
|
+
instRef = useMemo2(
|
|
9506
|
+
function() {
|
|
9507
|
+
function memoizedSelector(nextSnapshot) {
|
|
9508
|
+
if (!hasMemo) {
|
|
9509
|
+
hasMemo = true;
|
|
9510
|
+
memoizedSnapshot = nextSnapshot;
|
|
9511
|
+
nextSnapshot = selector2(nextSnapshot);
|
|
9512
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
9513
|
+
var currentSelection = inst.value;
|
|
9514
|
+
if (isEqual(currentSelection, nextSnapshot))
|
|
9515
|
+
return memoizedSelection = currentSelection;
|
|
9516
|
+
}
|
|
9517
|
+
return memoizedSelection = nextSnapshot;
|
|
9508
9518
|
}
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9519
|
+
currentSelection = memoizedSelection;
|
|
9520
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
9521
|
+
var nextSelection = selector2(nextSnapshot);
|
|
9522
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
9523
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
9524
|
+
memoizedSnapshot = nextSnapshot;
|
|
9525
|
+
return memoizedSelection = nextSelection;
|
|
9526
|
+
}
|
|
9527
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
9528
|
+
return [
|
|
9529
|
+
function() {
|
|
9530
|
+
return memoizedSelector(getSnapshot());
|
|
9531
|
+
},
|
|
9532
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
9533
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
9534
|
+
}
|
|
9535
|
+
];
|
|
9536
|
+
},
|
|
9537
|
+
[getSnapshot, getServerSnapshot, selector2, isEqual]
|
|
9538
|
+
);
|
|
9539
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
9540
|
+
useEffect2(
|
|
9541
|
+
function() {
|
|
9542
|
+
inst.hasValue = true;
|
|
9543
|
+
inst.value = value;
|
|
9544
|
+
},
|
|
9545
|
+
[value]
|
|
9546
|
+
);
|
|
9547
|
+
useDebugValue2(value);
|
|
9548
|
+
return value;
|
|
9549
|
+
};
|
|
9550
|
+
return withSelector_production;
|
|
9534
9551
|
}
|
|
9535
9552
|
var hasRequiredWithSelector;
|
|
9536
9553
|
function requireWithSelector() {
|
|
9537
9554
|
if (hasRequiredWithSelector) return withSelector.exports;
|
|
9538
9555
|
hasRequiredWithSelector = 1;
|
|
9539
9556
|
{
|
|
9540
|
-
withSelector.exports =
|
|
9557
|
+
withSelector.exports = requireWithSelector_production();
|
|
9541
9558
|
}
|
|
9542
9559
|
return withSelector.exports;
|
|
9543
9560
|
}
|
|
@@ -9603,8 +9620,7 @@ function shallow$1(objA, objB) {
|
|
|
9603
9620
|
return false;
|
|
9604
9621
|
}
|
|
9605
9622
|
if (objA instanceof Map && objB instanceof Map) {
|
|
9606
|
-
if (objA.size !== objB.size)
|
|
9607
|
-
return false;
|
|
9623
|
+
if (objA.size !== objB.size) return false;
|
|
9608
9624
|
for (const [key, value] of objA) {
|
|
9609
9625
|
if (!Object.is(value, objB.get(key))) {
|
|
9610
9626
|
return false;
|
|
@@ -9613,8 +9629,7 @@ function shallow$1(objA, objB) {
|
|
|
9613
9629
|
return true;
|
|
9614
9630
|
}
|
|
9615
9631
|
if (objA instanceof Set && objB instanceof Set) {
|
|
9616
|
-
if (objA.size !== objB.size)
|
|
9617
|
-
return false;
|
|
9632
|
+
if (objA.size !== objB.size) return false;
|
|
9618
9633
|
for (const value of objA) {
|
|
9619
9634
|
if (!objB.has(value)) {
|
|
9620
9635
|
return false;
|
|
@@ -9626,8 +9641,8 @@ function shallow$1(objA, objB) {
|
|
|
9626
9641
|
if (keysA.length !== Object.keys(objB).length) {
|
|
9627
9642
|
return false;
|
|
9628
9643
|
}
|
|
9629
|
-
for (
|
|
9630
|
-
if (!Object.prototype.hasOwnProperty.call(objB,
|
|
9644
|
+
for (const keyA of keysA) {
|
|
9645
|
+
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
|
|
9631
9646
|
return false;
|
|
9632
9647
|
}
|
|
9633
9648
|
}
|
|
@@ -13435,8 +13450,6 @@ class CanvasConverter {
|
|
|
13435
13450
|
data.states = pv.states;
|
|
13436
13451
|
if (pv.sources)
|
|
13437
13452
|
data.sources = pv.sources;
|
|
13438
|
-
if (pv.status)
|
|
13439
|
-
data.status = pv.status;
|
|
13440
13453
|
if (pv.dataSchema)
|
|
13441
13454
|
data.dataSchema = pv.dataSchema;
|
|
13442
13455
|
if (pv.event)
|
|
@@ -13544,8 +13557,6 @@ class CanvasConverter {
|
|
|
13544
13557
|
nodeData.stroke = pv.stroke;
|
|
13545
13558
|
if (pv == null ? void 0 : pv.states)
|
|
13546
13559
|
nodeData.states = pv.states;
|
|
13547
|
-
if (pv == null ? void 0 : pv.status)
|
|
13548
|
-
nodeData.status = pv.status;
|
|
13549
13560
|
if (pv == null ? void 0 : pv.otel)
|
|
13550
13561
|
nodeData.otel = pv.otel;
|
|
13551
13562
|
if (pv == null ? void 0 : pv.resourceMatch)
|
|
@@ -97710,20 +97721,36 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97710
97721
|
tooltipsEnabled = true,
|
|
97711
97722
|
shiftKeyPressed = false,
|
|
97712
97723
|
isHighlighted = false,
|
|
97713
|
-
isActive = true
|
|
97724
|
+
isActive = true
|
|
97714
97725
|
// Default to active if not specified
|
|
97715
|
-
isHidden = false
|
|
97716
|
-
// Default to not hidden
|
|
97717
97726
|
} = nodeProps;
|
|
97718
|
-
const nodeOpacity = isHidden ? 0.4 : isActive ? 1 : 0.1;
|
|
97719
97727
|
const showTooltip = isHovered && !dragging && shiftKeyPressed;
|
|
97720
97728
|
const otelInfo = nodeData == null ? void 0 : nodeData.otel;
|
|
97721
97729
|
const description = nodeData == null ? void 0 : nodeData.description;
|
|
97722
97730
|
const sources2 = nodeData == null ? void 0 : nodeData.sources;
|
|
97723
|
-
const
|
|
97724
|
-
|
|
97725
|
-
|
|
97731
|
+
const getOtelBadgeColor = (kind) => {
|
|
97732
|
+
switch (kind) {
|
|
97733
|
+
case "type":
|
|
97734
|
+
return "#4A90E2";
|
|
97735
|
+
// Blue
|
|
97736
|
+
case "service":
|
|
97737
|
+
return "#7ED321";
|
|
97738
|
+
// Green
|
|
97739
|
+
case "instance":
|
|
97740
|
+
return "#9B59B6";
|
|
97741
|
+
// Purple
|
|
97742
|
+
case "event":
|
|
97743
|
+
return "#F59E0B";
|
|
97744
|
+
// Amber
|
|
97745
|
+
default:
|
|
97746
|
+
return "#888";
|
|
97747
|
+
}
|
|
97748
|
+
};
|
|
97749
|
+
const renderOtelBadge = () => {
|
|
97750
|
+
if (!(otelInfo == null ? void 0 : otelInfo.kind))
|
|
97726
97751
|
return null;
|
|
97752
|
+
const badgeColor = getOtelBadgeColor(otelInfo.kind);
|
|
97753
|
+
const label = otelInfo.kind.charAt(0).toUpperCase();
|
|
97727
97754
|
return jsx("div", { style: {
|
|
97728
97755
|
position: "absolute",
|
|
97729
97756
|
top: -6,
|
|
@@ -97731,7 +97758,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97731
97758
|
width: 18,
|
|
97732
97759
|
height: 18,
|
|
97733
97760
|
borderRadius: "50%",
|
|
97734
|
-
backgroundColor:
|
|
97761
|
+
backgroundColor: badgeColor,
|
|
97735
97762
|
color: "white",
|
|
97736
97763
|
fontSize: theme2.fontSizes[0],
|
|
97737
97764
|
fontWeight: theme2.fontWeights.bold,
|
|
@@ -97741,29 +97768,13 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97741
97768
|
justifyContent: "center",
|
|
97742
97769
|
boxShadow: "0 1px 3px rgba(0,0,0,0.3)",
|
|
97743
97770
|
zIndex: 10,
|
|
97744
|
-
opacity:
|
|
97745
|
-
}, title: `
|
|
97771
|
+
opacity: isActive ? 1 : 0.1
|
|
97772
|
+
}, title: `${otelInfo.kind}${otelInfo.category ? ` (${otelInfo.category})` : ""}`, children: label });
|
|
97746
97773
|
};
|
|
97747
|
-
const
|
|
97748
|
-
const
|
|
97749
|
-
if (!
|
|
97774
|
+
const renderSourcesBadge = () => {
|
|
97775
|
+
const sources3 = nodeData == null ? void 0 : nodeData.sources;
|
|
97776
|
+
if (!sources3 || sources3.length === 0)
|
|
97750
97777
|
return null;
|
|
97751
|
-
const statusColors = {
|
|
97752
|
-
draft: "#6b7280",
|
|
97753
|
-
approved: "#3b82f6",
|
|
97754
|
-
implemented: "#10b981"
|
|
97755
|
-
// Green
|
|
97756
|
-
};
|
|
97757
|
-
const statusLabels = {
|
|
97758
|
-
draft: "D",
|
|
97759
|
-
approved: "A",
|
|
97760
|
-
implemented: "I"
|
|
97761
|
-
};
|
|
97762
|
-
const statusTitles = {
|
|
97763
|
-
draft: "Draft - Design phase",
|
|
97764
|
-
approved: "Approved - Ready for implementation",
|
|
97765
|
-
implemented: "Implemented - Code exists"
|
|
97766
|
-
};
|
|
97767
97778
|
return jsx("div", { style: {
|
|
97768
97779
|
position: "absolute",
|
|
97769
97780
|
top: -6,
|
|
@@ -97771,7 +97782,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97771
97782
|
width: 18,
|
|
97772
97783
|
height: 18,
|
|
97773
97784
|
borderRadius: "50%",
|
|
97774
|
-
backgroundColor:
|
|
97785
|
+
backgroundColor: "#10b981",
|
|
97775
97786
|
color: "white",
|
|
97776
97787
|
fontSize: theme2.fontSizes[0],
|
|
97777
97788
|
fontWeight: theme2.fontWeights.bold,
|
|
@@ -97781,8 +97792,8 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97781
97792
|
justifyContent: "center",
|
|
97782
97793
|
boxShadow: "0 1px 3px rgba(0,0,0,0.3)",
|
|
97783
97794
|
zIndex: 10,
|
|
97784
|
-
opacity:
|
|
97785
|
-
}, title:
|
|
97795
|
+
opacity: isActive ? 1 : 0.1
|
|
97796
|
+
}, title: `Sources: ${sources3.join(", ")}`, children: "S" });
|
|
97786
97797
|
};
|
|
97787
97798
|
if (!typeDefinition) {
|
|
97788
97799
|
return jsx("div", { style: { padding: "10px", border: "2px solid red", borderRadius: "4px" }, children: jsx("div", { style: { fontSize: "12px", color: "red" }, children: "Error: Missing node type definition" }) });
|
|
@@ -97793,9 +97804,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97793
97804
|
const stateColor = state && (((_a = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _a.color) || ((_c = (_b = typeDefinition.states) == null ? void 0 : _b[state]) == null ? void 0 : _c.color));
|
|
97794
97805
|
const fillColor = stateColor || baseColor;
|
|
97795
97806
|
const nodeDataStroke = nodeData.stroke;
|
|
97796
|
-
const
|
|
97797
|
-
const status = nodeData == null ? void 0 : nodeData.status;
|
|
97798
|
-
const strokeColor = baseStrokeColor;
|
|
97807
|
+
const strokeColor = nodeDataStroke || typeDefinition.stroke || fillColor;
|
|
97799
97808
|
const color2 = fillColor;
|
|
97800
97809
|
const displayName = nodeProps.name;
|
|
97801
97810
|
const eventData = nodeData == null ? void 0 : nodeData.event;
|
|
@@ -97825,12 +97834,11 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97825
97834
|
const animationClass = getAnimationClass();
|
|
97826
97835
|
const isGroup = nodeData.canvasType === "group";
|
|
97827
97836
|
const getShapeStyles = () => {
|
|
97828
|
-
const borderStyle = status === "draft" ? "dotted" : status === "approved" ? "dashed" : "solid";
|
|
97829
97837
|
const baseStyles = {
|
|
97830
97838
|
padding: "12px 16px",
|
|
97831
97839
|
backgroundColor: isGroup ? "rgba(255, 255, 255, 0.7)" : hexToLightColor(fillColor),
|
|
97832
97840
|
color: "#000",
|
|
97833
|
-
border: `2px
|
|
97841
|
+
border: `2px solid ${hasViolations ? "#D0021B" : strokeColor}`,
|
|
97834
97842
|
fontSize: theme2.fontSizes[0],
|
|
97835
97843
|
fontWeight: theme2.fontWeights.medium,
|
|
97836
97844
|
fontFamily: theme2.fonts.body,
|
|
@@ -97846,7 +97854,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97846
97854
|
justifyContent: isGroup ? "flex-start" : "center",
|
|
97847
97855
|
gap: "4px",
|
|
97848
97856
|
boxShadow: isHighlighted ? `0 0 0 3px #3b82f6, 0 0 20px rgba(59, 130, 246, 0.5)` : selected2 ? `0 0 0 2px ${strokeColor}` : "0 2px 4px rgba(0,0,0,0.1)",
|
|
97849
|
-
opacity:
|
|
97857
|
+
opacity: isActive ? 1 : 0.1,
|
|
97850
97858
|
transition: "box-shadow 0.2s ease, opacity 0.3s ease",
|
|
97851
97859
|
animationDuration: animationType ? `${animationDuration}ms` : void 0,
|
|
97852
97860
|
boxSizing: "border-box"
|
|
@@ -97911,7 +97919,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97911
97919
|
minWidth: 20,
|
|
97912
97920
|
minHeight: 20,
|
|
97913
97921
|
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
|
|
97914
|
-
opacity:
|
|
97922
|
+
opacity: isActive ? 1 : 0.1,
|
|
97915
97923
|
transition: "opacity 0.3s ease",
|
|
97916
97924
|
boxSizing: "border-box"
|
|
97917
97925
|
} : {};
|
|
@@ -97945,7 +97953,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
97945
97953
|
minWidth: 20,
|
|
97946
97954
|
minHeight: 20,
|
|
97947
97955
|
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
|
|
97948
|
-
opacity:
|
|
97956
|
+
opacity: isActive ? 1 : 0.1,
|
|
97949
97957
|
transition: "opacity 0.3s ease",
|
|
97950
97958
|
boxSizing: "border-box"
|
|
97951
97959
|
} : {};
|
|
@@ -98003,7 +98011,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
98003
98011
|
height: "100%",
|
|
98004
98012
|
boxShadow: isHighlighted ? `0 0 0 3px #3b82f6, 0 0 20px rgba(59, 130, 246, 0.5)` : selected2 ? `0 0 0 2px ${strokeColor}` : "none",
|
|
98005
98013
|
transition: "box-shadow 0.2s ease"
|
|
98006
|
-
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [
|
|
98014
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderSourcesBadge(), renderOtelBadge(), jsx("div", { style: hexagonBorderStyle, className: animationClass, children: jsxs("div", { style: hexagonInnerStyle, children: [icon && jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: resolveIcon(icon, 20) }), renderNameWithEvent(), state && jsx("div", { style: {
|
|
98007
98015
|
fontSize: theme2.fontSizes[0],
|
|
98008
98016
|
fontFamily: theme2.fonts.body,
|
|
98009
98017
|
backgroundColor: color2,
|
|
@@ -98022,7 +98030,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
98022
98030
|
height: "100%",
|
|
98023
98031
|
boxShadow: isHighlighted ? `0 0 0 3px #3b82f6, 0 0 20px rgba(59, 130, 246, 0.5)` : selected2 ? `0 0 0 2px ${strokeColor}` : "none",
|
|
98024
98032
|
transition: "box-shadow 0.2s ease"
|
|
98025
|
-
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [
|
|
98033
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderSourcesBadge(), renderOtelBadge(), jsx("div", { style: diamondBorderStyle, className: animationClass, children: jsxs("div", { style: diamondInnerStyle, children: [icon && jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: resolveIcon(icon, 20) }), renderNameWithEvent(), state && jsx("div", { style: {
|
|
98026
98034
|
fontSize: theme2.fontSizes[0],
|
|
98027
98035
|
fontFamily: theme2.fonts.body,
|
|
98028
98036
|
backgroundColor: color2,
|
|
@@ -98035,7 +98043,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
98035
98043
|
fontFamily: theme2.fonts.body,
|
|
98036
98044
|
color: "#D0021B",
|
|
98037
98045
|
fontWeight: theme2.fontWeights.bold
|
|
98038
|
-
}, children: "⚠️" })] }) }), tooltipsEnabled && jsx(NodeTooltip, { description, otel: otelInfo, sources: sources2, visible: showTooltip, nodeRef })] }) : jsxs("div", { ref: nodeRef, style: { position: "relative", width: "100%", height: "100%" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [
|
|
98046
|
+
}, children: "⚠️" })] }) }), tooltipsEnabled && jsx(NodeTooltip, { description, otel: otelInfo, sources: sources2, visible: showTooltip, nodeRef })] }) : jsxs("div", { ref: nodeRef, style: { position: "relative", width: "100%", height: "100%" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderSourcesBadge(), renderOtelBadge(), jsx("div", { style: getShapeStyles(), className: animationClass, children: jsxs("div", { style: {
|
|
98039
98047
|
...isGroup ? { width: "100%" } : {}
|
|
98040
98048
|
}, children: [isGroup ? jsxs("div", { style: {
|
|
98041
98049
|
display: "flex",
|
|
@@ -98856,6 +98864,179 @@ const NodeInfoPanel = ({ node: node2, typeDefinition, availableNodeTypes, onClos
|
|
|
98856
98864
|
fontWeight: theme2.fontWeights.bold
|
|
98857
98865
|
}, children: "Delete Node" })] });
|
|
98858
98866
|
};
|
|
98867
|
+
const SelectionSidebar = ({ selectedNodeIds, nodes, nodeTypeDefinitions, onClose }) => {
|
|
98868
|
+
const { theme: theme2 } = useTheme();
|
|
98869
|
+
const [expandedNodes, setExpandedNodes] = useState({});
|
|
98870
|
+
const selectedNodes = nodes.filter((n2) => selectedNodeIds.has(n2.id));
|
|
98871
|
+
const toggleExpanded = (nodeId) => {
|
|
98872
|
+
setExpandedNodes((prev) => ({
|
|
98873
|
+
...prev,
|
|
98874
|
+
[nodeId]: !prev[nodeId]
|
|
98875
|
+
}));
|
|
98876
|
+
};
|
|
98877
|
+
const internalFields = [
|
|
98878
|
+
"icon",
|
|
98879
|
+
"name",
|
|
98880
|
+
"description",
|
|
98881
|
+
"sources",
|
|
98882
|
+
"color",
|
|
98883
|
+
"stroke",
|
|
98884
|
+
"width",
|
|
98885
|
+
"height",
|
|
98886
|
+
"canvasType",
|
|
98887
|
+
"text",
|
|
98888
|
+
"file",
|
|
98889
|
+
"url",
|
|
98890
|
+
"shape",
|
|
98891
|
+
"states",
|
|
98892
|
+
"actions",
|
|
98893
|
+
"nodeType"
|
|
98894
|
+
];
|
|
98895
|
+
return jsxs("div", { style: {
|
|
98896
|
+
position: "absolute",
|
|
98897
|
+
top: "60px",
|
|
98898
|
+
right: "20px",
|
|
98899
|
+
backgroundColor: theme2.colors.background,
|
|
98900
|
+
color: theme2.colors.text,
|
|
98901
|
+
borderRadius: "8px",
|
|
98902
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
98903
|
+
padding: "16px",
|
|
98904
|
+
minWidth: "280px",
|
|
98905
|
+
maxWidth: "350px",
|
|
98906
|
+
maxHeight: "calc(100vh - 120px)",
|
|
98907
|
+
overflowY: "auto",
|
|
98908
|
+
zIndex: 1e3,
|
|
98909
|
+
border: `1px solid ${theme2.colors.border}`
|
|
98910
|
+
}, children: [jsxs("div", { style: {
|
|
98911
|
+
display: "flex",
|
|
98912
|
+
justifyContent: "space-between",
|
|
98913
|
+
alignItems: "center",
|
|
98914
|
+
marginBottom: "12px",
|
|
98915
|
+
paddingBottom: "8px",
|
|
98916
|
+
borderBottom: `2px solid ${theme2.colors.primary}`
|
|
98917
|
+
}, children: [jsxs("div", { style: { fontWeight: theme2.fontWeights.bold, fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.primary }, children: [selectedNodes.length, " nodes selected"] }), jsx("button", { onClick: onClose, style: {
|
|
98918
|
+
border: "none",
|
|
98919
|
+
background: "none",
|
|
98920
|
+
cursor: "pointer",
|
|
98921
|
+
fontSize: theme2.fontSizes[3],
|
|
98922
|
+
fontFamily: theme2.fonts.body,
|
|
98923
|
+
color: theme2.colors.textSecondary,
|
|
98924
|
+
padding: "0",
|
|
98925
|
+
width: "24px",
|
|
98926
|
+
height: "24px",
|
|
98927
|
+
display: "flex",
|
|
98928
|
+
alignItems: "center",
|
|
98929
|
+
justifyContent: "center"
|
|
98930
|
+
}, children: "x" })] }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: selectedNodes.map((node2) => {
|
|
98931
|
+
var _a, _b, _c, _d, _e2, _f, _g;
|
|
98932
|
+
const typeDefinition = nodeTypeDefinitions[node2.type];
|
|
98933
|
+
const nodeColor = ((_a = node2.data) == null ? void 0 : _a.color) || (typeDefinition == null ? void 0 : typeDefinition.color) || theme2.colors.secondary;
|
|
98934
|
+
const icon = ((_b = node2.data) == null ? void 0 : _b.icon) || (typeDefinition == null ? void 0 : typeDefinition.icon);
|
|
98935
|
+
const isExpanded = expandedNodes[node2.id] || false;
|
|
98936
|
+
const description = (_c = node2.data) == null ? void 0 : _c.description;
|
|
98937
|
+
const dataEntries = node2.data ? Object.entries(node2.data).filter(([key]) => !internalFields.includes(key)) : [];
|
|
98938
|
+
return jsxs("div", { style: {
|
|
98939
|
+
backgroundColor: theme2.colors.surface,
|
|
98940
|
+
borderRadius: "6px",
|
|
98941
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
98942
|
+
overflow: "hidden"
|
|
98943
|
+
}, children: [jsxs("button", { onClick: () => toggleExpanded(node2.id), style: {
|
|
98944
|
+
width: "100%",
|
|
98945
|
+
padding: "10px 12px",
|
|
98946
|
+
backgroundColor: "transparent",
|
|
98947
|
+
border: "none",
|
|
98948
|
+
cursor: "pointer",
|
|
98949
|
+
display: "flex",
|
|
98950
|
+
alignItems: "flex-start",
|
|
98951
|
+
gap: "10px",
|
|
98952
|
+
textAlign: "left"
|
|
98953
|
+
}, children: [jsx("div", { style: {
|
|
98954
|
+
width: "28px",
|
|
98955
|
+
height: "28px",
|
|
98956
|
+
borderRadius: "6px",
|
|
98957
|
+
backgroundColor: nodeColor,
|
|
98958
|
+
display: "flex",
|
|
98959
|
+
alignItems: "center",
|
|
98960
|
+
justifyContent: "center",
|
|
98961
|
+
flexShrink: 0,
|
|
98962
|
+
color: "white"
|
|
98963
|
+
}, children: icon ? resolveIcon(icon, 16) : null }), jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [jsx("div", { style: {
|
|
98964
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
98965
|
+
fontSize: theme2.fontSizes[1],
|
|
98966
|
+
fontFamily: theme2.fonts.body,
|
|
98967
|
+
color: theme2.colors.text,
|
|
98968
|
+
marginBottom: description ? "2px" : 0
|
|
98969
|
+
}, children: node2.name || node2.id }), description && jsx("div", { style: {
|
|
98970
|
+
fontSize: theme2.fontSizes[0],
|
|
98971
|
+
fontFamily: theme2.fonts.body,
|
|
98972
|
+
color: theme2.colors.textSecondary,
|
|
98973
|
+
overflow: "hidden",
|
|
98974
|
+
textOverflow: "ellipsis",
|
|
98975
|
+
display: "-webkit-box",
|
|
98976
|
+
WebkitLineClamp: isExpanded ? "unset" : 2,
|
|
98977
|
+
WebkitBoxOrient: "vertical"
|
|
98978
|
+
}, children: description })] }), jsx("div", { style: {
|
|
98979
|
+
color: theme2.colors.textSecondary,
|
|
98980
|
+
fontSize: "10px",
|
|
98981
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
98982
|
+
transition: "transform 0.2s",
|
|
98983
|
+
flexShrink: 0
|
|
98984
|
+
}, children: "▼" })] }), isExpanded && jsxs("div", { style: {
|
|
98985
|
+
padding: "0 12px 10px 12px",
|
|
98986
|
+
borderTop: `1px solid ${theme2.colors.border}`,
|
|
98987
|
+
marginTop: "0"
|
|
98988
|
+
}, children: [jsxs("div", { style: { marginTop: "10px" }, children: [jsx("div", { style: {
|
|
98989
|
+
fontSize: theme2.fontSizes[0],
|
|
98990
|
+
fontFamily: theme2.fonts.body,
|
|
98991
|
+
color: theme2.colors.textSecondary,
|
|
98992
|
+
marginBottom: "4px"
|
|
98993
|
+
}, children: "Type" }), jsx("div", { style: {
|
|
98994
|
+
fontSize: theme2.fontSizes[0],
|
|
98995
|
+
fontFamily: theme2.fonts.body,
|
|
98996
|
+
padding: "3px 8px",
|
|
98997
|
+
backgroundColor: nodeColor,
|
|
98998
|
+
color: "white",
|
|
98999
|
+
borderRadius: "4px",
|
|
99000
|
+
display: "inline-block"
|
|
99001
|
+
}, children: node2.type })] }), node2.state && jsxs("div", { style: { marginTop: "8px" }, children: [jsx("div", { style: {
|
|
99002
|
+
fontSize: theme2.fontSizes[0],
|
|
99003
|
+
fontFamily: theme2.fonts.body,
|
|
99004
|
+
color: theme2.colors.textSecondary,
|
|
99005
|
+
marginBottom: "4px"
|
|
99006
|
+
}, children: "State" }), jsx("div", { style: {
|
|
99007
|
+
fontSize: theme2.fontSizes[0],
|
|
99008
|
+
fontFamily: theme2.fonts.body,
|
|
99009
|
+
padding: "3px 8px",
|
|
99010
|
+
backgroundColor: ((_e2 = (_d = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _d[node2.state]) == null ? void 0 : _e2.color) || theme2.colors.secondary,
|
|
99011
|
+
color: "white",
|
|
99012
|
+
borderRadius: "4px",
|
|
99013
|
+
display: "inline-block"
|
|
99014
|
+
}, children: ((_g = (_f = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _f[node2.state]) == null ? void 0 : _g.label) || node2.state })] }), dataEntries.length > 0 && jsxs("div", { style: { marginTop: "8px" }, children: [jsx("div", { style: {
|
|
99015
|
+
fontSize: theme2.fontSizes[0],
|
|
99016
|
+
fontFamily: theme2.fonts.body,
|
|
99017
|
+
color: theme2.colors.textSecondary,
|
|
99018
|
+
marginBottom: "6px",
|
|
99019
|
+
fontWeight: "bold"
|
|
99020
|
+
}, children: "Properties" }), dataEntries.map(([key, value]) => jsxs("div", { style: { marginBottom: "6px" }, children: [jsx("div", { style: {
|
|
99021
|
+
fontSize: theme2.fontSizes[0],
|
|
99022
|
+
fontFamily: theme2.fonts.body,
|
|
99023
|
+
color: theme2.colors.textSecondary,
|
|
99024
|
+
marginBottom: "2px"
|
|
99025
|
+
}, children: key }), jsx("div", { style: {
|
|
99026
|
+
fontSize: theme2.fontSizes[0],
|
|
99027
|
+
fontFamily: theme2.fonts.body,
|
|
99028
|
+
color: theme2.colors.text,
|
|
99029
|
+
wordBreak: "break-word"
|
|
99030
|
+
}, children: value !== void 0 && value !== null ? typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) : "-" })] }, key))] }), jsxs("div", { style: {
|
|
99031
|
+
fontSize: theme2.fontSizes[0],
|
|
99032
|
+
fontFamily: theme2.fonts.body,
|
|
99033
|
+
color: theme2.colors.textMuted,
|
|
99034
|
+
marginTop: "8px",
|
|
99035
|
+
paddingTop: "6px",
|
|
99036
|
+
borderTop: `1px solid ${theme2.colors.border}`
|
|
99037
|
+
}, children: ["ID: ", node2.id] })] })] }, node2.id);
|
|
99038
|
+
}) })] });
|
|
99039
|
+
};
|
|
98859
99040
|
const nodeTypes = {
|
|
98860
99041
|
custom: CustomNode
|
|
98861
99042
|
};
|
|
@@ -98870,28 +99051,6 @@ const createEmptyEditState = () => ({
|
|
|
98870
99051
|
createdEdges: [],
|
|
98871
99052
|
deletedEdges: []
|
|
98872
99053
|
});
|
|
98873
|
-
const AlignmentGuidesOverlay = ({ guides, color: color2 }) => {
|
|
98874
|
-
const { x: viewportX, y: viewportY, zoom: zoom2 } = useViewport();
|
|
98875
|
-
if (guides.length === 0)
|
|
98876
|
-
return null;
|
|
98877
|
-
return jsx("svg", { style: {
|
|
98878
|
-
position: "absolute",
|
|
98879
|
-
top: 0,
|
|
98880
|
-
left: 0,
|
|
98881
|
-
width: "100%",
|
|
98882
|
-
height: "100%",
|
|
98883
|
-
pointerEvents: "none",
|
|
98884
|
-
zIndex: 10
|
|
98885
|
-
}, children: guides.map((guide, index2) => {
|
|
98886
|
-
if (guide.type === "vertical") {
|
|
98887
|
-
const screenX = guide.position * zoom2 + viewportX;
|
|
98888
|
-
return jsx("line", { x1: screenX, y1: 0, x2: screenX, y2: "100%", stroke: color2, strokeWidth: 1.5, strokeDasharray: "4,4", opacity: 0.8 }, `${guide.type}-${guide.position}-${index2}`);
|
|
98889
|
-
} else {
|
|
98890
|
-
const screenY = guide.position * zoom2 + viewportY;
|
|
98891
|
-
return jsx("line", { x1: 0, y1: screenY, x2: "100%", y2: screenY, stroke: color2, strokeWidth: 1.5, strokeDasharray: "4,4", opacity: 0.8 }, `${guide.type}-${guide.position}-${index2}`);
|
|
98892
|
-
}
|
|
98893
|
-
}) });
|
|
98894
|
-
};
|
|
98895
99054
|
const CenterIndicator = ({ color: color2 }) => {
|
|
98896
99055
|
const { x: x2, y: y2 } = useViewport();
|
|
98897
99056
|
const size = 20;
|
|
@@ -98908,12 +99067,11 @@ const CenterIndicator = ({ color: color2 }) => {
|
|
|
98908
99067
|
zIndex: 5
|
|
98909
99068
|
}, children: [jsx("line", { x1: screenX, y1: screenY - size, x2: screenX, y2: screenY + size, stroke: color2, strokeWidth, opacity: 0.7 }), jsx("line", { x1: screenX - size, y1: screenY, x2: screenX + size, y2: screenY, stroke: color2, strokeWidth, opacity: 0.7 }), jsx("circle", { cx: screenX, cy: screenY, r: 3, fill: color2, opacity: 0.7 })] });
|
|
98910
99069
|
};
|
|
98911
|
-
const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges, violations = [], configName: _configName, showMinimap = false, showControls = true, showBackground = true, backgroundVariant = "
|
|
99070
|
+
const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges, violations = [], configName: _configName, showMinimap = false, showControls = true, showBackground = true, backgroundVariant = "dots", backgroundGap, showCenterIndicator = false, showTooltips = true, fitViewDuration = 200, highlightedNodeId, activeNodeIds, events = [], onEventProcessed, editable = false, onPendingChangesChange, onEditStateChange, editStateRef, onNodeClick: onNodeClickProp, showNodeDetailPanel, resolveEventRef }) => {
|
|
98912
99071
|
const { fitView: fitView2 } = useReactFlow();
|
|
98913
99072
|
const updateNodeInternals2 = useUpdateNodeInternals();
|
|
98914
99073
|
const { theme: theme2 } = useTheme();
|
|
98915
99074
|
const [shiftKeyPressed, setShiftKeyPressed] = useState(false);
|
|
98916
|
-
const hidingNodeRef = useRef(false);
|
|
98917
99075
|
useEffect(() => {
|
|
98918
99076
|
const handleKeyDown = (e2) => {
|
|
98919
99077
|
if (e2.key === "Shift") {
|
|
@@ -98936,12 +99094,10 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
98936
99094
|
nodeAnimations: {},
|
|
98937
99095
|
edgeAnimations: {}
|
|
98938
99096
|
});
|
|
98939
|
-
const [alignmentGuides, setAlignmentGuides] = useState([]);
|
|
98940
99097
|
const [selectedEdgeIds, setSelectedEdgeIds] = useState(/* @__PURE__ */ new Set());
|
|
98941
99098
|
const [selectedNodeIds, setSelectedNodeIds] = useState(/* @__PURE__ */ new Set());
|
|
98942
99099
|
const [showNodePanel, setShowNodePanel] = useState(false);
|
|
98943
99100
|
const [showEdgePanel, setShowEdgePanel] = useState(false);
|
|
98944
|
-
const [hiddenNodeIds, setHiddenNodeIds] = useState(/* @__PURE__ */ new Set());
|
|
98945
99101
|
const [pendingConnection, setPendingConnection] = useState(null);
|
|
98946
99102
|
useEffect(() => {
|
|
98947
99103
|
if (highlightedNodeId) {
|
|
@@ -98981,45 +99137,6 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
98981
99137
|
onEditStateChange == null ? void 0 : onEditStateChange(newState);
|
|
98982
99138
|
onPendingChangesChange == null ? void 0 : onPendingChangesChange(hasChanges);
|
|
98983
99139
|
}, [editStateRef, onEditStateChange, onPendingChangesChange, checkHasChanges]);
|
|
98984
|
-
const detectAlignmentGuides = useCallback((draggingNodeId, nodes2) => {
|
|
98985
|
-
const threshold = 5;
|
|
98986
|
-
const guides = [];
|
|
98987
|
-
const draggingNode = nodes2.find((n2) => n2.id === draggingNodeId);
|
|
98988
|
-
if (!draggingNode)
|
|
98989
|
-
return guides;
|
|
98990
|
-
const dragLeft = draggingNode.position.x;
|
|
98991
|
-
const dragRight = draggingNode.position.x + (draggingNode.width ?? 0);
|
|
98992
|
-
const dragCenterX = draggingNode.position.x + (draggingNode.width ?? 0) / 2;
|
|
98993
|
-
const dragTop = draggingNode.position.y;
|
|
98994
|
-
const dragBottom = draggingNode.position.y + (draggingNode.height ?? 0);
|
|
98995
|
-
const dragCenterY = draggingNode.position.y + (draggingNode.height ?? 0) / 2;
|
|
98996
|
-
for (const node2 of nodes2) {
|
|
98997
|
-
if (node2.id === draggingNodeId)
|
|
98998
|
-
continue;
|
|
98999
|
-
const nodeLeft = node2.position.x;
|
|
99000
|
-
const nodeRight = node2.position.x + (node2.width ?? 0);
|
|
99001
|
-
const nodeCenterX = node2.position.x + (node2.width ?? 0) / 2;
|
|
99002
|
-
const nodeTop = node2.position.y;
|
|
99003
|
-
const nodeBottom = node2.position.y + (node2.height ?? 0);
|
|
99004
|
-
const nodeCenterY = node2.position.y + (node2.height ?? 0) / 2;
|
|
99005
|
-
if (Math.abs(dragLeft - nodeLeft) < threshold) {
|
|
99006
|
-
guides.push({ type: "vertical", position: nodeLeft, label: "Left" });
|
|
99007
|
-
} else if (Math.abs(dragCenterX - nodeCenterX) < threshold) {
|
|
99008
|
-
guides.push({ type: "vertical", position: nodeCenterX, label: "Center" });
|
|
99009
|
-
} else if (Math.abs(dragRight - nodeRight) < threshold) {
|
|
99010
|
-
guides.push({ type: "vertical", position: nodeRight, label: "Right" });
|
|
99011
|
-
}
|
|
99012
|
-
if (Math.abs(dragTop - nodeTop) < threshold) {
|
|
99013
|
-
guides.push({ type: "horizontal", position: nodeTop, label: "Top" });
|
|
99014
|
-
} else if (Math.abs(dragCenterY - nodeCenterY) < threshold) {
|
|
99015
|
-
guides.push({ type: "horizontal", position: nodeCenterY, label: "Middle" });
|
|
99016
|
-
} else if (Math.abs(dragBottom - nodeBottom) < threshold) {
|
|
99017
|
-
guides.push({ type: "horizontal", position: nodeBottom, label: "Bottom" });
|
|
99018
|
-
}
|
|
99019
|
-
}
|
|
99020
|
-
const uniqueGuides = guides.filter((guide, index2, self2) => index2 === self2.findIndex((g2) => g2.type === guide.type && g2.position === guide.position));
|
|
99021
|
-
return uniqueGuides;
|
|
99022
|
-
}, []);
|
|
99023
99140
|
const onEdgeClick = useCallback((event, edge) => {
|
|
99024
99141
|
if (event.shiftKey && editable) {
|
|
99025
99142
|
setSelectedEdgeIds((prev) => {
|
|
@@ -99046,27 +99163,14 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99046
99163
|
}
|
|
99047
99164
|
}, [editable, selectedEdgeIds]);
|
|
99048
99165
|
const onNodeClick = useCallback((event, node2) => {
|
|
99049
|
-
|
|
99050
|
-
|
|
99051
|
-
event
|
|
99052
|
-
|
|
99053
|
-
|
|
99054
|
-
|
|
99055
|
-
if (next2.has(node2.id)) {
|
|
99056
|
-
next2.delete(node2.id);
|
|
99057
|
-
} else {
|
|
99058
|
-
next2.add(node2.id);
|
|
99059
|
-
}
|
|
99060
|
-
return next2;
|
|
99061
|
-
});
|
|
99062
|
-
setTimeout(() => {
|
|
99063
|
-
hidingNodeRef.current = false;
|
|
99064
|
-
}, 0);
|
|
99065
|
-
return;
|
|
99166
|
+
const shouldShowPanel = showNodeDetailPanel !== false && (showNodeDetailPanel === true || !onNodeClickProp);
|
|
99167
|
+
if (onNodeClickProp) {
|
|
99168
|
+
onNodeClickProp(node2.id, event);
|
|
99169
|
+
if (showNodeDetailPanel !== true) {
|
|
99170
|
+
return;
|
|
99171
|
+
}
|
|
99066
99172
|
}
|
|
99067
|
-
if (event.shiftKey) {
|
|
99068
|
-
event.preventDefault();
|
|
99069
|
-
event.stopPropagation();
|
|
99173
|
+
if (event.shiftKey && editable) {
|
|
99070
99174
|
setSelectedNodeIds((prev) => {
|
|
99071
99175
|
const next2 = new Set(prev);
|
|
99072
99176
|
if (next2.has(node2.id)) {
|
|
@@ -99074,48 +99178,26 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99074
99178
|
} else {
|
|
99075
99179
|
next2.add(node2.id);
|
|
99076
99180
|
}
|
|
99077
|
-
if (editable) {
|
|
99078
|
-
setXyflowLocalNodes((nodes2) => nodes2.map((n2) => ({
|
|
99079
|
-
...n2,
|
|
99080
|
-
selected: n2.id === node2.id ? !prev.has(node2.id) : next2.has(n2.id)
|
|
99081
|
-
})));
|
|
99082
|
-
}
|
|
99083
99181
|
return next2;
|
|
99084
99182
|
});
|
|
99085
|
-
return;
|
|
99086
|
-
}
|
|
99087
|
-
const shouldShowPanel = showNodeDetailPanel !== false && (showNodeDetailPanel === true || !onNodeClickProp);
|
|
99088
|
-
if (onNodeClickProp) {
|
|
99089
|
-
onNodeClickProp(node2.id, event);
|
|
99090
|
-
if (showNodeDetailPanel !== true) {
|
|
99091
|
-
return;
|
|
99092
|
-
}
|
|
99093
|
-
}
|
|
99094
|
-
const shouldDeselect = selectedNodeIds.size === 1 && selectedNodeIds.has(node2.id);
|
|
99095
|
-
if (shouldDeselect) {
|
|
99096
|
-
setSelectedNodeIds(/* @__PURE__ */ new Set());
|
|
99097
|
-
setShowNodePanel(false);
|
|
99098
|
-
if (editable) {
|
|
99099
|
-
setXyflowLocalNodes((nodes2) => nodes2.map((n2) => ({
|
|
99100
|
-
...n2,
|
|
99101
|
-
selected: false
|
|
99102
|
-
})));
|
|
99103
|
-
}
|
|
99104
|
-
} else {
|
|
99105
|
-
setSelectedNodeIds(/* @__PURE__ */ new Set([node2.id]));
|
|
99106
99183
|
if (shouldShowPanel) {
|
|
99107
99184
|
setShowNodePanel(true);
|
|
99108
99185
|
}
|
|
99109
|
-
|
|
99110
|
-
|
|
99111
|
-
|
|
99112
|
-
|
|
99113
|
-
|
|
99186
|
+
} else {
|
|
99187
|
+
const shouldDeselect = selectedNodeIds.size === 1 && selectedNodeIds.has(node2.id);
|
|
99188
|
+
if (shouldDeselect) {
|
|
99189
|
+
setSelectedNodeIds(/* @__PURE__ */ new Set());
|
|
99190
|
+
setShowNodePanel(false);
|
|
99191
|
+
} else {
|
|
99192
|
+
setSelectedNodeIds(/* @__PURE__ */ new Set([node2.id]));
|
|
99193
|
+
if (shouldShowPanel) {
|
|
99194
|
+
setShowNodePanel(true);
|
|
99195
|
+
}
|
|
99114
99196
|
}
|
|
99197
|
+
setSelectedEdgeIds(/* @__PURE__ */ new Set());
|
|
99198
|
+
setShowEdgePanel(false);
|
|
99115
99199
|
}
|
|
99116
|
-
|
|
99117
|
-
setShowEdgePanel(false);
|
|
99118
|
-
}, [selectedNodeIds, onNodeClickProp, showNodeDetailPanel, editable]);
|
|
99200
|
+
}, [editable, selectedNodeIds, onNodeClickProp, showNodeDetailPanel]);
|
|
99119
99201
|
const onCloseEdgeInfoPanel = useCallback(() => {
|
|
99120
99202
|
setSelectedEdgeIds(/* @__PURE__ */ new Set());
|
|
99121
99203
|
setShowEdgePanel(false);
|
|
@@ -99141,9 +99223,6 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99141
99223
|
setShowEdgePanel(false);
|
|
99142
99224
|
}, []);
|
|
99143
99225
|
const handleSelectionChange = useCallback(({ nodes: selectedNodes, edges: selectedEdges }) => {
|
|
99144
|
-
if (hidingNodeRef.current) {
|
|
99145
|
-
return;
|
|
99146
|
-
}
|
|
99147
99226
|
setSelectedNodeIds(new Set(selectedNodes.map((n2) => n2.id)));
|
|
99148
99227
|
setSelectedEdgeIds(new Set(selectedEdges.map((e2) => e2.id)));
|
|
99149
99228
|
if (editable) {
|
|
@@ -99522,7 +99601,6 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99522
99601
|
shiftKeyPressed,
|
|
99523
99602
|
isHighlighted: highlightedNodeId === node2.id,
|
|
99524
99603
|
isActive: !activeNodeIds || activeNodeIds.length === 0 || activeNodeIds.includes(node2.id),
|
|
99525
|
-
isHidden: hiddenNodeIds.has(node2.id),
|
|
99526
99604
|
...animation ? {
|
|
99527
99605
|
animationType: animation.type,
|
|
99528
99606
|
animationDuration: animation.duration
|
|
@@ -99530,7 +99608,7 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99530
99608
|
}
|
|
99531
99609
|
};
|
|
99532
99610
|
});
|
|
99533
|
-
}, [localNodes, configuration, violations, animationState.nodeAnimations, editable, showTooltips, highlightedNodeId, activeNodeIds, editStateRef, shiftKeyPressed, selectedNodeIds
|
|
99611
|
+
}, [localNodes, configuration, violations, animationState.nodeAnimations, editable, showTooltips, highlightedNodeId, activeNodeIds, editStateRef, shiftKeyPressed, selectedNodeIds]);
|
|
99534
99612
|
const baseNodesKey = useMemo(() => {
|
|
99535
99613
|
return nodes.map((n2) => n2.id).sort().join(",");
|
|
99536
99614
|
}, [nodes]);
|
|
@@ -99558,15 +99636,6 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99558
99636
|
prevEditableRef.current = editable;
|
|
99559
99637
|
}, [editable, xyflowNodesBase, updateNodeInternals2]);
|
|
99560
99638
|
const xyflowNodes = editable ? xyflowLocalNodes : xyflowNodesBase;
|
|
99561
|
-
const handleNodeDrag = useCallback((_event, node2) => {
|
|
99562
|
-
if (!editable)
|
|
99563
|
-
return;
|
|
99564
|
-
const guides = detectAlignmentGuides(node2.id, xyflowNodes);
|
|
99565
|
-
setAlignmentGuides(guides);
|
|
99566
|
-
}, [editable, xyflowNodes, detectAlignmentGuides]);
|
|
99567
|
-
const handleNodeDragStop = useCallback(() => {
|
|
99568
|
-
setAlignmentGuides([]);
|
|
99569
|
-
}, []);
|
|
99570
99639
|
const handleNodesChange = useCallback((changes) => {
|
|
99571
99640
|
if (!editable)
|
|
99572
99641
|
return;
|
|
@@ -99606,19 +99675,11 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99606
99675
|
}, [editable, updateEditState]);
|
|
99607
99676
|
const xyflowEdgesBase = useMemo(() => {
|
|
99608
99677
|
const converted = convertToXYFlowEdges(edges, configuration, violations);
|
|
99609
|
-
const filtered = converted.filter((edge) => {
|
|
99610
|
-
const
|
|
99611
|
-
const
|
|
99612
|
-
|
|
99613
|
-
|
|
99614
|
-
}
|
|
99615
|
-
if (activeNodeIds && activeNodeIds.length > 0) {
|
|
99616
|
-
const sourceActive = activeNodeIds.includes(edge.source);
|
|
99617
|
-
const targetActive = activeNodeIds.includes(edge.target);
|
|
99618
|
-
return sourceActive && targetActive;
|
|
99619
|
-
}
|
|
99620
|
-
return true;
|
|
99621
|
-
});
|
|
99678
|
+
const filtered = activeNodeIds && activeNodeIds.length > 0 ? converted.filter((edge) => {
|
|
99679
|
+
const sourceActive = activeNodeIds.includes(edge.source);
|
|
99680
|
+
const targetActive = activeNodeIds.includes(edge.target);
|
|
99681
|
+
return sourceActive && targetActive;
|
|
99682
|
+
}) : converted;
|
|
99622
99683
|
const mappedEdges = filtered.map((edge) => {
|
|
99623
99684
|
const animation = animationState.edgeAnimations[edge.id];
|
|
99624
99685
|
const isSelected = selectedEdgeIds.has(edge.id);
|
|
@@ -99647,7 +99708,7 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99647
99708
|
return -1;
|
|
99648
99709
|
return 0;
|
|
99649
99710
|
});
|
|
99650
|
-
}, [edges, configuration, violations, animationState.edgeAnimations, showTooltips, selectedEdgeIds, shiftKeyPressed, activeNodeIds
|
|
99711
|
+
}, [edges, configuration, violations, animationState.edgeAnimations, showTooltips, selectedEdgeIds, shiftKeyPressed, activeNodeIds]);
|
|
99651
99712
|
const [xyflowLocalEdges, setXyflowLocalEdges] = useState(xyflowEdgesBase);
|
|
99652
99713
|
const prevBaseEdgesKeyRef2 = useRef(baseEdgesKey);
|
|
99653
99714
|
useEffect(() => {
|
|
@@ -99674,11 +99735,11 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
99674
99735
|
}, 100);
|
|
99675
99736
|
return () => clearTimeout(timeoutId);
|
|
99676
99737
|
}, [baseNodesKey, baseEdgesKey, fitView2, fitViewDuration]);
|
|
99677
|
-
return jsxs(Fragment, { children: [jsxs(index$3, { nodes: xyflowNodes, edges: xyflowEdges, nodeTypes, edgeTypes, minZoom: 0.1, maxZoom: 4, defaultEdgeOptions: { type: "custom" }, onEdgeClick, onNodeClick,
|
|
99738
|
+
return jsxs(Fragment, { children: [jsxs(index$3, { nodes: xyflowNodes, edges: xyflowEdges, nodeTypes, edgeTypes, minZoom: 0.1, maxZoom: 4, defaultEdgeOptions: { type: "custom" }, onEdgeClick, onNodeClick, proOptions: { hideAttribution: true }, nodesDraggable: editable, elementsSelectable: true, nodesConnectable: editable, edgesReconnectable: editable, reconnectRadius: 25, elevateEdgesOnSelect: true, onNodesChange: handleNodesChange, onEdgesChange: handleEdgesChange, onConnect: handleConnect, onReconnectStart: handleReconnectStart, onReconnect: handleReconnect, onReconnectEnd: handleReconnectEnd, onPaneClick, onSelectionChange: handleSelectionChange, panOnDrag: true, selectionOnDrag: false, selectionKeyCode: editable ? "Shift" : null, multiSelectionKeyCode: "Shift", children: [showBackground && jsx(Background, { color: backgroundVariant === "dots" ? theme2.colors.border : theme2.colors.textMuted, gap: backgroundGap ?? (backgroundVariant === "dots" ? 16 : 50), size: backgroundVariant === "dots" ? 1 : 0.5, variant: backgroundVariant === "dots" ? BackgroundVariant.Dots : backgroundVariant === "lines" ? BackgroundVariant.Lines : BackgroundVariant.Cross }), showControls && jsx(Controls, { showZoom: true, showFitView: true, showInteractive: true }), showMinimap && jsx(MiniMap, { nodeColor: (node2) => {
|
|
99678
99739
|
var _a;
|
|
99679
99740
|
const nodeData = node2.data;
|
|
99680
99741
|
return ((_a = nodeData == null ? void 0 : nodeData.typeDefinition) == null ? void 0 : _a.color) || theme2.colors.secondary;
|
|
99681
|
-
}, nodeBorderRadius: 2, pannable: true, zoomable: true }), showCenterIndicator && jsx(CenterIndicator, { color: theme2.colors.textMuted }),
|
|
99742
|
+
}, nodeBorderRadius: 2, pannable: true, zoomable: true }), showCenterIndicator && jsx(CenterIndicator, { color: theme2.colors.textMuted })] }, `${baseNodesKey}-${baseEdgesKey}`), selectedNodeIds.size >= 2 && showNodePanel && showNodeDetailPanel !== false && jsx(SelectionSidebar, { selectedNodeIds, nodes, nodeTypeDefinitions: configuration.nodeTypes, onClose: onCloseNodeInfoPanel }), selectedEdgeIds.size === 1 && selectedEdge && selectedEdgeTypeDefinition && showEdgePanel && jsx(EdgeInfoPanel, { edge: selectedEdge, typeDefinition: selectedEdgeTypeDefinition, sourceNodeId: selectedEdge.from, targetNodeId: selectedEdge.to, onClose: onCloseEdgeInfoPanel, onDelete: editable ? handleEdgeDelete : void 0, onUpdateSides: editable ? handleUpdateEdgeSides : void 0 }), selectedNodeIds.size === 1 && selectedNode && selectedNodeTypeDefinition && showNodePanel && showNodeDetailPanel !== false && jsx(NodeInfoPanel, { node: selectedNode, typeDefinition: selectedNodeTypeDefinition, availableNodeTypes: configuration.nodeTypes, onClose: onCloseNodeInfoPanel, onDelete: editable ? handleNodeDelete : void 0, onUpdate: editable ? handleNodeUpdate : void 0, resolveEventRef }), pendingConnection && jsxs("div", { style: {
|
|
99682
99743
|
position: "absolute",
|
|
99683
99744
|
top: "50%",
|
|
99684
99745
|
left: "50%",
|
|
@@ -104205,7 +104266,7 @@ const browserExt = {
|
|
|
104205
104266
|
},
|
|
104206
104267
|
test: () => true,
|
|
104207
104268
|
load: async () => {
|
|
104208
|
-
await import("./browserAll-
|
|
104269
|
+
await import("./browserAll-BhoSaVBq.js");
|
|
104209
104270
|
}
|
|
104210
104271
|
};
|
|
104211
104272
|
const webworkerExt = {
|
|
@@ -104216,7 +104277,7 @@ const webworkerExt = {
|
|
|
104216
104277
|
},
|
|
104217
104278
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
104218
104279
|
load: async () => {
|
|
104219
|
-
await import("./webworkerAll-
|
|
104280
|
+
await import("./webworkerAll-NDSOaiUq.js");
|
|
104220
104281
|
}
|
|
104221
104282
|
};
|
|
104222
104283
|
class ObservablePoint {
|
|
@@ -116459,19 +116520,19 @@ async function autoDetectRenderer(options) {
|
|
|
116459
116520
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
116460
116521
|
const rendererType = preferredOrder[i2];
|
|
116461
116522
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
116462
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
116523
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-Dc4lZALf.js");
|
|
116463
116524
|
RendererClass = WebGPURenderer;
|
|
116464
116525
|
finalOptions = { ...options, ...options.webgpu };
|
|
116465
116526
|
break;
|
|
116466
116527
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
116467
116528
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
116468
116529
|
)) {
|
|
116469
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
116530
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-Du5sLRYZ.js");
|
|
116470
116531
|
RendererClass = WebGLRenderer;
|
|
116471
116532
|
finalOptions = { ...options, ...options.webgl };
|
|
116472
116533
|
break;
|
|
116473
116534
|
} else if (rendererType === "canvas") {
|
|
116474
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
116535
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-Dj5DlQFk.js");
|
|
116475
116536
|
RendererClass = CanvasRenderer;
|
|
116476
116537
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
116477
116538
|
break;
|
|
@@ -130859,8 +130920,6 @@ class IsometricInteractionManager {
|
|
|
130859
130920
|
event.stopPropagation();
|
|
130860
130921
|
const worldPos = this.viewport ? this.viewport.toWorld(event.global.x, event.global.y) : this.worldContainer.toLocal(event.global);
|
|
130861
130922
|
const worldStartPos = this.viewport ? this.viewport.toWorld(this.dragState.dragStartPos.x, this.dragState.dragStartPos.y) : this.worldContainer.toLocal(this.dragState.dragStartPos);
|
|
130862
|
-
this.worldContainer.x || 0;
|
|
130863
|
-
this.worldContainer.y || 0;
|
|
130864
130923
|
const deltaX = worldPos.x - worldStartPos.x;
|
|
130865
130924
|
const deltaY = worldPos.y - worldStartPos.y;
|
|
130866
130925
|
const tileWidth = this.config.tileWidth ?? 64;
|
|
@@ -131594,7 +131653,7 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
131594
131653
|
const size = node2.size ?? getNodeSize(nodeType);
|
|
131595
131654
|
return { ...node2, size };
|
|
131596
131655
|
});
|
|
131597
|
-
const
|
|
131656
|
+
const layoutNodes = nodeWithSizes.map((node2) => {
|
|
131598
131657
|
var _a2;
|
|
131599
131658
|
return {
|
|
131600
131659
|
id: node2.id,
|
|
@@ -131626,7 +131685,7 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
131626
131685
|
});
|
|
131627
131686
|
const nodesByRegion = /* @__PURE__ */ new Map();
|
|
131628
131687
|
const unassignedNodes = [];
|
|
131629
|
-
for (const layoutNode of
|
|
131688
|
+
for (const layoutNode of layoutNodes) {
|
|
131630
131689
|
const genericNode = nodeWithSizes.find((n2) => n2.id === layoutNode.id);
|
|
131631
131690
|
const assignedRegionId = genericNode == null ? void 0 : genericNode.regionId;
|
|
131632
131691
|
if (assignedRegionId && layoutRegions.some((r2) => r2.regionId === assignedRegionId)) {
|
|
@@ -131747,7 +131806,7 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
131747
131806
|
}
|
|
131748
131807
|
}
|
|
131749
131808
|
} else {
|
|
131750
|
-
const autoLayoutRegions = layoutSpritesMultiRegion(
|
|
131809
|
+
const autoLayoutRegions = layoutSpritesMultiRegion(layoutNodes, REGION_SIZE_TILES, { spacing: 0.5 });
|
|
131751
131810
|
layoutRegions = autoLayoutRegions.map((region, index2) => ({
|
|
131752
131811
|
regionId: region.regionId,
|
|
131753
131812
|
name: region.name || `Region ${index2 + 1}`,
|
|
@@ -131898,7 +131957,6 @@ function nodesToOverworldMapCollection(nodes, options = {}) {
|
|
|
131898
131957
|
const OverworldMapPanelContent = ({
|
|
131899
131958
|
nodes,
|
|
131900
131959
|
includeDevDependencies = true,
|
|
131901
|
-
includePeerDependencies = false,
|
|
131902
131960
|
regionLayout,
|
|
131903
131961
|
width,
|
|
131904
131962
|
height,
|
|
@@ -131916,7 +131974,6 @@ const OverworldMapPanelContent = ({
|
|
|
131916
131974
|
const appRef = useRef(null);
|
|
131917
131975
|
const viewportRef = useRef(null);
|
|
131918
131976
|
const worldContainerRef = useRef(null);
|
|
131919
|
-
useRef(1);
|
|
131920
131977
|
const interactionRef = useRef(null);
|
|
131921
131978
|
const pathManagerRef = useRef(null);
|
|
131922
131979
|
const rendererRef = useRef(null);
|
|
@@ -132092,7 +132149,7 @@ const OverworldMapPanelContent = ({
|
|
|
132092
132149
|
}
|
|
132093
132150
|
},
|
|
132094
132151
|
{
|
|
132095
|
-
onDragStart: (
|
|
132152
|
+
onDragStart: (_nodeId) => {
|
|
132096
132153
|
},
|
|
132097
132154
|
onDragMove: (nodeId, gridX, gridY) => {
|
|
132098
132155
|
pathManager.updateNodePosition(nodeId, gridX, gridY);
|
|
@@ -132680,10 +132737,7 @@ const CollectionMapPanelContent = ({
|
|
|
132680
132737
|
repositories,
|
|
132681
132738
|
dependencies = {},
|
|
132682
132739
|
regionLayout,
|
|
132683
|
-
width,
|
|
132684
|
-
height,
|
|
132685
132740
|
isLoading = false,
|
|
132686
|
-
onProjectMoved,
|
|
132687
132741
|
onProjectAdded,
|
|
132688
132742
|
regionCallbacks
|
|
132689
132743
|
}) => {
|
|
@@ -132811,6 +132865,12 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
132811
132865
|
{
|
|
132812
132866
|
dataType: "repository-project",
|
|
132813
132867
|
onDrop: handleProjectDrop
|
|
132868
|
+
},
|
|
132869
|
+
{
|
|
132870
|
+
dataType: "application/x-unplaced-node",
|
|
132871
|
+
onDrop: async (data, event) => {
|
|
132872
|
+
await handleDrawerDrop(event);
|
|
132873
|
+
}
|
|
132814
132874
|
}
|
|
132815
132875
|
],
|
|
132816
132876
|
showVisualFeedback: true
|
|
@@ -133014,12 +133074,6 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
133014
133074
|
transition: "border-color 0.2s ease"
|
|
133015
133075
|
},
|
|
133016
133076
|
...dropZoneProps,
|
|
133017
|
-
onDragOver: (e2) => {
|
|
133018
|
-
if (e2.dataTransfer.types.includes("application/x-unplaced-node")) {
|
|
133019
|
-
e2.preventDefault();
|
|
133020
|
-
}
|
|
133021
|
-
},
|
|
133022
|
-
onDrop: handleDrawerDrop,
|
|
133023
133077
|
children: [
|
|
133024
133078
|
/* @__PURE__ */ jsx(
|
|
133025
133079
|
"button",
|
|
@@ -133173,13 +133227,12 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
133173
133227
|
);
|
|
133174
133228
|
};
|
|
133175
133229
|
const CollectionMapPanel = ({ context: context2, actions }) => {
|
|
133176
|
-
var _a, _b, _c, _d;
|
|
133177
133230
|
const { selectedCollectionView } = context2;
|
|
133178
|
-
const selectedCollection =
|
|
133179
|
-
const memberships =
|
|
133180
|
-
const repositories =
|
|
133181
|
-
const dependencies =
|
|
133182
|
-
const isLoading =
|
|
133231
|
+
const selectedCollection = selectedCollectionView.data.collection;
|
|
133232
|
+
const memberships = selectedCollectionView.data.memberships;
|
|
133233
|
+
const repositories = selectedCollectionView.data.repositories;
|
|
133234
|
+
const dependencies = selectedCollectionView.data.dependencies || {};
|
|
133235
|
+
const isLoading = selectedCollectionView.loading;
|
|
133183
133236
|
const handleProjectAdded = useCallback((repositoryPath, repositoryMetadata) => {
|
|
133184
133237
|
console.log("[handleProjectAdded] Called with:", { repositoryPath, repositoryMetadata, selectedCollection: selectedCollection == null ? void 0 : selectedCollection.id });
|
|
133185
133238
|
if (!selectedCollection) {
|
|
@@ -134268,4 +134321,4 @@ export {
|
|
|
134268
134321
|
UPDATE_PRIORITY as y,
|
|
134269
134322
|
removeItems as z
|
|
134270
134323
|
};
|
|
134271
|
-
//# sourceMappingURL=index-
|
|
134324
|
+
//# sourceMappingURL=index-C70rwAR9.js.map
|