@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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { hasProp, RichText } from '@likec4/core';
|
|
3
|
+
import { stringHash } from '@likec4/core/utils';
|
|
4
|
+
import { cx, css } from '@likec4/styles/css';
|
|
5
|
+
import { Box } from '@likec4/styles/jsx';
|
|
6
|
+
import { nodeNotes } from '@likec4/styles/recipes';
|
|
7
|
+
import { ScrollAreaAutosize } from '@mantine/core';
|
|
8
|
+
import { useDisclosure } from '@mantine/hooks';
|
|
9
|
+
import { ViewportPortal } from '@xyflow/react';
|
|
10
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
11
|
+
import { isEmptyish, clamp } from 'remeda';
|
|
12
|
+
import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
|
|
13
|
+
import { Markdown } from '../../../base-primitives/Markdown.js';
|
|
14
|
+
import { useOnDiagramEvent } from '../../../hooks/useDiagram.js';
|
|
15
|
+
|
|
16
|
+
function NodeNotes({ data }) {
|
|
17
|
+
if (!hasProp(data, "notes") || isEmptyish(data.notes.md || data.notes.txt)) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ jsx(NodeNotesInternal2, { data });
|
|
21
|
+
}
|
|
22
|
+
function stopPropagation(e) {
|
|
23
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
}
|
|
26
|
+
function NodeNotesInternal2({ data }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(NodeNotesInternal, { data });
|
|
28
|
+
}
|
|
29
|
+
function NodeNotesInternal({ data }) {
|
|
30
|
+
const markdown = data.notes;
|
|
31
|
+
const width = clamp(data.width ?? 0, {
|
|
32
|
+
min: 250,
|
|
33
|
+
max: 500
|
|
34
|
+
});
|
|
35
|
+
clamp(data.height ?? 0, {
|
|
36
|
+
min: 200,
|
|
37
|
+
max: 600
|
|
38
|
+
});
|
|
39
|
+
const [expanded, handlers] = useDisclosure(false, {});
|
|
40
|
+
const id = stringHash(data.id + (markdown.md ?? markdown.txt));
|
|
41
|
+
const onClickCapture = useCallbackRef((e) => {
|
|
42
|
+
if (e) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
if ("nativeEvent" in e) {
|
|
45
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
46
|
+
}
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
}
|
|
49
|
+
handlers.toggle();
|
|
50
|
+
});
|
|
51
|
+
const hovered = data.hovered ?? false;
|
|
52
|
+
const layoutDependency = expanded;
|
|
53
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54
|
+
/* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
55
|
+
/* @__PURE__ */ jsxs(
|
|
56
|
+
m.div,
|
|
57
|
+
{
|
|
58
|
+
className: cx(
|
|
59
|
+
"nopan nodrag",
|
|
60
|
+
nodeNotes({ opened: expanded })
|
|
61
|
+
),
|
|
62
|
+
variants: variants.root,
|
|
63
|
+
initial: "initial",
|
|
64
|
+
animate: expanded ? "expanded" : hovered ? "hovered" : "initial",
|
|
65
|
+
whileHover: "whileHover",
|
|
66
|
+
exit: "exit",
|
|
67
|
+
...!expanded && { onPointerDownCapture: onClickCapture },
|
|
68
|
+
onMouseDownCapture: onClickCapture,
|
|
69
|
+
onClickCapture,
|
|
70
|
+
onClick: stopPropagation,
|
|
71
|
+
"data-state": expanded ? "expanded" : "collapsed",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
m.div,
|
|
75
|
+
{
|
|
76
|
+
variants: variants.paper1,
|
|
77
|
+
className: "__paper __paper-back"
|
|
78
|
+
},
|
|
79
|
+
"paper-back"
|
|
80
|
+
),
|
|
81
|
+
!expanded && /* @__PURE__ */ jsx(
|
|
82
|
+
m.div,
|
|
83
|
+
{
|
|
84
|
+
layout: true,
|
|
85
|
+
layoutId: id,
|
|
86
|
+
variants: variants.paper2,
|
|
87
|
+
"data-state": expanded ? "expanded" : "collapsed",
|
|
88
|
+
className: "__paper __paper-front"
|
|
89
|
+
},
|
|
90
|
+
id
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
`node-notes-${id}`
|
|
95
|
+
),
|
|
96
|
+
expanded && /* @__PURE__ */ jsx(ViewportPortal, { children: /* @__PURE__ */ jsx(
|
|
97
|
+
m.div,
|
|
98
|
+
{
|
|
99
|
+
layout: true,
|
|
100
|
+
layoutDependency,
|
|
101
|
+
layoutId: id,
|
|
102
|
+
className: css({
|
|
103
|
+
position: "absolute",
|
|
104
|
+
zIndex: 300,
|
|
105
|
+
top: "0",
|
|
106
|
+
left: "0",
|
|
107
|
+
display: "flex",
|
|
108
|
+
pointerEvents: "all",
|
|
109
|
+
rounded: "sm",
|
|
110
|
+
backgroundColor: "likec4.overlay.body",
|
|
111
|
+
padding: "0",
|
|
112
|
+
alignItems: "stretch",
|
|
113
|
+
justifyContent: "stretch",
|
|
114
|
+
overflow: "hidden",
|
|
115
|
+
width: "fit-content",
|
|
116
|
+
height: "fit-content",
|
|
117
|
+
maxHeight: "70cqh",
|
|
118
|
+
maxWidth: "50cqw"
|
|
119
|
+
// minHeight: '60cqh',
|
|
120
|
+
}),
|
|
121
|
+
"data-likec4-notes": id,
|
|
122
|
+
style: {
|
|
123
|
+
top: data.y + 20,
|
|
124
|
+
left: data.x + 10,
|
|
125
|
+
maxWidth: `min(calc(${width}px * 2), 50cqw)`
|
|
126
|
+
// minHeight: `max(${height}px, 60cqh)`,
|
|
127
|
+
// maxHeight: height,
|
|
128
|
+
},
|
|
129
|
+
onMouseDownCapture: stopPropagation,
|
|
130
|
+
onClickCapture: stopPropagation,
|
|
131
|
+
onClick: stopPropagation,
|
|
132
|
+
children: /* @__PURE__ */ jsx(
|
|
133
|
+
ScrollAreaAutosize,
|
|
134
|
+
{
|
|
135
|
+
component: m.div,
|
|
136
|
+
className: cx(
|
|
137
|
+
"nowheel",
|
|
138
|
+
css({
|
|
139
|
+
flex: "1",
|
|
140
|
+
padding: "xs",
|
|
141
|
+
paddingRight: "xxs"
|
|
142
|
+
})
|
|
143
|
+
),
|
|
144
|
+
children: /* @__PURE__ */ jsx(
|
|
145
|
+
Markdown,
|
|
146
|
+
{
|
|
147
|
+
className: css({
|
|
148
|
+
paddingRight: "xxs"
|
|
149
|
+
}),
|
|
150
|
+
value: RichText.from(markdown)
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
},
|
|
156
|
+
id
|
|
157
|
+
) }, "portal")
|
|
158
|
+
] }),
|
|
159
|
+
expanded && /* @__PURE__ */ jsx(
|
|
160
|
+
Catch,
|
|
161
|
+
{
|
|
162
|
+
data,
|
|
163
|
+
onCatchClick: onClickCapture
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
const base_paper1 = {
|
|
169
|
+
rotateZ: "-5deg",
|
|
170
|
+
y: 0,
|
|
171
|
+
x: 1,
|
|
172
|
+
scale: 1,
|
|
173
|
+
originX: "55%",
|
|
174
|
+
originY: "80%"
|
|
175
|
+
};
|
|
176
|
+
const base_paper2 = {
|
|
177
|
+
rotateZ: "3deg",
|
|
178
|
+
y: -2,
|
|
179
|
+
scale: 1,
|
|
180
|
+
backgroundColor: "color-mix(in oklab, var(--likec4-palette-fill) 8%, #FFF)",
|
|
181
|
+
originX: "45%",
|
|
182
|
+
originY: "80%"
|
|
183
|
+
};
|
|
184
|
+
const variants = {
|
|
185
|
+
root: {
|
|
186
|
+
initial: {
|
|
187
|
+
["--paper-bg"]: "color-mix(in oklab, var(--likec4-palette-fill) 50%, #EEE)"
|
|
188
|
+
},
|
|
189
|
+
hovered: {},
|
|
190
|
+
whileHover: {
|
|
191
|
+
["--paper-bg"]: "color-mix(in oklab, var(--likec4-palette-fill) 3%, #FFF)"
|
|
192
|
+
},
|
|
193
|
+
exit: {
|
|
194
|
+
["--paper-bg"]: "color-mix(in oklab, var(--likec4-palette-fill) 50%, #EEE)"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
// PAPER BACK
|
|
198
|
+
paper1: {
|
|
199
|
+
initial: {
|
|
200
|
+
...base_paper1,
|
|
201
|
+
rotateZ: "-3.5deg",
|
|
202
|
+
y: 1,
|
|
203
|
+
scale: 0.95
|
|
204
|
+
},
|
|
205
|
+
hovered: {
|
|
206
|
+
...base_paper1
|
|
207
|
+
},
|
|
208
|
+
whileHover: {
|
|
209
|
+
...base_paper1,
|
|
210
|
+
["--paper-bg"]: "color-mix(in oklab, var(--likec4-palette-fill) 3%, #FFF)",
|
|
211
|
+
scale: 1.04
|
|
212
|
+
},
|
|
213
|
+
expanded: {
|
|
214
|
+
...base_paper1,
|
|
215
|
+
y: [0, 1, 20],
|
|
216
|
+
scale: 0.95
|
|
217
|
+
},
|
|
218
|
+
exit: {
|
|
219
|
+
...base_paper1,
|
|
220
|
+
rotateZ: "-3.5deg",
|
|
221
|
+
y: 1,
|
|
222
|
+
scale: 0.95
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
// PAPER FRONT
|
|
226
|
+
paper2: {
|
|
227
|
+
initial: {
|
|
228
|
+
...base_paper2,
|
|
229
|
+
rotateZ: "2deg",
|
|
230
|
+
y: 2,
|
|
231
|
+
scale: 0.95,
|
|
232
|
+
backgroundColor: "color-mix(in oklab, var(--likec4-palette-fill) 50%, #EEE)"
|
|
233
|
+
},
|
|
234
|
+
hovered: {
|
|
235
|
+
...base_paper2
|
|
236
|
+
},
|
|
237
|
+
whileHover: {
|
|
238
|
+
...base_paper2,
|
|
239
|
+
scale: 1.08
|
|
240
|
+
},
|
|
241
|
+
expanded: {
|
|
242
|
+
...base_paper2,
|
|
243
|
+
y: [0, 1, 20],
|
|
244
|
+
scale: 0.95
|
|
245
|
+
},
|
|
246
|
+
exit: {
|
|
247
|
+
...base_paper2,
|
|
248
|
+
rotateZ: "2deg",
|
|
249
|
+
y: 2,
|
|
250
|
+
scale: 0.95,
|
|
251
|
+
backgroundColor: "color-mix(in oklab, var(--likec4-palette-fill) 50%, #EEE)"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
function Catch({
|
|
256
|
+
data,
|
|
257
|
+
onCatchClick
|
|
258
|
+
}) {
|
|
259
|
+
useOnDiagramEvent("paneClick", () => {
|
|
260
|
+
onCatchClick();
|
|
261
|
+
});
|
|
262
|
+
return /* @__PURE__ */ jsx(ViewportPortal, { children: /* @__PURE__ */ jsx(
|
|
263
|
+
Box,
|
|
264
|
+
{
|
|
265
|
+
css: {
|
|
266
|
+
display: "block",
|
|
267
|
+
position: "absolute",
|
|
268
|
+
zIndex: 200,
|
|
269
|
+
pointerEvents: "all",
|
|
270
|
+
left: "0",
|
|
271
|
+
top: "0",
|
|
272
|
+
cursor: "zoom-out"
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
transform: `translate(${data.x - 40}px, ${data.y - 40}px)`,
|
|
276
|
+
width: (data.width ?? 250) + 80,
|
|
277
|
+
height: (data.height ?? 200) + 80
|
|
278
|
+
},
|
|
279
|
+
onMouseDownCapture: onCatchClick,
|
|
280
|
+
onClickCapture: onCatchClick,
|
|
281
|
+
onClick: stopPropagation
|
|
282
|
+
}
|
|
283
|
+
) }, "catch-all");
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export { NodeNotes };
|
|
@@ -6,7 +6,9 @@ import { isTruthy } from 'remeda';
|
|
|
6
6
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
|
|
7
7
|
import { ElementActions } from './ElementActions.js';
|
|
8
8
|
import { NodeDrifts } from './NodeDrifts.js';
|
|
9
|
+
import { NodeNotes } from './NodeNotes.js';
|
|
9
10
|
import { ElementDetailsButtonWithHandler } from './nodes.js';
|
|
11
|
+
import { ElementToolbar } from './toolbar/ElementToolbar.js';
|
|
10
12
|
import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
|
|
11
13
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
12
14
|
import { ElementData } from '../../../base-primitives/element/ElementData.js';
|
|
@@ -67,9 +69,9 @@ const ActorStepPort = ({
|
|
|
67
69
|
)
|
|
68
70
|
] });
|
|
69
71
|
};
|
|
70
|
-
const hasModelFqn = (
|
|
72
|
+
const hasModelFqn = (node) => "modelFqn" in node.data && isTruthy(node.data.modelFqn);
|
|
71
73
|
function SequenceActorNode(props) {
|
|
72
|
-
const { enableElementDetails, enableCompareWithLatest } = useEnabledFeatures();
|
|
74
|
+
const { enableElementDetails, enableReadOnly, enableCompareWithLatest, enableNotes } = useEnabledFeatures();
|
|
73
75
|
const data = props.data;
|
|
74
76
|
const {
|
|
75
77
|
id,
|
|
@@ -109,10 +111,12 @@ function SequenceActorNode(props) {
|
|
|
109
111
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
110
112
|
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
111
113
|
/* @__PURE__ */ jsx(ElementData, { ...props }),
|
|
112
|
-
hasModelFqn(
|
|
113
|
-
/* @__PURE__ */ jsx(ElementActions, { ...props
|
|
114
|
-
enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { id, data })
|
|
115
|
-
|
|
114
|
+
hasModelFqn(props) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
115
|
+
/* @__PURE__ */ jsx(ElementActions, { ...props }),
|
|
116
|
+
enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { id, data }),
|
|
117
|
+
!enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props })
|
|
118
|
+
] }),
|
|
119
|
+
enableNotes && /* @__PURE__ */ jsx(NodeNotes, { ...props })
|
|
116
120
|
] }),
|
|
117
121
|
ports.map((p) => /* @__PURE__ */ jsx(ActorStepPort, { port: p, data: props.data }, p.id))
|
|
118
122
|
] });
|
|
@@ -5,9 +5,11 @@ import '@xstate/react';
|
|
|
5
5
|
import 'fast-equals';
|
|
6
6
|
import 'react';
|
|
7
7
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
8
|
+
import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
|
|
8
9
|
import { CompoundActions } from './CompoundActions.js';
|
|
9
10
|
import { DeploymentElementActions, ElementActions } from './ElementActions.js';
|
|
10
11
|
import { NodeDrifts } from './NodeDrifts.js';
|
|
12
|
+
import { NodeNotes } from './NodeNotes.js';
|
|
11
13
|
import { CompoundDeploymentToolbar, CompoundElementToolbar } from './toolbar/CompoundToolbar.js';
|
|
12
14
|
import { DeploymentElementToolbar, ElementToolbar } from './toolbar/ElementToolbar.js';
|
|
13
15
|
import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
|
|
@@ -17,9 +19,27 @@ import { CompoundDetailsButton } from '../../../base-primitives/compound/Compoun
|
|
|
17
19
|
import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
|
|
18
20
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
19
21
|
import { ElementData } from '../../../base-primitives/element/ElementData.js';
|
|
20
|
-
import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
|
|
21
22
|
import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
|
|
23
|
+
import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
|
|
22
24
|
|
|
25
|
+
function ElementTags(props) {
|
|
26
|
+
const diagram = useDiagram();
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
ElementTags$1,
|
|
29
|
+
{
|
|
30
|
+
onTagClick: useCallbackRef((tag) => {
|
|
31
|
+
diagram.openSearch(tag);
|
|
32
|
+
}),
|
|
33
|
+
onTagMouseEnter: useCallbackRef((tag) => {
|
|
34
|
+
diagram.send({ type: "tag.highlight", tag });
|
|
35
|
+
}),
|
|
36
|
+
onTagMouseLeave: useCallbackRef((_tag) => {
|
|
37
|
+
diagram.send({ type: "tag.unhighlight" });
|
|
38
|
+
}),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
23
43
|
function ElementDetailsButtonWithHandler(props) {
|
|
24
44
|
const diagram = useDiagram();
|
|
25
45
|
const fqn = props.data.modelFqn;
|
|
@@ -51,7 +71,7 @@ function CompoundDetailsButtonWithHandler(props) {
|
|
|
51
71
|
);
|
|
52
72
|
}
|
|
53
73
|
function ElementNode(props) {
|
|
54
|
-
const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
|
|
74
|
+
const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest, enableNotes } = useEnabledFeatures();
|
|
55
75
|
return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
|
|
56
76
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
57
77
|
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
@@ -60,11 +80,12 @@ function ElementNode(props) {
|
|
|
60
80
|
/* @__PURE__ */ jsx(ElementActions, { ...props }),
|
|
61
81
|
enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { ...props }),
|
|
62
82
|
!enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props }),
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
83
|
+
enableNotes && /* @__PURE__ */ jsx(NodeNotes, { ...props }),
|
|
84
|
+
/* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
|
|
64
85
|
] });
|
|
65
86
|
}
|
|
66
87
|
function DeploymentNode(props) {
|
|
67
|
-
const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
|
|
88
|
+
const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest, enableNotes } = useEnabledFeatures();
|
|
68
89
|
return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
|
|
69
90
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
70
91
|
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
@@ -73,7 +94,8 @@ function DeploymentNode(props) {
|
|
|
73
94
|
/* @__PURE__ */ jsx(DeploymentElementActions, { ...props }),
|
|
74
95
|
enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { ...props }),
|
|
75
96
|
!enableReadOnly && /* @__PURE__ */ jsx(DeploymentElementToolbar, { ...props }),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
97
|
+
enableNotes && /* @__PURE__ */ jsx(NodeNotes, { ...props }),
|
|
98
|
+
/* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
|
|
77
99
|
] });
|
|
78
100
|
}
|
|
79
101
|
const compoundHasDrifts = css({
|
|
@@ -99,7 +121,7 @@ function CompoundElementNode(props) {
|
|
|
99
121
|
/* @__PURE__ */ jsx(CompoundActions, { ...props }),
|
|
100
122
|
enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
|
|
101
123
|
!enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
|
|
102
|
-
/* @__PURE__ */ jsx(DefaultHandles, {})
|
|
124
|
+
/* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
|
|
103
125
|
]
|
|
104
126
|
}
|
|
105
127
|
);
|
|
@@ -118,7 +140,7 @@ function CompoundDeploymentNode(props) {
|
|
|
118
140
|
/* @__PURE__ */ jsx(CompoundActions, { ...props }),
|
|
119
141
|
enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
|
|
120
142
|
!enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
|
|
121
|
-
/* @__PURE__ */ jsx(DefaultHandles, {})
|
|
143
|
+
/* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
|
|
122
144
|
]
|
|
123
145
|
}
|
|
124
146
|
);
|
|
@@ -134,7 +156,7 @@ function ViewGroupNode(props) {
|
|
|
134
156
|
children: [
|
|
135
157
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
136
158
|
/* @__PURE__ */ jsx(CompoundTitle, { ...props }),
|
|
137
|
-
/* @__PURE__ */ jsx(DefaultHandles, {})
|
|
159
|
+
/* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
|
|
138
160
|
]
|
|
139
161
|
}
|
|
140
162
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { Flex } from '@likec4/styles/jsx';
|
|
3
|
+
import { Popover, PopoverTarget, Button, ColorSwatch, PopoverDropdown, Space, Divider, Stack, TooltipGroup, Tooltip, CheckIcon, rem, Slider } from '@mantine/core';
|
|
3
4
|
import { useUpdateEffect } from '@react-hookz/web';
|
|
4
5
|
import { useState } from 'react';
|
|
5
6
|
import { keys } from 'remeda';
|
|
@@ -78,7 +79,7 @@ function ColorSwatches({
|
|
|
78
79
|
};
|
|
79
80
|
const otherColors = keys(theme.colors).filter((color) => !SemanticColors.includes(color));
|
|
80
81
|
return /* @__PURE__ */ jsx(Stack, { gap: 2, onMouseLeave: () => onColorPreview(null), children: /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 1e3, closeDelay: 300, children: [
|
|
81
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
82
|
+
/* @__PURE__ */ jsx(Flex, { maxW: "120px", gap: "1.5", justify: "flex-start", align: "flex-start", direction: "row", wrap: "wrap", children: SemanticColors.map((color) => /* @__PURE__ */ jsx(
|
|
82
83
|
Tooltip,
|
|
83
84
|
{
|
|
84
85
|
label: color,
|
|
@@ -106,8 +107,8 @@ function ColorSwatches({
|
|
|
106
107
|
Flex,
|
|
107
108
|
{
|
|
108
109
|
mt: "sm",
|
|
109
|
-
|
|
110
|
-
gap: "
|
|
110
|
+
maxW: "110px",
|
|
111
|
+
gap: "1.5",
|
|
111
112
|
justify: "flex-start",
|
|
112
113
|
align: "flex-start",
|
|
113
114
|
direction: "row",
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { Fqn } from '@likec4/core/types';
|
|
1
2
|
import { Types } from '../../../types';
|
|
2
|
-
export declare function ElementToolbar(props: Types.NodeProps<'element'>
|
|
3
|
+
export declare function ElementToolbar(props: Types.NodeProps<'element' | 'seq-actor'> & {
|
|
4
|
+
data: {
|
|
5
|
+
modelFqn: Fqn;
|
|
6
|
+
};
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
3
8
|
export declare function DeploymentElementToolbar(props: Types.NodeProps<'deployment'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,11 +7,13 @@ import { BorderStyleOption, GoToSourceButton, BrowseRelationshipsButton } from '
|
|
|
7
7
|
import { ColorButton } from './ColorButton.js';
|
|
8
8
|
import { Toolbar } from './Toolbar.js';
|
|
9
9
|
import { useHandlers } from './useHandlers.js';
|
|
10
|
-
import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
+
import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
11
|
+
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';
|
|
12
12
|
|
|
13
|
+
const SortedElementShapes = [...ElementShapes].sort();
|
|
13
14
|
function ElementToolbar(props) {
|
|
14
|
-
const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures();
|
|
15
|
+
const { enableVscode, enableRelationshipBrowser, enableNotes } = useEnabledFeatures();
|
|
16
|
+
const increaseOffset = !!(enableNotes && props.data.notes);
|
|
15
17
|
const {
|
|
16
18
|
data: {
|
|
17
19
|
shape,
|
|
@@ -25,6 +27,7 @@ function ElementToolbar(props) {
|
|
|
25
27
|
{
|
|
26
28
|
nodeProps: props,
|
|
27
29
|
title: modelFqn,
|
|
30
|
+
offset: increaseOffset ? 20 : 10,
|
|
28
31
|
align: "start",
|
|
29
32
|
children: [
|
|
30
33
|
/* @__PURE__ */ jsx(
|
|
@@ -119,7 +122,7 @@ function ElementShapeButton({
|
|
|
119
122
|
offset: 2,
|
|
120
123
|
styles: {
|
|
121
124
|
item: {
|
|
122
|
-
padding: "calc(var(--
|
|
125
|
+
padding: "calc(var(--spacing-xs) / 1.5) var(--spacing-xs)"
|
|
123
126
|
}
|
|
124
127
|
},
|
|
125
128
|
withinPortal: false,
|
|
@@ -129,8 +132,11 @@ function ElementShapeButton({
|
|
|
129
132
|
{
|
|
130
133
|
variant: "light",
|
|
131
134
|
color: "gray",
|
|
132
|
-
size: "
|
|
133
|
-
|
|
135
|
+
size: "compact-sm",
|
|
136
|
+
fz: "xxs",
|
|
137
|
+
px: 4,
|
|
138
|
+
pl: 8,
|
|
139
|
+
py: 2,
|
|
134
140
|
rightSection: /* @__PURE__ */ jsx(IconSelector, { size: 12 }),
|
|
135
141
|
children: elementShape
|
|
136
142
|
}
|
|
@@ -140,11 +146,10 @@ function ElementShapeButton({
|
|
|
140
146
|
{
|
|
141
147
|
onDoubleClick: stopPropagation,
|
|
142
148
|
onClick: stopPropagation,
|
|
143
|
-
children:
|
|
149
|
+
children: SortedElementShapes.map((shape) => /* @__PURE__ */ jsx(
|
|
144
150
|
MenuItem,
|
|
145
151
|
{
|
|
146
|
-
fz:
|
|
147
|
-
fw: 500,
|
|
152
|
+
fz: "sm",
|
|
148
153
|
value: shape,
|
|
149
154
|
rightSection: elementShape === shape ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : void 0,
|
|
150
155
|
onClick: (e) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { SegmentedControl, Tooltip as Tooltip$1
|
|
2
|
+
import { SegmentedControl, ActionIcon, Tooltip as Tooltip$1 } from '@mantine/core';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import '@xstate/react';
|
|
5
5
|
import 'fast-equals';
|
|
6
6
|
import { useDiagram } from '../../../../hooks/safeContext.js';
|
|
7
7
|
import { useDiagramEventHandlers } from '../../../../context/DiagramEventHandlers.js';
|
|
8
|
-
import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
9
|
-
import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
+
import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
9
|
+
import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
10
10
|
|
|
11
11
|
const Tooltip = Tooltip$1.withProps({
|
|
12
12
|
color: "dark",
|
|
@@ -80,7 +80,7 @@ function BorderStyleOption({
|
|
|
80
80
|
SegmentedControl,
|
|
81
81
|
{
|
|
82
82
|
size: "xs",
|
|
83
|
-
fz:
|
|
83
|
+
fz: "xxs",
|
|
84
84
|
fullWidth: true,
|
|
85
85
|
withItemsBorders: false,
|
|
86
86
|
value,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@likec4/styles/css';
|
|
2
2
|
|
|
3
3
|
const toolbarTitle = css({
|
|
4
|
-
color: "
|
|
5
|
-
fontSize: "
|
|
6
|
-
fontWeight:
|
|
4
|
+
color: "text.dimmed",
|
|
5
|
+
fontSize: "xxs",
|
|
6
|
+
fontWeight: "bold",
|
|
7
7
|
maxWidth: "220px",
|
|
8
8
|
cursor: "default",
|
|
9
9
|
userSelect: "all",
|