@shortkitsdk/react-native 0.2.41 → 0.2.42

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.
Binary file
@@ -162,7 +162,10 @@ class ShortKitFeedView(context: Context) : FrameLayout(context) {
162
162
  val wSpec = MeasureSpec.makeMeasureSpec(w, MeasureSpec.EXACTLY)
163
163
  val hSpec = MeasureSpec.makeMeasureSpec(h, MeasureSpec.EXACTLY)
164
164
 
165
- // Re-pin container
165
+ // Re-pin container — update layoutParams so subsequent layout traversals
166
+ // (scroll events, player binding, etc.) don't re-expand back to the
167
+ // first-pass full-screen size that was recorded at embed time.
168
+ fragmentContainer.layoutParams = LayoutParams(w, h)
166
169
  fragmentContainer.measure(wSpec, hSpec)
167
170
  fragmentContainer.layout(0, 0, w, h)
168
171
 
@@ -184,6 +187,27 @@ class ShortKitFeedView(context: Context) : FrameLayout(context) {
184
187
  }
185
188
  }
186
189
 
190
+ /**
191
+ * Keep rnWidth/rnHeight current so constrainRunnable always re-pins to the
192
+ * correct dimensions if Fabric updates the view size (e.g. rotation) after
193
+ * the fragment has been embedded.
194
+ */
195
+ override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
196
+ super.onSizeChanged(w, h, oldw, oldh)
197
+ if (w > 0 && h > 0) {
198
+ rnWidth = w
199
+ rnHeight = h
200
+ if (feedFragment != null) {
201
+ // Fire immediately on size change so the correction lands within
202
+ // ~1ms rather than waiting 200ms. The embed fires with first-pass
203
+ // dimensions (before safe-area insets are applied) and this fires
204
+ // when the correct second-pass dimensions arrive — roughly 20ms
205
+ // later, which is 1-2 frames during the screen-push animation.
206
+ handler.removeCallbacks(constrainRunnable)
207
+ handler.post(constrainRunnable)
208
+ }
209
+ }
210
+ }
187
211
 
188
212
  // -----------------------------------------------------------------------
189
213
  // Lifecycle
@@ -11,9 +11,9 @@
11
11
  <key>CFBundlePackageType</key>
12
12
  <string>FMWK</string>
13
13
  <key>CFBundleVersion</key>
14
- <string>0.2.41</string>
14
+ <string>0.2.42</string>
15
15
  <key>CFBundleShortVersionString</key>
16
- <string>0.2.41</string>
16
+ <string>0.2.42</string>
17
17
  <key>MinimumOSVersion</key>
18
18
  <string>16.0</string>
19
19
  </dict>
@@ -53531,7 +53531,7 @@
53531
53531
  "kind": "StringLiteral",
53532
53532
  "offset": 154,
53533
53533
  "length": 8,
53534
- "value": "\"0.2.41\""
53534
+ "value": "\"0.2.42\""
53535
53535
  },
53536
53536
  {
53537
53537
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/ShortKit.swift",
@@ -10,11 +10,11 @@
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- V9J9eMGWzaliMW0uQsJyoH3jGBc=
13
+ WYwIj+FGMh7YF5ujxHC/klHgUnc=
14
14
  </data>
15
15
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json</key>
16
16
  <data>
17
- qcZLEr1R9JNuG9FMnjRA9ZgLOnY=
17
+ tozRG9zh+x9rx3eAHry35nYt4pM=
18
18
  </data>
19
19
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
20
20
  <data>
@@ -50,7 +50,7 @@
50
50
  <dict>
51
51
  <key>hash2</key>
52
52
  <data>
53
- CyjNRWcvyZshsrzm2gQaIOQz+vcv68Ydb91m3UtqKGY=
53
+ SzEj0TFMLukykfaw3Vh0cjVfyWUnkYbtJO3MrTBkLeQ=
54
54
  </data>
55
55
  </dict>
56
56
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
@@ -11,9 +11,9 @@
11
11
  <key>CFBundlePackageType</key>
12
12
  <string>FMWK</string>
13
13
  <key>CFBundleVersion</key>
14
- <string>0.2.41</string>
14
+ <string>0.2.42</string>
15
15
  <key>CFBundleShortVersionString</key>
16
- <string>0.2.41</string>
16
+ <string>0.2.42</string>
17
17
  <key>MinimumOSVersion</key>
18
18
  <string>16.0</string>
19
19
  </dict>
@@ -53531,7 +53531,7 @@
53531
53531
  "kind": "StringLiteral",
53532
53532
  "offset": 154,
53533
53533
  "length": 8,
53534
- "value": "\"0.2.41\""
53534
+ "value": "\"0.2.42\""
53535
53535
  },
53536
53536
  {
53537
53537
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/ShortKit.swift",
@@ -53531,7 +53531,7 @@
53531
53531
  "kind": "StringLiteral",
53532
53532
  "offset": 154,
53533
53533
  "length": 8,
53534
- "value": "\"0.2.41\""
53534
+ "value": "\"0.2.42\""
53535
53535
  },
53536
53536
  {
53537
53537
  "filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/ShortKit.swift",
@@ -10,11 +10,11 @@
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- V9J9eMGWzaliMW0uQsJyoH3jGBc=
13
+ WYwIj+FGMh7YF5ujxHC/klHgUnc=
14
14
  </data>
15
15
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
16
16
  <data>
17
- qcZLEr1R9JNuG9FMnjRA9ZgLOnY=
17
+ tozRG9zh+x9rx3eAHry35nYt4pM=
18
18
  </data>
19
19
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
20
20
  <data>
@@ -30,7 +30,7 @@
30
30
  </data>
31
31
  <key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
32
32
  <data>
33
- qcZLEr1R9JNuG9FMnjRA9ZgLOnY=
33
+ tozRG9zh+x9rx3eAHry35nYt4pM=
34
34
  </data>
35
35
  <key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
36
36
  <data>
@@ -66,7 +66,7 @@
66
66
  <dict>
67
67
  <key>hash2</key>
68
68
  <data>
69
- CyjNRWcvyZshsrzm2gQaIOQz+vcv68Ydb91m3UtqKGY=
69
+ SzEj0TFMLukykfaw3Vh0cjVfyWUnkYbtJO3MrTBkLeQ=
70
70
  </data>
71
71
  </dict>
72
72
  <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
@@ -94,7 +94,7 @@
94
94
  <dict>
95
95
  <key>hash2</key>
96
96
  <data>
97
- CyjNRWcvyZshsrzm2gQaIOQz+vcv68Ydb91m3UtqKGY=
97
+ SzEj0TFMLukykfaw3Vh0cjVfyWUnkYbtJO3MrTBkLeQ=
98
98
  </data>
99
99
  </dict>
100
100
  <key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shortkitsdk/react-native",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "ShortKit React Native SDK — short-form video feed",
5
5
  "react-native": "src/index",
6
6
  "source": "src/index",