@likec4/diagram 1.44.0 → 1.46.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/bundle/index.js +18847 -17876
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +15 -12
- package/dist/LikeC4Diagram.props.d.ts +13 -20
- package/dist/LikeC4ProjectsProvider.js +8 -4
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +3 -3
- package/dist/LikeC4View.js +8 -8
- package/dist/ReactLikeC4.d.ts +3 -6
- package/dist/StaticLikeC4Diagram.js +0 -2
- package/dist/base/Base.d.ts +1 -1
- package/dist/base/updateEdges.js +25 -15
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -18
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- package/dist/base-primitives/NodeHandles.d.ts +2 -1
- package/dist/base-primitives/NodeHandles.js +22 -18
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +6 -4
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -2
- package/dist/base-primitives/edge/EdgeLabel.js +16 -16
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
- package/dist/base-primitives/edge/EdgePath.js +27 -12
- package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
- package/dist/base-primitives/element/ElementActionButtons.js +3 -3
- package/dist/base-primitives/element/ElementData.d.ts +3 -3
- package/dist/base-primitives/element/ElementData.js +13 -7
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
- package/dist/base-primitives/element/ElementDetailsButton.js +4 -1
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +0 -1
- package/dist/context/DiagramFeatures.d.ts +2 -1
- package/dist/context/DiagramFeatures.js +1 -0
- package/dist/context/EnsureMantine.js +2 -1
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/TagStylesContext.js +1 -1
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.js +1 -1
- package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
- package/dist/editor/LikeC4EditorProvider.js +12 -0
- package/dist/editor/__tests__/fixture.d.ts +205 -0
- package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
- package/dist/editor/applyChangesToManualLayout.js +182 -0
- package/dist/editor/editorActor.actions.d.ts +201 -0
- package/dist/editor/editorActor.actions.js +149 -0
- package/dist/editor/editorActor.d.ts +653 -0
- package/dist/editor/editorActor.js +324 -0
- package/dist/editor/hotkeyActor.d.ts +7 -0
- package/dist/editor/hotkeyActor.js +19 -0
- package/dist/editor/index.d.ts +3 -2
- package/dist/editor/useEditorActorLogic.d.ts +565 -0
- package/dist/editor/useEditorActorLogic.js +54 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/safeContext.d.ts +3 -2
- package/dist/hooks/safeContext.js +7 -4
- package/dist/hooks/useDiagram.d.ts +4 -2
- package/dist/hooks/useDiagram.js +19 -8
- package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
- package/dist/hooks/useDiagramCompareLayout.js +29 -4
- package/dist/hooks/useLikeC4Project.d.ts +6 -1
- package/dist/hooks/useLikeC4Project.js +14 -2
- package/dist/hooks/useMediaPrint.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/likec4diagram/DiagramXYFlow.js +11 -7
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +34 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +90 -54
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +3 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
- package/dist/likec4diagram/custom/edges/useControlPoints.js +5 -5
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +5 -5
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/{ElementNodeDrifts.js → NodeDrifts.js} +12 -13
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.js +61 -23
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +128 -15
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +63 -72
- package/dist/likec4diagram/state/assign.d.ts +14 -7
- package/dist/likec4diagram/state/assign.js +28 -200
- package/dist/likec4diagram/state/createViewChange.js +23 -30
- package/dist/likec4diagram/state/diagram-api.d.ts +20 -6
- package/dist/likec4diagram/state/diagram-api.js +58 -52
- package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -8
- package/dist/likec4diagram/state/hotkeyActor.js +13 -17
- package/dist/likec4diagram/state/machine.actions.d.ts +1127 -864
- package/dist/likec4diagram/state/machine.actions.js +316 -296
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +641 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +141 -0
- package/dist/likec4diagram/state/machine.d.ts +18 -3712
- package/dist/likec4diagram/state/machine.js +64 -73
- package/dist/likec4diagram/state/machine.setup.d.ts +80 -26
- package/dist/likec4diagram/state/machine.setup.js +44 -7
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +58 -17
- package/dist/likec4diagram/state/machine.state.initializing.js +14 -14
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +5 -108
- package/dist/likec4diagram/state/machine.state.navigating.js +187 -35
- package/dist/likec4diagram/state/machine.state.ready.d.ts +2997 -2598
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +710 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +98 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +540 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +105 -0
- package/dist/likec4diagram/state/machine.state.ready.js +95 -347
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +140 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +684 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +190 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/types.d.ts +11 -9
- package/dist/likec4diagram/state/utils.d.ts +44 -5
- package/dist/likec4diagram/state/utils.js +62 -6
- package/dist/likec4diagram/types.d.ts +8 -13
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.js +104 -103
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +12 -15
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +11 -10
- package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
- package/dist/navigationpanel/_common.js +1 -1
- package/dist/navigationpanel/actor.d.ts +4 -204
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
- package/dist/navigationpanel/controls/DetailsControls.js +2 -2
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.js +2 -2
- package/dist/navigationpanel/controls/ToggleReadonly.js +32 -19
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +9 -9
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +4 -3
- package/dist/overlays/Overlays.js +24 -12
- package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- package/dist/overlays/element-details/MetadataValue.js +4 -6
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +8 -83
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -392
- package/dist/overlays/overlaysActor.js +73 -49
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/_types.d.ts +3 -4
- package/dist/overlays/relationship-details/actor.d.ts +6 -562
- package/dist/overlays/relationship-details/actor.js +1 -0
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/layout-to-xyflow.js +3 -5
- package/dist/overlays/relationship-details/layout.d.ts +3 -3
- package/dist/overlays/relationship-details/layout.js +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/_types.d.ts +2 -3
- package/dist/overlays/relationships-browser/actor.d.ts +7 -739
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/layout.d.ts +2 -2
- package/dist/overlays/relationships-browser/layout.js +3 -3
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
- package/dist/overlays/types.d.ts +12 -13
- package/dist/search/components/ElementsColumn.js +7 -3
- package/dist/search/components/PickView.js +3 -1
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -1
- package/dist/search/components/ViewsColum.js +13 -7
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/searchActor.d.ts +3 -66
- package/dist/shadowroot/ShadowRoot.d.ts +5 -7
- package/dist/shadowroot/ShadowRoot.js +7 -5
- package/dist/shadowroot/styles.css.js +6 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/view-bounds.js +7 -6
- package/dist/utils/xyflow.d.ts +6 -5
- package/dist/utils/xyflow.js +26 -57
- package/package.json +24 -23
- package/panda.buildinfo.json +65 -71
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/edge/edge.css.d.ts +0 -4
- package/dist/base-primitives/edge/edge.css.js +0 -71
- package/dist/editor/LikeC4EditorContext.d.ts +0 -21
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +0 -4
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -280
- package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -248
- package/dist/utils/vector.d.ts +0 -81
- package/dist/utils/vector.js +0 -120
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -6,7 +6,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
8
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
9
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
9
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
10
|
|
|
11
11
|
function CompoundActionButton({
|
|
12
12
|
data: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
import { Simplify } from 'type-fest';
|
|
2
3
|
import { BaseNodeProps } from '../../base/types';
|
|
3
4
|
type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
|
|
4
|
-
icon?:
|
|
5
|
-
onClick: (e:
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
6
7
|
}>;
|
|
7
8
|
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -6,7 +6,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
8
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
9
|
-
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
9
|
+
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
10
10
|
|
|
11
11
|
function CompoundDetailsButton({
|
|
12
12
|
data: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
type EdgeActionBtnProps = {
|
|
2
|
-
icon?:
|
|
3
|
-
onClick: (e:
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
4
5
|
};
|
|
5
6
|
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import { cx } from '@likec4/styles/css';
|
|
|
3
3
|
import { edgeActionBtn } from '@likec4/styles/recipes';
|
|
4
4
|
import { ActionIcon } from '@mantine/core';
|
|
5
5
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
6
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
6
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
7
7
|
|
|
8
8
|
function EdgeActionButton({ icon, onClick }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -7,5 +7,5 @@ type EdgeContainerProps = PropsWithChildren<BaseEdgePropsWithData<Data> & {
|
|
|
7
7
|
component?: 'g' | 'svg' | undefined;
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
}>;
|
|
10
|
-
export declare function EdgeContainer({ className, component, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, children, style, }: EdgeContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, animated, children, style, }: EdgeContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { invariant } from '@likec4/core';
|
|
3
3
|
import { cx } from '@likec4/styles/css';
|
|
4
|
-
import { edgeContainer } from './edge.css.js';
|
|
5
4
|
|
|
6
5
|
function EdgeContainer({
|
|
7
6
|
className,
|
|
8
7
|
component = "g",
|
|
8
|
+
selectable = false,
|
|
9
9
|
selected = false,
|
|
10
10
|
data: {
|
|
11
11
|
color = "gray",
|
|
@@ -14,19 +14,21 @@ function EdgeContainer({
|
|
|
14
14
|
dimmed: isDimmed = false,
|
|
15
15
|
...data
|
|
16
16
|
},
|
|
17
|
+
animated,
|
|
17
18
|
children,
|
|
18
19
|
style
|
|
19
20
|
}) {
|
|
20
21
|
const props = {
|
|
21
22
|
className: cx(
|
|
22
23
|
className,
|
|
23
|
-
|
|
24
|
-
"
|
|
24
|
+
"likec4-edge-container",
|
|
25
|
+
selected && "selected",
|
|
26
|
+
selectable && "selectable"
|
|
25
27
|
),
|
|
26
28
|
"data-likec4-color": color,
|
|
27
29
|
"data-edge-dir": data.dir ?? "forward",
|
|
28
30
|
"data-edge-active": isActive,
|
|
29
|
-
"data-edge-animated": isActive,
|
|
31
|
+
"data-edge-animated": animated || isActive,
|
|
30
32
|
"data-likec4-hovered": isHovered,
|
|
31
33
|
...selected && {
|
|
32
34
|
"data-likec4-selected": selected
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DiagramEdge } from '@likec4/core/types';
|
|
2
2
|
import { HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import { ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
4
|
import { UndefinedOnPartialDeep } from 'type-fest';
|
|
4
5
|
import { BaseEdgePropsWithData } from '../../base/types';
|
|
5
|
-
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
6
6
|
type Data = UndefinedOnPartialDeep<Pick<DiagramEdge, 'label' | 'technology'>>;
|
|
7
7
|
type EdgeLabelProps = HTMLMotionProps<'div'> & {
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
10
10
|
pointerEvents?: 'all' | 'none';
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { isStepEdgeId, extractStep } from '@likec4/core';
|
|
3
|
-
import { cx
|
|
3
|
+
import { cx } from '@likec4/styles/css';
|
|
4
4
|
import { Box } from '@likec4/styles/jsx';
|
|
5
5
|
import { edgeLabel } from '@likec4/styles/recipes';
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
@@ -26,38 +26,38 @@ const EdgeLabel = forwardRef(({
|
|
|
26
26
|
...rest
|
|
27
27
|
}, ref) => {
|
|
28
28
|
const stepNum = isStepEdgeId(id) ? extractStep(id) : null;
|
|
29
|
-
const classes = edgeLabel({
|
|
30
|
-
pointerEvents,
|
|
31
|
-
isStepEdge: stepNum !== null,
|
|
32
|
-
cursor: selectable || stepNum !== null ? "pointer" : "default"
|
|
33
|
-
});
|
|
34
29
|
const hasLabel = isTruthy(label) || isTruthy(technology);
|
|
35
30
|
return /* @__PURE__ */ jsxs(
|
|
36
31
|
m.div,
|
|
37
32
|
{
|
|
38
33
|
ref,
|
|
39
|
-
className: cx(
|
|
34
|
+
className: cx(
|
|
35
|
+
// This class is queried by RelationshipPopover to position near the edge label
|
|
36
|
+
"likec4-edge-label",
|
|
37
|
+
edgeLabel({
|
|
38
|
+
pointerEvents,
|
|
39
|
+
isStepEdge: stepNum !== null,
|
|
40
|
+
cursor: selectable || stepNum !== null ? "pointer" : "default"
|
|
41
|
+
}),
|
|
42
|
+
className
|
|
43
|
+
),
|
|
40
44
|
"data-edge-id": id,
|
|
41
45
|
animate: {
|
|
42
46
|
scale: isHovered && !selected ? 1.06 : 1
|
|
43
47
|
},
|
|
44
48
|
...rest,
|
|
45
49
|
children: [
|
|
46
|
-
stepNum !== null && /* @__PURE__ */ jsx(Box, { className:
|
|
47
|
-
hasLabel && /* @__PURE__ */ jsxs(Box, { className:
|
|
50
|
+
stepNum !== null && /* @__PURE__ */ jsx(Box, { className: "likec4-edge-label__step-number", children: stepNum }),
|
|
51
|
+
hasLabel && /* @__PURE__ */ jsxs(Box, { className: "likec4-edge-label__contents", children: [
|
|
48
52
|
isTruthy(label) && /* @__PURE__ */ jsx(
|
|
49
53
|
Box,
|
|
50
54
|
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
css({
|
|
54
|
-
lineClamp: 5
|
|
55
|
-
})
|
|
56
|
-
),
|
|
55
|
+
lineClamp: 5,
|
|
56
|
+
className: "likec4-edge-label__text",
|
|
57
57
|
children: label
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
isTruthy(technology) && /* @__PURE__ */ jsx(Box, { className:
|
|
60
|
+
isTruthy(technology) && /* @__PURE__ */ jsx(Box, { className: "likec4-edge-label__technology", children: "[ " + technology + " ]" }),
|
|
61
61
|
children
|
|
62
62
|
] })
|
|
63
63
|
]
|
|
@@ -14,5 +14,5 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
16
16
|
};
|
|
17
|
-
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, }, labelPosition: labelXY, className, style, children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style, children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export {};
|
|
@@ -20,7 +20,8 @@ function EdgeLabelContainer({
|
|
|
20
20
|
dimmed: isDimmed = false,
|
|
21
21
|
labelBBox,
|
|
22
22
|
color = "gray"
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
|
+
animated
|
|
24
25
|
},
|
|
25
26
|
labelPosition: labelXY,
|
|
26
27
|
className,
|
|
@@ -40,7 +41,7 @@ function EdgeLabelContainer({
|
|
|
40
41
|
if (labelX === void 0 || labelY === void 0) {
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
|
-
const translate = labelXY?.translate;
|
|
44
|
+
const translate = labelXY?.translate ?? "";
|
|
44
45
|
return /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsx(
|
|
45
46
|
"div",
|
|
46
47
|
{
|
|
@@ -53,7 +54,7 @@ function EdgeLabelContainer({
|
|
|
53
54
|
"data-likec4-hovered": isHovered,
|
|
54
55
|
"data-likec4-color": color,
|
|
55
56
|
"data-edge-active": isActive,
|
|
56
|
-
"data-edge-animated": isActive,
|
|
57
|
+
"data-edge-animated": animated || isActive,
|
|
57
58
|
...selected !== false && {
|
|
58
59
|
"data-likec4-selected": selected
|
|
59
60
|
},
|
|
@@ -66,7 +67,7 @@ function EdgeLabelContainer({
|
|
|
66
67
|
},
|
|
67
68
|
zIndex,
|
|
68
69
|
...style,
|
|
69
|
-
transform: `translate(${toCssVarValue(labelX)}, ${toCssVarValue(labelY)}) ${translate
|
|
70
|
+
transform: `translate(${toCssVarValue(labelX)}, ${toCssVarValue(labelY)}) ${translate}`
|
|
70
71
|
},
|
|
71
72
|
children
|
|
72
73
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx, css } from '@likec4/styles/css';
|
|
3
|
+
import { edgePath } from '@likec4/styles/recipes';
|
|
3
4
|
import { forwardRef } from 'react';
|
|
4
|
-
import { markerContext, edgePathBg, cssEdgePath } from './edge.css.js';
|
|
5
5
|
import { arrowTypeToMarker, EdgeMarkers } from './EdgeMarkers.js';
|
|
6
6
|
|
|
7
7
|
const EdgePath = forwardRef(({
|
|
@@ -38,8 +38,9 @@ const EdgePath = forwardRef(({
|
|
|
38
38
|
} else if (isDashed) {
|
|
39
39
|
strokeDasharray = "8,10";
|
|
40
40
|
}
|
|
41
|
+
const classes = edgePath();
|
|
41
42
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
-
selectable &&
|
|
43
|
+
selectable && /* @__PURE__ */ jsx(
|
|
43
44
|
"path",
|
|
44
45
|
{
|
|
45
46
|
className: cx(
|
|
@@ -53,28 +54,43 @@ const EdgePath = forwardRef(({
|
|
|
53
54
|
style: {
|
|
54
55
|
strokeWidth: interactionWidth ?? 10,
|
|
55
56
|
stroke: "currentcolor",
|
|
56
|
-
strokeOpacity: 0
|
|
57
|
+
strokeOpacity: 0,
|
|
58
|
+
...isDragging ? { display: "none" } : {}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"circle",
|
|
64
|
+
{
|
|
65
|
+
className: cx(
|
|
66
|
+
// This class is queried by RelationshipPopover to position in the middle of the edge
|
|
67
|
+
"likec4-edge-middle-point",
|
|
68
|
+
classes.middlePoint
|
|
69
|
+
),
|
|
70
|
+
"data-edge-id": id,
|
|
71
|
+
style: {
|
|
72
|
+
offsetPath: `path("${svgPath}")`
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ jsxs("g", { className: classes.markersCtx, onPointerDown: onEdgePointerDown, children: [
|
|
61
77
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
62
78
|
MarkerStart && /* @__PURE__ */ jsx(MarkerStart, { id: "start" + id }),
|
|
63
79
|
MarkerEnd && /* @__PURE__ */ jsx(MarkerEnd, { id: "end" + id })
|
|
64
80
|
] }),
|
|
65
|
-
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
66
82
|
"path",
|
|
67
83
|
{
|
|
68
84
|
className: cx(
|
|
69
85
|
"react-flow__edge-path",
|
|
70
86
|
"hide-on-reduced-graphics",
|
|
71
|
-
|
|
87
|
+
classes.pathBg,
|
|
88
|
+
isDragging && css({ display: "none" })
|
|
72
89
|
),
|
|
73
90
|
d: svgPath,
|
|
74
91
|
style,
|
|
75
92
|
strokeLinecap: "round"
|
|
76
|
-
}
|
|
77
|
-
"edge-path-bg"
|
|
93
|
+
}
|
|
78
94
|
),
|
|
79
95
|
/* @__PURE__ */ jsx(
|
|
80
96
|
"path",
|
|
@@ -82,8 +98,8 @@ const EdgePath = forwardRef(({
|
|
|
82
98
|
ref: svgPathRef,
|
|
83
99
|
className: cx(
|
|
84
100
|
"react-flow__edge-path",
|
|
85
|
-
|
|
86
|
-
|
|
101
|
+
classes.path,
|
|
102
|
+
selectable && "react-flow__edge-interaction"
|
|
87
103
|
),
|
|
88
104
|
d: svgPath,
|
|
89
105
|
style,
|
|
@@ -92,8 +108,7 @@ const EdgePath = forwardRef(({
|
|
|
92
108
|
strokeDasharray,
|
|
93
109
|
markerStart: MarkerStart ? `url(#start${id})` : void 0,
|
|
94
110
|
markerEnd: MarkerEnd ? `url(#end${id})` : void 0
|
|
95
|
-
}
|
|
96
|
-
"edge-path"
|
|
111
|
+
}
|
|
97
112
|
)
|
|
98
113
|
] })
|
|
99
114
|
] });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
type ElementActionButtonsProps = {
|
|
2
3
|
selected?: boolean;
|
|
3
4
|
data: {
|
|
@@ -34,8 +35,8 @@ export declare function ElementActionButtons({ selected, data: { hovered: isHove
|
|
|
34
35
|
export declare namespace ElementActionButtons {
|
|
35
36
|
type Item = {
|
|
36
37
|
key?: string;
|
|
37
|
-
icon?:
|
|
38
|
-
onClick: (e:
|
|
38
|
+
icon?: ReactNode;
|
|
39
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
export {};
|
|
@@ -7,7 +7,7 @@ import { ActionIcon } from '@mantine/core';
|
|
|
7
7
|
import { useId } from '@mantine/hooks';
|
|
8
8
|
import * as m from 'motion/react-m';
|
|
9
9
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
10
|
-
import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
10
|
+
import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js';
|
|
11
11
|
|
|
12
12
|
const container = hstack({
|
|
13
13
|
position: "absolute",
|
|
@@ -58,6 +58,7 @@ function ElementActionButtons({
|
|
|
58
58
|
scale: isHovered ? 1.1 : selected ? 0.9 : 0.8,
|
|
59
59
|
y: isHovered || selected ? 6 : 0
|
|
60
60
|
},
|
|
61
|
+
layoutDependency: `${isHovered}-${selected}`,
|
|
61
62
|
"data-likec4-hovered": isHovered,
|
|
62
63
|
className: cx("nodrag nopan", actionButtons),
|
|
63
64
|
children: buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
@@ -76,8 +77,7 @@ function ElementActionButtons({
|
|
|
76
77
|
},
|
|
77
78
|
`${id}-${button.key ?? index}`
|
|
78
79
|
))
|
|
79
|
-
}
|
|
80
|
-
`${id}-action-buttons`
|
|
80
|
+
}
|
|
81
81
|
)
|
|
82
82
|
}
|
|
83
83
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComputedNodeStyle, NodeId } from '@likec4/core';
|
|
2
|
-
import { Color
|
|
1
|
+
import { ComputedNodeStyle, MarkdownOrString, NodeId } from '@likec4/core';
|
|
2
|
+
import { Color } from '@likec4/core/types';
|
|
3
3
|
import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
4
4
|
type RequiredData = {
|
|
5
5
|
id: NodeId;
|
|
@@ -7,7 +7,7 @@ type RequiredData = {
|
|
|
7
7
|
technology?: string | null | undefined;
|
|
8
8
|
color: Color;
|
|
9
9
|
style: ComputedNodeStyle;
|
|
10
|
-
description?:
|
|
10
|
+
description?: MarkdownOrString | null | undefined;
|
|
11
11
|
icon?: string | null;
|
|
12
12
|
};
|
|
13
13
|
type ElementDataProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ensureSizes } from '@likec4/core/types';
|
|
3
|
-
import { cx } from '@likec4/styles/css';
|
|
2
|
+
import { ensureSizes, RichText } from '@likec4/core/types';
|
|
3
|
+
import { cx, css } from '@likec4/styles/css';
|
|
4
4
|
import { elementNodeData } from '@likec4/styles/recipes';
|
|
5
5
|
import { Text } from '@mantine/core';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
@@ -69,9 +69,10 @@ const Technology = forwardRef(({ data, children, className, ...props }, ref) =>
|
|
|
69
69
|
) : null;
|
|
70
70
|
});
|
|
71
71
|
const Description = forwardRef(({ data: { description, style }, className, ...props }, ref) => {
|
|
72
|
-
if (!description
|
|
72
|
+
if (!description) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
+
const desc = RichText.from(description);
|
|
75
76
|
const { size } = ensureSizes(style);
|
|
76
77
|
const isSm = size === "sm" || size === "xs";
|
|
77
78
|
return /* @__PURE__ */ jsx(
|
|
@@ -80,14 +81,19 @@ const Description = forwardRef(({ data: { description, style }, className, ...pr
|
|
|
80
81
|
...props,
|
|
81
82
|
className: cx(
|
|
82
83
|
className,
|
|
83
|
-
"likec4-element-description"
|
|
84
|
+
"likec4-element-description",
|
|
85
|
+
css({
|
|
86
|
+
lineClamp: isSm ? 3 : 5
|
|
87
|
+
})
|
|
84
88
|
),
|
|
85
89
|
"data-likec4-node-description": "",
|
|
86
|
-
value:
|
|
90
|
+
value: desc,
|
|
87
91
|
uselikec4palette: true,
|
|
88
92
|
hideIfEmpty: true,
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
style: {
|
|
94
|
+
// Workaround for lineClamp not working with nested TABLE elements (if markdown has tables)
|
|
95
|
+
maxHeight: desc.isMarkdown ? "8rem" : void 0
|
|
96
|
+
},
|
|
91
97
|
ref
|
|
92
98
|
}
|
|
93
99
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
1
2
|
import { BaseNodeData } from '../../base/types';
|
|
2
3
|
type ElementDetailsButtonProps = {
|
|
3
4
|
selected?: boolean;
|
|
4
5
|
data: BaseNodeData;
|
|
5
|
-
icon?:
|
|
6
|
-
onClick: (e:
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
onClick: (e: ReactMouseEvent) => void;
|
|
7
8
|
};
|
|
8
9
|
export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -5,7 +5,7 @@ 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.35.0_react@19.2.
|
|
8
|
+
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
9
9
|
|
|
10
10
|
const container = css({
|
|
11
11
|
position: "absolute",
|
|
@@ -27,6 +27,9 @@ const container = css({
|
|
|
27
27
|
},
|
|
28
28
|
_smallZoom: {
|
|
29
29
|
display: "none"
|
|
30
|
+
},
|
|
31
|
+
_print: {
|
|
32
|
+
display: "none"
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
function ElementDetailsButton({
|
|
@@ -151,11 +151,11 @@ function ShapeSvgOutline({ shape, w, h }) {
|
|
|
151
151
|
svg = /* @__PURE__ */ jsx(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
|
-
x: -
|
|
155
|
-
y: -
|
|
156
|
-
width: w +
|
|
157
|
-
height: h +
|
|
158
|
-
rx:
|
|
154
|
+
x: -3,
|
|
155
|
+
y: -3,
|
|
156
|
+
width: w + 6,
|
|
157
|
+
height: h + 6,
|
|
158
|
+
rx: 8
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
break;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes, MemoExoticComponent } from 'react';
|
|
2
2
|
import { BaseNodePropsWithData } from '../../base/types';
|
|
3
|
-
import { ForwardRefExoticComponent, RefAttributes, MemoExoticComponent } from 'react';
|
|
4
3
|
export type ElementTagProps = {
|
|
5
4
|
tag: string;
|
|
6
5
|
cursor?: 'pointer' | 'default';
|
|
7
|
-
} & Omit<
|
|
8
|
-
export declare const ElementTag: ForwardRefExoticComponent<
|
|
6
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'color'>;
|
|
7
|
+
export declare const ElementTag: ForwardRefExoticComponent<{
|
|
8
|
+
tag: string;
|
|
9
|
+
cursor?: "pointer" | "default";
|
|
10
|
+
} & Omit<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "color"> & RefAttributes<HTMLDivElement>>;
|
|
9
11
|
type Data = {
|
|
10
12
|
tags: readonly string[] | null | undefined;
|
|
11
13
|
width: number;
|
|
@@ -4,7 +4,7 @@ import { HStack, VStack } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { ThemeIcon, Text, ScrollAreaAutosize, Button } from '@mantine/core';
|
|
5
5
|
import { useRef, useEffect } from 'react';
|
|
6
6
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
7
|
-
import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
7
|
+
import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
8
8
|
|
|
9
9
|
function ErrorFallback({ error, resetErrorBoundary }) {
|
|
10
10
|
const errorString = error instanceof Error ? error.message : "Unknown error";
|
package/dist/components/Link.js
CHANGED
|
@@ -4,8 +4,8 @@ import { styled } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { Badge, CopyButton, ActionIcon } from '@mantine/core';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { GithubIcon } from './GithubIcon.js';
|
|
7
|
-
import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
8
|
-
import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
7
|
+
import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
|
|
8
|
+
import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
|
|
9
9
|
|
|
10
10
|
const GITHUB_PREFIX = "https://github.com/";
|
|
11
11
|
const Link = forwardRef(
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExclusiveUnion } from '@likec4/core/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
declare const FeatureNames: readonly ["Controls", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Vscode", "ElementTags"];
|
|
3
|
+
declare const FeatureNames: readonly ["Controls", "Editor", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Vscode", "ElementTags"];
|
|
4
4
|
export type FeatureName = typeof FeatureNames[number];
|
|
5
|
+
export type TogglableFeature = ('ReadOnly' | 'CompareWithLatest') & FeatureName;
|
|
5
6
|
export type EnabledFeatures = {
|
|
6
7
|
[P in `enable${FeatureName}`]: boolean;
|
|
7
8
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { MantineContext, MantineProvider } from '@mantine/core';
|
|
3
3
|
import { useContext, useEffect } from 'react';
|
|
4
|
+
import { DefaultTheme } from '../shadowroot/styles.css.js';
|
|
4
5
|
|
|
5
6
|
function EnsureMantine({ children }) {
|
|
6
7
|
const mantineCtx = useContext(MantineContext);
|
|
@@ -10,7 +11,7 @@ function EnsureMantine({ children }) {
|
|
|
10
11
|
}
|
|
11
12
|
}, []);
|
|
12
13
|
if (!mantineCtx) {
|
|
13
|
-
return /* @__PURE__ */ jsx(MantineProvider, { defaultColorScheme: "auto", children });
|
|
14
|
+
return /* @__PURE__ */ jsx(MantineProvider, { defaultColorScheme: "auto", theme: DefaultTheme, children });
|
|
14
15
|
}
|
|
15
16
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
16
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { createContext, useContext } from 'react';
|
|
4
|
-
import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
5
|
-
import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
6
|
-
import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
7
|
-
import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
8
|
-
import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
9
|
-
import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.
|
|
4
|
+
import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
|
|
5
|
+
import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
|
|
6
|
+
import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
|
|
7
|
+
import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
|
|
8
|
+
import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
|
|
9
|
+
import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
|
|
10
10
|
|
|
11
11
|
const IconRendererContext = createContext(null);
|
|
12
12
|
function IconRendererProvider({
|
|
@@ -13,7 +13,7 @@ const generateColorVars = (spec) => {
|
|
|
13
13
|
if (isTagColorSpecified(spec)) {
|
|
14
14
|
return `
|
|
15
15
|
--colors-likec4-tag-bg: ${color};
|
|
16
|
-
--colors-likec4-tag-bg-hover: color-mix(in
|
|
16
|
+
--colors-likec4-tag-bg-hover: color-mix(in oklab, ${color}, var(--colors-likec4-mix-color) 20%);
|
|
17
17
|
`;
|
|
18
18
|
}
|
|
19
19
|
if (!radixColors.includes(color)) {
|
package/dist/custom/hooks.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { DiagramActorRef, DiagramActorSnapshot, DiagramContext, DiagramEmittedEvents, DiagramEvents, } from '../likec4diagram/state/types';
|
|
2
2
|
export { useDiagramEventHandlers, } from '../context/DiagramEventHandlers';
|
|
3
3
|
export { type EnabledFeatures, type FeatureName, useEnabledFeatures, } from '../context/DiagramFeatures';
|
|
4
4
|
export { useCurrentView, useCurrentViewId, } from '../hooks/useCurrentView';
|
|
5
5
|
export { type DiagramApi, useDiagram, useDiagramActorRef, useDiagramContext, useOnDiagramEvent, } from '../hooks/useDiagram';
|
|
6
6
|
export { useCurrentViewModel, } from '../hooks/useCurrentViewModel';
|
|
7
7
|
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel, } from '../hooks/useLikeC4Model';
|
|
8
|
-
export { useHasProjects, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext, } from '../hooks/useLikeC4Project';
|
|
8
|
+
export { useHasProjects, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext, } from '../hooks/useLikeC4Project';
|
|
9
9
|
export { useLikeC4Styles, } from '../hooks/useLikeC4Styles';
|
|
10
10
|
export { useSetState } from '../hooks/useSetState';
|
|
11
11
|
export { useUpdateEffect } from '../hooks/useUpdateEffect';
|
package/dist/custom/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { useDiagram, useDiagramActorRef } from '../hooks/safeContext.js';
|
|
|
18
18
|
export { useDiagramContext, useOnDiagramEvent } from '../hooks/useDiagram.js';
|
|
19
19
|
export { useCurrentViewModel } from '../hooks/useCurrentViewModel.js';
|
|
20
20
|
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../hooks/useLikeC4Model.js';
|
|
21
|
-
export { useHasProjects, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext } from '../hooks/useLikeC4Project.js';
|
|
21
|
+
export { useHasProjects, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext } from '../hooks/useLikeC4Project.js';
|
|
22
22
|
export { useLikeC4Styles } from '../hooks/useLikeC4Styles.js';
|
|
23
23
|
export { useSetState } from '../hooks/useSetState.js';
|
|
24
24
|
export { useUpdateEffect } from '../hooks/useUpdateEffect.js';
|