ryohey / signal

Online MIDI Editor: signal
https://signal.vercel.app
MIT License
1.2k stars 136 forks source link

NPM Module #160

Open jakiestfu opened 2 years ago

jakiestfu commented 2 years ago

Is your feature request related to a problem? Please describe. I'm building a music project editor and would love to include Signal as an editor within the page.

Describe the solution you'd like import { Signal } from 'signal-react'

Additional context This would require publishing on NPM and including a bundle that doesn't include things like Sentry.

ryohey commented 2 years ago

That's an interesting idea. Since signal is designed for full screen layout and uses global CSS etc., just publishing on npm may not be enough for embedding. I thought it would be better if there was a layout for embedding, like CodePen, CodeSandbox, or JSFiddle. https://blog.codepen.io/documentation/embedded-pens/#example-2

What do you think about that?

jakiestfu commented 2 years ago

To be a little more specific, I'm building an electron app that already uses Material UI and has its own theme defined. It would play very well with something like Signal, especially considering Signal renders well at most sizes.

Screen Shot 2022-03-02 at 8 26 14 AM

That being said, it can pose an interesting opportunity to expose APIs for controlling things like key bindings and events like onSave, onExport, etc. Even hiding/showing parts of the GUI.

const [project, setProject] = useState<SignalProject>()

<Signal value={project} onChange={setProject} />

At the end of the day, I suppose what I'm looking for is an export that does not include Sentry and simply exports the App/App in a more refined way. Might not need GlobalCSS for example, but I could live with it.

jakiestfu commented 2 years ago

If you're interested, what I think would be a good first step is looking into GitHub actions that can run a build on push to master and publish to NPM.

jakiestfu commented 1 year ago

Any thoughts on exposing the midi editor in Signal as a standalone component, @ryohey?