@likec4/diagram 1.57.0 → 1.58.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/dist/adhoc-editor/EditorPanel.d.ts +1 -1
- package/dist/adhoc-editor/ElementsTree.d.ts +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
- package/dist/adhoc-editor/components/Tree.d.ts +5 -5
- package/dist/adhoc-editor/state/ActorProvider.d.ts +1 -1
- package/dist/adhoc-editor/state/panel.d.ts +1 -1
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +1 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -1
- package/dist/base-primitives/element/ElementData.d.ts +2 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/ShadowRootContext.d.ts +3 -0
- package/dist/context/ShadowRootContext.js +5 -0
- package/dist/context/TagStylesContext.d.ts +2 -1
- package/dist/context/TagStylesContext.js +5 -7
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +74 -15
- package/dist/editor/actor/actions.js +91 -25
- package/dist/editor/actor/hotkey.d.ts +1 -1
- package/dist/editor/actor/hotkey.js +7 -0
- package/dist/editor/actor/machine.d.ts +1 -1
- package/dist/editor/actor/machine.js +1 -0
- package/dist/editor/actor/setup.d.ts +10 -3
- package/dist/editor/actor/setup.js +3 -2
- package/dist/editor/actor/state.editor.d.ts +64 -14
- package/dist/editor/actor/state.editor.js +12 -11
- package/dist/editor/actor/state.sync-queue.d.ts +283 -91
- package/dist/editor/actor/state.sync-queue.js +93 -56
- package/dist/editor/actor/types.d.ts +6 -1
- package/dist/editor/actor/types.js +1 -1
- package/dist/editor/useEditorActorLogic.js +14 -2
- package/dist/hooks/useEditorActor.d.ts +5 -0
- package/dist/hooks/useEditorActor.js +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramXYFlow.js +15 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +5 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -0
- package/dist/likec4diagram/state/machine.actions.js +3 -2
- package/dist/likec4diagram/types.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +4 -2
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +1 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +2 -2
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/overlays/Overlays.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +1 -1
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/shadowroot/ShadowRoot.d.ts +1 -2
- package/dist/shadowroot/ShadowRoot.js +27 -21
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/shadowroot/{styles.css.d.ts → styles.d.ts} +3 -2
- package/dist/shadowroot/{styles.css.js → styles.js} +9 -8
- package/dist/styles2.js +1 -1
- package/package.json +27 -28
- package/panda.buildinfo.json +4 -7
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const EditorPanel: () => import("react
|
|
1
|
+
export declare const EditorPanel: () => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const ElementsTree: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const ElementsTree: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RecipeVariantProps } from '
|
|
1
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
2
2
|
import { MouseEventHandler, PropsWithChildren, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { IconOrShapeRenderer } from '../../context/IconRenderer';
|
|
4
4
|
import { TreeNodeData } from '../useElementsTree';
|
|
5
|
-
import { RecipeRuntimeFn, SlotRecipeRuntimeFn } from '
|
|
6
|
-
import { StyleContextRootProvider, StyleContextConsumer } from '
|
|
7
|
-
import { IconProps } from '
|
|
5
|
+
import { RecipeRuntimeFn, SlotRecipeRuntimeFn } from '../../../styled-system';
|
|
6
|
+
import { StyleContextRootProvider, StyleContextConsumer } from '../../../styled-system/jsx';
|
|
7
|
+
import { IconProps } from '@tabler/icons-react';
|
|
8
8
|
declare const statebtn: RecipeRuntimeFn<{
|
|
9
9
|
state: {
|
|
10
10
|
"include-explicit": {
|
|
@@ -39,7 +39,7 @@ export declare const Tree: {
|
|
|
39
39
|
node: TreeNodeData;
|
|
40
40
|
className?: string;
|
|
41
41
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
42
|
-
}>) => import("react
|
|
42
|
+
}>) => import("react").JSX.Element;
|
|
43
43
|
Icon: typeof IconOrShapeRenderer;
|
|
44
44
|
Label: StyleContextConsumer<"div">;
|
|
45
45
|
Content: StyleContextConsumer<"div">;
|
|
@@ -2,4 +2,4 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { AdhocViewService } from './actor.types';
|
|
3
3
|
export declare function AdhocEditorActorProvider({ children, service }: PropsWithChildren<{
|
|
4
4
|
service: AdhocViewService;
|
|
5
|
-
}>): import("react
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
@@ -30,7 +30,7 @@ declare const createEditorPanelStore: ({ initial, sideEffects, }: {
|
|
|
30
30
|
type: "inputKeyDown";
|
|
31
31
|
}>;
|
|
32
32
|
export type EditorPanelStore = ReturnType<typeof createEditorPanelStore>;
|
|
33
|
-
export declare const EditorPanelStoreProvider: (props: PropsWithChildren) => import("react
|
|
33
|
+
export declare const EditorPanelStoreProvider: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
34
34
|
export declare function selectEditorPanelState<T>(selector: (state: EditorPanelState) => T): [
|
|
35
35
|
selector: (snapshot: StoreSnapshot<EditorPanelState>) => T,
|
|
36
36
|
compare: (a: NoInfer<T> | undefined, b: NoInfer<T>) => boolean
|
|
@@ -12,4 +12,4 @@ export type BaseXYFlowProps<NodeType extends BaseNode, EdgeType extends BaseEdge
|
|
|
12
12
|
fitViewPadding?: ViewPadding | undefined;
|
|
13
13
|
onViewportResize?: undefined | (() => void);
|
|
14
14
|
} & SetRequired<Omit<ReactFlowProps<NodeType, EdgeType>, 'defaultNodes' | 'defaultEdges' | 'fitViewOptions' | 'nodesSelectable' | 'nodesDraggable'>, 'nodes' | 'edges' | 'onNodesChange' | 'onEdgesChange'>>;
|
|
15
|
-
export declare function BaseXYFlow<NodeType extends BaseNode, EdgeType extends BaseEdge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, onNodeMouseEnter, onNodeMouseLeave, onEdgeMouseEnter, onEdgeMouseLeave, ...props }: BaseXYFlowProps<NodeType, EdgeType>): import("react
|
|
15
|
+
export declare function BaseXYFlow<NodeType extends BaseNode, EdgeType extends BaseEdge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, onNodeMouseEnter, onNodeMouseLeave, onEdgeMouseEnter, onEdgeMouseLeave, ...props }: BaseXYFlowProps<NodeType, EdgeType>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
|
-
import { JsxStyleProps } from '
|
|
2
|
+
import { JsxStyleProps } from '../../styled-system/types';
|
|
3
3
|
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
4
4
|
export type MarkdownProps = Omit<ComponentPropsWithoutRef<'div'>, 'dangerouslySetInnerHTML' | 'children' | 'color'> & {
|
|
5
5
|
value: RichTextType;
|
|
@@ -5,5 +5,5 @@ type CompoundActionButtonProps = Simplify<BaseNodeProps & {
|
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
onClick: (e: ReactMouseEvent) => void;
|
|
7
7
|
}>;
|
|
8
|
-
export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): import("react
|
|
8
|
+
export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
|
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
onClick: (e: ReactMouseEvent) => void;
|
|
7
7
|
}>;
|
|
8
|
-
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react
|
|
8
|
+
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -11,5 +11,5 @@ type CompoundNodeContainerProps = PropsWithChildren<HTMLAttributes<HTMLDivElemen
|
|
|
11
11
|
layoutId?: string | undefined;
|
|
12
12
|
nodeProps: BaseNodeProps<BaseNode<RequiredData>>;
|
|
13
13
|
}>;
|
|
14
|
-
export declare function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered, dimmed: isDimmed, ...data }, }, className, children, style, ...rest }: CompoundNodeContainerProps): import("react
|
|
14
|
+
export declare function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered, dimmed: isDimmed, ...data }, }, className, children, style, ...rest }: CompoundNodeContainerProps): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -9,5 +9,5 @@ type RequiredData = {
|
|
|
9
9
|
type CompoundTitleProps = {
|
|
10
10
|
data: RequiredData;
|
|
11
11
|
};
|
|
12
|
-
export declare function CompoundTitle({ data }: CompoundTitleProps): import("react
|
|
12
|
+
export declare function CompoundTitle({ data }: CompoundTitleProps): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -3,5 +3,5 @@ type EdgeActionBtnProps = {
|
|
|
3
3
|
icon?: ReactNode;
|
|
4
4
|
onClick: (e: ReactMouseEvent) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react
|
|
6
|
+
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -7,5 +7,5 @@ type EdgeContainerProps = PropsWithChildren<BaseEdgePropsWithData<Data> & {
|
|
|
7
7
|
component?: 'g' | 'svg' | undefined;
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
}>;
|
|
10
|
-
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, animated, children, style, }: EdgeContainerProps): import("react
|
|
10
|
+
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, animated, children, style, }: EdgeContainerProps): import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,5 +15,5 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
15
15
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
16
16
|
};
|
|
17
17
|
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style: contentStyle, // applied to inner content div, not the positioned container
|
|
18
|
-
children, ...rest }: EdgeLabelContainerProps): import("react
|
|
18
|
+
children, ...rest }: EdgeLabelContainerProps): import("react").JSX.Element | null;
|
|
19
19
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RelationshipArrowType } from '@likec4/core/types';
|
|
2
2
|
import { SVGProps } from 'react';
|
|
3
3
|
export declare const EdgeMarkers: {
|
|
4
|
-
Arrow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
5
|
-
Crow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
6
|
-
OArrow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
7
|
-
Open: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
8
|
-
Diamond: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
9
|
-
ODiamond: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
10
|
-
Dot: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
11
|
-
ODot: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
4
|
+
Arrow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
5
|
+
Crow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
6
|
+
OArrow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
7
|
+
Open: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
8
|
+
Diamond: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
9
|
+
ODiamond: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
10
|
+
Dot: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
11
|
+
ODot: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
export type EdgeMarkerType = keyof typeof EdgeMarkers;
|
|
14
14
|
export declare function arrowTypeToMarker(arrowType?: RelationshipArrowType): EdgeMarkerType | undefined;
|
|
@@ -31,7 +31,7 @@ type ElementActionButtonsProps = {
|
|
|
31
31
|
* />
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export declare function ElementActionButtons({ selected, data: { hovered: isHovered, }, buttons, }: ElementActionButtonsProps): import("react
|
|
34
|
+
export declare function ElementActionButtons({ selected, data: { hovered: isHovered, }, buttons, }: ElementActionButtonsProps): import("react").JSX.Element | null;
|
|
35
35
|
export declare namespace ElementActionButtons {
|
|
36
36
|
type Item = {
|
|
37
37
|
key?: string;
|
|
@@ -47,10 +47,10 @@ type SlotProps = {
|
|
|
47
47
|
* </ElementData.Root>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare function ElementData({ data }: ElementDataProps): import("react
|
|
50
|
+
export declare function ElementData({ data }: ElementDataProps): import("react").JSX.Element;
|
|
51
51
|
export declare namespace ElementData {
|
|
52
52
|
var Root: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & ElementDataProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
|
-
var Icon: ({ data, ...props }: IconProps) => import("react
|
|
53
|
+
var Icon: ({ data, ...props }: IconProps) => import("react").JSX.Element;
|
|
54
54
|
var Content: import("react").ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
55
|
var Title: import("react").ForwardRefExoticComponent<SlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
56
|
var Technology: import("react").ForwardRefExoticComponent<((import("type-fest/source/merge-exclusive").Without<SlotProps, {
|
|
@@ -6,5 +6,5 @@ type ElementDetailsButtonProps = {
|
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
onClick: (e: ReactMouseEvent) => void;
|
|
8
8
|
};
|
|
9
|
-
export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): import("react
|
|
9
|
+
export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -14,5 +14,5 @@ type ElementShapeProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
showSelectionOutline?: boolean | undefined;
|
|
16
16
|
};
|
|
17
|
-
export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): import("react
|
|
17
|
+
export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -17,5 +17,5 @@ export type ElementTagsProps = BaseNodePropsWithData<Data> & {
|
|
|
17
17
|
onTagMouseEnter?: (tag: `#${string}`) => void;
|
|
18
18
|
onTagMouseLeave?: (tag: `#${string}`) => void;
|
|
19
19
|
};
|
|
20
|
-
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => import("react
|
|
20
|
+
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => import("react").JSX.Element | null>;
|
|
21
21
|
export {};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useCurrentZoomAtLeast } from "../../hooks/useXYFlow.js";
|
|
3
3
|
import { stopPropagation } from "../../utils/xyflow.js";
|
|
4
|
-
import { useTagSpecification } from "../../context/TagStylesContext.js";
|
|
5
4
|
import { css, cx } from "@likec4/styles/css";
|
|
6
5
|
import { forwardRef, memo, useCallback, useEffect } from "react";
|
|
7
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { NodeToolbar, Position, useStore } from "@xyflow/react";
|
|
9
8
|
import { deepEqual } from "fast-equals";
|
|
10
9
|
import { hasAtLeast } from "remeda";
|
|
11
|
-
import { isTagColorSpecified } from "@likec4/core";
|
|
12
10
|
import { useDebouncedState, useHover } from "@mantine/hooks";
|
|
13
11
|
import { Box, HStack } from "@likec4/styles/jsx";
|
|
14
12
|
import { hstack } from "@likec4/styles/patterns";
|
|
@@ -18,7 +16,7 @@ var ElementTag = forwardRef(({ tag, cursor, className, style, ...props }, ref) =
|
|
|
18
16
|
return /* @__PURE__ */ jsxs(Box, {
|
|
19
17
|
ref,
|
|
20
18
|
"data-likec4-tag": tag,
|
|
21
|
-
className: cx(likec4tag(
|
|
19
|
+
className: cx(likec4tag(), className),
|
|
22
20
|
...props,
|
|
23
21
|
style: {
|
|
24
22
|
cursor,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ErrorBoundaryProps, FallbackProps } from 'react-error-boundary';
|
|
2
|
-
export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): import("react
|
|
3
|
-
export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react
|
|
2
|
+
export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): import("react").JSX.Element;
|
|
3
|
+
export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react").JSX.Element;
|
|
@@ -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 '../../styled-system/jsx';
|
|
4
|
+
import { NavigationPanelRecipe } from '../../styled-system/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,4 +3,4 @@ import { PropsWithChildren } from 'react';
|
|
|
3
3
|
* PortalToContainer is used to render elements outside the LikeC4DiagramXYFlow, but inside the container.
|
|
4
4
|
* It is used internally by the library.
|
|
5
5
|
*/
|
|
6
|
-
export declare function PortalToContainer({ children }: PropsWithChildren): import("react
|
|
6
|
+
export declare function PortalToContainer({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementProps, UnstyledButtonProps } from '@mantine/core';
|
|
2
|
-
interface SearchControlProps extends UnstyledButtonProps, ElementProps<'button'> {
|
|
2
|
+
interface SearchControlProps extends Omit<UnstyledButtonProps, 'className'>, ElementProps<'button'> {
|
|
3
3
|
}
|
|
4
|
-
export declare function SearchControl({ className, ...others }: SearchControlProps): import("react
|
|
4
|
+
export declare function SearchControl({ className, ...others }: SearchControlProps): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function ErrorMessage({ children }: PropsWithChildren): import("react
|
|
2
|
+
export declare function ErrorMessage({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
3
3
|
export declare function ViewNotFound({ viewId }: {
|
|
4
4
|
viewId: string;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function CurrentViewModelProvider({ children }: PropsWithChildren): import("react
|
|
2
|
+
export declare function CurrentViewModelProvider({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MantineProviderProps } from '@mantine/core';
|
|
2
|
-
export declare function DefaultMantineProvider({ children, theme, ...props }: MantineProviderProps): import("react
|
|
2
|
+
export declare function DefaultMantineProvider({ children, theme, ...props }: MantineProviderProps): import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export type DiagramEventHandlersContext = RequiredOrNull<LikeC4DiagramEventHandl
|
|
|
9
9
|
};
|
|
10
10
|
export declare function DiagramEventHandlers({ handlers, children, }: PropsWithChildren<{
|
|
11
11
|
handlers: Required<LikeC4DiagramEventHandlers>;
|
|
12
|
-
}>): import("react
|
|
12
|
+
}>): import("react").JSX.Element;
|
|
13
13
|
export declare function useDiagramEventHandlers(): DiagramEventHandlersContext;
|
|
14
14
|
export declare function useDiagramEventHandlersRef(): DiagramEventHandlersRef;
|
|
15
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
type EnsureMantineProps = PropsWithChildren<{}>;
|
|
3
|
-
export declare function EnsureMantine({ children }: EnsureMantineProps): import("react
|
|
3
|
+
export declare function EnsureMantine({ children }: EnsureMantineProps): import("react").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function FramerMotionConfig({ reducedMotion, children, }: PropsWithChildren<{
|
|
3
3
|
/**
|
|
4
4
|
* If true, will respect the device prefersReducedMotion setting by switching
|
|
5
5
|
* transform animations off.
|
|
6
6
|
*/
|
|
7
|
-
reducedMotion?:
|
|
8
|
-
}>)
|
|
7
|
+
reducedMotion?: 'always' | 'never' | 'user' | undefined;
|
|
8
|
+
}>): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useMantineStyleNonce } from "@mantine/core";
|
|
4
4
|
import { LazyMotion, MotionConfig, domMax } from "motion/react";
|
|
5
5
|
//#region src/context/FramerMotionConfig.tsx
|
|
6
|
-
|
|
6
|
+
function FramerMotionConfig({ reducedMotion = "user", children }) {
|
|
7
7
|
const nonce = useMantineStyleNonce()?.();
|
|
8
8
|
return /* @__PURE__ */ jsx(LazyMotion, {
|
|
9
9
|
features: domMax,
|
|
@@ -14,6 +14,6 @@ var FramerMotionConfig = ({ reducedMotion = "user", children }) => {
|
|
|
14
14
|
children
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { FramerMotionConfig };
|
|
@@ -17,7 +17,7 @@ import { ElementIconRenderer } from '../LikeC4Diagram.props';
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function IconRendererProvider({ value, children, }: PropsWithChildren<{
|
|
19
19
|
value: ElementIconRenderer | null;
|
|
20
|
-
}>): import("react
|
|
20
|
+
}>): import("react").JSX.Element;
|
|
21
21
|
export declare function IconRenderer({ element, className, style, }: {
|
|
22
22
|
element?: {
|
|
23
23
|
id: string;
|
|
@@ -36,4 +36,4 @@ export declare function IconOrShapeRenderer({ element, className, style, }: {
|
|
|
36
36
|
};
|
|
37
37
|
className?: string;
|
|
38
38
|
style?: CSSProperties | undefined;
|
|
39
|
-
}): import("react
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { cx } from "@likec4/styles/css";
|
|
3
3
|
import { IconBrowser, IconCylinder, IconDeviceMobile, IconFileText, IconRectangularPrism, IconReorder, IconUser } from "@tabler/icons-react";
|
|
4
|
-
import { createContext, useContext } from "react";
|
|
4
|
+
import { createContext, useContext, useMemo } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/context/IconRenderer.tsx
|
|
7
7
|
var IconRendererContext = createContext(null);
|
|
@@ -47,17 +47,28 @@ function IconRenderer({ element, className, style }) {
|
|
|
47
47
|
const RenderIcon = useContext(IconRendererContext);
|
|
48
48
|
if (!element || !element.icon || element.icon === "none") return null;
|
|
49
49
|
let icon;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
switch (true) {
|
|
51
|
+
case element.icon.startsWith("data:image/svg+xml"):
|
|
52
|
+
icon = /* @__PURE__ */ jsx(SvgDataUrlIcon, {
|
|
53
|
+
dataUrl: element.icon,
|
|
54
|
+
alt: element.title
|
|
55
|
+
});
|
|
56
|
+
break;
|
|
57
|
+
case element.icon.startsWith("http://"):
|
|
58
|
+
case element.icon.startsWith("https://"):
|
|
59
|
+
case element.icon.startsWith("data:image"):
|
|
60
|
+
icon = /* @__PURE__ */ jsx("img", {
|
|
61
|
+
src: element.icon,
|
|
62
|
+
alt: element.title
|
|
63
|
+
});
|
|
64
|
+
break;
|
|
65
|
+
case !!RenderIcon:
|
|
66
|
+
icon = /* @__PURE__ */ jsx(RenderIcon, { node: element });
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
icon = null;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
61
72
|
if (!icon) return null;
|
|
62
73
|
return /* @__PURE__ */ jsx("div", {
|
|
63
74
|
className: cx(className, "likec4-element-icon"),
|
|
@@ -93,5 +104,14 @@ function IconOrShapeRenderer({ element, className, style }) {
|
|
|
93
104
|
style
|
|
94
105
|
});
|
|
95
106
|
}
|
|
107
|
+
function SvgDataUrlIcon({ dataUrl, ...props }) {
|
|
108
|
+
const svgContent = useMemo(() => decodeSvgDataUrl(dataUrl), [dataUrl]);
|
|
109
|
+
if (!svgContent) return null;
|
|
110
|
+
return /* @__PURE__ */ jsx("span", {
|
|
111
|
+
...props,
|
|
112
|
+
style: { display: "contents" },
|
|
113
|
+
dangerouslySetInnerHTML: { __html: svgContent }
|
|
114
|
+
});
|
|
115
|
+
}
|
|
96
116
|
//#endregion
|
|
97
117
|
export { IconOrShapeRenderer, IconRenderer, IconRendererProvider };
|
|
@@ -6,7 +6,7 @@ type UnknownLayouted = t.aux.UnknownLayouted;
|
|
|
6
6
|
export declare const LikeC4ModelContextProvider: Provider<LikeC4Model<any> | null>;
|
|
7
7
|
export type CurrentViewModel = LikeC4ViewModel<UnknownLayouted, LayoutedView<UnknownLayouted>>;
|
|
8
8
|
export declare const CurrentViewModelContext: Provider<CurrentViewModel | null>;
|
|
9
|
-
export declare function EnsureCurrentViewModel({ children }: PropsWithChildren): import("react
|
|
9
|
+
export declare function EnsureCurrentViewModel({ children }: PropsWithChildren): import("react").JSX.Element | null;
|
|
10
10
|
/**
|
|
11
11
|
* @returns The LikeC4Model from context, or null if no LikeC4ModelProvider is found.
|
|
12
12
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TagSpecification } from '@likec4/core';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
export declare const generateColorVars: (spec: TagSpecification) => string;
|
|
3
4
|
export declare function TagStylesProvider({ children, rootSelector }: PropsWithChildren<{
|
|
4
5
|
rootSelector: string;
|
|
5
|
-
}>): import("react
|
|
6
|
+
}>): import("react").JSX.Element;
|
|
6
7
|
export declare function useTagSpecifications(): Record<string, TagSpecification>;
|
|
7
8
|
export declare function useTagSpecification(tag: string): TagSpecification;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useLikeC4Specification } from "../hooks/useLikeC4Model.js";
|
|
3
|
-
import { createContext, memo
|
|
3
|
+
import { createContext, memo } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { entries, flatMap, isEmpty, join, pipe } from "remeda";
|
|
6
6
|
import { isTagColorSpecified } from "@likec4/core";
|
|
7
7
|
import { useMantineStyleNonce } from "@mantine/core";
|
|
8
|
-
import { DefaultTagColors } from "@likec4/core/styles";
|
|
8
|
+
import { DefaultTagColors, getContrastedColorsAPCA, isValidColor } from "@likec4/core/styles";
|
|
9
9
|
//#region src/context/TagStylesContext.tsx
|
|
10
10
|
var TagStylesContext = createContext({});
|
|
11
11
|
var radixColors = DefaultTagColors;
|
|
12
12
|
var generateColorVars = (spec) => {
|
|
13
13
|
const color = spec.color;
|
|
14
|
-
if (isTagColorSpecified(spec)) return `
|
|
14
|
+
if (isTagColorSpecified(spec) && isValidColor(color)) return `
|
|
15
15
|
--colors-likec4-tag-bg: ${color};
|
|
16
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};
|
|
17
18
|
`;
|
|
18
19
|
if (!radixColors.includes(color)) return "";
|
|
19
20
|
let textcolor = "12";
|
|
@@ -59,8 +60,5 @@ var TagStylesheet = memo(({ stylesheet, nonce }) => {
|
|
|
59
60
|
nonce
|
|
60
61
|
});
|
|
61
62
|
});
|
|
62
|
-
function useTagSpecification(tag) {
|
|
63
|
-
return useContext(TagStylesContext)[tag] ?? { color: "tomato" };
|
|
64
|
-
}
|
|
65
63
|
//#endregion
|
|
66
|
-
export { TagStylesProvider
|
|
64
|
+
export { TagStylesProvider };
|
|
@@ -24,11 +24,11 @@ export type LikeC4EditorProviderProps = PropsWithChildren<{
|
|
|
24
24
|
* </LikeC4EditorProvider>
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare function LikeC4EditorProvider({ children, editor }: LikeC4EditorProviderProps): import("react
|
|
27
|
+
export declare function LikeC4EditorProvider({ children, editor }: LikeC4EditorProviderProps): import("react").JSX.Element;
|
|
28
28
|
/**
|
|
29
29
|
* Component that ensures the editor context is available.
|
|
30
30
|
*
|
|
31
31
|
* @param children - The children to render.
|
|
32
32
|
*/
|
|
33
|
-
export declare function EnsureEditorContext({ children }: PropsWithChildren): import("react
|
|
33
|
+
export declare function EnsureEditorContext({ children }: PropsWithChildren): import("react").JSX.Element | null;
|
|
34
34
|
export declare function useOptionalLikeC4Editor(): LikeC4EditorCallbacks | null;
|