pyodide-mkdocs-theme 5.5.2__tar.gz → 5.5.4__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.2 → pyodide_mkdocs_theme-5.5.4}/PKG-INFO +1 -1
  2. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +5 -5
  3. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/PMT_tools/p5/cdns.txt +1 -0
  4. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/PMT_tools/p5v2/__init__.py +423 -0
  5. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/PMT_tools/p5v2/cdns.txt +1 -0
  6. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/PMT_tools/vis/cdns.txt +3 -0
  7. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/PMT_tools/vis_network/cdns.txt +3 -0
  8. pyodide_mkdocs_theme-5.5.4/pyodide_mkdocs_theme/__version__.py +1 -0
  9. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +45 -21
  10. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/sub_configs.py +4 -3
  11. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +1 -1
  12. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/functoolsUi.js +18 -2
  13. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/functoolsUiBuilder.js +6 -4
  14. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/0-generic-python-snippets-pyodide.js +1 -1
  15. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/1-packagesInstaller-install-pyodide.js +46 -39
  16. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +2 -2
  17. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +1 -1
  18. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +1 -1
  19. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +1 -1
  20. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyproject.toml +3 -3
  21. pyodide_mkdocs_theme-5.5.2/pyodide_mkdocs_theme/__version__.py +0 -1
  22. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/LICENSE +0 -0
  23. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/README.md +0 -0
  24. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
  25. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
  26. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/__init__.py +0 -0
  27. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/__main__.py +0 -0
  28. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
  29. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +0 -0
  30. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +0 -0
  31. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/__init__.py +0 -0
  32. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +0 -0
  33. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +0 -0
  34. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +0 -0
  35. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +0 -0
  36. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +0 -0
  37. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +0 -0
  38. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +0 -0
  39. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +0 -0
  40. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
  41. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +0 -0
  42. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
  43. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +0 -0
  44. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
  45. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +0 -0
  46. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +0 -0
  47. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +0 -0
  48. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +0 -0
  49. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +0 -0
  50. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +0 -0
  51. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +0 -0
  52. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +0 -0
  53. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -0
  54. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +0 -0
  55. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +0 -0
  56. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/macros/runners_macros.py +0 -0
  57. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +0 -0
  58. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -0
  59. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +0 -0
  60. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +0 -0
  61. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +0 -0
  62. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +0 -0
  63. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +0 -0
  64. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +0 -0
  65. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +0 -0
  66. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +0 -0
  67. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +0 -0
  68. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +0 -0
  69. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +0 -0
  70. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +0 -0
  71. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +0 -0
  72. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +0 -0
  73. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +0 -0
  74. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/__init__.py +0 -0
  75. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/_string_tools_and_constants.py +0 -0
  76. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/common_tree_src.py +0 -0
  77. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/config_option_src.py +0 -0
  78. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/__init__.py +0 -0
  79. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/docs_dirs_config.py +0 -0
  80. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/macros_configs.py +0 -0
  81. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/plugin_config.py +0 -0
  82. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/dumpers.py +0 -0
  83. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +0 -0
  84. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/macro_config_src.py +0 -0
  85. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/plugin_config_src.py +0 -0
  86. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/sub_config_src.py +0 -0
  87. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/__init__.py +0 -0
  88. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/macros_data.py +0 -0
  89. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +0 -0
  90. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/options_alterations.py +0 -0
  91. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/pages_and_macros_py_configs.py +0 -0
  92. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/test_cases.py +0 -0
  93. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +0 -0
  94. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
  95. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
  96. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +0 -0
  97. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
  98. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
  99. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +0 -0
  100. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +0 -0
  101. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
  102. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +0 -0
  103. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
  104. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/main.py +0 -0
  105. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +0 -0
  106. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
  107. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
  108. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
  109. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/README.md +0 -0
  110. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
  111. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
  112. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
  113. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
  114. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
  115. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
  116. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
  117. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
  118. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
  119. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
  120. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
  121. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
  122. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +0 -0
  123. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +0 -0
  124. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/functools.js +0 -0
  125. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/functoolsStorage.js +0 -0
  126. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/functoolsTxt.js +0 -0
  127. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +0 -0
  128. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
  129. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +0 -0
  130. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/1-error_logs-pyodide.js +0 -0
  131. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/1-runtimeManager-runtime-pyodide.js +0 -0
  132. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +0 -0
  133. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +0 -0
  134. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/3-btnRunner-py_btn.js +0 -0
  135. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +0 -0
  136. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +0 -0
  137. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +0 -0
  138. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/5-ideTester-ides_test.js +0 -0
  139. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/6-2-init-playground.js +0 -0
  140. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +0 -0
  141. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +0 -0
  142. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -0
  143. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
  144. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/main.html +0 -0
  145. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
  146. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
  147. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
  148. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
  149. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
  150. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
  151. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
  152. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
  153. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +0 -0
  154. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +0 -0
  155. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
  156. {pyodide_mkdocs_theme-5.5.2 → pyodide_mkdocs_theme-5.5.4}/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.2
