@opensumi/ide-notebook 3.4.5-next-1730120479.0 → 3.5.1-next-1731636910.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +2 -8
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/kernel-panel/collapse/index.d.ts.map +1 -1
- package/lib/browser/kernel-panel/collapse/index.js +10 -7
- package/lib/browser/kernel-panel/collapse/index.js.map +1 -1
- package/lib/browser/kernel-panel/collapse/page-collapse-content.d.ts.map +1 -1
- package/lib/browser/kernel-panel/collapse/page-collapse-content.js +1 -1
- package/lib/browser/kernel-panel/collapse/page-collapse-content.js.map +1 -1
- package/lib/browser/kernel-panel/kernel-panel-view.js +2 -2
- package/lib/browser/kernel-panel/kernel-panel-view.js.map +1 -1
- package/lib/browser/kernel-panel/kernel.panel.contribution.d.ts.map +1 -1
- package/lib/browser/kernel-panel/kernel.panel.contribution.js +2 -2
- package/lib/browser/kernel-panel/kernel.panel.contribution.js.map +1 -1
- package/lib/browser/libro/editor/editor-contribution.d.ts.map +1 -1
- package/lib/browser/libro/editor/editor-contribution.js +2 -1
- package/lib/browser/libro/editor/editor-contribution.js.map +1 -1
- package/lib/browser/libro/editor/index.less +0 -1
- package/lib/browser/libro/editor/keybind-handler.d.ts +1 -0
- package/lib/browser/libro/editor/keybind-handler.d.ts.map +1 -1
- package/lib/browser/libro/editor/keybind-handler.js +15 -29
- package/lib/browser/libro/editor/keybind-handler.js.map +1 -1
- package/lib/browser/libro/editor/opensumi-editor.d.ts +2 -2
- package/lib/browser/libro/editor/opensumi-editor.d.ts.map +1 -1
- package/lib/browser/libro/editor/opensumi-editor.js +7 -80
- package/lib/browser/libro/editor/opensumi-editor.js.map +1 -1
- package/lib/browser/libro/libro-opensumi-content-contribution.d.ts +1 -1
- package/lib/browser/libro/libro-opensumi-save-content-contribution.d.ts +1 -1
- package/lib/browser/libro-keybind-contribution.d.ts +1 -1
- package/lib/browser/libro-keybind-contribution.js +10 -10
- package/lib/browser/libro-keybind-contribution.js.map +1 -1
- package/lib/browser/libro-opener.d.ts +1 -0
- package/lib/browser/libro-opener.d.ts.map +1 -1
- package/lib/browser/libro-opener.js +15 -6
- package/lib/browser/libro-opener.js.map +1 -1
- package/lib/browser/libro.command.d.ts.map +1 -1
- package/lib/browser/libro.command.js +2 -1
- package/lib/browser/libro.command.js.map +1 -1
- package/lib/browser/libro.contribution.d.ts +5 -3
- package/lib/browser/libro.contribution.d.ts.map +1 -1
- package/lib/browser/libro.contribution.js +29 -13
- package/lib/browser/libro.contribution.js.map +1 -1
- package/lib/browser/libro.module.less +3 -0
- package/lib/browser/libro.service.d.ts +4 -8
- package/lib/browser/libro.service.d.ts.map +1 -1
- package/lib/browser/libro.service.js +4 -8
- package/lib/browser/libro.service.js.map +1 -1
- package/lib/browser/libro.view.d.ts.map +1 -1
- package/lib/browser/libro.view.js +12 -17
- package/lib/browser/libro.view.js.map +1 -1
- package/lib/browser/notebook-document-content-provider.d.ts +3 -4
- package/lib/browser/notebook-document-content-provider.d.ts.map +1 -1
- package/lib/browser/notebook-document-content-provider.js +3 -18
- package/lib/browser/notebook-document-content-provider.js.map +1 -1
- package/lib/browser/notebook.service.d.ts +4 -6
- package/lib/browser/notebook.service.d.ts.map +1 -1
- package/lib/browser/notebook.service.js +18 -21
- package/lib/browser/notebook.service.js.map +1 -1
- package/lib/browser/toc/toc.panel.js +2 -2
- package/lib/browser/toc/toc.panel.js.map +1 -1
- package/package.json +20 -19
- package/src/browser/index.ts +2 -8
- package/src/browser/kernel-panel/collapse/index.tsx +16 -9
- package/src/browser/kernel-panel/collapse/page-collapse-content.tsx +7 -9
- package/src/browser/kernel-panel/kernel-panel-view.tsx +2 -2
- package/src/browser/kernel-panel/kernel.panel.contribution.ts +2 -2
- package/src/browser/libro/editor/editor-contribution.ts +2 -1
- package/src/browser/libro/editor/index.less +0 -1
- package/src/browser/libro/editor/keybind-handler.ts +17 -29
- package/src/browser/libro/editor/opensumi-editor.ts +21 -103
- package/src/browser/libro-keybind-contribution.ts +2 -2
- package/src/browser/libro-opener.ts +14 -9
- package/src/browser/libro.command.ts +2 -1
- package/src/browser/libro.contribution.tsx +38 -11
- package/src/browser/libro.module.less +3 -0
- package/src/browser/libro.service.ts +4 -16
- package/src/browser/libro.view.tsx +14 -20
- package/src/browser/notebook-document-content-provider.ts +3 -29
- package/src/browser/notebook.service.ts +86 -82
- package/src/browser/toc/toc.panel.tsx +2 -2
- package/lib/browser/libro.view.tracker.d.ts +0 -6
- package/lib/browser/libro.view.tracker.d.ts.map +0 -1
- package/lib/browser/libro.view.tracker.js +0 -28
- package/lib/browser/libro.view.tracker.js.map +0 -1
- package/src/browser/libro.view.tracker.ts +0 -18
|
@@ -6,14 +6,12 @@ import {
|
|
|
6
6
|
Emitter,
|
|
7
7
|
Event,
|
|
8
8
|
IApplicationService,
|
|
9
|
-
IEditorDocumentChange,
|
|
10
9
|
IEditorDocumentModelSaveResult,
|
|
11
10
|
MaybePromise,
|
|
12
11
|
SaveTaskResponseState,
|
|
13
12
|
URI,
|
|
14
13
|
} from '@opensumi/ide-core-common';
|
|
15
14
|
import { IEditorDocumentModelContentProvider } from '@opensumi/ide-editor/lib/browser/doc-model/types';
|
|
16
|
-
import { EOL } from '@opensumi/ide-monaco';
|
|
17
15
|
|
|
18
16
|
import { ILibroOpensumiService } from './libro.service';
|
|
19
17
|
|
|
@@ -35,26 +33,15 @@ export class NotebookDocumentContentProvider implements IEditorDocumentModelCont
|
|
|
35
33
|
handlesScheme?(scheme: string): MaybePromise<boolean> {
|
|
36
34
|
return scheme === LibroCellURIScheme;
|
|
37
35
|
}
|
|
38
|
-
// handlesUri?(uri: URI): MaybePromise<number> {
|
|
39
|
-
// throw new Error("Method not implemented.");
|
|
40
|
-
// }
|
|
41
36
|
|
|
42
37
|
async provideEditorDocumentModelContent(uri: URI, encoding?: string | undefined): Promise<string> {
|
|
43
38
|
const cell = await this.libroOpensumiService.getCellViewByUri(uri);
|
|
44
39
|
return cell?.model.value ?? '';
|
|
45
40
|
}
|
|
46
|
-
isReadonly(
|
|
41
|
+
isReadonly(): MaybePromise<boolean> {
|
|
47
42
|
return false;
|
|
48
43
|
}
|
|
49
|
-
saveDocumentModel?(
|
|
50
|
-
uri: URI,
|
|
51
|
-
content: string,
|
|
52
|
-
baseContent: string,
|
|
53
|
-
changes: IEditorDocumentChange[],
|
|
54
|
-
encoding?: string | undefined,
|
|
55
|
-
ignoreDiff?: boolean | undefined,
|
|
56
|
-
eol?: EOL | undefined,
|
|
57
|
-
): MaybePromise<IEditorDocumentModelSaveResult> {
|
|
44
|
+
saveDocumentModel?(): MaybePromise<IEditorDocumentModelSaveResult> {
|
|
58
45
|
return {
|
|
59
46
|
state: SaveTaskResponseState.SUCCESS,
|
|
60
47
|
};
|
|
@@ -64,11 +51,8 @@ export class NotebookDocumentContentProvider implements IEditorDocumentModelCont
|
|
|
64
51
|
if (!cell) {
|
|
65
52
|
return;
|
|
66
53
|
}
|
|
67
|
-
return this.libroOpensumiService.
|
|
54
|
+
return this.libroOpensumiService.getCellLanguage(cell);
|
|
68
55
|
}
|
|
69
|
-
// async provideEOL?(uri: URI): Promise<EOL> {
|
|
70
|
-
// return '\n'
|
|
71
|
-
// }
|
|
72
56
|
provideEncoding?(uri: URI): MaybePromise<string> {
|
|
73
57
|
const encoding = this.preferenceService.get<string>(
|
|
74
58
|
'files.encoding',
|
|
@@ -78,22 +62,12 @@ export class NotebookDocumentContentProvider implements IEditorDocumentModelCont
|
|
|
78
62
|
);
|
|
79
63
|
return encoding || 'utf8';
|
|
80
64
|
}
|
|
81
|
-
|
|
82
|
-
// provideEditorDocumentModelContentMd5?(uri: URI, encoding?: string | undefined): MaybePromise<string | undefined> {
|
|
83
|
-
// throw new Error("Method not implemented.");
|
|
84
|
-
// }
|
|
85
|
-
// onDidDisposeModel?(uri: URI): void {
|
|
86
|
-
// throw new Error("Method not implemented.");
|
|
87
|
-
// }
|
|
88
65
|
isAlwaysDirty?(uri: URI): MaybePromise<boolean> {
|
|
89
66
|
return false;
|
|
90
67
|
}
|
|
91
68
|
closeAutoSave?(uri: URI): MaybePromise<boolean> {
|
|
92
69
|
return true;
|
|
93
70
|
}
|
|
94
|
-
// guessEncoding?(uri: URI): Promise<string | undefined> {
|
|
95
|
-
// throw new Error("Method not implemented.");
|
|
96
|
-
// }
|
|
97
71
|
disposeEvenDirty?(uri: URI): MaybePromise<boolean> {
|
|
98
72
|
return false;
|
|
99
73
|
}
|
|
@@ -2,8 +2,8 @@ import { CellUri, CellView, LibroJupyterView, LibroService, LibroView, MIME } fr
|
|
|
2
2
|
import { Container, getOrigin } from '@difizen/mana-app';
|
|
3
3
|
|
|
4
4
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { URI } from '@opensumi/ide-core-browser';
|
|
6
|
+
import { DisposableCollection, Uri } from '@opensumi/ide-core-common';
|
|
7
7
|
import {
|
|
8
8
|
CellKind,
|
|
9
9
|
INotebookModelAddedData,
|
|
@@ -20,8 +20,7 @@ import { ILibroOpensumiService } from './libro.service';
|
|
|
20
20
|
import { ManaContainer } from './mana';
|
|
21
21
|
|
|
22
22
|
@Injectable()
|
|
23
|
-
|
|
24
|
-
export class NotebookServiceOverride extends NotebookService implements ClientAppContribution {
|
|
23
|
+
export class NotebookServiceOverride extends NotebookService {
|
|
25
24
|
@Autowired(ManaContainer)
|
|
26
25
|
private readonly manaContainer: Container;
|
|
27
26
|
@Autowired(IEditorDocumentModelService)
|
|
@@ -31,15 +30,10 @@ export class NotebookServiceOverride extends NotebookService implements ClientAp
|
|
|
31
30
|
@Autowired(ILibroOpensumiService)
|
|
32
31
|
private readonly libroOpensumiService: ILibroOpensumiService;
|
|
33
32
|
|
|
34
|
-
onDidStart(): MaybePromise<void> {
|
|
35
|
-
this.listenLibro();
|
|
36
|
-
this.listenEditor();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
33
|
listenEditor() {
|
|
40
|
-
this.workbenchEditorService.onActiveResourceChange((e) => {
|
|
34
|
+
return this.workbenchEditorService.onActiveResourceChange((e) => {
|
|
41
35
|
if (e?.uri?.path.ext === `.${LIBRO_COMPONENTS_SCHEME_ID}`) {
|
|
42
|
-
this.libroOpensumiService.
|
|
36
|
+
this.libroOpensumiService.getOrCreateLibroView(e.uri).then((libroView) => {
|
|
43
37
|
this.handleOpenNotebook(libroView);
|
|
44
38
|
});
|
|
45
39
|
}
|
|
@@ -88,7 +82,7 @@ export class NotebookServiceOverride extends NotebookService implements ClientAp
|
|
|
88
82
|
cellKind: this.isCodeCell(cell.model.mimeType) ? CellKind.Code : CellKind.Markup,
|
|
89
83
|
eol: '\n',
|
|
90
84
|
handle: 1,
|
|
91
|
-
language: this.libroOpensumiService.
|
|
85
|
+
language: this.libroOpensumiService.getCellLanguage(cell) ?? 'plaintext',
|
|
92
86
|
mime: cell.model.mimeType,
|
|
93
87
|
outputs: [],
|
|
94
88
|
source: cell.model.value.split('\n'),
|
|
@@ -110,78 +104,88 @@ export class NotebookServiceOverride extends NotebookService implements ClientAp
|
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
listenLibro() {
|
|
107
|
+
const disposables = new DisposableCollection();
|
|
113
108
|
const libroService = this.manaContainer.get(LibroService);
|
|
114
|
-
libroService.onNotebookViewCreated(this.handleOpenNotebook);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
109
|
+
disposables.push(libroService.onNotebookViewCreated(this.handleOpenNotebook));
|
|
110
|
+
disposables.push(
|
|
111
|
+
libroService.onNotebookViewClosed((libroView) => {
|
|
112
|
+
if (!this.isValidNotebook(libroView)) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
this.deleteNotebookVersion(libroView);
|
|
116
|
+
this._onDidCloseNotebookDocument.fire(this.getNotebookUri(libroView as LibroJupyterView));
|
|
117
|
+
}),
|
|
118
|
+
);
|
|
119
|
+
disposables.push(
|
|
120
|
+
libroService.onNotebookViewSaved((libroView) => {
|
|
121
|
+
if (!this.isValidNotebook(libroView)) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.updateNotebookVersion(libroView);
|
|
125
|
+
this._onDidSaveNotebookDocument.fire(this.getNotebookUri(libroView as LibroJupyterView));
|
|
126
|
+
}),
|
|
127
|
+
);
|
|
128
|
+
disposables.push(
|
|
129
|
+
libroService.onNotebookViewChanged((event) => {
|
|
130
|
+
if (!this.isValidNotebook(event.libroView)) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (!event.libroView.model.isInitialized) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const events: NotebookRawContentEventDto[] = [];
|
|
139
|
+
|
|
140
|
+
if (event.contentChanges) {
|
|
141
|
+
event.contentChanges.forEach((item) => {
|
|
142
|
+
if (item.addedCells.length > 0) {
|
|
143
|
+
events.push({
|
|
144
|
+
kind: NotebookCellsChangeType.ModelChange,
|
|
145
|
+
changes: [[item.range.start, 0, item.addedCells.map((cell) => this.asNotebookCell(cell))]],
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (item.removedCells.length > 0) {
|
|
149
|
+
events.push({
|
|
150
|
+
kind: NotebookCellsChangeType.ModelChange,
|
|
151
|
+
changes: [[item.range.start, item.range.end - item.range.start, []]],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
this.updateNotebookVersion(event.libroView);
|
|
158
|
+
this._onDidChangeNotebookDocument.fire({
|
|
159
|
+
uri: this.getNotebookUri(event.libroView as LibroJupyterView),
|
|
160
|
+
event: {
|
|
161
|
+
rawEvents: events,
|
|
162
|
+
versionId: this.getNotebookVersion(event.libroView),
|
|
163
|
+
},
|
|
164
|
+
isDirty: getOrigin(event.libroView.model.dirty),
|
|
154
165
|
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
event: {
|
|
179
|
-
rawEvents: events,
|
|
180
|
-
versionId: modelRef?.instance.getMonacoModel().getVersionId() ?? 1,
|
|
181
|
-
},
|
|
182
|
-
isDirty: getOrigin(event.cell.parent.model.dirty),
|
|
183
|
-
});
|
|
184
|
-
});
|
|
166
|
+
}),
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
disposables.push(
|
|
170
|
+
libroService.onNotebookCellChanged((event) => {
|
|
171
|
+
const events: NotebookRawContentEventDto[] = [];
|
|
172
|
+
const index = event.cell.parent.findCellIndex(event.cell);
|
|
173
|
+
const modelRef = this.getCellModelRef(event.cell);
|
|
174
|
+
events.push({
|
|
175
|
+
kind: NotebookCellsChangeType.ChangeCellContent,
|
|
176
|
+
index,
|
|
177
|
+
});
|
|
178
|
+
this._onDidChangeNotebookDocument.fire({
|
|
179
|
+
uri: this.getNotebookUri(event.cell.parent as LibroJupyterView),
|
|
180
|
+
event: {
|
|
181
|
+
rawEvents: events,
|
|
182
|
+
versionId: modelRef?.instance.getMonacoModel().getVersionId() ?? 1,
|
|
183
|
+
},
|
|
184
|
+
isDirty: getOrigin(event.cell.parent.model.dirty),
|
|
185
|
+
});
|
|
186
|
+
}),
|
|
187
|
+
);
|
|
188
|
+
return disposables;
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
protected handleOpenNotebook = async (libroView: LibroView) => {
|
|
@@ -22,7 +22,7 @@ export const TocPanel = ({ viewState }: PropsWithChildren<{ viewState: ViewState
|
|
|
22
22
|
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
if (editorService.currentResource?.uri.path.ext === `.${LIBRO_COMPONENTS_SCHEME_ID}`) {
|
|
25
|
-
libroOpensumiService.
|
|
25
|
+
libroOpensumiService.getOrCreateLibroView(editorService.currentResource.uri).then((libro) => {
|
|
26
26
|
const viewManager = manaContainer.get(ViewManager);
|
|
27
27
|
viewManager
|
|
28
28
|
.getOrCreateView<TOCView>(TOCView, {
|
|
@@ -37,7 +37,7 @@ export const TocPanel = ({ viewState }: PropsWithChildren<{ viewState: ViewState
|
|
|
37
37
|
}
|
|
38
38
|
editorService.onActiveResourceChange((e) => {
|
|
39
39
|
if (e?.uri.path.ext === `.${LIBRO_COMPONENTS_SCHEME_ID}`) {
|
|
40
|
-
libroOpensumiService.
|
|
40
|
+
libroOpensumiService.getOrCreateLibroView(e.uri).then((libro) => {
|
|
41
41
|
const viewManager = manaContainer.get(ViewManager);
|
|
42
42
|
viewManager
|
|
43
43
|
.getOrCreateView<TOCView>(TOCView, {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"libro.view.tracker.d.ts","sourceRoot":"","sources":["../../src/browser/libro.view.tracker.ts"],"names":[],"mappings":"AAIA,qBACa,YAAY;;IAMvB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAa;IAG7C,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS;CAGzC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { action, makeObservable, observable } from 'mobx';
|
|
3
|
-
import { Injectable } from '@opensumi/di';
|
|
4
|
-
let LibroTracker = class LibroTracker {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.refreshTimer = undefined;
|
|
7
|
-
makeObservable(this);
|
|
8
|
-
}
|
|
9
|
-
refresh(refreshTimer) {
|
|
10
|
-
this.refreshTimer = refreshTimer;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
__decorate([
|
|
14
|
-
observable,
|
|
15
|
-
__metadata("design:type", Object)
|
|
16
|
-
], LibroTracker.prototype, "refreshTimer", void 0);
|
|
17
|
-
__decorate([
|
|
18
|
-
action,
|
|
19
|
-
__metadata("design:type", Function),
|
|
20
|
-
__metadata("design:paramtypes", [Object]),
|
|
21
|
-
__metadata("design:returntype", void 0)
|
|
22
|
-
], LibroTracker.prototype, "refresh", null);
|
|
23
|
-
LibroTracker = __decorate([
|
|
24
|
-
Injectable({ multiple: true }),
|
|
25
|
-
__metadata("design:paramtypes", [])
|
|
26
|
-
], LibroTracker);
|
|
27
|
-
export { LibroTracker };
|
|
28
|
-
//# sourceMappingURL=libro.view.tracker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"libro.view.tracker.js","sourceRoot":"","sources":["../../src/browser/libro.view.tracker.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGnC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB;QAKA,iBAAY,GAAuB,SAAS,CAAC;QAJ3C,cAAc,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAMD,OAAO,CAAC,YAAgC;QACtC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF,CAAA;AANC;IADC,UAAU;;kDACkC;AAG7C;IADC,MAAM;;;;2CAGN;AAXU,YAAY;IADxB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;GAClB,YAAY,CAYxB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { action, makeObservable, observable } from 'mobx';
|
|
2
|
-
|
|
3
|
-
import { Injectable } from '@opensumi/di';
|
|
4
|
-
|
|
5
|
-
@Injectable({ multiple: true })
|
|
6
|
-
export class LibroTracker {
|
|
7
|
-
constructor() {
|
|
8
|
-
makeObservable(this);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@observable
|
|
12
|
-
refreshTimer: number | undefined = undefined;
|
|
13
|
-
|
|
14
|
-
@action
|
|
15
|
-
refresh(refreshTimer: number | undefined) {
|
|
16
|
-
this.refreshTimer = refreshTimer;
|
|
17
|
-
}
|
|
18
|
-
}
|