likec4 1.40.0 → 1.41.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.
@@ -7,7 +7,7 @@ var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 != "s
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
8
  import { forwardRef, createElement, useContext, createContext, Fragment as Fragment$1, useMemo, useState, useEffect, useRef, createRef, useCallback, memo as memo$1, useLayoutEffect, useDeferredValue } from "react";
9
9
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
10
- import { u as useMantineStyleNonce, L as LazyMotion, d as domMax, M as MotionConfig, a as useFirstMountState, b as useCustomCompareEffect, s as shallowEqual, c as useStoreApi, e as useStore, f as useCallbackRef, g as useReactFlow, h as useInternalNode, t, i as t$1, B as Bezier, j as e, k as getNodeDimensions, l as Background$1, m as BackgroundVariant, n, o as index, p as useSyncedRef, q as e$1, r as t$2, v as MantineContext, w as MantineProvider, x as atom, y as createSafeContext, z as deepEqual, A as useDeepCompareMemo, C as t$3, D as t$4, E as t$5, F as t$6, G as createOptionalContext, H as useId$1, I as getNodesBounds, J as getEdgePosition, K as xstateReact_cjsExports, N as useDebouncedValue, O as MotionDiv, P as ActionIcon$1, Q as m, T as Text, R as e$2, S as EdgeLabelRenderer, U as e$3, V as MotionButton, W as useHover, X as useDebouncedState, Y as NodeToolbar, Z as Position, _ as e$4, $ as Handle, a0 as d3line, a1 as curveCatmullRomOpen, a2 as n$1, a3 as t$7, a4 as useDebouncedEffect, a5 as getSmoothStepPath, a6 as Tooltip$7, a7 as t$8, a8 as Popover, a9 as PopoverTarget, aa as Button, ab as ColorSwatch, ac as PopoverDropdown, ad as Space, ae as Divider$1, af as Stack, ag as TooltipGroup, ah as Flex, ai as CheckIcon, aj as rem, ak as useUpdateEffect$1, al as Slider, am as Paper, an as Box$1, ao as Group, ap as SegmentedControl, aq as Menu, ar as MenuTarget, as as MenuDropdown, at as MenuItem, au as useFocusTrap, av as useReducedMotionConfig, aw as useDebouncedCallback, ax as useTimeoutEffect, ay as useMergedRef, az as ReactRemoveScroll, aA as xstate_cjsExports, aB as ThemeIcon, aC as Breadcrumbs, aD as FloatingIndicator, aE as UnstyledButton, aF as useUncontrolled, aG as clampUseMovePosition, aH as useMove, aI as HoverCard, aJ as HoverCardTarget, aK as HoverCardDropdown, aL as Notification, aM as Code, aN as AnimatePresence, aO as isMacOs, aP as Badge, aQ as CopyButton, aR as MotionSpan, aS as Portal, aT as NavLink, aU as useThrottledCallback, aV as createScopedKeydownHandler, aW as ScrollAreaAutosize, aX as Input, aY as t$9, aZ as Highlight, a_ as e$5, a$ as LayoutGroup, b0 as ErrorBoundary$1, b1 as useTree, b2 as Alert, b3 as Tree, b4 as getBezierPath, b5 as t$a, b6 as t$b, b7 as e$6, b8 as t$c, b9 as t$d, ba as n$2, bb as r, bc as t$e, bd as n$3, be as dagre, bf as t$f, bg as t$g, bh as t$h, bi as ReactFlowProvider, bj as useStateHistory, bk as Panel, bl as Anchor, bm as Pill, bn as useViewportSize, bo as useSessionStorage, bp as t$i, bq as useDragControls, br as useMotionValue, bs as Card, bt as CloseButton, bu as ActionIconGroup, bv as Tabs, bw as TabsList, bx as TabsTab, by as TabsPanel, bz as ScrollArea, bA as e$7, bB as animate, bC as e$8, bD as VisuallyHidden, bE as useWindowEvent, bF as FocusTrap, bG as Title, bH as useFocusWithin, bI as useCombobox, bJ as ComboboxOption, bK as Combobox, bL as ComboboxTarget, bM as ComboboxDropdown, bN as ComboboxOptions, bO as ComboboxEmpty, bP as useHotkeys, bQ as Grid, bR as GridCol, bS as autoUpdate, bT as computePosition, bU as offset$1, bV as autoPlacement, bW as size, bX as hide, bY as useLocalStorage, bZ as CardSection, b_ as Spoiler, b$ as n$4, c0 as ButtonGroup, c1 as useTimeout, c2 as useDebouncedCallback$1, c3 as useCustomCompareMemo, c4 as toRgba, c5 as t$j, c6 as mix, c7 as toHex, c8 as scale, c9 as t$k, ca as t$l, cb as t$m, cc as Solver, cd as Strength, ce as Variable, cf as Operator, cg as Constraint, ch as e$9, ci as n$5, cj as applyEdgeChanges, ck as applyNodeChanges, cl as getViewportForBounds, cm as e$a, cn as t$n, co as getHotkeyHandler, cp as n$6, cq as t$o, cr as e$b, cs as getBoundsOfRects, ct as boxToRect, cu as nodeToRect } from "./vendors.js";
10
+ import { u as useMantineStyleNonce, L as LazyMotion, d as domMax, M as MotionConfig, a as useFirstMountState, b as useCustomCompareEffect, s as shallowEqual, c as useStoreApi, e as useStore, f as useCallbackRef, g as useReactFlow, h as useInternalNode, t, i as t$1, B as Bezier, j as e, k as getNodeDimensions, l as Background$1, m as BackgroundVariant, n, o as index, p as useSyncedRef, q as e$1, r as t$2, v as MantineContext, w as MantineProvider, x as atom, y as createSafeContext, z as deepEqual, A as useDeepCompareMemo, C as t$3, D as t$4, E as t$5, F as t$6, G as createOptionalContext, H as useId$1, I as getNodesBounds, J as getEdgePosition, K as xstateReact_cjsExports, N as useDebouncedValue, O as MotionDiv, P as ActionIcon$1, Q as m, T as Text, R as e$2, S as EdgeLabelRenderer, U as e$3, V as MotionButton, W as useHover, X as useDebouncedState, Y as NodeToolbar, Z as Position, _ as e$4, $ as Handle, a0 as d3line, a1 as curveCatmullRomOpen, a2 as n$1, a3 as t$7, a4 as useDebouncedEffect, a5 as getSmoothStepPath, a6 as Tooltip$7, a7 as t$8, a8 as Popover, a9 as PopoverTarget, aa as Button, ab as ColorSwatch, ac as PopoverDropdown, ad as Space, ae as Divider$1, af as Stack, ag as TooltipGroup, ah as Flex, ai as CheckIcon, aj as rem, ak as useUpdateEffect$1, al as Slider, am as Paper, an as Box$1, ao as Group, ap as SegmentedControl, aq as Menu, ar as MenuTarget, as as MenuDropdown, at as MenuItem, au as useFocusTrap, av as useReducedMotionConfig, aw as useDebouncedCallback, ax as useTimeoutEffect, ay as useMergedRef, az as ReactRemoveScroll, aA as xstate_cjsExports, aB as ThemeIcon, aC as Breadcrumbs, aD as FloatingIndicator, aE as UnstyledButton, aF as useUncontrolled, aG as clampUseMovePosition, aH as useMove, aI as HoverCard, aJ as HoverCardTarget, aK as HoverCardDropdown, aL as Notification, aM as Code, aN as AnimatePresence, aO as isMacOs, aP as Badge, aQ as CopyButton, aR as MotionSpan, aS as Portal, aT as NavLink, aU as useThrottledCallback, aV as createScopedKeydownHandler, aW as ScrollAreaAutosize, aX as Input, aY as t$9, aZ as Highlight, a_ as e$5, a$ as LayoutGroup, b0 as ErrorBoundary$1, b1 as useTree, b2 as Alert, b3 as Tree, b4 as getBezierPath, b5 as t$a, b6 as t$b, b7 as e$6, b8 as t$c, b9 as t$d, ba as n$2, bb as r, bc as t$e, bd as n$3, be as dagre, bf as t$f, bg as t$g, bh as t$h, bi as ReactFlowProvider, bj as useStateHistory, bk as useRafEffect, bl as Panel, bm as Anchor, bn as Pill, bo as useViewportSize, bp as useSessionStorage, bq as t$i, br as useDragControls, bs as useMotionValue, bt as CloseButton, bu as ActionIconGroup, bv as Tabs, bw as TabsList, bx as TabsTab, by as TabsPanel, bz as ScrollArea, bA as e$7, bB as animate, bC as e$8, bD as VisuallyHidden, bE as useWindowEvent, bF as FocusTrap, bG as Title, bH as useFocusWithin, bI as useCombobox, bJ as ComboboxOption, bK as Combobox, bL as ComboboxTarget, bM as ComboboxDropdown, bN as ComboboxOptions, bO as ComboboxEmpty, bP as useHotkeys, bQ as Grid, bR as GridCol, bS as autoUpdate, bT as computePosition, bU as offset$1, bV as autoPlacement, bW as size, bX as hide, bY as useLocalStorage, bZ as Card, b_ as CardSection, b$ as Spoiler, c0 as n$4, c1 as ButtonGroup, c2 as useTimeout, c3 as useDebouncedCallback$1, c4 as useCustomCompareMemo, c5 as toRgba, c6 as t$j, c7 as mix, c8 as toHex, c9 as scale, ca as t$k, cb as t$l, cc as t$m, cd as Solver, ce as Strength, cf as Variable, cg as Operator, ch as Constraint, ci as e$9, cj as n$5, ck as applyEdgeChanges, cl as applyNodeChanges, cm as getViewportForBounds, cn as e$a, co as t$n, cp as getHotkeyHandler, cq as n$6, cr as t$o, cs as e$b, ct as getBoundsOfRects, cu as boxToRect, cv as nodeToRect } from "./vendors.js";
11
11
  import { nonexhaustive, isTagColorSpecified, invariant as invariant$1, isStepEdgeId, extractStep, nonNullable as nonNullable$1, defaultTheme, ElementShapes, RichText, ancestorsFqn, nameFromFqn, isAncestor as isAncestor$1, ThemeColors, Queue, whereOperatorAsPredicate, GroupElementKind, BBox as BBox$1, getParallelStepsPrefix as getParallelStepsPrefix$1 } from "@likec4/core";
