@likec4/diagram 1.59.3 → 1.59.4
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/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +36 -21
- package/dist/LikeC4Diagram.props.d.ts +23 -0
- package/dist/LikeC4MantineProvider.d.ts +24 -0
- package/dist/LikeC4MantineProvider.js +156 -0
- package/dist/LikeC4ProjectsOverview.js +1 -1
- package/dist/LikeC4ProjectsProvider.d.ts +17 -2
- package/dist/LikeC4Styles.d.ts +13 -3
- package/dist/LikeC4Styles.js +8 -5
- package/dist/LikeC4View.js +2 -2
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +11 -8
- package/dist/base/const.d.ts +1 -0
- package/dist/base/const.js +3 -1
- package/dist/base-primitives/Markdown.d.ts +3 -3
- package/dist/base-primitives/compound/actionbtns.css.d.ts +3 -3
- package/dist/base-primitives/compound/actionbtns.css.js +3 -3
- package/dist/base-primitives/element/ElementTags.d.ts +2 -2
- package/dist/base-primitives/element/ElementTags.js +5 -5
- package/dist/components/EmptyBox.d.ts +3 -0
- package/dist/components/EmptyBox.js +9 -0
- package/dist/components/ErrorFallback.js +7 -6
- package/dist/components/FloatingWindow.d.ts +18 -0
- package/dist/components/FloatingWindow.js +89 -0
- package/dist/components/Link.js +7 -7
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -6
- package/dist/components/SearchControl.css.js +10 -12
- package/dist/components/ViewIcon.d.ts +11 -0
- package/dist/components/ViewIcon.js +71 -0
- package/dist/context/DiagramEventHandlers.js +2 -1
- package/dist/context/EnsureMantine.js +3 -3
- package/dist/context/IconRenderer.d.ts +2 -1
- package/dist/context/IconRenderer.js +38 -2
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/TagStylesContext.d.ts +9 -3
- package/dist/context/TagStylesContext.js +19 -19
- package/dist/custom/index.d.ts +3 -0
- package/dist/custom/index.js +6 -3
- package/dist/editor/applyChangesToManualLayout.js +4 -1
- package/dist/hooks/safeContext.d.ts +12 -4
- package/dist/hooks/safeContext.js +2 -2
- package/dist/hooks/useCurrentView.js +5 -5
- package/dist/hooks/useDiagram.js +1 -23
- package/dist/hooks/useDiagramCompareLayout.d.ts +4 -4
- package/dist/hooks/useDiagramCompareLayout.js +14 -16
- package/dist/hooks/useEditorActor.js +3 -5
- package/dist/hooks/useLikeC4Model.js +8 -3
- package/dist/hooks/useLikeC4Project.d.ts +4 -3
- package/dist/hooks/useOverlaysActor.d.ts +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -5
- package/dist/likec4diagram/DiagramXYFlow.d.ts +5 -0
- package/dist/likec4diagram/DiagramXYFlow.js +20 -13
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +4 -4
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +1 -1
- package/dist/likec4diagram/custom/edges/edges.css.js +13 -13
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +4 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +8 -5
- package/dist/likec4diagram/custom/nodes/nodes.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +5 -5
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +2 -0
- package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.js +6 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +7 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +20 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +2 -2
- package/dist/likec4diagram/state/diagram-api.js +3 -2
- package/dist/likec4diagram/state/machine.actions.js +9 -6
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +7 -5
- package/dist/likec4diagram/state/machine.setup.d.ts +10 -1
- package/dist/likec4diagram/state/machine.setup.js +6 -1
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +2 -26
- package/dist/likec4diagram/state/machine.state.initializing.js +9 -6
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +134 -3
- package/dist/likec4diagram/state/machine.state.ready.js +2 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +106 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +39 -6
- package/dist/likec4diagram/state/utils.d.ts +1 -1
- package/dist/likec4diagram/state/utils.js +1 -2
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +16 -10
- package/dist/likec4diagram/ui/index.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +13 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +9 -9
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +81 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +11 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +70 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +106 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +140 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +17 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +83 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +4 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +49 -527
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +8 -0
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +52 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +7 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.js +190 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +238 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +94 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +21 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +71 -0
- package/dist/likec4diagram/ui/sequence-outline/index.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +13 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.js +21 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +10 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.js +80 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.js +67 -0
- package/dist/likec4diagram/ui/sequence-outline/{state.d.ts → types.d.ts} +4 -2
- package/dist/likec4diagram/ui/sequence-outline/types.js +12 -0
- package/dist/likec4diagram/useLayoutConstraints.js +9 -12
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +1 -0
- package/dist/likec4diagram/xyflow-sequence/utils.js +0 -1
- package/dist/navigationpanel/NavigationPanel.js +45 -41
- package/dist/navigationpanel/NavigationPanelControls.js +102 -63
- package/dist/navigationpanel/NavigationPanelDropdown.js +51 -77
- package/dist/navigationpanel/_common.d.ts +6 -6
- package/dist/navigationpanel/_common.js +31 -42
- package/dist/navigationpanel/actor.actions.js +6 -5
- package/dist/navigationpanel/actor.js +2 -2
- package/dist/navigationpanel/actor.setup.d.ts +6 -6
- package/dist/navigationpanel/actor.setup.js +2 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -4
- package/dist/navigationpanel/comparepanel/ComparePanel.js +8 -10
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +11 -9
- package/dist/navigationpanel/controls/LayoutWarning.js +69 -72
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +8 -8
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.js +5 -8
- package/dist/navigationpanel/controls/SearchControl.js +24 -9
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +4 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +56 -76
- package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +5 -0
- package/dist/navigationpanel/controls/ViewDetailsButton.js +121 -0
- package/dist/navigationpanel/controls/index.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +27 -16
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +10 -9
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -8
- package/dist/navigationpanel/editorpanel/styles.js +8 -15
- package/dist/navigationpanel/hooks.d.ts +6 -2
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +0 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -4
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +9 -36
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +1 -0
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +49 -0
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +8 -8
- package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +1 -0
- package/dist/navigationpanel/windows/ViewDetailsWindow.js +379 -0
- package/dist/overlays/Overlays.js +29 -17
- package/dist/overlays/element-details/ElementDetailsCard.css.js +28 -36
- package/dist/overlays/element-details/ElementDetailsCard.js +1 -1
- package/dist/overlays/element-details/MetadataValue.js +18 -16
- package/dist/overlays/element-details/TabPanelDeployments.css.js +6 -14
- package/dist/overlays/element-details/TabPanelRelationships.css.js +8 -12
- package/dist/overlays/element-details/TabPanelStructure.css.js +4 -8
- package/dist/overlays/hooks.d.ts +3 -1
- package/dist/overlays/overlay/Overlay.js +8 -7
- package/dist/overlays/overlaysActor.js +4 -0
- package/dist/overlays/relationship-details/SelectEdge.css.js +14 -9
- package/dist/overlays/relationship-details/actor.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +6 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +11 -6
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -8
- package/dist/overlays/relationships-browser/SelectElement.js +5 -1
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +7 -9
- package/dist/projects-overview/actor.js +1 -1
- package/dist/search/Search.js +9 -7
- package/dist/search/components/ElementsColumn.css.js +6 -5
- package/dist/search/components/ElementsColumn.js +4 -3
- package/dist/search/components/SearchByTags.js +3 -3
- package/dist/search/components/ViewsColum.js +36 -35
- package/dist/search/components/ViewsColumn.css.js +4 -4
- package/dist/search/components/_shared.css.d.ts +2 -2
- package/dist/search/components/_shared.css.js +31 -46
- package/dist/search/components/styles.css.js +4 -4
- package/dist/shadowroot/ShadowRoot.js +2 -3
- package/dist/styles2.js +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +10 -10
- package/panda.buildinfo.json +340 -298
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +0 -2
- package/dist/context/DefaultMantineProvider.js +0 -48
- package/dist/likec4diagram/ui/sequence-outline/state.js +0 -55
- package/dist/navigationpanel/controls/DetailsControls.d.ts +0 -2
- package/dist/navigationpanel/controls/DetailsControls.js +0 -224
|
@@ -19,7 +19,7 @@ var ElementTag = forwardRef(({ tag, cursor, className, style, ...props }, ref) =
|
|
|
19
19
|
className: cx(likec4tag(), className),
|
|
20
20
|
...props,
|
|
21
21
|
style: {
|
|
22
|
-
cursor,
|
|
22
|
+
...cursor && { cursor },
|
|
23
23
|
...style
|
|
24
24
|
},
|
|
25
25
|
children: [/* @__PURE__ */ jsx("span", { children: "#" }), /* @__PURE__ */ jsx("span", { children: tag })]
|
|
@@ -85,12 +85,12 @@ function WithElementTags({ id, tags, width, hovered, onTagClick, onTagMouseEnter
|
|
|
85
85
|
display: "flex",
|
|
86
86
|
alignItems: "center",
|
|
87
87
|
justifyContent: "center",
|
|
88
|
-
maxWidth: "50px",
|
|
89
|
-
height: "5px",
|
|
88
|
+
maxWidth: "[50px]",
|
|
89
|
+
height: "[5px]",
|
|
90
90
|
_whenHovered: {
|
|
91
|
-
height: "12px",
|
|
91
|
+
height: "[12px]",
|
|
92
92
|
borderRadius: "sm",
|
|
93
|
-
transitionDelay: "
|
|
93
|
+
transitionDelay: "fastest"
|
|
94
94
|
},
|
|
95
95
|
transition: "fast"
|
|
96
96
|
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { isCssProperty, styled } from "@likec4/styles/jsx";
|
|
3
|
+
import { emptyBox } from "@likec4/styles/recipes";
|
|
4
|
+
//#region src/components/EmptyBox.tsx
|
|
5
|
+
var EmptyBox = styled("div", emptyBox, { shouldForwardProp(prop, variantKeys) {
|
|
6
|
+
return !variantKeys.includes(prop) && !isCssProperty(prop);
|
|
7
|
+
} });
|
|
8
|
+
//#endregion
|
|
9
|
+
export { EmptyBox };
|
|
@@ -17,20 +17,21 @@ function ErrorFallback({ error, resetErrorBoundary }) {
|
|
|
17
17
|
margin: "0",
|
|
18
18
|
padding: "0",
|
|
19
19
|
position: "fixed",
|
|
20
|
-
top: "
|
|
21
|
-
left: "
|
|
22
|
-
width: "[calc(100vw - ({spacing.
|
|
20
|
+
top: "5",
|
|
21
|
+
left: "5",
|
|
22
|
+
width: "[calc(100vw - ({spacing.5} * 2))]",
|
|
23
23
|
height: "max-content",
|
|
24
|
-
maxHeight: "[calc(100vh - ({spacing.
|
|
24
|
+
maxHeight: "[calc(100vh - ({spacing.5} * 3))]",
|
|
25
25
|
background: `likec4.overlay.body`,
|
|
26
26
|
rounded: "sm",
|
|
27
|
-
borderWidth:
|
|
27
|
+
borderWidth: "extra",
|
|
28
28
|
borderColor: `likec4.overlay.border`,
|
|
29
29
|
shadow: "xl",
|
|
30
30
|
outline: "none",
|
|
31
|
+
zIndex: "toast",
|
|
31
32
|
_backdrop: {
|
|
32
33
|
cursor: "zoom-out",
|
|
33
|
-
backdropFilter: `blur(18px)`,
|
|
34
|
+
backdropFilter: `[blur(18px)]`,
|
|
34
35
|
bg: "[color-mix(in oklab, {colors.likec4.overlay.backdrop} 60%, transparent)]"
|
|
35
36
|
}
|
|
36
37
|
}),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FloatingWindowProps as MantineFloatingWindowProps } from '@mantine/core';
|
|
2
|
+
export interface FloatingWindowProps extends MantineFloatingWindowProps {
|
|
3
|
+
/**
|
|
4
|
+
* To make window position and size persistent, provide a stable id
|
|
5
|
+
*/
|
|
6
|
+
windowId?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* If true, the window will not be resizable
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
nonResizeable?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback when the window is closed
|
|
14
|
+
* If provided, the window will render a close button
|
|
15
|
+
*/
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function FloatingWindow({ children, windowId, onClose, dimensions, initialPosition, className, nonResizeable, ...props }: FloatingWindowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { useId as useId$1 } from "../hooks/useId.js";
|
|
3
|
+
import { useMantinePortalProps } from "../hooks/useMantinePortalProps.js";
|
|
4
|
+
import { cx } from "@likec4/styles/css";
|
|
5
|
+
import { useRef } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { useRafCallback } from "@react-hookz/web";
|
|
8
|
+
import { CloseButton, FloatingWindow } from "@mantine/core";
|
|
9
|
+
import { useSessionStorage } from "@mantine/hooks";
|
|
10
|
+
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
11
|
+
import { floatingWindow } from "@likec4/styles/recipes";
|
|
12
|
+
//#region src/components/FloatingWindow.tsx
|
|
13
|
+
function FloatingWindow$1({ children, windowId, onClose, dimensions, initialPosition, className, nonResizeable = false, ...props }) {
|
|
14
|
+
const portalProps = useMantinePortalProps();
|
|
15
|
+
const id = useId$1();
|
|
16
|
+
const [windowState, setWindowState] = useSessionStorage({
|
|
17
|
+
key: `likec4:window:${windowId ?? id}`,
|
|
18
|
+
getInitialValueInEffect: false,
|
|
19
|
+
defaultValue: {
|
|
20
|
+
dimensions: {
|
|
21
|
+
minWidth: 220,
|
|
22
|
+
minHeight: 250,
|
|
23
|
+
initialWidth: 260,
|
|
24
|
+
initialHeight: 360,
|
|
25
|
+
...dimensions
|
|
26
|
+
},
|
|
27
|
+
initialPosition: {
|
|
28
|
+
top: 65,
|
|
29
|
+
left: 32,
|
|
30
|
+
...initialPosition
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const initialStateRef = useRef(windowState);
|
|
35
|
+
const [updateWindowState] = useRafCallback((update) => {
|
|
36
|
+
setWindowState((state) => ({
|
|
37
|
+
dimensions: {
|
|
38
|
+
...state.dimensions,
|
|
39
|
+
...update.dimensions
|
|
40
|
+
},
|
|
41
|
+
initialPosition: {
|
|
42
|
+
...state.initialPosition,
|
|
43
|
+
...update.initialPosition
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
return /* @__PURE__ */ jsxs(FloatingWindow, {
|
|
48
|
+
constrainToViewport: true,
|
|
49
|
+
constrainOffset: 4,
|
|
50
|
+
dragHandleSelector: ".drag-handle",
|
|
51
|
+
excludeDragHandleSelector: "button, .nodrag, .mantine-ScrollArea-root",
|
|
52
|
+
className: cx(floatingWindow(), className),
|
|
53
|
+
...portalProps,
|
|
54
|
+
...props,
|
|
55
|
+
...initialStateRef.current,
|
|
56
|
+
onPositionChange: (position) => {
|
|
57
|
+
updateWindowState({ initialPosition: {
|
|
58
|
+
top: position.y,
|
|
59
|
+
left: position.x
|
|
60
|
+
} });
|
|
61
|
+
props.onPositionChange?.(position);
|
|
62
|
+
},
|
|
63
|
+
onSizeChange: (size) => {
|
|
64
|
+
updateWindowState({ dimensions: {
|
|
65
|
+
initialHeight: size.height,
|
|
66
|
+
initialWidth: size.width
|
|
67
|
+
} });
|
|
68
|
+
props.onSizeChange?.(size);
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
children,
|
|
72
|
+
!nonResizeable && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FloatingWindow.ResizeHandle, {
|
|
73
|
+
"data-resize-handler": "right",
|
|
74
|
+
tabIndex: -1
|
|
75
|
+
}), /* @__PURE__ */ jsx(FloatingWindow.ResizeHandle, { "data-resize-handler": "bottom" })] }),
|
|
76
|
+
/* @__PURE__ */ jsx(Box$1, {
|
|
77
|
+
className: "drag-header drag-handle",
|
|
78
|
+
pr: "1",
|
|
79
|
+
children: onClose && /* @__PURE__ */ jsx(CloseButton, {
|
|
80
|
+
size: 16,
|
|
81
|
+
onClick: onClose
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
__name(FloatingWindow$1, "FloatingWindow");
|
|
88
|
+
//#endregion
|
|
89
|
+
export { FloatingWindow$1 as FloatingWindow };
|
package/dist/components/Link.js
CHANGED
|
@@ -23,9 +23,9 @@ var Link = forwardRef(({ value, className, ...props }, ref) => {
|
|
|
23
23
|
timeout: 1500,
|
|
24
24
|
children: ({ copy, copied }) => /* @__PURE__ */ jsx(ActionIcon, {
|
|
25
25
|
className: css({
|
|
26
|
-
opacity: copied ? 1 : .45,
|
|
26
|
+
opacity: copied ? "1" : "0.45",
|
|
27
27
|
transition: "fast",
|
|
28
|
-
_hover: { opacity: 1 }
|
|
28
|
+
_hover: { opacity: "1" }
|
|
29
29
|
}),
|
|
30
30
|
tabIndex: -1,
|
|
31
31
|
size: "20",
|
|
@@ -45,8 +45,8 @@ var Link = forwardRef(({ value, className, ...props }, ref) => {
|
|
|
45
45
|
classNames: {
|
|
46
46
|
root: css({
|
|
47
47
|
flexWrap: "nowrap",
|
|
48
|
-
minHeight:
|
|
49
|
-
maxWidth:
|
|
48
|
+
minHeight: "[24px]",
|
|
49
|
+
maxWidth: "[500px]",
|
|
50
50
|
userSelect: "all",
|
|
51
51
|
pr: "0",
|
|
52
52
|
backgroundColor: {
|
|
@@ -63,7 +63,7 @@ var Link = forwardRef(({ value, className, ...props }, ref) => {
|
|
|
63
63
|
pointerEvents: "none",
|
|
64
64
|
_groupHover: {
|
|
65
65
|
color: "[var(--badge-color)]",
|
|
66
|
-
opacity: .7
|
|
66
|
+
opacity: "0.7"
|
|
67
67
|
}
|
|
68
68
|
} })
|
|
69
69
|
},
|
|
@@ -77,8 +77,8 @@ var Link = forwardRef(({ value, className, ...props }, ref) => {
|
|
|
77
77
|
css: {
|
|
78
78
|
transition: "fast",
|
|
79
79
|
opacity: {
|
|
80
|
-
base: .7,
|
|
81
|
-
_hover: 1
|
|
80
|
+
base: "0.7",
|
|
81
|
+
_hover: "1"
|
|
82
82
|
},
|
|
83
83
|
textDecoration: {
|
|
84
84
|
base: "none",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardRefComponent, HTMLMotionProps } from 'motion/react';
|
|
2
2
|
import { HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
-
import { StyleContextProvider, StyleContextConsumer } from '
|
|
4
|
-
import { NavigationPanelRecipe } from '
|
|
3
|
+
import { StyleContextProvider, StyleContextConsumer } from '@likec4/styles/jsx';
|
|
4
|
+
import { NavigationPanelRecipe } from '@likec4/styles/recipes';
|
|
5
5
|
export declare const NavigationPanel: {
|
|
6
6
|
Root: StyleContextProvider<ForwardRefComponent<"div", HTMLMotionProps<"div">>, NavigationPanelRecipe>;
|
|
7
7
|
Body: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
|
|
@@ -3,9 +3,8 @@ import { Logo as Logo$1, LogoIcon } from "./Logo.js";
|
|
|
3
3
|
import { cx } from "@likec4/styles/css";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { isValidMotionProp } from "motion/react";
|
|
6
|
+
import { isValidMotionProp, m } from "motion/react";
|
|
7
7
|
import { createStyleContext, isCssProperty } from "@likec4/styles/jsx";
|
|
8
|
-
import * as m$1 from "motion/react-m";
|
|
9
8
|
import { navigationPanel } from "@likec4/styles/recipes";
|
|
10
9
|
//#region src/components/NavigationPanel.tsx
|
|
11
10
|
var { withProvider, withContext } = createStyleContext(navigationPanel);
|
|
@@ -19,11 +18,11 @@ var LogoButton = forwardRef(({ className, ...props }, ref) => {
|
|
|
19
18
|
});
|
|
20
19
|
});
|
|
21
20
|
var NavigationPanel = {
|
|
22
|
-
Root: withProvider(m
|
|
23
|
-
Body: withContext(m
|
|
21
|
+
Root: withProvider(m.div, "root", { shouldForwardProp }),
|
|
22
|
+
Body: withContext(m.div, "body", { shouldForwardProp }),
|
|
24
23
|
Logo: withContext(LogoButton, "logo", { shouldForwardProp }),
|
|
25
|
-
Label: withContext(m
|
|
26
|
-
Dropdown: withContext(m
|
|
24
|
+
Label: withContext(m.div, "label", { shouldForwardProp }),
|
|
25
|
+
Dropdown: withContext(m.div, "dropdown", { shouldForwardProp })
|
|
27
26
|
};
|
|
28
27
|
//#endregion
|
|
29
28
|
export { NavigationPanel };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { css } from "@likec4/styles/css";
|
|
2
2
|
//#region src/components/SearchControl.css.ts
|
|
3
3
|
var root = css({
|
|
4
|
-
height: "
|
|
4
|
+
height: "control.sm",
|
|
5
5
|
paddingLeft: "sm",
|
|
6
6
|
paddingRight: "1",
|
|
7
7
|
borderRadius: "sm",
|
|
8
|
-
border: "
|
|
8
|
+
border: "default",
|
|
9
9
|
borderColor: {
|
|
10
|
-
base: "default
|
|
10
|
+
base: "border.default",
|
|
11
11
|
_light: "mantine.gray[4]",
|
|
12
12
|
_dark: "mantine.dark[4]",
|
|
13
|
-
_hover: "default
|
|
13
|
+
_hover: "border.default"
|
|
14
14
|
},
|
|
15
15
|
cursor: "pointer",
|
|
16
16
|
background: {
|
|
17
|
-
base: "default",
|
|
18
|
-
|
|
19
|
-
_dark: "mantine.dark[6]",
|
|
20
|
-
_hover: "default.hover"
|
|
17
|
+
base: "surface.default",
|
|
18
|
+
_hover: "surface.hover"
|
|
21
19
|
},
|
|
22
20
|
width: "100%",
|
|
23
21
|
"& .tabler-icon": { color: "text" },
|
|
@@ -35,18 +33,18 @@ var placeholder = css({
|
|
|
35
33
|
fontSize: "sm",
|
|
36
34
|
fontWeight: "medium",
|
|
37
35
|
paddingRight: "2.5",
|
|
38
|
-
color: "text.
|
|
36
|
+
color: "text.non-essential",
|
|
39
37
|
flex: "1",
|
|
40
38
|
sm: { paddingRight: "[30px]" },
|
|
41
39
|
md: { paddingRight: "[50px]" }
|
|
42
40
|
});
|
|
43
41
|
var shortcut = css({
|
|
44
|
-
fontSize: "
|
|
42
|
+
fontSize: "xxs",
|
|
45
43
|
fontWeight: "bold",
|
|
46
|
-
lineHeight:
|
|
44
|
+
lineHeight: "tight",
|
|
47
45
|
padding: "[4px 7px]",
|
|
48
46
|
borderRadius: "sm",
|
|
49
|
-
border: "
|
|
47
|
+
border: "default",
|
|
50
48
|
transition: "fast",
|
|
51
49
|
_light: {
|
|
52
50
|
color: "mantine.gray[7]",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconProps } from '@tabler/icons-react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the appropriate icon component for a given view type.
|
|
5
|
+
* @param viewType - The type of view ('index', 'element', 'deployment', or 'dynamic')
|
|
6
|
+
* @returns The corresponding icon component
|
|
7
|
+
*/
|
|
8
|
+
export declare function viewIcon(viewType: 'index' | 'element' | 'deployment' | 'dynamic'): JSX.Element;
|
|
9
|
+
export declare function ViewIcon({ type, className, ...props }: IconProps & {
|
|
10
|
+
type: 'index' | 'element' | 'deployment' | 'dynamic';
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { css, cx } from "@likec4/styles/css";
|
|
3
|
+
import { IconDirectionSignFilled, IconStack2, IconStarFilled, IconZoomScan } from "@tabler/icons-react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { nonexhaustive } from "@likec4/core";
|
|
6
|
+
//#region src/components/ViewIcon.tsx
|
|
7
|
+
var viewTypeIconCss = css({
|
|
8
|
+
verticalAlign: "middle",
|
|
9
|
+
opacity: {
|
|
10
|
+
base: "0.4",
|
|
11
|
+
_dark: "0.5",
|
|
12
|
+
_groupHover: "0.8",
|
|
13
|
+
_groupActive: "0.8",
|
|
14
|
+
_groupFocus: "0.8"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var viewIcons = {
|
|
18
|
+
index: /* @__PURE__ */ jsx(IconStarFilled, {
|
|
19
|
+
size: 16,
|
|
20
|
+
className: viewTypeIconCss
|
|
21
|
+
}),
|
|
22
|
+
element: /* @__PURE__ */ jsx(IconZoomScan, {
|
|
23
|
+
size: 18,
|
|
24
|
+
stroke: 2,
|
|
25
|
+
className: viewTypeIconCss
|
|
26
|
+
}),
|
|
27
|
+
deployment: /* @__PURE__ */ jsx(IconStack2, {
|
|
28
|
+
size: 16,
|
|
29
|
+
stroke: 1.5,
|
|
30
|
+
className: viewTypeIconCss
|
|
31
|
+
}),
|
|
32
|
+
dynamic: /* @__PURE__ */ jsx(IconDirectionSignFilled, {
|
|
33
|
+
size: 18,
|
|
34
|
+
className: viewTypeIconCss
|
|
35
|
+
})
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns the appropriate icon component for a given view type.
|
|
39
|
+
* @param viewType - The type of view ('index', 'element', 'deployment', or 'dynamic')
|
|
40
|
+
* @returns The corresponding icon component
|
|
41
|
+
*/
|
|
42
|
+
function viewIcon(viewType) {
|
|
43
|
+
return viewIcons[viewType];
|
|
44
|
+
}
|
|
45
|
+
function ViewIcon({ type, className, ...props }) {
|
|
46
|
+
if (type === "index") return /* @__PURE__ */ jsx(IconStarFilled, {
|
|
47
|
+
size: 16,
|
|
48
|
+
className: cx(viewTypeIconCss, className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
if (type === "element") return /* @__PURE__ */ jsx(IconZoomScan, {
|
|
52
|
+
size: 18,
|
|
53
|
+
stroke: 2,
|
|
54
|
+
className: cx(viewTypeIconCss, className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
if (type === "deployment") return /* @__PURE__ */ jsx(IconStack2, {
|
|
58
|
+
size: 16,
|
|
59
|
+
stroke: 1.5,
|
|
60
|
+
className: cx(viewTypeIconCss, className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
if (type === "dynamic") return /* @__PURE__ */ jsx(IconDirectionSignFilled, {
|
|
64
|
+
size: 18,
|
|
65
|
+
className: cx(viewTypeIconCss, className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
nonexhaustive(type);
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ViewIcon, viewIcon };
|
|
@@ -16,7 +16,8 @@ var defaultHandlers = {
|
|
|
16
16
|
onLogoClick: null,
|
|
17
17
|
onOpenSource: null,
|
|
18
18
|
onInitialized: null,
|
|
19
|
-
onLayoutTypeChange: null
|
|
19
|
+
onLayoutTypeChange: null,
|
|
20
|
+
onRelationshipBrowserScopeChange: null
|
|
20
21
|
};
|
|
21
22
|
var HandlerNames = keys(defaultHandlers);
|
|
22
23
|
var DiagramEventHandlersRefContext = createContext({ current: defaultHandlers });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { LikeC4MantineProvider } from "../LikeC4MantineProvider.js";
|
|
3
3
|
import { useContext, useEffect } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
5
5
|
import { MantineContext } from "@mantine/core";
|
|
@@ -7,9 +7,9 @@ import { MantineContext } from "@mantine/core";
|
|
|
7
7
|
function EnsureMantine({ children }) {
|
|
8
8
|
const mantineCtx = useContext(MantineContext);
|
|
9
9
|
useEffect(() => {
|
|
10
|
-
if (!mantineCtx) console.warn("LikeC4Diagram must be a child of
|
|
10
|
+
if (!mantineCtx) console.warn("LikeC4Diagram must be a child of LikeC4MantineProvider");
|
|
11
11
|
}, []);
|
|
12
|
-
if (!mantineCtx) return /* @__PURE__ */ jsx(
|
|
12
|
+
if (!mantineCtx) return /* @__PURE__ */ jsx(LikeC4MantineProvider, { children });
|
|
13
13
|
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementShape } from '@likec4/core';
|
|
2
2
|
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
-
import { ElementIconRenderer } from '../LikeC4Diagram.props';
|
|
3
|
+
import { ElementIconRenderer, ElementIconRendererProps } from '../LikeC4Diagram.props';
|
|
4
4
|
/**
|
|
5
5
|
* Provider for custom element icon renderers
|
|
6
6
|
*
|
|
@@ -37,3 +37,4 @@ export declare function IconOrShapeRenderer({ element, className, style, }: {
|
|
|
37
37
|
className?: string;
|
|
38
38
|
style?: CSSProperties | undefined;
|
|
39
39
|
}): import("react").JSX.Element;
|
|
40
|
+
export declare function DefaultIconRenderer({ node, ...props }: ElementIconRendererProps): import("react").JSX.Element | null;
|
|
@@ -48,7 +48,7 @@ function IconRenderer({ element, className, style }) {
|
|
|
48
48
|
case !!RenderIcon:
|
|
49
49
|
icon = /* @__PURE__ */ jsx(RenderIcon, { node: element });
|
|
50
50
|
break;
|
|
51
|
-
default: icon =
|
|
51
|
+
default: icon = /* @__PURE__ */ jsx(DefaultIconRenderer, { node: element });
|
|
52
52
|
}
|
|
53
53
|
if (!icon) return null;
|
|
54
54
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -129,5 +129,41 @@ function decodeSvgDataUrl(dataUrl) {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
+
var iconUrl = (group, name) => `https://icons.like-c4.dev/${encodeURIComponent(group)}/${encodeURIComponent(name)}.svg`;
|
|
133
|
+
function BootstrapIconMask({ name, ...props }) {
|
|
134
|
+
const url = iconUrl("bootstrap", name);
|
|
135
|
+
const style = {
|
|
136
|
+
display: "inline-block",
|
|
137
|
+
width: "100%",
|
|
138
|
+
height: "100%",
|
|
139
|
+
backgroundColor: "currentColor",
|
|
140
|
+
maskImage: `url("${url}")`,
|
|
141
|
+
maskRepeat: "no-repeat",
|
|
142
|
+
maskPosition: "center",
|
|
143
|
+
maskSize: "contain",
|
|
144
|
+
WebkitMaskImage: `url("${url}")`,
|
|
145
|
+
WebkitMaskRepeat: "no-repeat",
|
|
146
|
+
WebkitMaskPosition: "center",
|
|
147
|
+
WebkitMaskSize: "contain"
|
|
148
|
+
};
|
|
149
|
+
return /* @__PURE__ */ jsx("span", {
|
|
150
|
+
...props,
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
style
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function DefaultIconRenderer({ node, ...props }) {
|
|
156
|
+
if (!node.icon || node.icon === "none") return null;
|
|
157
|
+
const [group, name, ...rest] = node.icon.split(":");
|
|
158
|
+
if (!group || !name || rest.length > 0) return null;
|
|
159
|
+
if (group === "bootstrap") return /* @__PURE__ */ jsx(BootstrapIconMask, {
|
|
160
|
+
...props,
|
|
161
|
+
name
|
|
162
|
+
});
|
|
163
|
+
return /* @__PURE__ */ jsx("img", {
|
|
164
|
+
...props,
|
|
165
|
+
src: iconUrl(group, name)
|
|
166
|
+
});
|
|
167
|
+
}
|
|
132
168
|
//#endregion
|
|
133
|
-
export { IconOrShapeRenderer, IconRenderer, IconRendererProvider };
|
|
169
|
+
export { DefaultIconRenderer, IconOrShapeRenderer, IconRenderer, IconRendererProvider };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProjectId } from '@likec4/core/types';
|
|
2
|
+
import { LikeC4ProjectData } from '../LikeC4ProjectsProvider';
|
|
2
3
|
import { Provider } from 'react';
|
|
3
4
|
export type LikeC4ProjectsContext = {
|
|
4
|
-
projects: ReadonlyArray<
|
|
5
|
+
projects: ReadonlyArray<LikeC4ProjectData>;
|
|
5
6
|
onProjectChange: (id: ProjectId) => void;
|
|
6
7
|
};
|
|
7
8
|
export declare const LikeC4ProjectsContextProvider: Provider<LikeC4ProjectsContext | null>;
|
|
@@ -2,8 +2,14 @@ import { TagSpecification } from '@likec4/core';
|
|
|
2
2
|
import { LikeC4Styles } from '@likec4/core/styles';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
export declare function generateColorVars(spec: TagSpecification, styles?: LikeC4Styles): string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type TagStylesProviderProps = PropsWithChildren<{
|
|
6
|
+
/**
|
|
7
|
+
* Root element selector to scope the tag styles to (e.g., "#diagram-root")
|
|
8
|
+
* Must be a valid CSS selector
|
|
9
|
+
*/
|
|
10
|
+
rootSelector: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function TagStylesProvider({ children, rootSelector }: TagStylesProviderProps): import("react").JSX.Element;
|
|
8
13
|
export declare function useTagSpecifications(): Record<string, TagSpecification>;
|
|
9
14
|
export declare function useTagSpecification(tag: string): TagSpecification;
|
|
15
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { useLikeC4Specification } from "../hooks/useLikeC4Model.js";
|
|
3
3
|
import { useLikeC4Styles } from "../hooks/useLikeC4Styles.js";
|
|
4
4
|
import { createContext, memo } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { entries, flatMap, isEmpty, join, pipe } from "remeda";
|
|
7
7
|
import { isTagColorSpecified } from "@likec4/core";
|
|
8
8
|
import { useMantineStyleNonce } from "@mantine/core";
|
|
@@ -12,9 +12,9 @@ var radixColors = DefaultTagColors;
|
|
|
12
12
|
function generateColorVars(spec, styles = LikeC4Styles.DEFAULT) {
|
|
13
13
|
const color = spec.color;
|
|
14
14
|
if (isTagColorSpecified(spec) && isValidColor(color)) return `
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
--colors-likec4-tag-bg: ${color};
|
|
16
|
+
--colors-likec4-tag-bg-hover: color-mix(in oklab, ${color}, var(--colors-likec4-mix-color) 20%);
|
|
17
|
+
--colors-likec4-tag-text: ${getContrastedColorsAPCA(color).hiContrast};
|
|
18
18
|
`;
|
|
19
19
|
if (radixColors.includes(color)) {
|
|
20
20
|
let textcolor = `var(--colors-${color}-12)`;
|
|
@@ -26,18 +26,18 @@ function generateColorVars(spec, styles = LikeC4Styles.DEFAULT) {
|
|
|
26
26
|
"amber"
|
|
27
27
|
].includes(color)) textcolor = "rgba(0 0 0 / 0.85)";
|
|
28
28
|
return `
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
--colors-likec4-tag-border: var(--colors-${color}-8);
|
|
30
|
+
--colors-likec4-tag-bg: var(--colors-${color}-9);
|
|
31
|
+
--colors-likec4-tag-bg-hover: var(--colors-${color}-10);
|
|
32
|
+
--colors-likec4-tag-text: ${textcolor};
|
|
33
33
|
`;
|
|
34
34
|
}
|
|
35
35
|
if (styles.isThemeColor(color)) {
|
|
36
36
|
const { fill, hiContrast } = styles.tagColor(color);
|
|
37
37
|
return `
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
--colors-likec4-tag-bg: ${fill};
|
|
39
|
+
--colors-likec4-tag-bg-hover: color-mix(in oklab, ${fill}, var(--colors-likec4-mix-color) 20%);
|
|
40
|
+
--colors-likec4-tag-text: ${hiContrast};
|
|
41
41
|
`;
|
|
42
42
|
}
|
|
43
43
|
return "";
|
|
@@ -51,18 +51,18 @@ function generateStylesheet(tags, rootSelector, styles) {
|
|
|
51
51
|
"}"
|
|
52
52
|
]), join("\n"));
|
|
53
53
|
}
|
|
54
|
-
function TagStylesProvider({ children,
|
|
54
|
+
function TagStylesProvider({ children, rootSelector }) {
|
|
55
55
|
const tags = useLikeC4Specification().tags;
|
|
56
56
|
const styles = useLikeC4Styles();
|
|
57
57
|
const nonce = useMantineStyleNonce()?.();
|
|
58
|
-
const stylesheet = generateStylesheet(tags,
|
|
59
|
-
return /* @__PURE__ */ jsxs(
|
|
60
|
-
nonce,
|
|
61
|
-
stylesheet
|
|
62
|
-
}), /* @__PURE__ */ jsx(TagStylesContext.Provider, {
|
|
58
|
+
const stylesheet = generateStylesheet(tags, rootSelector, styles);
|
|
59
|
+
return /* @__PURE__ */ jsxs(TagStylesContext.Provider, {
|
|
63
60
|
value: tags,
|
|
64
|
-
children
|
|
65
|
-
|
|
61
|
+
children: [stylesheet !== "" && /* @__PURE__ */ jsx(TagStylesheet, {
|
|
62
|
+
nonce,
|
|
63
|
+
stylesheet
|
|
64
|
+
}), children]
|
|
65
|
+
});
|
|
66
66
|
}
|
|
67
67
|
var TagStylesheet = memo(({ stylesheet, nonce }) => {
|
|
68
68
|
return /* @__PURE__ */ jsx("style", {
|
package/dist/custom/index.d.ts
CHANGED
|
@@ -14,3 +14,6 @@ export { PortalToContainer } from '../components/PortalToContainer';
|
|
|
14
14
|
export { FramerMotionConfig } from '../context/FramerMotionConfig';
|
|
15
15
|
export { NavigationPanel } from '../components/NavigationPanel';
|
|
16
16
|
export { ErrorBoundary, ErrorFallback } from '../components/ErrorFallback';
|
|
17
|
+
export { LikeC4MantineProvider } from '../LikeC4MantineProvider';
|
|
18
|
+
export { LikeC4Styles } from '../LikeC4Styles';
|
|
19
|
+
export { TagStylesProvider } from '../context/TagStylesContext';
|
package/dist/custom/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Base } from "../base/Base.js";
|
|
|
3
3
|
import { useDiagramEventHandlers } from "../context/DiagramEventHandlers.js";
|
|
4
4
|
import { useSetState } from "../hooks/useSetState.js";
|
|
5
5
|
import { IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, useEnabledFeatures } from "../context/DiagramFeatures.js";
|
|
6
|
+
import { LikeC4MantineProvider } from "../LikeC4MantineProvider.js";
|
|
6
7
|
import { FramerMotionConfig } from "../context/FramerMotionConfig.js";
|
|
7
8
|
import { useDiagram, useDiagramActorRef } from "../hooks/safeContext.js";
|
|
8
9
|
import { useDiagramContext, useOnDiagramEvent } from "../hooks/useDiagram.js";
|
|
@@ -10,6 +11,7 @@ import { useCurrentView, useCurrentViewId } from "../hooks/useCurrentView.js";
|
|
|
10
11
|
import { useOptionalCurrentViewModel, useOptionalLikeC4Model } from "../context/LikeC4ModelContext.js";
|
|
11
12
|
import { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from "../hooks/useLikeC4Model.js";
|
|
12
13
|
import { useLikeC4Styles } from "../hooks/useLikeC4Styles.js";
|
|
14
|
+
import { TagStylesProvider } from "../context/TagStylesContext.js";
|
|
13
15
|
import { ErrorBoundary, ErrorFallback } from "../components/ErrorFallback.js";
|
|
14
16
|
import { useCurrentViewModel } from "../hooks/useCurrentViewModel.js";
|
|
15
17
|
import { useHasProjects, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext } from "../hooks/useLikeC4Project.js";
|
|
@@ -27,8 +29,6 @@ import { ElementTag, ElementTags } from "../base-primitives/element/ElementTags.
|
|
|
27
29
|
import { memoEdge } from "../base-primitives/memoEdge.js";
|
|
28
30
|
import { memoNode } from "../base-primitives/memoNode.js";
|
|
29
31
|
import { DefaultHandles } from "../base-primitives/NodeHandles.js";
|
|
30
|
-
import { Overlay } from "../overlays/overlay/Overlay.js";
|
|
31
|
-
import { PortalToContainer } from "../components/PortalToContainer.js";
|
|
32
32
|
import { CompoundActions } from "../likec4diagram/custom/nodes/CompoundActions.js";
|
|
33
33
|
import { DeploymentElementActions, ElementActions } from "../likec4diagram/custom/nodes/ElementActions.js";
|
|
34
34
|
import { Toolbar } from "../likec4diagram/custom/nodes/toolbar/Toolbar.js";
|
|
@@ -37,5 +37,8 @@ import { DeploymentElementToolbar, ElementToolbar } from "../likec4diagram/custo
|
|
|
37
37
|
import { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode } from "../likec4diagram/custom/nodes/nodes.js";
|
|
38
38
|
import { SequenceActorNode, SequenceParallelArea } from "../likec4diagram/custom/nodes/SequenceActorNode.js";
|
|
39
39
|
import { compoundDeploymentNode, compoundElementNode, deploymentNode, elementNode, sequenceActorNode, viewGroupNode } from "./customNodes.js";
|
|
40
|
+
import { Overlay } from "../overlays/overlay/Overlay.js";
|
|
41
|
+
import { PortalToContainer } from "../components/PortalToContainer.js";
|
|
40
42
|
import { NavigationPanel } from "../components/NavigationPanel.js";
|
|
41
|
-
|
|
43
|
+
import { LikeC4Styles } from "../LikeC4Styles.js";
|
|
44
|
+
export { Base, CompoundActionButton, CompoundActions, CompoundDeploymentNode, CompoundDeploymentToolbar, CompoundDetailsButton, CompoundDetailsButtonWithHandler, CompoundElementNode, CompoundElementToolbar, CompoundNodeContainer, CompoundTitle, DefaultHandles, DeploymentElementActions, DeploymentElementToolbar, DeploymentNode, ElementActionButtons, ElementActions, ElementData, ElementDetailsButton, ElementDetailsButtonWithHandler, ElementNode, ElementNodeContainer, ElementShape, ElementTag, ElementTags, ElementToolbar, ErrorBoundary, ErrorFallback, FramerMotionConfig, IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, LikeC4MantineProvider, LikeC4Styles, Markdown, NavigationPanel, Overlay, PortalToContainer, SequenceActorNode, SequenceParallelArea, TagStylesProvider, Toolbar, ViewGroupNode, compoundDeploymentNode, compoundElementNode, deploymentNode, elementNode, memoEdge, memoNode, sequenceActorNode, useCurrentView, useCurrentViewId, useCurrentViewModel, useDiagram, useDiagramActorRef, useDiagramContext, useDiagramEventHandlers, useEnabledFeatures, useHasProjects, useLikeC4Model, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext, useLikeC4Specification, useLikeC4Styles, useLikeC4ViewModel, useOnDiagramEvent, useOptionalCurrentViewModel, useOptionalLikeC4Model, useSetState, useUpdateEffect, viewGroupNode };
|