@likec4/diagram 1.60.0 → 1.61.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/README.md +63 -11
- package/dist/LikeC4Diagram.d.mts +4 -6
- package/dist/LikeC4Diagram.mjs +13 -12
- package/dist/LikeC4Diagram.props.d.mts +5 -7
- package/dist/LikeC4MantineProvider.d.mts +1 -2
- package/dist/LikeC4MantineProvider.mjs +26 -11
- package/dist/LikeC4ModelProvider.d.mts +1 -3
- package/dist/LikeC4ModelProvider.mjs +1 -2
- package/dist/LikeC4ProjectsOverview.d.mts +1 -3
- package/dist/LikeC4ProjectsOverview.mjs +1 -2
- package/dist/LikeC4ProjectsProvider.d.mts +1 -2
- package/dist/LikeC4ProjectsProvider.mjs +2 -3
- package/dist/LikeC4Styles.d.mts +1 -2
- package/dist/LikeC4Styles.mjs +11 -6
- package/dist/LikeC4View.d.mts +3 -5
- package/dist/LikeC4View.mjs +12 -11
- package/dist/ReactLikeC4.d.mts +3 -5
- package/dist/ReactLikeC4.mjs +8 -7
- package/dist/StaticLikeC4Diagram.d.mts +1 -3
- package/dist/StaticLikeC4Diagram.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/base/Background.mjs +1 -2
- package/dist/base/Base.d.mts +1 -2
- package/dist/base/Base.mjs +1 -2
- package/dist/base/BaseXYFlow.mjs +12 -10
- package/dist/base/const.d.mts +1 -3
- package/dist/base/const.mjs +1 -2
- package/dist/base/keyboardZoom.mjs +1 -2
- package/dist/base/types.d.mts +2 -4
- package/dist/base/updateEdges.mjs +1 -2
- package/dist/base/updateNodes.mjs +1 -2
- package/dist/base-primitives/Markdown.d.mts +5 -5
- package/dist/base-primitives/Markdown.mjs +22 -11
- package/dist/base-primitives/NodeHandles.d.mts +1 -3
- package/dist/base-primitives/NodeHandles.mjs +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +1 -2
- package/dist/base-primitives/compound/CompoundTitle.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundTitle.mjs +1 -2
- package/dist/base-primitives/compound/actionbtns.css.mjs +1 -2
- package/dist/base-primitives/edge/EdgeActionButton.mjs +2 -3
- package/dist/base-primitives/edge/EdgeContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeLabel.mjs +3 -3
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeMarkers.mjs +1 -2
- package/dist/base-primitives/edge/EdgePath.mjs +1 -2
- package/dist/base-primitives/element/ElementActionButtons.d.mts +1 -2
- package/dist/base-primitives/element/ElementActionButtons.mjs +2 -3
- package/dist/base-primitives/element/ElementData.d.mts +1 -2
- package/dist/base-primitives/element/ElementData.mjs +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.mjs +2 -3
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +1 -2
- package/dist/base-primitives/element/ElementNodeContainer.mjs +2 -3
- package/dist/base-primitives/element/ElementShape.d.mts +11 -6
- package/dist/base-primitives/element/ElementShape.mjs +10 -5
- package/dist/base-primitives/element/ElementTags.d.mts +6 -3
- package/dist/base-primitives/element/ElementTags.mjs +2 -4
- package/dist/base-primitives/index.d.mts +5 -5
- package/dist/base-primitives/memoEdge.d.mts +2 -6
- package/dist/base-primitives/memoEdge.mjs +1 -2
- package/dist/base-primitives/memoNode.d.mts +2 -6
- package/dist/components/EmptyBox.mjs +1 -2
- package/dist/components/ErrorFallback.d.mts +4 -3
- package/dist/components/ErrorFallback.mjs +61 -56
- package/dist/components/FloatingWindow.mjs +3 -4
- package/dist/components/GithubIcon.mjs +1 -2
- package/dist/components/Link.mjs +3 -4
- package/dist/components/Logo.d.mts +3 -5
- package/dist/components/Logo.mjs +28 -35
- package/dist/components/NavigationLink.mjs +1 -2
- package/dist/components/NavigationPanel.mjs +11 -11
- package/dist/components/PortalToContainer.d.mts +1 -3
- package/dist/components/PortalToContainer.mjs +1 -2
- package/dist/components/RootContainer.mjs +1 -2
- package/dist/components/SearchControl.css.mjs +1 -2
- package/dist/components/SearchControl.d.mts +1 -2
- package/dist/components/SearchControl.mjs +2 -3
- package/dist/components/ViewIcon.mjs +5 -6
- package/dist/components/ViewNotFound.mjs +1 -2
- package/dist/components/markdown/MarkdownWithRefs.mjs +268 -0
- package/dist/components/markdown/markdown-refs.mjs +145 -0
- package/dist/components/markdown/useMarkdownRefsInteractivity.mjs +126 -0
- package/dist/context/ComparingLayoutsContext.mjs +24 -0
- package/dist/context/CurrentViewModelProvider.mjs +1 -2
- package/dist/context/DiagramEventHandlers.mjs +3 -4
- package/dist/context/DiagramFeatures.d.mts +2 -3
- package/dist/context/DiagramFeatures.mjs +15 -9
- package/dist/context/EnsureMantine.mjs +1 -2
- package/dist/context/FramerMotionConfig.d.mts +1 -3
- package/dist/context/FramerMotionConfig.mjs +1 -2
- package/dist/context/IconRenderer.d.mts +1 -3
- package/dist/context/IconRenderer.mjs +14 -14
- package/dist/context/LikeC4ModelContext.d.mts +1 -2
- package/dist/context/LikeC4ModelContext.mjs +1 -2
- package/dist/context/LikeC4ProjectsContext.d.mts +1 -3
- package/dist/context/LikeC4ProjectsContext.mjs +1 -2
- package/dist/context/RootContainerContext.mjs +1 -2
- package/dist/context/TagStylesContext.d.mts +1 -2
- package/dist/context/TagStylesContext.mjs +7 -19
- package/dist/custom/builtins.d.mts +4 -1
- package/dist/custom/customNodes.d.mts +164 -7
- package/dist/custom/customNodes.mjs +387 -8
- package/dist/custom/index.d.mts +18 -30
- package/dist/custom/index.mjs +11 -19
- package/dist/custom/primitives.d.mts +3 -5
- package/dist/customization/CustomizationContext.d.mts +50 -0
- package/dist/customization/CustomizationContext.mjs +64 -0
- package/dist/customization/customizable.d.mts +32 -0
- package/dist/customization/customizable.mjs +75 -0
- package/dist/customization/customization-types.d.mts +40 -0
- package/dist/customization/customization-types.mjs +8 -0
- package/dist/customization/stableComponents.mjs +35 -0
- package/dist/editor/LikeC4EditorCallbacks.d.mts +1 -3
- package/dist/editor/LikeC4EditorCallbacks.mjs +1 -2
- package/dist/editor/LikeC4EditorProvider.d.mts +1 -3
- package/dist/editor/LikeC4EditorProvider.mjs +1 -2
- package/dist/editor/actor/actions.mjs +2 -3
- package/dist/editor/actor/hotkey.d.mts +1 -3
- package/dist/editor/actor/hotkey.mjs +1 -2
- package/dist/editor/actor/machine.d.mts +2 -4
- package/dist/editor/actor/machine.mjs +1 -2
- package/dist/editor/actor/setup.d.mts +1 -2
- package/dist/editor/actor/setup.mjs +1 -2
- package/dist/editor/actor/state.editor.mjs +2 -3
- package/dist/editor/actor/state.sync-queue.mjs +2 -3
- package/dist/editor/actor/types.d.mts +1 -3
- package/dist/editor/actor/types.mjs +1 -2
- package/dist/editor/applyChangesToManualLayout.mjs +1 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/useEditorActorLogic.mjs +3 -4
- package/dist/hooks/safeContext.d.mts +16 -35
- package/dist/hooks/safeContext.mjs +1 -2
- package/dist/hooks/useCallbackRef.mjs +1 -2
- package/dist/hooks/useCurrentView.d.mts +1 -3
- package/dist/hooks/useCurrentView.mjs +1 -2
- package/dist/hooks/useCurrentViewModel.d.mts +0 -2
- package/dist/hooks/useCurrentViewModel.mjs +1 -2
- package/dist/hooks/useDiagram.d.mts +3 -12
- package/dist/hooks/useDiagram.mjs +11 -10
- package/dist/hooks/useDiagramCompareLayout.d.mts +2 -4
- package/dist/hooks/useDiagramCompareLayout.mjs +12 -21
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +2 -3
- package/dist/hooks/useEditorActor.mjs +1 -2
- package/dist/hooks/useId.mjs +1 -2
- package/dist/hooks/useLikeC4ElementsTree.mjs +1 -2
- package/dist/hooks/useLikeC4Model.d.mts +0 -2
- package/dist/hooks/useLikeC4Model.mjs +1 -2
- package/dist/hooks/useLikeC4Project.d.mts +2 -4
- package/dist/hooks/useLikeC4Project.mjs +1 -2
- package/dist/hooks/useLikeC4Styles.d.mts +1 -3
- package/dist/hooks/useLikeC4Styles.mjs +1 -2
- package/dist/hooks/useMantinePortalProps.mjs +1 -2
- package/dist/hooks/useSetState.mjs +1 -2
- package/dist/hooks/useUpdateEffect.d.mts +0 -2
- package/dist/hooks/useUpdateEffect.mjs +1 -2
- package/dist/hooks/useXYFlow.d.mts +1 -3
- package/dist/hooks/useXYFlow.mjs +1 -2
- package/dist/index.d.mts +20 -18
- package/dist/index.mjs +20 -18
- package/dist/likec4diagram/DiagramUI.mjs +14 -11
- package/dist/likec4diagram/DiagramXYFlow.mjs +34 -34
- package/dist/likec4diagram/convert-to-xyflow.mjs +7 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +18 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +2 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +2 -3
- package/dist/likec4diagram/custom/index.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +1 -2
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +2 -3
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +3 -5
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -1
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/index.d.mts +4 -4
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/nodes.mjs +19 -21
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +4 -6
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +29 -12
- package/dist/likec4diagram/relationship-popover/actor.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/components.mjs +1 -2
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +22 -34
- package/dist/likec4diagram/state/aligners.d.mts +1 -3
- package/dist/likec4diagram/state/aligners.mjs +1 -2
- package/dist/likec4diagram/state/assign.mjs +3 -4
- package/dist/likec4diagram/state/createViewChange.mjs +1 -2
- package/dist/likec4diagram/state/diagram-api.d.mts +33 -16
- package/dist/likec4diagram/state/diagram-api.mjs +55 -31
- package/dist/likec4diagram/state/hotkeyActor.d.mts +1 -3
- package/dist/likec4diagram/state/hotkeyActor.mjs +12 -6
- package/dist/likec4diagram/state/machine.actions.layout.mjs +2 -3
- package/dist/likec4diagram/state/machine.actions.mjs +81 -44
- package/dist/likec4diagram/state/machine.d.mts +107 -15
- package/dist/likec4diagram/state/machine.mjs +3 -4
- package/dist/likec4diagram/state/machine.setup.d.mts +14 -10
- package/dist/likec4diagram/state/machine.setup.mjs +55 -28
- package/dist/likec4diagram/state/machine.state.initializing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.navigating.mjs +3 -6
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.mjs +8 -8
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +5 -6
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +1 -3
- package/dist/likec4diagram/state/mediaPrintActor.mjs +1 -2
- package/dist/likec4diagram/state/persistence.mjs +12 -5
- package/dist/likec4diagram/state/types.d.mts +1 -3
- package/dist/likec4diagram/state/utils.mjs +2 -3
- package/dist/likec4diagram/types.d.mts +1 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +5 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +1 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +6 -7
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +3 -4
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +4 -7
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +4 -5
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +4 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +3 -9
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +1 -2
- package/dist/likec4diagram/useLayoutConstraints.mjs +5 -10
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +9 -2
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +1 -2
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +3 -6
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +1 -2
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +1 -2
- package/dist/navigationpanel/ElementViewControls.mjs +6 -7
- package/dist/navigationpanel/NavigationPanel.mjs +38 -67
- package/dist/navigationpanel/NavigationPanelControls.mjs +35 -114
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +37 -34
- package/dist/navigationpanel/_common.mjs +3 -4
- package/dist/navigationpanel/actor.actions.mjs +1 -2
- package/dist/navigationpanel/actor.d.mts +0 -2
- package/dist/navigationpanel/actor.mjs +2 -3
- package/dist/navigationpanel/actor.setup.d.mts +1 -3
- package/dist/navigationpanel/actor.setup.mjs +1 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +160 -90
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +173 -142
- package/dist/{likec4diagram/ui → navigationpanel/comparepanel}/LayoutDriftFrame.mjs +6 -12
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +14 -19
- package/dist/navigationpanel/controls/LayoutWarning.mjs +3 -4
- package/dist/navigationpanel/controls/LogoButton.mjs +5 -23
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +3 -4
- package/dist/navigationpanel/controls/OpenSource.mjs +2 -3
- package/dist/navigationpanel/controls/SearchControl.mjs +2 -3
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +36 -21
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +12 -15
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +46 -13
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +3 -4
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +2 -3
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +3 -4
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +4 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +11 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +2 -3
- package/dist/navigationpanel/editorpanel/_common.mjs +1 -2
- package/dist/navigationpanel/editorpanel/styles.mjs +1 -2
- package/dist/navigationpanel/hooks.mjs +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +5 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +7 -9
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +1 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +3 -4
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +44 -38
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +1 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCaretRightFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +1 -2
- package/dist/overlays/Overlays.mjs +4 -5
- package/dist/overlays/element-details/ElementDetails.mjs +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +148 -102
- package/dist/overlays/element-details/ElementDetailsCard.mjs +503 -256
- package/dist/overlays/element-details/MetadataValue.mjs +115 -222
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelDeployments.mjs +5 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelRelationships.mjs +6 -7
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelStructure.mjs +3 -4
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +6 -7
- package/dist/overlays/element-details/actor.mjs +31 -15
- package/dist/overlays/element-details/actorContext.mjs +1 -2
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +1 -2
- package/dist/overlays/overlay/Overlay.d.mts +1 -3
- package/dist/overlays/overlay/Overlay.mjs +4 -5
- package/dist/overlays/overlaysActor.d.mts +12 -5
- package/dist/overlays/overlaysActor.mjs +24 -6
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +16 -8
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +1 -2
- package/dist/overlays/relationship-details/SelectEdge.mjs +3 -4
- package/dist/overlays/relationship-details/_types.d.mts +6 -4
- package/dist/overlays/relationship-details/actor.d.mts +0 -2
- package/dist/overlays/relationship-details/actor.mjs +2 -3
- package/dist/overlays/relationship-details/compute.mjs +1 -2
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +8 -13
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +8 -6
- package/dist/overlays/relationship-details/hooks.mjs +1 -2
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +3 -3
- package/dist/overlays/relationship-details/layout.d.mts +1 -3
- package/dist/overlays/relationship-details/layout.mjs +39 -13
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +12 -13
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +1 -2
- package/dist/overlays/relationships-browser/SelectElement.mjs +4 -5
- package/dist/overlays/relationships-browser/_types.d.mts +6 -4
- package/dist/overlays/relationships-browser/actor.d.mts +0 -2
- package/dist/overlays/relationships-browser/actor.mjs +4 -5
- package/dist/overlays/relationships-browser/const.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +14 -17
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +12 -7
- package/dist/overlays/relationships-browser/hooks.mjs +1 -2
- package/dist/overlays/relationships-browser/layout.d.mts +1 -3
- package/dist/overlays/relationships-browser/layout.mjs +73 -24
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +2 -2
- package/dist/overlays/types.d.mts +5 -7
- package/dist/projects-overview/ProjectsOverview.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverview.mjs +1 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverviewXY.mjs +3 -4
- package/dist/projects-overview/actor.mjs +1 -2
- package/dist/projects-overview/context.mjs +1 -2
- package/dist/projects-overview/custom/edgeTypes.mjs +2 -3
- package/dist/projects-overview/custom/nodeTypes.mjs +3 -4
- package/dist/projects-overview/hooks.mjs +1 -2
- package/dist/projects-overview/layouted-to-xyflow.mjs +1 -2
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +1 -2
- package/dist/projects-overview/persistence.mjs +1 -2
- package/dist/search/Search.d.mts +1 -3
- package/dist/search/Search.mjs +13 -12
- package/dist/search/SearchContext.d.mts +1 -3
- package/dist/search/SearchContext.mjs +1 -2
- package/dist/search/XStateSearchAdapter.mjs +1 -2
- package/dist/search/components/ElementsColumn.css.mjs +1 -2
- package/dist/search/components/ElementsColumn.mjs +31 -9
- package/dist/search/components/PickView.mjs +3 -4
- package/dist/search/components/SearchByTags.mjs +3 -4
- package/dist/search/components/SearchInput.mjs +3 -4
- package/dist/search/components/ViewsColum.mjs +20 -20
- package/dist/search/components/ViewsColumn.css.mjs +1 -2
- package/dist/search/components/_shared.css.mjs +1 -2
- package/dist/search/components/styles.css.mjs +1 -2
- package/dist/search/components/utils.mjs +32 -3
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +1 -2
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +1 -3
- package/dist/search/searchActor.mjs +1 -2
- package/dist/shadowroot/ShadowRoot.mjs +8 -7
- package/dist/styles-font2.mjs +1 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles2.mjs +2 -3
- package/dist/utils/defineActors.d.mts +1 -3
- package/dist/utils/defineActors.mjs +1 -2
- package/dist/utils/edge-corners.mjs +2 -3
- package/dist/utils/edge-endpoints.mjs +1 -2
- package/dist/utils/edge-label.mjs +1 -2
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +1 -2
- package/dist/utils/edge-tracks.mjs +1 -2
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +1 -2
- package/dist/utils/roundDpr.mjs +1 -2
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +1 -3
- package/dist/utils/view-bounds.mjs +1 -2
- package/dist/utils/view-routing.mjs +1 -2
- package/dist/utils/xyflow.mjs +2 -3
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +29 -26
- package/panda.buildinfo.json +211 -208
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/memoNode.mjs +0 -23
- package/dist/context/DiagramEventHandlers.d.mts +0 -11
- package/dist/custom/hooks.d.mts +0 -17
- package/dist/hooks/useSetState.d.mts +0 -10
- package/dist/likec4diagram/custom/edges/edges.css.mjs +0 -50
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.mjs +0 -69
- package/dist/navigationpanel/comparepanel/ComparePanelControls.mjs +0 -56
- package/dist/navigationpanel/styles.css.mjs +0 -23
- package/src/styles-font.css +0 -114
- package/src/styles-min.css +0 -2
- package/src/styles-xyflow.css +0 -1
- package/src/styles.css +0 -3
|
@@ -1,139 +1,209 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import
|
|
2
|
+
import IconInfoCircle from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs";
|
|
3
|
+
import { PortalToContainer } from "../../components/PortalToContainer.mjs";
|
|
4
|
+
import { useCallbackRef as useCallbackRef$1 } from "../../hooks/useCallbackRef.mjs";
|
|
3
5
|
import { useMantinePortalProps } from "../../hooks/useMantinePortalProps.mjs";
|
|
4
6
|
import { useDiagramCompareLayout } from "../../hooks/useDiagramCompareLayout.mjs";
|
|
7
|
+
import { stopPropagation } from "../../utils/xyflow.mjs";
|
|
5
8
|
import { Tooltip as Tooltip$1 } from "../_common.mjs";
|
|
6
|
-
import { ComparePanelControls } from "./ComparePanelControls.mjs";
|
|
7
9
|
import { DriftsSummary } from "./DriftsSummary.mjs";
|
|
8
|
-
import {
|
|
10
|
+
import { LayoutDriftFrame } from "./LayoutDriftFrame.mjs";
|
|
11
|
+
import { LayoutTypeSwitcher } from "./LayoutTypeSwitcher.mjs";
|
|
9
12
|
import { memo, useState } from "react";
|
|
10
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
import { useIsMounted } from "@react-hookz/web";
|
|
12
|
-
import { Button,
|
|
13
|
-
import { AnimatePresence } from "motion/react";
|
|
14
|
-
import {
|
|
15
|
+
import { ActionBar, Button, CloseButton } from "@mantine/core";
|
|
16
|
+
import { AnimatePresence, LayoutGroup } from "motion/react";
|
|
17
|
+
import { useDisclosure } from "@mantine/hooks";
|
|
18
|
+
import { Box as Box$1, Txt } from "@likec4/styles/jsx";
|
|
15
19
|
import { hstack, vstack } from "@likec4/styles/patterns";
|
|
16
20
|
import * as m$1 from "motion/react-m";
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
// src/navigationpanel/comparepanel/ComparePanel.tsx
|
|
19
23
|
const variants = {
|
|
20
24
|
initial: {
|
|
21
25
|
opacity: 0,
|
|
22
|
-
|
|
26
|
+
translateY: -4
|
|
23
27
|
},
|
|
24
28
|
animate: {
|
|
25
|
-
opacity:
|
|
26
|
-
|
|
29
|
+
opacity: [
|
|
30
|
+
.8,
|
|
31
|
+
.9,
|
|
32
|
+
1
|
|
33
|
+
],
|
|
34
|
+
translateY: 0
|
|
27
35
|
},
|
|
28
36
|
exit: {
|
|
29
37
|
opacity: 0,
|
|
30
|
-
|
|
38
|
+
translateY: -20,
|
|
39
|
+
transition: {
|
|
40
|
+
duration: .2,
|
|
41
|
+
ease: [
|
|
42
|
+
.23,
|
|
43
|
+
1,
|
|
44
|
+
.32,
|
|
45
|
+
1
|
|
46
|
+
]
|
|
47
|
+
}
|
|
31
48
|
}
|
|
32
49
|
};
|
|
33
50
|
const ComparePanel = memo(() => {
|
|
51
|
+
const [driftsOpened, driftsPanel] = useDisclosure(true);
|
|
34
52
|
const portalProps = useMantinePortalProps();
|
|
35
|
-
const isMounted = useIsMounted();
|
|
36
53
|
const [ctx, ops] = useDiagramCompareLayout();
|
|
54
|
+
const isMounted = useIsMounted();
|
|
37
55
|
const [isProcessing, setIsProcessing] = useState(false);
|
|
38
56
|
const resetProcessing = () => {
|
|
39
57
|
setTimeout(() => {
|
|
40
58
|
if (isMounted()) setIsProcessing(false);
|
|
41
59
|
}, 500);
|
|
42
60
|
};
|
|
43
|
-
const onApplyLatest = useCallbackRef((e) => {
|
|
61
|
+
const onApplyLatest = useCallbackRef$1((e) => {
|
|
44
62
|
if (!ctx.canApplyLatest || ctx.layout === "auto") {
|
|
45
63
|
window.alert("Cannot apply changes from latest version when using auto layout. Please switch to manual layout first.");
|
|
46
64
|
return;
|
|
47
65
|
}
|
|
48
66
|
e.stopPropagation();
|
|
49
|
-
setIsProcessing(
|
|
67
|
+
setIsProcessing("sync");
|
|
50
68
|
setTimeout(() => {
|
|
51
69
|
ops.applyLatestToManual();
|
|
52
70
|
resetProcessing();
|
|
53
|
-
},
|
|
71
|
+
}, 100);
|
|
54
72
|
});
|
|
55
|
-
const onResetManualLayout = useCallbackRef((e) => {
|
|
73
|
+
const onResetManualLayout = useCallbackRef$1((e) => {
|
|
56
74
|
e.stopPropagation();
|
|
57
|
-
setIsProcessing(
|
|
75
|
+
setIsProcessing("reset");
|
|
58
76
|
setTimeout(() => {
|
|
59
77
|
ops.resetManualLayout();
|
|
60
78
|
resetProcessing();
|
|
61
|
-
},
|
|
79
|
+
}, 100);
|
|
62
80
|
});
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
81
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(PortalToContainer, { children: [/* @__PURE__ */ jsxs(ActionBar, {
|
|
82
|
+
opened: true,
|
|
83
|
+
withinPortal: false,
|
|
84
|
+
onClose: ops.toggleCompare,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
87
|
+
variant: "default",
|
|
88
|
+
size: "compact-xs",
|
|
89
|
+
onClick: () => {
|
|
90
|
+
driftsPanel.toggle();
|
|
91
|
+
},
|
|
92
|
+
children: [driftsOpened ? "Hide" : "Show", " drifts"]
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx(ActionBar.Divider, {}),
|
|
95
|
+
/* @__PURE__ */ jsx(LayoutTypeSwitcher, {
|
|
96
|
+
value: ctx.layout,
|
|
97
|
+
onChange: ops.switchLayout
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ jsx(ActionBar.Divider, {}),
|
|
100
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
101
|
+
loading: isProcessing === "sync",
|
|
102
|
+
disabled: !ctx.canApplyLatest || ctx.layout === "auto" || isProcessing === "reset",
|
|
103
|
+
onClick: onApplyLatest,
|
|
104
|
+
size: "compact-xs",
|
|
105
|
+
rightSection: /* @__PURE__ */ jsx(Tooltip$1, {
|
|
106
|
+
onClick: stopPropagation,
|
|
107
|
+
position: "right-start",
|
|
108
|
+
...portalProps,
|
|
109
|
+
label: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
110
|
+
"Applies changes from the latest auto-layouted",
|
|
111
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
112
|
+
"to saved snapshot, preserving (as possible)",
|
|
113
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
114
|
+
"manual adjustments.",
|
|
115
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
116
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
117
|
+
"You can undo this action."
|
|
118
|
+
] }),
|
|
119
|
+
children: /* @__PURE__ */ jsx(IconInfoCircle, {
|
|
120
|
+
size: 14,
|
|
121
|
+
stroke: 1.7,
|
|
122
|
+
opacity: .5
|
|
123
|
+
})
|
|
124
|
+
}),
|
|
125
|
+
children: ["Sync with latest", !ctx.canApplyLatest && /* @__PURE__ */ jsx(Box$1, {
|
|
126
|
+
textStyle: "xs",
|
|
127
|
+
children: "view type is changed"
|
|
128
|
+
})]
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ jsx(Button, {
|
|
131
|
+
loading: isProcessing === "reset",
|
|
132
|
+
disabled: isProcessing === "sync",
|
|
133
|
+
variant: "default",
|
|
134
|
+
size: "compact-xs",
|
|
135
|
+
onClick: onResetManualLayout,
|
|
136
|
+
children: "Reset manual"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx(ActionBar.CloseButton, {})
|
|
139
|
+
]
|
|
140
|
+
}), /* @__PURE__ */ jsx(LayoutDriftFrame, {
|
|
141
|
+
layout: ctx.layout,
|
|
142
|
+
onClose: ops.toggleCompare
|
|
143
|
+
})] }), /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
144
|
+
mode: "popLayout",
|
|
145
|
+
children: driftsOpened && /* @__PURE__ */ jsxs(m$1.div, {
|
|
146
|
+
variants,
|
|
147
|
+
initial: "initial",
|
|
148
|
+
animate: "animate",
|
|
149
|
+
exit: "exit",
|
|
99
150
|
layout: "position",
|
|
100
|
-
className:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
151
|
+
className: vstack({
|
|
152
|
+
layerStyle: "likec4.panel",
|
|
153
|
+
position: "relative",
|
|
154
|
+
px: "0",
|
|
155
|
+
py: "0",
|
|
156
|
+
pointerEvents: "all",
|
|
157
|
+
height: "auto",
|
|
158
|
+
overflow: "hidden",
|
|
159
|
+
maxHeight: "[calc(100cqh - 180px)]",
|
|
160
|
+
"@/md": { minWidth: "[200px]" },
|
|
161
|
+
maxWidth: {
|
|
162
|
+
base: "[200px]",
|
|
163
|
+
"@/sm": "[250px]",
|
|
164
|
+
"@/md": "[300px]"
|
|
165
|
+
}
|
|
166
|
+
}),
|
|
167
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
168
|
+
className: hstack({
|
|
169
|
+
gap: "2",
|
|
170
|
+
pl: "3",
|
|
171
|
+
pr: "2",
|
|
172
|
+
mt: "2"
|
|
173
|
+
}),
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx(Txt, {
|
|
176
|
+
medium: true,
|
|
177
|
+
size: "sm",
|
|
178
|
+
flex: "1",
|
|
179
|
+
children: "Layout drifts"
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
182
|
+
variant: "default",
|
|
183
|
+
size: "compact-xs",
|
|
184
|
+
fz: "xxs",
|
|
185
|
+
style: {
|
|
186
|
+
flex: 0,
|
|
187
|
+
minWidth: 100
|
|
188
|
+
},
|
|
189
|
+
onClick: (e) => {
|
|
190
|
+
e.stopPropagation();
|
|
191
|
+
ops.switchLayout(ctx.layout === "auto" ? "manual" : "auto");
|
|
192
|
+
},
|
|
193
|
+
children: ["Switch to ", ctx.layout === "auto" ? "manual" : "latest"]
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ jsx(CloseButton, {
|
|
196
|
+
size: "xs",
|
|
197
|
+
onClick: (e) => {
|
|
198
|
+
e.stopPropagation();
|
|
199
|
+
driftsPanel.close();
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
}), /* @__PURE__ */ jsx(DriftsSummary, {})]
|
|
204
|
+
}, "ListOfDrifts")
|
|
205
|
+
}) })] });
|
|
135
206
|
});
|
|
136
207
|
ComparePanel.displayName = "ComparePanel";
|
|
137
208
|
|
|
138
|
-
//#endregion
|
|
139
209
|
export { ComparePanel };
|
|
@@ -1,56 +1,63 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import
|
|
2
|
+
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs";
|
|
3
3
|
import { selectDiagramContext, useDiagram, useDiagramSelector } from "../../hooks/safeContext.mjs";
|
|
4
|
+
import { useCallbackRef as useCallbackRef$1 } from "../../hooks/useCallbackRef.mjs";
|
|
5
|
+
import { css } from "@likec4/styles/css";
|
|
4
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
import { deepEqual } from "fast-equals";
|
|
6
|
-
import { filter, hasAtLeast, map, pipe } from "remeda";
|
|
7
|
-
import {
|
|
8
|
+
import { difference, filter, hasAtLeast, map, pipe } from "remeda";
|
|
9
|
+
import { nonNullable, sortNaturalByFqn } from "@likec4/core/utils";
|
|
8
10
|
import { useDebouncedCallback } from "@mantine/hooks";
|
|
9
|
-
import { Txt, styled } from "@likec4/styles/jsx";
|
|
10
|
-
import { vstack } from "@likec4/styles/patterns";
|
|
11
|
+
import { HStack, Txt, styled } from "@likec4/styles/jsx";
|
|
12
|
+
import { hstack, vstack } from "@likec4/styles/patterns";
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
// src/navigationpanel/comparepanel/DriftsSummary.tsx
|
|
13
15
|
const hasDrifts = (item) => {
|
|
14
16
|
return !!item.drifts && hasAtLeast(item.drifts, 1);
|
|
15
17
|
};
|
|
18
|
+
const edgeEndpoint = (view, nodeId) => {
|
|
19
|
+
const nd = nonNullable(view.nodes.find((n) => n.id === nodeId), `Edge endpoint "${nodeId}" not found`);
|
|
20
|
+
return {
|
|
21
|
+
id: nd.id,
|
|
22
|
+
title: nd.title
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const filterViewDrifts = (drifts, layout = "auto") => {
|
|
26
|
+
const sharedDrifts = ["edges-drift", "nodes-drift"];
|
|
27
|
+
if (layout === "manual") return difference(drifts, [
|
|
28
|
+
...sharedDrifts,
|
|
29
|
+
"edges-removed",
|
|
30
|
+
"nodes-removed"
|
|
31
|
+
]);
|
|
32
|
+
return difference(drifts, [
|
|
33
|
+
...sharedDrifts,
|
|
34
|
+
"edges-added",
|
|
35
|
+
"nodes-added"
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
16
38
|
const selectDrifts = selectDiagramContext((ctx) => ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
layout: ctx.view._layout ?? "auto",
|
|
40
|
+
view: filterViewDrifts(ctx.view.drifts ?? [], ctx.view._layout),
|
|
41
|
+
nodes: pipe(ctx.view.nodes, filter(hasDrifts), map((n) => ({
|
|
42
|
+
id: n.id,
|
|
43
|
+
title: n.title,
|
|
44
|
+
drifts: n.drifts
|
|
45
|
+
})), sortNaturalByFqn()),
|
|
46
|
+
edges: pipe(ctx.view.edges, filter(hasDrifts), map((e) => ({
|
|
47
|
+
id: e.id,
|
|
48
|
+
label: e.label,
|
|
49
|
+
source: edgeEndpoint(ctx.view, e.source),
|
|
50
|
+
target: edgeEndpoint(ctx.view, e.target),
|
|
51
|
+
drifts: e.drifts
|
|
52
|
+
})))
|
|
27
53
|
}), deepEqual);
|
|
28
|
-
const variants = {
|
|
29
|
-
initial: {
|
|
30
|
-
opacity: 0,
|
|
31
|
-
translateY: -8
|
|
32
|
-
},
|
|
33
|
-
animate: {
|
|
34
|
-
opacity: 1,
|
|
35
|
-
translateY: 0,
|
|
36
|
-
transition: { delayChildren: stagger(.1) }
|
|
37
|
-
},
|
|
38
|
-
exit: {
|
|
39
|
-
opacity: 0,
|
|
40
|
-
translateY: -8,
|
|
41
|
-
transition: { delayChildren: stagger(.2, {
|
|
42
|
-
startDelay: .5,
|
|
43
|
-
from: "last"
|
|
44
|
-
}) }
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
54
|
function DriftsSummary() {
|
|
48
55
|
const selected = useDiagramSelector(selectDrifts);
|
|
49
56
|
const diagram = useDiagram();
|
|
50
57
|
const onMouseLeaveDebounced = useDebouncedCallback((e) => {
|
|
51
58
|
e.stopPropagation();
|
|
52
59
|
diagram.unhighlightAll();
|
|
53
|
-
},
|
|
60
|
+
}, 250);
|
|
54
61
|
const handlers = {
|
|
55
62
|
onMouseEnter: useCallbackRef$1((e) => {
|
|
56
63
|
const target = e.currentTarget.getAttribute("data-drift-type");
|
|
@@ -85,61 +92,39 @@ function DriftsSummary() {
|
|
|
85
92
|
})
|
|
86
93
|
};
|
|
87
94
|
const { view, nodes, edges } = selected;
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
animate: "animate",
|
|
94
|
-
exit: "exit",
|
|
95
|
-
layoutDependency: selected,
|
|
95
|
+
const hasViewDrifts = hasAtLeast(view, 1);
|
|
96
|
+
const hasNodeDrifts = hasAtLeast(nodes, 1);
|
|
97
|
+
const hasEdgeDrifts = hasAtLeast(edges, 1);
|
|
98
|
+
if (!(hasViewDrifts || hasNodeDrifts || hasEdgeDrifts)) return null;
|
|
99
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
96
100
|
className: vstack({
|
|
97
|
-
mx: "[calc({spacing.2} * -1)]",
|
|
98
|
-
px: "2",
|
|
99
101
|
flex: "1",
|
|
100
102
|
height: "100%",
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
gap: "0",
|
|
104
|
+
overflow: "scroll"
|
|
103
105
|
}),
|
|
104
106
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
className: vstack({
|
|
123
|
-
mt: "2",
|
|
124
|
-
gap: "2"
|
|
125
|
-
}),
|
|
126
|
-
children: map(edges, (edge) => /* @__PURE__ */ jsx(EdgeDrifts, {
|
|
127
|
-
...edge,
|
|
128
|
-
...handlers
|
|
129
|
-
}, edge.edgeId))
|
|
130
|
-
})]
|
|
131
|
-
}, `edges-drifts`)
|
|
107
|
+
hasViewDrifts && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SectionHeader, { children: "View:" }, "view-drifts-header"), /* @__PURE__ */ jsx(HStack, {
|
|
108
|
+
flexWrap: "wrap",
|
|
109
|
+
my: "3",
|
|
110
|
+
pl: "3",
|
|
111
|
+
children: map(view, (drift) => /* @__PURE__ */ jsx(DriftKind, {
|
|
112
|
+
variant: driftVariant(drift),
|
|
113
|
+
children: drift
|
|
114
|
+
}, `view-${drift}`))
|
|
115
|
+
}, "view-drifts")] }),
|
|
116
|
+
hasNodeDrifts && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SectionHeader, { children: "Elements" }, "nodes-section"), map(nodes, (node) => /* @__PURE__ */ jsx(NodeDrifts, {
|
|
117
|
+
node,
|
|
118
|
+
...handlers
|
|
119
|
+
}, node.id))] }),
|
|
120
|
+
hasEdgeDrifts && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SectionHeader, { children: "Relationships" }, "edges-section"), map(edges, (edge) => /* @__PURE__ */ jsx(EdgeDrifts, {
|
|
121
|
+
edge,
|
|
122
|
+
...handlers
|
|
123
|
+
}, edge.id))] })
|
|
132
124
|
]
|
|
133
|
-
}
|
|
125
|
+
});
|
|
134
126
|
}
|
|
135
|
-
function
|
|
136
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(m.div, {
|
|
137
|
-
layout: "position",
|
|
138
|
-
className: vstack({ gap: "2" }),
|
|
139
|
-
children: [/* @__PURE__ */ jsx(SectionHeader, { children: "View drifts (summary):" }), /* @__PURE__ */ jsx(DriftsGroup, { children: map(drifts, (drift) => /* @__PURE__ */ jsx(DriftLabel, { children: drift }, drift)) }, `view-drifts`)]
|
|
140
|
-
}, `view-drifts-header`) });
|
|
141
|
-
}
|
|
142
|
-
function NodeDrifts({ id, name, drifts, ...handlers }) {
|
|
127
|
+
function NodeDrifts({ node: { id, title, drifts }, ...handlers }) {
|
|
143
128
|
const key = `node-drifts-${id}`;
|
|
144
129
|
return /* @__PURE__ */ jsxs(DriftsGroup, {
|
|
145
130
|
"data-drift-type": "node",
|
|
@@ -147,76 +132,122 @@ function NodeDrifts({ id, name, drifts, ...handlers }) {
|
|
|
147
132
|
...handlers,
|
|
148
133
|
children: [/* @__PURE__ */ jsx(Txt, {
|
|
149
134
|
truncate: true,
|
|
150
|
-
|
|
151
|
-
css: { maxWidth: {
|
|
152
|
-
base: "[160px]",
|
|
153
|
-
"@/sm": "[180px]",
|
|
154
|
-
"@/md": "[250px]"
|
|
155
|
-
} },
|
|
156
|
-
color: "likec4.compare.outline",
|
|
135
|
+
css: { flex: "auto" },
|
|
157
136
|
fontSize: "xs",
|
|
158
137
|
lineHeight: "sm",
|
|
159
|
-
children:
|
|
160
|
-
}), map(drifts, (drift
|
|
138
|
+
children: title
|
|
139
|
+
}), map(drifts, (drift) => /* @__PURE__ */ jsx(DriftKind, {
|
|
140
|
+
variant: driftVariant(drift),
|
|
141
|
+
children: drift
|
|
142
|
+
}, key + drift))]
|
|
161
143
|
}, key);
|
|
162
144
|
}
|
|
163
|
-
function EdgeDrifts({
|
|
164
|
-
const key = `edge-drifts-${
|
|
165
|
-
return /* @__PURE__ */
|
|
145
|
+
function EdgeDrifts({ edge: { id, source, target, drifts }, ...handlers }) {
|
|
146
|
+
const key = `edge-drifts-${id}`;
|
|
147
|
+
return /* @__PURE__ */ jsxs(DriftsGroup, {
|
|
166
148
|
"data-drift-type": "edge",
|
|
167
|
-
"data-drift-id":
|
|
149
|
+
"data-drift-id": id,
|
|
168
150
|
...handlers,
|
|
169
|
-
children:
|
|
151
|
+
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
152
|
+
css: {
|
|
153
|
+
gap: "0.5",
|
|
154
|
+
flex: "auto",
|
|
155
|
+
justifyContent: "stretch",
|
|
156
|
+
flexWrap: "nowrap"
|
|
157
|
+
},
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ jsx(Txt, {
|
|
160
|
+
size: "xs",
|
|
161
|
+
lh: "sm",
|
|
162
|
+
truncate: true,
|
|
163
|
+
children: source.title
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ jsx(IconChevronRight, {
|
|
166
|
+
size: 12,
|
|
167
|
+
className: css({ color: "text.dimmed" })
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx(Txt, {
|
|
170
|
+
size: "xs",
|
|
171
|
+
lh: "sm",
|
|
172
|
+
truncate: true,
|
|
173
|
+
children: target.title
|
|
174
|
+
})
|
|
175
|
+
]
|
|
176
|
+
}), map(drifts, (drift) => /* @__PURE__ */ jsx(DriftKind, {
|
|
177
|
+
variant: driftVariant(drift),
|
|
178
|
+
children: drift
|
|
179
|
+
}, key + drift))]
|
|
170
180
|
}, key);
|
|
171
181
|
}
|
|
172
|
-
const DriftsGroup = styled(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
const DriftsGroup = styled("div", { base: hstack.raw({
|
|
183
|
+
width: "full",
|
|
184
|
+
flex: "1",
|
|
185
|
+
gap: "2",
|
|
186
|
+
rowGap: "2",
|
|
187
|
+
pl: "3",
|
|
188
|
+
pr: "2",
|
|
189
|
+
pt: "2",
|
|
190
|
+
pb: "3",
|
|
176
191
|
cursor: "default",
|
|
177
|
-
|
|
178
|
-
backgroundColor: "
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
_hover: {
|
|
183
|
-
backgroundColor: "likec4.compare.manual/20",
|
|
184
|
-
borderColor: "likec4.compare.outline/25"
|
|
185
|
-
}
|
|
186
|
-
}) }, { defaultProps: {
|
|
187
|
-
className: "group",
|
|
188
|
-
variants,
|
|
189
|
-
layout: true,
|
|
190
|
-
initial: "initial",
|
|
191
|
-
animate: "animate",
|
|
192
|
-
exit: "exit"
|
|
193
|
-
} });
|
|
194
|
-
const SectionHeader = styled(m.div, { base: {
|
|
192
|
+
flexWrap: "wrap",
|
|
193
|
+
_hover: { backgroundColor: "surface.hover" },
|
|
194
|
+
"& + &": { borderTop: "none" }
|
|
195
|
+
}) }, { defaultProps: { className: "group" } });
|
|
196
|
+
const SectionHeader = styled("div", { base: {
|
|
195
197
|
userSelect: "none",
|
|
196
198
|
fontWeight: "medium",
|
|
197
|
-
textStyle: "
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
animate: "animate",
|
|
204
|
-
exit: "exit"
|
|
199
|
+
textStyle: "fieldLabel",
|
|
200
|
+
color: "text.dimmed",
|
|
201
|
+
backgroundColor: "surface.sunken",
|
|
202
|
+
pl: "3",
|
|
203
|
+
py: "1",
|
|
204
|
+
borderTop: "subtle"
|
|
205
205
|
} });
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
function driftVariant(drift) {
|
|
207
|
+
switch (drift) {
|
|
208
|
+
case "edges-removed":
|
|
209
|
+
case "nodes-removed":
|
|
210
|
+
case "removed": return "removed";
|
|
211
|
+
case "added":
|
|
212
|
+
case "nodes-added":
|
|
213
|
+
case "edges-added": return "added";
|
|
214
|
+
default: return "modified";
|
|
212
215
|
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
}
|
|
217
|
+
const DriftKind = styled("div", {
|
|
218
|
+
base: {
|
|
219
|
+
flexGrow: 0,
|
|
220
|
+
flexShrink: 0,
|
|
221
|
+
flex: "auto",
|
|
222
|
+
display: "block",
|
|
223
|
+
fontSize: "[8px]",
|
|
224
|
+
fontFamily: "mono",
|
|
225
|
+
fontWeight: "medium",
|
|
226
|
+
px: "1",
|
|
227
|
+
rounded: "xs",
|
|
228
|
+
border: "subtle"
|
|
229
|
+
},
|
|
230
|
+
variants: { variant: {
|
|
231
|
+
removed: {
|
|
232
|
+
color: "likec4.diff.removed",
|
|
233
|
+
backgroundColor: "likec4.diff.removed/5",
|
|
234
|
+
borderColor: "likec4.diff.removed/40",
|
|
235
|
+
_groupHover: { backgroundColor: "likec4.diff.removed/10" }
|
|
236
|
+
},
|
|
237
|
+
added: {
|
|
238
|
+
color: "likec4.diff.added",
|
|
239
|
+
backgroundColor: "likec4.diff.added/5",
|
|
240
|
+
borderColor: "likec4.diff.added/40",
|
|
241
|
+
_groupHover: { backgroundColor: "likec4.diff.added/15" }
|
|
242
|
+
},
|
|
243
|
+
modified: {
|
|
244
|
+
color: "likec4.diff.modified",
|
|
245
|
+
backgroundColor: "likec4.diff.modified/5",
|
|
246
|
+
borderColor: "likec4.diff.modified/40",
|
|
247
|
+
_groupHover: { backgroundColor: "likec4.diff.modified/15" }
|
|
248
|
+
}
|
|
249
|
+
} },
|
|
250
|
+
defaultVariants: { variant: "modified" }
|
|
251
|
+
});
|
|
220
252
|
|
|
221
|
-
//#endregion
|
|
222
253
|
export { DriftsSummary };
|