pyodide-mkdocs-theme 5.5.1__tar.gz → 5.5.3__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 (156) hide show
  1. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/PKG-INFO +1 -1
  2. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +5 -5
  3. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/PMT_tools/p5/cdns.txt +1 -0
  4. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/PMT_tools/p5v2/__init__.py +423 -0
  5. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/PMT_tools/p5v2/cdns.txt +1 -0
  6. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/PMT_tools/vis/cdns.txt +3 -0
  7. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/PMT_tools/vis_network/cdns.txt +3 -0
  8. pyodide_mkdocs_theme-5.5.3/pyodide_mkdocs_theme/__version__.py +1 -0
  9. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/0-generic-python-snippets-pyodide.js +1 -1
  10. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-packagesInstaller-install-pyodide.js +46 -39
  11. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyproject.toml +3 -3
  12. pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/__version__.py +0 -1
  13. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/LICENSE +0 -0
  14. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/README.md +0 -0
  15. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
  16. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
  17. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/__init__.py +0 -0
  18. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/__main__.py +0 -0
  19. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
  20. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +0 -0
  21. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +0 -0
  22. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/__init__.py +0 -0
  23. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +0 -0
  24. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +0 -0
  25. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +0 -0
  26. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +0 -0
  27. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +0 -0
  28. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +0 -0
  29. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +0 -0
  30. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +0 -0
  31. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
  32. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +0 -0
  33. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
  34. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +0 -0
  35. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
  36. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +0 -0
  37. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +0 -0
  38. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +0 -0
  39. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +0 -0
  40. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +0 -0
  41. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +0 -0
  42. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +0 -0
  43. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +0 -0
  44. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -0
  45. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +0 -0
  46. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +0 -0
  47. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/macros/runners_macros.py +0 -0
  48. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +0 -0
  49. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -0
  50. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +0 -0
  51. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +0 -0
  52. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +0 -0
  53. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +0 -0
  54. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +0 -0
  55. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +0 -0
  56. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +0 -0
  57. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +0 -0
  58. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +0 -0
  59. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +0 -0
  60. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +0 -0
  61. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +0 -0
  62. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +0 -0
  63. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +0 -0
  64. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +0 -0
  65. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +0 -0
  66. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/__init__.py +0 -0
  67. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/_string_tools_and_constants.py +0 -0
  68. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/common_tree_src.py +0 -0
  69. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/config_option_src.py +0 -0
  70. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/__init__.py +0 -0
  71. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/docs_dirs_config.py +0 -0
  72. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/macros_configs.py +0 -0
  73. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/plugin_config.py +0 -0
  74. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/sub_configs.py +0 -0
  75. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/dumpers.py +0 -0
  76. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +0 -0
  77. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/macro_config_src.py +0 -0
  78. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/plugin_config_src.py +0 -0
  79. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/sub_config_src.py +0 -0
  80. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/__init__.py +0 -0
  81. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/macros_data.py +0 -0
  82. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +0 -0
  83. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/options_alterations.py +0 -0
  84. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/pages_and_macros_py_configs.py +0 -0
  85. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/test_cases.py +0 -0
  86. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +0 -0
  87. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +0 -0
  88. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
  89. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
  90. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +0 -0
  91. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
  92. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
  93. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +0 -0
  94. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +0 -0
  95. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
  96. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +0 -0
  97. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
  98. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/main.py +0 -0
  99. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +0 -0
  100. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
  101. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
  102. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
  103. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/README.md +0 -0
  104. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
  105. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
  106. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
  107. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
  108. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
  109. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
  110. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
  111. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
  112. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
  113. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
  114. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
  115. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
  116. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +0 -0
  117. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +0 -0
  118. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/functools.js +0 -0
  119. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/functoolsStorage.js +0 -0
  120. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/functoolsTxt.js +0 -0
  121. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/functoolsUi.js +0 -0
  122. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/functoolsUiBuilder.js +0 -0
  123. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +0 -0
  124. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
  125. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +0 -0
  126. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-error_logs-pyodide.js +0 -0
  127. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-runtimeManager-runtime-pyodide.js +0 -0
  128. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +0 -0
  129. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +0 -0
  130. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/3-btnRunner-py_btn.js +0 -0
  131. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +0 -0
  132. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +0 -0
  133. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +0 -0
  134. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +0 -0
  135. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/5-ideTester-ides_test.js +0 -0
  136. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/6-2-init-playground.js +0 -0
  137. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +0 -0
  138. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +0 -0
  139. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -0
  140. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
  141. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +0 -0
  142. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/main.html +0 -0
  143. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
  144. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
  145. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
  146. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
  147. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
  148. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
  149. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +0 -0
  150. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
  151. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +0 -0
  152. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
  153. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +0 -0
  154. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +0 -0
  155. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
  156. {pyodide_mkdocs_theme-5.5.1 → pyodide_mkdocs_theme-5.5.3}/pyodide_mkdocs_theme/templates/pyodide-css/testing.css +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyodide-mkdocs-theme
