@shortkitsdk/react-native 0.2.27 → 0.2.28

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.
Files changed (36) hide show
  1. package/android/libs/shortkit-release.aar +0 -0
  2. package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +8 -0
  3. package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +10 -0
  4. package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +4 -0
  5. package/android/src/main/java/com/shortkit/reactnative/ShortKitWidgetNativeView.kt +45 -33
  6. package/ios/ShortKitBridge.swift +8 -0
  7. package/ios/ShortKitModule.mm +11 -0
  8. package/ios/ShortKitPlayerNativeView.swift +7 -1
  9. package/ios/ShortKitSDK.xcframework/Info.plist +5 -5
  10. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +2 -2
  11. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +200 -17
  12. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +6 -2
  13. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  14. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +6 -2
  15. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  16. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +9 -9
  17. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Info.plist +2 -2
  18. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +200 -17
  19. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +6 -2
  20. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  21. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -2
  22. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +200 -17
  23. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +6 -2
  24. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  25. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +6 -2
  26. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  27. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +17 -17
  28. package/ios/ShortKitWidgetNativeView.swift +33 -12
  29. package/package.json +1 -1
  30. package/src/ShortKitFeed.tsx +3 -0
  31. package/src/ShortKitPlayer.tsx +25 -15
  32. package/src/ShortKitWidget.tsx +24 -18
  33. package/src/index.ts +1 -0
  34. package/src/serialization.ts +38 -0
  35. package/src/specs/NativeShortKitModule.ts +1 -0
  36. package/src/types.ts +19 -1
Binary file
@@ -835,6 +835,14 @@ class ShortKitBridge(
835
835
  }
836
836
  }
837
837
 
838
+ fun refresh(feedId: String) {
839
+ val fragment = feedRegistry[feedId]?.get()
840
+ if (fragment != null) {
841
+ Handler(Looper.getMainLooper()).post { fragment.refresh() }
842
+ }
843
+ // No pending ops — refresh on unregistered feed is a no-op
844
+ }
845
+
838
846
  // ------------------------------------------------------------------
839
847
  // Fetch content
840
848
  // ------------------------------------------------------------------
@@ -230,6 +230,16 @@ class ShortKitModule(reactContext: ReactApplicationContext) :
230
230
  }
231
231
  }
232
232
 
233
+ @ReactMethod
234
+ override fun refresh(feedId: String) {
235
+ val b = bridge
236
+ if (b != null) {
237
+ b.refresh(feedId)
238
+ } else {
239
+ // No buffering — refresh before bridge is ready is a no-op
240
+ }
241
+ }
242
+
233
243
  @ReactMethod