3
+ Version: 5.5.4
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.4"
@@ -83,37 +83,61 @@ class PythonLib:
83
83
  """
84
84
 
85
85
 
86
-
87
86
  def __post_init__(self):
88
- self.path = Path(self.lib)
89
- self.exist = self.path.is_dir()
87
+ self.path = Path(self.lib) # Works with "/" on windows too
90
88
 
91
- if not self.exist and self.lib != PmtCte.PY_LIBS:
92
- raise PmtMacrosPyLibsError(
93
- f"Python libraries used for `python_lib` must be packages but found: { self.lib }."
94
- "\n(a package is a directory with at least an __init__.py file, and possibly other"
95
- " files or packages)"
96
- )
89
+ # Transform any absolute path to a relative one (should never happen, but...)
90
+ if self.path.is_absolute():
91
+ self.path = self.path.relative_to(Path.cwd())
92
+ self.lib = self.path.as_uri()
93
+
94
+ self.exist = self.path.exists()
95
+ is_py = self.path.suffix == '.py'
97
96
 
98
- segments = self.path.parent.parts
99
- if segments:
100
- loc = Path.cwd()
101
- for segment in segments:
102
- loc /= segment
103
- if not (loc/'__init__.py').exists():
104
- break
105
- else:
97
+ if self.exist or is_py:
98
+ if is_py or self.path.is_file():
106
99
  raise PmtMacrosPyLibsError(
107
- f"The { self.lib } python_lib is not directly at the project root directory "
108
- "so it should not be importable from the CWD at build time:\n"
109
- f"Remove the `__init__.py` file from the top level directory."
100
+ f"Python libraries used for `python_libs` must be packages but { self.lib } "
101
+ "is a file.\nA package is a directory with at least an __init__.py file, "
102
+ "and possibly other files or directories."
110
103
  )
111
104
 
105
+ has_init = (self.path / '__init__.py').is_file()
106
+ if not has_init:
107
+ raise PmtMacrosPyLibsError(
108
+ f"The { self.lib } directory is declared as python_lib, but it does not "
109
+ "contain a __init__.py file. Only packages are usable as python libs."
110
+ )
111
+
112
+ is_top_level = not self.path.parent.parts
113
+ if not is_top_level and self._is_importable():
114
+ raise PmtMacrosPyLibsError(
115
+ f"The `{ self.lib }` python_lib is not directly at the project root directory "
116
+ "so it should not be importable from the CWD at build time. Remove an "
117
+ "`__init__.py` file from one of the upper level directories."
118
+ )
119
+
120
+ elif self.lib != PmtCte.PY_LIBS:
121
+ raise PmtMacrosPyLibsError(
122
+ f"{ self.lib } is registered as python_lib in the mkdocs configuration file, but "
123
+ "the package could not be found in the project."
124
+ )
125
+
112
126
  self.lib_name = self.path.name
113
127
  self.archive = Path(f"{ self.lib_name }.{ PmtCte.ZIP_EXTENSION }")
114
128
  self.abs_slash = f"{ self.path.resolve().as_posix() }/"
115
129
 
116
130
 
131
+ def _is_importable(self):
132
+ upper_dirs = self.path.parent.parts
133
+ loc = Path.cwd()
134
+ for segment in upper_dirs:
135
+ loc /= segment
136
+ if not (loc/'__init__.py').exists():
137
+ return False
138
+ return True
139
+
140
+
117
141
  def __bool__(self):
118
142
  return self.exist
119
143
 
@@ -318,7 +342,7 @@ class MaestroPyLibs(MaestroGeneratedPages):
318
342
  )
319
343
  if parenting:
320
344
  raise PmtMacrosPyLibsError(
321
- "Custom python libs defined in the project cannot contain others:" + parenting
345
+ "`python_libs` cannot contain other `python_libs`:" + parenting
322
346
  )
323
347
 
324
348
 
@@ -31,6 +31,7 @@ from ...tools_and_constants import (
31
31
  HashPathMode,
32
32
  MultiProjectFeedbackLevel,
33
33
  PageInclusion,
34
+ PmtCte,
34
35
  SequentialFilter,
35
36
  SequentialRun,
36
37
  NamedTestCase,
@@ -274,15 +275,15 @@ BUILD_CONFIG = SubConfigSrc(
274
275
  ),
275
276
 
276
277
  ConfigOptionSrc(
277
- 'python_libs', List[str], conf_type=C.ListOfItems(C.Type(str), default=['py_libs']),
278
- extra_docs="""
278
+ 'python_libs', List[str], conf_type=C.ListOfItems(C.Type(str), default=[PmtCte.PY_LIBS]),
279
+ extra_docs = f"""
279
280
  Liste de répertoires de [bibliothèques python](--custom-libs) qui doivent être
280
281
  importables dans Pyodide.
281
282
 
282
283
  Une erreur est levée si :
283
284
 
284
285
  * Le nom donné ne correspond pas à un répertoire existant (sauf s'il s'agit de la
285
- valeur par défaut, `#!py "py_libs"`).
286
+ valeur par défaut, `#!py "{ PmtCte.PY_LIBS }"`).
286
287
  * Le répertoire n'est pas situé à la racine du projet.
287
288
  * Le répertoire n'est pas une bibliothèque Python (c'est-à-dire qu'il ne contient
288
289
  pas de fichier `__init__.py`).
@@ -102,7 +102,7 @@ class PmtCte:
102
102
 
103
103
  JS_CONFIG_TEMPLATES = Path(__file__).parent.parent / 'templates' / 'js-libs' / '0-config.js'
104
104
 
105
- PY_LIBS = 'py_libs' # If you change this, don't forget to update config.build.python_libs default
105
+ PY_LIBS = 'py_libs'
106
106
  """ Default name for python libraries """
107
107
 
108
108
  LZW_DELIMITER = "\x1e" # Unambiguous separator
@@ -348,14 +348,29 @@ export const handlePmtTooltips=()=>{
348
348
  })
349
349
  }
350
350
 
351
+ const validTags = '<br> <kbd> <code> <i> <u> <b>'.split(' ')
352
+
353
+ const getValidHtml=(html)=>{
354
+ // In admonitions, tags are escaped somehow (dunno where exactly), so restore them,
355
+ // if they are allowed:
356
+ html = html.replace(/\\</g, "<")
357
+
358
+ const tags = [...html.replace(/\//g,"").match(/<[^>]*>/g)||[]]
359
+ const tagsOk = tags.every(s=>validTags.includes(s))
360
+ return tagsOk ? html : "<i>(Invalid html code)</i>"
361
+ }
362
+
351
363
 
352
364
  // Add the event listener to all tool tips, and mark them as handled (in case several
353
365
  // applications are done-> see MCQ):
354
366
  tips.on('mouseleave', function(e){
355
- floating.css({display: 'none'})
367
+ floating.css({display: 'none', width: "unset"})
356
368
  tipSpan.text("")
357
369
 
358
370
  }).on('mouseenter', function(e){
371
+ if(this.dataset.tipFloat){
372
+ floating.css({width: this.dataset.tipFloat+"em"})
373
+ }
359
374
  let pos
360
375
 
361
376
  if(this.dataset.tipMove!==undefined){
@@ -370,7 +385,8 @@ export const handlePmtTooltips=()=>{
370
385
 
371
386
  pos = getAnchorPoint(rect, pagePos, this)
372
387
  }
373
- tipSpan.html(this.dataset.tipTxt)
388
+ const content = getValidHtml(this.dataset.tipTxt)
389
+ tipSpan.html(content)
374
390
  placement(pos)
375
391
  }).addClass('tip-done')
376
392
 
@@ -51,7 +51,8 @@ const defaultOptions=(options, prop)=>({
51
51
  shift: 50, // %
52
52
  tipWidth: 0, // em ; 0 => auto
53
53
  tipClass: '', // top bottom left right (default: bottom)
54
- tipBare: false, // If true, use the "bare tooltips" mechanism
54
+ bareTip: false, // If true, use the "bare tooltips" mechanism
55
+ floatingWidth: 0,
55
56
 
56
57
  autoCbk: true, // If true, automatic event routine added
57
58
  disabled: undefined,
@@ -93,9 +94,10 @@ const stuffWithTooltip = (tag, options, content) =>{
93
94
  const tagId = !options.tagId ? '':`id="${ options.tagId }"`
94
95
  const tagStyle = getTagStyle(options)
95
96
  const tipSpan = buildTipSpan(options)
96
- const tagDataTip = !options.bareTip || !options.tipText ? '' : ` data-tip-txt="${ options.tipText }"`+(
97
- !options.tipWidth ? '' : `data-tip-width="${ options.tipWidth }"`
98
- )
97
+ const tagDataTip = !(options.bareTip && options.tipText) ? ''
98
+ : ` data-tip-txt="${ options.tipText }"`
99
+ + (!options.tipWidth ? '' : `data-tip-width="${ options.tipWidth }"`)
100
+ + (!options.floatingWidth ? '' : `data-tip-float="${ options.floatingWidth }"`)
99
101
 
100
102
  const buttonType = ' type="button"'.repeat(tag=='button')
101
103
  return $([