3
- Version: 5.5.1
3
+ Version: 5.5.3
4
4
  Summary: Package embedding the necessary tools to host pyodide, ACE editors, jQuery terminals in mkdocs documentations
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: mkdocs,mkdocs-plugin,pyodide,IDE,terminal
@@ -201,7 +201,7 @@ def __define():
201
201
  #------------------------------------------------------------
202
202
 
203
203
 
204
- def run(self, target:str=None, stop_others=True, **_):
204
+ def run(self, target:str=None, stop_others=True, **routines):
205
205
  """
206
206
  Starts a p5 animation, taking the @target id.
207
207
  If @stop_others is True, all existing animations will be stopped before creating this one.
@@ -221,7 +221,7 @@ def __define():
221
221
  for method in map(lambda name: getattr(self, name), dir(self.__class__))
222
222
  if callable(method) and hasattr(method, '_p5_hook')
223
223
  }
224
- self.__routines.update(_) # Arguments (given last) override the methods, if mixed.
224
+ self.__routines.update(routines) # Arguments (given last) override the methods, if mixed.
225
225
 
226
226
  # By default, do not allow several animations to run at once (avoids troubles because
227
227
  # of the shared GLOB_SKETCH object, if the code has not been written using the class):
@@ -411,13 +411,13 @@ def hook(name_or_method:Union[str,Callable]):
411
411
  a string can be passed to the decorator as argument, with the desired camelCase
412
412
  function name.
413
413
  """
414
- def relay(method):
414
+ def wrapper(method):
415
415
  method._p5_hook = name # pylint: disable=W0212
416
416
  return method
417
417
 
418
418
  if callable(name_or_method):
419
419
  name = name_or_method.__name__
420
- return relay(name_or_method)
420
+ return wrapper(name_or_method)
421
421
  else:
422
422
  name = name_or_method