234
244
  override fun preloadFeed(configJSON: String, itemsJSON: String?, promise: Promise) {
235
245
  val b = bridge
@@ -4,6 +4,7 @@ import android.content.Context
4
4
  import android.view.MotionEvent
5
5
  import android.widget.FrameLayout
6
6
  import com.shortkit.sdk.config.PlayerClickAction
7
+ import com.shortkit.sdk.config.FeedConfig
7
8
  import com.shortkit.sdk.config.PlayerConfig
8
9
  import com.shortkit.sdk.config.VideoOverlayMode
9
10
  import com.shortkit.sdk.model.ContentItem
@@ -106,6 +107,9 @@ class ShortKitPlayerNativeView(context: Context) : FrameLayout(context) {
106
107
  loop = obj.optBoolean("loop", true),
107
108
  muteOnStart = obj.optBoolean("muteOnStart", true),
108
109
  videoOverlay = parseOverlay(obj),
110
+ feedConfig = obj.optString("feedConfig", "").let { fcStr ->
111
+ if (fcStr.isNotEmpty()) ShortKitBridge.parseFeedConfig(fcStr, context) else FeedConfig()
112
+ },
109
113
  )
110
114
  } catch (_: Exception) {
111
115
  PlayerConfig()
@@ -5,28 +5,40 @@ import android.widget.FrameLayout
5
5
  import com.shortkit.sdk.config.PlayerClickAction
6
6
  import com.shortkit.sdk.config.VideoOverlayMode
7
7
  import com.shortkit.sdk.config.WidgetConfig
8
- import com.shortkit.sdk.model.ContentItem
9
8
  import com.shortkit.sdk.widget.ShortKitWidgetView
9
+ import com.shortkit.sdk.config.FeedConfig
10
10
  import com.shortkit.sdk.model.FeedFilter
11
+ import com.shortkit.sdk.model.WidgetInput
11
12
  import org.json.JSONArray
12
13
  import org.json.JSONObject
13
14
 
14
15
  /**
15
16
  * Fabric native view wrapping [ShortKitWidgetView] for use as a
16
17
  * horizontal video carousel in React Native.
18
+ *
19
+ * Props:
20
+ * - `config`: JSON string with WidgetConfig values
21
+ * - `items`: JSON string with WidgetInput array (compact playback-ID form)
17
22
  */
18
23
  class ShortKitWidgetNativeView(context: Context) : FrameLayout(context) {
19
24
 
20
25
  private var widgetView: ShortKitWidgetView? = null
21
26
  private var configJson: String? = null
22
27
  private var itemsJson: String? = null
28
+ private var parsedConfig: WidgetConfig = WidgetConfig()
29
+ private var parsedItems: List<WidgetInput> = emptyList()
23
30
 
24
31
  var config: String?
25
32
  get() = configJson
26
33
  set(value) {
27
34
  if (value == configJson) return
28
35
  configJson = value
29
- rebuildIfNeeded()
36
+ parsedConfig = parseWidgetConfig(value)
37
+ // If widget is already built, rebuild to pick up new config.
38
+ if (widgetView != null) {
39
+ removeWidget()
40
+ embedWidgetIfNeeded()
41
+ }
30
42
  }
31
43
 
32
44
  var items: String?
@@ -34,39 +46,38 @@ class ShortKitWidgetNativeView(context: Context) : FrameLayout(context) {
34
46
  set(value) {
35
47
  if (value == itemsJson) return
36
48
  itemsJson = value
37
- applyItems()
49
+ parsedItems = parseWidgetInputs(value) ?: emptyList()
50
+ // Post-mount update on an existing widget.
51
+ widgetView?.configure(parsedItems)
38
52
  }
39
53
 
40
54
  override fun onAttachedToWindow() {
41
55
  super.onAttachedToWindow()
42
- rebuildIfNeeded()
56
+ embedWidgetIfNeeded()
43
57
  }
44
58
 
45
59
  override fun onDetachedFromWindow() {
46
60
  super.onDetachedFromWindow()
61
+ removeWidget()
47
62
  }
48
63
 
49
- private fun rebuildIfNeeded() {
64
+ private fun embedWidgetIfNeeded() {
50
65
  if (widgetView != null) return
51
-
52
66
  val sdk = ShortKitBridge.shared?.sdk ?: return
53
- val widgetConfig = parseWidgetConfig(configJson)
54
67
 
68
+ // Pass items at initialize time so the widget never races the server
69
+ // fetch — analogous to the feed's `feedItems` prop wiring.
55
70
  val view = ShortKitWidgetView(context).apply {
56
71
  layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
57
72
  }
58
- view.initialize(sdk, widgetConfig)
73
+ view.initialize(sdk, parsedConfig, parsedItems)
59
74
  addView(view)
60
75
  widgetView = view
61
-
62
- applyItems()
63
76
  }
64
77
 
65
- private fun applyItems() {
66
- val json = itemsJson ?: return
67
- val view = widgetView ?: return
68
- val contentItems = parseContentItems(json) ?: return
69
- view.configure(contentItems)
78
+ private fun removeWidget() {
79
+ widgetView?.let { removeView(it) }
80
+ widgetView = null
70
81
  }
71
82
 
72
83
  private fun parseWidgetConfig(json: String?): WidgetConfig {
@@ -91,6 +102,9 @@ class ShortKitWidgetNativeView(context: Context) : FrameLayout(context) {
91
102
  filter = obj.optString("filter", "").let { filterStr ->
92
103
  if (filterStr.isNotEmpty()) ShortKitBridge.parseFeedFilterToModel(filterStr) else null
93
104
  },
105
+ feedConfig = obj.optString("feedConfig", "").let { fcStr ->
106
+ if (fcStr.isNotEmpty()) ShortKitBridge.parseFeedConfig(fcStr, context) else FeedConfig()
107
+ },
94
108
  )
95
109
  } catch (_: Exception) {
96
110
  WidgetConfig()
@@ -107,29 +121,27 @@ class ShortKitWidgetNativeView(context: Context) : FrameLayout(context) {
107
121
  return VideoOverlayMode.None
108
122
  }
109
123
 
110
- private fun parseContentItems(json: String): List<ContentItem>? {
124
+ /**
125
+ * Parse a JSON array of `WidgetInput` values (compact playback-ID form).
126
+ * Mirrors the JS `WidgetInput` type:
127
+ * `{ type: 'video'; playbackId: string; fallbackUrl?: string }`.
128
+ */
129
+ private fun parseWidgetInputs(json: String?): List<WidgetInput>? {
130
+ if (json.isNullOrEmpty()) return null
111
131
  return try {
112
132
  val arr = JSONArray(json)
113
- val items = mutableListOf<ContentItem>()
133
+ val out = mutableListOf<WidgetInput>()
114
134
  for (i in 0 until arr.length()) {
115
135
  val obj = arr.getJSONObject(i)
116
- items.add(
117
- ContentItem(
118
- id = obj.getString("id"),
119
- title = obj.getString("title"),
120
- description = obj.optString("description", null),
121
- duration = obj.getDouble("duration"),
122
- streamingUrl = obj.getString("streamingUrl"),
123
- thumbnailUrl = obj.getString("thumbnailUrl"),
124
- captionTracks = emptyList(),
125
- customMetadata = null,
126
- author = obj.optString("author", null),
127
- articleUrl = obj.optString("articleUrl", null),
128
- commentCount = if (obj.has("commentCount")) obj.getInt("commentCount") else null,
129
- )
130
- )
136
+ if (obj.optString("type") != "video") continue
137
+ val playbackId = obj.optString("playbackId", "")
138
+ if (playbackId.isEmpty()) continue
139
+ val fallbackUrl = if (obj.has("fallbackUrl") && !obj.isNull("fallbackUrl")) {
140
+ obj.getString("fallbackUrl")
141
+ } else null
142
+ out.add(WidgetInput.Video(playbackId = playbackId, fallbackUrl = fallbackUrl))
131
143
  }
132
- items
144
+ out
133
145
  } catch (_: Exception) {
134
146
  null
135
147
  }
@@ -404,6 +404,14 @@ import ShortKitSDK
404
404
  }
405
405
  }
406
406
 
407
+ @objc public func refresh(_ feedId: String) {
408
+ DispatchQueue.main.async { [weak self] in
409
+ guard let self else { return }
410
+ self.feedViewController(for: feedId)?.refresh()
411
+ // No pending ops buffer — refresh on a not-yet-registered feed is a no-op
412
+ }
413
+ }
414
+
407
415
  @objc public func fetchContent(_ limit: Int, filterJSON: String?, completion: @escaping (String) -> Void) {
408
416
  let filter = filterJSON.flatMap { Self.parseFeedFilter($0) }
409
417
  Task {
@@ -308,6 +308,17 @@ RCT_EXPORT_METHOD(applyFilter:(NSString *)feedId filterJSON:(NSString *)filterJS
308
308
  }
309
309
  }
310
310
 
311
+ RCT_EXPORT_METHOD(refresh:(NSString *)feedId) {
312
+ if (_shortKitBridge) {
313
+ [_shortKitBridge refresh:feedId];
314
+ } else {
315
+ if (!_pendingBridgeOps) _pendingBridgeOps = [NSMutableArray new];
316
+ [_pendingBridgeOps addObject:^{
317
+ [self->_shortKitBridge refresh:feedId];
318
+ }];
319
+ }
320
+ }
321
+
311
322
  RCT_EXPORT_METHOD(preloadFeed:(NSString *)configJSON
312
323
  itemsJSON:(NSString *)itemsJSON
313
324
  resolve:(RCTPromiseResolveBlock)resolve
@@ -187,13 +187,19 @@ import ShortKitSDK
187
187
  overlayMode = .none
188
188
  }
189
189
 
190
+ let feedConfig: FeedConfig = {
191
+ guard let feedConfigStr = obj["feedConfig"] as? String else { return FeedConfig() }
192
+ return ShortKitBridge.parseFeedConfig(feedConfigStr)
193
+ }()
194
+
190
195
  return PlayerConfig(
191
196
  cornerRadius: cornerRadius,
192
197
  clickAction: clickAction,
193
198
  autoplay: autoplay,
194
199
  loop: loop,
195
200
  muteOnStart: muteOnStart,
196
- videoOverlay: overlayMode
201
+ videoOverlay: overlayMode,
202
+ feedConfig: feedConfig
197
203
  )
198
204
  }
199
205
 
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>ShortKitSDK.framework/ShortKitSDK</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>ShortKitSDK.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
+ <string>x86_64</string>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>ShortKitSDK.framework/ShortKitSDK</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>ShortKitSDK.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -11,9 +11,9 @@
11
11
  <key>CFBundlePackageType</key>
12
12
  <string>FMWK</string>
13
13
  <key>CFBundleVersion</key>
14
- <string>0.2.27</string>
14
+ <string>0.2.28</string>
15
15
  <key>CFBundleShortVersionString</key>
16
- <string>0.2.27</string>
16
+ <string>0.2.28</string>
17
17
  <key>MinimumOSVersion</key>
18
18
  <string>16.0</string>
19
19
  </dict>
@@ -17413,6 +17413,28 @@
17413
17413
  }
17414
17414
  ]
17415
17415
  },
17416
+ {
17417
+ "kind": "Function",
17418
+ "name": "refresh",
17419
+ "printedName": "refresh()",
17420
+ "children": [
17421
+ {
17422
+ "kind": "TypeNominal",
17423
+ "name": "Void",
17424
+ "printedName": "()"
17425
+ }
17426
+ ],
17427
+ "declKind": "Func",
17428
+ "usr": "s:11ShortKitSDK0aB18FeedViewControllerC7refreshyyF",
17429
+ "mangledName": "$s11ShortKitSDK0aB18FeedViewControllerC7refreshyyF",
17430
+ "moduleName": "ShortKitSDK",
17431
+ "declAttributes": [
17432
+ "AccessControl",
17433
+ "Custom",
17434
+ "RawDocComment"
17435
+ ],
17436
+ "funcSelfKind": "NonMutating"
17437
+ },
17416
17438
  {
17417
17439
  "kind": "Var",
17418
17440
  "name": "canBecomeFirstResponder",
@@ -41739,7 +41761,7 @@
41739
41761
  {
41740
41762
  "kind": "Constructor",
41741
41763
  "name": "init",
41742
- "printedName": "init(shortKit:config:)",
41764
+ "printedName": "init(shortKit:config:items:)",
41743
41765
  "children": [
41744
41766
  {
41745
41767
  "kind": "TypeNominal",
@@ -41758,11 +41780,26 @@
41758
41780
  "name": "WidgetConfig",
41759
41781
  "printedName": "ShortKitSDK.WidgetConfig",
41760
41782
  "usr": "s:11ShortKitSDK12WidgetConfigV"
41783
+ },
41784
+ {
41785
+ "kind": "TypeNominal",
41786
+ "name": "Array",
41787
+ "printedName": "[ShortKitSDK.WidgetInput]",
41788
+ "children": [
41789
+ {
41790
+ "kind": "TypeNominal",
41791
+ "name": "WidgetInput",
41792
+ "printedName": "ShortKitSDK.WidgetInput",
41793
+ "usr": "s:11ShortKitSDK11WidgetInputO"
41794
+ }
41795
+ ],
41796
+ "hasDefaultArg": true,
41797
+ "usr": "s:Sa"
41761
41798
  }
41762
41799
  ],
41763
41800
  "declKind": "Constructor",
41764
- "usr": "s:11ShortKitSDK0aB20WidgetViewControllerC05shortB06configAcA0aB0C_AA0D6ConfigVtcfc",
41765
- "mangledName": "$s11ShortKitSDK0aB20WidgetViewControllerC05shortB06configAcA0aB0C_AA0D6ConfigVtcfc",
41801
+ "usr": "s:11ShortKitSDK0aB20WidgetViewControllerC05shortB06config5itemsAcA0aB0C_AA0D6ConfigVSayAA0D5InputOGtcfc",
41802
+ "mangledName": "$s11ShortKitSDK0aB20WidgetViewControllerC05shortB06config5itemsAcA0aB0C_AA0D6ConfigVSayAA0D5InputOGtcfc",
41766
41803
  "moduleName": "ShortKitSDK",
41767
41804
  "declAttributes": [
41768
41805
  "Preconcurrency",
@@ -41785,21 +41822,21 @@
41785
41822
  {
41786
41823
  "kind": "TypeNominal",
41787
41824
  "name": "Array",
41788
- "printedName": "[ShortKitSDK.ContentItem]",
41825
+ "printedName": "[ShortKitSDK.WidgetInput]",
41789
41826
  "children": [
41790
41827
  {
41791
41828
  "kind": "TypeNominal",
41792
- "name": "ContentItem",
41793
- "printedName": "ShortKitSDK.ContentItem",
41794
- "usr": "s:11ShortKitSDK11ContentItemV"
41829
+ "name": "WidgetInput",
41830
+ "printedName": "ShortKitSDK.WidgetInput",
41831
+ "usr": "s:11ShortKitSDK11WidgetInputO"
41795
41832
  }
41796
41833
  ],
41797
41834
  "usr": "s:Sa"
41798
41835
  }
41799
41836
  ],
41800
41837
  "declKind": "Func",
41801
- "usr": "s:11ShortKitSDK0aB20WidgetViewControllerC9configure4withySayAA11ContentItemVG_tF",
41802
- "mangledName": "$s11ShortKitSDK0aB20WidgetViewControllerC9configure4withySayAA11ContentItemVG_tF",
41838
+ "usr": "s:11ShortKitSDK0aB20WidgetViewControllerC9configure4withySayAA0D5InputOG_tF",
41839
+ "mangledName": "$s11ShortKitSDK0aB20WidgetViewControllerC9configure4withySayAA0D5InputOG_tF",
41803
41840
  "moduleName": "ShortKitSDK",
41804
41841
  "declAttributes": [
41805
41842
  "Preconcurrency",
@@ -43452,6 +43489,138 @@
43452
43489
  "mangledName": "$ss9EscapableP"
43453
43490
  }
43454
43491
  ]
43492
+ },
43493
+ {
43494
+ "kind": "Import",
43495
+ "name": "Foundation",
43496
+ "printedName": "Foundation",
43497
+ "declKind": "Import",
43498
+ "moduleName": "ShortKitSDK"
43499
+ },
43500
+ {
43501
+ "kind": "TypeDecl",
43502
+ "name": "WidgetInput",
43503
+ "printedName": "WidgetInput",
43504
+ "children": [
43505
+ {
43506
+ "kind": "Var",
43507
+ "name": "video",
43508
+ "printedName": "video",
43509
+ "children": [
43510
+ {
43511
+ "kind": "TypeFunc",
43512
+ "name": "Function",
43513
+ "printedName": "(ShortKitSDK.WidgetInput.Type) -> (Swift.String, ShortKitSDK.ContentOrigin, Swift.String?) -> ShortKitSDK.WidgetInput",
43514
+ "children": [
43515
+ {
43516
+ "kind": "TypeFunc",
43517
+ "name": "Function",
43518
+ "printedName": "(Swift.String, ShortKitSDK.ContentOrigin, Swift.String?) -> ShortKitSDK.WidgetInput",
43519
+ "children": [
43520
+ {
43521
+ "kind": "TypeNominal",
43522
+ "name": "WidgetInput",
43523
+ "printedName": "ShortKitSDK.WidgetInput",
43524
+ "usr": "s:11ShortKitSDK11WidgetInputO"
43525
+ },
43526
+ {
43527
+ "kind": "TypeNominal",
43528
+ "name": "Tuple",
43529
+ "printedName": "(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin, fallbackUrl: Swift.String?)",
43530
+ "children": [
43531
+ {
43532
+ "kind": "TypeNominal",
43533
+ "name": "String",
43534
+ "printedName": "Swift.String",
43535
+ "usr": "s:SS"
43536
+ },
43537
+ {
43538
+ "kind": "TypeNominal",
43539
+ "name": "ContentOrigin",
43540
+ "printedName": "ShortKitSDK.ContentOrigin",
43541
+ "usr": "s:11ShortKitSDK13ContentOriginO"
43542
+ },
43543
+ {
43544
+ "kind": "TypeNominal",
43545
+ "name": "Optional",
43546
+ "printedName": "Swift.String?",
43547
+ "children": [
43548
+ {
43549
+ "kind": "TypeNominal",
43550
+ "name": "String",
43551
+ "printedName": "Swift.String",
43552
+ "usr": "s:SS"
43553
+ }
43554
+ ],
43555
+ "usr": "s:Sq"
43556
+ }
43557
+ ]
43558
+ }
43559
+ ]
43560
+ },
43561
+ {
43562
+ "kind": "TypeNominal",
43563
+ "name": "Metatype",
43564
+ "printedName": "ShortKitSDK.WidgetInput.Type",
43565
+ "children": [
43566
+ {
43567
+ "kind": "TypeNominal",
43568
+ "name": "WidgetInput",
43569
+ "printedName": "ShortKitSDK.WidgetInput",
43570
+ "usr": "s:11ShortKitSDK11WidgetInputO"
43571
+ }
43572
+ ]
43573
+ }
43574
+ ]
43575
+ }
43576
+ ],
43577
+ "declKind": "EnumElement",
43578
+ "usr": "s:11ShortKitSDK11WidgetInputO5videoyACSS_AA13ContentOriginOSSSgtcACmF",
43579
+ "mangledName": "$s11ShortKitSDK11WidgetInputO5videoyACSS_AA13ContentOriginOSSSgtcACmF",
43580
+ "moduleName": "ShortKitSDK",
43581
+ "declAttributes": [
43582
+ "RawDocComment"
43583
+ ]
43584
+ }
43585
+ ],
43586
+ "declKind": "Enum",
43587
+ "usr": "s:11ShortKitSDK11WidgetInputO",
43588
+ "mangledName": "$s11ShortKitSDK11WidgetInputO",
43589
+ "moduleName": "ShortKitSDK",
43590
+ "declAttributes": [
43591
+ "AccessControl",
43592
+ "RawDocComment"
43593
+ ],
43594
+ "conformances": [
43595
+ {
43596
+ "kind": "Conformance",
43597
+ "name": "Copyable",
43598
+ "printedName": "Copyable",
43599
+ "usr": "s:s8CopyableP",
43600
+ "mangledName": "$ss8CopyableP"
43601
+ },
43602
+ {
43603
+ "kind": "Conformance",
43604
+ "name": "Escapable",
43605
+ "printedName": "Escapable",
43606
+ "usr": "s:s9EscapableP",
43607
+ "mangledName": "$ss9EscapableP"
43608
+ },
43609
+ {
43610
+ "kind": "Conformance",
43611
+ "name": "Sendable",
43612
+ "printedName": "Sendable",
43613
+ "usr": "s:s8SendableP",
43614
+ "mangledName": "$ss8SendableP"
43615
+ },
43616
+ {
43617
+ "kind": "Conformance",
43618
+ "name": "SendableMetatype",
43619
+ "printedName": "SendableMetatype",
43620
+ "usr": "s:s16SendableMetatypeP",
43621
+ "mangledName": "$ss16SendableMetatypeP"
43622
+ }
43623
+ ]
43455
43624
  }
43456
43625
  ],
43457
43626
  "json_format_version": 8
@@ -44297,31 +44466,38 @@
44297
44466
  "length": 3,
44298
44467
  "value": "0.2"
44299
44468
  },
44469
+ {
44470
+ "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
44471
+ "kind": "BooleanLiteral",
44472
+ "offset": 10812,
44473
+ "length": 5,
44474
+ "value": "false"
44475
+ },
44300
44476
  {
44301
44477
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
44302
44478
  "kind": "IntegerLiteral",
44303
- "offset": 10814,
44479
+ "offset": 10862,
44304
44480
  "length": 2,
44305
44481
  "value": "24"
44306
44482
  },
44307
44483
  {
44308
44484
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
44309
44485
  "kind": "BooleanLiteral",
44310
- "offset": 25761,
44486
+ "offset": 25904,
44311
44487
  "length": 5,
44312
44488
  "value": "false"
44313
44489
  },
44314
44490
  {
44315
44491
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
44316
44492
  "kind": "BooleanLiteral",
44317
- "offset": 86573,
44493
+ "offset": 88164,
44318
44494
  "length": 5,
44319
44495
  "value": "false"
44320
44496
  },
44321
44497
  {
44322
44498
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
44323
44499
  "kind": "BooleanLiteral",
44324
- "offset": 197685,
44500
+ "offset": 199276,
44325
44501
  "length": 5,
44326
44502
  "value": "false"
44327
44503
  },
@@ -45121,7 +45297,7 @@
45121
45297
  "kind": "StringLiteral",
45122
45298
  "offset": 124,
45123
45299
  "length": 8,
45124
- "value": "\"0.2.27\""
45300
+ "value": "\"0.2.28\""
45125
45301
  },
