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.
@@ -1,4 +0,0 @@
1
- export declare const modalContent: string;
2
- export declare const modalBody: string;
3
- export declare const cssDiagram: string;
4
- export declare const closeButton: string;
@@ -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;
@@ -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 {};
@@ -1,4 +0,0 @@
1
- export declare const shadowRoot: string;
2
- export declare const cssLikeC4View: string;
3
- export declare const cssInteractive: string;
4
- export declare const cssLikeC4Browser: string;
package/react/styles.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const ShadowRootCssSelector: string;
2
- export declare function useCreateStyleSheet(injectFontCss: boolean): () => CSSStyleSheet;
3
- export type ColorScheme = 'light' | 'dark';
4
- export declare function useColorScheme(explicit?: ColorScheme): ColorScheme;
@@ -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
- };