Commit Graph

423 Commits

Author SHA1 Message Date
Lucas Fernandes Nogueira 568efb4568
fix: follow-up fix for monitor work area on macOS (#13310)
follow-up for #13309
2025-04-26 15:03:35 -03:00
Lucas Fernandes Nogueira 6ce10ab773
fix: monitor work_area on macOS (#13309)
macOS uses a different coordinate system for visibleFrame, so to get accurate values we should only get the diff between frame() and visibleFrame() and apply that to the standard monitor position returned by CGDisplayBounds. Size isn't impacted by this, and properly returns the value (accounting for dock position).
2025-04-25 20:08:46 -03:00
Lucas Fernandes Nogueira 039f44b7b1
fix(core): fix TrayIcon.getById returning new resource IDs (#13307)
* fix(core): fix TrayIcon.getById returning new resource IDs

this prevents the close() from working properly if you somehow lose the new() resource ID (for instance when the app reloads) and need to pick it up again and close it.

* cleanup on close
2025-04-25 15:30:53 -03:00
situ2001 76cbeef208
fix: add proxy URL support to Webview at Rust-side. (#13278)
* fix: add proxy URL support to Webview

* chore: add .changes file

* Change file
2025-04-23 09:38:43 +08:00
Amr Bashir 267368fd4f
feat: add workarea getter for monitor (#13276) 2025-04-23 03:29:03 +02:00
github-actions[bot] 766bccc341
apply version updates (#13243)
Co-authored-by: amrbashir <48618675+amrbashir@users.noreply.github.com>
2025-04-21 05:54:30 +02:00
Amr Bashir 31becbd1d1
enhance(core): respect `data-tauri-drag-region="false"` (#13269) 2025-04-21 05:03:54 +02:00
Tony da2a6ae5e3
fix(core): raw channel message type regression (#13268)
* Fix raw channel message type regression

* Re-word change file

* Rename formated_bytes to bytes_as_json_array
2025-04-21 10:26:00 +08:00
renovate[bot] 87fdc3b9cd
chore(deps): update rust crate jsonschema to 0.30 (#13249)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:37:48 +08:00
renovate[bot] 30e76c7d3a
chore(deps): update rust crate brotli to v8 (#13264)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:23:13 +08:00
Tony 85b1912529
Make tauri-runtime-wry optional with features (#13241) 2025-04-16 14:50:11 +08:00
github-actions[bot] 977c4b496c
apply version updates (#13123)
Co-authored-by: lucasfernog <20051258+lucasfernog@users.noreply.github.com>
2025-04-15 14:42:44 -03:00
Lucas Fernandes Nogueira 9356fa15d8
feat(core): include type name in state panic message (#13239)
* feat(core): include type name in state panic message

* tweak message
2025-04-15 14:15:45 -03:00
Kingsword 2dccfab532
fix: fileAssociations missing LSHandlerRank on macOS (#13159) (#13236) 2025-04-15 13:45:46 -03:00
Lucas Nogueira 5d3687e8c3
chore(tauri-driver): update README 2025-04-15 13:44:07 -03:00
Lucas Fernandes Nogueira 0cf2d9933f
fix(tauri-driver): append .exe ext on app path on Windows, closes #11317 (#13238) 2025-04-15 13:43:19 -03:00
Tony 1734273bbe
fix: using center and overflow together crashes (#13235) 2025-04-15 16:59:01 +08:00
Tony 690146e311
fix(macros): invoke handler stack overflow (#13217)
* Fix invoke handler stack overflow

* Format and inline iife in release build

* Add change file

* The comment should be one level up
2025-04-14 18:52:23 -03:00
Tony f888502fd2
fix(core): use `Headers` in `sendIpcMessage` (#13227)
* 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>
2025-04-14 17:58:20 -03:00
Mateusz Kurowski 577c7ffc45
fix(webdriver): windows: make native webdriver close with parent process (fix #8610) (#10108)
* fix(webdriver): windows: make native webdriver close with parent process

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-14 17:57:44 -03:00
Lucas Fernandes Nogueira 82406c61e0
feat(cli): improve iOS simulator usage and check SDK installation (#13231)
applies https://github.com/tauri-apps/cargo-mobile2/pull/453
2025-04-14 14:57:13 -03:00
Lucas Fernandes Nogueira 07953fb9c3
fix(tauri-runtime-wry): send focused events on multiwebview for Windows (#13222)
* fix(tauri-runtime-wry): send focused events on multiwebview for Windows

closes #9755

follow-up for #12014

* fix mobile build
2025-04-14 14:56:57 -03:00
thewh1teagle 8d994f60fe
fix(bundler): sign DLLs (#11676)
* fix: sign nsis plugin DLLs

* also sign DLLs on unix

* fix build

* create copy of nsis dir

* always make a copy of nsis (so linux works, permission error otherwise)

* fix windows build

* fix

* to_path_buf

* also create wix copy

* remove unused toolset change

* fix unused var

* fmt

* fix wix build

* fix build

* fix plugin copy

* fix conflict

* fix file download

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-13 18:46:14 -03:00
sftse 8a1d490820
Clippy (#12485)
* fix: remove unused clones, discovered with clippy nursery lint clippy::redundant_clone

* fix: clippy

* fix: remove no longer used clippy allow directives

* more lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-13 08:21:34 -03:00
Neriya Cohen b0babb6df1
Add Hebrew translation to NSIS languages (#12938)
* Create Hebrew.nsh

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-12 22:04:30 -03:00
Typed SIGTERM b8f86669ab
fix: make `isTauri` runtime-unrelated (#13145)
* Update core.ts

* Update core.ts

* Update core.ts

* lint

* build

* fix lint, add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-12 21:30:03 -03:00
Lucas Fernandes Nogueira ea36294cbc
feat(core): allow changing or disabling the input accessory view on iOS (#13208)
* feat(core): allow changing or disabling the input accessory view on iOS

needs https://github.com/tauri-apps/wry/pull/1544

* remove unused code

* fix imports

* lint

* fix features

* wry 0.51.2
2025-04-12 21:10:07 -03:00
Tony 0d39ff6b09
fix(core): missing `core:` in referenced commands (#13150) 2025-04-12 21:03:19 -03:00
Tony ad3fd3890f
feat(cli): try detect package manager from env (#13152)
* fix(cli): try detect package manager from env

* Typo
2025-04-12 21:01:06 -03:00
Lucas Fernandes Nogueira 3752fed282
feat(cli): enhance iOS bundle version formatting (#13218)
* feat(cli): enhance iOS bundle version formatting

follow-up for #13030 and https://github.com/tauri-apps/cargo-mobile2/pull/450

the bundle version validation has been updated, now it can actually handle one or two integers (e.g. `100` or `10.7`) instead of just full triple semver strings (e.g. `10.7.1`).

* lint
2025-04-12 20:51:56 -03:00
Tony b072e2b296
feat(core): add an option for preventing window overflow (#9687)
* 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>
2025-04-12 13:56:43 -03:00
Lucas Fernandes Nogueira 0802529031
fix(cli): iOS dev broken on Xcode 16.3, closes #13128 (#13210)
* fix(cli): iOS dev broken on Xcode 16.3, closes #13128

Looks like we cannot use the arm64-sim custom architecture on Xcode 16.3, as it incorrectly appends the -sim suffix on some clang build scripts which ends up with an invalid target triple.

Currently we do not have automation to update Xcode/Android projects, so a manual intervention is required by our users, either recreating the project or modifying it manually (the arm64-sim arch must be removed and all its references).

ref https://github.com/tauri-apps/cargo-mobile2/pull/445

* fix dev on macOS with intel chip
2025-04-12 12:50:06 -03:00
Tony 66e6325f43
fix: channel callback never cleaned up from `window` (#13136)
* 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>
2025-04-12 10:31:25 -03:00
Matthew Richardson 0aa48fb9e4
feat: Support custom CFBundleVersion for iOS and macOS (#13030)
* feat: Add bundleVersion for iOS and macOS

* feat: Use bundleVersion for CFBundleVersion

* feat: Synchronize bundleVersion with Info.plist

* cleanup

* fix bundle version, enhance prerelease/buildnumber support and checks

* fix change file

* tauri-bundler to change file

* expand doc

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-12 09:28:48 -03:00
Tony fca5154e7a
chore(core)!: remove re-exported WebviewAttributes (#13130) 2025-04-11 20:34:15 -03:00
Tony fbd57a1afd
feat(core): make `invoke_system` take `AsRef<str>` (#13175)
* feat(core): make `invoke_system` take `AsRef<str>`

* Use minor bump
2025-04-11 20:30:05 -03:00
The1111mp dd4f13ce4b
feat: add `set_dock_visibility` method (#13185)
* feat: add `set_dock_visibility` method

Signed-off-by: The1111mp <The1111mp@outlook.com>

* add api

* retain focus

* fmt

* make SetDockVisibility message conditional (macos only)

* lint

---------

Signed-off-by: The1111mp <The1111mp@outlook.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-11 15:13:07 -03:00
Simon Laux c1cd0a2ddb
feat: macOS/iOS: add option to disable or enable link previews when building a webview (#13090)
* 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>
2025-04-11 09:00:34 -03:00
Tony 9ea76503dc
fix(nsis): can't include resources with `$` (#13186) 2025-04-09 20:03:35 +08:00
Lucas Fernandes Nogueira bb5faa21f4
chore: update tao, wry, windows, webview2-com (#13163)
* chore: update tao, wry, windows, webview2-com

* update docs

* Use `impl Into<String>`

* More docs

---------

Co-authored-by: Tony <legendmastertony@gmail.com>
2025-04-09 08:15:31 -03:00
Tony ebd3dcb92f
enhance(core): change eval to take `Into<String>` (#13135) 2025-04-04 10:06:22 +02:00
Tony 80dccb6a2e
chore: fix a few internal docs and apply clippy suggestions (#13131)
* chore: fix a few internal docs

* Remove label clone

* Unused allow lint

* No way clippy just updated

* `cargo clippy --fix -- -W clippy::redundant_clone`

* format
2025-04-03 17:57:36 +02:00
WofWca cf0b3588a3
docs: add `SafePathBuf` examples (#13122) 2025-04-02 14:02:48 -03:00
Tony b8c0d7e402
fix: `run_return` not responding to `restart` (#13040)
* fix: `run_return` not responding to `restart`

* Document run_return will handle restart requests

* Add change file
2025-04-02 09:54:38 -03:00
Simon Laux 8cf662e34b
feat: expose api to run initialization scripts on all frames. (#13076)
* api!: expose api to run initialisation scripts on all frames.

* remove breaking change, add new api instead.

* Update .changes/init-script-on-all-frames.md

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* use struct `InitializationScript` instead of tuple

* Update crates/tauri-runtime/src/webview.rs

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* Apply suggestions from code review

* Update crates/tauri/src/webview/webview_window.rs

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
2025-04-02 08:41:34 +08:00
github-actions[bot] b154826881
apply version updates (#13060)
Co-authored-by: lucasfernog <20051258+lucasfernog@users.noreply.github.com>
2025-04-01 13:52:38 -03:00
Tony aa6b4d4edf
fix(cli): preserve null when merging patches (#13120)
* fix(cli): preserve null when merging patches

* add test

* remove commented out code

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-01 13:09:50 -03:00
Tony 794af778e4
fix(cli): merge config based on the first one (#13117)
* fix(cli): merge config based on the first one

* Add change file
2025-04-01 17:18:13 +08:00
Tony 4ae14bf2f2
fix: suppress deprecated warning in tray icon codegen (#13093) 2025-03-31 09:54:07 +08:00
Pietagorh f805061d11
feat(cli): allow for toml and json5 files in --config arg (#13079) 2025-03-30 18:11:47 +02:00