ipyreact 0.4.0__tar.gz → 0.4.2__tar.gz

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 (109) hide show
  1. {ipyreact-0.4.0 → ipyreact-0.4.2}/.bumpversion.cfg +1 -1
  2. ipyreact-0.4.2/.jupyterlite/requirements.txt +4 -0
  3. {ipyreact-0.4.0 → ipyreact-0.4.2}/PKG-INFO +41 -6
  4. {ipyreact-0.4.0 → ipyreact-0.4.2}/README.md +39 -4
  5. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/antd/antd.ipynb +12 -9
  6. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/full_tutorial.ipynb +5 -2
  7. ipyreact-0.4.2/examples/threejs-fiber/threejs-fiber.bundle.js +100192 -0
  8. ipyreact-0.4.2/examples/threejs-fiber/threejs-fiber.ipynb +272 -0
  9. ipyreact-0.4.2/examples/threejs-fiber/threejs-fiber.js +2 -0
  10. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/_frontend.py +1 -1
  11. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/_version.py +1 -1
  12. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/cellmagic.py +1 -4
  13. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/package.json +2 -2
  14. ipyreact-0.4.2/ipyreact/labextension/static/367.64c21a323760c3e63270.js +1 -0
  15. ipyreact-0.4.2/ipyreact/labextension/static/remoteEntry.928651bedae7be675441.js +1 -0
  16. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/module.py +1 -1
  17. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/nbextension/index.js +1 -1
  18. ipyreact-0.4.2/ipyreact/nbextension/index.js.map +1 -0
  19. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/widget.py +1 -3
  20. {ipyreact-0.4.0 → ipyreact-0.4.2}/package.json +1 -1
  21. {ipyreact-0.4.0 → ipyreact-0.4.2}/pyproject.toml +1 -2
  22. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/widget.tsx +44 -24
  23. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/children_test.py +1 -5
  24. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/jupyter_test.py +1 -3
  25. ipyreact-0.4.2/tests/ui/module_test.py +137 -0
  26. ipyreact-0.4.2/tests/ui/serialize_test.py +27 -0
  27. ipyreact-0.4.2/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-jupyter_lab-chromium-linux-reference.png +0 -0
  28. ipyreact-0.4.2/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-solara-chromium-linux-reference.png +0 -0
  29. ipyreact-0.4.2/widgetti-jupyter-react-0.4.2.tgz +0 -0
  30. ipyreact-0.4.0/.jupyterlite/requirements.txt +0 -3
  31. ipyreact-0.4.0/ipyreact/labextension/static/367.738b12114ceaf954b0f7.js +0 -1
  32. ipyreact-0.4.0/ipyreact/labextension/static/remoteEntry.f43c055df0b38da9c80f.js +0 -1
  33. ipyreact-0.4.0/ipyreact/nbextension/index.js.map +0 -1
  34. ipyreact-0.4.0/tests/ui/module_test.py +0 -30
  35. ipyreact-0.4.0/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-jupyter_lab-chromium-linux-reference.png +0 -0
  36. ipyreact-0.4.0/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-solara-chromium-linux-reference.png +0 -0
  37. ipyreact-0.4.0/widgetti-jupyter-react-0.4.0.tgz +0 -0
  38. {ipyreact-0.4.0 → ipyreact-0.4.2}/.binder/requirements.txt +0 -0
  39. {ipyreact-0.4.0 → ipyreact-0.4.2}/.coveragerc +0 -0
  40. {ipyreact-0.4.0 → ipyreact-0.4.2}/.gitignore +0 -0
  41. {ipyreact-0.4.0 → ipyreact-0.4.2}/.npmignore +0 -0
  42. {ipyreact-0.4.0 → ipyreact-0.4.2}/.pre-commit-config.yaml +0 -0
  43. {ipyreact-0.4.0 → ipyreact-0.4.2}/.prettierignore +0 -0
  44. {ipyreact-0.4.0 → ipyreact-0.4.2}/LICENSE.txt +0 -0
  45. {ipyreact-0.4.0 → ipyreact-0.4.2}/MANIFEST.in +0 -0
  46. {ipyreact-0.4.0 → ipyreact-0.4.2}/babel.config.js +0 -0
  47. {ipyreact-0.4.0 → ipyreact-0.4.2}/codecov.yml +0 -0
  48. {ipyreact-0.4.0 → ipyreact-0.4.2}/css/widget.css +0 -0
  49. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/Makefile +0 -0
  50. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/environment.yml +0 -0
  51. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/make.bat +0 -0
  52. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/_static/embed-bundle.js.LICENSE.txt +0 -0
  53. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/_static/helper.js +0 -0
  54. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/conf.py +0 -0
  55. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/develop-install.rst +0 -0
  56. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/examples/index.rst +0 -0
  57. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/examples/introduction.nblink +0 -0
  58. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/index.rst +0 -0
  59. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/installing.rst +0 -0
  60. {ipyreact-0.4.0 → ipyreact-0.4.2}/docs/source/introduction.rst +0 -0
  61. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/Observe_example.ipynb +0 -0
  62. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/antd/antd-minimal.esm.js +0 -0
  63. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/antd/antd-minimal.js +0 -0
  64. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/autocomplete_screenshot.png +0 -0
  65. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/children.ipynb +0 -0
  66. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/events.ipynb +0 -0
  67. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/my_component.tsx +0 -0
  68. {ipyreact-0.4.0 → ipyreact-0.4.2}/examples/styles_orange.css +0 -0
  69. {ipyreact-0.4.0 → ipyreact-0.4.2}/install.json +0 -0
  70. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/__init__.py +0 -0
  71. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/basic.tsx +0 -0
  72. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/importmap.py +0 -0
  73. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/128.abd397de3ff37346bd22.js +0 -0
  74. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/128.abd397de3ff37346bd22.js.LICENSE.txt +0 -0
  75. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/131.853aa1b2d96ba4c14b49.js +0 -0
  76. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/480.b92afc3ad10df271e336.js +0 -0
  77. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/525.e1841ec9155f0eab0676.js +0 -0
  78. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/525.e1841ec9155f0eab0676.js.LICENSE.txt +0 -0
  79. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/568.01cd82a618017722af7b.js +0 -0
  80. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/730.0711372a30ea4e5b94e3.js +0 -0
  81. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/730.0711372a30ea4e5b94e3.js.LICENSE.txt +0 -0
  82. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/style.js +0 -0
  83. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/labextension/static/third-party-licenses.json +0 -0
  84. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/nbextension/extension.js +0 -0
  85. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact/nbextension/index.js.LICENSE.txt +0 -0
  86. {ipyreact-0.4.0 → ipyreact-0.4.2}/ipyreact.json +0 -0
  87. {ipyreact-0.4.0 → ipyreact-0.4.2}/jest.config.js +0 -0
  88. {ipyreact-0.4.0 → ipyreact-0.4.2}/lab/jupyter-lite.json +0 -0
  89. {ipyreact-0.4.0 → ipyreact-0.4.2}/package-lock.json +0 -0
  90. {ipyreact-0.4.0 → ipyreact-0.4.2}/pytest.ini +0 -0
  91. {ipyreact-0.4.0 → ipyreact-0.4.2}/readthedocs.yml +0 -0
  92. {ipyreact-0.4.0 → ipyreact-0.4.2}/release.sh +0 -0
  93. {ipyreact-0.4.0 → ipyreact-0.4.2}/setup.py +0 -0
  94. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/__tests__/index.spec.ts +0 -0
  95. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/__tests__/utils.ts +0 -0
  96. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/components.tsx +0 -0
  97. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/extension.ts +0 -0
  98. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/index.ts +0 -0
  99. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/plugin.ts +0 -0
  100. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/utils.ts +0 -0
  101. {ipyreact-0.4.0 → ipyreact-0.4.2}/src/version.ts +0 -0
  102. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/event_test.py +0 -0
  103. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/library_test.py +0 -0
  104. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-jupyter_notebook-chromium-linux-reference.png +0 -0
  105. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/snapshots/tests/ui/jupyter_test.py/test_widget_ipyreact-voila-chromium-linux-reference.png +0 -0
  106. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/ui/snapshots/tests/ui/library_test.py/test_material_ui-chromium-linux-reference.png +0 -0
  107. {ipyreact-0.4.0 → ipyreact-0.4.2}/tests/unit/create_test.py +0 -0
  108. {ipyreact-0.4.0 → ipyreact-0.4.2}/tsconfig.json +0 -0
  109. {ipyreact-0.4.0 → ipyreact-0.4.2}/webpack.config.js +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.4.0
