@datalayer/jupyter-react 0.20.1 → 0.21.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.
Files changed (78) hide show
  1. package/lib/app/JupyterReact.d.ts +1 -1
  2. package/lib/app/JupyterReact.js +1 -1
  3. package/lib/app/JupyterReact.js.map +1 -1
  4. package/lib/app/index.d.ts +1 -0
  5. package/lib/{jupyter/lab → app}/index.js +1 -1
  6. package/lib/app/index.js.map +1 -0
  7. package/lib/components/jupyterlab/JupyterLabAppAdapter.js +1 -1
  8. package/lib/components/jupyterlab/JupyterLabAppAdapter.js.map +1 -1
  9. package/lib/components/jupyterlab/JupyterLabAppPlugins.js +2 -2
  10. package/lib/components/jupyterlab/JupyterLabAppPlugins.js.map +1 -1
  11. package/lib/components/kernel/inspector/widget.js +2 -1
  12. package/lib/components/kernel/inspector/widget.js.map +1 -1
  13. package/lib/components/notebook/BaseNotebook.d.ts +4 -8
  14. package/lib/components/notebook/BaseNotebook.js +111 -53
  15. package/lib/components/notebook/BaseNotebook.js.map +1 -1
  16. package/lib/components/notebook/SimpleNotebook.d.ts +1 -5
  17. package/lib/components/notebook/SimpleNotebook.js +2 -2
  18. package/lib/components/notebook/SimpleNotebook.js.map +1 -1
  19. package/lib/examples/JupyterLabApp.js +0 -2
  20. package/lib/examples/JupyterLabApp.js.map +1 -1
  21. package/lib/index.d.ts +1 -0
  22. package/lib/index.js +1 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib/jupyter/index.d.ts +0 -1
  25. package/lib/jupyter/index.js +0 -1
  26. package/lib/jupyter/index.js.map +1 -1
  27. package/lib/jupyter/services/ServiceManagerLess.d.ts +1 -0
  28. package/lib/jupyter/services/ServiceManagerLess.js +1 -0
  29. package/lib/jupyter/services/ServiceManagerLess.js.map +1 -1
  30. package/lib/theme/JupyterLabCss.d.ts +4 -8
  31. package/lib/theme/JupyterLabCss.js +8 -8
  32. package/lib/theme/JupyterLabCss.js.map +1 -1
  33. package/lib/theme/JupyterReactTheme.d.ts +6 -9
  34. package/lib/theme/JupyterReactTheme.js +4 -9
  35. package/lib/theme/JupyterReactTheme.js.map +1 -1
  36. package/lib/utils/cursorExtension.d.ts +23 -0
  37. package/lib/utils/cursorExtension.js +292 -0
  38. package/lib/utils/cursorExtension.js.map +1 -0
  39. package/lib/utils/index.d.ts +1 -0
  40. package/lib/utils/index.js +1 -0
  41. package/lib/utils/index.js.map +1 -1
  42. package/package.json +29 -75
  43. package/lib/jupyter/lab/__tests__/datalayer.spec.d.ts +0 -0
  44. package/lib/jupyter/lab/__tests__/datalayer.spec.js +0 -11
  45. package/lib/jupyter/lab/__tests__/datalayer.spec.js.map +0 -1
  46. package/lib/jupyter/lab/index.d.ts +0 -1
  47. package/lib/jupyter/lab/index.js.map +0 -1
  48. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.d.ts +0 -6
  49. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +0 -17
  50. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +0 -1
  51. package/lib/jupyter/lab/notebook/content/index.d.ts +0 -0
  52. package/lib/jupyter/lab/notebook/content/index.js +0 -6
  53. package/lib/jupyter/lab/notebook/content/index.js.map +0 -1
  54. package/lib/jupyter/lab/notebook/content/plugin.d.ts +0 -7
  55. package/lib/jupyter/lab/notebook/content/plugin.js +0 -24
  56. package/lib/jupyter/lab/notebook/content/plugin.js.map +0 -1
  57. package/lib/jupyter/lab/notebook/editor/history.d.ts +0 -193
  58. package/lib/jupyter/lab/notebook/editor/history.js +0 -304
  59. package/lib/jupyter/lab/notebook/editor/history.js.map +0 -1
  60. package/lib/jupyter/lab/notebook/editor/index.d.ts +0 -0
  61. package/lib/jupyter/lab/notebook/editor/index.js +0 -6
  62. package/lib/jupyter/lab/notebook/editor/index.js.map +0 -1
  63. package/lib/jupyter/lab/notebook/editor/plugin.d.ts +0 -7
  64. package/lib/jupyter/lab/notebook/editor/plugin.js +0 -62
  65. package/lib/jupyter/lab/notebook/editor/plugin.js.map +0 -1
  66. package/lib/jupyter/lab/notebook/editor/widgetfactory.d.ts +0 -96
  67. package/lib/jupyter/lab/notebook/editor/widgetfactory.js +0 -89
  68. package/lib/jupyter/lab/notebook/editor/widgetfactory.js.map +0 -1
  69. package/lib/jupyter/lab/notebook/index.d.ts +0 -0
  70. package/lib/jupyter/lab/notebook/index.js +0 -6
  71. package/lib/jupyter/lab/notebook/index.js.map +0 -1
  72. package/lib/jupyter/lab/plugin.d.ts +0 -4
  73. package/lib/jupyter/lab/plugin.js +0 -104
  74. package/lib/jupyter/lab/plugin.js.map +0 -1
  75. package/lib/jupyter/lab/widget.d.ts +0 -8
  76. package/lib/jupyter/lab/widget.js +0 -15
  77. package/lib/jupyter/lab/widget.js.map +0 -1
  78. package/schema/plugin.json +0 -52
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/jupyter-react",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
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
- "packageManager": "yarn@3.5.0",
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 && (yarn build:labextension:dev || true)",
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 && yarn clean && yarn build:lib && yarn build:labextension",
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": "yarn clean:lib && yarn clean:labextension && yarn clean:lintcache",
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": "yarn eslint:check --fix",
43
+ "eslint": "npm eslint:check --fix",
39
44
  "eslint:check": "eslint . --cache --ext .ts,.tsx",
