@snap/camera-kit 1.4.0 → 1.5.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.
Files changed (211) hide show
  1. package/README.md +1 -1
  2. package/dist/CameraKit.d.ts +1 -0
  3. package/dist/CameraKit.d.ts.map +1 -1
  4. package/dist/environment.js +1 -1
  5. package/dist/environment.js.map +1 -1
  6. package/dist/lens-core-module/generated-types.d.ts +5 -0
  7. package/dist/lens-core-module/generated-types.d.ts.map +1 -1
  8. package/dist/lens-core-module/generated-types.js.map +1 -1
  9. package/dist/lensCoreWasmVersions.js +3 -3
  10. package/dist/lensCoreWasmVersions.js.map +1 -1
  11. package/dist/session/LensKeyboard.d.ts +4 -4
  12. package/dist/session/LensKeyboard.d.ts.map +1 -1
  13. package/dist/session/LensKeyboard.js.map +1 -1
  14. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.d.ts +0 -3
  15. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.d.ts.map +1 -1
  16. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js +1 -4
  17. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js.map +1 -1
  18. package/docs/html/classes/CameraKit.html +2 -2
  19. package/docs/html/classes/CameraKitSession.html +2 -2
  20. package/docs/html/classes/CameraKitSource.html +2 -2
  21. package/docs/html/classes/LensPerformanceMeasurement.html +2 -2
  22. package/docs/html/classes/LensPerformanceMetrics.html +2 -2
  23. package/docs/html/classes/LensRepository.html +2 -2
  24. package/docs/html/classes/Transform2D.html +2 -2
  25. package/docs/html/classes/TypedCustomEvent.html +2 -2
  26. package/docs/html/classes/TypedEventTarget.html +2 -2
  27. package/docs/html/enums/Lens_CameraFacing.html +2 -2
  28. package/docs/html/functions/bootstrapCameraKit.html +2 -2
  29. package/docs/html/functions/createExtension.html +2 -2
  30. package/docs/html/functions/createImageSource.html +2 -2
  31. package/docs/html/functions/createMediaStreamSource.html +2 -2
  32. package/docs/html/functions/createVideoSource.html +2 -2
  33. package/docs/html/functions/estimateLensPerformance.html +2 -2
  34. package/docs/html/functions/filePickerFactory.html +2 -2
  35. package/docs/html/functions/getExtensionRequestContext.html +2 -2
  36. package/docs/html/functions/lensSourcesFactory.html +2 -2
  37. package/docs/html/functions/remoteApiServicesFactory.html +1 -1
  38. package/docs/html/hierarchy.html +1 -1
  39. package/docs/html/index.html +3 -3
  40. package/docs/html/interfaces/BitmojiUserInfo.html +2 -2
  41. package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +2 -2
  42. package/docs/html/interfaces/CameraKitDeviceOptions.html +2 -2
  43. package/docs/html/interfaces/CameraKitSourceInfo.html +2 -2
  44. package/docs/html/interfaces/CameraKitSourceSubscriber.html +2 -2
  45. package/docs/html/interfaces/ComputedFrameMetrics.html +2 -2
  46. package/docs/html/interfaces/CreateSessionOptions.html +2 -2
  47. package/docs/html/interfaces/EstimatedLensPerformance.html +2 -2
  48. package/docs/html/interfaces/Font.html +2 -2
  49. package/docs/html/interfaces/FriendUserInfo.html +2 -2
  50. package/docs/html/interfaces/FunctionSourceOptions.html +2 -2
  51. package/docs/html/interfaces/Keyboard.html +9 -9
  52. package/docs/html/interfaces/KeyboardActiveEvent.html +2 -2
  53. package/docs/html/interfaces/Lens.html +2 -2
  54. package/docs/html/interfaces/LensCreator.html +2 -2
  55. package/docs/html/interfaces/LensHttpRequest.html +2 -2
  56. package/docs/html/interfaces/LensLaunchData.html +2 -2
  57. package/docs/html/interfaces/LensSource.html +2 -2
  58. package/docs/html/interfaces/LensUserData.html +2 -2
  59. package/docs/html/interfaces/LoadAssetRequest.html +2 -2
  60. package/docs/html/interfaces/MediaStreamSourceOptions.html +2 -2
  61. package/docs/html/interfaces/Preview.html +2 -2
  62. package/docs/html/interfaces/RemoteApiRequest.html +2 -2
  63. package/docs/html/interfaces/RemoteApiResponse.html +2 -2
  64. package/docs/html/interfaces/RemoteApiService.html +2 -2
  65. package/docs/html/interfaces/Snapcode.html +2 -2
  66. package/docs/html/interfaces/UriCancelRequest.html +2 -2
  67. package/docs/html/interfaces/UriRequest.html +2 -2
  68. package/docs/html/interfaces/UriResponse.html +2 -2
  69. package/docs/html/interfaces/VideoSourceOptions.html +2 -2
  70. package/docs/html/modules.html +1 -1
  71. package/docs/html/types/ArgumentValidationError.html +2 -2
  72. package/docs/html/types/AssetLoader.html +2 -2
  73. package/docs/html/types/AssetResponse.html +1 -1
  74. package/docs/html/types/AssetTiming.html +2 -2
  75. package/docs/html/types/BenchmarkError.html +1 -1
  76. package/docs/html/types/BootstrapError.html +2 -2
  77. package/docs/html/types/CacheKeyNotFoundError.html +1 -1
  78. package/docs/html/types/CameraKitSessionEventListener.html +2 -2
  79. package/docs/html/types/CameraKitSessionEvents.html +2 -2
  80. package/docs/html/types/CameraKitSourceError.html +1 -1
  81. package/docs/html/types/ConfigurationError.html +2 -2
  82. package/docs/html/types/FetchHandler.html +1 -1
  83. package/docs/html/types/FilePicker.html +2 -2
  84. package/docs/html/types/FilePickerOptions.html +2 -2
  85. package/docs/html/types/FilePickerResult.html +2 -2
  86. package/docs/html/types/KeyboardEventListener.html +2 -2
  87. package/docs/html/types/KeyboardEvents.html +2 -2
  88. package/docs/html/types/LegalError.html +1 -1
  89. package/docs/html/types/LensAbortError.html +2 -2
  90. package/docs/html/types/LensAssetError.html +2 -2
  91. package/docs/html/types/LensContentValidationError.html +1 -1
  92. package/docs/html/types/LensError.html +1 -1
  93. package/docs/html/types/LensExecutionError.html +2 -2
  94. package/docs/html/types/LensHttpHandler.html +2 -2
  95. package/docs/html/types/LensImagePickerError.html +2 -2
  96. package/docs/html/types/LensLaunchParams.html +2 -2
  97. package/docs/html/types/LensMetricsEvents.html +2 -2
  98. package/docs/html/types/LensPerformanceCluster.html +1 -1
  99. package/docs/html/types/LensView.html +2 -2
  100. package/docs/html/types/LensWait.html +2 -2
  101. package/docs/html/types/Matrix.html +2 -2
  102. package/docs/html/types/PersistentStoreError.html +2 -2
  103. package/docs/html/types/PlatformNotSupportedError.html +2 -2
  104. package/docs/html/types/PublicContainer.html +2 -2
  105. package/docs/html/types/PublicServices.html +2 -2
  106. package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
  107. package/docs/html/types/RemoteApiRequestHandler.html +2 -2
  108. package/docs/html/types/RemoteApiServices.html +1 -1
  109. package/docs/html/types/RemoteApiStatus.html +2 -2
  110. package/docs/html/types/RenderTarget.html +2 -2
  111. package/docs/html/types/Uri.html +1 -1
  112. package/docs/html/types/WebGLError.html +1 -1
  113. package/docs/html/types/Zodiac.html +1 -1
  114. package/docs/html/variables/extensionRequestContext.html +2 -2
  115. package/docs/md/README.md +2 -2
  116. package/docs/md/classes/CameraKit.md +1 -1
  117. package/docs/md/classes/CameraKitSession.md +1 -1
  118. package/docs/md/classes/CameraKitSource.md +1 -1
  119. package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
  120. package/docs/md/classes/LensPerformanceMetrics.md +1 -1
  121. package/docs/md/classes/LensRepository.md +1 -1
  122. package/docs/md/classes/Transform2D.md +1 -1
  123. package/docs/md/classes/TypedCustomEvent.md +1 -1
  124. package/docs/md/classes/TypedEventTarget.md +1 -1
  125. package/docs/md/enumerations/Lens_CameraFacing.md +1 -1
  126. package/docs/md/functions/bootstrapCameraKit.md +1 -1
  127. package/docs/md/functions/createExtension.md +1 -1
  128. package/docs/md/functions/createImageSource.md +1 -1
  129. package/docs/md/functions/createMediaStreamSource.md +1 -1
  130. package/docs/md/functions/createVideoSource.md +1 -1
  131. package/docs/md/functions/estimateLensPerformance.md +1 -1
  132. package/docs/md/functions/filePickerFactory.md +1 -1
  133. package/docs/md/functions/getExtensionRequestContext.md +1 -1
  134. package/docs/md/functions/lensSourcesFactory.md +1 -1
  135. package/docs/md/functions/remoteApiServicesFactory.md +1 -1
  136. package/docs/md/globals.md +2 -2
  137. package/docs/md/interfaces/BitmojiUserInfo.md +1 -1
  138. package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
  139. package/docs/md/interfaces/CameraKitDeviceOptions.md +1 -1
  140. package/docs/md/interfaces/CameraKitSourceInfo.md +1 -1
  141. package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
  142. package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
  143. package/docs/md/interfaces/CreateSessionOptions.md +1 -1
  144. package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
  145. package/docs/md/interfaces/Font.md +1 -1
  146. package/docs/md/interfaces/FriendUserInfo.md +1 -1
  147. package/docs/md/interfaces/FunctionSourceOptions.md +1 -1
  148. package/docs/md/interfaces/Keyboard.md +3 -3
  149. package/docs/md/interfaces/KeyboardActiveEvent.md +1 -1
  150. package/docs/md/interfaces/Lens.md +1 -1
  151. package/docs/md/interfaces/LensCreator.md +1 -1
  152. package/docs/md/interfaces/LensHttpRequest.md +1 -1
  153. package/docs/md/interfaces/LensLaunchData.md +1 -1
  154. package/docs/md/interfaces/LensSource.md +1 -1
  155. package/docs/md/interfaces/LensUserData.md +1 -1
  156. package/docs/md/interfaces/LoadAssetRequest.md +1 -1
  157. package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
  158. package/docs/md/interfaces/Preview.md +1 -1
  159. package/docs/md/interfaces/RemoteApiRequest.md +1 -1
  160. package/docs/md/interfaces/RemoteApiResponse.md +1 -1
  161. package/docs/md/interfaces/RemoteApiService.md +1 -1
  162. package/docs/md/interfaces/Snapcode.md +1 -1
  163. package/docs/md/interfaces/UriCancelRequest.md +1 -1
  164. package/docs/md/interfaces/UriRequest.md +1 -1
  165. package/docs/md/interfaces/UriResponse.md +1 -1
  166. package/docs/md/interfaces/VideoSourceOptions.md +1 -1
  167. package/docs/md/type-aliases/ArgumentValidationError.md +1 -1
  168. package/docs/md/type-aliases/AssetLoader.md +1 -1
  169. package/docs/md/type-aliases/AssetResponse.md +1 -1
  170. package/docs/md/type-aliases/AssetTiming.md +1 -1
  171. package/docs/md/type-aliases/BenchmarkError.md +1 -1
  172. package/docs/md/type-aliases/BootstrapError.md +1 -1
  173. package/docs/md/type-aliases/CacheKeyNotFoundError.md +1 -1
  174. package/docs/md/type-aliases/CameraKitSessionEventListener.md +1 -1
  175. package/docs/md/type-aliases/CameraKitSessionEvents.md +1 -1
  176. package/docs/md/type-aliases/CameraKitSourceError.md +1 -1
  177. package/docs/md/type-aliases/ConfigurationError.md +1 -1
  178. package/docs/md/type-aliases/FetchHandler.md +1 -1
  179. package/docs/md/type-aliases/FilePicker.md +1 -1
  180. package/docs/md/type-aliases/FilePickerOptions.md +1 -1
  181. package/docs/md/type-aliases/FilePickerResult.md +1 -1
  182. package/docs/md/type-aliases/KeyboardEventListener.md +1 -1
  183. package/docs/md/type-aliases/KeyboardEvents.md +1 -1
  184. package/docs/md/type-aliases/LegalError.md +1 -1
  185. package/docs/md/type-aliases/LensAbortError.md +1 -1
  186. package/docs/md/type-aliases/LensAssetError.md +1 -1
  187. package/docs/md/type-aliases/LensContentValidationError.md +1 -1
  188. package/docs/md/type-aliases/LensError.md +1 -1
  189. package/docs/md/type-aliases/LensExecutionError.md +1 -1
  190. package/docs/md/type-aliases/LensHttpHandler.md +1 -1
  191. package/docs/md/type-aliases/LensImagePickerError.md +1 -1
  192. package/docs/md/type-aliases/LensLaunchParams.md +1 -1
  193. package/docs/md/type-aliases/LensMetricsEvents.md +1 -1
  194. package/docs/md/type-aliases/LensPerformanceCluster.md +1 -1
  195. package/docs/md/type-aliases/LensView.md +1 -1
  196. package/docs/md/type-aliases/LensWait.md +1 -1
  197. package/docs/md/type-aliases/Matrix.md +1 -1
  198. package/docs/md/type-aliases/PersistentStoreError.md +1 -1
  199. package/docs/md/type-aliases/PlatformNotSupportedError.md +1 -1
  200. package/docs/md/type-aliases/PublicContainer.md +1 -1
  201. package/docs/md/type-aliases/PublicServices.md +1 -1
  202. package/docs/md/type-aliases/RemoteApiCancelRequestHandler.md +1 -1
  203. package/docs/md/type-aliases/RemoteApiRequestHandler.md +1 -1
  204. package/docs/md/type-aliases/RemoteApiServices.md +1 -1
  205. package/docs/md/type-aliases/RemoteApiStatus.md +1 -1
  206. package/docs/md/type-aliases/RenderTarget.md +1 -1
  207. package/docs/md/type-aliases/Uri.md +1 -1
  208. package/docs/md/type-aliases/WebGLError.md +1 -1
  209. package/docs/md/type-aliases/Zodiac.md +1 -1
  210. package/docs/md/variables/extensionRequestContext.md +1 -1
  211. package/package.json +2 -2
