@jupyterlab/codeeditor 4.0.0-alpha.19 → 4.0.0-alpha.20
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/editor.d.ts +29 -100
- package/lib/editor.js +1 -23
- package/lib/editor.js.map +1 -1
- package/lib/factory.d.ts +2 -2
- package/lib/jsoneditor.js +8 -4
- package/lib/jsoneditor.js.map +1 -1
- package/lib/viewer.d.ts +6 -6
- package/lib/viewer.js +10 -5
- package/lib/viewer.js.map +1 -1
- package/lib/widget.d.ts +5 -13
- package/lib/widget.js +4 -12
- package/lib/widget.js.map +1 -1
- package/package.json +19 -17
- package/src/editor.ts +560 -0
- package/src/factory.ts +19 -0
- package/src/index.ts +15 -0
- package/src/jsoneditor.ts +358 -0
- package/src/lineCol.tsx +381 -0
- package/src/mimetype.ts +43 -0
- package/src/tokens.ts +57 -0
- package/src/viewer.ts +93 -0
- package/src/widget.ts +289 -0
package/lib/editor.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import { ISharedText } from '@jupyter/ydoc';
|
|
1
3
|
import { IChangedArgs } from '@jupyterlab/coreutils';
|
|
2
4
|
import { IObservableMap } from '@jupyterlab/observables';
|
|
3
|
-
import { ISharedText } from '@jupyter/ydoc';
|
|
4
5
|
import { ITranslator } from '@jupyterlab/translation';
|
|
5
6
|
import { JSONObject } from '@lumino/coreutils';
|
|
6
7
|
import { IDisposable } from '@lumino/disposable';
|
|
@@ -238,6 +239,9 @@ export declare namespace CodeEditor {
|
|
|
238
239
|
type EdgeLocation = 'top' | 'topLine' | 'bottom';
|
|
239
240
|
/**
|
|
240
241
|
* A widget that provides a code editor.
|
|
242
|
+
*
|
|
243
|
+
* As of JupyterLab 4.0.0, it is not possible to provide an editor
|
|
244
|
+
* that is different of CodeMirror 6.
|
|
241
245
|
*/
|
|
242
246
|
interface IEditor extends ISelectionOwner, IDisposable {
|
|
243
247
|
/**
|
|
@@ -267,15 +271,23 @@ export declare namespace CodeEditor {
|
|
|
267
271
|
/**
|
|
268
272
|
* Get a config option for the editor.
|
|
269
273
|
*/
|
|
270
|
-
getOption
|
|
274
|
+
getOption(option: string): unknown;
|
|
271
275
|
/**
|
|
272
276
|
* Set a config option for the editor.
|
|
273
277
|
*/
|
|
274
|
-
setOption
|
|
278
|
+
setOption(option: string, value: unknown): void;
|
|
275
279
|
/**
|
|
276
280
|
* Set config options for the editor.
|
|
277
281
|
*/
|
|
278
|
-
setOptions(options:
|
|
282
|
+
setOptions(options: Record<string, any>): void;
|
|
283
|
+
/**
|
|
284
|
+
* Inject an extension into the editor
|
|
285
|
+
*
|
|
286
|
+
* @alpha
|
|
287
|
+
* @experimental
|
|
288
|
+
* @param ext Editor extension
|
|
289
|
+
*/
|
|
290
|
+
injectExtension(ext: Extension): void;
|
|
279
291
|
/**
|
|
280
292
|
* Returns the content for the given line number.
|
|
281
293
|
*
|
|
@@ -330,18 +342,6 @@ export declare namespace CodeEditor {
|
|
|
330
342
|
* Explicitly blur the editor.
|
|
331
343
|
*/
|
|
332
344
|
blur(): void;
|
|
333
|
-
/**
|
|
334
|
-
* Resize the editor to fit its host node.
|
|
335
|
-
*/
|
|
336
|
-
resizeToFit(): void;
|
|
337
|
-
/**
|
|
338
|
-
* Add a keydown handler to the editor.
|
|
339
|
-
*
|
|
340
|
-
* @param handler - A keydown handler.
|
|
341
|
-
*
|
|
342
|
-
* @returns A disposable that can be used to remove the handler.
|
|
343
|
-
*/
|
|
344
|
-
addKeydownHandler(handler: KeydownHandler): IDisposable;
|
|
345
345
|
/**
|
|
346
346
|
* Reveals the given position in the editor.
|
|
347
347
|
*
|
|
@@ -351,7 +351,7 @@ export declare namespace CodeEditor {
|
|
|
351
351
|
/**
|
|
352
352
|
* Reveals the given selection in the editor.
|
|
353
353
|
*
|
|
354
|
-
* @param
|
|
354
|
+
* @param selection - The desired selection to reveal.
|
|
355
355
|
*/
|
|
356
356
|
revealSelection(selection: IRange): void;
|
|
357
357
|
/**
|
|
@@ -396,85 +396,6 @@ export declare namespace CodeEditor {
|
|
|
396
396
|
* A factory used to create a code editor.
|
|
397
397
|
*/
|
|
398
398
|
type Factory = (options: IOptions) => CodeEditor.IEditor;
|
|
399
|
-
/**
|
|
400
|
-
* The configuration options for an editor.
|
|
401
|
-
*/
|
|
402
|
-
interface IConfig {
|
|
403
|
-
/**
|
|
404
|
-
* Half-period in milliseconds used for cursor blinking.
|
|
405
|
-
* By setting this to zero, blinking can be disabled.
|
|
406
|
-
* A negative value hides the cursor entirely.
|
|
407
|
-
*/
|
|
408
|
-
cursorBlinkRate: number;
|
|
409
|
-
/**
|
|
410
|
-
* User preferred font family for text editors.
|
|
411
|
-
*/
|
|
412
|
-
fontFamily: string | null;
|
|
413
|
-
/**
|
|
414
|
-
* User preferred size in pixel of the font used in text editors.
|
|
415
|
-
*/
|
|
416
|
-
fontSize: number | null;
|
|
417
|
-
/**
|
|
418
|
-
* User preferred text line height, as a multiplier of font size.
|
|
419
|
-
*/
|
|
420
|
-
lineHeight: number | null;
|
|
421
|
-
/**
|
|
422
|
-
* Whether line numbers should be displayed.
|
|
423
|
-
*/
|
|
424
|
-
lineNumbers: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* Control the line wrapping of the editor. Possible values are:
|
|
427
|
-
* - "off", lines will never wrap.
|
|
428
|
-
* - "on", lines will wrap at the viewport border.
|
|
429
|
-
* - "wordWrapColumn", lines will wrap at `wordWrapColumn`.
|
|
430
|
-
* - "bounded", lines will wrap at minimum between viewport width and wordWrapColumn.
|
|
431
|
-
*/
|
|
432
|
-
lineWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded';
|
|
433
|
-
/**
|
|
434
|
-
* Whether the editor is read-only.
|
|
435
|
-
*/
|
|
436
|
-
readOnly: boolean;
|
|
437
|
-
/**
|
|
438
|
-
* The number of spaces a tab is equal to.
|
|
439
|
-
*/
|
|
440
|
-
tabSize: number;
|
|
441
|
-
/**
|
|
442
|
-
* Whether to insert spaces when pressing Tab.
|
|
443
|
-
*/
|
|
444
|
-
insertSpaces: boolean;
|
|
445
|
-
/**
|
|
446
|
-
* Whether to highlight matching brackets when one of them is selected.
|
|
447
|
-
*/
|
|
448
|
-
matchBrackets: boolean;
|
|
449
|
-
/**
|
|
450
|
-
* Whether to automatically close brackets after opening them.
|
|
451
|
-
*/
|
|
452
|
-
autoClosingBrackets: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* Whether the editor should handle paste events.
|
|
455
|
-
*/
|
|
456
|
-
handlePaste?: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* The column where to break text line.
|
|
459
|
-
*/
|
|
460
|
-
wordWrapColumn: number;
|
|
461
|
-
/**
|
|
462
|
-
* Column index at which rulers should be added.
|
|
463
|
-
*/
|
|
464
|
-
rulers: Array<number>;
|
|
465
|
-
/**
|
|
466
|
-
* Whether to allow code folding
|
|
467
|
-
*/
|
|
468
|
-
codeFolding: boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Whether to highlight trailing whitespace
|
|
471
|
-
*/
|
|
472
|
-
showTrailingSpace: boolean;
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* The default configuration options for an editor.
|
|
476
|
-
*/
|
|
477
|
-
const defaultConfig: IConfig;
|
|
478
399
|
/**
|
|
479
400
|
* The options used to initialize an editor.
|
|
480
401
|
*/
|
|
@@ -488,17 +409,25 @@ export declare namespace CodeEditor {
|
|
|
488
409
|
*/
|
|
489
410
|
model: IModel;
|
|
490
411
|
/**
|
|
491
|
-
* The
|
|
412
|
+
* The configuration options for the editor.
|
|
492
413
|
*/
|
|
493
|
-
|
|
414
|
+
config?: Record<string, any>;
|
|
494
415
|
/**
|
|
495
|
-
*
|
|
416
|
+
* List of editor extensions to be added.
|
|
417
|
+
*/
|
|
418
|
+
extensions?: Extension[];
|
|
419
|
+
/**
|
|
420
|
+
* Whether the editor will be inline or not.
|
|
496
421
|
*/
|
|
497
|
-
|
|
422
|
+
inline?: boolean;
|
|
498
423
|
/**
|
|
499
424
|
* The configuration options for the editor.
|
|
500
425
|
*/
|
|
501
426
|
translator?: ITranslator;
|
|
427
|
+
/**
|
|
428
|
+
* The desired uuid for the editor.
|
|
429
|
+
*/
|
|
430
|
+
uuid?: string;
|
|
502
431
|
}
|
|
503
432
|
namespace Model {
|
|
504
433
|
interface IOptions {
|
package/lib/editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { ObservableMap } from '@jupyterlab/observables';
|
|
4
3
|
import { YFile } from '@jupyter/ydoc';
|
|
4
|
+
import { ObservableMap } from '@jupyterlab/observables';
|
|
5
5
|
import { Signal } from '@lumino/signaling';
|
|
6
6
|
/**
|
|
7
7
|
* A namespace for code editors.
|
|
@@ -87,27 +87,5 @@ export var CodeEditor;
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
CodeEditor.Model = Model;
|
|
90
|
-
/**
|
|
91
|
-
* The default configuration options for an editor.
|
|
92
|
-
*/
|
|
93
|
-
CodeEditor.defaultConfig = {
|
|
94
|
-
// Order matters as gutters will be sorted by the configuration order
|
|
95
|
-
autoClosingBrackets: false,
|
|
96
|
-
cursorBlinkRate: 530,
|
|
97
|
-
fontFamily: null,
|
|
98
|
-
fontSize: null,
|
|
99
|
-
handlePaste: true,
|
|
100
|
-
insertSpaces: true,
|
|
101
|
-
lineHeight: null,
|
|
102
|
-
lineNumbers: false,
|
|
103
|
-
lineWrap: 'on',
|
|
104
|
-
matchBrackets: true,
|
|
105
|
-
readOnly: false,
|
|
106
|
-
tabSize: 4,
|
|
107
|
-
rulers: [],
|
|
108
|
-
showTrailingSpace: false,
|
|
109
|
-
wordWrapColumn: 80,
|
|
110
|
-
codeFolding: false
|
|
111
|
-
};
|
|
112
90
|
})(CodeEditor || (CodeEditor = {}));
|
|
113
91
|
//# sourceMappingURL=editor.js.map
|
package/lib/editor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAe,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAkB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxE,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,KAAW,UAAU,CA2hB1B;AA3hBD,WAAiB,UAAU;IAsIzB;;OAEG;IACH,MAAa,KAAK;QAChB;;WAEG;QACH,YAAY,UAA0B,EAAE;;YAmExC;;eAEG;YACO,oBAAe,GAAG,KAAK,CAAC;YAE1B,gBAAW,GAAG,KAAK,CAAC;YACpB,gBAAW,GAAG,IAAI,aAAa,EAAoB,CAAC;YACpD,cAAS,GAAG,YAAY,CAAC;YACzB,qBAAgB,GAAG,IAAI,MAAM,CAA6B,IAAI,CAAC,CAAC;YA1EtE,gDAAgD;YAChD,IAAI,CAAC,eAAe,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,WAAW,CAAC;YAClE,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,CAAC,WAAW,mCAAI,IAAI,KAAK,EAAE,CAAC;YACtD,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,YAAY,CAAC;QACpD,CAAC;QAOD;;WAEG;QACH,IAAI,eAAe;YACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;QAC/B,CAAC;QAED;;WAEG;QACH,IAAI,UAAU;YACZ,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED;;WAEG;QACH,IAAI,QAAQ;YACV,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QACD,IAAI,QAAQ,CAAC,QAAgB;YAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,QAAQ,KAAK,QAAQ,EAAE;gBACzB,OAAO;aACR;YACD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;YAC1B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBACzB,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,QAAQ;gBAClB,QAAQ,EAAE,QAAQ;aACnB,CAAC,CAAC;QACL,CAAC;QAED;;WAEG;QACH,IAAI,UAAU;YACZ,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED;;WAEG;QACH,OAAO;YACL,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,OAAO;aACR;YACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;aAC5B;YACD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;KAWF;IAhFY,gBAAK,QAgFjB,CAAA;AAkUH,CAAC,EA3hBgB,UAAU,KAAV,UAAU,QA2hB1B"}
|
package/lib/factory.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ export interface IEditorFactoryService {
|
|
|
6
6
|
/**
|
|
7
7
|
* Create a new editor for inline code.
|
|
8
8
|
*/
|
|
9
|
-
newInlineEditor
|
|
9
|
+
newInlineEditor: CodeEditor.Factory;
|
|
10
10
|
/**
|
|
11
11
|
* Create a new editor for a full document.
|
|
12
12
|
*/
|
|
13
|
-
newDocumentEditor
|
|
13
|
+
newDocumentEditor: CodeEditor.Factory;
|
|
14
14
|
}
|
package/lib/jsoneditor.js
CHANGED
|
@@ -55,12 +55,16 @@ export class JSONEditor extends Widget {
|
|
|
55
55
|
this.headerNode.appendChild(this.commitButtonNode);
|
|
56
56
|
this.node.appendChild(this.headerNode);
|
|
57
57
|
this.node.appendChild(this.editorHostNode);
|
|
58
|
-
const model = new CodeEditor.Model();
|
|
59
|
-
model.mimeType = 'application/json';
|
|
58
|
+
const model = new CodeEditor.Model({ mimeType: 'application/json' });
|
|
60
59
|
model.sharedModel.changed.connect(this._onModelChanged, this);
|
|
61
60
|
this.model = model;
|
|
62
|
-
this.editor = options.editorFactory({
|
|
63
|
-
|
|
61
|
+
this.editor = options.editorFactory({
|
|
62
|
+
host: this.editorHostNode,
|
|
63
|
+
model,
|
|
64
|
+
config: {
|
|
65
|
+
readOnly: true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
66
70
|
* The observable source.
|
package/lib/jsoneditor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsoneditor.js","sourceRoot":"","sources":["../src/jsoneditor.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAI3D,OAAO,EAEL,cAAc,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,GAAG,cAAc,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC;;GAEG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,MAAM;IACpC;;OAEG;IACH,YAAY,OAA4B;Q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,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAChC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,KAAK,KAAK,CAAC,EAAE;YACtB,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;SAC3C;aAAM;YACL,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC/C,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;YAC9B,uCAAuC;YACvC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBACxC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;aACvD;SACF;QACD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC;IACtC,CAAC;CASF"}
|
package/lib/viewer.d.ts
CHANGED
|
@@ -26,16 +26,16 @@ export declare namespace CodeViewerWidget {
|
|
|
26
26
|
/**
|
|
27
27
|
* The content model for the viewer.
|
|
28
28
|
*/
|
|
29
|
-
model: CodeEditor.
|
|
29
|
+
model: CodeEditor.IModel;
|
|
30
|
+
/**
|
|
31
|
+
* Code editor options
|
|
32
|
+
*/
|
|
33
|
+
editorOptions?: Omit<CodeEditor.IOptions, 'host' | 'model'>;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* The options used to create an code viewer widget without a model.
|
|
33
37
|
*/
|
|
34
|
-
interface INoModelOptions {
|
|
35
|
-
/**
|
|
36
|
-
* A code editor factory.
|
|
37
|
-
*/
|
|
38
|
-
factory: CodeEditor.Factory;
|
|
38
|
+
interface INoModelOptions extends Omit<IOptions, 'model'> {
|
|
39
39
|
/**
|
|
40
40
|
* The content to display in the viewer.
|
|
41
41
|
*/
|
package/lib/viewer.js
CHANGED
|
@@ -8,23 +8,28 @@ export class CodeViewerWidget extends Widget {
|
|
|
8
8
|
* Construct a new code viewer widget.
|
|
9
9
|
*/
|
|
10
10
|
constructor(options) {
|
|
11
|
+
var _a;
|
|
11
12
|
super();
|
|
12
13
|
this.model = options.model;
|
|
13
14
|
const editorWidget = new CodeEditorWrapper({
|
|
14
15
|
factory: options.factory,
|
|
15
|
-
model:
|
|
16
|
+
model: this.model,
|
|
17
|
+
editorOptions: {
|
|
18
|
+
...options.editorOptions,
|
|
19
|
+
config: { ...(_a = options.editorOptions) === null || _a === void 0 ? void 0 : _a.config, readOnly: true }
|
|
20
|
+
}
|
|
16
21
|
});
|
|
17
22
|
this.editor = editorWidget.editor;
|
|
18
|
-
this.editor.setOption('readOnly', true);
|
|
19
23
|
const layout = (this.layout = new StackedLayout());
|
|
20
24
|
layout.addWidget(editorWidget);
|
|
21
25
|
}
|
|
22
26
|
static createCodeViewer(options) {
|
|
27
|
+
const { content, mimeType, ...others } = options;
|
|
23
28
|
const model = new CodeEditor.Model({
|
|
24
|
-
mimeType
|
|
29
|
+
mimeType
|
|
25
30
|
});
|
|
26
|
-
model.sharedModel.setSource(
|
|
27
|
-
const widget = new CodeViewerWidget({
|
|
31
|
+
model.sharedModel.setSource(content);
|
|
32
|
+
const widget = new CodeViewerWidget({ ...others, model });
|
|
28
33
|
widget.disposed.connect(() => {
|
|
29
34
|
model.dispose();
|
|
30
35
|
});
|
package/lib/viewer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../src/viewer.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAC1C;;OAEG;IACH,YAAY,OAAkC
|
|
1
|
+
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../src/viewer.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAC1C;;OAEG;IACH,YAAY,OAAkC;;QAC5C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAE3B,MAAM,YAAY,GAAG,IAAI,iBAAiB,CAAC;YACzC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE;gBACb,GAAG,OAAO,CAAC,aAAa;gBACxB,MAAM,EAAE,EAAE,GAAG,MAAA,OAAO,CAAC,aAAa,0CAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;aAC7D;SACF,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;QAElC,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,gBAAgB,CACrB,OAAyC;QAEzC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;QACjD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC;YACjC,QAAQ;SACT,CAAC,CAAC;QACH,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE;YAC3B,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CAIF"}
|
package/lib/widget.d.ts
CHANGED
|
@@ -44,10 +44,6 @@ export declare class CodeEditorWrapper extends Widget {
|
|
|
44
44
|
* Handle `before-detach` messages for the widget.
|
|
45
45
|
*/
|
|
46
46
|
protected onBeforeDetach(msg: Message): void;
|
|
47
|
-
/**
|
|
48
|
-
* A message handler invoked on a `'resize'` message.
|
|
49
|
-
*/
|
|
50
|
-
protected onResize(msg: Widget.ResizeMessage): void;
|
|
51
47
|
/**
|
|
52
48
|
* Handle a change in model selections.
|
|
53
49
|
*/
|
|
@@ -81,21 +77,17 @@ export declare namespace CodeEditorWrapper {
|
|
|
81
77
|
* A code editor factory.
|
|
82
78
|
*
|
|
83
79
|
* #### Notes
|
|
84
|
-
* The widget needs a factory and a
|
|
85
|
-
*
|
|
80
|
+
* The widget needs a factory and a the editor options
|
|
81
|
+
* because it needs to provide its own node as the host.
|
|
86
82
|
*/
|
|
87
83
|
factory: CodeEditor.Factory;
|
|
88
84
|
/**
|
|
89
|
-
* The model
|
|
85
|
+
* The content model for the wrapper.
|
|
90
86
|
*/
|
|
91
87
|
model: CodeEditor.IModel;
|
|
92
88
|
/**
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
uuid?: string;
|
|
96
|
-
/**
|
|
97
|
-
* The configuration options for the editor.
|
|
89
|
+
* Code editor options
|
|
98
90
|
*/
|
|
99
|
-
|
|
91
|
+
editorOptions?: Omit<CodeEditor.IOptions, 'host' | 'model'>;
|
|
100
92
|
}
|
|
101
93
|
}
|
package/lib/widget.js
CHANGED
|
@@ -27,11 +27,11 @@ export class CodeEditorWrapper extends Widget {
|
|
|
27
27
|
*/
|
|
28
28
|
constructor(options) {
|
|
29
29
|
super();
|
|
30
|
-
const
|
|
30
|
+
const { factory, model, editorOptions } = options;
|
|
31
|
+
const editor = (this.editor = factory({
|
|
31
32
|
host: this.node,
|
|
32
|
-
model
|
|
33
|
-
|
|
34
|
-
config: options.config
|
|
33
|
+
model,
|
|
34
|
+
...editorOptions
|
|
35
35
|
}));
|
|
36
36
|
editor.model.selections.changed.connect(this._onSelectionsChanged, this);
|
|
37
37
|
}
|
|
@@ -106,14 +106,6 @@ export class CodeEditorWrapper extends Widget {
|
|
|
106
106
|
node.removeEventListener('lm-dragover', this);
|
|
107
107
|
node.removeEventListener('lm-drop', this);
|
|
108
108
|
}
|
|
109
|
-
/**
|
|
110
|
-
* A message handler invoked on a `'resize'` message.
|
|
111
|
-
*/
|
|
112
|
-
onResize(msg) {
|
|
113
|
-
if (this.isVisible) {
|
|
114
|
-
this.editor.resizeToFit();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
109
|
/**
|
|
118
110
|
* Handle a change in model selections.
|
|
119
111
|
*/
|
package/lib/widget.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../src/widget.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAK3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;GAEG;AACH,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,MAAM,+BAA+B,GAAG,8BAA8B,CAAC;AAEvE;;GAEG;AACH,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,MAAM;IAC3C;;OAEG;IACH,YAAY,OAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../src/widget.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAK3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;GAEG;AACH,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,MAAM,+BAA+B,GAAG,8BAA8B,CAAC;AAEvE;;GAEG;AACH,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,MAAM;IAC3C;;OAEG;IACH,YAAY,OAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;QAClD,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK;YACL,GAAG,aAAa;SACjB,CAAC,CAAC,CAA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AC,KAAK,EAAE,CAAC;QAC3B,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1D,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAW,CAAC;IAC1C,CAAC;IAPe,oBAAY,eAO3B,CAAA;AACH,CAAC,EAZS,OAAO,KAAP,OAAO,QAYhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/codeeditor",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.20",
|
|
4
4
|
"description": "JupyterLab - Abstract Code Editor",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"lib/*.js.map",
|
|
28
28
|
"lib/*.js",
|
|
29
29
|
"style/*.css",
|
|
30
|
-
"style/index.js"
|
|
30
|
+
"style/index.js",
|
|
31
|
+
"src/**/*.{ts,tsx}"
|
|
31
32
|
],
|
|
32
33
|
"scripts": {
|
|
33
34
|
"build": "tsc -b",
|
|
@@ -41,27 +42,28 @@
|
|
|
41
42
|
"watch": "tsc -b --watch"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
45
|
+
"@codemirror/state": "^6.2.0",
|
|
44
46
|
"@jupyter/ydoc": "^0.3.1",
|
|
45
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
46
|
-
"@jupyterlab/nbformat": "^4.0.0-alpha.
|
|
47
|
-
"@jupyterlab/observables": "^5.0.0-alpha.
|
|
48
|
-
"@jupyterlab/statusbar": "^4.0.0-alpha.
|
|
49
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
50
|
-
"@jupyterlab/ui-components": "^4.0.0-alpha.
|
|
51
|
-
"@lumino/coreutils": "^2.0.0-
|
|
52
|
-
"@lumino/disposable": "^2.0.0-
|
|
53
|
-
"@lumino/dragdrop": "^2.0.0-
|
|
54
|
-
"@lumino/messaging": "^2.0.0-
|
|
55
|
-
"@lumino/signaling": "^2.0.0-
|
|
56
|
-
"@lumino/widgets": "^2.0.0-
|
|
47
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.20",
|
|
48
|
+
"@jupyterlab/nbformat": "^4.0.0-alpha.20",
|
|
49
|
+
"@jupyterlab/observables": "^5.0.0-alpha.20",
|
|
50
|
+
"@jupyterlab/statusbar": "^4.0.0-alpha.20",
|
|
51
|
+
"@jupyterlab/translation": "^4.0.0-alpha.20",
|
|
52
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.35",
|
|
53
|
+
"@lumino/coreutils": "^2.0.0-rc.0",
|
|
54
|
+
"@lumino/disposable": "^2.0.0-rc.0",
|
|
55
|
+
"@lumino/dragdrop": "^2.0.0-rc.0",
|
|
56
|
+
"@lumino/messaging": "^2.0.0-rc.0",
|
|
57
|
+
"@lumino/signaling": "^2.0.0-rc.0",
|
|
58
|
+
"@lumino/widgets": "^2.0.0-rc.0",
|
|
57
59
|
"react": "^18.2.0"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
|
-
"@jupyterlab/testing": "^4.0.0-alpha.
|
|
62
|
+
"@jupyterlab/testing": "^4.0.0-alpha.20",
|
|
61
63
|
"@types/jest": "^29.2.0",
|
|
62
64
|
"rimraf": "~3.0.0",
|
|
63
|
-
"typedoc": "~0.
|
|
64
|
-
"typescript": "~
|
|
65
|
+
"typedoc": "~0.23.25",
|
|
66
|
+
"typescript": "~5.0.0-beta"
|
|
65
67
|
},
|
|
66
68
|
"publishConfig": {
|
|
67
69
|
"access": "public"
|