Exporting Observable Framework app not just module

Hello,

A question, I’ve been working to convert some fairly involved notebooks to Observable Framework.

I have up till now focused on converting to JS modules which export and then facilitate rendering the visualisations I have built in my application. However, this seems difficult to do with this particular notebook, because the cell viewof mainChart emits a value which is then picked up by another cell externallyAppliedInteractions to generate dynamic styles.

Notebook: MIS-2 - Factbase - single-series line chart / Displayr Engineering | Observable

So 2 questions:

  1. If I wanted to keep to exporting this as a JS module through Observable Framework is there a way I could combine those 2 cells into one?
  2. If not, is there a way I could export my app (which would have multiple cells running reactively) rather than JS module code? Not sure how that might work as it works off an md file and my application is written in TS/JS

Many thanks!