@likec4/diagram 1.48.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/README.md +7 -9
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +77 -79
- package/dist/LikeC4Diagram.props.d.ts +9 -1
- 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 +4 -4
- package/dist/LikeC4Styles.d.ts +2 -1
- package/dist/LikeC4View.d.ts +14 -1
- package/dist/LikeC4View.js +31 -18
- package/dist/ReactLikeC4.d.ts +2 -1
- package/dist/ReactLikeC4.js +3 -1
- 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 +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +46 -43
- 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 +3 -3
- package/dist/adhoc-editor/hooks.js +5 -23
- package/dist/adhoc-editor/index.d.ts +1 -1
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/{ActorProvider.d.ts → state/ActorProvider.d.ts} +1 -3
- package/dist/adhoc-editor/{ActorProvider.js → state/ActorProvider.js} +10 -11
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/{actor.editor.d.ts → state/actor.editor.d.ts} +6 -4
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/{actor.js → state/actor.js} +2 -6
- package/dist/adhoc-editor/{actor.layouter.d.ts → state/actor.layouter.d.ts} +7 -4
- package/dist/adhoc-editor/{actor.layouter.js → state/actor.layouter.js} +17 -13
- package/dist/adhoc-editor/{actor.types.d.ts → state/actor.types.d.ts} +12 -6
- package/dist/adhoc-editor/{actor.types.js → state/actor.types.js} +8 -1
- 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 +1 -1
- package/dist/base/const.d.ts +1 -0
- package/dist/base-primitives/compound/CompoundActionButton.js +26 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +22 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +5 -4
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- 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 +12 -19
- package/dist/base-primitives/element/ElementActionButtons.js +35 -10
- package/dist/base-primitives/element/ElementDetailsButton.js +47 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base-primitives/element/ElementNodeContainer.js +23 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/Logo.js +1 -1
- package/dist/components/NavigationPanel.js +2 -4
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -16
- 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 +1 -1
- package/dist/context/DefaultMantineProvider.js +10 -1
- 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 +5 -3
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +5 -4
- package/dist/context/IconRenderer.js +51 -24
- 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 +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorProvider.js +1 -1
- package/dist/editor/applyChangesToManualLayout.js +7 -7
- package/dist/editor/editorActor.actions.js +20 -20
- package/dist/editor/editorActor.states.js +0 -9
- package/dist/editor/useEditorActorLogic.d.ts +1 -2
- package/dist/editor/useEditorActorLogic.js +8 -11
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +2 -6
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +8 -2
- package/dist/hooks/useDiagramCompareLayout.d.ts +5 -5
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- 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/index.d.ts +1 -3
- package/dist/index.js +2 -2
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +5 -7
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +22 -24
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +40 -55
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- 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 +4 -2
- package/dist/likec4diagram/custom/nodes/nodes.js +5 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -8
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -28
- package/dist/likec4diagram/state/DiagramActorProvider.js +30 -56
- 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 +27 -0
- package/dist/likec4diagram/state/machine.actions.js +78 -21
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +38 -3
- package/dist/likec4diagram/state/machine.js +4 -1
- package/dist/likec4diagram/state/machine.setup.d.ts +19 -2
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +61 -1
- package/dist/likec4diagram/state/machine.state.ready.js +11 -3
- package/dist/likec4diagram/state/utils.d.ts +2 -1
- package/dist/likec4diagram/state/utils.js +1 -1
- package/dist/likec4diagram/types.d.ts +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +125 -86
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +2 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +7 -2
- package/dist/navigationpanel/NavigationPanel.js +2 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.js +2 -2
- 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/controls/DetailsControls.js +4 -4
- package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
- 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.js +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +16 -16
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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 +11 -11
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +7 -7
- package/dist/overlays/element-details/TabPanelDeployments.js +4 -4
- package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -5
- 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 +1 -1
- package/dist/overlays/overlaysActor.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.css.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
- 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 +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/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/search/Search.d.ts +2 -1
- package/dist/search/Search.js +108 -87
- package/dist/search/components/ElementsColumn.css.js +3 -3
- package/dist/search/components/ElementsColumn.js +93 -59
- package/dist/search/components/PickView.js +8 -4
- 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.js +11 -11
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.js +4 -1
- 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 +7 -5
- package/dist/shadowroot/styles.css.js +3 -2
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +1 -1
- package/dist/utils/xyflow.d.ts +10 -5
- package/dist/utils/xyflow.js +24 -22
- package/package.json +29 -28
- package/panda.buildinfo.json +175 -86
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -52554
- package/bundle/package.json +0 -4
- package/dist/adhoc-editor/EditorNavigationPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorNavigationPanel.js +0 -32
- package/dist/adhoc-editor/SelectElementOverlay.d.ts +0 -1
- package/dist/adhoc-editor/SelectElementOverlay.js +0 -124
- package/dist/adhoc-editor/actor.d.ts +0 -131
- package/dist/adhoc-editor/actor.editor.js +0 -96
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +0 -104
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/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.4/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.4/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.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
|
@@ -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,18 +33,15 @@ 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",
|
|
33
46
|
tabIndex: -1,
|
|
34
47
|
children: /* @__PURE__ */ jsx(
|
|
@@ -4,6 +4,7 @@ import { compoundNode } from '@likec4/styles/recipes';
|
|
|
4
4
|
import * as m from 'motion/react-m';
|
|
5
5
|
import { clamp } from 'remeda';
|
|
6
6
|
import { MAX_COMPOUND_DEPTH } from '../../base/const.js';
|
|
7
|
+
import { useLikeC4Styles } from '../../hooks/useLikeC4Styles.js';
|
|
7
8
|
|
|
8
9
|
function CompoundNodeContainer({
|
|
9
10
|
nodeProps: {
|
|
@@ -18,6 +19,7 @@ function CompoundNodeContainer({
|
|
|
18
19
|
style,
|
|
19
20
|
...rest
|
|
20
21
|
}) {
|
|
22
|
+
const styles = useLikeC4Styles();
|
|
21
23
|
let opacity = clamp(data.style.opacity ?? 100, {
|
|
22
24
|
min: 0,
|
|
23
25
|
max: 100
|
|
@@ -31,7 +33,7 @@ function CompoundNodeContainer({
|
|
|
31
33
|
const compoundClass = compoundNode({
|
|
32
34
|
isTransparent,
|
|
33
35
|
inverseColor: opacity < 70,
|
|
34
|
-
borderStyle: data.style.border ?? (isTransparent ?
|
|
36
|
+
borderStyle: data.style.border ?? (isTransparent ? styles.defaults.group.border : "none")
|
|
35
37
|
});
|
|
36
38
|
const depth = clamp(data.depth ?? 1, {
|
|
37
39
|
min: 1,
|
|
@@ -52,12 +54,11 @@ function CompoundNodeContainer({
|
|
|
52
54
|
"data-likec4-dimmed": isDimmed
|
|
53
55
|
},
|
|
54
56
|
tabIndex: -1,
|
|
55
|
-
|
|
56
|
-
...style,
|
|
57
|
-
// @ts-expect-error
|
|
57
|
+
animate: {
|
|
58
58
|
["--_border-transparency"]: `${borderOpacity}%`,
|
|
59
59
|
["--_compound-transparency"]: `${opacity}%`
|
|
60
60
|
},
|
|
61
|
+
style,
|
|
61
62
|
...rest,
|
|
62
63
|
children
|
|
63
64
|
}
|
|
@@ -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(
|
|
@@ -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
7
|
if (value === void 0) return "";
|
|
11
|
-
return isNumber(value) ? `${Math.
|
|
8
|
+
return isNumber(value) ? `${Math.trunc(value)}px` : value;
|
|
12
9
|
};
|
|
13
10
|
function EdgeLabelContainer({
|
|
14
11
|
edgeProps: {
|
|
@@ -25,18 +22,11 @@ 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;
|
|
@@ -66,14 +56,17 @@ function EdgeLabelContainer({
|
|
|
66
56
|
"data-likec4-dimmed": isDimmed
|
|
67
57
|
},
|
|
68
58
|
style: {
|
|
69
|
-
...labelBBox && {
|
|
70
|
-
maxWidth: labelBBox.width + 18
|
|
71
|
-
},
|
|
72
|
-
zIndex,
|
|
73
|
-
...style,
|
|
74
59
|
transform: `translate(${toCssVarValue(labelX)}, ${toCssVarValue(labelY)}) ${translate}`
|
|
75
60
|
},
|
|
76
|
-
children
|
|
61
|
+
children: /* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
style: labelBBox ? {
|
|
65
|
+
maxWidth: labelBBox.width + 20
|
|
66
|
+
} : void 0,
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
)
|
|
77
70
|
},
|
|
78
71
|
id
|
|
79
72
|
) });
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
-
import {
|
|
3
|
+
import { actionBtn, actionButtons } from '@likec4/styles/recipes';
|
|
4
4
|
import { ActionIcon } from '@mantine/core';
|
|
5
5
|
import { useId } from '@mantine/hooks';
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
|
-
import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
+
import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js';
|
|
9
9
|
|
|
10
|
+
const variants = {
|
|
11
|
+
normal: {
|
|
12
|
+
originY: 0,
|
|
13
|
+
opacity: 0.75,
|
|
14
|
+
scale: 0.8,
|
|
15
|
+
y: 0
|
|
16
|
+
},
|
|
17
|
+
selected: {
|
|
18
|
+
originY: 0,
|
|
19
|
+
opacity: 1,
|
|
20
|
+
scale: 0.9,
|
|
21
|
+
y: 7
|
|
22
|
+
},
|
|
23
|
+
hovered: {
|
|
24
|
+
originY: 0,
|
|
25
|
+
opacity: 1,
|
|
26
|
+
scale: 1.12,
|
|
27
|
+
y: 7
|
|
28
|
+
}
|
|
29
|
+
};
|
|
10
30
|
function ElementActionButtons({
|
|
11
31
|
selected = false,
|
|
12
32
|
data: {
|
|
@@ -18,19 +38,24 @@ function ElementActionButtons({
|
|
|
18
38
|
if (!buttons.length) {
|
|
19
39
|
return null;
|
|
20
40
|
}
|
|
41
|
+
let variant;
|
|
42
|
+
switch (true) {
|
|
43
|
+
case isHovered:
|
|
44
|
+
variant = "hovered";
|
|
45
|
+
break;
|
|
46
|
+
case selected:
|
|
47
|
+
variant = "selected";
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
variant = "normal";
|
|
51
|
+
}
|
|
21
52
|
return /* @__PURE__ */ jsx("div", { className: actionButtons(), children: /* @__PURE__ */ jsx(
|
|
22
53
|
m.div,
|
|
23
54
|
{
|
|
24
55
|
layoutRoot: true,
|
|
25
56
|
initial: false,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
animate: {
|
|
30
|
-
opacity: isHovered || selected ? 1 : 0.75,
|
|
31
|
-
scale: isHovered ? 1.1 : selected ? 0.9 : 0.8,
|
|
32
|
-
y: isHovered || selected ? 6 : 0
|
|
33
|
-
},
|
|
57
|
+
variants,
|
|
58
|
+
animate: variant,
|
|
34
59
|
layoutDependency: `${isHovered}-${selected}`,
|
|
35
60
|
"data-likec4-hovered": isHovered,
|
|
36
61
|
className: cx("nodrag nopan"),
|
|
@@ -5,8 +5,35 @@ import { actionBtn } from '@likec4/styles/recipes';
|
|
|
5
5
|
import { ActionIcon } from '@mantine/core';
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
|
-
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
+
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';
|
|
9
9
|
|
|
10
|
+
const variants = {
|
|
11
|
+
normal: {
|
|
12
|
+
originX: 0.4,
|
|
13
|
+
originY: 0.6,
|
|
14
|
+
scale: 1,
|
|
15
|
+
opacity: 0.5
|
|
16
|
+
},
|
|
17
|
+
hovered: {
|
|
18
|
+
originX: 0.4,
|
|
19
|
+
originY: 0.6,
|
|
20
|
+
scale: 1.25,
|
|
21
|
+
opacity: 0.9
|
|
22
|
+
},
|
|
23
|
+
selected: {
|
|
24
|
+
originX: 0.4,
|
|
25
|
+
originY: 0.6,
|
|
26
|
+
scale: 1.25,
|
|
27
|
+
opacity: 0.9
|
|
28
|
+
},
|
|
29
|
+
whileHover: {
|
|
30
|
+
scale: 1.4,
|
|
31
|
+
opacity: 1
|
|
32
|
+
},
|
|
33
|
+
whileTap: {
|
|
34
|
+
scale: 1.15
|
|
35
|
+
}
|
|
36
|
+
};
|
|
10
37
|
const container = css({
|
|
11
38
|
position: "absolute",
|
|
12
39
|
top: "0.5",
|
|
@@ -40,28 +67,30 @@ function ElementDetailsButton({
|
|
|
40
67
|
icon,
|
|
41
68
|
onClick
|
|
42
69
|
}) {
|
|
70
|
+
let variant;
|
|
71
|
+
switch (true) {
|
|
72
|
+
case isHovered:
|
|
73
|
+
variant = "hovered";
|
|
74
|
+
break;
|
|
75
|
+
case selected:
|
|
76
|
+
variant = "selected";
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
variant = "normal";
|
|
80
|
+
}
|
|
43
81
|
return /* @__PURE__ */ jsx(Box, { className: cx(container, "details-button"), children: /* @__PURE__ */ jsx(
|
|
44
82
|
ActionIcon,
|
|
45
83
|
{
|
|
46
|
-
className: cx(
|
|
84
|
+
className: cx(
|
|
85
|
+
"nodrag nopan",
|
|
86
|
+
actionBtn({ variant: "transparent" })
|
|
87
|
+
),
|
|
47
88
|
component: m.button,
|
|
48
89
|
initial: false,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
animate: isHovered || selected ? {
|
|
54
|
-
scale: 1.2,
|
|
55
|
-
opacity: 0.8
|
|
56
|
-
} : {
|
|
57
|
-
scale: 1,
|
|
58
|
-
opacity: 0.5
|
|
59
|
-
},
|
|
60
|
-
whileHover: {
|
|
61
|
-
scale: 1.4,
|
|
62
|
-
opacity: 1
|
|
63
|
-
},
|
|
64
|
-
whileTap: { scale: 1.15 },
|
|
90
|
+
variants,
|
|
91
|
+
animate: variant,
|
|
92
|
+
whileHover: "whileHover",
|
|
93
|
+
whileTap: "whileTap",
|
|
65
94
|
onClick,
|
|
66
95
|
onDoubleClick: stopPropagation,
|
|
67
96
|
tabIndex: -1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color, ComputedNodeStyle, ElementShape } from '@likec4/core/types';
|
|
2
|
-
import { MotionNodeLayoutOptions } from 'motion/react';
|
|
3
|
-
import { CSSProperties, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import { MotionNodeLayoutOptions, MotionStyle } from 'motion/react';
|
|
4
3
|
import { BaseNodePropsWithData } from '../../base/types';
|
|
4
|
+
import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
5
5
|
type RequiredData = {
|
|
6
6
|
color: Color;
|
|
7
7
|
shape: ElementShape;
|
|
@@ -15,7 +15,7 @@ export declare const ElementNodeContainer: ForwardRefExoticComponent<{
|
|
|
15
15
|
[key: `data-${string}`]: string | undefined;
|
|
16
16
|
nodeProps: BaseNodePropsWithData<RequiredData>;
|
|
17
17
|
className?: string | undefined;
|
|
18
|
-
style?:
|
|
18
|
+
style?: MotionStyle | undefined;
|
|
19
19
|
} & MotionNodeLayoutOptions & {
|
|
20
20
|
children?: ReactNode | undefined;
|
|
21
21
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -5,6 +5,20 @@ import { elementNode } from '@likec4/styles/recipes';
|
|
|
5
5
|
import * as m from 'motion/react-m';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
|
|
8
|
+
const variants = {
|
|
9
|
+
normal: {
|
|
10
|
+
scale: 1
|
|
11
|
+
},
|
|
12
|
+
hovered: {
|
|
13
|
+
scale: 1.05
|
|
14
|
+
},
|
|
15
|
+
selected: {
|
|
16
|
+
scale: 1.02
|
|
17
|
+
},
|
|
18
|
+
tap: {
|
|
19
|
+
scale: 0.98
|
|
20
|
+
}
|
|
21
|
+
};
|
|
8
22
|
const ElementNodeContainer = forwardRef(({
|
|
9
23
|
nodeProps: {
|
|
10
24
|
selected = false,
|
|
@@ -20,14 +34,16 @@ const ElementNodeContainer = forwardRef(({
|
|
|
20
34
|
children,
|
|
21
35
|
...rest
|
|
22
36
|
}, ref) => {
|
|
23
|
-
let
|
|
37
|
+
let variant;
|
|
24
38
|
switch (true) {
|
|
25
39
|
case isHovered:
|
|
26
|
-
|
|
40
|
+
variant = "hovered";
|
|
27
41
|
break;
|
|
28
42
|
case selected:
|
|
29
|
-
|
|
43
|
+
variant = "selected";
|
|
30
44
|
break;
|
|
45
|
+
default:
|
|
46
|
+
variant = "normal";
|
|
31
47
|
}
|
|
32
48
|
const {
|
|
33
49
|
size,
|
|
@@ -43,12 +59,11 @@ const ElementNodeContainer = forwardRef(({
|
|
|
43
59
|
"group",
|
|
44
60
|
className
|
|
45
61
|
),
|
|
62
|
+
variants,
|
|
46
63
|
initial: false,
|
|
47
64
|
...selectable && {
|
|
48
|
-
animate:
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
whileTap: { scale: 0.98 }
|
|
65
|
+
animate: variant,
|
|
66
|
+
whileTap: "tap"
|
|
52
67
|
},
|
|
53
68
|
"data-likec4-hovered": isHovered,
|
|
54
69
|
"data-likec4-color": data.color,
|
|
@@ -59,9 +74,7 @@ const ElementNodeContainer = forwardRef(({
|
|
|
59
74
|
...isDimmed !== false && {
|
|
60
75
|
"data-likec4-dimmed": isDimmed
|
|
61
76
|
},
|
|
62
|
-
style
|
|
63
|
-
...style
|
|
64
|
-
},
|
|
77
|
+
style,
|
|
65
78
|
tabIndex: -1,
|
|
66
79
|
...rest,
|
|
67
80
|
children
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ComputedNodeStyle, ElementShape } from '@likec4/core/types';
|
|
2
|
-
type
|
|
2
|
+
type RequiredData = {
|
|
3
3
|
shape: ElementShape;
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
6
6
|
style?: ComputedNodeStyle;
|
|
7
7
|
};
|
|
8
8
|
type ElementShapeProps = {
|
|
9
|
-
data:
|
|
9
|
+
data: RequiredData;
|
|
10
10
|
width?: number | undefined;
|
|
11
11
|
height?: number | undefined;
|
|
12
12
|
/**
|
|
@@ -86,8 +86,69 @@ const PersonIcon = {
|
|
|
86
86
|
height: 120,
|
|
87
87
|
path: `M57.9197 0C10.9124 0 33.5766 54.75 33.5766 54.75C38.6131 62.25 45.3285 60.75 45.3285 66C45.3285 70.5 39.4526 72 33.5766 72.75C24.3431 72.75 15.9489 71.25 7.55474 84.75C2.51825 93 0 120 0 120H115C115 120 112.482 93 108.285 84.75C99.8905 70.5 91.4963 72.75 82.2628 72C76.3869 71.25 70.5109 69.75 70.5109 65.25C70.5109 60.75 77.2263 62.25 82.2628 54C82.2628 54.75 104.927 0 57.9197 0V0Z`
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
const ComponentTopLeftRect = ({ index, size }) => {
|
|
90
|
+
let width, height, offsetX, offsetY, between;
|
|
91
|
+
switch (size) {
|
|
92
|
+
case "xs":
|
|
93
|
+
case "sm": {
|
|
94
|
+
width = 40;
|
|
95
|
+
height = 18;
|
|
96
|
+
offsetX = -16;
|
|
97
|
+
offsetY = 16;
|
|
98
|
+
between = 10;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "md": {
|
|
102
|
+
width = 60;
|
|
103
|
+
height = 26;
|
|
104
|
+
offsetX = -20;
|
|
105
|
+
offsetY = 22;
|
|
106
|
+
between = 14;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case "lg":
|
|
110
|
+
case "xl": {
|
|
111
|
+
width = 70;
|
|
112
|
+
height = 32;
|
|
113
|
+
offsetX = -24;
|
|
114
|
+
offsetY = 32;
|
|
115
|
+
between = 18;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
default: {
|
|
119
|
+
nonexhaustive(size);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
"rect",
|
|
124
|
+
{
|
|
125
|
+
x: offsetX,
|
|
126
|
+
y: offsetY + (height + between) * index,
|
|
127
|
+
width,
|
|
128
|
+
height,
|
|
129
|
+
rx: 3,
|
|
130
|
+
className: "top-left-rect",
|
|
131
|
+
strokeWidth: 2
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
function ShapeSvg({ shape, w, h, size = "md" }) {
|
|
90
136
|
switch (shape) {
|
|
137
|
+
case "component": {
|
|
138
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
139
|
+
/* @__PURE__ */ jsx(
|
|
140
|
+
"rect",
|
|
141
|
+
{
|
|
142
|
+
width: w,
|
|
143
|
+
height: h,
|
|
144
|
+
rx: 6,
|
|
145
|
+
strokeWidth: 0
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ jsx(ComponentTopLeftRect, { index: 0, size }),
|
|
149
|
+
/* @__PURE__ */ jsx(ComponentTopLeftRect, { index: 1, size })
|
|
150
|
+
] });
|
|
151
|
+
}
|
|
91
152
|
case "mobile": {
|
|
92
153
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
154
|
/* @__PURE__ */ jsx(
|
|
@@ -264,23 +325,25 @@ function ElementShape({ data, width, height, showSeletionOutline = true }) {
|
|
|
264
325
|
},
|
|
265
326
|
className: elementShapeRecipe({
|
|
266
327
|
shapetype: "html",
|
|
267
|
-
withBorder
|
|
328
|
+
withBorder,
|
|
329
|
+
withOutline: showSeletionOutline
|
|
268
330
|
}),
|
|
269
331
|
children: [
|
|
270
332
|
isMultiple && /* @__PURE__ */ jsx("div", { className: "likec4-shape-multiple" }),
|
|
271
|
-
|
|
333
|
+
/* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
|
|
272
334
|
]
|
|
273
335
|
}
|
|
274
336
|
);
|
|
275
337
|
}
|
|
276
338
|
const className = elementShapeRecipe({
|
|
277
|
-
shapetype: "svg"
|
|
339
|
+
shapetype: "svg",
|
|
340
|
+
withOutline: showSeletionOutline
|
|
278
341
|
});
|
|
279
342
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
280
|
-
isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h }) }),
|
|
343
|
+
isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, size: data.style?.size, w, h }) }),
|
|
281
344
|
/* @__PURE__ */ jsxs("svg", { className, viewBox: `0 0 ${w} ${h}`, children: [
|
|
282
|
-
|
|
283
|
-
/* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h })
|
|
345
|
+
/* @__PURE__ */ jsx(ShapeSvgOutline, { shape: data.shape, w, h }),
|
|
346
|
+
/* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, size: data.style?.size, w, h })
|
|
284
347
|
] })
|
|
285
348
|
] });
|
|
286
349
|
}
|
|
@@ -4,7 +4,7 @@ import { HStack, VStack } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { ThemeIcon, Text, ScrollAreaAutosize, Button } from '@mantine/core';
|
|
5
5
|
import { useRef, useEffect } from 'react';
|
|
6
6
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
7
|
-
import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
7
|
+
import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
8
8
|
|
|
9
9
|
function ErrorFallback({ error, resetErrorBoundary }) {
|
|
10
10
|
const errorString = error instanceof Error ? error.message : "Unknown error";
|
package/dist/components/Link.js
CHANGED
|
@@ -4,8 +4,8 @@ import { styled } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { Badge, CopyButton, ActionIcon } from '@mantine/core';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { GithubIcon } from './GithubIcon.js';
|
|
7
|
-
import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
-
import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
7
|
+
import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
|
|
8
|
+
import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
|
|
9
9
|
|
|
10
10
|
const GITHUB_PREFIX = "https://github.com/";
|
|
11
11
|
const Link = forwardRef(
|
|
@@ -63,7 +63,7 @@ const Link = forwardRef(
|
|
|
63
63
|
}),
|
|
64
64
|
section: css({
|
|
65
65
|
'&:is([data-position="left"])': {
|
|
66
|
-
color: "
|
|
66
|
+
color: "text.dimmed",
|
|
67
67
|
userSelect: "none",
|
|
68
68
|
pointerEvents: "none",
|
|
69
69
|
_groupHover: {
|
package/dist/components/Logo.js
CHANGED
|
@@ -36,15 +36,13 @@ const Logo = withContext(LogoButton, "logo");
|
|
|
36
36
|
const Label = withContext(m.div, "label", {
|
|
37
37
|
shouldForwardProp
|
|
38
38
|
});
|
|
39
|
-
|
|
39
|
+
withContext(m.div, "dropdown", {
|
|
40
40
|
shouldForwardProp
|
|
41
41
|
});
|
|
42
42
|
const NavigationPanel = {
|
|
43
43
|
Root,
|
|
44
44
|
Body,
|
|
45
45
|
Logo,
|
|
46
|
-
Label
|
|
47
|
-
Dropdown
|
|
48
|
-
};
|
|
46
|
+
Label};
|
|
49
47
|
|
|
50
48
|
export { NavigationPanel };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Portal } from '@mantine/core';
|
|
3
|
-
import {
|
|
4
|
-
import { RootContainerContext } from '../context/RootContainerContext.js';
|
|
3
|
+
import { useRootContainerContext } from '../context/RootContainerContext.js';
|
|
5
4
|
|
|
6
5
|
function PortalToContainer({ children }) {
|
|
7
|
-
const ctx =
|
|
6
|
+
const ctx = useRootContainerContext();
|
|
8
7
|
if (!ctx) {
|
|
9
8
|
throw new Error("PortalToContainer must be used within RootContainer");
|
|
10
9
|
}
|
|
11
|
-
return /* @__PURE__ */ jsx(Portal, { target: ctx.ref.current ??
|
|
10
|
+
return /* @__PURE__ */ jsx(Portal, { target: ctx.ref.current ?? ctx.selector, children });
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export { PortalToContainer };
|