expo-ai-kit 0.1.3 → 0.1.5

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.
@@ -9,6 +9,7 @@ export type ExpoAiKitNativeModule = {
9
9
  sendMessage(sessionId: string, messages: LLMMessage[], options?: LLMOptions): Promise<{
10
10
  reply: string;
11
11
  }>;
12
+ isAvailable(): boolean;
12
13
  };
13
14
  declare const NativeModule: ExpoAiKitNativeModule;
14
15
  export default NativeModule;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoAiKitModule.d.ts","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,aAAa,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,qBACqC,CAAC;AAE1D,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ExpoAiKitModule.d.ts","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,aAAa,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9B,WAAW,IAAI,OAAO,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,qBACqC,CAAC;AAE1D,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoAiKitModule.js","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAaxD,MAAM,YAAY,GAChB,mBAAmB,CAAwB,WAAW,CAAC,CAAC;AAE1D,eAAe,YAAY,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport type ExpoAiKitNativeModule = {\n prepareModel(options?: { model?: string }): Promise<void>;\n createSession(options?: { systemPrompt?: string }): Promise<string>;\n sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n ): Promise<{ reply: string }>;\n};\n\nconst NativeModule: ExpoAiKitNativeModule =\n requireNativeModule<ExpoAiKitNativeModule>('ExpoAiKit'); \n\nexport default NativeModule;"]}
1
+ {"version":3,"file":"ExpoAiKitModule.js","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAcxD,MAAM,YAAY,GAChB,mBAAmB,CAAwB,WAAW,CAAC,CAAC;AAE1D,eAAe,YAAY,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport type ExpoAiKitNativeModule = {\n prepareModel(options?: { model?: string }): Promise<void>;\n createSession(options?: { systemPrompt?: string }): Promise<string>;\n sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n ): Promise<{ reply: string }>;\n isAvailable(): boolean;\n};\n\nconst NativeModule: ExpoAiKitNativeModule =\n requireNativeModule<ExpoAiKitNativeModule>('ExpoAiKit'); \n\nexport default NativeModule;"]}
package/build/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export declare function createSession(options?: {
9
9
  export declare function sendMessage(sessionId: string, messages: LLMMessage[], options?: LLMOptions): Promise<{
10
10
  reply: string;
11
11
  }>;
12
+ export declare function isAvailable(): boolean;
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,iBAE9D;AAED,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,mBAEtE;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU;;GAGrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,iBAE9D;AAED,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,mBAEtE;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU;;GAGrB;AAED,wBAAgB,WAAW,IAAI,OAAO,CAMrC"}
package/build/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import NativeModule from './ExpoAiKitModule';
2
+ import { Platform } from 'react-native';
2
3
  export * from './types';
3
4
  export async function prepareModel(options) {
4
5
  return NativeModule.prepareModel(options);
@@ -9,4 +10,11 @@ export async function createSession(options) {
9
10
  export async function sendMessage(sessionId, messages, options) {
10
11
  return NativeModule.sendMessage(sessionId, messages, options);
11
12
  }
13
+ export function isAvailable() {
14
+ if (Platform.OS === 'ios') {
15
+ return NativeModule.isAvailable();
16
+ }
17
+ // Android support will be added later
18
+ return false;
19
+ }
12
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,cAAc,SAAS,CAAC;AAGxB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA4B;IAC7D,OAAO,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAmC;IACrE,OAAO,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAAiB,EACjB,QAAsB,EACtB,OAAoB;IAEpB,OAAO,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import NativeModule from './ExpoAiKitModule';\nexport * from './types';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport async function prepareModel(options?: { model?: string }) {\n return NativeModule.prepareModel(options);\n}\n\nexport async function createSession(options?: { systemPrompt?: string }) {\n return NativeModule.createSession(options);\n}\n\nexport async function sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n) {\n return NativeModule.sendMessage(sessionId, messages, options);\n}"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,cAAc,SAAS,CAAC;AAGxB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA4B;IAC7D,OAAO,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAmC;IACrE,OAAO,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAAiB,EACjB,QAAsB,EACtB,OAAoB;IAEpB,OAAO,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC;IACpC,CAAC;IACD,sCAAsC;IACtC,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import NativeModule from './ExpoAiKitModule';\nimport { Platform } from 'react-native';\nexport * from './types';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport async function prepareModel(options?: { model?: string }) {\n return NativeModule.prepareModel(options);\n}\n\nexport async function createSession(options?: { systemPrompt?: string }) {\n return NativeModule.createSession(options);\n}\n\nexport async function sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n) {\n return NativeModule.sendMessage(sessionId, messages, options);\n}\n\nexport function isAvailable(): boolean {\n if (Platform.OS === 'ios') {\n return NativeModule.isAvailable();\n }\n // Android support will be added later\n return false;\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-ai-kit",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Expo AI Kit module",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",