import { Component, DestroyRef, inject, signal } from '@angular/core' import { Markdown } from '@comark/angular' import { Math } from '@comark/plugin-katex/angular' import { store, type StreamState } from '../shared/store' @Component({ selector: 'angular-column', imports: [Markdown], template: ` `, }) export class AngularColumn { readonly state = signal(store.getState()) readonly components = { math: Math } constructor() { const unsubscribe = store.subscribe((next) => this.state.set(next)) inject(DestroyRef).onDestroy(unsubscribe) } }