423
- return relay
423
+ return wrapper
@@ -0,0 +1 @@
1
+ https://cdn.jsdelivr.net/npm/p5@1.11.13/lib/p5.min.js
@@ -0,0 +1,423 @@
1
+ """
2
+ p5.js v2 wrapper for Pyodide-MkDocs-Theme, by Frédéric Zinelli.
3
+
4
+ Basic use:
5
+
6
+ 1. Import p5v2 as a namespace (no wildcard imports!):
7
+ 2. Define the setup and draw callbacks, using calls to the original p5 JS functions,
8
+ using`p5.functionName()` syntax.
9
+ 3. Call `p5.run(setup, draw, preload, target="div_id")` at the end of the code (`preload`
10
+ is optional / `target` is also optional and defaults to the current PMT option value
11
+ for `args.figure.div_id`).
12
+
13
+ NOTE:
14
+ * Use the `{{ figure() }}` macro to create the target elements in the page.
15
+ * Use `{{ figure(..., p5_buttons="left") }}` (or "right") to also insert start and stop
16
+ buttons, controlling the sketch event loop.
17
+ * Any number of animation can be built in the page, through any number of IDEs, terminals,
18
+ or py_btns as long as each of them targets a different DOM element.
19
+
20
+
21
+
22
+ Example:
23
+
24
+ ```python
25
+ import p5v2 as p5
26
+
27
+ async def setup():
28
+ p5.createCanvas(200,200)
29
+ p5.background(0)
30
+
31
+ def draw():
32
+ p5.circle(p5.mouseX, p5.mouseY, 50)
33
+
34
+ p5.run(setup, draw) # Targets "figure1"
35
+ p5.run(setup, draw, target='figure2') # Second figure with the same behavior
36
+ ```
37
+
38
+
39
+ Help about p5 use:
40
+ - https://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/p5_processing/
41
+ - https://p5js.org/reference/
42
+
43
+
44
+ Sources:
45
+ - https://p5js.org/
46
+ - https://github.com/processing/p5.js/wiki/Global-and-instance-mode
47
+ - https://forge.apps.education.fr/basthon/basthon-kernel/-/tree/master/packages/kernel-python3/src/modules/p5/p5?ref_type=heads
48
+ (p5 adaptation for Basthon, by Romain Casati)
49
+ """
50
+
51
+ # pylint: disable=E0401, C0103, C0116, C0321, C0415, W0105, W0613, W0621
52
+
53
+
54
+
55
+
56
+
57
+ from typing import Iterable, Union, Any, Callable, Dict
58
+
59
+
60
+ def __define():
61
+
62
+ import js # type: ignore
63
+ from pyodide.ffi import to_js # type: ignore
64
+ from pyodide.ffi.wrappers import ( # type: ignore
65
+ add_event_listener,
66
+ remove_event_listener,
67
+ )
68
+
69
+ from functools import wraps
70
+
71
+
72
+ JS_P5 = js.p5
73
+ GLOB_SKETCH = None
74
+ """
75
+ Current sketch to handle. Automatically sent back when accessing js.p5 attributes.
76
+ Use js.p5 (global mode) if sketch is None.
77
+ """
78
+
79
+
80
+ DEFAULT_ID: str = js.config().argsFigureDivId
81
+
82
+ HANDLERS_TRACKER: Dict[str,'Sketch'] = {} # type: ignore
83
+
84
+
85
+
86
+ # ENTRY POINT from PMT runtime:
87
+ def run(
88
+ setup:Callable,
89
+ draw:Callable=None,
90
+ preload:Callable=None,
91
+ *,
92
+ target:str=None,
93
+ stop_others:bool=True,
94
+ **routines
95
+ ) -> None :
96
+ """
97
+ Starts a p5 animation with the given callbacks and target element in the DOM.
98
+
99
+ Note: THIS P5 PACKAGE IS NOT RELATED IN ANY WAY TO THE P5 PACKAGE AVAILABLE ON PyPI.
100
+ If you need documentation about how to use the present package, seek for:
101
+
102
+ - The related documentation on PMT:
103
+ https://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/p5_processing/
104
+
105
+ - The documentation of the original javascript version of p5:
106
+ https://p5js.org/reference/
107
+
108
+
109
+ ## Example:
110
+
111
+ ```python
112
+ import p5v2 as p5
113
+
114
+ async def setup():
115
+ p5.createCanvas(200,200)
116
+ p5.background(0)
117
+
118
+ def draw():
119
+ p5.circle(p5.mouseX, p5.mouseY, 50)
120
+
121
+ p5.run(setup, draw) # Targets "figure1"
122
+ p5.run(setup, draw, target='figure2') # Second figure with the same behavior
123
+ ```
124
+
125
+ Note that the `target` argument is a keyword only argument.
126
+
127
+
128
+
129
+ ## Stopping (or not) existing animations:
130
+
131
+ By default, `p5.run` will stop all running animations in the page when creating a new one.
132
+ If several animations need to be running at the same time, the `stop_others`
133
+ keyword argument can be passed with its value set to `False` :
134
+
135
+ ```python
136
+ p5.run(..., stop_others=False)
137
+ ```
138
+ WARNING: Beware of global shared states, when several animations are running concurrently!
139
+
140
+
141
+ ## Other events:
142
+
143
+ Other routines can also be used, passing them as additional keyword arguments:
144
+
145
+ ```python
146
+ import p5v2 as p5
147
+
148
+ async def setup():
149
+ p5.createCanvas(200,200)
150
+ p5.background(50)
151
+
152
+ def mouseDragged(e): # NOTE: the argument is not optional, in PMT context.
153
+ terminal_message(0, e.x, e.y)
154
+
155
+ p5.run(setup, mouseDragged=mouseDragged, target='figure2')
156
+ ```
157
+
158
+ ---
159
+
160
+ Help about p5 use:
161
+ - https://p5js.org/reference/
162
+ - https://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/p5_processing/
163
+ """
164
+ routines.update({'setup':setup, 'draw':draw, 'preload':preload})
165
+ Sketch().run(target, stop_others=stop_others, **routines)
166
+
167
+
168
+
169
+
170
+ class Sketch:
171
+ """
172
+ Parent class that can be used to build children classes that will provide complete
173
+ encapsulation of the animations.
174
+ Use it to build complex animations while avoiding any global shared state.
175
+
176
+ See the documentation to know how to use it:
177
+
178
+ https://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/p5_processing/p5_sketch/
179
+ """
180
+
181
+ target: str
182
+ """ Html id of the figure/div where to draw the animation. """
183
+
184
+ p5: Any # JsProxy; PUBLIC/clearer alias for sketch!
185
+
186
+ __sketch: Any = None # JsProxy
187
+ __p5instance: Any = None # JsProxy
188
+ __routines: Dict[ str, Callable[[],None] ]
189
+ """ All p5 functions/events that will need to be bound to the sketch object. """
190
+
191
+ __proxies: list
192
+ __buttons: dict # {name: (button_elt, python_cbk)}
193
+
194
+
195
+ __consumed = False
196
+ """
197
+ Class level flag: if true on instance level, consider the instance as improper to
198
+ use for anim.run(...) call.
199
+ """
200
+
201
+ #------------------------------------------------------------
202
+
203
+
204
+ def run(self, target:str=None, stop_others=True, **routines):
205
+ """
206
+ Starts a p5 animation, taking the @target id.
207
+ If @stop_others is True, all existing animations will be stopped before creating this one.
208
+ """
209
+ if self.__consumed:
210
+ raise ValueError(
211
+ f"The current instance is already in use ({self.target}). Create another one."
212
+ )
213
+
214
+ self.__consumed = True
215
+ self.target = target or DEFAULT_ID
216
+
217
+ self.__proxies = []
218
+ self.__buttons = {}
219
+ self.__routines = {
220
+ method._p5_hook: method # pylint: disable=W0212
221
+ for method in map(lambda name: getattr(self, name), dir(self.__class__))
222
+ if callable(method) and hasattr(method, '_p5_hook')
223
+ }
224
+ self.__routines.update(routines) # Arguments (given last) override the methods, if mixed.
225
+
226
+ # By default, do not allow several animations to run at once (avoids troubles because
227
+ # of the shared GLOB_SKETCH object, if the code has not been written using the class):
228
+ if stop_others:
229
+ old_animations: Iterable[Sketch] = HANDLERS_TRACKER.values()
230
+ for old_anim in old_animations:
231
+ if old_anim.p5.isLooping():
232
+ old_anim.p5.noLoop()
233
+
234
+ # Destroy the current animation's target if it already exists:
235
+ if target in HANDLERS_TRACKER:
236
+ anim: Sketch = HANDLERS_TRACKER.pop(target)
237
+ anim.remove()
238
+ # Popping allows for more flexibility, in case of troubles or when developing
239
+ # (if one`remove()` triggers an error here, it won't occur on the next run).
240
+
241
+ HANDLERS_TRACKER[self.target] = self
242
+ self.__p5instance = js.p5.new(
243
+ self.__to_proxy(self.__call__), # Already contextualized!
244
+ self.target,
245
+ )
246
+
247
+
248
+ def __log(self, *a,**kw):
249
+ """ Debugging logger, if needed """
250
+ js.console.log(self.target, *a, str(kw))
251
+ # print(*a, **kw)
252
+
253
+
254
+ def __call__(self, js_sketch):
255
+
256
+ # Make sure the div is emptied (needed in case a default message is in the
257
+ # {{ figure() }} macros):
258
+ js.document.getElementById(self.target).replaceChildren()
259
+
260
+ # self.__log('Calling P5Handler')
261
+ self.p5 = self.__sketch = js_sketch
262
+
263
+ self.__handle_buttons(True)
264
+ for prop, py_cbk in self.__routines.items():
265
+ self.__build_proxy_cbk_with_global_sketch_rotation(
266
+ js_sketch, prop, py_cbk or (lambda *_a,**_kw: None)
267
+ )
268
+ # self.__log("Done with P5Handler call")
269
+
270
+
271
+
272
+ def __build_proxy_cbk_with_global_sketch_rotation(self, js_sketch, prop, py_cbk):
273
+ """
274
+ Create and register a JsProxy function, based on the user defined python function,
275
+ wrapped in another function that will ensure the nonlocal SKETCH object is updated
276
+ before the user function is called so that the animation/drawing is always done in
277
+ the right DOM element.
278
+ """
279
+ # self.__log(f'{prop}: creating proxy and binding sketch')
280
+
281
+ @wraps(py_cbk)
282
+ def py_wrapper(*a, **kw):
283
+ nonlocal GLOB_SKETCH
284
+ GLOB_SKETCH = js_sketch
285
+ return py_cbk(*a, **kw)
286
+
287
+ # Create and store the JsProxy (setup, draw, ...) then affect it to the sketch object
288
+ proxy = self.__to_proxy(py_wrapper)
289
+ setattr(js_sketch, prop, proxy)
290
+ # See: https://github.com/processing/p5.js/wiki/Global-and-instance-mode
291
+ # Note: JS method binding isn't needed here because of the wrapper function:
292
+ # all method calls are going through the module p5.__getattr__ and then are
293
+ # redirected to the js_sketch instance.
294
+
295
+
296
+ def __to_proxy(self, cbk):
297
+ """
298
+ Create a JsProxy for the given callback and store its reference for later destruction.
299
+ """
300
+ proxy = to_js(cbk)
301
+ self.__proxies.append(proxy)
302
+ return proxy
303
+
304
+
305
+
306
+ def start(self, _event):
307
+ """ Basthon legacy """
308
+ self.__sketch.loop()
309
+
310
+ def stop(self, _event):
311
+ """ Basthon legacy """
312
+ self.__sketch.noLoop()
313
+
314
+ def step(self, _event):
315
+ self.__sketch.noLoop()
316
+ self.__sketch.redraw()
317
+
318
+
319
+
320
+ def __handle_buttons(self, add:bool):
321
+ """
322
+ Add or remove the event listeners for the start and stop buttons (if needed).
323
+
324
+ WARNING:
325
+ Removal of event listeners is done an a different method call, meaning the JsProxy
326
+ sent back by `js.document.getElementById` will _NOT_ return the same instance as
327
+ the first time. And because listeners identification is always done using (at some
328
+ point) the id of the JS object, the proxy _HAS_ to be stored with the callback so
329
+ that the listener removal can properly happen.
330
+ """
331
+ if add:
332
+ for prop in ('start','stop', 'step'):
333
+
334
+ btn_id = f'{ prop }-btn-{ self.target }'
335
+ elt = js.document.getElementById(btn_id)
336
+ if not elt: continue
337
+
338
+ cbk = getattr(self, prop)
339
+ # NOTE: NOT proxying a JsProxy, but a python function.
340
+
341
+ self.__buttons[prop] = (elt, cbk)
342
+ add_event_listener(elt, 'click', cbk)
343
+ else:
344
+ for elt,cbk in self.__buttons.values():
345
+ remove_event_listener(elt, 'click', cbk)
346
+ self.__buttons.clear()
347
+
348
+
349
+ def remove(self):
350
+ """
351
+ Destroy all proxies + unbind the js objects.
352
+ """
353
+ nonlocal GLOB_SKETCH
354
+
355
+ # self.__log('Remove buttons listeners')
356
+ self.__handle_buttons(False)
357
+
358
+ # self.__log('Stop drawing + cleanup p5 instance & DOM')
359
+ # Protect against a possible failure on the previous run, implying missing objects:
360
+ if self.__sketch: self.__sketch.noLoop()
361
+ if self.__p5instance: self.__p5instance.remove()
362
+
363
+ # self.__log('Destroy all JsProxies')
364
+ for proxy in self.__proxies:
365
+ proxy.destroy()
366
+ self.__proxies.clear()
367
+ self.__routines.clear()
368
+
369
+ # self.__log('Remove JsProxies references')
370
+ self.__p5instance = self.p5 = self.__sketch = GLOB_SKETCH = None
371
+
372
+
373
+
374
+
375
+
376
+ def __getattr__(prop):
377
+ """
378
+ Enforce p5 contracts within PMT, and handle redirections of p5 functions or constants
379
+ at call time.
380
+ """
381
+ if prop=='__all__':
382
+ raise ImportError(
383
+ "Wildcard imports of p5 is forbidden within Pyodide-MkDocs-Theme context.\n"
384
+ "Import the module as a namespace instead:\n import p5v2 as p5\n p5.createCanvas()"
385
+ )
386
+ try:
387
+ return getattr(GLOB_SKETCH or JS_P5, prop)
388
+ except:
389
+ raise AttributeError(f"p5.{ prop } is not defined") from None
390
+
391
+
392
+ return run, __getattr__, Sketch
393
+
394
+
395
+
396
+
397
+
398
+ run, __getattr__, Sketch = __define()
399
+
400
+
401
+ def __dir__():
402
+ return ['run', 'Sketch', 'hook']
403
+
404
+
405
+ def hook(name_or_method:Union[str,Callable]):
406
+ """
407
+ Decorator to mark an instance method as being a p5 function that should normally
408
+ be passed to the `p5.run(...)` function. With this decorator, the class will find
409
+ and register the functions for p5 on its own.
410
+ The method name should match the name of the p5.js original function, otherwise,
411
+ a string can be passed to the decorator as argument, with the desired camelCase
412
+ function name.
413
+ """
414
+ def wrapper(method):
415
+ method._p5_hook = name # pylint: disable=W0212
416
+ return method
417
+
418
+ if callable(name_or_method):
419
+ name = name_or_method.__name__
420
+ return wrapper(name_or_method)
421
+ else:
422
+ name = name_or_method
423
+ return wrapper
@@ -0,0 +1 @@
1
+ https://cdn.jsdelivr.net/npm/p5@2/lib/p5.min.js
@@ -0,0 +1,3 @@
1
+ https://unpkg.com/vis-network/standalone/umd/vis-network.min.js
2
+ https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js
3
+ https://unpkg.com/vis-graph3d/standalone/umd/vis-graph3d.min.js
@@ -0,0 +1,3 @@
1
+ https://unpkg.com/vis-network/standalone/umd/vis-network.min.js
2
+ https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js
3
+ https://unpkg.com/vis-graph3d/standalone/umd/vis-graph3d.min.js
@@ -0,0 +1 @@
1
+ __version__ = "5.5.3"
@@ -411,7 +411,7 @@ def _hack_io_stuff():
411
411
  print(re.sub(r"\x08.", "", doc))
