Commit Graph

549 Commits

Author SHA1 Message Date
Amr Bashir
acdd76833d
feat(api/tray): add TrayIcon.getById/removeById (#9155)
* feat(api/tray): add `TrayIcon.getById/removeById`

closes #9135

* generate

* add permissions

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-03-12 13:07:51 -03:00
github-actions[bot]
d349558abb
Apply Version Updates From Current Changes (#9149)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-03-11 15:14:25 -03:00
Lucas Fernandes Nogueira
db0a24a973
refactor(core): use the image crate (#9132) 2024-03-11 11:46:34 -03:00
Dimitris Apostolou
26f0f71a40
chore: fix various typos (#9131) 2024-03-11 16:25:20 +02:00
renovate[bot]
5deb1202f6
chore(deps) Update dependency rollup to v4.12.1 (dev) (#9101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07 19:34:29 -03:00
Lucas Fernandes Nogueira
ed48e2b3c7
feat(core): expose the image module (#9122)
* feat(core): expose the image module

* code review

* fix import

* fix

* fix codegen

* jsimage owned

* fmt

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-03-07 19:23:21 -03:00
github-actions[bot]
e7f245e81e
Apply Version Updates From Current Changes (#9035)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-03-06 19:00:57 -03:00
Lucas Fernandes Nogueira
e62ca4ee95
feat(ipc): preserve channel message order (#9070) 2024-03-04 17:03:24 -03:00
renovate[bot]
1b18b7006f
chore(deps) Update Tauri API Definitions (dev) (#8225)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-03 10:30:35 -03:00
Amr Bashir
77b9a508a4
feat(api): add Image class (#9042)
* feat(api): add `Image` class

* clippy

* license headers

* small cleanup

* fixes

* code review

* readd from_png_bytes and from_ico_bytes

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-03-03 04:31:08 +02:00
Amr Bashir
4b75834a41
chore: update license headers 2024 (#9043) 2024-03-01 08:29:01 -03:00
Amr Bashir
d1e77acd8d
refactor!(core): remove Icon enum and add Image type (#9011)
* refactor!(core): remove `Icon` enum and add `Image` type

* clippy

* revert api example config change

* Update image.rs

* fix build

* clippy

* change files

* add back removed methods as setter functions

* simplify error message

* Update .changes/runtime-icon-lifetime.md

* Update .changes/ico-featrue-flags.md

* Update core/tauri/src/image.rs

* update api lockfile

* update api ref

* lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-02-29 09:05:11 -03:00
i-c-b
9cc014f2df
fix(docs): fix API webview/window class doc example (#8971)
* fix class doc example

* fix class doc example
2024-02-24 22:36:45 +02:00
github-actions[bot]
0606ab326b
Apply Version Updates From Current Changes (#8938)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-02-22 18:50:24 -03:00
Lucas Fernandes Nogueira
fdcaf935fa
feat(webview): add reparent API (#8939)
* feat(webview): add reparent API

* fix build

* fix import

* remove cfg

* fix windows

* clone

* clone value

* ()
2024-02-22 08:52:27 -03:00
github-actions[bot]
af646520cf
Apply Version Updates From Current Changes (#8918)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-02-21 12:00:32 -03:00
Lucas Fernandes Nogueira
361ec37fd4
chore(deps): update to tao 0.26 (#8932)
* chore(deps): update to tao 0.26

* fallback to crate name

* move struct to runtime

* tests
2024-02-21 11:25:42 -03:00
github-actions[bot]
18ff84fc81
Apply Version Updates From Current Changes (#8775)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-02-19 15:49:28 -03:00
Lucas Nogueira
c426c0dca2
merge from 1.x 2024-02-19 08:03:05 -03:00
Marc Espin
dbd525ca64
docs: Update doc comment from normalize function in path plugin to match definition (#8886)
The doc comment from the normalize function in the path plugin was not matching the actual definition.

Rust definition: 0cb0a15ce2/core/tauri/src/path/plugin.rs (L18)

Typescript definition: 0cb0a15ce2/tooling/api/src/path.ts (L589)
2024-02-18 15:12:46 -03:00
Amr Bashir
16e550ec15
refactor(core): add webview events (#8844)
* refactor(core): add webview events

* license header

* clippy

* fix doctests

* more doctests

* fix JS `listen` with `EventTarget::Any`

* typo

* update module import

* clippy

* remove console.log

* fix api example

* fix documentation for emiTo [skip ci]

* actually add RunEvent::WebviewEvent

* update migration

* lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-02-16 08:07:39 -03:00
github-actions[bot]
88a1dd17c3
Apply Version Updates From Current Changes (#8638)
* apply version updates

* promote to beta

* fix check version

* update dependencies section [skip ci]

* update npm versions

---------

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-02-03 10:59:09 -03:00
Amr Bashir
8de308d1bf
feat(core): implement new config structure (#8723)
* feat(core): implement new config structure

RFC#5 f3e82a6b0c/texts/0005-tauri-config-restructure.md

* fixes

* remove tauri-plugin copy [skip ci]

* move platform specific configs

* fix build

* fix cli

* doctests

* change files

* read updater plugin config on CLI

* doctests

* remove env var from docs

* fix getting pubkey

* add migrations

* clippy

* update change file [skip ci]

* rename frontendDist to prodFrontend?

* Revert "rename frontendDist to prodFrontend?"

This reverts commit ef7394f085.

* fix all_features check

* fix field name

* single license getter on bundler

* readd msiexec_args

* remove unused fixture

* update template

* Update .changes/tauri-bundle-settings-rfc-5.md

* Update .changes/config-restructure-rfc-5.md

* lint bundler, fix change file

* rename AppUrl to FrontendDist, add explicit variants for docs

* fix build

* lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-02-03 00:39:48 -03:00
time-river
6639a579c7
feat(core): add support to setting a webview proxy, closes #4263 (#8441)
* feat(wry): support proxy in wry runtime

wry has been supported http/socks5 proxy in
[#1006](https://github.com/tauri-apps/wry/pull/1006), which has been
merged in [commit
3cc4d79](3cc4d79843).

This patch aims to support its feature.

Signed-off-by: lin fu <river@vvl.me>

* Apply suggestions from code review

* Apply suggestions from code review

* Update core/tauri-runtime-wry/src/lib.rs

* Update core/tauri/src/window/mod.rs

* add macos-proxy flag

* add change file

* delete file

* update change file

* use macos-14 runner to test core

---------

Signed-off-by: lin fu <river@vvl.me>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-02-01 08:53:32 -03:00
Amr Bashir
a093682d2d
refactor(core): refactor and fix event system following multiwebview support (#8621)
* clippy

* refactor(core): refactor and fix event system following multiwebview support

* update documentation

* update js docs

* lint

* clippy

* update multiwindow example [skip ci]

* enhance event tests

* fix example

* Update .changes/tauri-event-after-multiwebview.md

Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>

* fix tests

* add diagram

* Add `App/AppHandle` even target

* Discard changes to examples/api/src-tauri/tauri-plugin-sample/permissions/schemas/schema.json

* revert accidental changes

* regenerate schemas

* fix doctests

* add helper methods

* update docs

* update api

* update docs [skip ci]

* update docs [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
2024-02-01 08:06:27 -03:00
Lucas Fernandes Nogueira
af61023273
refactor(core)!: Window::close triggers RunEvent::CloseRequested (#8710)
* refactor(core): Window::close triggers RunEvent::CloseRequested

* Update .changes/runtime-wry-window-close-event.md

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>

* add destroy [skip ci]

* change files

* delete files

* fix tests

* fix tests

* fix test impl of the close flow

* fmt

* build bundle

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-01-31 14:54:49 -03:00
Amr Bashir
9eaeb5a8cd
refactor: refactor parent APIs on WindowBuilder (#8622)
* refactor: refactor parent APIs on `WindowBuilder`

closes #8587 #1643

* fix build

* clippy

* support parent in JS and config

* change files

* fix build

* clippy

* fix doctests

* fix linux build

* fix doctests

* update docs

* fix api, update example to use JS API

* fix merge

* lint

* fix tests on windows

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-01-31 13:59:14 -03:00
Amr Bashir
a2fc3a6357
feat(api/window): add visible-on-all-workspaces, closes #8652 (#8657)
* feat(api/window): add visible-on-all-worksapces, closes #8652

* fix build and generate schema

* Update .changes/api-set-visible-on-all-workspaces.md

* revert permissions

* fix alias

* revert set_icon change

* add missing permission

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-01-31 12:36:39 -03:00
Lucas Fernandes Nogueira
c77b40324e
refactor(core): add support to multiple webviews on a Tauri window (#8280)
* feat: update to latest wry

* wry dev branch [skip ci]

* fix linux [skip ci]

* refactor(runtime): split webview and window types

* split dispatch

* implement create_webview

* move webview message

* wip webview mod

* create webview manager, finish webview struct and builder

* fix tests and docs

* rename WindowUrl to WebviewUrl

* update examples

* event refactor

* update JS API

* fix events

* update example

* add WebviewWindow class on JS

* fix macos build

* allow creating window+webview on the same runtime call

* rename tauri://window-created to tauri://webview-created

* Window::add_child

* use inner_size from webview on macOS

* add multiwebview example

* automatically resize webviews on window resize

* fix tests

* set_position, set_size

* position, size getters

* set_focus

* add close fn

* update mock runtime

* lint [skip ci]

* fix inner_size getter [skip ci]

* import hwnd [skip ci]

* update webview bound ratios on set_size/set_position

* add auto_resize option

* fix android

* fix build on windows

* typo

* with_webview isnt desktop only

* add WebviewWindow rust struct (and builder)

* fix build on android

* license header

* fix macos/windows

* fix macos build

* resolve todo

* handle window not found

* hide unstable features

* document unstable feature [skip ci]

* webview plugin permissions

* hide more stuff

* fix doctests

* typos

* add change files

* fix examples

* rename hook
2024-01-24 11:05:18 -03:00
tweidinger
3c2f79f6f3
Tauri ACL/Allowlist v2 Implementation and Plugin System Refactor (#8428)
* tauri-plugin concept

* wip

* move command module to its own directory

* wip: new command traits and generated code

* wip: whip

* wip: static dispatch

there is a man standing behind me

* wip

* re-add authority

* fix build [skip ci]

* parse plugin permissions

* merge permission files [skip ci]

* parse capabilities [skip ci]

* resolve acl (untested) [skip ci]

* split functionality, add some docs

* remove command2 stuff

* actually check runtime authority

* small fixes [skip ci]

* add function to auto generate basic permission for a command [skip ci]

* retrieve command scope, implement CommandArg [skip ci]

* fix tests [skip ci]

* global scope

* lint

* license headers [skip ci]

* skip canonicalize

* separate scope type in example

* remove inlinedpermission struct [skip ci]

* permission file schema

* capabilities schema

* move items from tauri-plugin to tauri-utils

this allows tauri-plugin to depend on tauri directly again
which will be used by the runtime feature as a superset to
existing plugin traits

* enable schema and glob [skip ci]

* fix glob [skip ci]

* fix capability schema [skip ci]

* enhance schema for permission set possible values [skip ci]

* permission set can reference other sets [skip ci]

* setup tests for resolving ACL

* fixture for permission set [skip ci]

* remote context test and small fix[skip ci]

* ignore empty scope [skip ci]

* code review [skip ci]

* lint [skip ci]

* runtime fixes

* readd schema feature on tauri-config-schema [skip ci]

* remove plugin example from workspace, it breaks workspace features resolution [skip ci]

* scope as array, add test [skip ci]

* accept new shapshot [skip ci]

* core plugin permissions, default is now a set

* license headers

* fix  on windows

* update global api

* glob is no longer optional on tauri-utils

* add missing permissions on api example [skip ci]

* remove ipc scope and dangerous remote access config

* lint

* fix asset scope usage

* create out dir [skip ci]

* reuse cargo_pkg_name [skip ci]

* capability window glob pattern [skip ci]

* add platforms for capability [skip ci]

* per platform schema [skip ci]

* lint [skip ci]

* rename allowlist build mod [skip ci]

* check restricted visibility

* simplify capability target [skip ci]

* hide codegen build behind tauri-build::try_run

* optimize build scripts [skip ci]

* fix tests

* tests for RuntimeAuthority::resolve_access

* remote domain glob pattern

* lint

---------

Co-authored-by: Chip Reed <chip@chip.sh>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-01-22 21:24:15 -03:00
Amr Bashir
7f033f6dcd
fix(core): fix undecorated window resizing, #8519 (#8537)
* fix(core): fix undecorated window resizing, fixes #8519

* js api

* fix invoke call

* Update tauri-window-start-resize-dragging.md

* clippy
2024-01-18 19:34:55 +02:00
github-actions[bot]
e0b38d7434
Apply Version Updates From Current Changes (#8438)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2024-01-16 18:11:50 -03:00
Fabian-Lars
97e3341299
fix(api.js): mock __TAURI_INTERNALS__ in mockIPC and mockWindows (#8534)
* fix(api.js): mock `__TAURI_INTERNALS__` in `mockIPC` and `mockWindows`

* mock internals.invoke instead of internals.ipc
2024-01-04 01:37:27 +02:00
renovate[bot]
883e52153e
chore(deps) Update Tauri API Definitions (1.x) (#8449)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 14:16:58 -03:00
github-actions[bot]
5966812735
Apply Version Updates From Current Changes (v1) (#8396)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2023-12-20 13:50:17 -03:00
renovate[bot]
6892a8cbc1
chore(deps) Update dependency eslint-plugin-security to v2 (dev) (#8440)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 12:14:39 -03:00
Lucas Nogueira
a9b87c057d
Merge branch '1.x' into dev 2023-12-19 13:52:53 -03:00
github-actions[bot]
e44b36fea4
Apply Version Updates From Current Changes (#8274)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2023-12-19 11:03:26 -03:00
Amr Bashir
428ea6524c
feat(api): expose Resource class (#8370)
* feat(api): expose `Resource` class

continuation of https://github.com/tauri-apps/tauri/pull/8276

* Apply suggestions from code review

* fmt

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-12-18 18:16:21 -03:00
Amr Bashir
1c582a942e
refactor(api): generate types next to modules (#8392)
* refactor(api): generate types next to modules"

this fixes an issue with `moduleResolution: node`

* change file

* Update api-module-resolution-node.md
2023-12-14 13:27:48 -03:00
Amr Bashir
ef21b681e2
refactor(api): generate types next to modules (#8391)
* refactor(api): generate types next to modules"

this fixes an issue with `moduleResolution: node`

* change file

* Update api-moduleresolution-node.md
2023-12-14 13:27:31 -03:00
Amr Bashir
30adc8d45d
ci: fix publish @tauri-apps/api to latest instead of next (#8371)
* ci: fix publish `@tauri-apps/api` to `latest` instead of `next`

closes #8335

* just remove tag
2023-12-12 12:17:11 +02:00
github-actions[bot]
61cc7d9c5a
Apply Version Updates From Current Changes (v1) (#8203)
* apply version updates

* fmt

---------

Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
Co-authored-by: amrbashir <amr.bashir2015@gmail.com>
2023-12-01 03:05:05 +02:00
Chase Knowlden
c34710de67
fix: Fix archived links, Closes #8302 (#8315) 2023-11-29 03:41:41 +02:00
Amr Bashir
46451aee13
fix(api): add top-level main, module and types fields (#8268) 2023-11-20 18:13:50 -03:00
Amr Bashir
5046270273
fix(api): add top-level main, module and types fields (#8267) 2023-11-20 18:12:52 -03:00
Fabian-Lars
c2ad4d28c4
refactor(api)!: Rename primitives mod to core (#8273) 2023-11-20 17:53:13 -03:00
github-actions[bot]
3acf0d2ba4
Apply Version Updates From Current Changes (#8140)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2023-11-20 15:11:24 -03:00
Amr Bashir
f93148eac0
feat: add tray and menu javascript APIs and events, closes #6617 (#7709)
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-11-19 08:38:24 -03:00
renovate[bot]
f964cbdb93
chore(deps) Update dependency eslint to v8.53.0 (1.x) (#8189)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 21:45:24 -03:00