likec4 1.42.0 → 1.43.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.
- package/__app__/src/likec4.js +436 -178
- package/__app__/src/main.js +4 -4
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +627 -518
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +149 -105
- package/dist/cli/index.mjs +372 -370
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.BCSBNe4z.d.mts → likec4.CQWzqezS.d.mts} +144 -144
- package/dist/shared/{likec4.CJVbsoPD.mjs → likec4.CWfMOOnG.mjs} +1 -1
- package/dist/shared/{likec4.B5Q51Z1F.mjs → likec4.DtL27jG4.mjs} +85 -80
- package/dist/shared/{likec4.DdxVkEIS.mjs → likec4.DvPKV9S-.mjs} +2390 -2385
- package/dist/shared/{likec4.CaOUU1HJ.d.mts → likec4.VWjIqhhl.d.mts} +36 -19
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +29 -29
- package/react/index.d.ts +37 -31
- package/react/index.js +4170 -3773
package/__app__/src/likec4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { forwardRef, createElement, useContext, createContext,
|
|
1
|
+
import { forwardRef, createElement, useContext, createContext, useState, useRef, useEffect, useMemo, memo as memo$1, useCallback, useLayoutEffect, useDeferredValue, Fragment as Fragment$1 } from "react";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
import { u as useFirstMountState, a as useCustomCompareEffect, s as shallowEqual, b as useStoreApi, c as useStore, d as useCallbackRef, e as useReactFlow, f as useInternalNode, t, g as e, h as compare$1, i as e$1, j as e$2, k as t$1, l as setExports, m as unified, r as remarkParse, n as remarkGfm, o as remarkRehype, p as rehypeRaw, q as rehypeSanitize, v as rehypeStringify, w as toString, x as fromMarkdown, y as chroma, z as generateColors, A as t$2, B as t$3, C as t$4, D as t$5, E as t$6, F as e$3, G as e$4, H as defu, I as Bezier, J as e$5, K as getNodeDimensions, L as Background$1, M as BackgroundVariant, N as n, O as useMantineColorScheme, P as index, Q as
|
|
4
|
+
import { u as useFirstMountState, a as useCustomCompareEffect, s as shallowEqual, b as useStoreApi, c as useStore, d as useCallbackRef, e as useReactFlow, f as useInternalNode, t, g as e, h as compare$1, i as e$1, j as e$2, k as t$1, l as setExports, m as unified, r as remarkParse, n as remarkGfm, o as remarkRehype, p as rehypeRaw, q as rehypeSanitize, v as rehypeStringify, w as toString, x as fromMarkdown, y as chroma, z as generateColors, A as t$2, B as t$3, C as t$4, D as t$5, E as t$6, F as e$3, G as e$4, H as defu, I as Bezier, J as e$5, K as getNodeDimensions, L as Background$1, M as BackgroundVariant, N as n, O as useMantineColorScheme, P as index, Q as createSafeContext, R as atom, S as useIsomorphicLayoutEffect, T as useSyncedRef, U as t$7, V as t$8, W as MantineContext, X as MantineProvider, Y as useMantineStyleNonce, Z as LazyMotion, _ as domMax, $ as MotionConfig, a0 as deepEqual, a1 as e$6, a2 as t$9, a3 as t$a, a4 as t$b, a5 as t$c, a6 as useId$1, a7 as ErrorBoundary$1, a8 as Notification, a9 as ScrollAreaAutosize, aa as Code, ab as Group, ac as Button, ad as getNodesBounds, ae as getEdgePosition, af as xstateReact_cjsExports, ag as xstate_cjsExports, ah as ActionIcon, ai as MotionButton, aj as ThemeIcon, ak as Tooltip$6, al as Breadcrumbs, am as useHover, an as Popover, ao as PopoverTarget, ap as PopoverDropdown, aq as Box$1, ar as FloatingIndicator, as as Text, at as Flex, au as UnstyledButton, av as useDebouncedCallback, aw as useUncontrolled, ax as clampUseMovePosition, ay as useMove, az as useMergedRef, aA as HoverCard, aB as HoverCardTarget, aC as HoverCardDropdown, aD as TooltipGroup, aE as AnimatePresence, aF as MotionDiv, aG as isMacOs, aH as useDebouncedValue, aI as e$7, aJ as EdgeLabelRenderer, aK as e$8, aL as useDebouncedState, aM as NodeToolbar, aN as Position, aO as Handle, aP as Badge, aQ as CopyButton, aR as SegmentedControl, aS as MotionSpan, aT as Portal, aU as NavLink, aV as ColorSwatch, aW as Space, aX as Divider$1, aY as Stack, aZ as CheckIcon, a_ as rem, a$ as useUpdateEffect$1, b0 as Slider, b1 as Paper, b2 as Menu, b3 as MenuTarget, b4 as MenuDropdown, b5 as MenuItem, b6 as useFocusTrap, b7 as useReducedMotionConfig, b8 as useTimeoutEffect, b9 as m, ba as ReactRemoveScroll, bb as useThrottledCallback, bc as createScopedKeydownHandler, bd as Input, be as t$d, bf as Highlight, bg as useMountEffect, bh as e$9, bi as LayoutGroup, bj as useTree, bk as Alert, bl as Tree, bm as getBezierPath, bn as DefaultMap, bo as t$e, bp as t$f, bq as e$a, br as t$g, bs as t$h, bt as n$1, bu as n$2, bv as r, bw as t$i, bx as n$3, by as dagre, bz as t$j, bA as t$k, bB as t$l, bC as ReactFlowProvider, bD as useStateHistory, bE as useRafEffect, bF as Panel, bG as Anchor, bH as Pill, bI as useViewportSize, bJ as useSessionStorage, bK as t$m, bL as useDragControls, bM as useMotionValue, bN as CloseButton, bO as ActionIconGroup, bP as Tabs, bQ as TabsList, bR as TabsTab, bS as TabsPanel, bT as ScrollArea, bU as animate, bV as e$b, bW as VisuallyHidden, bX as n$4, bY as useWindowEvent, bZ as FocusTrap, b_ as Title$1, b$ as useFocusWithin, c0 as useCombobox, c1 as ComboboxOption, c2 as Combobox, c3 as ComboboxTarget, c4 as ComboboxDropdown, c5 as ComboboxOptions, c6 as ComboboxEmpty, c7 as useHotkeys, c8 as Grid, c9 as GridCol, ca as autoUpdate, cb as computePosition, cc as offset, cd as autoPlacement, ce as size, cf as hide, cg as useLocalStorage, ch as Card, ci as n$5, cj as useRerender, ck as d3line, cl as curveCatmullRomOpen, cm as t$n, cn as useDebouncedEffect, co as getSmoothStepPath, cp as useTimeout, cq as useDebouncedCallback$1, cr as useCustomCompareMemo, cs as Queue, ct as t$o, cu as e$c, cv as applyEdgeChanges, cw as applyNodeChanges, cx as getViewportForBounds, cy as t$p, cz as getHotkeyHandler, cA as n$6, cB as t$q, cC as e$d, cD as getBoundsOfRects, cE as boxToRect, cF as nodeToRect, cG as toRgba, cH as t$r, cI as mix, cJ as toHex, cK as scale, cL as e$e, cM as t$s } from "./vendors.js";
|
|
5
5
|
function isObject(value) {
|
|
6
6
|
return typeof value == "object" && value != null && !Array.isArray(value);
|
|
7
7
|
}
|
|
@@ -612,105 +612,105 @@ const __iconNode$l = [["path", { d: "M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2
|
|
|
612
612
|
* This source code is licensed under the MIT license.
|
|
613
613
|
* See the LICENSE file in the root directory of this source tree.
|
|
614
614
|
*/
|
|
615
|
-
const __iconNode$k = [["path", { d: "
|
|
615
|
+
const __iconNode$k = [["path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", key: "svg-0" }], ["path", { d: "M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2", key: "svg-1" }], ["path", { d: "M19 11h2m-1 -1v2", key: "svg-2" }]], IconMoonStars = createReactComponent("outline", "moon-stars", "MoonStars", __iconNode$k);
|
|
616
616
|
/**
|
|
617
617
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
618
618
|
*
|
|
619
619
|
* This source code is licensed under the MIT license.
|
|
620
620
|
* See the LICENSE file in the root directory of this source tree.
|
|
621
621
|
*/
|
|
622
|
-
const __iconNode$j = [["path", { d: "
|
|
622
|
+
const __iconNode$j = [["path", { d: "M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718z", key: "svg-0" }], ["path", { d: "M9 21v-7.5", key: "svg-1" }], ["path", { d: "M9 13.5l11.5 -5.5", key: "svg-2" }], ["path", { d: "M3.5 11l5.5 2.5", key: "svg-3" }]], IconRectangularPrism = createReactComponent("outline", "rectangular-prism", "RectangularPrism", __iconNode$j);
|
|
623
623
|
/**
|
|
624
624
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
625
625
|
*
|
|
626
626
|
* This source code is licensed under the MIT license.
|
|
627
627
|
* See the LICENSE file in the root directory of this source tree.
|
|
628
628
|
*/
|
|
629
|
-
const __iconNode$i = [["path", { d: "
|
|
629
|
+
const __iconNode$i = [["path", { d: "M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-0" }], ["path", { d: "M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-1" }], ["path", { d: "M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-2" }], ["path", { d: "M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3", key: "svg-3" }], ["path", { d: "M16.5 8.5l2.5 2.5l2.5 -2.5", key: "svg-4" }]], IconReorder = createReactComponent("outline", "reorder", "Reorder", __iconNode$i);
|
|
630
630
|
/**
|
|
631
631
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
632
632
|
*
|
|
633
633
|
* This source code is licensed under the MIT license.
|
|
634
634
|
* See the LICENSE file in the root directory of this source tree.
|
|
635
635
|
*/
|
|
636
|
-
const __iconNode$h = [["path", { d: "
|
|
636
|
+
const __iconNode$h = [["path", { d: "M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-0" }], ["path", { d: "M18 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-1" }], ["path", { d: "M12 19h4.5c.71 0 1.372 -.212 1.924 -.576m1.545 -2.459a3.5 3.5 0 0 0 -3.469 -3.965h-.499m-4 0h-3.501a3.5 3.5 0 0 1 -2.477 -5.972m2.477 -1.028h3.5", key: "svg-2" }], ["path", { d: "M3 3l18 18", key: "svg-3" }]], IconRouteOff = createReactComponent("outline", "route-off", "RouteOff", __iconNode$h);
|
|
637
637
|
/**
|
|
638
638
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
639
639
|
*
|
|
640
640
|
* This source code is licensed under the MIT license.
|
|
641
641
|
* See the LICENSE file in the root directory of this source tree.
|
|
642
642
|
*/
|
|
643
|
-
const __iconNode$g = [["path", { d: "
|
|
643
|
+
const __iconNode$g = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], IconSearch = createReactComponent("outline", "search", "Search", __iconNode$g);
|
|
644
644
|
/**
|
|
645
645
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
646
646
|
*
|
|
647
647
|
* This source code is licensed under the MIT license.
|
|
648
648
|
* See the LICENSE file in the root directory of this source tree.
|
|
649
649
|
*/
|
|
650
|
-
const __iconNode$f = [["path", { d: "
|
|
650
|
+
const __iconNode$f = [["path", { d: "M8 9l4 -4l4 4", key: "svg-0" }], ["path", { d: "M16 15l-4 4l-4 -4", key: "svg-1" }]], IconSelector = createReactComponent("outline", "selector", "Selector", __iconNode$f);
|
|
651
651
|
/**
|
|
652
652
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
653
653
|
*
|
|
654
654
|
* This source code is licensed under the MIT license.
|
|
655
655
|
* See the LICENSE file in the root directory of this source tree.
|
|
656
656
|
*/
|
|
657
|
-
const __iconNode$e = [["path", { d: "
|
|
657
|
+
const __iconNode$e = [["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }], ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }], ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }], ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }], ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]], IconShare = createReactComponent("outline", "share", "Share", __iconNode$e);
|
|
658
658
|
/**
|
|
659
659
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
660
660
|
*
|
|
661
661
|
* This source code is licensed under the MIT license.
|
|
662
662
|
* See the LICENSE file in the root directory of this source tree.
|
|
663
663
|
*/
|
|
664
|
-
const __iconNode$d = [["path", { d: "
|
|
664
|
+
const __iconNode$d = [["path", { d: "M12 4l-8 4l8 4l8 -4l-8 -4", key: "svg-0" }], ["path", { d: "M4 12l8 4l8 -4", key: "svg-1" }], ["path", { d: "M4 16l8 4l8 -4", key: "svg-2" }]], IconStack2 = createReactComponent("outline", "stack-2", "Stack2", __iconNode$d);
|
|
665
665
|
/**
|
|
666
666
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
667
667
|
*
|
|
668
668
|
* This source code is licensed under the MIT license.
|
|
669
669
|
* See the LICENSE file in the root directory of this source tree.
|
|
670
670
|
*/
|
|
671
|
-
const __iconNode$c = [["path", { d: "M12
|
|
671
|
+
const __iconNode$c = [["path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", key: "svg-1" }]], IconSun = createReactComponent("outline", "sun", "Sun", __iconNode$c);
|
|
672
672
|
/**
|
|
673
673
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
674
674
|
*
|
|
675
675
|
* This source code is licensed under the MIT license.
|
|
676
676
|
* See the LICENSE file in the root directory of this source tree.
|
|
677
677
|
*/
|
|
678
|
-
const __iconNode$b = [["path", { d: "M12 12m-
|
|
678
|
+
const __iconNode$b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0", key: "svg-1" }], ["path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-2" }]], IconTarget = createReactComponent("outline", "target", "Target", __iconNode$b);
|
|
679
679
|
/**
|
|
680
680
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
681
681
|
*
|
|
682
682
|
* This source code is licensed under the MIT license.
|
|
683
683
|
* See the LICENSE file in the root directory of this source tree.
|
|
684
684
|
*/
|
|
685
|
-
const __iconNode$a = [["path", { d: "
|
|
685
|
+
const __iconNode$a = [["path", { d: "M3 6a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-0" }], ["path", { d: "M21 11v-3a2 2 0 0 0 -2 -2h-6l3 3m0 -6l-3 3", key: "svg-1" }], ["path", { d: "M3 13v3a2 2 0 0 0 2 2h6l-3 -3m0 6l3 -3", key: "svg-2" }], ["path", { d: "M15 18a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-3" }]], IconTransform = createReactComponent("outline", "transform", "Transform", __iconNode$a);
|
|
686
686
|
/**
|
|
687
687
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
688
688
|
*
|
|
689
689
|
* This source code is licensed under the MIT license.
|
|
690
690
|
* See the LICENSE file in the root directory of this source tree.
|
|
691
691
|
*/
|
|
692
|
-
const __iconNode$9 = [["path", { d: "
|
|
692
|
+
const __iconNode$9 = [["path", { d: "M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", key: "svg-0" }], ["path", { d: "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2", key: "svg-1" }]], IconUser = createReactComponent("outline", "user", "User", __iconNode$9);
|
|
693
693
|
/**
|
|
694
694
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
695
695
|
*
|
|
696
696
|
* This source code is licensed under the MIT license.
|
|
697
697
|
* See the LICENSE file in the root directory of this source tree.
|
|
698
698
|
*/
|
|
699
|
-
const __iconNode$8 = [["path", { d: "
|
|
699
|
+
const __iconNode$8 = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l12 12", key: "svg-1" }]], IconX = createReactComponent("outline", "x", "X", __iconNode$8);
|
|
700
700
|
/**
|
|
701
701
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
702
702
|
*
|
|
703
703
|
* This source code is licensed under the MIT license.
|
|
704
704
|
* See the LICENSE file in the root directory of this source tree.
|
|
705
705
|
*/
|
|
706
|
-
const __iconNode$7 = [["path", { d: "
|
|
706
|
+
const __iconNode$7 = [["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-0" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-2" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-3" }], ["path", { d: "M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-4" }], ["path", { d: "M16 16l-2.5 -2.5", key: "svg-5" }]], IconZoomScan = createReactComponent("outline", "zoom-scan", "ZoomScan", __iconNode$7);
|
|
707
707
|
/**
|
|
708
708
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
709
709
|
*
|
|
710
710
|
* This source code is licensed under the MIT license.
|
|
711
711
|
* See the LICENSE file in the root directory of this source tree.
|
|
712
712
|
*/
|
|
713
|
-
const __iconNode$6 = [["path", { d: "
|
|
713
|
+
const __iconNode$6 = [["path", { d: "M10.52 2.614a2.095 2.095 0 0 1 2.835 -.117l.126 .117l7.905 7.905c.777 .777 .816 2.013 .117 2.836l-.117 .126l-7.905 7.905a2.094 2.094 0 0 1 -2.836 .117l-.126 -.117l-7.907 -7.906a2.096 2.096 0 0 1 -.115 -2.835l.117 -.126l7.905 -7.905zm5.969 9.535l.01 -.116l-.003 -.12l-.016 -.114l-.03 -.11l-.044 -.112l-.052 -.098l-.076 -.105l-.07 -.081l-3.5 -3.5l-.095 -.083a1 1 0 0 0 -1.226 0l-.094 .083l-.083 .094a1 1 0 0 0 0 1.226l.083 .094l1.792 1.793h-5.085l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h5.085l-1.792 1.793l-.083 .094a1 1 0 0 0 1.403 1.403l.094 -.083l3.5 -3.5l.097 -.112l.05 -.074l.037 -.067l.05 -.112l.023 -.076l.025 -.117z", key: "svg-0" }]], IconDirectionSignFilled = createReactComponent("filled", "direction-sign-filled", "DirectionSignFilled", __iconNode$6);
|
|
714
714
|
/**
|
|
715
715
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
716
716
|
*
|
|
@@ -1801,7 +1801,7 @@ const ZIndexes = {
|
|
|
1801
1801
|
}, MinZoom = 0.05, MaxZoom = 3, FitViewPaddings = {
|
|
1802
1802
|
default: "16px",
|
|
1803
1803
|
withControls: {
|
|
1804
|
-
top: "
|
|
1804
|
+
top: "58px",
|
|
1805
1805
|
left: "16px",
|
|
1806
1806
|
right: "16px",
|
|
1807
1807
|
bottom: "16px"
|
|
@@ -1982,19 +1982,7 @@ const selectDimensions = ({ width, height }) => (width || 1) * (height || 1), Vi
|
|
|
1982
1982
|
}) => {
|
|
1983
1983
|
const square = useStore(selectDimensions);
|
|
1984
1984
|
return useUpdateEffect(onViewportResize, [square]), null;
|
|
1985
|
-
},
|
|
1986
|
-
function useIsReducedGraphics() {
|
|
1987
|
-
const isReduced = useContext(ReduceGraphicsModeCtx);
|
|
1988
|
-
return isReduced === null && console.warn("ReduceGraphicsMode is not provided"), isReduced ?? !1;
|
|
1989
|
-
}
|
|
1990
|
-
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
1991
|
-
"PanningAtomSafeCtx is not provided"
|
|
1992
|
-
);
|
|
1993
|
-
function ReduceGraphicsContext({ reduceGraphics, children }) {
|
|
1994
|
-
const $isPanningRef = useRef(null);
|
|
1995
|
-
return $isPanningRef.current || ($isPanningRef.current = atom(reduceGraphics)), /* @__PURE__ */ jsx(PanningAtomSafeCtx, { value: $isPanningRef.current, children: /* @__PURE__ */ jsx(ReduceGraphicsModeCtx.Provider, { value: reduceGraphics, children }) });
|
|
1996
|
-
}
|
|
1997
|
-
const RootContainerContext = createContext(null);
|
|
1985
|
+
}, RootContainerContext = createContext(null);
|
|
1998
1986
|
function useRootContainer() {
|
|
1999
1987
|
const ctx = useContext(RootContainerContext);
|
|
2000
1988
|
if (!ctx)
|
|
@@ -2007,20 +1995,28 @@ function useRootContainerRef() {
|
|
|
2007
1995
|
function useRootContainerElement() {
|
|
2008
1996
|
return useRootContainer().ref.current;
|
|
2009
1997
|
}
|
|
1998
|
+
const ReduceGraphicsModeCtx = createContext(null);
|
|
1999
|
+
function useIsReducedGraphics() {
|
|
2000
|
+
const isReduced = useContext(ReduceGraphicsModeCtx);
|
|
2001
|
+
return isReduced === null && console.warn("ReduceGraphicsMode is not provided"), isReduced ?? !1;
|
|
2002
|
+
}
|
|
2003
|
+
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
2004
|
+
"PanningAtomSafeCtx is not provided"
|
|
2005
|
+
);
|
|
2010
2006
|
function RootContainer({
|
|
2011
2007
|
id,
|
|
2012
2008
|
className,
|
|
2013
2009
|
reduceGraphics = !1,
|
|
2014
2010
|
children
|
|
2015
2011
|
}) {
|
|
2016
|
-
const [mounted, setMounted] = useState(!1), ref = useRef(null), $
|
|
2017
|
-
useIsomorphicLayoutEffect(() => {
|
|
2012
|
+
const [mounted, setMounted] = useState(!1), ref = useRef(null), $isPanningRef = useRef(null);
|
|
2013
|
+
$isPanningRef.current || ($isPanningRef.current = atom(!1)), useIsomorphicLayoutEffect(() => {
|
|
2018
2014
|
setMounted(!0);
|
|
2019
|
-
}, []), useEffect(() => $
|
|
2015
|
+
}, []), useEffect(() => $isPanningRef.current?.subscribe((isPanning) => {
|
|
2020
2016
|
ref.current?.setAttribute("data-likec4-diagram-panning", isPanning ? "true" : "false");
|
|
2021
|
-
}), [
|
|
2017
|
+
}), []);
|
|
2022
2018
|
const ctx = useMemo(() => ({ id, ref }), [id, ref]);
|
|
2023
|
-
return /* @__PURE__ */ jsx(
|
|
2019
|
+
return /* @__PURE__ */ jsx(PanningAtomSafeCtx, { value: $isPanningRef.current, children: /* @__PURE__ */ jsx(ReduceGraphicsModeCtx.Provider, { value: reduceGraphics, children: /* @__PURE__ */ jsx(
|
|
2024
2020
|
"div",
|
|
2025
2021
|
{
|
|
2026
2022
|
id,
|
|
@@ -2031,7 +2027,7 @@ function RootContainer({
|
|
|
2031
2027
|
},
|
|
2032
2028
|
children: mounted && !!ctx.ref.current && /* @__PURE__ */ jsx(RootContainerContext.Provider, { value: ctx, children })
|
|
2033
2029
|
}
|
|
2034
|
-
);
|
|
2030
|
+
) }) });
|
|
2035
2031
|
}
|
|
2036
2032
|
const defaultHandlers = {
|
|
2037
2033
|
onChange: null,
|
|
@@ -2155,10 +2151,7 @@ const FramerMotionConfig = ({
|
|
|
2155
2151
|
}) => {
|
|
2156
2152
|
const nonce = useMantineStyleNonce()?.();
|
|
2157
2153
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: !0, children: /* @__PURE__ */ jsx(MotionConfig, { reducedMotion, ...nonce && { nonce }, children }) });
|
|
2158
|
-
},
|
|
2159
|
-
ControlsCustomLayoutProvider,
|
|
2160
|
-
useControlsCustomLayout
|
|
2161
|
-
] = createOptionalContext(null), LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
|
|
2154
|
+
}, LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
|
|
2162
2155
|
function EnsureCurrentViewModel({ children }) {
|
|
2163
2156
|
return useContext(CurrentViewModelContext) ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
|
|
2164
2157
|
}
|
|
@@ -3758,12 +3751,41 @@ function useNavigationActor() {
|
|
|
3758
3751
|
closeDropdown: () => actorRef.send({ type: "dropdown.dismiss" })
|
|
3759
3752
|
}), [actorRef]);
|
|
3760
3753
|
}
|
|
3761
|
-
const
|
|
3754
|
+
const Logo = forwardRef(
|
|
3755
|
+
(props, ref) => /* @__PURE__ */ jsxs("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 222 56", ...props, children: [
|
|
3756
|
+
/* @__PURE__ */ jsx(
|
|
3757
|
+
"path",
|
|
3758
|
+
{
|
|
3759
|
+
fill: "#5E98AF",
|
|
3760
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
3761
|
+
}
|
|
3762
|
+
),
|
|
3763
|
+
/* @__PURE__ */ jsx(
|
|
3764
|
+
"path",
|
|
3765
|
+
{
|
|
3766
|
+
className: css({
|
|
3767
|
+
fill: "[#FCFBF7]",
|
|
3768
|
+
_light: {
|
|
3769
|
+
fill: "[#222221]"
|
|
3770
|
+
}
|
|
3771
|
+
}),
|
|
3772
|
+
d: "M71.61 12.08c-.06 3.61.3 29.95.23 31.87 0 1.8 0 3.6.06 5.41 0 .3.18.58.47.58 4.1.18 8.13-.17 12.22-.11 1.34.05 2.69 0 3.97 0 1.29-.06 1.4-.59 1.35-1.63-.06-1.63-.06-3.08-.06-4.65-.06-.82-.53-1.11-1.23-1.11-2.4.06-4.8-.06-7.19.06-.4.06-.82.06-1.23.06-.7-.06-.87-.24-.93-1v-.86c-.18-4.83.17-9.83.17-14.66-.06-4.07 0-7.73-.06-11.34 0-1.57 0-3.14-.05-4.65-.06-.93 0-1.92-.24-2.85-.11-.35-.29-.81-.7-.81h-5.5c-.93 0-1.22.64-1.28 1.57v4.12ZM103.81 35c-.17-6.63-.1-13.67-.05-20.24 0-2.04-.12-4.25-.12-6.28 0-2.21-.87-2.1-2.04-2.15-1.7-.06-2.46-.06-4.15-.06-1.11-.06-1.58.23-1.58 1.34 0 5.7-.18 21.8-.12 24.13.06 2.33.3 12.91.18 15.24-.06.81 0 1.62.06 2.44.05.29.23.58.7.58 1.93-.12 3.74-.12 5.67-.17.7-.06 1.28-.24 1.58-1 .05-.4-.12-11.04-.12-13.83Zm13.92 4.47c0-2.03-.3-7.56-.23-8.72 0-.17.11-.4.17-.4.12 0 .35.11.41.17 1.87 2.44 10.64 19.36 11.7 19.42.28.06.58.06.87.06 1.99-.12 3.74 0 5.73 0 2.04 0 .7-1.98.35-2.5-.53-.76-7.48-13.14-7.9-13.9-1.16-1.98-2.16-4.13-3.32-6.05-.12-.23-.24-.58-.18-.81.12-.7.3-1.34.59-1.98a93.18 93.18 0 0 1 4.55-8.14c1.88-2.97 2.93-4.83 4.45-7.5.35-.64.58-1.34.82-2.1.05-.29-.18-.58-.53-.58-1.11-.05-5.15 0-6.43 0-.59 0-1.17.12-1.46.64-.76 1.46-8.6 15.7-9.35 16.98-.06.12-.24.18-.41.18 0 0-.12-.18-.12-.3-.06-3.25.53-13.9.4-16.04-.05-1.28-.28-1.4-1.57-1.46-1.4-.05-3.33-.05-4.73-.05-1.3 0-1.4.7-1.58 1.62-.06.18-.06 5.64-.06 8.09 0 3.54-.3 25.76.11 32.8 0 .7.18 1.1.77 1.1 1.57-.12 3.91 0 5.49 0 1.11 0 1.29-.12 1.29-1.98 0-2.5.23-4.77.23-7.85 0-.23-.06-.46-.06-.7Zm25.66-1.4h-.06c0 1.46-.05 2.97 0 4.49.06 1.86.18 3.72.3 5.58 0 .64.17.81.76.93 1.22.29 2.4.35 3.62.35 3.16-.12 6.31.11 9.47 0 1.29-.06 1.87.06 3.16-.18 1.17-.23 1.58-.87 1.58-2.61-.12-1.1-.06-1.57-.06-2.91 0-1.92-1.35-2.56-2.52-2.5-.81.06-4.73-.06-6.31-.06-2.63.06-2.22.4-2.22-2.33 0-2.2.06-5.05.06-7.32 0-1.22.11-1.63 1.28-1.63h7.31c1.17.17 1.99-.64 1.99-1.86 0-1.22.12-1.28.12-2.5l-.18-1.75c-.12-.99-.47-1.33-1.46-1.33-.64 0-1.29.05-1.93.11-2.52.18-3.68-.17-6.14 0-.82 0-.93-.11-1-.87-.23-2.27 0-4.77.24-7.04.06-.93.3-1.1 1.17-1.16l8.24-.06c1.11-.11 1.46-.06 1.4-1.16-.11-1.69.06-3.43-.11-5.12-.12-.93-.41-1.1-1.46-1.1-1.76.05-2.17.05-3.92.17-1.75.06-8.77.06-10.46.06-2.46 0-2.63-.18-2.7 2.8-.1 2.32-.05 4.7-.05 7.09 0 4.07-.23 18.66-.12 21.92Zm47.76-24.82c.06-1.92 0-3.5 0-5.35 0-2.15-3.92-1.92-5.32-1.86a18.95 18.95 0 0 0-15.08 9.77c-.82 1.57-1.4 3.2-1.81 4.88a34 34 0 0 0-.59 12.15c.41 3.78 1.4 7.56 3.74 10.59 4.04 5.3 11.46 7.15 17.83 6.16.3-.06.59-.11.82-.29.18-.11.35-.35.35-.58l.18-3.31c.06-1.05 0-1 0-2.04 0-1.4-2.93-.35-4.74-.35-1.75 0-3.62-.06-5.2-.87-2.8-1.57-4.38-4.71-5.26-7.68-1-3.2-1.23-6.63-.64-9.88.7-4.25 2.74-9.13 7.25-10.59 2.57-.87 5.31-.58 7.89-.29.35.06.58-.17.58-.46Zm26.77 15.3c.06-2.5 0-14.84 0-18.38.06-.82 0-1.63-.11-2.45-.06-.99-.24-1.28-1.29-1.33h-4.44c-.82 0-1.35.4-1.82 1.27-1.34 3.2-10.75 24.02-12.15 26.58-.53.99-1 1.63-1 2.68v4.24c0 .76-.06 1.28 1.23 1.28l11.1-.06c1.47 0 1.47.3 1.47 1.1 0 .88-.12 4.9-.12 5.3 0 .58.12 1.16 1.23 1.16h5.08c1.23 0 1.23-.7 1.23-2.03.06-1.17-.06-3.5-.06-4.66 0-.93.18-.98 1.76-.98 1.22 0 1.75-.12 1.75-.88.06-1.57 0-2.67 0-4.42 0-1.04-.93-.98-2.92-.98-.65 0-.7-.18-.7-1.05-.12-1.8-.24-4.6-.24-6.4Zm-7.25-5.94c-.05.7-.11 10.82-.11 12.27-.06.81-.24 1.05-1 1.1-1.93.06-3.85.06-5.78.06-.47 0-.65-.4-.41-.87.23-.4 4.85-11.57 6.13-14.48.18-.17.24-.35.41-.52.18-.12.41-.18.59-.23.06 0 .23.29.23.46 0 .76-.06 1.51-.06 2.21Z"
|
|
3773
|
+
}
|
|
3774
|
+
)
|
|
3775
|
+
] })
|
|
3776
|
+
), LogoIcon = forwardRef(
|
|
3777
|
+
(props, ref) => /* @__PURE__ */ jsx("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 56 56", ...props, children: /* @__PURE__ */ jsx(
|
|
3778
|
+
"path",
|
|
3779
|
+
{
|
|
3780
|
+
fill: "#5E98AF",
|
|
3781
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
3782
|
+
}
|
|
3783
|
+
) })
|
|
3784
|
+
), BurgerButton = () => {
|
|
3762
3785
|
const actor = useNavigationActor(), { onBurgerMenuClick } = useDiagramEventHandlers();
|
|
3763
|
-
return /* @__PURE__ */ jsx(
|
|
3764
|
-
|
|
3786
|
+
return /* @__PURE__ */ jsx(MotionDiv, { layout: "position", children: /* @__PURE__ */ jsxs(
|
|
3787
|
+
UnstyledButton,
|
|
3765
3788
|
{
|
|
3766
|
-
layout: "position",
|
|
3767
3789
|
onMouseEnter: () => {
|
|
3768
3790
|
actor.send({ type: "breadcrumbs.mouseEnter.root" });
|
|
3769
3791
|
},
|
|
@@ -3775,9 +3797,45 @@ const BurgerButton = () => {
|
|
|
3775
3797
|
onBurgerMenuClick();
|
|
3776
3798
|
}, 100), actor.send({ type: "breadcrumbs.click.root" });
|
|
3777
3799
|
},
|
|
3778
|
-
|
|
3800
|
+
className: cx(
|
|
3801
|
+
"mantine-active",
|
|
3802
|
+
hstack({
|
|
3803
|
+
padding: "0.5",
|
|
3804
|
+
// _active: {
|
|
3805
|
+
// transform: 'translateY(1px)',
|
|
3806
|
+
// },
|
|
3807
|
+
width: {
|
|
3808
|
+
base: "[20px]",
|
|
3809
|
+
"@/md": "[64px]"
|
|
3810
|
+
}
|
|
3811
|
+
})
|
|
3812
|
+
),
|
|
3813
|
+
children: [
|
|
3814
|
+
/* @__PURE__ */ jsx(
|
|
3815
|
+
Logo,
|
|
3816
|
+
{
|
|
3817
|
+
className: css({
|
|
3818
|
+
display: {
|
|
3819
|
+
base: "none",
|
|
3820
|
+
"@/md": "block"
|
|
3821
|
+
}
|
|
3822
|
+
})
|
|
3823
|
+
}
|
|
3824
|
+
),
|
|
3825
|
+
/* @__PURE__ */ jsx(
|
|
3826
|
+
LogoIcon,
|
|
3827
|
+
{
|
|
3828
|
+
className: css({
|
|
3829
|
+
display: {
|
|
3830
|
+
base: "block",
|
|
3831
|
+
"@/md": "none"
|
|
3832
|
+
}
|
|
3833
|
+
})
|
|
3834
|
+
}
|
|
3835
|
+
)
|
|
3836
|
+
]
|
|
3779
3837
|
}
|
|
3780
|
-
);
|
|
3838
|
+
) });
|
|
3781
3839
|
}, NavigationButtons = () => {
|
|
3782
3840
|
const diagram = useDiagram(), {
|
|
3783
3841
|
hasStepBack,
|
|
@@ -5719,7 +5777,7 @@ const style = {
|
|
|
5719
5777
|
transition: "fast",
|
|
5720
5778
|
color: {
|
|
5721
5779
|
base: "mantine.colors.text/90",
|
|
5722
|
-
_hover: "mantine
|
|
5780
|
+
_hover: "[var(--mantine-color-bright)]"
|
|
5723
5781
|
}
|
|
5724
5782
|
},
|
|
5725
5783
|
variants: {
|
|
@@ -6019,7 +6077,7 @@ const selectBreadcrumbs = ({ context: context2 }) => {
|
|
|
6019
6077
|
{
|
|
6020
6078
|
layout: "position",
|
|
6021
6079
|
className: hstack({
|
|
6022
|
-
gap: "
|
|
6080
|
+
gap: "1",
|
|
6023
6081
|
flexShrink: 1,
|
|
6024
6082
|
flexGrow: 1,
|
|
6025
6083
|
overflow: "hidden"
|
|
@@ -6036,7 +6094,7 @@ const selectBreadcrumbs = ({ context: context2 }) => {
|
|
|
6036
6094
|
{
|
|
6037
6095
|
layout: "position",
|
|
6038
6096
|
className: hstack({
|
|
6039
|
-
gap: "
|
|
6097
|
+
gap: "0.5",
|
|
6040
6098
|
flexGrow: 0,
|
|
6041
6099
|
_empty: {
|
|
6042
6100
|
display: "none"
|
|
@@ -7226,7 +7284,7 @@ function NavigationPanelDropdown() {
|
|
|
7226
7284
|
/* @__PURE__ */ jsx(
|
|
7227
7285
|
ScrollAreaAutosize,
|
|
7228
7286
|
{
|
|
7229
|
-
scrollbars: "
|
|
7287
|
+
scrollbars: "x",
|
|
7230
7288
|
type: "auto",
|
|
7231
7289
|
offsetScrollbars: "present",
|
|
7232
7290
|
classNames: {
|
|
@@ -7237,6 +7295,11 @@ function NavigationPanelDropdown() {
|
|
|
7237
7295
|
]
|
|
7238
7296
|
})
|
|
7239
7297
|
},
|
|
7298
|
+
styles: {
|
|
7299
|
+
viewport: {
|
|
7300
|
+
overscrollBehavior: "none"
|
|
7301
|
+
}
|
|
7302
|
+
},
|
|
7240
7303
|
children: hasSearchQuery ? /* @__PURE__ */ jsx(SearchResults, { searchQuery: normalizeViewPath(searchQuery).toLowerCase() }) : /* @__PURE__ */ jsx(FolderColumns, {})
|
|
7241
7304
|
}
|
|
7242
7305
|
)
|
|
@@ -7271,7 +7334,7 @@ function SearchResults({ searchQuery }) {
|
|
|
7271
7334
|
"calc(100cqh - 200px)"
|
|
7272
7335
|
]
|
|
7273
7336
|
}),
|
|
7274
|
-
children: /* @__PURE__ */ jsx(VStack, { gap: "
|
|
7337
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "0.5", children: found.map((v) => /* @__PURE__ */ jsx(
|
|
7275
7338
|
FoundedView,
|
|
7276
7339
|
{
|
|
7277
7340
|
view: v,
|
|
@@ -7420,7 +7483,7 @@ const btnRightSection = /* @__PURE__ */ jsx(IconChevronRight, { size: 12, stroke
|
|
|
7420
7483
|
}
|
|
7421
7484
|
),
|
|
7422
7485
|
deployment: /* @__PURE__ */ jsx(IconStack2, { size: 16, stroke: 1.5, className: viewTypeIconCss }),
|
|
7423
|
-
dynamic: /* @__PURE__ */ jsx(
|
|
7486
|
+
dynamic: /* @__PURE__ */ jsx(IconDirectionSignFilled, { size: 18, className: viewTypeIconCss })
|
|
7424
7487
|
}, ColumnScrollArea = ScrollAreaAutosize.withProps({
|
|
7425
7488
|
scrollbars: "y",
|
|
7426
7489
|
className: css({
|
|
@@ -7464,14 +7527,26 @@ function FolderColumns() {
|
|
|
7464
7527
|
const columns = useNavigationActorContext(selectColumns, deepEqual);
|
|
7465
7528
|
return /* @__PURE__ */ jsx(HStack, { gap: "xs", alignItems: "stretch", children: columns.flatMap((column, i) => [
|
|
7466
7529
|
i > 0 && /* @__PURE__ */ jsx(Divider$1, { orientation: "vertical" }, "divider" + i),
|
|
7467
|
-
/* @__PURE__ */ jsx(
|
|
7530
|
+
/* @__PURE__ */ jsx(
|
|
7531
|
+
FolderColumn,
|
|
7532
|
+
{
|
|
7533
|
+
data: column,
|
|
7534
|
+
isLast: i == columns.length - 1
|
|
7535
|
+
},
|
|
7536
|
+
column.folderPath
|
|
7537
|
+
)
|
|
7468
7538
|
]) });
|
|
7469
7539
|
}
|
|
7470
|
-
function FolderColumn({ data }) {
|
|
7471
|
-
const actor = useNavigationActorRef(), onItemClicked = (item) => (e2) => {
|
|
7540
|
+
function FolderColumn({ data, isLast }) {
|
|
7541
|
+
const ref = useRef(null), actor = useNavigationActorRef(), onItemClicked = (item) => (e2) => {
|
|
7472
7542
|
e2.stopPropagation(), item.type === "folder" ? actor.send({ type: "select.folder", folderPath: item.folderPath }) : actor.send({ type: "select.view", viewId: item.viewId });
|
|
7473
7543
|
};
|
|
7474
|
-
return
|
|
7544
|
+
return useMountEffect(() => {
|
|
7545
|
+
isLast && ref.current && ref.current.scrollIntoView({
|
|
7546
|
+
inline: "nearest",
|
|
7547
|
+
behavior: "smooth"
|
|
7548
|
+
});
|
|
7549
|
+
}), /* @__PURE__ */ jsx(Box, { mb: "1", ref, children: /* @__PURE__ */ jsx(ColumnScrollArea, { children: /* @__PURE__ */ jsx(VStack, { gap: "0.5", children: data.items.map((item, i) => /* @__PURE__ */ jsx(
|
|
7475
7550
|
FolderColumnItem,
|
|
7476
7551
|
{
|
|
7477
7552
|
columnItem: item,
|
|
@@ -7969,7 +8044,252 @@ const useElementDetailsActorRef = () => {
|
|
|
7969
8044
|
borderWidth: "4px",
|
|
7970
8045
|
borderColor: "mantine.colors.dark[1]"
|
|
7971
8046
|
}
|
|
7972
|
-
})
|
|
8047
|
+
});
|
|
8048
|
+
function MetadataProvider({ children }) {
|
|
8049
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
8050
|
+
}
|
|
8051
|
+
function TruncatedValue({ value, isExpanded }) {
|
|
8052
|
+
const [isTruncated, setIsTruncated] = useState(!1), textRef = useRef(null);
|
|
8053
|
+
return useEffect(() => {
|
|
8054
|
+
textRef.current && setIsTruncated(textRef.current.scrollWidth > textRef.current.clientWidth);
|
|
8055
|
+
}, [value]), /* @__PURE__ */ jsx(
|
|
8056
|
+
Tooltip$6,
|
|
8057
|
+
{
|
|
8058
|
+
label: isTruncated && !isExpanded ? value : null,
|
|
8059
|
+
multiline: !0,
|
|
8060
|
+
w: 300,
|
|
8061
|
+
withinPortal: !0,
|
|
8062
|
+
children: /* @__PURE__ */ jsx(
|
|
8063
|
+
Text,
|
|
8064
|
+
{
|
|
8065
|
+
ref: textRef,
|
|
8066
|
+
component: "div",
|
|
8067
|
+
className: css({
|
|
8068
|
+
fontSize: "sm",
|
|
8069
|
+
padding: "xs",
|
|
8070
|
+
userSelect: "all",
|
|
8071
|
+
color: "mantine.colors.text",
|
|
8072
|
+
lineHeight: 1.4,
|
|
8073
|
+
whiteSpace: isExpanded ? "pre-wrap" : "nowrap",
|
|
8074
|
+
overflow: isExpanded ? "visible" : "hidden",
|
|
8075
|
+
textOverflow: isExpanded ? "unset" : "ellipsis",
|
|
8076
|
+
wordBreak: isExpanded ? "break-word" : "normal",
|
|
8077
|
+
minWidth: 0,
|
|
8078
|
+
width: "100%"
|
|
8079
|
+
}),
|
|
8080
|
+
children: value
|
|
8081
|
+
}
|
|
8082
|
+
)
|
|
8083
|
+
}
|
|
8084
|
+
);
|
|
8085
|
+
}
|
|
8086
|
+
function MultiValueDisplay({
|
|
8087
|
+
values,
|
|
8088
|
+
isExpanded,
|
|
8089
|
+
onToggle
|
|
8090
|
+
}) {
|
|
8091
|
+
return isExpanded ? /* @__PURE__ */ jsx(Stack, { gap: "xs", children: values.map((value, index2) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", children: [
|
|
8092
|
+
/* @__PURE__ */ jsx(
|
|
8093
|
+
Text,
|
|
8094
|
+
{
|
|
8095
|
+
className: css({
|
|
8096
|
+
fontSize: "xs",
|
|
8097
|
+
color: "mantine.colors.gray[5]",
|
|
8098
|
+
fontWeight: 500,
|
|
8099
|
+
flexShrink: 0,
|
|
8100
|
+
_dark: {
|
|
8101
|
+
color: "mantine.colors.dark[3]"
|
|
8102
|
+
}
|
|
8103
|
+
}),
|
|
8104
|
+
children: "•"
|
|
8105
|
+
}
|
|
8106
|
+
),
|
|
8107
|
+
/* @__PURE__ */ jsx(
|
|
8108
|
+
Box$1,
|
|
8109
|
+
{
|
|
8110
|
+
className: css({
|
|
8111
|
+
minHeight: "32px",
|
|
8112
|
+
display: "flex",
|
|
8113
|
+
alignItems: "center",
|
|
8114
|
+
flex: 1
|
|
8115
|
+
}),
|
|
8116
|
+
children: /* @__PURE__ */ jsx(TruncatedValue, { value, isExpanded: !0 })
|
|
8117
|
+
}
|
|
8118
|
+
)
|
|
8119
|
+
] }, index2)) }) : /* @__PURE__ */ jsx(
|
|
8120
|
+
Box$1,
|
|
8121
|
+
{
|
|
8122
|
+
className: css({
|
|
8123
|
+
minHeight: "32px",
|
|
8124
|
+
display: "flex",
|
|
8125
|
+
alignItems: "center",
|
|
8126
|
+
padding: "xs",
|
|
8127
|
+
gap: "xs",
|
|
8128
|
+
flexWrap: "wrap",
|
|
8129
|
+
minWidth: 0,
|
|
8130
|
+
// Allow shrinking
|
|
8131
|
+
overflow: "hidden"
|
|
8132
|
+
// Prevent overflow
|
|
8133
|
+
}),
|
|
8134
|
+
children: values.map((value, index2) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", style: { minWidth: 0 }, children: [
|
|
8135
|
+
/* @__PURE__ */ jsx(
|
|
8136
|
+
Text,
|
|
8137
|
+
{
|
|
8138
|
+
className: css({
|
|
8139
|
+
fontSize: "sm",
|
|
8140
|
+
padding: "[4px 8px]",
|
|
8141
|
+
backgroundColor: "mantine.colors.white",
|
|
8142
|
+
color: "mantine.colors.text",
|
|
8143
|
+
borderRadius: "sm",
|
|
8144
|
+
border: "1px solid",
|
|
8145
|
+
borderColor: "mantine.colors.gray[3]",
|
|
8146
|
+
whiteSpace: "nowrap",
|
|
8147
|
+
overflow: "hidden",
|
|
8148
|
+
textOverflow: "ellipsis",
|
|
8149
|
+
maxWidth: "min(200px, 100%)",
|
|
8150
|
+
minWidth: "60px",
|
|
8151
|
+
flex: "0 1 auto",
|
|
8152
|
+
userSelect: "all",
|
|
8153
|
+
_dark: {
|
|
8154
|
+
backgroundColor: "mantine.colors.dark[9]",
|
|
8155
|
+
color: "mantine.colors.text",
|
|
8156
|
+
borderColor: "mantine.colors.dark[4]"
|
|
8157
|
+
}
|
|
8158
|
+
}),
|
|
8159
|
+
title: value,
|
|
8160
|
+
children: value
|
|
8161
|
+
}
|
|
8162
|
+
),
|
|
8163
|
+
index2 < values.length - 1 && /* @__PURE__ */ jsx(
|
|
8164
|
+
Text,
|
|
8165
|
+
{
|
|
8166
|
+
className: css({
|
|
8167
|
+
fontSize: "xs",
|
|
8168
|
+
color: "mantine.colors.gray[5]",
|
|
8169
|
+
fontWeight: 500,
|
|
8170
|
+
flexShrink: 0,
|
|
8171
|
+
_dark: {
|
|
8172
|
+
color: "mantine.colors.dark[3]"
|
|
8173
|
+
}
|
|
8174
|
+
}),
|
|
8175
|
+
children: "•"
|
|
8176
|
+
}
|
|
8177
|
+
)
|
|
8178
|
+
] }, index2))
|
|
8179
|
+
}
|
|
8180
|
+
);
|
|
8181
|
+
}
|
|
8182
|
+
function MetadataValue({ label: label2, value }) {
|
|
8183
|
+
const elements = Array.isArray(value) ? value : typeof value == "string" && value.includes(`
|
|
8184
|
+
`) ? value.split(`
|
|
8185
|
+
`).map((s) => s.trim()).filter(Boolean) : [value], hasMultipleElements = elements.length > 1, [isExpanded, setIsExpanded] = useState(!1), handleToggle = () => {
|
|
8186
|
+
setIsExpanded(!isExpanded);
|
|
8187
|
+
};
|
|
8188
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8189
|
+
hasMultipleElements ? /* @__PURE__ */ jsx(
|
|
8190
|
+
UnstyledButton,
|
|
8191
|
+
{
|
|
8192
|
+
onClick: handleToggle,
|
|
8193
|
+
className: css({
|
|
8194
|
+
fontSize: "xs",
|
|
8195
|
+
color: "mantine.colors.dimmed",
|
|
8196
|
+
justifySelf: "end",
|
|
8197
|
+
textAlign: "right",
|
|
8198
|
+
userSelect: "none",
|
|
8199
|
+
display: "flex",
|
|
8200
|
+
alignItems: "center",
|
|
8201
|
+
justifyContent: "flex-end",
|
|
8202
|
+
gap: "xs",
|
|
8203
|
+
padding: "[4px 8px]",
|
|
8204
|
+
borderRadius: "sm",
|
|
8205
|
+
whiteSpace: "nowrap",
|
|
8206
|
+
transition: "all 150ms ease",
|
|
8207
|
+
_hover: {
|
|
8208
|
+
backgroundColor: "mantine.colors.gray[1]",
|
|
8209
|
+
color: "mantine.colors.primary[6]",
|
|
8210
|
+
_dark: {
|
|
8211
|
+
backgroundColor: "mantine.colors.dark[7]",
|
|
8212
|
+
color: "mantine.colors.primary[4]"
|
|
8213
|
+
}
|
|
8214
|
+
}
|
|
8215
|
+
}),
|
|
8216
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", children: [
|
|
8217
|
+
/* @__PURE__ */ jsxs(Text, { component: "span", size: "xs", fw: 700, children: [
|
|
8218
|
+
label2,
|
|
8219
|
+
":"
|
|
8220
|
+
] }),
|
|
8221
|
+
/* @__PURE__ */ jsx(
|
|
8222
|
+
Text,
|
|
8223
|
+
{
|
|
8224
|
+
component: "span",
|
|
8225
|
+
className: css({
|
|
8226
|
+
fontSize: "xs",
|
|
8227
|
+
fontWeight: 500,
|
|
8228
|
+
color: "mantine.colors.gray[6]",
|
|
8229
|
+
backgroundColor: "mantine.colors.gray[1]",
|
|
8230
|
+
padding: "[1px 4px]",
|
|
8231
|
+
borderRadius: "xs",
|
|
8232
|
+
_dark: {
|
|
8233
|
+
color: "mantine.colors.dark[2]",
|
|
8234
|
+
backgroundColor: "mantine.colors.dark[6]"
|
|
8235
|
+
}
|
|
8236
|
+
}),
|
|
8237
|
+
children: elements.length
|
|
8238
|
+
}
|
|
8239
|
+
),
|
|
8240
|
+
isExpanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: 12 }) : /* @__PURE__ */ jsx(IconChevronRight, { size: 12 })
|
|
8241
|
+
] })
|
|
8242
|
+
}
|
|
8243
|
+
) : /* @__PURE__ */ jsxs(
|
|
8244
|
+
Text,
|
|
8245
|
+
{
|
|
8246
|
+
component: "div",
|
|
8247
|
+
className: css({
|
|
8248
|
+
fontSize: "xs",
|
|
8249
|
+
color: "mantine.colors.dimmed",
|
|
8250
|
+
justifySelf: "end",
|
|
8251
|
+
textAlign: "right",
|
|
8252
|
+
userSelect: "none",
|
|
8253
|
+
whiteSpace: "nowrap",
|
|
8254
|
+
padding: "[4px 8px]",
|
|
8255
|
+
fontWeight: 700
|
|
8256
|
+
}),
|
|
8257
|
+
children: [
|
|
8258
|
+
label2,
|
|
8259
|
+
":"
|
|
8260
|
+
]
|
|
8261
|
+
}
|
|
8262
|
+
),
|
|
8263
|
+
/* @__PURE__ */ jsx(
|
|
8264
|
+
Box$1,
|
|
8265
|
+
{
|
|
8266
|
+
className: css({
|
|
8267
|
+
justifySelf: "stretch",
|
|
8268
|
+
alignSelf: "start"
|
|
8269
|
+
}),
|
|
8270
|
+
children: hasMultipleElements ? /* @__PURE__ */ jsx(
|
|
8271
|
+
MultiValueDisplay,
|
|
8272
|
+
{
|
|
8273
|
+
values: elements,
|
|
8274
|
+
isExpanded,
|
|
8275
|
+
onToggle: handleToggle
|
|
8276
|
+
}
|
|
8277
|
+
) : /* @__PURE__ */ jsx(
|
|
8278
|
+
Box$1,
|
|
8279
|
+
{
|
|
8280
|
+
className: css({
|
|
8281
|
+
minHeight: "32px",
|
|
8282
|
+
display: "flex",
|
|
8283
|
+
alignItems: "center"
|
|
8284
|
+
}),
|
|
8285
|
+
children: /* @__PURE__ */ jsx(TruncatedValue, { value: elements[0] || "", isExpanded })
|
|
8286
|
+
}
|
|
8287
|
+
)
|
|
8288
|
+
}
|
|
8289
|
+
)
|
|
8290
|
+
] });
|
|
8291
|
+
}
|
|
8292
|
+
const treeNode$1 = css({
|
|
7973
8293
|
"&[data-level='1']": {
|
|
7974
8294
|
marginBottom: "sm"
|
|
7975
8295
|
}
|
|
@@ -9927,7 +10247,7 @@ function ElementDetailsCard({
|
|
|
9927
10247
|
)
|
|
9928
10248
|
] })
|
|
9929
10249
|
] }),
|
|
9930
|
-
/* @__PURE__ */ jsxs(
|
|
10250
|
+
/* @__PURE__ */ jsx(MetadataProvider, { children: /* @__PURE__ */ jsxs(
|
|
9931
10251
|
Tabs,
|
|
9932
10252
|
{
|
|
9933
10253
|
value: activeTab,
|
|
@@ -10007,7 +10327,7 @@ function ElementDetailsCard({
|
|
|
10007
10327
|
/* @__PURE__ */ jsx(TabsPanel, { value: "Deployments", children: /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "y", type: "auto", children: /* @__PURE__ */ jsx(TabPanelDeployments, { elementFqn: elementModel.id }) }) })
|
|
10008
10328
|
]
|
|
10009
10329
|
}
|
|
10010
|
-
),
|
|
10330
|
+
) }),
|
|
10011
10331
|
/* @__PURE__ */ jsx(
|
|
10012
10332
|
m.div,
|
|
10013
10333
|
{
|
|
@@ -10061,97 +10381,24 @@ function ElementProperty({
|
|
|
10061
10381
|
function ElementMetata({
|
|
10062
10382
|
value: metadata
|
|
10063
10383
|
}) {
|
|
10064
|
-
|
|
10065
|
-
|
|
10384
|
+
const metadataEntries = t$c(metadata).sort(([a], [b]) => a.localeCompare(b));
|
|
10385
|
+
return /* @__PURE__ */ jsx(MetadataProvider, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10386
|
+
/* @__PURE__ */ jsx(PropertyLabel, { style: { justifySelf: "end", textAlign: "right" }, children: "metadata" }),
|
|
10066
10387
|
/* @__PURE__ */ jsx(
|
|
10067
10388
|
Box$1,
|
|
10068
10389
|
{
|
|
10069
10390
|
className: css({
|
|
10070
|
-
flex: 1,
|
|
10071
10391
|
display: "grid",
|
|
10072
10392
|
gridTemplateColumns: "min-content 1fr",
|
|
10073
|
-
gridAutoRows: "min-content
|
|
10074
|
-
gap: "[
|
|
10393
|
+
gridAutoRows: "min-content",
|
|
10394
|
+
gap: "[12px 16px]",
|
|
10075
10395
|
alignItems: "baseline",
|
|
10076
|
-
justifyItems: "stretch"
|
|
10077
|
-
paddingRight: "xxs"
|
|
10396
|
+
justifyItems: "stretch"
|
|
10078
10397
|
}),
|
|
10079
|
-
children:
|
|
10080
|
-
"div",
|
|
10081
|
-
{
|
|
10082
|
-
style: {
|
|
10083
|
-
display: "contents"
|
|
10084
|
-
},
|
|
10085
|
-
className: "group",
|
|
10086
|
-
children: [
|
|
10087
|
-
/* @__PURE__ */ jsxs(
|
|
10088
|
-
"div",
|
|
10089
|
-
{
|
|
10090
|
-
className: css({
|
|
10091
|
-
fontSize: "sm",
|
|
10092
|
-
fontWeight: 500,
|
|
10093
|
-
justifySelf: "end",
|
|
10094
|
-
whiteSpace: "nowrap"
|
|
10095
|
-
}),
|
|
10096
|
-
children: [
|
|
10097
|
-
key2,
|
|
10098
|
-
":"
|
|
10099
|
-
]
|
|
10100
|
-
}
|
|
10101
|
-
),
|
|
10102
|
-
/* @__PURE__ */ jsx(
|
|
10103
|
-
"div",
|
|
10104
|
-
{
|
|
10105
|
-
className: css({}),
|
|
10106
|
-
children: /* @__PURE__ */ jsx(
|
|
10107
|
-
ScrollArea.Autosize,
|
|
10108
|
-
{
|
|
10109
|
-
type: "auto",
|
|
10110
|
-
mah: 200,
|
|
10111
|
-
classNames: {
|
|
10112
|
-
root: css({
|
|
10113
|
-
transitionProperty: "all",
|
|
10114
|
-
transitionDuration: "fast",
|
|
10115
|
-
transitionTimingFunction: "inOut",
|
|
10116
|
-
rounded: "sm",
|
|
10117
|
-
color: "mantine.colors.gray[8]",
|
|
10118
|
-
_dark: {
|
|
10119
|
-
color: "mantine.colors.dark[1]"
|
|
10120
|
-
},
|
|
10121
|
-
_groupHover: {
|
|
10122
|
-
transitionTimingFunction: "out",
|
|
10123
|
-
color: "mantine.colors.defaultColor",
|
|
10124
|
-
background: "mantine.colors.defaultHover"
|
|
10125
|
-
}
|
|
10126
|
-
}),
|
|
10127
|
-
viewport: css({
|
|
10128
|
-
overscrollBehavior: "none"
|
|
10129
|
-
})
|
|
10130
|
-
},
|
|
10131
|
-
children: /* @__PURE__ */ jsx(
|
|
10132
|
-
"div",
|
|
10133
|
-
{
|
|
10134
|
-
className: css({
|
|
10135
|
-
fontSize: "sm",
|
|
10136
|
-
padding: "xxs",
|
|
10137
|
-
whiteSpace: "pre",
|
|
10138
|
-
fontFamily: "mono",
|
|
10139
|
-
userSelect: "all"
|
|
10140
|
-
}),
|
|
10141
|
-
children: value
|
|
10142
|
-
}
|
|
10143
|
-
)
|
|
10144
|
-
}
|
|
10145
|
-
)
|
|
10146
|
-
}
|
|
10147
|
-
)
|
|
10148
|
-
]
|
|
10149
|
-
},
|
|
10150
|
-
key2
|
|
10151
|
-
))
|
|
10398
|
+
children: metadataEntries.map(([key2, value]) => /* @__PURE__ */ jsx(MetadataValue, { label: key2, value }, key2))
|
|
10152
10399
|
}
|
|
10153
10400
|
)
|
|
10154
|
-
] });
|
|
10401
|
+
] }) });
|
|
10155
10402
|
}
|
|
10156
10403
|
function ElementDetails({
|
|
10157
10404
|
actorRef,
|
|
@@ -12911,20 +13158,17 @@ const shapeBadge = css({
|
|
|
12911
13158
|
);
|
|
12912
13159
|
}, selector = (s) => ({
|
|
12913
13160
|
id: s.view.id,
|
|
12914
|
-
notations: s.view.notation?.nodes ?? []
|
|
12915
|
-
isVisible: !0
|
|
12916
|
-
// isVisible: isNullish(s.focusedNodeId ?? s.activeWalkthrough),
|
|
13161
|
+
notations: s.view.notation?.nodes ?? []
|
|
12917
13162
|
}), NotationPanel = memo$1(() => {
|
|
12918
13163
|
const height = useXYStore((s) => s.height), {
|
|
12919
13164
|
id,
|
|
12920
|
-
notations
|
|
12921
|
-
isVisible
|
|
13165
|
+
notations
|
|
12922
13166
|
} = useDiagramContext(selector), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
12923
13167
|
key: "notation-webview-collapsed",
|
|
12924
13168
|
defaultValue: !0
|
|
12925
13169
|
}), hasNotations = notations.length > 0, portalProps = useMantinePortalProps();
|
|
12926
13170
|
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
12927
|
-
!hasNotations &&
|
|
13171
|
+
!hasNotations && /* @__PURE__ */ jsx(
|
|
12928
13172
|
m.div,
|
|
12929
13173
|
{
|
|
12930
13174
|
initial: { opacity: 0.75, translateX: "50%" },
|
|
@@ -12947,7 +13191,7 @@ const shapeBadge = css({
|
|
|
12947
13191
|
},
|
|
12948
13192
|
"empty"
|
|
12949
13193
|
),
|
|
12950
|
-
hasNotations &&
|
|
13194
|
+
hasNotations && isCollapsed && /* @__PURE__ */ jsx(
|
|
12951
13195
|
m.div,
|
|
12952
13196
|
{
|
|
12953
13197
|
initial: { opacity: 0.75, translateX: "50%" },
|
|
@@ -12971,7 +13215,7 @@ const shapeBadge = css({
|
|
|
12971
13215
|
},
|
|
12972
13216
|
"collapsed"
|
|
12973
13217
|
),
|
|
12974
|
-
hasNotations &&
|
|
13218
|
+
hasNotations && !isCollapsed && /* @__PURE__ */ jsx(
|
|
12975
13219
|
m.div,
|
|
12976
13220
|
{
|
|
12977
13221
|
initial: {
|
|
@@ -13659,9 +13903,7 @@ function LikeC4DiagramXYFlow({
|
|
|
13659
13903
|
onEdgeMouseLeave: useCallbackRef((event, edge) => {
|
|
13660
13904
|
event.stopPropagation(), edge.data.hovered && diagram.send({ type: "xyflow.edgeMouseLeave", edge, event });
|
|
13661
13905
|
}),
|
|
13662
|
-
|
|
13663
|
-
onMove
|
|
13664
|
-
},
|
|
13906
|
+
onMove,
|
|
13665
13907
|
onMoveEnd,
|
|
13666
13908
|
onInit: useCallbackRef((instance) => {
|
|
13667
13909
|
diagram.send({ type: "xyflow.init", instance });
|
|
@@ -14118,11 +14360,11 @@ function _update(current, updated) {
|
|
|
14118
14360
|
function updateNodes(current, update) {
|
|
14119
14361
|
return e$c(update) ? _update(current, update) : (update = current, (current2) => _update(current2, update));
|
|
14120
14362
|
}
|
|
14121
|
-
const ViewPadding = {
|
|
14363
|
+
const ViewPadding$1 = {
|
|
14122
14364
|
top: "40px",
|
|
14123
|
-
bottom: "
|
|
14124
|
-
left: "
|
|
14125
|
-
right: "
|
|
14365
|
+
bottom: "22px",
|
|
14366
|
+
left: "22px",
|
|
14367
|
+
right: "22px"
|
|
14126
14368
|
};
|
|
14127
14369
|
function viewToNodesEdge(view) {
|
|
14128
14370
|
const xynodes = [], xyedges = [], nodeLookup = /* @__PURE__ */ new Map(), queue = Queue.from(view.nodes.reduce(
|
|
@@ -14281,7 +14523,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
14281
14523
|
};
|
|
14282
14524
|
}, parent = nonNullable(self._parent);
|
|
14283
14525
|
let zoom = xyflow2.getZoom();
|
|
14284
|
-
const maxZoom = Math.max(zoom, 1), nextviewport = getViewportForBounds(update.bounds, width, height, MinZoom, maxZoom, ViewPadding), nextSubjectNode = next.xynodes.find(
|
|
14526
|
+
const maxZoom = Math.max(zoom, 1), nextviewport = getViewportForBounds(update.bounds, width, height, MinZoom, maxZoom, ViewPadding$1), nextSubjectNode = next.xynodes.find(
|
|
14285
14527
|
(n2) => n2.type !== "empty" && n2.data.column === "subjects" && n2.data.fqn === subjectId
|
|
14286
14528
|
) ?? findRootSubject(next.xynodes), currentSubjectNode = findRootSubject(currentNodes), existingNode = navigateFromNode ? currentNodes.find((n2) => n2.id === navigateFromNode) : currentNodes.find((n2) => n2.type !== "empty" && n2.data.column !== "subjects" && n2.data.fqn === subjectId);
|
|
14287
14529
|
if (!nextSubjectNode || !existingNode || nextSubjectNode.type === "empty" || !currentSubjectNode || nextSubjectNode.data.fqn === currentSubjectNode.data.fqn)
|
|
@@ -14368,13 +14610,13 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
14368
14610
|
invariant(xyflow2, "xyflow is not initialized"), invariant(xystore, "xystore is not initialized"), bounds ??= context2.layouted?.bounds;
|
|
14369
14611
|
const maxZoom = Math.max(xyflow2.getZoom(), 1);
|
|
14370
14612
|
if (bounds) {
|
|
14371
|
-
const { width, height } = xystore.getState(), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, ViewPadding);
|
|
14613
|
+
const { width, height } = xystore.getState(), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, ViewPadding$1);
|
|
14372
14614
|
xyflow2.setViewport(viewport, duration > 0 ? { duration } : void 0).catch(console.error);
|
|
14373
14615
|
} else
|
|
14374
14616
|
xyflow2.fitView({
|
|
14375
14617
|
minZoom: MinZoom,
|
|
14376
14618
|
maxZoom,
|
|
14377
|
-
padding: ViewPadding,
|
|
14619
|
+
padding: ViewPadding$1,
|
|
14378
14620
|
...duration > 0 && { duration }
|
|
14379
14621
|
}).catch(console.error);
|
|
14380
14622
|
},
|
|
@@ -14798,7 +15040,10 @@ function inputToSubject(input2) {
|
|
|
14798
15040
|
target: input2.target
|
|
14799
15041
|
};
|
|
14800
15042
|
}
|
|
14801
|
-
const
|
|
15043
|
+
const ViewPadding = {
|
|
15044
|
+
x: "22px",
|
|
15045
|
+
y: "22px"
|
|
15046
|
+
}, _relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
14802
15047
|
types: {
|
|
14803
15048
|
context: {},
|
|
14804
15049
|
input: {},
|
|
@@ -14812,13 +15057,13 @@ const _relationshipDetailsLogic = xstate_cjsExports.setup({
|
|
|
14812
15057
|
invariant(xyflow2, "xyflow is not initialized"), invariant(xystore, "xystore is not initialized"), bounds ??= context2.bounds;
|
|
14813
15058
|
const maxZoom = Math.max(xyflow2.getZoom(), 1);
|
|
14814
15059
|
if (bounds) {
|
|
14815
|
-
const { width, height } = xystore.getState(), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom,
|
|
15060
|
+
const { width, height } = xystore.getState(), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, ViewPadding);
|
|
14816
15061
|
xyflow2.setViewport(viewport, duration > 0 ? { duration } : void 0).catch(console.error);
|
|
14817
15062
|
} else
|
|
14818
15063
|
xyflow2.fitView({
|
|
14819
15064
|
minZoom: MinZoom,
|
|
14820
15065
|
maxZoom,
|
|
14821
|
-
padding:
|
|
15066
|
+
padding: ViewPadding,
|
|
14822
15067
|
...duration > 0 && { duration }
|
|
14823
15068
|
}).catch(console.error);
|
|
14824
15069
|
},
|
|
@@ -17052,12 +17297,11 @@ function DiagramActorProvider({
|
|
|
17052
17297
|
},
|
|
17053
17298
|
[features],
|
|
17054
17299
|
shallowEqual
|
|
17055
|
-
),
|
|
17300
|
+
), useEffect(
|
|
17056
17301
|
() => {
|
|
17057
17302
|
actorRef.send({ type: "update.inputs", inputs: { zoomable, pannable, fitViewPadding, nodesSelectable } });
|
|
17058
17303
|
},
|
|
17059
|
-
[zoomable, pannable, fitViewPadding, nodesSelectable]
|
|
17060
|
-
deepEqual
|
|
17304
|
+
[zoomable, pannable, fitViewPadding, nodesSelectable]
|
|
17061
17305
|
);
|
|
17062
17306
|
const dynamicViewVariant = xstateReact_cjsExports.useSelector(actorRef, selectDynamicViewVariant), update = useMemo(
|
|
17063
17307
|
() => convertToXYFlow({ view, where, nodesSelectable, dynamicViewVariant }),
|
|
@@ -17202,7 +17446,7 @@ function LikeC4Diagram({
|
|
|
17202
17446
|
readonly = !0,
|
|
17203
17447
|
controls = !readonly,
|
|
17204
17448
|
fitView = !0,
|
|
17205
|
-
fitViewPadding = controls ? FitViewPaddings.withControls : FitViewPaddings.default,
|
|
17449
|
+
fitViewPadding: _fitViewPadding = controls ? FitViewPaddings.withControls : FitViewPaddings.default,
|
|
17206
17450
|
pannable = !0,
|
|
17207
17451
|
zoomable = !0,
|
|
17208
17452
|
background = "dots",
|
|
@@ -17213,7 +17457,7 @@ function LikeC4Diagram({
|
|
|
17213
17457
|
enableRelationshipBrowser = !1,
|
|
17214
17458
|
nodesDraggable = !readonly,
|
|
17215
17459
|
nodesSelectable = !readonly || enableFocusMode || !!onNavigateTo || !!onNodeClick,
|
|
17216
|
-
|
|
17460
|
+
enableNotations = !1,
|
|
17217
17461
|
showNavigationButtons = !!onNavigateTo,
|
|
17218
17462
|
enableDynamicViewWalkthrough = !1,
|
|
17219
17463
|
dynamicViewVariant,
|
|
@@ -17223,20 +17467,26 @@ function LikeC4Diagram({
|
|
|
17223
17467
|
experimentalEdgeEditing = !readonly,
|
|
17224
17468
|
reduceGraphics = "auto",
|
|
17225
17469
|
renderIcon,
|
|
17226
|
-
renderControls,
|
|
17227
17470
|
where,
|
|
17228
17471
|
reactFlowProps,
|
|
17229
17472
|
renderNodes,
|
|
17230
17473
|
children
|
|
17231
17474
|
}) {
|
|
17232
|
-
const id = useId(), initialRef = useRef(null), bounds = getViewBounds(view, dynamicViewVariant);
|
|
17475
|
+
const id = useId(), initialRef = useRef(null), bounds = getViewBounds(view, dynamicViewVariant), fitViewPadding = useNormalizedViewPadding(_fitViewPadding);
|
|
17233
17476
|
initialRef.current == null && (initialRef.current = {
|
|
17234
17477
|
defaultEdges: [],
|
|
17235
17478
|
defaultNodes: [],
|
|
17236
17479
|
initialWidth: initialWidth ?? bounds.width,
|
|
17237
|
-
initialHeight: initialHeight ?? bounds.height
|
|
17480
|
+
initialHeight: initialHeight ?? bounds.height,
|
|
17481
|
+
initialFitViewOptions: {
|
|
17482
|
+
maxZoom: MaxZoom,
|
|
17483
|
+
minZoom: MinZoom,
|
|
17484
|
+
padding: fitViewPadding
|
|
17485
|
+
},
|
|
17486
|
+
initialMaxZoom: MaxZoom,
|
|
17487
|
+
initialMinZoom: MinZoom
|
|
17238
17488
|
});
|
|
17239
|
-
const isReducedGraphicsMode = reduceGraphics === "auto" ? pannable && (bounds.width ?? 1) * (bounds.height ?? 1) > 6e6 : reduceGraphics;
|
|
17489
|
+
const isReducedGraphicsMode = reduceGraphics === "auto" ? pannable && (bounds.width ?? 1) * (bounds.height ?? 1) > 6e6 && view.nodes.some((n2) => n2.children?.length > 0) : reduceGraphics;
|
|
17240
17490
|
return /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(
|
|
17241
17491
|
FramerMotionConfig,
|
|
17242
17492
|
{
|
|
@@ -17256,7 +17506,7 @@ function LikeC4Diagram({
|
|
|
17256
17506
|
enableNavigationButtons: showNavigationButtons && !!onNavigateTo,
|
|
17257
17507
|
enableDynamicViewWalkthrough: view._type === "dynamic" && enableDynamicViewWalkthrough,
|
|
17258
17508
|
enableEdgeEditing: experimentalEdgeEditing,
|
|
17259
|
-
enableNotations
|
|
17509
|
+
enableNotations,
|
|
17260
17510
|
enableVscode: !!onOpenSource,
|
|
17261
17511
|
enableControls: controls,
|
|
17262
17512
|
enableElementTags
|
|
@@ -17280,12 +17530,12 @@ function LikeC4Diagram({
|
|
|
17280
17530
|
},
|
|
17281
17531
|
children: [
|
|
17282
17532
|
/* @__PURE__ */ jsx(LikeC4Styles2, { id }),
|
|
17283
|
-
/* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(
|
|
17533
|
+
/* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(RootContainer, { id, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
17284
17534
|
ReactFlowProvider,
|
|
17285
17535
|
{
|
|
17286
17536
|
fitView,
|
|
17287
17537
|
...initialRef.current,
|
|
17288
|
-
children: /* @__PURE__ */
|
|
17538
|
+
children: /* @__PURE__ */ jsxs(
|
|
17289
17539
|
DiagramActorProvider,
|
|
17290
17540
|
{
|
|
17291
17541
|
view,
|
|
@@ -17295,7 +17545,7 @@ function LikeC4Diagram({
|
|
|
17295
17545
|
nodesSelectable,
|
|
17296
17546
|
where: where ?? null,
|
|
17297
17547
|
dynamicViewVariant,
|
|
17298
|
-
children:
|
|
17548
|
+
children: [
|
|
17299
17549
|
/* @__PURE__ */ jsx(
|
|
17300
17550
|
LikeC4DiagramXYFlow,
|
|
17301
17551
|
{
|
|
@@ -17308,11 +17558,11 @@ function LikeC4Diagram({
|
|
|
17308
17558
|
}
|
|
17309
17559
|
),
|
|
17310
17560
|
/* @__PURE__ */ jsx(LikeC4DiagramUI, {})
|
|
17311
|
-
]
|
|
17561
|
+
]
|
|
17312
17562
|
}
|
|
17313
17563
|
)
|
|
17314
17564
|
}
|
|
17315
|
-
) }) })
|
|
17565
|
+
) }) })
|
|
17316
17566
|
]
|
|
17317
17567
|
}
|
|
17318
17568
|
)
|
|
@@ -17321,6 +17571,14 @@ function LikeC4Diagram({
|
|
|
17321
17571
|
}
|
|
17322
17572
|
) });
|
|
17323
17573
|
}
|
|
17574
|
+
const toLiteralPaddingWithUnit = (value) => typeof value == "number" ? `${value}px` : value;
|
|
17575
|
+
function useNormalizedViewPadding(raw) {
|
|
17576
|
+
return useCustomCompareMemo(
|
|
17577
|
+
() => e$e(raw) ? t$s(raw, toLiteralPaddingWithUnit) : toLiteralPaddingWithUnit(raw),
|
|
17578
|
+
[raw],
|
|
17579
|
+
deepEqual
|
|
17580
|
+
);
|
|
17581
|
+
}
|
|
17324
17582
|
function LikeC4ModelProvider({
|
|
17325
17583
|
children,
|
|
17326
17584
|
likec4model
|
|
@@ -17358,7 +17616,7 @@ function StaticLikeC4Diagram({
|
|
|
17358
17616
|
zoomable: !1,
|
|
17359
17617
|
controls: !1,
|
|
17360
17618
|
background,
|
|
17361
|
-
|
|
17619
|
+
enableNotations: !1,
|
|
17362
17620
|
enableElementDetails: !1,
|
|
17363
17621
|
enableRelationshipDetails,
|
|
17364
17622
|
enableRelationshipBrowser,
|