@likec4/diagram 1.43.0 → 1.45.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 +14727 -13166
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +14 -9
- package/dist/LikeC4Diagram.props.d.ts +25 -15
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +8 -3
- package/dist/LikeC4View.js +29 -14
- package/dist/ReactLikeC4.d.ts +2 -2
- 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 +25 -14
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -17
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- 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 +8 -1
- package/dist/base-primitives/edge/EdgeLabel.d.ts +3 -2
- 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 +29 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +6 -4
- 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 +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- 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 +25 -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 +3 -19
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +3 -3
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +5 -5
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +4 -2
- 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 +65 -0
- 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/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 +60 -52
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +38 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +256 -217
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +9 -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/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +50 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +74 -29
- 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 +8 -10
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +95 -70
- package/dist/likec4diagram/state/assign.d.ts +13 -7
- package/dist/likec4diagram/state/assign.js +43 -282
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +79 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +109 -0
- package/dist/likec4diagram/state/diagram-api.js +126 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +1783 -0
- package/dist/likec4diagram/state/machine.actions.js +644 -0
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +579 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +129 -0
- package/dist/likec4diagram/state/machine.d.ts +22 -0
- package/dist/likec4diagram/state/machine.js +127 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +327 -0
- package/dist/likec4diagram/state/machine.setup.js +93 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +208 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +14 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +178 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3131 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +386 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +85 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +474 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +96 -0
- package/dist/likec4diagram/state/machine.state.ready.js +262 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +128 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +511 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +177 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +31 -108
- package/dist/likec4diagram/state/syncManualLayoutActor.js +278 -142
- package/dist/likec4diagram/state/types.d.ts +7 -12
- package/dist/likec4diagram/state/utils.d.ts +19 -4
- package/dist/likec4diagram/state/utils.js +47 -4
- package/dist/likec4diagram/types.d.ts +8 -8
- 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.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -4
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +237 -61
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +14 -17
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +16 -8
- 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 +9 -205
- package/dist/navigationpanel/actor.js +6 -5
- 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 +26 -18
- 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 +66 -66
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +68 -50
- 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.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +7 -5
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- 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 +8 -82
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -150
- package/dist/overlays/overlaysActor.js +183 -161
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -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 -550
- package/dist/overlays/relationship-details/actor.js +18 -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/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 +6 -4
- 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 -673
- 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/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/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/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 +8 -6
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +83 -21
- package/dist/utils/vector.js +98 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +58 -0
- package/dist/utils/xyflow.d.ts +52 -8
- package/dist/utils/xyflow.js +31 -11
- package/package.json +26 -24
- package/panda.buildinfo.json +124 -71
- 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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ViewId } from '@likec4/core/types';
|
|
2
|
-
import {
|
|
1
|
+
import { LayoutedView, ViewId } from '@likec4/core/types';
|
|
2
|
+
import { ActorRef, SnapshotFrom, StateMachine } from 'xstate';
|
|
3
3
|
import { CurrentViewModel } from '../hooks/useCurrentViewModel';
|
|
4
4
|
export interface NavigationPanelActorInput {
|
|
5
|
-
|
|
5
|
+
view: LayoutedView;
|
|
6
|
+
viewModel: CurrentViewModel | null;
|
|
6
7
|
}
|
|
7
8
|
export type NavigationPanelActorEvent = {
|
|
8
9
|
type: 'update.inputs';
|
|
@@ -74,7 +75,8 @@ export type DropdownColumnItem = {
|
|
|
74
75
|
selected: boolean;
|
|
75
76
|
};
|
|
76
77
|
export interface NavigationPanelActorContext {
|
|
77
|
-
|
|
78
|
+
view: LayoutedView;
|
|
79
|
+
viewModel: CurrentViewModel | null;
|
|
78
80
|
/**
|
|
79
81
|
* Who activated the dropdown
|
|
80
82
|
* (if `click` then the dropdown is always open until dismissed)
|
|
@@ -88,209 +90,11 @@ export interface NavigationPanelActorContext {
|
|
|
88
90
|
selectedFolder: string;
|
|
89
91
|
searchQuery: string;
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
type: "update activatedBy";
|
|
94
|
-
params: NonReducibleUnknown;
|
|
95
|
-
};
|
|
96
|
-
"keep dropdown open": {
|
|
97
|
-
type: "keep dropdown open";
|
|
98
|
-
params: NonReducibleUnknown;
|
|
99
|
-
};
|
|
100
|
-
"update selected folder": {
|
|
101
|
-
type: "update selected folder";
|
|
102
|
-
params: NonReducibleUnknown;
|
|
103
|
-
};
|
|
104
|
-
"reset selected folder": {
|
|
105
|
-
type: "reset selected folder";
|
|
106
|
-
params: NonReducibleUnknown;
|
|
107
|
-
};
|
|
108
|
-
"update inputs": {
|
|
109
|
-
type: "update inputs";
|
|
110
|
-
params: NonReducibleUnknown;
|
|
111
|
-
};
|
|
112
|
-
"reset search query": {
|
|
113
|
-
type: "reset search query";
|
|
114
|
-
params: NonReducibleUnknown;
|
|
115
|
-
};
|
|
116
|
-
"update search query": {
|
|
117
|
-
type: "update search query";
|
|
118
|
-
params: NonReducibleUnknown;
|
|
119
|
-
};
|
|
120
|
-
"emit navigateTo": {
|
|
121
|
-
type: "emit navigateTo";
|
|
122
|
-
params: NonReducibleUnknown;
|
|
123
|
-
};
|
|
124
|
-
}>, Values<{
|
|
125
|
-
"was opened on hover": {
|
|
126
|
-
type: "was opened on hover";
|
|
127
|
-
params: unknown;
|
|
128
|
-
};
|
|
129
|
-
"has search query": {
|
|
130
|
-
type: "has search query";
|
|
131
|
-
params: unknown;
|
|
132
|
-
};
|
|
133
|
-
"search query is empty": {
|
|
134
|
-
type: "search query is empty";
|
|
135
|
-
params: unknown;
|
|
136
|
-
};
|
|
137
|
-
}>, "open timeout" | "close timeout", "pending" | "idle" | {
|
|
138
|
-
active: "search" | "opened" | "closing" | "decide";
|
|
139
|
-
}, "active", NavigationPanelActorInput, NonReducibleUnknown, NavigationPanelActorEmitted, MetaObject, {
|
|
140
|
-
readonly id: "breadcrumbs";
|
|
141
|
-
readonly context: ({ input }: {
|
|
142
|
-
spawn: {
|
|
143
|
-
<TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
|
|
144
|
-
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
|
|
145
|
-
id?: never;
|
|
146
|
-
systemId?: string;
|
|
147
|
-
input?: InputFrom<TLogic>;
|
|
148
|
-
syncSnapshot?: boolean;
|
|
149
|
-
} & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
|
|
150
|
-
};
|
|
151
|
-
input: NavigationPanelActorInput;
|
|
152
|
-
self: ActorRef<MachineSnapshot<NavigationPanelActorContext, NavigationPanelActorEvent, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, NavigationPanelActorEvent, AnyEventObject>;
|
|
153
|
-
}) => {
|
|
154
|
-
breadcrumbs: never[];
|
|
155
|
-
activatedBy: "hover";
|
|
156
|
-
selectedFolder: string;
|
|
157
|
-
searchQuery: string;
|
|
158
|
-
folderColumns: never[];
|
|
159
|
-
viewModel: CurrentViewModel;
|
|
160
|
-
};
|
|
161
|
-
readonly initial: "idle";
|
|
162
|
-
readonly entry: readonly ["update activatedBy", "reset selected folder"];
|
|
163
|
-
readonly on: {
|
|
164
|
-
readonly 'update.inputs': {
|
|
165
|
-
readonly actions: "update inputs";
|
|
166
|
-
};
|
|
167
|
-
readonly 'searchQuery.change': {
|
|
168
|
-
readonly actions: readonly ["update search query", ActionFunction<NavigationPanelActorContext, {
|
|
169
|
-
type: "searchQuery.change";
|
|
170
|
-
value: string;
|
|
171
|
-
}, NavigationPanelActorEvent, undefined, never, never, never, "open timeout" | "close timeout", never>];
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
readonly states: {
|
|
175
|
-
readonly idle: {
|
|
176
|
-
readonly id: "idle";
|
|
177
|
-
readonly on: {
|
|
178
|
-
readonly 'breadcrumbs.mouseEnter.*': {
|
|
179
|
-
readonly target: "pending";
|
|
180
|
-
readonly actions: "update activatedBy";
|
|
181
|
-
};
|
|
182
|
-
readonly 'breadcrumbs.click.*': {
|
|
183
|
-
readonly target: "active";
|
|
184
|
-
readonly actions: "update activatedBy";
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
readonly pending: {
|
|
189
|
-
readonly on: {
|
|
190
|
-
readonly 'breadcrumbs.mouseEnter.*': {
|
|
191
|
-
readonly actions: "update activatedBy";
|
|
192
|
-
};
|
|
193
|
-
readonly 'breadcrumbs.mouseLeave.*': {
|
|
194
|
-
readonly target: "idle";
|
|
195
|
-
};
|
|
196
|
-
readonly 'breadcrumbs.click.*': {
|
|
197
|
-
readonly target: "active";
|
|
198
|
-
readonly actions: "update activatedBy";
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
readonly after: {
|
|
202
|
-
readonly 'open timeout': {
|
|
203
|
-
readonly target: "active";
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
readonly active: {
|
|
208
|
-
readonly tags: readonly ["active"];
|
|
209
|
-
readonly initial: "decide";
|
|
210
|
-
readonly on: {
|
|
211
|
-
readonly 'dropdown.dismiss': {
|
|
212
|
-
readonly target: "#idle";
|
|
213
|
-
};
|
|
214
|
-
readonly 'breadcrumbs.mouseLeave': {
|
|
215
|
-
readonly guard: "was opened on hover";
|
|
216
|
-
readonly target: ".closing";
|
|
217
|
-
};
|
|
218
|
-
readonly 'dropdown.mouseLeave': {
|
|
219
|
-
readonly guard: "was opened on hover";
|
|
220
|
-
readonly target: ".closing";
|
|
221
|
-
};
|
|
222
|
-
readonly 'searchQuery.changed': {
|
|
223
|
-
readonly target: ".decide";
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
readonly states: {
|
|
227
|
-
readonly decide: {
|
|
228
|
-
readonly always: readonly [{
|
|
229
|
-
readonly guard: "has search query";
|
|
230
|
-
readonly target: "search";
|
|
231
|
-
}, {
|
|
232
|
-
readonly target: "opened";
|
|
233
|
-
}];
|
|
234
|
-
};
|
|
235
|
-
readonly opened: {
|
|
236
|
-
readonly on: {
|
|
237
|
-
readonly 'searchQuery.changed': {
|
|
238
|
-
readonly guard: "has search query";
|
|
239
|
-
readonly actions: "keep dropdown open";
|
|
240
|
-
readonly target: "search";
|
|
241
|
-
};
|
|
242
|
-
readonly 'breadcrumbs.click.viewtitle': {
|
|
243
|
-
readonly actions: "reset selected folder";
|
|
244
|
-
};
|
|
245
|
-
readonly 'breadcrumbs.click.*': {
|
|
246
|
-
readonly actions: "update selected folder";
|
|
247
|
-
};
|
|
248
|
-
readonly 'select.folder': {
|
|
249
|
-
readonly actions: readonly ["keep dropdown open", "update selected folder"];
|
|
250
|
-
};
|
|
251
|
-
readonly 'select.view': {
|
|
252
|
-
readonly actions: readonly ["emit navigateTo"];
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
readonly search: {
|
|
257
|
-
readonly on: {
|
|
258
|
-
readonly 'breadcrumbs.click.viewtitle': {
|
|
259
|
-
readonly actions: readonly ["reset search query", "reset selected folder"];
|
|
260
|
-
readonly target: "opened";
|
|
261
|
-
};
|
|
262
|
-
readonly 'breadcrumbs.click.*': {
|
|
263
|
-
readonly actions: readonly ["reset search query", "update selected folder"];
|
|
264
|
-
readonly target: "opened";
|
|
265
|
-
};
|
|
266
|
-
readonly 'select.view': {
|
|
267
|
-
readonly actions: readonly ["emit navigateTo"];
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
readonly closing: {
|
|
272
|
-
readonly on: {
|
|
273
|
-
readonly 'breadcrumbs.mouseEnter.*': {
|
|
274
|
-
readonly target: "decide";
|
|
275
|
-
};
|
|
276
|
-
readonly 'dropdown.mouseEnter': {
|
|
277
|
-
readonly target: "decide";
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
readonly after: {
|
|
281
|
-
readonly 'close timeout': {
|
|
282
|
-
readonly target: "#idle";
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
};
|
|
289
|
-
}>;
|
|
290
|
-
export interface NavigationPanelActorLogic extends ActorLogicFrom<typeof _actorLogic> {
|
|
93
|
+
type Tags = 'active';
|
|
94
|
+
export interface NavigationPanelActorLogic extends StateMachine<NavigationPanelActorContext, NavigationPanelActorEvent, {}, any, any, any, any, any, Tags, NavigationPanelActorInput, any, NavigationPanelActorEmitted, any, any> {
|
|
291
95
|
}
|
|
292
96
|
export declare const navigationPanelActorLogic: NavigationPanelActorLogic;
|
|
293
97
|
export type NavigationPanelActorSnapshot = SnapshotFrom<NavigationPanelActorLogic>;
|
|
294
|
-
export interface NavigationPanelActorRef extends
|
|
98
|
+
export interface NavigationPanelActorRef extends ActorRef<NavigationPanelActorSnapshot, NavigationPanelActorEvent, NavigationPanelActorEmitted> {
|
|
295
99
|
}
|
|
296
100
|
export {};
|
|
@@ -5,7 +5,7 @@ const _actorLogic = setup({
|
|
|
5
5
|
types: {
|
|
6
6
|
context: {},
|
|
7
7
|
events: {},
|
|
8
|
-
tags: "
|
|
8
|
+
tags: "",
|
|
9
9
|
input: {},
|
|
10
10
|
emitted: {}
|
|
11
11
|
},
|
|
@@ -37,16 +37,17 @@ const _actorLogic = setup({
|
|
|
37
37
|
return { selectedFolder: event.folderPath };
|
|
38
38
|
}),
|
|
39
39
|
"reset selected folder": assign({
|
|
40
|
-
selectedFolder: ({ context }) => context.viewModel
|
|
40
|
+
selectedFolder: ({ context }) => context.viewModel?.folder.path ?? ""
|
|
41
41
|
}),
|
|
42
42
|
"update inputs": assign(({ context, event }) => {
|
|
43
43
|
assertEvent(event, "update.inputs");
|
|
44
|
-
const viewChanged = event.inputs.viewModel
|
|
44
|
+
const viewChanged = event.inputs.viewModel?.id !== context.viewModel?.id;
|
|
45
45
|
let selectedFolder = context.selectedFolder;
|
|
46
|
-
if (!event.inputs.viewModel
|
|
47
|
-
selectedFolder = event.inputs.viewModel
|
|
46
|
+
if (!event.inputs.viewModel?.folder.path.startsWith(selectedFolder)) {
|
|
47
|
+
selectedFolder = event.inputs.viewModel?.folder.path ?? "";
|
|
48
48
|
}
|
|
49
49
|
return {
|
|
50
|
+
view: event.inputs.view,
|
|
50
51
|
viewModel: event.inputs.viewModel,
|
|
51
52
|
selectedFolder,
|
|
52
53
|
// allow dropdown to close on mouse leave if view changed
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '@likec4/styles/css';
|
|
3
|
+
import { Box } from '@likec4/styles/jsx';
|
|
4
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
5
|
+
import { navigationPanelActionIcon } from '@likec4/styles/recipes';
|
|
6
|
+
import { Menu, UnstyledButton, Badge } from '@mantine/core';
|
|
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';
|
|
8
|
+
|
|
9
|
+
function CompareActionsMenu({
|
|
10
|
+
onResetManualLayout
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
Menu,
|
|
14
|
+
{
|
|
15
|
+
withinPortal: false,
|
|
16
|
+
floatingStrategy: "absolute",
|
|
17
|
+
shadow: "lg",
|
|
18
|
+
position: "bottom-start",
|
|
19
|
+
offset: { mainAxis: 4 },
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsxs(
|
|
22
|
+
UnstyledButton,
|
|
23
|
+
{
|
|
24
|
+
className: cx(
|
|
25
|
+
"mantine-active",
|
|
26
|
+
navigationPanelActionIcon({
|
|
27
|
+
variant: "default"
|
|
28
|
+
}),
|
|
29
|
+
hstack({
|
|
30
|
+
gap: "2",
|
|
31
|
+
py: "1.5",
|
|
32
|
+
px: "2",
|
|
33
|
+
lineHeight: "1",
|
|
34
|
+
rounded: "sm",
|
|
35
|
+
textStyle: "xs",
|
|
36
|
+
fontWeight: "medium",
|
|
37
|
+
color: {
|
|
38
|
+
base: "likec4.panel.action",
|
|
39
|
+
_hover: "likec4.panel.action.hover"
|
|
40
|
+
},
|
|
41
|
+
userSelect: "none"
|
|
42
|
+
})
|
|
43
|
+
),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Box, { children: "Actions" }),
|
|
46
|
+
/* @__PURE__ */ jsx(IconChevronDown, { size: 12, stroke: 2, opacity: 0.7 })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Menu.Item, { disabled: true, rightSection: /* @__PURE__ */ jsx(Badge, { size: "xs", radius: "sm", children: "Soon" }), children: "Apply changes" }),
|
|
52
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "sm", onClick: onResetManualLayout, children: "Reset manual layout" })
|
|
53
|
+
] })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { CompareActionsMenu };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
3
|
+
import { AnimatePresence } from 'motion/react';
|
|
4
|
+
import * as m from 'motion/react-m';
|
|
5
|
+
import { memo } from 'react';
|
|
6
|
+
import { ComparePanelControls } from './ComparePanelControls.js';
|
|
7
|
+
import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
|
|
8
|
+
|
|
9
|
+
const ComparePanel = memo(() => {
|
|
10
|
+
const { enableCompareWithLatest } = useEnabledFeatures();
|
|
11
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: enableCompareWithLatest && /* @__PURE__ */ jsx(
|
|
12
|
+
m.div,
|
|
13
|
+
{
|
|
14
|
+
layout: "position",
|
|
15
|
+
className: hstack({
|
|
16
|
+
gap: "2",
|
|
17
|
+
layerStyle: "likec4.panel",
|
|
18
|
+
position: "relative",
|
|
19
|
+
px: "2",
|
|
20
|
+
py: "1",
|
|
21
|
+
pl: "3",
|
|
22
|
+
pointerEvents: "all"
|
|
23
|
+
}),
|
|
24
|
+
initial: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
translateX: -20
|
|
27
|
+
},
|
|
28
|
+
animate: {
|
|
29
|
+
opacity: 1,
|
|
30
|
+
translateX: 0
|
|
31
|
+
},
|
|
32
|
+
exit: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
translateX: -20
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ jsx(ComparePanelControls, {})
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
});
|
|
40
|
+
ComparePanel.displayName = "ComparePanel";
|
|
41
|
+
|
|
42
|
+
export { ComparePanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ComparePanelControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, HStack } from '@likec4/styles/jsx';
|
|
3
|
+
import { Divider as Divider$1 } from '@mantine/core';
|
|
4
|
+
import { useDiagramCompareLayout } from '../../hooks/useDiagramCompareLayout.js';
|
|
5
|
+
import { PanelActionIcon } from '../_common.js';
|
|
6
|
+
import { CompareActionsMenu } from './CompareActionsMenu.js';
|
|
7
|
+
import { LayoutTypeSwitcher } from './LayoutTypeSwitcher.js';
|
|
8
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
9
|
+
|
|
10
|
+
const Divider = Divider$1.withProps({
|
|
11
|
+
mx: 2,
|
|
12
|
+
size: "xs",
|
|
13
|
+
orientation: "vertical"
|
|
14
|
+
});
|
|
15
|
+
function ComparePanelControls() {
|
|
16
|
+
const [ctx, { toggleCompare, switchLayout, resetManualLayout }] = useDiagramCompareLayout();
|
|
17
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(
|
|
19
|
+
Box,
|
|
20
|
+
{
|
|
21
|
+
css: {
|
|
22
|
+
textStyle: "xs",
|
|
23
|
+
color: "likec4.panel.text",
|
|
24
|
+
userSelect: "none"
|
|
25
|
+
},
|
|
26
|
+
children: "Compare"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
LayoutTypeSwitcher,
|
|
31
|
+
{
|
|
32
|
+
value: ctx.layout,
|
|
33
|
+
onChange: switchLayout
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
ctx.isEditable && /* @__PURE__ */ jsxs(HStack, { gap: "1", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
CompareActionsMenu,
|
|
40
|
+
{
|
|
41
|
+
onResetManualLayout: resetManualLayout
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(Divider, {})
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
PanelActionIcon,
|
|
48
|
+
{
|
|
49
|
+
size: "sm",
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
toggleCompare();
|
|
53
|
+
},
|
|
54
|
+
children: /* @__PURE__ */ jsx(IconX, {})
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { ComparePanelControls };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { invariant } from '@likec4/core';
|
|
3
|
+
import { css } from '@likec4/styles/css';
|
|
4
|
+
import { SegmentedControl } from '@mantine/core';
|
|
5
|
+
import * as m from 'motion/react-m';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
function LayoutTypeSwitcher({
|
|
9
|
+
value,
|
|
10
|
+
onChange
|
|
11
|
+
}) {
|
|
12
|
+
const data = useMemo(() => [
|
|
13
|
+
{ value: "manual", label: "Saved" },
|
|
14
|
+
{ value: "auto", label: "Latest" }
|
|
15
|
+
], []);
|
|
16
|
+
return /* @__PURE__ */ jsx(m.div, { layout: "position", children: /* @__PURE__ */ jsx(
|
|
17
|
+
SegmentedControl,
|
|
18
|
+
{
|
|
19
|
+
size: "xs",
|
|
20
|
+
color: value === "manual" ? "orange" : "green",
|
|
21
|
+
value,
|
|
22
|
+
component: m.div,
|
|
23
|
+
onChange: (layout) => {
|
|
24
|
+
invariant(layout === "manual" || layout === "auto", "Invalid layout type");
|
|
25
|
+
onChange(layout);
|
|
26
|
+
},
|
|
27
|
+
classNames: {
|
|
28
|
+
label: css({
|
|
29
|
+
fontSize: "xxs",
|
|
30
|
+
fontWeight: "medium"
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
data
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { LayoutTypeSwitcher };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComparePanel } from './ComparePanel';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PopoverProps } from '@mantine/core';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const DetailsControls: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { extractViewTitleFromPath } from '@likec4/core/model';
|
|
3
|
+
import { RichText } from '@likec4/core/types';
|
|
2
4
|
import { cx, css } from '@likec4/styles/css';
|
|
3
5
|
import { HStack, Box, styled } from '@likec4/styles/jsx';
|
|
4
6
|
import { hstack, vstack } from '@likec4/styles/patterns';
|
|
5
7
|
import { Popover, UnstyledButton, Text, Badge } from '@mantine/core';
|
|
8
|
+
import { deepEqual } from 'fast-equals';
|
|
6
9
|
import * as m from 'motion/react-m';
|
|
7
10
|
import { useState } from 'react';
|
|
8
11
|
import { Link } from '../../components/Link.js';
|
|
9
|
-
import {
|
|
12
|
+
import { useOnDiagramEvent } from '../../hooks/useDiagram.js';
|
|
10
13
|
import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
|
|
11
14
|
import { useNavigationActorSnapshot } from '../hooks.js';
|
|
12
|
-
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
13
|
-
import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
15
|
+
import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
16
|
+
import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
|
|
17
|
+
import { useDiagram } from '../../hooks/safeContext.js';
|
|
14
18
|
import { ElementTag } from '../../base-primitives/element/ElementTags.js';
|
|
15
19
|
import { Markdown } from '../../base-primitives/Markdown.js';
|
|
16
20
|
|
|
17
21
|
const selector = ({ context }) => {
|
|
18
|
-
const view = context.
|
|
22
|
+
const view = context.view;
|
|
19
23
|
return {
|
|
20
24
|
id: view.id,
|
|
21
|
-
title: view.
|
|
22
|
-
description: view.description,
|
|
23
|
-
tags: view.tags,
|
|
24
|
-
links: view.links
|
|
25
|
+
title: context.viewModel?.title ?? (view.title && extractViewTitleFromPath(view.title)) ?? "Untitled View",
|
|
26
|
+
description: context.viewModel?.description ?? RichText.from(view.description),
|
|
27
|
+
tags: view.tags ?? [],
|
|
28
|
+
links: view.links ?? []
|
|
25
29
|
};
|
|
26
30
|
};
|
|
27
|
-
const
|
|
31
|
+
const DetailsControls = (props) => {
|
|
28
32
|
const [opened, setOpened] = useState(false);
|
|
29
|
-
const data = useNavigationActorSnapshot(selector);
|
|
33
|
+
const data = useNavigationActorSnapshot(selector, deepEqual);
|
|
30
34
|
const portalProps = useMantinePortalProps();
|
|
31
35
|
return /* @__PURE__ */ jsxs(
|
|
32
36
|
Popover,
|
|
@@ -71,11 +75,11 @@ const ViewDetailsCardTrigger = ({ linksCount, onOpen }) => /* @__PURE__ */ jsx(P
|
|
|
71
75
|
userSelect: "none",
|
|
72
76
|
cursor: "pointer",
|
|
73
77
|
color: {
|
|
74
|
-
base: "likec4.panel.action
|
|
75
|
-
_hover: "likec4.panel.action
|
|
78
|
+
base: "likec4.panel.action",
|
|
79
|
+
_hover: "likec4.panel.action.hover"
|
|
76
80
|
},
|
|
77
81
|
backgroundColor: {
|
|
78
|
-
_hover: "likec4.panel.action
|
|
82
|
+
_hover: "likec4.panel.action.bg.hover"
|
|
79
83
|
},
|
|
80
84
|
display: {
|
|
81
85
|
base: "none",
|
|
@@ -244,4 +248,4 @@ const ViewBadgeLabel = styled("div", {
|
|
|
244
248
|
}
|
|
245
249
|
});
|
|
246
250
|
|
|
247
|
-
export {
|
|
251
|
+
export { DetailsControls };
|
|
@@ -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 };
|