likec4 1.7.1 → 1.7.3
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__/index.html +1 -0
- package/dist/__app__/react/likec4.tsx +13 -4
- package/dist/__app__/src/chunks/{index-CsouX5P7.js → index-CIsxIzOH.js} +17 -4
- package/dist/__app__/src/chunks/{likec4-5Tyb70uB.js → likec4-DA506XqP.js} +13 -10
- package/dist/__app__/src/chunks/{mantine-l9Camp3k.js → mantine-B6zTvdIg.js} +570 -425
- package/dist/__app__/src/chunks/{tanstack-router-BgNzIYOs.js → tanstack-router-C3bHLsEH.js} +71 -25
- package/dist/__app__/src/main.js +2977 -2442
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/tsconfig.tsbuildinfo +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +15097 -14519
- package/dist/cli/index.mjs +239 -348
- package/package.json +18 -18
- package/react/LikeC4Browser.d.ts +4 -2
- package/react/LikeC4ViewElement.d.ts +4 -2
- package/react/index.d.ts +1 -0
- package/react/index.mjs +14147 -13599
- package/react/types-filter.d.ts +33 -0
- package/react/types.d.ts +3 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type NonEmptyArray<T> = [T, ...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
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { WhereOperator } from './types-filter';
|
|
2
3
|
export type DiagramView<ViewId extends string> = {
|
|
3
4
|
id: ViewId;
|
|
4
5
|
bounds: {
|
|
@@ -14,7 +15,7 @@ export type ElementIconRendererProps = {
|
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
export type ElementIconRenderer = (props: ElementIconRendererProps) => ReactNode;
|
|
17
|
-
export type LikeC4ViewBaseProps<ViewId extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
18
|
+
export type LikeC4ViewBaseProps<ViewId extends string, Tag extends string, Kind extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
18
19
|
/**
|
|
19
20
|
* View to display.
|
|
20
21
|
*/
|
|
@@ -47,4 +48,5 @@ export type LikeC4ViewBaseProps<ViewId extends string> = Omit<HTMLAttributes<HTM
|
|
|
47
48
|
* @default true
|
|
48
49
|
*/
|
|
49
50
|
injectFontCss?: boolean | undefined;
|
|
51
|
+
where?: WhereOperator<Tag, Kind> | undefined;
|
|
50
52
|
};
|