@datalayer/jupyter-react 1.1.8 → 1.1.9
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/components/cell/Cell.d.ts +3 -6
- package/lib/components/cell/Cell.js +2 -11
- package/lib/components/cell/Cell.js.map +1 -1
- package/lib/components/cell/CellAdapter.d.ts +1 -1
- package/lib/components/codemirror/CodeMirrorOutputToolbar.d.ts +2 -2
- package/lib/components/codemirror/CodeMirrorOutputToolbar.js.map +1 -1
- package/lib/components/console/ConsoleAdapter.d.ts +1 -1
- package/lib/components/console/ConsoleAdapter.js +1 -1
- package/lib/components/console/ConsoleAdapter.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabApp.d.ts +16 -19
- package/lib/components/jupyterlab/JupyterLabApp.js +21 -21
- package/lib/components/jupyterlab/JupyterLabApp.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabAppAdapter.d.ts +4 -4
- package/lib/components/jupyterlab/JupyterLabAppAdapter.js +1 -1
- package/lib/components/jupyterlab/JupyterLabAppAdapter.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +1 -4
- package/lib/components/jupyterlab/JupyterLabAppCss.js +1 -5
- package/lib/components/jupyterlab/JupyterLabAppCss.js.map +1 -1
- package/lib/components/kernel/KernelActionMenu.d.ts +2 -2
- package/lib/components/kernel/KernelActionMenu.js.map +1 -1
- package/lib/components/kernel/KernelDetective.d.ts +1 -1
- package/lib/components/kernel/KernelInspector.d.ts +2 -2
- package/lib/components/kernel/KernelInspector.js.map +1 -1
- package/lib/components/kernel/KernelSelector.d.ts +2 -2
- package/lib/components/kernel/KernelSelector.js.map +1 -1
- package/lib/components/kernel/KernelUsage.d.ts +2 -2
- package/lib/components/kernel/KernelUsage.js.map +1 -1
- package/lib/components/kernel/KernelVariables.d.ts +2 -2
- package/lib/components/kernel/KernelVariables.js.map +1 -1
- package/lib/components/kernel/Kernelndicator.d.ts +1 -1
- package/lib/components/kernel/variables/kernelconnector.d.ts +2 -2
- package/lib/components/kernel/variables/kernelconnector.js +2 -2
- package/lib/components/kernel/variables/widget.d.ts +4 -2
- package/lib/components/kernel/variables/widget.js.map +1 -1
- package/lib/components/lumino/Lumino.d.ts +1 -1
- package/lib/components/lumino/LuminoBox.d.ts +3 -9
- package/lib/components/lumino/LuminoBox.js +1 -6
- package/lib/components/lumino/LuminoBox.js.map +1 -1
- package/lib/components/lumino/ReactPortalWidget.d.ts +1 -2
- package/lib/components/notebook/Notebook.d.ts +4 -6
- package/lib/components/notebook/Notebook.js +11 -26
- package/lib/components/notebook/Notebook.js.map +1 -1
- package/lib/components/notebook/Notebook2Adapter.d.ts +179 -0
- package/lib/components/notebook/Notebook2Adapter.js +542 -10
- package/lib/components/notebook/Notebook2Adapter.js.map +1 -1
- package/lib/components/notebook/Notebook2Base.d.ts +8 -6
- package/lib/components/notebook/Notebook2Base.js +12 -3
- package/lib/components/notebook/Notebook2Base.js.map +1 -1
- package/lib/components/notebook/Notebook2State.d.ts +34 -8
- package/lib/components/notebook/Notebook2State.js +71 -45
- package/lib/components/notebook/Notebook2State.js.map +1 -1
- package/lib/components/notebook/NotebookAdapter.js +6 -5
- package/lib/components/notebook/NotebookAdapter.js.map +1 -1
- package/lib/components/notebook/NotebookState.d.ts +11 -11
- package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarExtension.d.ts +2 -4
- package/lib/components/notebook/cell/sidebar/CellSidebarExtension.js +1 -3
- package/lib/components/notebook/cell/sidebar/CellSidebarExtension.js.map +1 -1
- package/lib/components/notebook/index.d.ts +1 -0
- package/lib/components/notebook/index.js +1 -0
- package/lib/components/notebook/index.js.map +1 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.d.ts +28 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js +15 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js.map +1 -1
- package/lib/components/output/Output.d.ts +11 -13
- package/lib/components/output/Output.js +19 -30
- package/lib/components/output/Output.js.map +1 -1
- package/lib/components/output/OutputIPyWidgets.d.ts +2 -2
- package/lib/components/output/OutputIPyWidgets.js.map +1 -1
- package/lib/components/output/OutputRenderer.d.ts +2 -2
- package/lib/components/output/OutputRenderer.js.map +1 -1
- package/lib/components/terminal/Terminal.d.ts +1 -4
- package/lib/components/terminal/Terminal.js +4 -7
- package/lib/components/terminal/Terminal.js.map +1 -1
- package/lib/components/viewer/Viewer.d.ts +1 -1
- package/lib/components/viewer/output/OutputViewer.d.ts +3 -6
- package/lib/components/viewer/output/OutputViewer.js +1 -5
- package/lib/components/viewer/output/OutputViewer.js.map +1 -1
- package/lib/examples/Notebook2Actions.js +1 -1
- package/lib/examples/Notebook2Actions.js.map +1 -1
- package/lib/examples/extensions/celltoolbar/CellToolbarComponent.js +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/Jupyter.d.ts +1 -74
- package/lib/jupyter/Jupyter.js +2 -9
- package/lib/jupyter/Jupyter.js.map +1 -1
- package/lib/jupyter/JupyterConfig.js +2 -2
- package/lib/jupyter/JupyterConfig.js.map +1 -1
- package/lib/jupyter/JupyterContext.d.ts +2 -2
- package/lib/jupyter/ipywidgets/classic/htmlmanager.d.ts +6 -0
- package/lib/jupyter/ipywidgets/classic/htmlmanager.js +8 -0
- package/lib/jupyter/ipywidgets/classic/htmlmanager.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/manager.d.ts +6 -0
- package/lib/jupyter/ipywidgets/lab/manager.js +8 -0
- package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
- package/lib/jupyter/ipywidgets/libembed-amd.d.ts +1 -1
- package/lib/jupyter/ipywidgets/libembed-amd.js +1 -1
- package/lib/jupyter/lite/LiteServer.d.ts +1 -1
- package/lib/jupyter/lite/LiteServer.js +1 -1
- package/lib/theme/JupyterLabCss.d.ts +1 -1
- package/lib/theme/JupyterReactTheme.d.ts +1 -1
- package/lib/tools/__tests__/operationRunner.test.d.ts +1 -0
- package/lib/tools/__tests__/operationRunner.test.js +193 -0
- package/lib/tools/__tests__/operationRunner.test.js.map +1 -0
- package/lib/tools/core/executor.d.ts +46 -0
- package/lib/tools/core/executor.js +55 -0
- package/lib/tools/core/executor.js.map +1 -0
- package/lib/tools/core/formatter.d.ts +20 -0
- package/lib/tools/core/formatter.js +41 -0
- package/lib/tools/core/formatter.js.map +1 -0
- package/lib/tools/core/index.d.ts +18 -0
- package/lib/tools/core/index.js +24 -0
- package/lib/tools/core/index.js.map +1 -0
- package/lib/tools/core/interfaces.d.ts +38 -0
- package/lib/tools/core/interfaces.js +7 -0
- package/lib/tools/core/interfaces.js.map +1 -0
- package/lib/tools/core/operationRunner.d.ts +27 -0
- package/lib/tools/core/operationRunner.js +33 -0
- package/lib/tools/core/operationRunner.js.map +1 -0
- package/lib/tools/core/schema.d.ts +47 -0
- package/lib/tools/core/schema.js +7 -0
- package/lib/tools/core/schema.js.map +1 -0
- package/lib/tools/core/types.d.ts +36 -0
- package/lib/tools/core/types.js +7 -0
- package/lib/tools/core/types.js.map +1 -0
- package/lib/tools/core/zodUtils.d.ts +56 -0
- package/lib/tools/core/zodUtils.js +179 -0
- package/lib/tools/core/zodUtils.js.map +1 -0
- package/lib/tools/definitions/deleteCell.d.ts +7 -0
- package/lib/tools/definitions/deleteCell.js +25 -0
- package/lib/tools/definitions/deleteCell.js.map +1 -0
- package/lib/tools/definitions/executeCode.d.ts +7 -0
- package/lib/tools/definitions/executeCode.js +33 -0
- package/lib/tools/definitions/executeCode.js.map +1 -0
- package/lib/tools/definitions/index.d.ts +12 -0
- package/lib/tools/definitions/index.js +18 -0
- package/lib/tools/definitions/index.js.map +1 -0
- package/lib/tools/definitions/insertCell.d.ts +7 -0
- package/lib/tools/definitions/insertCell.js +24 -0
- package/lib/tools/definitions/insertCell.js.map +1 -0
- package/lib/tools/definitions/readAllCells.d.ts +7 -0
- package/lib/tools/definitions/readAllCells.js +24 -0
- package/lib/tools/definitions/readAllCells.js.map +1 -0
- package/lib/tools/definitions/readCell.d.ts +7 -0
- package/lib/tools/definitions/readCell.js +24 -0
- package/lib/tools/definitions/readCell.js.map +1 -0
- package/lib/tools/definitions/runCell.d.ts +7 -0
- package/lib/tools/definitions/runCell.js +31 -0
- package/lib/tools/definitions/runCell.js.map +1 -0
- package/lib/tools/definitions/updateCell.d.ts +7 -0
- package/lib/tools/definitions/updateCell.js +24 -0
- package/lib/tools/definitions/updateCell.js.map +1 -0
- package/lib/tools/index.d.ts +20 -0
- package/lib/tools/index.js +62 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/operations/deleteCell.d.ts +49 -0
- package/lib/tools/operations/deleteCell.js +103 -0
- package/lib/tools/operations/deleteCell.js.map +1 -0
- package/lib/tools/operations/executeCode.d.ts +33 -0
- package/lib/tools/operations/executeCode.js +45 -0
- package/lib/tools/operations/executeCode.js.map +1 -0
- package/lib/tools/operations/insertCell.d.ts +27 -0
- package/lib/tools/operations/insertCell.js +56 -0
- package/lib/tools/operations/insertCell.js.map +1 -0
- package/lib/tools/operations/readAllCells.d.ts +21 -0
- package/lib/tools/operations/readAllCells.js +45 -0
- package/lib/tools/operations/readAllCells.js.map +1 -0
- package/lib/tools/operations/readCell.d.ts +39 -0
- package/lib/tools/operations/readCell.js +90 -0
- package/lib/tools/operations/readCell.js.map +1 -0
- package/lib/tools/operations/runCell.d.ts +24 -0
- package/lib/tools/operations/runCell.js +124 -0
- package/lib/tools/operations/runCell.js.map +1 -0
- package/lib/tools/operations/updateCell.d.ts +27 -0
- package/lib/tools/operations/updateCell.js +53 -0
- package/lib/tools/operations/updateCell.js.map +1 -0
- package/lib/tools/schemas/deleteCell.d.ts +20 -0
- package/lib/tools/schemas/deleteCell.js +24 -0
- package/lib/tools/schemas/deleteCell.js.map +1 -0
- package/lib/tools/schemas/executeCode.d.ts +19 -0
- package/lib/tools/schemas/executeCode.js +28 -0
- package/lib/tools/schemas/executeCode.js.map +1 -0
- package/lib/tools/schemas/index.d.ts +12 -0
- package/lib/tools/schemas/index.js +18 -0
- package/lib/tools/schemas/index.js.map +1 -0
- package/lib/tools/schemas/insertCell.d.ts +24 -0
- package/lib/tools/schemas/insertCell.js +29 -0
- package/lib/tools/schemas/insertCell.js.map +1 -0
- package/lib/tools/schemas/readAllCells.d.ts +19 -0
- package/lib/tools/schemas/readAllCells.js +18 -0
- package/lib/tools/schemas/readAllCells.js.map +1 -0
- package/lib/tools/schemas/readCell.d.ts +19 -0
- package/lib/tools/schemas/readCell.js +24 -0
- package/lib/tools/schemas/readCell.js.map +1 -0
- package/lib/tools/schemas/runCell.d.ts +21 -0
- package/lib/tools/schemas/runCell.js +39 -0
- package/lib/tools/schemas/runCell.js.map +1 -0
- package/lib/tools/schemas/updateCell.d.ts +19 -0
- package/lib/tools/schemas/updateCell.js +21 -0
- package/lib/tools/schemas/updateCell.js.map +1 -0
- package/package.json +19 -14
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for insertCell operation parameters
|
|
3
|
+
*
|
|
4
|
+
* @module tools/schemas/insertCell
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Schema for insertCell parameters
|
|
9
|
+
*
|
|
10
|
+
* Validates cell type, source content, and optional insertion index.
|
|
11
|
+
*/
|
|
12
|
+
export declare const insertCellParamsSchema: z.ZodObject<{
|
|
13
|
+
type: z.ZodEnum<{
|
|
14
|
+
code: "code";
|
|
15
|
+
raw: "raw";
|
|
16
|
+
markdown: "markdown";
|
|
17
|
+
}>;
|
|
18
|
+
source: z.ZodString;
|
|
19
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/**
|
|
22
|
+
* TypeScript type inferred from Zod schema.
|
|
23
|
+
*/
|
|
24
|
+
export type InsertCellParams = z.infer<typeof insertCellParamsSchema>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for insertCell operation parameters
|
|
8
|
+
*
|
|
9
|
+
* @module tools/schemas/insertCell
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Schema for insertCell parameters
|
|
14
|
+
*
|
|
15
|
+
* Validates cell type, source content, and optional insertion index.
|
|
16
|
+
*/
|
|
17
|
+
export const insertCellParamsSchema = z.object({
|
|
18
|
+
type: z
|
|
19
|
+
.enum(['code', 'markdown', 'raw'])
|
|
20
|
+
.describe("Cell type: 'code', 'markdown', or 'raw'"),
|
|
21
|
+
source: z.string().describe('Cell source content'),
|
|
22
|
+
index: z
|
|
23
|
+
.number()
|
|
24
|
+
.int()
|
|
25
|
+
.nonnegative()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('Insert position (0-based index). If omitted, cell is inserted at the end.'),
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=insertCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertCell.js","sourceRoot":"","sources":["../../../src/tools/schemas/insertCell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;SACjC,QAAQ,CAAC,yCAAyC,CAAC;IACtD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAClD,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,EAAE;SACV,QAAQ,CACP,2EAA2E,CAC5E;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for readAllCells operation parameters
|
|
3
|
+
*
|
|
4
|
+
* @module tools/schemas/readAllCells
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Schema for readAllCells parameters
|
|
9
|
+
*/
|
|
10
|
+
export declare const readAllCellsParamsSchema: z.ZodObject<{
|
|
11
|
+
format: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
brief: "brief";
|
|
13
|
+
detailed: "detailed";
|
|
14
|
+
}>>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* TypeScript type inferred from Zod schema.
|
|
18
|
+
*/
|
|
19
|
+
export type ReadAllCellsParams = z.infer<typeof readAllCellsParamsSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for readAllCells operation parameters
|
|
8
|
+
*
|
|
9
|
+
* @module tools/schemas/readAllCells
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Schema for readAllCells parameters
|
|
14
|
+
*/
|
|
15
|
+
export const readAllCellsParamsSchema = z.object({
|
|
16
|
+
format: z.enum(['brief', 'detailed']).default('brief').optional(),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=readAllCells.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readAllCells.js","sourceRoot":"","sources":["../../../src/tools/schemas/readAllCells.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for readCell operation parameters
|
|
3
|
+
*
|
|
4
|
+
* @module tools/schemas/readCell
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Schema for readCell parameters
|
|
9
|
+
*
|
|
10
|
+
* Validates cell index and optional output inclusion flag.
|
|
11
|
+
*/
|
|
12
|
+
export declare const readCellParamsSchema: z.ZodObject<{
|
|
13
|
+
index: z.ZodNumber;
|
|
14
|
+
includeOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* TypeScript type inferred from Zod schema.
|
|
18
|
+
*/
|
|
19
|
+
export type ReadCellParams = z.infer<typeof readCellParamsSchema>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for readCell operation parameters
|
|
8
|
+
*
|
|
9
|
+
* @module tools/schemas/readCell
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Schema for readCell parameters
|
|
14
|
+
*
|
|
15
|
+
* Validates cell index and optional output inclusion flag.
|
|
16
|
+
*/
|
|
17
|
+
export const readCellParamsSchema = z.object({
|
|
18
|
+
index: z.number().int().nonnegative().describe('Cell index (0-based)'),
|
|
19
|
+
includeOutputs: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Whether to include cell outputs in the response (default: true)'),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=readCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readCell.js","sourceRoot":"","sources":["../../../src/tools/schemas/readCell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACtE,cAAc,EAAE,CAAC;SACd,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,iEAAiE,CAClE;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for runCell operation parameters
|
|
3
|
+
*
|
|
4
|
+
* @module tools/schemas/runCell
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Schema for runCell parameters
|
|
9
|
+
*
|
|
10
|
+
* Validates optional cell index, timeout, streaming, and progress interval settings.
|
|
11
|
+
*/
|
|
12
|
+
export declare const runCellParamsSchema: z.ZodObject<{
|
|
13
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
progressInterval: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
/**
|
|
19
|
+
* TypeScript type inferred from Zod schema.
|
|
20
|
+
*/
|
|
21
|
+
export type RunCellParams = z.infer<typeof runCellParamsSchema>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for runCell operation parameters
|
|
8
|
+
*
|
|
9
|
+
* @module tools/schemas/runCell
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Schema for runCell parameters
|
|
14
|
+
*
|
|
15
|
+
* Validates optional cell index, timeout, streaming, and progress interval settings.
|
|
16
|
+
*/
|
|
17
|
+
export const runCellParamsSchema = z.object({
|
|
18
|
+
index: z
|
|
19
|
+
.number()
|
|
20
|
+
.int()
|
|
21
|
+
.nonnegative()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('Cell index to execute (0-based). If omitted, executes the currently active cell.'),
|
|
24
|
+
timeoutSeconds: z
|
|
25
|
+
.number()
|
|
26
|
+
.positive()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Execution timeout in seconds. If omitted, no timeout is enforced (normal Jupyter behavior).'),
|
|
29
|
+
stream: z
|
|
30
|
+
.boolean()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe('Enable streaming progress updates (default: false)'),
|
|
33
|
+
progressInterval: z
|
|
34
|
+
.number()
|
|
35
|
+
.positive()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Progress update interval in seconds when stream=true (default: 5)'),
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=runCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runCell.js","sourceRoot":"","sources":["../../../src/tools/schemas/runCell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,EAAE;SACV,QAAQ,CACP,kFAAkF,CACnF;IACH,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,6FAA6F,CAC9F;IACH,MAAM,EAAE,CAAC;SACN,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;IACjE,gBAAgB,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,mEAAmE,CACpE;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for updateCell operation parameters
|
|
3
|
+
*
|
|
4
|
+
* @module tools/schemas/updateCell
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Schema for updateCell parameters
|
|
9
|
+
*
|
|
10
|
+
* Validates cell index and new source content.
|
|
11
|
+
*/
|
|
12
|
+
export declare const updateCellParamsSchema: z.ZodObject<{
|
|
13
|
+
index: z.ZodNumber;
|
|
14
|
+
source: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* TypeScript type inferred from Zod schema.
|
|
18
|
+
*/
|
|
19
|
+
export type UpdateCellParams = z.infer<typeof updateCellParamsSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for updateCell operation parameters
|
|
8
|
+
*
|
|
9
|
+
* @module tools/schemas/updateCell
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Schema for updateCell parameters
|
|
14
|
+
*
|
|
15
|
+
* Validates cell index and new source content.
|
|
16
|
+
*/
|
|
17
|
+
export const updateCellParamsSchema = z.object({
|
|
18
|
+
index: z.number().int().nonnegative().describe('Cell index (0-based)'),
|
|
19
|
+
source: z.string().describe('New cell source content'),
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=updateCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCell.js","sourceRoot":"","sources":["../../../src/tools/schemas/updateCell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACtE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;CACvD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/jupyter-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Jupyter React - React.js components 100% compatible with Jupyter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "gulp resources-to-lib && tsc && webpack",
|
|
33
|
-
"build:lib": "tsc",
|
|
34
|
-
"build:prod": "gulp resources-to-lib && tsc && npm run clean && npm run build:lib",
|
|
32
|
+
"build": "npm run validate:tools && gulp resources-to-lib && tsc && webpack",
|
|
33
|
+
"build:lib": "npm run validate:tools && tsc",
|
|
34
|
+
"build:prod": "npm run validate:tools && gulp resources-to-lib && tsc && npm run clean && npm run build:lib",
|
|
35
35
|
"build:tsc:watch:res": "gulp resources-to-lib-watch",
|
|
36
36
|
"build:tsc:watch:tsc": "tsc --watch",
|
|
37
37
|
"build:webpack": "cross-env BUILD_APP=true webpack-cli build",
|
|
@@ -46,22 +46,23 @@
|
|
|
46
46
|
"example": "run-p -c 'start:*'",
|
|
47
47
|
"install:extension": "npm run build",
|
|
48
48
|
"kill": "./../../dev/sh/kill.sh || true",
|
|
49
|
-
"lint": "npm stylelint && npm prettier && npm eslint",
|
|
50
|
-
"lint:check": "npm stylelint:check && npm prettier:check && npm eslint:check",
|
|
51
|
-
"prettier": "npm prettier:base --write --list-different",
|
|
49
|
+
"lint": "npm run stylelint && npm run prettier && npm run eslint",
|
|
50
|
+
"lint:check": "npm run stylelint:check && npm run prettier:check && npm run eslint:check",
|
|
51
|
+
"prettier": "npm run prettier:base --write --list-different",
|
|
52
52
|
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
53
|
-
"prettier:check": "npm prettier:base --check",
|
|
53
|
+
"prettier:check": "npm run prettier:base --check",
|
|
54
54
|
"start": "run-p -c 'start:*'",
|
|
55
55
|
"start:webpack": "webpack serve",
|
|
56
56
|
"start-noconfig": "cross-env NO_CONFIG=true webpack serve",
|
|
57
57
|
"start-local": "run-p -c 'start-local:*'",
|
|
58
58
|
"start-local:webpack": "cross-env LOCAL_JUPYTER_SERVER=true webpack serve",
|
|
59
59
|
"start-local:jupyter-server": "cd ./../.. && npm run jupyter:server",
|
|
60
|
-
"stylelint": "npm stylelint:check --fix",
|
|
60
|
+
"stylelint": "npm run stylelint:check -- --fix",
|
|
61
61
|
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
62
62
|
"test": "jest --coverage",
|
|
63
63
|
"test:visual": "playwright test",
|
|
64
64
|
"typedoc": "typedoc ./src",
|
|
65
|
+
"validate:tools": "node scripts/validate-tools-sync.js",
|
|
65
66
|
"watch": "run-p watch:src",
|
|
66
67
|
"watch:src": "tsc -w"
|
|
67
68
|
},
|
|
@@ -144,10 +145,12 @@
|
|
|
144
145
|
"@lumino/default-theme": "^2.0.0",
|
|
145
146
|
"@primer/react": "^37.19.0",
|
|
146
147
|
"@primer/react-brand": "^0.58.2",
|
|
148
|
+
"@toon-format/toon": "^1.3.0",
|
|
147
149
|
"ansi-to-html": "^0.7.2",
|
|
148
150
|
"assert": "^2.0.0",
|
|
149
151
|
"bufferutil": "^4.0.8",
|
|
150
152
|
"codemirror": "^6.0.1",
|
|
153
|
+
"diff": "^8.0.2",
|
|
151
154
|
"encoding": "^0.1.13",
|
|
152
155
|
"lodash": "^4.17.4",
|
|
153
156
|
"marked": "^4.0.10",
|
|
@@ -166,6 +169,8 @@
|
|
|
166
169
|
"y-protocols": "^1.0.5",
|
|
167
170
|
"y-websocket": "3.0.0",
|
|
168
171
|
"yjs": "^13.6.24",
|
|
172
|
+
"zod": "^4.1.13",
|
|
173
|
+
"zod-to-json-schema": "^3.25.0",
|
|
169
174
|
"zustand": "^4.4.1"
|
|
170
175
|
},
|
|
171
176
|
"devDependencies": {
|
|
@@ -185,6 +190,7 @@
|
|
|
185
190
|
"@playwright/test": "^1.40.1",
|
|
186
191
|
"@primer/octicons-react": "^19.15.1",
|
|
187
192
|
"@types/codemirror": "^5.60.4",
|
|
193
|
+
"@types/diff": "^7.0.2",
|
|
188
194
|
"@types/jest": "^29.4.0",
|
|
189
195
|
"@types/marked": "^4.0.1",
|
|
190
196
|
"@types/node": "^22.14.1",
|
|
@@ -226,11 +232,10 @@
|
|
|
226
232
|
"stream": "^0.0.2",
|
|
227
233
|
"stream-browserify": "^2.0.2",
|
|
228
234
|
"style-loader": "^2.0.0",
|
|
229
|
-
"stylelint": "^
|
|
230
|
-
"stylelint-config-recommended": "^
|
|
231
|
-
"stylelint-config-standard": "^
|
|
232
|
-
"stylelint-
|
|
233
|
-
"stylelint-prettier": "^4.0.0",
|
|
235
|
+
"stylelint": "^16.26.1",
|
|
236
|
+
"stylelint-config-recommended": "^17.0.0",
|
|
237
|
+
"stylelint-config-standard": "^39.0.1",
|
|
238
|
+
"stylelint-prettier": "^5.0.0",
|
|
234
239
|
"svg-url-loader": "^7.1.1",
|
|
235
240
|
"ts-jest": "^29.0.5",
|
|
236
241
|
"ts-loader": "^9.4.3",
|