2
+ current_version = 0.4.2
3
3
  commit = True
4
4
  tag = True
5
5
  message = chore: bump version {current_version} → {new_version}
@@ -0,0 +1,4 @@
1
+ jupyterlite
2
+ jupyterlab
3
+ ipyreact
4
+ jupyterlite-pyodide-kernel
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: ipyreact
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: React for ipywidgets that just works
5
5
  Project-URL: Homepage, https://github.com/widgetti/ipyreact
6
6
  Author-email: "Maarten A. Breddels" <maartenbreddels@gmail.com>
@@ -293,11 +293,11 @@ define_import_map({
293
293
  "@mui/material": "https://esm.sh/@mui/material@5.11.10?external=react,react-dom",
294
294
  "@mui/material/": "https://esm.sh/@mui/material@5.11.10&external=react,react-dom/",
295
295
  "@mui/icons-material/": "https://esm.sh/@mui/icons-material/?external=react,react-dom",
296
- "canvas-confetti": "https://esm.sh/canvas-confetti@1.6.0?external=react,react-dom",
296
+ "canvas-confetti": "https://esm.sh/canvas-confetti@1.6.0",
297
297
  })
298
298
  ```
299
299
 
300
- _Note that it is important to add `external=react,react-dom`, otherwise [esm.sh](https://esm.sh/#using-import-maps) would import ReactJS again_.
300
+ _Note that it is important to add `external=react,react-dom` for ReactJS based libraries, otherwise [esm.sh](https://esm.sh/#using-import-maps) would import ReactJS again_.
301
301
 
302
302
  Which means we can now write our ConfettiButton as:
303
303
 
@@ -414,7 +414,7 @@ import traitlets
414
414
 
415
415
  class Slider(ipyreact.ValueWidget):
416
416
  _esm = """
417
-
417
+ import * as React from "react";
418
418
  import {Slider} from "antd-minimal"
419
419
 
420
420
  export default ({value, setValue, ...rest}) => {
@@ -445,12 +445,19 @@ Test this out in the notebook:
445
445
  [![JupyterLight](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://widgetti.github.io/ipyreact/lab/?path=antd/antd.ipynb)
446
446
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/widgetti/ipyreact/HEAD?labpath=examples%2Fantd%2Fantd.ipynb)
447
447
 
448
+ ### Bundled ES modules for threejs
449
+
450
+ See this notebook for a 3D WebGL threejs-fiber example
451
+
452
+ [![JupyterLight](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://widgetti.github.io/ipyreact/lab/?path=threejs-fiber/threejs-fiber.ipynb)
453
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/widgetti/ipyreact/HEAD?labpath=examples%2Fthreejs-fiber%2Fthreejs-fiber.ipynb)
454
+
448
455
  ## Development Installation
449
456
 
450
457
  Create a dev environment:
451
458
 
452
459
  ```bash
