Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
working-directory: lite
run: |
set -eux
mkdir -p content && cp ../examples/*.jcad ../examples/*.STEP ../examples/*.stl ./content
mkdir -p content && cp ../examples/*.jcad ../examples/*.STEP ../examples/*.stl ../examples/*.ipynb ./content
jupyter lite build --contents content --output-dir dist

- name: Upload github-pages artifact
Expand Down
14 changes: 13 additions & 1 deletion lite/environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- https://prefix.dev/emscripten-forge-dev
- conda-forge
dependencies:
- python=3.13
- pip
- xeus-python
- requests
- jupyter_ydoc=2.1.5
- ypywidgets>=0.9.6,<0.10.0
- comm>=0.1.2,<0.2.0
- pydantic>=2,<3
- pip:
- yjs-widgets>=0.4,<0.5
- my-jupyter-shared-drive
- ../python/jupytercad_lab
- ../python/jupytercad_core
8 changes: 1 addition & 7 deletions lite/jupyter-lite.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"jupyter-lite-schema-version": 0,
"jupyter-config-data": {
"appName": "My JupyterCAD App",
"disabledExtensions": [
"@jupyter/collaboration-extension",
"@jupyter/docprovider-extension"
]
}
"jupyter-config-data": {}
}
6 changes: 3 additions & 3 deletions packages/base/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ export class JupyterCadPanel extends SplitPanel {

(this._consoleTracker.widgetAdded as any).emit(consolePanel);
await consolePanel.sessionContext.ready;
await consolePanel.console.inject(
`from jupytercad_lab import CadDocument\ndoc = CadDocument("${jcadPath}")`
);
this.addWidget(this._consoleView);
this.setRelativeSizes([2, 1]);
this._consoleOpened = true;
await consolePanel.console.inject(
`from jupytercad_lab import CadDocument\ndoc = CadDocument("${jcadPath}")`
);
consolePanel.console.sessionContext.kernelChanged.connect((_, arg) => {
if (!arg.newValue) {
this.removeConsole();
Expand Down
3 changes: 1 addition & 2 deletions python/jupytercad_core/src/jcadplugin/modelfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export class JupyterCadJcadModelFactory
/**
* Whether the model is collaborative or not.
*/
readonly collaborative =
document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined;
readonly collaborative = true;

/**
* The name of the model.
Expand Down
3 changes: 1 addition & 2 deletions python/jupytercad_core/src/stepplugin/modelfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class JupyterCadStepModelFactory
/**
* Whether the model is collaborative or not.
*/
readonly collaborative =
document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined;
readonly collaborative = true;

/**
* The name of the model.
Expand Down
3 changes: 1 addition & 2 deletions python/jupytercad_core/src/stlplugin/modelfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class JupyterCadStlModelFactory
/**
* Whether the model is collaborative or not.
*/
readonly collaborative =
document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined;
readonly collaborative = true;

/**
* The name of the model.
Expand Down
Loading