0.33.0 (2023-08-12)
Breaking changes
We do not change major version yet, as the project is in active development.
This release includes breaking changes in @likec4/diagrams
:
- diagrams: DiagramsBrowser
You've already seen this component working on the project website, but it was not back-ported to the npm-module - diagrams: LikeC4 factory
Creates components, "bound" to your model, with type checks. It ensures that only existing views can be rendered.
With codegen
command, CLI generates structured data, like:
export const LikeC4Views = {
indexLR: {
title: 'Landscape View'
nodes: [/* ... */],
edges: [/* ... */],
},
cloud: {
title: 'Overview of Cloud'
nodes: [/* ... */],
edges: [/* ... */],
},
}
This data is used to draw views with @likec4/diagrams
react component.
import { LikeC4 } from '@likec4/diagrams'
import { LikeC4Views } from './generated-code'
// Creates components, bound to the data (with type checks).
// It ensures that only existing views can be rendered.
const { Diagram, Responsive, Embedded, Browser } = LikeC4.create(LikeC4Views)
export const IndexView = () => <Embedded viewId={'indexLR'} />
Documentaion (in progress)
Features
- core: add color to DiagramLabel (47b7579)
- core: add in/out edges to ComputedNode (0ddb07c)
- core: available in ESM/CJS
- diagrams: available in ESM/CJS
Bug Fixes
- generators: can't infer result type from export
./compute-view
(#267) (1945a97) - layouts: disable graphviz.unflatten, requires research (5379926)
- deps: pin esbuild to 0.17 (3d6125d)
- deps: update dependency @hpcc-js/wasm to ^2.13.1 (#254) (3069dab)
- deps: update dependency jotai to ^2.2.3 (#255) (3179777)
- deps: update linters to ^6.3.0 (717770f)