Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build CLI (docs:check uses dist-cli)
run: pnpm build

- name: Docs check (committed markers up to date)
run: pnpm docs:check

Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
target
node_modules
dist-js
dist-cli
dist
widget-src/.bundle.js
.idea
.DS_Store
.r2x
Expand All @@ -23,7 +25,12 @@ out/
artifacts/*
!artifacts/README.md
!artifacts/STATUS.md
tools/hosts.env
scripts/hosts.env
scripts/apple.env
.env
.env.*
!.env.example
!scripts/apple.env.example

# VitePress docs — generated trees (rebuilt by `pnpm docs:generate`)
docs/.vitepress/dist
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.5.0

Mega-refactor toward one IR SoT and aligned renderers.

### Added
- Host-side `normalize()` before store write (`textStyle`, semantic colors, stack spacing defaults, capability degradations)
- Desktop widget sources as TypeScript (`widget-src/`) bundled into `widget.html`
- Consumer CLI (`tauri-widgets`) with `tools` proxy to maintainer stands
- Wire catalogs: Swift `Generated/WireCatalog.swift`, Android `WireTypes.kt` via `gen-native`
- Measured `schemas/capabilities.coverage.json` (CI; omitted from publish)
- Light-theme visual cases (desktop / iOS / macOS)

### Changed
- Split renderers into layout/text/media/data/interactive/spacing groups (Android Glance, SwiftUI, Adaptive Cards, desktop HTML)
- Split `guest-js` into `api/*` barrel; docs generator into `scripts/.../generate/*`
- Publish packaging: npm schemas whitelist; crates.io excludes goldens/docs/scripts (~10 MB → ~1.4 MB)

### Fixed
- Desktop theme resolution (`?theme=` → `data-theme` → `matchMedia`)
- Android unit tests via JDK 17 wrapper (`scripts/sh/android-gradle.sh`)

## 0.4.3

### Fixes
Expand Down
123 changes: 117 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 56 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,49 @@
[package]
name = "tauri-plugin-widgets"
version = "0.4.3"
version = "0.5.0"
authors = ["s00d"]
description = "Tauri plugin for App Widgets on Android, iOS, and macOS (WidgetKit); Windows Widgets Board (Adaptive Cards) + desktop webview; Linux desktop webview with X11 DESKTOP pin."
edition = "2021"
rust-version = "1.70"
exclude = ["/examples", "/dist-js", "/guest-js", "/node_modules", "demo.gif"]
exclude = [
# App / JS workspace (published via npm, not crates.io)
"/examples",
"/dist-js",
"/dist-cli",
"/guest-js",
"/src-cli",
"/widget-src",
"/templates",
"/swift",
"/node_modules",
"/docs",
"/scripts",
"/.github",
"/artifacts",
# Visual / platform harnesses (PNG goldens are bulk of the crate)
"/tests/golden",
"/tests/expected",
"/tests/desktop",
"/tests/windows",
"/tests/macos",
"/tests/linux",
"/tests/cli",
# Native test trees (not needed to compile the plugin)
"/android/src/test",
"/android/src/androidTest",
"/ios/Tests",
# Misc non-crate assets
"demo.gif",
"preview.png",
"package.json",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"tsconfig.json",
"rollup.config.mjs",
"Justfile",
# Measured CI artifact (regenerated from goldens; not needed to build)
"schemas/capabilities.coverage.json",
]
links = "tauri-plugin-widgets"
license = "MIT"
repository = "https://github.com/s00d/tauri-plugin-widgets"
Expand All @@ -15,7 +53,7 @@ repository = "https://github.com/s00d/tauri-plugin-widgets"
# *dependencies* too, and old crates (e.g. winnow 0.5) still gate on removed
# nightly features like `doc_auto_cfg` → E0557. Use rustdoc-args only.
# Skip `all-features`: `layer-shell` needs gtk-layer-shell sys libs.
features = ["schema", "rasterize", "codegen", "workerw", "macos-private-api"]
features = ["schema", "rasterize", "codegen", "workerw", "macos-private-api", "image-prefetch"]
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.platforms.support]
Expand All @@ -30,9 +68,14 @@ tauri = { version = "2" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
log = "0.4"
base64 = "0.22"
schemars = { version = "0.8", optional = true }
resvg = { version = "0.45", optional = true }
base64 = { version = "0.22", optional = true }

# ureq → rustls → ring needs NDK C toolchain on Android; Rust prefetch is cfg'd
# off there anyway (Kotlin localPath). Keep the crate off the Android graph.
[target.'cfg(not(target_os = "android"))'.dependencies]
ureq = { version = ">=2.0, <2.12", default-features = true, optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
gtk = { version = "0.18", optional = true }
Expand All @@ -46,11 +89,13 @@ tempfile = "3"
[features]
# `linux` pulls gtk + x11rb for DESKTOP pin. Other OS backends follow `target_os` only.
# `rasterize` is opt-in (resvg) for Adaptive Cards chart/canvas/gauge → PNG data-URI.
default = ["linux"]
# `image-prefetch` is default on non-Android (ureq target-gated off Android).
default = ["linux", "image-prefetch"]
linux = ["dep:x11rb", "dep:raw-window-handle", "dep:gtk"]
schema = ["dep:schemars"]
codegen = ["schema"]
rasterize = ["dep:resvg", "dep:base64"]
rasterize = ["dep:resvg"]
image-prefetch = ["dep:ureq"]
# Transparent desktop widget windows on macOS (requires host `tauri.conf` macosPrivateApi).
macos-private-api = ["tauri/macos-private-api"]
# Windows wallpaper WorkerW parenting (not Widgets Board).
Expand All @@ -68,6 +113,11 @@ name = "gen-ts"
path = "src/bin/gen_ts.rs"
required-features = ["codegen"]

[[bin]]
name = "gen-native"
path = "src/bin/gen_native.rs"
required-features = ["codegen"]

[[bin]]
name = "gen-adaptive-snapshots"
path = "src/bin/gen_adaptive_snapshots.rs"
Expand Down
Loading
Loading