package/README.md CHANGED
@@ -181,7 +181,7 @@ session.pause('capture');
181
181
 
182
182
  ## Error Handling
183
183
 
184
- Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.4.0/index.html). It is good practice to handle such cases, to provide a good experience to your users.
184
+ Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.5.0/index.html). It is good practice to handle such cases, to provide a good experience to your users.
185
185
 
186
186
  Errors may also occur during Lens rendering. For example, Lenses contain their own scripting, which could throw an error. A rendering error could also occur if a Lens attempts to use a feature that is not supported by Camera Kit Web SDK.
187
187
 
@@ -206,6 +206,7 @@ export declare const cameraKitFactory: {
206
206
  registerEndWebXrHandler: (handler: (() => void) | null) => void;
207
207
  setGeoDataProvider: (provider: import("./lens-core-module/generated-types").SetGeoDataProviderInput) => void;
208
208
  provideGeoData: (config: import("./lens-core-module/generated-types").ProvideGeoDataInput) => void;
209
+ setConfigurationProvider: (provider: import("./lens-core-module/generated-types").ConfigurationProvider) => void;
209
210
  } & {
210
211
  processFrame: (input: Omit<import("./lens-core-module/generated-types").ProcessFrameInput, "onFailure" | "onSuccess">) => Promise<any>;
211
212
  addLens: (input: Omit<import("./lens-core-module/generated-types").AddLensInput, "onFailure" | "onSuccess">) => Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"CameraKit.d.ts","sourceRoot":"","sources":["../src/CameraKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,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D;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAA0B;IAE/E,OAAO,CAAC,QAAQ,CAA0B;IAE1C,gBAAgB;;IAEZ;;OAEG;IACM,cAAc,EAAE,cAAc,EAEtB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,EAClC,YAAY,EAAE,mBAAmB,EAClD,UAAU,EAAE,kBAAkB;IAUlC;;;;;;;;;;;;;;;;OAgBG;IAEG,aAAa,CAAC,EAChB,gBAAgB,EAChB,oBAAoB,GACvB,GAAE,oBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmGxD;;OAEG;IAEG,OAAO;CAMhB;AAED,gBAAgB;AAChB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB5B,CAAC"}
@@ -1,2 +1,2 @@
1
- export default { PACKAGE_VERSION: "1.4.0" };
1
+ export default { PACKAGE_VERSION: "1.5.0" };
2
2
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.4.0\" };\n"]}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.5.0\" };\n"]}
@@ -310,6 +310,10 @@ export interface LensCoreConfig {
310
310
  };
