@likec4/diagram 1.48.0 → 1.50.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/README.md +7 -9
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +77 -79
- package/dist/LikeC4Diagram.props.d.ts +9 -1
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +4 -4
- package/dist/LikeC4Styles.d.ts +2 -1
- package/dist/LikeC4View.d.ts +14 -1
- package/dist/LikeC4View.js +31 -18
- package/dist/ReactLikeC4.d.ts +2 -1
- package/dist/ReactLikeC4.js +3 -1
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +46 -43
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +3 -3
- package/dist/adhoc-editor/hooks.js +5 -23
- package/dist/adhoc-editor/index.d.ts +1 -1
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/{ActorProvider.d.ts → state/ActorProvider.d.ts} +1 -3
- package/dist/adhoc-editor/{ActorProvider.js → state/ActorProvider.js} +10 -11
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/{actor.editor.d.ts → state/actor.editor.d.ts} +6 -4
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/{actor.js → state/actor.js} +2 -6
- package/dist/adhoc-editor/{actor.layouter.d.ts → state/actor.layouter.d.ts} +7 -4
- package/dist/adhoc-editor/{actor.layouter.js → state/actor.layouter.js} +17 -13
- package/dist/adhoc-editor/{actor.types.d.ts → state/actor.types.d.ts} +12 -6
- package/dist/adhoc-editor/{actor.types.js → state/actor.types.js} +8 -1
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
- package/dist/base/const.d.ts +1 -0
- package/dist/base-primitives/compound/CompoundActionButton.js +26 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +22 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +5 -4
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +12 -19
- package/dist/base-primitives/edge/EdgeMarkers.js +3 -3
- package/dist/base-primitives/element/ElementActionButtons.js +35 -10
- package/dist/base-primitives/element/ElementDetailsButton.js +47 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base-primitives/element/ElementNodeContainer.js +23 -10
- package/dist/base-primitives/element/ElementShape.d.ts +4 -4
- package/dist/base-primitives/element/ElementShape.js +71 -8
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/Logo.js +1 -1
- package/dist/components/NavigationPanel.js +2 -4
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -16
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.js +10 -1
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +5 -3
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +5 -4
- package/dist/context/IconRenderer.js +51 -24
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorProvider.js +1 -1
- package/dist/editor/applyChangesToManualLayout.js +7 -7
- package/dist/editor/editorActor.actions.js +20 -20
- package/dist/editor/editorActor.setup.js +1 -1
- package/dist/editor/editorActor.states.js +0 -9
- package/dist/editor/useEditorActorLogic.d.ts +1 -2
- package/dist/editor/useEditorActorLogic.js +8 -11
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +2 -6
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +8 -2
- package/dist/hooks/useDiagramCompareLayout.d.ts +5 -5
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -2
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +5 -7
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +22 -24
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +40 -55
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
- package/dist/likec4diagram/custom/nodes/nodes.js +5 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -8
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -28
- package/dist/likec4diagram/state/DiagramActorProvider.js +30 -56
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +27 -0
- package/dist/likec4diagram/state/machine.actions.js +78 -21
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +38 -3
- package/dist/likec4diagram/state/machine.js +4 -1
- package/dist/likec4diagram/state/machine.setup.d.ts +19 -2
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +61 -1
- package/dist/likec4diagram/state/machine.state.ready.js +11 -3
- package/dist/likec4diagram/state/utils.d.ts +2 -1
- package/dist/likec4diagram/state/utils.js +1 -1
- package/dist/likec4diagram/types.d.ts +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.js +6 -29
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +125 -86
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +2 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +7 -2
- package/dist/navigationpanel/NavigationPanel.js +2 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.js +2 -2
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/controls/DetailsControls.js +4 -4
- package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.js +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +16 -16
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +11 -11
- package/dist/overlays/element-details/ElementDetailsCard.js +44 -45
- package/dist/overlays/element-details/MetadataValue.js +7 -7
- package/dist/overlays/element-details/TabPanelDeployments.js +4 -4
- package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -5
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actorContext.d.ts +1 -1
- package/dist/overlays/overlaysActor.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.css.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/search/Search.d.ts +2 -1
- package/dist/search/Search.js +108 -87
- package/dist/search/components/ElementsColumn.css.js +3 -3
- package/dist/search/components/ElementsColumn.js +93 -59
- package/dist/search/components/PickView.js +8 -4
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.js +11 -11
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.js +4 -1
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +7 -5
- package/dist/shadowroot/styles.css.js +3 -2
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +1 -1
- package/dist/utils/xyflow.d.ts +10 -5
- package/dist/utils/xyflow.js +24 -22
- package/package.json +33 -32
- package/panda.buildinfo.json +176 -87
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -52554
- package/bundle/package.json +0 -4
- package/dist/adhoc-editor/EditorNavigationPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorNavigationPanel.js +0 -32
- package/dist/adhoc-editor/SelectElementOverlay.d.ts +0 -1
- package/dist/adhoc-editor/SelectElementOverlay.js +0 -124
- package/dist/adhoc-editor/actor.d.ts +0 -131
- package/dist/adhoc-editor/actor.editor.js +0 -96
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +0 -104
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
package/bundle/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const EditorNavigationPanel: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useSelector } from '@xstate/react';
|
|
3
|
-
import { prop } from 'remeda';
|
|
4
|
-
import { NavigationPanel } from '../components/NavigationPanel.js';
|
|
5
|
-
import { useAdhocEditorActor, selectFromContext } from './hooks.js';
|
|
6
|
-
import { ViewRulesPanel } from './viewrules/ViewRulesPanel.js';
|
|
7
|
-
|
|
8
|
-
const selectRules = selectFromContext(prop("rules"));
|
|
9
|
-
const EditorNavigationPanel = () => {
|
|
10
|
-
const actorRef = useAdhocEditorActor();
|
|
11
|
-
const rules = useSelector(actorRef, selectRules);
|
|
12
|
-
return /* @__PURE__ */ jsxs(NavigationPanel.Root, { children: [
|
|
13
|
-
/* @__PURE__ */ jsxs(NavigationPanel.Body, { children: [
|
|
14
|
-
/* @__PURE__ */ jsx(NavigationPanel.Logo, {}),
|
|
15
|
-
/* @__PURE__ */ jsx(NavigationPanel.Label, { children: "View Editor" })
|
|
16
|
-
] }),
|
|
17
|
-
rules.length > 0 && /* @__PURE__ */ jsx(NavigationPanel.Dropdown, { css: { maxW: "250px" }, children: /* @__PURE__ */ jsx(
|
|
18
|
-
ViewRulesPanel,
|
|
19
|
-
{
|
|
20
|
-
rules,
|
|
21
|
-
onToggle: (rule) => {
|
|
22
|
-
actorRef.send({ type: "toggle.rule", ruleId: rule.id });
|
|
23
|
-
},
|
|
24
|
-
onDelete: (rule) => {
|
|
25
|
-
actorRef.send({ type: "delete.rule", ruleId: rule.id });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
) })
|
|
29
|
-
] });
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { EditorNavigationPanel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SelectElementOverlay(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cx, css } from '@likec4/styles/css';
|
|
3
|
-
import { VStack, styled } from '@likec4/styles/jsx';
|
|
4
|
-
import { flex, center, vstack } from '@likec4/styles/patterns';
|
|
5
|
-
import { Button, Input, ScrollAreaAutosize } from '@mantine/core';
|
|
6
|
-
import { useInputState } from '@mantine/hooks';
|
|
7
|
-
import { AnimatePresence, m } from 'motion/react';
|
|
8
|
-
import { useLikeC4Model } from '../hooks/useLikeC4Model.js';
|
|
9
|
-
import { Overlay } from '../overlays/overlay/Overlay.js';
|
|
10
|
-
import { useAdhocEditor, useAdhocEditorSnapshot, selectFromSnapshot, selectFromContext } from './hooks.js';
|
|
11
|
-
|
|
12
|
-
const selectIfEmpty = selectFromContext((c) => !c.view || c.view.nodes.length === 0);
|
|
13
|
-
function SelectElementsButton({ onClick }) {
|
|
14
|
-
const isEmpty = useAdhocEditorSnapshot(selectIfEmpty);
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
m.div,
|
|
17
|
-
{
|
|
18
|
-
layout: "position",
|
|
19
|
-
layoutId: "select-button-container",
|
|
20
|
-
className: cx(
|
|
21
|
-
flex({
|
|
22
|
-
pointerEvents: "none",
|
|
23
|
-
position: "absolute",
|
|
24
|
-
justifyContent: "center"
|
|
25
|
-
}),
|
|
26
|
-
isEmpty && center({ inset: "0" }),
|
|
27
|
-
!isEmpty && css({
|
|
28
|
-
top: "3",
|
|
29
|
-
width: "100%"
|
|
30
|
-
})
|
|
31
|
-
),
|
|
32
|
-
children: /* @__PURE__ */ jsx(
|
|
33
|
-
Button,
|
|
34
|
-
{
|
|
35
|
-
component: m.button,
|
|
36
|
-
layout: "position",
|
|
37
|
-
layoutId: "select-button",
|
|
38
|
-
className: css({
|
|
39
|
-
pointerEvents: "all"
|
|
40
|
-
}),
|
|
41
|
-
size: isEmpty ? "xl" : "lg",
|
|
42
|
-
variant: "default",
|
|
43
|
-
radius: isEmpty ? "xl" : "lg",
|
|
44
|
-
onClick,
|
|
45
|
-
children: "Add elements"
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
const isSelecting = selectFromSnapshot((s) => s.value.editor === "selecting");
|
|
52
|
-
function SelectElementOverlay() {
|
|
53
|
-
const editor = useAdhocEditor();
|
|
54
|
-
const isOpened = useAdhocEditorSnapshot(isSelecting);
|
|
55
|
-
return /* @__PURE__ */ jsxs(AnimatePresence, { mode: "popLayout", children: [
|
|
56
|
-
/* @__PURE__ */ jsx(SelectElementsButton, { onClick: () => editor.open() }, "select-button"),
|
|
57
|
-
isOpened && /* @__PURE__ */ jsx(Overlay, { onClose: () => editor.close(), children: /* @__PURE__ */ jsx(SelectElementOverlayBody, {}) }, "select-overlay")
|
|
58
|
-
] });
|
|
59
|
-
}
|
|
60
|
-
function SelectElementOverlayBody() {
|
|
61
|
-
const editor = useAdhocEditor();
|
|
62
|
-
const [input, setInput] = useInputState("");
|
|
63
|
-
const elements = useLikeC4Model().elements().toArray();
|
|
64
|
-
return /* @__PURE__ */ jsxs(VStack, { h: "100%", flex: "1", alignItems: "stretch", children: [
|
|
65
|
-
/* @__PURE__ */ jsx(
|
|
66
|
-
Input,
|
|
67
|
-
{
|
|
68
|
-
size: "lg",
|
|
69
|
-
variant: "unstyled",
|
|
70
|
-
placeholder: "Search by title, description or start with # or kind:",
|
|
71
|
-
autoFocus: true,
|
|
72
|
-
"data-autofocus": true,
|
|
73
|
-
value: input,
|
|
74
|
-
onChange: setInput,
|
|
75
|
-
"data-likec4-search-input": true,
|
|
76
|
-
onKeyDownCapture: (e) => {
|
|
77
|
-
switch (e.key) {
|
|
78
|
-
case "Escape": {
|
|
79
|
-
e.stopPropagation();
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
editor.close();
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
case "Enter": {
|
|
85
|
-
e.stopPropagation();
|
|
86
|
-
e.preventDefault();
|
|
87
|
-
editor.close();
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
default: {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
ScrollAreaAutosize,
|
|
99
|
-
{
|
|
100
|
-
scrollbars: "y",
|
|
101
|
-
type: "scroll",
|
|
102
|
-
classNames: {
|
|
103
|
-
content: vstack({
|
|
104
|
-
alignItems: "stretch"
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
children: elements.map((el) => /* @__PURE__ */ jsx(
|
|
108
|
-
styled.button,
|
|
109
|
-
{
|
|
110
|
-
onClick: (e) => {
|
|
111
|
-
e.stopPropagation();
|
|
112
|
-
editor.include(el);
|
|
113
|
-
editor.close();
|
|
114
|
-
},
|
|
115
|
-
children: el.title
|
|
116
|
-
},
|
|
117
|
-
el.id
|
|
118
|
-
))
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
] });
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { SelectElementOverlay };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { ActorRef, SnapshotFrom, StateMachine, ActorRefFromLogic, NonReducibleUnknown, MetaObject, LogAction, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction, DoneActorEvent, ErrorActorEvent } from 'xstate';
|
|
2
|
-
import { EmittedEvents, Events, Context, AdhocViewServiceActor } from './actor.types';
|
|
3
|
-
import { AdhocViewPredicate } from '@likec4/core/compute-view';
|
|
4
|
-
import { LayoutedElementView } from '@likec4/core';
|
|
5
|
-
declare const _adhocEditorLogic: StateMachine<Context, Events, {
|
|
6
|
-
[x: string]: ActorRefFromLogic<AdhocViewServiceActor> | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
src: "service";
|
|
9
|
-
logic: AdhocViewServiceActor;
|
|
10
|
-
id: string | undefined;
|
|
11
|
-
}, never, {
|
|
12
|
-
type: "hasView";
|
|
13
|
-
params: unknown;
|
|
14
|
-
}, never, {
|
|
15
|
-
editor: "idle" | "selecting" | "layouting";
|
|
16
|
-
layouter: "idle" | "call";
|
|
17
|
-
}, "hasView", NonReducibleUnknown, NonReducibleUnknown, EmittedEvents, MetaObject, {
|
|
18
|
-
readonly id: "adhoc-editor";
|
|
19
|
-
readonly context: () => {
|
|
20
|
-
view: null;
|
|
21
|
-
error: undefined;
|
|
22
|
-
rules: never[];
|
|
23
|
-
};
|
|
24
|
-
readonly type: "parallel";
|
|
25
|
-
readonly states: {
|
|
26
|
-
readonly layouter: {
|
|
27
|
-
initial: string;
|
|
28
|
-
states: {
|
|
29
|
-
idle: {
|
|
30
|
-
id: string;
|
|
31
|
-
entry: LogAction<Context, Events, undefined, Events>;
|
|
32
|
-
exit: LogAction<Context, Events, undefined, Events>;
|
|
33
|
-
on: {
|
|
34
|
-
layout: {
|
|
35
|
-
target: "#layouter-call";
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
call: {
|
|
40
|
-
id: string;
|
|
41
|
-
entry: LogAction<Context, Events, undefined, Events>;
|
|
42
|
-
exit: LogAction<Context, Events, undefined, Events>;
|
|
43
|
-
invoke: {
|
|
44
|
-
src: "service";
|
|
45
|
-
input: ({ context }: {
|
|
46
|
-
context: Context;
|
|
47
|
-
event: Events;
|
|
48
|
-
self: ActorRef< MachineSnapshot<Context, Events, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
|
|
49
|
-
}) => {
|
|
50
|
-
predicates: AdhocViewPredicate[];
|
|
51
|
-
};
|
|
52
|
-
onDone: {
|
|
53
|
-
target: "#layouter-idle";
|
|
54
|
-
actions: ActionFunction<Context, DoneActorEvent<{
|
|
55
|
-
view: LayoutedElementView;
|
|
56
|
-
}, string>, Events, undefined, {
|
|
57
|
-
src: "service";
|
|
58
|
-
logic: AdhocViewServiceActor;
|
|
59
|
-
id: string | undefined;
|
|
60
|
-
}, never, never, never, never>;
|
|
61
|
-
};
|
|
62
|
-
onError: {
|
|
63
|
-
target: "#layouter-idle";
|
|
64
|
-
actions: LogAction<Context, ErrorActorEvent<unknown, string>, undefined, Events>[];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
readonly editor: {
|
|
71
|
-
initial: string;
|
|
72
|
-
states: {
|
|
73
|
-
idle: {
|
|
74
|
-
id: string;
|
|
75
|
-
on: {
|
|
76
|
-
'select.open': {
|
|
77
|
-
target: "#selecting";
|
|
78
|
-
};
|
|
79
|
-
'toggle.rule': {
|
|
80
|
-
target: "#layouting";
|
|
81
|
-
actions: ActionFunction<Context, Events, Events, undefined, {
|
|
82
|
-
src: "service";
|
|
83
|
-
logic: AdhocViewServiceActor;
|
|
84
|
-
id: string | undefined;
|
|
85
|
-
}, never, never, never, never>;
|
|
86
|
-
};
|
|
87
|
-
'delete.rule': {
|
|
88
|
-
target: "#layouting";
|
|
89
|
-
actions: ActionFunction<Context, Events, Events, undefined, {
|
|
90
|
-
src: "service";
|
|
91
|
-
logic: AdhocViewServiceActor;
|
|
92
|
-
id: string | undefined;
|
|
93
|
-
}, never, never, never, never>;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
selecting: {
|
|
98
|
-
id: string;
|
|
99
|
-
on: {
|
|
100
|
-
'include.element': {
|
|
101
|
-
target: "#layouting";
|
|
102
|
-
actions: ActionFunction<Context, Events, Events, undefined, {
|
|
103
|
-
src: "service";
|
|
104
|
-
logic: AdhocViewServiceActor;
|
|
105
|
-
id: string | undefined;
|
|
106
|
-
}, never, never, never, never>;
|
|
107
|
-
};
|
|
108
|
-
'select.close': {
|
|
109
|
-
target: "#idle";
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
layouting: {
|
|
114
|
-
id: string;
|
|
115
|
-
always: {
|
|
116
|
-
target: "#idle";
|
|
117
|
-
actions: ActionFunction<Context, Events, Events, undefined, never, never, never, never, never>;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
}>;
|
|
124
|
-
type Infer = typeof _adhocEditorLogic;
|
|
125
|
-
export interface AdhocEditorLogic extends Infer {
|
|
126
|
-
}
|
|
127
|
-
export declare const adhocEditorLogic: AdhocEditorLogic;
|
|
128
|
-
export type AdhocEditorSnapshot = SnapshotFrom<AdhocEditorLogic>;
|
|
129
|
-
export interface AdhocEditorActorRef extends ActorRef<AdhocEditorSnapshot, Events, EmittedEvents> {
|
|
130
|
-
}
|
|
131
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { stringHash } from '@likec4/core/utils';
|
|
2
|
-
import { assertEvent } from 'xstate';
|
|
3
|
-
import { machine } from './actor.types.js';
|
|
4
|
-
|
|
5
|
-
const to = {
|
|
6
|
-
idle: { target: "#idle" },
|
|
7
|
-
selecting: { target: "#selecting" },
|
|
8
|
-
layouting: { target: "#layouting" }
|
|
9
|
-
};
|
|
10
|
-
const includePredicate = () => machine.assign(({ context, event }) => {
|
|
11
|
-
const id = stringHash((context.rules.at(-1)?.id ?? (/* @__PURE__ */ new Date()).toISOString()) + event.type);
|
|
12
|
-
switch (event.type) {
|
|
13
|
-
case "include.element": {
|
|
14
|
-
return {
|
|
15
|
-
rules: [
|
|
16
|
-
...context.rules,
|
|
17
|
-
{
|
|
18
|
-
id,
|
|
19
|
-
expr: { ref: { model: event.model } },
|
|
20
|
-
enabled: true,
|
|
21
|
-
type: "include"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
default: {
|
|
27
|
-
throw new Error(`Unexpected event ${event.type}}`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const toggleRule = () => machine.assign(({ context, event }) => {
|
|
32
|
-
assertEvent(event, "toggle.rule");
|
|
33
|
-
return {
|
|
34
|
-
rules: context.rules.map((rule) => {
|
|
35
|
-
if (rule.id === event.ruleId) {
|
|
36
|
-
return {
|
|
37
|
-
...rule,
|
|
38
|
-
enabled: !rule.enabled
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return rule;
|
|
42
|
-
})
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
const deleteRule = () => machine.assign(({ context, event }) => {
|
|
46
|
-
assertEvent(event, "delete.rule");
|
|
47
|
-
return {
|
|
48
|
-
rules: context.rules.filter((rule) => rule.id !== event.ruleId)
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
const scheduleLayout = () => machine.raise({ type: "layout" });
|
|
52
|
-
const idle = machine.createStateConfig({
|
|
53
|
-
id: "idle",
|
|
54
|
-
on: {
|
|
55
|
-
"select.open": {
|
|
56
|
-
...to.selecting
|
|
57
|
-
},
|
|
58
|
-
"toggle.rule": {
|
|
59
|
-
actions: toggleRule(),
|
|
60
|
-
...to.layouting
|
|
61
|
-
},
|
|
62
|
-
"delete.rule": {
|
|
63
|
-
actions: deleteRule(),
|
|
64
|
-
...to.layouting
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
const selecting = machine.createStateConfig({
|
|
69
|
-
id: "selecting",
|
|
70
|
-
on: {
|
|
71
|
-
"include.element": {
|
|
72
|
-
actions: includePredicate(),
|
|
73
|
-
...to.layouting
|
|
74
|
-
},
|
|
75
|
-
"select.close": {
|
|
76
|
-
...to.idle
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
const layouting = machine.createStateConfig({
|
|
81
|
-
id: "layouting",
|
|
82
|
-
always: {
|
|
83
|
-
actions: scheduleLayout(),
|
|
84
|
-
...to.idle
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const editor = machine.createStateConfig({
|
|
88
|
-
initial: "idle",
|
|
89
|
-
states: {
|
|
90
|
-
idle,
|
|
91
|
-
selecting,
|
|
92
|
-
layouting
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export { editor };
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import '@likec4/core';
|
|
3
|
-
import { cx } from '@likec4/styles/css';
|
|
4
|
-
import { Box, styled } from '@likec4/styles/jsx';
|
|
5
|
-
import { vstack, hstack, txt } from '@likec4/styles/patterns';
|
|
6
|
-
import { ActionIcon } from '@mantine/core';
|
|
7
|
-
import { AnimatePresence, LayoutGroup, m } from 'motion/react';
|
|
8
|
-
import IconCirclePlus from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js';
|
|
9
|
-
import IconTrash from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js';
|
|
10
|
-
|
|
11
|
-
function ViewRulesPanel({
|
|
12
|
-
rules,
|
|
13
|
-
onToggle,
|
|
14
|
-
onDelete
|
|
15
|
-
}) {
|
|
16
|
-
return /* @__PURE__ */ jsxs(Box, { p: "1", children: [
|
|
17
|
-
/* @__PURE__ */ jsx(styled.h4, { mt: "0", fontSize: "md", fontWeight: "normal", children: "View Rules" }),
|
|
18
|
-
/* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", propagate: true, children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(m.div, { layout: true, layoutRoot: true, className: vstack({ gap: "1" }), children: rules.map((rule) => /* @__PURE__ */ jsx(
|
|
19
|
-
m.div,
|
|
20
|
-
{
|
|
21
|
-
layout: "position",
|
|
22
|
-
onClick: () => {
|
|
23
|
-
return onToggle(rule);
|
|
24
|
-
},
|
|
25
|
-
initial: {
|
|
26
|
-
opacity: 0,
|
|
27
|
-
y: -50
|
|
28
|
-
},
|
|
29
|
-
animate: {
|
|
30
|
-
opacity: rule.enabled ? 1 : 0.5,
|
|
31
|
-
scale: rule.enabled ? 1 : 0.98,
|
|
32
|
-
y: 0
|
|
33
|
-
},
|
|
34
|
-
exit: {
|
|
35
|
-
opacity: 0,
|
|
36
|
-
scale: 0.95,
|
|
37
|
-
y: -50
|
|
38
|
-
},
|
|
39
|
-
className: cx(
|
|
40
|
-
hstack({
|
|
41
|
-
p: "1",
|
|
42
|
-
px: "2",
|
|
43
|
-
flexWrap: "nowrap",
|
|
44
|
-
rounded: "sm",
|
|
45
|
-
colorPalette: "teal",
|
|
46
|
-
// colorPalette: rule.type === 'include' ? 'green' : 'red',
|
|
47
|
-
gap: "2",
|
|
48
|
-
border: "default"
|
|
49
|
-
// opacity: rule.enabled ? 1 : 0.5,
|
|
50
|
-
})
|
|
51
|
-
// rule.type !== 'include' && css({ colorPalette: 'red' }),
|
|
52
|
-
),
|
|
53
|
-
children: /* @__PURE__ */ jsx(
|
|
54
|
-
ViewRule,
|
|
55
|
-
{
|
|
56
|
-
rule,
|
|
57
|
-
onToggle: () => onToggle(rule),
|
|
58
|
-
onDelete: () => onDelete(rule)
|
|
59
|
-
},
|
|
60
|
-
rule.id
|
|
61
|
-
)
|
|
62
|
-
},
|
|
63
|
-
rule.id
|
|
64
|
-
)) }) }) })
|
|
65
|
-
] });
|
|
66
|
-
}
|
|
67
|
-
function ViewRule({ rule, onToggle, onDelete }) {
|
|
68
|
-
rule.type === "include";
|
|
69
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
-
/* @__PURE__ */ jsx(PredicatIcon, { children: /* @__PURE__ */ jsx(IconCirclePlus, { size: 14 }) }),
|
|
71
|
-
/* @__PURE__ */ jsx(
|
|
72
|
-
m.div,
|
|
73
|
-
{
|
|
74
|
-
layout: true,
|
|
75
|
-
animate: {
|
|
76
|
-
originX: 0,
|
|
77
|
-
scale: rule.enabled ? 1 : 0.9
|
|
78
|
-
},
|
|
79
|
-
className: txt({ flex: 1, truncate: true }),
|
|
80
|
-
children: JSON.stringify(rule.expr)
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsx(
|
|
84
|
-
ActionIcon,
|
|
85
|
-
{
|
|
86
|
-
onClick: (e) => {
|
|
87
|
-
e.stopPropagation();
|
|
88
|
-
onDelete();
|
|
89
|
-
},
|
|
90
|
-
variant: "subtle",
|
|
91
|
-
color: "red",
|
|
92
|
-
children: /* @__PURE__ */ jsx(IconTrash, {})
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] });
|
|
96
|
-
}
|
|
97
|
-
const PredicatIcon = styled("div", {
|
|
98
|
-
base: {
|
|
99
|
-
display: "contents",
|
|
100
|
-
color: "colorPalette.9"
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
export { ViewRulesPanel };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import createReactComponent from '../createReactComponent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license @tabler/icons-react v3.36.0 - MIT
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const __iconNode = [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M9 12h6", "key": "svg-1" }], ["path", { "d": "M12 9v6", "key": "svg-2" }]];
|
|
12
|
-
const IconCirclePlus = createReactComponent("outline", "circle-plus", "CirclePlus", __iconNode);
|
|
13
|
-
|
|
14
|
-
export { __iconNode, IconCirclePlus as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import createReactComponent from '../createReactComponent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license @tabler/icons-react v3.36.0 - MIT
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const __iconNode = [["path", { "d": "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", "key": "svg-0" }], ["path", { "d": "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", "key": "svg-1" }]];
|
|
12
|
-
const IconCopy = createReactComponent("outline", "copy", "Copy", __iconNode);
|
|
13
|
-
|
|
14
|
-
export { __iconNode, IconCopy as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import createReactComponent from '../createReactComponent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license @tabler/icons-react v3.36.0 - MIT
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const __iconNode = [["path", { "d": "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "key": "svg-0" }], ["path", { "d": "M4 8v-2a2 2 0 0 1 2 -2h2", "key": "svg-1" }], ["path", { "d": "M4 16v2a2 2 0 0 0 2 2h2", "key": "svg-2" }], ["path", { "d": "M16 4h2a2 2 0 0 1 2 2v2", "key": "svg-3" }], ["path", { "d": "M16 20h2a2 2 0 0 0 2 -2v-2", "key": "svg-4" }]];
|
|
12
|
-
const IconFocusCentered = createReactComponent("outline", "focus-centered", "FocusCentered", __iconNode);
|
|
13
|
-
|
|
14
|
-
export { __iconNode, IconFocusCentered as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import createReactComponent from '../createReactComponent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license @tabler/icons-react v3.36.0 - MIT
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const __iconNode = [["path", { "d": "M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z", "key": "svg-0" }], ["path", { "d": "M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-1" }], ["path", { "d": "M15 8l2 0", "key": "svg-2" }], ["path", { "d": "M15 12l2 0", "key": "svg-3" }], ["path", { "d": "M7 16l10 0", "key": "svg-4" }]];
|
|
12
|
-
const IconId = createReactComponent("outline", "id", "Id", __iconNode);
|
|
13
|
-
|
|
14
|
-
export { __iconNode, IconId as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import createReactComponent from '../createReactComponent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license @tabler/icons-react v3.36.0 - MIT
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const __iconNode = [["path", { "d": "M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-0" }], ["path", { "d": "M18 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-1" }], ["path", { "d": "M12 19h4.5c.71 0 1.372 -.212 1.924 -.576m1.545 -2.459a3.5 3.5 0 0 0 -3.469 -3.965h-.499m-4 0h-3.501a3.5 3.5 0 0 1 -2.477 -5.972m2.477 -1.028h3.5", "key": "svg-2" }], ["path", { "d": "M3 3l18 18", "key": "svg-3" }]];
|
|
12
|
-
const IconRouteOff = createReactComponent("outline", "route-off", "RouteOff", __iconNode);
|
|
13
|
-
|
|
14
|
-
export { __iconNode, IconRouteOff as default };
|