@snap/camera-kit 1.7.0 → 1.9.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 (234) 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/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/lens-core-module/generated-types.d.ts +12 -0
  10. package/dist/lens-core-module/generated-types.d.ts.map +1 -1
  11. package/dist/lens-core-module/generated-types.js.map +1 -1
  12. package/dist/lens-core-module/lensCore.d.ts.map +1 -1
  13. package/dist/lens-core-module/lensCore.js +2 -1
  14. package/dist/lens-core-module/lensCore.js.map +1 -1
  15. package/dist/lens-core-module/loader/bootstrapURLs.d.ts +1 -1
  16. package/dist/lens-core-module/loader/bootstrapURLs.d.ts.map +1 -1
  17. package/dist/lens-core-module/loader/bootstrapURLs.js +5 -13
  18. package/dist/lens-core-module/loader/bootstrapURLs.js.map +1 -1
  19. package/dist/lensCoreWasmVersions.js +3 -3
  20. package/dist/lensCoreWasmVersions.js.map +1 -1
  21. package/dist/platform/platformCapabilities.d.ts +0 -1
  22. package/dist/platform/platformCapabilities.d.ts.map +1 -1
  23. package/dist/platform/platformCapabilities.js +2 -4
  24. package/dist/platform/platformCapabilities.js.map +1 -1
  25. package/dist/session/CameraKitSession.d.ts +15 -0
  26. package/dist/session/CameraKitSession.d.ts.map +1 -1
  27. package/dist/session/CameraKitSession.js +13 -1
  28. package/dist/session/CameraKitSession.js.map +1 -1
  29. package/dist/session/screenRegions.d.ts +110 -0
  30. package/dist/session/screenRegions.d.ts.map +1 -0
  31. package/dist/session/screenRegions.js +62 -0
  32. package/dist/session/screenRegions.js.map +1 -0
  33. package/docs/html/assets/navigation.js +1 -1
  34. package/docs/html/assets/search.js +1 -1
  35. package/docs/html/classes/CameraKit.html +2 -2
  36. package/docs/html/classes/CameraKitSession.html +11 -2
  37. package/docs/html/classes/CameraKitSource.html +2 -2
  38. package/docs/html/classes/LensPerformanceMeasurement.html +2 -2
  39. package/docs/html/classes/LensPerformanceMetrics.html +2 -2
  40. package/docs/html/classes/LensRepository.html +2 -2
  41. package/docs/html/classes/Transform2D.html +2 -2
  42. package/docs/html/classes/TypedCustomEvent.html +3 -3
  43. package/docs/html/classes/TypedEventTarget.html +2 -2
  44. package/docs/html/enums/Lens_CameraFacing.html +2 -2
  45. package/docs/html/functions/bootstrapCameraKit.html +2 -2
  46. package/docs/html/functions/createExtension.html +2 -2
  47. package/docs/html/functions/createImageSource.html +2 -2
  48. package/docs/html/functions/createMediaStreamSource.html +2 -2
  49. package/docs/html/functions/createVideoSource.html +2 -2
  50. package/docs/html/functions/estimateLensPerformance.html +2 -2
  51. package/docs/html/functions/filePickerFactory.html +2 -2
  52. package/docs/html/functions/getExtensionRequestContext.html +2 -2
  53. package/docs/html/functions/lensSourcesFactory.html +2 -2
  54. package/docs/html/functions/remoteApiServicesFactory.html +1 -1
  55. package/docs/html/hierarchy.html +1 -1
  56. package/docs/html/index.html +3 -3
  57. package/docs/html/interfaces/BitmojiUserInfo.html +2 -2
  58. package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +2 -2
  59. package/docs/html/interfaces/CameraKitDeviceOptions.html +2 -2
  60. package/docs/html/interfaces/CameraKitSourceInfo.html +2 -2
  61. package/docs/html/interfaces/CameraKitSourceSubscriber.html +2 -2
  62. package/docs/html/interfaces/ComputedFrameMetrics.html +2 -2
  63. package/docs/html/interfaces/CreateSessionOptions.html +2 -2
  64. package/docs/html/interfaces/EstimatedLensPerformance.html +2 -2
  65. package/docs/html/interfaces/Font.html +2 -2
  66. package/docs/html/interfaces/FriendUserInfo.html +2 -2
  67. package/docs/html/interfaces/FunctionSourceOptions.html +2 -2
  68. package/docs/html/interfaces/Keyboard.html +2 -2
  69. package/docs/html/interfaces/KeyboardActiveEvent.html +2 -2
  70. package/docs/html/interfaces/Lens.html +2 -2
  71. package/docs/html/interfaces/LensCreator.html +2 -2
  72. package/docs/html/interfaces/LensHttpRequest.html +2 -2
  73. package/docs/html/interfaces/LensLaunchData.html +2 -2
  74. package/docs/html/interfaces/LensSource.html +2 -2
  75. package/docs/html/interfaces/LensUserData.html +2 -2
  76. package/docs/html/interfaces/LoadAssetRequest.html +2 -2
  77. package/docs/html/interfaces/MediaStreamSourceOptions.html +2 -2
  78. package/docs/html/interfaces/Preview.html +2 -2
  79. package/docs/html/interfaces/RemoteApiRequest.html +2 -2
  80. package/docs/html/interfaces/RemoteApiResponse.html +2 -2
  81. package/docs/html/interfaces/RemoteApiService.html +2 -2
  82. package/docs/html/interfaces/ScreenRegion.html +12 -0
  83. package/docs/html/interfaces/Snapcode.html +2 -2
  84. package/docs/html/interfaces/UriCancelRequest.html +2 -2
  85. package/docs/html/interfaces/UriRequest.html +2 -2
  86. package/docs/html/interfaces/UriResponse.html +2 -2
  87. package/docs/html/interfaces/VideoSourceOptions.html +2 -2
  88. package/docs/html/modules.html +1 -1
  89. package/docs/html/types/ArgumentValidationError.html +2 -2
  90. package/docs/html/types/AssetLoader.html +2 -2
  91. package/docs/html/types/AssetResponse.html +1 -1
  92. package/docs/html/types/AssetTiming.html +2 -2
  93. package/docs/html/types/BenchmarkError.html +1 -1
  94. package/docs/html/types/BootstrapError.html +2 -2
  95. package/docs/html/types/CacheKeyNotFoundError.html +1 -1
  96. package/docs/html/types/CameraKitSessionEventListener.html +2 -2
  97. package/docs/html/types/CameraKitSessionEvents.html +2 -2
  98. package/docs/html/types/CameraKitSourceError.html +1 -1
  99. package/docs/html/types/ConfigurationError.html +2 -2
  100. package/docs/html/types/FetchHandler.html +1 -1
  101. package/docs/html/types/FilePicker.html +2 -2
  102. package/docs/html/types/FilePickerOptions.html +2 -2
  103. package/docs/html/types/FilePickerResult.html +2 -2
  104. package/docs/html/types/KeyboardEventListener.html +2 -2
  105. package/docs/html/types/KeyboardEvents.html +2 -2
  106. package/docs/html/types/LegalError.html +1 -1
  107. package/docs/html/types/LensAbortError.html +2 -2
  108. package/docs/html/types/LensAssetError.html +2 -2
  109. package/docs/html/types/LensContentValidationError.html +1 -1
  110. package/docs/html/types/LensError.html +1 -1
  111. package/docs/html/types/LensExecutionError.html +2 -2
  112. package/docs/html/types/LensHttpHandler.html +2 -2
  113. package/docs/html/types/LensImagePickerError.html +2 -2
  114. package/docs/html/types/LensLaunchParams.html +2 -2
  115. package/docs/html/types/LensMetricsEvents.html +2 -2
  116. package/docs/html/types/LensPerformanceCluster.html +1 -1
  117. package/docs/html/types/LensView.html +2 -2
  118. package/docs/html/types/LensWait.html +2 -2
  119. package/docs/html/types/Matrix.html +2 -2
  120. package/docs/html/types/PersistentStoreError.html +2 -2
  121. package/docs/html/types/PlatformNotSupportedError.html +2 -2
  122. package/docs/html/types/PublicContainer.html +2 -2
  123. package/docs/html/types/PublicServices.html +2 -2
  124. package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
  125. package/docs/html/types/RemoteApiRequestHandler.html +2 -2
  126. package/docs/html/types/RemoteApiServices.html +1 -1
  127. package/docs/html/types/RemoteApiStatus.html +2 -2
  128. package/docs/html/types/RenderTarget.html +2 -2
  129. package/docs/html/types/ScreenRegionType.html +9 -0
  130. package/docs/html/types/ScreenRegions.html +10 -0
  131. package/docs/html/types/Uri.html +1 -1
  132. package/docs/html/types/WebGLError.html +1 -1
  133. package/docs/html/types/Zodiac.html +1 -1
  134. package/docs/html/variables/extensionRequestContext.html +2 -2
  135. package/docs/md/README.md +2 -2
  136. package/docs/md/classes/CameraKit.md +1 -1
  137. package/docs/md/classes/CameraKitSession.md +30 -1
  138. package/docs/md/classes/CameraKitSource.md +1 -1
  139. package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
  140. package/docs/md/classes/LensPerformanceMetrics.md +1 -1
  141. package/docs/md/classes/LensRepository.md +1 -1
  142. package/docs/md/classes/Transform2D.md +1 -1
  143. package/docs/md/classes/TypedCustomEvent.md +1 -1
  144. package/docs/md/classes/TypedEventTarget.md +1 -1
  145. package/docs/md/enumerations/Lens_CameraFacing.md +1 -1
  146. package/docs/md/functions/bootstrapCameraKit.md +1 -1
  147. package/docs/md/functions/createExtension.md +1 -1
  148. package/docs/md/functions/createImageSource.md +1 -1
  149. package/docs/md/functions/createMediaStreamSource.md +1 -1
  150. package/docs/md/functions/createVideoSource.md +1 -1
  151. package/docs/md/functions/estimateLensPerformance.md +1 -1
  152. package/docs/md/functions/filePickerFactory.md +1 -1
  153. package/docs/md/functions/getExtensionRequestContext.md +1 -1
  154. package/docs/md/functions/lensSourcesFactory.md +1 -1
  155. package/docs/md/functions/remoteApiServicesFactory.md +1 -1
  156. package/docs/md/globals.md +5 -2
  157. package/docs/md/interfaces/BitmojiUserInfo.md +1 -1
  158. package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
  159. package/docs/md/interfaces/CameraKitDeviceOptions.md +1 -1
  160. package/docs/md/interfaces/CameraKitSourceInfo.md +1 -1
  161. package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
  162. package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
  163. package/docs/md/interfaces/CreateSessionOptions.md +1 -1
  164. package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
  165. package/docs/md/interfaces/Font.md +1 -1
  166. package/docs/md/interfaces/FriendUserInfo.md +1 -1
  167. package/docs/md/interfaces/FunctionSourceOptions.md +1 -1
  168. package/docs/md/interfaces/Keyboard.md +1 -1
  169. package/docs/md/interfaces/KeyboardActiveEvent.md +1 -1
  170. package/docs/md/interfaces/Lens.md +1 -1
  171. package/docs/md/interfaces/LensCreator.md +1 -1
  172. package/docs/md/interfaces/LensHttpRequest.md +1 -1
  173. package/docs/md/interfaces/LensLaunchData.md +1 -1
  174. package/docs/md/interfaces/LensSource.md +1 -1
  175. package/docs/md/interfaces/LensUserData.md +1 -1
  176. package/docs/md/interfaces/LoadAssetRequest.md +1 -1
  177. package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
  178. package/docs/md/interfaces/Preview.md +1 -1
  179. package/docs/md/interfaces/RemoteApiRequest.md +1 -1
  180. package/docs/md/interfaces/RemoteApiResponse.md +1 -1
  181. package/docs/md/interfaces/RemoteApiService.md +1 -1
  182. package/docs/md/interfaces/ScreenRegion.md +44 -0
  183. package/docs/md/interfaces/Snapcode.md +1 -1
  184. package/docs/md/interfaces/UriCancelRequest.md +1 -1
  185. package/docs/md/interfaces/UriRequest.md +1 -1
  186. package/docs/md/interfaces/UriResponse.md +1 -1
  187. package/docs/md/interfaces/VideoSourceOptions.md +1 -1
  188. package/docs/md/type-aliases/ArgumentValidationError.md +1 -1
  189. package/docs/md/type-aliases/AssetLoader.md +1 -1
  190. package/docs/md/type-aliases/AssetResponse.md +1 -1
  191. package/docs/md/type-aliases/AssetTiming.md +1 -1
  192. package/docs/md/type-aliases/BenchmarkError.md +1 -1
  193. package/docs/md/type-aliases/BootstrapError.md +1 -1
  194. package/docs/md/type-aliases/CacheKeyNotFoundError.md +1 -1
  195. package/docs/md/type-aliases/CameraKitSessionEventListener.md +1 -1
  196. package/docs/md/type-aliases/CameraKitSessionEvents.md +1 -1
  197. package/docs/md/type-aliases/CameraKitSourceError.md +1 -1
  198. package/docs/md/type-aliases/ConfigurationError.md +1 -1
  199. package/docs/md/type-aliases/FetchHandler.md +1 -1
  200. package/docs/md/type-aliases/FilePicker.md +1 -1
  201. package/docs/md/type-aliases/FilePickerOptions.md +1 -1
  202. package/docs/md/type-aliases/FilePickerResult.md +1 -1
  203. package/docs/md/type-aliases/KeyboardEventListener.md +1 -1
  204. package/docs/md/type-aliases/KeyboardEvents.md +1 -1
  205. package/docs/md/type-aliases/LegalError.md +1 -1
  206. package/docs/md/type-aliases/LensAbortError.md +1 -1
  207. package/docs/md/type-aliases/LensAssetError.md +1 -1
  208. package/docs/md/type-aliases/LensContentValidationError.md +1 -1
  209. package/docs/md/type-aliases/LensError.md +1 -1
  210. package/docs/md/type-aliases/LensExecutionError.md +1 -1
  211. package/docs/md/type-aliases/LensHttpHandler.md +1 -1
  212. package/docs/md/type-aliases/LensImagePickerError.md +1 -1
  213. package/docs/md/type-aliases/LensLaunchParams.md +1 -1
  214. package/docs/md/type-aliases/LensMetricsEvents.md +1 -1
  215. package/docs/md/type-aliases/LensPerformanceCluster.md +1 -1
  216. package/docs/md/type-aliases/LensView.md +1 -1
  217. package/docs/md/type-aliases/LensWait.md +1 -1
  218. package/docs/md/type-aliases/Matrix.md +1 -1
  219. package/docs/md/type-aliases/PersistentStoreError.md +1 -1
  220. package/docs/md/type-aliases/PlatformNotSupportedError.md +1 -1
  221. package/docs/md/type-aliases/PublicContainer.md +1 -1
  222. package/docs/md/type-aliases/PublicServices.md +1 -1
  223. package/docs/md/type-aliases/RemoteApiCancelRequestHandler.md +1 -1
  224. package/docs/md/type-aliases/RemoteApiRequestHandler.md +1 -1
  225. package/docs/md/type-aliases/RemoteApiServices.md +1 -1
  226. package/docs/md/type-aliases/RemoteApiStatus.md +1 -1
  227. package/docs/md/type-aliases/RenderTarget.md +1 -1
  228. package/docs/md/type-aliases/ScreenRegionType.md +17 -0
  229. package/docs/md/type-aliases/ScreenRegions.md +59 -0
  230. package/docs/md/type-aliases/Uri.md +1 -1
  231. package/docs/md/type-aliases/WebGLError.md +1 -1
  232. package/docs/md/type-aliases/Zodiac.md +1 -1
  233. package/docs/md/variables/extensionRequestContext.md +1 -1
  234. package/package.json +2 -2
