likec4 1.38.1 → 1.39.1
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/__app__/src/main.js +634 -501
- package/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +639 -848
- package/dist/config/index.d.mts +52 -0
- package/dist/config/index.mjs +1 -0
- package/dist/index.d.mts +6 -3
- package/dist/index.mjs +2 -2
- package/dist/shared/likec4.BYm60UP0.mjs +257 -0
- package/dist/shared/likec4.C8DLF79h.d.mts +1660 -0
- package/dist/shared/{likec4.CunVXntg.mjs → likec4.CzlvWep1.mjs} +2791 -2825
- package/dist/shared/likec4.DfOb2tZw.mjs +143 -0
- package/dist/shared/{likec4.B2TmMA5i.d.mts → likec4.yf56CCfj.d.mts} +655 -2308
- package/dist/vite-plugin/index.d.mts +9 -2
- package/dist/vite-plugin/index.mjs +2 -2
- package/icons/all.d.ts +25 -0
- package/icons/all.js +50 -0
- package/icons/azure/ai-at-edge.js +1 -0
- package/icons/azure/azure-consumption-commitment.js +1 -0
- package/icons/azure/azure-managed-redis.js +1 -0
- package/icons/azure/breeze.js +1 -0
- package/icons/azure/data-virtualization.js +1 -0
- package/icons/azure/edge-actions.js +1 -0
- package/icons/azure/edge-storage-accelerator.js +1 -0
- package/icons/azure/engage-center-connect.js +1 -0
- package/icons/azure/external-id-modified.js +1 -0
- package/icons/azure/external-id.js +1 -0
- package/icons/azure/frd-qa.js +1 -0
- package/icons/azure/hybrid-connectivity-hub.js +1 -0
- package/icons/azure/landing-zone.js +1 -0
- package/icons/azure/load-balancer-hub.js +1 -1
- package/icons/azure/logic-apps-template.js +1 -0
- package/icons/azure/network-foundation-hub.js +1 -0
- package/icons/azure/network-security-hub.js +1 -0
- package/icons/azure/planetary-computer-pro.js +1 -0
- package/icons/azure/promethus.js +1 -0
- package/icons/azure/service-group-relationships.js +1 -0
- package/icons/azure/service-groups.js +1 -0
- package/icons/azure/sql-database-fleet-manager.js +1 -0
- package/icons/azure/storage-hubs.js +1 -0
- package/icons/azure/toolchain-orchestrator.js +1 -0
- package/icons/azure/vpnclient-windows.js +1 -0
- package/icons/azure/workload-orchestration.js +1 -0
- package/package.json +38 -27
- package/react/index.d.mts +237 -222
- package/react/index.mjs +51 -51
- package/dist/shared/likec4.DkfFVqY-.mjs +0 -257
package/__app__/src/main.js
CHANGED
|
@@ -6,8 +6,9 @@ import { projects } from "likec4:projects";
|
|
|
6
6
|
import * as ReactDOM from "react-dom";
|
|
7
7
|
import ReactDOM__default, { flushSync, createPortal } from "react-dom";
|
|
8
8
|
import { pageTitle, ComponentName, useHashHistory, withOverviewGraph, krokiPumlSvgUrl, isDevelopment, krokiD2SvgUrl, basepath } from "./const.js";
|
|
9
|
-
import { isTagColorSpecified, invariant as invariant$
|
|
10
|
-
import {
|
|
9
|
+
import { isTagColorSpecified, nonexhaustive, invariant as invariant$3, isStepEdgeId, extractStep, nonNullable, defaultTheme, ElementShapes, RichText, ancestorsFqn, nameFromFqn, isAncestor as isAncestor$1, ThemeColors, Queue, whereOperatorAsPredicate, GroupElementKind, BBox, getParallelStepsPrefix } from "@likec4/core";
|
|
10
|
+
import { invariant as invariant$2, toArray, ifirst, ifilter, compareNaturalHierarchically, nonexhaustive as nonexhaustive$1, compareNatural, ifind, nonNullable as nonNullable$1, DefaultMap, isAncestor, sortParentsFirst, nameFromFqn as nameFromFqn$1, delay as delay$1, isDescendantOf } from "@likec4/core/utils";
|
|
11
|
+
import { DefaultShapeSize, DefaultTextSize, DefaultPaddingSize, RichText as RichText$1 } from "@likec4/core/types";
|
|
11
12
|
import { computeRelationshipsView, treeFromElements as treeFromElements$1 } from "@likec4/core/compute-view/relationships";
|
|
12
13
|
import { normalizeViewPath, VIEW_FOLDERS_SEPARATOR, modelConnection } from "@likec4/core/model";
|
|
13
14
|
var __assign = function() {
|
|
@@ -1329,10 +1330,10 @@ function useHotkeys(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], tri
|
|
|
1329
1330
|
}, [hotkeys]);
|
|
1330
1331
|
}
|
|
1331
1332
|
function useHover$1() {
|
|
1332
|
-
const [hovered,
|
|
1333
|
-
|
|
1333
|
+
const [hovered, setHovered] = useState(!1), previousNode = useRef(null), handleMouseEnter = useCallback(() => {
|
|
1334
|
+
setHovered(!0);
|
|
1334
1335
|
}, []), handleMouseLeave = useCallback(() => {
|
|
1335
|
-
|
|
1336
|
+
setHovered(!1);
|
|
1336
1337
|
}, []);
|
|
1337
1338
|
return { ref: useCallback(
|
|
1338
1339
|
(node2) => {
|
|
@@ -1402,6 +1403,14 @@ function usePrevious$1(value) {
|
|
|
1402
1403
|
ref.current = value;
|
|
1403
1404
|
}, [value]), ref.current;
|
|
1404
1405
|
}
|
|
1406
|
+
function useInViewport() {
|
|
1407
|
+
const observer = useRef(null), [inViewport, setInViewport] = useState(!1);
|
|
1408
|
+
return { ref: useCallback((node2) => {
|
|
1409
|
+
typeof IntersectionObserver < "u" && (node2 && !observer.current ? observer.current = new IntersectionObserver(
|
|
1410
|
+
(entries) => setInViewport(entries.some((entry) => entry.isIntersecting))
|
|
1411
|
+
) : observer.current?.disconnect(), node2 ? observer.current?.observe(node2) : setInViewport(!1));
|
|
1412
|
+
}, []), inViewport };
|
|
1413
|
+
}
|
|
1405
1414
|
function useMutationObserver(callback, options, target) {
|
|
1406
1415
|
const observer = useRef(null), ref = useRef(null);
|
|
1407
1416
|
return useEffect(() => {
|
|
@@ -4473,12 +4482,8 @@ function getWindowScrollBarX(element, rect) {
|
|
|
4473
4482
|
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
4474
4483
|
return rect ? rect.left + leftScroll : getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
4475
4484
|
}
|
|
4476
|
-
function getHTMLOffset(documentElement, scroll
|
|
4477
|
-
|
|
4478
|
-
const htmlRect = documentElement.getBoundingClientRect(), x2 = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
|
|
4479
|
-
// RTL <body> scrollbar.
|
|
4480
|
-
getWindowScrollBarX(documentElement, htmlRect)
|
|
4481
|
-
)), y2 = htmlRect.top + scroll.scrollTop;
|
|
4485
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
4486
|
+
const htmlRect = documentElement.getBoundingClientRect(), x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect), y2 = htmlRect.top + scroll.scrollTop;
|
|
4482
4487
|
return {
|
|
4483
4488
|
x: x2,
|
|
4484
4489
|
y: y2
|
|
@@ -4503,7 +4508,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
4503
4508
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
4504
4509
|
scale2 = getScale(offsetParent), offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
4505
4510
|
}
|
|
4506
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll
|
|
4511
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
4507
4512
|
return {
|
|
4508
4513
|
width: rect.width * scale2.x,
|
|
4509
4514
|
height: rect.height * scale2.y,
|
|
@@ -4525,6 +4530,7 @@ function getDocumentRect(element) {
|
|
|
4525
4530
|
y: y2
|
|
4526
4531
|
};
|
|
4527
4532
|
}
|
|
4533
|
+
const SCROLLBAR_MAX = 25;
|
|
4528
4534
|
function getViewportRect(element, strategy) {
|
|
4529
4535
|
const win2 = getWindow(element), html = getDocumentElement(element), visualViewport = win2.visualViewport;
|
|
4530
4536
|
let width = html.clientWidth, height = html.clientHeight, x2 = 0, y2 = 0;
|
|
@@ -4533,6 +4539,11 @@ function getViewportRect(element, strategy) {
|
|
|
4533
4539
|
const visualViewportBased = isWebKit();
|
|
4534
4540
|
(!visualViewportBased || visualViewportBased && strategy === "fixed") && (x2 = visualViewport.offsetLeft, y2 = visualViewport.offsetTop);
|
|
4535
4541
|
}
|
|
4542
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
4543
|
+
if (windowScrollbarX <= 0) {
|
|
4544
|
+
const doc = html.ownerDocument, body2 = doc.body, bodyStyles = getComputedStyle(body2), bodyMarginInline = doc.compatMode === "CSS1Compat" && parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0, clippingStableScrollbarWidth = Math.abs(html.clientWidth - body2.clientWidth - bodyMarginInline);
|
|
4545
|
+
clippingStableScrollbarWidth <= SCROLLBAR_MAX && (width -= clippingStableScrollbarWidth);
|
|
4546
|
+
} else windowScrollbarX <= SCROLLBAR_MAX && (width += windowScrollbarX);
|
|
4536
4547
|
return {
|
|
4537
4548
|
width,
|
|
4538
4549
|
height,
|
|
@@ -4850,7 +4861,7 @@ function useFloating$1(options) {
|
|
|
4850
4861
|
transform: transform2 = !0,
|
|
4851
4862
|
whileElementsMounted,
|
|
4852
4863
|
open
|
|
4853
|
-
} = options, [data,
|
|
4864
|
+
} = options, [data, setData] = React.useState({
|
|
4854
4865
|
x: 0,
|
|
4855
4866
|
y: 0,
|
|
4856
4867
|
strategy,
|
|
@@ -4881,12 +4892,12 @@ function useFloating$1(options) {
|
|
|
4881
4892
|
isPositioned: openRef.current !== !1
|
|
4882
4893
|
};
|
|
4883
4894
|
isMountedRef.current && !deepEqual$2(dataRef.current, fullData) && (dataRef.current = fullData, ReactDOM.flushSync(() => {
|
|
4884
|
-
|
|
4895
|
+
setData(fullData);
|
|
4885
4896
|
}));
|
|
4886
4897
|
});
|
|
4887
4898
|
}, [latestMiddleware, placement, strategy, platformRef, openRef]);
|
|
4888
4899
|
index$2(() => {
|
|
4889
|
-
open === !1 && dataRef.current.isPositioned && (dataRef.current.isPositioned = !1,
|
|
4900
|
+
open === !1 && dataRef.current.isPositioned && (dataRef.current.isPositioned = !1, setData((data2) => ({
|
|
4890
4901
|
...data2,
|
|
4891
4902
|
isPositioned: !1
|
|
4892
4903
|
})));
|
|
@@ -6184,10 +6195,10 @@ ScrollAreaScrollbar.displayName = "@mantine/core/ScrollAreaScrollbar";
|
|
|
6184
6195
|
function addUnlinkedScrollListener(node2, handler = () => {
|
|
6185
6196
|
}) {
|
|
6186
6197
|
let prevPosition = { left: node2.scrollLeft, top: node2.scrollTop }, rAF = 0;
|
|
6187
|
-
return function loop() {
|
|
6198
|
+
return (function loop() {
|
|
6188
6199
|
const position = { left: node2.scrollLeft, top: node2.scrollTop }, isHorizontalScroll = prevPosition.left !== position.left, isVerticalScroll = prevPosition.top !== position.top;
|
|
6189
6200
|
(isHorizontalScroll || isVerticalScroll) && handler(), prevPosition = position, rAF = window.requestAnimationFrame(loop);
|
|
6190
|
-
}(), () => window.cancelAnimationFrame(rAF);
|
|
6201
|
+
})(), () => window.cancelAnimationFrame(rAF);
|
|
6191
6202
|
}
|
|
6192
6203
|
const Thumb$1 = forwardRef((props2, forwardedRef) => {
|
|
6193
6204
|
const { style: style2, ...others } = props2, scrollAreaContext = useScrollAreaContext(), scrollbarContext = useScrollbarContext(), { onThumbPositionChange } = scrollbarContext, composedRef = useMergedRef(forwardedRef, (node2) => scrollbarContext.onThumbChange(node2)), removeUnlinkedScrollListenerRef = useRef(void 0), debounceScrollEnd = useDebouncedCallback$1(() => {
|
|
@@ -11120,12 +11131,12 @@ function getDefaultExportFromCjs(x2) {
|
|
|
11120
11131
|
}
|
|
11121
11132
|
var useIsomorphicLayoutEffect_cjs = {}, hasRequiredUseIsomorphicLayoutEffect_cjs;
|
|
11122
11133
|
function requireUseIsomorphicLayoutEffect_cjs() {
|
|
11123
|
-
return hasRequiredUseIsomorphicLayoutEffect_cjs || (hasRequiredUseIsomorphicLayoutEffect_cjs = 1, function(exports) {
|
|
11134
|
+
return hasRequiredUseIsomorphicLayoutEffect_cjs || (hasRequiredUseIsomorphicLayoutEffect_cjs = 1, (function(exports) {
|
|
11124
11135
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
11125
11136
|
var react = React__default, isClient = typeof document < "u", noop2 = function() {
|
|
11126
11137
|
}, index2 = isClient ? react.useLayoutEffect : noop2;
|
|
11127
11138
|
exports.default = index2;
|
|
11128
|
-
}(useIsomorphicLayoutEffect_cjs)), useIsomorphicLayoutEffect_cjs;
|
|
11139
|
+
})(useIsomorphicLayoutEffect_cjs)), useIsomorphicLayoutEffect_cjs;
|
|
11129
11140
|
}
|
|
11130
11141
|
var classes$g = { root: "m_6e45937b", loader: "m_e8eb006c", overlay: "m_df587f17" };
|
|
11131
11142
|
const defaultProps$i = {
|
|
@@ -13184,7 +13195,7 @@ const defaultProps$5 = {
|
|
|
13184
13195
|
vars,
|
|
13185
13196
|
varsResolver: varsResolver$6,
|
|
13186
13197
|
unstyled
|
|
13187
|
-
}), { dir } = useDirection(), [hovered,
|
|
13198
|
+
}), { dir } = useDirection(), [hovered, setHovered] = useState(!1), [_value, setValue] = useUncontrolled({
|
|
13188
13199
|
value: typeof value == "number" ? clamp$4(value, min2, max2) : value,
|
|
13189
13200
|
defaultValue: typeof defaultValue == "number" ? clamp$4(defaultValue, min2, max2) : defaultValue,
|
|
13190
13201
|
finalValue: clamp$4(0, min2, max2),
|
|
@@ -13321,8 +13332,8 @@ const defaultProps$5 = {
|
|
|
13321
13332
|
disabled,
|
|
13322
13333
|
containerProps: {
|
|
13323
13334
|
ref: container2,
|
|
13324
|
-
onMouseEnter: showLabelOnHover ? () =>
|
|
13325
|
-
onMouseLeave: showLabelOnHover ? () =>
|
|
13335
|
+
onMouseEnter: showLabelOnHover ? () => setHovered(!0) : void 0,
|
|
13336
|
+
onMouseLeave: showLabelOnHover ? () => setHovered(!1) : void 0
|
|
13326
13337
|
},
|
|
13327
13338
|
children: /* @__PURE__ */ jsx(
|
|
13328
13339
|
Thumb,
|
|
@@ -14019,9 +14030,9 @@ function useTree({
|
|
|
14019
14030
|
onNodeCollapse,
|
|
14020
14031
|
onNodeExpand
|
|
14021
14032
|
} = {}) {
|
|
14022
|
-
const [data,
|
|
14033
|
+
const [data, setData] = useState([]), [expandedState, setExpandedState] = useState(initialExpandedState), [selectedState, setSelectedState] = useState(initialSelectedState), [checkedState, setCheckedState] = useState(initialCheckedState), [anchorNode, setAnchorNode] = useState(null), [hoveredNode, setHoveredNode2] = useState(null), initialize = useCallback(
|
|
14023
14034
|
(_data) => {
|
|
14024
|
-
setExpandedState((current) => getInitialTreeExpandedState(current, _data, selectedState)), setCheckedState((current) => getInitialCheckedState(current, _data)),
|
|
14035
|
+
setExpandedState((current) => getInitialTreeExpandedState(current, _data, selectedState)), setCheckedState((current) => getInitialCheckedState(current, _data)), setData(_data);
|
|
14025
14036
|
},
|
|
14026
14037
|
[selectedState, checkedState]
|
|
14027
14038
|
), toggleExpanded = useCallback(
|
|
@@ -16015,7 +16026,7 @@ class RouterCore {
|
|
|
16015
16026
|
const route = this.looseRoutesById[d2.routeId];
|
|
16016
16027
|
if (!route.options.loader)
|
|
16017
16028
|
return !0;
|
|
16018
|
-
const gcTime = (d2.preload ? route.options.preloadGcTime ?? this.options.defaultPreloadGcTime : route.options.gcTime ?? this.options.defaultGcTime) ??
|
|
16029
|
+
const gcTime = (d2.preload ? route.options.preloadGcTime ?? this.options.defaultPreloadGcTime : route.options.gcTime ?? this.options.defaultGcTime) ?? 300 * 1e3;
|
|
16019
16030
|
return !(d2.status !== "error" && Date.now() - d2.updatedAt < gcTime);
|
|
16020
16031
|
};
|
|
16021
16032
|
this.clearCache({ filter: filter2 });
|
|
@@ -21703,12 +21714,12 @@ class VisualElementDragControls {
|
|
|
21703
21714
|
isRefObject(dragConstraints) && dragConstraints.current && (this.constraints = this.resolveRefConstraints());
|
|
21704
21715
|
}, { projection } = this.visualElement, stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
|
|
21705
21716
|
projection && !projection.layout && (projection.root && projection.root.updateScroll(), projection.updateLayout()), frame$1.read(measureDragConstraints);
|
|
21706
|
-
const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints()), stopLayoutUpdateListener = projection.addEventListener("didUpdate", ({ delta, hasLayoutChanged }) => {
|
|
21717
|
+
const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints()), stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => {
|
|
21707
21718
|
this.isDragging && hasLayoutChanged && (eachAxis((axis) => {
|
|
21708
21719
|
const motionValue2 = this.getAxisMotionValue(axis);
|
|
21709
21720
|
motionValue2 && (this.originPoint[axis] += delta[axis].translate, motionValue2.set(motionValue2.get() + delta[axis].translate));
|
|
21710
21721
|
}), this.visualElement.render());
|
|
21711
|
-
});
|
|
21722
|
+
}));
|
|
21712
21723
|
return () => {
|
|
21713
21724
|
stopResizeListener(), stopPointerListener(), stopMeasureLayoutListener(), stopLayoutUpdateListener && stopLayoutUpdateListener();
|
|
21714
21725
|
};
|
|
@@ -24742,7 +24753,7 @@ function nogamma(a2, b2) {
|
|
|
24742
24753
|
var d2 = b2 - a2;
|
|
24743
24754
|
return d2 ? linear(a2, d2) : constant$2(isNaN(a2) ? b2 : a2);
|
|
24744
24755
|
}
|
|
24745
|
-
const interpolateRgb = function rgbGamma(y2) {
|
|
24756
|
+
const interpolateRgb = (function rgbGamma(y2) {
|
|
24746
24757
|
var color2 = gamma(y2);
|
|
24747
24758
|
function rgb$1(start2, end) {
|
|
24748
24759
|
var r2 = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b2 = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);
|
|
@@ -24751,7 +24762,7 @@ const interpolateRgb = function rgbGamma(y2) {
|
|
|
24751
24762
|
};
|
|
24752
24763
|
}
|
|
24753
24764
|
return rgb$1.gamma = rgbGamma, rgb$1;
|
|
24754
|
-
}(1);
|
|
24765
|
+
})(1);
|
|
24755
24766
|
function numberArray(a2, b2) {
|
|
24756
24767
|
b2 || (b2 = []);
|
|
24757
24768
|
var n2 = a2 ? Math.min(b2.length, a2.length) : 0, c2 = b2.slice(), i2;
|
|
@@ -24884,7 +24895,7 @@ function sinh(x2) {
|
|
|
24884
24895
|
function tanh(x2) {
|
|
24885
24896
|
return ((x2 = Math.exp(2 * x2)) - 1) / (x2 + 1);
|
|
24886
24897
|
}
|
|
24887
|
-
const interpolateZoom = function zoomRho(rho, rho2, rho4) {
|
|
24898
|
+
const interpolateZoom = (function zoomRho(rho, rho2, rho4) {
|
|
24888
24899
|
function zoom2(p0, p1) {
|
|
24889
24900
|
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i2, S;
|
|
24890
24901
|
if (d2 < epsilon2)
|
|
@@ -24912,7 +24923,7 @@ const interpolateZoom = function zoomRho(rho, rho2, rho4) {
|
|
|
24912
24923
|
var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
|
|
24913
24924
|
return zoomRho(_1, _2, _4);
|
|
24914
24925
|
}, zoom2;
|
|
24915
|
-
}(Math.SQRT2, 2, 4);
|
|
24926
|
+
})(Math.SQRT2, 2, 4);
|
|
24916
24927
|
var frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance == "object" && performance.now ? performance : Date, setFrame = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f2) {
|
|
24917
24928
|
setTimeout(f2, 17);
|
|
24918
24929
|
};
|
|
@@ -26087,7 +26098,7 @@ const getViewportForBounds = (bounds, width, height, minZoom, maxZoom, padding)
|
|
|
26087
26098
|
};
|
|
26088
26099
|
}, isMacOs = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0;
|
|
26089
26100
|
function isCoordinateExtent(extent) {
|
|
26090
|
-
return extent
|
|
26101
|
+
return extent != null && extent !== "parent";
|
|
26091
26102
|
}
|
|
26092
26103
|
function getNodeDimensions(node2) {
|
|
26093
26104
|
return {
|
|
@@ -26739,8 +26750,8 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
|
|
|
26739
26750
|
continue;
|
|
26740
26751
|
let nextPosition = { x: x2 - dragItem.distance.x, y: y2 - dragItem.distance.y };
|
|
26741
26752
|
snapToGrid && (nextPosition = multiDragSnapOffset ? {
|
|
26742
|
-
x: nextPosition.x + multiDragSnapOffset.x,
|
|
26743
|
-
y: nextPosition.y + multiDragSnapOffset.y
|
|
26753
|
+
x: Math.round(nextPosition.x + multiDragSnapOffset.x),
|
|
26754
|
+
y: Math.round(nextPosition.y + multiDragSnapOffset.y)
|
|
26744
26755
|
} : snapPosition(nextPosition, snapGrid));
|
|
26745
26756
|
let adjustedNodeExtent = null;
|
|
26746
26757
|
if (isMultiDrag && nodeExtent && !dragItem.extent && nodesBox) {
|
|
@@ -28727,13 +28738,13 @@ const ArrowSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => {
|
|
|
28727
28738
|
strokeWidth,
|
|
28728
28739
|
...color2 && { stroke: color2 }
|
|
28729
28740
|
};
|
|
28730
|
-
return jsx("polyline", { style: style2, strokeLinecap: "round",
|
|
28741
|
+
return jsx("polyline", { className: "arrow", style: style2, strokeLinecap: "round", fill: "none", strokeLinejoin: "round", points: "-5,-4 0,0 -5,4" });
|
|
28731
28742
|
}, ArrowClosedSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => {
|
|
28732
28743
|
const style2 = {
|
|
28733
28744
|
strokeWidth,
|
|
28734
28745
|
...color2 && { stroke: color2, fill: color2 }
|
|
28735
28746
|
};
|
|
28736
|
-
return jsx("polyline", { style: style2, strokeLinecap: "round", strokeLinejoin: "round", points: "-5,-4 0,0 -5,4 -5,-4" });
|
|
28747
|
+
return jsx("polyline", { className: "arrowclosed", style: style2, strokeLinecap: "round", strokeLinejoin: "round", points: "-5,-4 0,0 -5,4 -5,-4" });
|
|
28737
28748
|
}, MarkerSymbols = {
|
|
28738
28749
|
[MarkerType.Arrow]: ArrowSymbol,
|
|
28739
28750
|
[MarkerType.ArrowClosed]: ArrowClosedSymbol
|
|
@@ -30083,9 +30094,9 @@ function m$3(r2) {
|
|
|
30083
30094
|
}
|
|
30084
30095
|
var d$4 = (r2) => typeof r2 == "function" && r2.length === 1;
|
|
30085
30096
|
function m$2(...r2) {
|
|
30086
|
-
return u$8(o$
|
|
30097
|
+
return u$8(o$9, r2);
|
|
30087
30098
|
}
|
|
30088
|
-
function o$
|
|
30099
|
+
function o$9(r2, t2) {
|
|
30089
30100
|
let e2 = [...r2];
|
|
30090
30101
|
return e2.sort(t2), e2;
|
|
30091
30102
|
}
|
|
@@ -30119,6 +30130,11 @@ function p$2(...e2) {
|
|
|
30119
30130
|
return u$8(t$7, e2);
|
|
30120
30131
|
}
|
|
30121
30132
|
var t$7 = (e2, o2) => e2[o2];
|
|
30133
|
+
function o$8(r2, n2) {
|
|
30134
|
+
let e2 = Math.ceil(r2), t2 = Math.floor(n2);
|
|
30135
|
+
if (t2 < e2) throw new RangeError(`randomInteger: The range [${r2.toString()},${n2.toString()}] contains no integer`);
|
|
30136
|
+
return Math.floor(Math.random() * (t2 - e2 + 1) + e2);
|
|
30137
|
+
}
|
|
30122
30138
|
function a$5(...r2) {
|
|
30123
30139
|
return u$8(o$7, r2);
|
|
30124
30140
|
}
|
|
@@ -30397,9 +30413,9 @@ function createIsCircular(areItemsEqual) {
|
|
|
30397
30413
|
function getStrictProperties(object2) {
|
|
30398
30414
|
return getOwnPropertyNames(object2).concat(getOwnPropertySymbols(object2));
|
|
30399
30415
|
}
|
|
30400
|
-
var hasOwn = Object.hasOwn || function(object2, property) {
|
|
30416
|
+
var hasOwn = Object.hasOwn || (function(object2, property) {
|
|
30401
30417
|
return hasOwnProperty.call(object2, property);
|
|
30402
|
-
};
|
|
30418
|
+
});
|
|
30403
30419
|
function sameValueZeroEqual(a2, b2) {
|
|
30404
30420
|
return a2 === b2 || !a2 && !b2 && a2 !== a2 && b2 !== b2;
|
|
30405
30421
|
}
|
|
@@ -31031,11 +31047,12 @@ function useTagSpecification(tag) {
|
|
|
31031
31047
|
}
|
|
31032
31048
|
const RootContainerContext = createContext(createRef());
|
|
31033
31049
|
function RootContainer({
|
|
31050
|
+
id: id2,
|
|
31034
31051
|
className,
|
|
31035
31052
|
reduceGraphics = !1,
|
|
31036
31053
|
children: children2
|
|
31037
31054
|
}) {
|
|
31038
|
-
const
|
|
31055
|
+
const ref = useRef(null), $isPanning = usePanningAtom();
|
|
31039
31056
|
return useEffect(() => $isPanning.listen((isPanning) => {
|
|
31040
31057
|
ref.current?.setAttribute("data-likec4-diagram-panning", isPanning ? "true" : "false");
|
|
31041
31058
|
}), [$isPanning]), /* @__PURE__ */ jsx(
|
|
@@ -32042,7 +32059,7 @@ function bezierControlPoints(diagramEdge) {
|
|
|
32042
32059
|
const handles = [
|
|
32043
32060
|
// start
|
|
32044
32061
|
];
|
|
32045
|
-
for (;
|
|
32062
|
+
for (; i$8(bezierPoints, 3); ) {
|
|
32046
32063
|
const [cp1, cp2, end, ...rest] = bezierPoints, bezier = new Bezier(start2[0], start2[1], cp1[0], cp1[1], cp2[0], cp2[1], end[0], end[1]), inflections = bezier.inflections();
|
|
32047
32064
|
inflections.length === 0 && inflections.push(0.5), inflections.forEach((t2) => {
|
|
32048
32065
|
const { x: x2, y: y2 } = bezier.get(t2);
|
|
@@ -32073,7 +32090,7 @@ function bezierPath(bezierSpline) {
|
|
|
32073
32090
|
let [start2, ...points] = bezierSpline;
|
|
32074
32091
|
invariant$2(start2, "start should be defined");
|
|
32075
32092
|
let path = `M ${start2[0]},${start2[1]}`;
|
|
32076
|
-
for (;
|
|
32093
|
+
for (; i$8(points, 3); ) {
|
|
32077
32094
|
const [cp1, cp2, end, ...rest] = points;
|
|
32078
32095
|
path = path + ` C ${cp1[0]},${cp1[1]} ${cp2[0]},${cp2[1]} ${end[0]},${end[1]}`, points = rest;
|
|
32079
32096
|
}
|
|
@@ -32100,38 +32117,45 @@ const ZIndexes = {
|
|
|
32100
32117
|
Edge: 20,
|
|
32101
32118
|
Element: 20,
|
|
32102
32119
|
Max: 30
|
|
32103
|
-
}, MinZoom = 0.05, MaxZoom = 3
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
|
|
32107
|
-
|
|
32108
|
-
|
|
32109
|
-
|
|
32110
|
-
|
|
32111
|
-
|
|
32112
|
-
}
|
|
32113
|
-
|
|
32114
|
-
|
|
32115
|
-
data: {
|
|
32116
|
-
...v.data,
|
|
32117
|
-
hovered
|
|
32120
|
+
}, MinZoom = 0.05, MaxZoom = 3;
|
|
32121
|
+
var Base;
|
|
32122
|
+
((Base2) => {
|
|
32123
|
+
const _setDimmed = (v, dimmed) => (v.data.dimmed ?? !1) === dimmed ? v : {
|
|
32124
|
+
...v,
|
|
32125
|
+
data: {
|
|
32126
|
+
...v.data,
|
|
32127
|
+
dimmed
|
|
32128
|
+
}
|
|
32129
|
+
};
|
|
32130
|
+
function setDimmed(arg1, arg2) {
|
|
32131
|
+
return arg2 !== void 0 ? _setDimmed(arg1, arg2) : (v) => _setDimmed(v, arg1);
|
|
32118
32132
|
}
|
|
32119
|
-
|
|
32120
|
-
|
|
32121
|
-
|
|
32122
|
-
}
|
|
32123
|
-
function _setData(value, state) {
|
|
32124
|
-
return j(value.data, state) ? value : {
|
|
32125
|
-
...value,
|
|
32133
|
+
Base2.setDimmed = setDimmed;
|
|
32134
|
+
const _setHovered = (v, hovered) => (v.data.hovered ?? !1) === hovered ? v : {
|
|
32135
|
+
...v,
|
|
32126
32136
|
data: {
|
|
32127
|
-
...
|
|
32128
|
-
|
|
32137
|
+
...v.data,
|
|
32138
|
+
hovered
|
|
32129
32139
|
}
|
|
32130
32140
|
};
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
|
|
32141
|
+
function setHovered(arg1, arg2) {
|
|
32142
|
+
return arg2 !== void 0 ? _setHovered(arg1, arg2) : (v) => _setHovered(v, arg1);
|
|
32143
|
+
}
|
|
32144
|
+
Base2.setHovered = setHovered;
|
|
32145
|
+
function _setData(value, state) {
|
|
32146
|
+
return j(value.data, state) ? value : {
|
|
32147
|
+
...value,
|
|
32148
|
+
data: {
|
|
32149
|
+
...value.data,
|
|
32150
|
+
...state
|
|
32151
|
+
}
|
|
32152
|
+
};
|
|
32153
|
+
}
|
|
32154
|
+
function setData(arg1, arg2) {
|
|
32155
|
+
return arg2 !== void 0 ? _setData(arg1, arg2) : (edge) => _setData(edge, arg1);
|
|
32156
|
+
}
|
|
32157
|
+
Base2.setData = setData;
|
|
32158
|
+
})(Base || (Base = {}));
|
|
32135
32159
|
const BaseXYFlow = ({
|
|
32136
32160
|
nodes,
|
|
32137
32161
|
edges,
|
|
@@ -32219,7 +32243,7 @@ const BaseXYFlow = ({
|
|
|
32219
32243
|
node2.data.hovered || onNodesChange([{
|
|
32220
32244
|
id: node2.id,
|
|
32221
32245
|
type: "replace",
|
|
32222
|
-
item: setHovered(node2, !0)
|
|
32246
|
+
item: Base.setHovered(node2, !0)
|
|
32223
32247
|
}]);
|
|
32224
32248
|
}),
|
|
32225
32249
|
onNodeMouseLeave: useCallbackRef((_event, node2) => {
|
|
@@ -32230,7 +32254,7 @@ const BaseXYFlow = ({
|
|
|
32230
32254
|
node2.data.hovered && onNodesChange([{
|
|
32231
32255
|
id: node2.id,
|
|
32232
32256
|
type: "replace",
|
|
32233
|
-
item: setHovered(node2, !1)
|
|
32257
|
+
item: Base.setHovered(node2, !1)
|
|
32234
32258
|
}]);
|
|
32235
32259
|
}),
|
|
32236
32260
|
onEdgeMouseEnter: useCallbackRef((_event, edge) => {
|
|
@@ -32241,7 +32265,7 @@ const BaseXYFlow = ({
|
|
|
32241
32265
|
edge.data.hovered || onEdgesChange([{
|
|
32242
32266
|
id: edge.id,
|
|
32243
32267
|
type: "replace",
|
|
32244
|
-
item: setHovered(edge, !0)
|
|
32268
|
+
item: Base.setHovered(edge, !0)
|
|
32245
32269
|
}]);
|
|
32246
32270
|
}),
|
|
32247
32271
|
onEdgeMouseLeave: useCallbackRef((_event, edge) => {
|
|
@@ -32252,7 +32276,7 @@ const BaseXYFlow = ({
|
|
|
32252
32276
|
edge.data.hovered && onEdgesChange([{
|
|
32253
32277
|
id: edge.id,
|
|
32254
32278
|
type: "replace",
|
|
32255
|
-
item: setHovered(edge, !1)
|
|
32279
|
+
item: Base.setHovered(edge, !1)
|
|
32256
32280
|
}]);
|
|
32257
32281
|
}),
|
|
32258
32282
|
onNodeDoubleClick: stopPropagation,
|
|
@@ -32589,9 +32613,9 @@ function requireRaiseB4a670a0_cjs() {
|
|
|
32589
32613
|
}
|
|
32590
32614
|
let executingCustomAction = !1;
|
|
32591
32615
|
const $$ACTOR_TYPE = 1;
|
|
32592
|
-
let ProcessingStatus = /* @__PURE__ */ function(ProcessingStatus2) {
|
|
32616
|
+
let ProcessingStatus = /* @__PURE__ */ (function(ProcessingStatus2) {
|
|
32593
32617
|
return ProcessingStatus2[ProcessingStatus2.NotStarted = 0] = "NotStarted", ProcessingStatus2[ProcessingStatus2.Running = 1] = "Running", ProcessingStatus2[ProcessingStatus2.Stopped = 2] = "Stopped", ProcessingStatus2;
|
|
32594
|
-
}({});
|
|
32618
|
+
})({});
|
|
32595
32619
|
const defaultOptions2 = {
|
|
32596
32620
|
clock: {
|
|
32597
32621
|
setTimeout: (fn, ms) => setTimeout(fn, ms),
|
|
@@ -34779,9 +34803,9 @@ function requireLog63c8f21f_cjs() {
|
|
|
34779
34803
|
}
|
|
34780
34804
|
return emit3.type = "xstate.emit", emit3.event = eventOrExpr, emit3.resolve = resolveEmit, emit3.execute = executeEmit, emit3;
|
|
34781
34805
|
}
|
|
34782
|
-
let SpecialTargets = /* @__PURE__ */ function(SpecialTargets2) {
|
|
34806
|
+
let SpecialTargets = /* @__PURE__ */ (function(SpecialTargets2) {
|
|
34783
34807
|
return SpecialTargets2.Parent = "#_parent", SpecialTargets2.Internal = "#_internal", SpecialTargets2;
|
|
34784
|
-
}({});
|
|
34808
|
+
})({});
|
|
34785
34809
|
function resolveSendTo(actorScope, snapshot, args, actionParams, {
|
|
34786
34810
|
to,
|
|
34787
34811
|
event: eventOrExpr,
|
|
@@ -35792,14 +35816,14 @@ CatmullRomOpen.prototype = {
|
|
|
35792
35816
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
35793
35817
|
}
|
|
35794
35818
|
};
|
|
35795
|
-
const curveCatmullRomOpen = function custom4(alpha2) {
|
|
35819
|
+
const curveCatmullRomOpen = (function custom4(alpha2) {
|
|
35796
35820
|
function catmullRom(context2) {
|
|
35797
35821
|
return alpha2 ? new CatmullRomOpen(context2, alpha2) : new CardinalOpen(context2, 0);
|
|
35798
35822
|
}
|
|
35799
35823
|
return catmullRom.alpha = function(alpha3) {
|
|
35800
35824
|
return custom4(+alpha3);
|
|
35801
35825
|
}, catmullRom;
|
|
35802
|
-
}(0.5), createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
35826
|
+
})(0.5), createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
35803
35827
|
const getVariantProps2 = (variants) => ({
|
|
35804
35828
|
[name]: "__ignore__",
|
|
35805
35829
|
...defaultVariants,
|
|
@@ -35970,11 +35994,16 @@ const curveCatmullRomOpen = function custom4(alpha2) {
|
|
|
35970
35994
|
},
|
|
35971
35995
|
getVariantProps: likec4tagFn.getVariantProps
|
|
35972
35996
|
}), markdownBlockFn = /* @__PURE__ */ createRecipe("likec4-markdown-block", {
|
|
35973
|
-
uselikec4palette: !1
|
|
35997
|
+
uselikec4palette: !1,
|
|
35998
|
+
value: "markdown"
|
|
35974
35999
|
}, []), markdownBlockVariantMap = {
|
|
35975
36000
|
uselikec4palette: [
|
|
35976
36001
|
"true",
|
|
35977
36002
|
"false"
|
|
36003
|
+
],
|
|
36004
|
+
value: [
|
|
36005
|
+
"markdown",
|
|
36006
|
+
"plaintext"
|
|
35978
36007
|
]
|
|
35979
36008
|
}, markdownBlockVariantKeys = Object.keys(markdownBlockVariantMap), markdownBlock = /* @__PURE__ */ Object.assign(memo$1(markdownBlockFn.recipeFn), {
|
|
35980
36009
|
__recipe__: !0,
|
|
@@ -36458,7 +36487,7 @@ function EdgeContainer({
|
|
|
36458
36487
|
"data-likec4-dimmed": isDimmed
|
|
36459
36488
|
}
|
|
36460
36489
|
};
|
|
36461
|
-
return component === "svg" ? /* @__PURE__ */ jsx("svg", { style: style2, ...props2, children: children2 }) : (invariant$
|
|
36490
|
+
return component === "svg" ? /* @__PURE__ */ jsx("svg", { style: style2, ...props2, children: children2 }) : (invariant$3(component === "g", 'EdgeContainer: component must be "g" or "svg"'), /* @__PURE__ */ jsx("g", { style: style2, ...props2, children: children2 }));
|
|
36462
36491
|
}
|
|
36463
36492
|
const EdgeLabel = forwardRef(({
|
|
36464
36493
|
edgeProps: {
|
|
@@ -36487,8 +36516,7 @@ const EdgeLabel = forwardRef(({
|
|
|
36487
36516
|
className: cx(classes2.root, "likec4-edge-label", className),
|
|
36488
36517
|
"data-edge-id": id2,
|
|
36489
36518
|
animate: {
|
|
36490
|
-
|
|
36491
|
-
scale: isHovered && !selected2 ? 1.08 : 1
|
|
36519
|
+
scale: isHovered && !selected2 ? 1.06 : 1
|
|
36492
36520
|
},
|
|
36493
36521
|
...rest,
|
|
36494
36522
|
children: [
|
|
@@ -37491,7 +37519,8 @@ const MarkdownBlock = forwardRef(({
|
|
|
37491
37519
|
...props2,
|
|
37492
37520
|
className: cx(
|
|
37493
37521
|
markdownBlock({
|
|
37494
|
-
uselikec4palette
|
|
37522
|
+
uselikec4palette,
|
|
37523
|
+
value: value.isMarkdown ? "markdown" : "plaintext"
|
|
37495
37524
|
}),
|
|
37496
37525
|
className
|
|
37497
37526
|
),
|
|
@@ -37551,7 +37580,7 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
|
|
|
37551
37580
|
children: data.technology
|
|
37552
37581
|
}
|
|
37553
37582
|
),
|
|
37554
|
-
data.description?.nonEmpty &&
|
|
37583
|
+
data.description?.nonEmpty && /* @__PURE__ */ jsx(
|
|
37555
37584
|
MarkdownBlock,
|
|
37556
37585
|
{
|
|
37557
37586
|
className: cx(classes2.description, "likec4-element-description"),
|
|
@@ -37561,15 +37590,7 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
|
|
|
37561
37590
|
maxHeight: data.description.isMarkdown ? "8rem" : void 0,
|
|
37562
37591
|
lineClamp: isSmOrXs ? 3 : 5
|
|
37563
37592
|
}
|
|
37564
|
-
)
|
|
37565
|
-
Text,
|
|
37566
|
-
{
|
|
37567
|
-
component: "div",
|
|
37568
|
-
className: cx(classes2.description, "likec4-element-description"),
|
|
37569
|
-
lineClamp: isSmOrXs ? 3 : 5,
|
|
37570
|
-
children: data.description.text
|
|
37571
|
-
}
|
|
37572
|
-
))
|
|
37593
|
+
)
|
|
37573
37594
|
] })
|
|
37574
37595
|
]
|
|
37575
37596
|
}
|
|
@@ -37882,7 +37903,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
|
|
|
37882
37903
|
}
|
|
37883
37904
|
}), buttons22;
|
|
37884
37905
|
}, [enableNavigateTo, enableRelationshipBrowser, diagram, modelFqn, navigateTo, props2.id]);
|
|
37885
|
-
return extraButtons &&
|
|
37906
|
+
return extraButtons && i$8(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props2, buttons: buttons2 });
|
|
37886
37907
|
}, DeploymentElementActions = ({
|
|
37887
37908
|
extraButtons,
|
|
37888
37909
|
...props2
|
|
@@ -37904,7 +37925,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
|
|
|
37904
37925
|
}
|
|
37905
37926
|
}), buttons22;
|
|
37906
37927
|
}, [enableNavigateTo, enableRelationshipBrowser, diagram, modelFqn, navigateTo, props2.id]);
|
|
37907
|
-
return extraButtons &&
|
|
37928
|
+
return extraButtons && i$8(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props2, buttons: buttons2 });
|
|
37908
37929
|
}, {
|
|
37909
37930
|
primary,
|
|
37910
37931
|
secondary,
|
|
@@ -37930,7 +37951,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
|
|
|
37930
37951
|
function useHandlers(target, props2) {
|
|
37931
37952
|
const { onChange: triggerOnChange } = useDiagramEventHandlers(), diagram = useDiagram(), [originalColor, setOriginalColor] = useState(null), onColorPreview = useCallbackRef((color2) => {
|
|
37932
37953
|
if (color2 === null) {
|
|
37933
|
-
invariant$
|
|
37954
|
+
invariant$3(originalColor, "originalColor is null"), setOriginalColor(null), diagram.updateNodeData(props2.id, {
|
|
37934
37955
|
color: originalColor
|
|
37935
37956
|
});
|
|
37936
37957
|
return;
|
|
@@ -39628,7 +39649,7 @@ const selector$7 = (state) => ({
|
|
|
39628
39649
|
] })
|
|
39629
39650
|
]
|
|
39630
39651
|
}
|
|
39631
|
-
) }), SectionHeader = styled("div", {
|
|
39652
|
+
) }), SectionHeader$1 = styled("div", {
|
|
39632
39653
|
base: {
|
|
39633
39654
|
fontSize: "xs",
|
|
39634
39655
|
color: "mantine.colors.dimmed",
|
|
@@ -39693,12 +39714,12 @@ const selector$7 = (state) => ({
|
|
|
39693
39714
|
] })
|
|
39694
39715
|
] }),
|
|
39695
39716
|
links.length > 0 && /* @__PURE__ */ jsxs("section", { className: hstack({ alignItems: "baseline" }), children: [
|
|
39696
|
-
/* @__PURE__ */ jsx(SectionHeader, { children: "Links" }),
|
|
39717
|
+
/* @__PURE__ */ jsx(SectionHeader$1, { children: "Links" }),
|
|
39697
39718
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: links.map((link, i2) => /* @__PURE__ */ jsx(Link, { value: link }, `${i2}-${link.url}`)) })
|
|
39698
39719
|
] }),
|
|
39699
39720
|
description2.isEmpty && /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xs", c: "dimmed", my: "md", style: { userSelect: "none" }, children: "No description" }),
|
|
39700
39721
|
description2.nonEmpty && /* @__PURE__ */ jsxs("section", { children: [
|
|
39701
|
-
/* @__PURE__ */ jsx(SectionHeader, { children: "Description" }),
|
|
39722
|
+
/* @__PURE__ */ jsx(SectionHeader$1, { children: "Description" }),
|
|
39702
39723
|
/* @__PURE__ */ jsx(
|
|
39703
39724
|
MarkdownBlock,
|
|
39704
39725
|
{
|
|
@@ -39838,7 +39859,8 @@ const selector$7 = (state) => ({
|
|
|
39838
39859
|
hasNext,
|
|
39839
39860
|
hasPrevious,
|
|
39840
39861
|
currentStep,
|
|
39841
|
-
totalSteps
|
|
39862
|
+
totalSteps,
|
|
39863
|
+
notes
|
|
39842
39864
|
} = useDiagramContext((s2) => {
|
|
39843
39865
|
const currentStepIndex = s2.xyedges.findIndex((e2) => e2.id === s2.activeWalkthrough?.stepId);
|
|
39844
39866
|
return {
|
|
@@ -39846,7 +39868,8 @@ const selector$7 = (state) => ({
|
|
|
39846
39868
|
hasNext: currentStepIndex < s2.xyedges.length - 1,
|
|
39847
39869
|
hasPrevious: currentStepIndex > 0,
|
|
39848
39870
|
currentStep: currentStepIndex + 1,
|
|
39849
|
-
totalSteps: s2.xyedges.length
|
|
39871
|
+
totalSteps: s2.xyedges.length,
|
|
39872
|
+
notes: s2.xyedges[currentStepIndex]?.data?.notes ?? RichText.EMPTY
|
|
39850
39873
|
};
|
|
39851
39874
|
});
|
|
39852
39875
|
return /* @__PURE__ */ jsxs(AnimatePresence, { propagate: !0, children: [
|
|
@@ -39861,8 +39884,7 @@ const selector$7 = (state) => ({
|
|
|
39861
39884
|
},
|
|
39862
39885
|
rightSection: /* @__PURE__ */ jsx(IconPlayerStopFilled, { size: 10 }),
|
|
39863
39886
|
children: "Stop"
|
|
39864
|
-
}
|
|
39865
|
-
"trigger-dynamic-walkthrough"
|
|
39887
|
+
}
|
|
39866
39888
|
),
|
|
39867
39889
|
/* @__PURE__ */ jsx(
|
|
39868
39890
|
PrevNextButton,
|
|
@@ -40456,7 +40478,7 @@ function FolderColumnItem({ columnItem, ...props2 }) {
|
|
|
40456
40478
|
columnItem.viewId
|
|
40457
40479
|
);
|
|
40458
40480
|
default:
|
|
40459
|
-
nonexhaustive(columnItem);
|
|
40481
|
+
nonexhaustive$1(columnItem);
|
|
40460
40482
|
}
|
|
40461
40483
|
}
|
|
40462
40484
|
function SearchInput({ onKeyDown, ...props2 }) {
|
|
@@ -40522,7 +40544,297 @@ function SearchInput({ onKeyDown, ...props2 }) {
|
|
|
40522
40544
|
}
|
|
40523
40545
|
);
|
|
40524
40546
|
}
|
|
40525
|
-
const
|
|
40547
|
+
const backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog$2 = css.raw({
|
|
40548
|
+
boxSizing: "border-box",
|
|
40549
|
+
margin: "0",
|
|
40550
|
+
position: "fixed",
|
|
40551
|
+
width: "100vw",
|
|
40552
|
+
height: "100vh",
|
|
40553
|
+
maxWidth: "100vw",
|
|
40554
|
+
maxHeight: "100vh",
|
|
40555
|
+
background: "mantine.colors.defaultBorder/50",
|
|
40556
|
+
shadow: "xl",
|
|
40557
|
+
border: "transparent",
|
|
40558
|
+
outline: "none",
|
|
40559
|
+
borderRadius: `var(${borderRadius})`,
|
|
40560
|
+
[backdropBlur$1]: "0px",
|
|
40561
|
+
[level]: "0",
|
|
40562
|
+
[offset]: "0px",
|
|
40563
|
+
[inset]: "calc((1 + var(--_level) * 0.75) * var(--_offset))",
|
|
40564
|
+
[backdropOpacity$1]: "0%",
|
|
40565
|
+
[borderRadius]: "0px",
|
|
40566
|
+
_backdrop: {
|
|
40567
|
+
cursor: "zoom-out"
|
|
40568
|
+
},
|
|
40569
|
+
inset: "0",
|
|
40570
|
+
padding: "0"
|
|
40571
|
+
}), body$1 = css.raw({
|
|
40572
|
+
position: "relative",
|
|
40573
|
+
containerName: "likec4-dialog",
|
|
40574
|
+
containerType: "size",
|
|
40575
|
+
border: "0 solid transparent",
|
|
40576
|
+
overflow: "hidden",
|
|
40577
|
+
width: "100%",
|
|
40578
|
+
height: "100%",
|
|
40579
|
+
background: "mantine.colors.body"
|
|
40580
|
+
}), overlay = sva({
|
|
40581
|
+
slots: ["dialog", "body"],
|
|
40582
|
+
base: {
|
|
40583
|
+
dialog: dialog$2,
|
|
40584
|
+
body: body$1
|
|
40585
|
+
},
|
|
40586
|
+
variants: {
|
|
40587
|
+
fullscreen: {
|
|
40588
|
+
false: {
|
|
40589
|
+
dialog: {
|
|
40590
|
+
sm: {
|
|
40591
|
+
inset: "[var(--_inset) var(--_inset) var(--_offset) var(--_inset)]",
|
|
40592
|
+
width: "calc(100vw - 2 * var(--_inset))",
|
|
40593
|
+
height: "calc(100vh - var(--_offset) - var(--_inset))",
|
|
40594
|
+
[borderRadius]: "6px",
|
|
40595
|
+
padding: "1.5",
|
|
40596
|
+
// 6px
|
|
40597
|
+
[offset]: "1rem"
|
|
40598
|
+
},
|
|
40599
|
+
md: {
|
|
40600
|
+
[offset]: "1rem"
|
|
40601
|
+
},
|
|
40602
|
+
lg: {
|
|
40603
|
+
[offset]: "2rem"
|
|
40604
|
+
},
|
|
40605
|
+
xl: {
|
|
40606
|
+
[offset]: "4rem"
|
|
40607
|
+
}
|
|
40608
|
+
},
|
|
40609
|
+
body: {
|
|
40610
|
+
sm: {
|
|
40611
|
+
borderRadius: `calc(var(${borderRadius}) - 2px)`
|
|
40612
|
+
}
|
|
40613
|
+
}
|
|
40614
|
+
},
|
|
40615
|
+
true: {
|
|
40616
|
+
dialog: {
|
|
40617
|
+
inset: "0",
|
|
40618
|
+
padding: "0"
|
|
40619
|
+
}
|
|
40620
|
+
}
|
|
40621
|
+
},
|
|
40622
|
+
// transparent: {
|
|
40623
|
+
// false: {
|
|
40624
|
+
// },
|
|
40625
|
+
// true: {
|
|
40626
|
+
// dialog: {
|
|
40627
|
+
// background: 'transparent',
|
|
40628
|
+
// },
|
|
40629
|
+
// },
|
|
40630
|
+
// },
|
|
40631
|
+
withBackdrop: {
|
|
40632
|
+
false: {
|
|
40633
|
+
dialog: {
|
|
40634
|
+
_backdrop: {
|
|
40635
|
+
display: "none"
|
|
40636
|
+
}
|
|
40637
|
+
}
|
|
40638
|
+
},
|
|
40639
|
+
true: {
|
|
40640
|
+
dialog: {
|
|
40641
|
+
_backdrop: {
|
|
40642
|
+
backdropFilter: `blur(var(${backdropBlur$1}))`,
|
|
40643
|
+
backgroundColor: {
|
|
40644
|
+
_dark: `[rgb(34 34 34 / var(${backdropOpacity$1}))]`,
|
|
40645
|
+
_light: `[rgb(15 15 15/ var(${backdropOpacity$1}))]`
|
|
40646
|
+
}
|
|
40647
|
+
}
|
|
40648
|
+
}
|
|
40649
|
+
}
|
|
40650
|
+
}
|
|
40651
|
+
},
|
|
40652
|
+
defaultVariants: {
|
|
40653
|
+
fullscreen: !1,
|
|
40654
|
+
withBackdrop: !0
|
|
40655
|
+
}
|
|
40656
|
+
}), Overlay = forwardRef(({
|
|
40657
|
+
onClose,
|
|
40658
|
+
className,
|
|
40659
|
+
classes: classes2,
|
|
40660
|
+
overlayLevel = 0,
|
|
40661
|
+
children: children2,
|
|
40662
|
+
fullscreen = !1,
|
|
40663
|
+
withBackdrop = !0,
|
|
40664
|
+
backdrop,
|
|
40665
|
+
openDelay = 130,
|
|
40666
|
+
...rest
|
|
40667
|
+
}, ref) => {
|
|
40668
|
+
const [opened, setOpened] = useState(openDelay === 0), focusTrapRef = useFocusTrap(opened), dialogRef = useRef(null), isClosingRef = useRef(!1), motionNotReduced = useReducedMotionConfig() !== !0, onCloseRef = useRef(onClose);
|
|
40669
|
+
onCloseRef.current = onClose;
|
|
40670
|
+
const close = useDebouncedCallback(
|
|
40671
|
+
() => {
|
|
40672
|
+
isClosingRef.current || (isClosingRef.current = !0, onCloseRef.current());
|
|
40673
|
+
},
|
|
40674
|
+
[],
|
|
40675
|
+
50
|
|
40676
|
+
);
|
|
40677
|
+
useLayoutEffect$1(() => {
|
|
40678
|
+
dialogRef.current?.open || dialogRef.current?.showModal();
|
|
40679
|
+
}, []), useTimeoutEffect(() => {
|
|
40680
|
+
setOpened(!0);
|
|
40681
|
+
}, openDelay > 0 ? openDelay : void 0);
|
|
40682
|
+
const styles = overlay({
|
|
40683
|
+
fullscreen,
|
|
40684
|
+
withBackdrop
|
|
40685
|
+
});
|
|
40686
|
+
let targetBackdropOpacity = overlayLevel > 0 ? "50%" : "60%";
|
|
40687
|
+
return backdrop?.opacity !== void 0 && (targetBackdropOpacity = `${backdrop.opacity * 100}%`), /* @__PURE__ */ jsx(
|
|
40688
|
+
m$4.dialog,
|
|
40689
|
+
{
|
|
40690
|
+
ref: useMergedRef(
|
|
40691
|
+
dialogRef,
|
|
40692
|
+
focusTrapRef,
|
|
40693
|
+
ref
|
|
40694
|
+
),
|
|
40695
|
+
className: cx(
|
|
40696
|
+
classes2?.dialog,
|
|
40697
|
+
className,
|
|
40698
|
+
styles.dialog,
|
|
40699
|
+
fullscreen && RemoveScroll.classNames.fullWidth
|
|
40700
|
+
),
|
|
40701
|
+
layout: !0,
|
|
40702
|
+
style: {
|
|
40703
|
+
// @ts-ignore
|
|
40704
|
+
[level]: overlayLevel
|
|
40705
|
+
},
|
|
40706
|
+
...motionNotReduced ? {
|
|
40707
|
+
initial: {
|
|
40708
|
+
[backdropBlur$1]: "0px",
|
|
40709
|
+
[backdropOpacity$1]: "0%",
|
|
40710
|
+
scale: 0.95,
|
|
40711
|
+
originY: 0,
|
|
40712
|
+
translateY: -20,
|
|
40713
|
+
opacity: 0
|
|
40714
|
+
},
|
|
40715
|
+
animate: {
|
|
40716
|
+
[backdropBlur$1]: overlayLevel > 0 ? "4px" : "8px",
|
|
40717
|
+
[backdropOpacity$1]: targetBackdropOpacity,
|
|
40718
|
+
scale: 1,
|
|
40719
|
+
opacity: 1,
|
|
40720
|
+
translateY: 0,
|
|
40721
|
+
transition: {
|
|
40722
|
+
delay: 0.075
|
|
40723
|
+
}
|
|
40724
|
+
},
|
|
40725
|
+
exit: {
|
|
40726
|
+
opacity: 0,
|
|
40727
|
+
scale: 0.98,
|
|
40728
|
+
translateY: -20,
|
|
40729
|
+
transition: {
|
|
40730
|
+
duration: 0.1
|
|
40731
|
+
},
|
|
40732
|
+
[backdropBlur$1]: "0px",
|
|
40733
|
+
[backdropOpacity$1]: "0%"
|
|
40734
|
+
}
|
|
40735
|
+
} : {
|
|
40736
|
+
initial: {
|
|
40737
|
+
[backdropBlur$1]: "8px",
|
|
40738
|
+
[backdropOpacity$1]: targetBackdropOpacity
|
|
40739
|
+
}
|
|
40740
|
+
},
|
|
40741
|
+
onClick: (e2) => {
|
|
40742
|
+
if (e2.stopPropagation(), e2.target?.nodeName?.toUpperCase() === "DIALOG") {
|
|
40743
|
+
dialogRef.current?.close();
|
|
40744
|
+
return;
|
|
40745
|
+
}
|
|
40746
|
+
},
|
|
40747
|
+
onCancel: (e2) => {
|
|
40748
|
+
e2.preventDefault(), e2.stopPropagation(), close();
|
|
40749
|
+
},
|
|
40750
|
+
onDoubleClick: stopPropagation,
|
|
40751
|
+
onPointerDown: stopPropagation,
|
|
40752
|
+
onClose: (e2) => {
|
|
40753
|
+
e2.stopPropagation(), close();
|
|
40754
|
+
},
|
|
40755
|
+
...rest,
|
|
40756
|
+
children: /* @__PURE__ */ jsx(RemoveScroll, { forwardProps: !0, children: /* @__PURE__ */ jsx(
|
|
40757
|
+
"div",
|
|
40758
|
+
{
|
|
40759
|
+
className: cx(
|
|
40760
|
+
classes2?.body,
|
|
40761
|
+
styles.body,
|
|
40762
|
+
"overlay-body"
|
|
40763
|
+
),
|
|
40764
|
+
children: opened && /* @__PURE__ */ jsx(Fragment$1, { children: children2 })
|
|
40765
|
+
}
|
|
40766
|
+
) })
|
|
40767
|
+
}
|
|
40768
|
+
);
|
|
40769
|
+
});
|
|
40770
|
+
Overlay.displayName = "Overlay";
|
|
40771
|
+
const SectionHeader = styled("div", {
|
|
40772
|
+
base: {
|
|
40773
|
+
fontSize: "xs",
|
|
40774
|
+
color: "mantine.colors.dimmed",
|
|
40775
|
+
fontWeight: 500,
|
|
40776
|
+
userSelect: "none",
|
|
40777
|
+
mb: "xxs"
|
|
40778
|
+
}
|
|
40779
|
+
});
|
|
40780
|
+
function selectWalkthroughNotes(s2) {
|
|
40781
|
+
const isActive = n(s2.activeWalkthrough), activeStepIndex = isActive ? s2.xyedges.findIndex((e2) => e2.id === s2.activeWalkthrough?.stepId) : -1;
|
|
40782
|
+
return {
|
|
40783
|
+
isActive,
|
|
40784
|
+
isParallel: isActive && n$5(s2.activeWalkthrough?.parallelPrefix),
|
|
40785
|
+
hasNext: isActive && activeStepIndex < s2.xyedges.length - 1,
|
|
40786
|
+
hasPrevious: isActive && activeStepIndex > 0,
|
|
40787
|
+
notes: isActive ? s2.xyedges[activeStepIndex]?.data?.notes ?? RichText.EMPTY : null
|
|
40788
|
+
};
|
|
40789
|
+
}
|
|
40790
|
+
const WalkthroughPanel = () => {
|
|
40791
|
+
const { notes } = useDiagramContext(selectWalkthroughNotes);
|
|
40792
|
+
return !notes || notes.isEmpty ? null : /* @__PURE__ */ jsx(styled.div, { position: "relative", children: /* @__PURE__ */ jsxs(
|
|
40793
|
+
ScrollAreaAutosize,
|
|
40794
|
+
{
|
|
40795
|
+
className: cx(
|
|
40796
|
+
"nowheel nopan nodrag",
|
|
40797
|
+
vstack({
|
|
40798
|
+
position: "absolute",
|
|
40799
|
+
layerStyle: "likec4.dropdown",
|
|
40800
|
+
gap: "sm",
|
|
40801
|
+
padding: "md",
|
|
40802
|
+
paddingTop: "xxs",
|
|
40803
|
+
pointerEvents: "all",
|
|
40804
|
+
maxWidth: "calc(100cqw - 32px)",
|
|
40805
|
+
minWidth: "calc(100cqw - 50px)",
|
|
40806
|
+
maxHeight: "calc(100cqh - 100px)",
|
|
40807
|
+
width: "max-content",
|
|
40808
|
+
cursor: "default",
|
|
40809
|
+
overflow: "auto",
|
|
40810
|
+
overscrollBehavior: "contain",
|
|
40811
|
+
"@/sm": {
|
|
40812
|
+
minWidth: 400,
|
|
40813
|
+
maxWidth: 550
|
|
40814
|
+
},
|
|
40815
|
+
"@/lg": {
|
|
40816
|
+
maxWidth: 700
|
|
40817
|
+
}
|
|
40818
|
+
})
|
|
40819
|
+
),
|
|
40820
|
+
type: "scroll",
|
|
40821
|
+
children: [
|
|
40822
|
+
/* @__PURE__ */ jsx(SectionHeader, { children: "Notes" }),
|
|
40823
|
+
/* @__PURE__ */ jsx(
|
|
40824
|
+
MarkdownBlock,
|
|
40825
|
+
{
|
|
40826
|
+
value: notes,
|
|
40827
|
+
fontSize: "sm",
|
|
40828
|
+
emptyText: "No description",
|
|
40829
|
+
className: css({
|
|
40830
|
+
userSelect: "all"
|
|
40831
|
+
})
|
|
40832
|
+
}
|
|
40833
|
+
)
|
|
40834
|
+
]
|
|
40835
|
+
}
|
|
40836
|
+
) });
|
|
40837
|
+
}, NavigationPanel = memo$2(() => {
|
|
40526
40838
|
const diagramActor = useDiagramActorRef(), viewModel = useCurrentViewModel(), { portalProps } = useMantinePortalProps(), actorRef = xstateReact_cjsExports.useActorRef(
|
|
40527
40839
|
navigationPanelActorLogic,
|
|
40528
40840
|
{
|
|
@@ -40566,7 +40878,8 @@ const NavigationPanel = memo$2(() => {
|
|
|
40566
40878
|
},
|
|
40567
40879
|
children: /* @__PURE__ */ jsxs(NavigationPanelActorContextProvider, { value: actorRef, children: [
|
|
40568
40880
|
/* @__PURE__ */ jsx(NavigationPanelImpl, { actor: actorRef }),
|
|
40569
|
-
/* @__PURE__ */ jsx(EditorPanel, {})
|
|
40881
|
+
/* @__PURE__ */ jsx(EditorPanel, {}),
|
|
40882
|
+
/* @__PURE__ */ jsx(WalkthroughPanel, {})
|
|
40570
40883
|
] })
|
|
40571
40884
|
}
|
|
40572
40885
|
) });
|
|
@@ -40749,7 +41062,7 @@ function useLikeC4ElementsTree(viewId) {
|
|
|
40749
41062
|
const model = useLikeC4Model$1();
|
|
40750
41063
|
return useMemo(() => viewId ? [...model.view(viewId).roots()].map(buildNode).sort(sortByLabel) : [...model.roots()].map(buildNode).sort(sortByLabel), [model, viewId ?? null]);
|
|
40751
41064
|
}
|
|
40752
|
-
const backdropBlur
|
|
41065
|
+
const backdropBlur = "--_blur", backdropOpacity = "--_opacity", dialog$1 = css({
|
|
40753
41066
|
boxSizing: "border-box",
|
|
40754
41067
|
margin: "0",
|
|
40755
41068
|
padding: "0",
|
|
@@ -40764,8 +41077,8 @@ const backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", dialog$2 = c
|
|
|
40764
41077
|
_backdrop: {
|
|
40765
41078
|
// WebkitBackdropFilter: `blur(${backdropBlur})`,
|
|
40766
41079
|
backdropFilter: "auto",
|
|
40767
|
-
backdropBlur: `var(${backdropBlur
|
|
40768
|
-
backgroundColor: `[rgb(36 36 36 / var(${backdropOpacity
|
|
41080
|
+
backdropBlur: `var(${backdropBlur})`,
|
|
41081
|
+
backgroundColor: `[rgb(36 36 36 / var(${backdropOpacity}, 5%))]`
|
|
40769
41082
|
}
|
|
40770
41083
|
}), card$2 = css({
|
|
40771
41084
|
position: "absolute",
|
|
@@ -43977,7 +44290,7 @@ function layoutRelationshipsView$1(data, scope) {
|
|
|
43977
44290
|
y: position.y,
|
|
43978
44291
|
position: [position.x, position.y],
|
|
43979
44292
|
title: "empty node",
|
|
43980
|
-
description: RichText.EMPTY,
|
|
44293
|
+
description: RichText$1.EMPTY,
|
|
43981
44294
|
technology: null,
|
|
43982
44295
|
tags: [],
|
|
43983
44296
|
links: [],
|
|
@@ -44016,7 +44329,7 @@ function layoutRelationshipsView$1(data, scope) {
|
|
|
44016
44329
|
y: position.y,
|
|
44017
44330
|
position: [position.x, position.y],
|
|
44018
44331
|
title: element.title,
|
|
44019
|
-
description: RichText.from(element.description),
|
|
44332
|
+
description: RichText$1.from(element.description),
|
|
44020
44333
|
technology: element.technology,
|
|
44021
44334
|
tags: [...element.tags],
|
|
44022
44335
|
links: null,
|
|
@@ -44071,7 +44384,7 @@ function layoutRelationshipsView$1(data, scope) {
|
|
|
44071
44384
|
relations,
|
|
44072
44385
|
sourceHandle,
|
|
44073
44386
|
targetHandle
|
|
44074
|
-
} = nonNullable(f(edges, (e22) => e22.name === ename)), onlyRelation = t$6(relations), label2 = onlyRelation?.title ?? "untitled", isMultiple = relations.length > 1, navigateTo = t$6(i$9(relations.flatMap((r2) => r2.navigateTo?.id ? r2.navigateTo.id : [])));
|
|
44387
|
+
} = nonNullable$1(f(edges, (e22) => e22.name === ename)), onlyRelation = t$6(relations), label2 = onlyRelation?.title ?? "untitled", isMultiple = relations.length > 1, navigateTo = t$6(i$9(relations.flatMap((r2) => r2.navigateTo?.id ? r2.navigateTo.id : [])));
|
|
44075
44388
|
return acc.push({
|
|
44076
44389
|
id: name,
|
|
44077
44390
|
sourceFqn,
|
|
@@ -44899,19 +45212,19 @@ function ElementDetailsCard({
|
|
|
44899
45212
|
m$4.dialog,
|
|
44900
45213
|
{
|
|
44901
45214
|
ref,
|
|
44902
|
-
className: cx(dialog$
|
|
45215
|
+
className: cx(dialog$1, RemoveScroll.classNames.fullWidth),
|
|
44903
45216
|
layout: !0,
|
|
44904
45217
|
initial: {
|
|
44905
|
-
[backdropBlur
|
|
44906
|
-
[backdropOpacity
|
|
45218
|
+
[backdropBlur]: "0px",
|
|
45219
|
+
[backdropOpacity]: "5%"
|
|
44907
45220
|
},
|
|
44908
45221
|
animate: {
|
|
44909
|
-
[backdropBlur
|
|
44910
|
-
[backdropOpacity
|
|
45222
|
+
[backdropBlur]: "3px",
|
|
45223
|
+
[backdropOpacity]: "60%"
|
|
44911
45224
|
},
|
|
44912
45225
|
exit: {
|
|
44913
|
-
[backdropBlur
|
|
44914
|
-
[backdropOpacity
|
|
45226
|
+
[backdropBlur]: "0px",
|
|
45227
|
+
[backdropOpacity]: "0%",
|
|
44915
45228
|
transition: {
|
|
44916
45229
|
duration: 0.1
|
|
44917
45230
|
}
|
|
@@ -45321,230 +45634,6 @@ function ElementDetails({
|
|
|
45321
45634
|
}
|
|
45322
45635
|
) });
|
|
45323
45636
|
}
|
|
45324
|
-
const backdropBlur = "--_blur", backdropOpacity = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog$1 = css.raw({
|
|
45325
|
-
boxSizing: "border-box",
|
|
45326
|
-
margin: "0",
|
|
45327
|
-
position: "fixed",
|
|
45328
|
-
width: "100vw",
|
|
45329
|
-
height: "100vh",
|
|
45330
|
-
maxWidth: "100vw",
|
|
45331
|
-
maxHeight: "100vh",
|
|
45332
|
-
background: "mantine.colors.defaultBorder/50",
|
|
45333
|
-
shadow: "xl",
|
|
45334
|
-
border: "transparent",
|
|
45335
|
-
outline: "none",
|
|
45336
|
-
borderRadius: `var(${borderRadius})`,
|
|
45337
|
-
[backdropBlur]: "0px",
|
|
45338
|
-
[level]: "0",
|
|
45339
|
-
[offset]: "0px",
|
|
45340
|
-
[inset]: "calc((1 + var(--_level) * 0.75) * var(--_offset))",
|
|
45341
|
-
[backdropOpacity]: "0%",
|
|
45342
|
-
[borderRadius]: "0px",
|
|
45343
|
-
_backdrop: {
|
|
45344
|
-
cursor: "zoom-out"
|
|
45345
|
-
},
|
|
45346
|
-
inset: "0",
|
|
45347
|
-
padding: "0"
|
|
45348
|
-
}), body$1 = css.raw({
|
|
45349
|
-
position: "relative",
|
|
45350
|
-
containerName: "likec4-dialog",
|
|
45351
|
-
containerType: "size",
|
|
45352
|
-
border: "0 solid transparent",
|
|
45353
|
-
overflow: "hidden",
|
|
45354
|
-
width: "100%",
|
|
45355
|
-
height: "100%",
|
|
45356
|
-
background: "mantine.colors.body"
|
|
45357
|
-
}), overlay = sva({
|
|
45358
|
-
slots: ["dialog", "body"],
|
|
45359
|
-
base: {
|
|
45360
|
-
dialog: dialog$1,
|
|
45361
|
-
body: body$1
|
|
45362
|
-
},
|
|
45363
|
-
variants: {
|
|
45364
|
-
fullscreen: {
|
|
45365
|
-
false: {
|
|
45366
|
-
dialog: {
|
|
45367
|
-
sm: {
|
|
45368
|
-
inset: "[var(--_inset) var(--_inset) var(--_offset) var(--_inset)]",
|
|
45369
|
-
width: "calc(100vw - 2 * var(--_inset))",
|
|
45370
|
-
height: "calc(100vh - var(--_offset) - var(--_inset))",
|
|
45371
|
-
[borderRadius]: "6px",
|
|
45372
|
-
padding: "1.5",
|
|
45373
|
-
// 6px
|
|
45374
|
-
[offset]: "1rem"
|
|
45375
|
-
},
|
|
45376
|
-
md: {
|
|
45377
|
-
[offset]: "1rem"
|
|
45378
|
-
},
|
|
45379
|
-
lg: {
|
|
45380
|
-
[offset]: "2rem"
|
|
45381
|
-
},
|
|
45382
|
-
xl: {
|
|
45383
|
-
[offset]: "4rem"
|
|
45384
|
-
}
|
|
45385
|
-
},
|
|
45386
|
-
body: {
|
|
45387
|
-
sm: {
|
|
45388
|
-
borderRadius: `calc(var(${borderRadius}) - 2px)`
|
|
45389
|
-
}
|
|
45390
|
-
}
|
|
45391
|
-
},
|
|
45392
|
-
true: {
|
|
45393
|
-
dialog: {
|
|
45394
|
-
inset: "0",
|
|
45395
|
-
padding: "0"
|
|
45396
|
-
}
|
|
45397
|
-
}
|
|
45398
|
-
},
|
|
45399
|
-
// transparent: {
|
|
45400
|
-
// false: {
|
|
45401
|
-
// },
|
|
45402
|
-
// true: {
|
|
45403
|
-
// dialog: {
|
|
45404
|
-
// background: 'transparent',
|
|
45405
|
-
// },
|
|
45406
|
-
// },
|
|
45407
|
-
// },
|
|
45408
|
-
withBackdrop: {
|
|
45409
|
-
false: {
|
|
45410
|
-
dialog: {
|
|
45411
|
-
_backdrop: {
|
|
45412
|
-
display: "none"
|
|
45413
|
-
}
|
|
45414
|
-
}
|
|
45415
|
-
},
|
|
45416
|
-
true: {
|
|
45417
|
-
dialog: {
|
|
45418
|
-
_backdrop: {
|
|
45419
|
-
backdropFilter: `blur(var(${backdropBlur}))`,
|
|
45420
|
-
backgroundColor: {
|
|
45421
|
-
_dark: `[rgb(34 34 34 / var(${backdropOpacity}))]`,
|
|
45422
|
-
_light: `[rgb(15 15 15/ var(${backdropOpacity}))]`
|
|
45423
|
-
}
|
|
45424
|
-
}
|
|
45425
|
-
}
|
|
45426
|
-
}
|
|
45427
|
-
}
|
|
45428
|
-
},
|
|
45429
|
-
defaultVariants: {
|
|
45430
|
-
fullscreen: !1,
|
|
45431
|
-
withBackdrop: !0
|
|
45432
|
-
}
|
|
45433
|
-
}), Overlay = forwardRef(({
|
|
45434
|
-
onClose,
|
|
45435
|
-
className,
|
|
45436
|
-
classes: classes2,
|
|
45437
|
-
overlayLevel = 0,
|
|
45438
|
-
children: children2,
|
|
45439
|
-
fullscreen = !1,
|
|
45440
|
-
withBackdrop = !0,
|
|
45441
|
-
backdrop,
|
|
45442
|
-
openDelay = 130,
|
|
45443
|
-
...rest
|
|
45444
|
-
}, ref) => {
|
|
45445
|
-
const [opened, setOpened] = useState(openDelay === 0), focusTrapRef = useFocusTrap(opened), dialogRef = useRef(null), isClosingRef = useRef(!1), motionNotReduced = useReducedMotionConfig() !== !0, onCloseRef = useRef(onClose);
|
|
45446
|
-
onCloseRef.current = onClose;
|
|
45447
|
-
const close = useDebouncedCallback(
|
|
45448
|
-
() => {
|
|
45449
|
-
isClosingRef.current || (isClosingRef.current = !0, onCloseRef.current());
|
|
45450
|
-
},
|
|
45451
|
-
[],
|
|
45452
|
-
50
|
|
45453
|
-
);
|
|
45454
|
-
useLayoutEffect$1(() => {
|
|
45455
|
-
dialogRef.current?.open || dialogRef.current?.showModal();
|
|
45456
|
-
}, []), useTimeoutEffect(() => {
|
|
45457
|
-
setOpened(!0);
|
|
45458
|
-
}, openDelay > 0 ? openDelay : void 0);
|
|
45459
|
-
const styles = overlay({
|
|
45460
|
-
fullscreen,
|
|
45461
|
-
withBackdrop
|
|
45462
|
-
});
|
|
45463
|
-
let targetBackdropOpacity = overlayLevel > 0 ? "50%" : "60%";
|
|
45464
|
-
return backdrop?.opacity !== void 0 && (targetBackdropOpacity = `${backdrop.opacity * 100}%`), /* @__PURE__ */ jsx(
|
|
45465
|
-
m$4.dialog,
|
|
45466
|
-
{
|
|
45467
|
-
ref: useMergedRef(
|
|
45468
|
-
dialogRef,
|
|
45469
|
-
focusTrapRef,
|
|
45470
|
-
ref
|
|
45471
|
-
),
|
|
45472
|
-
className: cx(
|
|
45473
|
-
classes2?.dialog,
|
|
45474
|
-
className,
|
|
45475
|
-
styles.dialog,
|
|
45476
|
-
fullscreen && RemoveScroll.classNames.fullWidth
|
|
45477
|
-
),
|
|
45478
|
-
layout: !0,
|
|
45479
|
-
style: {
|
|
45480
|
-
// @ts-ignore
|
|
45481
|
-
[level]: overlayLevel
|
|
45482
|
-
},
|
|
45483
|
-
...motionNotReduced ? {
|
|
45484
|
-
initial: {
|
|
45485
|
-
[backdropBlur]: "0px",
|
|
45486
|
-
[backdropOpacity]: "0%",
|
|
45487
|
-
scale: 0.95,
|
|
45488
|
-
originY: 0,
|
|
45489
|
-
translateY: -20,
|
|
45490
|
-
opacity: 0
|
|
45491
|
-
},
|
|
45492
|
-
animate: {
|
|
45493
|
-
[backdropBlur]: overlayLevel > 0 ? "4px" : "8px",
|
|
45494
|
-
[backdropOpacity]: targetBackdropOpacity,
|
|
45495
|
-
scale: 1,
|
|
45496
|
-
opacity: 1,
|
|
45497
|
-
translateY: 0,
|
|
45498
|
-
transition: {
|
|
45499
|
-
delay: 0.075
|
|
45500
|
-
}
|
|
45501
|
-
},
|
|
45502
|
-
exit: {
|
|
45503
|
-
opacity: 0,
|
|
45504
|
-
scale: 0.98,
|
|
45505
|
-
translateY: -20,
|
|
45506
|
-
transition: {
|
|
45507
|
-
duration: 0.1
|
|
45508
|
-
},
|
|
45509
|
-
[backdropBlur]: "0px",
|
|
45510
|
-
[backdropOpacity]: "0%"
|
|
45511
|
-
}
|
|
45512
|
-
} : {
|
|
45513
|
-
initial: {
|
|
45514
|
-
[backdropBlur]: "8px",
|
|
45515
|
-
[backdropOpacity]: targetBackdropOpacity
|
|
45516
|
-
}
|
|
45517
|
-
},
|
|
45518
|
-
onClick: (e2) => {
|
|
45519
|
-
if (e2.stopPropagation(), e2.target?.nodeName?.toUpperCase() === "DIALOG") {
|
|
45520
|
-
dialogRef.current?.close();
|
|
45521
|
-
return;
|
|
45522
|
-
}
|
|
45523
|
-
},
|
|
45524
|
-
onCancel: (e2) => {
|
|
45525
|
-
e2.preventDefault(), e2.stopPropagation(), close();
|
|
45526
|
-
},
|
|
45527
|
-
onDoubleClick: stopPropagation,
|
|
45528
|
-
onPointerDown: stopPropagation,
|
|
45529
|
-
onClose: (e2) => {
|
|
45530
|
-
e2.stopPropagation(), close();
|
|
45531
|
-
},
|
|
45532
|
-
...rest,
|
|
45533
|
-
children: /* @__PURE__ */ jsx(RemoveScroll, { forwardProps: !0, children: /* @__PURE__ */ jsx(
|
|
45534
|
-
"div",
|
|
45535
|
-
{
|
|
45536
|
-
className: cx(
|
|
45537
|
-
classes2?.body,
|
|
45538
|
-
styles.body,
|
|
45539
|
-
"overlay-body"
|
|
45540
|
-
),
|
|
45541
|
-
children: opened && /* @__PURE__ */ jsx(Fragment$1, { children: children2 })
|
|
45542
|
-
}
|
|
45543
|
-
) })
|
|
45544
|
-
}
|
|
45545
|
-
);
|
|
45546
|
-
});
|
|
45547
|
-
Overlay.displayName = "Overlay";
|
|
45548
45637
|
const finalize = (elements, explicits) => elements.size > 2 && explicits.size !== elements.size ? new Set(sortParentsFirst([
|
|
45549
45638
|
...treeFromElements$1(elements).flatten(),
|
|
45550
45639
|
...explicits
|
|
@@ -45558,7 +45647,7 @@ function computeEdgeDetailsViewData(edges, view) {
|
|
|
45558
45647
|
};
|
|
45559
45648
|
for (const edgeId of edges) {
|
|
45560
45649
|
const edge = view.findEdge(edgeId), _relationships = edge ? [...edge.relationships("model")] : [];
|
|
45561
|
-
if (!edge || !
|
|
45650
|
+
if (!edge || !i$8(_relationships, 1) || !edge.source.hasElement() || !edge.target.hasElement())
|
|
45562
45651
|
continue;
|
|
45563
45652
|
const source = edge.source.element, target = edge.target.element;
|
|
45564
45653
|
addExplicit(source, "source"), addExplicit(target, "target");
|
|
@@ -46243,7 +46332,7 @@ const selectSubject = (state) => ({
|
|
|
46243
46332
|
const actor = useRelationshipDetailsActor(), subject = xstateReact_cjsExports.useSelector(actor, selectSubject, deepEqual), likec4model = useLikeC4Model$1(), view = likec4model.findView(subject.viewId) ?? null, data = useMemo(() => {
|
|
46244
46333
|
let data2;
|
|
46245
46334
|
if ("edgeId" in subject && n$5(subject.edgeId)) {
|
|
46246
|
-
invariant$
|
|
46335
|
+
invariant$3(view, `view ${subject.viewId} not found`);
|
|
46247
46336
|
const edge = nonNullable(view.findEdge(subject.edgeId), `edge ${subject.edgeId} not found in ${subject.viewId}`);
|
|
46248
46337
|
data2 = computeEdgeDetailsViewData([edge.id], view);
|
|
46249
46338
|
} else if (subject.source && subject.target)
|
|
@@ -46344,7 +46433,7 @@ const selectSubject = (state) => ({
|
|
|
46344
46433
|
if (!view || !view.isDiagram())
|
|
46345
46434
|
return null;
|
|
46346
46435
|
const edges = [...view.edges()];
|
|
46347
|
-
let edge = "edgeId" in subject && n$5(subject.edgeId) ? edges.find((e2) => e2.id === subject.edgeId) : f(edges, (e2) => e2.source.element?.id === subject.source && e2.target.element?.id === subject.target) || f(edges, (e2) => (e2.source.element?.id === subject.source || isAncestor(e2.source.element?.id ?? "__", subject.source ?? "__")) && (e2.target.element?.id === subject.target || isAncestor(e2.target.element?.id ?? "__", subject.target ?? "__")));
|
|
46436
|
+
let edge = "edgeId" in subject && n$5(subject.edgeId) ? edges.find((e2) => e2.id === subject.edgeId) : f(edges, (e2) => e2.source.element?.id === subject.source && e2.target.element?.id === subject.target) || f(edges, (e2) => (e2.source.element?.id === subject.source || isAncestor$1(e2.source.element?.id ?? "__", subject.source ?? "__")) && (e2.target.element?.id === subject.target || isAncestor$1(e2.target.element?.id ?? "__", subject.target ?? "__")));
|
|
46348
46437
|
return edge ? /* @__PURE__ */ jsx(TopLeftPanelInner, { edge: edge.$edge, view: view.$view }) : null;
|
|
46349
46438
|
}), TopLeftPanelInner = ({ edge, view }) => {
|
|
46350
46439
|
const browser = useRelationshipDetails(), edgeId = edge.id, [historyEdgeId, historyOps, { history, current }] = useStateHistory(edge.id);
|
|
@@ -47010,7 +47099,7 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded }) {
|
|
|
47010
47099
|
component: "div",
|
|
47011
47100
|
highlight: searchTerms,
|
|
47012
47101
|
className: cx(elementId, btn$1.descriptionColor),
|
|
47013
|
-
children: nameFromFqn(element.id)
|
|
47102
|
+
children: nameFromFqn$1(element.id)
|
|
47014
47103
|
}
|
|
47015
47104
|
) })
|
|
47016
47105
|
] }),
|
|
@@ -47732,13 +47821,16 @@ const scrollArea = css({
|
|
|
47732
47821
|
fontSize: "xxs",
|
|
47733
47822
|
fontWeight: 500,
|
|
47734
47823
|
whiteSpace: "nowrap",
|
|
47735
|
-
|
|
47824
|
+
paddingX: "1",
|
|
47825
|
+
paddingY: "0.5",
|
|
47736
47826
|
borderRadius: "[2px]",
|
|
47737
|
-
background:
|
|
47738
|
-
|
|
47739
|
-
|
|
47827
|
+
background: {
|
|
47828
|
+
_light: "var(--likec4-palette-fill)/90",
|
|
47829
|
+
_dark: "var(--likec4-palette-fill)/60"
|
|
47830
|
+
},
|
|
47831
|
+
lineHeight: "1",
|
|
47740
47832
|
color: {
|
|
47741
|
-
_light: "
|
|
47833
|
+
_light: "var(--likec4-palette-hiContrast)",
|
|
47742
47834
|
_dark: "var(--likec4-palette-loContrast)"
|
|
47743
47835
|
}
|
|
47744
47836
|
}), title$1 = css({
|
|
@@ -47764,9 +47856,9 @@ function selectDiagramContext(c2) {
|
|
|
47764
47856
|
}
|
|
47765
47857
|
const RelationshipPopover = memo$2(() => {
|
|
47766
47858
|
const actorRef = xstateReact_cjsExports.useActorRef(RelationshipPopoverActorLogic), diagram = useDiagram(), { viewId, selected: selected2 } = useDiagramContext(selectDiagramContext), openedEdgeId = xstateReact_cjsExports.useSelector(actorRef, (s2) => s2.hasTag("opened") ? s2.context.edgeId : null);
|
|
47767
|
-
|
|
47859
|
+
useOnDiagramEvent("viewChange", () => {
|
|
47768
47860
|
actorRef.send({ type: "close" });
|
|
47769
|
-
}
|
|
47861
|
+
}), useOnDiagramEvent("edgeMouseEnter", ({ edge }) => {
|
|
47770
47862
|
actorRef.send({ type: "xyedge.mouseEnter", edgeId: edge.data.id });
|
|
47771
47863
|
}), useOnDiagramEvent("edgeMouseLeave", () => {
|
|
47772
47864
|
actorRef.send({ type: "xyedge.mouseLeave" });
|
|
@@ -47774,7 +47866,7 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47774
47866
|
actorRef.send({ type: "close" });
|
|
47775
47867
|
}), useOnDiagramEvent("walkthroughStarted", () => {
|
|
47776
47868
|
actorRef.send({ type: "close" });
|
|
47777
|
-
}),
|
|
47869
|
+
}), useEffect(() => {
|
|
47778
47870
|
selected2 ? actorRef.send({ type: "xyedge.select", edgeId: selected2 }) : actorRef.send({ type: "xyedge.unselect" });
|
|
47779
47871
|
}, [selected2]);
|
|
47780
47872
|
const onMouseEnter = useCallback((event) => {
|
|
@@ -47812,7 +47904,7 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47812
47904
|
onMouseLeave
|
|
47813
47905
|
}
|
|
47814
47906
|
);
|
|
47815
|
-
}), getEdgeLabelElement = (edgeId, container2) => container2?.querySelector(`.likec4-edge-label[data-edge-id="${edgeId}"]`) ?? null,
|
|
47907
|
+
}), getEdgeLabelElement = (edgeId, container2) => container2?.querySelector(`.likec4-edge-label[data-edge-id="${edgeId}"]`) ?? null, POPOVER_PADDING = 8, RelationshipPopoverInternal = ({
|
|
47816
47908
|
viewId,
|
|
47817
47909
|
diagramEdge,
|
|
47818
47910
|
sourceNode,
|
|
@@ -47820,21 +47912,21 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47820
47912
|
onMouseEnter,
|
|
47821
47913
|
onMouseLeave
|
|
47822
47914
|
}) => {
|
|
47823
|
-
const ref = useRef(null), { enableNavigateTo, enableVscode } = useEnabledFeatures(), { onOpenSource } = useDiagramEventHandlers(), { portalProps } = useMantinePortalProps(), [referenceEl, setReferenceEl] = useState(null)
|
|
47915
|
+
const ref = useRef(null), { enableNavigateTo, enableVscode } = useEnabledFeatures(), { onOpenSource } = useDiagramEventHandlers(), { portalProps } = useMantinePortalProps(), [referenceEl, setReferenceEl] = useState(null);
|
|
47824
47916
|
useEffect(() => {
|
|
47825
47917
|
setReferenceEl(getEdgeLabelElement(diagramEdge.id, portalProps?.target));
|
|
47826
|
-
}, [diagramEdge
|
|
47918
|
+
}, [diagramEdge]), useEffect(() => {
|
|
47827
47919
|
const reference = referenceEl, popper = ref.current;
|
|
47828
47920
|
if (!reference || !popper)
|
|
47829
47921
|
return;
|
|
47830
47922
|
let wasCanceled = !1;
|
|
47831
47923
|
const cleanup = autoUpdate(reference, popper, () => {
|
|
47832
47924
|
computePosition(reference, popper, {
|
|
47833
|
-
placement: "bottom",
|
|
47925
|
+
placement: "bottom-start",
|
|
47834
47926
|
middleware: [
|
|
47835
47927
|
offset$2(2),
|
|
47836
47928
|
autoPlacement({
|
|
47837
|
-
padding:
|
|
47929
|
+
padding: POPOVER_PADDING,
|
|
47838
47930
|
allowedPlacements: [
|
|
47839
47931
|
"bottom-start",
|
|
47840
47932
|
"bottom-end",
|
|
@@ -47847,21 +47939,24 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47847
47939
|
]
|
|
47848
47940
|
}),
|
|
47849
47941
|
size$1({
|
|
47850
|
-
padding:
|
|
47942
|
+
padding: POPOVER_PADDING,
|
|
47851
47943
|
apply({ availableHeight, availableWidth, elements }) {
|
|
47852
47944
|
wasCanceled || Object.assign(elements.floating.style, {
|
|
47853
|
-
maxWidth: `${u(roundDpr(availableWidth), { min:
|
|
47945
|
+
maxWidth: `${u(roundDpr(availableWidth), { min: 200, max: 400 })}px`,
|
|
47854
47946
|
maxHeight: `${u(roundDpr(availableHeight), { min: 0, max: 500 })}px`
|
|
47855
47947
|
});
|
|
47856
47948
|
}
|
|
47857
47949
|
}),
|
|
47858
47950
|
hide$1({
|
|
47859
|
-
padding:
|
|
47951
|
+
padding: POPOVER_PADDING * 2
|
|
47860
47952
|
})
|
|
47861
47953
|
]
|
|
47862
47954
|
}).then(({ x: x2, y: y2, middlewareData }) => {
|
|
47863
47955
|
wasCanceled || (popper.style.transform = `translate(${roundDpr(x2)}px, ${roundDpr(y2)}px)`, popper.style.visibility = middlewareData.hide?.referenceHidden ? "hidden" : "visible");
|
|
47864
47956
|
});
|
|
47957
|
+
}, {
|
|
47958
|
+
ancestorResize: !1,
|
|
47959
|
+
animationFrame: !0
|
|
47865
47960
|
});
|
|
47866
47961
|
return () => {
|
|
47867
47962
|
wasCanceled = !0, cleanup();
|
|
@@ -47919,7 +48014,7 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47919
48014
|
styles: {
|
|
47920
48015
|
viewport: {
|
|
47921
48016
|
overscrollBehavior: "contain",
|
|
47922
|
-
minWidth:
|
|
48017
|
+
minWidth: 180
|
|
47923
48018
|
}
|
|
47924
48019
|
},
|
|
47925
48020
|
className: cx(
|
|
@@ -47939,9 +48034,9 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47939
48034
|
VStack,
|
|
47940
48035
|
{
|
|
47941
48036
|
css: {
|
|
47942
|
-
gap: "3
|
|
48037
|
+
gap: "3",
|
|
47943
48038
|
padding: "4",
|
|
47944
|
-
paddingTop: "2
|
|
48039
|
+
paddingTop: "2"
|
|
47945
48040
|
},
|
|
47946
48041
|
children: [
|
|
47947
48042
|
/* @__PURE__ */ jsx(
|
|
@@ -47962,12 +48057,19 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47962
48057
|
}
|
|
47963
48058
|
),
|
|
47964
48059
|
direct.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
47965
|
-
/* @__PURE__ */ jsx(
|
|
48060
|
+
/* @__PURE__ */ jsx(Label, { children: "DIRECT RELATIONSHIPS" }),
|
|
47966
48061
|
direct.map(renderRelationship)
|
|
47967
48062
|
] }),
|
|
47968
48063
|
nested.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
47969
|
-
|
|
47970
|
-
|
|
48064
|
+
/* @__PURE__ */ jsx(
|
|
48065
|
+
Label,
|
|
48066
|
+
{
|
|
48067
|
+
css: {
|
|
48068
|
+
mt: direct.length > 0 ? "2" : "0"
|
|
48069
|
+
},
|
|
48070
|
+
children: "RESOLVED FROM NESTED"
|
|
48071
|
+
}
|
|
48072
|
+
),
|
|
47971
48073
|
nested.map(renderRelationship)
|
|
47972
48074
|
] })
|
|
47973
48075
|
]
|
|
@@ -47984,7 +48086,7 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47984
48086
|
onNavigateTo,
|
|
47985
48087
|
onOpenSource
|
|
47986
48088
|
}, ref) => {
|
|
47987
|
-
const sourceId =
|
|
48089
|
+
const sourceId = getEndpointId(r2, "source", sourceNode), targetId = getEndpointId(r2, "target", targetNode), navigateTo = onNavigateTo && r2.navigateTo?.id !== viewId ? r2.navigateTo?.id : void 0, links = r2.links;
|
|
47988
48090
|
return /* @__PURE__ */ jsxs(
|
|
47989
48091
|
VStack,
|
|
47990
48092
|
{
|
|
@@ -47992,8 +48094,8 @@ const RelationshipPopover = memo$2(() => {
|
|
|
47992
48094
|
className: bleed({
|
|
47993
48095
|
block: "2",
|
|
47994
48096
|
inline: "2",
|
|
47995
|
-
|
|
47996
|
-
|
|
48097
|
+
paddingY: "2.5",
|
|
48098
|
+
paddingX: "2",
|
|
47997
48099
|
gap: "1",
|
|
47998
48100
|
rounded: "sm",
|
|
47999
48101
|
backgroundColor: {
|
|
@@ -48004,42 +48106,40 @@ const RelationshipPopover = memo$2(() => {
|
|
|
48004
48106
|
}
|
|
48005
48107
|
}),
|
|
48006
48108
|
children: [
|
|
48007
|
-
/* @__PURE__ */
|
|
48008
|
-
/* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": sourceNode.color, className: endpoint, children: sourceId }),
|
|
48109
|
+
/* @__PURE__ */ jsx(HStack, { gap: "0.5", children: /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 200, children: [
|
|
48110
|
+
/* @__PURE__ */ jsx(Tooltip$1, { label: sourceId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": sourceNode.color, className: endpoint, children: sourceId.short }) }),
|
|
48009
48111
|
/* @__PURE__ */ jsx(IconArrowRight, { stroke: 2.5, size: "11px", opacity: 0.65 }),
|
|
48010
|
-
/* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": targetNode.color, className: endpoint, children: targetId }),
|
|
48011
|
-
/* @__PURE__ */
|
|
48012
|
-
|
|
48013
|
-
|
|
48014
|
-
|
|
48015
|
-
|
|
48016
|
-
|
|
48017
|
-
|
|
48018
|
-
|
|
48019
|
-
|
|
48020
|
-
|
|
48021
|
-
|
|
48022
|
-
|
|
48023
|
-
|
|
48024
|
-
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48028
|
-
|
|
48029
|
-
|
|
48030
|
-
|
|
48031
|
-
|
|
48032
|
-
|
|
48033
|
-
|
|
48034
|
-
|
|
48035
|
-
|
|
48036
|
-
|
|
48037
|
-
|
|
48038
|
-
|
|
48039
|
-
|
|
48040
|
-
|
|
48041
|
-
] })
|
|
48042
|
-
] }),
|
|
48112
|
+
/* @__PURE__ */ jsx(Tooltip$1, { label: targetId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": targetNode.color, className: endpoint, children: targetId.short }) }),
|
|
48113
|
+
navigateTo && /* @__PURE__ */ jsx(Tooltip$1, { label: "Open dynamic view", children: /* @__PURE__ */ jsx(
|
|
48114
|
+
ActionIcon$1,
|
|
48115
|
+
{
|
|
48116
|
+
size: "sm",
|
|
48117
|
+
radius: "sm",
|
|
48118
|
+
variant: "default",
|
|
48119
|
+
onClick: (event) => {
|
|
48120
|
+
event.stopPropagation(), onNavigateTo?.(navigateTo);
|
|
48121
|
+
},
|
|
48122
|
+
style: {
|
|
48123
|
+
alignSelf: "flex-end"
|
|
48124
|
+
},
|
|
48125
|
+
role: "button",
|
|
48126
|
+
children: /* @__PURE__ */ jsx(IconZoomScan, { size: "80%", stroke: 2 })
|
|
48127
|
+
}
|
|
48128
|
+
) }),
|
|
48129
|
+
onOpenSource && /* @__PURE__ */ jsx(Tooltip$1, { label: "Open source", children: /* @__PURE__ */ jsx(
|
|
48130
|
+
ActionIcon$1,
|
|
48131
|
+
{
|
|
48132
|
+
size: "sm",
|
|
48133
|
+
radius: "sm",
|
|
48134
|
+
variant: "default",
|
|
48135
|
+
onClick: (event) => {
|
|
48136
|
+
event.stopPropagation(), onOpenSource();
|
|
48137
|
+
},
|
|
48138
|
+
role: "button",
|
|
48139
|
+
children: /* @__PURE__ */ jsx(IconFileSymlink, { size: "80%", stroke: 2 })
|
|
48140
|
+
}
|
|
48141
|
+
) })
|
|
48142
|
+
] }) }),
|
|
48043
48143
|
/* @__PURE__ */ jsx(Box, { className: title$1, children: r2.title || "untitled" }),
|
|
48044
48144
|
r2.kind && /* @__PURE__ */ jsxs(HStack, { gap: "2", children: [
|
|
48045
48145
|
/* @__PURE__ */ jsx(Label, { children: "kind" }),
|
|
@@ -48074,13 +48174,13 @@ const RelationshipPopover = memo$2(() => {
|
|
|
48074
48174
|
]
|
|
48075
48175
|
}
|
|
48076
48176
|
);
|
|
48077
|
-
}), Label = styled("
|
|
48177
|
+
}), Label = styled("div", {
|
|
48078
48178
|
base: {
|
|
48079
|
-
display: "
|
|
48179
|
+
display: "block",
|
|
48080
48180
|
fontSize: "xxs",
|
|
48081
48181
|
fontWeight: 500,
|
|
48082
48182
|
userSelect: "none",
|
|
48083
|
-
lineHeight: "
|
|
48183
|
+
lineHeight: "sm",
|
|
48084
48184
|
color: "mantine.colors.dimmed"
|
|
48085
48185
|
}
|
|
48086
48186
|
}), Tooltip$1 = Tooltip$7.withProps({
|
|
@@ -48091,9 +48191,9 @@ const RelationshipPopover = memo$2(() => {
|
|
|
48091
48191
|
offset: 8,
|
|
48092
48192
|
withinPortal: !1
|
|
48093
48193
|
});
|
|
48094
|
-
function
|
|
48095
|
-
const diagramNodeId = r2.isDeploymentRelation() ? diagramNode.id : diagramNode.modelRef || "";
|
|
48096
|
-
return
|
|
48194
|
+
function getEndpointId(r2, endpoint2, diagramNode) {
|
|
48195
|
+
const diagramNodeId = r2.isDeploymentRelation() ? diagramNode.id : diagramNode.modelRef || "", full = r2[endpoint2].id, short = nameFromFqn(diagramNodeId) + full.slice(diagramNodeId.length);
|
|
48196
|
+
return { full, short };
|
|
48097
48197
|
}
|
|
48098
48198
|
const root = css({
|
|
48099
48199
|
height: "30px",
|
|
@@ -50160,7 +50260,7 @@ const channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), Hex =
|
|
|
50160
50260
|
for (const c2 in channels2)
|
|
50161
50261
|
adjustments[c2] = delta(ch[c2], channels2[c2], Utils.channel.max[c2]);
|
|
50162
50262
|
return adjust(color2, adjustments);
|
|
50163
|
-
}, globalsCss = ".likec4-shadow-root dialog{color:var(--mantine-color-text)}.likec4-root{overflow:hidden;position:relative;padding:0;margin:0;width:100%;height:100%;border:0px solid transparent;container-name:likec4-root;container-type:size}.likec4-root .react-flow:is(.not-initialized){opacity:0}.likec4-root .react-flow{contain:paint;--xy-background-color: var(--colors-likec4-background);--xy-background-pattern-color: var(--colors-likec4-background-pattern, var(--colors-likec4-background))}.likec4-root .react-flow:is(.bg-transparent){background:transparent!important;--xy-background-color: transparent !important}.likec4-root .react-flow .react-flow__pane{user-select:none;--webkit-user-select: none}.likec4-static-view .react-flow .react-flow__attribution{display:none}:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon{width:75%;height:75%}.likec4-root .likec4-edge-label-container{top:0;left:0;position:absolute;width:auto;height:auto}.likec4-root :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){opacity:.25}.likec4-root .likec4-edge-label-container:is([data-likec4-dimmed]){opacity:.25}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){filter:grayscale(85%)
|
|
50263
|
+
}, globalsCss = ".likec4-shadow-root dialog{color:var(--mantine-color-text)}.likec4-root{overflow:hidden;position:relative;padding:0;margin:0;width:100%;height:100%;border:0px solid transparent;container-name:likec4-root;container-type:size}.likec4-root .react-flow:is(.not-initialized){opacity:0}.likec4-root .react-flow{contain:paint;--xy-background-color: var(--colors-likec4-background);--xy-background-pattern-color: var(--colors-likec4-background-pattern, var(--colors-likec4-background))}.likec4-root .react-flow:is(.bg-transparent){background:transparent!important;--xy-background-color: transparent !important}.likec4-root .react-flow .react-flow__pane{user-select:none;--webkit-user-select: none}.likec4-static-view .react-flow .react-flow__attribution{display:none}:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon{width:75%;height:75%}.likec4-root .likec4-edge-label-container{top:0;left:0;position:absolute;width:auto;height:auto}.likec4-root :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){opacity:.25}.likec4-root .likec4-edge-label-container:is([data-likec4-dimmed]){opacity:.25}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){filter:grayscale(85%)}.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed]){filter:grayscale(85%)}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed=true]){transition-property:opacity,filter;transition-timing-function:cubic-bezier(.5,0,.2,1);transition-duration:.6s}.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed=true]){transition-property:opacity,filter;transition-timing-function:cubic-bezier(.5,0,.2,1);transition-duration:.6s}.likec4-root .react-flow :where(.react-flow__nodes,.react-flow__edges,.react-flow__edgelabel-renderer){display:contents}.likec4-root .react-flow__node.draggable:has(.likec4-compound-node){cursor:default}[data-mantine-color-scheme=dark] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>:where(svg,.likec4-edge-label-container){mix-blend-mode:plus-lighter}[data-mantine-color-scheme=light] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>:where(svg,.likec4-edge-label-container){mix-blend-mode:screen}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-stroke-width: 3;--xy-edge-stroke: var(--likec4-palette-relation-stroke);--xy-edge-stroke-selected: var(--likec4-palette-relation-stroke-selected);--xy-edge-label-color: var(--likec4-palette-relation-label);--xy-edge-label-background-color: var(--likec4-palette-relation-label-bg)}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container):is([data-likec4-hovered=true],[data-edge-active=true]){--xy-edge-stroke-width: 4;--xy-edge-stroke: var(--likec4-palette-relation-stroke-selected)}[data-mantine-color-scheme=dark] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 50%, transparent)}[data-mantine-color-scheme=light] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-color: color-mix(in srgb, var(--likec4-palette-relation-label), rgba(255 255 255 / .85) 40%);--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 60%, transparent)}", scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`, whenDark = scheme("dark"), whenLight = scheme("light"), MAX_DEPTH = 5, generateCompoundColors = (rootSelector, name, colors2, depth) => {
|
|
50164
50264
|
const compoundDarkColor = (color2) => toHex(
|
|
50165
50265
|
scale(color2, {
|
|
50166
50266
|
l: -22 - 5 * depth,
|
|
@@ -50171,7 +50271,7 @@ const channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), Hex =
|
|
|
50171
50271
|
l: -20 - 3 * depth,
|
|
50172
50272
|
s: -3 - 6 * depth
|
|
50173
50273
|
})
|
|
50174
|
-
), selector3 = `:where([data-likec4-color="${name}"][data-compound-depth="${depth}"])`;
|
|
50274
|
+
), selector3 = `:where(${rootSelector} [data-likec4-color="${name}"][data-compound-depth="${depth}"])`;
|
|
50175
50275
|
return `
|
|
50176
50276
|
${selector3} {
|
|
50177
50277
|
--likec4-palette-fill: ${compoundLightColor(colors2.elements.fill)};
|
|
@@ -50183,8 +50283,8 @@ ${whenDark} ${selector3} {
|
|
|
50183
50283
|
}
|
|
50184
50284
|
`.trim();
|
|
50185
50285
|
};
|
|
50186
|
-
function toStyle(name, colors2) {
|
|
50187
|
-
const selector3 = `:where([data-likec4-color=${name}])`;
|
|
50286
|
+
function toStyle(rootSelector, name, colors2) {
|
|
50287
|
+
const selector3 = `:where(${rootSelector} [data-likec4-color=${name}])`;
|
|
50188
50288
|
return [
|
|
50189
50289
|
`
|
|
50190
50290
|
${selector3} {
|
|
@@ -50204,37 +50304,67 @@ ${whenDark} ${selector3} {
|
|
|
50204
50304
|
}
|
|
50205
50305
|
|
|
50206
50306
|
`.trim(),
|
|
50207
|
-
...a$5(1, MAX_DEPTH + 1).map((depth) => generateCompoundColors(name, colors2, depth))
|
|
50307
|
+
...a$5(1, MAX_DEPTH + 1).map((depth) => generateCompoundColors(rootSelector, name, colors2, depth))
|
|
50208
50308
|
].join(`
|
|
50209
50309
|
`);
|
|
50210
50310
|
}
|
|
50211
|
-
|
|
50212
|
-
(color2) => toStyle(color2, {
|
|
50213
|
-
elements: defaultTheme.elements[color2],
|
|
50214
|
-
relationships: defaultTheme.relationships[color2]
|
|
50215
|
-
})
|
|
50216
|
-
).join(`
|
|
50217
|
-
`);
|
|
50218
|
-
function generateCustomColorStyles(customColors) {
|
|
50311
|
+
function generateCustomColorStyles(customColors, rootSelector) {
|
|
50219
50312
|
return C(
|
|
50220
50313
|
t$1(customColors),
|
|
50221
|
-
m$1(([name, color2]) => toStyle(name, color2)),
|
|
50314
|
+
m$1(([name, color2]) => toStyle(rootSelector, name, color2)),
|
|
50315
|
+
r$2(`
|
|
50316
|
+
`)
|
|
50317
|
+
);
|
|
50318
|
+
}
|
|
50319
|
+
function generateBuiltInColorStyles(rootSelector) {
|
|
50320
|
+
return C(
|
|
50321
|
+
ThemeColors,
|
|
50322
|
+
m$1(
|
|
50323
|
+
(color2) => toStyle(rootSelector, color2, {
|
|
50324
|
+
elements: defaultTheme.elements[color2],
|
|
50325
|
+
relationships: defaultTheme.relationships[color2]
|
|
50326
|
+
})
|
|
50327
|
+
),
|
|
50222
50328
|
r$2(`
|
|
50223
50329
|
`)
|
|
50224
50330
|
);
|
|
50225
50331
|
}
|
|
50226
|
-
function LikeC4Styles() {
|
|
50227
|
-
const nonce = useMantineStyleNonce()?.(), { customColors } = useLikeC4Specification(), customColorsStyles = customColors ? generateCustomColorStyles(customColors) : "";
|
|
50228
|
-
return /* @__PURE__ */ jsx(
|
|
50332
|
+
function LikeC4Styles({ id: id2 }) {
|
|
50333
|
+
const rootSelector = `#${id2}`, nonce = useMantineStyleNonce()?.(), { customColors } = useLikeC4Specification(), customColorsStyles = customColors ? generateCustomColorStyles(customColors, rootSelector) : "", builtInColors = generateBuiltInColorStyles(rootSelector);
|
|
50334
|
+
return /* @__PURE__ */ jsx(
|
|
50335
|
+
MemoizedStyles,
|
|
50336
|
+
{
|
|
50337
|
+
id: id2,
|
|
50338
|
+
nonce,
|
|
50339
|
+
customColorsStyles,
|
|
50340
|
+
builtInColors
|
|
50341
|
+
}
|
|
50342
|
+
);
|
|
50229
50343
|
}
|
|
50230
|
-
const MemoizedStyles = memo$2(({ nonce, customColorsStyles, builtInColors
|
|
50231
|
-
/* @__PURE__ */ jsx(
|
|
50232
|
-
|
|
50344
|
+
const MemoizedStyles = memo$2(({ id: id2, nonce, customColorsStyles, builtInColors }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
50345
|
+
/* @__PURE__ */ jsx(
|
|
50346
|
+
"style",
|
|
50347
|
+
{
|
|
50348
|
+
type: "text/css",
|
|
50349
|
+
"data-likec4-global": id2,
|
|
50350
|
+
dangerouslySetInnerHTML: { __html: globalsCss.replaceAll(".likec4-root", `#${id2}.likec4-root`) },
|
|
50351
|
+
nonce
|
|
50352
|
+
}
|
|
50353
|
+
),
|
|
50354
|
+
/* @__PURE__ */ jsx(
|
|
50355
|
+
"style",
|
|
50356
|
+
{
|
|
50357
|
+
type: "text/css",
|
|
50358
|
+
"data-likec4-colors": id2,
|
|
50359
|
+
dangerouslySetInnerHTML: { __html: builtInColors },
|
|
50360
|
+
nonce
|
|
50361
|
+
}
|
|
50362
|
+
),
|
|
50233
50363
|
customColorsStyles && /* @__PURE__ */ jsx(
|
|
50234
50364
|
"style",
|
|
50235
50365
|
{
|
|
50236
50366
|
type: "text/css",
|
|
50237
|
-
"data-likec4-custom-colors":
|
|
50367
|
+
"data-likec4-custom-colors": id2,
|
|
50238
50368
|
dangerouslySetInnerHTML: { __html: customColorsStyles },
|
|
50239
50369
|
nonce
|
|
50240
50370
|
}
|
|
@@ -50353,7 +50483,7 @@ function viewToNodesEdge$1(opts) {
|
|
|
50353
50483
|
break;
|
|
50354
50484
|
}
|
|
50355
50485
|
case isCompound: {
|
|
50356
|
-
invariant$
|
|
50486
|
+
invariant$3(!!modelFqn, "ModelRef expected"), xynodes.push(
|
|
50357
50487
|
{
|
|
50358
50488
|
...base,
|
|
50359
50489
|
type: "compound-element",
|
|
@@ -50383,7 +50513,7 @@ function viewToNodesEdge$1(opts) {
|
|
|
50383
50513
|
break;
|
|
50384
50514
|
}
|
|
50385
50515
|
default:
|
|
50386
|
-
invariant$
|
|
50516
|
+
invariant$3(!!modelFqn, "ModelRef expected"), xynodes.push(
|
|
50387
50517
|
{
|
|
50388
50518
|
...base,
|
|
50389
50519
|
type: "element",
|
|
@@ -50415,7 +50545,7 @@ function viewToNodesEdge$1(opts) {
|
|
|
50415
50545
|
id: edge.id,
|
|
50416
50546
|
label: edge.label,
|
|
50417
50547
|
technology: edge.technology,
|
|
50418
|
-
notes: edge.notes,
|
|
50548
|
+
notes: RichText.from(edge.notes),
|
|
50419
50549
|
navigateTo: edge.navigateTo,
|
|
50420
50550
|
controlPoints: edge.controlPoints ?? null,
|
|
50421
50551
|
labelBBox: edge.labelBBox ?? null,
|
|
@@ -50551,7 +50681,7 @@ function viewToNodesEdge(view) {
|
|
|
50551
50681
|
break;
|
|
50552
50682
|
}
|
|
50553
50683
|
default:
|
|
50554
|
-
invariant$
|
|
50684
|
+
invariant$3(fqn2, "Element should have either modelRef or deploymentRef"), xynodes.push(
|
|
50555
50685
|
{
|
|
50556
50686
|
...base,
|
|
50557
50687
|
type: "element",
|
|
@@ -50635,7 +50765,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50635
50765
|
xynodes: updateNodes(nodes, next.xynodes),
|
|
50636
50766
|
xyedges: updateEdges(edges, next.xyedges)
|
|
50637
50767
|
};
|
|
50638
|
-
}, parent = nonNullable(self2._parent);
|
|
50768
|
+
}, parent = nonNullable$1(self2._parent);
|
|
50639
50769
|
let zoom2 = xyflow2.getZoom();
|
|
50640
50770
|
const maxZoom = Math.max(zoom2, 1), nextviewport = getViewportForBounds(update.bounds, width, height, MinZoom, maxZoom, ViewPadding), nextSubjectNode = next.xynodes.find(
|
|
50641
50771
|
(n2) => n2.type !== "empty" && n2.data.column === "subjects" && n2.data.fqn === subjectId
|
|
@@ -50679,7 +50809,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50679
50809
|
type: "update.xydata",
|
|
50680
50810
|
xynodes: currentNodes,
|
|
50681
50811
|
xyedges: []
|
|
50682
|
-
}), await delay$1(120), next.xynodes = next.xynodes.map(setDimmed(!1)), signal.aborted || (await xyflow2.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, { zoom: zoom2, duration: 300 }), await xyflow2.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom: zoom2 })), updateXYData();
|
|
50812
|
+
}), await delay$1(120), next.xynodes = next.xynodes.map(Base.setDimmed(!1)), signal.aborted || (await xyflow2.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, { zoom: zoom2, duration: 300 }), await xyflow2.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom: zoom2 })), updateXYData();
|
|
50683
50813
|
}), relationshipsBrowserLogic = xstate_cjsExports.setup({
|
|
50684
50814
|
types: {
|
|
50685
50815
|
context: {},
|
|
@@ -50872,10 +51002,10 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50872
51002
|
xstate_cjsExports.assign({
|
|
50873
51003
|
xyedges: ({ context: context2, event }) => {
|
|
50874
51004
|
const hasDimmed = context2.xyedges.some((edge) => edge.data.dimmed !== !1 || edge.selected);
|
|
50875
|
-
return context2.xyedges.map((edge) => edge.id === event.edge.id ? setData(edge, {
|
|
51005
|
+
return context2.xyedges.map((edge) => edge.id === event.edge.id ? Base.setData(edge, {
|
|
50876
51006
|
hovered: !0,
|
|
50877
51007
|
dimmed: !1
|
|
50878
|
-
}) : hasDimmed && !edge.selected ? setDimmed(edge, "immediate") : edge);
|
|
51008
|
+
}) : hasDimmed && !edge.selected ? Base.setDimmed(edge, "immediate") : edge);
|
|
50879
51009
|
}
|
|
50880
51010
|
}),
|
|
50881
51011
|
xstate_cjsExports.cancel("undim.edges"),
|
|
@@ -50886,7 +51016,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50886
51016
|
"xyflow.edgeMouseLeave": {
|
|
50887
51017
|
actions: [
|
|
50888
51018
|
xstate_cjsExports.assign({
|
|
50889
|
-
xyedges: ({ context: context2, event }) => context2.xyedges.map((edge) => edge.id === event.edge.id ? setHovered(edge, !1) : edge)
|
|
51019
|
+
xyedges: ({ context: context2, event }) => context2.xyedges.map((edge) => edge.id === event.edge.id ? Base.setHovered(edge, !1) : edge)
|
|
50890
51020
|
}),
|
|
50891
51021
|
xstate_cjsExports.cancel("dim.nonhovered.edges"),
|
|
50892
51022
|
xstate_cjsExports.raise({ type: "undim.edges" }, { id: "undim.edges", delay: 400 })
|
|
@@ -50895,13 +51025,13 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50895
51025
|
"dim.nonhovered.edges": {
|
|
50896
51026
|
actions: xstate_cjsExports.assign({
|
|
50897
51027
|
xyedges: ({ context: context2 }) => context2.xyedges.map(
|
|
50898
|
-
(edge) => edge.data.hovered ? edge : setDimmed(edge, edge.data.dimmed === "immediate" ? "immediate" : !0)
|
|
51028
|
+
(edge) => edge.data.hovered ? edge : Base.setDimmed(edge, edge.data.dimmed === "immediate" ? "immediate" : !0)
|
|
50899
51029
|
)
|
|
50900
51030
|
})
|
|
50901
51031
|
},
|
|
50902
51032
|
"undim.edges": {
|
|
50903
51033
|
actions: xstate_cjsExports.assign({
|
|
50904
|
-
xyedges: ({ context: context2 }) => context2.xyedges.map(setDimmed(!1))
|
|
51034
|
+
xyedges: ({ context: context2 }) => context2.xyedges.map(Base.setDimmed(!1))
|
|
50905
51035
|
})
|
|
50906
51036
|
},
|
|
50907
51037
|
"xyflow.selectionChange": {
|
|
@@ -50918,9 +51048,9 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
50918
51048
|
input: ({ context: context2 }) => ({
|
|
50919
51049
|
subjectId: context2.subject,
|
|
50920
51050
|
navigateFromNode: context2.navigateFromNode,
|
|
50921
|
-
xyflow: nonNullable(context2.xyflow),
|
|
50922
|
-
xystore: nonNullable(context2.xystore),
|
|
50923
|
-
update: nonNullable(context2.layouted)
|
|
51051
|
+
xyflow: nonNullable$1(context2.xyflow),
|
|
51052
|
+
xystore: nonNullable$1(context2.xystore),
|
|
51053
|
+
update: nonNullable$1(context2.layouted)
|
|
50924
51054
|
}),
|
|
50925
51055
|
onDone: {
|
|
50926
51056
|
target: "idle",
|
|
@@ -51145,7 +51275,7 @@ function layoutResultToXYFlow(layout2) {
|
|
|
51145
51275
|
};
|
|
51146
51276
|
}
|
|
51147
51277
|
function inputToSubject(input2) {
|
|
51148
|
-
return "edgeId" in input2 ? (invariant$
|
|
51278
|
+
return "edgeId" in input2 ? (invariant$3(t$3(input2.edgeId), "edgeId is required"), {
|
|
51149
51279
|
edgeId: input2.edgeId
|
|
51150
51280
|
}) : {
|
|
51151
51281
|
source: input2.source,
|
|
@@ -51163,7 +51293,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
51163
51293
|
let { duration, bounds } = params ?? {};
|
|
51164
51294
|
duration ??= 450;
|
|
51165
51295
|
const { xyflow: xyflow2, xystore } = context2;
|
|
51166
|
-
invariant$
|
|
51296
|
+
invariant$3(xyflow2, "xyflow is not initialized"), invariant$3(xystore, "xystore is not initialized"), bounds ??= context2.bounds;
|
|
51167
51297
|
const maxZoom = Math.max(xyflow2.getZoom(), 1);
|
|
51168
51298
|
if (bounds) {
|
|
51169
51299
|
const { width, height } = xystore.getState(), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, 0.1);
|
|
@@ -51177,7 +51307,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
51177
51307
|
});
|
|
51178
51308
|
},
|
|
51179
51309
|
"xyflow:updateNodeInternals": ({ context: context2 }) => {
|
|
51180
|
-
invariant$
|
|
51310
|
+
invariant$3(context2.xystore, "xystore is not initialized");
|
|
51181
51311
|
const { domNode, updateNodeInternals: updateNodeInternals2 } = context2.xystore.getState(), nodeIds = new Set(context2.xyedges.flatMap((e2) => [e2.source, e2.target]));
|
|
51182
51312
|
if (nodeIds.size === 0 || !domNode)
|
|
51183
51313
|
return;
|
|
@@ -51276,10 +51406,10 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
51276
51406
|
const hasDimmed = context2.xyedges.some(
|
|
51277
51407
|
(edge) => edge.data.dimmed === !0 || edge.data.dimmed === "immediate"
|
|
51278
51408
|
);
|
|
51279
|
-
return context2.xyedges.map((edge) => edge.id === event.edge.id ? setData(edge, {
|
|
51409
|
+
return context2.xyedges.map((edge) => edge.id === event.edge.id ? Base.setData(edge, {
|
|
51280
51410
|
hovered: !0,
|
|
51281
51411
|
dimmed: !1
|
|
51282
|
-
}) : hasDimmed && !edge.selected ? setDimmed(edge, "immediate") : edge);
|
|
51412
|
+
}) : hasDimmed && !edge.selected ? Base.setDimmed(edge, "immediate") : edge);
|
|
51283
51413
|
}
|
|
51284
51414
|
}),
|
|
51285
51415
|
xstate_cjsExports.cancel("undim.edges"),
|
|
@@ -51290,7 +51420,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
51290
51420
|
"xyflow.edgeMouseLeave": {
|
|
51291
51421
|
actions: [
|
|
51292
51422
|
xstate_cjsExports.assign({
|
|
51293
|
-
xyedges: ({ context: context2, event }) => context2.xyedges.map((edge) => edge.id === event.edge.id ? setHovered(edge, !1) : edge)
|
|
51423
|
+
xyedges: ({ context: context2, event }) => context2.xyedges.map((edge) => edge.id === event.edge.id ? Base.setHovered(edge, !1) : edge)
|
|
51294
51424
|
}),
|
|
51295
51425
|
xstate_cjsExports.cancel("dim.nonhovered.edges"),
|
|
51296
51426
|
xstate_cjsExports.raise({ type: "undim.edges" }, { id: "undim.edges", delay: 400 })
|
|
@@ -51298,14 +51428,14 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
51298
51428
|
},
|
|
51299
51429
|
"dim.nonhovered.edges": {
|
|
51300
51430
|
actions: xstate_cjsExports.assign({
|
|
51301
|
-
xyedges: ({ context: context2 }) => context2.xyedges.map((edge) => setDimmed(edge, edge.data.hovered !== !0))
|
|
51431
|
+
xyedges: ({ context: context2 }) => context2.xyedges.map((edge) => Base.setDimmed(edge, edge.data.hovered !== !0))
|
|
51302
51432
|
})
|
|
51303
51433
|
},
|
|
51304
51434
|
"undim.edges": {
|
|
51305
51435
|
actions: xstate_cjsExports.assign({
|
|
51306
51436
|
xyedges: ({ context: context2 }) => context2.xyedges.some((edge) => edge.selected === !0) ? context2.xyedges.map(
|
|
51307
|
-
(edge) => setDimmed(edge, edge.selected !== !0 ? edge.data.dimmed || "immediate" : !1)
|
|
51308
|
-
) : context2.xyedges.map(setDimmed(!1))
|
|
51437
|
+
(edge) => Base.setDimmed(edge, edge.selected !== !0 ? edge.data.dimmed || "immediate" : !1)
|
|
51438
|
+
) : context2.xyedges.map(Base.setDimmed(!1))
|
|
51309
51439
|
})
|
|
51310
51440
|
},
|
|
51311
51441
|
"xyflow.selectionChange": {
|
|
@@ -51848,7 +51978,7 @@ class GridAligner extends Aligner {
|
|
|
51848
51978
|
Array.from(layout2.nodePositions),
|
|
51849
51979
|
m$1(([id2, position]) => {
|
|
51850
51980
|
const originalRect = originalRects.get(id2);
|
|
51851
|
-
return invariant$
|
|
51981
|
+
return invariant$3(originalRect, `Could not find original rect for node ${id2}`), [i$6(originalRect, ["x", "y"]), position];
|
|
51852
51982
|
}),
|
|
51853
51983
|
m$1(
|
|
51854
51984
|
([original, suggested]) => Math.abs(original[this.secondaryAxisCoord] - suggested[this.secondaryAxisCoord])
|
|
@@ -51860,7 +51990,7 @@ class GridAligner extends Aligner {
|
|
|
51860
51990
|
}
|
|
51861
51991
|
getGapsPositions(layer) {
|
|
51862
51992
|
const result = [], { layout: layout2, nodes } = layer;
|
|
51863
|
-
invariant$
|
|
51993
|
+
invariant$3(layout2, "Layout of the layer must be computed before calling getGapsPositions");
|
|
51864
51994
|
for (let i2 = 1; i2 < nodes.length; i2++) {
|
|
51865
51995
|
const previousNode = nodes[i2 - 1], currentNode = nodes[i2], previousNodePosition = layout2.nodePositions.get(previousNode.id), currentNodePosition = layout2.nodePositions.get(currentNode.id);
|
|
51866
51996
|
result.push(
|
|
@@ -51871,7 +52001,7 @@ class GridAligner extends Aligner {
|
|
|
51871
52001
|
}
|
|
51872
52002
|
getNodePositions(layer) {
|
|
51873
52003
|
const result = [], { layout: layout2, nodes } = layer;
|
|
51874
|
-
invariant$
|
|
52004
|
+
invariant$3(layout2, "Layout of the layer must be computed before calling getGapsPositions");
|
|
51875
52005
|
for (let i2 = 0; i2 < nodes.length; i2++) {
|
|
51876
52006
|
const node2 = nodes[i2], nodePosition = layout2.nodePositions.get(node2.id);
|
|
51877
52007
|
result.push(
|
|
@@ -52018,15 +52148,15 @@ function focusNodesEdges(params) {
|
|
|
52018
52148
|
const { xynodes: _xynodes, xyedges: _xyedges, focusedNode } = params.context;
|
|
52019
52149
|
if (!focusedNode)
|
|
52020
52150
|
return {};
|
|
52021
|
-
const focused = /* @__PURE__ */ new Set([focusedNode]), xyedges = _xyedges.map((edge) => edge.source === focusedNode || edge.target === focusedNode ? (focused.add(edge.source), focused.add(edge.target), setData(edge, {
|
|
52151
|
+
const focused = /* @__PURE__ */ new Set([focusedNode]), xyedges = _xyedges.map((edge) => edge.source === focusedNode || edge.target === focusedNode ? (focused.add(edge.source), focused.add(edge.target), Base.setData(edge, {
|
|
52022
52152
|
dimmed: !1,
|
|
52023
52153
|
active: !0
|
|
52024
|
-
})) : setData(edge, {
|
|
52154
|
+
})) : Base.setData(edge, {
|
|
52025
52155
|
dimmed: !0,
|
|
52026
52156
|
active: !1
|
|
52027
52157
|
}));
|
|
52028
52158
|
return {
|
|
52029
|
-
xynodes: _xynodes.map((n2) => setDimmed(n2, !focused.has(n2.id))),
|
|
52159
|
+
xynodes: _xynodes.map((n2) => Base.setDimmed(n2, !focused.has(n2.id))),
|
|
52030
52160
|
xyedges
|
|
52031
52161
|
};
|
|
52032
52162
|
}
|
|
@@ -52107,7 +52237,7 @@ function navigateBack({ context: context2 }) {
|
|
|
52107
52237
|
history
|
|
52108
52238
|
}
|
|
52109
52239
|
} = context2;
|
|
52110
|
-
invariant$
|
|
52240
|
+
invariant$3(currentIndex > 0, "Cannot navigate back");
|
|
52111
52241
|
const stepCurrent = history[currentIndex], stepBack = history[currentIndex - 1];
|
|
52112
52242
|
return {
|
|
52113
52243
|
navigationHistory: {
|
|
@@ -52128,7 +52258,7 @@ function navigateForward({ context: context2 }) {
|
|
|
52128
52258
|
history
|
|
52129
52259
|
}
|
|
52130
52260
|
} = context2;
|
|
52131
|
-
invariant$
|
|
52261
|
+
invariant$3(currentIndex < history.length - 1, "Cannot navigate forward");
|
|
52132
52262
|
const stepCurrent = history[currentIndex], stepForward = history[currentIndex + 1];
|
|
52133
52263
|
return {
|
|
52134
52264
|
navigationHistory: {
|
|
@@ -52213,14 +52343,14 @@ function updateActiveWalkthrough({ context: context2 }) {
|
|
|
52213
52343
|
return {
|
|
52214
52344
|
xyedges: context2.xyedges.map((edge) => {
|
|
52215
52345
|
const active = stepId === edge.id || !!parallelPrefix && edge.id.startsWith(parallelPrefix);
|
|
52216
|
-
return setData(edge, {
|
|
52346
|
+
return Base.setData(edge, {
|
|
52217
52347
|
active,
|
|
52218
52348
|
dimmed: !active
|
|
52219
52349
|
});
|
|
52220
52350
|
}),
|
|
52221
52351
|
xynodes: context2.xynodes.map((node2) => {
|
|
52222
52352
|
const dimmed = step.source !== node2.id && step.target !== node2.id;
|
|
52223
|
-
return setDimmed(node2, dimmed);
|
|
52353
|
+
return Base.setDimmed(node2, dimmed);
|
|
52224
52354
|
})
|
|
52225
52355
|
};
|
|
52226
52356
|
}
|
|
@@ -52483,7 +52613,7 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
52483
52613
|
},
|
|
52484
52614
|
"xyflow:setViewportCenter": ({ context: context2 }, params) => {
|
|
52485
52615
|
const { x: x2, y: y2 } = params;
|
|
52486
|
-
invariant$
|
|
52616
|
+
invariant$3(context2.xyflow, "xyflow is not initialized");
|
|
52487
52617
|
const zoom2 = context2.xyflow.getZoom();
|
|
52488
52618
|
context2.xyflow.setCenter(Math.round(x2), Math.round(y2), { zoom: zoom2 });
|
|
52489
52619
|
},
|
|
@@ -52574,16 +52704,16 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
52574
52704
|
});
|
|
52575
52705
|
}),
|
|
52576
52706
|
onNodeMouseEnter: xstate_cjsExports.assign(({ context: context2 }, params) => ({
|
|
52577
|
-
xynodes: context2.xynodes.map((n2) => n2.id === params.node.id ? setHovered(n2, !0) : n2)
|
|
52707
|
+
xynodes: context2.xynodes.map((n2) => n2.id === params.node.id ? Base.setHovered(n2, !0) : n2)
|
|
52578
52708
|
})),
|
|
52579
52709
|
onNodeMouseLeave: xstate_cjsExports.assign(({ context: context2 }, params) => ({
|
|
52580
|
-
xynodes: context2.xynodes.map((n2) => n2.id === params.node.id ? setHovered(n2, !1) : n2)
|
|
52710
|
+
xynodes: context2.xynodes.map((n2) => n2.id === params.node.id ? Base.setHovered(n2, !1) : n2)
|
|
52581
52711
|
})),
|
|
52582
52712
|
onEdgeMouseEnter: xstate_cjsExports.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
52583
52713
|
xstate_cjsExports.assertEvent(event, "xyflow.edgeMouseEnter");
|
|
52584
52714
|
let edge = event.edge;
|
|
52585
52715
|
enqueue.assign({
|
|
52586
|
-
xyedges: context2.xyedges.map((e2) => e2.id === event.edge.id ? (edge = setHovered(e2, !0), edge) : e2)
|
|
52716
|
+
xyedges: context2.xyedges.map((e2) => e2.id === event.edge.id ? (edge = Base.setHovered(e2, !0), edge) : e2)
|
|
52587
52717
|
}), enqueue.emit({
|
|
52588
52718
|
type: "edgeMouseEnter",
|
|
52589
52719
|
edge,
|
|
@@ -52594,7 +52724,7 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
52594
52724
|
xstate_cjsExports.assertEvent(event, "xyflow.edgeMouseLeave");
|
|
52595
52725
|
let edge = event.edge;
|
|
52596
52726
|
enqueue.assign({
|
|
52597
|
-
xyedges: context2.xyedges.map((e2) => e2.id === event.edge.id ? (edge = setHovered(e2, !1), edge) : e2)
|
|
52727
|
+
xyedges: context2.xyedges.map((e2) => e2.id === event.edge.id ? (edge = Base.setHovered(e2, !1), edge) : e2)
|
|
52598
52728
|
}), enqueue.emit({
|
|
52599
52729
|
type: "edgeMouseLeave",
|
|
52600
52730
|
edge,
|
|
@@ -52607,17 +52737,17 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
52607
52737
|
return {
|
|
52608
52738
|
xynodes: context2.xynodes.map((n2) => {
|
|
52609
52739
|
const node2 = findDiagramNode(context2, n2.id);
|
|
52610
|
-
return node2 && node2.notation === params.notation.title && node2.shape === params.notation.shape && node2.color === params.notation.color && kinds.includes(node2.kind) ? setDimmed(n2, !1) : setDimmed(n2, "immediate");
|
|
52740
|
+
return node2 && node2.notation === params.notation.title && node2.shape === params.notation.shape && node2.color === params.notation.color && kinds.includes(node2.kind) ? Base.setDimmed(n2, !1) : Base.setDimmed(n2, "immediate");
|
|
52611
52741
|
}),
|
|
52612
|
-
xyedges: context2.xyedges.map(setDimmed("immediate"))
|
|
52742
|
+
xyedges: context2.xyedges.map(Base.setDimmed("immediate"))
|
|
52613
52743
|
};
|
|
52614
52744
|
}),
|
|
52615
52745
|
"tag.highlight": xstate_cjsExports.assign(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "tag.highlight"), {
|
|
52616
|
-
xynodes: context2.xynodes.map((n2) => n2.data.tags?.includes(event.tag) ? setDimmed(n2, !1) : setDimmed(n2, !0))
|
|
52746
|
+
xynodes: context2.xynodes.map((n2) => n2.data.tags?.includes(event.tag) ? Base.setDimmed(n2, !1) : Base.setDimmed(n2, !0))
|
|
52617
52747
|
})),
|
|
52618
52748
|
"undim everything": xstate_cjsExports.assign(({ context: context2 }) => ({
|
|
52619
|
-
xynodes: context2.xynodes.map(setDimmed(!1)),
|
|
52620
|
-
xyedges: context2.xyedges.map(setData({
|
|
52749
|
+
xynodes: context2.xynodes.map(Base.setDimmed(!1)),
|
|
52750
|
+
xyedges: context2.xyedges.map(Base.setData({
|
|
52621
52751
|
dimmed: !1,
|
|
52622
52752
|
active: !1
|
|
52623
52753
|
}))
|
|
@@ -52625,14 +52755,14 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
52625
52755
|
"update active walkthrough": xstate_cjsExports.assign(updateActiveWalkthrough),
|
|
52626
52756
|
"emit: walkthroughStarted": xstate_cjsExports.emit(({ context: context2 }) => {
|
|
52627
52757
|
const edge = context2.xyedges.find((x2) => x2.id === context2.activeWalkthrough?.stepId);
|
|
52628
|
-
return invariant$
|
|
52758
|
+
return invariant$3(edge, "Invalid walkthrough state"), {
|
|
52629
52759
|
type: "walkthroughStarted",
|
|
52630
52760
|
edge
|
|
52631
52761
|
};
|
|
52632
52762
|
}),
|
|
52633
52763
|
"emit: walkthroughStep": xstate_cjsExports.emit(({ context: context2 }) => {
|
|
52634
52764
|
const edge = context2.xyedges.find((x2) => x2.id === context2.activeWalkthrough?.stepId);
|
|
52635
|
-
return invariant$
|
|
52765
|
+
return invariant$3(edge, "Invalid walkthrough state"), {
|
|
52636
52766
|
type: "walkthroughStep",
|
|
52637
52767
|
edge
|
|
52638
52768
|
};
|
|
@@ -53150,8 +53280,8 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
53150
53280
|
},
|
|
53151
53281
|
"xyflow.viewportMoved": {
|
|
53152
53282
|
actions: xstate_cjsExports.assign({
|
|
53153
|
-
viewportChangedManually: ({ event }) => event.manually,
|
|
53154
|
-
viewport: ({ event }) => event.viewport
|
|
53283
|
+
viewportChangedManually: (({ event }) => event.manually),
|
|
53284
|
+
viewport: (({ event }) => event.viewport)
|
|
53155
53285
|
})
|
|
53156
53286
|
},
|
|
53157
53287
|
"xyflow.edgeEditingStarted": {
|
|
@@ -53256,9 +53386,9 @@ function DiagramActorProvider({
|
|
|
53256
53386
|
actors: {
|
|
53257
53387
|
syncManualLayoutActorLogic: syncManualLayoutActorLogic.provide({
|
|
53258
53388
|
actions: {
|
|
53259
|
-
"trigger:OnChange": (_, params) => {
|
|
53389
|
+
"trigger:OnChange": ((_, params) => {
|
|
53260
53390
|
handlersRef.current.onChange?.(params);
|
|
53261
|
-
}
|
|
53391
|
+
})
|
|
53262
53392
|
}
|
|
53263
53393
|
})
|
|
53264
53394
|
}
|
|
@@ -53383,7 +53513,7 @@ function LikeC4Diagram({
|
|
|
53383
53513
|
renderNodes,
|
|
53384
53514
|
children: children2
|
|
53385
53515
|
}) {
|
|
53386
|
-
const initialRef = useRef(null);
|
|
53516
|
+
const id2 = useId$2().replace("mantine-", "likec4-"), initialRef = useRef(null);
|
|
53387
53517
|
initialRef.current == null && (initialRef.current = {
|
|
53388
53518
|
defaultEdges: [],
|
|
53389
53519
|
defaultNodes: [],
|
|
@@ -53433,8 +53563,8 @@ function LikeC4Diagram({
|
|
|
53433
53563
|
onBurgerMenuClick
|
|
53434
53564
|
},
|
|
53435
53565
|
children: /* @__PURE__ */ jsxs(ReduceGraphicsContext, { reduceGraphics: isReducedGraphicsMode, children: [
|
|
53436
|
-
/* @__PURE__ */ jsx(LikeC4Styles, {}),
|
|
53437
|
-
/* @__PURE__ */ jsx(RootContainer, { className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
53566
|
+
/* @__PURE__ */ jsx(LikeC4Styles, { id: id2 }),
|
|
53567
|
+
/* @__PURE__ */ jsx(RootContainer, { id: id2, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
53438
53568
|
ReactFlowProvider,
|
|
53439
53569
|
{
|
|
53440
53570
|
fitView,
|
|
@@ -53759,12 +53889,15 @@ function RouteComponent$1() {
|
|
|
53759
53889
|
) });
|
|
53760
53890
|
}
|
|
53761
53891
|
function ViewCard({ view }) {
|
|
53762
|
-
const [visible2, setVisible] = useState(!1);
|
|
53763
|
-
return
|
|
53764
|
-
|
|
53765
|
-
|
|
53892
|
+
const [visible2, setVisible] = useState(!1), { ref, inViewport } = useInViewport();
|
|
53893
|
+
return useEffect(() => {
|
|
53894
|
+
if (!inViewport || visible2) return;
|
|
53895
|
+
const tm = setTimeout(() => setVisible(!0), o$8(30, 80));
|
|
53896
|
+
return () => clearTimeout(tm);
|
|
53897
|
+
}, [inViewport]), /* @__PURE__ */ jsxs(
|
|
53766
53898
|
Card,
|
|
53767
53899
|
{
|
|
53900
|
+
ref,
|
|
53768
53901
|
shadow: "xs",
|
|
53769
53902
|
padding: "lg",
|
|
53770
53903
|
radius: "sm",
|
|
@@ -53974,7 +54107,7 @@ function buildDiagramTreeData(views, groupBy) {
|
|
|
53974
54107
|
relativePath = "";
|
|
53975
54108
|
break;
|
|
53976
54109
|
default:
|
|
53977
|
-
nonexhaustive(groupBy);
|
|
54110
|
+
nonexhaustive$1(groupBy);
|
|
53978
54111
|
}
|
|
53979
54112
|
const parent = findParent(relativePath);
|
|
53980
54113
|
parent.children.push({
|
|
@@ -54653,7 +54786,7 @@ function treeFromElements(elements) {
|
|
|
54653
54786
|
), acc), new DefaultMap(() => []));
|
|
54654
54787
|
return {
|
|
54655
54788
|
sorted,
|
|
54656
|
-
byId: (id2) => nonNullable(map2.get(id2), `Element not found by id: ${id2}`),
|
|
54789
|
+
byId: (id2) => nonNullable$1(map2.get(id2), `Element not found by id: ${id2}`),
|
|
54657
54790
|
root: root2,
|
|
54658
54791
|
parent: (el) => parents.get(el),
|
|
54659
54792
|
children: (el) => children2.get(el)
|
|
@@ -55307,9 +55440,9 @@ const Panel = forwardRef((props2, ref) => createElement(PanelWithForwardedRef, {
|
|
|
55307
55440
|
PanelWithForwardedRef.displayName = "Panel";
|
|
55308
55441
|
Panel.displayName = "forwardRef(Panel)";
|
|
55309
55442
|
let currentCursorStyle = null, prevRuleIndex = -1, styleElement = null;
|
|
55310
|
-
function getCursorStyle(state, constraintFlags) {
|
|
55443
|
+
function getCursorStyle(state, constraintFlags, isPointerDown2) {
|
|
55444
|
+
const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0, horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0, verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0, verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
|
|
55311
55445
|
if (constraintFlags) {
|
|
55312
|
-
const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0, horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0, verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0, verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
|
|
55313
55446
|
if (horizontalMin)
|
|
55314
55447
|
return verticalMin ? "se-resize" : verticalMax ? "ne-resize" : "e-resize";
|
|
55315
55448
|
if (horizontalMax)
|
|
@@ -55331,7 +55464,7 @@ function getCursorStyle(state, constraintFlags) {
|
|
|
55331
55464
|
function resetGlobalCursorStyle() {
|
|
55332
55465
|
styleElement !== null && (document.head.removeChild(styleElement), currentCursorStyle = null, styleElement = null, prevRuleIndex = -1);
|
|
55333
55466
|
}
|
|
55334
|
-
function setGlobalCursorStyle(state, constraintFlags) {
|
|
55467
|
+
function setGlobalCursorStyle(state, constraintFlags, isPointerDown2) {
|
|
55335
55468
|
var _styleElement$sheet$i, _styleElement$sheet2;
|
|
55336
55469
|
const style2 = getCursorStyle(state, constraintFlags);
|
|
55337
55470
|
if (currentCursorStyle !== style2) {
|
|
@@ -55470,7 +55603,7 @@ function handlePointerDown(event) {
|
|
|
55470
55603
|
target,
|
|
55471
55604
|
x: x2,
|
|
55472
55605
|
y: y2
|
|
55473
|
-
}), updateListeners(), intersectingHandles.length > 0 && (updateResizeHandlerStates("down", event), event.preventDefault(), isWithinResizeHandle(target) || event.stopImmediatePropagation());
|
|
55606
|
+
}), updateListeners(), intersectingHandles.length > 0 && (updateResizeHandlerStates("down", event), updateCursor(), event.preventDefault(), isWithinResizeHandle(target) || event.stopImmediatePropagation());
|
|
55474
55607
|
}
|
|
55475
55608
|
function handlePointerMove(event) {
|
|
55476
55609
|
const {
|
|
@@ -55719,7 +55852,7 @@ function adjustLayoutByDelta({
|
|
|
55719
55852
|
panelIndex: index2,
|
|
55720
55853
|
size: unsafeSize
|
|
55721
55854
|
});
|
|
55722
|
-
if (!fuzzyNumbersEqual(prevSize, safeSize) && (deltaApplied += prevSize - safeSize, nextLayout[index2] = safeSize, deltaApplied.
|
|
55855
|
+
if (!fuzzyNumbersEqual(prevSize, safeSize) && (deltaApplied += prevSize - safeSize, nextLayout[index2] = safeSize, deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
|
|
55723
55856
|
numeric: !0
|
|
55724
55857
|
}) >= 0))
|
|
55725
55858
|
break;
|
|
@@ -56024,7 +56157,7 @@ function computePanelFlexBoxStyle({
|
|
|
56024
56157
|
}) {
|
|
56025
56158
|
const size2 = layout2[panelIndex];
|
|
56026
56159
|
let flexGrow;
|
|
56027
|
-
return size2 == null ? flexGrow = defaultSize2 != null ? defaultSize2.
|
|
56160
|
+
return size2 == null ? flexGrow = defaultSize2 != null ? defaultSize2.toFixed(precision) : "1" : panelData.length === 1 ? flexGrow = "1" : flexGrow = size2.toFixed(precision), {
|
|
56028
56161
|
flexBasis: 0,
|
|
56029
56162
|
flexGrow,
|
|
56030
56163
|
flexShrink: 1,
|