npm likec4 1.11.0
v1.11.0

latest releases: 1.39.5, 1.39.4, 1.39.3...
11 months ago

🚀 Features

  • Relationship details

    On hover displays direct relationships and resolved from nested. If relationship has navigateTo - displays navigation link

    SCR-20240924-uhpz

    To disable - set showRelationshipDetails={false} in react component

  • Improved layout editing

    Thanks to @pavelpykhtin, now it is possible add control points with right click, or reset all control points
    Example here #1013

  • New API LikeC4Model.Layouted

    Difference between LikeC4Model.Computed and LikeC4Model.Layouted - is that second one also includes layout data (dimensions, positions), that is needed for rendering

    import { LikeC4 } from 'likec4'
    
    const likec4 = await LikeC4.fromWorkspace()
    
    // Sync and fast
    const model = likec4.computedModel()
    model
      .element('cloud.backend.api')
      .incoming() // relationships incoming to the element
      .filter(r => r.tags.includes('http')) // filter by tags
      .map(r => r.source) // get source elements
    
    // Async, includes layout data (dimensions, positions...)
    const diagram = await likec4.layoutedModel().view('index')

    Generated React component also exports instance of LikeC4Model.Layouted, and hooks to use inside your app.

Don't miss a new likec4 release

NewReleases is sending notifications on new releases.