@likec4/diagram 1.47.0 → 1.49.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/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- 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/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
package/dist/base/updateEdges.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deepEqual } from 'fast-equals';
|
|
2
|
-
import { isDefined, pickBy, isShallowEqual } from 'remeda';
|
|
2
|
+
import { isDefined, hasSubObject, pickBy, isShallowEqual } from 'remeda';
|
|
3
3
|
|
|
4
4
|
const EMPTY_OBJ = {};
|
|
5
5
|
function _update(current, updated) {
|
|
@@ -13,8 +13,31 @@ function _update(current, updated) {
|
|
|
13
13
|
if (!existing) {
|
|
14
14
|
return update;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
if (existing === update) {
|
|
17
|
+
return existing;
|
|
18
|
+
}
|
|
19
|
+
const isSameData = hasSubObject(existing.data, update.data);
|
|
20
|
+
let data = isSameData ? existing.data : update.data;
|
|
21
|
+
if (!isSameData) {
|
|
22
|
+
if (isDefined(existing.data.hovered) && !isDefined(update.data.hovered)) {
|
|
23
|
+
data = {
|
|
24
|
+
...data,
|
|
25
|
+
hovered: existing.data.hovered
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
if (isDefined(existing.data.dimmed) && !isDefined(update.data.dimmed)) {
|
|
29
|
+
data = {
|
|
30
|
+
...data,
|
|
31
|
+
dimmed: existing.data.dimmed
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (isDefined(existing.data.active) && !isDefined(update.data.active)) {
|
|
35
|
+
data = {
|
|
36
|
+
...data,
|
|
37
|
+
active: existing.data.active
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
18
41
|
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
42
|
return existing;
|
|
20
43
|
}
|
package/dist/base/updateNodes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getNodeDimensions } from '@xyflow/system';
|
|
2
|
-
import { deepEqual } from 'fast-equals';
|
|
3
|
-
import { isDefined, hasSubObject, pickBy
|
|
2
|
+
import { deepEqual, shallowEqual } from 'fast-equals';
|
|
3
|
+
import { isDefined, hasSubObject, pickBy } from 'remeda';
|
|
4
4
|
|
|
5
5
|
const EMPTY_OBJ = {};
|
|
6
6
|
function _update(current, updated) {
|
|
@@ -12,6 +12,9 @@ function _update(current, updated) {
|
|
|
12
12
|
if (!existing) {
|
|
13
13
|
return update;
|
|
14
14
|
}
|
|
15
|
+
if (existing === update) {
|
|
16
|
+
return existing;
|
|
17
|
+
}
|
|
15
18
|
const isSameData = hasSubObject(existing.data, update.data);
|
|
16
19
|
let data = isSameData ? existing.data : update.data;
|
|
17
20
|
if (!isSameData) {
|
|
@@ -36,8 +39,8 @@ function _update(current, updated) {
|
|
|
36
39
|
}
|
|
37
40
|
const handles = haveHandles && isSameHandles ? existing.handles : update.handles;
|
|
38
41
|
return {
|
|
39
|
-
// Retain existing properties that are defined, except parentId
|
|
40
|
-
...pickBy(existing, (v, k) => isDefined(v) && k !== "parentId"),
|
|
42
|
+
// Retain existing properties that are defined, except parentId and handles
|
|
43
|
+
...pickBy(existing, (v, k) => isDefined(v) && k !== "parentId" && k !== "handles"),
|
|
41
44
|
// Retain measured dimensions from existing if present
|
|
42
45
|
..."measured" in existing && {
|
|
43
46
|
measured: {
|
|
@@ -54,7 +57,7 @@ function _update(current, updated) {
|
|
|
54
57
|
data
|
|
55
58
|
};
|
|
56
59
|
});
|
|
57
|
-
return
|
|
60
|
+
return shallowEqual(current, updated) ? current : updated;
|
|
58
61
|
}
|
|
59
62
|
function updateNodes(current, update) {
|
|
60
63
|
if (isDefined(update)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
|
-
import { JsxStyleProps } from '
|
|
2
|
+
import { JsxStyleProps } from '@likec4/styles/types';
|
|
3
3
|
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
4
4
|
export type MarkdownProps = Omit<ComponentPropsWithoutRef<'div'>, 'dangerouslySetInnerHTML' | 'children' | 'color'> & {
|
|
5
5
|
value: RichTextType;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoLayoutDirection } from '@likec4/core/types';
|
|
2
2
|
/**
|
|
3
3
|
* XYFlow requires handles to be defined on nodes.
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
5
|
+
export declare function DefaultHandles({ direction }: {
|
|
6
|
+
direction?: AutoLayoutDirection | undefined;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { nonexhaustive } from '@likec4/core';
|
|
2
3
|
import { Position, Handle } from '@xyflow/react';
|
|
3
|
-
import { memo, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
className: "likec4-node-handle-center"
|
|
5
|
+
function DefaultHandles({ direction = "TB" }) {
|
|
6
|
+
let sourcePosition, targetPosition;
|
|
7
|
+
switch (direction) {
|
|
8
|
+
case "TB": {
|
|
9
|
+
sourcePosition = Position.Bottom;
|
|
10
|
+
targetPosition = Position.Top;
|
|
11
|
+
break;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type: "target",
|
|
19
|
-
position,
|
|
20
|
-
className: "likec4-node-handle-center"
|
|
13
|
+
case "BT": {
|
|
14
|
+
sourcePosition = Position.Top;
|
|
15
|
+
targetPosition = Position.Bottom;
|
|
16
|
+
break;
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
case "LR": {
|
|
19
|
+
sourcePosition = Position.Right;
|
|
20
|
+
targetPosition = Position.Left;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
case "RL": {
|
|
24
|
+
sourcePosition = Position.Left;
|
|
25
|
+
targetPosition = Position.Right;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
default: {
|
|
29
|
+
nonexhaustive(direction);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Handle,
|
|
35
|
+
{
|
|
36
|
+
type: "source",
|
|
37
|
+
position: sourcePosition,
|
|
38
|
+
className: "likec4-node-handle-center"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
Handle,
|
|
43
|
+
{
|
|
44
|
+
type: "target",
|
|
45
|
+
position: targetPosition,
|
|
46
|
+
className: "likec4-node-handle-center"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
24
51
|
|
|
25
52
|
export { DefaultHandles };
|
|
@@ -6,8 +6,28 @@ 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.36.
|
|
9
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
10
|
|
|
11
|
+
const variants = {
|
|
12
|
+
normal: {
|
|
13
|
+
scale: 1,
|
|
14
|
+
x: 0,
|
|
15
|
+
y: 0
|
|
16
|
+
},
|
|
17
|
+
hovered: {
|
|
18
|
+
scale: 1.2,
|
|
19
|
+
x: -1,
|
|
20
|
+
y: -1
|
|
21
|
+
},
|
|
22
|
+
whileHover: {
|
|
23
|
+
scale: 1.4,
|
|
24
|
+
x: -3,
|
|
25
|
+
y: -1
|
|
26
|
+
},
|
|
27
|
+
whileTap: {
|
|
28
|
+
scale: 1
|
|
29
|
+
}
|
|
30
|
+
};
|
|
11
31
|
function CompoundActionButton({
|
|
12
32
|
data: {
|
|
13
33
|
hovered: isHovered = false
|
|
@@ -17,23 +37,18 @@ function CompoundActionButton({
|
|
|
17
37
|
}) {
|
|
18
38
|
const debounced = useDebouncedValue(isHovered, isHovered ? 130 : 0);
|
|
19
39
|
const isHoverDebounced = debounced[0] && isHovered;
|
|
40
|
+
let variant = isHoverDebounced ? "hovered" : "normal";
|
|
20
41
|
return /* @__PURE__ */ jsx(
|
|
21
42
|
m.div,
|
|
22
43
|
{
|
|
23
44
|
initial: false,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
whileHover: {
|
|
30
|
-
scale: 1.4,
|
|
31
|
-
x: -3,
|
|
32
|
-
y: -1
|
|
33
|
-
},
|
|
45
|
+
variants,
|
|
46
|
+
animate: variant,
|
|
47
|
+
whileHover: "whileHover",
|
|
48
|
+
whileTap: "whileTap",
|
|
34
49
|
className: "likec4-compound-navigation compound-action",
|
|
35
|
-
whileTap: { scale: 1 },
|
|
36
50
|
onClick: stopPropagation,
|
|
51
|
+
tabIndex: -1,
|
|
37
52
|
children: /* @__PURE__ */ jsx(
|
|
38
53
|
ActionIcon,
|
|
39
54
|
{
|
|
@@ -44,6 +59,7 @@ function CompoundActionButton({
|
|
|
44
59
|
}),
|
|
45
60
|
actionBtn({ variant: "transparent" })
|
|
46
61
|
),
|
|
62
|
+
tabIndex: -1,
|
|
47
63
|
onClick,
|
|
48
64
|
onDoubleClick: stopPropagation,
|
|
49
65
|
children: icon ?? /* @__PURE__ */ jsx(IconZoomScan, { stroke: 2 })
|
|
@@ -6,8 +6,24 @@ 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.36.
|
|
9
|
+
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
10
10
|
|
|
11
|
+
const variants = {
|
|
12
|
+
normal: {
|
|
13
|
+
scale: 1
|
|
14
|
+
// opacity: 0.6,
|
|
15
|
+
},
|
|
16
|
+
hovered: {
|
|
17
|
+
scale: 1.2
|
|
18
|
+
// opacity: 1,
|
|
19
|
+
},
|
|
20
|
+
whileHover: {
|
|
21
|
+
scale: 1.4
|
|
22
|
+
},
|
|
23
|
+
whileTap: {
|
|
24
|
+
scale: 1
|
|
25
|
+
}
|
|
26
|
+
};
|
|
11
27
|
function CompoundDetailsButton({
|
|
12
28
|
data: {
|
|
13
29
|
hovered: isHovered = false
|
|
@@ -17,19 +33,17 @@ function CompoundDetailsButton({
|
|
|
17
33
|
}) {
|
|
18
34
|
const debounced = useDebouncedValue(isHovered, isHovered ? 130 : 0);
|
|
19
35
|
const isHoverDebounced = debounced[0] && isHovered;
|
|
36
|
+
const variant = isHoverDebounced ? "hovered" : "normal";
|
|
20
37
|
return /* @__PURE__ */ jsx(
|
|
21
38
|
m.div,
|
|
22
39
|
{
|
|
23
40
|
initial: false,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
whileHover: {
|
|
29
|
-
scale: 1.4
|
|
30
|
-
},
|
|
31
|
-
whileTap: { scale: 1 },
|
|
41
|
+
variants,
|
|
42
|
+
animate: variant,
|
|
43
|
+
whileHover: "whileHover",
|
|
44
|
+
whileTap: "whileTap",
|
|
32
45
|
className: "likec4-compound-details details-button",
|
|
46
|
+
tabIndex: -1,
|
|
33
47
|
children: /* @__PURE__ */ jsx(
|
|
34
48
|
ActionIcon,
|
|
35
49
|
{
|
|
@@ -40,6 +54,7 @@ function CompoundDetailsButton({
|
|
|
40
54
|
}),
|
|
41
55
|
actionBtn({ variant: "transparent" })
|
|
42
56
|
),
|
|
57
|
+
tabIndex: -1,
|
|
43
58
|
onClick,
|
|
44
59
|
onDoubleClick: stopPropagation,
|
|
45
60
|
children: icon ?? /* @__PURE__ */ jsx(IconId, { stroke: 1.8, style: { width: "75%" } })
|
|
@@ -3,6 +3,8 @@ import { cx } from '@likec4/styles/css';
|
|
|
3
3
|
import { compoundNode } from '@likec4/styles/recipes';
|
|
4
4
|
import * as m from 'motion/react-m';
|
|
5
5
|
import { clamp } from 'remeda';
|
|
6
|
+
import { MAX_COMPOUND_DEPTH } from '../../base/const.js';
|
|
7
|
+
import { useLikeC4Styles } from '../../hooks/useLikeC4Styles.js';
|
|
6
8
|
|
|
7
9
|
function CompoundNodeContainer({
|
|
8
10
|
nodeProps: {
|
|
@@ -17,24 +19,25 @@ function CompoundNodeContainer({
|
|
|
17
19
|
style,
|
|
18
20
|
...rest
|
|
19
21
|
}) {
|
|
22
|
+
const styles = useLikeC4Styles();
|
|
20
23
|
let opacity = clamp(data.style.opacity ?? 100, {
|
|
21
24
|
min: 0,
|
|
22
25
|
max: 100
|
|
23
26
|
});
|
|
24
|
-
const isTransparent = opacity <
|
|
25
|
-
const MIN_OPACITY =
|
|
27
|
+
const isTransparent = opacity < 98;
|
|
28
|
+
const MIN_OPACITY = 50;
|
|
26
29
|
const borderOpacity = MIN_OPACITY + clamp((100 - MIN_OPACITY) * (opacity / 100), {
|
|
27
30
|
min: 0,
|
|
28
31
|
max: 100 - MIN_OPACITY
|
|
29
32
|
});
|
|
30
33
|
const compoundClass = compoundNode({
|
|
31
34
|
isTransparent,
|
|
32
|
-
inverseColor: opacity <
|
|
33
|
-
borderStyle: data.style.border ?? (isTransparent ?
|
|
35
|
+
inverseColor: opacity < 70,
|
|
36
|
+
borderStyle: data.style.border ?? (isTransparent ? styles.defaults.group.border : "none")
|
|
34
37
|
});
|
|
35
38
|
const depth = clamp(data.depth ?? 1, {
|
|
36
39
|
min: 1,
|
|
37
|
-
max:
|
|
40
|
+
max: MAX_COMPOUND_DEPTH
|
|
38
41
|
});
|
|
39
42
|
return /* @__PURE__ */ jsx(
|
|
40
43
|
m.div,
|
|
@@ -50,12 +53,12 @@ function CompoundNodeContainer({
|
|
|
50
53
|
...isDimmed !== false && {
|
|
51
54
|
"data-likec4-dimmed": isDimmed
|
|
52
55
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// @ts-expect-error
|
|
56
|
+
tabIndex: -1,
|
|
57
|
+
animate: {
|
|
56
58
|
["--_border-transparency"]: `${borderOpacity}%`,
|
|
57
59
|
["--_compound-transparency"]: `${opacity}%`
|
|
58
60
|
},
|
|
61
|
+
style,
|
|
59
62
|
...rest,
|
|
60
63
|
children
|
|
61
64
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Text } from '@mantine/core';
|
|
3
2
|
import { IconRenderer } from '../../context/IconRenderer.js';
|
|
4
3
|
|
|
5
4
|
function CompoundTitle({ data }) {
|
|
@@ -9,7 +8,7 @@ function CompoundTitle({ data }) {
|
|
|
9
8
|
});
|
|
10
9
|
return /* @__PURE__ */ jsxs("div", { className: "likec4-compound-title-container", children: [
|
|
11
10
|
elementIcon,
|
|
12
|
-
/* @__PURE__ */ jsx(
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "likec4-compound-title", children: data.title })
|
|
13
12
|
] });
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -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.36.
|
|
6
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
7
7
|
|
|
8
8
|
function EdgeActionButton({ icon, onClick }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -14,10 +14,11 @@ function EdgeContainer({
|
|
|
14
14
|
dimmed: isDimmed = false,
|
|
15
15
|
...data
|
|
16
16
|
},
|
|
17
|
-
animated,
|
|
17
|
+
animated = false,
|
|
18
18
|
children,
|
|
19
19
|
style
|
|
20
20
|
}) {
|
|
21
|
+
animated = animated || isActive;
|
|
21
22
|
const props = {
|
|
22
23
|
className: cx(
|
|
23
24
|
className,
|
|
@@ -28,8 +29,10 @@ function EdgeContainer({
|
|
|
28
29
|
"data-likec4-color": color,
|
|
29
30
|
"data-edge-dir": data.dir ?? "forward",
|
|
30
31
|
"data-edge-active": isActive,
|
|
31
|
-
"data-edge-animated": animated || isActive,
|
|
32
32
|
"data-likec4-hovered": isHovered,
|
|
33
|
+
...animated && {
|
|
34
|
+
"data-likec4-animated": animated
|
|
35
|
+
},
|
|
33
36
|
...selected && {
|
|
34
37
|
"data-likec4-selected": selected
|
|
35
38
|
},
|
|
@@ -20,12 +20,11 @@ const EdgeLabel = forwardRef(({
|
|
|
20
20
|
},
|
|
21
21
|
pointerEvents = "all",
|
|
22
22
|
className,
|
|
23
|
-
style: _style,
|
|
24
|
-
// omit
|
|
25
23
|
children,
|
|
26
24
|
...rest
|
|
27
25
|
}, ref) => {
|
|
28
26
|
const stepNum = isStepEdgeId(id) ? extractStep(id) : null;
|
|
27
|
+
const isStepEdge = stepNum !== null;
|
|
29
28
|
const hasLabel = isTruthy(label) || isTruthy(technology);
|
|
30
29
|
return /* @__PURE__ */ jsxs(
|
|
31
30
|
m.div,
|
|
@@ -36,8 +35,8 @@ const EdgeLabel = forwardRef(({
|
|
|
36
35
|
"likec4-edge-label",
|
|
37
36
|
edgeLabel({
|
|
38
37
|
pointerEvents,
|
|
39
|
-
isStepEdge
|
|
40
|
-
cursor: selectable ||
|
|
38
|
+
isStepEdge,
|
|
39
|
+
cursor: selectable || isStepEdge ? "pointer" : "default"
|
|
41
40
|
}),
|
|
42
41
|
className
|
|
43
42
|
),
|
|
@@ -14,5 +14,6 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
16
16
|
};
|
|
17
|
-
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style
|
|
17
|
+
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style: _, // omit styles for container
|
|
18
|
+
children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
19
|
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { EdgeLabelRenderer } from '@xyflow/react';
|
|
4
|
-
import { useCallback } from 'react';
|
|
5
4
|
import { isNumber } from 'remeda';
|
|
6
|
-
import { ZIndexes } from '../../base/const.js';
|
|
7
|
-
import { useXYStore } from '../../hooks/useXYFlow.js';
|
|
8
5
|
|
|
9
6
|
const toCssVarValue = (value) => {
|
|
10
|
-
if (value === void 0) return
|
|
11
|
-
return isNumber(value) ? `${Math.
|
|
7
|
+
if (value === void 0) return "";
|
|
8
|
+
return isNumber(value) ? `${Math.trunc(value)}px` : value;
|
|
12
9
|
};
|
|
13
10
|
function EdgeLabelContainer({
|
|
14
11
|
edgeProps: {
|
|
@@ -25,23 +22,17 @@ function EdgeLabelContainer({
|
|
|
25
22
|
},
|
|
26
23
|
labelPosition: labelXY,
|
|
27
24
|
className,
|
|
28
|
-
style,
|
|
25
|
+
style: _,
|
|
26
|
+
// omit styles for container
|
|
29
27
|
children,
|
|
30
28
|
...rest
|
|
31
29
|
}) {
|
|
32
|
-
let zIndex = useXYStore(
|
|
33
|
-
useCallback((state) => {
|
|
34
|
-
return state.edgeLookup.get(id)?.zIndex ?? ZIndexes.Edge;
|
|
35
|
-
}, [id])
|
|
36
|
-
);
|
|
37
|
-
if (isHovered || isActive) {
|
|
38
|
-
zIndex += 100;
|
|
39
|
-
}
|
|
40
30
|
let labelX = labelXY?.x ?? labelBBox?.x, labelY = labelXY?.y ?? labelBBox?.y;
|
|
41
31
|
if (labelX === void 0 || labelY === void 0) {
|
|
42
32
|
return null;
|
|
43
33
|
}
|
|
44
34
|
const translate = labelXY?.translate ?? "";
|
|
35
|
+
animated = animated || isActive;
|
|
45
36
|
return /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsx(
|
|
46
37
|
"div",
|
|
47
38
|
{
|
|
@@ -55,6 +46,9 @@ function EdgeLabelContainer({
|
|
|
55
46
|
"data-likec4-color": color,
|
|
56
47
|
"data-edge-active": isActive,
|
|
57
48
|
"data-edge-animated": animated || isActive,
|
|
49
|
+
...animated && {
|
|
50
|
+
"data-likec4-animated": animated
|
|
51
|
+
},
|
|
58
52
|
...selected !== false && {
|
|
59
53
|
"data-likec4-selected": selected
|
|
60
54
|
},
|
|
@@ -62,14 +56,17 @@ function EdgeLabelContainer({
|
|
|
62
56
|
"data-likec4-dimmed": isDimmed
|
|
63
57
|
},
|
|
64
58
|
style: {
|
|
65
|
-
...labelBBox && {
|
|
66
|
-
maxWidth: labelBBox.width + 18
|
|
67
|
-
},
|
|
68
|
-
zIndex,
|
|
69
|
-
...style,
|
|
70
59
|
transform: `translate(${toCssVarValue(labelX)}, ${toCssVarValue(labelY)}) ${translate}`
|
|
71
60
|
},
|
|
72
|
-
children
|
|
61
|
+
children: /* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
style: labelBBox ? {
|
|
65
|
+
maxWidth: labelBBox.width + 20
|
|
66
|
+
} : void 0,
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
)
|
|
73
70
|
},
|
|
74
71
|
id
|
|
75
72
|
) });
|