* fix pydom example
* fix the pydom test example to use a python syntax that works with MicroPython by replacing datetime
* add note about capturing errors importing when
* patch event_handler to handle compat with micropython
* turn pyweb into a package and remove hack to make pydom a sort of module with an ugly hack
* add pydom example using micropython
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix select element test
* change pydom test page to let pytest tests load it properly
* add missing folders to test dev server so it can run examples in the manual tests folder
* add pydom tests to the test suite as integration tests
* lint
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* improve fixes in event_handling
* change when decorator to actually dynamically fail in micropython and support handlers with or without arguments
* simplify when decorator code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add type declaration back for the MP use case
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed code to access pydom get index as I can't think of any proper use case
* remove old commented hack to replace pydom module with class
* fix examples title
* precommit checks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add media module
* add Device class to media
* add camera test example
* add snap, download and other convenience methods
* load devices automagically
* add draw method to canvas
* add docstring for download
* add docstrings to draw method
* add docstrings to snap
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* load devices as soon as the page loads
* solve conflict
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove display calls listing devices in camera example
* fix typos and other small errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix typo in docstring
* fix error message typo
* replace setAttribute on JS properties with accessors
* remove debug statement
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add docstrings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add docstrings to camera example
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add correct copyright and attribution to main license file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix#1899 - Expose pyscript.js_modules as module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix#1899 - Make import as smooth as in polyscript
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* PyTerminal - expose the reference through the element
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix make fmt changing Python files
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add tests for select options
* add classes to support select and options management
* fix add methond and implement clear on options
* fix optionsproxy.add
* fix select.add method
* add test adding a second option to select
* add tests around adding options in multiple flavors
* add test to add an option by passing the option it wants to be added before
* complete test around adding options
* add select to add test on remove
* add tests and support for selected item
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
* Fix broken links, and put community information at the top of our README.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This MR shows errors and exit in these conditions:
* multiple `<py-config>` or `<mpy-config>` found on the page
* both `<py-config>` and `<script type="py" config="file.toml">` found on main
* different `<script type="py" config="a.toml">` and `<script type="py" config="b.toml">` configs found on main
* added a *py-editor* plugin based on *codemirror*
* use a `<script type="py-editor">` wrapper to bootstrap code
* tested that all is good via smoke-test in test/py-editor.html
* Patch js.document out of the box
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Expose js_modules via pyscript module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Improve the readme in two ways:
- remove the mention to <py-repl>, and shows a quick summary of the various ways of running Python code
- add a link to the google calendar which contains the community calls
* add tests to verify if we show an error banner when users load from latest
* add deprecation manager to take care of showing a notification in case script src is being loaded from latest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* make sure deprecation warning also register onWorker
* restore tests for banner in worker
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add a wait selector when testing banner since worker seems to take too long to render in CI
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix test_deprecate_loading_scripts_from_latest: I think that the
previous failure was because we actually TRIED to execute the js from
latest/core.js and it conflicted with our local copy.
But to trigger the warning is enough to have a script pointing to
pyscript.net/latest, there is no need to execute it: modify it with
type="ignore-me" and an URL which doesn't exist.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Antonio Cuni <anto.cuni@gmail.com>
* bye bye when
* fix create to drop parent and actually pass the other arguments through
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update types
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Re-add CHANGELOG.md from the tip of "classic" into root of the repository. Tidy
the formatting in CHANGELOG.md. Update the PR template to reflect the new
location of the CHANGELOG.md.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace with specific version.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>