@datalayer/jupyter-react 0.20.0 → 0.20.2
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/lib/app/JupyterReact.d.ts +1 -1
- package/lib/app/JupyterReact.js +1 -1
- package/lib/app/JupyterReact.js.map +1 -1
- package/lib/app/index.d.ts +1 -0
- package/lib/{jupyter/lab → app}/index.js +1 -1
- package/lib/app/index.js.map +1 -0
- package/lib/components/kernel/inspector/widget.js +2 -1
- package/lib/components/kernel/inspector/widget.js.map +1 -1
- package/lib/components/notebook/BaseNotebook.js +2 -3
- package/lib/components/notebook/BaseNotebook.js.map +1 -1
- package/lib/examples/JupyterLabApp.js +0 -2
- package/lib/examples/JupyterLabApp.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/jupyter/index.d.ts +0 -1
- package/lib/jupyter/index.js +0 -1
- package/lib/jupyter/index.js.map +1 -1
- package/lib/jupyter/services/ServiceManagerLess.d.ts +1 -0
- package/lib/jupyter/services/ServiceManagerLess.js +1 -0
- package/lib/jupyter/services/ServiceManagerLess.js.map +1 -1
- package/lib/utils/cursorExtension.d.ts +23 -0
- package/lib/utils/cursorExtension.js +292 -0
- package/lib/utils/cursorExtension.js.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/package.json +29 -75
- package/lib/jupyter/lab/__tests__/datalayer.spec.d.ts +0 -0
- package/lib/jupyter/lab/__tests__/datalayer.spec.js +0 -11
- package/lib/jupyter/lab/__tests__/datalayer.spec.js.map +0 -1
- package/lib/jupyter/lab/index.d.ts +0 -1
- package/lib/jupyter/lab/index.js.map +0 -1
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.d.ts +0 -6
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +0 -17
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +0 -1
- package/lib/jupyter/lab/notebook/content/index.d.ts +0 -0
- package/lib/jupyter/lab/notebook/content/index.js +0 -6
- package/lib/jupyter/lab/notebook/content/index.js.map +0 -1
- package/lib/jupyter/lab/notebook/content/plugin.d.ts +0 -7
- package/lib/jupyter/lab/notebook/content/plugin.js +0 -24
- package/lib/jupyter/lab/notebook/content/plugin.js.map +0 -1
- package/lib/jupyter/lab/notebook/editor/history.d.ts +0 -193
- package/lib/jupyter/lab/notebook/editor/history.js +0 -304
- package/lib/jupyter/lab/notebook/editor/history.js.map +0 -1
- package/lib/jupyter/lab/notebook/editor/index.d.ts +0 -0
- package/lib/jupyter/lab/notebook/editor/index.js +0 -6
- package/lib/jupyter/lab/notebook/editor/index.js.map +0 -1
- package/lib/jupyter/lab/notebook/editor/plugin.d.ts +0 -7
- package/lib/jupyter/lab/notebook/editor/plugin.js +0 -62
- package/lib/jupyter/lab/notebook/editor/plugin.js.map +0 -1
- package/lib/jupyter/lab/notebook/editor/widgetfactory.d.ts +0 -96
- package/lib/jupyter/lab/notebook/editor/widgetfactory.js +0 -89
- package/lib/jupyter/lab/notebook/editor/widgetfactory.js.map +0 -1
- package/lib/jupyter/lab/notebook/index.d.ts +0 -0
- package/lib/jupyter/lab/notebook/index.js +0 -6
- package/lib/jupyter/lab/notebook/index.js.map +0 -1
- package/lib/jupyter/lab/plugin.d.ts +0 -4
- package/lib/jupyter/lab/plugin.js +0 -104
- package/lib/jupyter/lab/plugin.js.map +0 -1
- package/lib/jupyter/lab/widget.d.ts +0 -8
- package/lib/jupyter/lab/widget.js +0 -15
- package/lib/jupyter/lab/widget.js.map +0 -1
- package/schema/plugin.json +0 -52
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
// Display remote peer cursors
|
|
7
|
+
//
|
|
8
|
+
// This is a slightly modified version of https://github.com/jupyterlab/jupyter-collaboration/blob/main/packages/collaboration/src/cursors.ts
|
|
9
|
+
// licenced under Copyright (c) Jupyter Development Team and distributed under the terms of the Modified BSD License.
|
|
10
|
+
import { Annotation, EditorSelection, Facet, StateField, } from '@codemirror/state';
|
|
11
|
+
import { EditorView, layer, RectangleMarker, showTooltip, tooltips, ViewPlugin } from '@codemirror/view';
|
|
12
|
+
import { JSONExt } from '@lumino/coreutils';
|
|
13
|
+
import { createAbsolutePositionFromRelativePosition, createRelativePositionFromJSON, createRelativePositionFromTypeIndex, } from 'yjs';
|
|
14
|
+
/**
|
|
15
|
+
* Facet storing the Yjs document objects
|
|
16
|
+
*/
|
|
17
|
+
const editorAwarenessFacet = Facet.define({
|
|
18
|
+
combine(configs) {
|
|
19
|
+
return configs[configs.length - 1];
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Remote selection theme
|
|
24
|
+
*/
|
|
25
|
+
const remoteSelectionTheme = EditorView.baseTheme({
|
|
26
|
+
'.jp-remote-cursor': {
|
|
27
|
+
borderLeft: '1px solid black',
|
|
28
|
+
marginLeft: '-1px',
|
|
29
|
+
},
|
|
30
|
+
'.jp-remote-cursor.jp-mod-primary': {
|
|
31
|
+
borderLeftWidth: '2px',
|
|
32
|
+
},
|
|
33
|
+
'.jp-remote-selection': {
|
|
34
|
+
opacity: 0.5,
|
|
35
|
+
},
|
|
36
|
+
'.cm-tooltip': {
|
|
37
|
+
border: 'none',
|
|
38
|
+
},
|
|
39
|
+
'.cm-tooltip.jp-remote-userInfo': {
|
|
40
|
+
color: 'var(--jp-ui-inverse-font-color0)',
|
|
41
|
+
padding: '0px 2px',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
// TODO fix which user needs update
|
|
45
|
+
const remoteSelectionsAnnotation = Annotation.define();
|
|
46
|
+
/**
|
|
47
|
+
* Wrapper around RectangleMarker to be able to set the user color for the remote cursor and selection ranges.
|
|
48
|
+
*/
|
|
49
|
+
class RemoteMarker {
|
|
50
|
+
style;
|
|
51
|
+
marker;
|
|
52
|
+
/**
|
|
53
|
+
* Constructor
|
|
54
|
+
*
|
|
55
|
+
* @param style Specific user style to be applied on the marker element
|
|
56
|
+
* @param marker {@link RectangleMarker} to wrap
|
|
57
|
+
*/
|
|
58
|
+
constructor(style, marker) {
|
|
59
|
+
this.style = style;
|
|
60
|
+
this.marker = marker;
|
|
61
|
+
}
|
|
62
|
+
draw() {
|
|
63
|
+
const elt = this.marker.draw();
|
|
64
|
+
for (const [key, value] of Object.entries(this.style)) {
|
|
65
|
+
// @ts-expect-error Unknown key
|
|
66
|
+
elt.style[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return elt;
|
|
69
|
+
}
|
|
70
|
+
eq(other) {
|
|
71
|
+
return (this.marker.eq(other.marker) && JSONExt.deepEqual(this.style, other.style));
|
|
72
|
+
}
|
|
73
|
+
update(dom, oldMarker) {
|
|
74
|
+
for (const [key, value] of Object.entries(this.style)) {
|
|
75
|
+
// @ts-expect-error Unknown key
|
|
76
|
+
dom.style[key] = value;
|
|
77
|
+
}
|
|
78
|
+
return this.marker.update(dom, oldMarker.marker);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Extension defining a new editor layer storing the remote user cursors
|
|
83
|
+
*/
|
|
84
|
+
const remoteCursorsLayer = layer({
|
|
85
|
+
above: true,
|
|
86
|
+
markers(view) {
|
|
87
|
+
const { awareness, ytext } = view.state.facet(editorAwarenessFacet);
|
|
88
|
+
const ydoc = ytext.doc;
|
|
89
|
+
const cursors = [];
|
|
90
|
+
awareness.getStates().forEach((state, clientID) => {
|
|
91
|
+
if (clientID === awareness.doc.clientID) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const cursors_ = state.cursors;
|
|
95
|
+
for (const cursor of cursors_ ?? []) {
|
|
96
|
+
if (!cursor?.anchor || !cursor?.head) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const anchor = createAbsolutePositionFromRelativePosition(cursor.anchor, ydoc);
|
|
100
|
+
const head = createAbsolutePositionFromRelativePosition(cursor.head, ydoc);
|
|
101
|
+
if (anchor?.type !== ytext || head?.type !== ytext) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const className = cursor.primary ?? true
|
|
105
|
+
? 'jp-remote-cursor jp-mod-primary'
|
|
106
|
+
: 'jp-remote-cursor';
|
|
107
|
+
const cursor_ = EditorSelection.cursor(head.index, head.index > anchor.index ? -1 : 1);
|
|
108
|
+
for (const piece of RectangleMarker.forRange(view, className, cursor_)) {
|
|
109
|
+
// Wrap the rectangle marker to set the user color
|
|
110
|
+
cursors.push(new RemoteMarker({ borderLeftColor: state.user?.color ?? 'black' }, piece));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return cursors;
|
|
115
|
+
},
|
|
116
|
+
update(update, layer) {
|
|
117
|
+
return !!update.transactions.find(t => t.annotation(remoteSelectionsAnnotation));
|
|
118
|
+
},
|
|
119
|
+
class: 'jp-remote-cursors',
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Tooltip extension to display user display name at cursor position
|
|
123
|
+
*/
|
|
124
|
+
function getCursorTooltips(state) {
|
|
125
|
+
const tooltips = new Array();
|
|
126
|
+
const { awareness, ytext } = state.facet(editorAwarenessFacet);
|
|
127
|
+
const ydoc = ytext.doc;
|
|
128
|
+
for (const [clientID, state] of awareness.getStates()) {
|
|
129
|
+
if (clientID === awareness.doc.clientID) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
for (const cursor of state.cursors ?? []) {
|
|
133
|
+
if (!cursor?.head) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
const head = createAbsolutePositionFromRelativePosition(cursor.head, ydoc);
|
|
137
|
+
if (head?.type !== ytext) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
tooltips.push({
|
|
141
|
+
pos: head.index,
|
|
142
|
+
above: true,
|
|
143
|
+
create: () => {
|
|
144
|
+
const dom = document.createElement('div');
|
|
145
|
+
dom.classList.add('jp-remote-userInfo');
|
|
146
|
+
dom.style.backgroundColor = state.user?.color ?? 'darkgrey';
|
|
147
|
+
dom.textContent =
|
|
148
|
+
state.user?.display_name ?? 'Anonymous';
|
|
149
|
+
return { dom };
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return tooltips;
|
|
155
|
+
}
|
|
156
|
+
const remoteCursorTooltipField = StateField.define({
|
|
157
|
+
create: getCursorTooltips,
|
|
158
|
+
update(tooltips, tr) {
|
|
159
|
+
if (!tr.annotation(remoteSelectionsAnnotation))
|
|
160
|
+
return tooltips;
|
|
161
|
+
return getCursorTooltips(tr.state);
|
|
162
|
+
},
|
|
163
|
+
provide(field) {
|
|
164
|
+
return showTooltip.computeN([field], state => state.field(field));
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
/**
|
|
168
|
+
* Extension defining a new editor layer storing the remote selections
|
|
169
|
+
*/
|
|
170
|
+
const remoteSelectionLayer = layer({
|
|
171
|
+
above: false,
|
|
172
|
+
markers(view) {
|
|
173
|
+
const { awareness, ytext } = view.state.facet(editorAwarenessFacet);
|
|
174
|
+
const ydoc = ytext.doc;
|
|
175
|
+
const cursors = [];
|
|
176
|
+
awareness.getStates().forEach((state, clientID) => {
|
|
177
|
+
if (clientID === awareness.doc.clientID) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const cursors_ = state.cursors;
|
|
181
|
+
for (const cursor of cursors_ ?? []) {
|
|
182
|
+
if ((cursor.empty ?? true) || !cursor?.anchor || !cursor?.head) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const anchor = createAbsolutePositionFromRelativePosition(cursor.anchor, ydoc);
|
|
186
|
+
const head = createAbsolutePositionFromRelativePosition(cursor.head, ydoc);
|
|
187
|
+
if (anchor?.type !== ytext || head?.type !== ytext) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const className = 'jp-remote-selection';
|
|
191
|
+
for (const piece of RectangleMarker.forRange(view, className, EditorSelection.range(anchor.index, head.index))) {
|
|
192
|
+
// Wrap the rectangle marker to set the user color
|
|
193
|
+
cursors.push(new RemoteMarker({ backgroundColor: state.user?.color ?? 'black' }, piece));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
return cursors;
|
|
198
|
+
},
|
|
199
|
+
update(update, layer) {
|
|
200
|
+
return !!update.transactions.find(t => t.annotation(remoteSelectionsAnnotation));
|
|
201
|
+
},
|
|
202
|
+
class: 'jp-remote-selections',
|
|
203
|
+
});
|
|
204
|
+
/**
|
|
205
|
+
* CodeMirror extension exchanging and displaying remote user selection ranges (including cursors)
|
|
206
|
+
*/
|
|
207
|
+
const showCollaborators = ViewPlugin.fromClass(class {
|
|
208
|
+
editorAwareness;
|
|
209
|
+
_listener;
|
|
210
|
+
constructor(view) {
|
|
211
|
+
this.editorAwareness = view.state.facet(editorAwarenessFacet);
|
|
212
|
+
this._listener = ({ added, updated, removed }) => {
|
|
213
|
+
const clients = added.concat(updated).concat(removed);
|
|
214
|
+
if (clients.findIndex(id => id !== this.editorAwareness.awareness.doc.clientID) >= 0) {
|
|
215
|
+
// Trick to get the remoteCursorLayers to be updated
|
|
216
|
+
view.dispatch({ annotations: [remoteSelectionsAnnotation.of([])] });
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
this.editorAwareness.awareness.on('change', this._listener);
|
|
220
|
+
}
|
|
221
|
+
destroy() {
|
|
222
|
+
this.editorAwareness.awareness.off('change', this._listener);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Communicate the current user cursor position to all remotes
|
|
226
|
+
*/
|
|
227
|
+
update(update) {
|
|
228
|
+
if (!update.docChanged && !update.selectionSet) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const { awareness, ytext } = this.editorAwareness;
|
|
232
|
+
const localAwarenessState = awareness.getLocalState();
|
|
233
|
+
// set local awareness state (update cursors)
|
|
234
|
+
if (localAwarenessState) {
|
|
235
|
+
const hasFocus = update.view.hasFocus && update.view.dom.ownerDocument.hasFocus();
|
|
236
|
+
const selection = update.state.selection;
|
|
237
|
+
const cursors = new Array();
|
|
238
|
+
if (hasFocus && selection) {
|
|
239
|
+
for (const r of selection.ranges) {
|
|
240
|
+
const primary = r === selection.main;
|
|
241
|
+
const anchor = createRelativePositionFromTypeIndex(ytext, r.anchor);
|
|
242
|
+
const head = createRelativePositionFromTypeIndex(ytext, r.head);
|
|
243
|
+
cursors.push({
|
|
244
|
+
anchor,
|
|
245
|
+
head,
|
|
246
|
+
primary,
|
|
247
|
+
empty: r.empty,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
if (!localAwarenessState.cursors || cursors.length > 0) {
|
|
251
|
+
const oldCursors = localAwarenessState.cursors?.map(cursor => {
|
|
252
|
+
return {
|
|
253
|
+
...cursor,
|
|
254
|
+
anchor: cursor?.anchor
|
|
255
|
+
? createRelativePositionFromJSON(cursor.anchor)
|
|
256
|
+
: null,
|
|
257
|
+
head: cursor?.head
|
|
258
|
+
? createRelativePositionFromJSON(cursor.head)
|
|
259
|
+
: null,
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
if (!JSONExt.deepEqual(cursors, oldCursors)) {
|
|
263
|
+
// Update cursors
|
|
264
|
+
awareness.setLocalStateField('cursors', cursors);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}, {
|
|
271
|
+
provide: () => {
|
|
272
|
+
return [
|
|
273
|
+
remoteSelectionTheme,
|
|
274
|
+
remoteCursorsLayer,
|
|
275
|
+
remoteSelectionLayer,
|
|
276
|
+
remoteCursorTooltipField,
|
|
277
|
+
// As we use relative positioning of widget, the tooltip must be positioned absolutely
|
|
278
|
+
// And we attach the tooltip to the body to avoid overflow rules
|
|
279
|
+
tooltips({ position: 'absolute', parent: document.body }),
|
|
280
|
+
];
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
/**
|
|
284
|
+
* CodeMirror extension to display remote users cursors
|
|
285
|
+
*
|
|
286
|
+
* @param config Editor source and awareness
|
|
287
|
+
* @returns CodeMirror extension
|
|
288
|
+
*/
|
|
289
|
+
export function remoteUserCursors(config) {
|
|
290
|
+
return [editorAwarenessFacet.of(config), showCollaborators];
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=cursorExtension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursorExtension.js","sourceRoot":"","sources":["../../src/utils/cursorExtension.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8BAA8B;AAC9B,EAAE;AACF,6IAA6I;AAC7I,qHAAqH;AAErH,OAAO,EACL,UAAU,EACV,eAAe,EAEf,KAAK,EACL,UAAU,GAEX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EACV,KAAK,EAEL,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,EAGX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EACL,0CAA0C,EAC1C,8BAA8B,EAC9B,mCAAmC,GAGpC,MAAM,KAAK,CAAC;AA6Db;;GAEG;AACH,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,CAAmC;IAC1E,OAAO,CAAC,OAAmC;QACzC,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAAC;IAChD,mBAAmB,EAAE;QACnB,UAAU,EAAE,iBAAiB;QAC7B,UAAU,EAAE,MAAM;KACnB;IACD,kCAAkC,EAAE;QAClC,eAAe,EAAE,KAAK;KACvB;IACD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;gCAC7C,CAAC,CAAC,IAAI;yBACT,CAAC;oBACJ,CAAC,CAAC,CAAC;oBACH,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAc,EAAE,UAAiB,CAAC,EAAE;wBACzD,iBAAiB;wBACjB,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;qBAClD;iBACF;aACF;SACF;IACH,CAAC;CACF,EACD;IACE,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,wBAAwB;YACxB,sFAAsF;YACtF,gEAAgE;YAChE,QAAQ,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1D,CAAC;IACJ,CAAC;CACF,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAuB;IACvD,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC9D,CAAC"}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/jupyter-react",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "Jupyter React - React.js components 100% compatible with Jupyter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"keywords": [
|
|
13
13
|
"jupyter",
|
|
14
14
|
"jupyterlab",
|
|
15
|
-
"jupyterlab-extension",
|
|
16
15
|
"react"
|
|
17
16
|
],
|
|
18
17
|
"repository": {
|
|
@@ -20,57 +19,60 @@
|
|
|
20
19
|
"url": "https://github.com/datalayer/jupyter-ui.git",
|
|
21
20
|
"directory": "packages/react"
|
|
22
21
|
},
|
|
23
|
-
"
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"style/*.css",
|
|
24
|
+
"src/**/*.css",
|
|
25
|
+
"style/index.js"
|
|
26
|
+
],
|
|
27
|
+
"styleModule": "style/index.js",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
24
31
|
"scripts": {
|
|
25
|
-
"build": "gulp resources-to-lib && tsc && webpack
|
|
26
|
-
"build:labextension": "jupyter labextension build .",
|
|
27
|
-
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
32
|
+
"build": "gulp resources-to-lib && tsc && webpack",
|
|
28
33
|
"build:lib": "tsc",
|
|
29
|
-
"build:prod": "gulp resources-to-lib && tsc &&
|
|
34
|
+
"build:prod": "gulp resources-to-lib && tsc && npm run clean && npm run build:lib",
|
|
30
35
|
"build:tsc:watch:res": "gulp resources-to-lib-watch",
|
|
31
36
|
"build:tsc:watch:tsc": "tsc --watch",
|
|
32
37
|
"build:webpack": "cross-env BUILD_APP=true webpack-cli build",
|
|
33
38
|
"clean": "rimraf node_modules lib dist build tsconfig.tsbuildinfo",
|
|
34
|
-
"clean:all": "
|
|
39
|
+
"clean:all": "npm run clean:lib && npm run clean:labextension && npm run clean:lintcache",
|
|
35
40
|
"clean:labextension": "rimraf datalayer/labextension",
|
|
36
41
|
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
37
42
|
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
38
|
-
"eslint": "
|
|
43
|
+
"eslint": "npm eslint:check --fix",
|
|
39
44
|
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
40
|
-
"install:extension": "
|
|
41
|
-
"jupyterlab": "run-p -c 'jupyterlab:*'",
|
|
42
|
-
"jupyterlab:start": "jupyter lab --watch --config=./../../dev/config/jupyter_server_config.py",
|
|
43
|
-
"jupyterlab:watch": "run-p -c watch:src watch:labextension",
|
|
45
|
+
"install:extension": "npm run build",
|
|
44
46
|
"kill": "./../../dev/sh/kill.sh || true",
|
|
45
|
-
"lint": "
|
|
46
|
-
"lint:check": "
|
|
47
|
-
"prettier": "
|
|
47
|
+
"lint": "npm stylelint && npm prettier && npm eslint",
|
|
48
|
+
"lint:check": "npm stylelint:check && npm prettier:check && npm eslint:check",
|
|
49
|
+
"prettier": "npm prettier:base --write --list-different",
|
|
48
50
|
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
49
|
-
"prettier:check": "
|
|
51
|
+
"prettier:check": "npm prettier:base --check",
|
|
50
52
|
"start": "run-p -c 'start:*'",
|
|
51
53
|
"start:webpack": "webpack serve",
|
|
52
54
|
"start-noconfig": "cross-env NO_CONFIG=true webpack serve",
|
|
53
55
|
"start-local": "run-p -c 'start-local:*'",
|
|
54
56
|
"start-local:webpack": "cross-env LOCAL_JUPYTER_SERVER=true webpack serve",
|
|
55
57
|
"start-local:jupyter-server": "cd ./../.. && make start-jupyter-server",
|
|
56
|
-
"stylelint": "
|
|
58
|
+
"stylelint": "npm stylelint:check --fix",
|
|
57
59
|
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
58
60
|
"test": "jest --coverage",
|
|
59
61
|
"test:visual": "playwright test",
|
|
60
62
|
"typedoc": "typedoc ./src",
|
|
61
|
-
"watch": "run-p watch:src
|
|
62
|
-
"watch:labextension": "jupyter labextension watch .",
|
|
63
|
+
"watch": "run-p watch:src",
|
|
63
64
|
"watch:src": "tsc -w"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"@codemirror/lang-python": "^6.0.1",
|
|
68
|
+
"@codemirror/state": "^6.2.0",
|
|
69
|
+
"@codemirror/view": "^6.7.0",
|
|
67
70
|
"@datalayer/primer-addons": "^0.3.2",
|
|
68
71
|
"@jupyter-widgets/base": "^6.0.0",
|
|
69
72
|
"@jupyter-widgets/controls": "^5.0.0",
|
|
70
73
|
"@jupyter-widgets/html-manager": "^1.0.0",
|
|
71
74
|
"@jupyter-widgets/jupyterlab-manager": "^5.0.0",
|
|
72
75
|
"@jupyter-widgets/output": "^6.0.0",
|
|
73
|
-
"@jupyter/collaboration": "^3.1.0",
|
|
74
76
|
"@jupyter/web-components": "^0.15.3",
|
|
75
77
|
"@jupyter/ydoc": "3.0.2",
|
|
76
78
|
"@jupyterlab/application": "^4.0.0",
|
|
@@ -141,7 +143,7 @@
|
|
|
141
143
|
"react": "^18.2.0",
|
|
142
144
|
"react-dom": "^18.2.0",
|
|
143
145
|
"react-error-boundary": "^3.1.3",
|
|
144
|
-
"react-inspector": "^
|
|
146
|
+
"react-inspector": "^6.0.2",
|
|
145
147
|
"react-sparklines": "^1.7.0",
|
|
146
148
|
"rxjs": "^6.6.0",
|
|
147
149
|
"styled-components": "^5.3.10",
|
|
@@ -149,7 +151,9 @@
|
|
|
149
151
|
"usehooks-ts": "^2.9.1",
|
|
150
152
|
"utf-8-validate": "^6.0.3",
|
|
151
153
|
"wildcard-match": "^5.1.2",
|
|
154
|
+
"y-protocols": "^1.0.5",
|
|
152
155
|
"y-websocket": "^2.1.0",
|
|
156
|
+
"yjs": "^13.5.40",
|
|
153
157
|
"zustand": "^4.4.1"
|
|
154
158
|
},
|
|
155
159
|
"devDependencies": {
|
|
@@ -176,7 +180,6 @@
|
|
|
176
180
|
"@types/plotly.js": "^2.12.31",
|
|
177
181
|
"@types/react": "^18.2.12",
|
|
178
182
|
"@types/react-dom": "^18.2.5",
|
|
179
|
-
"@types/react-inspector": "^4.0.2",
|
|
180
183
|
"@types/react-sparklines": "^1.7.5",
|
|
181
184
|
"@types/semver": "^7.5.6",
|
|
182
185
|
"@types/styled-components": "^5.1.26",
|
|
@@ -203,7 +206,7 @@
|
|
|
203
206
|
"mermaid": "^10.9.0",
|
|
204
207
|
"mkdirp": "^1.0.3",
|
|
205
208
|
"npm-run-all": "^4.1.5",
|
|
206
|
-
"prettier": "
|
|
209
|
+
"prettier": "3.3.2",
|
|
207
210
|
"process": "^0.11.10",
|
|
208
211
|
"rimraf": "^3.0.2",
|
|
209
212
|
"source-map-loader": "^5.0.0",
|
|
@@ -216,10 +219,10 @@
|
|
|
216
219
|
"stylelint-csstree-validator": "^3.0.0",
|
|
217
220
|
"stylelint-prettier": "^4.0.0",
|
|
218
221
|
"svg-url-loader": "^7.1.1",
|
|
219
|
-
"ts-jest": "
|
|
222
|
+
"ts-jest": "29.0.5",
|
|
220
223
|
"ts-loader": "^9.4.3",
|
|
221
224
|
"typedoc": "^0.25.7",
|
|
222
|
-
"typescript": "
|
|
225
|
+
"typescript": "^5.0.3",
|
|
223
226
|
"url-loader": "^3.0.0",
|
|
224
227
|
"watch": "^1.0.2",
|
|
225
228
|
"webpack": "^5.74.0",
|
|
@@ -227,55 +230,6 @@
|
|
|
227
230
|
"webpack-dev-server": "^4.9.3",
|
|
228
231
|
"whatwg-fetch": "^3.6.2"
|
|
229
232
|
},
|
|
230
|
-
"sideEffects": [
|
|
231
|
-
"style/*.css",
|
|
232
|
-
"src/**/*.css",
|
|
233
|
-
"style/index.js"
|
|
234
|
-
],
|
|
235
|
-
"styleModule": "style/index.js",
|
|
236
|
-
"publishConfig": {
|
|
237
|
-
"access": "public"
|
|
238
|
-
},
|
|
239
|
-
"jupyterlab": {
|
|
240
|
-
"disabledExtensions": [
|
|
241
|
-
"@jupyterlab/notebook-extension:factory"
|
|
242
|
-
],
|
|
243
|
-
"discovery": {
|
|
244
|
-
"server": {
|
|
245
|
-
"managers": [
|
|
246
|
-
"pip"
|
|
247
|
-
],
|
|
248
|
-
"base": {
|
|
249
|
-
"name": "jupyter_react"
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
"extension": "./lib/jupyter/lab/plugin.js",
|
|
254
|
-
"outputDir": "jupyter_react/labextension",
|
|
255
|
-
"schemaDir": "schema",
|
|
256
|
-
"sharedPackages": {
|
|
257
|
-
"react": {
|
|
258
|
-
"bundled": false,
|
|
259
|
-
"singleton": true
|
|
260
|
-
},
|
|
261
|
-
"react-dom": {
|
|
262
|
-
"bundled": false,
|
|
263
|
-
"singleton": true
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
"webpackConfig": "./webpack.lab-config.js"
|
|
267
|
-
},
|
|
268
|
-
"jupyter-releaser": {
|
|
269
|
-
"hooks": {
|
|
270
|
-
"before-build-npm": [
|
|
271
|
-
"python -m pip install jupyterlab==4.1.0b0",
|
|
272
|
-
"yarn"
|
|
273
|
-
],
|
|
274
|
-
"before-build-python": [
|
|
275
|
-
"yarn clean:all"
|
|
276
|
-
]
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
233
|
"eslintIgnore": [
|
|
280
234
|
"node_modules",
|
|
281
235
|
"dist",
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datalayer.spec.js","sourceRoot":"","sources":["../../../../src/jupyter/lab/__tests__/datalayer.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './widget';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jupyter/lab/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { NotebookPanel } from '@jupyterlab/notebook';
|
|
2
|
-
import { Cell } from '@jupyterlab/cells';
|
|
3
|
-
export declare class CountdownPromptContentFactory extends NotebookPanel.ContentFactory {
|
|
4
|
-
constructor(options: Cell.ContentFactory.IOptions);
|
|
5
|
-
}
|
|
6
|
-
export default CountdownPromptContentFactory;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
-
*
|
|
4
|
-
* MIT License
|
|
5
|
-
*/
|
|
6
|
-
import { NotebookPanel } from '@jupyterlab/notebook';
|
|
7
|
-
// import { IInputPrompt } from '@jupyterlab/cells';
|
|
8
|
-
// import { IOutputPrompt } from '@jupyterlab/outputarea';
|
|
9
|
-
// import CountdownInputPrompt from '../../../../components/notebook/cell/prompt/CountdownInputPrompt';
|
|
10
|
-
// import CountdownOutputPrompt from '../../../../components/notebook/cell/prompt/CountdownOutputPrompt';
|
|
11
|
-
export class CountdownPromptContentFactory extends NotebookPanel.ContentFactory {
|
|
12
|
-
constructor(options) {
|
|
13
|
-
super(options);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default CountdownPromptContentFactory;
|
|
17
|
-
//# sourceMappingURL=CountdownContentFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CountdownContentFactory.js","sourceRoot":"","sources":["../../../../../src/jupyter/lab/notebook/content/CountdownContentFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,oDAAoD;AACpD,0DAA0D;AAC1D,uGAAuG;AACvG,yGAAyG;AAEzG,MAAM,OAAO,6BAA8B,SAAQ,aAAa,CAAC,cAAc;IAC7E,YAAY,OAAqC;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CAaF;AAED,eAAe,6BAA6B,CAAC"}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/jupyter/lab/notebook/content/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { JupyterFrontEndPlugin } from '@jupyterlab/application';
|
|
2
|
-
import { NotebookPanel } from '@jupyterlab/notebook';
|
|
3
|
-
/**
|
|
4
|
-
* The notebook cell factory provider.
|
|
5
|
-
*/
|
|
6
|
-
export declare const contentFactoryPlugin: JupyterFrontEndPlugin<NotebookPanel.IContentFactory>;
|
|
7
|
-
export default contentFactoryPlugin;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
-
*
|
|
4
|
-
* MIT License
|
|
5
|
-
*/
|
|
6
|
-
import { NotebookPanel } from '@jupyterlab/notebook';
|
|
7
|
-
import { IEditorServices } from '@jupyterlab/codeeditor';
|
|
8
|
-
import { CountdownPromptContentFactory } from './CountdownContentFactory';
|
|
9
|
-
/**
|
|
10
|
-
* The notebook cell factory provider.
|
|
11
|
-
*/
|
|
12
|
-
export const contentFactoryPlugin = {
|
|
13
|
-
id: '@datalayer/jupyter-react:notebook-content-factory',
|
|
14
|
-
description: 'Provides the notebook cell factory.',
|
|
15
|
-
provides: NotebookPanel.IContentFactory,
|
|
16
|
-
requires: [IEditorServices],
|
|
17
|
-
autoStart: true,
|
|
18
|
-
activate: (app, editorServices) => {
|
|
19
|
-
const editorFactory = editorServices.factoryService.newInlineEditor;
|
|
20
|
-
return new CountdownPromptContentFactory({ editorFactory });
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export default contentFactoryPlugin;
|
|
24
|
-
//# sourceMappingURL=plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../src/jupyter/lab/notebook/content/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B;IACE,EAAE,EAAE,mDAAmD;IACvD,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,aAAa,CAAC,eAAe;IACvC,QAAQ,EAAE,CAAC,eAAe,CAAC;IAC3B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,CAAC,GAAoB,EAAE,cAA+B,EAAE,EAAE;QAClE,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC;QACpE,OAAO,IAAI,6BAA6B,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
|