@shortkitsdk/react-native 0.2.26 → 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.
- package/android/libs/shortkit-release.aar +0 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +8 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +10 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +4 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitWidgetNativeView.kt +45 -33
- package/ios/ShortKitBridge.swift +8 -0
- package/ios/ShortKitFeedView.swift +10 -4
- package/ios/ShortKitModule.mm +11 -0
- package/ios/ShortKitPlayerNativeView.swift +7 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +2 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +213 -23
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +9 -9
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Info.plist +2 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +213 -23
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +213 -23
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +6 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +17 -17
- package/ios/ShortKitWidgetNativeView.swift +33 -12
- package/package.json +1 -1
- package/src/ShortKitFeed.tsx +3 -0
- package/src/ShortKitPlayer.tsx +25 -15
- package/src/ShortKitWidget.tsx +24 -18
- package/src/index.ts +1 -0
- package/src/serialization.ts +38 -0
- package/src/specs/NativeShortKitModule.ts +1 -0
- package/src/types.ts +19 -1
|
@@ -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:
|
|
41765
|
-
"mangledName": "$
|
|
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.
|
|
41825
|
+
"printedName": "[ShortKitSDK.WidgetInput]",
|
|
41789
41826
|
"children": [
|
|
41790
41827
|
{
|
|
41791
41828
|
"kind": "TypeNominal",
|
|
41792
|
-
"name": "
|
|
41793
|
-
"printedName": "ShortKitSDK.
|
|
41794
|
-
"usr": "s:
|
|
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:
|
|
41802
|
-
"mangledName": "$
|
|
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
|
|
@@ -44090,7 +44259,7 @@
|
|
|
44090
44259
|
{
|
|
44091
44260
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedCell.swift",
|
|
44092
44261
|
"kind": "StringLiteral",
|
|
44093
|
-
"offset":
|
|
44262
|
+
"offset": 10653,
|
|
44094
44263
|
"length": 3,
|
|
44095
44264
|
"value": "\"?\""
|
|
44096
44265
|
},
|
|
@@ -44255,66 +44424,80 @@
|
|
|
44255
44424
|
"length": 1,
|
|
44256
44425
|
"value": "0"
|
|
44257
44426
|
},
|
|
44427
|
+
{
|
|
44428
|
+
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44429
|
+
"kind": "BooleanLiteral",
|
|
44430
|
+
"offset": 8785,
|
|
44431
|
+
"length": 5,
|
|
44432
|
+
"value": "false"
|
|
44433
|
+
},
|
|
44258
44434
|
{
|
|
44259
44435
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44260
44436
|
"kind": "IntegerLiteral",
|
|
44261
|
-
"offset":
|
|
44437
|
+
"offset": 8967,
|
|
44262
44438
|
"length": 2,
|
|
44263
44439
|
"value": "-1"
|
|
44264
44440
|
},
|
|
44265
44441
|
{
|
|
44266
44442
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44267
44443
|
"kind": "IntegerLiteral",
|
|
44268
|
-
"offset":
|
|
44444
|
+
"offset": 9215,
|
|
44269
44445
|
"length": 1,
|
|
44270
44446
|
"value": "0"
|
|
44271
44447
|
},
|
|
44272
44448
|
{
|
|
44273
44449
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44274
44450
|
"kind": "IntegerLiteral",
|
|
44275
|
-
"offset":
|
|
44451
|
+
"offset": 9265,
|
|
44276
44452
|
"length": 1,
|
|
44277
44453
|
"value": "0"
|
|
44278
44454
|
},
|
|
44279
44455
|
{
|
|
44280
44456
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44281
44457
|
"kind": "IntegerLiteral",
|
|
44282
|
-
"offset":
|
|
44458
|
+
"offset": 9319,
|
|
44283
44459
|
"length": 1,
|
|
44284
44460
|
"value": "0"
|
|
44285
44461
|
},
|
|
44286
44462
|
{
|
|
44287
44463
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44288
44464
|
"kind": "FloatLiteral",
|
|
44289
|
-
"offset":
|
|
44465
|
+
"offset": 9379,
|
|
44290
44466
|
"length": 3,
|
|
44291
44467
|
"value": "0.2"
|
|
44292
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
|
+
},
|
|
44293
44476
|
{
|
|
44294
44477
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44295
44478
|
"kind": "IntegerLiteral",
|
|
44296
|
-
"offset":
|
|
44479
|
+
"offset": 10862,
|
|
44297
44480
|
"length": 2,
|
|
44298
44481
|
"value": "24"
|
|
44299
44482
|
},
|
|
44300
44483
|
{
|
|
44301
44484
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44302
44485
|
"kind": "BooleanLiteral",
|
|
44303
|
-
"offset":
|
|
44486
|
+
"offset": 25904,
|
|
44304
44487
|
"length": 5,
|
|
44305
44488
|
"value": "false"
|
|
44306
44489
|
},
|
|
44307
44490
|
{
|
|
44308
44491
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44309
44492
|
"kind": "BooleanLiteral",
|
|
44310
|
-
"offset":
|
|
44493
|
+
"offset": 88164,
|
|
44311
44494
|
"length": 5,
|
|
44312
44495
|
"value": "false"
|
|
44313
44496
|
},
|
|
44314
44497
|
{
|
|
44315
44498
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Feed\/FeedViewController.swift",
|
|
44316
44499
|
"kind": "BooleanLiteral",
|
|
44317
|
-
"offset":
|
|
44500
|
+
"offset": 199276,
|
|
44318
44501
|
"length": 5,
|
|
44319
44502
|
"value": "false"
|
|
44320
44503
|
},
|
|
@@ -45114,7 +45297,7 @@
|
|
|
45114
45297
|
"kind": "StringLiteral",
|
|
45115
45298
|
"offset": 124,
|
|
45116
45299
|
"length": 8,
|
|
45117
|
-
"value": "\"0.2.
|
|
45300
|
+
"value": "\"0.2.28\""
|
|
45118
45301
|
},
|
|
45119
45302
|
{
|
|
45120
45303
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/ShortKit.swift",
|
|
@@ -45487,24 +45670,31 @@
|
|
|
45487
45670
|
"length": 1,
|
|
45488
45671
|
"value": "0"
|
|
45489
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
|
+
},
|
|
45490
45680
|
{
|
|
45491
45681
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
|
|
45492
45682
|
"kind": "BooleanLiteral",
|
|
45493
|
-
"offset":
|
|
45683
|
+
"offset": 3175,
|
|
45494
45684
|
"length": 5,
|
|
45495
45685
|
"value": "false"
|
|
45496
45686
|
},
|
|
45497
45687
|
{
|
|
45498
45688
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
|
|
45499
45689
|
"kind": "BooleanLiteral",
|
|
45500
|
-
"offset":
|
|
45690
|
+
"offset": 3261,
|
|
45501
45691
|
"length": 5,
|
|
45502
45692
|
"value": "false"
|
|
45503
45693
|
},
|
|
45504
45694
|
{
|
|
45505
45695
|
"filePath": "\/Users\/michaelseleman\/shortkit\/swift_sdk\/Sources\/ShortKit\/Widget\/ShortKitWidgetViewController.swift",
|
|
45506
45696
|
"kind": "StringLiteral",
|
|
45507
|
-
"offset":
|
|
45697
|
+
"offset": 16213,
|
|
45508
45698
|
"length": 16,
|
|
45509
45699
|
"value": "\"WidgetCardCell\""
|
|
45510
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
|
|
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 {}
|
|
Binary file
|
|
@@ -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
|
|
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 {}
|
package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK
CHANGED
|
Binary file
|
|
@@ -10,39 +10,39 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
ojzrG3Ap08GJYamHkQPBUeXk/l0=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
21myiENnbm60Ispq3tQ5ew19FSk=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
zPo7oMw2NLtjLxfYCxXyViI9stM=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
40YCNN9uv8BRz93OzhGUKoz3RAA=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
zPo7oMw2NLtjLxfYCxXyViI9stM=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
21myiENnbm60Ispq3tQ5ew19FSk=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
vcLubVZzFhhcaxIe+CkCl0boQWs=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
/2fiMms53INV4XQrQbZvM6gqOEg=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
vcLubVZzFhhcaxIe+CkCl0boQWs=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/module.modulemap</key>
|
|
48
48
|
<data>
|
|
@@ -66,56 +66,56 @@
|
|
|
66
66
|
<dict>
|
|
67
67
|
<key>hash2</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
Dsiu+M+BzZQooc8siWOeQ+tS8azZJ7BfE+71duXglXs=
|
|
70
70
|
</data>
|
|
71
71
|
</dict>
|
|
72
72
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
73
73
|
<dict>
|
|
74
74
|
<key>hash2</key>
|
|
75
75
|
<data>
|
|
76
|
-
|
|
76
|
+
FMAJh9SjpqLB6134JfHMNDpUINiMPb9TP4YXvhZEUug=
|
|
77
77
|
</data>
|
|
78
78
|
</dict>
|
|
79
79
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
80
80
|
<dict>
|
|
81
81
|
<key>hash2</key>
|
|
82
82
|
<data>
|
|
83
|
-
|
|
83
|
+
Cw1QZDVkmMiaSLxpl7OxGadGNlHAFn08jn1ClL2XN6s=
|
|
84
84
|
</data>
|
|
85
85
|
</dict>
|
|
86
86
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
87
87
|
<dict>
|
|
88
88
|
<key>hash2</key>
|
|
89
89
|
<data>
|
|
90
|
-
|
|
90
|
+
FMAJh9SjpqLB6134JfHMNDpUINiMPb9TP4YXvhZEUug=
|
|
91
91
|
</data>
|
|
92
92
|
</dict>
|
|
93
93
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
94
94
|
<dict>
|
|
95
95
|
<key>hash2</key>
|
|
96
96
|
<data>
|
|
97
|
-
|
|
97
|
+
Dsiu+M+BzZQooc8siWOeQ+tS8azZJ7BfE+71duXglXs=
|
|
98
98
|
</data>
|
|
99
99
|
</dict>
|
|
100
100
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
101
101
|
<dict>
|
|
102
102
|
<key>hash2</key>
|
|
103
103
|
<data>
|
|
104
|
-
|
|
104
|
+
2I1oGbLXn9JJAJEdBxgRR/gyfKA2c1l0bFbNOsCRUNY=
|
|
105
105
|
</data>
|
|
106
106
|
</dict>
|
|
107
107
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
108
108
|
<dict>
|
|
109
109
|
<key>hash2</key>
|
|
110
110
|
<data>
|
|
111
|
-
|
|
111
|
+
E73Dx8SYkIk9zbpx6V2HLAdRZAIFitk3aKJVzM2p95g=
|
|
112
112
|
</data>
|
|
113
113
|
</dict>
|
|
114
114
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
2I1oGbLXn9JJAJEdBxgRR/gyfKA2c1l0bFbNOsCRUNY=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/module.modulemap</key>
|
|
@@ -6,7 +6,7 @@ import ShortKitSDK
|
|
|
6
6
|
///
|
|
7
7
|
/// Props (set by RCTViewManager):
|
|
8
8
|
/// - `config`: JSON string with WidgetConfig values
|
|
9
|
-
/// - `items`: JSON string with
|
|
9
|
+
/// - `items`: JSON string with WidgetInput array (compact playback-ID form)
|
|
10
10
|
@objc public class ShortKitWidgetNativeView: UIView {
|
|
11
11
|
|
|
12
12
|
// MARK: - Props
|
|
@@ -29,6 +29,7 @@ import ShortKitSDK
|
|
|
29
29
|
|
|
30
30
|
private var widgetVC: ShortKitWidgetViewController?
|
|
31
31
|
private var parsedConfig: WidgetConfig?
|
|
32
|
+
private var parsedItems: [WidgetInput] = []
|
|
32
33
|
|
|
33
34
|
// MARK: - Lifecycle
|
|
34
35
|
|
|
@@ -60,7 +61,9 @@ import ShortKitSDK
|
|
|
60
61
|
|
|
61
62
|
let widgetConfig = parsedConfig ?? WidgetConfig()
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
// Pass items at construction so the VC never races the server fetch —
|
|
65
|
+
// analogous to the feed's `feedItems` prop wiring.
|
|
66
|
+
let vc = ShortKitWidgetViewController(shortKit: sdk, config: widgetConfig, items: parsedItems)
|
|
64
67
|
self.widgetVC = vc
|
|
65
68
|
|
|
66
69
|
parentVC.addChild(vc)
|
|
@@ -68,11 +71,6 @@ import ShortKitSDK
|
|
|
68
71
|
vc.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
69
72
|
addSubview(vc.view)
|
|
70
73
|
vc.didMove(toParent: parentVC)
|
|
71
|
-
|
|
72
|
-
// If items were already set, apply them
|
|
73
|
-
if let json = items, let contentItems = Self.parseContentItems(json) {
|
|
74
|
-
vc.configure(with: contentItems)
|
|
75
|
-
}
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
private func removeWidgetVC() {
|
|
@@ -95,8 +93,11 @@ import ShortKitSDK
|
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
private func applyItems() {
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
parsedItems = items.flatMap { Self.parseWidgetInputs($0) } ?? []
|
|
97
|
+
// Post-mount updates: push items through the public API.
|
|
98
|
+
if let vc = widgetVC {
|
|
99
|
+
vc.configure(with: parsedItems)
|
|
100
|
+
}
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
// MARK: - Parsing
|
|
@@ -140,6 +141,11 @@ import ShortKitSDK
|
|
|
140
141
|
return ShortKitBridge.parseFeedFilter(filterStr)
|
|
141
142
|
}()
|
|
142
143
|
|
|
144
|
+
let feedConfig: FeedConfig = {
|
|
145
|
+
guard let feedConfigStr = obj["feedConfig"] as? String else { return FeedConfig() }
|
|
146
|
+
return ShortKitBridge.parseFeedConfig(feedConfigStr)
|
|
147
|
+
}()
|
|
148
|
+
|
|
143
149
|
return WidgetConfig(
|
|
144
150
|
cardCount: cardCount,
|
|
145
151
|
cardSpacing: cardSpacing,
|
|
@@ -150,13 +156,28 @@ import ShortKitSDK
|
|
|
150
156
|
rotationInterval: rotationInterval / 1000.0, // JS sends ms, iOS expects seconds
|
|
151
157
|
clickAction: clickAction,
|
|
152
158
|
cardOverlay: overlayMode,
|
|
159
|
+
feedConfig: feedConfig,
|
|
153
160
|
filter: filter
|
|
154
161
|
)
|
|
155
162
|
}
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
/// Parse a JSON array of `WidgetInput` values (compact playback-ID form).
|
|
165
|
+
/// Mirrors the JS `WidgetInput` type: `{ type: 'video'; playbackId: string; origin?: string; fallbackUrl?: string }`.
|
|
166
|
+
private static func parseWidgetInputs(_ json: String) -> [WidgetInput]? {
|
|
167
|
+
guard let data = json.data(using: .utf8),
|
|
168
|
+
let arr = try? JSONSerialization.jsonObject(with: data) as? [[String: Any]] else {
|
|
169
|
+
return nil
|
|
170
|
+
}
|
|
171
|
+
return arr.compactMap { obj -> WidgetInput? in
|
|
172
|
+
guard let type = obj["type"] as? String, type == "video",
|
|
173
|
+
let playbackId = obj["playbackId"] as? String else { return nil }
|
|
174
|
+
let origin: ContentOrigin = {
|
|
175
|
+
guard let s = obj["origin"] as? String else { return .other }
|
|
176
|
+
return s == "ios_upload" ? .iosUpload : .other
|
|
177
|
+
}()
|
|
178
|
+
let fallbackUrl = obj["fallbackUrl"] as? String
|
|
179
|
+
return .video(playbackId: playbackId, origin: origin, fallbackUrl: fallbackUrl)
|
|
180
|
+
}
|
|
160
181
|
}
|
|
161
182
|
|
|
162
183
|
// MARK: - Helpers
|