likec4 1.15.0 → 1.16.0

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useOverviewGraph } from "virtual:likec4/overview-graph";
3
- import { u, c as createReactComponent, I as IconFolderFilled, e, a as useUpdateEffect, n as nonexhaustive } from "./main-Q7z-4OPp.js";
3
+ import { u, c as createReactComponent, I as IconFolderFilled, e, a as useUpdateEffect, n as nonexhaustive } from "./main-DejpCNPJ.js";
4
4
  import { u as useRouter } from "./tanstack-router-CfO1HFS2.js";
5
5
  import { B as BaseEdge, H as Handle, P as Position, u as useNodesState, a as useEdgesState, i as index, b as Background, c as BackgroundVariant } from "./likec4-zEZHE7gJ.js";
6
6
  import { memo, useRef, useMemo } from "react";
@@ -1825,7 +1825,7 @@ class MotionValue {
1825
1825
  * @internal
1826
1826
  */
1827
1827
  constructor(init, options = {}) {
1828
- this.version = "11.11.9", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v, render = !0) => {
1828
+ this.version = "11.11.10", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v, render = !0) => {
1829
1829
  const currentTime = time$1.now();
1830
1830
  this.updatedAt !== currentTime && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(v), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), render && this.events.renderRequest && this.events.renderRequest.notify(this.current);
1831
1831
  }, this.hasAnimated = !1, this.setCurrent(init), this.owner = options.owner;
@@ -2033,8 +2033,6 @@ function isWillChangeMotionValue(value) {
2033
2033
  return !!(isMotionValue(value) && value.add);
2034
2034
  }
