mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
32 lines
679 B
JavaScript
32 lines
679 B
JavaScript
import {state} from 'lstream';
|
|
|
|
export function defineStreams({streams}) {
|
|
|
|
streams.ui = {
|
|
controlBars: {
|
|
left: state([]),
|
|
right: state([])
|
|
},
|
|
toolbars: {
|
|
headsUp: state([]),
|
|
auxiliary: state([]),
|
|
sketcherGeneral: state([]),
|
|
sketcherConstraints: state([]),
|
|
sketcherControl: state([]),
|
|
sketcherToolbarsVisible: state(false)
|
|
},
|
|
sockets: {}
|
|
};
|
|
|
|
}
|
|
|
|
export function activate({services}) {
|
|
|
|
let components = new Map();
|
|
const registerComponent = (id, Component) => components.set(id, Component);
|
|
const getComponent = id => components.get(id);
|
|
|
|
services.ui = {
|
|
registerComponent, getComponent
|
|
}
|
|
}
|