45126
45302
  {
45127
45303
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/ShortKit.swift",
@@ -45494,24 +45670,31 @@
45494
45670
  "length": 1,
45495
45671
  "value": "0"
45496
45672
  },
45673
+ {
45674
+ "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
45675
+ "kind": "Array",
45676
+ "offset": 1666,
45677
+ "length": 2,
45678
+ "value": "[]"
45679
+ },
45497
45680
  {
45498
45681
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
45499
45682
  "kind": "BooleanLiteral",
45500
- "offset": 2098,
45683
+ "offset": 3175,
45501
45684
  "length": 5,
45502
45685
  "value": "false"
45503
45686
  },
45504
45687
  {
45505
45688
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
45506
45689
  "kind": "BooleanLiteral",
45507
- "offset": 2184,
45690
+ "offset": 3261,
45508
45691
  "length": 5,
45509
45692
  "value": "false"
45510
45693
  },
45511
45694
  {
45512
45695
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
45513
45696
  "kind": "StringLiteral",
45514
- "offset": 15136,
45697
+ "offset": 16213,
45515
45698
  "length": 16,
45516
45699
  "value": "\"WidgetCardCell\""
45517
45700
  },
@@ -472,6 +472,7 @@ public enum ShortKitDownloadError : Swift.Error {
472
472
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
473
473
  @objc get
474
474
  }
