@likec4/diagram 1.27.3 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.js +974 -1036
- package/dist/LikeC4CustomColors.js +2 -2
- package/dist/LikeC4Diagram.js +2 -2
- package/dist/LikeC4ModelProvider.js +1 -1
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/react.production.js +3 -0
- package/dist/base/BaseXYFlow.js +5 -5
- package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base/primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base/primitives/compound/CompoundNodeContainer.js +2 -2
- package/dist/base/primitives/customEdge.js +2 -2
- package/dist/base/primitives/customNode.js +2 -2
- package/dist/base/primitives/edge/EdgeActionButton.d.ts +1 -2
- package/dist/base/primitives/edge/EdgeContainer.js +1 -1
- package/dist/base/primitives/edge/EdgeLabel.js +1 -1
- package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -1
- package/dist/base/primitives/edge/EdgePath.d.ts +10 -42
- package/dist/base/primitives/edge/EdgePath.js +23 -16
- package/dist/base/primitives/edge/edge.css.js +1 -1
- package/dist/base/primitives/element/ElementActionButtons.d.ts +1 -1
- package/dist/base/primitives/element/ElementActionButtons.js +6 -5
- package/dist/base/primitives/element/ElementDetailsButton.js +5 -2
- package/dist/base/primitives/element/ElementNodeContainer.js +3 -3
- package/dist/base/updateEdges.js +7 -2
- package/dist/base/updateNodes.js +11 -3
- package/dist/bundle/LikeC4View.js +3 -3
- package/dist/bundle/ReactLikeC4.js +1 -1
- package/dist/bundle/ShadowRoot.js +3 -3
- package/dist/bundle/styles.css.js +4 -4
- package/dist/context/ControlsCustomLayout.js +1 -1
- package/dist/context/DiagramEventHandlers.js +5 -5
- package/dist/context/DiagramFeatures.js +7 -7
- package/dist/context/EnsureMantine.js +2 -2
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.js +4 -4
- package/dist/context/ReduceGraphics.js +2 -2
- package/dist/context/RootContainer.js +5 -9
- package/dist/hooks/safeContext.js +3 -3
- package/dist/hooks/useCurrentViewId.js +1 -1
- package/dist/hooks/useDiagram.d.ts +3 -7
- package/dist/hooks/useDiagram.js +2 -2
- package/dist/hooks/useMantinePortalProps.js +2 -2
- package/dist/hooks/useSetState.js +3 -3
- package/dist/hooks/useUpdateEffect.js +1 -1
- package/dist/likec4diagram/DiagramUI.js +2 -2
- package/dist/likec4diagram/DiagramXYFlow.js +2 -2
- package/dist/likec4diagram/custom/edges/NotePopover.js +2 -2
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +17 -7
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +6 -6
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +4 -4
- package/dist/likec4diagram/ui/controls/Controls.js +6 -6
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +1 -1
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.js +4 -5
- package/dist/likec4diagram/ui/search/ElementsColumn.js +88 -77
- package/dist/likec4diagram/ui/search/LikeC4Search.d.ts +2 -1
- package/dist/likec4diagram/ui/search/LikeC4Search.js +27 -24
- package/dist/likec4diagram/ui/search/SearchInput.js +1 -1
- package/dist/likec4diagram/ui/search/ViewsColum.js +3 -2
- package/dist/likec4diagram/ui/search/state.js +11 -9
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +1 -1
- package/dist/likec4diagram/useLayoutConstraints.js +3 -3
- package/dist/likec4model/LikeC4ModelContext.js +2 -2
- package/dist/likec4model/useLikeC4ElementsTree.js +2 -2
- package/dist/likec4model/useLikeC4Model.js +2 -2
- package/dist/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production.js +548 -0
- package/dist/node_modules/.pnpm/react@19.0.0/node_modules/react/index.js +15 -0
- package/dist/overlays/Overlays.js +8 -8
- package/dist/overlays/element-details/ElementDetailsCard.js +5 -5
- package/dist/overlays/element-details/TabPanelDeployments.js +7 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +2 -2
- package/dist/overlays/element-details/TabPanelStructure.js +6 -3
- package/dist/overlays/element-details/actor.d.ts +301 -301
- package/dist/overlays/element-details/actorContext.js +3 -3
- package/dist/overlays/overlay/Overlay.css.d.ts +2 -25
- package/dist/overlays/overlay/Overlay.css.js +0 -40
- package/dist/overlays/overlay/Overlay.d.ts +1 -1
- package/dist/overlays/overlay/Overlay.js +99 -89
- package/dist/overlays/overlaysActor.js +4 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +28 -23
- package/dist/overlays/relationship-details/SelectEdge.js +3 -6
- package/dist/overlays/relationship-details/actor.d.ts +2 -0
- package/dist/overlays/relationship-details/custom/edgeTypes.js +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationship-details/hooks.d.ts +3 -1
- package/dist/overlays/relationship-details/hooks.js +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +9 -11
- package/dist/overlays/relationships-browser/SelectElement.js +8 -5
- package/dist/overlays/relationships-browser/actor.d.ts +1 -1
- package/dist/overlays/relationships-browser/actor.js +6 -12
- package/dist/overlays/relationships-browser/const.d.ts +2 -1
- package/dist/overlays/relationships-browser/const.js +6 -1
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +3 -4
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +2 -2
- package/dist/overlays/relationships-browser/hooks.d.ts +1 -1
- package/dist/overlays/relationships-browser/hooks.js +4 -4
- package/dist/overlays/relationships-browser/layout.js +2 -2
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -2
- package/dist/state/DiagramActorProvider.js +5 -3
- package/dist/state/diagram-machine.d.ts +2 -2
- package/dist/state/diagram-machine.js +3 -4
- package/dist/state/hotkeyActor.js +12 -3
- package/dist/styles.css.js +1 -1
- package/package.json +21 -17
- package/src/base/BaseXYFlow.tsx +2 -2
- package/src/base/primitives/compound/CompoundActionButton.tsx +1 -1
- package/src/base/primitives/compound/CompoundDetailsButton.tsx +1 -1
- package/src/base/primitives/compound/CompoundNodeContainer.css.ts +0 -3
- package/src/base/primitives/compound/CompoundNodeContainer.tsx +1 -1
- package/src/base/primitives/edge/EdgeActionButton.tsx +1 -2
- package/src/base/primitives/edge/EdgePath.tsx +22 -14
- package/src/base/primitives/edge/edge.css.ts +1 -1
- package/src/base/primitives/element/ElementActionButtons.tsx +7 -5
- package/src/base/primitives/element/ElementDetailsButton.tsx +5 -1
- package/src/base/primitives/element/ElementNodeContainer.css.ts +0 -18
- package/src/base/primitives/element/ElementNodeContainer.tsx +1 -1
- package/src/base/updateEdges.ts +6 -9
- package/src/base/updateNodes.ts +10 -14
- package/src/bundle/styles.css.ts +7 -2
- package/src/components/SearchControl.css.ts +4 -8
- package/src/context/FramerMotionConfig.tsx +1 -1
- package/src/context/RootContainer.tsx +0 -4
- package/src/hooks/useDiagram.ts +1 -1
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +8 -2
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +1 -1
- package/src/likec4diagram/custom/edges/edges.css.ts +0 -2
- package/src/likec4diagram/ui/controls/Controls.tsx +53 -55
- package/src/likec4diagram/ui/controls/NavigationButtons.tsx +1 -1
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +1 -1
- package/src/likec4diagram/ui/notation/NotationPanel.css.ts +0 -4
- package/src/likec4diagram/ui/notation/NotationPanel.tsx +1 -2
- package/src/likec4diagram/ui/search/ElementsColumn.tsx +94 -71
- package/src/likec4diagram/ui/search/LikeC4Search.tsx +48 -55
- package/src/likec4diagram/ui/search/ViewsColum.tsx +2 -2
- package/src/likec4diagram/ui/search/ViewsColumn.css.ts +0 -4
- package/src/likec4diagram/ui/search/state.ts +8 -6
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.tsx +1 -1
- package/src/overlays/Overlays.tsx +4 -4
- package/src/overlays/element-details/ElementDetailsCard.tsx +1 -1
- package/src/overlays/element-details/TabPanelDeployments.tsx +2 -0
- package/src/overlays/element-details/TabPanelStructure.tsx +2 -1
- package/src/overlays/overlay/Overlay.css.ts +0 -40
- package/src/overlays/overlay/Overlay.tsx +109 -99
- package/src/overlays/overlaysActor.ts +5 -1
- package/src/overlays/relationship-details/RelationshipDetails.tsx +25 -16
- package/src/overlays/relationship-details/SelectEdge.tsx +0 -14
- package/src/overlays/relationship-details/actor.ts +2 -1
- package/src/overlays/relationship-details/custom/edgeTypes.tsx +1 -1
- package/src/overlays/relationship-details/custom/nodeTypes.tsx +1 -1
- package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +1 -3
- package/src/overlays/relationships-browser/SelectElement.tsx +2 -0
- package/src/overlays/relationships-browser/actor.ts +8 -13
- package/src/overlays/relationships-browser/const.ts +8 -1
- package/src/overlays/relationships-browser/custom/edgeTypes.tsx +2 -3
- package/src/overlays/relationships-browser/custom/nodeTypes.tsx +2 -2
- package/src/overlays/relationships-browser/useViewToNodesEdges.ts +1 -2
- package/src/state/DiagramActorProvider.tsx +4 -1
- package/src/state/diagram-machine.ts +2 -3
- package/src/state/hotkeyActor.ts +13 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { shallowEqual } from 'fast-equals';
|
|
3
|
-
import {
|
|
3
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
4
4
|
import { mapToObj, pick, map } from 'remeda';
|
|
5
5
|
|
|
6
6
|
const FeatureNames = [
|
|
@@ -31,7 +31,7 @@ const AllDisabled = mapToObj(
|
|
|
31
31
|
FeatureNames,
|
|
32
32
|
(name) => [`enable${name}`, false]
|
|
33
33
|
);
|
|
34
|
-
const DiagramFeaturesContext = createContext(AllDisabled);
|
|
34
|
+
const DiagramFeaturesContext = reactExports.createContext(AllDisabled);
|
|
35
35
|
const validate = (features) => {
|
|
36
36
|
let {
|
|
37
37
|
enableReadOnly,
|
|
@@ -68,9 +68,9 @@ function DiagramFeatures({
|
|
|
68
68
|
features,
|
|
69
69
|
overrides
|
|
70
70
|
}) {
|
|
71
|
-
const outerScope = useContext(DiagramFeaturesContext);
|
|
72
|
-
const [scope, setScope] = useState(outerScope);
|
|
73
|
-
useEffect(
|
|
71
|
+
const outerScope = reactExports.useContext(DiagramFeaturesContext);
|
|
72
|
+
const [scope, setScope] = reactExports.useState(outerScope);
|
|
73
|
+
reactExports.useEffect(
|
|
74
74
|
() => {
|
|
75
75
|
setScope((current) => {
|
|
76
76
|
const next = validate({
|
|
@@ -99,10 +99,10 @@ DiagramFeatures.Overlays = ({ children }) => {
|
|
|
99
99
|
);
|
|
100
100
|
};
|
|
101
101
|
function useEnabledFeature(...names) {
|
|
102
|
-
return pick(useContext(DiagramFeaturesContext), map(names, (name) => `enable${name}`));
|
|
102
|
+
return pick(reactExports.useContext(DiagramFeaturesContext), map(names, (name) => `enable${name}`));
|
|
103
103
|
}
|
|
104
104
|
function useEnabledFeatures() {
|
|
105
|
-
return useContext(DiagramFeaturesContext);
|
|
105
|
+
return reactExports.useContext(DiagramFeaturesContext);
|
|
106
106
|
}
|
|
107
107
|
function IfEnabled({
|
|
108
108
|
feature,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { MantineContext } from '@mantine/core';
|
|
3
|
-
import {
|
|
3
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
4
4
|
|
|
5
5
|
function EnsureMantine({ children }) {
|
|
6
|
-
const mantineCtx = useContext(MantineContext);
|
|
6
|
+
const mantineCtx = reactExports.useContext(MantineContext);
|
|
7
7
|
if (!mantineCtx) {
|
|
8
8
|
throw new Error("LikeC4Diagram must be a child of MantineProvider");
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMantineStyleNonce } from '@mantine/core';
|
|
3
|
-
import { LazyMotion, domMax, MotionConfig } from '
|
|
4
|
-
import '
|
|
3
|
+
import { LazyMotion, domMax, MotionConfig } from 'motion/react';
|
|
4
|
+
import '../_virtual/index.js';
|
|
5
5
|
|
|
6
6
|
const FramerMotionConfig = ({
|
|
7
7
|
reducedMotion = "user",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { IconCylinder, IconRectangularPrism, IconReorder, IconUser, IconDeviceMobile, IconBrowser } from '@tabler/icons-react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import {
|
|
4
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
5
5
|
|
|
6
|
-
const IconRendererContext = createContext(null);
|
|
6
|
+
const IconRendererContext = reactExports.createContext(null);
|
|
7
7
|
function IconRendererProvider({
|
|
8
8
|
value,
|
|
9
9
|
children
|
|
10
10
|
}) {
|
|
11
|
-
const outerScope = useContext(IconRendererContext);
|
|
11
|
+
const outerScope = reactExports.useContext(IconRendererContext);
|
|
12
12
|
if (outerScope) {
|
|
13
13
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
14
14
|
}
|
|
@@ -18,7 +18,7 @@ function IconRenderer({
|
|
|
18
18
|
element,
|
|
19
19
|
className
|
|
20
20
|
}) {
|
|
21
|
-
const RenderIcon = useContext(IconRendererContext);
|
|
21
|
+
const RenderIcon = reactExports.useContext(IconRendererContext);
|
|
22
22
|
if (!element || !element.icon || element.icon === "none") {
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { createSafeContext, createOptionalContext } from '@mantine/core';
|
|
3
3
|
import { useStore } from '@nanostores/react';
|
|
4
4
|
import { atom } from 'nanostores';
|
|
5
|
-
import {
|
|
5
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
6
6
|
|
|
7
7
|
const [ReduceGraphicsModeCtx, useReducedGraphics] = createOptionalContext();
|
|
8
8
|
function useIsReducedGraphics() {
|
|
@@ -16,7 +16,7 @@ const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
|
16
16
|
"PanningAtomSafeCtx is not provided"
|
|
17
17
|
);
|
|
18
18
|
function ReduceGraphicsContext({ reduceGraphics, children }) {
|
|
19
|
-
const $isPanningRef = useRef(null);
|
|
19
|
+
const $isPanningRef = reactExports.useRef(null);
|
|
20
20
|
if (!$isPanningRef.current) {
|
|
21
21
|
$isPanningRef.current = atom(reduceGraphics);
|
|
22
22
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { Box } from '@likec4/styles/jsx';
|
|
4
|
-
import {
|
|
4
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
5
5
|
import { usePanningAtom } from './ReduceGraphics.js';
|
|
6
6
|
|
|
7
|
-
const RootContainerContext = createContext(createRef());
|
|
7
|
+
const RootContainerContext = reactExports.createContext(reactExports.createRef());
|
|
8
8
|
function RootContainer({
|
|
9
9
|
className,
|
|
10
10
|
reduceGraphics = false,
|
|
11
11
|
children
|
|
12
12
|
}) {
|
|
13
|
-
const ref = useRef(null);
|
|
13
|
+
const ref = reactExports.useRef(null);
|
|
14
14
|
const $isPanning = usePanningAtom();
|
|
15
|
-
useEffect(() => {
|
|
15
|
+
reactExports.useEffect(() => {
|
|
16
16
|
return $isPanning.listen((isPanning) => {
|
|
17
17
|
if (isPanning) {
|
|
18
18
|
ref.current?.setAttribute("data-likec4-diagram-panning", "true");
|
|
@@ -25,10 +25,6 @@ function RootContainer({
|
|
|
25
25
|
Box,
|
|
26
26
|
{
|
|
27
27
|
className: cx("likec4-root", className),
|
|
28
|
-
css: {
|
|
29
|
-
// '--likec4-background-color': 'mantine.colors.body',
|
|
30
|
-
// '--colors-likec4-background': 'var(--mantine-color-body)',
|
|
31
|
-
},
|
|
32
28
|
ref,
|
|
33
29
|
...reduceGraphics && {
|
|
34
30
|
["data-likec4-reduced-graphics"]: true
|
|
@@ -38,7 +34,7 @@ function RootContainer({
|
|
|
38
34
|
);
|
|
39
35
|
}
|
|
40
36
|
function useRootContainer() {
|
|
41
|
-
return useContext(RootContainerContext).current;
|
|
37
|
+
return reactExports.useContext(RootContainerContext).current;
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
export { RootContainer, useRootContainer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
2
2
|
|
|
3
|
-
const DiagramActorSafeContext = createContext(null);
|
|
3
|
+
const DiagramActorSafeContext = reactExports.createContext(null);
|
|
4
4
|
DiagramActorSafeContext.displayName = "DiagramActorSafeContext";
|
|
5
5
|
const useDiagramActorRef = () => {
|
|
6
|
-
const ctx = useContext(DiagramActorSafeContext);
|
|
6
|
+
const ctx = reactExports.useContext(DiagramActorSafeContext);
|
|
7
7
|
if (ctx === null) {
|
|
8
8
|
throw new Error("DiagramActorRef is not provided");
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@ import { useSelector } from '@xstate/react';
|
|
|
2
2
|
import '@likec4/core';
|
|
3
3
|
import '@mantine/hooks';
|
|
4
4
|
import 'fast-equals';
|
|
5
|
-
import '
|
|
5
|
+
import '../_virtual/index.js';
|
|
6
6
|
import { useDiagramActorRef } from './safeContext.js';
|
|
7
7
|
|
|
8
8
|
const selectViewId = (s) => s.context.view.id;
|
|
@@ -2031,7 +2031,7 @@ export declare function useDiagram(): {
|
|
|
2031
2031
|
readonly params: {
|
|
2032
2032
|
readonly duration: 0;
|
|
2033
2033
|
};
|
|
2034
|
-
},
|
|
2034
|
+
}, ActionFunction<DiagramContext, Events, Events, undefined, Values<{
|
|
2035
2035
|
syncManualLayoutActorLogic: {
|
|
2036
2036
|
src: "syncManualLayoutActorLogic";
|
|
2037
2037
|
logic: StateMachine<Readonly< Input>, Events, {}, never, {
|
|
@@ -2284,7 +2284,7 @@ export declare function useDiagram(): {
|
|
|
2284
2284
|
}>;
|
|
2285
2285
|
id: "overlays";
|
|
2286
2286
|
};
|
|
2287
|
-
}>, never, never, never, never
|
|
2287
|
+
}>, never, never, never, never>, "startSyncLayout"];
|
|
2288
2288
|
readonly target: "ready";
|
|
2289
2289
|
}, {
|
|
2290
2290
|
readonly target: "initializing";
|
|
@@ -9775,11 +9775,7 @@ export declare function useDiagram(): {
|
|
|
9775
9775
|
readonly 'xyflow.applyEdgeChanges': {
|
|
9776
9776
|
readonly actions: ActionFunction<DiagramContext, {
|
|
9777
9777
|
type: "xyflow.applyEdgeChanges";
|
|
9778
|
-
changes: EdgeChange<
|
|
9779
|
-
/**
|
|
9780
|
-
* @warning Do not use in render phase
|
|
9781
|
-
*/
|
|
9782
|
-
Types.Edge>[];
|
|
9778
|
+
changes: EdgeChange<Types.Edge>[];
|
|
9783
9779
|
}, Events, undefined, Values<{
|
|
9784
9780
|
syncManualLayoutActorLogic: {
|
|
9785
9781
|
src: "syncManualLayoutActorLogic";
|
package/dist/hooks/useDiagram.js
CHANGED
|
@@ -2,13 +2,13 @@ import '@likec4/core';
|
|
|
2
2
|
import { useCallbackRef } from '@mantine/hooks';
|
|
3
3
|
import { useSelector } from '@xstate/react';
|
|
4
4
|
import { shallowEqual } from 'fast-equals';
|
|
5
|
-
import {
|
|
5
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
6
6
|
import { findDiagramEdge, findDiagramNode } from '../state/utils.js';
|
|
7
7
|
import { useDiagramActorRef } from './safeContext.js';
|
|
8
8
|
|
|
9
9
|
function useDiagram() {
|
|
10
10
|
const actor = useDiagramActorRef();
|
|
11
|
-
return useMemo(() => ({
|
|
11
|
+
return reactExports.useMemo(() => ({
|
|
12
12
|
actor,
|
|
13
13
|
send: actor.send,
|
|
14
14
|
navigateTo: (viewId, fromNode) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
2
2
|
import { useRootContainer } from '../context/RootContainer.js';
|
|
3
3
|
|
|
4
4
|
function useMantinePortalProps() {
|
|
5
5
|
const target = useRootContainer();
|
|
6
|
-
return useMemo(() => target ? { portalProps: { target }, withinPortal: true } : { withinPortal: false }, [target]);
|
|
6
|
+
return reactExports.useMemo(() => target ? { portalProps: { target }, withinPortal: true } : { withinPortal: false }, [target]);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { useMantinePortalProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { shallowEqual } from 'fast-equals';
|
|
2
|
-
import {
|
|
2
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
3
3
|
|
|
4
4
|
function useSetState(initialState) {
|
|
5
|
-
const [state, _setState] = useState(initialState);
|
|
6
|
-
const setState = useCallback(
|
|
5
|
+
const [state, _setState] = reactExports.useState(initialState);
|
|
6
|
+
const setState = reactExports.useCallback(
|
|
7
7
|
(statePartial) => _setState((current) => {
|
|
8
8
|
const next = {
|
|
9
9
|
...current,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
3
3
|
import { useOverlaysActorRef } from '../hooks/useOverlaysActor.js';
|
|
4
4
|
import { Overlays } from '../overlays/Overlays.js';
|
|
5
5
|
import { useEnabledFeatures } from '../context/DiagramFeatures.js';
|
|
@@ -8,7 +8,7 @@ import { DiagramTitlePanel } from './ui/diagram-title/DiagramTitlePanel.js';
|
|
|
8
8
|
import { NotationPanel } from './ui/notation/NotationPanel.js';
|
|
9
9
|
import { DynamicViewWalkthrough } from './ui/walkthrough/DynamicViewWalkthrough.js';
|
|
10
10
|
|
|
11
|
-
const DiagramUI = memo(() => {
|
|
11
|
+
const DiagramUI = reactExports.memo(() => {
|
|
12
12
|
const {
|
|
13
13
|
enableViewTitle,
|
|
14
14
|
enableNotations,
|
|
@@ -3,7 +3,7 @@ import { nonNullable } from '@likec4/core';
|
|
|
3
3
|
import { cx } from '@likec4/styles/css';
|
|
4
4
|
import { useTimeout, useDebouncedCallback, useCallbackRef } from '@mantine/hooks';
|
|
5
5
|
import { deepEqual, shallowEqual } from 'fast-equals';
|
|
6
|
-
import {
|
|
6
|
+
import { r as reactExports } from '../_virtual/index.js';
|
|
7
7
|
import { BaseXYFlow } from '../base/BaseXYFlow.js';
|
|
8
8
|
import { useIsReducedGraphics, usePanningAtom } from '../context/ReduceGraphics.js';
|
|
9
9
|
import { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
|
|
@@ -31,7 +31,7 @@ const selectXYProps = (ctx) => ({
|
|
|
31
31
|
});
|
|
32
32
|
const equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.fitViewPadding === b.fitViewPadding && a.enableFitView === b.enableFitView && a.enableReadOnly === b.enableReadOnly && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges) && shallowEqual(a.viewport ?? null, b.viewport ?? null);
|
|
33
33
|
const compareProps = (a, b) => a.nodesDraggable === b.nodesDraggable && a.nodesSelectable === b.nodesSelectable && deepEqual(a.background, b.background) && deepEqual(a.reactFlowProps ?? {}, b.reactFlowProps ?? {});
|
|
34
|
-
const LikeC4DiagramXYFlow = memo(({
|
|
34
|
+
const LikeC4DiagramXYFlow = reactExports.memo(({
|
|
35
35
|
background = "dots",
|
|
36
36
|
nodesDraggable = false,
|
|
37
37
|
nodesSelectable = false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Popover, PopoverTarget, PopoverDropdown, Stack, ScrollAreaAutosize, Text, CloseButton, Group, Button } from '@mantine/core';
|
|
3
3
|
import { useDebouncedEffect } from '@react-hookz/web';
|
|
4
|
-
import {
|
|
4
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
5
5
|
import { isTruthy, isNonNull } from 'remeda';
|
|
6
6
|
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
7
7
|
import { edgeNoteText, edgeNoteCloseButton } from './NotePopover.css.js';
|
|
@@ -21,7 +21,7 @@ const NotePopover = ({ notes, children }) => {
|
|
|
21
21
|
hasPrevious: s.xyedges.findIndex((e) => e.id === s.activeWalkthrough?.stepId) > 0
|
|
22
22
|
}));
|
|
23
23
|
const diagram = useDiagram();
|
|
24
|
-
const [isOpened, setIsOpened] = useState(false);
|
|
24
|
+
const [isOpened, setIsOpened] = reactExports.useState(false);
|
|
25
25
|
const portalProps = useMantinePortalProps();
|
|
26
26
|
useDebouncedEffect(
|
|
27
27
|
() => {
|
|
@@ -4,7 +4,7 @@ import { useDebouncedEffect } from '@react-hookz/web';
|
|
|
4
4
|
import { EdgeLabelRenderer } from '@xyflow/react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { line, curveCatmullRomOpen } from 'd3-shape';
|
|
7
|
-
import {
|
|
7
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
8
8
|
import { isTruthy, first, last } from 'remeda';
|
|
9
9
|
import { ZIndexes } from '../../../base/const.js';
|
|
10
10
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
|
|
@@ -28,7 +28,7 @@ const curve = line().curve(curveCatmullRomOpen).x((d) => d.x).y((d) => d.y);
|
|
|
28
28
|
const selectActiveStepId = (s) => s.context.activeWalkthrough?.stepId ?? null;
|
|
29
29
|
const RelationshipEdge = customEdge((props) => {
|
|
30
30
|
const isPanning = useIsPanning();
|
|
31
|
-
const [isControlPointDragging, setIsControlPointDragging] = useState(false);
|
|
31
|
+
const [isControlPointDragging, setIsControlPointDragging] = reactExports.useState(false);
|
|
32
32
|
const xyflowStore = useXYStoreApi();
|
|
33
33
|
const xyflow = useXYFlow();
|
|
34
34
|
const diagram = useDiagram();
|
|
@@ -83,12 +83,12 @@ const RelationshipEdge = customEdge((props) => {
|
|
|
83
83
|
edgePath = bezierPath(points);
|
|
84
84
|
}
|
|
85
85
|
let labelX = labelBBox?.x ?? 0, labelY = labelBBox?.y ?? 0;
|
|
86
|
-
const [labelPos, setLabelPos] = useState({
|
|
86
|
+
const [labelPos, setLabelPos] = reactExports.useState({
|
|
87
87
|
x: labelXY?.x ?? labelX,
|
|
88
88
|
y: labelXY?.y ?? labelY
|
|
89
89
|
});
|
|
90
|
-
const svgPathRef = useRef(null);
|
|
91
|
-
useEffect(() => {
|
|
90
|
+
const svgPathRef = reactExports.useRef(null);
|
|
91
|
+
reactExports.useEffect(() => {
|
|
92
92
|
const path = svgPathRef.current;
|
|
93
93
|
if (!path) return;
|
|
94
94
|
const dompoint = path.getPointAtLength(path.getTotalLength() * 0.5);
|
|
@@ -265,7 +265,17 @@ const RelationshipEdge = customEdge((props) => {
|
|
|
265
265
|
}
|
|
266
266
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
267
267
|
/* @__PURE__ */ jsxs(EdgeContainer, { ...props, className: clsx(isControlPointDragging && controlDragging), children: [
|
|
268
|
-
/* @__PURE__ */ jsx(
|
|
268
|
+
/* @__PURE__ */ jsx(
|
|
269
|
+
EdgePath,
|
|
270
|
+
{
|
|
271
|
+
edgeProps: props,
|
|
272
|
+
svgPath: edgePath,
|
|
273
|
+
ref: svgPathRef,
|
|
274
|
+
...enableEdgeEditing && {
|
|
275
|
+
onEdgePointerDown
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
),
|
|
269
279
|
/* @__PURE__ */ jsx(
|
|
270
280
|
EdgeLabelContainer,
|
|
271
281
|
{
|
|
@@ -305,7 +315,7 @@ const RelationshipEdge = customEdge((props) => {
|
|
|
305
315
|
cy: Math.round(p.y),
|
|
306
316
|
r: 3
|
|
307
317
|
},
|
|
308
|
-
i
|
|
318
|
+
"controlPoints" + edgeId + "#" + i
|
|
309
319
|
))
|
|
310
320
|
}
|
|
311
321
|
)
|
|
@@ -3,7 +3,7 @@ import { DiagramNode, nameFromFqn } from '@likec4/core';
|
|
|
3
3
|
import { cx, css } from '@likec4/styles/css';
|
|
4
4
|
import { Menu, MenuTarget, MenuDropdown, MenuLabel, MenuDivider, Box, ActionIcon, MenuItem, Stack, Group, Text, TooltipGroup, Space, Tooltip as Tooltip$1 } from '@mantine/core';
|
|
5
5
|
import { IconInfoCircle, IconArrowRight, IconZoomScan, IconFileSymlink } from '@tabler/icons-react';
|
|
6
|
-
import {
|
|
6
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
7
7
|
import { pipe, map, filter, isTruthy, partition } from 'remeda';
|
|
8
8
|
import { Link } from '../../../components/Link.js';
|
|
9
9
|
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
@@ -25,7 +25,7 @@ const Tooltip = Tooltip$1.withProps({
|
|
|
25
25
|
offset: 8,
|
|
26
26
|
withinPortal: false
|
|
27
27
|
});
|
|
28
|
-
const RelationshipsDropdownMenu = memo(({
|
|
28
|
+
const RelationshipsDropdownMenu = reactExports.memo(({
|
|
29
29
|
edgeId,
|
|
30
30
|
source,
|
|
31
31
|
target,
|
|
@@ -40,7 +40,7 @@ const RelationshipsDropdownMenu = memo(({
|
|
|
40
40
|
const likec4model = useLikeC4Model(true);
|
|
41
41
|
const diagram = useDiagram();
|
|
42
42
|
const portalProps = useMantinePortalProps();
|
|
43
|
-
const onClickOpenOverlay = useCallback((e) => {
|
|
43
|
+
const onClickOpenOverlay = reactExports.useCallback((e) => {
|
|
44
44
|
e.stopPropagation();
|
|
45
45
|
diagram.openRelationshipDetails(edgeId);
|
|
46
46
|
}, [edgeId]);
|
|
@@ -51,7 +51,7 @@ const RelationshipsDropdownMenu = memo(({
|
|
|
51
51
|
diagramEdge.relations,
|
|
52
52
|
map((id) => {
|
|
53
53
|
try {
|
|
54
|
-
return likec4model.
|
|
54
|
+
return likec4model.findRelationship(id);
|
|
55
55
|
} catch (e) {
|
|
56
56
|
console.error(
|
|
57
57
|
`View is cached and likec4model missing relationship ${id} from ${sourceNode.id} -> ${targetNode.id}`,
|
|
@@ -63,7 +63,7 @@ const RelationshipsDropdownMenu = memo(({
|
|
|
63
63
|
filter(isTruthy),
|
|
64
64
|
partition((r) => r.source.id === sourceNode.id && r.target.id === targetNode.id)
|
|
65
65
|
);
|
|
66
|
-
const renderRelationship = (relationship, index) => /* @__PURE__ */ jsxs(Fragment
|
|
66
|
+
const renderRelationship = (relationship, index) => /* @__PURE__ */ jsxs(reactExports.Fragment, { children: [
|
|
67
67
|
index > 0 && /* @__PURE__ */ jsx(MenuDivider, { opacity: 0.65 }),
|
|
68
68
|
/* @__PURE__ */ jsx(
|
|
69
69
|
MenuItem,
|
|
@@ -130,7 +130,7 @@ const RelationshipsDropdownMenu = memo(({
|
|
|
130
130
|
}
|
|
131
131
|
);
|
|
132
132
|
});
|
|
133
|
-
const Relationship = forwardRef(({
|
|
133
|
+
const Relationship = reactExports.forwardRef(({
|
|
134
134
|
className,
|
|
135
135
|
relationship: r,
|
|
136
136
|
edge,
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { defaultTheme } from '@likec4/core';
|
|
3
3
|
import { Popover, PopoverTarget, Button, ColorSwatch, PopoverDropdown, Space, Divider, Stack, TooltipGroup, Flex, Tooltip, CheckIcon, rem, Slider } from '@mantine/core';
|
|
4
4
|
import { useUpdateEffect } from '@react-hookz/web';
|
|
5
|
-
import {
|
|
5
|
+
import { r as reactExports } from '../../../../_virtual/index.js';
|
|
6
6
|
import { themedColors, colors } from './_shared.js';
|
|
7
7
|
|
|
8
8
|
function ColorButton({
|
|
@@ -137,7 +137,7 @@ function OpacityOption({
|
|
|
137
137
|
elementOpacity = 100,
|
|
138
138
|
onOpacityChange
|
|
139
139
|
}) {
|
|
140
|
-
const [value, setValue] = useState(elementOpacity);
|
|
140
|
+
const [value, setValue] = reactExports.useState(elementOpacity);
|
|
141
141
|
useUpdateEffect(() => {
|
|
142
142
|
setValue(elementOpacity);
|
|
143
143
|
}, [elementOpacity]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '@likec4/core';
|
|
3
3
|
import { Box, SegmentedControl } from '@mantine/core';
|
|
4
|
-
import {
|
|
4
|
+
import { r as reactExports } from '../../../../_virtual/index.js';
|
|
5
5
|
import { useHandlers, GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
|
|
6
6
|
import { ColorButton } from './ColorButton.js';
|
|
7
7
|
import { Toolbar } from './Toolbar.js';
|
|
@@ -92,8 +92,8 @@ function BorderStyleOption({
|
|
|
92
92
|
elementBorderStyle = "dashed",
|
|
93
93
|
onChange
|
|
94
94
|
}) {
|
|
95
|
-
const [value, setValue] = useState(elementBorderStyle);
|
|
96
|
-
useEffect(() => {
|
|
95
|
+
const [value, setValue] = reactExports.useState(elementBorderStyle);
|
|
96
|
+
reactExports.useEffect(() => {
|
|
97
97
|
setValue(elementBorderStyle);
|
|
98
98
|
}, [elementBorderStyle]);
|
|
99
99
|
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
@@ -3,7 +3,7 @@ import { invariant, defaultTheme } from '@likec4/core';
|
|
|
3
3
|
import { Tooltip as Tooltip$1, ActionIcon } from '@mantine/core';
|
|
4
4
|
import { useCallbackRef } from '@mantine/hooks';
|
|
5
5
|
import { IconFileSymlink, IconTransform } from '@tabler/icons-react';
|
|
6
|
-
import {
|
|
6
|
+
import { r as reactExports } from '../../../../_virtual/index.js';
|
|
7
7
|
import { keys } from 'remeda';
|
|
8
8
|
import { useDiagram } from '../../../../hooks/useDiagram.js';
|
|
9
9
|
import { useDiagramEventHandlers } from '../../../../context/DiagramEventHandlers.js';
|
|
@@ -36,7 +36,7 @@ const Tooltip = Tooltip$1.withProps({
|
|
|
36
36
|
function useHandlers(target, props) {
|
|
37
37
|
const { onChange: triggerOnChange } = useDiagramEventHandlers();
|
|
38
38
|
const diagram = useDiagram();
|
|
39
|
-
const [originalColor, setOriginalColor] = useState(null);
|
|
39
|
+
const [originalColor, setOriginalColor] = reactExports.useState(null);
|
|
40
40
|
const onColorPreview = useCallbackRef((color) => {
|
|
41
41
|
if (color === null) {
|
|
42
42
|
invariant(originalColor, "originalColor is null");
|
|
@@ -3,7 +3,7 @@ import { Popover, PopoverTarget, PopoverDropdown, Box, FloatingIndicator, Text,
|
|
|
3
3
|
import { useHover, useUncontrolled, clampUseMovePosition, useMove, useMergedRef } from '@mantine/hooks';
|
|
4
4
|
import { useDebouncedCallback } from '@react-hookz/web';
|
|
5
5
|
import { IconLayoutDashboard } from '@tabler/icons-react';
|
|
6
|
-
import {
|
|
6
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
7
7
|
import { useDiagram, useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
8
8
|
import { Tooltip, ActionIcon } from './_shared.js';
|
|
9
9
|
import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from './styles.css.js';
|
|
@@ -18,8 +18,8 @@ const ChangeAutoLayoutButton = (props) => {
|
|
|
18
18
|
onChange
|
|
19
19
|
} = useDiagramEventHandlers();
|
|
20
20
|
const diagram = useDiagram();
|
|
21
|
-
const [rootRef, setRootRef] = useState(null);
|
|
22
|
-
const [controlsRefs, setControlsRefs] = useState({});
|
|
21
|
+
const [rootRef, setRootRef] = reactExports.useState(null);
|
|
22
|
+
const [controlsRefs, setControlsRefs] = reactExports.useState({});
|
|
23
23
|
const {
|
|
24
24
|
autoLayout,
|
|
25
25
|
viewId
|
|
@@ -103,7 +103,7 @@ const ChangeAutoLayoutButton = (props) => {
|
|
|
103
103
|
);
|
|
104
104
|
};
|
|
105
105
|
const MAX_SPACING = 400;
|
|
106
|
-
const SpacingSliders = forwardRef(({
|
|
106
|
+
const SpacingSliders = reactExports.forwardRef(({
|
|
107
107
|
isVertical,
|
|
108
108
|
nodeSep,
|
|
109
109
|
rankSep,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx,
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { ActionIconGroup, Group, Stack, Box, Badge, Loader } from '@mantine/core';
|
|
3
3
|
import { IconFileSymlink, IconFocusCentered, IconMenu2 } from '@tabler/icons-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { m, LayoutGroup } from 'motion/react';
|
|
6
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
7
7
|
import { useControlsCustomLayout } from '../../../context/ControlsCustomLayout.js';
|
|
8
8
|
import { useDiagramContext, useDiagram, useDiagramSyncLayoutState } from '../../../hooks/useDiagram.js';
|
|
9
9
|
import { LikeC4Search } from '../search/LikeC4Search.js';
|
|
@@ -70,7 +70,7 @@ const ControlsDefaultLayout = ({
|
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
const Controls = memo(() => {
|
|
73
|
+
const Controls = reactExports.memo(() => {
|
|
74
74
|
const { viewId, hasLayoutDrift, viewportChanged, isNotActiveWalkthrough } = useDiagramContext((c) => ({
|
|
75
75
|
viewId: c.view.id,
|
|
76
76
|
hasLayoutDrift: c.view.hasLayoutDrift ?? false,
|
|
@@ -92,7 +92,7 @@ const Controls = memo(() => {
|
|
|
92
92
|
const notReadOnly = !enableReadOnly;
|
|
93
93
|
const portalProps = useMantinePortalProps();
|
|
94
94
|
const ControlsLayout = useControlsCustomLayout() ?? ControlsDefaultLayout;
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
95
|
+
return /* @__PURE__ */ jsx(Fragment, { children: isNotActiveWalkthrough && /* @__PURE__ */ jsx(
|
|
96
96
|
ControlsLayout,
|
|
97
97
|
{
|
|
98
98
|
burgerMenu: onBurgerMenuClick && /* @__PURE__ */ jsx(
|
|
@@ -137,7 +137,7 @@ const Controls = memo(() => {
|
|
|
137
137
|
) })
|
|
138
138
|
] })
|
|
139
139
|
}
|
|
140
|
-
) })
|
|
140
|
+
) });
|
|
141
141
|
});
|
|
142
142
|
const SyncLayoutBadge = () => {
|
|
143
143
|
const isPending = useDiagramSyncLayoutState((s) => s.hasTag("pending"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { IconChevronLeft, IconChevronRight } from '@tabler/icons-react';
|
|
3
|
-
import { AnimatePresence, m } from '
|
|
3
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
4
4
|
import { useDiagram, useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
5
5
|
import { ActionIcon } from './_shared.js';
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@ import { Card, CardSection, Button, Group, Text, Spoiler, Stack } from '@mantine
|
|
|
3
3
|
import { useLocalStorage } from '@mantine/hooks';
|
|
4
4
|
import { IconMenu } from '@tabler/icons-react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { AnimatePresence, m } from '
|
|
6
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
7
7
|
import { Link } from '../../../components/Link.js';
|
|
8
8
|
import { useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
9
9
|
import { card, title, description } from './DiagramTitlePanel.css.js';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '@likec4/core';
|
|
3
3
|
import { cx, css } from '@likec4/styles/css';
|
|
4
|
-
import '@likec4/styles/tokens';
|
|
5
4
|
import { Tooltip, ThemeIcon, ActionIcon, Paper, Tabs, TabsList, TabsTab, TabsPanel, ScrollAreaAutosize, Stack, Card, Group, Box, Badge, Text } from '@mantine/core';
|
|
6
5
|
import { useLocalStorage } from '@mantine/hooks';
|
|
7
6
|
import { IconAlertTriangle, IconHelpCircle, IconArrowDownRight } from '@tabler/icons-react';
|
|
8
7
|
import clsx from 'clsx';
|
|
9
|
-
import { AnimatePresence, m } from '
|
|
10
|
-
import {
|
|
8
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
9
|
+
import { r as reactExports } from '../../../_virtual/index.js';
|
|
11
10
|
import { ceil, isNonNullish } from 'remeda';
|
|
12
11
|
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
13
12
|
import { useXYStore } from '../../../hooks/useXYFlow.js';
|
|
@@ -21,7 +20,7 @@ const ElementNotation = ({ value }) => {
|
|
|
21
20
|
color = "primary",
|
|
22
21
|
shape = "rectangle"
|
|
23
22
|
} = value;
|
|
24
|
-
const [onlyKind, setOnlyKind] = useState(null);
|
|
23
|
+
const [onlyKind, setOnlyKind] = reactExports.useState(null);
|
|
25
24
|
const diagram = useDiagram();
|
|
26
25
|
const w = 300;
|
|
27
26
|
const h = 200;
|
|
@@ -120,7 +119,7 @@ const selector = (s) => ({
|
|
|
120
119
|
isVisible: true
|
|
121
120
|
// isVisible: isNullish(s.focusedNodeId ?? s.activeWalkthrough),
|
|
122
121
|
});
|
|
123
|
-
const NotationPanel = memo(() => {
|
|
122
|
+
const NotationPanel = reactExports.memo(() => {
|
|
124
123
|
const height = useXYStore((s) => s.height);
|
|
125
124
|
const {
|
|
126
125
|
id,
|