likec4 1.9.0 → 1.10.1
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/__app__/react/likec4.tsx +64 -12
- package/dist/__app__/src/chunks/{-index-overview-BAmvrzHU.js → -index-overview-CR08x_EG.js} +6 -6
- package/dist/__app__/src/chunks/{likec4-BqIZe8Y0.js → likec4-BFZn233G.js} +165 -117
- package/dist/__app__/src/chunks/{main-BZtdykGF.js → main-D12NE066.js} +3176 -2946
- package/dist/__app__/src/chunks/{mantine-Bhi3pgTf.js → mantine-BnwtT_Nz.js} +54 -53
- package/dist/__app__/src/chunks/{tanstack-router-Bc_WYOzY.js → tanstack-router-DKnF_3kP.js} +1 -1
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +3251 -3003
- package/dist/cli/index.mjs +115 -74
- package/dist/index.d.mts +856 -705
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.DKLo7EEm.mjs +1221 -0
- package/package.json +23 -20
- package/react/index.d.ts +1065 -9
- package/react/index.mjs +3534 -3190
- package/react/style.css +1 -0
- package/dist/shared/likec4.D4BZc04H.mjs +0 -1219
- package/react/LikeC4Browser.css.d.ts +0 -4
- package/react/LikeC4Browser.d.ts +0 -31
- package/react/LikeC4ViewElement.d.ts +0 -56
- package/react/ShadowRoot.d.ts +0 -6
- package/react/ShadowRootMantineProvider.d.ts +0 -7
- package/react/styles.css.d.ts +0 -4
- package/react/styles.d.ts +0 -4
- package/react/types-filter.d.ts +0 -33
- package/react/types.d.ts +0 -76
package/react/LikeC4Browser.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { DiagramView, ElementIconRenderer } from './types';
|
|
2
|
-
import type { WhereOperator } from './types-filter';
|
|
3
|
-
export type LikeC4BrowserProps<ViewId extends string, Tag extends string, Kind extends string> = {
|
|
4
|
-
view: DiagramView<ViewId>;
|
|
5
|
-
/**
|
|
6
|
-
* By default determined by the user's system preferences.
|
|
7
|
-
*/
|
|
8
|
-
colorScheme?: 'light' | 'dark';
|
|
9
|
-
/**
|
|
10
|
-
* LikeC4 views are using 'IBM Plex Sans' font.
|
|
11
|
-
* By default, component injects the CSS to document head.
|
|
12
|
-
* Set to false if you want to handle the font yourself.
|
|
13
|
-
*
|
|
14
|
-
* @default true
|
|
15
|
-
*/
|
|
16
|
-
injectFontCss?: boolean | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Background pattern
|
|
19
|
-
* @default 'dots'
|
|
20
|
-
*/
|
|
21
|
-
background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
|
|
22
|
-
onNavigateTo: (to: ViewId) => void;
|
|
23
|
-
onClose: () => void;
|
|
24
|
-
/**
|
|
25
|
-
* Render custom icon for a node
|
|
26
|
-
* By default, if icon is http:// or https://, it will be rendered as an image
|
|
27
|
-
*/
|
|
28
|
-
renderIcon?: ElementIconRenderer | undefined;
|
|
29
|
-
where?: WhereOperator<Tag, Kind> | undefined;
|
|
30
|
-
};
|
|
31
|
-
export declare function LikeC4Browser<ViewId extends string, Tag extends string, Kind extends string>({ colorScheme, view, injectFontCss, onNavigateTo, onClose, renderIcon, where, background }: LikeC4BrowserProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { DiagramView, ElementIconRenderer } from './types';
|
|
3
|
-
import type { WhereOperator } from './types-filter';
|
|
4
|
-
export type LikeC4ViewElementProps<ViewId extends string, Tag extends string, Kind extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
5
|
-
view: DiagramView<ViewId>;
|
|
6
|
-
/**
|
|
7
|
-
* By default determined by the user's system preferences.
|
|
8
|
-
*/
|
|
9
|
-
colorScheme?: 'light' | 'dark';
|
|
10
|
-
/**
|
|
11
|
-
* LikeC4 views are using 'IBM Plex Sans' font.
|
|
12
|
-
* By default, component injects the CSS to document head.
|
|
13
|
-
* Set to false if you want to handle the font yourself.
|
|
14
|
-
*
|
|
15
|
-
* @default true
|
|
16
|
-
*/
|
|
17
|
-
injectFontCss?: boolean | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Background pattern
|
|
20
|
-
* @default 'transparent'
|
|
21
|
-
*/
|
|
22
|
-
background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
|
|
23
|
-
onNavigateTo?: ((to: ViewId) => void) | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Render custom icon for a node
|
|
26
|
-
* By default, if icon is http:// or https://, it will be rendered as an image
|
|
27
|
-
*/
|
|
28
|
-
renderIcon?: ElementIconRenderer | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Display hovercards with element links
|
|
31
|
-
* @default true
|
|
32
|
-
*/
|
|
33
|
-
showElementLinks?: boolean | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Display panel with diagram title / description
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
showDiagramTitle?: boolean | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Show back/forward navigation buttons
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
showNavigationButtons?: undefined | boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Display notations of the view
|
|
46
|
-
* @default false
|
|
47
|
-
*/
|
|
48
|
-
showNotations?: boolean | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
|
|
51
|
-
* @default false
|
|
52
|
-
*/
|
|
53
|
-
enableFocusMode?: boolean | undefined;
|
|
54
|
-
where?: WhereOperator<Tag, Kind> | undefined;
|
|
55
|
-
};
|
|
56
|
-
export declare function LikeC4ViewElement<ViewId extends string, Tag extends string, Kind extends string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, renderIcon, showDiagramTitle, showElementLinks, showNavigationButtons, enableFocusMode, showNotations, where, ...props }: LikeC4ViewElementProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
package/react/ShadowRoot.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
2
|
-
type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
injectFontCss?: boolean | undefined;
|
|
4
|
-
};
|
|
5
|
-
export declare function ShadowRoot({ children, injectFontCss, ...props }: ShadowRootProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PropsWithChildren } from 'react';
|
|
2
|
-
type ShadowRootMantineProps = PropsWithChildren<{
|
|
3
|
-
className?: string | undefined;
|
|
4
|
-
colorScheme?: 'light' | 'dark' | undefined;
|
|
5
|
-
}>;
|
|
6
|
-
export declare function ShadowRootMantineProvider({ children, className, colorScheme }: ShadowRootMantineProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
package/react/styles.css.d.ts
DELETED
package/react/styles.d.ts
DELETED
package/react/types-filter.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
type NonEmptyArray<T> = [T, ...T[]];
|
|
2
|
-
type EqualOperator<V> = {
|
|
3
|
-
eq: V;
|
|
4
|
-
neq?: never;
|
|
5
|
-
} | {
|
|
6
|
-
eq?: never;
|
|
7
|
-
neq: V;
|
|
8
|
-
};
|
|
9
|
-
type AllNever = {
|
|
10
|
-
not?: never;
|
|
11
|
-
and?: never;
|
|
12
|
-
or?: never;
|
|
13
|
-
tag?: never;
|
|
14
|
-
kind?: never;
|
|
15
|
-
};
|
|
16
|
-
type TagKindOperator<Tag, Kind> = Omit<AllNever, 'tag' | 'kind'> & ({
|
|
17
|
-
tag: EqualOperator<Tag>;
|
|
18
|
-
kind?: never;
|
|
19
|
-
} | {
|
|
20
|
-
tag?: never;
|
|
21
|
-
kind: EqualOperator<Kind>;
|
|
22
|
-
});
|
|
23
|
-
type NotOperator<Tag, Kind> = Omit<AllNever, 'not'> & {
|
|
24
|
-
not: TagKindOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
|
|
25
|
-
};
|
|
26
|
-
type AndOperator<Tag, Kind> = Omit<AllNever, 'and'> & {
|
|
27
|
-
and: NonEmptyArray<TagKindOperator<Tag, Kind> | OrOperator<Tag, Kind> | NotOperator<Tag, Kind>>;
|
|
28
|
-
};
|
|
29
|
-
type OrOperator<Tag, Kind> = Omit<AllNever, 'or'> & {
|
|
30
|
-
or: NonEmptyArray<TagKindOperator<Tag, Kind> | AndOperator<Tag, Kind> | NotOperator<Tag, Kind>>;
|
|
31
|
-
};
|
|
32
|
-
export type WhereOperator<Tag extends string, Kind extends string> = TagKindOperator<Tag, Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
|
|
33
|
-
export {};
|
package/react/types.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { DiagramView as OriginalDiagramView } from 'likec4';
|
|
2
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import type { WhereOperator } from './types-filter';
|
|
4
|
-
export type DiagramView<ViewId extends string> = Omit<OriginalDiagramView, 'id'> & {
|
|
5
|
-
id: ViewId;
|
|
6
|
-
};
|
|
7
|
-
export type ElementIconRendererProps = {
|
|
8
|
-
node: {
|
|
9
|
-
id: string;
|
|
10
|
-
title: string;
|
|
11
|
-
icon?: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type ElementIconRenderer = (props: ElementIconRendererProps) => ReactNode;
|
|
15
|
-
export type LikeC4ViewBaseProps<ViewId extends string, Tag extends string, Kind extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
16
|
-
/**
|
|
17
|
-
* View to display.
|
|
18
|
-
*/
|
|
19
|
-
viewId: ViewId;
|
|
20
|
-
/**
|
|
21
|
-
* Background pattern
|
|
22
|
-
* @default 'transparent'
|
|
23
|
-
*/
|
|
24
|
-
background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Background pattern for the browser view.
|
|
27
|
-
* @default 'dots'
|
|
28
|
-
*/
|
|
29
|
-
browserBackground?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Click on the view opens a modal with browser.
|
|
32
|
-
*
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
interactive?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* By default determined by the user's system preferences.
|
|
38
|
-
*/
|
|
39
|
-
colorScheme?: 'light' | 'dark' | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* LikeC4 views are using 'IBM Plex Sans' font.
|
|
42
|
-
* By default, component injects the CSS to document head.
|
|
43
|
-
* Set to false if you want to handle the font yourself.
|
|
44
|
-
*
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
injectFontCss?: boolean | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Display hovercards with element links
|
|
50
|
-
* @default true
|
|
51
|
-
*/
|
|
52
|
-
showElementLinks?: boolean | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Display panel with diagram title / description
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
showDiagramTitle?: boolean | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Show back/forward navigation buttons
|
|
60
|
-
* @default false
|
|
61
|
-
*/
|
|
62
|
-
showNavigationButtons?: undefined | boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Display notations of the view
|
|
65
|
-
* @default false
|
|
66
|
-
*/
|
|
67
|
-
showNotations?: boolean | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
|
|
70
|
-
* Conflicts with `interactive`
|
|
71
|
-
*
|
|
72
|
-
* @default false
|
|
73
|
-
*/
|
|
74
|
-
enableFocusMode?: boolean | undefined;
|
|
75
|
-
where?: WhereOperator<Tag, Kind> | undefined;
|
|
76
|
-
};
|