Release v0.2
What's New
Content Security Policy (CSP) Support
- New
dontInjectStylesoption added to bothCssLabelconstructor andLabelRendereroptions - 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
fontSizeandpaddingfor individual labels - Faster rendering: Optimized text measurements and reduced redundant calculations
- Better label management: Improved performance for frequent updates