* Set `wasClean: true` on the `CloseEvent` emitted by `WebSocket.close`
* add changeset
* Apply formatter
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Update js/audio/static/AudioPlayer.svelte to use ../shared/Audio.svelte instead of the native `<audio>` for Wasm support
* add changeset
* Update markup and stying
* Apply formatter
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Update WorkerProxy to emit a unified `error` event for any type error and a `run-start` event when `run_file` or `run_code` is called, and update Index.svelte to handle these events
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Lite: Explicitly install a specific version of `anyio` to avoid version conflicts
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Use a special fake hostname for the API access when the page is opened via the `file:` protocol
* Move js/app/src/lite/url.ts -> js/wasm/svelte/host.ts
* Add a comment
* Move js/wasm/svelte/host.ts -> js/wasm/network/host.ts
* add changeset
* Add a comment
* add changeset
* Update js/wasm/package.json adding a ESM subpath
* Fix `is_self_host()`
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Create a custom element `<gradio-app`> for Gradio-lite
* Parse `<gradio-app`> attributes to configure the top level component
* Move custom-element code to lite/custom-element module
* add changeset
* Apply formatter
* Rename the custom element `<gradio-app>` to `<gradio-lite>`
* Fix the .gradio-lite to be minimum
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Make the HTTP requests for the Wasm worker wait for the initial `run_code()` or `run_file()` to finish
* add changeset
* Support top-level await with `run_file()`
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Create a Wasm-compatible <Image> component in @gradio/lite and use it in @gradio/image/example/Image.svelte
* add changeset
* Fix Image styling
* Move js/wasm/svelte/Image.svelte -> js/image/static/Image.svelte
* Shorten CSS class name
* Create Wasm-compatible video components
* add changeset
* Move the Wasm-compatible `Image` from `static` to `shared`
* Create Wasm-compatible audio components
* Fix `resolve_wasm_src()` to return the passed `src` as-is when the URL is not HTTP or refering to remote
* add changeset
* Fix `resolve_wasm_src()`
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Fix is_self_host() to detect `127.0.0.1` as localhost as well
* add changeset
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* refactor: change to label tag where label property is accepted by component
BlockLabel is being used as the main component for labels and should address the issue reported in Chat and File component
closes issue 5454
* add changeset
* fix: A form label must be associated with a control.
* Update js/atoms/src/BlockLabel.svelte
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
* add changeset
* add changeset
* fix: refactor use label tag instead of div tag
Change CSS styles from div to label selector in BlockLabel
* fix: A form label must be associated with a control
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
* Convert an error object caught in the worker to be cloneable so it can be delegated to the main thread properly
* add changeset
* Add a comment
* Fix the error serialization for the inter-thread messaging
* Fix reply error message
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
* Create a Wasm-emulated WebSocket connection and fix @gradio/client to inject it
* Explicitly set the default response class for the Wasm mode
* add changeset
* Fix is_self_origin() to compare only hosts and rename it to is_self_host()
* Fix Blocks.close() to cancel async tasks in the case of Wasm and call it from wasm_utils.register_app() to dispose an old app instance
* Update comment
* Hold the asyncio.Task objects and cancel them at `Blocks.close()`
* Add try-except to handle the case where `events` is not set to `queue.active_jobs` when `queue.process_events` is called
* Format queueing.py
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>