@whiskeyjack-net/tauri 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/package.json +17 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @whiskeyjack-net/tauri
|
|
2
2
|
|
|
3
|
-
The Tauri-native **app-shell layer** for the Whiskeyjack design system
|
|
3
|
+
The Tauri-native **app-shell layer** for the Whiskeyjack design system – the
|
|
4
4
|
window-chrome pieces the DS itself stays free of, so the design system runs
|
|
5
5
|
identically as a plain web app or inside a Tauri window.
|
|
6
6
|
|
|
@@ -16,46 +16,46 @@ npm install @whiskeyjack-net/tauri
|
|
|
16
16
|
|
|
17
17
|
Peers: `react`/`react-dom` 18+, `@tauri-apps/api` 2+, `react-i18next`,
|
|
18
18
|
`@whiskeyjack-net/design-system` (the updater UI uses `Button`/`Toast`),
|
|
19
|
-
`@phosphor-icons/react`, and `@tauri-apps/plugin-opener` (optional
|
|
19
|
+
`@phosphor-icons/react`, and `@tauri-apps/plugin-opener` (optional – only for
|
|
20
20
|
`openExternal` / the updater's download action). Everything is inert (guarded)
|
|
21
21
|
off Tauri, so it is safe to ship in a plain web/PWA build.
|
|
22
22
|
|
|
23
23
|
## Exports
|
|
24
24
|
|
|
25
|
-
- **Guards**
|
|
25
|
+
- **Guards** – `isTauri()`, `isMobileTauri()` (iPad-aware), `isDesktopTauri()`,
|
|
26
26
|
`isMacDesktop()`, `isLinuxDesktop()`. The desktop shell must gate on
|
|
27
27
|
**desktop** (mobile Tauri also sets `__TAURI_INTERNALS__`), or its
|
|
28
28
|
desktop-only CSS leaks onto phones. `isLinuxDesktop()` is the guard for the
|
|
29
|
-
transparent-window platform
|
|
29
|
+
transparent-window platform – Linux windows are undecorated with CSS-rounded
|
|
30
30
|
corners, so anything that would make the canvas opaque (notably the DS
|
|
31
|
-
`useTheme`'s root paint
|
|
31
|
+
`useTheme`'s root paint – pass `paintRoot: !isLinuxDesktop()`) has to gate on
|
|
32
32
|
it. Android's user agent also says "Linux", which is why the guard excludes
|
|
33
33
|
mobile rather than testing the UA alone.
|
|
34
|
-
- **`WindowControlsLeft` / `WindowControlsRight`**
|
|
34
|
+
- **`WindowControlsLeft` / `WindowControlsRight`** – CSD window-control buttons,
|
|
35
35
|
rendering the exact per-side buttons the backend reports (`data-wc-left` /
|
|
36
36
|
`data-wc-right` on `<html>`), so the app matches each desktop's convention.
|
|
37
37
|
Mount them in the DS `AppHeader`'s `chrome` slot.
|
|
38
|
-
- **`useSystemAccent()`**
|
|
38
|
+
- **`useSystemAccent()`** – on Tauri desktop, reads the OS accent color and
|
|
39
39
|
overrides the DS `--color-accent-*` variables, adds the `.tauri-desktop` /
|
|
40
40
|
`.tauri-platform-*` markers, and publishes the `--wc-left/right-px`
|
|
41
41
|
window-control footprint the header-clearance CSS consumes. No-op elsewhere.
|
|
42
|
-
- **`@whiskeyjack-net/tauri/css/window-controls`**
|
|
42
|
+
- **`@whiskeyjack-net/tauri/css/window-controls`** – the window-control CSS
|
|
43
43
|
(import once); pairs with the components and the `AppHeader`
|
|
44
44
|
`chrome`/`rowClassName` extension points.
|
|
45
|
-
- **`openExternal(url)`**
|
|
45
|
+
- **`openExternal(url)`** – open a URL in the system browser on Tauri (via the
|
|
46
46
|
opener plugin), a new tab on the web.
|
|
47
|
-
- **In-app updater** (direct-download desktop builds)
|
|
47
|
+
- **In-app updater** (direct-download desktop builds) – `createUpdater(config)`
|
|
48
48
|
binds the checker to one app's release channel; pair it with the UI:
|
|
49
49
|
- `createUpdater({ repo, tagPrefix, fallbackVersion })` → `{ getAppVersion,
|
|
50
50
|
checkForUpdates }`. Polls the GitHub repo's releases, matches `tagPrefix`,
|
|
51
51
|
compares semver, and resolves the best installer asset for the platform.
|
|
52
52
|
`fallbackVersion` is the web/PWA version (under Tauri the runtime reports it).
|
|
53
|
-
- `<UpdateBanner version releaseUrl onDismiss />`
|
|
53
|
+
- `<UpdateBanner version releaseUrl onDismiss />` – a floating DS `Toast`
|
|
54
54
|
surfaced on launch when a newer release exists.
|
|
55
|
-
- `<UpdateDialog updater onClose />`
|
|
55
|
+
- `<UpdateDialog updater onClose />` – a "check for updates" body for a DS
|
|
56
56
|
`BottomDrawer` (Settings). Auto-runs the check on open.
|
|
57
57
|
|
|
58
|
-
Store-distributed builds (App Store, Snap, ...) update through the store
|
|
58
|
+
Store-distributed builds (App Store, Snap, ...) update through the store –
|
|
59
59
|
gate the checker off for those.
|
|
60
60
|
|
|
61
61
|
The updater UI reads these translation keys from the app's locales:
|
|
@@ -68,7 +68,7 @@ off Tauri, so it is safe to ship in a plain web/PWA build.
|
|
|
68
68
|
|
|
69
69
|
- The **Rust** side (`src-tauri/`: the `get_system_accent_color` /
|
|
70
70
|
`get_window_controls_layout` commands, tray/menus, notifications) is an
|
|
71
|
-
**owned scaffold template**, seeded from a reference app
|
|
71
|
+
**owned scaffold template**, seeded from a reference app – not an npm library.
|
|
72
72
|
- **Auth/sync** is app-coupled (Firebase) and lives in the app or a future
|
|
73
73
|
starter kit.
|
|
74
74
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whiskeyjack-net/tauri",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Tauri-native app-shell layer for the Whiskeyjack design system: per-platform CSD window controls, OS accent integration, and desktop guards.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tauri",
|
|
7
|
+
"tauri-v2",
|
|
8
|
+
"react",
|
|
9
|
+
"window-controls",
|
|
10
|
+
"desktop",
|
|
11
|
+
"design-system",
|
|
12
|
+
"updater",
|
|
13
|
+
"csd"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://whiskeyjack.net",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/whiskeyjack-net/whiskeyjack-starter/issues"
|
|
18
|
+
},
|
|
19
|
+
"author": "whiskeyjack.net",
|
|
5
20
|
"license": "MIT",
|
|
6
21
|
"type": "module",
|
|
7
22
|
"sideEffects": false,
|
|
@@ -19,7 +34,7 @@
|
|
|
19
34
|
"@phosphor-icons/react": "^2.0.0",
|
|
20
35
|
"@tauri-apps/api": "^2.0.0",
|
|
21
36
|
"@tauri-apps/plugin-opener": "^2.0.0",
|
|
22
|
-
"@whiskeyjack-net/design-system": "^0.
|
|
37
|
+
"@whiskeyjack-net/design-system": "^0.6.0",
|
|
23
38
|
"react": "^18.0.0",
|
|
24
39
|
"react-dom": "^18.0.0",
|
|
25
40
|
"react-i18next": "^14.0.0 || ^15.0.0"
|