453
- conda create -n ipyreact-dev -c conda-forge nodejs yarn python jupyterlab
460
+ conda create -n ipyreact-dev -c conda-forge nodejs yarn python 'jupyterlab<4'
454
461
  conda activate ipyreact-dev
455
462
  ```
456
463
 
@@ -481,6 +488,11 @@ the `install` command every time that you rebuild your extension. For certain in
481
488
  you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
482
489
  of those flags here.
483
490
 
491
+ ## Binary data transport
492
+
493
+ Binary data such as NumPy arrays, or Arrow data can be efficiently transported to the frontend.
494
+ Props support object that support the buffer interface. See [this test as an example](https://github.com/widgetti/ipyreact/tree/master/tests/ui/serialize_test.py).
495
+
484
496
  ### How to see your changes
485
497
 
486
498
  #### Typescript:
@@ -500,3 +512,26 @@ After a change wait for the build to finish and then refresh your browser and th
500
512
  #### Python:
501
513
 
502
514
  If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
515
+
516
+ # FAQ
517
+
518
+ ## Which version of React do you use.
519
+
520
+ We currently only support React 18. Although we have some scaffolding in place to support different version, we do not have funding to support both.
521
+
522
+ ## Why does ipyreact provides React?
523
+
524
+ If several ReactJS components need to be composed into a single React app, they need to share the same React context. This makes it possible
525
+ for features such as React's [useContext](https://react.dev/reference/react/useContext) to work across the whole React tree.
526
+ If every library brings its own React, they cannot communicate using this. Also, every child would need to be nested in its own `<div>`
527
+ which can affect the layout of your application. When ipyreact provides React, we can build a true ReactJS application with a normal/true
528
+ React render tree.
529
+
530
+ ## I get a React error
531
+
532
+ For instance, if you see `"Cannot read properties of null (reading 'useReducer')"` it means that you are loading in your own ReactJS version.
533
+
534
+ If you use https://esh.sh, make sure you add `??external=react,react-dom` at the end of the url, so that your esm bundle doesn't include its own
535
+ ReactJS version, but uses the one provided with ipyreact.
536
+
537
+ If you make your own bundle using esbuild, make sure to add the `--external:react --external:react-dom` flags on the CLI.
@@ -226,11 +226,11 @@ define_import_map({
226
226
  "@mui/material": "https://esm.sh/@mui/material@5.11.10?external=react,react-dom",
227
227
  "@mui/material/": "https://esm.sh/@mui/material@5.11.10&external=react,react-dom/",
228
228
  "@mui/icons-material/": "https://esm.sh/@mui/icons-material/?external=react,react-dom",
229
- "canvas-confetti": "https://esm.sh/canvas-confetti@1.6.0?external=react,react-dom",
229
+ "canvas-confetti": "https://esm.sh/canvas-confetti@1.6.0",
230
230
  })
231
231
  ```