40
- "install:extension": "yarn build",
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": "yarn stylelint && yarn prettier && yarn eslint",
46
- "lint:check": "yarn stylelint:check && yarn prettier:check && yarn eslint:check",
47
- "prettier": "yarn prettier:base --write --list-different",
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": "yarn prettier:base --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": "yarn stylelint:check --fix",
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 watch:labextension",
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": "^5.1.1",
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": "^3.0.0",
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": "^29.0.5",
222
+ "ts-jest": "29.0.5",
220
223
  "ts-loader": "^9.4.3",
221
224
  "typedoc": "^0.25.7",
222
- "typescript": "~5.0.3",
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,11 +0,0 @@
1
- /*
2
- * Copyright (c) 2021-2023 Datalayer, Inc.
3
- *
4
- * MIT License
5
- */
6
- describe('@datalayer/jupyter-react', () => {
7
- it('should be tested', () => {
8
- expect(1 + 1).toEqual(2);
9
- });
10
- });
11
- //# sourceMappingURL=datalayer.spec.js.map
@@ -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,6 +0,0 @@
1
- /*
2
- * Copyright (c) 2021-2023 Datalayer, Inc.
3
- *
4
- * MIT License
5
- */
6
- //# sourceMappingURL=index.js.map
@@ -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"}
@@ -1,193 +0,0 @@
1
- import { Cell } from '@jupyterlab/cells';
2
- import { ISessionContext } from '@jupyterlab/apputils';
3
- import { CodeEditor } from '@jupyterlab/codeeditor';
4
- import { KernelMessage } from '@jupyterlab/services';
5
- import { ITranslator } from '@jupyterlab/translation';
6
- import { IDisposable } from '@lumino/disposable';
7
- /**
8
- * The definition of a console history manager object.
9
- */
10
- export interface INotebookHistory extends IDisposable {
11
- /**
12
- * The current editor used by the history widget.
13
- */
14
- editor: CodeEditor.IEditor | null;
15
- /**
16
- * The placeholder text that a history session began with.
17
- */
18
- readonly placeholder: string;
19
- /**
20
- * The session number of the current kernel session
21
- */
22
- readonly kernelSession: string;
23
- /**
24
- * Get the previous item in the console history.
25
- *
26
- * @param activeCell - The currently selected Cell in the notebook.
27
- *
28
- * @returns A Promise for console command text or `undefined` if unavailable.
29
- */
30
- back(activeCell: Cell): Promise<string | undefined>;
31
- /**
32
- * Get the next item in the console history.
33
- *
34
- * @param activeCell - The currently selected Cell in the notebook.
35
- *
36
- * @returns A Promise for console command text or `undefined` if unavailable.
37
- */
38
- forward(activeCell: Cell): Promise<string | undefined>;
39
- /**
40
- * Reset the history navigation state, i.e., start a new history session.
41
- */
42
- reset(): void;
43
- /**
44
- * Get the next item in the console history.
45
- *
46
- * @param activeCell - The currently selected Cell in the notebook.
47
- * @param content - the result from back or forward
48
- */
49
- updateEditor(activeCell: Cell, content: string | undefined): void;
50
- }
51
- /**
52
- * A console history manager object.
53
- */
54
- export declare class NotebookHistory implements INotebookHistory {
55
- /**
56
- * Construct a new console history object.
57
- */
58
- constructor(options: NotebookHistory.IOptions);
59
- /**
60
- * The client session used to query history.
61
- */
62
- private _sessionContext;
63
- /**
64
- * Translator to be used for warnings
65
- */
66
- private _trans;
67
- /**
68
- * The number of history items to request.
69
- */
70
- private _toRequest;
71
- /**
72
- * The number of history items to increase a batch size by per subsequent request.
73
- */
74
- private _requestBatchSize;
75
- /**
76
- * The current editor used by the history manager.
77
- */
78
- get editor(): CodeEditor.IEditor | null;
79
- set editor(value: CodeEditor.IEditor | null);
80
- /**
81
- * The placeholder text that a history session began with.
82
- */
83
- get placeholder(): string;
84
- /**
85
- * Kernel session number for filtering
86
- */
87
- get kernelSession(): string;
88
- /**
89
- * Get whether the notebook history manager is disposed.
90
- */
91
- get isDisposed(): boolean;
92
- /**
93
- * Dispose of the resources held by the notebook history manager.
94
- */
95
- dispose(): void;
96
- /**
97
- * Set placeholder and editor. Start session if one is not already started.
98
- *
99
- * @param activeCell - The currently selected Cell in the notebook.
100
- */
101
- protected checkSession(activeCell: Cell): Promise<void>;
102
- /**
103
- * Get the previous item in the notebook history.
104
- *
105
- * @param activeCell - The currently selected Cell in the notebook.
106
- *
107
- * @returns A Promise resolving to the historical cell content text.
108
- */
109
- back(activeCell: Cell): Promise<string | undefined>;
110
- /**
111
- * Get the next item in the notebook history.
112
- *
113
- * @param activeCell - The currently selected Cell in the notebook.
114
- *
115
- * @returns A Promise resolving to the historical cell content text.
116
- */
117
- forward(activeCell: Cell): Promise<string | undefined>;
118
- /**
119
- * Update the editor of the cell with provided text content.
120
- *
121
- * @param activeCell - The currently selected Cell in the notebook.
122
- * @param content - the result from back or forward
123
- */
124
- updateEditor(activeCell: Cell, content: string | undefined): void;
125
- /**
126
- * Reset the history navigation state, i.e., start a new history session.
127
- */
128
- reset(): void;
129
- /**
130
- * Fetches a subsequent batch of history. Updates the filtered history and cursor to correct place in history,
131
- * accounting for potentially new history items above it.
132
- */
133
- private fetchBatch;
134
- /**
135
- * Populate the history collection on history reply from a kernel.
136
- *
137
- * @param value The kernel message history reply.
138
- *
139
- * #### Notes
140
- * History entries have the shape:
141
- * [session: number, line: number, input: string]
142
- * Contiguous duplicates are stripped out of the API response.
143
- */
144
- protected onHistory(value: KernelMessage.IHistoryReplyMsg, cell?: Cell): void;
145
- /**
146
- * Handle a text change signal from the editor.
147
- */
148
- protected onTextChange(): void;
149
- /**
150
- * Handle the current kernel changing.
151
- */
152
- private _handleKernel;
153
- /**
154
- * retrieve the history from the kernel
155
- *
156
- * @param cell - The string to use when filtering the data.
157
- */
158
- private _retrieveHistory;
159
- /**
160
- * Set the filter data.
161
- *
162
- * @param filterStr - The string to use when filtering the data.
163
- */
164
- protected setFilter(filterStr?: string): void;
165
- private _cursor;
166
- private _hasSession;
167
- private _history;
168
- private _placeholder;
169
- private _kernelSession;
170
- private _setByHistory;
171
- private _isDisposed;
172
- private _editor;
173
- private _filtered;
174
- private _kernel;
175
- }
176
- /**
177
- * A namespace for NotebookHistory statics.
178
- */
179
- export declare namespace NotebookHistory {
180
- /**
181
- * The initialization options for a console history object.
182
- */
183
- interface IOptions {
184
- /**
185
- * The client session used by the foreign handler.
186
- */
187
- sessionContext: ISessionContext;
188
- /**
189
- * The application language translator.
190
- */
191
- translator?: ITranslator;
192
- }
193
- }