Commit Graph

152 Commits

Author SHA1 Message Date
renovate[bot]
e15f665efc chore(deps): update dependency rollup to v4.40.2 (#13381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 20:12:53 +08:00
Lucas Fernandes Nogueira
b985eaf0a2 fix(core): immediately unregister event listener on unlisten call (#13306)
* 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
2025-05-05 10:46:05 -03:00
geeseofbeverlyroad
4f75bf5bdb docs: Added more detailed comments to menu popup method and DPI-related classes (#13368)
* Detailed function description for popup()

* Expanded DPI class descriptions

* fmt

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-05-05 09:25:30 -03:00
Tony
b5c549d189 refactor: rework transformCallback (#13325)
* refactor: rework `transformCallback`

* Migrate listen and unlisten js

* handlerId -> listener.handlerId

* Update docs

* `transformCallback` change file

* typo
2025-05-05 09:15:38 -03:00
Tony
db03f00693 refactor: use WindowConfig for create_webview (#13322)
* refactor: use WindowConfig for `create_webview`

* Pass in label inside options

* Fix compile
2025-05-01 09:43:25 -03:00
Tony
aa8661acfd chore(deps): bump js dependencies (#13355) 2025-05-01 11:29:35 +02:00
Kingsword
197da6fe78 docs(window): monitorFromPoint example error (#13340) 2025-04-30 03:24:32 +03:00
renovate[bot]
527bf0031e chore(deps): update dependency rollup to v4.40.1 (#13328)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 15:03:27 +08:00
Kingsword
50ebddaa2d feat: expose the setAutoResize API for webviews in @tauri-apps/api (#13318) (#13319) 2025-04-27 10:27:23 +08:00
situ2001
00dfc32a2d docs(webview): corrected examples to ensure webview is created after window initialization (#13279)
* fix: typo

* docs(webview): corrected examples to ensure webview is created after window initialization
2025-04-23 04:56:52 +02:00
Amr Bashir
267368fd4f feat: add workarea getter for monitor (#13276) 2025-04-23 03:29:03 +02:00
situ2001
4e00b27913 docs: update example for in webview ts api (#13272) 2025-04-21 18:15:14 +02: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
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
Lucas Fernandes Nogueira
89c6e436ea chore(api): add typescript dependency (#13220)
I noticed `pnpm ts:check` isn't working on my end, currently only works if the typescript package is globally installed
2025-04-12 22:04:40 -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
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
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
renovate[bot]
628f4a97e4 chore(deps): update dependency rollup to v4.40.0 (#13214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-12 18:16:09 +08: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
renovate[bot]
47df696dfb chore(deps): update dependency eslint-config-prettier to v10.1.2 (#13192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 15:03:40 +02:00
renovate[bot]
e4982dff73 chore(deps): update dependency rollup to v4.39.0 (#13125)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 17:17:43 +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
renovate[bot]
22c7a877e3 chore(deps): update dependency rollup to v4.38.0 (#13094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-29 17:32:15 +08:00
阿豪
dd13728334 enhance(api): add generic parameter to emit and emitTo functions (#13066)
closes #13059
2025-03-25 05:34:20 +02:00
renovate[bot]
f235ec0113 chore(deps): update dependency rollup to v4.37.0 (#13062)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 21:14:02 +08:00
Lőrik Levente
dea8bbf6cd docs: Improve BaseDirectory documentation (#13043)
* add notes

* Add links

* fix fmt
2025-03-21 13:57:34 +02:00
github-actions[bot]
be3a79c864 apply version updates (#12856)
Co-authored-by: lucasfernog <20051258+lucasfernog@users.noreply.github.com>
2025-03-20 15:34:59 -03:00
renovate[bot]
4a01299e31 chore(deps): update dependency rollup to v4.36.0 (#13010)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 19:36:29 +08:00
Levi Zim
f981a5ee8b feat: basic support for linux riscv64 (#12602) 2025-03-16 16:33:17 -03:00
Fabian-Lars
0d1446857c fix: Don't minify api dist files (#12989) 2025-03-16 07:11:42 -03:00
Fabian-Lars
2fa33d5c44 chore: Fix example readme instructions. Add pnpm build:debug. (#12983)
* chore: Fix example readme instructions. Add `pnpm build:debug`.

* keep terser on bundle.global.js build to avoid file modifications

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-03-15 12:51:40 -03:00
Simon Laux
d8059bad3c add AppHandle.fetch_data_store_identifiers and AppHandle.remove_data_store (#12900)
* 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>
2025-03-13 18:17:22 -03:00
Simon Laux
be2e6b85fe add Window.is_always_on_top() and WebviewWindow.is_always_on_top() (#12944)
* add `Window.is_always_on_top()` and `WebviewWindow.is_always_on_top()`

* add api

* fmt

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-03-13 18:02:01 -03:00
tk
3a74dc8f34 fix(api): webview.close wrong command error (#12935) 2025-03-10 06:48:02 +02:00
renovate[bot]
eea12c196e chore(deps): update dependency rollup to v4.35.0 (#12932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-09 10:12:56 +08:00
renovate[bot]
4ce5c74ab4 chore(deps): update dependency eslint-config-prettier to v10.1.1 (#12916)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-09 10:12:08 +08:00
Niladri Adhikary
060de5bbdd feat(api): implement getIdentifier() to access tauri.conf.json identifier (#12837)
* feat(api): implement getIdentifier() to access tauri.conf.json identifier

* updated

* chore(api): update change file and rebuild bundle

* Update to @since 2.4.0

* added tag

* Update .changes/get-identifier.md

Co-authored-by: Fabian-Lars <github@fabianlars.de>

---------

Co-authored-by: Fabian-Lars <github@fabianlars.de>
2025-03-02 15:12:33 -03:00
Simon Laux
20c1906912 feat: add WebviewBuilder.disable_javascript and WebviewWindowBuilder.disable_javascript (#12821)
* 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>
2025-03-02 14:54:34 -03:00
renovate[bot]
3fb8d7ca6b chore(deps): update dependency rollup to v4.34.9 (#12862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-01 11:16:25 +01:00
github-actions[bot]
cab7f76d01 apply version updates (#12826)
Co-authored-by: amrbashir <48618675+amrbashir@users.noreply.github.com>
2025-02-28 14:14:08 +01:00
Tony
887db0813f chore(deps): update js dependencies (#12832)
* chore(deps): update js dependencies

* Update lock
2025-02-27 17:15:32 +08:00
renovate[bot]
9332132239 chore(deps): update dependency eslint-config-prettier to v10.0.2 (#12822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 20:46:52 +01:00
github-actions[bot]
7d618f12d8 apply version updates (#12518)
Co-authored-by: amrbashir <48618675+amrbashir@users.noreply.github.com>
2025-02-26 12:45:31 -03:00
Kotkoroid
ddc469367a style: fix Vite and React branding (#12768) 2025-02-22 11:30:31 +01:00
renovate[bot]
d9a07e66af chore(deps): update dependency globals to v16 (#12750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 15:26:14 +01:00
renovate[bot]
4633705da7 chore(deps): update dependency rollup to v4.34.8 (#12727)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 20:12:00 +08:00
Tony
3f680588cd chore: update prettier to 3.5.1 and enable experimentalOperatorPosition (#12715) 2025-02-16 20:34:19 +08:00