232
232
 
233
- _Note that it is important to add `external=react,react-dom`, otherwise [esm.sh](https://esm.sh/#using-import-maps) would import ReactJS again_.
233
+ _Note that it is important to add `external=react,react-dom` for ReactJS based libraries, otherwise [esm.sh](https://esm.sh/#using-import-maps) would import ReactJS again_.
234
234
 
235
235
  Which means we can now write our ConfettiButton as:
236
236
 
@@ -347,7 +347,7 @@ import traitlets
347
347
 
348
348
  class Slider(ipyreact.ValueWidget):
349
349
  _esm = """
350
-
350
+ import * as React from "react";
351
351
  import {Slider} from "antd-minimal"
352
352
 
353
353
  export default ({value, setValue, ...rest}) => {
@@ -378,12 +378,19 @@ Test this out in the notebook:
378
378
  [![JupyterLight](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://widgetti.github.io/ipyreact/lab/?path=antd/antd.ipynb)
379
379
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/widgetti/ipyreact/HEAD?labpath=examples%2Fantd%2Fantd.ipynb)
380
380
 
381
+ ### Bundled ES modules for threejs
382
+
383
+ See this notebook for a 3D WebGL threejs-fiber example
384
+
385
+ [![JupyterLight](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://widgetti.github.io/ipyreact/lab/?path=threejs-fiber/threejs-fiber.ipynb)
386
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/widgetti/ipyreact/HEAD?labpath=examples%2Fthreejs-fiber%2Fthreejs-fiber.ipynb)
387
+
381
388
  ## Development Installation
382
389
 
383
390
  Create a dev environment:
384
391
 
385
392
  ```bash
386
- conda create -n ipyreact-dev -c conda-forge nodejs yarn python jupyterlab
393
+ conda create -n ipyreact-dev -c conda-forge nodejs yarn python 'jupyterlab<4'
387
394
  conda activate ipyreact-dev
388
395
  ```
389
396
 
@@ -414,6 +421,11 @@ the `install` command every time that you rebuild your extension. For certain in
414
421
  you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
415
422
  of those flags here.
416
423
 
424
+ ## Binary data transport
425
+
426
+ Binary data such as NumPy arrays, or Arrow data can be efficiently transported to the frontend.
427
+ Props support object that support the buffer interface. See [this test as an example](https://github.com/widgetti/ipyreact/tree/master/tests/ui/serialize_test.py).
428
+
417
429
  ### How to see your changes
418
430
 
419
431
  #### Typescript:
@@ -433,3 +445,26 @@ After a change wait for the build to finish and then refresh your browser and th
433
445
  #### Python:
434
446
 
435
447
  If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
448
+
449
+ # FAQ
450
+
451
+ ## Which version of React do you use.
452
+
453
+ We currently only support React 18. Although we have some scaffolding in place to support different version, we do not have funding to support both.
454
+
455
+ ## Why does ipyreact provides React?
456
+
457
+ If several ReactJS components need to be composed into a single React app, they need to share the same React context. This makes it possible
458
+ for features such as React's [useContext](https://react.dev/reference/react/useContext) to work across the whole React tree.
459
+ If every library brings its own React, they cannot communicate using this. Also, every child would need to be nested in its own `<div>`
460
+ which can affect the layout of your application. When ipyreact provides React, we can build a true ReactJS application with a normal/true
461
+ React render tree.
462
+
463
+ ## I get a React error
464
+
465
+ For instance, if you see `"Cannot read properties of null (reading 'useReducer')"` it means that you are loading in your own ReactJS version.
466
+
467
+ If you use https://esh.sh, make sure you add `??external=react,react-dom` at the end of the url, so that your esm bundle doesn't include its own
468
+ ReactJS version, but uses the one provided with ipyreact.
469
+
470
+ If you make your own bundle using esbuild, make sure to add the `--external:react --external:react-dom` flags on the CLI.
@@ -33,6 +33,17 @@
33
33
  "Now we can define the module with a custom name (we call it antd-minimal)."
34
34
  ]
35
35
  },
36
+ {
37
+ "cell_type": "code",
38
+ "execution_count": null,
39
+ "id": "ea16141d",
40
+ "metadata": {},
41
+ "outputs": [],
42
+ "source": [
43
+ "%pip install -q ipyreact\n",
44
+ "# This line is needed for JupyterLite"
45
+ ]
46
+ },
36
47
  {
37
48
  "cell_type": "code",
38
49
  "execution_count": null,
@@ -97,7 +108,7 @@
97
108
  "\n",
98
109
  "class Slider(ipyreact.ValueWidget):\n",
99
110
  " _esm = \"\"\"\n",
100
- " \n",
111
+ " import * as React from \"react\";\n",
101
112
  " import {Slider} from \"antd-minimal\"\n",
102
113
  " \n",
103
114
  " export default ({value, setValue, ...rest}) => {\n",
@@ -147,14 +158,6 @@
147
158
  "source": [
148
159
  "s.value = 10"
149
160
  ]
150
- },
151
- {
152
- "cell_type": "code",
153
- "execution_count": null,
154
- "id": "c09ae51b",
155
- "metadata": {},
156
- "outputs": [],
157
- "source": []
158
161
  }
159
162
  ],
160
163
  "metadata": {
@@ -776,11 +776,13 @@
776
776
  " \"@mui/material\": \"https://esm.sh/@mui/material@5.11.10?external=react,react-dom\",\n",
777
777
  " \"@mui/material/\": \"https://esm.sh/@mui/material@5.11.10&external=react,react-dom/\",\n",
778
778
  " \"@mui/icons-material/\": \"https://esm.sh/@mui/icons-material/?external=react,react-dom\",\n",
779
- " \"canvas-confetti\": \"https://esm.sh/canvas-confetti@1.6.0?external=react,react-dom\",\n",
779
+ " \"canvas-confetti\": \"https://esm.sh/canvas-confetti@1.6.0\",\n",
780
780
  "})\n",
781
781
  "\n",
782
782
  "```\n",
783
783
  "\n",
784
+ "_Note that it is important to add `external=react,react-dom` for ReactJS based libraries, otherwise [esm.sh](https://esm.sh/#using-import-maps) would import ReactJS again_.\n",
785
+ "\n",
784
786
  "Which means we can now write our ConfettiButton as:\n"
785
787
  ]
786
788
  },
@@ -820,7 +822,8 @@
820
822
  "source": [
821
823
  "## Advanced\n",
822
824
  "\n",
823
- " * [Bundled ES modules (ant design example)](./antd/antd.ipynb)"
825
+ " * [Bundled ES modules (ant design example)](./antd/antd.ipynb)\n",
826
+ " * [Bundled ES modules for threejs (3D WebGL threejs-fiber example)](./threejs-fiber/threejs-fiber.ipynb)"
824
827
  ]
825
828
  },
826
829
  {