2035
2035
  function addValueToWillChange(visualElement, key) {
2036
- if (!visualElement.applyWillChange)
2037
- return;
2038
2036
  const willChange = visualElement.getValue("willChange");
2039
2037
  if (isWillChangeMotionValue(willChange))
2040
2038
  return willChange.add(key);
@@ -4208,7 +4206,7 @@ function scrapeMotionValuesFromProps$1(props2, prevProps, visualElement) {
4208
4206
  const { style } = props2, newValues = {};
4209
4207
  for (const key in style)
4210
4208
  (isMotionValue(style[key]) || prevProps.style && isMotionValue(prevProps.style[key]) || isForcedMotionValue(key, props2) || ((_a = visualElement?.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== void 0) && (newValues[key] = style[key]);
4211
- return visualElement && style && typeof style.willChange == "string" && (visualElement.applyWillChange = !1), newValues;
4209
+ return newValues;
4212
4210
  }
4213
4211
  function scrapeMotionValuesFromProps(props2, prevProps, visualElement) {
4214
4212
  const newValues = scrapeMotionValuesFromProps$1(props2, prevProps, visualElement);
@@ -4223,36 +4221,19 @@ function useConstant(init) {
4223
4221
  const ref = useRef$1(null);
4224
4222
  return ref.current === null && (ref.current = init()), ref.current;
4225
4223
  }
4226
- function getWillChangeName(name) {
4227
- if (transformProps.has(name))
4228
- return "transform";
4229
- if (acceleratedValues.has(name))
4230
- return camelToDash(name);
4231
- }
4232
- function makeState({ applyWillChange = !1, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount: onMount2 }, props2, context, presenceContext, isStatic) {
4224
+ function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount: onMount2 }, props2, context, presenceContext) {
4233
4225
  const state = {
4234
- latestValues: makeLatestValues(props2, context, presenceContext, isStatic ? !1 : applyWillChange, scrapeMotionValuesFromProps2),
4226
+ latestValues: makeLatestValues(props2, context, presenceContext, scrapeMotionValuesFromProps2),
4235
4227
  renderState: createRenderState()
4236
4228
  };
4237
4229
  return onMount2 && (state.mount = (instance) => onMount2(props2, instance, state)), state;
4238
4230
  }
4239
4231
  const makeUseVisualState = (config) => (props2, isStatic) => {
4240
- const context = useContext$1(MotionContext), presenceContext = useContext$1(PresenceContext), make = () => makeState(config, props2, context, presenceContext, isStatic);
4232
+ const context = useContext$1(MotionContext), presenceContext = useContext$1(PresenceContext), make = () => makeState(config, props2, context, presenceContext);
4241
4233
  return isStatic ? make() : useConstant(make);
4242
4234
  };
4243
- function forEachDefinition(props2, definition, callback) {
4244
- const list2 = Array.isArray(definition) ? definition : [definition];
4245
- for (let i2 = 0; i2 < list2.length; i2++) {
4246
- const resolved = resolveVariantFromProps(props2, list2[i2]);
4247
- if (resolved) {
4248
- const { transitionEnd, transition, ...target } = resolved;
4249
- callback(target, transitionEnd);
4250
- }
4251
- }
4252
- }
4253
- function makeLatestValues(props2, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {
4254
- var _a;
4255
- const values = {}, willChange = /* @__PURE__ */ new Set(), applyWillChange = shouldApplyWillChange && ((_a = props2.style) === null || _a === void 0 ? void 0 : _a.willChange) === void 0, motionValues = scrapeMotionValues(props2, {});
4235
+ function makeLatestValues(props2, context, presenceContext, scrapeMotionValues) {
4236
+ const values = {}, motionValues = scrapeMotionValues(props2, {});
4256
4237
  for (const key in motionValues)
4257
4238
  values[key] = resolveMotionValue(motionValues[key]);
4258
4239
  let { initial, animate } = props2;
@@ -4261,23 +4242,26 @@ function makeLatestValues(props2, context, presenceContext, shouldApplyWillChang
4261
4242
  let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === !1 : !1;
4262
4243
  isInitialAnimationBlocked = isInitialAnimationBlocked || initial === !1;
4263
4244
  const variantToSet = isInitialAnimationBlocked ? animate : initial;
4264
- return variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet) && forEachDefinition(props2, variantToSet, (target, transitionEnd) => {
4265
- for (const key in target) {
4266
- let valueTarget = target[key];
4267
- if (Array.isArray(valueTarget)) {
4268
- const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
4269
- valueTarget = valueTarget[index2];
4245
+ if (variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet)) {
4246
+ const list2 = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
4247
+ for (let i2 = 0; i2 < list2.length; i2++) {
4248
+ const resolved = resolveVariantFromProps(props2, list2[i2]);
4249
+ if (resolved) {
4250
+ const { transitionEnd, transition, ...target } = resolved;
4251
+ for (const key in target) {
4252
+ let valueTarget = target[key];
4253
+ if (Array.isArray(valueTarget)) {
4254
+ const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
4255
+ valueTarget = valueTarget[index2];
4256
+ }
4257
+ valueTarget !== null && (values[key] = valueTarget);
4258
+ }
4259
+ for (const key in transitionEnd)
4260
+ values[key] = transitionEnd[key];
4270
4261
  }
4271
- valueTarget !== null && (values[key] = valueTarget);
4272
- }
4273
- for (const key in transitionEnd)
4274
- values[key] = transitionEnd[key];
4275
- }), applyWillChange && (animate && initial !== !1 && !isAnimationControls(animate) && forEachDefinition(props2, animate, (target) => {
4276
- for (const name in target) {
4277
- const memberName = getWillChangeName(name);
4278
- memberName && willChange.add(memberName);
4279
4262
  }
4280
- }), willChange.size && (values.willChange = Array.from(willChange).join(","))), values;
4263
+ }
4264
+ return values;
4281
4265
  }
4282
4266
  const createHtmlRenderState = () => ({
4283
4267
  style: {},
@@ -4397,7 +4381,6 @@ const isSVGTag = (tag) => typeof tag == "string" && tag.toLowerCase() === "svg",
4397
4381
  })
4398
4382
  }, htmlMotionConfig = {
4399
4383
  useVisualState: makeUseVisualState({
4400
- applyWillChange: !0,
4401
4384
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
4402
4385
  createRenderState: createHtmlRenderState
4403
4386
  })
@@ -4552,7 +4535,7 @@ class VisualElement {
4552
4535
  return {};
4553
4536
  }
4554
4537
  constructor({ parent, props: props2, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState }, options = {}) {
4555
- this.applyWillChange = !1, this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4538
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4556
4539
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
4557
4540
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
4558
4541
  const now2 = time$1.now();
@@ -4752,7 +4735,7 @@ function getComputedStyle$1(element) {
4752
4735
  }
4753
4736
  class HTMLVisualElement extends DOMVisualElement {
4754
4737
  constructor() {
4755
- super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = renderHTML;
4738
+ super(...arguments), this.type = "html", this.renderInstance = renderHTML;
4756
4739
  }
4757
4740
  readValueFromInstance(instance, key) {
4758
4741
  if (transformProps.has(key)) {
@@ -5240,7 +5223,18 @@ function useAnimate() {
5240
5223
  scope.animations.forEach((animation) => animation.stop());
5241
5224
  }), [scope, animate];
5242
5225
  }
5243
- var rootClassName = "likec4-diagram-root", s$2 = { done: !1, hasNext: !1 };
5226
+ var rootClassName = "likec4-diagram-root";
5227
+ function u$9(t2, n2, a2) {
5228
+ let o2 = (r2) => t2(r2, ...n2);
5229
+ return a2 === void 0 ? o2 : Object.assign(o2, { lazy: a2, lazyArgs: n2 });
5230
+ }
5231
+ function u$8(r2, n2, a2) {
5232
+ let o2 = r2.length - n2.length;
5233
+ if (o2 === 0) return r2(...n2);
5234
+ if (o2 === 1) return u$9(r2, n2, a2);
5235
+ throw new Error("Wrong number of arguments");
5236
+ }
5237
+ var s$2 = { done: !1, hasNext: !1 };
5244
5238
  function x$1(t2, ...o2) {
5245
5239
  let n2 = t2, u2 = o2.map((e2) => "lazy" in e2 ? f$2(e2) : void 0), p2 = 0;
5246
5240
  for (; p2 < o2.length; ) {
@@ -5304,45 +5298,24 @@ function o$7() {
5304
5298
  let e2 = /* @__PURE__ */ new Set();
5305
5299
  return (t2) => e2.has(t2) ? s$2 : (e2.add(t2), { done: !1, hasNext: !0, next: t2 });
5306
5300
  }
5307
- function u$9(t2, n2, a2) {
5308
- let o2 = (r2) => t2(r2, ...n2);
5309
- return a2 === void 0 ? o2 : Object.assign(o2, { lazy: a2, lazyArgs: n2 });
5310
- }
5311
- function u$8(r2, n2, a2) {
5312
- let o2 = r2.length - n2.length;
5313
- if (o2 === 0) return r2(...n2);
5314
- if (o2 === 1) return u$9(r2, n2, a2);
5315
- throw new Error("Wrong number of arguments");
5316
- }
5317
5301
  function r$4(...n2) {
5318
5302
  return u$8(Object.values, n2);
5319
5303
  }
5320
- function u$7(...e2) {
5321
- return u$8(i$7, e2);
5322
- }
5323
- function i$7(e2, a2) {
5324
- let n2 = [];
5325
- for (let [o2, r2] of e2.entries()) {
5326
- if (!a2(r2, o2, e2)) break;
5327
- n2.push(r2);
5328
- }
5329
- return n2;
5330
- }
5331
- function i$6(...e2) {
5304
+ function i$7(...e2) {
5332
5305
  return u$8(r$3, e2);
5333
5306
  }
5334
5307
  var r$3 = (e2, t2) => e2.length >= t2, T$1 = { asc: (r2, n2) => r2 > n2, desc: (r2, n2) => r2 < n2 };
5335
5308
  function m$2(r2, n2) {
5336
5309
  let [e2, ...o2] = n2;
5337
5310
  if (!s$1(e2)) {
5338
- let t2 = u$6(...o2);
5311
+ let t2 = u$7(...o2);
5339
5312
  return r2(e2, t2);
5340
5313
  }
5341
- let a2 = u$6(e2, ...o2);
5314
+ let a2 = u$7(e2, ...o2);
5342
5315
  return (t2) => r2(t2, a2);
5343
5316
  }
5344
- function u$6(r2, n2, ...e2) {
5345
- let o2 = typeof r2 == "function" ? r2 : r2[0], a2 = typeof r2 == "function" ? "asc" : r2[1], { [a2]: t2 } = T$1, i2 = n2 === void 0 ? void 0 : u$6(n2, ...e2);
5317
+ function u$7(r2, n2, ...e2) {
5318
+ let o2 = typeof r2 == "function" ? r2 : r2[0], a2 = typeof r2 == "function" ? "asc" : r2[1], { [a2]: t2 } = T$1, i2 = n2 === void 0 ? void 0 : u$7(n2, ...e2);
5346
5319
  return (y2, c) => {
5347
5320
  let l2 = o2(y2), p2 = o2(c);
5348
5321
  return t2(l2, p2) ? 1 : t2(p2, l2) ? -1 : i2?.(y2, c) ?? 0;
@@ -5355,6 +5328,27 @@ function s$1(r2) {
5355
5328
  return d$2(n2) && typeof e2 == "string" && e2 in T$1 && o2.length === 0;
5356
5329
  }
5357
5330
  var d$2 = (r2) => typeof r2 == "function" && r2.length === 1;
5331
+ function u$6(...e2) {
5332
+ return u$8(i$6, e2);
5333
+ }
5334
+ function i$6(e2, a2) {
5335
+ let n2 = [];
5336
+ for (let [o2, r2] of e2.entries()) {
5337
+ if (!a2(r2, o2, e2)) break;
5338
+ n2.push(r2);
5339
+ }
5340
+ return n2;
5341
+ }
5342
+ function b(t2) {
5343
+ return (e2, r2) => {
5344
+ if (r2 === 0) return t2(e2);
5345
+ if (!Number.isInteger(r2)) throw new TypeError(`precision must be an integer: ${r2.toString()}`);
5346
+ if (r2 > 15 || r2 < -15) throw new RangeError("precision must be between -15 and 15");
5347
+ if (Number.isNaN(e2) || !Number.isFinite(e2)) return t2(e2);
5348
+ let n2 = 10 ** r2;
5349
+ return t2(e2 * n2) / n2;
5350
+ };
5351
+ }
5358
5352
  function m$1(...r2) {
5359
5353
  return u$8(o$6, r2);
5360
5354
  }
@@ -5376,20 +5370,10 @@ function t$7(...e2) {
5376
5370
  function r$2(e2) {
5377
5371
  return [...e2].reverse();
5378
5372
  }
5379
- function b(t2) {
5380
- return (e2, r2) => {
5381
- if (r2 === 0) return t2(e2);
5382
- if (!Number.isInteger(r2)) throw new TypeError(`precision must be an integer: ${r2.toString()}`);
5383
- if (r2 > 15 || r2 < -15) throw new RangeError("precision must be between -15 and 15");
5384
- if (Number.isNaN(e2) || !Number.isFinite(e2)) return t2(e2);
5385
- let n2 = 10 ** r2;
5386
- return t2(e2 * n2) / n2;
5387
- };
5388
- }
5389
- function p$3(...o2) {
5390
- return u$8(t$6, o2);
5373
+ function p$3(...n2) {
5374
+ return u$8(t$6, n2);
5391
5375
  }
5392
- var t$6 = (o2, e2) => o2[e2];
5376
+ var t$6 = (n2, e2) => n2[e2];
5393
5377
  function t$5(...n2) {
5394
5378
  return u$8(o$4, n2);
5395
5379
  }
@@ -6339,7 +6323,7 @@ function useLayoutConstraints() {
6339
6323
  T((n2) => n2.draggable !== !1),
6340
6324
  m((x2) => x2.id)
6341
6325
  );
6342
- i$6(draggingNodes, 1) && (solverRef.current = createLayoutConstraints(xystore, draggingNodes));
6326
+ i$7(draggingNodes, 1) && (solverRef.current = createLayoutConstraints(xystore, draggingNodes));
6343
6327
  },
6344
6328
  onNodeDrag: () => {
6345
6329
  solverRef.current?.onMove((nodes) => {
@@ -7301,7 +7285,7 @@ function bezierControlPoints(diagramEdge) {
7301
7285
  const handles = [
7302
7286
  // start
7303
7287
  ];
7304
- for (; i$6(bezierPoints, 3); ) {
7288
+ for (; i$7(bezierPoints, 3); ) {
7305
7289
  const [cp1, cp2, end, ...rest] = bezierPoints, bezier = new Bezier(start[0], start[1], cp1[0], cp1[1], cp2[0], cp2[1], end[0], end[1]), inflections = bezier.inflections();
7306
7290
  inflections.length === 0 && inflections.push(0.5), inflections.forEach((t2) => {
7307
7291
  const { x: x2, y: y2 } = bezier.get(t2);
@@ -7337,7 +7321,7 @@ function diagramViewToXYFlowData(view, opts) {
7337
7321
  const ns = "", nodeById = (id2) => nonNullable(nodeLookup.get(id2), `Node not found: ${id2}`);
7338
7322
  let next;
7339
7323
  for (; next = traverse.shift(); ) {
7340
- const { node: node2, parent } = next, isCompound = i$6(node2.children, 1) || node2.kind == ElementKind.Group;
7324
+ const { node: node2, parent } = next, isCompound = i$7(node2.children, 1) || node2.kind == ElementKind.Group;
7341
7325
  isCompound && traverse.push(...node2.children.map((child) => ({ node: nodeById(child), parent: node2 })));
7342
7326
  const position2 = {
7343
7327
  x: node2.position[0],
@@ -7381,7 +7365,7 @@ function diagramViewToXYFlowData(view, opts) {
7381
7365
  }
7382
7366
  for (const edge of view.edges) {
7383
7367
  const source = edge.source, target = edge.target, id2 = ns + edge.id;
7384
- if (!i$6(edge.points, 2)) {
7368
+ if (!i$7(edge.points, 2)) {
7385
7369
  console.error("edge should have at least 2 points", edge);
7386
7370
  continue;
7387
7371
  }
@@ -7725,7 +7709,7 @@ function createDiagramStore(props2) {
7725
7709
  const _updated = acc[data.edge.id] = {
7726
7710
  points: data.edge.points
7727
7711
  };
7728
- data.label?.bbox && (_updated.labelBBox = data.label.bbox), data.edge.labelBBox && (_updated.labelBBox ??= data.edge.labelBBox), i$6(controlPoints, 1) && (_updated.controlPoints = controlPoints), !sourceOrTargetMoved && data.edge.dotpos && (_updated.dotpos = data.edge.dotpos);
7712
+ data.label?.bbox && (_updated.labelBBox = data.label.bbox), data.edge.labelBBox && (_updated.labelBBox ??= data.edge.labelBBox), i$7(controlPoints, 1) && (_updated.controlPoints = controlPoints), !sourceOrTargetMoved && data.edge.dotpos && (_updated.dotpos = data.edge.dotpos);
7729
7713
  const allX = [
7730
7714
  ...data.edge.points.map((p2) => p2[0]),
7731
7715
  ...controlPoints.map((p2) => p2.x),
@@ -7977,7 +7961,7 @@ function createDiagramStore(props2) {
7977
7961
  },
7978
7962
  align: (mode) => {
7979
7963
  const { scheduleSaveManualLayout, xystore } = get(), { nodeLookup, parentLookup } = xystore.getState(), nodesToAlign = [...new Set(nodeLookup.values().filter((n2) => n2.selected).map((n2) => n2.id)).difference(new Set(parentLookup.keys()))];
7980
- if (!i$6(nodesToAlign, 2)) {
7964
+ if (!i$7(nodesToAlign, 2)) {
7981
7965
  console.warn("At least 2 nodes must be selected to align");
7982
7966
  return;
7983
7967
  }
@@ -13835,7 +13819,7 @@ function createNode$1(nodeType, element, ctx) {
13835
13819
  return node2;
13836
13820
  const g = ctx.g, parent = x$1(
13837
13821
  element.ancestors(),
13838
- u$7((ancestor) => !isAncestor(ancestor.id, ctx.edge.source) && !isAncestor(ancestor.id, ctx.edge.target)),
13822
+ u$6((ancestor) => !isAncestor(ancestor.id, ctx.edge.source) && !isAncestor(ancestor.id, ctx.edge.target)),
13839
13823
  d(),
13840
13824
  (found) => found ? createNode$1("compound", found, ctx) : null
13841
13825
  ), xynode = {
@@ -14667,7 +14651,7 @@ const classes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
14667
14651
  edgesep: 20
14668
14652
  },
14669
14653
  edgeLabel: {
14670
- width: 60
14654
+ width: 65
14671
14655
  },
14672
14656
  emptyNodeOffset: 150,
14673
14657
  nodeWidth: 270,
@@ -14762,7 +14746,7 @@ function createNode(column, nodeType, element, ctx) {
14762
14746
  return invariant(node2.type !== "empty", `Node ${element.id} is empty`), node2;
14763
14747
  const g = ctx.g, parent = x$1(
14764
14748
  element.ancestors(),
14765
- u$7((ancestor) => !isAncestor(ancestor.id, ctx.subjectId)),
14749
+ u$6((ancestor) => !isAncestor(ancestor.id, ctx.subjectId)),
14766
14750
  f(
14767
14751
  (ancestor) => ctx.diagramNodes.has(ancestor.id) || ctx.connected[column].has(ancestor.id) || ctx.scope === "global" && ctx.subjectElement.ascendingSiblings().some((s2) => s2.id === ancestor.id)
14768
14752
  ),
@@ -14905,7 +14889,10 @@ function layout(subjectId, view, likec4model, scope) {
14905
14889
  },
14906
14890
  forEachIncoming(sourceId, relations) {
14907
14891
  const source = createNode("incomers", "element", likec4model.element(sourceId), ctx);
14908
- g.setEdge(graphId(source).port, subject.id), subject.data.ports.left.push({
14892
+ g.setEdge(graphId(source).port, subject.id, {
14893
+ width: Sizes.edgeLabel.width,
14894
+ weight: source.type === "compound" ? 0 : 1
14895
+ }), subject.data.ports.left.push({
14909
14896
  id: source.id,
14910
14897
  type: "in"
14911
14898
  }), source.data.ports.right.push({
@@ -14919,7 +14906,10 @@ function layout(subjectId, view, likec4model, scope) {
14919
14906
  },
14920
14907
  forEachOutgoing(targetId, relations) {
14921
14908
  const target = createNode("outgoers", "element", likec4model.element(targetId), ctx);
14922
- g.setEdge(subjectElement.id, graphId(target).port), subject.data.ports.right.push({
14909
+ g.setEdge(subjectElement.id, graphId(target).port, {
14910
+ width: Sizes.edgeLabel.width,
14911
+ weight: target.type === "compound" ? 1 : 2
14912
+ }), subject.data.ports.right.push({
14923
14913
  id: target.id,
14924
14914
  type: "out"
14925
14915
  }), target.data.ports.left.push({
@@ -14940,7 +14930,7 @@ function layout(subjectId, view, likec4model, scope) {
14940
14930
  g.setEdge(subject.id, graphId(target).port);
14941
14931
  }
14942
14932
  const subjectPortsCount = Math.max(subject.data.ports.left.length, subject.data.ports.right.length);
14943
- subjectPortsCount > 2 && (g.node(subjectElement.id).height = Sizes.hodeHeight + (subjectPortsCount - 2) * 1);
14933
+ subjectPortsCount > 3 && (g.node(subjectElement.id).height = Sizes.hodeHeight + (subjectPortsCount - 3) * 5);
14944
14934
  const nodebounds = applyDagreLayout(ctx.g), xynodes = [
14945
14935
  subject,
14946
14936
  ...ctx.columns.incomers.values(),
@@ -15265,6 +15255,9 @@ function RelationshipEdge$1({
15265
15255
  Text$6,
15266
15256
  {
15267
15257
  fw: isMultiRelation ? "500" : "400",
15258
+ style: {
15259
+ whiteSpace: isMultiRelation ? "nowrap" : void 0
15260
+ },
15268
15261
  component: "div",
15269
15262
  className: edgeLabelText$1,
15270
15263
  lineClamp: 3,
@@ -16640,7 +16633,7 @@ function bezierPath(bezierSpline) {
16640
16633
  let [start, ...points] = bezierSpline;
16641
16634
  invariant(start, "start should be defined");
16642
16635
  let path = `M ${start[0]},${start[1]}`;
16643
- for (; i$6(points, 3); ) {
16636
+ for (; i$7(points, 3); ) {
16644
16637
  const [cp1, cp2, end, ...rest] = points;
16645
16638
  path = path + ` C ${cp1[0]},${cp1[1]} ${cp2[0]},${cp2[1]} ${end[0]},${end[1]}`, points = rest;
16646
16639
  }
@@ -19410,6 +19403,7 @@ function StaticLikeC4Diagram({
19410
19403
  view,
19411
19404
  fitView = !0,
19412
19405
  fitViewPadding = 0,
19406
+ showElementLinks = !0,
19413
19407
  background = "transparent",
19414
19408
  ...rest
19415
19409
  }) {
@@ -19424,7 +19418,7 @@ function StaticLikeC4Diagram({
19424
19418
  zoomable: !1,
19425
19419
  controls: !1,
19426
19420
  background,
19427
- showElementLinks: !0,
19421
+ showElementLinks,
19428
19422
  showDiagramTitle: !1,
19429
19423
  showNotations: !1,
19430
19424
  showRelationshipDetails: !1,
@@ -19545,7 +19539,7 @@ function DiagramPreview$1({ diagram }) {
19545
19539
  }
19546
19540
  ) });
19547
19541
  }
19548
- const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-BwT9t8VB.js"));
19542
+ const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-BRH5n7M1.js"));
19549
19543
  function WithOverviewGraph() {
19550
19544
  return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(OverviewGraph, {}) });
19551
19545
  }
@@ -19836,6 +19830,7 @@ function DiagramPreview({
19836
19830
  renderIcon: RenderIcon,
19837
19831
  fitView: !0,
19838
19832
  fitViewPadding: 0,
19833
+ showElementLinks: !1,
19839
19834
  initialWidth: width2,
19840
19835
  initialHeight: height
19841
19836
  }
@@ -21722,35 +21717,39 @@ function PanelGroupWithForwardedRef({
21722
21717
  eagerValues.layout = [];
21723
21718
  };
21724
21719
  }, []);
21725
- const registerResizeHandle2 = useCallback((dragHandleId) => function(event) {
21726
- event.preventDefault();
21720
+ const registerResizeHandle2 = useCallback((dragHandleId) => {
21721
+ let isRTL = !1;
21727
21722
  const panelGroupElement = panelGroupElementRef.current;
21728
- if (!panelGroupElement)
21729
- return () => null;
21730
- const {
21731
- direction: direction2,
21732
- dragState: dragState2,
21733
- id: groupId2,
21734
- keyboardResizeBy: keyboardResizeBy2,
21735
- onLayout: onLayout2
21736
- } = committedValuesRef.current, {
21737
- layout: prevLayout,
21738
- panelDataArray
21739
- } = eagerValuesRef.current, {
21740
- initialLayout
21741
- } = dragState2 ?? {}, pivotIndices = determinePivotIndices(groupId2, dragHandleId, panelGroupElement);
21742
- let delta = calculateDeltaPercentage(event, dragHandleId, direction2, dragState2, keyboardResizeBy2, panelGroupElement);
21743
- const isHorizontal = direction2 === "horizontal";
21744
- document.dir === "rtl" && isHorizontal && (delta = -delta);
21745
- const panelConstraints = panelDataArray.map((panelData) => panelData.constraints), nextLayout = adjustLayoutByDelta({
21746
- delta,
21747
- initialLayout: initialLayout ?? prevLayout,
21748
- panelConstraints,
21749
- pivotIndices,
21750
- prevLayout,
21751
- trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
21752
- }), layoutChanged = !compareLayouts(prevLayout, nextLayout);
21753
- (isPointerEvent(event) || isMouseEvent(event)) && prevDeltaRef.current != delta && (prevDeltaRef.current = delta, !layoutChanged && delta !== 0 ? isHorizontal ? reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(dragHandleId, 0)), layoutChanged && (setLayout(nextLayout), eagerValuesRef.current.layout = nextLayout, onLayout2 && onLayout2(nextLayout), callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current));
21723
+ return panelGroupElement && window.getComputedStyle(panelGroupElement, null).getPropertyValue("direction") === "rtl" && (isRTL = !0), function(event) {
21724
+ event.preventDefault();
21725
+ const panelGroupElement2 = panelGroupElementRef.current;
21726
+ if (!panelGroupElement2)
21727
+ return () => null;
21728
+ const {
21729
+ direction: direction2,
21730
+ dragState: dragState2,
21731
+ id: groupId2,
21732
+ keyboardResizeBy: keyboardResizeBy2,
21733
+ onLayout: onLayout2
21734
+ } = committedValuesRef.current, {
21735
+ layout: prevLayout,
21736
+ panelDataArray
21737
+ } = eagerValuesRef.current, {
21738
+ initialLayout
21739
+ } = dragState2 ?? {}, pivotIndices = determinePivotIndices(groupId2, dragHandleId, panelGroupElement2);
21740
+ let delta = calculateDeltaPercentage(event, dragHandleId, direction2, dragState2, keyboardResizeBy2, panelGroupElement2);
21741
+ const isHorizontal = direction2 === "horizontal";
21742
+ isHorizontal && isRTL && (delta = -delta);
21743
+ const panelConstraints = panelDataArray.map((panelData) => panelData.constraints), nextLayout = adjustLayoutByDelta({
21744
+ delta,
21745
+ initialLayout: initialLayout ?? prevLayout,
21746
+ panelConstraints,
21747
+ pivotIndices,
21748
+ prevLayout,
21749
+ trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
21750
+ }), layoutChanged = !compareLayouts(prevLayout, nextLayout);
21751
+ (isPointerEvent(event) || isMouseEvent(event)) && prevDeltaRef.current != delta && (prevDeltaRef.current = delta, !layoutChanged && delta !== 0 ? isHorizontal ? reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(dragHandleId, 0)), layoutChanged && (setLayout(nextLayout), eagerValuesRef.current.layout = nextLayout, onLayout2 && onLayout2(nextLayout), callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current));
21752
+ };
21754
21753
  }, []), resizePanel2 = useCallback((panelData, unsafePanelSize) => {
21755
21754
  const {
21756
21755
  onLayout: onLayout2
@@ -1,4 +1,4 @@
1
1
  import "react/jsx-runtime";
2
- import "./chunks/main-Q7z-4OPp.js";
2
+ import "./chunks/main-DejpCNPJ.js";
3
3
  import "react";
4
4
  import "react-dom/client";