@@ -0,0 +1,59 @@
1
+ [**CameraKit Web SDK v1.9.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [CameraKit Web SDK](../globals.md) / ScreenRegions
6
+
7
+ # Type Alias: ScreenRegions
8
+
9
+ > **ScreenRegions**: `{ [K in ScreenRegionType]?: ScreenRegion }`
10
+
11
+ Configuration for screen regions used by Lenses.
12
+
13
+ Screen regions help Lenses adapt their content placement based on the host
14
+ application's UI layout. All coordinates are normalized (0.0 to 1.0) relative
15
+ to the canvas dimensions.
16
+
17
+ Only the regions specified in this object will be active - any previously set
18
+ regions not included will be automatically removed.
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ // Set initial safe rendering area
24
+ await session.setScreenRegions({
25
+ safeRender: {
26
+ x: 0.1,
27
+ y: 0.1,
28
+ width: 0.8,
29
+ height: 0.8
30
+ }
31
+ });
32
+
33
+ // When keyboard appears, update both regions
34
+ await session.setScreenRegions({
35
+ safeRender: {
36
+ x: 0.1,
37
+ y: 0.1,
38
+ width: 0.8,
39
+ height: 0.5
40
+ },
41
+ keyboard: {
42
+ x: 0,
43
+ y: 0.5,
44
+ width: 1.0,
45
+ height: 0.5
46
+ }
47
+ });
48
+
49
+ // When keyboard disappears, only specify safeRender
50
+ // (keyboard region will be automatically removed)
51
+ await session.setScreenRegions({
52
+ safeRender: {
53
+ x: 0.1,
54
+ y: 0.1,
55
+ width: 0.8,
56
+ height: 0.8
57
+ }
58
+ });
59
+ ```
@@ -1,4 +1,4 @@
1
- [**CameraKit Web SDK v1.7.0**](../README.md)
1
+ [**CameraKit Web SDK v1.9.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CameraKit Web SDK v1.7.0**](../README.md)
1
+ [**CameraKit Web SDK v1.9.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CameraKit Web SDK v1.7.0**](../README.md)
1
+ [**CameraKit Web SDK v1.9.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CameraKit Web SDK v1.7.0**](../README.md)
1
+ [**CameraKit Web SDK v1.9.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snap/camera-kit",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Camera Kit Web",
6
6
  "homepage": "https://ar.snap.com/camera-kit",
@@ -75,7 +75,7 @@
75
75
  "dependencies": {
76
76
  "@bufbuild/protobuf": "^2.0.0",
77
77
  "@improbable-eng/grpc-web": "^0.15.0",
78
- "@snap/state-management": "^1.7.0",
78
+ "@snap/state-management": "^1.9.0",
79
79
  "@snap/ts-inject": "^0.3.1",
80
80
  "browser-fs-access": "^0.35.0",
81
81
  "browser-headers": "^0.4.1",