@capgo/capacitor-widget-kit 8.1.9 → 8.1.10

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/Package.swift CHANGED
@@ -7,22 +7,37 @@ let package = Package(
7
7
  products: [
8
8
  .library(
9
9
  name: "CapgoCapacitorWidgetKit",
10
- targets: ["CapgoWidgetKitPlugin"])
10
+ targets: ["CapgoWidgetKitPlugin"]
11
+ ),
12
+ .library(
13
+ name: "CapgoWidgetKitShared",
14
+ targets: ["CapgoWidgetKitShared"]
15
+ )
11
16
  ],
12
17
  dependencies: [
13
18
  .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
14
19
  ],
15
20
  targets: [
21
+ .target(
22
+ name: "CapgoWidgetKitShared",
23
+ dependencies: [],
24
+ path: "ios/Sources/CapgoWidgetKitPlugin",
25
+ exclude: ["CapgoWidgetKitPlugin.swift"]
26
+ ),
16
27
  .target(
17
28
  name: "CapgoWidgetKitPlugin",
18
29
  dependencies: [
30
+ "CapgoWidgetKitShared",
19
31
  .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
32
  .product(name: "Cordova", package: "capacitor-swift-pm")
21
33
  ],
22
- path: "ios/Sources/CapgoWidgetKitPlugin"),
34
+ path: "ios/Sources/CapgoWidgetKitPlugin",
35
+ sources: ["CapgoWidgetKitPlugin.swift"]
36
+ ),
23
37
  .testTarget(
24
38
  name: "CapgoWidgetKitPluginTests",
25
- dependencies: ["CapgoWidgetKitPlugin"],
26
- path: "ios/Tests/CapgoWidgetKitPluginTests")
39
+ dependencies: ["CapgoWidgetKitShared"],
40
+ path: "ios/Tests/CapgoWidgetKitPluginTests"
41
+ )
27
42
  ]
28
43
  )
package/README.md CHANGED
@@ -12,6 +12,23 @@ Create Home Screen WidgetKit, ActivityKit, and Android widget experiences from C
12
12
 
13
13
  <img src="./docs/demo.webp" alt="Demo of capacitor-widget-kit in action" width="300" />
14
14
 
15
+ ## Widget Screenshots
16
+
17
+ <table>
18
+ <tr>
19
+ <td align="center">
20
+ <img src="./docs/screenshots/lock-screen-live-activity.webp" alt="iOS Lock Screen Live Activity widget screenshot" width="260" />
21
+ <br />
22
+ <sub>iOS Lock Screen / Live Activity</sub>
23
+ </td>
24
+ <td align="center">
25
+ <img src="./docs/screenshots/dynamic-island-widget.webp" alt="iOS Dynamic Island widget screenshot" width="260" />
26
+ <br />
27
+ <sub>iOS Dynamic Island</sub>
28
+ </td>
29
+ </tr>
30
+ </table>
31
+
15
32
  The plugin has two implementation paths:
16
33
 
17
34
  - SVG template widgets: store Home Screen, Lock Screen, Dynamic Island, and Android layouts with optional named frames, hotspots, declarative state patches, pause/resume timers, and interaction events. Use this when your widget can be driven by resolved SVG output.
@@ -74,7 +91,7 @@ In your iOS widget extension bundle:
74
91
  import ActivityKit
75
92
  import SwiftUI
76
93
  import WidgetKit
77
- import CapgoWidgetKitPlugin
94
+ import CapgoWidgetKitShared
78
95
 
79
96
  @main
80
97
  struct ExampleWidgetBundle: WidgetBundle {
@@ -3,11 +3,11 @@ import Foundation
3
3
  import WidgetKit
4
4
  #endif
5
5
 
6
- enum CapgoWidgetKitBridgeError: LocalizedError {
6
+ public enum CapgoWidgetKitBridgeError: LocalizedError {
7
7
  case missingObject(String)
8
8
  case invalidObject(String)
9
9
 
10
- var errorDescription: String? {
10
+ public var errorDescription: String? {
11
11
  switch self {
12
12
  case .missingObject(let name):
13
13
  return "The `\(name)` object is required."
@@ -1,4 +1,5 @@
1
1
  import Capacitor
2
+ import CapgoWidgetKitShared
2
3
  import Foundation
3
4
 
4
5
  @objc(CapgoWidgetKitPlugin)
@@ -1,6 +1,6 @@
1
1
  // swiftlint:disable function_body_length
2
2
  import XCTest
3
- @testable import CapgoWidgetKitPlugin
3
+ @testable import CapgoWidgetKitShared
4
4
 
5
5
  final class CapgoWidgetKitPluginTests: XCTestCase {
6
6
  func testResolveSvgInterpolatesStateTimerAndMetaScope() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-widget-kit",
3
- "version": "8.1.9",
3
+ "version": "8.1.10",
4
4
  "private": false,
5
5
  "description": "Capacitor plugin for generic iOS Home Screen widgets, WidgetKit, and Live Activities using SVG templates, declarative actions, and shared App Group persistence.",
6
6
  "main": "dist/plugin.cjs.js",
@@ -54,8 +54,10 @@
54
54
  "watch": "tsc --watch",
55
55
  "prepublishOnly": "bun run build",
56
56
  "check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
57
+ "check:cap9-deprecated": "bun scripts/check-cap9-deprecated.mjs",
57
58
  "example:install": "cd example-app && bun install --frozen-lockfile",
58
- "example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build"
59
+ "example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
60
+ "changelog:ai": "node scripts/generate-ai-changelog.mjs"
59
61
  },
60
62
  "devDependencies": {
61
63
  "@capacitor/android": "^8.0.0",