@lynkoria/react-native 0.0.0-stage → 0.1.0

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/dist/index.js ADDED
@@ -0,0 +1,157 @@
1
+ import { PushPayloadKeys } from "@lynkoria/contracts";
2
+ import { TurboModuleRegistry, codegenNativeComponent } from "react-native";
3
+ import { ErrorCode, LynkoriaError, createLynkoria } from "@lynkoria/client";
4
+ // src/specs/NativeLynkoria.ts
5
+ var NativeLynkoria_default = TurboModuleRegistry.getEnforcing("Lynkoria");
6
+ // src/specs/LynkoriaVideoViewNativeComponent.ts
7
+ var LynkoriaVideoViewNativeComponent_default = codegenNativeComponent("LynkoriaVideoView");
8
+ // src/index.ts
9
+ const STATES = [
10
+ "connecting",
11
+ "connected",
12
+ "reconnecting",
13
+ "disconnected"
14
+ ];
15
+ const toState = (s) => STATES.includes(s) ? s : "disconnected";
16
+ /** The active native call. Only one call is active per app; join again after `leave()`. */
17
+ var NativeCall = class {
18
+ current = "connecting";
19
+ ended = false;
20
+ subscriptions = [];
21
+ stateListeners = /* @__PURE__ */ new Set();
22
+ participantListeners = /* @__PURE__ */ new Set();
23
+ /** @internal use {@link joinCall} */
24
+ constructor() {
25
+ this.subscriptions.push(NativeLynkoria_default.onStateChanged(({ state }) => {
26
+ this.current = toState(state);
27
+ for (const l of this.stateListeners) l(this.current);
28
+ }), NativeLynkoria_default.onParticipantsChanged(() => {
29
+ for (const l of this.participantListeners) l();
30
+ }));
31
+ }
32
+ get state() {
33
+ return this.current;
34
+ }
35
+ onStateChange(listener) {
36
+ this.stateListeners.add(listener);
37
+ return () => this.stateListeners.delete(listener);
38
+ }
39
+ onParticipantsChange(listener) {
40
+ this.participantListeners.add(listener);
41
+ return () => this.participantListeners.delete(listener);
42
+ }
43
+ participants() {
44
+ return NativeLynkoria_default.participants();
45
+ }
46
+ setMicrophoneEnabled(enabled) {
47
+ return NativeLynkoria_default.setMicrophoneEnabled(enabled);
48
+ }
49
+ setCameraEnabled(enabled) {
50
+ return NativeLynkoria_default.setCameraEnabled(enabled);
51
+ }
52
+ startScreenShare() {
53
+ return NativeLynkoria_default.startScreenShare();
54
+ }
55
+ stopScreenShare() {
56
+ return NativeLynkoria_default.stopScreenShare();
57
+ }
58
+ audioDevices() {
59
+ return NativeLynkoria_default.audioDevices();
60
+ }
61
+ selectAudioDevice(name) {
62
+ return NativeLynkoria_default.selectAudioDevice(name);
63
+ }
64
+ async leave() {
65
+ if (this.ended) return;
66
+ this.ended = true;
67
+ try {
68
+ await NativeLynkoria_default.leave();
69
+ } finally {
70
+ for (const s of this.subscriptions) s.remove();
71
+ this.current = "disconnected";
72
+ for (const l of this.stateListeners) l("disconnected");
73
+ this.stateListeners.clear();
74
+ this.participantListeners.clear();
75
+ }
76
+ }
77
+ };
78
+ let active = null;
79
+ /** Requests permissions, fetches join credentials from your backend and connects natively. */
80
+ async function joinCall(opts) {
81
+ const audio = opts.audio ?? true;
82
+ const video = opts.video ?? false;
83
+ if (active && active.state !== "disconnected") throw new Error("A call is already active; leave it first");
84
+ if (!await NativeLynkoria_default.requestPermissions(video)) throw new Error(video ? "Microphone and camera permission denied" : "Microphone permission denied");
85
+ const { url, token } = await opts.getJoinToken();
86
+ const call = new NativeCall();
87
+ active = call;
88
+ try {
89
+ await NativeLynkoria_default.join(url, token, audio, video);
90
+ } catch (err) {
91
+ await call.leave().catch(() => void 0);
92
+ active = null;
93
+ throw err;
94
+ }
95
+ return call;
96
+ }
97
+ /**
98
+ * Parses a Lynkoria push from FCM `data` or the APNs `lynkoria` dictionary (same keys as the
99
+ * Kotlin and Swift SDKs). Returns null for pushes that are not from Lynkoria.
100
+ */
101
+ function parsePush(data) {
102
+ const kind = data[PushPayloadKeys.kind];
103
+ const callId = data[PushPayloadKeys.callId];
104
+ if (kind === "call_incoming" && callId) {
105
+ const fromUserId = data[PushPayloadKeys.fromUserId];
106
+ const callerName = data.lynkoria_caller_name;
107
+ const tenantId = data[PushPayloadKeys.tenantId];
108
+ return {
109
+ kind,
110
+ callId,
111
+ callType: data[PushPayloadKeys.callType] ?? "one_to_one",
112
+ ...fromUserId ? { fromUserId } : {},
113
+ ...callerName ? { callerName } : {},
114
+ ...tenantId ? { tenantId } : {}
115
+ };
116
+ }
117
+ if (kind === "call_cancelled" && callId) return {
118
+ kind,
119
+ callId
120
+ };
121
+ if (kind === "message" || kind === "custom") {
122
+ const clean = {};
123
+ for (const [k, v] of Object.entries(data)) if (typeof v === "string") clean[k] = v;
124
+ return {
125
+ kind,
126
+ data: clean
127
+ };
128
+ }
129
+ return null;
130
+ }
131
+ /** System incoming-call UI (CallKit / Android CallStyle notification) and VoIP registration. */
132
+ const incomingCalls = {
133
+ /** Shows the system ringing UI for a Lynkoria `call_incoming` push. Returns true if handled. */
134
+ handlePush(data) {
135
+ const push = parsePush(data);
136
+ if (push?.kind === "call_incoming") {
137
+ NativeLynkoria_default.displayIncomingCall(push.callId, push.callerName ?? push.fromUserId ?? "Incoming call", push.callType !== "audio");
138
+ return true;
139
+ }
140
+ if (push?.kind === "call_cancelled") {
141
+ NativeLynkoria_default.endIncomingCall(push.callId);
142
+ return true;
143
+ }
144
+ return false;
145
+ },
146
+ onAction(listener) {
147
+ const sub = NativeLynkoria_default.onCallAction(listener);
148
+ return () => sub.remove();
149
+ },
150
+ /** iOS: PushKit token for `registerPushToken({ provider: 'apns_voip' })`. No-op on Android. */
151
+ registerVoip(listener) {
152
+ const sub = NativeLynkoria_default.onVoipToken(({ token }) => listener(token));
153
+ NativeLynkoria_default.registerVoip();
154
+ return () => sub.remove();
155
+ }
156
+ };
157
+ export { ErrorCode, LynkoriaError, LynkoriaVideoViewNativeComponent_default as LynkoriaVideoView, NativeCall, createLynkoria, incomingCalls, joinCall, parsePush };
@@ -0,0 +1,159 @@
1
+ import AVFoundation
2
+ import Foundation
3
+ import Lynkoria
4
+ import LiveKit
5
+
6
+ /// Implemented by the ObjC++ TurboModule so Swift can emit codegen events.
7
+ @objc public protocol LynkoriaEmitter: AnyObject {
8
+ func emitState(_ state: String)
9
+ func emitParticipants(_ state: String)
10
+ func emitAction(_ action: String, callId: String)
11
+ func emitVoipToken(_ token: String)
12
+ }
13
+
14
+ /// Swift side of the React Native module: drives `LynkoriaCall` and `LynkoriaCallKit`.
15
+ @objc public final class LynkoriaRNImpl: NSObject, LynkoriaCallKitDelegate {
16
+ private weak var emitter: LynkoriaEmitter?
17
+ @MainActor private var call: LynkoriaCall?
18
+ @MainActor private lazy var callKit: LynkoriaCallKit = {
19
+ let kit = LynkoriaCallKit(appName: Bundle.main.infoDictionary?["CFBundleName"] as? String ?? "Call") { [weak self] token in
20
+ self?.emitter?.emitVoipToken(token)
21
+ }
22
+ kit.delegate = self
23
+ return kit
24
+ }()
25
+ private var observers: [Task<Void, Never>] = []
26
+
27
+ /// Shared with the video view component.
28
+ @MainActor public static weak var current: LynkoriaRNImpl?
29
+ @MainActor public var room: Room? { call?.room }
30
+
31
+ @objc public init(emitter: LynkoriaEmitter) {
32
+ self.emitter = emitter
33
+ super.init()
34
+ Task { @MainActor in LynkoriaRNImpl.current = self }
35
+ }
36
+
37
+ @objc public func requestPermissions(video: Bool, completion: @escaping (Bool) -> Void) {
38
+ AVCaptureDevice.requestAccess(for: .audio) { mic in
39
+ guard mic, video else { return completion(mic) }
40
+ AVCaptureDevice.requestAccess(for: .video) { completion($0) }
41
+ }
42
+ }
43
+
44
+ @objc public func join(url: String, token: String, microphone: Bool, camera: Bool, completion: @escaping (String?) -> Void) {
45
+ Task { @MainActor in
46
+ do {
47
+ await call?.leave()
48
+ let joined = try await LynkoriaCall.join(JoinCredentials(url: url, token: token))
49
+ call = joined
50
+ observers.forEach { $0.cancel() }
51
+ observers = [
52
+ Task { @MainActor [weak self] in
53
+ for await state in joined.$state.values { self?.emitter?.emitState(Self.name(state)) }
54
+ },
55
+ Task { @MainActor [weak self] in
56
+ for await _ in joined.$participants.values { self?.emitter?.emitParticipants(Self.name(joined.state)) }
57
+ },
58
+ ]
59
+ if microphone { try await joined.setMicrophoneEnabled(true) }
60
+ if camera { try await joined.setCameraEnabled(true) }
61
+ completion(nil)
62
+ } catch {
63
+ completion((error as? LynkoriaError)?.message ?? error.localizedDescription)
64
+ }
65
+ }
66
+ }
67
+
68
+ private static func name(_ s: CallState) -> String {
69
+ switch s {
70
+ case .connecting: "connecting"
71
+ case .connected: "connected"
72
+ case .reconnecting: "reconnecting"
73
+ case .disconnected: "disconnected"
74
+ }
75
+ }
76
+
77
+ private func run(_ completion: @escaping (String?) -> Void, _ body: @escaping @MainActor () async throws -> Void) {
78
+ Task { @MainActor in
79
+ do { try await body(); completion(nil) } catch { completion(error.localizedDescription) }
80
+ }
81
+ }
82
+
83
+ @objc public func leave(with completion: @escaping (String?) -> Void) {
84
+ run(completion) { [self] in
85
+ observers.forEach { $0.cancel() }
86
+ await call?.leave()
87
+ call = nil
88
+ }
89
+ }
90
+
91
+ @objc public func setMicrophone(_ enabled: Bool, completion: @escaping (String?) -> Void) {
92
+ run(completion) { [self] in try await requireCall().setMicrophoneEnabled(enabled) }
93
+ }
94
+
95
+ @objc public func setCamera(_ enabled: Bool, completion: @escaping (String?) -> Void) {
96
+ run(completion) { [self] in try await requireCall().setCameraEnabled(enabled) }
97
+ }
98
+
99
+ @objc public func startScreenShare(with completion: @escaping (String?) -> Void) {
100
+ run(completion) { [self] in try await requireCall().setScreenShareEnabled(true) }
101
+ }
102
+
103
+ @objc public func stopScreenShare(with completion: @escaping (String?) -> Void) {
104
+ run(completion) { [self] in try await requireCall().setScreenShareEnabled(false) }
105
+ }
106
+
107
+ @MainActor private func requireCall() throws -> LynkoriaCall {
108
+ guard let call else { throw LynkoriaError(code: "bad_request", message: "No active call") }
109
+ return call
110
+ }
111
+
112
+ @objc public func audioDevices() -> [String] {
113
+ AVAudioSession.sharedInstance().availableInputs?.map(\.portName) ?? []
114
+ }
115
+
116
+ @objc public func selectAudioDevice(_ name: String) {
117
+ let session = AVAudioSession.sharedInstance()
118
+ if name == "Speaker" {
119
+ try? session.overrideOutputAudioPort(.speaker)
120
+ } else if let input = session.availableInputs?.first(where: { $0.portName == name }) {
121
+ try? session.overrideOutputAudioPort(.none)
122
+ try? session.setPreferredInput(input)
123
+ }
124
+ }
125
+
126
+ @MainActor @objc public func participants() -> [[String: Any]] {
127
+ guard let call else { return [] }
128
+ return call.participants.map { p in
129
+ [
130
+ "identity": p.identity?.stringValue ?? "",
131
+ "isLocal": p is LocalParticipant,
132
+ "hasAudio": p.isMicrophoneEnabled(),
133
+ "hasVideo": p.isCameraEnabled(),
134
+ "hasScreenShare": p.isScreenShareEnabled(),
135
+ "isSpeaking": p.isSpeaking,
136
+ ]
137
+ }
138
+ }
139
+
140
+ @objc public func displayIncomingCall(_ callId: String, callerName: String, hasVideo: Bool) {
141
+ Task { @MainActor in await callKit.reportIncoming(callId: callId, callerName: callerName, hasVideo: hasVideo) }
142
+ }
143
+
144
+ @objc public func endIncomingCall(_ callId: String) {
145
+ Task { @MainActor in callKit.reportEnded(callId: callId) }
146
+ }
147
+
148
+ @objc public func registerVoip() {
149
+ Task { @MainActor in _ = callKit } // creating LynkoriaCallKit starts PushKit registration
150
+ }
151
+
152
+ public func callKit(didAnswer callId: String, uuid: UUID) async {
153
+ emitter?.emitAction("answer", callId: callId)
154
+ }
155
+
156
+ public func callKit(didEnd callId: String, uuid: UUID, declined: Bool) async {
157
+ emitter?.emitAction(declined ? "decline" : "end", callId: callId)
158
+ }
159
+ }
@@ -0,0 +1,17 @@
1
+ import LiveKit
2
+ import UIKit
3
+
4
+ /// Binds a LiveKit `VideoView` to a participant's camera or screen track for the Fabric component.
5
+ @MainActor @objc public final class LynkoriaVideoHost: NSObject {
6
+ @objc public let view = VideoView()
7
+
8
+ @objc public func update(identity: String, screen: Bool, mirror: Bool, fit: Bool) {
9
+ view.layoutMode = fit ? .fit : .fill
10
+ view.mirrorMode = mirror ? .mirror : .off
11
+ guard let room = LynkoriaRNImpl.current?.room else { view.track = nil; return }
12
+ let participants: [Participant] = [room.localParticipant] + Array(room.remoteParticipants.values)
13
+ let participant = participants.first { $0.identity?.stringValue == identity }
14
+ let source: Track.Source = screen ? .screenShareVideo : .camera
15
+ view.track = participant?.trackPublications.values.first { $0.source == source }?.track as? VideoTrack
16
+ }
17
+ }
@@ -0,0 +1,85 @@
1
+ // TurboModule entry point. Generated protocol: <RNLynkoriaSpec/RNLynkoriaSpec.h> (codegen).
2
+ #import <RNLynkoriaSpec/RNLynkoriaSpec.h>
3
+ #import "lynkoria_react_native-Swift.h"
4
+
5
+ @interface RNLynkoria : NativeLynkoriaSpecBase <NativeLynkoriaSpec, LynkoriaEmitter>
6
+ @end
7
+
8
+ @implementation RNLynkoria {
9
+ LynkoriaRNImpl *_impl;
10
+ }
11
+
12
+ RCT_EXPORT_MODULE(Lynkoria)
13
+
14
+ - (instancetype)init {
15
+ if ((self = [super init])) {
16
+ _impl = [[LynkoriaRNImpl alloc] initWithEmitter:self];
17
+ }
18
+ return self;
19
+ }
20
+
21
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
22
+ (const facebook::react::ObjCTurboModule::InitParams &)params {
23
+ return std::make_shared<facebook::react::NativeLynkoriaSpecJSI>(params);
24
+ }
25
+
26
+ // LynkoriaEmitter: Swift → JS events through the generated emitters.
27
+ - (void)emitState:(NSString *)state { [self emitOnStateChanged:@{@"state" : state}]; }
28
+ - (void)emitParticipants:(NSString *)state { [self emitOnParticipantsChanged:@{@"state" : state}]; }
29
+ - (void)emitAction:(NSString *)action callId:(NSString *)callId {
30
+ [self emitOnCallAction:@{@"callId" : callId, @"action" : action}];
31
+ }
32
+ - (void)emitVoipToken:(NSString *)token { [self emitOnVoipToken:@{@"token" : token}]; }
33
+
34
+ - (void)requestPermissions:(BOOL)video resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
35
+ [_impl requestPermissionsWithVideo:video completion:^(BOOL granted) { resolve(@(granted)); }];
36
+ }
37
+
38
+ - (void)join:(NSString *)url token:(NSString *)token enableMicrophone:(BOOL)mic enableCamera:(BOOL)cam
39
+ resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
40
+ [_impl joinWithUrl:url token:token microphone:mic camera:cam completion:^(NSString *error) {
41
+ error ? reject(@"lynkoria_error", error, nil) : resolve(nil);
42
+ }];
43
+ }
44
+
45
+ - (void)leave:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
46
+ [_impl leaveWith:^(NSString *error) { error ? reject(@"lynkoria_error", error, nil) : resolve(nil); }];
47
+ }
48
+
49
+ - (void)startScreenShare:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
50
+ [_impl startScreenShareWith:^(NSString *error) { error ? reject(@"lynkoria_error", error, nil) : resolve(nil); }];
51
+ }
52
+
53
+ - (void)stopScreenShare:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
54
+ [_impl stopScreenShareWith:^(NSString *error) { error ? reject(@"lynkoria_error", error, nil) : resolve(nil); }];
55
+ }
56
+
57
+ - (void)setMicrophoneEnabled:(BOOL)enabled resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
58
+ [_impl setMicrophone:enabled completion:^(NSString *error) { error ? reject(@"lynkoria_error", error, nil) : resolve(nil); }];
59
+ }
60
+
61
+ - (void)setCameraEnabled:(BOOL)enabled resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
62
+ [_impl setCamera:enabled completion:^(NSString *error) { error ? reject(@"lynkoria_error", error, nil) : resolve(nil); }];
63
+ }
64
+
65
+ - (void)audioDevices:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
66
+ resolve([_impl audioDevices]);
67
+ }
68
+
69
+ - (void)selectAudioDevice:(NSString *)name resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
70
+ [_impl selectAudioDevice:name];
71
+ resolve(nil);
72
+ }
73
+
74
+ - (void)participants:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
75
+ resolve([_impl participants]);
76
+ }
77
+
78
+ - (void)displayIncomingCall:(NSString *)callId callerName:(NSString *)callerName hasVideo:(BOOL)hasVideo {
79
+ [_impl displayIncomingCall:callId callerName:callerName hasVideo:hasVideo];
80
+ }
81
+
82
+ - (void)endIncomingCall:(NSString *)callId { [_impl endIncomingCall:callId]; }
83
+ - (void)registerVoip { [_impl registerVoip]; }
84
+
85
+ @end
@@ -0,0 +1,42 @@
1
+ // Fabric component for <LynkoriaVideoView>. Hosts LiveKit's VideoView via the Swift helper.
2
+ #import <React/RCTViewComponentView.h>
3
+ #import <react/renderer/components/RNLynkoriaSpec/ComponentDescriptors.h>
4
+ #import <react/renderer/components/RNLynkoriaSpec/Props.h>
5
+ #import <react/renderer/components/RNLynkoriaSpec/RCTComponentViewHelpers.h>
6
+ #import "lynkoria_react_native-Swift.h"
7
+
8
+ using namespace facebook::react;
9
+
10
+ @interface RNLynkoriaVideoView : RCTViewComponentView
11
+ @end
12
+
13
+ @implementation RNLynkoriaVideoView {
14
+ LynkoriaVideoHost *_host;
15
+ }
16
+
17
+ + (ComponentDescriptorProvider)componentDescriptorProvider {
18
+ return concreteComponentDescriptorProvider<LynkoriaVideoViewComponentDescriptor>();
19
+ }
20
+
21
+ - (instancetype)initWithFrame:(CGRect)frame {
22
+ if ((self = [super initWithFrame:frame])) {
23
+ static const auto defaultProps = std::make_shared<const LynkoriaVideoViewProps>();
24
+ _props = defaultProps;
25
+ _host = [[LynkoriaVideoHost alloc] init];
26
+ self.contentView = _host.view;
27
+ }
28
+ return self;
29
+ }
30
+
31
+ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
32
+ const auto &p = *std::static_pointer_cast<LynkoriaVideoViewProps const>(props);
33
+ [_host updateWithIdentity:[NSString stringWithUTF8String:p.participantIdentity.c_str()]
34
+ screen:p.source == LynkoriaVideoViewSource::Screen
35
+ mirror:p.mirror
36
+ fit:p.scaleMode == LynkoriaVideoViewScaleMode::Fit];
37
+ [super updateProps:props oldProps:oldProps];
38
+ }
39
+
40
+ @end
41
+
42
+ Class<RCTComponentViewProtocol> RNLynkoriaVideoViewCls(void) { return RNLynkoriaVideoView.class; }
@@ -0,0 +1,26 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "lynkoria-react-native"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = "https://github.com/guildsman/lynkoria"
10
+ s.license = { :type => "Apache-2.0", :file => "LICENSE" }
11
+ s.authors = "Guildsman"
12
+ s.platforms = { :ios => "15.1" }
13
+ s.source = { :git => "https://github.com/guildsman/lynkoria.git", :tag => "react-native-v#{s.version}" }
14
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
15
+ s.swift_version = "5.9"
16
+
17
+ # Native media comes from the Lynkoria Swift package (LiveKit Swift underneath), pulled through
18
+ # React Native's SwiftPM bridge (RN >= 0.75).
19
+ spm_dependency(s,
20
+ url: "https://github.com/guildsman/lynkoria-swift.git",
21
+ requirement: { kind: "upToNextMajorVersion", minimumVersion: "0.1.0" },
22
+ products: ["Lynkoria"]
23
+ )
24
+
25
+ install_modules_dependencies(s)
26
+ end
package/package.json CHANGED
@@ -1,6 +1,77 @@
1
1
  {
2
2
  "name": "@lynkoria/react-native",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Native React Native SDK for Lynkoria: LiveKit calls and livestreams through native Android/iOS modules, plus messaging and push",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "files": [
9
+ "dist",
10
+ "src",
11
+ "!src/**/*.test.ts",
12
+ "android/build.gradle",
13
+ "android/src",
14
+ "ios",
15
+ "lynkoria-react-native.podspec",
16
+ "app.plugin.js",
17
+ "README.md",
18
+ "CHANGELOG.md"
19
+ ],
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "react-native": "./src/index.ts",
24
+ "import": "./dist/index.js",
25
+ "default": "./dist/index.js"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "types": "./dist/index.d.ts",
30
+ "react-native": "./src/index.ts",
31
+ "codegenConfig": {
32
+ "name": "RNLynkoriaSpec",
33
+ "type": "all",
34
+ "jsSrcsDir": "src/specs",
35
+ "android": {
36
+ "javaPackageName": "com.lynkoria.reactnative"
37
+ },
38
+ "ios": {
39
+ "componentProvider": {
40
+ "LynkoriaVideoView": "RNLynkoriaVideoView"
41
+ }
42
+ }
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "dependencies": {
48
+ "@lynkoria/client": "^0.1.0",
49
+ "@lynkoria/contracts": "^0.1.0"
50
+ },
51
+ "devDependencies": {
52
+ "@lynkoria/config": "0.0.0",
53
+ "@types/react": "^19.3.0",
54
+ "react": "^19.3.1",
55
+ "react-native": "0.88.1",
56
+ "tsdown": "^0.23.7",
57
+ "typescript": "^7.0.2",
58
+ "vitest": "^5.1.0",
59
+ "@expo/config-plugins": "^58.0.13",
60
+ "@types/node": "^26.6.6"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "^19.0.0",
64
+ "react-native": ">=0.82.0",
65
+ "@expo/config-plugins": ">=54.0.0"
66
+ },
67
+ "peerDependenciesMeta": {
68
+ "@expo/config-plugins": {
69
+ "optional": true
70
+ }
71
+ },
72
+ "scripts": {
73
+ "build": "tsdown",
74
+ "typecheck": "tsc --noEmit",
75
+ "test": "vitest run"
76
+ }
6
77
  }