12
12
  import { invariant, nonNullable, toArray, ifirst, ifilter, compareNaturalHierarchically, nonexhaustive as nonexhaustive$1, compareNatural, ifind, DefaultMap, isAncestor, sortParentsFirst, nameFromFqn as nameFromFqn$1, Stack as Stack$1, delay } from "@likec4/core/utils";
13
13
  import { BBox, ensureSizes, RichText as RichText$1, isStepEdgeId as isStepEdgeId$1, getParallelStepsPrefix } from "@likec4/core/types";
@@ -3412,6 +3412,7 @@ const MarkdownBlock = forwardRef(({
3412
3412
  hideIfEmpty = !1,
3413
3413
  emptyText = "no content",
3414
3414
  className,
3415
+ style: style2,
3415
3416
  ...props
3416
3417
  }, ref) => {
3417
3418
  if (value.isEmpty && hideIfEmpty)
@@ -3430,6 +3431,7 @@ const MarkdownBlock = forwardRef(({
3430
3431
  className
3431
3432
  ),
3432
3433
  style: {
3434
+ ...style2,
3433
3435
  ...props.fontSize && {
3434
3436
  "--text-fz": `var(--font-sizes-${props.fontSize}, var(--font-sizes-md))`
3435
3437
  },
@@ -5882,15 +5884,22 @@ const selector$7 = (state) => ({
5882
5884
  userSelect: "none",
5883
5885
  pointerEvents: "none",
5884
5886
  _groupHover: {
5885
- color: "[inherit]",
5887
+ color: "[var(--badge-color)]",
5886
5888
  opacity: 0.7
5887
5889
  }
5888
5890
  }
5889
- }),
5890
- label: css({
5891
- "& > a": {
5892
- color: "[inherit]",
5893
- cursor: "pointer",
5891
+ })
5892
+ },
5893
+ children: /* @__PURE__ */ jsxs(
5894
+ styled.a,
5895
+ {
5896
+ href: url,
5897
+ target: "_blank",
5898
+ style: {
5899
+ color: "var(--badge-color)",
5900
+ cursor: "pointer"
5901
+ },
5902
+ css: {
5894
5903
  transition: "fast",
5895
5904
  opacity: {
5896
5905
  base: 0.7,
@@ -5900,20 +5909,20 @@ const selector$7 = (state) => ({
5900
5909
  base: "none",
5901
5910
  _hover: "underline"
5902
5911
  }
5903
- }
5904
- })
5905
- },
5906
- children: /* @__PURE__ */ jsxs("a", { href: url, target: "_blank", children: [
5907
- isGithub && /* @__PURE__ */ jsx(
5908
- GithubIcon,
5909
- {
5910
- height: "12",
5911
- width: "12",
5912
- style: { verticalAlign: "middle", marginRight: "4px" }
5913
- }
5914
- ),
5915
- isGithub ? url.replace(GITHUB_PREFIX, "") : url
5916
- ] })
5912
+ },
5913
+ children: [
5914
+ isGithub && /* @__PURE__ */ jsx(
5915
+ GithubIcon,
5916
+ {
5917
+ height: "12",
5918
+ width: "12",
5919
+ style: { verticalAlign: "middle", marginRight: "4px" }
5920
+ }
5921
+ ),
5922
+ isGithub ? url.replace(GITHUB_PREFIX, "") : url
5923
+ ]
5924
+ }
5925
+ )
5917
5926
  }
5918
5927
  );
