* feat(mock): add mock for listen and emit
* feat(mock): add mock for listen and emit
* feat(mock): add mock for listen and emit
* Add change file
* correctly clear unregisterListener
* format with prettier
* build project
* opt-in to mocking events
* Use a minor bump
* patch binary with bundle type info
* only patch if the updater is included
* fix linux warnings
* patch binary when updaer is configured
* patch binary with bundle type info
only patch if the updater is included
fix linux warnings
patch binary when updaer is configured
* fix formatting
* fix license header
* fix taplo error
* move __TAURI_BUNDLE_TYPE to utils
* export get_current_bundle_type
* macos fix
* cleanup, add api
* update change file
* fix windows
* fmt, fix rust version support
* fix macos
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* 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>