@likec4/diagram 1.43.0 → 1.45.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 +14727 -13166
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +14 -9
- package/dist/LikeC4Diagram.props.d.ts +25 -15
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +8 -3
- package/dist/LikeC4View.js +29 -14
- package/dist/ReactLikeC4.d.ts +2 -2
- package/dist/ReactLikeC4.js +2 -2
- package/dist/StaticLikeC4Diagram.js +1 -1
- package/dist/_virtual/_commonjsHelpers.js +3 -0
- package/dist/_virtual/assign-dea9f7c8.cjs.js +3 -0
- package/dist/_virtual/log-ec8d4df4.cjs.js +3 -0
- package/dist/_virtual/raise-da5b247f.cjs.js +3 -0
- package/dist/_virtual/xstate-actions.cjs.js +5 -0
- package/dist/_virtual/xstate-actions.cjs2.js +3 -0
- package/dist/_virtual/xstate-dev.cjs.js +3 -0
- package/dist/_virtual/xstate-guards.cjs.js +5 -0
- package/dist/_virtual/xstate-guards.cjs2.js +3 -0
- package/dist/base/Background.d.ts +2 -1
- package/dist/base/Background.js +11 -2
- package/dist/base/Base.d.ts +28 -0
- package/dist/base/BaseXYFlow.d.ts +5 -5
- package/dist/base/BaseXYFlow.js +38 -44
- package/dist/base/index.d.ts +6 -2
- package/dist/base/types.d.ts +1 -28
- package/dist/base/updateEdges.js +25 -14
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -17
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- 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 +8 -1
- package/dist/base-primitives/edge/EdgeLabel.d.ts +3 -2
- package/dist/base-primitives/edge/EdgeLabel.js +2 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +4 -0
- package/dist/base-primitives/edge/EdgePath.d.ts +4 -0
- package/dist/base-primitives/edge/EdgePath.js +29 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +6 -4
- 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 +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- package/dist/base-primitives/element/ElementTags.js +2 -1
- package/dist/base-primitives/memoEdge.js +4 -2
- package/dist/base-primitives/memoNode.d.ts +1 -1
- package/dist/base-primitives/memoNode.js +3 -3
- package/dist/components/ErrorFallback.js +52 -35
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +2 -1
- package/dist/context/DiagramFeatures.d.ts +25 -6
- package/dist/context/DiagramFeatures.js +28 -56
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/LikeC4ModelContext.js +3 -10
- package/dist/context/TagStylesContext.js +3 -19
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +3 -3
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +5 -5
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/safeContext.d.ts +6 -3
- package/dist/hooks/safeContext.js +10 -3
- package/dist/hooks/useCallbackRef.d.ts +1 -0
- package/dist/hooks/useCallbackRef.js +13 -0
- package/dist/hooks/useCurrentView.d.ts +11 -0
- package/dist/hooks/{useCurrentViewId.js → useCurrentView.js} +7 -3
- package/dist/hooks/useCurrentViewModel.js +4 -1
- package/dist/hooks/useDiagram.d.ts +7 -113
- package/dist/hooks/useDiagram.js +7 -127
- package/dist/hooks/useDiagramCompareLayout.d.ts +35 -0
- package/dist/hooks/useDiagramCompareLayout.js +65 -0
- 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/hooks/useUpdateEffect.js +2 -4
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +4 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/likec4diagram/DiagramUI.js +14 -7
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -2
- package/dist/likec4diagram/DiagramXYFlow.js +60 -52
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +38 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +256 -217
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +9 -2
- package/dist/likec4diagram/custom/edges/edges.css.js +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +8 -0
- package/dist/likec4diagram/custom/edges/useControlPoints.js +58 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +7 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +60 -0
- package/dist/likec4diagram/custom/edges/utils.d.ts +0 -12
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +4 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.js +15 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +50 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +74 -29
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +4 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +1 -11
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +7 -51
- package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +5 -0
- package/dist/likec4diagram/custom/nodes/toolbar/types.js +7 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +8 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +44 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -10
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +95 -70
- package/dist/likec4diagram/state/assign.d.ts +13 -7
- package/dist/likec4diagram/state/assign.js +43 -282
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +79 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +109 -0
- package/dist/likec4diagram/state/diagram-api.js +126 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +1783 -0
- package/dist/likec4diagram/state/machine.actions.js +644 -0
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +579 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +129 -0
- package/dist/likec4diagram/state/machine.d.ts +22 -0
- package/dist/likec4diagram/state/machine.js +127 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +327 -0
- package/dist/likec4diagram/state/machine.setup.js +93 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +208 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +14 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +178 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3131 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +386 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +85 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +474 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +96 -0
- package/dist/likec4diagram/state/machine.state.ready.js +262 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +128 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +511 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +177 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +31 -108
- package/dist/likec4diagram/state/syncManualLayoutActor.js +278 -142
- package/dist/likec4diagram/state/types.d.ts +7 -12
- package/dist/likec4diagram/state/utils.d.ts +19 -4
- package/dist/likec4diagram/state/utils.js +47 -4
- package/dist/likec4diagram/types.d.ts +8 -8
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +66 -0
- package/dist/likec4diagram/ui/index.d.ts +1 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -4
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +237 -61
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +14 -17
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +16 -8
- package/dist/navigationpanel/NavigationPanelControls.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelControls.js +23 -17
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +62 -42
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +4 -2
- package/dist/navigationpanel/actor.d.ts +9 -205
- package/dist/navigationpanel/actor.js +6 -5
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +59 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +2 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.js +42 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +60 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +5 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +38 -0
- package/dist/navigationpanel/comparepanel/index.d.ts +1 -0
- package/dist/navigationpanel/controls/{ViewDetailsCard.d.ts → DetailsControls.d.ts} +1 -1
- package/dist/navigationpanel/controls/{ViewDetailsCard.js → DetailsControls.js} +18 -14
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +2 -0
- package/dist/navigationpanel/controls/LayoutWarning.js +102 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +4 -3
- package/dist/navigationpanel/controls/OpenSource.js +2 -2
- package/dist/navigationpanel/controls/SearchControl.d.ts +2 -1
- package/dist/navigationpanel/controls/SearchControl.js +15 -17
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +26 -18
- package/dist/navigationpanel/controls/index.d.ts +2 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +5 -5
- package/dist/navigationpanel/editorpanel/CenterCamera.js +5 -2
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +21 -20
- package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -2
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +16 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +15 -0
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +4 -4
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +14 -8
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +66 -66
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +68 -50
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/actions/dist/xstate-actions.cjs.js +37 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dev/dist/xstate-dev.cjs.js +59 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js +140 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js +401 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js +2716 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/guards/dist/xstate-guards.cjs.js +26 -0
- package/dist/overlays/element-details/ElementDetails.js +7 -7
- package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +7 -5
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- package/dist/overlays/element-details/MetadataValue.js +2 -2
- package/dist/overlays/element-details/TabPanelDeployments.js +6 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +8 -82
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -150
- package/dist/overlays/overlaysActor.js +183 -161
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -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 -550
- package/dist/overlays/relationship-details/actor.js +18 -3
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -5
- package/dist/overlays/relationship-details/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationship-details/hooks.js +1 -1
- 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 +6 -4
- 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 -673
- package/dist/overlays/relationships-browser/actor.js +132 -110
- package/dist/overlays/relationships-browser/custom/ElementActions.js +44 -37
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationships-browser/hooks.js +7 -6
- 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/Search.js +2 -1
- package/dist/search/components/ElementsColumn.js +5 -3
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +21 -44
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +6 -4
- 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 +8 -6
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +83 -21
- package/dist/utils/vector.js +98 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +58 -0
- package/dist/utils/xyflow.d.ts +52 -8
- package/dist/utils/xyflow.js +31 -11
- package/package.json +26 -24
- package/panda.buildinfo.json +124 -71
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/hooks/useCurrentViewId.d.ts +0 -6
- package/dist/likec4diagram/custom/edges/utils.js +0 -23
- package/dist/likec4diagram/state/diagram-machine.d.ts +0 -2590
- package/dist/likec4diagram/state/diagram-machine.js +0 -1180
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +0 -56
- package/dist/utils/get-view-bounds.d.ts +0 -3
- package/dist/utils/get-view-bounds.js +0 -14
- /package/dist/base/{types.js → Base.js} +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
package/dist/base/BaseXYFlow.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { useMantineColorScheme } from '@mantine/core';
|
|
4
|
-
import { useCallbackRef } from '@mantine/hooks';
|
|
5
4
|
import { ReactFlow, useStore } from '@xyflow/react';
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import { useCallbackRef } from '../hooks/useCallbackRef.js';
|
|
6
7
|
import { useUpdateEffect } from '../hooks/useUpdateEffect.js';
|
|
7
8
|
import { useIsZoomTooSmall, useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
8
9
|
import { roundDpr } from '../utils/roundDpr.js';
|
|
9
10
|
import { stopPropagation } from '../utils/xyflow.js';
|
|
10
11
|
import { Background } from './Background.js';
|
|
12
|
+
import { Base } from './Base.js';
|
|
11
13
|
import { MinZoom, MaxZoom } from './const.js';
|
|
12
|
-
import { Base } from './types.js';
|
|
13
14
|
|
|
14
15
|
function BaseXYFlow({
|
|
15
16
|
nodes,
|
|
@@ -35,6 +36,12 @@ function BaseXYFlow({
|
|
|
35
36
|
onEdgeMouseLeave,
|
|
36
37
|
...props
|
|
37
38
|
}) {
|
|
39
|
+
const fitViewOptions = useMemo(() => ({
|
|
40
|
+
minZoom: MinZoom,
|
|
41
|
+
maxZoom: 1,
|
|
42
|
+
padding: fitViewPadding,
|
|
43
|
+
includeHiddenNodes: false
|
|
44
|
+
}), [fitViewPadding]);
|
|
38
45
|
const isBgWithPattern = background !== "transparent" && background !== "solid";
|
|
39
46
|
const isZoomTooSmall = useIsZoomTooSmall();
|
|
40
47
|
const xystore = useXYStoreApi();
|
|
@@ -64,12 +71,7 @@ function BaseXYFlow({
|
|
|
64
71
|
maxZoom: zoomable ? MaxZoom : 1,
|
|
65
72
|
minZoom: zoomable ? MinZoom : 1,
|
|
66
73
|
fitView,
|
|
67
|
-
fitViewOptions
|
|
68
|
-
minZoom: MinZoom,
|
|
69
|
-
maxZoom: 1,
|
|
70
|
-
padding: fitViewPadding,
|
|
71
|
-
includeHiddenNodes: false
|
|
72
|
-
},
|
|
74
|
+
fitViewOptions,
|
|
73
75
|
preventScrolling: zoomable || pannable,
|
|
74
76
|
defaultMarkerColor: "var(--xy-edge-stroke)",
|
|
75
77
|
noDragClassName: "nodrag",
|
|
@@ -99,57 +101,49 @@ function BaseXYFlow({
|
|
|
99
101
|
}
|
|
100
102
|
onMoveEnd?.(event, { x: roundedX, y: roundedY, zoom });
|
|
101
103
|
}),
|
|
102
|
-
onNodeMouseEnter: useCallbackRef((
|
|
104
|
+
onNodeMouseEnter: useCallbackRef((event, node) => {
|
|
103
105
|
if (onNodeMouseEnter) {
|
|
104
|
-
onNodeMouseEnter(
|
|
106
|
+
onNodeMouseEnter(event, node);
|
|
105
107
|
return;
|
|
106
108
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}]);
|
|
113
|
-
}
|
|
109
|
+
onNodesChange([{
|
|
110
|
+
id: node.id,
|
|
111
|
+
type: "replace",
|
|
112
|
+
item: Base.setHovered(node, true)
|
|
113
|
+
}]);
|
|
114
114
|
}),
|
|
115
|
-
onNodeMouseLeave: useCallbackRef((
|
|
115
|
+
onNodeMouseLeave: useCallbackRef((event, node) => {
|
|
116
116
|
if (onNodeMouseLeave) {
|
|
117
|
-
onNodeMouseLeave(
|
|
117
|
+
onNodeMouseLeave(event, node);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}]);
|
|
126
|
-
}
|
|
120
|
+
onNodesChange([{
|
|
121
|
+
id: node.id,
|
|
122
|
+
type: "replace",
|
|
123
|
+
item: Base.setHovered(node, false)
|
|
124
|
+
}]);
|
|
127
125
|
}),
|
|
128
|
-
onEdgeMouseEnter: useCallbackRef((
|
|
126
|
+
onEdgeMouseEnter: useCallbackRef((event, edge) => {
|
|
129
127
|
if (onEdgeMouseEnter) {
|
|
130
|
-
onEdgeMouseEnter(
|
|
128
|
+
onEdgeMouseEnter(event, edge);
|
|
131
129
|
return;
|
|
132
130
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}]);
|
|
139
|
-
}
|
|
131
|
+
onEdgesChange([{
|
|
132
|
+
id: edge.id,
|
|
133
|
+
type: "replace",
|
|
134
|
+
item: Base.setHovered(edge, true)
|
|
135
|
+
}]);
|
|
140
136
|
}),
|
|
141
|
-
onEdgeMouseLeave: useCallbackRef((
|
|
137
|
+
onEdgeMouseLeave: useCallbackRef((event, edge) => {
|
|
142
138
|
if (onEdgeMouseLeave) {
|
|
143
|
-
onEdgeMouseLeave(
|
|
139
|
+
onEdgeMouseLeave(event, edge);
|
|
144
140
|
return;
|
|
145
141
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}]);
|
|
152
|
-
}
|
|
142
|
+
onEdgesChange([{
|
|
143
|
+
id: edge.id,
|
|
144
|
+
type: "replace",
|
|
145
|
+
item: Base.setHovered(edge, false)
|
|
146
|
+
}]);
|
|
153
147
|
}),
|
|
154
148
|
onNodeDoubleClick: stopPropagation,
|
|
155
149
|
onEdgeDoubleClick: stopPropagation,
|
package/dist/base/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { Background, type XYBackground, type XYBackgroundProps, type XYBackgroundVariant, } from './Background';
|
|
2
|
+
export { BaseXYFlow, type BaseXYFlowProps, } from './BaseXYFlow';
|
|
3
|
+
export * from './Base';
|
|
3
4
|
export * from './const';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export { updateEdges } from './updateEdges';
|
|
7
|
+
export { updateNodes } from './updateNodes';
|
package/dist/base/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Edge, EdgeProps, Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { OptionalKeysOf, SetRequired, Simplify } from 'type-fest';
|
|
3
|
+
import { Base } from './Base';
|
|
3
4
|
export type BaseNodeData = {
|
|
4
5
|
/**
|
|
5
6
|
* Whether the cursor is hovering over the node
|
|
@@ -41,33 +42,6 @@ export type BaseNodePropsWithData<Data extends Record<string, unknown>> = BaseNo
|
|
|
41
42
|
export interface BaseEdgeProps<E extends BaseEdge = BaseEdge> extends EdgeProps<E> {
|
|
42
43
|
}
|
|
43
44
|
export type BaseEdgePropsWithData<Data extends Record<string, unknown>> = BaseEdgeProps<BaseEdge<Data>>;
|
|
44
|
-
type WithDimmed = {
|
|
45
|
-
data: {
|
|
46
|
-
dimmed?: Base.Dimmed;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
type WithHovered = {
|
|
50
|
-
data: {
|
|
51
|
-
hovered?: boolean;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
declare function setDimmed<T extends WithDimmed>(value: T, dimmed: 'immediate' | boolean): T;
|
|
55
|
-
declare function setDimmed(dimmed: 'immediate' | boolean): <T extends WithDimmed>(value: T) => T;
|
|
56
|
-
declare function setHovered<T extends WithHovered>(value: T, hovered: boolean): T;
|
|
57
|
-
declare function setHovered(hovered: boolean): <T extends WithHovered>(value: T) => T;
|
|
58
|
-
type WithData<D> = {
|
|
59
|
-
data: D;
|
|
60
|
-
};
|
|
61
|
-
declare function setData<E extends WithData<any>>(value: E, state: Partial<E['data']>): E;
|
|
62
|
-
declare function setData<E extends WithData<any>>(state: Partial<E['data']>): (value: E) => E;
|
|
63
|
-
export declare const Base: {
|
|
64
|
-
setDimmed: typeof setDimmed;
|
|
65
|
-
setHovered: typeof setHovered;
|
|
66
|
-
setData: typeof setData;
|
|
67
|
-
};
|
|
68
|
-
export declare namespace Base {
|
|
69
|
-
type Dimmed = 'immediate' | boolean;
|
|
70
|
-
}
|
|
71
45
|
/**
|
|
72
46
|
* To cooperate with `exactOptionalPropertyTypes` in `tsconfig.json`
|
|
73
47
|
*
|
|
@@ -90,4 +64,3 @@ export type NonOptional<T extends object, Keys extends OptionalKeysOf<T> = Optio
|
|
|
90
64
|
} & {
|
|
91
65
|
[P in Keys]-?: T[P] | undefined;
|
|
92
66
|
}>;
|
|
93
|
-
export {};
|
package/dist/base/updateEdges.js
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { deepEqual } from 'fast-equals';
|
|
2
|
-
import { isDefined,
|
|
2
|
+
import { isDefined, pickBy, isShallowEqual } from 'remeda';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
const EMPTY_OBJ = {};
|
|
5
|
+
function _update(current, updated) {
|
|
6
|
+
if (current === updated) {
|
|
7
|
+
return current;
|
|
8
|
+
}
|
|
9
|
+
updated = updated.map((update) => {
|
|
10
|
+
const existing = current.find(
|
|
11
|
+
(n) => n.id === update.id && n.type === update.type && n.source === update.source && n.target === update.target
|
|
12
|
+
);
|
|
13
|
+
if (!existing) {
|
|
14
|
+
return update;
|
|
15
|
+
}
|
|
16
|
+
const isSameData = deepEqual(existing.data, update.data);
|
|
17
|
+
const data = isSameData ? existing.data : update.data;
|
|
18
|
+
if (isSameData && deepEqual(existing.hidden, update.hidden ?? existing.hidden) && deepEqual(existing.selected, update.selected ?? existing.selected) && deepEqual(existing.selectable, update.selectable ?? existing.selectable) && deepEqual(existing.focusable, update.focusable ?? existing.focusable) && deepEqual(existing.animated, update.animated ?? existing.animated) && deepEqual(existing.className, update.className) && deepEqual(existing.zIndex, update.zIndex ?? existing.zIndex) && deepEqual(existing.label, update.label) && deepEqual(existing.sourceHandle, update.sourceHandle) && deepEqual(existing.targetHandle, update.targetHandle) && deepEqual(existing.style ?? EMPTY_OBJ, update.style ?? EMPTY_OBJ)) {
|
|
19
|
+
return existing;
|
|
16
20
|
}
|
|
17
|
-
return
|
|
21
|
+
return {
|
|
22
|
+
// Retain existing properties that are defined, except parentId
|
|
23
|
+
...pickBy(existing, isDefined),
|
|
24
|
+
// Apply updates, omitting undefined values
|
|
25
|
+
...pickBy(update, isDefined),
|
|
26
|
+
data
|
|
27
|
+
};
|
|
18
28
|
});
|
|
29
|
+
return isShallowEqual(current, updated) ? current : updated;
|
|
19
30
|
}
|
|
20
31
|
function updateEdges(current, update) {
|
|
21
32
|
if (isDefined(update)) {
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import { BaseNode } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Updates nodes by merging existing nodes with updated nodes based on their IDs.
|
|
4
|
+
*
|
|
5
|
+
* Can be used in two ways:
|
|
6
|
+
* 1. By providing both current and updated node arrays:
|
|
7
|
+
* `const newNodes = updateNodes(currentNodes, updatedNodes);`
|
|
8
|
+
* 2. By providing only the updated node array, returning a function that takes the current nodes:
|
|
9
|
+
* `const updater = updateNodes(updatedNodes);
|
|
10
|
+
* const newNodes = updater(currentNodes);`
|
|
11
|
+
*
|
|
12
|
+
* @param current - The current array of nodes.
|
|
13
|
+
* @param update - The array of nodes with updates.
|
|
14
|
+
* @returns The updated array of nodes.
|
|
15
|
+
*/
|
|
2
16
|
export declare function updateNodes<N extends BaseNode>(current: N[], update: N[]): N[];
|
|
3
17
|
export declare function updateNodes<N extends BaseNode>(update: N[]): (current: N[]) => N[];
|
package/dist/base/updateNodes.js
CHANGED
|
@@ -1,33 +1,67 @@
|
|
|
1
1
|
import { getNodeDimensions } from '@xyflow/system';
|
|
2
2
|
import { deepEqual } from 'fast-equals';
|
|
3
|
-
import { isDefined,
|
|
3
|
+
import { isDefined, hasSubObject, pickBy, isShallowEqual } from 'remeda';
|
|
4
4
|
|
|
5
|
+
const EMPTY_OBJ = {};
|
|
5
6
|
function _update(current, updated) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
if (current === updated) {
|
|
8
|
+
return current;
|
|
9
|
+
}
|
|
10
|
+
updated = updated.map((update) => {
|
|
11
|
+
const existing = current.find((n) => n.id === update.id && n.type === update.type);
|
|
12
|
+
if (!existing) {
|
|
13
|
+
return update;
|
|
14
|
+
}
|
|
15
|
+
const isSameData = hasSubObject(existing.data, update.data);
|
|
16
|
+
let data = isSameData ? existing.data : update.data;
|
|
17
|
+
if (!isSameData) {
|
|
18
|
+
if (isDefined(existing.data.hovered) && !isDefined(update.data.hovered)) {
|
|
19
|
+
data = {
|
|
20
|
+
...data,
|
|
21
|
+
hovered: existing.data.hovered
|
|
22
|
+
};
|
|
12
23
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
if (isDefined(existing.data.dimmed) && !isDefined(update.data.dimmed)) {
|
|
25
|
+
data = {
|
|
26
|
+
...data,
|
|
27
|
+
dimmed: existing.data.dimmed
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const { width: existingWidth, height: existingHeight } = getNodeDimensions(existing);
|
|
32
|
+
const haveHandles = Object.hasOwn(existing, "handles") || Object.hasOwn(update, "handles");
|
|
33
|
+
const isSameHandles = !haveHandles || deepEqual(existing.handles ?? [], update.handles ?? []);
|
|
34
|
+
if (isSameData && isSameHandles && deepEqual(existingWidth, update.width ?? update.initialWidth) && deepEqual(existingHeight, update.height ?? update.initialHeight) && deepEqual(existing.parentId ?? null, update.parentId ?? null) && deepEqual(existing.hidden, update.hidden ?? existing.hidden) && deepEqual(existing.selected, update.selected ?? existing.selected) && deepEqual(existing.selectable, update.selectable ?? existing.selectable) && deepEqual(existing.focusable, update.focusable ?? existing.focusable) && deepEqual(existing.draggable, update.draggable ?? existing.draggable) && deepEqual(existing.dragHandle, update.dragHandle) && deepEqual(existing.className, update.className) && deepEqual(existing.zIndex, update.zIndex ?? existing.zIndex) && deepEqual(existing.position, update.position) && deepEqual(existing.domAttributes ?? EMPTY_OBJ, update.domAttributes ?? EMPTY_OBJ) && deepEqual(existing.style ?? EMPTY_OBJ, update.style ?? EMPTY_OBJ)) {
|
|
35
|
+
return existing;
|
|
21
36
|
}
|
|
22
|
-
|
|
37
|
+
const handles = haveHandles && isSameHandles ? existing.handles : update.handles;
|
|
38
|
+
return {
|
|
39
|
+
// Retain existing properties that are defined, except parentId
|
|
40
|
+
...pickBy(existing, (v, k) => isDefined(v) && k !== "parentId"),
|
|
41
|
+
// Retain measured dimensions from existing if present
|
|
42
|
+
..."measured" in existing && {
|
|
43
|
+
measured: {
|
|
44
|
+
width: update.width ?? update.initialWidth,
|
|
45
|
+
height: update.height ?? update.initialHeight
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
// Apply updates, omitting undefined values
|
|
49
|
+
...pickBy(update, isDefined),
|
|
50
|
+
// Force dimensions
|
|
51
|
+
width: update.width ?? update.initialWidth,
|
|
52
|
+
height: update.height ?? update.initialHeight,
|
|
53
|
+
...handles && { handles },
|
|
54
|
+
data
|
|
55
|
+
};
|
|
23
56
|
});
|
|
57
|
+
return isShallowEqual(current, updated) ? current : updated;
|
|
24
58
|
}
|
|
25
59
|
function updateNodes(current, update) {
|
|
26
60
|
if (isDefined(update)) {
|
|
27
61
|
return _update(current, update);
|
|
28
62
|
}
|
|
29
63
|
update = current;
|
|
30
|
-
return (
|
|
64
|
+
return (existing) => _update(existing, update);
|
|
31
65
|
}
|
|
32
66
|
|
|
33
67
|
export { updateNodes };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
|
-
import { BoxProps } from '@likec4/styles/jsx';
|
|
3
2
|
import { JsxStyleProps } from '@likec4/styles/types';
|
|
4
|
-
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
-
export type MarkdownProps = Omit<
|
|
3
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
4
|
+
export type MarkdownProps = Omit<ComponentPropsWithoutRef<'div'>, 'dangerouslySetInnerHTML' | 'children' | 'color'> & {
|
|
6
5
|
value: RichTextType;
|
|
7
6
|
/**
|
|
8
7
|
* When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
|
|
@@ -30,4 +29,31 @@ export type MarkdownProps = Omit<BoxProps, 'dangerouslySetInnerHTML' | 'children
|
|
|
30
29
|
*/
|
|
31
30
|
emptyText?: string;
|
|
32
31
|
};
|
|
33
|
-
export declare const Markdown: ForwardRefExoticComponent<Omit<
|
|
32
|
+
export declare const Markdown: ForwardRefExoticComponent<Omit<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "color" | "dangerouslySetInnerHTML"> & {
|
|
33
|
+
value: RichTextType;
|
|
34
|
+
/**
|
|
35
|
+
* When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
uselikec4palette?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Scale factor for the block
|
|
41
|
+
* @default 1
|
|
42
|
+
*/
|
|
43
|
+
textScale?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Font size for the block
|
|
46
|
+
* @default 'md'
|
|
47
|
+
*/
|
|
48
|
+
fontSize?: (JsxStyleProps["fontSize"] & string) | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* If true, the component will not render anything if the value is empty.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
hideIfEmpty?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Text to show if the value is empty.
|
|
56
|
+
* @default "no content"
|
|
57
|
+
*/
|
|
58
|
+
emptyText?: string;
|
|
59
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -37,8 +37,9 @@ const Markdown = forwardRef(({
|
|
|
37
37
|
...fontSize && {
|
|
38
38
|
"--text-fz": `var(--font-sizes-${fontSize}, var(--font-sizes-md))`
|
|
39
39
|
},
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
...textScale !== 1 && {
|
|
41
|
+
["--mantine-scale"]: textScale
|
|
42
|
+
}
|
|
42
43
|
},
|
|
43
44
|
...content
|
|
44
45
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
import { Simplify } from 'type-fest';
|
|
2
3
|
import { BaseNodeProps } from '../../base/types';
|
|
3
4
|
type CompoundActionButtonProps = Simplify<BaseNodeProps & {
|
|
4
|
-
icon?:
|
|
5
|
-
onClick: (e:
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
6
7
|
}>;
|
|
7
8
|
export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -6,7 +6,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
8
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
9
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
9
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
10
|
|
|
11
11
|
function CompoundActionButton({
|
|
12
12
|
data: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
import { Simplify } from 'type-fest';
|
|
2
3
|
import { BaseNodeProps } from '../../base/types';
|
|
3
4
|
type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
|
|
4
|
-
icon?:
|
|
5
|
-
onClick: (e:
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
6
7
|
}>;
|
|
7
8
|
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -6,7 +6,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
8
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
9
|
-
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
9
|
+
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
10
10
|
|
|
11
11
|
function CompoundDetailsButton({
|
|
12
12
|
data: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
type EdgeActionBtnProps = {
|
|
2
|
-
icon?:
|
|
3
|
-
onClick: (e:
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
4
5
|
};
|
|
5
6
|
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import { cx } from '@likec4/styles/css';
|
|
|
3
3
|
import { edgeActionBtn } from '@likec4/styles/recipes';
|
|
4
4
|
import { ActionIcon } from '@mantine/core';
|
|
5
5
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
6
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
6
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
7
7
|
|
|
8
8
|
function EdgeActionButton({ icon, onClick }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -7,5 +7,5 @@ type EdgeContainerProps = PropsWithChildren<BaseEdgePropsWithData<Data> & {
|
|
|
7
7
|
component?: 'g' | 'svg' | undefined;
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
}>;
|
|
10
|
-
export declare function EdgeContainer({ className, component, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, children, style, }: EdgeContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, children, style, }: EdgeContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -6,6 +6,8 @@ import { edgeContainer } from './edge.css.js';
|
|
|
6
6
|
function EdgeContainer({
|
|
7
7
|
className,
|
|
8
8
|
component = "g",
|
|
9
|
+
selectable = false,
|
|
10
|
+
selected = false,
|
|
9
11
|
data: {
|
|
10
12
|
color = "gray",
|
|
11
13
|
hovered: isHovered = false,
|
|
@@ -20,13 +22,18 @@ function EdgeContainer({
|
|
|
20
22
|
className: cx(
|
|
21
23
|
className,
|
|
22
24
|
edgeContainer,
|
|
23
|
-
"likec4-edge-container"
|
|
25
|
+
"likec4-edge-container",
|
|
26
|
+
selected && "selected",
|
|
27
|
+
selectable && "selectable"
|
|
24
28
|
),
|
|
25
29
|
"data-likec4-color": color,
|
|
26
30
|
"data-edge-dir": data.dir ?? "forward",
|
|
27
31
|
"data-edge-active": isActive,
|
|
28
32
|
"data-edge-animated": isActive,
|
|
29
33
|
"data-likec4-hovered": isHovered,
|
|
34
|
+
...selected && {
|
|
35
|
+
"data-likec4-selected": selected
|
|
36
|
+
},
|
|
30
37
|
...isDimmed !== false && {
|
|
31
38
|
"data-likec4-dimmed": isDimmed
|
|
32
39
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DiagramEdge } from '@likec4/core/types';
|
|
2
2
|
import { HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import { ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
4
|
import { UndefinedOnPartialDeep } from 'type-fest';
|
|
4
5
|
import { BaseEdgePropsWithData } from '../../base/types';
|
|
5
|
-
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
6
6
|
type Data = UndefinedOnPartialDeep<Pick<DiagramEdge, 'label' | 'technology'>>;
|
|
7
7
|
type EdgeLabelProps = HTMLMotionProps<'div'> & {
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
10
|
+
pointerEvents?: 'all' | 'none';
|
|
10
11
|
};
|
|
11
12
|
export declare const EdgeLabel: ForwardRefExoticComponent<Omit<EdgeLabelProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
12
13
|
export {};
|
|
@@ -18,6 +18,7 @@ const EdgeLabel = forwardRef(({
|
|
|
18
18
|
selected = false,
|
|
19
19
|
selectable = false
|
|
20
20
|
},
|
|
21
|
+
pointerEvents = "all",
|
|
21
22
|
className,
|
|
22
23
|
style: _style,
|
|
23
24
|
// omit
|
|
@@ -26,6 +27,7 @@ const EdgeLabel = forwardRef(({
|
|
|
26
27
|
}, ref) => {
|
|
27
28
|
const stepNum = isStepEdgeId(id) ? extractStep(id) : null;
|
|
28
29
|
const classes = edgeLabel({
|
|
30
|
+
pointerEvents,
|
|
29
31
|
isStepEdge: stepNum !== null,
|
|
30
32
|
cursor: selectable || stepNum !== null ? "pointer" : "default"
|
|
31
33
|
});
|
|
@@ -14,5 +14,5 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
16
16
|
};
|
|
17
|
-
export declare function EdgeLabelContainer({ edgeProps: { id, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, }, labelPosition: labelXY, className, style, children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, }, labelPosition: labelXY, className, style, children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export {};
|
|
@@ -13,6 +13,7 @@ const toCssVarValue = (value) => {
|
|
|
13
13
|
function EdgeLabelContainer({
|
|
14
14
|
edgeProps: {
|
|
15
15
|
id,
|
|
16
|
+
selected = false,
|
|
16
17
|
data: {
|
|
17
18
|
hovered: isHovered = false,
|
|
18
19
|
active: isActive = false,
|
|
@@ -53,6 +54,9 @@ function EdgeLabelContainer({
|
|
|
53
54
|
"data-likec4-color": color,
|
|
54
55
|
"data-edge-active": isActive,
|
|
55
56
|
"data-edge-animated": isActive,
|
|
57
|
+
...selected !== false && {
|
|
58
|
+
"data-likec4-selected": selected
|
|
59
|
+
},
|
|
56
60
|
...isDimmed !== false && {
|
|
57
61
|
"data-likec4-dimmed": isDimmed
|
|
58
62
|
},
|
|
@@ -6,6 +6,10 @@ type Data = UndefinedOnPartialDeep<Pick<DiagramEdge, 'line' | 'dir' | 'tail' | '
|
|
|
6
6
|
type EdgePathProps = {
|
|
7
7
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
8
8
|
svgPath: string;
|
|
9
|
+
/**
|
|
10
|
+
* If true, the edge is being dragged (used to disable animations)
|
|
11
|
+
*/
|
|
12
|
+
isDragging?: boolean;
|
|
9
13
|
strokeWidth?: number;
|
|
10
14
|
onEdgePointerDown?: PointerEventHandler<SVGGElement> | undefined;
|
|
11
15
|
};
|
|
@@ -17,6 +17,8 @@ const EdgePath = forwardRef(({
|
|
|
17
17
|
style,
|
|
18
18
|
interactionWidth
|
|
19
19
|
},
|
|
20
|
+
isDragging = false,
|
|
21
|
+
// omit
|
|
20
22
|
onEdgePointerDown,
|
|
21
23
|
strokeWidth,
|
|
22
24
|
svgPath
|
|
@@ -42,19 +44,38 @@ const EdgePath = forwardRef(({
|
|
|
42
44
|
{
|
|
43
45
|
className: cx(
|
|
44
46
|
"react-flow__edge-interaction",
|
|
45
|
-
"hide-on-reduced-graphics",
|
|
46
47
|
css({
|
|
47
48
|
fill: "none"
|
|
48
49
|
})
|
|
49
50
|
),
|
|
51
|
+
onPointerDown: onEdgePointerDown,
|
|
50
52
|
d: svgPath,
|
|
51
53
|
style: {
|
|
52
54
|
strokeWidth: interactionWidth ?? 10,
|
|
53
55
|
stroke: "currentcolor",
|
|
54
|
-
strokeOpacity: 0
|
|
56
|
+
strokeOpacity: 0,
|
|
57
|
+
...isDragging ? { display: "none" } : {}
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"circle",
|
|
63
|
+
{
|
|
64
|
+
className: cx(
|
|
65
|
+
"edge-center-point",
|
|
66
|
+
css({
|
|
67
|
+
visibility: "hidden",
|
|
68
|
+
offsetDistance: "50%"
|
|
69
|
+
})
|
|
70
|
+
),
|
|
71
|
+
style: {
|
|
72
|
+
offsetPath: `path("${svgPath}")`
|
|
73
|
+
},
|
|
74
|
+
cx: 0,
|
|
75
|
+
cy: 0,
|
|
76
|
+
r: 2
|
|
77
|
+
}
|
|
78
|
+
),
|
|
58
79
|
/* @__PURE__ */ jsxs("g", { className: markerContext, onPointerDown: onEdgePointerDown, children: [
|
|
59
80
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
60
81
|
MarkerStart && /* @__PURE__ */ jsx(MarkerStart, { id: "start" + id }),
|
|
@@ -66,12 +87,14 @@ const EdgePath = forwardRef(({
|
|
|
66
87
|
className: cx(
|
|
67
88
|
"react-flow__edge-path",
|
|
68
89
|
"hide-on-reduced-graphics",
|
|
69
|
-
edgePathBg
|
|
90
|
+
edgePathBg,
|
|
91
|
+
isDragging && css({ display: "none" })
|
|
70
92
|
),
|
|
71
93
|
d: svgPath,
|
|
72
94
|
style,
|
|
73
95
|
strokeLinecap: "round"
|
|
74
|
-
}
|
|
96
|
+
},
|
|
97
|
+
"edge-path-bg"
|
|
75
98
|
),
|
|
76
99
|
/* @__PURE__ */ jsx(
|
|
77
100
|
"path",
|
|
@@ -89,7 +112,8 @@ const EdgePath = forwardRef(({
|
|
|
89
112
|
strokeDasharray,
|
|
90
113
|
markerStart: MarkerStart ? `url(#start${id})` : void 0,
|
|
91
114
|
markerEnd: MarkerEnd ? `url(#end${id})` : void 0
|
|
92
|
-
}
|
|
115
|
+
},
|
|
116
|
+
"edge-path"
|
|
93
117
|
)
|
|
94
118
|
] })
|
|
95
119
|
] });
|