Observable Runtime, Inspector and tachyons's atomic powers.

Ok, so I can see in the Inspector’s code where cell classes are set or touched.

File name classe suffixed to 'observablehq' touched
expanded.js '–field', '–key', '–symbol', '–index', '–caret', '–expanded'
inspect.js '–inspect', '–${type}',
formatString '–string', '–expanded', '–string-expand'
index.js '–inspect', '–error', –running, '',
insepctFunction.js '–keyword', '–function'
collapsed.js '–empty', '–key', '–symbol', '–caret', '–collapsed', '–shallow'
inspectName.js '–cellname'

…But is that where I should also add my tachyons classes. If so, It means I should write my own inspector, as also suggested by Jeremy

Is that correct ?

Edit: A few minutes later
Looks like I should go further into Inspector.into(container)'s documentation.

Edit: After reading the Observable Runtime documentation
I’m starting to understand that an Observable notebook is like a spreadsheet interface where you can put JavaScript, or MarkDown in the cells. While the Observable Runtime is like a set of JavaScript macros to generate programmatically the spreadsheet. Hence, it’s what is used to reproduce the Observable notebook in an Observable module.
Please correct me, if I’m incorrect !

If not, I’m starting to wonder how close is Observable to React.js ? But maybe the answer is for my next edit as I was planning to do React’s main tutorial today

Solution: After reading the Inspector/index.js code
I get that this is the place were I should add the tachyons’ classes as I wish.
Notabene: Since I’ll have a customized class Inspector I’ll need to change the imports from the example:

 import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";

to something like

import Runtime from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";
import Inspector from "/path/to/modified/index.js";
1 Like