Compare commits

..

70 Commits

Author SHA1 Message Date
Lucas Fernandes Nogueira e8069af804 feat: update to tauri v2 stable, promote all packages to 2.0.0 (#1863)
* update to tauri v2

* covector setup

* update locks

* bump packages to v2 through covector, remove rc references

* msrv 1.78

* downgrade 1.79 msrv dep

* test clipboard

* fmt

* bitstream-io 2.3.0

* Revert "test clipboard"

This reverts commit c3e19dbe59.
2024-10-02 12:08:37 -03:00
pajlada 0975a687a0 fix: make package.json licenses SPDX compliant (#1861)
* fix: make plugin template package.json license SPDX compliant

* fix: make plugin package.json license SPDX compliant

* fix: make root package.json license SPDX compliant
2024-10-02 08:29:34 -03:00
Amr Bashir 654a7299c3 fix(positioner): pass correct values through IPC (#1858)
* fix(positioner): pass correct values through IPC

followup to https://github.com/tauri-apps/plugins-workspace/pull/1822

* build api & remove packageManager field
2024-10-02 08:28:28 -03:00
Lucas Fernandes Nogueira 58eab11faf chore: document supported platforms on README, clarify unsupported APIs (#1857)
closes #1795
2024-10-02 08:27:27 -03:00
github-actions[bot] fb62d03f73 publish new versions (#1807)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-10-02 07:02:42 -03:00
Tony 7e5e34420b Cancel auto save on save (#1859) 2024-10-01 23:13:20 -03:00
Tony f12d35609a feat(store)!: fully rework and add auto save (#1550)
* Add auto save to store plugin

* Put jsdoc at constructor instead of class level

* Clippy

* Use enum instead of bool

* Some(AutoSaveMessage::Cancel) | None

* from_millis

* u64

* Add change file

* Rename to emit_on_change

* should use Duration in `with_store`

* Add breaking change notice to change file

* Emit change event for inserts by reset

* Update readme example

* Update example

* Remove extra line

* Make description clear it only works with managed

* Fix links in docstring

* Fix doc string closing

* get_mut

* Proof of concept

* fmt

* Load store on create

* cargo fmt

* Fix merge conflits

* Format

* small cleanup

* update docs, use `impl Into<JsonValue>`

* fix doctests, further simplification of api

* add store options

---------

Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-01 15:10:40 -03:00
Amr Bashir 44273b9889 fix(shell): fix schema requiring sidecar property even though it is optional (#1839)
* fix(shell): fix schema requiring `sidecar` property even though it is optional

* fix clippy

* make `cmd` and `sidecar` exclusive

* make args optional

* cleanup

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-01 10:16:14 -03:00
Jacob Bolda 2f7e32b5e0 [positioner] handleIconState in JS (#1822)
* [positioner] handleIconState in JS

* update readme

* fix change file version

* fixes

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-01 10:15:22 -03:00
Fabian-Lars 30bcf5dcc2 refactor(sql): Allow multiple drivers at the same time (#1838)
* refactor(sql): Allow multiple drivers at the same time

* fmt

* remove default feature comment [skip ci]

* what was that doing there [skip ci]

* disable public methods for now
2024-10-01 09:47:08 -03:00
Amr Bashir 68579934c9 fix(cli): expose hidden structs (#1856)
closes  #1843
2024-10-01 09:35:13 -03:00
Tony 04459afbb6 refactor(dialog)!: use enum instead of label for buttons (#1842)
* refactor(dialog)!: use enum instead of label

* Add change file

* Fix doc comment typo

* Move ok and cancel to lib.rs
2024-10-01 09:34:20 -03:00
Tillmann 3b2bd3065d fix sql heading 2024-09-30 14:11:44 +02:00
renovate[bot] f930505de4 chore(deps): lock file maintenance (#1852)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 10:19:10 +08:00
renovate[bot] 34319bd977 chore(deps): update unocss monorepo to ^0.63.0 (#1848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-29 16:18:56 +08:00
Tony 34737186fe chore: re-generate reference.md (#1847) 2024-09-28 20:50:57 +03:00
renovate[bot] 4bd1f15bb9 fix(deps): update tauri monorepo (#1846)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-28 14:44:24 +08:00
Tillmann aabc4d3a24 Add Metadata for Plugin Compatibility (#1836)
Co-authored-by: Tillmann <112912081+tillmann-crabnebula@users.noreply.github.com>
Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
2024-09-26 14:21:25 +02:00
Fabian-Lars fc9b189e83 fix(fs): ignore OS specific paths in scope deserialization (#1837) 2024-09-26 02:43:33 +03:00
renovate[bot] b7ff3a6bdb fix(deps): update rust crate windows-registry to 0.3 (v2) (#1841)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-09-25 15:44:41 +02:00
Amr Bashir 04a0aea0ab feat(updater)!: add option to use insecure transport protocol (#1814) 2024-09-24 18:38:53 +03:00
renovate[bot] e564e2aa91 chore(deps): update dependency typescript-eslint to v8.7.0 (#1832)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 23:25:24 +02:00
renovate[bot] 118f6b4334 chore(deps): update dependency @rollup/plugin-node-resolve to v15.3.0 (#1831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 23:11:01 +02:00
renovate[bot] fd0a52aa86 chore(deps): update eslint monorepo to v9.11.1 (#1829)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 22:49:03 +02:00
renovate[bot] 52e3bdab26 fix(deps): update dependency @zerodevx/svelte-json-view to v1.0.11 (v2) (#1830)
* fix(deps): update dependency @zerodevx/svelte-json-view to v1.0.11

* audit fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fabianlars <fabianlars@fabianlars.de>
2024-09-23 22:45:24 +02:00
renovate[bot] dd09e3c3f4 chore(deps): update dependency @rollup/plugin-node-resolve to v15.2.4 (#1824)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 16:13:16 +08:00
renovate[bot] 2797954799 chore(deps): update dependency rollup to v4.22.4 (#1818)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 16:08:15 +08:00
renovate[bot] 025210be28 chore(deps): update eslint monorepo to v9.11.0 (#1820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 16:07:35 +08:00
Amr Bashir 221f50f53b fix(updater): encode version when making requests (#1816)
* fix(updater): encode version when making requests

ref: https://github.com/tauri-apps/tauri/issues/10908

* Update .changes/updater-endpoint-version-encoded.md

* only skip `+`

* fmt

* use normal const
2024-09-20 07:57:40 -03:00
renovate[bot] 6bf1bd8d44 fix(deps): update rust crate rfd to 0.15 (v2) (#1805)
* fix(deps): update rust crate rfd to 0.15

* Fix compilation

* Add change file

* Remove platform specific note

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2024-09-19 20:04:02 +08:00
Tony 41fe9053a0 fix(deep-link): is_registered check on windows 2024-09-19 19:58:13 +08:00
renovate[bot] 27bb5d9a27 chore(deps): update dependency rollup to v4.22.0 (v2) (#1810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 12:40:55 +02:00
Austin Bennett 3168e17603 Added quotes for cmd (#1806)
* Added quotes for cmd

* Add change file

---------

Co-authored-by: Tony <legendmastertony@gmail.com>
2024-09-19 09:59:54 +08:00
Jaken Herman dd514e7a88 Docs: contaiend -> contained typos (#1802) 2024-09-17 19:31:55 +03:00
renovate[bot] 6e142b4230 fix(deps): update tauri monorepo (v2) (#1801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-17 17:24:18 +02:00
renovate[bot] fd1c7c8dbb fix(deps): update dependency @tauri-apps/plugin-geolocation to v2.0.0-rc.2 (v2) (#1799)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-17 11:09:53 +02:00
renovate[bot] 59c63f31cc chore(deps): update dependency typescript-eslint to v8.6.0 (v2) (#1798)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 21:39:26 +02:00
github-actions[bot] 3cbb55aa7b publish new versions (#1796) 2024-09-16 16:29:07 -03:00
Lucas Fernandes Nogueira 60765694f5 refactor(geolocation): simplify API, defer permission checks (#1773) 2024-09-16 17:01:13 +03:00
renovate[bot] fd75401aee fix(deps): update rust crate image to 0.25 (v2) (#1418)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-09-16 13:20:08 +02:00
renovate[bot] ca34972266 fix(deps): update rust crate tokio-tungstenite to 0.24 (v2) (#1781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 13:13:15 +02:00
renovate[bot] 179184326b chore(deps): update tauri monorepo (v2) (#1789)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 12:08:42 +02:00
github-actions[bot] d8efd3cd20 Publish New Versions (v2) (#1794)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2024-09-16 07:00:22 -03:00
renovate[bot] 5d39ddcf22 chore(deps): lock file maintenance (#1791)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 10:21:19 +08:00
Tony 2050a3bea2 fix(upload): change tokio version to 1 instead of * (#1793) 2024-09-16 05:20:52 +03:00
Tony c078f57a09 Revert "Publish New Versions (v2)" (#1792)
This reverts commit dc5721ac13.
2024-09-16 05:20:21 +03:00
github-actions[bot] dc5721ac13 Publish New Versions (v2) (#1788)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-15 18:37:58 -03:00
Felix Salazar 1d9741b52b [upload - http-extra] fix: download content to file when unsuccessful response (and test) #1750 (#1783)
* fix and test

* Update Cargo.toml

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

* Update Cargo.toml

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

* add .change log

* clippy fixes

* print test error

* fix tests

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-09-15 18:37:02 -03:00
Tony 7a37355e17 fix(window-state): deadlock when trying to restore window states on initial load (#1787)
* Fix deadlock when trying to restore window the size on initial load

* Typo
2024-09-15 18:01:27 -03:00
github-actions[bot] 5cbd593e76 publish new versions (#1772)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-15 11:55:38 -03:00
renovate[bot] f7600b5fff chore(deps): update dependency @tauri-apps/cli to v2.0.0-rc.14 (#1786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-15 11:37:09 -03:00
Lucas Fernandes Nogueira fb85e5dd76 chore(deps): update tauri to 2.0.0-rc.12 (#1785) 2024-09-15 11:36:23 -03:00
Lucas Fernandes Nogueira 6f3f66794a feat(deep-link): add on_open_url Rust API (#1780) 2024-09-14 21:35:31 -03:00
FabianLars 79d6e19c4b chore: Add changefile for #1777 2024-09-14 18:34:45 +02:00
Cole Shirley aebd4f6185 fix(barcode-scanner): Fix mixed up imports (internal) (#1777)
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-09-14 18:20:21 +02:00
Lucas Fernandes Nogueira 341a5320c3 fix(clipboard): Android warnings and build on SDK under 28 (#1771) 2024-09-13 12:03:10 -03:00
Lucas Fernandes Nogueira cc03ccf5e0 fix(fs): app scopes not properly enabling paths (#1774) 2024-09-13 09:57:46 -03:00
Lucas Nogueira 009299ebec chore(prettier): ignore mobile build artifacts 2024-09-13 09:10:01 -03:00
Tony 204e5aacad fix(window-state)!: saving minimized state (#1743)
* Fix saving minimized state again

* Add change file

* Fix saving minimized size

* Add change file

* Fix missing .md

* Remove window-shadows
2024-09-13 06:29:38 +03:00
github-actions[bot] 8a45c35160 publish new versions (#1764)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-12 15:49:29 -03:00
Lucas Nogueira ebf821afd1 chore(examples): update AndroidManifest.xml 2024-09-12 15:32:27 -03:00
Lucas Fernandes Nogueira 984110a978 fix(deep-link): emit new-url event on app load (#1770) 2024-09-12 11:20:16 -03:00
Lucas Fernandes Nogueira 2b898f0786 fix(dialog): update asset protocol scope on directory open, closes #1553 (#1769) 2024-09-12 11:10:16 -03:00
Tony b2269333e3 chore(single-instance): put deep link integration behined a feature (#1766)
* Make deep link optional for single instance

* Add change file

* Add deep-link feature to example

* Update plugins/deep-link/README.md

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

* format

* [skip ci] update readme

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-09-12 18:20:15 +08:00
renovate[bot] 41afcae399 chore(deps): update dependency rollup to v4.21.3 (v2) (#1767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 12:01:38 +02:00
SRutile 9291e4d2ca fix(fs): support any UTF-8 path in writeFile (#1640)
* In the `writeFile` function, when `options.baseDir` is not set, convert `path` to URL to avoid errors caused by Chinese characters.

* fmt

* use TextEncoder

* use percent encoding

* add change file

* fmt

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-09-11 12:02:24 -03:00
renovate[bot] 3715f3c9a6 chore(deps): update tauri monorepo (#1760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 09:12:13 +08:00
github-actions[bot] 253ae66210 publish new versions (#1761) 2024-09-10 16:14:05 -03:00
Lucas Nogueira 949e2d6c45 chore: update docs 2024-09-10 16:02:38 -03:00
Lucas Fernandes Nogueira 64a6240f79 feat(deep-link): implement getCurrent on Windows/Linux (#1759)
* feat(deep-link): implement getCurrent on Windows/Linux

checks std::env::args() on initialization, also includes integration with the single-instance plugin

* fmt

* update docs, fix event

* add register_all function

* expose api

* be nicer on docs, clippy
2024-09-10 16:00:42 -03:00
342 changed files with 6330 additions and 21622 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"dialog": patch:feat
---
Implement `save` API on Android.
-5
View File
@@ -1,5 +0,0 @@
---
"barcode-scanner": patch
---
Remove unused Android dependencies.
@@ -1,5 +0,0 @@
---
"barcode-scanner": patch
---
Validate missing `NSCameraUsageDescription` Info.plist value.
+5 -2
View File
@@ -69,7 +69,9 @@
"process",
"shell",
"store",
"updater"
"updater",
"geolocation",
"haptics"
]
},
"api-example-js": {
@@ -268,7 +270,8 @@
},
"single-instance": {
"path": "./plugins/single-instance",
"manager": "rust"
"manager": "rust",
"dependencies": ["deep-link"]
},
"sql": {
"path": "./plugins/sql",
-10
View File
@@ -1,10 +0,0 @@
---
"barcode-scanner": patch
"barcode-scanner-js": patch
"geolocation": patch
"geolocation-js": patch
"notification": patch
"notification-js": patch
---
Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
@@ -1,5 +0,0 @@
---
"dialog": "patch"
---
Mark `FileResponse` as `non_exhaustive`.
-7
View File
@@ -1,7 +0,0 @@
---
"dialog": patch
"dialog-js": patch
---
The `open` function now returns a string representing either the file path or URI instead of an object.
To read the file data, use the `fs` APIs.
-5
View File
@@ -1,5 +0,0 @@
---
"deep-link": patch
---
Allow empty configuration values.
-5
View File
@@ -1,5 +0,0 @@
---
"fs": patch:bug
---
Fixes `writeFile` command implementation on Android.
-5
View File
@@ -1,5 +0,0 @@
---
"http-js": patch
---
Fixed an issue with abort signal not aborting the fetch request.
@@ -1,5 +0,0 @@
---
"dialog": patch:breaking
---
If no filters are specified, the file picker dialog now defaults to a file selection instead of photos.
@@ -1,5 +0,0 @@
---
"updater": patch
---
Fixes the updater not preserving AppImage file permissions.
@@ -1,5 +0,0 @@
---
"window-state": patch
---
Fix saving a minimized window's state changes its position to -32000
-10
View File
@@ -1,10 +0,0 @@
---
"fs": patch
"dialog": patch
---
Add utility methods on `FilePath` and `SafeFilePath` enums which are:
- `path`
- `simplified`
- `into_path`
-6
View File
@@ -1,6 +0,0 @@
---
"fs": patch
"dialog": patch
---
Implement `Serialize`, `Deserialize`, `From`, `TryFrom` and `FromStr` traits for `FilePath` and `SafeFilePath` enums.
@@ -1,6 +0,0 @@
---
"fs": patch
"dialog": patch
---
Mark `Error` enum as `#[non_exhuastive]`.
-6
View File
@@ -1,6 +0,0 @@
---
"fs": patch
"dialog": patch
---
Add `SafeFilePath` enum.
@@ -1,5 +0,0 @@
---
"fs": patch:enhance
---
The `scope-*-recursive` permissions now also allow reading the contents of the directory.
-5
View File
@@ -1,5 +0,0 @@
---
"fs": patch
---
Fix can't use Windows paths like `C:/Users/UserName/file.txt`
-6
View File
@@ -1,6 +0,0 @@
---
"geolocation": major
"geolocation-js": major
---
Initial release.
-5
View File
@@ -1,5 +0,0 @@
---
"global-shortcut": "patch"
---
Updated `global-hotkey` crate dependency to `0.6`
-6
View File
@@ -1,6 +0,0 @@
---
"haptics": major
"haptics-js": major
---
Initial release.
-9
View File
@@ -1,9 +0,0 @@
---
barcode-scanner: patch
clipboard-manager: patch
deep-link: patch
global-shortcut: patch
window-state: patch
---
Fixed an issue that caused multi-word IIFE names to not be formatted correctly. For example the `barcode-scanner` was defined as `window.__TAURI_PLUGIN_CLIPBOARDMANAGER__` instead of `window.__TAURI_PLUGIN_CLIPBOARD_MANAGER__`.
-5
View File
@@ -1,5 +0,0 @@
---
"dialog": patch:feat
---
Implement `save` API on iOS.
@@ -1,5 +0,0 @@
---
"notification": patch
---
The notification body is now optional on iOS to match the other platforms.
@@ -1,5 +0,0 @@
---
"notification-js": patch
---
**Breaking change**: The permission type when using the API is now `'granted' | 'denied' | 'prompt' | 'prompt-with-rationale'` instead of `'granted' | 'denied' | 'default'` for consistency with Rust types. When using the `window.Notification` API the type is unchanged to match the Web API type.
-44
View File
@@ -1,44 +0,0 @@
{
"tag": "rc",
"changes": [
".changes/android-dialog-save.md",
".changes/barcode-dependencies.md",
".changes/barcode-scanner-validate-plist.md",
".changes/consolidate-permission-state.md",
".changes/dialog-file-response-non-exhaustive.md",
".changes/dialog-return-path.md",
".changes/fix-deep-link-config.md",
".changes/fix-fs-write-file-android.md",
".changes/fix-http-plugin-abort.md",
".changes/fix-ios-file-dialog-default-mode.md",
".changes/fix-linux-updater-permission-error.md",
".changes/fix-restore-minimized-window-position.md",
".changes/fs-dialog-file-path-methods.md",
".changes/fs-dialog-file-path-traits.md",
".changes/fs-dialog-non-exhaustive-error.md",
".changes/fs-dialog-safe-file-path.md",
".changes/fs-scope-recursive-allow-read-dir.md",
".changes/fs-windows-path.md",
".changes/geolocation-release.md",
".changes/global-shortcut-0.6.md",
".changes/haptics-release.md",
".changes/iife-varname-spacing.md",
".changes/ios-dialog-save.md",
".changes/notification-body-optional-ios.md",
".changes/notification-permission-type-change.md",
".changes/rc.md",
".changes/remove-target-sdk.md",
".changes/resolve-content-uris.md",
".changes/shell-open-regex-match-string.md",
".changes/shell-regex-match-string.md",
".changes/single-instance-windows-sys.0.59.md",
".changes/sql-uuid-type.md",
".changes/store-remove-mobile-plugin.md",
".changes/swift-build-older-versions.md",
".changes/tauri-rc-8.md",
".changes/update-fs-api-docs.md",
".changes/update-tauri-rc-3.md",
".changes/updater-js-headers-download-crate.md",
".changes/updater-js-headers-download.md"
]
}
-61
View File
@@ -1,61 +0,0 @@
---
"authenticator": patch
"autostart": patch
"barcode-scanner": patch
"biometric": patch
"cli": patch
"clipboard-manager": patch
"deep-link": patch
"dialog": patch
"fs": patch
"global-shortcut": patch
"http": patch
"localhost": patch
"log-plugin": patch
"nfc": patch
"notification": patch
"os": patch
"persisted-scope": patch
"positioner": patch
"process": patch
"shell": patch
"single-instance": patch
"sql": patch
"store": patch
"stronghold": patch
"updater": patch
"upload": patch
"websocket": patch
"window-state": patch
"authenticator-js": patch
"autostart-js": patch
"barcode-scanner-js": patch
"biometric-js": patch
"cli-js": patch
"clipboard-manager-js": patch
"deep-link-js": patch
"dialog-js": patch
"fs-js": patch
"global-shortcut-js": patch
"http-js": patch
"log-js": patch
"nfc-js": patch
"notification-js": patch
"os-js": patch
"positioner-js": patch
"process-js": patch
"shell-js": patch
"sql-js": patch
"store-js": patch
"stronghold-js": patch
"updater-js": patch
"upload-js": patch
"websocket-js": patch
"window-state-js": patch
"haptics": patch
"haptics-js": patch
"geolocation": patch
"geolocation-js": patch
---
Update to tauri RC.
-15
View File
@@ -1,15 +0,0 @@
---
"barcode-scanner": patch:changes
"biometric": patch:changes
"clipboard-manager": patch:changes
"deep-link": patch:changes
"dialog": patch:changes
"geolocation": patch:changes
"haptics": patch:changes
"nfc": patch:changes
"notification": patch:changes
"shell": patch:changes
"store": patch:changes
---
Remove targetSdk from build.kts files as it is deprecated and will be removed from DSL v9.0
-5
View File
@@ -1,5 +0,0 @@
---
"fs": patch:feat
---
Resolve `content://` path URIs on Android.
@@ -1,5 +0,0 @@
---
"shell": patch
---
Change the `open` scope validator regex to match on the entire string.
-6
View File
@@ -1,6 +0,0 @@
---
"shell": patch
---
Change the `execute` scope argument validator regex to match on the entire string by default.
If this behavior is not desired check the `raw` boolean configuration option that is available along the `validator` string.
@@ -1,5 +0,0 @@
---
"single-instance": "patch"
---
Updated `windows-sys` crate to `0.59`
-5
View File
@@ -1,5 +0,0 @@
---
"sql": patch
---
Added support for `UUID` columns to the postgres implementation.
-5
View File
@@ -1,5 +0,0 @@
---
"store": patch:breaking
---
Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.
-15
View File
@@ -1,15 +0,0 @@
---
"barcode-scanner": patch
"biometric": patch
"clipboard-manager": patch
"dialog": patch
"geolocation": patch
"haptics": patch
"log-plugin": patch
"nfc": patch
"notification": patch
"shell": patch
"store": patch
---
Explicitly set a minimum macOS version for the Swift package.
-61
View File
@@ -1,61 +0,0 @@
---
"authenticator": patch
"autostart": patch
"barcode-scanner": patch
"biometric": patch
"cli": patch
"clipboard-manager": patch
"deep-link": patch
"dialog": patch
"fs": patch
"global-shortcut": patch
"http": patch
"localhost": patch
"log-plugin": patch
"nfc": patch
"notification": patch
"os": patch
"persisted-scope": patch
"positioner": patch
"process": patch
"shell": patch
"single-instance": patch
"sql": patch
"store": patch
"stronghold": patch
"updater": patch
"upload": patch
"websocket": patch
"window-state": patch
"authenticator-js": patch
"autostart-js": patch
"barcode-scanner-js": patch
"biometric-js": patch
"cli-js": patch
"clipboard-manager-js": patch
"deep-link-js": patch
"dialog-js": patch
"fs-js": patch
"global-shortcut-js": patch
"http-js": patch
"log-js": patch
"nfc-js": patch
"notification-js": patch
"os-js": patch
"positioner-js": patch
"process-js": patch
"shell-js": patch
"sql-js": patch
"store-js": patch
"stronghold-js": patch
"updater-js": patch
"upload-js": patch
"websocket-js": patch
"window-state-js": patch
"haptics": patch
"haptics-js": patch
"geolocation": patch
"geolocation-js": patch
---
Update to tauri 2.0.0-rc.8
-5
View File
@@ -1,5 +0,0 @@
---
"fs-js": patch
---
Update documentation.
-7
View File
@@ -1,7 +0,0 @@
---
"geolocation": patch
"deep-link": patch
"updater": patch
---
Update to tauri 2.0.0-rc.3.
@@ -1,5 +0,0 @@
---
"updater": "patch"
---
Add a second argument in `Update.download` and `Update.donloadAndInstall` JS APIs to modify headers and timeout when downloading the update.
-5
View File
@@ -1,5 +0,0 @@
---
"updater-js": "patch"
---
Add a second argument in `Update.download` and `Update.donloadAndInstall` JS APIs to modify headers and timeout when downloading the update.
+2 -8
View File
@@ -148,13 +148,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: clippy ${{ matrix.package }}
if: matrix.package != 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
- name: clippy ${{ matrix.package }} mysql
if: matrix.package == 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features mysql -- -D warnings
- name: clippy ${{ matrix.package }} postgres
if: matrix.package == 'tauri-plugin-sql'
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features postgres -- -D warnings
- name: clippy ${{ matrix.package }} --all-features
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings
+2 -14
View File
@@ -202,7 +202,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- uses: dtolnay/rust-toolchain@1.75.0
- uses: dtolnay/rust-toolchain@1.78.0
with:
targets: ${{ matrix.platform.target }}
@@ -215,21 +215,9 @@ jobs:
run: cargo +stable install cross --git https://github.com/cross-rs/cross
- name: test ${{ matrix.package }}
if: matrix.package != 'tauri-plugin-sql' && matrix.package != 'tauri-plugin-http'
if: matrix.package != 'tauri-plugin-http'
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features
- name: test ${{ matrix.package }}
if: matrix.package == 'tauri-plugin-http'
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets
- name: test ${{ matrix.package }} sqlite
if: matrix.package == 'tauri-plugin-sql'
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features sqlite
- name: test ${{ matrix.package }} mysql
if: matrix.package == 'tauri-plugin-sql'
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql
- name: test ${{ matrix.package }} postgres
if: matrix.package == 'tauri-plugin-sql'
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres
+7 -1
View File
@@ -26,9 +26,15 @@ target/
# compiled plugins
dist-js/
# plugins .tauri director
# plugins .tauri directory
/plugins/*/.tauri
# examples
examples/*/dist
plugins/*/examples/*/dist
examples/*/src-tauri/gen/schemas
plugins/*/examples/*/src-tauri/gen/schemas
# logs
logs
*.log
+6 -1
View File
@@ -19,4 +19,9 @@ plugins/*/examples/*/src-tauri/gen/
api-iife.js
init-iife.js
CHANGELOG.md
*schema.json
*schema.json
# mobile build
**/ios/.build
**/.tauri
plugins/*/android/build
Generated
+717 -486
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -11,10 +11,10 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = { version = "2.0.0-rc.10", default-features = false }
tauri-build = "2.0.0-rc.9"
tauri-plugin = "2.0.0-rc.9"
tauri-utils = "2.0.0-rc.9"
tauri = { version = "2.0.0", default-features = false }
tauri-build = "2.0.0"
tauri-plugin = "2.0.0"
tauri-utils = "2.0.0"
serde_json = "1"
thiserror = "1"
url = "2"
@@ -27,7 +27,7 @@ specta = "=2.0.0-rc.20"
edition = "2021"
authors = ["Tauri Programme within The Commons Conservancy"]
license = "Apache-2.0 OR MIT"
rust-version = "1.75"
rust-version = "1.78"
repository = "https://github.com/tauri-apps/plugins-workspace"
# default to small, optimized release binaries
+1 -1
View File
@@ -30,7 +30,7 @@
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
_This repo and all plugins require a Rust version of at least **1.75**_
_This repo and all plugins require a Rust version of at least **1.78**_
## Contributing
-2
View File
@@ -1,2 +0,0 @@
/dist/*
!/dist/.gitkeep
+36
View File
@@ -1,5 +1,41 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
### Dependencies
- Upgraded to `barcode-scanner-js@2.0.0`
- Upgraded to `biometric-js@2.0.0`
- Upgraded to `cli-js@2.0.0`
- Upgraded to `clipboard-manager-js@2.0.0`
- Upgraded to `fs-js@2.0.0`
- Upgraded to `dialog-js@2.0.0`
- Upgraded to `global-shortcut-js@2.0.0`
- Upgraded to `http-js@2.0.0`
- Upgraded to `log-js@2.0.0`
- Upgraded to `nfc-js@2.0.0`
- Upgraded to `notification-js@2.0.0`
- Upgraded to `os-js@2.0.0`
- Upgraded to `process-js@2.0.0`
- Upgraded to `shell-js@2.0.0`
- Upgraded to `store-js@2.0.0`
- Upgraded to `updater-js@2.0.0`
## \[2.0.0-rc.5]
### Dependencies
- Upgraded to `store-js@2.0.0-rc.2`
## \[2.0.0-rc.4]
### Dependencies
- Upgraded to `barcode-scanner-js@2.0.0-rc.2`
- Upgraded to `clipboard-manager-js@2.0.0-rc.2`
## \[2.0.0-rc.3]
### Dependencies
View File
+24 -22
View File
@@ -1,7 +1,7 @@
{
"name": "svelte-app",
"private": true,
"version": "2.0.0-rc.3",
"version": "2.0.0",
"type": "module",
"scripts": {
"dev": "vite --clearScreen false",
@@ -9,32 +9,34 @@
"serve": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-rc.4",
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.1",
"@tauri-apps/plugin-biometric": "2.0.0-rc.1",
"@tauri-apps/plugin-cli": "2.0.0-rc.1",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.1",
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
"@tauri-apps/plugin-fs": "2.0.0-rc.2",
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.1",
"@tauri-apps/plugin-http": "2.0.0-rc.2",
"@tauri-apps/plugin-nfc": "2.0.0-rc.1",
"@tauri-apps/plugin-notification": "2.0.0-rc.1",
"@tauri-apps/plugin-os": "2.0.0-rc.1",
"@tauri-apps/plugin-process": "2.0.0-rc.1",
"@tauri-apps/plugin-shell": "2.0.0-rc.1",
"@tauri-apps/plugin-store": "2.0.0-rc.1",
"@tauri-apps/plugin-updater": "2.0.0-rc.2",
"@zerodevx/svelte-json-view": "1.0.10"
"@tauri-apps/api": "2.0.0",
"@tauri-apps/plugin-barcode-scanner": "2.0.0",
"@tauri-apps/plugin-biometric": "2.0.0",
"@tauri-apps/plugin-cli": "2.0.0",
"@tauri-apps/plugin-clipboard-manager": "2.0.0",
"@tauri-apps/plugin-dialog": "2.0.0",
"@tauri-apps/plugin-fs": "2.0.0",
"@tauri-apps/plugin-geolocation": "2.0.0",
"@tauri-apps/plugin-global-shortcut": "2.0.0",
"@tauri-apps/plugin-haptics": "2.0.0",
"@tauri-apps/plugin-http": "2.0.0",
"@tauri-apps/plugin-nfc": "2.0.0",
"@tauri-apps/plugin-notification": "2.0.0",
"@tauri-apps/plugin-os": "2.0.0",
"@tauri-apps/plugin-process": "2.0.0",
"@tauri-apps/plugin-shell": "2.0.0",
"@tauri-apps/plugin-store": "2.0.0",
"@tauri-apps/plugin-updater": "2.0.0",
"@zerodevx/svelte-json-view": "1.0.11"
},
"devDependencies": {
"@iconify-json/codicon": "^1.1.37",
"@iconify-json/ph": "^1.1.8",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/cli": "2.0.0-rc.12",
"@unocss/extractor-svelte": "^0.62.0",
"@tauri-apps/cli": "2.0.0",
"@unocss/extractor-svelte": "^0.63.0",
"svelte": "^4.2.19",
"unocss": "^0.62.0",
"vite": "^5.0.13"
"unocss": "^0.63.0",
"vite": "^5.4.7"
}
}
+53
View File
@@ -1,5 +1,58 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
### Dependencies
- Upgraded to `barcode-scanner@2.0.0`
- Upgraded to `biometric@2.0.0`
- Upgraded to `cli@2.0.0`
- Upgraded to `clipboard-manager@2.0.0`
- Upgraded to `fs@2.0.0`
- Upgraded to `dialog@2.0.0`
- Upgraded to `global-shortcut@2.0.0`
- Upgraded to `http@2.0.0`
- Upgraded to `log-plugin@2.0.0`
- Upgraded to `nfc@2.0.0`
- Upgraded to `notification@2.0.0`
- Upgraded to `os@2.0.0`
- Upgraded to `process@2.0.0`
- Upgraded to `shell@2.0.0`
- Upgraded to `store@2.0.0`
- Upgraded to `updater@2.0.0`
## \[2.0.0-rc.8]
### Dependencies
- Upgraded to `cli@2.0.0-rc.2`
- Upgraded to `dialog@2.0.0-rc.8`
- Upgraded to `fs@2.0.0-rc.6`
- Upgraded to `shell@2.0.0-rc.4`
- Upgraded to `store@2.0.0-rc.4`
- Upgraded to `updater@2.0.0-rc.4`
- Upgraded to `http@2.0.0-rc.6`
## \[2.0.0-rc.7]
### Dependencies
- Upgraded to `clipboard-manager@2.0.0-rc.4`
- Upgraded to `fs@2.0.0-rc.5`
- Upgraded to `notification@2.0.0-rc.5`
- Upgraded to `dialog@2.0.0-rc.7`
- Upgraded to `http@2.0.0-rc.5`
## \[2.0.0-rc.6]
### Dependencies
- Upgraded to `dialog@2.0.0-rc.6`
- Upgraded to `fs@2.0.0-rc.4`
- Upgraded to `http@2.0.0-rc.4`
## \[2.0.0-rc.5]
### Dependencies
+20 -20
View File
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
version = "2.0.0-rc.5"
version = "2.0.0"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -19,22 +19,22 @@ serde_json = { workspace = true }
serde = { workspace = true }
tiny_http = "0.12"
log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.2" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.3", features = [
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0", features = [
"watch",
] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.3" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.5" }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0" }
tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart",
], version = "2.0.0-rc.3" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.4", features = [
], version = "2.0.0" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0", features = [
"windows7-compat",
] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.1" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.1" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.3" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0-rc.3" }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0" }
[dependencies.tauri]
workspace = true
@@ -50,17 +50,17 @@ features = [
]
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-rc.1" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-rc.2" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.3" }
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0" }
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.0.0" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.4" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.3" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.3" }
[target."cfg(target_os = \"windows\")".dependencies]
window-shadows = "0.2"
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.0" }
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.0" }
[features]
prod = ["tauri/custom-protocol"]
@@ -11,6 +11,10 @@
"barcode-scanner:allow-scan",
"barcode-scanner:allow-cancel",
"barcode-scanner:allow-request-permissions",
"barcode-scanner:allow-check-permissions"
"barcode-scanner:allow-check-permissions",
"geolocation:allow-check-permissions",
"geolocation:allow-request-permissions",
"geolocation:allow-watch-position",
"geolocation:allow-get-current-position"
]
}
-1
View File
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -45,6 +45,8 @@ pub fn run() {
app.handle().plugin(tauri_plugin_cli::init())?;
app.handle()
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
app.handle()
.plugin(tauri_plugin_window_state::Builder::new().build())?;
app.handle()
.plugin(tauri_plugin_updater::Builder::new().build())?;
}
@@ -53,6 +55,8 @@ pub fn run() {
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
app.handle().plugin(tauri_plugin_nfc::init())?;
app.handle().plugin(tauri_plugin_biometric::init())?;
app.handle().plugin(tauri_plugin_geolocation::init())?;
app.handle().plugin(tauri_plugin_haptics::init())?;
}
let mut webview_window_builder =
@@ -63,8 +67,7 @@ pub fn run() {
.user_agent(&format!("Tauri API - {}", std::env::consts::OS))
.title("Tauri API Validation")
.inner_size(1000., 800.)
.min_inner_size(600., 400.)
.content_protected(true);
.min_inner_size(600., 400.);
}
#[cfg(target_os = "windows")]
+1 -1
View File
@@ -1,5 +1,5 @@
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Tauri API",
"version": "2.0.0",
"identifier": "com.tauri.api",
+168 -165
View File
@@ -1,203 +1,208 @@
<script>
import { writable } from "svelte/store";
import { open } from "@tauri-apps/plugin-shell";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { getCurrentWebview } from "@tauri-apps/api/webview";
import * as os from "@tauri-apps/plugin-os";
import { writable } from 'svelte/store'
import { open } from '@tauri-apps/plugin-shell'
import { getCurrentWindow } from '@tauri-apps/api/window'
import { getCurrentWebview } from '@tauri-apps/api/webview'
import * as os from '@tauri-apps/plugin-os'
import Welcome from "./views/Welcome.svelte";
import Cli from "./views/Cli.svelte";
import Communication from "./views/Communication.svelte";
import Dialog from "./views/Dialog.svelte";
import FileSystem from "./views/FileSystem.svelte";
import Http from "./views/Http.svelte";
import Notifications from "./views/Notifications.svelte";
import Shortcuts from "./views/Shortcuts.svelte";
import Shell from "./views/Shell.svelte";
import Store from "./views/Store.svelte";
import Updater from "./views/Updater.svelte";
import Clipboard from "./views/Clipboard.svelte";
import WebRTC from "./views/WebRTC.svelte";
import Scanner from "./views/Scanner.svelte";
import Biometric from "./views/Biometric.svelte";
import Welcome from './views/Welcome.svelte'
import Cli from './views/Cli.svelte'
import Communication from './views/Communication.svelte'
import Dialog from './views/Dialog.svelte'
import FileSystem from './views/FileSystem.svelte'
import Http from './views/Http.svelte'
import Notifications from './views/Notifications.svelte'
import Shortcuts from './views/Shortcuts.svelte'
import Shell from './views/Shell.svelte'
import Store from './views/Store.svelte'
import Updater from './views/Updater.svelte'
import Clipboard from './views/Clipboard.svelte'
import WebRTC from './views/WebRTC.svelte'
import Scanner from './views/Scanner.svelte'
import Biometric from './views/Biometric.svelte'
import Geolocation from './views/Geolocation.svelte'
import { onMount, tick } from "svelte";
import { ask } from "@tauri-apps/plugin-dialog";
import Nfc from "./views/Nfc.svelte";
import { onMount, tick } from 'svelte'
import { ask } from '@tauri-apps/plugin-dialog'
import Nfc from './views/Nfc.svelte'
const appWindow = getCurrentWindow();
const appWindow = getCurrentWindow()
if (appWindow.label !== "main") {
if (appWindow.label !== 'main') {
appWindow.onCloseRequested(async (event) => {
const confirmed = await confirm("Are you sure?");
const confirmed = await confirm('Are you sure?')
if (!confirmed) {
// user did not confirm closing the window; let's prevent it
event.preventDefault();
event.preventDefault()
}
});
})
}
getCurrentWebview().onDragDropEvent((event) => {
onMessage(`File drop: ${JSON.stringify(event.payload)}`);
});
onMessage(`File drop: ${JSON.stringify(event.payload)}`)
})
const userAgent = navigator.userAgent.toLowerCase();
const isMobile =
userAgent.includes("android") || userAgent.includes("iphone");
const userAgent = navigator.userAgent.toLowerCase()
const isMobile = userAgent.includes('android') || userAgent.includes('iphone')
const views = [
{
label: "Welcome",
label: 'Welcome',
component: Welcome,
icon: "i-ph-hand-waving",
icon: 'i-ph-hand-waving'
},
{
label: "Communication",
label: 'Communication',
component: Communication,
icon: "i-codicon-radio-tower",
icon: 'i-codicon-radio-tower'
},
!isMobile && {
label: "CLI",
label: 'CLI',
component: Cli,
icon: "i-codicon-terminal",
icon: 'i-codicon-terminal'
},
{
label: "Dialog",
label: 'Dialog',
component: Dialog,
icon: "i-codicon-multiple-windows",
icon: 'i-codicon-multiple-windows'
},
{
label: "File system",
label: 'File system',
component: FileSystem,
icon: "i-codicon-files",
icon: 'i-codicon-files'
},
{
label: "HTTP",
label: 'HTTP',
component: Http,
icon: "i-ph-globe-hemisphere-west",
icon: 'i-ph-globe-hemisphere-west'
},
{
label: "Notifications",
label: 'Notifications',
component: Notifications,
icon: "i-codicon-bell-dot",
icon: 'i-codicon-bell-dot'
},
!isMobile && {
label: "Shortcuts",
label: 'Shortcuts',
component: Shortcuts,
icon: "i-codicon-record-keys",
icon: 'i-codicon-record-keys'
},
{
label: "Shell",
label: 'Shell',
component: Shell,
icon: "i-codicon-terminal-bash",
icon: 'i-codicon-terminal-bash'
},
{
label: "Store",
label: 'Store',
component: Store,
icon: "i-codicon-file-code",
icon: 'i-codicon-file-code'
},
!isMobile && {
label: "Updater",
label: 'Updater',
component: Updater,
icon: "i-codicon-cloud-download",
icon: 'i-codicon-cloud-download'
},
{
label: "Clipboard",
label: 'Clipboard',
component: Clipboard,
icon: "i-codicon-clippy",
icon: 'i-codicon-clippy'
},
{
label: "WebRTC",
label: 'WebRTC',
component: WebRTC,
icon: "i-ph-broadcast",
icon: 'i-ph-broadcast'
},
isMobile && {
label: "Scanner",
label: 'Scanner',
component: Scanner,
icon: "i-ph-scan",
icon: 'i-ph-scan'
},
isMobile && {
label: "NFC",
label: 'NFC',
component: Nfc,
icon: "i-ph-nfc",
icon: 'i-ph-nfc'
},
isMobile && {
label: "Biometric",
label: 'Biometric',
component: Biometric,
icon: "i-ph-scan",
icon: 'i-ph-scan'
},
];
isMobile && {
label: 'Geolocation',
component: Geolocation,
icon: 'i-ph-map-pin'
}
]
let selected = views[0];
let selected = views[0]
function select(view) {
selected = view;
selected = view
}
// Window controls
let isWindowMaximized;
let isWindowMaximized
onMount(async () => {
isWindowMaximized = await appWindow.isMaximized();
isWindowMaximized = await appWindow.isMaximized()
appWindow.onResized(async () => {
isWindowMaximized = await appWindow.isMaximized();
});
});
isWindowMaximized = await appWindow.isMaximized()
})
})
function minimize() {
appWindow.minimize();
appWindow.minimize()
}
async function toggleMaximize() {
(await appWindow.isMaximized())
;(await appWindow.isMaximized())
? appWindow.unmaximize()
: appWindow.maximize();
: appWindow.maximize()
}
let confirmed_close = false;
let confirmed_close = false
async function close() {
if (!confirmed_close) {
confirmed_close = await ask(
"Are you sure that you want to close this window?",
'Are you sure that you want to close this window?',
{
title: "Tauri API",
title: 'Tauri API'
}
);
)
if (confirmed_close) {
appWindow.close();
appWindow.close()
}
}
}
// dark/light
let isDark;
let isDark
onMount(() => {
isDark = localStorage && localStorage.getItem("theme") == "dark";
applyTheme(isDark);
});
isDark = localStorage && localStorage.getItem('theme') == 'dark'
applyTheme(isDark)
})
function applyTheme(isDark) {
const html = document.querySelector("html");
isDark ? html.classList.add("dark") : html.classList.remove("dark");
localStorage && localStorage.setItem("theme", isDark ? "dark" : "");
const html = document.querySelector('html')
isDark ? html.classList.add('dark') : html.classList.remove('dark')
localStorage && localStorage.setItem('theme', isDark ? 'dark' : '')
}
function toggleDark() {
isDark = !isDark;
applyTheme(isDark);
isDark = !isDark
applyTheme(isDark)
}
// Console
let messages = writable([]);
let consoleTextEl;
let messages = writable([])
let consoleTextEl
async function onMessage(value) {
messages.update((r) => [
...r,
{
html:
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
(typeof value === "string" ? value : JSON.stringify(value, null, 1)) +
"</pre>",
},
]);
await tick();
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
(typeof value === 'string' ? value : JSON.stringify(value, null, 1)) +
'</pre>'
}
])
await tick()
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
}
// this function is renders HTML without sanitizing it so it's insecure
@@ -209,111 +214,109 @@
html:
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
html +
"</pre>",
},
]);
await tick();
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
'</pre>'
}
])
await tick()
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
}
function clear() {
messages.update(() => []);
messages.update(() => [])
}
let consoleEl, consoleH, cStartY;
let minConsoleHeight = 50;
let consoleEl, consoleH, cStartY
let minConsoleHeight = 50
function startResizingConsole(e) {
cStartY = e.clientY;
cStartY = e.clientY
const styles = window.getComputedStyle(consoleEl);
consoleH = parseInt(styles.height, 10);
const styles = window.getComputedStyle(consoleEl)
consoleH = parseInt(styles.height, 10)
const moveHandler = (e) => {
const dy = e.clientY - cStartY;
const newH = consoleH - dy;
const dy = e.clientY - cStartY
const newH = consoleH - dy
consoleEl.style.height = `${
newH < minConsoleHeight ? minConsoleHeight : newH
}px`;
};
}px`
}
const upHandler = () => {
document.removeEventListener("mouseup", upHandler);
document.removeEventListener("mousemove", moveHandler);
};
document.addEventListener("mouseup", upHandler);
document.addEventListener("mousemove", moveHandler);
document.removeEventListener('mouseup', upHandler)
document.removeEventListener('mousemove', moveHandler)
}
document.addEventListener('mouseup', upHandler)
document.addEventListener('mousemove', moveHandler)
}
let isWindows;
let isWindows
onMount(async () => {
isWindows = (await os.platform()) === "windows";
});
isWindows = (await os.platform()) === 'windows'
})
// mobile
let isSideBarOpen = false;
let sidebar;
let sidebarToggle;
let isDraggingSideBar = false;
let draggingStartPosX = 0;
let draggingEndPosX = 0;
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
let isSideBarOpen = false
let sidebar
let sidebarToggle
let isDraggingSideBar = false
let draggingStartPosX = 0
let draggingEndPosX = 0
const clamp = (min, num, max) => Math.min(Math.max(num, min), max)
function toggleSidebar(sidebar, isSideBarOpen) {
sidebar.style.setProperty(
"--translate-x",
`${isSideBarOpen ? "0" : "-18.75"}rem`
);
'--translate-x',
`${isSideBarOpen ? '0' : '-18.75'}rem`
)
}
onMount(() => {
sidebar = document.querySelector("#sidebar");
sidebarToggle = document.querySelector("#sidebarToggle");
sidebar = document.querySelector('#sidebar')
sidebarToggle = document.querySelector('#sidebarToggle')
document.addEventListener("click", (e) => {
document.addEventListener('click', (e) => {
if (sidebarToggle.contains(e.target)) {
isSideBarOpen = !isSideBarOpen;
isSideBarOpen = !isSideBarOpen
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
isSideBarOpen = false;
isSideBarOpen = false
}
});
})
document.addEventListener("touchstart", (e) => {
if (sidebarToggle.contains(e.target)) return;
document.addEventListener('touchstart', (e) => {
if (sidebarToggle.contains(e.target)) return
const x = e.touches[0].clientX;
const x = e.touches[0].clientX
if ((0 < x && x < 20 && !isSideBarOpen) || isSideBarOpen) {
isDraggingSideBar = true;
draggingStartPosX = x;
isDraggingSideBar = true
draggingStartPosX = x
}
});
})
document.addEventListener("touchmove", (e) => {
document.addEventListener('touchmove', (e) => {
if (isDraggingSideBar) {
const x = e.touches[0].clientX;
draggingEndPosX = x;
const delta = (x - draggingStartPosX) / 10;
const x = e.touches[0].clientX
draggingEndPosX = x
const delta = (x - draggingStartPosX) / 10
sidebar.style.setProperty(
"--translate-x",
'--translate-x',
`-${clamp(0, isSideBarOpen ? 0 - delta : 18.75 - delta, 18.75)}rem`
);
)
}
});
})
document.addEventListener("touchend", () => {
document.addEventListener('touchend', () => {
if (isDraggingSideBar) {
const delta = (draggingEndPosX - draggingStartPosX) / 10;
isSideBarOpen = isSideBarOpen
? delta > -(18.75 / 2)
: delta > 18.75 / 2;
const delta = (draggingEndPosX - draggingStartPosX) / 10
isSideBarOpen = isSideBarOpen ? delta > -(18.75 / 2) : delta > 18.75 / 2
}
isDraggingSideBar = false;
});
});
isDraggingSideBar = false
})
})
$: {
const sidebar = document.querySelector("#sidebar");
const sidebar = document.querySelector('#sidebar')
if (sidebar) {
toggleSidebar(sidebar, isSideBarOpen);
toggleSidebar(sidebar, isSideBarOpen)
}
}
</script>
@@ -332,7 +335,7 @@
children:items-center children:justify-center"
>
<span
title={isDark ? "Switch to Light mode" : "Switch to Dark mode"}
title={isDark ? 'Switch to Light mode' : 'Switch to Dark mode'}
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
on:click={toggleDark}
>
@@ -350,7 +353,7 @@
<div class="i-codicon-chrome-minimize" />
</span>
<span
title={isWindowMaximized ? "Restore" : "Maximize"}
title={isWindowMaximized ? 'Restore' : 'Maximize'}
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
on:click={toggleMaximize}
>
@@ -393,7 +396,7 @@
bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"
>
<img
on:click={() => open("https://tauri.app/")}
on:click={() => open('https://tauri.app/')}
class="self-center p-7 cursor-pointer"
src="tauri_logo.png"
alt="Tauri logo"
@@ -449,8 +452,8 @@
href="##"
class="nv {selected === view ? 'nv_selected' : ''}"
on:click={() => {
select(view);
isSideBarOpen = false;
select(view)
isSideBarOpen = false
}}
>
<div class="{view.icon} mr-2" />
+28 -29
View File
@@ -1,59 +1,59 @@
<script>
import * as clipboard from "@tauri-apps/plugin-clipboard-manager";
import { open } from "@tauri-apps/plugin-dialog";
import { arrayBufferToBase64 } from "../lib/utils";
import { readFile } from "@tauri-apps/plugin-fs";
import * as clipboard from '@tauri-apps/plugin-clipboard-manager'
import { open } from '@tauri-apps/plugin-dialog'
import { arrayBufferToBase64 } from '../lib/utils'
import { readFile } from '@tauri-apps/plugin-fs'
export let onMessage;
export let insecureRenderHtml;
let text = "clipboard message";
export let onMessage
export let insecureRenderHtml
let text = 'clipboard message'
function writeText() {
clipboard
.writeText(text)
.then(() => {
onMessage("Wrote to the clipboard");
onMessage('Wrote to the clipboard')
})
.catch(onMessage);
.catch(onMessage)
}
async function writeImage() {
try {
const res = await open({
title: "Image to write to clipboard",
const path = await open({
title: 'Image to write to clipboard',
filters: [
{
name: "Clipboard IMG",
extensions: ["png", "jpg", "jpeg"],
},
],
});
const bytes = await readFile(res.path);
await clipboard.writeImage(bytes);
onMessage("wrote image");
name: 'Clipboard IMG',
extensions: ['png', 'jpg', 'jpeg']
}
]
})
const bytes = await readFile(path)
await clipboard.writeImage(bytes)
onMessage('wrote image')
} catch (e) {
onMessage(e);
onMessage(e)
}
}
async function read() {
try {
const image = await clipboard.readImage();
const image = await clipboard.readImage()
arrayBufferToBase64(await image.rgba(), function (base64) {
const src = "data:image/png;base64," + base64;
insecureRenderHtml('<img src="' + src + '"></img>');
});
return;
const src = 'data:image/png;base64,' + base64
insecureRenderHtml('<img src="' + src + '"></img>')
})
return
} catch (_) {}
clipboard
.readText()
.then((contents) => {
onMessage(`Clipboard contents: ${contents}`);
onMessage(`Clipboard contents: ${contents}`)
})
.catch((e) => {
onMessage(e);
});
onMessage(e)
})
}
</script>
@@ -65,6 +65,5 @@
/>
<button class="btn" type="button" on:click={writeText}>Write</button>
<button class="btn" type="button" on:click={writeImage}>Pick Image</button>
<button class="btn" type="button" on:click={read}>Read</button>
</div>
+29
View File
@@ -0,0 +1,29 @@
<script>
import {
checkPermissions,
requestPermissions,
getCurrentPosition
} from '@tauri-apps/plugin-geolocation'
export let onMessage
async function getPosition() {
let permissions = await checkPermissions()
if (
permissions.location === 'prompt' ||
permissions.location === 'prompt-with-rationale'
) {
permissions = await requestPermissions(['location'])
}
if (permissions.location === 'granted') {
getCurrentPosition().then(onMessage).catch(onMessage)
} else {
onMessage('permission denied')
}
}
</script>
<button class="btn" id="cli-matches" on:click={getPosition}>
Get Position
</button>
-7
View File
@@ -26,13 +26,6 @@ export default defineConfig(async () => {
host: host || false,
port: 5173,
strictPort: true,
hmr: host
? {
protocol: 'ws',
host,
port: 5183
}
: undefined,
fs: {
allow: ['.', '../../tooling/api/dist']
}
+7 -7
View File
@@ -1,7 +1,7 @@
{
"name": "plugins-workspace",
"private": true,
"license": "MIT or APACHE-2.0",
"license": "MIT OR Apache-2.0",
"type": "module",
"scripts": {
"build": "pnpm run -r --parallel --filter !plugins-workspace --filter !\"./plugins/*/examples/**\" --filter !\"./examples/*\" build",
@@ -10,20 +10,20 @@
"format:check": "prettier --check ."
},
"devDependencies": {
"@eslint/js": "9.10.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@eslint/js": "9.11.1",
"@rollup/plugin-node-resolve": "15.3.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@types/eslint__js": "8.42.3",
"covector": "^0.12.0",
"eslint": "9.10.0",
"covector": "^0.12.3",
"eslint": "9.11.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-security": "3.0.1",
"prettier": "3.3.3",
"rollup": "4.21.2",
"rollup": "4.22.4",
"tslib": "2.7.0",
"typescript": "5.6.2",
"typescript-eslint": "8.5.0"
"typescript-eslint": "8.7.0"
},
"resolutions": {
"semver": ">=7.5.2",
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+8 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
version = "2.0.0-rc.1"
version = "2.0.0"
description = "Automatically launch your application at startup."
authors = { workspace = true }
license = { workspace = true }
@@ -13,6 +13,13 @@ links = "tauri-plugin-autostart"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.platforms.support]
windows = { level = "full", notes = "" }
linux = { level = "full", notes = "" }
macos = { level = "full", notes = "" }
android = { level = "none", notes = "" }
ios = { level = "none", notes = "" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
+11 -3
View File
@@ -1,10 +1,18 @@
![plugin-autostart](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/autostart/banner.png)
Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
Automatically launch your application at startup.
| Platform | Supported |
| -------- | --------- |
| Linux | ✓ |
| Windows | ✓ |
| macOS | ✓ |
| Android | x |
| iOS | x |
## Install
_This plugin requires a Rust version of at least **1.75**_
_This plugin requires a Rust version of at least **1.78**_
There are three general methods of installation that we can recommend.
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-autostart = "2.0.0-rc"
tauri-plugin-autostart = "2.0.0"
# alternatively with Git:
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-autostart",
"version": "2.0.0-rc.1",
"license": "MIT or APACHE-2.0",
"version": "2.0.0",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}
@@ -15,7 +15,7 @@ disable the automatic start on boot.
- `allow-disable`
- `allow-is-enabled`
## Permission Table
## Permission Table
<table>
<tr>
@@ -295,53 +295,39 @@
"type": "string",
"oneOf": [
{
"description": "allow-disable -> Enables the disable command without any pre-configured scope.",
"description": "Enables the disable command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-disable"
]
"const": "allow-disable"
},
{
"description": "deny-disable -> Denies the disable command without any pre-configured scope.",
"description": "Denies the disable command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-disable"
]
"const": "deny-disable"
},
{
"description": "allow-enable -> Enables the enable command without any pre-configured scope.",
"description": "Enables the enable command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-enable"
]
"const": "allow-enable"
},
{
"description": "deny-enable -> Denies the enable command without any pre-configured scope.",
"description": "Denies the enable command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-enable"
]
"const": "deny-enable"
},
{
"description": "allow-is-enabled -> Enables the is_enabled command without any pre-configured scope.",
"description": "Enables the is_enabled command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-is-enabled"
]
"const": "allow-is-enabled"
},
{
"description": "deny-is-enabled -> Denies the is_enabled command without any pre-configured scope.",
"description": "Denies the is_enabled command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-is-enabled"
]
"const": "deny-is-enabled"
},
{
"description": "default -> This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
"description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
"type": "string",
"enum": [
"default"
]
"const": "default"
}
]
}
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
## \[2.0.0-rc.2]
- [`79d6e19c`](https://github.com/tauri-apps/plugins-workspace/commit/79d6e19c4b38bae0cab29eb88df379e2237d9aac) ([#1777](https://github.com/tauri-apps/plugins-workspace/pull/1777)) Fixed an issue which caused checkPermission and requestPermission to be mixed up.
## \[2.0.0-rc.4]
- [`713c54ef`](https://github.com/tauri-apps/plugins-workspace/commit/713c54ef8365d36afd84585dcabed2fbb751223d) ([#1749](https://github.com/tauri-apps/plugins-workspace/pull/1749) by [@olivierlemasle](https://github.com/tauri-apps/plugins-workspace/../../olivierlemasle)) Remove unused Android dependencies.
+9 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-barcode-scanner"
version = "2.0.0-rc.4"
version = "2.0.0"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
@@ -14,6 +14,14 @@ rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-linux-android"]
[package.metadata.platforms.support]
windows = { level = "none", notes = "" }
linux = { level = "none", notes = "" }
macos = { level = "none", notes = "" }
android = { level = "full", notes = "" }
ios = { level = "full", notes = "" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
+9 -1
View File
@@ -2,6 +2,14 @@
Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes.
| Platform | Supported |
| -------- | --------- |
| Linux | x |
| Windows | x |
| macOS | x |
| Android | ✓ |
| iOS | ✓ |
## Install
_This plugin requires a Rust version of at least **1.64**_
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-barcode-scanner = "2.0.0-rc"
tauri-plugin-barcode-scanner = "2.0.0"
# alternatively with Git:
tauri-plugin-barcode-scanner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
+2 -2
View File
@@ -4,8 +4,8 @@
import {
invoke,
requestPermissions as checkPermissions_,
checkPermissions as requestPermissions_
requestPermissions as requestPermissions_,
checkPermissions as checkPermissions_
} from '@tauri-apps/api/core'
export type { PermissionState } from '@tauri-apps/api/core'
+3 -3
View File
@@ -1,8 +1,8 @@
{
"name": "@tauri-apps/plugin-barcode-scanner",
"version": "2.0.0-rc.1",
"version": "2.0.0",
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
"license": "MIT or APACHE-2.0",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}
@@ -16,7 +16,7 @@ It allows all barcode related features.
- `allow-scan`
- `allow-vibrate`
## Permission Table
## Permission Table
<table>
<tr>
@@ -295,95 +295,69 @@
"type": "string",
"oneOf": [
{
"description": "allow-cancel -> Enables the cancel command without any pre-configured scope.",
"description": "Enables the cancel command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-cancel"
]
"const": "allow-cancel"
},
{
"description": "deny-cancel -> Denies the cancel command without any pre-configured scope.",
"description": "Denies the cancel command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-cancel"
]
"const": "deny-cancel"
},
{
"description": "allow-check-permissions -> Enables the check_permissions command without any pre-configured scope.",
"description": "Enables the check_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-check-permissions"
]
"const": "allow-check-permissions"
},
{
"description": "deny-check-permissions -> Denies the check_permissions command without any pre-configured scope.",
"description": "Denies the check_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-check-permissions"
]
"const": "deny-check-permissions"
},
{
"description": "allow-open-app-settings -> Enables the open_app_settings command without any pre-configured scope.",
"description": "Enables the open_app_settings command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-open-app-settings"
]
"const": "allow-open-app-settings"
},
{
"description": "deny-open-app-settings -> Denies the open_app_settings command without any pre-configured scope.",
"description": "Denies the open_app_settings command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-open-app-settings"
]
"const": "deny-open-app-settings"
},
{
"description": "allow-request-permissions -> Enables the request_permissions command without any pre-configured scope.",
"description": "Enables the request_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-request-permissions"
]
"const": "allow-request-permissions"
},
{
"description": "deny-request-permissions -> Denies the request_permissions command without any pre-configured scope.",
"description": "Denies the request_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-request-permissions"
]
"const": "deny-request-permissions"
},
{
"description": "allow-scan -> Enables the scan command without any pre-configured scope.",
"description": "Enables the scan command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-scan"
]
"const": "allow-scan"
},
{
"description": "deny-scan -> Denies the scan command without any pre-configured scope.",
"description": "Denies the scan command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-scan"
]
"const": "deny-scan"
},
{
"description": "allow-vibrate -> Enables the vibrate command without any pre-configured scope.",
"description": "Enables the vibrate command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-vibrate"
]
"const": "allow-vibrate"
},
{
"description": "deny-vibrate -> Denies the vibrate command without any pre-configured scope.",
"description": "Denies the vibrate command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-vibrate"
]
"const": "deny-vibrate"
},
{
"description": "default -> This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
"description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
"type": "string",
"enum": [
"default"
]
"const": "default"
}
]
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+9 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-biometric"
version = "2.0.0-rc.3"
version = "2.0.0"
description = "Prompt the user for biometric authentication on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
@@ -13,6 +13,14 @@ rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-linux-android"]
[package.metadata.platforms.support]
windows = { level = "none", notes = "" }
linux = { level = "none", notes = "" }
macos = { level = "none", notes = "" }
android = { level = "full", notes = "" }
ios = { level = "full", notes = "" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
+9 -1
View File
@@ -2,6 +2,14 @@
Prompt the user for biometric authentication on Android and iOS.
| Platform | Supported |
| -------- | --------- |
| Linux | x |
| Windows | x |
| macOS | x |
| Android | ✓ |
| iOS | ✓ |
## Install
_This plugin requires a Rust version of at least **1.65**_
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-biometric = "2.0.0-rc"
tauri-plugin-biometric = "2.0.0"
# alternatively with Git:
tauri-plugin-biometric = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-biometric",
"version": "2.0.0-rc.1",
"license": "MIT or APACHE-2.0",
"version": "2.0.0",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}
@@ -12,7 +12,7 @@ It allows acccess to all biometric commands.
- `allow-authenticate`
- `allow-status`
## Permission Table
## Permission Table
<table>
<tr>
@@ -295,39 +295,29 @@
"type": "string",
"oneOf": [
{
"description": "allow-authenticate -> Enables the authenticate command without any pre-configured scope.",
"description": "Enables the authenticate command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-authenticate"
]
"const": "allow-authenticate"
},
{
"description": "deny-authenticate -> Denies the authenticate command without any pre-configured scope.",
"description": "Denies the authenticate command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-authenticate"
]
"const": "deny-authenticate"
},
{
"description": "allow-status -> Enables the status command without any pre-configured scope.",
"description": "Enables the status command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-status"
]
"const": "allow-status"
},
{
"description": "deny-status -> Denies the status command without any pre-configured scope.",
"description": "Denies the status command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-status"
]
"const": "deny-status"
},
{
"description": "default -> This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n",
"description": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n",
"type": "string",
"enum": [
"default"
]
"const": "default"
}
]
}
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
## \[2.0.0-rc.2]
- [`68579934`](https://github.com/tauri-apps/plugins-workspace/commit/68579934c93f6ed2edbc97474560d6a8a00e8f70) ([#1856](https://github.com/tauri-apps/plugins-workspace/pull/1856) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Expose `Matches`, `SubcommandMatches` and `ArgData` structs.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+9 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-cli"
version = "2.0.0-rc.1"
version = "2.0.0"
description = "Parse arguments from your Tauri application's command line interface."
edition = { workspace = true }
authors = { workspace = true }
@@ -13,6 +13,14 @@ links = "tauri-plugin-cli"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.platforms.support]
windows = { level = "full", notes = "" }
linux = { level = "full", notes = "" }
macos = { level = "full", notes = "" }
android = { level = "none", notes = "" }
ios = { level = "none", notes = "" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
+9 -3
View File
@@ -2,11 +2,17 @@
Parse arguments from your Command Line Interface.
- Supported platforms: Windows, Linux and macOS.
| Platform | Supported |
| -------- | --------- |
| Linux | ✓ |
| Windows | ✓ |
| macOS | ✓ |
| Android | x |
| iOS | x |
## Install
_This plugin requires a Rust version of at least **1.75**_
_This plugin requires a Rust version of at least **1.78**_
There are three general methods of installation that we can recommend.
@@ -21,7 +27,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-cli = "2.0.0-rc"
tauri-plugin-cli = "2.0.0"
# alternatively with Git:
tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-cli",
"version": "2.0.0-rc.1",
"license": "MIT or APACHE-2.0",
"version": "2.0.0",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}
@@ -4,7 +4,7 @@ Allows reading the CLI matches
- `allow-cli-matches`
## Permission Table
## Permission Table
<table>
<tr>
+6 -12
View File
@@ -295,25 +295,19 @@
"type": "string",
"oneOf": [
{
"description": "allow-cli-matches -> Enables the cli_matches command without any pre-configured scope.",
"description": "Enables the cli_matches command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-cli-matches"
]
"const": "allow-cli-matches"
},
{
"description": "deny-cli-matches -> Denies the cli_matches command without any pre-configured scope.",
"description": "Denies the cli_matches command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-cli-matches"
]
"const": "deny-cli-matches"
},
{
"description": "default -> Allows reading the CLI matches",
"description": "Allows reading the CLI matches",
"type": "string",
"enum": [
"default"
]
"const": "default"
}
]
}
+2
View File
@@ -18,3 +18,5 @@ impl Serialize for Error {
serializer.serialize_str(self.to_string().as_ref())
}
}
pub type Result<T> = std::result::Result<T, Error>;
+3 -2
View File
@@ -23,8 +23,9 @@ mod error;
mod parser;
use config::{Arg, Config};
pub use error::Error;
type Result<T> = std::result::Result<T, Error>;
pub use error::{Error, Result};
pub use parser::{ArgData, Matches, SubcommandMatches};
pub struct Cli<R: Runtime>(PluginApi<R, Config>);
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
## \[2.0.0-rc.2]
- [`341a5320`](https://github.com/tauri-apps/plugins-workspace/commit/341a5320c33d3c7b041abf7eb0ab7ad8009e6c3f) ([#1771](https://github.com/tauri-apps/plugins-workspace/pull/1771)) Fix warnings and clear implementation on Android below SDK 28.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+10 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-clipboard-manager"
version = "2.0.0-rc.3"
version = "2.0.0"
description = "Read and write to the system clipboard."
edition = { workspace = true }
authors = { workspace = true }
@@ -14,6 +14,14 @@ rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"]
[package.metadata.platforms.support]
windows = { level = "full", notes = "" }
linux = { level = "full", notes = "" }
macos = { level = "full", notes = "" }
android = { level = "partial", notes = "Only plain-text content support" }
ios = { level = "partial", notes = "Only plain-text content support" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
@@ -29,4 +37,4 @@ tauri = { workspace = true, features = ["wry"] }
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
arboard = "3"
image = "0.24"
image = "0.25"
+10 -2
View File
@@ -2,9 +2,17 @@
Read and write to the system clipboard.
| Platform | Supported |
| -------- | --------- |
| Linux | ✓ |
| Windows | ✓ |
| macOS | ✓ |
| Android | ✓ |
| iOS | ✓ |
## Install
_This plugin requires a Rust version of at least **1.75**_
_This plugin requires a Rust version of at least **1.78**_
There are three general methods of installation that we can recommend.
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-clipboard-manager = "2.0.0-rc"
tauri-plugin-clipboard-manager = "2.0.0"
# alternatively with Git:
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -4,12 +4,12 @@
package app.tauri.clipboard
import android.R.attr.value
import android.app.Activity
import android.content.ClipData
import android.content.ClipDescription
import android.content.ClipboardManager
import android.content.Context
import android.os.Build
import app.tauri.annotation.Command
import app.tauri.annotation.InvokeArg
import app.tauri.annotation.TauriPlugin
@@ -59,6 +59,9 @@ internal class ReadClipDataSerializer @JvmOverloads constructor(t: Class<ReadCli
jgen.writeEndObject()
}
else -> {
throw Exception("unimplemented ReadClipData")
}
}
jgen.writeEndObject()
@@ -93,7 +96,7 @@ class ClipboardPlugin(private val activity: Activity) : Plugin(activity) {
is WriteOptions.PlainText -> {
ClipData.newPlainText(args.label, args.text)
} else -> {
invoke.reject("Invalid write options provided")
invoke.reject("unimplemented WriteOptions")
return
}
@@ -128,7 +131,11 @@ class ClipboardPlugin(private val activity: Activity) : Plugin(activity) {
@Command
fun clear(invoke: Invoke) {
if (manager.hasPrimaryClip()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
manager.clearPrimaryClip()
} else {
manager.setPrimaryClip(ClipData.newPlainText("", ""))
}
}
invoke.resolve()
}
@@ -49,6 +49,11 @@ async function readText(): Promise<string> {
/**
* Writes image buffer to the clipboard.
*
* #### Platform-specific
*
* - **Android / iOS:** Not supported.
*
* @example
* ```typescript
* import { writeImage } from '@tauri-apps/plugin-clipboard-manager';
@@ -75,6 +80,11 @@ async function writeImage(
/**
* Gets the clipboard content as Uint8Array image.
*
* #### Platform-specific
*
* - **Android / iOS:** Not supported.
*
* @example
* ```typescript
* import { readImage } from '@tauri-apps/plugin-clipboard-manager';
@@ -93,6 +103,11 @@ async function readImage(): Promise<Image> {
/**
* * Writes HTML or fallbacks to write provided plain text to the clipboard.
*
* #### Platform-specific
*
* - **Android / iOS:** Not supported.
*
* @example
* ```typescript
* import { writeHtml, readHtml } from '@tauri-apps/plugin-clipboard-manager';
@@ -114,6 +129,11 @@ async function writeHtml(html: string, altHtml?: string): Promise<void> {
/**
* Clears the clipboard.
*
* #### Platform-specific
*
* - **Android:** Only supported on SDK 28+. For older releases we write an empty string to the clipboard instead.
*
* @example
* ```typescript
* import { clear } from '@tauri-apps/plugin-clipboard-manager';
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-clipboard-manager",
"version": "2.0.0-rc.1",
"license": "MIT or APACHE-2.0",
"version": "2.0.0",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}
@@ -8,7 +8,7 @@ Clipboard interaction needs to be explicitly enabled.
## Permission Table
## Permission Table
<table>
<tr>

Some files were not shown because too many files have changed in this diff Show More