311
311
  }
312
312
  export type SetPreloadedConfigurationInput = Array<LensCoreConfig>;
313
+ export interface ConfigurationRequest {
314
+ configId: string;
315
+ }
316
+ export type ConfigurationProvider = (configurationRequest: ConfigurationRequest) => Promise<LensCoreConfig | undefined>;
313
317
  export interface SetAllSoundsMutedInput {
314
318
  muted: boolean;
315
319
  fade: boolean;
@@ -495,6 +499,7 @@ export interface LensCoreModule extends InitialEmscriptenModule {
495
499
  setGpuIndex: (config: SetGpuIndexInput) => void;
496
500
  setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;
497
501
  provideGeoData: (config: ProvideGeoDataInput) => void;
502
+ setConfigurationProvider: (provider: ConfigurationProvider) => void;
498
503
  }
499
504
  declare global {
500
505
  function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;
@@ -1 +1 @@
1
- {"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":";;AAAA,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,sCAAsC,GAAG,0BAA0B,CAAC;AAErG,MAAM,MAAM,4BAA4B,GAAG,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,CAAC;AAEtF,MAAM,MAAM,iCAAiC,GAAG,CAAC,qBAAqB,EAAE,qBAAqB,KAAK,IAAI,CAAC;AAEvG,MAAM,MAAM,WAAW,GAC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K,IAAI,CAAC;IACtD,wBAAwB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvE;AAED,OAAO,CAAC,MAAM,CAAC;IAQX,SAAS,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,GAAG,cAAc,CAAC,CAAC;CACnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface OnTurnOnParam {\n needsAudioInput: boolean;\n}\n\nexport type TurnOnEventHandler = (arg: OnTurnOnParam) => void;\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: TurnOnEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface SetGpuIndexInput {\n gpuIndex: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport type SetGeoDataProviderInput = () => void;\n\nexport interface HourlyWeatherForecast {\n celsius: number;\n fahrenheit: number;\n displayTime: string;\n weatherCondition: string;\n localizedWeatherCondition: string;\n}\n\nexport interface WeatherData {\n locationName: string;\n celsius: number;\n fahrenheit: number;\n hourlyForecasts: HourlyWeatherForecast[];\n}\n\nexport interface GeoData {\n weather: WeatherData;\n}\n\nexport interface ProvideGeoDataInput {\n geoData: GeoData;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n setGpuIndex: (config: SetGpuIndexInput) => void;\n setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;\n provideGeoData: (config: ProvideGeoDataInput) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface OnTurnOnParam {\n needsAudioInput: boolean;\n}\n\nexport type TurnOnEventHandler = (arg: OnTurnOnParam) => void;\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: TurnOnEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface ConfigurationRequest {\n configId: string;\n}\n\nexport type ConfigurationProvider = (configurationRequest: ConfigurationRequest) => Promise<LensCoreConfig | undefined>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface SetGpuIndexInput {\n gpuIndex: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport type SetGeoDataProviderInput = () => void;\n\nexport interface HourlyWeatherForecast {\n celsius: number;\n fahrenheit: number;\n displayTime: string;\n weatherCondition: string;\n localizedWeatherCondition: string;\n}\n\nexport interface WeatherData {\n locationName: string;\n celsius: number;\n fahrenheit: number;\n hourlyForecasts: HourlyWeatherForecast[];\n}\n\nexport interface GeoData {\n weather: WeatherData;\n}\n\nexport interface ProvideGeoDataInput {\n geoData: GeoData;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n setGpuIndex: (config: SetGpuIndexInput) => void;\n setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;\n provideGeoData: (config: ProvideGeoDataInput) => void;\n setConfigurationProvider: (provider: ConfigurationProvider) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  export default {
2
- version: "305",
3
- buildNumber: "574",
4
- baseUrl: "https://cf-st.sc-cdn.net/d/mJaVaSIsblEzSy0An5Tei?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
2
+ version: "309",
3
+ buildNumber: "586",
4
+ baseUrl: "https://cf-st.sc-cdn.net/d/r38Sk7x9s1MK7V7P6U2SZ?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
5
5
  };
6
6
  //# sourceMappingURL=lensCoreWasmVersions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"305\",\n buildNumber: \"574\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/mJaVaSIsblEzSy0An5Tei?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
1
+ {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"309\",\n buildNumber: \"586\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/r38Sk7x9s1MK7V7P6U2SZ?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
@@ -69,14 +69,14 @@ export interface Keyboard {
69
69
  * @param callback - Function that handles the event.
70
70
  * @param options - Additional options for event listener behavior (optional).
71
71
  */
72
- addEventListener: (type: "active", callback: TypedEventListener<KeyboardEvents>, options?: TypedEventListenerOptions) => void;
72
+ addEventListener: (type: "active", callback: KeyboardEventListener, options?: TypedEventListenerOptions) => void;
73
73
  /**
74
74
  * Removes a previously added event listener.
75
75
  *
76
76
  * @param type - The type of event to remove.
77
77
  * @param callback - The event listener function to remove.
78
78
  */
79
- removeEventListener: (type: "active", callback: TypedEventListener<KeyboardEvents>) => void;
79
+ removeEventListener: (type: "active", callback: KeyboardEventListener) => void;
80
80
  /**
81
81
  * Sends a string of text to the active lens. The application should use this method
82
82
  * to provide user-typed input to the lens for display.
@@ -107,8 +107,8 @@ export declare class LensKeyboard {
107
107
  dismiss(): void;
108
108
  getElement(): HTMLTextAreaElement;
109
109
  sendInputToLens(text: string): void;
110
- addEventListener(type: "active", callback: TypedEventListener<KeyboardEvents>, options?: TypedEventListenerOptions): void;
111
- removeEventListener(type: "active", callback: TypedEventListener<KeyboardEvents>): void;
110
+ addEventListener(type: "active", callback: KeyboardEventListener, options?: TypedEventListenerOptions): void;
111
+ removeEventListener(type: "active", callback: KeyboardEventListener): void;
112
112
  toPublicInterface(): Keyboard;
113
113
  destroy(): void;
114
114
  private sendReply;
@@ -1 +1 @@
1
- {"version":3,"file":"LensKeyboard.d.ts","sourceRoot":"","sources":["../../src/session/LensKeyboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEhG,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,QAAQ;IACrB;;;;;;OAMG;IACH,gBAAgB,EAAE,CACd,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,kBAAkB,CAAC,cAAc,CAAC,EAC5C,OA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AI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CACL,CAAC;IACN,CAAC;IAEO,iBAAiB,CAAC,KAAoB;QAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAC5C;IACL,CAAC;CACJ;AAOD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CACzC,cAAc,EACd,CAAC,gBAAgB,CAAC,KAAK,CAAU,EACjC,CAAC,SAAoB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CACxD,CAAC","sourcesContent":["import { isState, forActions } from \"@snap/state-management\";\nimport { Injectable } from \"@snap/ts-inject\";\nimport { TypedCustomEvent } from \"../events/TypedCustomEvent\";\nimport type { TypedEventListener, TypedEventListenerOptions } from \"../events/TypedEventTarget\";\nimport { TypedEventTarget } from \"../events/TypedEventTarget\";\nimport type { UriHandler, UriResponse } from \"../uri-handlers/UriHandlers\";\nimport type { Lens } from \"../lens/Lens\";\nimport { getLogger } from \"../logger/logger\";\nimport type { LensState } from \"./lensState\";\nimport { lensStateFactory } from \"./lensState\";\n\nconst logger = getLogger(\"LensKeyboard\");\n\n/**\n * \"active\" event payload.\n *\n * This event is emitted when a lens requests a keyboard to be shown or dismissed.\n * The application should listen for this event and display or remove its keyboard UI accordingly.\n */\nexport interface KeyboardActiveEvent {\n /**\n * Indicates whether the keyboard should be displayed (`true`) or hidden (`false`).\n */\n active: boolean;\n\n /**\n * The current text input associated with the keyboard.\n */\n text: string;\n\n /**\n * The lens that initiated the keyboard request.\n */\n lens: Lens;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n element: HTMLTextAreaElement;\n}\n\n/**\n * Defines events emitted by the `Keyboard` API.\n */\nexport type KeyboardEvents = TypedCustomEvent<\"active\", KeyboardActiveEvent>;\n\n/**\n * Listener of {@link KeyboardEvents} events.\n */\nexport type KeyboardEventListener = TypedEventListener<KeyboardEvents>;\n\n/**\n * The `Keyboard` API enables applications to handle text input requests triggered by lenses.\n *\n * Lenses can request a keyboard display by emitting an `active` event. The application is responsible for displaying\n * a keyboard UI in response to this event.\n *\n * As users type, the application sends the typed text back to the lens using {@link Keyboard.sendInputToLens},\n * allowing the lens to display the text accordingly.\n *\n * Lenses can also request the keyboard to be dismissed. When this happens, the application receives an event\n * and should remove the displayed keyboard UI.\n *\n * @example\n * ```ts\n * cameraKitSession.keyboard.addEventListener('active', ({ detail }) => {\n * const { active, text } = detail;\n * if (active) {\n * showKeyboard(text, (newText) => cameraKitSession.keyboard.sendInputToLens(newText));\n * } else {\n * hideKeyboard();\n * }\n * });\n * ```\n *\n * @category Lenses\n */\nexport interface Keyboard {\n /**\n * Adds an event listener for keyboard-related events.\n *\n * @param type - The type of event to listen for (e.g., \"active\").\n * @param callback - Function that handles the event.\n * @param options - Additional options for event listener behavior (optional).\n */\n addEventListener: (\n type: \"active\",\n callback: TypedEventListener<KeyboardEvents>,\n options?: TypedEventListenerOptions\n ) => void;\n\n /**\n * Removes a previously added event listener.\n *\n * @param type - The type of event to remove.\n * @param callback - The event listener function to remove.\n */\n removeEventListener: (type: \"active\", callback: TypedEventListener<KeyboardEvents>) => void;\n\n /**\n * Sends a string of text to the active lens. The application should use this method\n * to provide user-typed input to the lens for display.\n *\n * @param text - The text to send to the lens. Supports escape sequences (e.g., `\\n` for multiline input).\n */\n sendInputToLens: (text: string) => void;\n\n /**\n * Dismisses the keyboard, clears the text input, and triggers an `active` event with `active: false`.\n * Applications can use this to remove on-screen text input elements when input is no longer needed.\n */\n dismiss: () => void;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n getElement: () => HTMLTextAreaElement;\n}\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L38\ntype KeyboardType = \"Text\" | \"Number\" | \"Phone\" | \"Url\";\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L44\ntype ReturnKeyType = \"Done\" | \"Go\" | \"Next\" | \"Return\" | \"Search\" | \"Send\";\n\ninterface RequestKeyboardData {\n enablePreview: boolean;\n end: number;\n keyboardType: KeyboardType;\n returnKeyType: ReturnKeyType;\n start: number;\n text: string;\n}\n\ninterface DismissReply {\n keyboardOpen: false;\n}\n\ninterface SetTextReply {\n text: string;\n start: number;\n end: number;\n done: boolean;\n shouldNotify: boolean;\n}\n\n/** @internal */\nexport class LensKeyboard {\n public readonly uriHandler: UriHandler;\n private readonly events: TypedEventTarget<KeyboardEvents>;\n private readonly element: HTMLTextAreaElement;\n private active = false;\n private text: string | undefined = undefined;\n private reply: (response: UriResponse) => void = () => {};\n\n constructor(private readonly lensState: LensState) {\n this.onElementKeyPress = this.onElementKeyPress.bind(this);\n this.events = new TypedEventTarget<KeyboardEvents>();\n this.element = document.createElement(\"textarea\");\n this.element.addEventListener(\"keypress\", this.onElementKeyPress);\n this.uriHandler = {\n uri: \"app://textInput/\",\n handleRequest: (request, reply) => {\n if (request.uri === \"app://textInput/requestKeyboard\") {\n const data = JSON.parse(new TextDecoder().decode(request.data)) as RequestKeyboardData;\n this.element.value = data.text;\n this.text = data.text;\n this.reply = reply;\n this.active = true;\n this.notifyClient();\n this.element.focus();\n } else if (request.uri === \"app://textInput/dismissKeyboard\") {\n this.active = false;\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n } else {\n logger.error(new Error(`Unhandled lens keyboard request '${request.uri}'.`));\n }\n },\n };\n lensState.events.pipe(forActions(\"turnedOff\")).subscribe(() => {\n this.dismiss();\n });\n }\n\n dismiss(): void {\n this.active = false;\n this.element.value = \"\";\n this.text = \"\";\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n }\n\n getElement(): HTMLTextAreaElement {\n return this.element;\n }\n\n sendInputToLens(text: string): void {\n this.element.value = text;\n this.text = text;\n this.sendReply({\n text: text,\n start: text.length,\n end: text.length,\n done: true,\n shouldNotify: true,\n });\n }\n\n addEventListener(\n type: \"active\",\n callback: TypedEventListener<KeyboardEvents>,\n options?: TypedEventListenerOptions\n ): void {\n this.events.addEventListener(type, callback, options);\n }\n\n removeEventListener(type: \"active\", callback: TypedEventListener<KeyboardEvents>): void {\n this.events.removeEventListener(type, callback);\n }\n\n toPublicInterface(): Keyboard {\n return {\n addEventListener: this.addEventListener.bind(this),\n removeEventListener: this.removeEventListener.bind(this),\n sendInputToLens: this.sendInputToLens.bind(this),\n dismiss: this.dismiss.bind(this),\n getElement: this.getElement.bind(this),\n };\n }\n\n destroy() {\n // TODO: remove when removing deprecated element ref\n this.element.removeEventListener(\"keypress\", this.onElementKeyPress);\n }\n\n private sendReply(data: DismissReply | SetTextReply) {\n this.reply({\n code: 200,\n description: \"\",\n contentType: \"application/json\",\n data: new TextEncoder().encode(JSON.stringify(data)),\n });\n }\n\n private notifyClient(): void {\n const state = this.lensState.getState();\n // If lens keyboard status is changing, we know a lens must be applied.\n if (isState(state, \"noLensApplied\")) return;\n this.events.dispatchEvent(\n new TypedCustomEvent(\"active\", {\n element: this.element,\n active: this.active,\n text: this.text ?? \"\",\n // If the keyboard is up, it has been triggered by an active lens.\n lens: state.data,\n })\n );\n }\n\n private onElementKeyPress(event: KeyboardEvent) {\n if (event.code === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.sendInputToLens(this.element.value);\n }\n }\n}\n\n/**\n * Factory function for creating a LensKeyboard instance.\n *\n * @internal\n */\nexport const lensKeyboardFactory = Injectable(\n \"lensKeyboard\",\n [lensStateFactory.token] as const,\n (lensState: LensState) => new LensKeyboard(lensState)\n);\n"]}
1
+ {"version":3,"file":"LensKeyboard.js","sourceRoot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C,CAAC;IACP,CAAC;IAEO,YAAY;;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAExC,IAAI,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC;YAAE,OAAO;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,CACrB,IAAI,gBAAgB,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE;YAErB,IAAI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CACL,CAAC;IACN,CAAC;IAEO,iBAAiB,CAAC,KAAoB;QAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAC5C;IACL,CAAC;CACJ;AAOD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CACzC,cAAc,EACd,CAAC,gBAAgB,CAAC,KAAK,CAAU,EACjC,CAAC,SAAoB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CACxD,CAAC","sourcesContent":["import { isState, forActions } from \"@snap/state-management\";\nimport { Injectable } from \"@snap/ts-inject\";\nimport { TypedCustomEvent } from \"../events/TypedCustomEvent\";\nimport type { TypedEventListener, TypedEventListenerOptions } from \"../events/TypedEventTarget\";\nimport { TypedEventTarget } from \"../events/TypedEventTarget\";\nimport type { UriHandler, UriResponse } from \"../uri-handlers/UriHandlers\";\nimport type { Lens } from \"../lens/Lens\";\nimport { getLogger } from \"../logger/logger\";\nimport type { LensState } from \"./lensState\";\nimport { lensStateFactory } from \"./lensState\";\n\nconst logger = getLogger(\"LensKeyboard\");\n\n/**\n * \"active\" event payload.\n *\n * This event is emitted when a lens requests a keyboard to be shown or dismissed.\n * The application should listen for this event and display or remove its keyboard UI accordingly.\n */\nexport interface KeyboardActiveEvent {\n /**\n * Indicates whether the keyboard should be displayed (`true`) or hidden (`false`).\n */\n active: boolean;\n\n /**\n * The current text input associated with the keyboard.\n */\n text: string;\n\n /**\n * The lens that initiated the keyboard request.\n */\n lens: Lens;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n element: HTMLTextAreaElement;\n}\n\n/**\n * Defines events emitted by the `Keyboard` API.\n */\nexport type KeyboardEvents = TypedCustomEvent<\"active\", KeyboardActiveEvent>;\n\n/**\n * Listener of {@link KeyboardEvents} events.\n */\nexport type KeyboardEventListener = TypedEventListener<KeyboardEvents>;\n\n/**\n * The `Keyboard` API enables applications to handle text input requests triggered by lenses.\n *\n * Lenses can request a keyboard display by emitting an `active` event. The application is responsible for displaying\n * a keyboard UI in response to this event.\n *\n * As users type, the application sends the typed text back to the lens using {@link Keyboard.sendInputToLens},\n * allowing the lens to display the text accordingly.\n *\n * Lenses can also request the keyboard to be dismissed. When this happens, the application receives an event\n * and should remove the displayed keyboard UI.\n *\n * @example\n * ```ts\n * cameraKitSession.keyboard.addEventListener('active', ({ detail }) => {\n * const { active, text } = detail;\n * if (active) {\n * showKeyboard(text, (newText) => cameraKitSession.keyboard.sendInputToLens(newText));\n * } else {\n * hideKeyboard();\n * }\n * });\n * ```\n *\n * @category Lenses\n */\nexport interface Keyboard {\n /**\n * Adds an event listener for keyboard-related events.\n *\n * @param type - The type of event to listen for (e.g., \"active\").\n * @param callback - Function that handles the event.\n * @param options - Additional options for event listener behavior (optional).\n */\n addEventListener: (type: \"active\", callback: KeyboardEventListener, options?: TypedEventListenerOptions) => void;\n\n /**\n * Removes a previously added event listener.\n *\n * @param type - The type of event to remove.\n * @param callback - The event listener function to remove.\n */\n removeEventListener: (type: \"active\", callback: KeyboardEventListener) => void;\n\n /**\n * Sends a string of text to the active lens. The application should use this method\n * to provide user-typed input to the lens for display.\n *\n * @param text - The text to send to the lens. Supports escape sequences (e.g., `\\n` for multiline input).\n */\n sendInputToLens: (text: string) => void;\n\n /**\n * Dismisses the keyboard, clears the text input, and triggers an `active` event with `active: false`.\n * Applications can use this to remove on-screen text input elements when input is no longer needed.\n */\n dismiss: () => void;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n getElement: () => HTMLTextAreaElement;\n}\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L38\ntype KeyboardType = \"Text\" | \"Number\" | \"Phone\" | \"Url\";\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L44\ntype ReturnKeyType = \"Done\" | \"Go\" | \"Next\" | \"Return\" | \"Search\" | \"Send\";\n\ninterface RequestKeyboardData {\n enablePreview: boolean;\n end: number;\n keyboardType: KeyboardType;\n returnKeyType: ReturnKeyType;\n start: number;\n text: string;\n}\n\ninterface DismissReply {\n keyboardOpen: false;\n}\n\ninterface SetTextReply {\n text: string;\n start: number;\n end: number;\n done: boolean;\n shouldNotify: boolean;\n}\n\n/** @internal */\nexport class LensKeyboard {\n public readonly uriHandler: UriHandler;\n private readonly events: TypedEventTarget<KeyboardEvents>;\n private readonly element: HTMLTextAreaElement;\n private active = false;\n private text: string | undefined = undefined;\n private reply: (response: UriResponse) => void = () => {};\n\n constructor(private readonly lensState: LensState) {\n this.onElementKeyPress = this.onElementKeyPress.bind(this);\n this.events = new TypedEventTarget<KeyboardEvents>();\n this.element = document.createElement(\"textarea\");\n this.element.addEventListener(\"keypress\", this.onElementKeyPress);\n this.uriHandler = {\n uri: \"app://textInput/\",\n handleRequest: (request, reply) => {\n if (request.uri === \"app://textInput/requestKeyboard\") {\n const data = JSON.parse(new TextDecoder().decode(request.data)) as RequestKeyboardData;\n this.element.value = data.text;\n this.text = data.text;\n this.reply = reply;\n this.active = true;\n this.notifyClient();\n this.element.focus();\n } else if (request.uri === \"app://textInput/dismissKeyboard\") {\n this.active = false;\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n } else {\n logger.error(new Error(`Unhandled lens keyboard request '${request.uri}'.`));\n }\n },\n };\n lensState.events.pipe(forActions(\"turnedOff\")).subscribe(() => {\n this.dismiss();\n });\n }\n\n dismiss(): void {\n this.active = false;\n this.element.value = \"\";\n this.text = \"\";\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n }\n\n getElement(): HTMLTextAreaElement {\n return this.element;\n }\n\n sendInputToLens(text: string): void {\n this.element.value = text;\n this.text = text;\n this.sendReply({\n text: text,\n start: text.length,\n end: text.length,\n done: true,\n shouldNotify: true,\n });\n }\n\n addEventListener(type: \"active\", callback: KeyboardEventListener, options?: TypedEventListenerOptions): void {\n this.events.addEventListener(type, callback, options);\n }\n\n removeEventListener(type: \"active\", callback: KeyboardEventListener): void {\n this.events.removeEventListener(type, callback);\n }\n\n toPublicInterface(): Keyboard {\n return {\n addEventListener: this.addEventListener.bind(this),\n removeEventListener: this.removeEventListener.bind(this),\n sendInputToLens: this.sendInputToLens.bind(this),\n dismiss: this.dismiss.bind(this),\n getElement: this.getElement.bind(this),\n };\n }\n\n destroy() {\n // TODO: remove when removing deprecated element ref\n this.element.removeEventListener(\"keypress\", this.onElementKeyPress);\n }\n\n private sendReply(data: DismissReply | SetTextReply) {\n this.reply({\n code: 200,\n description: \"\",\n contentType: \"application/json\",\n data: new TextEncoder().encode(JSON.stringify(data)),\n });\n }\n\n private notifyClient(): void {\n const state = this.lensState.getState();\n // If lens keyboard status is changing, we know a lens must be applied.\n if (isState(state, \"noLensApplied\")) return;\n this.events.dispatchEvent(\n new TypedCustomEvent(\"active\", {\n element: this.element,\n active: this.active,\n text: this.text ?? \"\",\n // If the keyboard is up, it has been triggered by an active lens.\n lens: state.data,\n })\n );\n }\n\n private onElementKeyPress(event: KeyboardEvent) {\n if (event.code === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.sendInputToLens(this.element.value);\n }\n }\n}\n\n/**\n * Factory function for creating a LensKeyboard instance.\n *\n * @internal\n */\nexport const lensKeyboardFactory = Injectable(\n \"lensKeyboard\",\n [lensStateFactory.token] as const,\n (lensState: LensState) => new LensKeyboard(lensState)\n);\n"]}
@@ -80,9 +80,6 @@ export declare const remoteApiServicesFactory: {
80
80
  token: "remoteApiServices";
81
81
  dependencies: [];
82
82
  };
83
- declare global {
84
- var __snap_camkit_ra_1: string | undefined;
85
- }
86
83
  /**
87
84
  * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,
88
85
  * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.
@@ -1 +1 @@
1
- {"version":3,"file":"remoteApiUriHandler.d.ts","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/remoteApiUriHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAIjE,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,gBAAgB,CAAC;AAyC9D;;GAEG;AACH,MAAM,MAAM,eAAe,GACrB,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,YAAY,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,IAAI,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAClC,KAAK,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,KAC3C,6BAA6B,GAAG,IAAI,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAAC;CACjG;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,EAAE,CAAC;AAEnD,eAAO,MAAM,wBAAwB;;;;CAGnC,CAAC;AAEH,OAAO,CAAC,MAAM,CAAC;IAEX,IAAI,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C;AAgBD;;;GAGG;AACH,wBAAgB,yBAAyB,CACrC,kBAAkB,EAAE,gBAAgB,EAAE,EACtC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,aAAa,GACvB,UAAU,CA2GZ"}
1
+ {"version":3,"file":"remoteApiUriHandler.d.ts","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/remoteApiUriHandler.ts"],"names":[],"mappings":"A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C;IAElB;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAAC;CACjG;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,EAAE,CAAC;AAEnD,eAAO,MAAM,wBAAwB;;;;CAGnC,CAAC;AAgBH;;;GAGG;AACH,wBAAgB,yBAAyB,CACrC,kBAAkB,EAAE,gBAAgB,EAAE,EACtC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,aAAa,GACvB,UAAU,CAkGZ"}
@@ -61,7 +61,7 @@ export function createRemoteApiUriHandler(registeredServices, sessionState, lens
61
61
  };
62
62
  },
63
63
  processRequest({ request, reply, lens, setCancellationHandler, state }) {
64
- var _a, _b;
64
+ var _a;
65
65
  const { route } = extractSchemeAndRoute(request.uri);
66
66
  const [specId, endpointIdWithQuery] = route.split("/").slice(2);
67
67
  const [endpointId] = endpointIdWithQuery.split("?");
@@ -79,9 +79,6 @@ export function createRemoteApiUriHandler(registeredServices, sessionState, lens
79
79
  parameters: request.metadata,
80
80
  };
81
81
  let requestHandler = getFirstRequestHandler((_a = registeredServiceMap.get(specId)) !== null && _a !== void 0 ? _a : [], remoteApiRequest, lens);
82
- if (!requestHandler && globalThis.__snap_camkit_ra_1) {
83
- requestHandler = getFirstRequestHandler((_b = registeredServiceMap.get(globalThis.__snap_camkit_ra_1)) !== null && _b !== void 0 ? _b : [], remoteApiRequest, lens);
84
- }
85
82
  if (!requestHandler)
86
83
  return;
87
84
  reportSingleCount("handled-requests");
@@ -1 +1 @@
1
- {"version":3,"file":"remoteApiUriHandler.js","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/remoteApiUriHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wEA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,eAAe,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrG,CAAC;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { Injectable } from \"@snap/ts-inject\";\nimport { RemoteApiInfo } from \"../../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport {\n ResponseCode,\n responseCodeToNumber,\n} from \"../../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport type { LensRepository } from \"../../lens/LensRepository\";\nimport type { Lens } from \"../../lens/Lens\";\nimport type { LensState } from \"../../session/lensState\";\nimport type { SessionState } from \"../../session/sessionState\";\nimport { getLogger } from \"../../logger/logger\";\nimport type { EnumToPublicStringLiteralMap, ExcludeKeys } from \"../../common/types\";\nimport type { MetricsClient } from \"../../clients/metricsClient\";\nimport { Count } from \"../../metrics/operational/Count\";\nimport { joinMetricNames } from \"../../metrics/operational/Metric\";\nimport { createUriRequestProcessor } from \"../uriRequestProcessor\";\nimport type { UriHandler, UriResponse } from \"../UriHandlers\";\nimport { extractSchemeAndRoute } from \"../UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\nconst remoteApiInfoProtobufTypeUrl = \"type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo\";\nconst remoteApiUploadImageSpecId = \"af3f69c8-2e62-441f-8b1c-d3956f7b336c\";\n\nconst statusToResponseCodeMap: ExcludeKeys<\n EnumToPublicStringLiteralMap<typeof ResponseCode>,\n \"responseCodeUnset\" | \"unrecognized\"\n> = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n // NOTE: This rule helps keep the public-facing RemoteApiStatus type consistent with the proto.\n // We prefer using a separate type for TypeDoc purposes.\n} satisfies Record<RemoteApiStatus, ResponseCode>;\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus =\n | \"success\"\n | \"redirected\"\n | \"badRequest\"\n | \"accessDenied\"\n | \"notFound\"\n | \"timeout\"\n | \"requestTooLarge\"\n | \"serverError\"\n | \"cancelled\"\n | \"proxyError\";\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that triggers the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\ndeclare global {\n // See internal-packages/camera-kit-extensions for the meaning of the field.\n var __snap_camkit_ra_1: string | undefined;\n}\n\n/**\n * Goes over provided services and returns the first request handler that is able to handle the request.\n */\nfunction getFirstRequestHandler(services: RemoteApiService[], remoteApiRequest: RemoteApiRequest, lens: Lens) {\n for (const service of services) {\n try {\n return service.getRequestHandler(remoteApiRequest, lens);\n } catch (error) {\n logger.warn(\"Client's Remote API request handler factory threw an error.\", error);\n }\n }\n return undefined;\n}\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function createRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n metrics: MetricsClient\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n return createUriRequestProcessor({\n uri: \"app://remote-api/performApiRequest\",\n lensState,\n sessionState,\n createLensRequestState(_request, lens) {\n return {\n supportedSpecIds: new Set([\n // Parse lens metadata to obtain supported Remote API specs.\n ...(lensRepository.getLensMetadata(lens.id)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds),\n // Also add remoteApiUploadImageSpecId as this spec should be available for all lenses.\n // See https://jira.sc-corp.net/browse/CAMKIT-6245.\n remoteApiUploadImageSpecId,\n ]),\n };\n },\n processRequest({ request, reply, lens, setCancellationHandler, state }) {\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n const dimensions = { specId };\n const reportSingleCount = (name: string) => {\n metrics.setOperationalMetrics(\n Count.count(joinMetricNames([\"lens\", \"remote-api\", name]), 1, dimensions)\n );\n };\n reportSingleCount(\"requests\");\n\n // Only handle requests for API spec ID that current lens supports.\n if (!state?.supportedSpecIds.has(specId)) return;\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: request.data,\n endpointId,\n parameters: request.metadata,\n };\n\n let requestHandler = getFirstRequestHandler(registeredServiceMap.get(specId) ?? [], remoteApiRequest, lens);\n\n // Check maybe there is an internal catch-all handler.\n if (!requestHandler && globalThis.__snap_camkit_ra_1) {\n requestHandler = getFirstRequestHandler(\n registeredServiceMap.get(globalThis.__snap_camkit_ra_1) ?? [],\n remoteApiRequest,\n lens\n );\n }\n if (!requestHandler) return;\n\n reportSingleCount(\"handled-requests\");\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reportSingleCount(\"responses\");\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\", error);\n }\n\n if (typeof cancellationHandler === \"function\") {\n setCancellationHandler(() => {\n try {\n cancellationHandler!();\n } catch (error) {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\", error);\n }\n });\n }\n },\n processInternalError(error) {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n metrics.setOperationalMetrics(Count.count(joinMetricNames([\"lens\", \"remote-api\", \"errors\"]), 1));\n },\n });\n}\n"]}
1
+ {"version":3,"file":"remoteApiUriHandler.js","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/remoteApiUriHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AACvG,OAAO,EACH,YAAY,EACZ,oBAAoB,GACvB,MAAM,sEAAsE,CAAC;AAK9E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,qB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IAAI,EAAE,QAAQ,CAAC,IAAI;wBACnB,QAAQ,kCACD,QAAQ,CAAC,QAAQ,KACpB,CAAC,uBAAuB,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,GAC3E;qBACJ,CAAC;oBACF,KAAK,CAAC,WAAW,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;aACN;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,CAAC,IAAI,CAAC,qDAAqD,EAAE,KAAK,CAAC,CAAC;aAC7E;YAED,IAAI,OAAO,mBAAmB,KAAK,UAAU,EAAE;gBAC3C,sBAAsB,CAAC,GAAG,EAAE;oBACxB,IAAI;wBACA,mBAAoB,EAAE,CAAC;qBAC1B;oBAAC,OAAO,KAAK,EAAE;wBACZ,MAAM,CAAC,IAAI,CAAC,kEAAkE,EAAE,KAAK,CAAC,CAAC;qBAC1F;gBACL,CAAC,CAAC,CAAC;aACN;QACL,CAAC;QACD,oBAAoB,CAAC,KAAK;YAItB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrG,CAAC;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { Injectable } from \"@snap/ts-inject\";\nimport { RemoteApiInfo } from \"../../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport {\n ResponseCode,\n responseCodeToNumber,\n} from \"../../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport type { LensRepository } from \"../../lens/LensRepository\";\nimport type { Lens } from \"../../lens/Lens\";\nimport type { LensState } from \"../../session/lensState\";\nimport type { SessionState } from \"../../session/sessionState\";\nimport { getLogger } from \"../../logger/logger\";\nimport type { EnumToPublicStringLiteralMap, ExcludeKeys } from \"../../common/types\";\nimport type { MetricsClient } from \"../../clients/metricsClient\";\nimport { Count } from \"../../metrics/operational/Count\";\nimport { joinMetricNames } from \"../../metrics/operational/Metric\";\nimport { createUriRequestProcessor } from \"../uriRequestProcessor\";\nimport type { UriHandler, UriResponse } from \"../UriHandlers\";\nimport { extractSchemeAndRoute } from \"../UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\nconst remoteApiInfoProtobufTypeUrl = \"type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo\";\nconst remoteApiUploadImageSpecId = \"af3f69c8-2e62-441f-8b1c-d3956f7b336c\";\n\nconst statusToResponseCodeMap: ExcludeKeys<\n EnumToPublicStringLiteralMap<typeof ResponseCode>,\n \"responseCodeUnset\" | \"unrecognized\"\n> = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n // NOTE: This rule helps keep the public-facing RemoteApiStatus type consistent with the proto.\n // We prefer using a separate type for TypeDoc purposes.\n} satisfies Record<RemoteApiStatus, ResponseCode>;\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus =\n | \"success\"\n | \"redirected\"\n | \"badRequest\"\n | \"accessDenied\"\n | \"notFound\"\n | \"timeout\"\n | \"requestTooLarge\"\n | \"serverError\"\n | \"cancelled\"\n | \"proxyError\";\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that triggers the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\n/**\n * Goes over provided services and returns the first request handler that is able to handle the request.\n */\nfunction getFirstRequestHandler(services: RemoteApiService[], remoteApiRequest: RemoteApiRequest, lens: Lens) {\n for (const service of services) {\n try {\n return service.getRequestHandler(remoteApiRequest, lens);\n } catch (error) {\n logger.warn(\"Client's Remote API request handler factory threw an error.\", error);\n }\n }\n return undefined;\n}\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function createRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n metrics: MetricsClient\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n return createUriRequestProcessor({\n uri: \"app://remote-api/performApiRequest\",\n lensState,\n sessionState,\n createLensRequestState(_request, lens) {\n return {\n supportedSpecIds: new Set([\n // Parse lens metadata to obtain supported Remote API specs.\n ...(lensRepository.getLensMetadata(lens.id)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds),\n // Also add remoteApiUploadImageSpecId as this spec should be available for all lenses.\n // See https://jira.sc-corp.net/browse/CAMKIT-6245.\n remoteApiUploadImageSpecId,\n ]),\n };\n },\n processRequest({ request, reply, lens, setCancellationHandler, state }) {\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n const dimensions = { specId };\n const reportSingleCount = (name: string) => {\n metrics.setOperationalMetrics(\n Count.count(joinMetricNames([\"lens\", \"remote-api\", name]), 1, dimensions)\n );\n };\n reportSingleCount(\"requests\");\n\n // Only handle requests for API spec ID that current lens supports.\n if (!state?.supportedSpecIds.has(specId)) return;\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: request.data,\n endpointId,\n parameters: request.metadata,\n };\n\n let requestHandler = getFirstRequestHandler(registeredServiceMap.get(specId) ?? [], remoteApiRequest, lens);\n if (!requestHandler) return;\n\n reportSingleCount(\"handled-requests\");\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reportSingleCount(\"responses\");\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\", error);\n }\n\n if (typeof cancellationHandler === \"function\") {\n setCancellationHandler(() => {\n try {\n cancellationHandler!();\n } catch (error) {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\", error);\n }\n });\n }\n },\n processInternalError(error) {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n metrics.setOperationalMetrics(Count.count(joinMetricNames([\"lens\", \"remote-api\", \"errors\"]), 1));\n },\n });\n}\n"]}
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKit | CameraKit Web SDK - v1.4.0</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.4.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKit.html">CameraKit</a></li></ul><h1>Class CameraKit</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The entry point to the CameraKit SDK's API. Most of CameraKit's features are accessed via this class.</p>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKit | CameraKit Web SDK - v1.5.0</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.5.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKit.html">CameraKit</a></li></ul><h1>Class CameraKit</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The entry point to the CameraKit SDK's API. Most of CameraKit's features are accessed via this class.</p>
2
2
  <p>Applications obtain an instance of CameraKit by calling <a href="../functions/bootstrapCameraKit.html" class="tsd-kind-function">bootstrapCameraKit</a>.</p>
3
3
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">cameraKit</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">bootstrapCameraKit</span><span class="hl-1">(</span><span class="hl-0">config</span><span class="hl-1">)</span>
4
4
  </code><button type="button">Copy</button></pre>
@@ -25,4 +25,4 @@ to Lens rendering.</p>
25
25
  </code><button type="button">Copy</button></pre>
26
26
 
27
27
  </div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Destroys all sessions and frees all resources.</p>
28
- </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#lenses" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lenses</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#lensrepository" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lens<wbr/>Repository</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#createsession" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Session</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
28
+ </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#lenses" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lenses</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#lensrepository" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lens<wbr/>Repository</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#createsession" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Session</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.5.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>