UNPKG

collaborative-ui

Version:

React component library for building real-time collaborative editing applications.

18 lines (17 loc) 541 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JsonCrdtPatchState = void 0; const rxjs_1 = require("rxjs"); class JsonCrdtPatchState { constructor() { this.show$ = new rxjs_1.BehaviorSubject(true); this.view$ = new rxjs_1.BehaviorSubject('text'); this.toggleShow = () => { this.show$.next(!this.show$.getValue()); }; this.setView = (view) => { this.view$.next(view); }; } } exports.JsonCrdtPatchState = JsonCrdtPatchState;