412
412
 
413
413
 
414
- PMT_TOOLS = ['p5', 'vis', 'vis_network'] # GENERATED
414
+ PMT_TOOLS = ['p5', 'p5v2', 'vis', 'vis_network'] # GENERATED
415
415
 
416
416
 
417
417
  @wraps_builtin
@@ -99,7 +99,7 @@ export const installPythonPackages=(function(){
99
99
 
100
100
 
101
101
  const FORBID_EXTERNALS = new Set(['py_lib', 'pylib', 'pylibs', 'py-lib', 'py-libs'])
102
- const PMT_TOOLS = ['p5', 'vis', 'vis_network'] // GENERATED
102
+ const PMT_TOOLS = ['p5', 'p5v2', 'vis', 'vis_network'] // GENERATED
103
103
 
104
104
 
105
105
  /**In most cases, installations will be done once only (since no module will be installed
@@ -117,26 +117,20 @@ export const installPythonPackages=(function(){
117
117
  }
118
118
 
119
119
 
120
+ const pyodidePlotRunner = featureRunner('pyodidePlot')
120
121
 
121
- /**Dynamically load a JS script tag (sync) at runtime.
122
- * (Loaded scripts names are cached, to avoid multiple imports)
123
- * */
124
- const asyncJsScriptCdnLoader = (name, scriptOptions={})=> async ()=>{
125
- if(CACHE_JS_INSTALLED.has(scriptOptions.src)){
126
- console.log(name, 'already loaded...')
127
- return
128
- }
129
- _loadScript(scriptOptions.src)
130
122
 
131
- console.log(`Loading ${ name }...`)
132
- while(!CACHE_JS_INSTALLED.has(scriptOptions.src)){
133
- await sleep(50)
134
- }
135
- console.log(name, 'ready')
123
+
124
+ const checkImportAsNamespaceOnly=(name)=>(code, _conf)=>{
125
+ const badImport = new RegExp(`from +${ name }\\S* +import`).test(code)
126
+ if(badImport){ throw new PythonError(
127
+ `ImportError: Invalid ${ name } import.\nThe ${ name } module must be used as a namespace.`
128
+ +`Example:\n import ${ name }\n ${ name }.functionName(...)`
129
+ )}
136
130
  }
137
131
 
138
132
 
139
- const multiCdnsLoader = (name, ...cdns)=> async ()=>{
133
+ const _multiCdnsLoader = (name, ...cdns)=> async ()=>{
140
134
  cdns = cdns.map(data=>
141
135
  typeof(data)=='string' ? {src:data} : data
142
136
  )
@@ -168,21 +162,35 @@ export const installPythonPackages=(function(){
168
162
  document.body.appendChild(script)
169
163
  }
170
164
 
171
- const checkImportAsNamespaceOnly=(name)=>(code, _conf)=>{
172
- const badImport = new RegExp(`from ${ name }\\S* import`).test(code)
173
- if(badImport){ throw new PythonError(
174
- `ImportError: Invalid ${ name } import.\nThe ${ name } module must be used as a namespace.`
175
- +`Example:\n import ${ name }\n ${ name }.functionName(...)`
176
- )}
177
- }
178
165
 
179
- const confImportWithPostCdn=(name, options, codeCheck=null)=>{
180
- if(!Array.isArray(options)) options = [options]
166
+ const pmtToolConf=(name, codeCheck=null)=>{
167
+ if(!PMT_TOOLS.includes(name)){
168
+ throw new Error(`Invalid PMT tool name: ${ name }.`)
169
+ }
181
170
  return {
182
171
  [name]: {
183
172
  codeCheck: codeCheck ?? checkImportAsNamespaceOnly(name),
184
173
  toImport: name,
185
- post: multiCdnsLoader(name, ...options)
174
+ post: async ()=>{
175
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - Loading CDN for", name)
176
+ const cdnsString = pyodide.runPython(`
177
+ def __hack_cdns():
178
+ from pathlib import Path
179
+
180
+ file = Path('${name}/cdns.txt')
181
+ if not file.is_file():
182
+ return ''
183
+
184
+ return file.read_text(encoding='utf-8')
185
+ __hack_cdns()`)
186
+ pyodide.runPython('del __hack_cdns')
187
+ const cdns = cdnsString.replace(/\s+/g, " ").trim().split(' ')
188
+ if(cdnsString && cdns.length){
189
+ await (_multiCdnsLoader(name, ...cdns)())
190
+ }
191
+
192
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - CDN loaded", JSON.stringify(cdns))
193
+ }
186
194
  }
187
195
  }
188
196
  }
@@ -190,16 +198,6 @@ export const installPythonPackages=(function(){
190
198
 
191
199
 
192
200
 
193
-
194
- const pyodidePlotRunner = featureRunner('pyodidePlot')
195
-
196
- const visCdns = [
197
- "https://unpkg.com/vis-network/standalone/umd/vis-network.min.js",
198
- "https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js",
199
- "https://unpkg.com/vis-graph3d/standalone/umd/vis-graph3d.min.js",
200
- ]
201
-
202
-
203
201
  /**IMPORTS_CONFIG type:
204
202
  *
205
203
  * Record<
@@ -226,9 +224,12 @@ export const installPythonPackages=(function(){
226
224
  PIL: {
227
225
  toInstall: "Pillow"
228
226
  },
229
- ...confImportWithPostCdn('p5', "https://cdn.jsdelivr.net/npm/p5@2.3.0/lib/p5.min.js"),
230
- ...confImportWithPostCdn('vis', visCdns),
231
- ...confImportWithPostCdn('vis_network', visCdns),
227
+ // GENERATED ->
228
+ ...pmtToolConf('p5'),
229
+ ...pmtToolConf('p5v2'),
230
+ ...pmtToolConf('vis'),
231
+ ...pmtToolConf('vis_network'),
232
+ // GENERATED <-
232
233
  }
233
234
 
234
235
 
@@ -280,6 +281,7 @@ export const installPythonPackages=(function(){
280
281
  const zipBinary = await zipResponse.arrayBuffer()
281
282
  pyodide.unpackArchive(zipBinary, "zip", {extractDir: libName})
282
283
  await conf.post()
284
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - Installed", libName)
283
285
  }
284
286
 
285
287
 
@@ -295,6 +297,7 @@ export const installPythonPackages=(function(){
295
297
  const conf = getConfAndSetupImport(libName, code)
296
298
  await micropip.install(conf.toInstall) // Nothing done if already installed element(s) => no check needed.
297
299
  await conf.post()
300
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - Installed", libName)
298
301
  }
299
302
 
300
303
 
@@ -441,6 +444,8 @@ del _hack_imports` // (not using the auto_run decorator because it might not be
441
444
  runner.giveFeedback(CONFIG.lang.installDone.msg, null)
442
445
  }
443
446
 
447
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - Finish installations")
448
+
444
449
 
445
450
  // Enforce imports of all installed modules in hidden scope, to be sure they end up in
446
451
  // sys.modules (not using the auto_run decorator because it might not be already in place).
@@ -450,5 +455,7 @@ del _hack_imports` // (not using the auto_run decorator because it might not be
450
455
  // (DON'T filter out already imported modules from the white list because they could have
451
456
  // been imported in a different scope!)
452
457
  runPythonImportsIfAny(runner.whiteList, false)
458
+
459
+ LOGGER_CONFIG.ACTIVATE && jsLogger("[Installer] - Done")
453
460
  }
454
461
  })()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyodide-mkdocs-theme"
3
- version = "5.5.1"
3
+ version = "5.5.3"
4
4
  requires-python = ">=3.9, <4.0"
5
5
  license = { text = "GPL-3.0-or-later" }
6
6
  description = "Package embedding the necessary tools to host pyodide, ACE editors, jQuery terminals in mkdocs documentations"
@@ -59,8 +59,8 @@ dotenv = "^0.9.9"
59
59
  selenium = "4.36"
60
60
  webdriver-manager = "^4.0.2"
61
61
  pytest = "<9.0"
62
- selenium-query = {extras = ["pmt"], version = "^0.1.4"}
63
- pmt-tools = "^0.1.2"
62
+ pmt-tools = {path = "../../pmt_tools", develop = true}
63
+ selenium-query = {path = "../../selenium-query", develop = true}
64
64
 
65
65
 
66
66
  [tool.pytest.ini_options]
@@ -1 +0,0 @@
1
- __version__ = "5.5.1"