* fix(core): immediately unregister event listener on unlisten call
the unlisten function is currently async, but marked as `() => void` in the TypeScript definition. To avoid a breaking change, we're going to immediately unregister the listener function so it's not called.
this fixes a race condition where after calling unlisten() you would still receive events if you do not `await` it and there's a new event triggering while the unlisten command is running
* cleanup
* fix build
* fix ci
* Use `Headers` in `sendIpcMessage`
* Add change file
* Change files
* Don't use optional chaining
Seems like we have changed it in #9530 deliberately,
so preserving it in this change
* do not let the tauri headers to be overwritten
Co-authored-by: Sean Wang <126865849+WSH032@users.noreply.github.com>
* use HeadersInit on the type definition
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Sean Wang <126865849+WSH032@users.noreply.github.com>
* Add an option for preventing window overflow
* Fix shadow counted as part of the width
* Enable prevent overflow by default
* Fix crashing when margin is bigger than screen
* Config file support
* Add to ts type
* Add mac implementation
* Should be let some
* Apply suggestions from code review
Co-authored-by: Jason Tsai <jason@pews.dev>
* checked_sub -> saturating_sub
* Revert license header
* Migrate windows 0.58
* Generate schema
* Fix merge conflict
* Try casting to objc2_app_kit::NSScreen
* Add NSScreen feature
* Use cast instead of as
* fmt
* Deref first
* Wrong unsafe block
* Add change file
* Add serde alias
* More docs
* Disable prevent_overflow by default
since we can't make breaking changes anymore right now
* Remove unused default impl
* Missing pub
* Fix mock_runtime on ios
* Match PreventOverflowMargin's description
* Typo
* Apply suggestions from code review
* Move get_work_area_size to seperate files
* Unused imports
* Add prevent_overflow to WebviewWindowBuilder
* Fix mac compile
* MonitorExt is only for desktop
* Rename to work_area
* Use workarea for linux
* Missing `()`
* Convert size
* Import MonitorExt
* as u32
* Re-build API js
* Fix wrong docs for work_area
* Remove linux platform specific note
* Remove left over linux platform specific note
* Use work area API for center as well
* Fix mobile
* Clean up
* small cleanup
* fix codegen
* update docs
* fix generated
---------
Co-authored-by: Jason Tsai <jason@pews.dev>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* Fix channel cb never cleaned up from `window`
* Should be `_{id}`
* Still need to manually impl clone
* Regenerate bundle.global.js
* Remove current_index from ChannelInner
* Move phantom to `Channel`
* `Channel` not `Self`
* Clean up
* Clean up
* Fix missing end quote
* Add change file
* Rename id to index to match js side
* Improve channel speed on small data
* do the same perf check for IPC responses and raw bytes
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* macOS/iOS: add option to disable or enable link previews when building a webview (the webkit api has it enabled by default)
- `WebViewBuilderExtDarwin.allow_link_preview(allow_link_preview: bool)`
- `WebViewBuilder.allow_link_preview(allow_link_preview: bool)`
- `WebviewWindowBuilder.allow_link_preview(allow_link_preview: bool)`
* also call on iOS
* add api
* fix tests
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* add `AppHandle::fetch_all_data_store_identifiers` and `AppHandle::remove_data_store`
* make it run on main thread, so you can call the function from any thread and it works.
* changes file
* update signature, move functions to RuntimeHandle
* add api
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat: add `WebviewBuilder.disable_javascript` and `WebviewWindowBuilder.disable_javascript`
* wry 0.50.3
* add missing config options and API types
* add change file for api
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>