@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
|
@@ -4,7 +4,7 @@ import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
|
4
4
|
import { SetRequired } from 'type-fest';
|
|
5
5
|
import { ControlsCustomLayout } from './context/ControlsCustomLayout';
|
|
6
6
|
import { CustomNodes } from './custom/customNodes';
|
|
7
|
-
import type * as aux from '@likec4/core/types/
|
|
7
|
+
import type * as aux from '@likec4/core/types/_aux';
|
|
8
8
|
export type { CustomNodes, WhereOperator };
|
|
9
9
|
export type DiagramNodeWithNavigate<A extends Any> = SetRequired<DiagramNode<A>, 'navigateTo'>;
|
|
10
10
|
type ElementIconRendererProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LikeC4DiagramProperties } from './LikeC4Diagram.props';
|
|
2
|
-
import type * as aux from '@likec4/core/types/
|
|
2
|
+
import type * as aux from '@likec4/core/types/_aux';
|
|
3
3
|
export type StaticLikeC4DiagramProps<A extends aux.Any> = Pick<LikeC4DiagramProperties<A>, 'view' | 'className' | 'fitView' | 'fitViewPadding' | 'background' | 'enableElementDetails' | 'enableRelationshipDetails' | 'enableRelationshipBrowser' | 'enableElementTags' | 'reduceGraphics' | 'initialWidth' | 'initialHeight' | 'renderIcon' | 'renderNodes' | 'where'>;
|
|
4
4
|
export declare function StaticLikeC4Diagram<A extends aux.Any = aux.UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, ...rest }: StaticLikeC4DiagramProps<A>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
|
+
import { BoxProps } from '@likec4/styles/jsx';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export type MarkdownBlockProps = Omit<BoxProps, 'dangerouslySetInnerHTML' | 'children'> & {
|
|
5
|
+
value: RichTextType;
|
|
6
|
+
/**
|
|
7
|
+
* When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
uselikec4palette?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Scale factor for the font size.
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
textScale?: number;
|
|
16
|
+
/**
|
|
17
|
+
* If true, the component will not render anything if the value is empty.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
hideIfEmpty?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Text to show if the value is empty.
|
|
23
|
+
* @default "no content"
|
|
24
|
+
*/
|
|
25
|
+
emptyText?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const MarkdownBlock: ForwardRefExoticComponent<Omit<MarkdownBlockProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '@likec4/styles/css';
|
|
3
|
+
import { Box } from '@likec4/styles/jsx';
|
|
4
|
+
import { markdownBlock } from '@likec4/styles/recipes';
|
|
5
|
+
import { Text } from '@mantine/core';
|
|
6
|
+
import { forwardRef } from 'react';
|
|
7
|
+
|
|
8
|
+
const MarkdownBlock = forwardRef(({
|
|
9
|
+
value,
|
|
10
|
+
textScale = 1,
|
|
11
|
+
uselikec4palette = false,
|
|
12
|
+
hideIfEmpty = false,
|
|
13
|
+
emptyText = "no content",
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
17
|
+
if (value.isEmpty && hideIfEmpty) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const content = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", children: emptyText }) };
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Box,
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
...props,
|
|
26
|
+
className: cx(
|
|
27
|
+
markdownBlock({
|
|
28
|
+
uselikec4palette
|
|
29
|
+
}),
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
style: {
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
["--mantine-scale"]: textScale
|
|
35
|
+
},
|
|
36
|
+
...content
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
MarkdownBlock.displayName = "MarkdownBlock";
|
|
41
|
+
|
|
42
|
+
export { MarkdownBlock };
|
|
@@ -4,10 +4,10 @@ import { Box } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { actionBtn } from '@likec4/styles/recipes';
|
|
5
5
|
import { ActionIcon } from '@mantine/core';
|
|
6
6
|
import { useDebouncedValue } from '@mantine/hooks';
|
|
7
|
-
import { IconZoomScan } from '@tabler/icons-react';
|
|
8
7
|
import * as m from 'motion/react-m';
|
|
9
8
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
10
9
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
10
|
+
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';
|
|
11
11
|
|
|
12
12
|
function CompoundActionButton({
|
|
13
13
|
data: {
|
|
@@ -4,10 +4,10 @@ import { Box } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { actionBtn } from '@likec4/styles/recipes';
|
|
5
5
|
import { ActionIcon } from '@mantine/core';
|
|
6
6
|
import { useDebouncedValue } from '@mantine/hooks';
|
|
7
|
-
import { IconId } from '@tabler/icons-react';
|
|
8
7
|
import * as m from 'motion/react-m';
|
|
9
8
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
10
9
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
10
|
+
import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
11
11
|
|
|
12
12
|
function CompoundDetailsButton({
|
|
13
13
|
data: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { ActionIcon } from '@mantine/core';
|
|
4
|
-
import { IconZoomScan } from '@tabler/icons-react';
|
|
5
4
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
6
5
|
import { actionBtn } from './edge.css.js';
|
|
6
|
+
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';
|
|
7
7
|
|
|
8
8
|
function EdgeActionButton({ icon, onClick }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -4,9 +4,9 @@ import { Box } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { actionBtn } from '@likec4/styles/recipes';
|
|
5
5
|
import { ActionIcon } from '@mantine/core';
|
|
6
6
|
import { useId } from '@mantine/hooks';
|
|
7
|
-
import { IconId } from '@tabler/icons-react';
|
|
8
7
|
import * as m from 'motion/react-m';
|
|
9
8
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
9
|
+
import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
10
10
|
|
|
11
11
|
const container = css({
|
|
12
12
|
position: "absolute",
|
|
@@ -10,5 +10,5 @@ type Data = {
|
|
|
10
10
|
width: number;
|
|
11
11
|
};
|
|
12
12
|
type ElementTagsProps = NodeProps<Data>;
|
|
13
|
-
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width } }: ElementTagsProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
13
|
+
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered } }: ElementTagsProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
14
14
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { isTagColorSpecified } from '@likec4/core';
|
|
3
3
|
import { cx, css } from '@likec4/styles/css';
|
|
4
4
|
import { Box, HStack } from '@likec4/styles/jsx';
|
|
5
5
|
import { hstack } from '@likec4/styles/patterns';
|
|
6
6
|
import { likec4tag } from '@likec4/styles/recipes';
|
|
7
|
-
import {
|
|
7
|
+
import { useHover, useDebouncedState } from '@mantine/hooks';
|
|
8
|
+
import { NodeToolbar, Position } from '@xyflow/react';
|
|
8
9
|
import { deepEqual } from 'fast-equals';
|
|
9
|
-
import { memo,
|
|
10
|
+
import { forwardRef, memo, useEffect, useCallback } from 'react';
|
|
10
11
|
import { useTagSpecification } from '../../../context/TagStylesContext.js';
|
|
11
12
|
import { useDiagram } from '../../../hooks/useDiagram.js';
|
|
12
|
-
import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
|
|
13
13
|
import { useCurrentZoom } from '../../../hooks/useXYFlow.js';
|
|
14
14
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
15
15
|
|
|
@@ -37,140 +37,131 @@ const ElementTag = forwardRef(
|
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
const propsAreEqual = (prev, next) => {
|
|
40
|
-
return prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags);
|
|
40
|
+
return prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags) && (prev.data.hovered ?? false) === (next.data.hovered ?? false);
|
|
41
41
|
};
|
|
42
|
-
const ElementTags = memo(({ id, data: { tags, width } }) => {
|
|
42
|
+
const ElementTags = memo(({ id, data: { tags, width, hovered = false } }) => {
|
|
43
|
+
const {
|
|
44
|
+
hovered: isTagsBarHovered,
|
|
45
|
+
ref: tagsBarRef
|
|
46
|
+
} = useHover();
|
|
47
|
+
const {
|
|
48
|
+
hovered: isTagsToolbarHovered,
|
|
49
|
+
ref: tagsToolbarRef
|
|
50
|
+
} = useHover();
|
|
51
|
+
const [isVisible, setVisible] = useDebouncedState(false, hovered ? 120 : 300);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
setVisible((visibleNow) => {
|
|
54
|
+
if (!visibleNow) {
|
|
55
|
+
return hovered && (isTagsBarHovered || isTagsToolbarHovered);
|
|
56
|
+
}
|
|
57
|
+
return hovered || isTagsBarHovered || isTagsToolbarHovered;
|
|
58
|
+
});
|
|
59
|
+
}, [isTagsBarHovered, isTagsToolbarHovered, hovered]);
|
|
43
60
|
const zoom = useCurrentZoom();
|
|
44
61
|
const zoomIsLargeEnough = zoom > 1.2;
|
|
45
|
-
const
|
|
62
|
+
const diagram = useDiagram();
|
|
63
|
+
const onHover = (tag) => {
|
|
64
|
+
diagram.send({ type: "tag.highlight", tag });
|
|
65
|
+
};
|
|
66
|
+
const onLeave = useCallback(() => {
|
|
67
|
+
diagram.send({ type: "tag.unhighlight" });
|
|
68
|
+
}, []);
|
|
46
69
|
if (!tags || tags.length === 0) {
|
|
47
70
|
return null;
|
|
48
71
|
}
|
|
49
72
|
const maxWidth = Math.max(Math.round(width * zoom) - 10, 200);
|
|
50
|
-
return /* @__PURE__ */ jsxs(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref: tagsBarRef,
|
|
78
|
+
className: cx(
|
|
79
|
+
"likec4-element-tags",
|
|
80
|
+
hstack({
|
|
81
|
+
pointerEvents: "all",
|
|
82
|
+
gap: 4,
|
|
83
|
+
alignItems: "flex-end",
|
|
84
|
+
justifyItems: "stretch",
|
|
85
|
+
position: "absolute",
|
|
86
|
+
width: "100%",
|
|
87
|
+
bottom: 0,
|
|
88
|
+
left: 0,
|
|
89
|
+
padding: 4,
|
|
90
|
+
_shapeCylinder: {
|
|
91
|
+
bottom: 5
|
|
92
|
+
},
|
|
93
|
+
_shapeStorage: {
|
|
94
|
+
bottom: 5
|
|
95
|
+
},
|
|
96
|
+
_shapeQueue: {
|
|
97
|
+
bottom: 0,
|
|
98
|
+
paddingLeft: 14
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
),
|
|
102
|
+
onClick: stopPropagation,
|
|
103
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
104
|
+
Box,
|
|
66
105
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bottom: 5
|
|
81
|
-
},
|
|
82
|
-
_shapeStorage: {
|
|
83
|
-
bottom: 5
|
|
84
|
-
},
|
|
85
|
-
_shapeQueue: {
|
|
86
|
-
bottom: 0,
|
|
87
|
-
paddingLeft: 14
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
),
|
|
91
|
-
onClick: stopPropagation,
|
|
92
|
-
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
93
|
-
Box,
|
|
94
|
-
{
|
|
95
|
-
"data-likec4-tag": tag,
|
|
96
|
-
className: css({
|
|
97
|
-
layerStyle: "likec4.tag",
|
|
98
|
-
flex: 1,
|
|
99
|
-
display: "flex",
|
|
100
|
-
alignItems: "center",
|
|
101
|
-
justifyContent: "center",
|
|
102
|
-
maxWidth: 50,
|
|
103
|
-
height: 5,
|
|
104
|
-
_whenHovered: {
|
|
105
|
-
height: 12,
|
|
106
|
-
borderRadius: 4,
|
|
107
|
-
transitionDelay: ".08s"
|
|
108
|
-
},
|
|
109
|
-
transition: "fast"
|
|
110
|
-
})
|
|
106
|
+
"data-likec4-tag": tag,
|
|
107
|
+
className: css({
|
|
108
|
+
layerStyle: "likec4.tag",
|
|
109
|
+
flex: 1,
|
|
110
|
+
display: "flex",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
maxWidth: 50,
|
|
114
|
+
height: 5,
|
|
115
|
+
_whenHovered: {
|
|
116
|
+
height: 12,
|
|
117
|
+
borderRadius: 4,
|
|
118
|
+
transitionDelay: ".08s"
|
|
111
119
|
},
|
|
112
|
-
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
transition: "fast"
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
id + "#" + tag
|
|
124
|
+
))
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsx(NodeToolbar, { isVisible, align: "start", position: Position.Bottom, children: /* @__PURE__ */ jsx(
|
|
128
|
+
HStack,
|
|
129
|
+
{
|
|
130
|
+
ref: tagsToolbarRef,
|
|
131
|
+
css: {
|
|
132
|
+
gap: 4,
|
|
133
|
+
flexWrap: "wrap",
|
|
134
|
+
pb: "sm",
|
|
135
|
+
translate: "auto",
|
|
136
|
+
x: -8,
|
|
137
|
+
maxWidth
|
|
138
|
+
},
|
|
139
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
140
|
+
ElementTag,
|
|
118
141
|
{
|
|
119
|
-
|
|
120
|
-
w: "auto",
|
|
121
|
-
maw: maxWidth,
|
|
142
|
+
tag,
|
|
122
143
|
className: css({
|
|
123
|
-
|
|
124
|
-
|
|
144
|
+
userSelect: "none",
|
|
145
|
+
cursor: "pointer",
|
|
146
|
+
...zoomIsLargeEnough && {
|
|
147
|
+
fontSize: "lg",
|
|
148
|
+
borderRadius: 4,
|
|
149
|
+
px: 6
|
|
150
|
+
}
|
|
125
151
|
}),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
152
|
+
onClick: (e) => {
|
|
153
|
+
e.stopPropagation();
|
|
154
|
+
diagram.openSearch(`#${tag}`);
|
|
155
|
+
},
|
|
156
|
+
onMouseEnter: () => onHover(tag),
|
|
157
|
+
onMouseLeave: onLeave
|
|
158
|
+
},
|
|
159
|
+
tag
|
|
160
|
+
))
|
|
161
|
+
}
|
|
162
|
+
) })
|
|
163
|
+
] });
|
|
132
164
|
}, propsAreEqual);
|
|
133
165
|
ElementTags.displayName = "ElementTags";
|
|
134
|
-
function ElementTagsDropdown({ tags, zoomIsLargeEnough }) {
|
|
135
|
-
const diagram = useDiagram();
|
|
136
|
-
const onHover = (tag) => {
|
|
137
|
-
diagram.send({ type: "tag.highlight", tag });
|
|
138
|
-
};
|
|
139
|
-
const onLeave = useCallback(() => {
|
|
140
|
-
diagram.send({ type: "tag.unhighlight" });
|
|
141
|
-
}, []);
|
|
142
|
-
return /* @__PURE__ */ jsx(
|
|
143
|
-
HStack,
|
|
144
|
-
{
|
|
145
|
-
css: {
|
|
146
|
-
gap: 4,
|
|
147
|
-
flexWrap: "wrap",
|
|
148
|
-
pb: "sm"
|
|
149
|
-
},
|
|
150
|
-
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
151
|
-
ElementTag,
|
|
152
|
-
{
|
|
153
|
-
tag,
|
|
154
|
-
className: css({
|
|
155
|
-
userSelect: "none",
|
|
156
|
-
cursor: "pointer",
|
|
157
|
-
...zoomIsLargeEnough && {
|
|
158
|
-
fontSize: "lg",
|
|
159
|
-
borderRadius: 4,
|
|
160
|
-
px: 6
|
|
161
|
-
}
|
|
162
|
-
}),
|
|
163
|
-
onClick: (e) => {
|
|
164
|
-
e.stopPropagation();
|
|
165
|
-
diagram.openSearch(`#${tag}`);
|
|
166
|
-
},
|
|
167
|
-
onMouseEnter: () => onHover(tag),
|
|
168
|
-
onMouseLeave: onLeave
|
|
169
|
-
},
|
|
170
|
-
tag
|
|
171
|
-
))
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
166
|
|
|
176
167
|
export { ElementTag, ElementTags };
|
|
@@ -8,7 +8,8 @@ const title = css.raw({
|
|
|
8
8
|
color: "likec4.palette.hiContrast"
|
|
9
9
|
});
|
|
10
10
|
const description = css.raw({
|
|
11
|
-
|
|
11
|
+
flexGrow: "0",
|
|
12
|
+
flexShrink: "1",
|
|
12
13
|
textStyle: "likec4.node.secondary",
|
|
13
14
|
color: "likec4.palette.loContrast",
|
|
14
15
|
textAlign: "center",
|
|
@@ -82,6 +83,8 @@ const elementTitle = sva({
|
|
|
82
83
|
flex: "1",
|
|
83
84
|
height: "fit-content",
|
|
84
85
|
width: "fit-content",
|
|
86
|
+
maxHeight: "100%",
|
|
87
|
+
maxWidth: "100%",
|
|
85
88
|
margin: "0 auto",
|
|
86
89
|
display: "flex",
|
|
87
90
|
alignItems: "center",
|
|
@@ -133,6 +136,8 @@ const elementTitle = sva({
|
|
|
133
136
|
textContainer: {
|
|
134
137
|
height: "fit-content",
|
|
135
138
|
width: "fit-content",
|
|
139
|
+
maxHeight: "100%",
|
|
140
|
+
maxWidth: "100%",
|
|
136
141
|
flex: "0 1 auto",
|
|
137
142
|
display: "flex",
|
|
138
143
|
flexDirection: "column",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DiagramNode } from '@likec4/core/types';
|
|
1
|
+
import { DiagramNode, RichTextOrEmpty } from '@likec4/core/types';
|
|
2
2
|
import { Simplify } from 'type-fest';
|
|
3
3
|
import { NodeProps, NonOptional } from '../../types';
|
|
4
|
-
type Data = Simplify<NonOptional<Pick<DiagramNode, 'title' | 'technology' | '
|
|
4
|
+
type Data = Simplify<NonOptional<Pick<DiagramNode, 'title' | 'technology' | 'color' | 'style'>> & {
|
|
5
|
+
description?: RichTextOrEmpty;
|
|
5
6
|
icon?: string | null;
|
|
6
7
|
}>;
|
|
7
8
|
type ElementTitleProps = NodeProps<Data> & {
|
|
@@ -4,6 +4,7 @@ import { Box } from '@likec4/styles/jsx';
|
|
|
4
4
|
import { Text } from '@mantine/core';
|
|
5
5
|
import { isTruthy, isEmpty, isNumber } from 'remeda';
|
|
6
6
|
import { IconRenderer } from '../../../context/IconRenderer.js';
|
|
7
|
+
import { MarkdownBlock } from '../MarkdownBlock.js';
|
|
7
8
|
import { nodeSizes } from './ElementNodeContainer.js';
|
|
8
9
|
import { elementTitle, iconSize, elementIcon } from './ElementTitle.css.js';
|
|
9
10
|
|
|
@@ -18,7 +19,7 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
|
|
|
18
19
|
});
|
|
19
20
|
const classes = elementTitle({
|
|
20
21
|
hasIcon: isTruthy(elementIcon$1),
|
|
21
|
-
hasDescription:
|
|
22
|
+
hasDescription: !!data.description?.nonEmpty,
|
|
22
23
|
hasTechnology: !isEmpty(data.technology ?? "")
|
|
23
24
|
});
|
|
24
25
|
const size = nodeSizes(data.style).size;
|
|
@@ -41,7 +42,7 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
|
|
|
41
42
|
/* @__PURE__ */ jsx(
|
|
42
43
|
Text,
|
|
43
44
|
{
|
|
44
|
-
component: "
|
|
45
|
+
component: "div",
|
|
45
46
|
className: cx(classes.title, "likec4-element-title"),
|
|
46
47
|
lineClamp: isSmOrXs ? 2 : 3,
|
|
47
48
|
children: data.title
|
|
@@ -56,12 +57,14 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
|
|
|
56
57
|
}
|
|
57
58
|
),
|
|
58
59
|
data.description && /* @__PURE__ */ jsx(
|
|
59
|
-
|
|
60
|
+
MarkdownBlock,
|
|
60
61
|
{
|
|
61
|
-
component: "div",
|
|
62
62
|
className: cx(classes.description, "likec4-element-description"),
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
value: data.description,
|
|
64
|
+
uselikec4palette: true,
|
|
65
|
+
hideIfEmpty: true,
|
|
66
|
+
maxHeight: data.description.isMarkdown ? "8rem" : void 0,
|
|
67
|
+
lineClamp: isSmOrXs ? 3 : 5
|
|
65
68
|
}
|
|
66
69
|
)
|
|
67
70
|
] })
|
|
@@ -16,4 +16,5 @@ export { ElementNodeContainer } from './element/ElementNodeContainer';
|
|
|
16
16
|
export { ElementShape } from './element/ElementShape';
|
|
17
17
|
export { ElementTag, ElementTags } from './element/ElementTags';
|
|
18
18
|
export { ElementTitle } from './element/ElementTitle';
|
|
19
|
+
export { MarkdownBlock } from './MarkdownBlock';
|
|
19
20
|
export { DefaultHandles } from './NodeHandles';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LikeC4ViewProps } from './LikeC4View.props';
|
|
2
|
-
import type * as aux from '@likec4/core/types/
|
|
2
|
+
import type * as aux from '@likec4/core/types/_aux';
|
|
3
3
|
export declare function LikeC4View<A extends aux.Any = aux.UnknownLayouted>({ viewId, ...props }: LikeC4ViewProps<A>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { Box, ActionIcon } from '@mantine/core';
|
|
4
4
|
import { shallowEqual } from '@mantine/hooks';
|
|
5
|
-
import { IconX } from '@tabler/icons-react';
|
|
6
5
|
import { memo, useState } from 'react';
|
|
7
6
|
import { isBoolean } from 'remeda';
|
|
8
7
|
import { FramerMotionConfig } from '../context/FramerMotionConfig.js';
|
|
@@ -12,6 +11,7 @@ import { Overlay } from '../overlays/overlay/Overlay.js';
|
|
|
12
11
|
import { ShadowRoot } from './ShadowRoot.js';
|
|
13
12
|
import { useColorScheme, useShadowRootStyle, cssInteractive } from './styles.css.js';
|
|
14
13
|
import { ViewNotFound, ErrorMessage } from './ViewNotFound.js';
|
|
14
|
+
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';
|
|
15
15
|
|
|
16
16
|
function LikeC4View({
|
|
17
17
|
viewId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WhereOperator } from '@likec4/core/types';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { CustomNodes, ElementIconRenderer, OverrideReactFlowProps, PaddingWithUnit } from '../LikeC4Diagram.props';
|
|
4
|
-
import type * as aux from '@likec4/core/types/
|
|
4
|
+
import type * as aux from '@likec4/core/types/_aux';
|
|
5
5
|
export interface LikeC4ViewProps<A extends aux.Any> {
|
|
6
6
|
/**
|
|
7
7
|
* View to display.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { LikeC4DiagramProps } from '../LikeC4Diagram';
|
|
3
|
-
import type * as aux from '@likec4/core/types/
|
|
3
|
+
import type * as aux from '@likec4/core/types/_aux';
|
|
4
4
|
export type ReactLikeC4Props<A extends aux.Any> = Omit<LikeC4DiagramProps<A>, 'view'> & {
|
|
5
5
|
viewId: aux.ViewId<A>;
|
|
6
6
|
/**
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { compoundDeploymentNode, compoundElementNode, deploymentNode, elementNode, viewGroupNode } from '../custom/customNodes.js';
|
|
2
|
+
export { CompoundActionButton } from '../base/primitives/compound/CompoundActionButton.js';
|
|
3
|
+
export { CompoundDetailsButton } from '../base/primitives/compound/CompoundDetailsButton.js';
|
|
4
|
+
export { CompoundNodeContainer } from '../base/primitives/compound/CompoundNodeContainer.js';
|
|
5
|
+
export { CompoundTitle } from '../base/primitives/compound/CompoundTitle.js';
|
|
6
|
+
export { DefaultHandles } from '../base/primitives/NodeHandles.js';
|
|
7
|
+
export { ElementActionButtons } from '../base/primitives/element/ElementActionButtons.js';
|
|
8
|
+
export { ElementDetailsButton } from '../base/primitives/element/ElementDetailsButton.js';
|
|
9
|
+
export { ElementNodeContainer } from '../base/primitives/element/ElementNodeContainer.js';
|
|
10
|
+
export { ElementShape } from '../base/primitives/element/ElementShape.js';
|
|
11
|
+
export { ElementTag, ElementTags } from '../base/primitives/element/ElementTags.js';
|
|
12
|
+
export { ElementTitle } from '../base/primitives/element/ElementTitle.js';
|
|
13
|
+
export { MarkdownBlock } from '../base/primitives/MarkdownBlock.js';
|
|
14
|
+
export { IconOrShapeRenderer, IconRenderer, IconRendererProvider } from '../context/IconRenderer.js';
|
|
15
|
+
export { CompoundActions } from '../likec4diagram/custom/nodes/CompoundActions.js';
|
|
16
|
+
export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode } from '../likec4diagram/custom/nodes/nodes.js';
|
|
17
|
+
export { CompoundDeploymentToolbar, CompoundElementToolbar } from '../likec4diagram/custom/nodes/toolbar/CompoundToolbar.js';
|
|
18
|
+
export { DeploymentElementActions, ElementActions } from '../likec4diagram/custom/nodes/ElementActions.js';
|
|
19
|
+
export { DeploymentElementToolbar, ElementToolbar } from '../likec4diagram/custom/nodes/toolbar/ElementToolbar.js';
|
|
20
|
+
export { Toolbar } from '../likec4diagram/custom/nodes/toolbar/Toolbar.js';
|
|
21
|
+
export { IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, useEnabledFeatures } from '../context/DiagramFeatures.js';
|
|
22
|
+
export { Overlay } from '../overlays/overlay/Overlay.js';
|
|
23
|
+
export { useDiagramEventHandlers } from '../context/DiagramEventHandlers.js';
|
|
24
|
+
export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
|
|
25
|
+
export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
|
|
26
|
+
export { useDiagramActorRef } from '../hooks/safeContext.js';
|
|
27
|
+
export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
28
|
+
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
|
|
29
|
+
export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
|
|
30
|
+
export { useSetState } from '../hooks/useSetState.js';
|
|
31
|
+
export { useUpdateEffect } from '../hooks/useUpdateEffect.js';
|
package/dist/bundle/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { useDiagramEventHandlers } from '../context/DiagramEventHandlers.js';
|
|
|
6
6
|
export { useEnabledFeatures } from '../context/DiagramFeatures.js';
|
|
7
7
|
export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
|
|
8
8
|
export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
|
|
9
|
+
export { useDiagramActorRef } from '../hooks/safeContext.js';
|
|
9
10
|
export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
10
11
|
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
|
|
11
12
|
export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Box } from '@likec4/styles/jsx';
|
|
3
3
|
import { Notification, ScrollAreaAutosize, Code, Group, Button } from '@mantine/core';
|
|
4
|
-
import
|
|
4
|
+
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';
|
|
5
5
|
|
|
6
6
|
function ErrorFallback({ error, resetErrorBoundary }) {
|
|
7
7
|
const errorString = error instanceof Error ? error.message : "Unknown error";
|
package/dist/components/Link.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { cx, css, cva } from '@likec4/styles/css';
|
|
3
3
|
import { CopyButton, Anchor, ActionIcon, Box, Text } from '@mantine/core';
|
|
4
|
-
import { IconCheck, IconCopy } from '@tabler/icons-react';
|
|
5
4
|
import { stopPropagation } from '../utils/xyflow.js';
|
|
5
|
+
import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
|
|
6
|
+
import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
|
|
6
7
|
|
|
7
8
|
const link = cva({
|
|
8
9
|
base: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { UnstyledButton, Group, Text } from '@mantine/core';
|
|
4
|
-
import { IconSearch } from '@tabler/icons-react';
|
|
5
4
|
import { isMacOs } from '@xyflow/system';
|
|
6
5
|
import { placeholder, shortcut, root } from './SearchControl.css.js';
|
|
6
|
+
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';
|
|
7
7
|
|
|
8
8
|
function SearchControl({ className, ...others }) {
|
|
9
9
|
const isMac = isMacOs();
|
|
@@ -22,8 +22,9 @@ export declare function IfEnabled({ feature, children, and, }: PropsWithChildren
|
|
|
22
22
|
feature: FeatureName;
|
|
23
23
|
and?: boolean;
|
|
24
24
|
}>): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
-
export declare function IfNotEnabled({ feature, children
|
|
25
|
+
export declare function IfNotEnabled({ feature, children }: PropsWithChildren<{
|
|
26
26
|
feature: FeatureName;
|
|
27
27
|
}>): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function IfReadOnly({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export declare function IfNotReadOnly({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
|
|
29
30
|
export {};
|