likec4 1.51.0 → 1.52.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/__app__/src/ProjectsOverview.js +1 -1
- package/__app__/src/likec4.js +261 -142
- package/__app__/src/routes/index.js +4 -2
- package/__app__/src/routes/projects.js +1 -1
- package/__app__/src/routes/single.js +432 -65
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +2038 -773
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +22 -224
- package/dist/_chunks/filesystem.mjs +67 -68
- package/dist/_chunks/index2.d.mts +36 -4
- package/dist/_chunks/libs/@hono/mcp.mjs +9 -9
- package/dist/_chunks/libs/@hono/node-server.mjs +1 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +13 -13
- package/dist/_chunks/libs/langium.mjs +1 -1
- package/dist/_chunks/src.mjs +1 -1
- package/dist/_chunks/src2.mjs +1 -1
- package/dist/cli/index.mjs +27 -26
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +20 -20
- package/react/index.d.mts +56 -2
- package/react/index.mjs +1558 -572
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +0 -1
- package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +0 -1
- package/dist/_chunks/libs/@smithy/util-base64.mjs +0 -1
package/react/index.d.mts
CHANGED
|
@@ -9,6 +9,7 @@ import { CamelCasedProperties } from 'type-fest';
|
|
|
9
9
|
import { Color } from '@likec4/core/types';
|
|
10
10
|
import { ComputedNodeStyle } from '@likec4/core/types';
|
|
11
11
|
import { ComputedNodeStyle as ComputedNodeStyle_2 } from '@likec4/core';
|
|
12
|
+
import { Context as Context_4 } from 'react';
|
|
12
13
|
import { ControlButton } from '@xyflow/react';
|
|
13
14
|
import { Controls } from '@xyflow/react';
|
|
14
15
|
import { CSSProperties } from 'react';
|
|
@@ -28,17 +29,20 @@ import { EdgeId as EdgeId_2 } from '@likec4/core';
|
|
|
28
29
|
import { EdgeProps } from '@xyflow/react';
|
|
29
30
|
import { EffectCallback } from 'react';
|
|
30
31
|
import { ElementKind } from '@likec4/core/types';
|
|
32
|
+
import { ElementProps } from '@mantine/core';
|
|
31
33
|
import { ElementShape as ElementShape_2 } from '@likec4/core/types';
|
|
32
34
|
import { ElementStyle } from '@likec4/core/types';
|
|
33
35
|
import { Except } from 'type-fest';
|
|
34
36
|
import { ExclusiveUnion } from '@likec4/core/types';
|
|
35
37
|
import { ExclusiveUnion as ExclusiveUnion_2 } from '@likec4/core';
|
|
36
38
|
import { FC } from 'react';
|
|
39
|
+
import { ForwardRefComponent } from 'motion/react';
|
|
37
40
|
import { ForwardRefExoticComponent } from 'react';
|
|
38
41
|
import { Fqn } from '@likec4/core/types';
|
|
39
42
|
import { Fqn as Fqn_3 } from '@likec4/core';
|
|
40
43
|
import { FunctionComponent } from 'react';
|
|
41
44
|
import { HTMLAttributes } from 'react';
|
|
45
|
+
import { HTMLMotionProps } from 'motion/react';
|
|
42
46
|
import { IconUrl } from '@likec4/core/types';
|
|
43
47
|
import { JSX } from 'react/jsx-runtime';
|
|
44
48
|
import { JsxStyleProps } from '@likec4/styles/types';
|
|
@@ -58,6 +62,7 @@ import { MiniMapNodeProps } from '@xyflow/react';
|
|
|
58
62
|
import { MotionNodeLayoutOptions } from 'motion/react';
|
|
59
63
|
import { MotionStyle } from 'motion/react';
|
|
60
64
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
65
|
+
import { NavigationPanelRecipe } from '@likec4/styles/recipes';
|
|
61
66
|
import { Node as Node_2 } from '@xyflow/react';
|
|
62
67
|
import { NodeChange } from '@xyflow/system';
|
|
63
68
|
import { NodeChange as NodeChange_2 } from '@xyflow/react';
|
|
@@ -93,8 +98,11 @@ import { SetRequired } from 'type-fest';
|
|
|
93
98
|
import { Simplify } from 'type-fest';
|
|
94
99
|
import { SimplifyDeep } from 'type-fest';
|
|
95
100
|
import { StepEdgeId } from '@likec4/core/types';
|
|
101
|
+
import { StyleContextConsumer } from '@likec4/styles/jsx';
|
|
102
|
+
import { StyleContextProvider } from '@likec4/styles/jsx';
|
|
96
103
|
import type * as t from '@likec4/core/types';
|
|
97
104
|
import { UnknownLayouted as UnknownLayouted_2 } from '@likec4/core/types';
|
|
105
|
+
import { UnstyledButtonProps } from '@mantine/core';
|
|
98
106
|
import { ViewChange } from '@likec4/core/types';
|
|
99
107
|
import { ViewId } from '@likec4/core/types';
|
|
100
108
|
import { ViewId as ViewId_3 } from '@likec4/core';
|
|
@@ -2962,6 +2970,14 @@ declare interface NavigationHistoryEntry_2 {
|
|
|
2962
2970
|
activeWalkthrough?: null | StepEdgeId;
|
|
2963
2971
|
}
|
|
2964
2972
|
|
|
2973
|
+
export declare const NavigationPanel: {
|
|
2974
|
+
Root: StyleContextProvider<ForwardRefComponent<"div", HTMLMotionProps<"div">>, NavigationPanelRecipe>;
|
|
2975
|
+
Body: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
|
|
2976
|
+
Logo: StyleContextConsumer<ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & RefAttributes<HTMLButtonElement>>>;
|
|
2977
|
+
Label: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
|
|
2978
|
+
Dropdown: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
|
|
2979
|
+
};
|
|
2980
|
+
|
|
2965
2981
|
declare type NodeId_2 = t.aux.NodeId;
|
|
2966
2982
|
|
|
2967
2983
|
export declare type NodeRenderers = Partial<CamelCasedProperties<Types.NodeRenderers>>;
|
|
@@ -3011,6 +3027,12 @@ declare type NoRequiredParams<T extends ParameterizedObject> = T extends any ? u
|
|
|
3011
3027
|
|
|
3012
3028
|
declare type NormalizeDescriptor<TDescriptor extends string> = TDescriptor extends '*' ? string : TDescriptor extends `${infer TLeading}.*` ? `${TLeading}.${string}` : TDescriptor;
|
|
3013
3029
|
|
|
3030
|
+
/**
|
|
3031
|
+
* Normalize a raw search string for comparison.
|
|
3032
|
+
* Extracted as a pure function so both XState and standalone adapters can reuse it.
|
|
3033
|
+
*/
|
|
3034
|
+
export declare function normalizeSearch(value: string): string;
|
|
3035
|
+
|
|
3014
3036
|
declare type Observer<T> = {
|
|
3015
3037
|
next?: (value: T) => void;
|
|
3016
3038
|
error?: (err: unknown) => void;
|
|
@@ -3505,7 +3527,7 @@ declare type SearchActorEvent = {
|
|
|
3505
3527
|
type: 'pickview.close';
|
|
3506
3528
|
};
|
|
3507
3529
|
|
|
3508
|
-
declare interface SearchActorLogic extends StateMachine<
|
|
3530
|
+
declare interface SearchActorLogic extends StateMachine<SearchContext_2, SearchActorEvent, {}, any, any, any, any, 'inactive' | 'opened' | 'pickView' | 'waitAnimationEnd', never, never, any, any, any, any> {
|
|
3509
3531
|
}
|
|
3510
3532
|
|
|
3511
3533
|
declare interface SearchActorRef extends ActorRef<SearchActorSnapshot, SearchActorEvent> {
|
|
@@ -3513,7 +3535,11 @@ declare interface SearchActorRef extends ActorRef<SearchActorSnapshot, SearchAct
|
|
|
3513
3535
|
|
|
3514
3536
|
declare type SearchActorSnapshot = SnapshotFrom<SearchActorLogic>;
|
|
3515
3537
|
|
|
3516
|
-
declare
|
|
3538
|
+
export declare const searchBodyCss: string;
|
|
3539
|
+
|
|
3540
|
+
export declare const SearchContext: Context_4<SearchContextValue | null>;
|
|
3541
|
+
|
|
3542
|
+
declare interface SearchContext_2 {
|
|
3517
3543
|
openedWithSearch: string | null;
|
|
3518
3544
|
searchValue: string;
|
|
3519
3545
|
pickViewFor: Fqn | null;
|
|
@@ -3523,6 +3549,32 @@ declare interface SearchContext {
|
|
|
3523
3549
|
} | null;
|
|
3524
3550
|
}
|
|
3525
3551
|
|
|
3552
|
+
export declare interface SearchContextValue {
|
|
3553
|
+
searchValue: string;
|
|
3554
|
+
setSearchValue: (value: string) => void;
|
|
3555
|
+
normalizedSearch: string;
|
|
3556
|
+
navigateTo: (viewId: ViewId, focusOnElement?: Fqn) => void;
|
|
3557
|
+
openPickView: (elementFqn: Fqn) => void;
|
|
3558
|
+
closePickView: () => void;
|
|
3559
|
+
pickViewFor: Fqn | null;
|
|
3560
|
+
close: () => void;
|
|
3561
|
+
currentViewId: string | null;
|
|
3562
|
+
openedWithSearch: string | null;
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
export declare function SearchControl({ className, ...others }: SearchControlProps): JSX.Element;
|
|
3566
|
+
|
|
3567
|
+
declare interface SearchControlProps extends UnstyledButtonProps, ElementProps<'button'> {
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3570
|
+
export declare const searchDialogCss: string;
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* The shared search panel content used by both diagram and overview search.
|
|
3574
|
+
* Must be rendered inside a SearchContext.Provider.
|
|
3575
|
+
*/
|
|
3576
|
+
export declare const SearchPanelContent: MemoExoticComponent<() => JSX.Element>;
|
|
3577
|
+
|
|
3526
3578
|
export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): JSX.Element;
|
|
3527
3579
|
|
|
3528
3580
|
export declare function sequenceActorNode<A extends Any_5 = Unknown_3>(component: FC<SequenceActorNodeProps<A>>): Types.NodeRenderer<'seq-actor'>;
|
|
@@ -4364,6 +4416,8 @@ export declare function useOptionalCurrentViewModel(): CurrentViewModel | null;
|
|
|
4364
4416
|
*/
|
|
4365
4417
|
export declare function useOptionalLikeC4Model<A extends t.aux.Any = UnknownLayouted>(): LikeC4Model<A> | null;
|
|
4366
4418
|
|
|
4419
|
+
export declare function useSearchContext(): SearchContextValue;
|
|
4420
|
+
|
|
4367
4421
|
/**
|
|
4368
4422
|
* Differs from useState in that:
|
|
4369
4423
|
* - it uses custom equal function (shallowEqual by default) to determine whether the state has changed.
|