Skip to content

Release v0.2

Choose a tag to compare

@Stukova Stukova released this 12 Aug 09:59
· 46 commits to main since this release
352aabb

What's New

Content Security Policy (CSP) Support

  • New dontInjectStyles option added to both CssLabel constructor and LabelRenderer options
  • Allows users to disable automatic CSS injection for CSP compliance
  • The CSS can be imported directly via @interacta/css-labels/styles.css
  • Use this option when your app has strict CSP rules that prevent dynamic style injection

Usage:

// Import CSS manually in your app
import '@interacta/css-labels/styles.css'

// Then disable auto-injection
const renderer = new LabelRenderer(canvas, { dontInjectStyles: true })

Individual Label Styling And Performance Improvements

  • Per-label customization: Set fontSize and padding for individual labels
  • Faster rendering: Optimized text measurements and reduced redundant calculations
  • Better label management: Improved performance for frequent updates