* Dynamic dispatch async commands
* format
* Preserve `'static`
* Use a inner function instead
* Only do it for dev for now
* Add change file
* Tag respond_async_serialized_dyn with debug
* fix(core): capability filtering crashing allowed command generation
tauri-plugin and tauri build scripts cannot have access to the capabilities file (generated by tauri-build) and can only infer capabilities from the config path
* cleanup
* unused import
* followup
* fix reassign
* mut
* Update crates/tauri-utils/src/acl/build.rs
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* refactor: put dynamic acl to a feature
* Add change file
* Tweak remove_unused_commands's docs
* License header
* Document the feature
* Merge remote-tracking branch 'upstream/dev' into dynamic-acl-feature
* Use a inner non generic fn for add_capability
* Clippy and macro stability notice
* Merge remote-tracking branch 'upstream/dev' into dynamic-acl-feature
* Format
* 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
* Update docs for WebviewWindowBuilder::from_config
The documentation for `WebviewWindowBuilder::from_config` mentions changing the label of the new `WebviewWindowBuilder`, which is not possible.
Instead, the label must be changed in the `WindowConfig` that is passed into `WebviewWindowBuilder::from_config`.
This change fixes that description and adds an example code snippet for this use-case.
* Add reference to function arguments so the type is correctly inferred
* Remove unnecesary reference
* fix tests
* fix doctest
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix path joining behavior where path.join('', 'a') incorrectly returns "/a" instead of "a" (#13313)
* Clean up
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
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).
* 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