@likec4/diagram 1.44.0 → 1.46.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/bundle/index.js +18847 -17876
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +15 -12
- package/dist/LikeC4Diagram.props.d.ts +13 -20
- package/dist/LikeC4ProjectsProvider.js +8 -4
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +3 -3
- package/dist/LikeC4View.js +8 -8
- package/dist/ReactLikeC4.d.ts +3 -6
- package/dist/StaticLikeC4Diagram.js +0 -2
- package/dist/base/Base.d.ts +1 -1
- package/dist/base/updateEdges.js +25 -15
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -18
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- package/dist/base-primitives/NodeHandles.d.ts +2 -1
- package/dist/base-primitives/NodeHandles.js +22 -18
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +6 -4
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -2
- package/dist/base-primitives/edge/EdgeLabel.js +16 -16
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
- package/dist/base-primitives/edge/EdgePath.js +27 -12
- package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
- package/dist/base-primitives/element/ElementActionButtons.js +3 -3
- package/dist/base-primitives/element/ElementData.d.ts +3 -3
- package/dist/base-primitives/element/ElementData.js +13 -7
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
- package/dist/base-primitives/element/ElementDetailsButton.js +4 -1
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +0 -1
- package/dist/context/DiagramFeatures.d.ts +2 -1
- package/dist/context/DiagramFeatures.js +1 -0
- package/dist/context/EnsureMantine.js +2 -1
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/TagStylesContext.js +1 -1
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.js +1 -1
- package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
- package/dist/editor/LikeC4EditorProvider.js +12 -0
- package/dist/editor/__tests__/fixture.d.ts +205 -0
- package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
- package/dist/editor/applyChangesToManualLayout.js +182 -0
- package/dist/editor/editorActor.actions.d.ts +201 -0
- package/dist/editor/editorActor.actions.js +149 -0
- package/dist/editor/editorActor.d.ts +653 -0
- package/dist/editor/editorActor.js +324 -0
- package/dist/editor/hotkeyActor.d.ts +7 -0
- package/dist/editor/hotkeyActor.js +19 -0
- package/dist/editor/index.d.ts +3 -2
- package/dist/editor/useEditorActorLogic.d.ts +565 -0
- package/dist/editor/useEditorActorLogic.js +54 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/safeContext.d.ts +3 -2
- package/dist/hooks/safeContext.js +7 -4
- package/dist/hooks/useDiagram.d.ts +4 -2
- package/dist/hooks/useDiagram.js +19 -8
- package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
- package/dist/hooks/useDiagramCompareLayout.js +29 -4
- package/dist/hooks/useLikeC4Project.d.ts +6 -1
- package/dist/hooks/useLikeC4Project.js +14 -2
- package/dist/hooks/useMediaPrint.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/likec4diagram/DiagramXYFlow.js +11 -7
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +34 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +90 -54
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +3 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
- package/dist/likec4diagram/custom/edges/useControlPoints.js +5 -5
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +5 -5
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/{ElementNodeDrifts.js → NodeDrifts.js} +12 -13
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.js +61 -23
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +128 -15
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +63 -72
- package/dist/likec4diagram/state/assign.d.ts +14 -7
- package/dist/likec4diagram/state/assign.js +28 -200
- package/dist/likec4diagram/state/createViewChange.js +23 -30
- package/dist/likec4diagram/state/diagram-api.d.ts +20 -6
- package/dist/likec4diagram/state/diagram-api.js +58 -52
- package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -8
- package/dist/likec4diagram/state/hotkeyActor.js +13 -17
- package/dist/likec4diagram/state/machine.actions.d.ts +1127 -864
- package/dist/likec4diagram/state/machine.actions.js +316 -296
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +641 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +141 -0
- package/dist/likec4diagram/state/machine.d.ts +18 -3712
- package/dist/likec4diagram/state/machine.js +64 -73
- package/dist/likec4diagram/state/machine.setup.d.ts +80 -26
- package/dist/likec4diagram/state/machine.setup.js +44 -7
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +58 -17
- package/dist/likec4diagram/state/machine.state.initializing.js +14 -14
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +5 -108
- package/dist/likec4diagram/state/machine.state.navigating.js +187 -35
- package/dist/likec4diagram/state/machine.state.ready.d.ts +2997 -2598
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +710 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +98 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +540 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +105 -0
- package/dist/likec4diagram/state/machine.state.ready.js +95 -347
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +140 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +684 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +190 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/types.d.ts +11 -9
- package/dist/likec4diagram/state/utils.d.ts +44 -5
- package/dist/likec4diagram/state/utils.js +62 -6
- package/dist/likec4diagram/types.d.ts +8 -13
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.js +104 -103
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +12 -15
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +11 -10
- package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
- package/dist/navigationpanel/_common.js +1 -1
- package/dist/navigationpanel/actor.d.ts +4 -204
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
- package/dist/navigationpanel/controls/DetailsControls.js +2 -2
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.js +2 -2
- package/dist/navigationpanel/controls/ToggleReadonly.js +32 -19
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +9 -9
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +4 -3
- package/dist/overlays/Overlays.js +24 -12
- package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- package/dist/overlays/element-details/MetadataValue.js +4 -6
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +8 -83
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -392
- package/dist/overlays/overlaysActor.js +73 -49
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/_types.d.ts +3 -4
- package/dist/overlays/relationship-details/actor.d.ts +6 -562
- package/dist/overlays/relationship-details/actor.js +1 -0
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/layout-to-xyflow.js +3 -5
- package/dist/overlays/relationship-details/layout.d.ts +3 -3
- package/dist/overlays/relationship-details/layout.js +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/_types.d.ts +2 -3
- package/dist/overlays/relationships-browser/actor.d.ts +7 -739
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/layout.d.ts +2 -2
- package/dist/overlays/relationships-browser/layout.js +3 -3
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
- package/dist/overlays/types.d.ts +12 -13
- package/dist/search/components/ElementsColumn.js +7 -3
- package/dist/search/components/PickView.js +3 -1
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -1
- package/dist/search/components/ViewsColum.js +13 -7
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/searchActor.d.ts +3 -66
- package/dist/shadowroot/ShadowRoot.d.ts +5 -7
- package/dist/shadowroot/ShadowRoot.js +7 -5
- package/dist/shadowroot/styles.css.js +6 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/view-bounds.js +7 -6
- package/dist/utils/xyflow.d.ts +6 -5
- package/dist/utils/xyflow.js +26 -57
- package/package.json +24 -23
- package/panda.buildinfo.json +65 -71
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/edge/edge.css.d.ts +0 -4
- package/dist/base-primitives/edge/edge.css.js +0 -71
- package/dist/editor/LikeC4EditorContext.d.ts +0 -21
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +0 -4
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -280
- package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -248
- package/dist/utils/vector.d.ts +0 -81
- package/dist/utils/vector.js +0 -120
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { ButtonProps } from '@mantine/core';
|
|
2
|
-
import { ForwardRefExoticComponent, ReactEventHandler,
|
|
2
|
+
import { ForwardRefExoticComponent, ReactEventHandler, AriaRole, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, FormEventHandler, InputEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, ToggleEventHandler, TransitionEventHandler, Key, Ref, RefAttributes } from 'react';
|
|
3
3
|
import { MotionProps } from 'motion/react';
|
|
4
4
|
export declare const TriggerWalkthroughButton: ForwardRefExoticComponent<Omit<ButtonProps & {
|
|
5
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
6
5
|
id?: string | undefined;
|
|
7
|
-
|
|
8
|
-
value?: string | number | readonly string[] | undefined;
|
|
6
|
+
type?: "button" | "reset" | "submit" | undefined;
|
|
9
7
|
form?: string | undefined;
|
|
10
8
|
hidden?: boolean | undefined;
|
|
11
9
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
12
10
|
className?: string | undefined;
|
|
13
11
|
title?: string | undefined;
|
|
14
12
|
color?: string | undefined;
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
onError?: ReactEventHandler<HTMLButtonElement> | undefined;
|
|
14
|
+
value?: string | number | readonly string[] | undefined;
|
|
17
15
|
role?: AriaRole | undefined;
|
|
18
16
|
"aria-label"?: string | undefined;
|
|
19
17
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -36,6 +34,7 @@ export declare const TriggerWalkthroughButton: ForwardRefExoticComponent<Omit<Bu
|
|
|
36
34
|
onFocusCapture?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
37
35
|
onBlur?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
38
36
|
onBlurCapture?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
37
|
+
onChange?: FormEventHandler<HTMLButtonElement> | undefined;
|
|
39
38
|
onChangeCapture?: FormEventHandler<HTMLButtonElement> | undefined;
|
|
40
39
|
onBeforeInput?: InputEventHandler<HTMLButtonElement> | undefined;
|
|
41
40
|
onBeforeInputCapture?: FormEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -186,10 +185,11 @@ export declare const TriggerWalkthroughButton: ForwardRefExoticComponent<Omit<Bu
|
|
|
186
185
|
suppressContentEditableWarning?: boolean | undefined;
|
|
187
186
|
suppressHydrationWarning?: boolean | undefined;
|
|
188
187
|
accessKey?: string | undefined;
|
|
189
|
-
autoCapitalize?: "
|
|
188
|
+
autoCapitalize?: "none" | (string & {}) | "on" | "off" | "sentences" | "words" | "characters" | undefined;
|
|
190
189
|
autoFocus?: boolean | undefined;
|
|
191
190
|
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
192
191
|
contextMenu?: string | undefined;
|
|
192
|
+
dir?: string | undefined;
|
|
193
193
|
enterKeyHint?: "search" | "done" | "send" | "next" | "previous" | "enter" | "go" | undefined;
|
|
194
194
|
lang?: string | undefined;
|
|
195
195
|
nonce?: string | undefined;
|
|
@@ -239,7 +239,7 @@ export declare const TriggerWalkthroughButton: ForwardRefExoticComponent<Omit<Bu
|
|
|
239
239
|
"aria-colindextext"?: string | undefined;
|
|
240
240
|
"aria-colspan"?: number | undefined;
|
|
241
241
|
"aria-controls"?: string | undefined;
|
|
242
|
-
"aria-current"?: boolean | "
|
|
242
|
+
"aria-current"?: boolean | "page" | "step" | "location" | "date" | "time" | "true" | "false" | undefined;
|
|
243
243
|
"aria-describedby"?: string | undefined;
|
|
244
244
|
"aria-description"?: string | undefined;
|
|
245
245
|
"aria-details"?: string | undefined;
|
|
@@ -274,7 +274,7 @@ export declare const TriggerWalkthroughButton: ForwardRefExoticComponent<Omit<Bu
|
|
|
274
274
|
"aria-rowspan"?: number | undefined;
|
|
275
275
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
276
276
|
"aria-setsize"?: number | undefined;
|
|
277
|
-
"aria-sort"?: "none" | "
|
|
277
|
+
"aria-sort"?: "none" | "other" | "ascending" | "descending" | undefined;
|
|
278
278
|
"aria-valuemax"?: number | undefined;
|
|
279
279
|
"aria-valuemin"?: number | undefined;
|
|
280
280
|
"aria-valuenow"?: number | undefined;
|
|
@@ -10,7 +10,7 @@ import { useDiagramContext } from '../../hooks/useDiagram.js';
|
|
|
10
10
|
import { Tooltip } from '../_common.js';
|
|
11
11
|
import { useNavigationActor } from '../hooks.js';
|
|
12
12
|
import { useDiagram } from '../../hooks/safeContext.js';
|
|
13
|
-
import IconPlayerPlayFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
13
|
+
import IconPlayerPlayFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js';
|
|
14
14
|
|
|
15
15
|
const TriggerWalkthroughButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
16
16
|
Button,
|
|
@@ -27,12 +27,13 @@ function selectWalkthroughNotes(s) {
|
|
|
27
27
|
isParallel: isActive && isTruthy(s.activeWalkthrough?.parallelPrefix),
|
|
28
28
|
hasNext: isActive && activeStepIndex < s.xyedges.length - 1,
|
|
29
29
|
hasPrevious: isActive && activeStepIndex > 0,
|
|
30
|
-
notes: isActive ? s.xyedges[activeStepIndex]?.data?.notes ??
|
|
30
|
+
notes: isActive ? s.xyedges[activeStepIndex]?.data?.notes ?? null : null
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
const WalkthroughPanel = memo(() => {
|
|
34
|
-
const { isActive, notes } = useDiagramContext(selectWalkthroughNotes);
|
|
35
|
-
|
|
34
|
+
const { isActive, notes: _notes } = useDiagramContext(selectWalkthroughNotes);
|
|
35
|
+
const notes = _notes ? RichText.from(_notes) : RichText.EMPTY;
|
|
36
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: isActive && !notes.isEmpty && /* @__PURE__ */ jsx(
|
|
36
37
|
m.div,
|
|
37
38
|
{
|
|
38
39
|
layout: "position",
|
|
@@ -3,16 +3,15 @@ import { nonexhaustive } from '@likec4/core';
|
|
|
3
3
|
import { useSelector } from '@xstate/react';
|
|
4
4
|
import { animate } from 'motion';
|
|
5
5
|
import { useReducedMotionConfig, LayoutGroup, AnimatePresence } from 'motion/react';
|
|
6
|
-
import { useMemo, useEffect } from 'react';
|
|
7
|
-
import { ErrorBoundary } from 'react-error-boundary';
|
|
8
6
|
import { isNonNullish } from 'remeda';
|
|
9
|
-
import {
|
|
7
|
+
import { ErrorBoundary } from '../components/ErrorFallback.js';
|
|
10
8
|
import { ElementDetails } from './element-details/ElementDetails.js';
|
|
11
9
|
import { Overlay } from './overlay/Overlay.js';
|
|
12
10
|
import { RelationshipDetails } from './relationship-details/RelationshipDetails.js';
|
|
13
11
|
import { RelationshipsBrowser } from './relationships-browser/RelationshipsBrowser.js';
|
|
14
|
-
import {
|
|
12
|
+
import { useUpdateEffect } from '../hooks/useUpdateEffect.js';
|
|
15
13
|
import { DiagramFeatures } from '../context/DiagramFeatures.js';
|
|
14
|
+
import { useDiagram } from '../hooks/safeContext.js';
|
|
16
15
|
|
|
17
16
|
const selectOverlays = (s) => {
|
|
18
17
|
return s.context.overlays.map((overlay) => {
|
|
@@ -43,23 +42,36 @@ const compareSelectOverlays = (a, b) => {
|
|
|
43
42
|
});
|
|
44
43
|
};
|
|
45
44
|
function Overlays({ overlaysActorRef }) {
|
|
46
|
-
const
|
|
47
|
-
const xyflowRendererDom = useMemo(() => xyflowDomNode?.querySelector(".react-flow__renderer") ?? null, [
|
|
48
|
-
xyflowDomNode
|
|
49
|
-
]);
|
|
45
|
+
const diagram = useDiagram();
|
|
50
46
|
const overlays = useSelector(overlaysActorRef, selectOverlays, compareSelectOverlays);
|
|
51
47
|
const isMotionReduced = useReducedMotionConfig() ?? false;
|
|
52
48
|
const isActiveOverlay = overlays.some((overlay) => overlay.type === "elementDetails");
|
|
53
|
-
|
|
49
|
+
useUpdateEffect(() => {
|
|
50
|
+
const xyflowDomNode = diagram.getContext().xystore.getState().domNode;
|
|
51
|
+
const xyflowRendererDom = xyflowDomNode?.querySelector(".react-flow__renderer");
|
|
54
52
|
if (!xyflowRendererDom || isMotionReduced) return;
|
|
55
|
-
animate(xyflowRendererDom, {
|
|
53
|
+
const current = animate(xyflowRendererDom, {
|
|
56
54
|
opacity: isActiveOverlay ? 0.7 : 1,
|
|
57
55
|
filter: isActiveOverlay ? "grayscale(1)" : "grayscale(0)",
|
|
58
56
|
transform: isActiveOverlay ? `perspective(400px) translateZ(-12px) translateY(3px)` : `translateY(0)`
|
|
59
57
|
}, {
|
|
60
58
|
duration: isActiveOverlay ? 0.35 : 0.17
|
|
61
59
|
});
|
|
62
|
-
|
|
60
|
+
let cleanupTm = null;
|
|
61
|
+
if (!isActiveOverlay) {
|
|
62
|
+
cleanupTm = setTimeout(() => {
|
|
63
|
+
xyflowRendererDom.style.transform = "";
|
|
64
|
+
xyflowRendererDom.style.filter = "";
|
|
65
|
+
cleanupTm = null;
|
|
66
|
+
}, 450);
|
|
67
|
+
}
|
|
68
|
+
return () => {
|
|
69
|
+
if (cleanupTm) {
|
|
70
|
+
clearTimeout(cleanupTm);
|
|
71
|
+
}
|
|
72
|
+
current.stop();
|
|
73
|
+
};
|
|
74
|
+
}, [isActiveOverlay]);
|
|
63
75
|
const close = (actorRef) => {
|
|
64
76
|
overlaysActorRef.send({ type: "close", actorId: actorRef.id });
|
|
65
77
|
};
|
|
@@ -98,7 +110,7 @@ function Overlays({ overlaysActorRef }) {
|
|
|
98
110
|
nonexhaustive(overlay);
|
|
99
111
|
}
|
|
100
112
|
});
|
|
101
|
-
return /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
113
|
+
return /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(ErrorBoundary, { onReset: () => overlaysActorRef.send({ type: "close.all" }), children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: overlaysReact }) }) }) });
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
export { Overlays };
|
|
@@ -39,9 +39,9 @@ const card = css({
|
|
|
39
39
|
border: "none",
|
|
40
40
|
backgroundImage: `
|
|
41
41
|
linear-gradient(180deg,
|
|
42
|
-
color-mix(in
|
|
43
|
-
color-mix(in
|
|
44
|
-
color-mix(in
|
|
42
|
+
color-mix(in oklab, var(--likec4-palette-fill) 60%, transparent),
|
|
43
|
+
color-mix(in oklab, var(--likec4-palette-fill) 20%, transparent) 8px,
|
|
44
|
+
color-mix(in oklab, var(--likec4-palette-fill) 14%, transparent) 20px,
|
|
45
45
|
transparent 80px
|
|
46
46
|
),
|
|
47
47
|
linear-gradient(180deg, var(--likec4-palette-fill), var(--likec4-palette-fill) 4px, transparent 4px)
|
|
@@ -21,12 +21,12 @@ import { TabPanelStructure } from './TabPanelStructure.js';
|
|
|
21
21
|
import { useUpdateEffect } from '../../hooks/useUpdateEffect.js';
|
|
22
22
|
import { IconRenderer } from '../../context/IconRenderer.js';
|
|
23
23
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
24
|
-
import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
24
|
+
import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
|
|
25
25
|
import { IfEnabled, DiagramFeatures } from '../../context/DiagramFeatures.js';
|
|
26
|
-
import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
27
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
26
|
+
import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
27
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
28
28
|
import { Markdown } from '../../base-primitives/Markdown.js';
|
|
29
|
-
import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
29
|
+
import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
|
|
30
30
|
|
|
31
31
|
const Divider = Divider$1.withProps({
|
|
32
32
|
mb: 8,
|
|
@@ -2,8 +2,8 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { css } from '@likec4/styles/css';
|
|
3
3
|
import { UnstyledButton, Flex, Text, Box, Stack, Tooltip } from '@mantine/core';
|
|
4
4
|
import { useState, useRef, useEffect } from 'react';
|
|
5
|
-
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
6
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
5
|
+
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
|
|
6
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
7
7
|
|
|
8
8
|
function MetadataProvider({ children }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -49,8 +49,7 @@ function TruncatedValue({ value, isExpanded }) {
|
|
|
49
49
|
}
|
|
50
50
|
function MultiValueDisplay({
|
|
51
51
|
values,
|
|
52
|
-
isExpanded
|
|
53
|
-
onToggle
|
|
52
|
+
isExpanded
|
|
54
53
|
}) {
|
|
55
54
|
if (isExpanded) {
|
|
56
55
|
return /* @__PURE__ */ jsx(Stack, { gap: "xs", children: values.map((value, index) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", children: [
|
|
@@ -239,8 +238,7 @@ function MetadataValue({ label, value }) {
|
|
|
239
238
|
MultiValueDisplay,
|
|
240
239
|
{
|
|
241
240
|
values: elements,
|
|
242
|
-
isExpanded
|
|
243
|
-
onToggle: handleToggle
|
|
241
|
+
isExpanded
|
|
244
242
|
}
|
|
245
243
|
) : /* @__PURE__ */ jsx(
|
|
246
244
|
Box,
|
|
@@ -6,10 +6,10 @@ import 'fast-equals';
|
|
|
6
6
|
import { useDiagram } from '../../hooks/safeContext.js';
|
|
7
7
|
import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
|
|
8
8
|
import { treeNodeLabel, treeNode, nodeLabel, instanceLabel } from './TabPanelDeployments.css.js';
|
|
9
|
-
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
10
|
-
import IconTarget from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
9
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
10
|
+
import IconTarget from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js';
|
|
11
11
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
12
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
12
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
13
13
|
|
|
14
14
|
const DeploymentNodeRenderer = ({
|
|
15
15
|
node
|
|
@@ -2,14 +2,16 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { nameFromFqn } from '@likec4/core';
|
|
3
3
|
import { Stack, Group, Box, ThemeIcon, Text, Tooltip as Tooltip$1, ActionIcon, Paper } from '@mantine/core';
|
|
4
4
|
import { useSelector } from '@xstate/react';
|
|
5
|
+
import { useCallback } from 'react';
|
|
5
6
|
import { unique } from 'remeda';
|
|
6
|
-
import { useOverlaysActorRef } from '../../hooks/useOverlaysActor.js';
|
|
7
7
|
import { RelationshipsBrowser } from '../relationships-browser/RelationshipsBrowser.js';
|
|
8
8
|
import { useElementDetailsActorRef } from './actorContext.js';
|
|
9
9
|
import { fqn, xyflow, relationshipStat } from './TabPanelRelationships.css.js';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
11
|
+
import 'fast-equals';
|
|
12
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
13
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
14
|
+
import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
|
|
13
15
|
|
|
14
16
|
const Tooltip = Tooltip$1.withProps({
|
|
15
17
|
color: "dark",
|
|
@@ -25,9 +27,12 @@ function TabPanelRelationships({
|
|
|
25
27
|
node,
|
|
26
28
|
element
|
|
27
29
|
}) {
|
|
28
|
-
const
|
|
30
|
+
const diagram = useDiagram();
|
|
29
31
|
const delailsActor = useElementDetailsActorRef();
|
|
30
|
-
const relationshipsBrowserActor = useSelector(
|
|
32
|
+
const relationshipsBrowserActor = useSelector(
|
|
33
|
+
delailsActor,
|
|
34
|
+
useCallback((s) => s.children[`${delailsActor.id}-relationships`], [delailsActor.id])
|
|
35
|
+
);
|
|
31
36
|
const incoming = [...element.incoming()].map((r) => r.id);
|
|
32
37
|
const outgoing = [...element.outgoing()].map((r) => r.id);
|
|
33
38
|
const incomingInView = node ? unique([...node.incoming()].flatMap((e) => e.$edge.relations)) : [];
|
|
@@ -93,7 +98,7 @@ function TabPanelRelationships({
|
|
|
93
98
|
scope,
|
|
94
99
|
viewId
|
|
95
100
|
} = relationshipsBrowserActor.getSnapshot().context;
|
|
96
|
-
|
|
101
|
+
diagram.overlays().send({
|
|
97
102
|
type: "open.relationshipsBrowser",
|
|
98
103
|
subject,
|
|
99
104
|
scope,
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useTree, Alert, Anchor, Tree, Box, Text, Pill } from '@mantine/core';
|
|
3
3
|
import { useMemo, useEffect } from 'react';
|
|
4
4
|
import { treeNodeLabel, elementLabel } from './TabPanelStructure.css.js';
|
|
5
|
-
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
5
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
6
6
|
|
|
7
7
|
const ElementLabel = ({
|
|
8
8
|
element
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagramView, Fqn, NodeId } from '@likec4/core/types';
|
|
2
2
|
import { Rect } from '@xyflow/system';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ActorRef, SnapshotFrom, StateMachine } from 'xstate';
|
|
4
|
+
import { RelationshipsBrowserActorRef } from '../relationships-browser/actor';
|
|
5
5
|
export type Input = {
|
|
6
6
|
subject: Fqn;
|
|
7
7
|
currentView: DiagramView;
|
|
@@ -24,87 +24,12 @@ export type Events = {
|
|
|
24
24
|
} | {
|
|
25
25
|
type: 'close';
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
[
|
|
29
|
-
}, {
|
|
30
|
-
src: "relationshipsBrowserLogic";
|
|
31
|
-
logic: RelationshipsBrowserLogic;
|
|
32
|
-
id: `${string}-relationships`;
|
|
33
|
-
}, never, never, never, "active" | "closed", string, Input, NonReducibleUnknown, EventObject, MetaObject, {
|
|
34
|
-
readonly id: "element-details";
|
|
35
|
-
readonly context: ({ input }: {
|
|
36
|
-
spawn: {
|
|
37
|
-
<TSrc extends "relationshipsBrowserLogic">(logic: TSrc, ...[options]: {
|
|
38
|
-
src: "relationshipsBrowserLogic";
|
|
39
|
-
logic: RelationshipsBrowserLogic;
|
|
40
|
-
id: `${string}-relationships`;
|
|
41
|
-
} extends infer T ? T extends {
|
|
42
|
-
src: "relationshipsBrowserLogic";
|
|
43
|
-
logic: RelationshipsBrowserLogic;
|
|
44
|
-
id: `${string}-relationships`;
|
|
45
|
-
} ? T extends {
|
|
46
|
-
src: TSrc;
|
|
47
|
-
} ? ConditionalRequired<[options?: {
|
|
48
|
-
id?: T["id"];
|
|
49
|
-
systemId?: string;
|
|
50
|
-
input?: InputFrom<T["logic"]>;
|
|
51
|
-
syncSnapshot?: boolean;
|
|
52
|
-
} & { [K in RequiredActorOptions<T>]: unknown; }], IsNotNever<RequiredActorOptions<T>>> : never : never : never): ActorRefFromLogic< GetConcreteByKey<{
|
|
53
|
-
src: "relationshipsBrowserLogic";
|
|
54
|
-
logic: RelationshipsBrowserLogic;
|
|
55
|
-
id: `${string}-relationships`;
|
|
56
|
-
}, "src", TSrc>["logic"]>;
|
|
57
|
-
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
|
|
58
|
-
id?: never;
|
|
59
|
-
systemId?: string;
|
|
60
|
-
input?: InputFrom<TLogic>;
|
|
61
|
-
syncSnapshot?: boolean;
|
|
62
|
-
} & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
|
|
63
|
-
};
|
|
64
|
-
input: Input;
|
|
65
|
-
self: ActorRef<MachineSnapshot<Context, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
|
|
66
|
-
}) => {
|
|
67
|
-
initiatedFrom: {
|
|
68
|
-
node: NodeId | null;
|
|
69
|
-
clientRect: Rect | null;
|
|
70
|
-
};
|
|
71
|
-
subject: Fqn;
|
|
72
|
-
currentView: DiagramView;
|
|
73
|
-
};
|
|
74
|
-
readonly initial: "active";
|
|
75
|
-
readonly states: {
|
|
76
|
-
readonly active: {
|
|
77
|
-
readonly entry: ActionFunction<Context, Events, Events, undefined, {
|
|
78
|
-
src: "relationshipsBrowserLogic";
|
|
79
|
-
logic: RelationshipsBrowserLogic;
|
|
80
|
-
id: `${string}-relationships`;
|
|
81
|
-
}, never, never, never, never>;
|
|
82
|
-
readonly exit: readonly [ ActionFunction<Context, Events, Events, undefined, never, never, never, never, never>, StopAction<Context, Events, undefined, Events>];
|
|
83
|
-
readonly on: {
|
|
84
|
-
readonly 'change.subject': {
|
|
85
|
-
readonly actions: ActionFunction<Context, {
|
|
86
|
-
type: "change.subject";
|
|
87
|
-
subject: Fqn;
|
|
88
|
-
}, Events, undefined, {
|
|
89
|
-
src: "relationshipsBrowserLogic";
|
|
90
|
-
logic: RelationshipsBrowserLogic;
|
|
91
|
-
id: `${string}-relationships`;
|
|
92
|
-
}, never, never, never, never>;
|
|
93
|
-
};
|
|
94
|
-
readonly close: "closed";
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
readonly closed: {
|
|
98
|
-
readonly id: "closed";
|
|
99
|
-
readonly type: "final";
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
}>;
|
|
103
|
-
type InferredMachine = typeof _elementDetailsLogic;
|
|
104
|
-
export interface ElementDetailsLogic extends InferredMachine {
|
|
27
|
+
export interface ElementDetailsLogic extends StateMachine<Context, Events, {
|
|
28
|
+
[key: `${string}-relationships`]: RelationshipsBrowserActorRef | undefined;
|
|
29
|
+
}, any, any, any, any, any, never, Input, any, any, any, any> {
|
|
105
30
|
}
|
|
106
31
|
export declare const elementDetailsLogic: ElementDetailsLogic;
|
|
107
|
-
export interface ElementDetailsActorRef extends ActorRefFromLogic<ElementDetailsLogic> {
|
|
108
|
-
}
|
|
109
32
|
export type ElementDetailsSnapshot = SnapshotFrom<ElementDetailsLogic>;
|
|
110
|
-
export {
|
|
33
|
+
export interface ElementDetailsActorRef extends ActorRef<ElementDetailsSnapshot, Events> {
|
|
34
|
+
}
|
|
35
|
+
export type { Input as ElementDetailsInput, };
|
|
@@ -52,14 +52,6 @@ const _elementDetailsLogic = setup({
|
|
|
52
52
|
type: "final"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
// exit: assign({
|
|
56
|
-
// initialized: false,
|
|
57
|
-
// xyflow: null,
|
|
58
|
-
// layouted: null,
|
|
59
|
-
// xystore: null,
|
|
60
|
-
// xyedges: [],
|
|
61
|
-
// xynodes: [],
|
|
62
|
-
// }),
|
|
63
55
|
});
|
|
64
56
|
const elementDetailsLogic = _elementDetailsLogic;
|
|
65
57
|
|
|
@@ -79,9 +79,9 @@ const Overlay = forwardRef(({
|
|
|
79
79
|
initial: {
|
|
80
80
|
[backdropBlur]: "0px",
|
|
81
81
|
[backdropOpacity]: "0%",
|
|
82
|
-
scale: 0.
|
|
83
|
-
originY: 0,
|
|
84
|
-
translateY: -
|
|
82
|
+
scale: 0.85,
|
|
83
|
+
// originY: 0.4,
|
|
84
|
+
// translateY: -10,
|
|
85
85
|
opacity: 0
|
|
86
86
|
},
|
|
87
87
|
animate: {
|
|
@@ -89,18 +89,18 @@ const Overlay = forwardRef(({
|
|
|
89
89
|
[backdropOpacity]: targetBackdropOpacity,
|
|
90
90
|
scale: 1,
|
|
91
91
|
opacity: 1,
|
|
92
|
-
translateY: 0
|
|
93
|
-
transition: {
|
|
94
|
-
|
|
95
|
-
}
|
|
92
|
+
translateY: 0
|
|
93
|
+
// transition: {
|
|
94
|
+
// delay: 0.075,
|
|
95
|
+
// },
|
|
96
96
|
},
|
|
97
97
|
exit: {
|
|
98
98
|
opacity: 0,
|
|
99
99
|
scale: 0.98,
|
|
100
100
|
translateY: -20,
|
|
101
|
-
transition: {
|
|
102
|
-
|
|
103
|
-
},
|
|
101
|
+
// transition: {
|
|
102
|
+
// duration: 0.1,
|
|
103
|
+
// },
|
|
104
104
|
[backdropBlur]: "0px",
|
|
105
105
|
[backdropOpacity]: "0%"
|
|
106
106
|
}
|