475
+ @_Concurrency.MainActor public func refresh()
475
476
  @objc deinit
476
477
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public var canBecomeFirstResponder: Swift.Bool {
477
478
  @objc get
@@ -1141,8 +1142,8 @@ extension ShortKitSDK.ShortKitPlayerViewController : UIKit.UIViewControllerTrans
1141
1142
  }
1142
1143
  @objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class ShortKitWidgetViewController : UIKit.UIViewController {
1143
1144
  @_Concurrency.MainActor @preconcurrency final public var feedMask: ShortKitSDK.FeedMaskMode
1144
- @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.WidgetConfig)
1145
- @_Concurrency.MainActor @preconcurrency final public func configure(with items: [ShortKitSDK.ContentItem])
1145
+ @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.WidgetConfig, items: [ShortKitSDK.WidgetInput] = [])
1146
+ @_Concurrency.MainActor @preconcurrency final public func configure(with inputs: [ShortKitSDK.WidgetInput])
1146
1147
  @_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLoad()
1147
1148
  @_Concurrency.MainActor @preconcurrency @objc override final public func viewDidAppear(_ animated: Swift.Bool)
1148
1149
  @_Concurrency.MainActor @preconcurrency @objc override final public func viewWillDisappear(_ animated: Swift.Bool)
@@ -1175,6 +1176,9 @@ public struct WidgetConfig {
1175
1176
  public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig(), filter: ShortKitSDK.FeedFilter? = nil)
1176
1177
  public func resolvedFeedConfig() -> ShortKitSDK.FeedConfig
1177
1178
  }
1179
+ public enum WidgetInput : Swift.Sendable {
1180
+ case video(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin = .other, fallbackUrl: Swift.String? = nil)
1181
+ }
1178
1182
  extension ShortKitSDK.AdQuartile : Swift.Equatable {}
1179
1183
  extension ShortKitSDK.AdQuartile : Swift.Hashable {}
1180
1184
  extension ShortKitSDK.ScrollAxis : Swift.Hashable {}