Moho 0.2.5__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.
- moho-0.2.5/.cursor/skills/moho-framework/SKILL.md +223 -0
- moho-0.2.5/.cursor/skills/moho-framework/reference.md +270 -0
- moho-0.2.5/.gitattributes +22 -0
- moho-0.2.5/.gitignore +97 -0
- moho-0.2.5/.gitlab-ci.yml +215 -0
- moho-0.2.5/AUTHORS +9 -0
- moho-0.2.5/BREAKING.md +332 -0
- moho-0.2.5/LICENSE +674 -0
- moho-0.2.5/MANIFEST.in +8 -0
- moho-0.2.5/Moho.egg-info/PKG-INFO +127 -0
- moho-0.2.5/Moho.egg-info/SOURCES.txt +587 -0
- moho-0.2.5/Moho.egg-info/dependency_links.txt +1 -0
- moho-0.2.5/Moho.egg-info/entry_points.txt +2 -0
- moho-0.2.5/Moho.egg-info/not-zip-safe +1 -0
- moho-0.2.5/Moho.egg-info/requires.txt +6 -0
- moho-0.2.5/Moho.egg-info/top_level.txt +1 -0
- moho-0.2.5/PKG-INFO +127 -0
- moho-0.2.5/README.md +90 -0
- moho-0.2.5/_check_widget_html.py +43 -0
- moho-0.2.5/build_inplace.sh +2 -0
- moho-0.2.5/contents.rst +13 -0
- moho-0.2.5/doc/.gitignore +3 -0
- moho-0.2.5/doc/Makefile +20 -0
- moho-0.2.5/doc/_static/custom.css +46 -0
- moho-0.2.5/doc/_static/images/scr1.png +0 -0
- moho-0.2.5/doc/_static/images/scr2.png +0 -0
- moho-0.2.5/doc/_static/images/scr3.png +0 -0
- moho-0.2.5/doc/_static/images/scr4.png +0 -0
- moho-0.2.5/doc/_static/images/scr5.png +0 -0
- moho-0.2.5/doc/_static/images/scr6.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_accordions.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_buttons.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_cards.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_carousel.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_checkboxes.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_codeinput.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_colorpicker.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_dragdrop.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_dropdown.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_filechoosers.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_label_formats.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_matplotlib.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_modal.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_pagedlist.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_plotly.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_popups.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_progressbar.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_screenmanager.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_settings.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_size_hints_viz.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_sliders.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_spinner.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_splitter.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_svg.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_switches.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_tabbedpanel_layouts.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_tabs_layouts_viz.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_textinputs.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_togglebutton.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_treeview.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_video.png +0 -0
- moho-0.2.5/doc/_static/images/showcase_x3d.png +0 -0
- moho-0.2.5/doc/_static/showcase_gallery.html +381 -0
- moho-0.2.5/doc/_templates/README.md +1 -0
- moho-0.2.5/doc/_templates/globaltoc.html +15 -0
- moho-0.2.5/doc/_templates/index.html +196 -0
- moho-0.2.5/doc/_templates/layout.html +64 -0
- moho-0.2.5/doc/_templates/navbar.html +22 -0
- moho-0.2.5/doc/aboutus.rst +22 -0
- moho-0.2.5/doc/autobuild.py +279 -0
- moho-0.2.5/doc/conf.py +249 -0
- moho-0.2.5/doc/contents.rst +35 -0
- moho-0.2.5/doc/contribute.rst +20 -0
- moho-0.2.5/doc/gettingstarted/diving.rst +60 -0
- moho-0.2.5/doc/gettingstarted/events.rst +303 -0
- moho-0.2.5/doc/gettingstarted/first_app.rst +246 -0
- moho-0.2.5/doc/gettingstarted/graphics.rst +84 -0
- moho-0.2.5/doc/gettingstarted/index.rst +31 -0
- moho-0.2.5/doc/gettingstarted/installation.rst +28 -0
- moho-0.2.5/doc/gettingstarted/intro.rst +57 -0
- moho-0.2.5/doc/gettingstarted/layouts.rst +104 -0
- moho-0.2.5/doc/gettingstarted/mh_language.rst +119 -0
- moho-0.2.5/doc/gettingstarted/properties.rst +98 -0
- moho-0.2.5/doc/gettingstarted/widgets.rst +64 -0
- moho-0.2.5/doc/highlight.py +53 -0
- moho-0.2.5/doc/install.rst +25 -0
- moho-0.2.5/doc/preprocess.py +10 -0
- moho-0.2.5/doc/rst/api/README.md +0 -0
- moho-0.2.5/doc/showcase_gallery.rst +138 -0
- moho-0.2.5/docker/Dockerfile +17 -0
- moho-0.2.5/examples/.gitignore +1 -0
- moho-0.2.5/examples/__init__.py +0 -0
- moho-0.2.5/examples/kitchen/__init__.py +0 -0
- moho-0.2.5/examples/kitchen/app.py +172 -0
- moho-0.2.5/examples/kitchen/kitchen.mh +622 -0
- moho-0.2.5/examples/layout/__init__.py +0 -0
- moho-0.2.5/examples/layout/app.py +39 -0
- moho-0.2.5/examples/layout/layout.mh +355 -0
- moho-0.2.5/examples/showcase/__init__.py +1 -0
- moho-0.2.5/examples/showcase/app.py +712 -0
- moho-0.2.5/examples/showcase/data/screens/accordions.mh +20 -0
- moho-0.2.5/examples/showcase/data/screens/buttons.mh +13 -0
- moho-0.2.5/examples/showcase/data/screens/cards.mh +63 -0
- moho-0.2.5/examples/showcase/data/screens/carousel.mh +36 -0
- moho-0.2.5/examples/showcase/data/screens/checkboxes.mh +24 -0
- moho-0.2.5/examples/showcase/data/screens/codeinput.mh +26 -0
- moho-0.2.5/examples/showcase/data/screens/colorpicker.mh +16 -0
- moho-0.2.5/examples/showcase/data/screens/dragdrop.mh +27 -0
- moho-0.2.5/examples/showcase/data/screens/dropdown.mh +9 -0
- moho-0.2.5/examples/showcase/data/screens/filechoosers.mh +19 -0
- moho-0.2.5/examples/showcase/data/screens/label_formats.mh +52 -0
- moho-0.2.5/examples/showcase/data/screens/matplotlib.mh +193 -0
- moho-0.2.5/examples/showcase/data/screens/modal.mh +24 -0
- moho-0.2.5/examples/showcase/data/screens/nodegraph.mh +36 -0
- moho-0.2.5/examples/showcase/data/screens/pagedlist.mh +13 -0
- moho-0.2.5/examples/showcase/data/screens/plotly.mh +192 -0
- moho-0.2.5/examples/showcase/data/screens/popups.mh +19 -0
- moho-0.2.5/examples/showcase/data/screens/progressbar.mh +25 -0
- moho-0.2.5/examples/showcase/data/screens/screenmanager.mh +30 -0
- moho-0.2.5/examples/showcase/data/screens/settings.mh +18 -0
- moho-0.2.5/examples/showcase/data/screens/size_hints_viz.mh +153 -0
- moho-0.2.5/examples/showcase/data/screens/sliders.mh +52 -0
- moho-0.2.5/examples/showcase/data/screens/spinner.mh +9 -0
- moho-0.2.5/examples/showcase/data/screens/splitter.mh +36 -0
- moho-0.2.5/examples/showcase/data/screens/svg.mh +209 -0
- moho-0.2.5/examples/showcase/data/screens/switches.mh +34 -0
- moho-0.2.5/examples/showcase/data/screens/tabbedpanel_layouts.mh +95 -0
- moho-0.2.5/examples/showcase/data/screens/table.mh +20 -0
- moho-0.2.5/examples/showcase/data/screens/tabs_layouts_viz.mh +425 -0
- moho-0.2.5/examples/showcase/data/screens/textinputs.mh +39 -0
- moho-0.2.5/examples/showcase/data/screens/togglebutton.mh +32 -0
- moho-0.2.5/examples/showcase/data/screens/treeview.mh +13 -0
- moho-0.2.5/examples/showcase/data/screens/video.mh +14 -0
- moho-0.2.5/examples/showcase/data/screens/x3d_shapes.mh +253 -0
- moho-0.2.5/examples/showcase/showcase.mh +65 -0
- moho-0.2.5/examples/splitter/app.py +41 -0
- moho-0.2.5/examples/splitter/splitter.mh +94 -0
- moho-0.2.5/examples/tutorials/__init__.py +0 -0
- moho-0.2.5/examples/tutorials/first_app/__init__.py +0 -0
- moho-0.2.5/examples/tutorials/first_app/app.py +37 -0
- moho-0.2.5/examples/tutorials/first_app/hello.mh +30 -0
- moho-0.2.5/examples/widgets/__init__.py +0 -0
- moho-0.2.5/examples/widgets/app.py +278 -0
- moho-0.2.5/examples/widgets/data/screens/accordion.mh +30 -0
- moho-0.2.5/examples/widgets/data/screens/actionbar.mh +45 -0
- moho-0.2.5/examples/widgets/data/screens/boxlayout_poshint.mh +54 -0
- moho-0.2.5/examples/widgets/data/screens/bubble.mh +35 -0
- moho-0.2.5/examples/widgets/data/screens/carousel_buttons.mh +122 -0
- moho-0.2.5/examples/widgets/data/screens/codeinput.mh +14 -0
- moho-0.2.5/examples/widgets/data/screens/colorpicker.mh +11 -0
- moho-0.2.5/examples/widgets/data/screens/focus_behavior.mh +13 -0
- moho-0.2.5/examples/widgets/data/screens/label_markup.mh +8 -0
- moho-0.2.5/examples/widgets/data/screens/label_text_size.mh +42 -0
- moho-0.2.5/examples/widgets/data/screens/lang_dynamic.mh +12 -0
- moho-0.2.5/examples/widgets/data/screens/pagedlist.mh +13 -0
- moho-0.2.5/examples/widgets/data/screens/popup.mh +22 -0
- moho-0.2.5/examples/widgets/data/screens/screenmanager.mh +80 -0
- moho-0.2.5/examples/widgets/data/screens/scrollview.mh +131 -0
- moho-0.2.5/examples/widgets/data/screens/scrollview_nested.mh +138 -0
- moho-0.2.5/examples/widgets/data/screens/settings.mh +18 -0
- moho-0.2.5/examples/widgets/data/screens/shorten_text.mh +28 -0
- moho-0.2.5/examples/widgets/data/screens/spinner.mh +16 -0
- moho-0.2.5/examples/widgets/data/screens/splitter.mh +30 -0
- moho-0.2.5/examples/widgets/data/screens/tabbedpanel.mh +28 -0
- moho-0.2.5/examples/widgets/data/screens/text_pango.mh +6 -0
- moho-0.2.5/examples/widgets/data/screens/textalign.mh +55 -0
- moho-0.2.5/examples/widgets/data/screens/unicode_textinput.mh +11 -0
- moho-0.2.5/examples/widgets/data/screens/videoplayer.mh +14 -0
- moho-0.2.5/examples/widgets/demos/__init__.py +1 -0
- moho-0.2.5/examples/widgets/demos/text_pango.py +416 -0
- moho-0.2.5/examples/widgets/widgets.mh +55 -0
- moho-0.2.5/moho/__init__.py +165 -0
- moho-0.2.5/moho/_version.py +24 -0
- moho-0.2.5/moho/admin.py +60 -0
- moho-0.2.5/moho/core/__init__.py +6 -0
- moho-0.2.5/moho/core/_attributes.c +27820 -0
- moho-0.2.5/moho/core/_attributes.pxd +82 -0
- moho-0.2.5/moho/core/_attributes.pyx +683 -0
- moho-0.2.5/moho/core/_clock.c +26971 -0
- moho-0.2.5/moho/core/_clock.pxd +103 -0
- moho-0.2.5/moho/core/_clock.pyx +602 -0
- moho-0.2.5/moho/core/_event.c +30458 -0
- moho-0.2.5/moho/core/_event.pxd +59 -0
- moho-0.2.5/moho/core/_event.pyx +1229 -0
- moho-0.2.5/moho/core/app.py +848 -0
- moho-0.2.5/moho/core/attributes.py +370 -0
- moho-0.2.5/moho/core/auth.py +67 -0
- moho-0.2.5/moho/core/cache.py +238 -0
- moho-0.2.5/moho/core/clock.py +806 -0
- moho-0.2.5/moho/core/compat.py +101 -0
- moho-0.2.5/moho/core/context.py +100 -0
- moho-0.2.5/moho/core/event.py +12 -0
- moho-0.2.5/moho/core/factory.py +155 -0
- moho-0.2.5/moho/core/geometry.py +121 -0
- moho-0.2.5/moho/core/handlers.py +436 -0
- moho-0.2.5/moho/core/ioloop.py +41 -0
- moho-0.2.5/moho/core/logger.py +357 -0
- moho-0.2.5/moho/core/parser.py +154 -0
- moho-0.2.5/moho/core/properties.c +46845 -0
- moho-0.2.5/moho/core/properties.pxd +100 -0
- moho-0.2.5/moho/core/properties.pyx +1613 -0
- moho-0.2.5/moho/core/registry.py +13 -0
- moho-0.2.5/moho/core/resources.py +84 -0
- moho-0.2.5/moho/core/utils.py +492 -0
- moho-0.2.5/moho/core/wasm/__init__.py +16 -0
- moho-0.2.5/moho/core/wasm/bridge.py +212 -0
- moho-0.2.5/moho/core/wasm/clock.py +60 -0
- moho-0.2.5/moho/core/wasm/runtime.py +264 -0
- moho-0.2.5/moho/core/wasm/transport.py +313 -0
- moho-0.2.5/moho/core/weakmethod.c +12178 -0
- moho-0.2.5/moho/core/weakmethod.pxd +10 -0
- moho-0.2.5/moho/core/weakmethod.pyx +86 -0
- moho-0.2.5/moho/core/weakproxy.c +18867 -0
- moho-0.2.5/moho/core/weakproxy.pyx +285 -0
- moho-0.2.5/moho/data/bootstrap.mh +889 -0
- moho-0.2.5/moho/data/engines/bootstrap.mh +963 -0
- moho-0.2.5/moho/data/engines/widgets.bootstrap.mh +351 -0
- moho-0.2.5/moho/data/static/css/bootstrap/bootstrap-icons.min.css +5 -0
- moho-0.2.5/moho/data/static/css/bootstrap/bootstrap.min.css +6 -0
- moho-0.2.5/moho/data/static/css/bootstrap/bootstrap.min.css.map +1 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/FontAwesome.otf +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/MaterialIcons-Regular.eot +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/MaterialIcons-Regular.svg +2373 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/MaterialIcons-Regular.ttf +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/MaterialIcons-Regular.woff +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/MaterialIcons-Regular.woff2 +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/bootstrap-icons.woff +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/bootstrap-icons.woff2 +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/font-awesome.min.css +4 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/fontawesome-webfont.eot +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/fontawesome-webfont.svg +2671 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/fontawesome-webfont.ttf +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/fontawesome-webfont.woff +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/fontawesome-webfont.woff2 +0 -0
- moho-0.2.5/moho/data/static/css/bootstrap/fonts/material-icons.min.css +1 -0
- moho-0.2.5/moho/data/static/css/moho_codeinput.css +384 -0
- moho-0.2.5/moho/data/static/css/moho_nodegraph.css +112 -0
- moho-0.2.5/moho/data/static/css/styles.css +870 -0
- moho-0.2.5/moho/data/static/css/vendor/katex.min.css +1 -0
- moho-0.2.5/moho/data/static/favicon.gif +0 -0
- moho-0.2.5/moho/data/static/favicon.ico +0 -0
- moho-0.2.5/moho/data/static/favicon.jpg +0 -0
- moho-0.2.5/moho/data/static/favicon.png +0 -0
- moho-0.2.5/moho/data/static/js/bootstrap/bootstrap.bundle.min.js +7 -0
- moho-0.2.5/moho/data/static/js/bootstrap/bootstrap.bundle.min.js.map +1 -0
- moho-0.2.5/moho/data/static/js/moho.js +958 -0
- moho-0.2.5/moho/data/static/js/moho_dnd.js +141 -0
- moho-0.2.5/moho/data/static/js/moho_katex.js +27 -0
- moho-0.2.5/moho/data/static/js/moho_label.js +51 -0
- moho-0.2.5/moho/data/static/js/moho_markdown.js +43 -0
- moho-0.2.5/moho/data/static/js/moho_nodegraph.js +533 -0
- moho-0.2.5/moho/data/static/js/moho_tooltip.js +122 -0
- moho-0.2.5/moho/data/static/js/moho_upload.js +98 -0
- moho-0.2.5/moho/data/static/js/mpl.js +926 -0
- moho-0.2.5/moho/data/static/js/plotly_moho.js +512 -0
- moho-0.2.5/moho/data/static/js/server_monitor.js +234 -0
- moho-0.2.5/moho/data/static/js/splitter.js +454 -0
- moho-0.2.5/moho/data/static/js/vendor/dompurify.min.js +3 -0
- moho-0.2.5/moho/data/static/js/vendor/katex.auto-render.min.js +1 -0
- moho-0.2.5/moho/data/static/js/vendor/katex.min.js +1 -0
- moho-0.2.5/moho/data/static/js/vendor/marked.min.js +6 -0
- moho-0.2.5/moho/data/static/js/x3d.js +936 -0
- moho-0.2.5/moho/data/static/robots.txt +2 -0
- moho-0.2.5/moho/data/templates/index.html +15 -0
- moho-0.2.5/moho/data/widgets.mh +310 -0
- moho-0.2.5/moho/lang/__init__.py +827 -0
- moho-0.2.5/moho/lang/builder.py +844 -0
- moho-0.2.5/moho/lang/parser.py +808 -0
- moho-0.2.5/moho/tests/__init__.py +0 -0
- moho-0.2.5/moho/tests/_sync_probe.py +167 -0
- moho-0.2.5/moho/tests/test_actionbar_overflow_playwright.py +270 -0
- moho-0.2.5/moho/tests/test_app.py +60 -0
- moho-0.2.5/moho/tests/test_attributes.py +372 -0
- moho-0.2.5/moho/tests/test_clock.py +131 -0
- moho-0.2.5/moho/tests/test_event_channel.py +256 -0
- moho-0.2.5/moho/tests/test_html_fastpath.py +80 -0
- moho-0.2.5/moho/tests/test_lang.py +291 -0
- moho-0.2.5/moho/tests/test_mpl_settings.py +313 -0
- moho-0.2.5/moho/tests/test_mpl_utils.py +45 -0
- moho-0.2.5/moho/tests/test_nodegraph.py +169 -0
- moho-0.2.5/moho/tests/test_packaging_artifacts.py +179 -0
- moho-0.2.5/moho/tests/test_plotly_figure.py +264 -0
- moho-0.2.5/moho/tests/test_plotly_settings.py +376 -0
- moho-0.2.5/moho/tests/test_properties.py +677 -0
- moho-0.2.5/moho/tests/test_server_health.py +51 -0
- moho-0.2.5/moho/tests/test_static_fallback.py +73 -0
- moho-0.2.5/moho/tests/test_sync_cost.py +372 -0
- moho-0.2.5/moho/tests/test_table.py +378 -0
- moho-0.2.5/moho/tests/test_token_access.py +224 -0
- moho-0.2.5/moho/tests/test_vanilla_js_no_jquery.py +77 -0
- moho-0.2.5/moho/tests/test_wasm_transport.py +119 -0
- moho-0.2.5/moho/tests/test_weakmethod.py +57 -0
- moho-0.2.5/moho/tests/test_weakproxy.py +113 -0
- moho-0.2.5/moho/tests/test_widgets.py +884 -0
- moho-0.2.5/moho/tests/widgets_regression/README.md +41 -0
- moho-0.2.5/moho/tests/widgets_regression/__init__.py +1 -0
- moho-0.2.5/moho/tests/widgets_regression/_helpers.py +35 -0
- moho-0.2.5/moho/tests/widgets_regression/test_core_widgets.py +45 -0
- moho-0.2.5/moho/tests/widgets_regression/test_factory.py +54 -0
- moho-0.2.5/moho/tests/widgets_regression/test_mpl.py +64 -0
- moho-0.2.5/moho/tests/widgets_regression/test_nodegraph.py +70 -0
- moho-0.2.5/moho/tests/widgets_regression/test_phase0_widgets.py +246 -0
- moho-0.2.5/moho/tests/widgets_regression/test_plotly.py +70 -0
- moho-0.2.5/moho/tests/widgets_regression/test_showcase_screens.py +72 -0
- moho-0.2.5/moho/tests/widgets_regression/test_svg.py +103 -0
- moho-0.2.5/moho/tests/widgets_regression/test_x3d.py +139 -0
- moho-0.2.5/moho/uix/.gitignore +1 -0
- moho-0.2.5/moho/uix/__init__.py +16 -0
- moho-0.2.5/moho/uix/_html.c +10206 -0
- moho-0.2.5/moho/uix/_html.pyx +107 -0
- moho-0.2.5/moho/uix/body.py +195 -0
- moho-0.2.5/moho/uix/bootstrap/__init__.py +8 -0
- moho-0.2.5/moho/uix/bootstrap/accordion.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/alert.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/app.py +3 -0
- moho-0.2.5/moho/uix/bootstrap/badge.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/boxlayout.py +26 -0
- moho-0.2.5/moho/uix/bootstrap/breadcrumb.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/button.py +25 -0
- moho-0.2.5/moho/uix/bootstrap/card.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/checkbox.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/closebutton.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/combobox.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/dropdown.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/element.py +8 -0
- moho-0.2.5/moho/uix/bootstrap/gridlayout.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/icon.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/input.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/lineedit.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/listgroup.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/modal.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/__init__.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/bar.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/errorbar.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/figure.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/map3d.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/plot2d.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/scatter.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/settings.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/mpl/utils.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/navbar.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/overlay.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/pagination.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/placeholder.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/__init__.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/bar.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/errorbar.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/figure.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/map3d.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/plot2d.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/scatter.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/settings.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/plotly/utils.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/progress.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/radio.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/range.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/sidebar.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/spinner.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/tabs.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/textedit.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/toast.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/toolbar.py +2 -0
- moho-0.2.5/moho/uix/bootstrap/x3d/__init__.py +9 -0
- moho-0.2.5/moho/uix/bootstrap/x3d/viewer.py +9 -0
- moho-0.2.5/moho/uix/element.py +1247 -0
- moho-0.2.5/moho/uix/engines/__init__.py +12 -0
- moho-0.2.5/moho/uix/engines/base.py +90 -0
- moho-0.2.5/moho/uix/engines/bootstrap/__init__.py +11 -0
- moho-0.2.5/moho/uix/engines/bootstrap/app.py +309 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/__init__.py +249 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/_pygments.py +56 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/_util.py +62 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/accordion.py +141 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/actionbar.py +385 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/alert.py +56 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/badge.py +61 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/boxlayout.py +226 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/button.py +140 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/card.py +304 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/carousel.py +72 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/checkbox.py +18 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/codeinput.py +215 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/components.py +491 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/dropdown.py +88 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/icon.py +46 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/label.py +230 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/layouts.py +265 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/misc.py +109 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/modal.py +189 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/nodegraph.py +95 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/overlay.py +46 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/placeholder.py +76 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/primitives.py +56 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/progress.py +115 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/splitter.py +301 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/switch.py +7 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/table.py +186 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/textinput.py +148 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/togglebutton.py +14 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/video.py +85 -0
- moho-0.2.5/moho/uix/engines/bootstrap/backends/visual.py +111 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/__init__.py +7 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/accordion.py +142 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/alert.py +34 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/badge.py +25 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/boxlayout.py +26 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/breadcrumb.py +51 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/button.py +25 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/card.py +139 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/checkbox.py +62 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/closebutton.py +44 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/combobox.py +82 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/dropdown.py +163 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/gridlayout.py +60 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/icon.py +47 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/input.py +85 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/lineedit.py +36 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/listgroup.py +65 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/modal.py +99 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/navbar.py +128 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/overlay.py +9 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/pagination.py +80 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/placeholder.py +52 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/progress.py +50 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/radio.py +62 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/range.py +45 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/sidebar.py +78 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/spinner.py +58 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/tabs.py +244 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/textedit.py +37 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/toast.py +78 -0
- moho-0.2.5/moho/uix/engines/bootstrap/components/toolbar.py +106 -0
- moho-0.2.5/moho/uix/engines/bootstrap/dnd.py +55 -0
- moho-0.2.5/moho/uix/engines/bootstrap/element.py +73 -0
- moho-0.2.5/moho/uix/engines/bootstrap/engine.py +27 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/__init__.py +68 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/bar.py +117 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/errorbar.py +128 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/figure.py +618 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/map3d.py +280 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/plot2d.py +148 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/scatter.py +133 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/settings.py +564 -0
- moho-0.2.5/moho/uix/engines/bootstrap/mpl/utils.py +218 -0
- moho-0.2.5/moho/uix/engines/bootstrap/overlay.py +37 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/__init__.py +66 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/bar.py +72 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/errorbar.py +91 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/figure.py +659 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/map3d.py +170 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/plot2d.py +126 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/scatter.py +59 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/settings.py +590 -0
- moho-0.2.5/moho/uix/engines/bootstrap/plotly/utils.py +257 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/__init__.py +1 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/button.py +20 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/div.py +14 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/heading.py +40 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/hyperlink.py +38 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/image.py +50 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/input.py +122 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/paragraph.py +28 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/select.py +94 -0
- moho-0.2.5/moho/uix/engines/bootstrap/primitives/textarea.py +62 -0
- moho-0.2.5/moho/uix/engines/bootstrap/x3d/__init__.py +16 -0
- moho-0.2.5/moho/uix/engines/bootstrap/x3d/viewer.py +129 -0
- moho-0.2.5/moho/uix/engines/registry.py +42 -0
- moho-0.2.5/moho/uix/html5/__init__.py +4 -0
- moho-0.2.5/moho/uix/html5/button.py +2 -0
- moho-0.2.5/moho/uix/html5/div.py +2 -0
- moho-0.2.5/moho/uix/html5/heading.py +2 -0
- moho-0.2.5/moho/uix/html5/hyperlink.py +2 -0
- moho-0.2.5/moho/uix/html5/image.py +2 -0
- moho-0.2.5/moho/uix/html5/input.py +2 -0
- moho-0.2.5/moho/uix/html5/paragraph.py +2 -0
- moho-0.2.5/moho/uix/html5/select.py +3 -0
- moho-0.2.5/moho/uix/html5/textarea.py +2 -0
- moho-0.2.5/moho/uix/nodegraph/__init__.py +20 -0
- moho-0.2.5/moho/uix/nodegraph/edge.py +31 -0
- moho-0.2.5/moho/uix/nodegraph/executor.py +88 -0
- moho-0.2.5/moho/uix/nodegraph/graph.py +380 -0
- moho-0.2.5/moho/uix/nodegraph/node.py +218 -0
- moho-0.2.5/moho/uix/nodegraph/port.py +46 -0
- moho-0.2.5/moho/uix/nodegraph/types.py +61 -0
- moho-0.2.5/moho/uix/svg.py +520 -0
- moho-0.2.5/moho/uix/widget.py +45 -0
- moho-0.2.5/moho/uix/widgets/__init__.py +172 -0
- moho-0.2.5/moho/uix/widgets/accordion.py +97 -0
- moho-0.2.5/moho/uix/widgets/actionbar.py +351 -0
- moho-0.2.5/moho/uix/widgets/alert.py +28 -0
- moho-0.2.5/moho/uix/widgets/anchorlayout.py +41 -0
- moho-0.2.5/moho/uix/widgets/badge.py +28 -0
- moho-0.2.5/moho/uix/widgets/behaviors.py +258 -0
- moho-0.2.5/moho/uix/widgets/boxlayout.py +97 -0
- moho-0.2.5/moho/uix/widgets/button.py +58 -0
- moho-0.2.5/moho/uix/widgets/card.py +187 -0
- moho-0.2.5/moho/uix/widgets/carousel.py +141 -0
- moho-0.2.5/moho/uix/widgets/checkbox.py +58 -0
- moho-0.2.5/moho/uix/widgets/codeinput.py +52 -0
- moho-0.2.5/moho/uix/widgets/colorpicker.py +113 -0
- moho-0.2.5/moho/uix/widgets/dropdown.py +116 -0
- moho-0.2.5/moho/uix/widgets/filechooser.py +381 -0
- moho-0.2.5/moho/uix/widgets/floatlayout.py +103 -0
- moho-0.2.5/moho/uix/widgets/gridlayout.py +38 -0
- moho-0.2.5/moho/uix/widgets/icon.py +30 -0
- moho-0.2.5/moho/uix/widgets/label.py +48 -0
- moho-0.2.5/moho/uix/widgets/modal.py +47 -0
- moho-0.2.5/moho/uix/widgets/mpl.py +25 -0
- moho-0.2.5/moho/uix/widgets/nodegraph.py +20 -0
- moho-0.2.5/moho/uix/widgets/overlay.py +36 -0
- moho-0.2.5/moho/uix/widgets/pagedlist.py +170 -0
- moho-0.2.5/moho/uix/widgets/placeholder.py +43 -0
- moho-0.2.5/moho/uix/widgets/plotly.py +30 -0
- moho-0.2.5/moho/uix/widgets/popup.py +91 -0
- moho-0.2.5/moho/uix/widgets/progress.py +84 -0
- moho-0.2.5/moho/uix/widgets/recycleview.py +7 -0
- moho-0.2.5/moho/uix/widgets/relativelayout.py +14 -0
- moho-0.2.5/moho/uix/widgets/screenmanager.py +235 -0
- moho-0.2.5/moho/uix/widgets/scrollview.py +74 -0
- moho-0.2.5/moho/uix/widgets/settings.py +169 -0
- moho-0.2.5/moho/uix/widgets/slider.py +67 -0
- moho-0.2.5/moho/uix/widgets/spinner.py +70 -0
- moho-0.2.5/moho/uix/widgets/splitter.py +124 -0
- moho-0.2.5/moho/uix/widgets/stacklayout.py +48 -0
- moho-0.2.5/moho/uix/widgets/svg.py +24 -0
- moho-0.2.5/moho/uix/widgets/switch.py +80 -0
- moho-0.2.5/moho/uix/widgets/tabbedpanel.py +212 -0
- moho-0.2.5/moho/uix/widgets/table.py +580 -0
- moho-0.2.5/moho/uix/widgets/textinput.py +94 -0
- moho-0.2.5/moho/uix/widgets/togglebutton.py +29 -0
- moho-0.2.5/moho/uix/widgets/treeview.py +258 -0
- moho-0.2.5/moho/uix/widgets/video.py +171 -0
- moho-0.2.5/moho/uix/widgets/x3d.py +31 -0
- moho-0.2.5/moho/uix/x3d/__init__.py +36 -0
- moho-0.2.5/moho/uix/x3d/appearance.py +83 -0
- moho-0.2.5/moho/uix/x3d/element.py +6 -0
- moho-0.2.5/moho/uix/x3d/env.py +97 -0
- moho-0.2.5/moho/uix/x3d/scene.py +35 -0
- moho-0.2.5/moho/uix/x3d/shape.py +247 -0
- moho-0.2.5/pyproject.toml +86 -0
- moho-0.2.5/requirements.txt +3 -0
- moho-0.2.5/scripts/build_inplace.sh +8 -0
- moho-0.2.5/scripts/capture_showcase_screenshots.ps1 +129 -0
- moho-0.2.5/scripts/check_pypi_artifacts.py +54 -0
- moho-0.2.5/scripts/linux/build_sdist.sh +28 -0
- moho-0.2.5/scripts/linux/build_wheel.sh +100 -0
- moho-0.2.5/scripts/linux/compile_docs.sh +62 -0
- moho-0.2.5/scripts/linux/compile_pages.sh +33 -0
- moho-0.2.5/scripts/linux/ensure_manylinux_interpreters.sh +37 -0
- moho-0.2.5/scripts/linux/stage_pages_wheels.py +203 -0
- moho-0.2.5/scripts/linux/test_python.sh +41 -0
- moho-0.2.5/scripts/moho_packaging.py +162 -0
- moho-0.2.5/scripts/regen_codeinput_css.py +103 -0
- moho-0.2.5/scripts/regen_showcase_gallery_html.py +222 -0
- moho-0.2.5/scripts/run_example.ps1 +21 -0
- moho-0.2.5/scripts/run_example.sh +22 -0
- moho-0.2.5/scripts/run_show.ps1 +33 -0
- moho-0.2.5/scripts/run_show.sh +18 -0
- moho-0.2.5/scripts/scm_version.py +34 -0
- moho-0.2.5/scripts/setup_venv.ps1 +20 -0
- moho-0.2.5/scripts/setup_venv.sh +22 -0
- moho-0.2.5/scripts/smoke_wheel.py +202 -0
- moho-0.2.5/scripts/wasm/README.md +161 -0
- moho-0.2.5/scripts/wasm/build_all.ps1 +63 -0
- moho-0.2.5/scripts/wasm/build_moho_wheel.sh +55 -0
- moho-0.2.5/scripts/wasm/build_tornado_pure_wheel.py +107 -0
- moho-0.2.5/scripts/wasm/config.env +10 -0
- moho-0.2.5/scripts/wasm/config.ps1 +35 -0
- moho-0.2.5/scripts/wasm/package_showcase.ps1 +224 -0
- moho-0.2.5/scripts/wasm/package_showcase.sh +249 -0
- moho-0.2.5/scripts/wasm/retag_moho_wheel.py +86 -0
- moho-0.2.5/scripts/wasm/serve.ps1 +78 -0
- moho-0.2.5/scripts/wasm/setup_wsl.ps1 +98 -0
- moho-0.2.5/scripts/wasm/templates/boot.py +105 -0
- moho-0.2.5/scripts/wasm/templates/index.html +150 -0
- moho-0.2.5/scripts/wasm/validate_parity.ps1 +118 -0
- moho-0.2.5/scripts/wasm/vendor_pyodide.py +191 -0
- moho-0.2.5/scripts/win/build_wheel.bat +171 -0
- moho-0.2.5/setup.cfg +10 -0
- moho-0.2.5/setup.py +109 -0
- moho-0.2.5/test.sh +15 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moho-framework
|
|
3
|
+
description: >-
|
|
4
|
+
Develop Moho Rich Internet Applications using Python, Cython, Tornado,
|
|
5
|
+
Bootstrap, and .mh declarative UI files. Use when working in moho-framework,
|
|
6
|
+
creating or editing .mh files, BootstrapApp/WebApp classes, Element widgets,
|
|
7
|
+
Factory registration, or Moho server-client WebSocket sync.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Moho Framework
|
|
11
|
+
|
|
12
|
+
## Framework identity
|
|
13
|
+
|
|
14
|
+
Moho is an open-source Python framework for building Rich Internet Applications (RIAs). It is inspired by Kivy but targets the web: instead of an OpenGL desktop app, you run a server-client application over HTTP and WebSocket.
|
|
15
|
+
|
|
16
|
+
- UI language files use `.mh` extension (not Kivy `.kv`)
|
|
17
|
+
- Stack: Python 3.9+, Cython, Tornado (HTTP + WebSocket), Bootstrap 5, vanilla JS (`moho.events`)
|
|
18
|
+
- License: GPLv3
|
|
19
|
+
- Live API docs: https://escape-projects.gitlab.io/moho-framework/
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart TB
|
|
25
|
+
subgraph server [PythonServer]
|
|
26
|
+
App[BootstrapApp]
|
|
27
|
+
MH[show.mh via Builder]
|
|
28
|
+
Elements[Element tree]
|
|
29
|
+
WS[WebSocket /ws/moho]
|
|
30
|
+
App --> MH
|
|
31
|
+
App --> Elements
|
|
32
|
+
Elements --> WS
|
|
33
|
+
end
|
|
34
|
+
subgraph browser [Browser]
|
|
35
|
+
JS[moho.js]
|
|
36
|
+
BS[Bootstrap widgets]
|
|
37
|
+
JS --> BS
|
|
38
|
+
end
|
|
39
|
+
WS <-->|JSON events| JS
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Python defines logic and the element tree; `.mh` files define layout and rules; `html_tpl`/`js_tpl` render widgets in the browser. Attribute changes with `sync=True` sync to the client over WebSocket.
|
|
43
|
+
|
|
44
|
+
### Static files
|
|
45
|
+
|
|
46
|
+
`/static/...` is served from the app's `data/static` **first**, then falls back to the Moho package `moho/data/static`. You do **not** need to copy `moho.js`, Bootstrap, Plotly helpers, etc. into every app — only keep local overrides or app-specific assets. `moho-admin project` may still scaffold a full static copy for convenience.
|
|
47
|
+
|
|
48
|
+
## Minimum application pattern
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from moho.core.logger import Logger
|
|
52
|
+
from moho.uix.bootstrap.app import BootstrapApp
|
|
53
|
+
from moho.uix.body import Body
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class MainBody(Body):
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class ShowcaseApp(BootstrapApp):
|
|
61
|
+
|
|
62
|
+
def build(self):
|
|
63
|
+
return MainBody()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
Logger.setLevel('DEBUG')
|
|
68
|
+
ShowcaseApp(cookie_secret="__GENERATE_RANDOM_SECRET__").run() # default port 8888
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Reference: `moho/core/app.py`, `examples/showcase/app.py`.
|
|
72
|
+
|
|
73
|
+
## `.mh` auto-loading
|
|
74
|
+
|
|
75
|
+
The app class name determines which `.mh` file loads automatically:
|
|
76
|
+
|
|
77
|
+
- `ShowcaseApp` → `showcase.mh` in the same directory as `app.py`
|
|
78
|
+
- Strip trailing `App`, lowercase the remainder
|
|
79
|
+
- `.mh` rules load during `run()`, **before** `build()` executes
|
|
80
|
+
- Override with `mh_file` or `mh_directory` properties on the app class
|
|
81
|
+
|
|
82
|
+
## Property vs Attribute
|
|
83
|
+
|
|
84
|
+
| Type | Examples | Scope | Syncs to browser? |
|
|
85
|
+
|------|----------|-------|-------------------|
|
|
86
|
+
| Property | `StringProperty`, `BooleanProperty`, `NumericProperty` | Backend only | No |
|
|
87
|
+
| Attribute | `ElementAttribute`, `ClassAttribute`, `StyleAttribute` | HTML representation | Yes, when `sync=True` |
|
|
88
|
+
|
|
89
|
+
Use Moho `Property`/`Attribute` types for widget state — not Python `@property`.
|
|
90
|
+
|
|
91
|
+
### Local vs client vs synced
|
|
92
|
+
|
|
93
|
+
| Concept | How to declare | Example |
|
|
94
|
+
|---------|----------------|---------|
|
|
95
|
+
| Local event | `register_event('on_select')` or property `on_<prop>` | Parent dropdown selection |
|
|
96
|
+
| Client event | `EventAttribute` / `register_event('on_click', client=True)` | Browser click → `on_click` |
|
|
97
|
+
| Synced attribute | `ElementAttribute(..., sync=True)` | Push `value` to the DOM |
|
|
98
|
+
|
|
99
|
+
- Local / property events: `on_<propname>` callbacks and `.mh` `on_<prop>:`
|
|
100
|
+
- Client (browser) events: `on_<event>` handlers (e.g. `on_click`) — also bindable in `.mh` as `on_click:`
|
|
101
|
+
- Push to browser: `element.emit_to_client(event, **kwargs)`
|
|
102
|
+
|
|
103
|
+
## Widget development checklist
|
|
104
|
+
|
|
105
|
+
1. **Python class** — subclass `moho.uix.widget.Widget`; declare Kivy-style
|
|
106
|
+
properties and events only (no Bootstrap `ClassAttribute` / `html_tpl`)
|
|
107
|
+
2. **Backend** — implement presentation in
|
|
108
|
+
`moho.uix.engines.bootstrap.backends` and add it to `BACKENDS`
|
|
109
|
+
3. **Factory registration** — `Factory.register(...)` in
|
|
110
|
+
`moho/uix/engines/bootstrap/app.py` (compat: `moho.uix.bootstrap.app`)
|
|
111
|
+
4. **Style rules** — add rules to `moho/data/engines/bootstrap.mh` /
|
|
112
|
+
`widgets.bootstrap.mh` or app-specific `.mh`
|
|
113
|
+
5. Escape hatch: subclass `BootstrapElement` only for app-local chrome that
|
|
114
|
+
needs Bootstrap spacing utilities
|
|
115
|
+
|
|
116
|
+
### Custom widget example (from showcase)
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
class CustomButton(Button):
|
|
120
|
+
|
|
121
|
+
def __init__(self, **kwargs):
|
|
122
|
+
super(CustomButton, self).__init__(**kwargs)
|
|
123
|
+
self._numclicks = 0
|
|
124
|
+
|
|
125
|
+
def on_click(self, *args, **kwargs):
|
|
126
|
+
self.text = "Clicked {0}".format(self._numclicks + 1)
|
|
127
|
+
self._numclicks += 1
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Register in `.mh` via dynamic class or rule targeting the Python class.
|
|
131
|
+
|
|
132
|
+
## `.mh` quick rules
|
|
133
|
+
|
|
134
|
+
Every `.mh` file starts with a version header:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
#:moho 1.0
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
| Construct | Syntax |
|
|
141
|
+
|-----------|--------|
|
|
142
|
+
| Rule (applies to class) | `<ClassName>:` |
|
|
143
|
+
| Root widget | `ClassName:` (no angle brackets) |
|
|
144
|
+
| Dynamic class | `<NewWidget@BaseClass>:` |
|
|
145
|
+
| Import | `#:import alias module` |
|
|
146
|
+
| Include | `#:include other.mh` |
|
|
147
|
+
| Variable | `#:set name value` |
|
|
148
|
+
|
|
149
|
+
Keywords in expressions: `self`, `root`, `app`, `args` (in callbacks).
|
|
150
|
+
|
|
151
|
+
Indentation must be consistent spaces (no tab/space mixing). Property values must be single-line Python expressions.
|
|
152
|
+
|
|
153
|
+
See [reference.md](reference.md) for full `.mh` syntax.
|
|
154
|
+
|
|
155
|
+
## Project layout
|
|
156
|
+
|
|
157
|
+
Scaffold with `moho-admin project <name> [--type bootstrap|native|w3css]`:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
myproject/
|
|
161
|
+
├── app.py
|
|
162
|
+
├── showcase.mh # auto-loaded if class is ShowcaseApp
|
|
163
|
+
├── __init__.py
|
|
164
|
+
└── data/
|
|
165
|
+
├── static/ # CSS, JS
|
|
166
|
+
└── templates/ # index.html
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Showcase reference: `examples/showcase/` (`app.py`, `showcase.mh`, per-screen demos under `data/screens/`).
|
|
170
|
+
|
|
171
|
+
## Build, test, and run
|
|
172
|
+
|
|
173
|
+
| Task | Command |
|
|
174
|
+
|------|---------|
|
|
175
|
+
| Compile Cython extensions | `bash build_inplace.sh` |
|
|
176
|
+
| Full install | `python setup.py install` |
|
|
177
|
+
| Quick tests | `bash test.sh` |
|
|
178
|
+
| Widget regression | `python -m unittest discover -s moho/tests/widgets_regression -v` |
|
|
179
|
+
| Full test suite | `python -m unittest discover -v` (from `moho/tests/`) |
|
|
180
|
+
| Run showcase | `cd examples/showcase && python app.py` |
|
|
181
|
+
| Capture showcase screenshots | `.\scripts\capture_showcase_screenshots.ps1` |
|
|
182
|
+
| Docker showcase | `docker run -d -p 8888:8888 escapeapp/moho-examples:master` |
|
|
183
|
+
| WASM package / serve | `.\scripts\wasm\build_all.ps1` then `.\scripts\wasm\serve.ps1` (vendors Pyodide; CI publishes to Pages `/showcase/`) |
|
|
184
|
+
| Build docs | `scripts/linux/compile_docs.sh` |
|
|
185
|
+
|
|
186
|
+
Visualization façades (`MplFigure`, `PlotlyFigure`, `Svg*`, `X3d*`) are imported from
|
|
187
|
+
`moho.uix.widgets` (modules `widgets.mpl`, `widgets.plotly`, `widgets.svg`,
|
|
188
|
+
`widgets.x3d`). Regression coverage and showcase gallery notes:
|
|
189
|
+
`moho/tests/widgets_regression/README.md`, `doc/showcase_gallery.rst`,
|
|
190
|
+
`doc/_static/showcase_gallery.html`.
|
|
191
|
+
|
|
192
|
+
Always compile Cython extensions before running or testing.
|
|
193
|
+
|
|
194
|
+
## Code conventions
|
|
195
|
+
|
|
196
|
+
- Match existing style in the file being edited
|
|
197
|
+
- Register new widgets in `moho/uix/engines/bootstrap/app.py` via `Factory.register()`
|
|
198
|
+
(and add a Backend under `moho.uix.engines.bootstrap.backends`)
|
|
199
|
+
- Use `examples/showcase/` for the full widget / Bootstrap / plot demo
|
|
200
|
+
- Prefer `from moho.uix.widgets import ...` for Kivy-familiar names (ScrollView, ScreenManager, Label, …)
|
|
201
|
+
- Prefer `add_widget` / `remove_widget` / `clear_widgets` (Kivy names); do not use the removed `add_element` API
|
|
202
|
+
- Module docstrings in `moho/lang/__init__.py` and `moho/uix/element.py` are the authoritative API references
|
|
203
|
+
|
|
204
|
+
## Anti-patterns
|
|
205
|
+
|
|
206
|
+
- Do not use Kivy `.kv` files or `.kv` naming conventions
|
|
207
|
+
- Do not use Python `@property` for Moho widget state
|
|
208
|
+
- Do not expect `.mh` rules to apply before `run()` is called
|
|
209
|
+
- Do not omit `cookie_secret` on `BootstrapApp`
|
|
210
|
+
- Do not mix tabs and spaces in `.mh` files
|
|
211
|
+
- Do not create deeply nested widget trees entirely in Python when `.mh` rules are the idiomatic approach
|
|
212
|
+
- Do not put `remote` in event names; use semantic names (`on_click`) and `client=True`
|
|
213
|
+
- Do not use `emit_to_client` for in-process communication — use `dispatch`
|
|
214
|
+
- Do not re-register a bubbled parent event as `client=True` unless the browser should invoke that parent name directly
|
|
215
|
+
|
|
216
|
+
## Additional resources
|
|
217
|
+
|
|
218
|
+
- [BREAKING.md](../../../BREAKING.md) — Moho 0.2 event/attribute rename table
|
|
219
|
+
- [.mh language reference](reference.md) — syntax cheat sheet, file touch map, Kivy migration notes
|
|
220
|
+
- `moho/lang/__init__.py` — complete language specification
|
|
221
|
+
- `moho/uix/element.py` — Element model and property/attribute docs
|
|
222
|
+
- `moho/data/bootstrap.mh` — default Bootstrap widget styling rules
|
|
223
|
+
- `moho/data/static/js/moho.js` — client WebSocket protocol
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Moho Framework Reference
|
|
2
|
+
|
|
3
|
+
## `.mh` language syntax
|
|
4
|
+
|
|
5
|
+
### File header
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
#:moho 1.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Directives
|
|
12
|
+
|
|
13
|
+
| Directive | Syntax | Purpose |
|
|
14
|
+
|-----------|--------|---------|
|
|
15
|
+
| Import | `#:import np numpy` | Bind a Python module to an alias |
|
|
16
|
+
| Include | `#:include buttons.mh` | Load another `.mh` file |
|
|
17
|
+
| Set | `#:set myvar 42` | Define a file-level variable |
|
|
18
|
+
|
|
19
|
+
### Constructs
|
|
20
|
+
|
|
21
|
+
**Rule** — applies styling/behavior to all instances of a class (like CSS):
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
<Button>:
|
|
25
|
+
btn_style: "primary"
|
|
26
|
+
icon: "star"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Root widget** — single root element for the file (no angle brackets):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
MainBody:
|
|
33
|
+
HBoxLayout:
|
|
34
|
+
Tab:
|
|
35
|
+
...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Dynamic class** — define a new widget inline without a Python declaration:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
<DangerButton@Button>:
|
|
42
|
+
btn_style: "outline-danger"
|
|
43
|
+
text: "Danger!"
|
|
44
|
+
icon: "ban"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Multiple rules sharing definitions** (comma-separated):
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
<Rule1,Rule2>:
|
|
51
|
+
shared_prop: value
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Property expressions
|
|
55
|
+
|
|
56
|
+
Property values are evaluated as single-line Python expressions:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Button:
|
|
60
|
+
text: 'State is %s' % self.state
|
|
61
|
+
disabled: self.state != 'normal'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Reserved keywords:
|
|
65
|
+
|
|
66
|
+
| Keyword | Scope | Meaning |
|
|
67
|
+
|---------|-------|---------|
|
|
68
|
+
| `self` | Anywhere | Current widget instance |
|
|
69
|
+
| `root` | Rules only | Root widget of the rule |
|
|
70
|
+
| `app` | Anywhere | Running app instance |
|
|
71
|
+
| `args` | `on_<action>` callbacks | Arguments passed to the callback |
|
|
72
|
+
|
|
73
|
+
### IDs
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
<MyWidget>:
|
|
77
|
+
Button:
|
|
78
|
+
id: btn1
|
|
79
|
+
Button:
|
|
80
|
+
text: 'Other state: %s' % btn1.state
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`id` is a weakref, not the widget itself. Access via `widget.ids["btn1"]` or `widget.ids.btn1` in Python.
|
|
84
|
+
|
|
85
|
+
### Event callbacks
|
|
86
|
+
|
|
87
|
+
**Property change** (`on_<propname>`) — multi-line allowed with consistent indentation:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
TextInput:
|
|
91
|
+
on_focus:
|
|
92
|
+
if args[1]: self.insert_text("Focus")
|
|
93
|
+
else: self.insert_text("No focus")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Client events** — browser-originated events such as `on_click` / `on_change`.
|
|
97
|
+
Bind them in Python (`def on_click`) **or** in `.mh`:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Button:
|
|
101
|
+
on_click: root.do_something()
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Local bubbled events** — composites like `Dropdown` expose `on_select` (local),
|
|
105
|
+
not a second client click name on the parent.
|
|
106
|
+
|
|
107
|
+
**Synced attributes** — declare with `sync=True` so server changes push to the DOM.
|
|
108
|
+
|
|
109
|
+
### Class targeting (`cls`)
|
|
110
|
+
|
|
111
|
+
Target specific widget instances by class attribute:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
<Button>:
|
|
115
|
+
cls: my_special_btn
|
|
116
|
+
btn_style: "success"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Indentation rules
|
|
120
|
+
|
|
121
|
+
- Use spaces only; consistent indentation multiples
|
|
122
|
+
- Property values: single line only
|
|
123
|
+
- `on_<prop>` callbacks: multiple single-line statements allowed; no extra indentation levels
|
|
124
|
+
|
|
125
|
+
## Layouts (kivy-style)
|
|
126
|
+
|
|
127
|
+
Moho ships kivy-inspired layout widgets built on CSS flexbox/grid. Children fill
|
|
128
|
+
the available space by default, which fixes alignment and "won't take full
|
|
129
|
+
height" problems.
|
|
130
|
+
|
|
131
|
+
| Widget | Module | Behavior |
|
|
132
|
+
|--------|--------|----------|
|
|
133
|
+
| `BoxLayout` | `moho.uix.bootstrap.boxlayout` | Flexbox row/column; base class |
|
|
134
|
+
| `HBoxLayout` | `moho.uix.bootstrap.boxlayout` | Horizontal row (`orientation="horizontal"`) |
|
|
135
|
+
| `VBoxLayout` | `moho.uix.bootstrap.boxlayout` | Vertical column (`orientation="vertical"`) |
|
|
136
|
+
| `GridLayout` | `moho.uix.bootstrap.gridlayout` | CSS grid with `cols` / `rows` |
|
|
137
|
+
|
|
138
|
+
### Size hints
|
|
139
|
+
|
|
140
|
+
Every element has `size_hint_x` and `size_hint_y` (`NumericProperty`, default
|
|
141
|
+
`1.0`):
|
|
142
|
+
|
|
143
|
+
- On the layout's **main axis**, the hint maps to `flex-grow`, so children share
|
|
144
|
+
the space proportionally (e.g. `size_hint_x: 5` next to `size_hint_x: 2`).
|
|
145
|
+
- A hint of `None` makes the child keep its fixed `width`/`height` (set those via
|
|
146
|
+
CSS or `width`/`height`/`max_height` attributes).
|
|
147
|
+
- On the **cross axis**, a numeric hint stretches the child to fill; `None` keeps
|
|
148
|
+
its intrinsic size.
|
|
149
|
+
|
|
150
|
+
`BoxLayout` automatically sets `min-width:0`/`min-height:0` on children so nested
|
|
151
|
+
scroll areas and canvases shrink/fill instead of overflowing.
|
|
152
|
+
|
|
153
|
+
### BoxLayout properties
|
|
154
|
+
|
|
155
|
+
| Property | Meaning |
|
|
156
|
+
|----------|---------|
|
|
157
|
+
| `orientation` | `"horizontal"` or `"vertical"` |
|
|
158
|
+
| `spacing` | Gap between children (CSS `gap`), e.g. `spacing: 10` |
|
|
159
|
+
| `align_items` | Cross-axis alignment (default `"stretch"`) |
|
|
160
|
+
| `justify_content` | Main-axis distribution |
|
|
161
|
+
|
|
162
|
+
### Example
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
HBoxLayout:
|
|
166
|
+
spacing: 10
|
|
167
|
+
Viewer:
|
|
168
|
+
size_hint_x: 5
|
|
169
|
+
Figure:
|
|
170
|
+
size_hint_x: 5
|
|
171
|
+
Controls:
|
|
172
|
+
size_hint_x: 2
|
|
173
|
+
|
|
174
|
+
GridLayout:
|
|
175
|
+
cols: 3
|
|
176
|
+
rows: 1
|
|
177
|
+
spacing: 10
|
|
178
|
+
Card:
|
|
179
|
+
Card:
|
|
180
|
+
Card:
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The root `Body` is rendered as a full-height flex column, so a top-level layout
|
|
184
|
+
fills the viewport without manual `height: 100%` chains.
|
|
185
|
+
|
|
186
|
+
## File touch map
|
|
187
|
+
|
|
188
|
+
| Task | Files to edit |
|
|
189
|
+
|------|---------------|
|
|
190
|
+
| New Bootstrap widget | `moho/uix/bootstrap/<widget>.py`, register in `moho/uix/bootstrap/app.py`, rules in `moho/data/bootstrap.mh` or app `.mh` |
|
|
191
|
+
| New application | `app.py`, `<name>.mh`, `data/static/`, `data/templates/` |
|
|
192
|
+
| App UI tab/section | App-specific `.mh` file, `#:include` from root `.mh` |
|
|
193
|
+
| Widget styling | `.mh` rules, `StyleAttribute`/`ClassAttribute` on element |
|
|
194
|
+
| Custom HTML rendering | `html_tpl` / `js_tpl` on element class |
|
|
195
|
+
| Client event handling | `on_<event>` in Python and/or `.mh` (`on_click:`) |
|
|
196
|
+
| Push to browser | `emit_to_client(...)` / synced attributes (`sync=True`) |
|
|
197
|
+
| WebSocket protocol | `moho/data/static/js/moho.js` |
|
|
198
|
+
| Default widget styles | `moho/data/bootstrap.mh` |
|
|
199
|
+
| Core app lifecycle | `moho/core/app.py` |
|
|
200
|
+
| Language parser/builder | `moho/lang/builder.py`, `moho/lang/parser.py` |
|
|
201
|
+
|
|
202
|
+
## Kivy to Moho migration
|
|
203
|
+
|
|
204
|
+
| Kivy | Moho |
|
|
205
|
+
|------|------|
|
|
206
|
+
| `.kv` files | `.mh` files |
|
|
207
|
+
| `#:kivy` header | `#:moho 0.1.1` header (or project version) |
|
|
208
|
+
| `App` subclass | `BootstrapApp` / `WebApp` subclass |
|
|
209
|
+
| `build()` returns root widget | `build()` returns `Body` subclass |
|
|
210
|
+
| Desktop OpenGL rendering | Server renders HTML; browser displays via WebSocket sync |
|
|
211
|
+
| `on_touch_down` etc. | `on_click`, `on_change`, `on_mousedown` / `on_mouseup`, etc. |
|
|
212
|
+
| Canvas instructions | `html_tpl` / `js_tpl` templates |
|
|
213
|
+
| `kivy.app.App.get_running_app()` | `app` keyword in `.mh`; running app via WebApp instance |
|
|
214
|
+
| `add_widget` / `remove_widget` / `clear_widgets` | Same names on `Element` |
|
|
215
|
+
| `BoxLayout`, `orientation`, `spacing`, `padding` | Same names; `HBoxLayout`/`VBoxLayout` built on CSS flexbox |
|
|
216
|
+
| `size_hint_x` / `size_hint_y` (0..1+, `None`) | Same semantics, mapped to `flex-grow` / fixed size |
|
|
217
|
+
| `x` / `y` / `pos` / `pos_hint` | Same; FloatLayout maps to CSS absolute positioning |
|
|
218
|
+
| `GridLayout` `cols` / `rows` | Same; rendered with CSS grid (`repeat(n, 1fr)`) |
|
|
219
|
+
| `Label`, `TextInput`, `Slider`, `Switch`, `ToggleButton` | `moho.uix.widgets` façades over Bootstrap controls |
|
|
220
|
+
| `ScrollView` (`scroll_x`/`scroll_y`, `do_scroll_*`) | `moho.uix.widgets` (CSS overflow + DOM sync) |
|
|
221
|
+
| `AnchorLayout`, `StackLayout`, `FloatLayout` | `moho.uix.widgets` (CSS flex / absolute) |
|
|
222
|
+
| `ScreenManager`, `ActionBar`, `Popup`, `Carousel`, `Splitter` | `moho.uix.widgets` |
|
|
223
|
+
| `ActionGroup` / `ActionOverflow` / `ActionSeparator` | `moho.uix.widgets.actionbar` |
|
|
224
|
+
| `TabbedPanel` / `TabbedPanelItem` (`text`, `tab_pos`, `switch_to`) | Façade over Bootstrap tabs |
|
|
225
|
+
| `Video` `position` / `volume` / `duration` | Synced via HTML5 media events |
|
|
226
|
+
| `ValuesSpinner` (not `Factory.Spinner`) | Combobox `<select>` values picker |
|
|
227
|
+
| `Popup.content` | `Popup.content_widget` (HTML `content` is reserved) or `Popup(content=…)` |
|
|
228
|
+
| Scatter / EffectWidget / VKeyboard | Not ported (GPU / multitouch) |
|
|
229
|
+
|
|
230
|
+
Import convenience: `from moho.uix.widgets import Label, ScrollView, ScreenManager, ...`
|
|
231
|
+
|
|
232
|
+
Moho reuses Kivy's event model, properties, and language parser — but the deployment model and file extension differ.
|
|
233
|
+
|
|
234
|
+
> Note: the legacy Bootstrap 12-column `size_hint_xs..xxl` properties and the
|
|
235
|
+
> `Row`/`Col` widgets were removed in favor of the kivy-style model above.
|
|
236
|
+
|
|
237
|
+
## Showcase example structure
|
|
238
|
+
|
|
239
|
+
`examples/showcase/` is the full Moho demo (Kivy-style ActionBar + ScreenManager,
|
|
240
|
+
Bootstrap chrome, Matplotlib/Plotly, SVG, X3D):
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
examples/showcase/
|
|
244
|
+
├── app.py # ShowcaseApp + CustomMplFigure (LivePlot)
|
|
245
|
+
├── showcase.mh # shell chrome
|
|
246
|
+
└── data/screens/*.mh # one demo per screen
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Run: `cd examples/showcase && python app.py`
|
|
250
|
+
|
|
251
|
+
Screens are lazy-loaded with `Builder.load_file`. Plot / Bootstrap feature demos
|
|
252
|
+
(Theme, Components, Navbar, Modal, Sidebar, Toast, Matplotlib, Plotly, LivePlot,
|
|
253
|
+
Cards, SVG, X3D) live alongside the original Kivy-parity widget screens.
|
|
254
|
+
|
|
255
|
+
## Known repo caveats
|
|
256
|
+
|
|
257
|
+
- `starterapp/` templates referenced by `moho/admin.py` are not present in tracked `moho/data/` — scaffolding may be incomplete
|
|
258
|
+
- `w3css` project type in `moho-admin` raises `NotImplementedError`
|
|
259
|
+
- Sphinx API docs (`doc/rst/api/`) are generated at build time by `doc/autobuild.py`, not committed
|
|
260
|
+
- Legacy name "ESCAPE" appears in older docs and Docker image tags (`escapeapp/moho-examples`)
|
|
261
|
+
|
|
262
|
+
## Reporting bugs
|
|
263
|
+
|
|
264
|
+
Per `doc/contribute.rst`:
|
|
265
|
+
|
|
266
|
+
1. Set a clear issue title
|
|
267
|
+
2. Provide exact reproduction steps and error output
|
|
268
|
+
3. Attach failing code if applicable
|
|
269
|
+
|
|
270
|
+
Contact: escape.app.net@gmail.com
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Custom for Visual Studio
|
|
5
|
+
*.cs diff=csharp
|
|
6
|
+
*.sln merge=union
|
|
7
|
+
*.csproj merge=union
|
|
8
|
+
*.vbproj merge=union
|
|
9
|
+
*.fsproj merge=union
|
|
10
|
+
*.dbproj merge=union
|
|
11
|
+
|
|
12
|
+
# Standard to msysgit
|
|
13
|
+
*.doc diff=astextplain
|
|
14
|
+
*.DOC diff=astextplain
|
|
15
|
+
*.docx diff=astextplain
|
|
16
|
+
*.DOCX diff=astextplain
|
|
17
|
+
*.dot diff=astextplain
|
|
18
|
+
*.DOT diff=astextplain
|
|
19
|
+
*.pdf diff=astextplain
|
|
20
|
+
*.PDF diff=astextplain
|
|
21
|
+
*.rtf diff=astextplain
|
|
22
|
+
*.RTF diff=astextplain
|
moho-0.2.5/.gitignore
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
.coverage
|
|
2
|
+
.noseids
|
|
3
|
+
*.so
|
|
4
|
+
*.pyd
|
|
5
|
+
*.pyc
|
|
6
|
+
*.pyo
|
|
7
|
+
*.py#
|
|
8
|
+
*~
|
|
9
|
+
*.swp
|
|
10
|
+
*.DS_Store
|
|
11
|
+
*.kpf
|
|
12
|
+
build/*
|
|
13
|
+
doc/build
|
|
14
|
+
doc/autobuild.py-done*
|
|
15
|
+
doc/sources/api-*.rst
|
|
16
|
+
doc/sources/examples/gen__*.rst
|
|
17
|
+
doc/sources/examples/gallery.rst
|
|
18
|
+
doc/sources/examples/index.rst
|
|
19
|
+
examples/*/bin
|
|
20
|
+
examples/*/.buildozer
|
|
21
|
+
moho/*.c
|
|
22
|
+
moho/*.pyd
|
|
23
|
+
moho/core/text/text_layout.c
|
|
24
|
+
moho/core/text/text_layout.pyd
|
|
25
|
+
moho/core/*.c
|
|
26
|
+
moho/core/*.so
|
|
27
|
+
moho/core/*.pyd
|
|
28
|
+
moho/uix/*.c
|
|
29
|
+
moho/uix/*.pyd
|
|
30
|
+
moho/graphics/*.c
|
|
31
|
+
moho/graphics/*.cpp
|
|
32
|
+
moho/graphics/*.pyd
|
|
33
|
+
moho/graphics/cgl_backend/*.c
|
|
34
|
+
moho/graphics/cgl_backend/*.pyd
|
|
35
|
+
moho/include/config.h
|
|
36
|
+
moho/include/config.pxi
|
|
37
|
+
moho/lib/gstplayer/_gstplayer.c
|
|
38
|
+
moho/core/camera/camera_avfoundation.c
|
|
39
|
+
moho/tests/build
|
|
40
|
+
moho/tests/results
|
|
41
|
+
moho/garden
|
|
42
|
+
.last_known_portable_deps_hash
|
|
43
|
+
deps.zip
|
|
44
|
+
iosbuild
|
|
45
|
+
moho/core/image/osxcoreimage.c
|
|
46
|
+
moho/core/window/sdl.c
|
|
47
|
+
python
|
|
48
|
+
python.exe
|
|
49
|
+
.idea
|
|
50
|
+
dist
|
|
51
|
+
htmlcov
|
|
52
|
+
moho/deps/*
|
|
53
|
+
!moho/deps/__init__.py
|
|
54
|
+
moho.deps*
|
|
55
|
+
moho/version.py
|
|
56
|
+
# Generated by setuptools-scm from git tags (see pyproject.toml).
|
|
57
|
+
moho/_version.py
|
|
58
|
+
|
|
59
|
+
MANIFEST
|
|
60
|
+
|
|
61
|
+
moho/core/image/img_imageio.c
|
|
62
|
+
moho/core/audio/audio_sdl2.c
|
|
63
|
+
moho/core/text/text_sdlttf.c
|
|
64
|
+
moho/core/window/window_x11.c
|
|
65
|
+
moho/lib/vidcore_lite/bcm.c
|
|
66
|
+
moho/lib/vidcore_lite/bcm.h
|
|
67
|
+
moho/lib/vidcore_lite/egl.c
|
|
68
|
+
moho/core/image/_img_sdl2.c
|
|
69
|
+
moho/core/text/_text_sdl2.c
|
|
70
|
+
moho/core/window/_window_sdl2.c
|
|
71
|
+
|
|
72
|
+
# PyDev
|
|
73
|
+
.project
|
|
74
|
+
.pydevproject
|
|
75
|
+
.settings/
|
|
76
|
+
|
|
77
|
+
# Virtualenv
|
|
78
|
+
env2
|
|
79
|
+
env3
|
|
80
|
+
.venv
|
|
81
|
+
|
|
82
|
+
# Emacs
|
|
83
|
+
.projectile
|
|
84
|
+
|
|
85
|
+
moho/setupconfig.py
|
|
86
|
+
|
|
87
|
+
moho/core/clipboard/_clipboard_sdl2.c
|
|
88
|
+
/Moho.egg-info
|
|
89
|
+
|
|
90
|
+
.cursor
|
|
91
|
+
.python-cache
|
|
92
|
+
.venv-pyodide-build
|
|
93
|
+
.venv-wasm-package
|
|
94
|
+
public/*
|
|
95
|
+
|
|
96
|
+
# Local-only internet showcase pool deploy kit (not tracked).
|
|
97
|
+
docker/showcase-pool/
|