@likec4/diagram 1.32.2 → 1.34.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 +25 -0
- package/bundle/{chunk-DlHyKoeo.js → chunk-Dd7et66b.js} +533 -487
- package/bundle/custom.js +53 -50
- package/bundle/index.js +471 -311
- package/dist/LikeC4Diagram.props.d.ts +1 -1
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/base/primitives/MarkdownBlock.d.ts +27 -0
- package/dist/base/primitives/MarkdownBlock.js +42 -0
- package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base/primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base/primitives/element/ElementDetailsButton.js +1 -1
- package/dist/base/primitives/element/ElementTags.d.ts +1 -1
- package/dist/base/primitives/element/ElementTags.js +116 -125
- package/dist/base/primitives/element/ElementTitle.css.js +6 -1
- package/dist/base/primitives/element/ElementTitle.d.ts +3 -2
- package/dist/base/primitives/element/ElementTitle.js +9 -6
- package/dist/base/primitives/index.d.ts +1 -0
- package/dist/bundle/LikeC4View.d.ts +1 -1
- package/dist/bundle/LikeC4View.js +1 -1
- package/dist/bundle/LikeC4View.props.d.ts +1 -1
- package/dist/bundle/ReactLikeC4.d.ts +1 -1
- package/dist/bundle/custom.js +31 -0
- package/dist/bundle/index.js +1 -0
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +2 -1
- package/dist/components/SearchControl.js +1 -1
- package/dist/context/DiagramFeatures.d.ts +3 -2
- package/dist/context/DiagramFeatures.js +16 -1
- package/dist/context/IconRenderer.js +6 -1
- package/dist/context/TagStylesContext.js +1 -1
- package/dist/custom/components.d.ts +2 -2
- package/dist/custom/customNodes.js +18 -0
- package/dist/custom/hooks.d.ts +3 -3
- package/dist/custom/index.js +31 -0
- package/dist/hooks/safeContext.js +1 -1
- package/dist/hooks/useXYFlow.d.ts +2 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +1 -0
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +5 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -1
- package/dist/likec4diagram/types.d.ts +3 -2
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +1 -1
- package/dist/likec4diagram/ui/controls/Controls.js +3 -1
- package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +1 -1
- package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +9 -1
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +2 -1
- package/dist/likec4diagram/ui/controls/ToggleReadonly.js +2 -1
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +19 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -1
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +4 -1
- package/dist/likec4diagram/useViewToNodesEdges.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +41 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +13 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +13 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +4 -2
- package/dist/overlays/element-details/ElementDetailsCard.js +127 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -1
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -1
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +2 -2
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -1
- package/dist/overlays/relationship-details/SelectEdge.js +2 -1
- package/dist/overlays/relationship-details/_types.d.ts +4 -3
- package/dist/overlays/relationship-details/actor.d.ts +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -1
- package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +2 -2
- package/dist/overlays/relationship-details/hooks.d.ts +10 -10
- package/dist/overlays/relationship-details/layout-to-xyflow.js +4 -4
- package/dist/overlays/relationship-details/layout.d.ts +5 -3
- package/dist/overlays/relationship-details/layout.js +2 -2
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -1
- package/dist/overlays/relationships-browser/SelectElement.js +2 -1
- package/dist/overlays/relationships-browser/_types.d.ts +3 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +3 -3
- package/dist/overlays/relationships-browser/layout.d.ts +4 -3
- package/dist/overlays/relationships-browser/layout.js +3 -3
- package/dist/search/components/ElementsColumn.js +2 -2
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +4 -3
- package/dist/state/DiagramActorProvider.js +9 -1
- package/dist/state/diagram-machine.js +1 -1
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/package.json +25 -19
- package/panda.buildinfo.json +881 -862
- package/src/LikeC4Diagram.props.ts +1 -1
- package/src/StaticLikeC4Diagram.tsx +1 -1
- package/src/base/primitives/MarkdownBlock.tsx +66 -0
- package/src/base/primitives/element/ElementTags.tsx +118 -116
- package/src/base/primitives/element/ElementTitle.css.ts +7 -1
- package/src/base/primitives/element/ElementTitle.tsx +14 -9
- package/src/base/primitives/index.ts +1 -0
- package/src/bundle/LikeC4View.props.ts +1 -1
- package/src/bundle/LikeC4View.tsx +1 -1
- package/src/bundle/ReactLikeC4.tsx +1 -1
- package/src/context/DiagramFeatures.tsx +7 -7
- package/src/custom/components.ts +2 -0
- package/src/custom/hooks.ts +5 -0
- package/src/hooks/useXYFlow.ts +9 -1
- package/src/index.ts +18 -6
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +1 -1
- package/src/likec4diagram/types.ts +2 -2
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +21 -16
- package/src/likec4diagram/useViewToNodesEdges.ts +2 -1
- package/src/overlays/element-details/ElementDetailsCard.css.ts +3 -1
- package/src/overlays/element-details/ElementDetailsCard.tsx +101 -17
- package/src/overlays/relationship-details/_types.ts +12 -3
- package/src/overlays/relationship-details/layout-to-xyflow.ts +3 -2
- package/src/overlays/relationship-details/layout.ts +7 -4
- package/src/overlays/relationships-browser/_types.ts +2 -1
- package/src/overlays/relationships-browser/layout.ts +7 -4
- package/src/search/components/ElementsColumn.tsx +1 -1
- package/src/search/components/ViewsColum.tsx +2 -2
- package/src/state/DiagramActorProvider.tsx +10 -2
- package/src/state/diagram-machine.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, DiagramNode, Fqn, IconUrl, NonEmptyArray, RelationId, RelationshipLineType, ViewId } from '@likec4/core/types';
|
|
1
|
+
import { Color, DiagramNode, Fqn, IconUrl, NonEmptyArray, RelationId, RelationshipLineType, RichTextOrEmpty, ViewId } from '@likec4/core/types';
|
|
2
2
|
import { Simplify } from 'type-fest';
|
|
3
3
|
import { Base, NonOptional, ReactFlowEdge, ReactFlowNode } from '../../base/types';
|
|
4
4
|
export declare namespace RelationshipsBrowserTypes {
|
|
@@ -10,12 +10,13 @@ export declare namespace RelationshipsBrowserTypes {
|
|
|
10
10
|
in: string[];
|
|
11
11
|
out: string[];
|
|
12
12
|
};
|
|
13
|
-
type ElementNodeData = Simplify<Base.NodeData & NonOptional<Pick<DiagramNode, 'title' | 'technology' | '
|
|
13
|
+
type ElementNodeData = Simplify<Base.NodeData & NonOptional<Pick<DiagramNode, 'title' | 'technology' | 'color' | 'shape' | 'style' | 'width' | 'height' | 'tags' | 'navigateTo'>> & {
|
|
14
14
|
column: Column;
|
|
15
15
|
fqn: Fqn;
|
|
16
16
|
icon: string | null;
|
|
17
17
|
ports: Ports;
|
|
18
18
|
existsInCurrentView: boolean;
|
|
19
|
+
description: RichTextOrEmpty;
|
|
19
20
|
}>;
|
|
20
21
|
type CompoundNodeData = Simplify<Base.NodeData & NonOptional<Pick<DiagramNode, 'title' | 'color' | 'shape' | 'style'>> & {
|
|
21
22
|
column: Column;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { IconZoomScan, IconTransform, IconFileSymlink } from '@tabler/icons-react';
|
|
3
2
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
|
|
4
3
|
import { useCurrentViewId } from '../../../hooks/useCurrentViewId.js';
|
|
5
4
|
import { useDiagram } from '../../../hooks/useDiagram.js';
|
|
6
5
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks.js';
|
|
7
6
|
import { ElementActionButtons } from '../../../base/primitives/element/ElementActionButtons.js';
|
|
7
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
8
|
+
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
9
|
+
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
8
10
|
|
|
9
11
|
const ElementActions = (props) => {
|
|
10
12
|
const { enableNavigateTo, enableVscode } = useEnabledFeatures();
|
|
@@ -2,8 +2,8 @@ import { NodeProps } from '../../../base';
|
|
|
2
2
|
import { RelationshipsBrowserTypes } from '../_types';
|
|
3
3
|
import { MemoExoticComponent } from 'react';
|
|
4
4
|
import { Dimmed } from '../../../base/types.Base';
|
|
5
|
-
import { ElementStyle, Color, Any, ViewId, Fqn, IconUrl } from '@likec4/core';
|
|
6
|
-
import { Tags } from '@likec4/core/types/
|
|
5
|
+
import { ElementStyle, Color, Any, ViewId, Fqn, RichTextOrEmpty, IconUrl } from '@likec4/core';
|
|
6
|
+
import { Tags } from '@likec4/core/types/_aux';
|
|
7
7
|
export declare const ElementNode: MemoExoticComponent<(props: NodeProps<{
|
|
8
8
|
hovered?: boolean;
|
|
9
9
|
dimmed?: Dimmed;
|
|
@@ -15,13 +15,13 @@ export declare const ElementNode: MemoExoticComponent<(props: NodeProps<{
|
|
|
15
15
|
shape: "rectangle" | "person" | "browser" | "mobile" | "cylinder" | "storage" | "queue";
|
|
16
16
|
tags: Tags<Any>;
|
|
17
17
|
technology: string | null | undefined;
|
|
18
|
-
description: string | null | undefined;
|
|
19
18
|
navigateTo: ViewId<string> | null | undefined;
|
|
20
19
|
column: RelationshipsBrowserTypes.Column;
|
|
21
20
|
fqn: Fqn;
|
|
22
21
|
icon: string | null;
|
|
23
22
|
ports: RelationshipsBrowserTypes.Ports;
|
|
24
23
|
existsInCurrentView: boolean;
|
|
24
|
+
description: RichTextOrEmpty;
|
|
25
25
|
}, string>) => import("react/jsx-runtime").JSX.Element>;
|
|
26
26
|
export declare const CompoundNode: MemoExoticComponent<(props: NodeProps<{
|
|
27
27
|
hovered?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RelationshipsViewData } from '@likec4/core/compute-view/relationships';
|
|
2
|
-
import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, ViewId } from '@likec4/core/types';
|
|
2
|
+
import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, RichTextOrEmpty, ViewId } from '@likec4/core/types';
|
|
3
3
|
import { LikeC4ViewModel } from '@likec4/core/model';
|
|
4
4
|
import { RelationshipsBrowserTypes } from './_types';
|
|
5
5
|
export type LayoutRelationshipsViewResult = {
|
|
@@ -11,12 +11,13 @@ export type LayoutRelationshipsViewResult = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare namespace LayoutRelationshipsViewResult {
|
|
13
13
|
const Empty: ElementKind;
|
|
14
|
-
type Node = Omit<DiagramNode, 'deploymentRef' | 'inEdges' | 'outEdges'> & {
|
|
14
|
+
type Node = Omit<DiagramNode, 'deploymentRef' | 'description' | 'inEdges' | 'outEdges'> & {
|
|
15
|
+
description: RichTextOrEmpty;
|
|
15
16
|
column: RelationshipsBrowserTypes.Column;
|
|
16
17
|
ports: RelationshipsBrowserTypes.Ports;
|
|
17
18
|
existsInCurrentView: boolean;
|
|
18
19
|
};
|
|
19
|
-
type Edge = DiagramEdge & {
|
|
20
|
+
type Edge = Omit<DiagramEdge, 'description'> & {
|
|
20
21
|
sourceFqn: Fqn;
|
|
21
22
|
targetFqn: Fqn;
|
|
22
23
|
sourceHandle: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view/relationships';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import dagre from '@dagrejs/dagre';
|
|
4
|
-
import { toArray, invariant, ifind, nonNullable, DefaultMap } from '@likec4/core';
|
|
4
|
+
import { toArray, invariant, RichText, ifind, nonNullable, DefaultMap } from '@likec4/core';
|
|
5
5
|
import { pipe, concat, map, groupBy, prop, forEachObj, filter, mapToObj, find, only, unique, tap, reduce, sortBy } from 'remeda';
|
|
6
6
|
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
7
7
|
|
|
@@ -329,7 +329,7 @@ function layoutRelationshipsView(data, scope) {
|
|
|
329
329
|
y: position.y,
|
|
330
330
|
position: [position.x, position.y],
|
|
331
331
|
title: "empty node",
|
|
332
|
-
description:
|
|
332
|
+
description: RichText.EMPTY,
|
|
333
333
|
technology: null,
|
|
334
334
|
tags: [],
|
|
335
335
|
links: [],
|
|
@@ -373,7 +373,7 @@ function layoutRelationshipsView(data, scope) {
|
|
|
373
373
|
y: position.y,
|
|
374
374
|
position: [position.x, position.y],
|
|
375
375
|
title: element.title,
|
|
376
|
-
description: element.description,
|
|
376
|
+
description: RichText.from(element.description),
|
|
377
377
|
technology: element.technology,
|
|
378
378
|
tags: [...element.tags],
|
|
379
379
|
links: null,
|
|
@@ -3,7 +3,6 @@ import { ifilter, sortParentsFirst, isAncestor, nameFromFqn } from '@likec4/core
|
|
|
3
3
|
import { cx } from '@likec4/styles/css';
|
|
4
4
|
import { useTree, Tree, ActionIcon, UnstyledButton, Box, Group, Highlight, Tooltip, Text } from '@mantine/core';
|
|
5
5
|
import { useCallbackRef } from '@mantine/hooks';
|
|
6
|
-
import { IconChevronRight } from '@tabler/icons-react';
|
|
7
6
|
import * as m from 'motion/react-m';
|
|
8
7
|
import { memo, useMemo, useEffect } from 'react';
|
|
9
8
|
import { isEmpty, pipe, reduce, only, first } from 'remeda';
|
|
@@ -16,6 +15,7 @@ import { focusable, buttonsva } from './_shared.css.js';
|
|
|
16
15
|
import { treeSubtree, treeLabel, treeRoot, treeNode, elementIcon, elementExpandIcon, elementTitleAndId, elementId, elementViewsCount } from './ElementsColumn.css.js';
|
|
17
16
|
import { stopAndPrevent, moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
|
|
18
17
|
import { NothingFound } from './ViewsColum.js';
|
|
18
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
19
19
|
|
|
20
20
|
const btn = buttonsva();
|
|
21
21
|
const ElementsColumn = memo(() => {
|
|
@@ -224,7 +224,7 @@ function ElementTreeNode({ node, elementProps, hasChildren, expanded }) {
|
|
|
224
224
|
}
|
|
225
225
|
) })
|
|
226
226
|
] }),
|
|
227
|
-
/* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn.description, lineClamp: 1, children: element.description || "No description" })
|
|
227
|
+
/* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn.description, lineClamp: 1, children: element.description.text || "No description" })
|
|
228
228
|
] }),
|
|
229
229
|
/* @__PURE__ */ jsx(Text, { component: "div", className: cx(elementViewsCount, btn.descriptionColor), fz: "xs", children: views.length === 0 ? "No views" : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
230
230
|
views.length,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { FocusTrap, Group, Title, ActionIcon, ScrollAreaAutosize, Stack } from '@mantine/core';
|
|
3
3
|
import { useWindowEvent } from '@mantine/hooks';
|
|
4
|
-
import { IconX } from '@tabler/icons-react';
|
|
5
4
|
import * as m from 'motion/react-m';
|
|
6
5
|
import { useSearchActor } from '../hooks.js';
|
|
7
6
|
import { pickviewBackdrop, pickview, pickviewGroup } from './styles.css.js';
|
|
8
7
|
import { ViewButton } from './ViewsColum.js';
|
|
9
8
|
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
9
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
10
10
|
|
|
11
11
|
function PickView({ elementFqn }) {
|
|
12
12
|
const searchActorRef = useSearchActor();
|
|
@@ -2,12 +2,12 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { css } from '@likec4/styles/css';
|
|
3
3
|
import { HStack } from '@likec4/styles/jsx';
|
|
4
4
|
import { Button } from '@mantine/core';
|
|
5
|
-
import { IconX } from '@tabler/icons-react';
|
|
6
5
|
import { useRef } from 'react';
|
|
7
6
|
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
8
7
|
import { useUpdateSearch, useNormalizedSearch } from '../hooks.js';
|
|
9
8
|
import { focusToFirstFoundElement, moveFocusToSearchInput } from './utils.js';
|
|
10
9
|
import { ElementTag } from '../../base/primitives/element/ElementTags.js';
|
|
10
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
11
11
|
|
|
12
12
|
function SearchByTags() {
|
|
13
13
|
const ref = useRef(null);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useCombobox, ComboboxOption, Text, Combobox, ComboboxTarget, Input, rem, ComboboxDropdown, ComboboxOptions, ScrollAreaAutosize, ComboboxEmpty } from '@mantine/core';
|
|
3
3
|
import { useFocusWithin, useWindowEvent, useMergedRef } from '@mantine/hooks';
|
|
4
|
-
import { IconSearch } from '@tabler/icons-react';
|
|
5
4
|
import { memo, useRef } from 'react';
|
|
6
5
|
import { keys } from 'remeda';
|
|
7
6
|
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
8
7
|
import { useSearchActor, useSearch } from '../hooks.js';
|
|
9
8
|
import { input } from './styles.css.js';
|
|
10
9
|
import { moveFocusToSearchInput, stopAndPrevent, focusToFirstFoundElement } from './utils.js';
|
|
10
|
+
import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
|
|
11
11
|
|
|
12
12
|
function startingWithKind(search) {
|
|
13
13
|
return search.match(/^(k|ki|kin|kind|kind:)$/) != null;
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { Box } from '@likec4/styles/jsx';
|
|
4
4
|
import { Stack, VisuallyHidden, UnstyledButton, createScopedKeydownHandler, ThemeIcon, Group, Highlight, Badge } from '@mantine/core';
|
|
5
|
-
import { IconStack2, IconZoomScan } from '@tabler/icons-react';
|
|
6
5
|
import * as m from 'motion/react-m';
|
|
7
6
|
import { memo, useRef } from 'react';
|
|
8
7
|
import { first } from 'remeda';
|
|
@@ -13,6 +12,8 @@ import { useNormalizedSearch, useSearchActor } from '../hooks.js';
|
|
|
13
12
|
import { emptyBoX, buttonsva, focusable } from './_shared.css.js';
|
|
14
13
|
import { moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
|
|
15
14
|
import { viewButton } from './ViewsColumn.css.js';
|
|
15
|
+
import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
|
|
16
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
16
17
|
|
|
17
18
|
const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, children: "Nothing found" });
|
|
18
19
|
const ViewsColumn = memo(() => {
|
|
@@ -122,11 +123,11 @@ function ViewButton({ className, view, loop = false, search, ...props }) {
|
|
|
122
123
|
/* @__PURE__ */ jsx(
|
|
123
124
|
Highlight,
|
|
124
125
|
{
|
|
125
|
-
highlight: view
|
|
126
|
+
highlight: view.description.nonEmpty ? search : "",
|
|
126
127
|
component: "div",
|
|
127
128
|
className: btn.description,
|
|
128
129
|
lineClamp: 1,
|
|
129
|
-
children: view
|
|
130
|
+
children: view.description.text || "No description"
|
|
130
131
|
}
|
|
131
132
|
)
|
|
132
133
|
] })
|
|
@@ -10,7 +10,15 @@ import { useViewToNodesEdges } from '../likec4diagram/useViewToNodesEdges.js';
|
|
|
10
10
|
import { diagramMachine } from './diagram-machine.js';
|
|
11
11
|
import { syncManualLayoutActorLogic } from './syncManualLayoutActor.js';
|
|
12
12
|
|
|
13
|
-
const selectToggledFeatures = (state) =>
|
|
13
|
+
const selectToggledFeatures = (state) => {
|
|
14
|
+
if (state.context.features.enableReadOnly) {
|
|
15
|
+
return {
|
|
16
|
+
...state.context.toggledFeatures,
|
|
17
|
+
enableReadOnly: true
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return state.context.toggledFeatures;
|
|
21
|
+
};
|
|
14
22
|
function DiagramActorProvider({
|
|
15
23
|
view,
|
|
16
24
|
zoomable,
|