@likec4/diagram 1.47.0 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
-
import {
|
|
4
|
-
import { hstack } from '@likec4/styles/patterns';
|
|
5
|
-
import { actionBtn } from '@likec4/styles/recipes';
|
|
3
|
+
import { actionBtn, actionButtons } from '@likec4/styles/recipes';
|
|
6
4
|
import { ActionIcon } from '@mantine/core';
|
|
7
5
|
import { useId } from '@mantine/hooks';
|
|
8
6
|
import * as m from 'motion/react-m';
|
|
9
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
10
|
-
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';
|
|
11
9
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
19
28
|
}
|
|
20
|
-
}
|
|
21
|
-
const actionButtons = hstack({
|
|
22
|
-
gap: "1.5",
|
|
23
|
-
justifyContent: "center",
|
|
24
|
-
alignItems: "center"
|
|
25
|
-
});
|
|
29
|
+
};
|
|
26
30
|
function ElementActionButtons({
|
|
27
31
|
selected = false,
|
|
28
32
|
data: {
|
|
@@ -34,53 +38,47 @@ function ElementActionButtons({
|
|
|
34
38
|
if (!buttons.length) {
|
|
35
39
|
return null;
|
|
36
40
|
}
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
}
|
|
52
|
+
return /* @__PURE__ */ jsx("div", { className: actionButtons(), children: /* @__PURE__ */ jsx(
|
|
53
|
+
m.div,
|
|
39
54
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
children: /* @__PURE__ */ jsx(
|
|
49
|
-
|
|
55
|
+
layoutRoot: true,
|
|
56
|
+
initial: false,
|
|
57
|
+
variants,
|
|
58
|
+
animate: variant,
|
|
59
|
+
layoutDependency: `${isHovered}-${selected}`,
|
|
60
|
+
"data-likec4-hovered": isHovered,
|
|
61
|
+
className: cx("nodrag nopan"),
|
|
62
|
+
onClick: stopPropagation,
|
|
63
|
+
children: buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
64
|
+
ActionIcon,
|
|
50
65
|
{
|
|
51
|
-
|
|
66
|
+
component: m.button,
|
|
67
|
+
className: actionBtn({}),
|
|
52
68
|
initial: false,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
animate: {
|
|
57
|
-
opacity: isHovered || selected ? 1 : 0.75,
|
|
58
|
-
scale: isHovered ? 1.1 : selected ? 0.9 : 0.8,
|
|
59
|
-
y: isHovered || selected ? 6 : 0
|
|
69
|
+
whileTap: { scale: 1 },
|
|
70
|
+
whileHover: {
|
|
71
|
+
scale: 1.3
|
|
60
72
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className: actionBtn({}),
|
|
69
|
-
initial: false,
|
|
70
|
-
whileTap: { scale: 1 },
|
|
71
|
-
whileHover: {
|
|
72
|
-
scale: 1.3
|
|
73
|
-
},
|
|
74
|
-
onClick: button.onClick,
|
|
75
|
-
onDoubleClick: stopPropagation,
|
|
76
|
-
children: button.icon || /* @__PURE__ */ jsx(IconBolt, {})
|
|
77
|
-
},
|
|
78
|
-
`${id}-${button.key ?? index}`
|
|
79
|
-
))
|
|
80
|
-
}
|
|
81
|
-
)
|
|
73
|
+
tabIndex: -1,
|
|
74
|
+
onClick: button.onClick,
|
|
75
|
+
onDoubleClick: stopPropagation,
|
|
76
|
+
children: button.icon || /* @__PURE__ */ jsx(IconBolt, {})
|
|
77
|
+
},
|
|
78
|
+
`${id}-${button.key ?? index}`
|
|
79
|
+
))
|
|
82
80
|
}
|
|
83
|
-
);
|
|
81
|
+
) });
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
export { ElementActionButtons };
|
|
@@ -10,9 +10,8 @@ type RequiredData = {
|
|
|
10
10
|
description?: MarkdownOrString | null | undefined;
|
|
11
11
|
icon?: string | null;
|
|
12
12
|
};
|
|
13
|
-
type ElementDataProps = {
|
|
13
|
+
export type ElementDataProps = {
|
|
14
14
|
data: RequiredData;
|
|
15
|
-
iconSize?: number;
|
|
16
15
|
};
|
|
17
16
|
type IconProps = {
|
|
18
17
|
data: {
|
|
@@ -27,6 +26,7 @@ type SlotProps = {
|
|
|
27
26
|
data: RequiredData;
|
|
28
27
|
className?: string;
|
|
29
28
|
style?: CSSProperties;
|
|
29
|
+
[key: `data-${string}`]: string;
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* Renders an element title, technology, description, and icon.
|
|
@@ -37,19 +37,19 @@ type SlotProps = {
|
|
|
37
37
|
* ```
|
|
38
38
|
* or
|
|
39
39
|
* ```tsx
|
|
40
|
-
* <ElementData.Root>
|
|
40
|
+
* <ElementData.Root {...nodeProps} >
|
|
41
41
|
* <ElementData.Icon {...nodeProps} />
|
|
42
|
-
* <ElementData.
|
|
42
|
+
* <ElementData.Content>
|
|
43
43
|
* <ElementData.Title {...nodeProps} />
|
|
44
44
|
* <ElementData.Technology {...nodeProps} />
|
|
45
45
|
* <ElementData.Description {...nodeProps} />
|
|
46
|
-
* </ElementData.
|
|
46
|
+
* </ElementData.Content>
|
|
47
47
|
* </ElementData.Root>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare function ElementData({
|
|
50
|
+
export declare function ElementData({ data }: ElementDataProps): import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
export declare namespace ElementData {
|
|
52
|
-
var Root: import("react").ForwardRefExoticComponent<
|
|
52
|
+
var Root: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & ElementDataProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
53
|
var Icon: ({ data, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
var Content: import("react").ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
55
|
var Title: import("react").ForwardRefExoticComponent<SlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,25 +1,57 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import { cx
|
|
2
|
+
import { RichText } from '@likec4/core/types';
|
|
3
|
+
import { cx } from '@likec4/styles/css';
|
|
4
4
|
import { elementNodeData } from '@likec4/styles/recipes';
|
|
5
|
-
import { Text } from '@mantine/core';
|
|
6
5
|
import { forwardRef } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { isTruthy } from 'remeda';
|
|
8
7
|
import { IconRenderer } from '../../context/IconRenderer.js';
|
|
8
|
+
import { useLikeC4Styles } from '../../hooks/useLikeC4Styles.js';
|
|
9
9
|
import { Markdown } from '../Markdown.js';
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
ref,
|
|
16
|
-
className: cx(
|
|
17
|
-
className,
|
|
18
|
-
elementNodeData(),
|
|
19
|
-
"likec4-element"
|
|
20
|
-
)
|
|
11
|
+
const resolveIconColor = (styles, data) => {
|
|
12
|
+
const iconColor = data.style.iconColor;
|
|
13
|
+
if (!iconColor) {
|
|
14
|
+
return void 0;
|
|
21
15
|
}
|
|
22
|
-
)
|
|
16
|
+
const colors = styles.colors(iconColor).elements;
|
|
17
|
+
return iconColor === data.color ? colors.stroke : colors.fill;
|
|
18
|
+
};
|
|
19
|
+
const Root = forwardRef(({
|
|
20
|
+
className,
|
|
21
|
+
style,
|
|
22
|
+
data,
|
|
23
|
+
...props
|
|
24
|
+
}, ref) => {
|
|
25
|
+
const styles = useLikeC4Styles();
|
|
26
|
+
const iconSize = data.style.iconSize ? styles.nodeSizes(data.style).values.iconSize : void 0;
|
|
27
|
+
const resolvedIconColor = resolveIconColor(styles, data);
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
...props,
|
|
32
|
+
ref,
|
|
33
|
+
className: cx(
|
|
34
|
+
className,
|
|
35
|
+
elementNodeData({
|
|
36
|
+
iconPosition: data.style.iconPosition,
|
|
37
|
+
withIconColor: !!resolvedIconColor
|
|
38
|
+
}),
|
|
39
|
+
"likec4-element"
|
|
40
|
+
),
|
|
41
|
+
style: {
|
|
42
|
+
...style,
|
|
43
|
+
...iconSize && {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
"--likec4-icon-size": `${iconSize}px`
|
|
46
|
+
},
|
|
47
|
+
...resolvedIconColor && {
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
"--likec4-icon-color": resolvedIconColor
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
});
|
|
23
55
|
const Icon = ({ data, ...props }) => /* @__PURE__ */ jsx(IconRenderer, { element: data, ...props });
|
|
24
56
|
const Content = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
25
57
|
"div",
|
|
@@ -32,20 +64,16 @@ const Content = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx
|
|
|
32
64
|
ref
|
|
33
65
|
}
|
|
34
66
|
));
|
|
35
|
-
const Title = forwardRef(({ data: { title
|
|
36
|
-
const { size } = ensureSizes(style);
|
|
37
|
-
const isSm = size === "sm" || size === "xs";
|
|
67
|
+
const Title = forwardRef(({ data: { title }, className, ...props }, ref) => {
|
|
38
68
|
return /* @__PURE__ */ jsx(
|
|
39
|
-
|
|
69
|
+
"div",
|
|
40
70
|
{
|
|
41
|
-
component: "div",
|
|
42
71
|
...props,
|
|
43
72
|
className: cx(
|
|
44
73
|
className,
|
|
45
74
|
"likec4-element-title"
|
|
46
75
|
),
|
|
47
76
|
"data-likec4-node-title": "",
|
|
48
|
-
lineClamp: isSm ? 2 : 3,
|
|
49
77
|
ref,
|
|
50
78
|
children: title
|
|
51
79
|
}
|
|
@@ -54,9 +82,8 @@ const Title = forwardRef(({ data: { title, style }, className, ...props }, ref)
|
|
|
54
82
|
const Technology = forwardRef(({ data, children, className, ...props }, ref) => {
|
|
55
83
|
const text = data?.technology ?? children;
|
|
56
84
|
return isTruthy(text) ? /* @__PURE__ */ jsx(
|
|
57
|
-
|
|
85
|
+
"div",
|
|
58
86
|
{
|
|
59
|
-
component: "div",
|
|
60
87
|
...props,
|
|
61
88
|
className: cx(
|
|
62
89
|
className,
|
|
@@ -68,23 +95,18 @@ const Technology = forwardRef(({ data, children, className, ...props }, ref) =>
|
|
|
68
95
|
}
|
|
69
96
|
) : null;
|
|
70
97
|
});
|
|
71
|
-
const Description = forwardRef(({ data: { description
|
|
98
|
+
const Description = forwardRef(({ data: { description }, className, ...props }, ref) => {
|
|
72
99
|
if (!description) {
|
|
73
100
|
return null;
|
|
74
101
|
}
|
|
75
102
|
const desc = RichText.from(description);
|
|
76
|
-
const { size } = ensureSizes(style);
|
|
77
|
-
const isSm = size === "sm" || size === "xs";
|
|
78
103
|
return /* @__PURE__ */ jsx(
|
|
79
104
|
Markdown,
|
|
80
105
|
{
|
|
81
106
|
...props,
|
|
82
107
|
className: cx(
|
|
83
108
|
className,
|
|
84
|
-
"likec4-element-description"
|
|
85
|
-
css({
|
|
86
|
-
lineClamp: isSm ? 3 : 5
|
|
87
|
-
})
|
|
109
|
+
"likec4-element-description"
|
|
88
110
|
),
|
|
89
111
|
"data-likec4-node-description": "",
|
|
90
112
|
value: desc,
|
|
@@ -98,24 +120,15 @@ const Description = forwardRef(({ data: { description, style }, className, ...pr
|
|
|
98
120
|
}
|
|
99
121
|
);
|
|
100
122
|
});
|
|
101
|
-
function ElementData({
|
|
102
|
-
return /* @__PURE__ */ jsxs(
|
|
103
|
-
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */ jsx(Icon, { data }),
|
|
111
|
-
/* @__PURE__ */ jsxs(Content, { children: [
|
|
112
|
-
/* @__PURE__ */ jsx(Title, { data }),
|
|
113
|
-
/* @__PURE__ */ jsx(Technology, { data }),
|
|
114
|
-
/* @__PURE__ */ jsx(Description, { data })
|
|
115
|
-
] })
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
);
|
|
123
|
+
function ElementData({ data }) {
|
|
124
|
+
return /* @__PURE__ */ jsxs(Root, { data, children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Icon, { data }),
|
|
126
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
127
|
+
/* @__PURE__ */ jsx(Title, { data }),
|
|
128
|
+
/* @__PURE__ */ jsx(Technology, { data }),
|
|
129
|
+
/* @__PURE__ */ jsx(Description, { data })
|
|
130
|
+
] })
|
|
131
|
+
] });
|
|
119
132
|
}
|
|
120
133
|
ElementData.Root = Root;
|
|
121
134
|
ElementData.Icon = Icon;
|
|
@@ -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,30 +67,33 @@ 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,
|
|
96
|
+
tabIndex: -1,
|
|
67
97
|
children: icon ?? /* @__PURE__ */ jsx(IconId, { stroke: 1.8, style: { width: "75%" } })
|
|
68
98
|
}
|
|
69
99
|
) });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Color,
|
|
2
|
-
import { MotionNodeLayoutOptions } from 'motion/react';
|
|
3
|
-
import { CSSProperties, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
1
|
+
import { Color, ComputedNodeStyle, ElementShape } from '@likec4/core/types';
|
|
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;
|
|
8
|
-
style?:
|
|
8
|
+
style?: ComputedNodeStyle;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Top-level primitive to compose leaf nodes renderers.
|
|
@@ -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,8 @@ const ElementNodeContainer = forwardRef(({
|
|
|
59
74
|
...isDimmed !== false && {
|
|
60
75
|
"data-likec4-dimmed": isDimmed
|
|
61
76
|
},
|
|
62
|
-
style
|
|
63
|
-
|
|
64
|
-
},
|
|
77
|
+
style,
|
|
78
|
+
tabIndex: -1,
|
|
65
79
|
...rest,
|
|
66
80
|
children
|
|
67
81
|
}
|
|
@@ -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
|
}
|
|
@@ -12,6 +12,10 @@ type Data = {
|
|
|
12
12
|
tags: readonly string[] | null | undefined;
|
|
13
13
|
width: number;
|
|
14
14
|
};
|
|
15
|
-
type ElementTagsProps = BaseNodePropsWithData<Data
|
|
16
|
-
|
|
15
|
+
export type ElementTagsProps = BaseNodePropsWithData<Data> & {
|
|
16
|
+
onTagClick?: (tag: `#${string}`) => void;
|
|
17
|
+
onTagMouseEnter?: (tag: `#${string}`) => void;
|
|
18
|
+
onTagMouseLeave?: (tag: `#${string}`) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
17
21
|
export {};
|