@likec4/diagram 1.43.0 → 1.44.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 +5746 -4674
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +13 -10
- package/dist/LikeC4Diagram.props.d.ts +16 -7
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4View.d.ts +5 -0
- package/dist/LikeC4View.js +22 -11
- package/dist/ReactLikeC4.js +2 -2
- package/dist/StaticLikeC4Diagram.js +1 -1
- package/dist/_virtual/_commonjsHelpers.js +3 -0
- package/dist/_virtual/assign-dea9f7c8.cjs.js +3 -0
- package/dist/_virtual/log-ec8d4df4.cjs.js +3 -0
- package/dist/_virtual/raise-da5b247f.cjs.js +3 -0
- package/dist/_virtual/xstate-actions.cjs.js +5 -0
- package/dist/_virtual/xstate-actions.cjs2.js +3 -0
- package/dist/_virtual/xstate-dev.cjs.js +3 -0
- package/dist/_virtual/xstate-guards.cjs.js +5 -0
- package/dist/_virtual/xstate-guards.cjs2.js +3 -0
- package/dist/base/Background.d.ts +2 -1
- package/dist/base/Background.js +11 -2
- package/dist/base/Base.d.ts +28 -0
- package/dist/base/BaseXYFlow.d.ts +5 -5
- package/dist/base/BaseXYFlow.js +38 -44
- package/dist/base/index.d.ts +6 -2
- package/dist/base/types.d.ts +1 -28
- package/dist/base/updateEdges.js +4 -3
- package/dist/base/updateNodes.js +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- 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 +4 -0
- package/dist/base-primitives/edge/EdgeLabel.d.ts +1 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +4 -0
- package/dist/base-primitives/edge/EdgePath.d.ts +4 -0
- package/dist/base-primitives/edge/EdgePath.js +9 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
- package/dist/base-primitives/element/ElementActionButtons.js +1 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +2 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementTags.js +2 -1
- package/dist/base-primitives/memoEdge.js +4 -2
- package/dist/base-primitives/memoNode.d.ts +1 -1
- package/dist/base-primitives/memoNode.js +3 -3
- package/dist/components/ErrorFallback.js +52 -35
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +2 -1
- package/dist/context/DiagramFeatures.d.ts +24 -6
- package/dist/context/DiagramFeatures.js +28 -56
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/LikeC4ModelContext.js +3 -10
- package/dist/context/TagStylesContext.js +2 -18
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +1 -1
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +4 -4
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/safeContext.d.ts +6 -3
- package/dist/hooks/safeContext.js +10 -3
- package/dist/hooks/useCallbackRef.d.ts +1 -0
- package/dist/hooks/useCallbackRef.js +13 -0
- package/dist/hooks/useCurrentView.d.ts +11 -0
- package/dist/hooks/{useCurrentViewId.js → useCurrentView.js} +7 -3
- package/dist/hooks/useCurrentViewModel.js +4 -1
- package/dist/hooks/useDiagram.d.ts +7 -113
- package/dist/hooks/useDiagram.js +7 -127
- package/dist/hooks/useDiagramCompareLayout.d.ts +35 -0
- package/dist/hooks/useDiagramCompareLayout.js +60 -0
- package/dist/hooks/useUpdateEffect.js +2 -4
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +4 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/likec4diagram/DiagramUI.js +14 -7
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -2
- package/dist/likec4diagram/DiagramXYFlow.js +54 -51
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +249 -220
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +7 -2
- package/dist/likec4diagram/custom/edges/edges.css.js +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +8 -0
- package/dist/likec4diagram/custom/edges/useControlPoints.js +58 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +7 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +60 -0
- package/dist/likec4diagram/custom/edges/utils.d.ts +0 -12
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +4 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.js +15 -10
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +4 -0
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.js +46 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -1
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +13 -9
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +4 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +1 -11
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +7 -51
- package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +5 -0
- package/dist/likec4diagram/custom/nodes/toolbar/types.js +7 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +8 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +44 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +5 -7
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +3 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +96 -70
- package/dist/likec4diagram/state/assign.d.ts +4 -2
- package/dist/likec4diagram/state/assign.js +39 -103
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +90 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +113 -0
- package/dist/likec4diagram/state/diagram-api.js +134 -0
- package/dist/likec4diagram/state/hotkeyActor.d.ts +7 -0
- package/dist/likec4diagram/state/hotkeyActor.js +17 -1
- package/dist/likec4diagram/state/machine.actions.d.ts +2099 -0
- package/dist/likec4diagram/state/machine.actions.js +735 -0
- package/dist/likec4diagram/state/machine.d.ts +3717 -0
- package/dist/likec4diagram/state/machine.js +141 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +284 -0
- package/dist/likec4diagram/state/machine.setup.js +71 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +183 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +117 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +45 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3666 -0
- package/dist/likec4diagram/state/machine.state.ready.js +437 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +220 -63
- package/dist/likec4diagram/state/syncManualLayoutActor.js +218 -143
- package/dist/likec4diagram/state/types.d.ts +4 -7
- package/dist/likec4diagram/state/utils.d.ts +4 -2
- package/dist/likec4diagram/state/utils.js +4 -1
- package/dist/likec4diagram/types.d.ts +6 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +66 -0
- package/dist/likec4diagram/ui/index.d.ts +1 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -4
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +225 -54
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +15 -15
- package/dist/navigationpanel/NavigationPanel.js +11 -7
- package/dist/navigationpanel/NavigationPanelControls.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelControls.js +23 -17
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +62 -42
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +4 -2
- package/dist/navigationpanel/actor.d.ts +11 -7
- package/dist/navigationpanel/actor.js +5 -4
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +59 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +2 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.js +42 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +60 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +5 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +38 -0
- package/dist/navigationpanel/comparepanel/index.d.ts +1 -0
- package/dist/navigationpanel/controls/{ViewDetailsCard.d.ts → DetailsControls.d.ts} +1 -1
- package/dist/navigationpanel/controls/{ViewDetailsCard.js → DetailsControls.js} +18 -14
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +2 -0
- package/dist/navigationpanel/controls/LayoutWarning.js +102 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +4 -3
- package/dist/navigationpanel/controls/OpenSource.js +2 -2
- package/dist/navigationpanel/controls/SearchControl.d.ts +2 -1
- package/dist/navigationpanel/controls/SearchControl.js +15 -17
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +19 -16
- package/dist/navigationpanel/controls/index.d.ts +2 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +5 -5
- package/dist/navigationpanel/editorpanel/CenterCamera.js +5 -2
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +21 -20
- package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -2
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +16 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +15 -0
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +4 -4
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +14 -8
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +10 -10
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +66 -49
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/actions/dist/xstate-actions.cjs.js +37 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dev/dist/xstate-dev.cjs.js +59 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js +140 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js +401 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js +2716 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/guards/dist/xstate-guards.cjs.js +26 -0
- package/dist/overlays/element-details/ElementDetails.js +7 -7
- package/dist/overlays/element-details/ElementDetailsCard.js +7 -5
- package/dist/overlays/element-details/MetadataValue.js +2 -2
- package/dist/overlays/element-details/TabPanelDeployments.js +6 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +3 -2
- package/dist/overlays/overlaysActor.d.ts +304 -62
- package/dist/overlays/overlaysActor.js +132 -131
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/actor.d.ts +14 -2
- package/dist/overlays/relationship-details/actor.js +17 -3
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -5
- package/dist/overlays/relationship-details/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationship-details/hooks.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -4
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.d.ts +239 -173
- package/dist/overlays/relationships-browser/actor.js +132 -110
- package/dist/overlays/relationships-browser/custom/ElementActions.js +44 -37
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationships-browser/hooks.js +7 -6
- package/dist/search/Search.js +2 -1
- package/dist/search/components/ElementsColumn.js +5 -3
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +21 -44
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +6 -4
- package/dist/shadowroot/ShadowRoot.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +78 -21
- package/dist/utils/vector.js +91 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +57 -0
- package/dist/utils/xyflow.d.ts +49 -7
- package/dist/utils/xyflow.js +63 -11
- package/package.json +19 -18
- package/panda.buildinfo.json +107 -66
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/hooks/useCurrentViewId.d.ts +0 -6
- package/dist/likec4diagram/custom/edges/utils.js +0 -23
- package/dist/likec4diagram/state/diagram-machine.d.ts +0 -2590
- package/dist/likec4diagram/state/diagram-machine.js +0 -1180
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +0 -56
- package/dist/utils/get-view-bounds.d.ts +0 -3
- package/dist/utils/get-view-bounds.js +0 -14
- /package/dist/base/{types.js → Base.js} +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/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.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '@likec4/styles/css';
|
|
3
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
4
|
+
import { navigationPanelActionIcon } from '@likec4/styles/recipes';
|
|
5
|
+
import { HoverCard, HoverCardTarget, UnstyledButton, HoverCardDropdown, Notification, Text, Button } from '@mantine/core';
|
|
6
|
+
import { AnimatePresence } from 'motion/react';
|
|
7
|
+
import * as m from 'motion/react-m';
|
|
8
|
+
import { memo, Fragment as Fragment$1 } from 'react';
|
|
9
|
+
import { useDiagramCompareLayout } from '../../hooks/useDiagramCompareLayout.js';
|
|
10
|
+
import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
|
|
11
|
+
import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
|
|
12
|
+
|
|
13
|
+
const LayoutWarning = memo(() => {
|
|
14
|
+
const [ctx, { toggleCompare }] = useDiagramCompareLayout();
|
|
15
|
+
const portalProps = useMantinePortalProps();
|
|
16
|
+
const { drifts, isActive, isEnabled } = ctx;
|
|
17
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { propagate: true, children: isEnabled && !isActive && /* @__PURE__ */ jsxs(
|
|
18
|
+
HoverCard,
|
|
19
|
+
{
|
|
20
|
+
position: "bottom-start",
|
|
21
|
+
openDelay: 600,
|
|
22
|
+
closeDelay: 200,
|
|
23
|
+
floatingStrategy: "absolute",
|
|
24
|
+
offset: {
|
|
25
|
+
mainAxis: 4,
|
|
26
|
+
crossAxis: -22
|
|
27
|
+
},
|
|
28
|
+
...portalProps,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(HoverCardTarget, { children: /* @__PURE__ */ jsx(
|
|
31
|
+
UnstyledButton,
|
|
32
|
+
{
|
|
33
|
+
component: m.button,
|
|
34
|
+
layout: "position",
|
|
35
|
+
onClick: (e) => {
|
|
36
|
+
toggleCompare();
|
|
37
|
+
},
|
|
38
|
+
whileTap: {
|
|
39
|
+
scale: 0.95,
|
|
40
|
+
translateY: 1
|
|
41
|
+
},
|
|
42
|
+
className: cx(
|
|
43
|
+
"group",
|
|
44
|
+
navigationPanelActionIcon({
|
|
45
|
+
variant: "filled",
|
|
46
|
+
type: "warning"
|
|
47
|
+
}),
|
|
48
|
+
hstack({
|
|
49
|
+
gap: "xxs",
|
|
50
|
+
padding: "1.5",
|
|
51
|
+
rounded: "sm",
|
|
52
|
+
userSelect: "none",
|
|
53
|
+
cursor: "pointer",
|
|
54
|
+
fontSize: "xs",
|
|
55
|
+
fontWeight: 600
|
|
56
|
+
})
|
|
57
|
+
),
|
|
58
|
+
children: isActive ? /* @__PURE__ */ jsx(Fragment, { children: "Stop Compare" }) : /* @__PURE__ */ jsx(IconAlertTriangle, { size: 18 })
|
|
59
|
+
}
|
|
60
|
+
) }),
|
|
61
|
+
/* @__PURE__ */ jsx(HoverCardDropdown, { p: "0", children: /* @__PURE__ */ jsxs(
|
|
62
|
+
Notification,
|
|
63
|
+
{
|
|
64
|
+
color: "orange",
|
|
65
|
+
withBorder: false,
|
|
66
|
+
withCloseButton: false,
|
|
67
|
+
title: "View is out of sync",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Text, { mt: 2, size: "sm", lh: "xs", children: "Model has changed since this view was last updated." }),
|
|
70
|
+
/* @__PURE__ */ jsxs(Text, { mt: 4, size: "sm", lh: "xs", children: [
|
|
71
|
+
"Detected changes:",
|
|
72
|
+
drifts.map((drift) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
74
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
75
|
+
"- ",
|
|
76
|
+
drift
|
|
77
|
+
] })
|
|
78
|
+
] }, drift))
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
Button,
|
|
82
|
+
{
|
|
83
|
+
mt: "xs",
|
|
84
|
+
size: "compact-sm",
|
|
85
|
+
variant: "default",
|
|
86
|
+
onClick: (e) => {
|
|
87
|
+
e.stopPropagation();
|
|
88
|
+
toggleCompare();
|
|
89
|
+
},
|
|
90
|
+
children: "Compare with current state"
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
) });
|
|
99
|
+
});
|
|
100
|
+
LayoutWarning.displayName = "ManualLayoutWarning";
|
|
101
|
+
|
|
102
|
+
export { LayoutWarning };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { hstack } from '@likec4/styles/patterns';
|
|
3
3
|
import * as m from 'motion/react-m';
|
|
4
|
-
import {
|
|
4
|
+
import { useDiagramContext } from '../../hooks/useDiagram.js';
|
|
5
5
|
import { PanelActionIcon } from '../_common.js';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
7
|
+
import IconArrowLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js';
|
|
8
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
8
9
|
|
|
9
10
|
const NavigationButtons = () => {
|
|
10
11
|
const diagram = useDiagram();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
|
|
3
3
|
import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
|
|
4
|
-
import { useCurrentViewId } from '../../hooks/
|
|
4
|
+
import { useCurrentViewId } from '../../hooks/useCurrentView.js';
|
|
5
5
|
import { Tooltip, PanelActionIcon } from '../_common.js';
|
|
6
|
-
import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
6
|
+
import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
7
7
|
|
|
8
8
|
const OpenSource = () => {
|
|
9
9
|
const viewId = useCurrentViewId();
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { MemoExoticComponent } from 'react';
|
|
2
|
+
export declare const SearchControl: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { Box } from '@likec4/styles/jsx';
|
|
4
4
|
import { hstack } from '@likec4/styles/patterns';
|
|
5
5
|
import { UnstyledButton } from '@mantine/core';
|
|
6
6
|
import { isMacOs } from '@xyflow/system';
|
|
7
|
+
import { AnimatePresence } from 'motion/react';
|
|
7
8
|
import * as m from 'motion/react-m';
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
9
|
+
import { memo } from 'react';
|
|
10
|
+
import '@xstate/react';
|
|
11
|
+
import 'fast-equals';
|
|
12
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
13
|
+
import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
|
|
14
|
+
import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
const SearchControl = memo(() => {
|
|
17
|
+
const { enableSearch, enableCompareWithLatest } = useEnabledFeatures();
|
|
12
18
|
const diagram = useDiagram();
|
|
13
19
|
const isMac = isMacOs();
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: enableSearch && !enableCompareWithLatest && /* @__PURE__ */ jsxs(
|
|
15
21
|
UnstyledButton,
|
|
16
22
|
{
|
|
17
23
|
component: m.button,
|
|
@@ -30,17 +36,8 @@ function SearchControl() {
|
|
|
30
36
|
gap: "xxs",
|
|
31
37
|
paddingInline: "sm",
|
|
32
38
|
paddingBlock: "xxs",
|
|
33
|
-
rounded: "sm",
|
|
34
39
|
userSelect: "none",
|
|
35
|
-
|
|
36
|
-
color: {
|
|
37
|
-
base: "likec4.panel.action-icon.text",
|
|
38
|
-
_hover: "likec4.panel.action-icon.text.hover"
|
|
39
|
-
},
|
|
40
|
-
backgroundColor: {
|
|
41
|
-
base: "likec4.panel.action-icon.bg",
|
|
42
|
-
_hover: "likec4.panel.action-icon.bg.hover"
|
|
43
|
-
},
|
|
40
|
+
layerStyle: "likec4.panel.action",
|
|
44
41
|
display: {
|
|
45
42
|
base: "none",
|
|
46
43
|
"@/md": "flex"
|
|
@@ -64,7 +61,8 @@ function SearchControl() {
|
|
|
64
61
|
)
|
|
65
62
|
]
|
|
66
63
|
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
64
|
+
) });
|
|
65
|
+
});
|
|
66
|
+
SearchControl.displayName = "SearchControl";
|
|
69
67
|
|
|
70
68
|
export { SearchControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ToggleReadonly: () => import("react/jsx-runtime").JSX.Element
|
|
1
|
+
export declare const ToggleReadonly: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { cx, css } from '@likec4/styles/css';
|
|
3
3
|
import { hstack } from '@likec4/styles/patterns';
|
|
4
4
|
import { UnstyledButton } from '@mantine/core';
|
|
5
|
+
import { AnimatePresence } from 'motion/react';
|
|
5
6
|
import * as m from 'motion/react-m';
|
|
6
|
-
import { useDiagramContext
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { useDiagramContext } from '../../hooks/useDiagram.js';
|
|
8
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
9
|
+
import IconLock from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js';
|
|
10
|
+
import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
|
|
9
11
|
|
|
10
|
-
const selector = (
|
|
11
|
-
visible:
|
|
12
|
-
|
|
12
|
+
const selector = (ctx) => ({
|
|
13
|
+
visible: ctx.features.enableReadOnly !== true && // Disable toggle in sequence mode
|
|
14
|
+
(ctx.view._type !== "dynamic" || ctx.dynamicViewVariant !== "sequence"),
|
|
15
|
+
isReadOnly: ctx.toggledFeatures.enableReadOnly ?? ctx.features.enableReadOnly
|
|
13
16
|
});
|
|
14
17
|
const ToggleReadonly = () => {
|
|
15
18
|
const { visible, isReadOnly } = useDiagramContext(selector);
|
|
16
19
|
const diagram = useDiagram();
|
|
17
|
-
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: visible && /* @__PURE__ */ jsxs(
|
|
21
21
|
UnstyledButton,
|
|
22
22
|
{
|
|
23
23
|
component: m.button,
|
|
@@ -26,6 +26,9 @@ const ToggleReadonly = () => {
|
|
|
26
26
|
e.stopPropagation();
|
|
27
27
|
diagram.toggleFeature("ReadOnly");
|
|
28
28
|
},
|
|
29
|
+
initial: { opacity: 0, scale: 0.6 },
|
|
30
|
+
animate: { opacity: 1, scale: 1 },
|
|
31
|
+
exit: { opacity: 0, scale: 0.6 },
|
|
29
32
|
whileTap: {
|
|
30
33
|
translateY: 1
|
|
31
34
|
},
|
|
@@ -39,11 +42,11 @@ const ToggleReadonly = () => {
|
|
|
39
42
|
userSelect: "none",
|
|
40
43
|
cursor: "pointer",
|
|
41
44
|
color: {
|
|
42
|
-
base: "likec4.panel.action
|
|
43
|
-
_hover: "likec4.panel.action
|
|
45
|
+
base: "likec4.panel.action",
|
|
46
|
+
_hover: "likec4.panel.action.hover"
|
|
44
47
|
},
|
|
45
48
|
backgroundColor: {
|
|
46
|
-
_hover: "likec4.panel.action
|
|
49
|
+
_hover: "likec4.panel.action.bg.hover"
|
|
47
50
|
}
|
|
48
51
|
})
|
|
49
52
|
),
|
|
@@ -58,12 +61,12 @@ const ToggleReadonly = () => {
|
|
|
58
61
|
lineHeight: 1,
|
|
59
62
|
opacity: 0.8
|
|
60
63
|
}),
|
|
61
|
-
children: "
|
|
64
|
+
children: "Edit"
|
|
62
65
|
}
|
|
63
66
|
)
|
|
64
67
|
]
|
|
65
68
|
}
|
|
66
|
-
);
|
|
69
|
+
) });
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
export { ToggleReadonly };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { BurgerButton } from './BurgerButton';
|
|
2
|
+
export { DetailsControls } from './DetailsControls';
|
|
3
|
+
export { LayoutWarning } from './LayoutWarning';
|
|
2
4
|
export { NavigationButtons } from './NavigationButtons';
|
|
3
5
|
export { OpenSource } from './OpenSource';
|
|
4
6
|
export { SearchControl } from './SearchControl';
|
|
5
7
|
export { ToggleReadonly } from './ToggleReadonly';
|
|
6
|
-
export { ViewDetailsCard } from './ViewDetailsCard';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import { NamedExoticComponent } from 'react';
|
|
2
|
+
export declare const ProjectsMenu: NamedExoticComponent<object>;
|
|
@@ -2,10 +2,11 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { css } from '@likec4/styles/css';
|
|
3
3
|
import { HStack, Box } from '@likec4/styles/jsx';
|
|
4
4
|
import { Menu, MenuTarget, Button, MenuDropdown, MenuItem } from '@mantine/core';
|
|
5
|
+
import { memo } from 'react';
|
|
5
6
|
import { useLikeC4ProjectsContext, useLikeC4ProjectId } from '../../hooks/useLikeC4Project.js';
|
|
6
|
-
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
7
|
+
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
const ProjectsMenu = memo((_) => {
|
|
9
10
|
const { projects, onProjectChange } = useLikeC4ProjectsContext();
|
|
10
11
|
const projectId = useLikeC4ProjectId();
|
|
11
12
|
if (projects.length <= 1) {
|
|
@@ -18,7 +19,7 @@ function ProjectsMenu(props) {
|
|
|
18
19
|
css: {
|
|
19
20
|
fontWeight: "400",
|
|
20
21
|
fontSize: "xxs",
|
|
21
|
-
color: "
|
|
22
|
+
color: "likec4.panel.text.dimmed",
|
|
22
23
|
userSelect: "none"
|
|
23
24
|
},
|
|
24
25
|
children: "Project"
|
|
@@ -57,7 +58,6 @@ function ProjectsMenu(props) {
|
|
|
57
58
|
})
|
|
58
59
|
},
|
|
59
60
|
rightSection: /* @__PURE__ */ jsx(IconChevronDown, { opacity: 0.5, size: 12, stroke: 1.5 }),
|
|
60
|
-
...props,
|
|
61
61
|
children: projectId
|
|
62
62
|
}
|
|
63
63
|
) }),
|
|
@@ -79,6 +79,6 @@ function ProjectsMenu(props) {
|
|
|
79
79
|
}
|
|
80
80
|
)
|
|
81
81
|
] });
|
|
82
|
-
}
|
|
82
|
+
});
|
|
83
83
|
|
|
84
84
|
export { ProjectsMenu };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@xstate/react';
|
|
3
|
+
import 'fast-equals';
|
|
4
|
+
import 'react';
|
|
5
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
3
6
|
import { PanelActionIcon } from '../_common.js';
|
|
4
7
|
import { Tooltip } from './_common.js';
|
|
5
|
-
import IconFocusCentered from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
8
|
+
import IconFocusCentered from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js';
|
|
6
9
|
|
|
7
10
|
const CenterCamera = () => {
|
|
8
11
|
const diagram = useDiagram();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ChangeAutoLayoutButton: () => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const ChangeAutoLayoutButton: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,25 +3,26 @@ import { Popover, PopoverTarget, PopoverDropdown, Box, FloatingIndicator, Text,
|
|
|
3
3
|
import { useHover, useUncontrolled, clampUseMovePosition, useMove, useMergedRef } from '@mantine/hooks';
|
|
4
4
|
import { useDebouncedCallback } from '@react-hookz/web';
|
|
5
5
|
import { useState, forwardRef } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { useDiagramContext } from '../../hooks/useDiagram.js';
|
|
7
7
|
import { PanelActionIcon } from '../_common.js';
|
|
8
8
|
import { Tooltip } from './_common.js';
|
|
9
9
|
import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from './styles.js';
|
|
10
|
-
import {
|
|
11
|
-
import IconLayoutDashboard from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
10
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
11
|
+
import IconLayoutDashboard from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js';
|
|
12
12
|
|
|
13
13
|
const selector = (state) => ({
|
|
14
14
|
viewId: state.view.id,
|
|
15
|
+
isManualLayout: state.view._layout === "manual",
|
|
15
16
|
autoLayout: state.view.autoLayout
|
|
16
17
|
});
|
|
17
18
|
const ChangeAutoLayoutButton = () => {
|
|
18
|
-
const { onChange } = useDiagramEventHandlers();
|
|
19
19
|
const diagram = useDiagram();
|
|
20
20
|
const [rootRef, setRootRef] = useState(null);
|
|
21
21
|
const [controlsRefs, setControlsRefs] = useState({});
|
|
22
22
|
const {
|
|
23
23
|
autoLayout,
|
|
24
|
-
viewId
|
|
24
|
+
viewId,
|
|
25
|
+
isManualLayout
|
|
25
26
|
} = useDiagramContext(selector);
|
|
26
27
|
const { ref, hovered: isSpacingHovered } = useHover();
|
|
27
28
|
const setControlRef = (name) => (node) => {
|
|
@@ -30,29 +31,29 @@ const ChangeAutoLayoutButton = () => {
|
|
|
30
31
|
};
|
|
31
32
|
const setAutoLayout = (direction) => (event) => {
|
|
32
33
|
event.stopPropagation();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
34
|
+
diagram.fitDiagram();
|
|
35
|
+
diagram.triggerChange({
|
|
36
|
+
op: "change-autolayout",
|
|
37
|
+
layout: {
|
|
38
|
+
...autoLayout,
|
|
39
|
+
direction
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
const setSpacing = (nodeSep, rankSep) => {
|
|
44
44
|
diagram.fitDiagram();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rankSep
|
|
52
|
-
}
|
|
45
|
+
diagram.triggerChange({
|
|
46
|
+
op: "change-autolayout",
|
|
47
|
+
layout: {
|
|
48
|
+
...autoLayout,
|
|
49
|
+
nodeSep,
|
|
50
|
+
rankSep
|
|
53
51
|
}
|
|
54
52
|
});
|
|
55
53
|
};
|
|
54
|
+
if (isManualLayout) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
56
57
|
return /* @__PURE__ */ jsxs(
|
|
57
58
|
Popover,
|
|
58
59
|
{
|
|
@@ -5,8 +5,8 @@ import { AnimatePresence } from 'motion/react';
|
|
|
5
5
|
import * as m from 'motion/react-m';
|
|
6
6
|
import { CenterCamera } from './CenterCamera.js';
|
|
7
7
|
import { ChangeAutoLayoutButton } from './ChangeAutoLayoutButton.js';
|
|
8
|
-
import { LayoutDriftNotification } from './LayoutDriftNotification.js';
|
|
9
8
|
import { ManualLayoutToolsButton } from './ManualLayoutToolsButton.js';
|
|
9
|
+
import { ToggleReadonly } from './ToggleReadonly.js';
|
|
10
10
|
import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
|
|
11
11
|
|
|
12
12
|
function EditorPanel() {
|
|
@@ -38,8 +38,8 @@ function EditorPanel() {
|
|
|
38
38
|
children: /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 600, closeDelay: 120, children: [
|
|
39
39
|
/* @__PURE__ */ jsx(ChangeAutoLayoutButton, {}),
|
|
40
40
|
/* @__PURE__ */ jsx(ManualLayoutToolsButton, {}),
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
41
|
+
/* @__PURE__ */ jsx(CenterCamera, {}),
|
|
42
|
+
/* @__PURE__ */ jsx(ToggleReadonly, {})
|
|
43
43
|
] })
|
|
44
44
|
}
|
|
45
45
|
) });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ManualLayoutToolsButton: (
|
|
1
|
+
import { MemoExoticComponent } from 'react';
|
|
2
|
+
export declare const ManualLayoutToolsButton: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -2,19 +2,22 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { css } from '@likec4/styles/css';
|
|
3
3
|
import { hstack } from '@likec4/styles/patterns';
|
|
4
4
|
import { Popover, PopoverTarget, PopoverDropdown, TooltipGroup } from '@mantine/core';
|
|
5
|
-
import {
|
|
5
|
+
import { memo } from 'react';
|
|
6
|
+
import '@xstate/react';
|
|
7
|
+
import 'fast-equals';
|
|
8
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
6
9
|
import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
|
|
7
10
|
import { PanelActionIcon } from '../_common.js';
|
|
8
11
|
import { Tooltip } from './_common.js';
|
|
9
|
-
import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
10
|
-
import IconLayoutBoardSplit from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
11
|
-
import IconLayoutAlignLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
12
|
-
import IconLayoutAlignCenter from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
13
|
-
import IconLayoutAlignRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
14
|
-
import IconLayoutAlignTop from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
15
|
-
import IconLayoutAlignMiddle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
16
|
-
import IconLayoutAlignBottom from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
17
|
-
import IconRouteOff from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
12
|
+
import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
|
|
13
|
+
import IconLayoutBoardSplit from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js';
|
|
14
|
+
import IconLayoutAlignLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js';
|
|
15
|
+
import IconLayoutAlignCenter from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js';
|
|
16
|
+
import IconLayoutAlignRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js';
|
|
17
|
+
import IconLayoutAlignTop from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js';
|
|
18
|
+
import IconLayoutAlignMiddle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js';
|
|
19
|
+
import IconLayoutAlignBottom from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js';
|
|
20
|
+
import IconRouteOff from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js';
|
|
18
21
|
|
|
19
22
|
const Action = ({
|
|
20
23
|
label,
|
|
@@ -36,7 +39,7 @@ const Action = ({
|
|
|
36
39
|
children: icon
|
|
37
40
|
}
|
|
38
41
|
) });
|
|
39
|
-
const ManualLayoutToolsButton = (
|
|
42
|
+
const ManualLayoutToolsButton = memo(() => {
|
|
40
43
|
const diagram = useDiagram();
|
|
41
44
|
const portalProps = useMantinePortalProps();
|
|
42
45
|
return /* @__PURE__ */ jsxs(
|
|
@@ -50,7 +53,6 @@ const ManualLayoutToolsButton = (props) => {
|
|
|
50
53
|
"pointerdown"
|
|
51
54
|
],
|
|
52
55
|
...portalProps,
|
|
53
|
-
...props,
|
|
54
56
|
children: [
|
|
55
57
|
/* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Manual layouting tools", children: /* @__PURE__ */ jsx(PanelActionIcon, { children: /* @__PURE__ */ jsx(IconLayoutCollage, {}) }) }) }),
|
|
56
58
|
/* @__PURE__ */ jsx(
|
|
@@ -168,6 +170,7 @@ const ManualLayoutToolsButton = (props) => {
|
|
|
168
170
|
]
|
|
169
171
|
}
|
|
170
172
|
);
|
|
171
|
-
};
|
|
173
|
+
});
|
|
174
|
+
ManualLayoutToolsButton.displayName = "ManualLayoutToolsButton";
|
|
172
175
|
|
|
173
176
|
export { ManualLayoutToolsButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ToggleReadonly: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '@xstate/react';
|
|
3
|
+
import 'fast-equals';
|
|
4
|
+
import 'react';
|
|
5
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
6
|
+
import { PanelActionIcon } from '../_common.js';
|
|
7
|
+
import { Tooltip } from './_common.js';
|
|
8
|
+
import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
|
|
9
|
+
|
|
10
|
+
const ToggleReadonly = () => {
|
|
11
|
+
const diagram = useDiagram();
|
|
12
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: "Switch to Read-only", children: /* @__PURE__ */ jsx(PanelActionIcon, { onClick: () => diagram.toggleFeature("ReadOnly"), children: /* @__PURE__ */ jsx(IconLockOpen2, { size: 14, stroke: 2 }) }) });
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { ToggleReadonly };
|
|
@@ -6,8 +6,8 @@ const breadcrumbTitle = cva({
|
|
|
6
6
|
fontWeight: "500",
|
|
7
7
|
transition: "fast",
|
|
8
8
|
color: {
|
|
9
|
-
base: "
|
|
10
|
-
_hover: "
|
|
9
|
+
base: "likec4.panel.action",
|
|
10
|
+
_hover: "likec4.panel.action.hover"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
variants: {
|
|
@@ -19,8 +19,8 @@ const breadcrumbTitle = cva({
|
|
|
19
19
|
dimmed: {
|
|
20
20
|
"true": {
|
|
21
21
|
color: {
|
|
22
|
-
base: "
|
|
23
|
-
_hover: "
|
|
22
|
+
base: "likec4.panel.text.dimmed",
|
|
23
|
+
_hover: "likec4.panel.action"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -5,16 +5,21 @@ import { Button, Badge, Portal } from '@mantine/core';
|
|
|
5
5
|
import { AnimatePresence } from 'motion/react';
|
|
6
6
|
import * as m from 'motion/react-m';
|
|
7
7
|
import { isTruthy } from 'remeda';
|
|
8
|
-
import {
|
|
8
|
+
import { useDiagramContext } from '../../hooks/useDiagram.js';
|
|
9
9
|
import { TriggerWalkthroughButton } from './DynamicViewControls.js';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
11
|
+
import IconPlayerStopFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js';
|
|
12
|
+
import IconPlayerSkipBackFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js';
|
|
13
|
+
import IconPlayerSkipForwardFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js';
|
|
13
14
|
import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
|
|
14
15
|
|
|
15
16
|
const PrevNextButton = Button.withProps({
|
|
16
17
|
// Button is polymorphic, but we dont want it to inherit the motion props
|
|
17
18
|
component: m.button,
|
|
19
|
+
layout: "position",
|
|
20
|
+
whileTap: {
|
|
21
|
+
scale: 0.95
|
|
22
|
+
},
|
|
18
23
|
variant: "light",
|
|
19
24
|
size: "xs",
|
|
20
25
|
fw: "500"
|
|
@@ -60,7 +65,7 @@ function ActiveWalkthroughControls() {
|
|
|
60
65
|
totalSteps: s.xyedges.length
|
|
61
66
|
};
|
|
62
67
|
});
|
|
63
|
-
return /* @__PURE__ */ jsxs(AnimatePresence, { propagate: true, children: [
|
|
68
|
+
return /* @__PURE__ */ jsxs(AnimatePresence, { propagate: true, mode: "popLayout", children: [
|
|
64
69
|
/* @__PURE__ */ jsx(
|
|
65
70
|
TriggerWalkthroughButton,
|
|
66
71
|
{
|
|
@@ -87,10 +92,11 @@ function ActiveWalkthroughControls() {
|
|
|
87
92
|
},
|
|
88
93
|
"prev"
|
|
89
94
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ jsxs(
|
|
91
96
|
Badge,
|
|
92
97
|
{
|
|
93
98
|
component: m.div,
|
|
99
|
+
layout: "position",
|
|
94
100
|
size: "md",
|
|
95
101
|
radius: "sm",
|
|
96
102
|
variant: isParallel ? "gradient" : "transparent",
|
|
@@ -108,11 +114,11 @@ function ActiveWalkthroughControls() {
|
|
|
108
114
|
className: css({
|
|
109
115
|
alignItems: "baseline"
|
|
110
116
|
}),
|
|
111
|
-
children:
|
|
117
|
+
children: [
|
|
112
118
|
currentStep,
|
|
113
119
|
" / ",
|
|
114
120
|
totalSteps
|
|
115
|
-
]
|
|
121
|
+
]
|
|
116
122
|
},
|
|
117
123
|
"step-badge"
|
|
118
124
|
),
|