likec4 1.31.0 → 1.32.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/README.md +2 -1
- package/__app__/react/likec4.tsx +2 -2
- package/__app__/src/const.js +2 -1
- package/__app__/src/main.js +2496 -1851
- package/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +747 -735
- package/dist/index.d.mts +6 -5
- package/dist/index.mjs +2 -2
- package/dist/model/index.d.mts +6 -4
- package/dist/model/index.mjs +2 -2
- package/dist/shared/{likec4.BaUvDeNQ.d.mts → likec4.8nZi1RFs.d.mts} +72 -48
- package/dist/shared/likec4.BdLFzcl1.mjs +239 -0
- package/dist/shared/likec4.CouFKCvO.mjs +2380 -0
- package/dist/vite-plugin/index.d.mts +2 -1
- package/dist/vite-plugin/index.mjs +2 -2
- package/package.json +28 -28
- package/react/index.d.mts +379 -912
- package/react/index.mjs +89 -80
- package/vite-plugin-modules.d.ts +47 -34
- package/dist/shared/likec4.CJIOuLMn.mjs +0 -2479
- package/dist/shared/likec4.Dj4xsbiA.mjs +0 -227
package/vite-plugin-modules.d.ts
CHANGED
|
@@ -19,31 +19,32 @@ declare module 'likec4:icons' {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
declare module 'likec4:model' {
|
|
22
|
-
import type { DiagramView, LayoutedLikeC4ModelData, LikeC4Model } from 'likec4/model'
|
|
22
|
+
import type { DiagramView, LayoutedLikeC4ModelData, LikeC4Model, UnknownLayouted } from 'likec4/model'
|
|
23
23
|
import type { nano } from 'likec4/react'
|
|
24
24
|
|
|
25
|
-
export type Atom<T> = nano.
|
|
25
|
+
export type Atom<T> = nano.ReadableAtom<T>
|
|
26
26
|
|
|
27
|
-
export type { DiagramView, LayoutedLikeC4ModelData, LikeC4Model }
|
|
27
|
+
export type { DiagramView, LayoutedLikeC4ModelData, LikeC4Model, UnknownLayouted }
|
|
28
28
|
|
|
29
29
|
export function loadModel(projectId: string): Promise<{
|
|
30
|
-
$likec4data: Atom<LayoutedLikeC4ModelData
|
|
31
|
-
$likec4model: Atom<LikeC4Model
|
|
32
|
-
useLikeC4Model: () => LikeC4Model
|
|
33
|
-
useLikeC4Views: () => ReadonlyArray<DiagramView
|
|
34
|
-
useLikeC4View: (viewId: string) => DiagramView | null
|
|
30
|
+
$likec4data: Atom<LayoutedLikeC4ModelData<UnknownLayouted>>
|
|
31
|
+
$likec4model: Atom<LikeC4Model<UnknownLayouted>>
|
|
32
|
+
useLikeC4Model: () => LikeC4Model<UnknownLayouted>
|
|
33
|
+
useLikeC4Views: () => ReadonlyArray<DiagramView<UnknownLayouted>>
|
|
34
|
+
useLikeC4View: (viewId: string) => DiagramView<UnknownLayouted> | null
|
|
35
35
|
}>
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
declare module 'likec4:single-project' {
|
|
39
|
+
import type { DiagramView, LayoutedLikeC4ModelData, LikeC4Model, UnknownLayouted } from 'likec4/model'
|
|
39
40
|
import type { ElementIconRenderer } from 'likec4:icons'
|
|
40
|
-
import type { Atom
|
|
41
|
+
import type { Atom } from 'likec4:model'
|
|
41
42
|
|
|
42
|
-
export const $likec4data: Atom<LayoutedLikeC4ModelData
|
|
43
|
-
export const $likec4model: Atom<LikeC4Model
|
|
44
|
-
export function useLikeC4Model(): LikeC4Model
|
|
45
|
-
export function useLikeC4Views(): ReadonlyArray<DiagramView
|
|
46
|
-
export function useLikeC4View(viewId: string): DiagramView | null
|
|
43
|
+
export const $likec4data: Atom<LayoutedLikeC4ModelData<UnknownLayouted>>
|
|
44
|
+
export const $likec4model: Atom<LikeC4Model<UnknownLayouted>>
|
|
45
|
+
export function useLikeC4Model(): LikeC4Model<UnknownLayouted>
|
|
46
|
+
export function useLikeC4Views(): ReadonlyArray<DiagramView<UnknownLayouted>>
|
|
47
|
+
export function useLikeC4View(viewId: string): DiagramView<UnknownLayouted> | null
|
|
47
48
|
|
|
48
49
|
export const IconRenderer: ElementIconRenderer
|
|
49
50
|
|
|
@@ -51,23 +52,23 @@ declare module 'likec4:single-project' {
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
declare module 'likec4:react' {
|
|
54
|
-
import type {
|
|
55
|
+
import type { aux, DiagramView, LikeC4Model, UnknownLayouted } from 'likec4/model'
|
|
55
56
|
import type { LikeC4ViewProps, ReactLikeC4Props } from 'likec4/react'
|
|
56
57
|
import type { JSX, PropsWithChildren } from 'react'
|
|
57
58
|
|
|
58
59
|
// This will be used later for augmenting the types
|
|
59
|
-
interface Types extends
|
|
60
|
+
interface Types extends UnknownLayouted {
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
export type LikeC4ViewId = Types
|
|
63
|
+
export type LikeC4ViewId = aux.ViewId<Types>
|
|
63
64
|
|
|
64
65
|
export function useLikeC4Model(): LikeC4Model<Types>
|
|
65
|
-
export function useLikeC4Views(): ReadonlyArray<DiagramView<
|
|
66
|
-
export function useLikeC4View(viewId: LikeC4ViewId): DiagramView | null
|
|
66
|
+
export function useLikeC4Views(): ReadonlyArray<DiagramView<Types>>
|
|
67
|
+
export function useLikeC4View(viewId: LikeC4ViewId): DiagramView<Types> | null
|
|
67
68
|
|
|
68
69
|
export function LikeC4ModelProvider(props: PropsWithChildren): JSX.Element
|
|
69
|
-
export function LikeC4View({ viewId, ...props }: LikeC4ViewProps<
|
|
70
|
-
export function ReactLikeC4({ viewId, ...props }: ReactLikeC4Props<
|
|
70
|
+
export function LikeC4View({ viewId, ...props }: LikeC4ViewProps<Types>): JSX.Element
|
|
71
|
+
export function ReactLikeC4({ viewId, ...props }: ReactLikeC4Props<Types>): JSX.Element
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
declare module 'likec4:dot' {
|
|
@@ -86,17 +87,29 @@ declare module 'likec4:mmd' {
|
|
|
86
87
|
mmdSource(viewId: string): string
|
|
87
88
|
}>
|
|
88
89
|
}
|
|
90
|
+
declare module 'likec4:puml' {
|
|
91
|
+
export function loadPumlSources(projectId: string): Promise<{
|
|
92
|
+
pumlSource(viewId: string): string
|
|
93
|
+
}>
|
|
94
|
+
}
|
|
89
95
|
|
|
90
96
|
// Per project
|
|
91
97
|
|
|
92
98
|
declare module 'likec4:model/*' {
|
|
93
|
-
import type {
|
|
99
|
+
import type { aux, DiagramView, LayoutedLikeC4ModelData, LikeC4Model, UnknownLayouted } from 'likec4/model'
|
|
100
|
+
import type { Atom } from 'likec4:model'
|
|
94
101
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
export
|
|
102
|
+
// This will be used later for augmenting the types
|
|
103
|
+
interface Types extends UnknownLayouted {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type LikeC4ViewId = aux.ViewId<Types>
|
|
107
|
+
|
|
108
|
+
export const $likec4data: Atom<LayoutedLikeC4ModelData<Types>>
|
|
109
|
+
export const $likec4model: Atom<LikeC4Model<Types>>
|
|
110
|
+
export function useLikeC4Model(): LikeC4Model<Types>
|
|
111
|
+
export function useLikeC4Views(): ReadonlyArray<DiagramView<Types>>
|
|
112
|
+
export function useLikeC4View(viewId: LikeC4ViewId): DiagramView<Types> | null
|
|
100
113
|
}
|
|
101
114
|
|
|
102
115
|
declare module 'likec4:icons/*' {
|
|
@@ -112,21 +125,21 @@ declare module 'likec4:icons/*' {
|
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
declare module 'likec4:react/*' {
|
|
115
|
-
import type {
|
|
128
|
+
import type { aux, DiagramView, LikeC4Model, UnknownLayouted } from 'likec4/model'
|
|
116
129
|
import type { LikeC4ViewProps, ReactLikeC4Props } from 'likec4/react'
|
|
117
130
|
import type { JSX, PropsWithChildren } from 'react'
|
|
118
131
|
|
|
119
132
|
// This will be used later for augmenting the types
|
|
120
|
-
interface Types extends
|
|
133
|
+
interface Types extends UnknownLayouted {
|
|
121
134
|
}
|
|
122
135
|
|
|
123
|
-
export type LikeC4ViewId = Types
|
|
136
|
+
export type LikeC4ViewId = aux.ViewId<Types>
|
|
124
137
|
|
|
125
138
|
export function useLikeC4Model(): LikeC4Model<Types>
|
|
126
|
-
export function useLikeC4Views(): ReadonlyArray<DiagramView<
|
|
127
|
-
export function useLikeC4View(viewId: LikeC4ViewId): DiagramView | null
|
|
139
|
+
export function useLikeC4Views(): ReadonlyArray<DiagramView<Types>>
|
|
140
|
+
export function useLikeC4View(viewId: LikeC4ViewId): DiagramView<Types> | null
|
|
128
141
|
|
|
129
142
|
export function LikeC4ModelProvider(props: PropsWithChildren): JSX.Element
|
|
130
|
-
export function LikeC4View({ viewId, ...props }: LikeC4ViewProps<
|
|
131
|
-
export function ReactLikeC4({ viewId, ...props }: ReactLikeC4Props<
|
|
143
|
+
export function LikeC4View({ viewId, ...props }: LikeC4ViewProps<Types>): JSX.Element
|
|
144
|
+
export function ReactLikeC4({ viewId, ...props }: ReactLikeC4Props<Types>): JSX.Element
|
|
132
145
|
}
|