@likec4/diagram 1.60.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -11
- package/dist/LikeC4Diagram.d.mts +4 -6
- package/dist/LikeC4Diagram.mjs +13 -12
- package/dist/LikeC4Diagram.props.d.mts +5 -7
- package/dist/LikeC4MantineProvider.d.mts +1 -2
- package/dist/LikeC4MantineProvider.mjs +26 -11
- package/dist/LikeC4ModelProvider.d.mts +1 -3
- package/dist/LikeC4ModelProvider.mjs +1 -2
- package/dist/LikeC4ProjectsOverview.d.mts +1 -3
- package/dist/LikeC4ProjectsOverview.mjs +1 -2
- package/dist/LikeC4ProjectsProvider.d.mts +1 -2
- package/dist/LikeC4ProjectsProvider.mjs +2 -3
- package/dist/LikeC4Styles.d.mts +1 -2
- package/dist/LikeC4Styles.mjs +11 -6
- package/dist/LikeC4View.d.mts +3 -5
- package/dist/LikeC4View.mjs +12 -11
- package/dist/ReactLikeC4.d.mts +3 -5
- package/dist/ReactLikeC4.mjs +8 -7
- package/dist/StaticLikeC4Diagram.d.mts +1 -3
- package/dist/StaticLikeC4Diagram.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/base/Background.mjs +1 -2
- package/dist/base/Base.d.mts +1 -2
- package/dist/base/Base.mjs +1 -2
- package/dist/base/BaseXYFlow.mjs +12 -10
- package/dist/base/const.d.mts +1 -3
- package/dist/base/const.mjs +1 -2
- package/dist/base/keyboardZoom.mjs +1 -2
- package/dist/base/types.d.mts +2 -4
- package/dist/base/updateEdges.mjs +1 -2
- package/dist/base/updateNodes.mjs +1 -2
- package/dist/base-primitives/Markdown.d.mts +5 -5
- package/dist/base-primitives/Markdown.mjs +22 -11
- package/dist/base-primitives/NodeHandles.d.mts +1 -3
- package/dist/base-primitives/NodeHandles.mjs +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +1 -2
- package/dist/base-primitives/compound/CompoundTitle.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundTitle.mjs +1 -2
- package/dist/base-primitives/compound/actionbtns.css.mjs +1 -2
- package/dist/base-primitives/edge/EdgeActionButton.mjs +2 -3
- package/dist/base-primitives/edge/EdgeContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeLabel.mjs +3 -3
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeMarkers.mjs +1 -2
- package/dist/base-primitives/edge/EdgePath.mjs +1 -2
- package/dist/base-primitives/element/ElementActionButtons.d.mts +1 -2
- package/dist/base-primitives/element/ElementActionButtons.mjs +2 -3
- package/dist/base-primitives/element/ElementData.d.mts +1 -2
- package/dist/base-primitives/element/ElementData.mjs +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.mjs +2 -3
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +1 -2
- package/dist/base-primitives/element/ElementNodeContainer.mjs +2 -3
- package/dist/base-primitives/element/ElementShape.d.mts +11 -6
- package/dist/base-primitives/element/ElementShape.mjs +10 -5
- package/dist/base-primitives/element/ElementTags.d.mts +6 -3
- package/dist/base-primitives/element/ElementTags.mjs +2 -4
- package/dist/base-primitives/index.d.mts +5 -5
- package/dist/base-primitives/memoEdge.d.mts +2 -6
- package/dist/base-primitives/memoEdge.mjs +1 -2
- package/dist/base-primitives/memoNode.d.mts +2 -6
- package/dist/components/EmptyBox.mjs +1 -2
- package/dist/components/ErrorFallback.d.mts +4 -3
- package/dist/components/ErrorFallback.mjs +61 -56
- package/dist/components/FloatingWindow.mjs +3 -4
- package/dist/components/GithubIcon.mjs +1 -2
- package/dist/components/Link.mjs +3 -4
- package/dist/components/Logo.d.mts +3 -5
- package/dist/components/Logo.mjs +28 -35
- package/dist/components/NavigationLink.mjs +1 -2
- package/dist/components/NavigationPanel.mjs +11 -11
- package/dist/components/PortalToContainer.d.mts +1 -3
- package/dist/components/PortalToContainer.mjs +1 -2
- package/dist/components/RootContainer.mjs +1 -2
- package/dist/components/SearchControl.css.mjs +1 -2
- package/dist/components/SearchControl.d.mts +1 -2
- package/dist/components/SearchControl.mjs +2 -3
- package/dist/components/ViewIcon.mjs +5 -6
- package/dist/components/ViewNotFound.mjs +1 -2
- package/dist/components/markdown/MarkdownWithRefs.mjs +268 -0
- package/dist/components/markdown/markdown-refs.mjs +145 -0
- package/dist/components/markdown/useMarkdownRefsInteractivity.mjs +126 -0
- package/dist/context/ComparingLayoutsContext.mjs +24 -0
- package/dist/context/CurrentViewModelProvider.mjs +1 -2
- package/dist/context/DiagramEventHandlers.mjs +3 -4
- package/dist/context/DiagramFeatures.d.mts +2 -3
- package/dist/context/DiagramFeatures.mjs +15 -9
- package/dist/context/EnsureMantine.mjs +1 -2
- package/dist/context/FramerMotionConfig.d.mts +1 -3
- package/dist/context/FramerMotionConfig.mjs +1 -2
- package/dist/context/IconRenderer.d.mts +1 -3
- package/dist/context/IconRenderer.mjs +14 -14
- package/dist/context/LikeC4ModelContext.d.mts +1 -2
- package/dist/context/LikeC4ModelContext.mjs +1 -2
- package/dist/context/LikeC4ProjectsContext.d.mts +1 -3
- package/dist/context/LikeC4ProjectsContext.mjs +1 -2
- package/dist/context/RootContainerContext.mjs +1 -2
- package/dist/context/TagStylesContext.d.mts +1 -2
- package/dist/context/TagStylesContext.mjs +7 -19
- package/dist/custom/builtins.d.mts +4 -1
- package/dist/custom/customNodes.d.mts +164 -7
- package/dist/custom/customNodes.mjs +387 -8
- package/dist/custom/index.d.mts +18 -30
- package/dist/custom/index.mjs +11 -19
- package/dist/custom/primitives.d.mts +3 -5
- package/dist/customization/CustomizationContext.d.mts +50 -0
- package/dist/customization/CustomizationContext.mjs +64 -0
- package/dist/customization/customizable.d.mts +32 -0
- package/dist/customization/customizable.mjs +75 -0
- package/dist/customization/customization-types.d.mts +40 -0
- package/dist/customization/customization-types.mjs +8 -0
- package/dist/customization/stableComponents.mjs +35 -0
- package/dist/editor/LikeC4EditorCallbacks.d.mts +1 -3
- package/dist/editor/LikeC4EditorCallbacks.mjs +1 -2
- package/dist/editor/LikeC4EditorProvider.d.mts +1 -3
- package/dist/editor/LikeC4EditorProvider.mjs +1 -2
- package/dist/editor/actor/actions.mjs +2 -3
- package/dist/editor/actor/hotkey.d.mts +1 -3
- package/dist/editor/actor/hotkey.mjs +1 -2
- package/dist/editor/actor/machine.d.mts +2 -4
- package/dist/editor/actor/machine.mjs +1 -2
- package/dist/editor/actor/setup.d.mts +1 -2
- package/dist/editor/actor/setup.mjs +1 -2
- package/dist/editor/actor/state.editor.mjs +2 -3
- package/dist/editor/actor/state.sync-queue.mjs +2 -3
- package/dist/editor/actor/types.d.mts +1 -3
- package/dist/editor/actor/types.mjs +1 -2
- package/dist/editor/applyChangesToManualLayout.mjs +1 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/useEditorActorLogic.mjs +3 -4
- package/dist/hooks/safeContext.d.mts +16 -35
- package/dist/hooks/safeContext.mjs +1 -2
- package/dist/hooks/useCallbackRef.mjs +1 -2
- package/dist/hooks/useCurrentView.d.mts +1 -3
- package/dist/hooks/useCurrentView.mjs +1 -2
- package/dist/hooks/useCurrentViewModel.d.mts +0 -2
- package/dist/hooks/useCurrentViewModel.mjs +1 -2
- package/dist/hooks/useDiagram.d.mts +3 -12
- package/dist/hooks/useDiagram.mjs +11 -10
- package/dist/hooks/useDiagramCompareLayout.d.mts +2 -4
- package/dist/hooks/useDiagramCompareLayout.mjs +12 -21
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +2 -3
- package/dist/hooks/useEditorActor.mjs +1 -2
- package/dist/hooks/useId.mjs +1 -2
- package/dist/hooks/useLikeC4ElementsTree.mjs +1 -2
- package/dist/hooks/useLikeC4Model.d.mts +0 -2
- package/dist/hooks/useLikeC4Model.mjs +1 -2
- package/dist/hooks/useLikeC4Project.d.mts +2 -4
- package/dist/hooks/useLikeC4Project.mjs +1 -2
- package/dist/hooks/useLikeC4Styles.d.mts +1 -3
- package/dist/hooks/useLikeC4Styles.mjs +1 -2
- package/dist/hooks/useMantinePortalProps.mjs +1 -2
- package/dist/hooks/useSetState.mjs +1 -2
- package/dist/hooks/useUpdateEffect.d.mts +0 -2
- package/dist/hooks/useUpdateEffect.mjs +1 -2
- package/dist/hooks/useXYFlow.d.mts +1 -3
- package/dist/hooks/useXYFlow.mjs +1 -2
- package/dist/index.d.mts +20 -18
- package/dist/index.mjs +20 -18
- package/dist/likec4diagram/DiagramUI.mjs +14 -11
- package/dist/likec4diagram/DiagramXYFlow.mjs +34 -34
- package/dist/likec4diagram/convert-to-xyflow.mjs +7 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +18 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +2 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +2 -3
- package/dist/likec4diagram/custom/index.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +1 -2
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +2 -3
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +3 -5
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -1
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/index.d.mts +4 -4
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/nodes.mjs +19 -21
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +4 -6
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +29 -12
- package/dist/likec4diagram/relationship-popover/actor.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/components.mjs +1 -2
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +22 -34
- package/dist/likec4diagram/state/aligners.d.mts +1 -3
- package/dist/likec4diagram/state/aligners.mjs +1 -2
- package/dist/likec4diagram/state/assign.mjs +3 -4
- package/dist/likec4diagram/state/createViewChange.mjs +1 -2
- package/dist/likec4diagram/state/diagram-api.d.mts +33 -16
- package/dist/likec4diagram/state/diagram-api.mjs +55 -31
- package/dist/likec4diagram/state/hotkeyActor.d.mts +1 -3
- package/dist/likec4diagram/state/hotkeyActor.mjs +12 -6
- package/dist/likec4diagram/state/machine.actions.layout.mjs +2 -3
- package/dist/likec4diagram/state/machine.actions.mjs +81 -44
- package/dist/likec4diagram/state/machine.d.mts +107 -15
- package/dist/likec4diagram/state/machine.mjs +3 -4
- package/dist/likec4diagram/state/machine.setup.d.mts +14 -10
- package/dist/likec4diagram/state/machine.setup.mjs +55 -28
- package/dist/likec4diagram/state/machine.state.initializing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.navigating.mjs +3 -6
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.mjs +8 -8
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +5 -6
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +1 -3
- package/dist/likec4diagram/state/mediaPrintActor.mjs +1 -2
- package/dist/likec4diagram/state/persistence.mjs +12 -5
- package/dist/likec4diagram/state/types.d.mts +1 -3
- package/dist/likec4diagram/state/utils.mjs +2 -3
- package/dist/likec4diagram/types.d.mts +1 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +5 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +1 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +6 -7
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +3 -4
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +4 -7
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +4 -5
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +4 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +3 -9
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +1 -2
- package/dist/likec4diagram/useLayoutConstraints.mjs +5 -10
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +9 -2
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +1 -2
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +3 -6
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +1 -2
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +1 -2
- package/dist/navigationpanel/ElementViewControls.mjs +6 -7
- package/dist/navigationpanel/NavigationPanel.mjs +38 -67
- package/dist/navigationpanel/NavigationPanelControls.mjs +35 -114
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +37 -34
- package/dist/navigationpanel/_common.mjs +3 -4
- package/dist/navigationpanel/actor.actions.mjs +1 -2
- package/dist/navigationpanel/actor.d.mts +0 -2
- package/dist/navigationpanel/actor.mjs +2 -3
- package/dist/navigationpanel/actor.setup.d.mts +1 -3
- package/dist/navigationpanel/actor.setup.mjs +1 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +160 -90
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +173 -142
- package/dist/{likec4diagram/ui → navigationpanel/comparepanel}/LayoutDriftFrame.mjs +6 -12
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +14 -19
- package/dist/navigationpanel/controls/LayoutWarning.mjs +3 -4
- package/dist/navigationpanel/controls/LogoButton.mjs +5 -23
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +3 -4
- package/dist/navigationpanel/controls/OpenSource.mjs +2 -3
- package/dist/navigationpanel/controls/SearchControl.mjs +2 -3
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +36 -21
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +12 -15
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +46 -13
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +3 -4
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +2 -3
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +3 -4
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +4 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +11 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +2 -3
- package/dist/navigationpanel/editorpanel/_common.mjs +1 -2
- package/dist/navigationpanel/editorpanel/styles.mjs +1 -2
- package/dist/navigationpanel/hooks.mjs +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +5 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +7 -9
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +1 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +3 -4
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +44 -38
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +1 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCaretRightFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +1 -2
- package/dist/overlays/Overlays.mjs +4 -5
- package/dist/overlays/element-details/ElementDetails.mjs +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +148 -102
- package/dist/overlays/element-details/ElementDetailsCard.mjs +503 -256
- package/dist/overlays/element-details/MetadataValue.mjs +115 -222
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelDeployments.mjs +5 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelRelationships.mjs +6 -7
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelStructure.mjs +3 -4
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +6 -7
- package/dist/overlays/element-details/actor.mjs +31 -15
- package/dist/overlays/element-details/actorContext.mjs +1 -2
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +1 -2
- package/dist/overlays/overlay/Overlay.d.mts +1 -3
- package/dist/overlays/overlay/Overlay.mjs +4 -5
- package/dist/overlays/overlaysActor.d.mts +12 -5
- package/dist/overlays/overlaysActor.mjs +24 -6
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +16 -8
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +1 -2
- package/dist/overlays/relationship-details/SelectEdge.mjs +3 -4
- package/dist/overlays/relationship-details/_types.d.mts +6 -4
- package/dist/overlays/relationship-details/actor.d.mts +0 -2
- package/dist/overlays/relationship-details/actor.mjs +2 -3
- package/dist/overlays/relationship-details/compute.mjs +1 -2
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +8 -13
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +8 -6
- package/dist/overlays/relationship-details/hooks.mjs +1 -2
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +3 -3
- package/dist/overlays/relationship-details/layout.d.mts +1 -3
- package/dist/overlays/relationship-details/layout.mjs +39 -13
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +12 -13
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +1 -2
- package/dist/overlays/relationships-browser/SelectElement.mjs +4 -5
- package/dist/overlays/relationships-browser/_types.d.mts +6 -4
- package/dist/overlays/relationships-browser/actor.d.mts +0 -2
- package/dist/overlays/relationships-browser/actor.mjs +4 -5
- package/dist/overlays/relationships-browser/const.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +14 -17
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +12 -7
- package/dist/overlays/relationships-browser/hooks.mjs +1 -2
- package/dist/overlays/relationships-browser/layout.d.mts +1 -3
- package/dist/overlays/relationships-browser/layout.mjs +73 -24
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +2 -2
- package/dist/overlays/types.d.mts +5 -7
- package/dist/projects-overview/ProjectsOverview.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverview.mjs +1 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverviewXY.mjs +3 -4
- package/dist/projects-overview/actor.mjs +1 -2
- package/dist/projects-overview/context.mjs +1 -2
- package/dist/projects-overview/custom/edgeTypes.mjs +2 -3
- package/dist/projects-overview/custom/nodeTypes.mjs +3 -4
- package/dist/projects-overview/hooks.mjs +1 -2
- package/dist/projects-overview/layouted-to-xyflow.mjs +1 -2
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +1 -2
- package/dist/projects-overview/persistence.mjs +1 -2
- package/dist/search/Search.d.mts +1 -3
- package/dist/search/Search.mjs +13 -12
- package/dist/search/SearchContext.d.mts +1 -3
- package/dist/search/SearchContext.mjs +1 -2
- package/dist/search/XStateSearchAdapter.mjs +1 -2
- package/dist/search/components/ElementsColumn.css.mjs +1 -2
- package/dist/search/components/ElementsColumn.mjs +31 -9
- package/dist/search/components/PickView.mjs +3 -4
- package/dist/search/components/SearchByTags.mjs +3 -4
- package/dist/search/components/SearchInput.mjs +3 -4
- package/dist/search/components/ViewsColum.mjs +20 -20
- package/dist/search/components/ViewsColumn.css.mjs +1 -2
- package/dist/search/components/_shared.css.mjs +1 -2
- package/dist/search/components/styles.css.mjs +1 -2
- package/dist/search/components/utils.mjs +32 -3
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +1 -2
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +1 -3
- package/dist/search/searchActor.mjs +1 -2
- package/dist/shadowroot/ShadowRoot.mjs +8 -7
- package/dist/styles-font2.mjs +1 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles2.mjs +2 -3
- package/dist/utils/defineActors.d.mts +1 -3
- package/dist/utils/defineActors.mjs +1 -2
- package/dist/utils/edge-corners.mjs +2 -3
- package/dist/utils/edge-endpoints.mjs +1 -2
- package/dist/utils/edge-label.mjs +1 -2
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +1 -2
- package/dist/utils/edge-tracks.mjs +1 -2
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +1 -2
- package/dist/utils/roundDpr.mjs +1 -2
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +1 -3
- package/dist/utils/view-bounds.mjs +1 -2
- package/dist/utils/view-routing.mjs +1 -2
- package/dist/utils/xyflow.mjs +2 -3
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +29 -26
- package/panda.buildinfo.json +211 -208
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/memoNode.mjs +0 -23
- package/dist/context/DiagramEventHandlers.d.mts +0 -11
- package/dist/custom/hooks.d.mts +0 -17
- package/dist/hooks/useSetState.d.mts +0 -10
- package/dist/likec4diagram/custom/edges/edges.css.mjs +0 -50
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.mjs +0 -69
- package/dist/navigationpanel/comparepanel/ComparePanelControls.mjs +0 -56
- package/dist/navigationpanel/styles.css.mjs +0 -23
- package/src/styles-font.css +0 -114
- package/src/styles-min.css +0 -2
- package/src/styles-xyflow.css +0 -1
- package/src/styles.css +0 -3
package/dist/ReactLikeC4.mjs
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { __name } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { ErrorMessage, ViewNotFound } from "./components/ViewNotFound.mjs";
|
|
3
|
+
import { customizable } from "./customization/customizable.mjs";
|
|
2
4
|
import { useOptionalLikeC4Model } from "./context/LikeC4ModelContext.mjs";
|
|
3
|
-
import { pickViewBounds } from "./utils/view-bounds.mjs";
|
|
4
5
|
import { LikeC4Diagram } from "./LikeC4Diagram.mjs";
|
|
5
|
-
import { ErrorMessage, ViewNotFound } from "./components/ViewNotFound.mjs";
|
|
6
6
|
import { ShadowRoot } from "./shadowroot/ShadowRoot.mjs";
|
|
7
|
+
import { pickViewBounds } from "./utils/view-bounds.mjs";
|
|
7
8
|
import { cx } from "@likec4/styles/css";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// src/ReactLikeC4.tsx
|
|
11
12
|
/**
|
|
12
13
|
* Ready-to-use component to display embedded LikeC4 view, same as {@link LikeC4View}
|
|
13
14
|
* But provides more control over the diagram
|
|
14
15
|
*
|
|
15
16
|
* Component is wrapped in ShadowRoot to isolate styles.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
const ReactLikeC4 = customizable("ReactLikeC4")((properties) => {
|
|
19
|
+
let { viewId, layoutType = "manual", className, colorScheme, injectFontCss = true, enableNotations, keepAspectRatio, style, mantineTheme, styleNonce, ...props } = properties;
|
|
18
20
|
const likec4model = useOptionalLikeC4Model();
|
|
19
21
|
if (!likec4model) return /* @__PURE__ */ jsx(ErrorMessage, { children: "LikeC4Model not found. Make sure you provided LikeC4ModelProvider." });
|
|
20
22
|
const viewModel = likec4model.findView(viewId);
|
|
@@ -24,7 +26,7 @@ function ReactLikeC4({ viewId, layoutType: initialLayoutType = "manual", classNa
|
|
|
24
26
|
viewId,
|
|
25
27
|
"\" is not layouted. Make sure you have LikeC4ModelProvider with layouted model."
|
|
26
28
|
] });
|
|
27
|
-
const view =
|
|
29
|
+
const view = layoutType !== "auto" ? viewModel.$layouted : viewModel.$view;
|
|
28
30
|
const bounds = pickViewBounds(view, props.dynamicViewVariant);
|
|
29
31
|
const hasNotations = !!enableNotations && (view.notation?.nodes?.length ?? 0) > 0;
|
|
30
32
|
return /* @__PURE__ */ jsx(ShadowRoot, {
|
|
@@ -41,7 +43,6 @@ function ReactLikeC4({ viewId, layoutType: initialLayoutType = "manual", classNa
|
|
|
41
43
|
...props
|
|
42
44
|
})
|
|
43
45
|
});
|
|
44
|
-
}
|
|
46
|
+
});
|
|
45
47
|
|
|
46
|
-
//#endregion
|
|
47
48
|
export { ReactLikeC4 };
|
|
@@ -2,7 +2,6 @@ import { __name } from "./_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { LikeC4DiagramProperties } from "./LikeC4Diagram.props.mjs";
|
|
3
3
|
import { JSX } from "react/jsx-runtime";
|
|
4
4
|
import { Any, UnknownLayouted } from "@likec4/core/types";
|
|
5
|
-
//#region src/StaticLikeC4Diagram.d.ts
|
|
6
5
|
export type StaticLikeC4DiagramProps<A extends Any> = Pick<LikeC4DiagramProperties<A>, 'view' | 'className' | 'fitView' | 'fitViewPadding' | 'background' | 'enableElementDetails' | 'enableRelationshipDetails' | 'enableRelationshipBrowser' | 'relationshipBrowserScope' | 'enableElementTags' | 'reduceGraphics' | 'initialWidth' | 'initialHeight' | 'initialZoom' | 'maxZoom' | 'minZoom' | 'renderIcon' | 'renderNodes' | 'dynamicViewVariant' | 'where'>;
|
|
7
6
|
/**
|
|
8
7
|
* StaticLikeC4Diagram is a component that renders a LikeC4 diagram in a static way.
|
|
@@ -10,5 +9,4 @@ export type StaticLikeC4DiagramProps<A extends Any> = Pick<LikeC4DiagramProperti
|
|
|
10
9
|
*
|
|
11
10
|
* @internal
|
|
12
11
|
*/
|
|
13
|
-
export declare function StaticLikeC4Diagram<A extends Any = UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, className, ...rest }: StaticLikeC4DiagramProps<A>): JSX.Element;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare function StaticLikeC4Diagram<A extends Any = UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, className, ...rest }: StaticLikeC4DiagramProps<A>): JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { LikeC4Diagram } from "./LikeC4Diagram.mjs";
|
|
|
3
3
|
import { cx } from "@likec4/styles/css";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/StaticLikeC4Diagram.tsx
|
|
7
7
|
/**
|
|
8
8
|
* StaticLikeC4Diagram is a component that renders a LikeC4 diagram in a static way.
|
|
9
9
|
* (Export/Embed)
|
|
@@ -36,5 +36,4 @@ function StaticLikeC4Diagram({ view, fitView = true, fitViewPadding = "8px", ena
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { StaticLikeC4Diagram };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", {
|
|
4
4
|
value,
|
|
@@ -18,5 +18,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
18
18
|
return target;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { __exportAll, __name };
|
package/dist/base/Background.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { Background, BackgroundVariant } from "@xyflow/react";
|
|
|
5
5
|
import { deepEqual } from "fast-equals";
|
|
6
6
|
import { nonexhaustive } from "@likec4/core";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/base/Background.tsx
|
|
9
9
|
function literalToEnum(value) {
|
|
10
10
|
switch (value) {
|
|
11
11
|
case "dots": return BackgroundVariant.Dots;
|
|
@@ -28,5 +28,4 @@ const Background$1 = memo(({ background }) => {
|
|
|
28
28
|
}, compareProps);
|
|
29
29
|
Background$1.displayName = "Background";
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { Background$1 as Background };
|
package/dist/base/Base.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
//#region src/base/Base.d.ts
|
|
3
2
|
type WithDimmed = {
|
|
4
3
|
data: {
|
|
5
4
|
dimmed?: Base.Dimmed;
|
|
@@ -27,4 +26,4 @@ export declare const Base: {
|
|
|
27
26
|
export declare namespace Base {
|
|
28
27
|
type Dimmed = 'immediate' | boolean;
|
|
29
28
|
}
|
|
30
|
-
|
|
29
|
+
export {};
|
package/dist/base/Base.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { deepEqual } from "fast-equals";
|
|
3
3
|
import { entries } from "remeda";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/base/Base.ts
|
|
6
6
|
const mergeData = (v, data) => Object.assign({}, v, { data: Object.assign({}, v.data, data) });
|
|
7
7
|
const _setDimmed = (v, dimmed) => (v.data.dimmed ?? false) === dimmed ? v : mergeData(v, { dimmed });
|
|
8
8
|
function setDimmed(arg1, arg2) {
|
|
@@ -32,5 +32,4 @@ const Base = {
|
|
|
32
32
|
setData
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { Base, hasSubObject$1 as hasSubObject };
|
package/dist/base/BaseXYFlow.mjs
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { MaxZoom, MinZoom } from "./const.mjs";
|
|
3
|
-
import { Background as Background$1 } from "./Background.mjs";
|
|
4
2
|
import { useCallbackRef } from "../hooks/useCallbackRef.mjs";
|
|
5
3
|
import { useUpdateEffect } from "../hooks/useUpdateEffect.mjs";
|
|
6
4
|
import { useIsZoomTooSmall, useXYFlow, useXYStoreApi } from "../hooks/useXYFlow.mjs";
|
|
7
5
|
import { roundDpr } from "../utils/roundDpr.mjs";
|
|
8
6
|
import { stopPropagation } from "../utils/xyflow.mjs";
|
|
7
|
+
import { Background as Background$1 } from "./Background.mjs";
|
|
9
8
|
import { Base } from "./Base.mjs";
|
|
9
|
+
import { MaxZoom, MinZoom } from "./const.mjs";
|
|
10
10
|
import { getKeyboardZoomAction } from "./keyboardZoom.mjs";
|
|
11
11
|
import { cx } from "@likec4/styles/css";
|
|
12
12
|
import { useMemo } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
import {
|
|
14
|
+
import { ReactFlow, useStore } from "@xyflow/react";
|
|
15
|
+
import { isEmptyish } from "remeda";
|
|
15
16
|
import { useMantineColorScheme } from "@mantine/core";
|
|
17
|
+
import { defaultAriaLabelConfig } from "@xyflow/system";
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
// src/base/BaseXYFlow.tsx
|
|
18
20
|
const likec4AriaLabelConfig = {
|
|
21
|
+
...defaultAriaLabelConfig,
|
|
19
22
|
"node.a11yDescription.default": "Press Enter or Space to select this node and reveal its actions.",
|
|
20
23
|
"node.a11yDescription.keyboardDisabled": "Keyboard activation is disabled.",
|
|
21
24
|
"edge.a11yDescription.default": "Press Enter or Space to select this relationship and reveal its actions."
|
|
@@ -41,7 +44,7 @@ function activateFocusedElement(event) {
|
|
|
41
44
|
view
|
|
42
45
|
}));
|
|
43
46
|
}
|
|
44
|
-
function BaseXYFlow({ nodes, edges, onEdgesChange, onNodesChange, className, pannable
|
|
47
|
+
function BaseXYFlow({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background = "dots", children, colorMode, fitViewPadding = 0, zoomOnDoubleClick = false, onViewportResize, onMoveEnd, onNodeMouseEnter, onNodeMouseLeave, onEdgeMouseEnter, onEdgeMouseLeave, onKeyDownCapture, ariaLabelConfig, nodesFocusable = nodesDraggable || nodesSelectable, edgesFocusable = false, showControls = false, minZoom = MinZoom, maxZoom = 3, ...props }) {
|
|
45
48
|
const fitViewOptions = useMemo(() => ({
|
|
46
49
|
minZoom,
|
|
47
50
|
maxZoom: Math.min(maxZoom, 1),
|
|
@@ -92,7 +95,7 @@ function BaseXYFlow({ nodes, edges, onEdgesChange, onNodesChange, className, pan
|
|
|
92
95
|
minZoom: zoomable ? minZoom : 1,
|
|
93
96
|
fitViewOptions,
|
|
94
97
|
preventScrolling: zoomable || pannable,
|
|
95
|
-
defaultMarkerColor:
|
|
98
|
+
defaultMarkerColor: null,
|
|
96
99
|
noDragClassName: "nodrag",
|
|
97
100
|
noPanClassName: "nopan",
|
|
98
101
|
noWheelClassName: "nowheel",
|
|
@@ -106,13 +109,13 @@ function BaseXYFlow({ nodes, edges, onEdgesChange, onNodesChange, className, pan
|
|
|
106
109
|
nodesFocusable,
|
|
107
110
|
edgesFocusable,
|
|
108
111
|
nodesDraggable,
|
|
109
|
-
ariaLabelConfig: {
|
|
112
|
+
ariaLabelConfig: isEmptyish(ariaLabelConfig) ? likec4AriaLabelConfig : {
|
|
110
113
|
...likec4AriaLabelConfig,
|
|
111
114
|
...ariaLabelConfig
|
|
112
115
|
},
|
|
113
116
|
nodeDragThreshold: 4,
|
|
114
|
-
nodeClickDistance:
|
|
115
|
-
paneClickDistance:
|
|
117
|
+
nodeClickDistance: 2,
|
|
118
|
+
paneClickDistance: 2,
|
|
116
119
|
elevateNodesOnSelect: false,
|
|
117
120
|
selectNodesOnDrag: false,
|
|
118
121
|
onNodesChange,
|
|
@@ -205,5 +208,4 @@ const ViewportResizeHanlder = ({ onViewportResize }) => {
|
|
|
205
208
|
return null;
|
|
206
209
|
};
|
|
207
210
|
|
|
208
|
-
//#endregion
|
|
209
211
|
export { BaseXYFlow };
|
package/dist/base/const.d.mts
CHANGED
package/dist/base/const.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/base/const.ts
|
|
2
2
|
const ZIndexes = {
|
|
3
3
|
Compound: 1,
|
|
4
4
|
Edge: 20,
|
|
@@ -19,5 +19,4 @@ const FitViewPaddings = {
|
|
|
19
19
|
};
|
|
20
20
|
const IS_SERVER = typeof window === "undefined";
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { FitViewPaddings, IS_SERVER, MaxZoom, MinZoom, ZIndexes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/keyboardZoom.ts
|
|
4
4
|
function isEditableKeyboardTarget(target) {
|
|
5
5
|
if (!(target instanceof HTMLElement)) return false;
|
|
6
6
|
const tagName = target.tagName.toLowerCase();
|
|
@@ -18,5 +18,4 @@ function getKeyboardZoomAction(event) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { getKeyboardZoomAction, isEditableKeyboardTarget };
|
package/dist/base/types.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { Base } from "./Base.mjs";
|
|
3
3
|
import { Edge, EdgeProps, Node, NodeProps } from "@xyflow/react";
|
|
4
4
|
import { OptionalKeysOf, SetRequired, Simplify } from "type-fest";
|
|
5
|
-
//#region src/base/types.d.ts
|
|
6
5
|
export type BaseNodeData = {
|
|
7
6
|
/**
|
|
8
7
|
* Whether the cursor is hovering over the node
|
|
@@ -29,7 +28,7 @@ export type BaseEdgeData = {
|
|
|
29
28
|
*/
|
|
30
29
|
dimmed?: Base.Dimmed;
|
|
31
30
|
};
|
|
32
|
-
export type BaseNode<Data extends Record<string, unknown> = Record<string, unknown>, NodeType extends string = string> = SetRequired<Node<Data & BaseNodeData, NodeType>, 'type' | 'initialWidth' | 'initialHeight'
|
|
31
|
+
export type BaseNode<Data extends Record<string, unknown> = Record<string, unknown>, NodeType extends string = string> = Simplify<SetRequired<Node<Data & BaseNodeData, NodeType>, 'type' | 'initialWidth' | 'initialHeight'>>;
|
|
33
32
|
export interface BaseEdge<Data extends Record<string, unknown> = Record<string, unknown>, EdgeType extends string = string> extends SetRequired<Edge<Data & BaseEdgeData, EdgeType>, 'type' | 'data'> {}
|
|
34
33
|
/**
|
|
35
34
|
* ReactFlow Base Node properties with BaseNodeData at least
|
|
@@ -58,5 +57,4 @@ export type BaseEdgePropsWithData<Data extends Record<string, unknown>> = BaseEd
|
|
|
58
57
|
* // luckyNumber: number | undefined
|
|
59
58
|
* // }
|
|
60
59
|
*/
|
|
61
|
-
export type NonOptional<T extends object, Keys extends OptionalKeysOf<T> = OptionalKeysOf<T>> = Simplify<{ [P in Exclude<keyof T, Keys>]: T[P]; } & { [P in Keys]-?: T[P] | undefined; }>;
|
|
62
|
-
//#endregion
|
|
60
|
+
export type NonOptional<T extends object, Keys extends OptionalKeysOf<T> = OptionalKeysOf<T>> = Simplify<{ [P in Exclude<keyof T, Keys>]: T[P]; } & { [P in Keys]-?: T[P] | undefined; }>;
|
|
@@ -3,7 +3,7 @@ import { hasSubObject as hasSubObject$1 } from "./Base.mjs";
|
|
|
3
3
|
import { deepEqual } from "fast-equals";
|
|
4
4
|
import { isDefined, isShallowEqual, pickBy } from "remeda";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/base/updateEdges.ts
|
|
7
7
|
const EMPTY_OBJ = {};
|
|
8
8
|
function _update(current, updated) {
|
|
9
9
|
if (current === updated) return current;
|
|
@@ -32,5 +32,4 @@ function updateEdges(current, update) {
|
|
|
32
32
|
return (current) => _update(current, update);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { updateEdges };
|
|
@@ -3,7 +3,7 @@ import { deepEqual, shallowEqual } from "fast-equals";
|
|
|
3
3
|
import { hasSubObject, isDefined, pickBy } from "remeda";
|
|
4
4
|
import { getNodeDimensions } from "@xyflow/system";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/base/updateNodes.ts
|
|
7
7
|
const EMPTY_OBJ = {};
|
|
8
8
|
function _update(current, updated) {
|
|
9
9
|
if (current === updated) return current;
|
|
@@ -43,5 +43,4 @@ function updateNodes(current, update) {
|
|
|
43
43
|
return (existing) => _update(existing, update);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
export { updateNodes };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import "react";
|
|
2
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
3
3
|
import { Tokens } from "@likec4/styles/tokens";
|
|
4
4
|
import { RichTextOrEmpty } from "@likec4/core/types";
|
|
5
|
-
//#region src/base-primitives/Markdown.d.ts
|
|
6
5
|
export declare const Markdown: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "color" | "children" | "dangerouslySetInnerHTML" | "translate"> & {
|
|
7
|
-
value: RichTextOrEmpty
|
|
6
|
+
value: RichTextOrEmpty | {
|
|
7
|
+
html: string;
|
|
8
|
+
};
|
|
8
9
|
/**
|
|
9
10
|
* When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
|
|
10
11
|
* @default false
|
|
@@ -30,5 +31,4 @@ export declare const Markdown: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
30
31
|
* @default "no content"
|
|
31
32
|
*/
|
|
32
33
|
emptyText?: string;
|
|
33
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
-
//#endregion
|
|
34
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,25 +3,37 @@ import { cx } from "@likec4/styles/css";
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Text } from "@mantine/core";
|
|
6
|
+
import { nonNullable } from "@likec4/core/utils";
|
|
7
|
+
import { isRichText } from "@likec4/core/types";
|
|
6
8
|
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
7
9
|
import { markdownBlock } from "@likec4/styles/recipes";
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
// src/base-primitives/Markdown.tsx
|
|
10
12
|
const Markdown = forwardRef(({ value, textScale = 1, uselikec4palette = false, hideIfEmpty = false, emptyText = "no content", className, style, fontSize, ...props }, ref) => {
|
|
11
|
-
if (value.isEmpty && hideIfEmpty) return null;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (isRichText(value) && value.isEmpty && hideIfEmpty) return null;
|
|
14
|
+
const isMarkdown = !isRichText(value) || value.nonEmpty && value.isMarkdown;
|
|
15
|
+
let content;
|
|
16
|
+
switch (true) {
|
|
17
|
+
case isMarkdown:
|
|
18
|
+
content = { dangerouslySetInnerHTML: { __html: nonNullable(value.html, "Markdown html is required") } };
|
|
19
|
+
break;
|
|
20
|
+
case isRichText(value) && value.nonEmpty:
|
|
21
|
+
content = { children: /* @__PURE__ */ jsx("p", { children: value.text }) };
|
|
22
|
+
break;
|
|
23
|
+
default: content = { children: /* @__PURE__ */ jsx(Text, {
|
|
24
|
+
component: "span",
|
|
25
|
+
fz: "xs",
|
|
26
|
+
c: "dimmed",
|
|
27
|
+
style: { userSelect: "none" },
|
|
28
|
+
children: emptyText
|
|
29
|
+
}) };
|
|
30
|
+
}
|
|
19
31
|
return /* @__PURE__ */ jsx(Box$1, {
|
|
20
32
|
...props,
|
|
21
33
|
ref,
|
|
22
34
|
className: cx(markdownBlock({
|
|
23
35
|
uselikec4palette,
|
|
24
|
-
value:
|
|
36
|
+
value: isMarkdown ? "markdown" : "plaintext"
|
|
25
37
|
}), className),
|
|
26
38
|
style: {
|
|
27
39
|
...style,
|
|
@@ -33,5 +45,4 @@ const Markdown = forwardRef(({ value, textScale = 1, uselikec4palette = false, h
|
|
|
33
45
|
});
|
|
34
46
|
Markdown.displayName = "Markdown";
|
|
35
47
|
|
|
36
|
-
//#endregion
|
|
37
48
|
export { Markdown };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { AutoLayoutDirection } from "@likec4/core/types";
|
|
3
|
-
//#region src/base-primitives/NodeHandles.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* XYFlow requires handles to be defined on nodes.
|
|
6
5
|
*/
|
|
7
6
|
export declare function DefaultHandles({ direction }: {
|
|
8
7
|
direction?: AutoLayoutDirection | undefined;
|
|
9
|
-
}): import("react").JSX.Element;
|
|
10
|
-
//#endregion
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Handle, Position } from "@xyflow/react";
|
|
4
4
|
import { nonexhaustive } from "@likec4/core";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/base-primitives/NodeHandles.tsx
|
|
7
7
|
/**
|
|
8
8
|
* XYFlow requires handles to be defined on nodes.
|
|
9
9
|
*/
|
|
@@ -40,5 +40,4 @@ function DefaultHandles({ direction = "TB" }) {
|
|
|
40
40
|
})] });
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
//#endregion
|
|
44
43
|
export { DefaultHandles };
|
|
@@ -2,11 +2,10 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { BaseNodeProps } from "../../base/types.mjs";
|
|
3
3
|
import { MouseEvent, ReactNode } from "react";
|
|
4
4
|
import { Simplify } from "type-fest";
|
|
5
|
-
//#region src/base-primitives/compound/CompoundActionButton.d.ts
|
|
6
5
|
type CompoundActionButtonProps = Simplify<BaseNodeProps & {
|
|
7
6
|
icon?: ReactNode;
|
|
8
7
|
ariaLabel?: string;
|
|
9
8
|
onClick: (e: MouseEvent) => void;
|
|
10
9
|
}>;
|
|
11
10
|
export declare function CompoundActionButton({ selected, data: { hovered: isHovered }, icon, ariaLabel, onClick }: CompoundActionButtonProps): import("react").JSX.Element;
|
|
12
|
-
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs";
|
|
3
3
|
import { stopPropagation } from "../../utils/xyflow.mjs";
|
|
4
4
|
import { compoundActionBtn } from "./actionbtns.css.mjs";
|
|
5
5
|
import { cx } from "@likec4/styles/css";
|
|
@@ -9,7 +9,7 @@ import { useDebouncedValue } from "@mantine/hooks";
|
|
|
9
9
|
import * as m from "motion/react-m";
|
|
10
10
|
import { actionBtn } from "@likec4/styles/recipes";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/base-primitives/compound/CompoundActionButton.tsx
|
|
13
13
|
const variants = {
|
|
14
14
|
normal: {
|
|
15
15
|
scale: 1,
|
|
@@ -28,7 +28,7 @@ const variants = {
|
|
|
28
28
|
},
|
|
29
29
|
whileTap: { scale: 1 }
|
|
30
30
|
};
|
|
31
|
-
function CompoundActionButton({ selected
|
|
31
|
+
function CompoundActionButton({ selected, data: { hovered: isHovered = false }, icon, ariaLabel = "Navigate to view", onClick }) {
|
|
32
32
|
const isHoverDebounced = useDebouncedValue(isHovered, isHovered ? 130 : 0)[0] && isHovered;
|
|
33
33
|
const isActionVisible = selected || isHoverDebounced;
|
|
34
34
|
let variant = isHoverDebounced ? "hovered" : "normal";
|
|
@@ -53,5 +53,4 @@ function CompoundActionButton({ selected = false, data: { hovered: isHovered = f
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { CompoundActionButton };
|
|
@@ -2,11 +2,10 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { BaseNodeProps } from "../../base/types.mjs";
|
|
3
3
|
import { MouseEvent, ReactNode } from "react";
|
|
4
4
|
import { Simplify } from "type-fest";
|
|
5
|
-
//#region src/base-primitives/compound/CompoundDetailsButton.d.ts
|
|
6
5
|
type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
|
|
7
6
|
icon?: ReactNode;
|
|
8
7
|
ariaLabel?: string;
|
|
9
8
|
onClick: (e: MouseEvent) => void;
|
|
10
9
|
}>;
|
|
11
10
|
export declare function CompoundDetailsButton({ selected, data: { hovered: isHovered }, icon, ariaLabel, onClick }: CompoundDetailsButtonProps): import("react").JSX.Element;
|
|
12
|
-
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconId from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconId from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs";
|
|
3
3
|
import { stopPropagation } from "../../utils/xyflow.mjs";
|
|
4
4
|
import { compoundActionBtn } from "./actionbtns.css.mjs";
|
|
5
5
|
import { cx } from "@likec4/styles/css";
|
|
@@ -9,14 +9,14 @@ import { useDebouncedValue } from "@mantine/hooks";
|
|
|
9
9
|
import * as m from "motion/react-m";
|
|
10
10
|
import { actionBtn } from "@likec4/styles/recipes";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/base-primitives/compound/CompoundDetailsButton.tsx
|
|
13
13
|
const variants = {
|
|
14
14
|
normal: { scale: 1 },
|
|
15
15
|
hovered: { scale: 1.2 },
|
|
16
16
|
whileHover: { scale: 1.4 },
|
|
17
17
|
whileTap: { scale: 1 }
|
|
18
18
|
};
|
|
19
|
-
function CompoundDetailsButton({ selected
|
|
19
|
+
function CompoundDetailsButton({ selected, data: { hovered: isHovered = false }, icon, ariaLabel = "Open details", onClick }) {
|
|
20
20
|
const isHoverDebounced = useDebouncedValue(isHovered, isHovered ? 130 : 0)[0] && isHovered;
|
|
21
21
|
const isActionVisible = selected || isHoverDebounced;
|
|
22
22
|
const variant = isHoverDebounced ? "hovered" : "normal";
|
|
@@ -43,5 +43,4 @@ function CompoundDetailsButton({ selected = false, data: { hovered: isHovered =
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
export { CompoundDetailsButton };
|
|
@@ -2,7 +2,6 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { BaseNode, BaseNodeProps } from "../../base/types.mjs";
|
|
3
3
|
import { HTMLAttributes, PropsWithChildren } from "react";
|
|
4
4
|
import { Color, ElementStyle } from "@likec4/core/types";
|
|
5
|
-
//#region src/base-primitives/compound/CompoundNodeContainer.d.ts
|
|
6
5
|
export type RequiredData = {
|
|
7
6
|
color: Color;
|
|
8
7
|
depth: number;
|
|
@@ -14,4 +13,4 @@ type CompoundNodeContainerProps = PropsWithChildren<HTMLAttributes<HTMLDivElemen
|
|
|
14
13
|
nodeProps: BaseNodeProps<BaseNode<RequiredData>>;
|
|
15
14
|
}>;
|
|
16
15
|
export declare function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered, dimmed: isDimmed, ...data } }, className, children, style, ...rest }: CompoundNodeContainerProps): import("react").JSX.Element;
|
|
17
|
-
|
|
16
|
+
export {};
|
|
@@ -6,7 +6,7 @@ import { clamp } from "remeda";
|
|
|
6
6
|
import * as m from "motion/react-m";
|
|
7
7
|
import { compoundNode } from "@likec4/styles/recipes";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/base-primitives/compound/CompoundNodeContainer.tsx
|
|
10
10
|
function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered = false, dimmed: isDimmed = false, ...data } }, className, children, style, ...rest }) {
|
|
11
11
|
const styles = useLikeC4Styles();
|
|
12
12
|
let opacity = clamp(data.style.opacity ?? 100, {
|
|
@@ -45,5 +45,4 @@ function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered = false
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
//#endregion
|
|
49
48
|
export { CompoundNodeContainer };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Color, ComputedNodeStyle, NodeId } from "@likec4/core/types";
|
|
3
|
-
//#region src/base-primitives/compound/CompoundTitle.d.ts
|
|
4
3
|
type RequiredData = {
|
|
5
4
|
id: NodeId;
|
|
6
5
|
title: string;
|
|
@@ -18,4 +17,4 @@ type CompoundTitleProps = {
|
|
|
18
17
|
'aria-hidden'?: boolean | undefined;
|
|
19
18
|
};
|
|
20
19
|
export declare function CompoundTitle({ data, 'aria-hidden': ariaHidden }: CompoundTitleProps): import("react").JSX.Element;
|
|
21
|
-
|
|
20
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { IconRenderer } from "../../context/IconRenderer.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/base-primitives/compound/CompoundTitle.tsx
|
|
6
6
|
function CompoundTitle({ data, "aria-hidden": ariaHidden }) {
|
|
7
7
|
const elementIcon = IconRenderer({
|
|
8
8
|
element: data,
|
|
@@ -18,5 +18,4 @@ function CompoundTitle({ data, "aria-hidden": ariaHidden }) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { CompoundTitle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "@likec4/styles/css";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base-primitives/compound/actionbtns.css.ts
|
|
4
4
|
const compoundActionBtn = cva({
|
|
5
5
|
base: { transitionDuration: "medium" },
|
|
6
6
|
variants: { delay: { true: { transitionDelay: {
|
|
@@ -9,5 +9,4 @@ const compoundActionBtn = cva({
|
|
|
9
9
|
} } } }
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { compoundActionBtn };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs";
|
|
3
3
|
import { stopPropagation } from "../../utils/xyflow.mjs";
|
|
4
4
|
import { cx } from "@likec4/styles/css";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { ActionIcon } from "@mantine/core";
|
|
7
7
|
import { edgeActionBtn } from "@likec4/styles/recipes";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/base-primitives/edge/EdgeActionButton.tsx
|
|
10
10
|
function EdgeActionButton({ icon, ariaLabel = "Navigate to view", onClick }) {
|
|
11
11
|
return /* @__PURE__ */ jsx(ActionIcon, {
|
|
12
12
|
className: cx("nodrag nopan", edgeActionBtn()),
|
|
@@ -19,5 +19,4 @@ function EdgeActionButton({ icon, ariaLabel = "Navigate to view", onClick }) {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { EdgeActionButton };
|
|
@@ -4,8 +4,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { pickBy } from "remeda";
|
|
5
5
|
import { invariant } from "@likec4/core";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
function EdgeContainer({ className, component = "g", selectable = false, selected = false, data: { color
|
|
7
|
+
// src/base-primitives/edge/EdgeContainer.tsx
|
|
8
|
+
function EdgeContainer({ className, component = "g", selectable = false, selected = false, data: { color, hovered: isHovered = false, active: isActive = false, dimmed: isDimmed = false, ...data }, animated = false, children, style, ...rest }) {
|
|
9
9
|
animated = animated || isActive;
|
|
10
10
|
const props = {
|
|
11
11
|
className: cx(className, "likec4-edge-container", selected && "selected", selectable && "selectable"),
|
|
@@ -31,5 +31,4 @@ function EdgeContainer({ className, component = "g", selectable = false, selecte
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { EdgeContainer };
|
|
@@ -3,11 +3,12 @@ import { cx } from "@likec4/styles/css";
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { isTruthy } from "remeda";
|
|
6
|
+
import { EdgeLabelMetrics } from "@likec4/core/styles";
|
|
6
7
|
import { Box } from "@likec4/styles/jsx";
|
|
7
8
|
import * as m from "motion/react-m";
|
|
8
9
|
import { edgeLabel } from "@likec4/styles/recipes";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// src/base-primitives/edge/EdgeLabel.tsx
|
|
11
12
|
const EdgeLabel = forwardRef(({ edgeProps: { id, data: { label, technology, hovered: isHovered = false }, selected = false, selectable = false }, isSequenceStep: isStepEdge = false, stepNum, pointerEvents = "all", className, children, ...rest }, ref) => {
|
|
12
13
|
const hasLabel = isTruthy(label) || isTruthy(technology);
|
|
13
14
|
return /* @__PURE__ */ jsxs(m.div, {
|
|
@@ -27,7 +28,7 @@ const EdgeLabel = forwardRef(({ edgeProps: { id, data: { label, technology, hove
|
|
|
27
28
|
className: "likec4-edge-label__contents",
|
|
28
29
|
children: [
|
|
29
30
|
isTruthy(label) && /* @__PURE__ */ jsx(Box, {
|
|
30
|
-
lineClamp:
|
|
31
|
+
lineClamp: EdgeLabelMetrics.label.maxLines,
|
|
31
32
|
className: "likec4-edge-label__text",
|
|
32
33
|
children: label
|
|
33
34
|
}),
|
|
@@ -42,5 +43,4 @@ const EdgeLabel = forwardRef(({ edgeProps: { id, data: { label, technology, hove
|
|
|
42
43
|
});
|
|
43
44
|
EdgeLabel.displayName = "EdgeLabel";
|
|
44
45
|
|
|
45
|
-
//#endregion
|
|
46
46
|
export { EdgeLabel };
|