5919
5928
  }
@@ -5928,26 +5937,27 @@ const selector$7 = (state) => ({
5928
5937
  relativePath: view.$view.relativePath
5929
5938
  };
5930
5939
  }, ViewDetailsCard = (props) => {
5931
- const data = useNavigationActorSnapshot(selector$6), portalProps = useMantinePortalProps();
5940
+ const [opened, setOpened] = useState(!1), data = useNavigationActorSnapshot(selector$6), portalProps = useMantinePortalProps();
5932
5941
  return /* @__PURE__ */ jsxs(
5933
5942
  Popover,
5934
5943
  {
5935
5944
  position: "bottom-end",
5936
5945
  shadow: "xl",
5937
5946
  clickOutsideEvents: ["pointerdown", "mousedown", "click"],
5938
- trapFocus: !0,
5939
5947
  offset: {
5940
5948
  mainAxis: 4
5941
5949
  },
5950
+ opened,
5951
+ onChange: setOpened,
5942
5952
  ...portalProps,
5943
5953
  ...props,
5944
5954
  children: [
5945
- /* @__PURE__ */ jsx(ViewDetailsCardTrigger, { linksCount: data.links.length }),
5946
- /* @__PURE__ */ jsx(ViewDetailsCardDropdown, { data })
5955
+ /* @__PURE__ */ jsx(ViewDetailsCardTrigger, { linksCount: data.links.length, onOpen: () => setOpened(!0) }),
5956
+ opened && /* @__PURE__ */ jsx(ViewDetailsCardDropdown, { data, onClose: () => setOpened(!1) })
5947
5957
  ]
5948
5958
  }
5949
5959
  );
5950
- }, ViewDetailsCardTrigger = ({ linksCount }) => /* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsxs(
5960
+ }, ViewDetailsCardTrigger = ({ linksCount, onOpen }) => /* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsxs(
5951
5961
  UnstyledButton,
5952
5962
  {
5953
5963
  component: MotionButton,
@@ -5956,6 +5966,9 @@ const selector$7 = (state) => ({
5956
5966
  scale: 0.95,
5957
5967
  translateY: 1
5958
5968
  },
5969
+ onClick: (e2) => {
5970
+ e2.stopPropagation(), onOpen();
5971
+ },
5959
5972
  className: cx(
5960
5973
  "group",
5961
5974
  hstack({
@@ -6014,10 +6027,11 @@ const selector$7 = (state) => ({
6014
6027
  tags,
6015
6028
  links,
6016
6029
  relativePath
6017
- }
6030
+ },
6031
+ onClose
6018
6032
  }) => {
6019
6033
  const diagram = useDiagram();
6020
- return /* @__PURE__ */ jsxs(
6034
+ return useOnDiagramEvent("paneClick", onClose), useOnDiagramEvent("nodeClick", onClose), /* @__PURE__ */ jsxs(
6021
6035
  Popover.Dropdown,
6022
6036
  {
6023
6037
  className: cx(
@@ -6027,9 +6041,10 @@ const selector$7 = (state) => ({
6027
6041
  layerStyle: "likec4.dropdown",
6028
6042
  gap: "md",
6029
6043
  padding: "md",
6044
+ paddingBottom: "lg",
6030
6045
  pointerEvents: "all",
6031
- maxWidth: "calc(100cqw - 32px)",
6032
- minWidth: "calc(100cqw - 50px)",
6046
+ maxWidth: "calc(100cqw - 52px)",
6047
+ minWidth: "200px",
6033
6048
  maxHeight: "calc(100cqh - 100px)",
6034
6049
  width: "max-content",
6035
6050
  cursor: "default",
@@ -6046,7 +6061,7 @@ const selector$7 = (state) => ({
6046
6061
  ),
6047
6062
  children: [
6048
6063
  /* @__PURE__ */ jsxs("section", { children: [
6049
- /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xl", children: title2 }),
6064
+ /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xl", lh: "sm", children: title2 }),
6050
6065
  /* @__PURE__ */ jsxs(HStack, { alignItems: "flex-start", mt: "1", children: [
6051
6066
  /* @__PURE__ */ jsx(ViewBadge, { label: "id", value: id }),
6052
6067
  /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: tags.map((tag, i) => /* @__PURE__ */ jsx(
@@ -6066,7 +6081,7 @@ const selector$7 = (state) => ({
6066
6081
  /* @__PURE__ */ jsx(SectionHeader$1, { children: "Links" }),
6067
6082
  /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: links.map((link, i) => /* @__PURE__ */ jsx(Link, { value: link }, `${i}-${link.url}`)) })
6068
6083
  ] }),
6069
- description2.isEmpty && /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xs", c: "dimmed", my: "md", style: { userSelect: "none" }, children: "No description" }),
6084
+ description2.isEmpty && /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xs", c: "dimmed", style: { userSelect: "none" }, children: "No description" }),
6070
6085
  description2.nonEmpty && /* @__PURE__ */ jsxs("section", { children: [
6071
6086
  /* @__PURE__ */ jsx(SectionHeader$1, { children: "Description" }),
6072
6087
  /* @__PURE__ */ jsx(
@@ -6104,6 +6119,7 @@ const selector$7 = (state) => ({
6104
6119
  overflow: "visible",
6105
6120
  px: "1",
6106
6121
  color: {
6122
+ _dark: "mantine.colors.gray[4]",
6107
6123
  _light: "mantine.colors.gray[8]"
6108
6124
  }
6109
6125
  }),
@@ -7209,12 +7225,18 @@ const backdropBlur = "--_blur", backdropOpacity = "--_opacity", dialog$1 = css({
7209
7225
  }), card$2 = css({
7210
7226
  position: "absolute",
7211
7227
  pointerEvents: "all",
7228
+ display: "flex",
7229
+ flexDirection: "column",
7230
+ padding: "4",
7212
7231
  gap: "lg",
7213
7232
  justifyContent: "stretch",
7233
+ color: "mantine.colors.text",
7214
7234
  backgroundColor: {
7215
7235
  base: "mantine.colors.body",
7216
7236
  _dark: "mantine.colors.dark[6]"
7217
7237
  },
7238
+ boxShadow: "md",
7239
+ overflow: "hidden",
7218
7240
  border: "none",
7219
7241
  backgroundImage: `
7220
7242
  linear-gradient(180deg,
@@ -8177,7 +8199,7 @@ function layoutRelationshipsView(data, scope) {
8177
8199
  y: position.y,
8178
8200
  position: [position.x, position.y],
8179
8201
  title: element.title,
8180
- description: RichText$1.from(element.description),
8202
+ description: element.summary,
8181
8203
  technology: element.technology,
8182
8204
  tags: [...element.tags],
8183
8205
  links: null,
@@ -8574,7 +8596,7 @@ const selector$5 = (state) => ({
8574
8596
  historySubjectId !== subjectId && historyOps.set(subjectId);
8575
8597
  }, [subjectId]), useEffect(() => {
8576
8598
  historySubjectId !== subjectId && browser.navigateTo(historySubjectId);
8577
- }, [historySubjectId, browser]), useEffect(() => {
8599
+ }, [historySubjectId, browser]), useRafEffect(() => {
8578
8600
  browser.updateView(layouted);
8579
8601
  }, [layouted, browser]);
8580
8602
  const hasStepBack = current > 0, hasStepForward = current + 1 < history.length;
@@ -9010,7 +9032,7 @@ function ElementDetailsCard({
9010
9032
  const [opened, setOpened] = useState(!1), windowSize = useViewportSize(), windowWidth = windowSize.width || window.innerWidth || 1200, windowHeight = windowSize.height || window.innerHeight || 800, [activeTab, setActiveTab] = useSessionStorage({
9011
9033
  key: "likec4:element-details:active-tab",
9012
9034
  defaultValue: "Properties"
9013
- }), diagram = useDiagram(), viewModel = useLikeC4Model().view(viewId), nodeModel = fromNode ? viewModel.findNode(fromNode) : viewModel.findNodeWithElement(fqn2), elementModel = viewModel.$model.element(fqn2), [viewsOf, otherViews] = t$3(
9035
+ }), diagram = useDiagram(), viewModel = useCurrentViewModel(), nodeModel = fromNode ? viewModel.findNode(fromNode) : viewModel.findNodeWithElement(fqn2), elementModel = viewModel.$model.element(fqn2), [viewsOf, otherViews] = t$3(
9014
9036
  [...elementModel.views()],
9015
9037
  t$c((v) => v.$view),
9016
9038
  t$i((v) => v._type === "element" && v.viewOf === fqn2)
@@ -9064,7 +9086,7 @@ function ElementDetailsCard({
9064
9086
  (_a2 = ref.current) != null && _a2.open || (_b2 = ref.current) == null || _b2.showModal();
9065
9087
  }, 20), useTimeoutEffect(() => {
9066
9088
  setOpened(!0);
9067
- }, 200), /* @__PURE__ */ jsx(
9089
+ }, 220), /* @__PURE__ */ jsx(
9068
9090
  m.dialog,
9069
9091
  {
9070
9092
  ref,
@@ -9095,10 +9117,8 @@ function ElementDetailsCard({
9095
9117
  e2.stopPropagation(), close();
9096
9118
  },
9097
9119
  children: /* @__PURE__ */ jsx(ReactRemoveScroll, { forwardProps: !0, removeScrollBar: !1, children: /* @__PURE__ */ jsxs(
9098
- Card,
9120
+ m.div,
9099
9121
  {
9100
- shadow: "md",
9101
- component: m.div,
9102
9122
  layout: !0,
9103
9123
  layoutRoot: !0,
9104
9124
  drag: !0,
@@ -9131,14 +9151,13 @@ function ElementDetailsCard({
9131
9151
  }
9132
9152
  },
9133
9153
  style: {
9134
- // `style` prop in Mantine doesn't accept motion values
9135
9154
  width,
9136
9155
  height
9137
9156
  },
9138
9157
  children: [
9139
9158
  /* @__PURE__ */ jsxs("div", { className: cardHeader, onPointerDown: (e2) => controls.start(e2), children: [
9140
- /* @__PURE__ */ jsxs(Group, { align: "start", justify: "space-between", gap: "sm", mb: "sm", wrap: "nowrap", children: [
9141
- /* @__PURE__ */ jsxs(Group, { align: "start", gap: "sm", style: { cursor: "default" }, wrap: "nowrap", children: [
9159
+ /* @__PURE__ */ jsxs(HStack, { alignItems: "start", justify: "space-between", gap: "sm", mb: "sm", flexWrap: "nowrap", children: [
9160
+ /* @__PURE__ */ jsxs(HStack, { alignItems: "start", gap: "sm", style: { cursor: "default" }, flexWrap: "nowrap", children: [
9142
9161
  elementIcon2,
9143
9162
  /* @__PURE__ */ jsxs("div", { children: [
9144
9163
  /* @__PURE__ */ jsx(
@@ -9162,7 +9181,7 @@ function ElementDetailsCard({
9162
9181
  }
9163
9182
  )
9164
9183
  ] }),
9165
- /* @__PURE__ */ jsxs(Group, { align: "baseline", gap: "sm", wrap: "nowrap", children: [
9184
+ /* @__PURE__ */ jsxs(HStack, { alignItems: "baseline", gap: "sm", flexWrap: "nowrap", children: [
9166
9185
  /* @__PURE__ */ jsxs("div", { children: [
9167
9186
  /* @__PURE__ */ jsx(SmallLabel, { children: "kind" }),
9168
9187
  /* @__PURE__ */ jsx(
@@ -9264,6 +9283,10 @@ function ElementDetailsCard({
9264
9283
  children: [
9265
9284
  /* @__PURE__ */ jsx(TabsList, { children: TABS.map((tab) => /* @__PURE__ */ jsx(TabsTab, { value: tab, children: tab }, tab)) }),
9266
9285
  /* @__PURE__ */ jsx(TabsPanel, { value: "Properties", children: /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "y", type: "scroll", offsetScrollbars: !0, children: /* @__PURE__ */ jsxs(Box$1, { className: propertiesGrid, pt: "xs", children: [
9286
+ elementModel.hasSummary && /* @__PURE__ */ jsxs(Fragment, { children: [
9287
+ /* @__PURE__ */ jsx(PropertyLabel, { children: "summary" }),
9288
+ /* @__PURE__ */ jsx(MarkdownBlock, { value: elementModel.summary })
9289
+ ] }),
9267
9290
  /* @__PURE__ */ jsxs(Fragment, { children: [
9268
9291
  /* @__PURE__ */ jsx(PropertyLabel, { children: "description" }),
9269
9292
  /* @__PURE__ */ jsx(
@@ -9397,12 +9420,10 @@ function ElementMetata({
9397
9420
  children: t$6(metadata).map(([key2, value]) => /* @__PURE__ */ jsxs(
9398
9421
  "div",
9399
9422
  {
9400
- className: cx(
9401
- "group",
9402
- css({
9403
- display: "contents"
9404
- })
9405
- ),
9423
+ style: {
9424
+ display: "contents"
9425
+ },
9426
+ className: "group",
9406
9427
  children: [
9407
9428
  /* @__PURE__ */ jsxs(
9408
9429
  "div",
@@ -9451,7 +9472,7 @@ function ElementMetata({
9451
9472
  fontSize: "sm",
9452
9473
  padding: "xxs",
9453
9474
  whiteSpace: "pre",
9454
- fontFamily: "[var(--mantine-font-family-monospace)]",
9475
+ fontFamily: "mono",
9455
9476
  userSelect: "all"
9456
9477
  }),
9457
9478
  children: value
@@ -9931,7 +9952,7 @@ function layoutRelationshipDetails(data, scope) {
9931
9952
  y: position.y,
9932
9953
  position: [position.x, position.y],
9933
9954
  title: element.title,
9934
- description: RichText.from(element.description),
9955
+ description: element.summary,
9935
9956
  technology: element.technology,
9936
9957
  tags: [...element.tags],
9937
9958
  links: null,
@@ -10977,7 +10998,7 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded }) {
10977
10998
  }
10978
10999
  ) })
10979
11000
  ] }),
10980
- /* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn$1.description, lineClamp: 1, children: element.description.text || "No description" })
11001
+ /* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn$1.description, lineClamp: 1, children: element.summary.text || "No description" })
10981
11002
  ] }),
10982
11003
  /* @__PURE__ */ jsx(Text, { component: "div", className: cx(elementViewsCount, btn$1.descriptionColor), fz: "xs", children: views.length === 0 ? "No views" : /* @__PURE__ */ jsxs(Fragment, { children: [
10983
11004
  views.length,
@@ -17549,10 +17570,7 @@ function findCorrespondingNode(context2, event) {
17549
17570
  const fromNodeId = (_a = context2.lastOnNavigate) == null ? void 0 : _a.fromNode, fromNode = fromNodeId && context2.xynodes.find((n2) => n2.id === fromNodeId), fromRef = fromNode && nodeRef(fromNode), toNode = fromRef && event.xynodes.find((n2) => nodeRef(n2) === fromRef);
17550
17571
  return { fromNode, toNode };
17551
17572
  }
17552
- const diagramMachine = _diagramMachine, selectToggledFeatures = (state) => state.context.features.enableReadOnly || state.context.activeWalkthrough ? {
17553
- ...state.context.toggledFeatures,
17554
- enableReadOnly: !0
17555
- } : state.context.toggledFeatures, selectDynamicViewVariant = (state) => state.context.dynamicViewVariant;
17573
+ const diagramMachine = _diagramMachine, selectDynamicViewVariant = (state) => state.context.dynamicViewVariant;
17556
17574
  function DiagramActorProvider({
17557
17575
  view,
17558
17576
  zoomable,
@@ -17610,39 +17628,36 @@ function DiagramActorProvider({
17610
17628
  () => convertToXYFlow({ view, where, nodesSelectable, dynamicViewVariant }),
17611
17629
  [view, where, nodesSelectable, dynamicViewVariant]
17612
17630
  );
17613
- useEffect(() => {
17631
+ return useRafEffect(() => {
17614
17632
  actorRef.send({
17615
17633
  type: "update.view",
17616
17634
  ...update
17617
17635
  });
17618
- }, [actorRef, update]);
17619
- const toggledFeatures = xstateReact_cjsExports.useSelector(actorRef, selectToggledFeatures, shallowEqual);
17620
- return /* @__PURE__ */ jsxs(DiagramActorContextProvider, { value: actorRef, children: [
17621
- /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CurrentViewModelProvider, { children }) }) }),
17636
+ }, [actorRef, update]), /* @__PURE__ */ jsxs(DiagramActorContextProvider, { value: actorRef, children: [
17637
+ /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CurrentViewModelProvider, { actorRef, children }) }),
17622
17638
  /* @__PURE__ */ jsx(DiagramActorEventListener, { actorRef })
17623
17639
  ] });
17624
17640
  }
17625
- function CurrentViewModelProvider({ children }) {
17626
- const viewId = useCurrentViewId(), viewmodel = useLikeC4Model().findView(viewId);
17627
- return /* @__PURE__ */ jsx(CurrentViewModelContext.Provider, { value: viewmodel, children });
17641
+ const selectViewIdAndToggledFeatures = (state) => state.context.features.enableReadOnly || state.context.activeWalkthrough ? {
17642
+ viewId: state.context.view.id,
17643
+ toggledFeatures: {
17644
+ ...state.context.toggledFeatures,
17645
+ enableReadOnly: !0
17646
+ }
17647
+ } : {
17648
+ viewId: state.context.view.id,
17649
+ toggledFeatures: state.context.toggledFeatures
17650
+ };
17651
+ function CurrentViewModelProvider({ children, actorRef }) {
17652
+ const { viewId, toggledFeatures } = xstateReact_cjsExports.useSelector(actorRef, selectViewIdAndToggledFeatures, deepEqual), viewmodel = useLikeC4Model().findView(viewId);
17653
+ return /* @__PURE__ */ jsx(CurrentViewModelContext.Provider, { value: viewmodel, children: /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children }) });
17628
17654
  }
17629
17655
  function DiagramActorEventListener({ actorRef }) {
17630
17656
  const {
17631
17657
  onNavigateTo,
17632
17658
  onOpenSource
17633
17659
  } = useDiagramEventHandlers();
17634
- return useOnDiagramEvent("openSource", ({ params }) => onOpenSource == null ? void 0 : onOpenSource(params)), useEffect(() => {
17635
- if (!onNavigateTo) return;
17636
- let frame;
17637
- const subscription = actorRef.on("navigateTo", ({ viewId }) => {
17638
- cancelAnimationFrame(frame), frame = requestAnimationFrame(() => {
17639
- onNavigateTo(viewId);
17640
- });
17641
- });
17642
- return () => {
17643
- cancelAnimationFrame(frame), subscription.unsubscribe();
17644
- };
17645
- }, [actorRef, onNavigateTo]), null;
17660
+ return useOnDiagramEvent("openSource", ({ params }) => onOpenSource == null ? void 0 : onOpenSource(params)), useOnDiagramEvent("navigateTo", ({ viewId }) => onNavigateTo == null ? void 0 : onNavigateTo(viewId)), null;
17646
17661
  }
17647
17662
  function LikeC4Diagram({
17648
17663
  onCanvasClick,
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, lazy, Suspense, createContext, useContext, useState, useMemo, memo, useRef, StrictMode } from "react";
3
3
  import { createRoot } from "react-dom/client";
4
- import { cv as useRouter, cw as isNotFound, cx as Container, b2 as Alert, T as Text, aM as Code, aa as Button, ao as Group, aj as rem, bG as Title, cy as Link, cz as useNavigate, f as useCallbackRef, cA as createRootRouteWithContext, cB as stripSearchParams, R as e, cC as Outlet, cD as useMantineColorScheme, cE as createFileRoute, cF as useDocumentTitle, af as Stack, cG as Loader, cH as useStore, b0 as ErrorBoundary, cI as Navigate, cJ as SimpleGrid, cK as useInViewport, cL as e$1, bs as Card, an as Box, cM as notFound, cN as useParams, ca as t, s as shallowEqual, cO as useIsomorphicLayoutEffect, bb as r, b1 as useTree, cP as useComputedColorScheme, b3 as Tree, aI as HoverCard, aJ as HoverCardTarget, aK as HoverCardDropdown, aB as ThemeIcon, cQ as onMount, x as atom, bY as useLocalStorage, cR as Drawer, bz as ScrollArea, ap as SegmentedControl, P as ActionIcon, aq as Menu, ar as MenuTarget, as as MenuDropdown, at as MenuItem, aQ as CopyButton$1, cS as Select, cT as ModalRoot, cU as ModalOverlay, cV as ModalContent, cW as ModalBody, bv as Tabs, bw as TabsList, bx as TabsTab, by as TabsPanel, cX as useMatches, cY as useMantineTheme, cZ as useMediaQuery, c_ as useDisclosure, am as Paper, ae as Divider, ad as Space, c$ as useParentMatches, d0 as MenuLabel, C as t$1, b5 as t$2, b8 as t$3, b7 as e$2, b6 as t$4, b9 as t$5, r as t$6, ba as n, i as t$7, be as dagre, bf as t$8, bg as t$9, d1 as useSearch, a4 as useDebouncedEffect, d2 as LoadingOverlay, a6 as Tooltip, d3 as useAsync, d4 as PanelGroup, d5 as Panel, d6 as PanelResizeHandle, d7 as Burger, d8 as RouterProvider, d9 as createRouter$1, da as createHashHistory, db as createBrowserHistory, dc as createTheme, aS as Portal, w as MantineProvider } from "./vendors.js";
4
+ import { cw as useRouter, cx as isNotFound, cy as Container, b2 as Alert, T as Text, aM as Code, aa as Button, ao as Group, aj as rem, bG as Title, cz as Link, cA as useNavigate, f as useCallbackRef, cB as createRootRouteWithContext, cC as stripSearchParams, R as e, cD as Outlet, cE as useMantineColorScheme, cF as createFileRoute, cG as useDocumentTitle, af as Stack, cH as Loader, cI as useStore, b0 as ErrorBoundary, cJ as Navigate, cK as SimpleGrid, cL as useInViewport, cM as e$1, bZ as Card, an as Box, cN as notFound, cO as useParams, cb as t, s as shallowEqual, cP as useIsomorphicLayoutEffect, bb as r, b1 as useTree, cQ as useComputedColorScheme, b3 as Tree, aI as HoverCard, aJ as HoverCardTarget, aK as HoverCardDropdown, aB as ThemeIcon, cR as onMount, x as atom, bY as useLocalStorage, cS as Drawer, bz as ScrollArea, ap as SegmentedControl, P as ActionIcon, aq as Menu, ar as MenuTarget, as as MenuDropdown, at as MenuItem, aQ as CopyButton$1, cT as Select, cU as ModalRoot, cV as ModalOverlay, cW as ModalContent, cX as ModalBody, bv as Tabs, bw as TabsList, bx as TabsTab, by as TabsPanel, cY as useMatches, cZ as useMantineTheme, c_ as useMediaQuery, c$ as useDisclosure, am as Paper, ae as Divider, ad as Space, d0 as useParentMatches, d1 as MenuLabel, C as t$1, b5 as t$2, b8 as t$3, b7 as e$2, b6 as t$4, b9 as t$5, r as t$6, ba as n, i as t$7, be as dagre, bf as t$8, bg as t$9, d2 as useSearch, a4 as useDebouncedEffect, d3 as LoadingOverlay, a6 as Tooltip, d4 as useAsync, d5 as PanelGroup, d6 as Panel, d7 as PanelResizeHandle, d8 as Burger, d9 as RouterProvider, da as createRouter$1, db as createHashHistory, dc as createBrowserHistory, dd as createTheme, aS as Portal, w as MantineProvider } from "./vendors.js";
5
5
  import { projects } from "likec4:projects";
6
6
  import { c as css, L as LikeC4ProjectsProvider, u as useLikeC4Projects, I as IconRendererProvider, a as LikeC4ModelProvider, b as useLikeC4Model$1, S as StaticLikeC4Diagram, M as MarkdownBlock, B as Box$1, d as useUpdateEffect, e as IconStarFilled, f as IconStack2, g as IconLayoutDashboard, h as IconFileCode, i as IconFolderOpen, j as IconFolderFilled, k as IconArrowLeft, l as IconMoonStars, m as IconSun, n as IconChevronDown, o as IconAlertTriangle, p as IconCheck, q as IconCopy, r as IconExternalLink, s as IconShare, t as LikeC4Diagram } from "./likec4.js";
7
7
  import { pageTitle, ComponentName, useHashHistory, withOverviewGraph, krokiPumlSvgUrl, isDevelopment, krokiD2SvgUrl, basepath } from "./const.js";
@@ -1474,7 +1474,7 @@ async function downloadAsPng({
1474
1474
  pngFilename,
1475
1475
  viewport
1476
1476
  }) {
1477
- const { toBlob } = await import("./vendors.js").then((n2) => n2.dd);
1477
+ const { toBlob } = await import("./vendors.js").then((n2) => n2.de);
1478
1478
  try {
1479
1479
  const blob = await toBlob(viewport, {
1480
1480
  backgroundColor: "transparent",