@microsoft/live-share-react 1.4.0-preview.0 → 2.0.0-internal.10

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 (383) hide show
  1. package/LICENSE +64 -61
  2. package/README.md +173 -168
  3. package/bin/cjs/index.d.ts +7 -0
  4. package/bin/cjs/index.d.ts.map +1 -0
  5. package/bin/cjs/index.js +23 -0
  6. package/bin/cjs/index.js.map +1 -0
  7. package/bin/cjs/interfaces/LiveInterfaceExtensions.d.ts.map +1 -0
  8. package/bin/cjs/interfaces/LiveInterfaceExtensions.js +7 -0
  9. package/bin/cjs/interfaces/LiveInterfaceExtensions.js.map +1 -0
  10. package/bin/cjs/interfaces/index.d.ts +2 -0
  11. package/bin/cjs/interfaces/index.d.ts.map +1 -0
  12. package/bin/cjs/interfaces/index.js +18 -0
  13. package/bin/cjs/interfaces/index.js.map +1 -0
  14. package/bin/{internal → cjs/internal}/errors.d.ts +15 -0
  15. package/bin/cjs/internal/errors.d.ts.map +1 -0
  16. package/bin/cjs/internal/errors.js +48 -0
  17. package/bin/cjs/internal/errors.js.map +1 -0
  18. package/bin/cjs/internal/index.d.ts +3 -0
  19. package/bin/cjs/internal/index.d.ts.map +1 -0
  20. package/bin/cjs/internal/index.js +19 -0
  21. package/bin/cjs/internal/index.js.map +1 -0
  22. package/bin/{internal → cjs/internal}/type-guards.d.ts +5 -0
  23. package/bin/cjs/internal/type-guards.d.ts.map +1 -0
  24. package/bin/cjs/internal/type-guards.js +24 -0
  25. package/bin/cjs/internal/type-guards.js.map +1 -0
  26. package/bin/cjs/live-hooks/index.d.ts +8 -0
  27. package/bin/cjs/live-hooks/index.d.ts.map +1 -0
  28. package/bin/cjs/live-hooks/index.js +24 -0
  29. package/bin/cjs/live-hooks/index.js.map +1 -0
  30. package/bin/cjs/live-hooks/useLiveCanvas.d.ts +80 -0
  31. package/bin/cjs/live-hooks/useLiveCanvas.d.ts.map +1 -0
  32. package/bin/cjs/live-hooks/useLiveCanvas.js +244 -0
  33. package/bin/cjs/live-hooks/useLiveCanvas.js.map +1 -0
  34. package/bin/{live-hooks → cjs/live-hooks}/useLiveEvent.d.ts +37 -1
  35. package/bin/cjs/live-hooks/useLiveEvent.d.ts.map +1 -0
  36. package/bin/cjs/live-hooks/useLiveEvent.js +150 -0
  37. package/bin/cjs/live-hooks/useLiveEvent.js.map +1 -0
  38. package/bin/cjs/live-hooks/useLiveFollowMode.d.ts +163 -0
  39. package/bin/cjs/live-hooks/useLiveFollowMode.d.ts.map +1 -0
  40. package/bin/cjs/live-hooks/useLiveFollowMode.js +360 -0
  41. package/bin/cjs/live-hooks/useLiveFollowMode.js.map +1 -0
  42. package/bin/cjs/live-hooks/useLivePresence.d.ts +76 -0
  43. package/bin/cjs/live-hooks/useLivePresence.d.ts.map +1 -0
  44. package/bin/cjs/live-hooks/useLivePresence.js +170 -0
  45. package/bin/cjs/live-hooks/useLivePresence.js.map +1 -0
  46. package/bin/{live-hooks → cjs/live-hooks}/useLiveState.d.ts +46 -1
  47. package/bin/cjs/live-hooks/useLiveState.d.ts.map +1 -0
  48. package/bin/cjs/live-hooks/useLiveState.js +134 -0
  49. package/bin/cjs/live-hooks/useLiveState.js.map +1 -0
  50. package/bin/{live-hooks → cjs/live-hooks}/useLiveTimer.d.ts +56 -1
  51. package/bin/cjs/live-hooks/useLiveTimer.d.ts.map +1 -0
  52. package/bin/cjs/live-hooks/useLiveTimer.js +233 -0
  53. package/bin/cjs/live-hooks/useLiveTimer.js.map +1 -0
  54. package/bin/cjs/live-hooks/useMediaSynchronizer.d.ts +86 -0
  55. package/bin/cjs/live-hooks/useMediaSynchronizer.d.ts.map +1 -0
  56. package/bin/cjs/live-hooks/useMediaSynchronizer.js +301 -0
  57. package/bin/cjs/live-hooks/useMediaSynchronizer.js.map +1 -0
  58. package/bin/cjs/package.json +1 -0
  59. package/bin/{providers → cjs/providers}/AzureProvider.d.ts +9 -9
  60. package/bin/cjs/providers/AzureProvider.d.ts.map +1 -0
  61. package/bin/cjs/providers/AzureProvider.js +127 -0
  62. package/bin/cjs/providers/AzureProvider.js.map +1 -0
  63. package/bin/{providers → cjs/providers}/LiveShareProvider.d.ts +106 -4
  64. package/bin/cjs/providers/LiveShareProvider.d.ts.map +1 -0
  65. package/bin/cjs/providers/LiveShareProvider.js +205 -0
  66. package/bin/cjs/providers/LiveShareProvider.js.map +1 -0
  67. package/bin/cjs/providers/index.d.ts +3 -0
  68. package/bin/cjs/providers/index.d.ts.map +1 -0
  69. package/bin/cjs/providers/index.js +19 -0
  70. package/bin/cjs/providers/index.js.map +1 -0
  71. package/bin/cjs/shared-hooks/index.d.ts +7 -0
  72. package/bin/cjs/shared-hooks/index.d.ts.map +1 -0
  73. package/bin/cjs/shared-hooks/index.js +23 -0
  74. package/bin/cjs/shared-hooks/index.js.map +1 -0
  75. package/bin/cjs/shared-hooks/internals/tree-node-constants.d.ts +3 -0
  76. package/bin/cjs/shared-hooks/internals/tree-node-constants.d.ts.map +1 -0
  77. package/bin/cjs/shared-hooks/internals/tree-node-constants.js +6 -0
  78. package/bin/cjs/shared-hooks/internals/tree-node-constants.js.map +1 -0
  79. package/bin/cjs/shared-hooks/internals/tree-node-types.d.ts +10 -0
  80. package/bin/cjs/shared-hooks/internals/tree-node-types.d.ts.map +1 -0
  81. package/bin/cjs/shared-hooks/internals/tree-node-types.js +23 -0
  82. package/bin/cjs/shared-hooks/internals/tree-node-types.js.map +1 -0
  83. package/bin/cjs/shared-hooks/internals/tree-node-utils.d.ts +33 -0
  84. package/bin/cjs/shared-hooks/internals/tree-node-utils.d.ts.map +1 -0
  85. package/bin/cjs/shared-hooks/internals/tree-node-utils.js +193 -0
  86. package/bin/cjs/shared-hooks/internals/tree-node-utils.js.map +1 -0
  87. package/bin/{shared-hooks → cjs/shared-hooks}/useDynamicDDS.d.ts +4 -4
  88. package/bin/cjs/shared-hooks/useDynamicDDS.d.ts.map +1 -0
  89. package/bin/cjs/shared-hooks/useDynamicDDS.js +87 -0
  90. package/bin/cjs/shared-hooks/useDynamicDDS.js.map +1 -0
  91. package/bin/{shared-hooks → cjs/shared-hooks}/useSharedMap.d.ts +4 -2
  92. package/bin/cjs/shared-hooks/useSharedMap.d.ts.map +1 -0
  93. package/bin/cjs/shared-hooks/useSharedMap.js +134 -0
  94. package/bin/cjs/shared-hooks/useSharedMap.js.map +1 -0
  95. package/bin/{shared-hooks → cjs/shared-hooks}/useSharedState.d.ts +1 -1
  96. package/bin/cjs/shared-hooks/useSharedState.d.ts.map +1 -0
  97. package/bin/cjs/shared-hooks/useSharedState.js +80 -0
  98. package/bin/cjs/shared-hooks/useSharedState.js.map +1 -0
  99. package/bin/{shared-hooks → cjs/shared-hooks}/useSharedStateRegistry.d.ts +1 -1
  100. package/bin/cjs/shared-hooks/useSharedStateRegistry.d.ts.map +1 -0
  101. package/bin/cjs/shared-hooks/useSharedStateRegistry.js +120 -0
  102. package/bin/cjs/shared-hooks/useSharedStateRegistry.js.map +1 -0
  103. package/bin/cjs/shared-hooks/useSharedTree.d.ts +57 -0
  104. package/bin/cjs/shared-hooks/useSharedTree.d.ts.map +1 -0
  105. package/bin/cjs/shared-hooks/useSharedTree.js +123 -0
  106. package/bin/cjs/shared-hooks/useSharedTree.js.map +1 -0
  107. package/bin/cjs/shared-hooks/useTreeNode.d.ts +96 -0
  108. package/bin/cjs/shared-hooks/useTreeNode.d.ts.map +1 -0
  109. package/bin/cjs/shared-hooks/useTreeNode.js +135 -0
  110. package/bin/cjs/shared-hooks/useTreeNode.js.map +1 -0
  111. package/bin/{types → cjs/types}/ActionTypes.d.ts +7 -7
  112. package/bin/cjs/types/ActionTypes.d.ts.map +1 -0
  113. package/bin/cjs/types/ActionTypes.js +7 -0
  114. package/bin/cjs/types/ActionTypes.js.map +1 -0
  115. package/bin/cjs/types/PropTypes.d.ts +56 -0
  116. package/bin/cjs/types/PropTypes.d.ts.map +1 -0
  117. package/bin/cjs/types/PropTypes.js +7 -0
  118. package/bin/cjs/types/PropTypes.js.map +1 -0
  119. package/bin/{types → cjs/types}/ResultTypes.d.ts +50 -18
  120. package/bin/cjs/types/ResultTypes.d.ts.map +1 -0
  121. package/bin/cjs/types/ResultTypes.js +7 -0
  122. package/bin/cjs/types/ResultTypes.js.map +1 -0
  123. package/bin/cjs/types/index.d.ts +4 -0
  124. package/bin/cjs/types/index.d.ts.map +1 -0
  125. package/bin/cjs/types/index.js +20 -0
  126. package/bin/cjs/types/index.js.map +1 -0
  127. package/bin/cjs/utils/index.d.ts +2 -0
  128. package/bin/cjs/utils/index.d.ts.map +1 -0
  129. package/bin/cjs/utils/index.js +18 -0
  130. package/bin/cjs/utils/index.js.map +1 -0
  131. package/bin/cjs/utils/type-check.d.ts.map +1 -0
  132. package/bin/cjs/utils/type-check.js +62 -0
  133. package/bin/cjs/utils/type-check.js.map +1 -0
  134. package/bin/esm/index.d.ts +7 -0
  135. package/bin/esm/index.d.ts.map +1 -0
  136. package/bin/esm/index.js +7 -0
  137. package/bin/esm/index.js.map +1 -0
  138. package/bin/esm/interfaces/LiveInterfaceExtensions.d.ts +26 -0
  139. package/bin/esm/interfaces/LiveInterfaceExtensions.d.ts.map +1 -0
  140. package/bin/esm/interfaces/LiveInterfaceExtensions.js.map +1 -0
  141. package/bin/esm/interfaces/index.d.ts +2 -0
  142. package/bin/esm/interfaces/index.d.ts.map +1 -0
  143. package/bin/esm/interfaces/index.js +2 -0
  144. package/bin/esm/interfaces/index.js.map +1 -0
  145. package/bin/esm/internal/errors.d.ts +41 -0
  146. package/bin/esm/internal/errors.d.ts.map +1 -0
  147. package/bin/esm/internal/errors.js.map +1 -0
  148. package/bin/esm/internal/index.d.ts +3 -0
  149. package/bin/esm/internal/index.d.ts.map +1 -0
  150. package/bin/esm/internal/index.js +3 -0
  151. package/bin/esm/internal/index.js.map +1 -0
  152. package/bin/esm/internal/type-guards.d.ts +11 -0
  153. package/bin/esm/internal/type-guards.d.ts.map +1 -0
  154. package/bin/esm/internal/type-guards.js +20 -0
  155. package/bin/esm/internal/type-guards.js.map +1 -0
  156. package/bin/esm/live-hooks/index.d.ts +8 -0
  157. package/bin/esm/live-hooks/index.d.ts.map +1 -0
  158. package/bin/esm/live-hooks/index.js +8 -0
  159. package/bin/esm/live-hooks/index.js.map +1 -0
  160. package/bin/esm/live-hooks/useLiveCanvas.d.ts +80 -0
  161. package/bin/esm/live-hooks/useLiveCanvas.d.ts.map +1 -0
  162. package/bin/esm/live-hooks/useLiveCanvas.js +238 -0
  163. package/bin/esm/live-hooks/useLiveCanvas.js.map +1 -0
  164. package/bin/esm/live-hooks/useLiveEvent.d.ts +59 -0
  165. package/bin/esm/live-hooks/useLiveEvent.d.ts.map +1 -0
  166. package/bin/{live-hooks → esm/live-hooks}/useLiveEvent.js +41 -5
  167. package/bin/esm/live-hooks/useLiveEvent.js.map +1 -0
  168. package/bin/esm/live-hooks/useLiveFollowMode.d.ts +163 -0
  169. package/bin/esm/live-hooks/useLiveFollowMode.d.ts.map +1 -0
  170. package/bin/{live-hooks → esm/live-hooks}/useLiveFollowMode.js +148 -5
  171. package/bin/esm/live-hooks/useLiveFollowMode.js.map +1 -0
  172. package/bin/esm/live-hooks/useLivePresence.d.ts +76 -0
  173. package/bin/esm/live-hooks/useLivePresence.d.ts.map +1 -0
  174. package/bin/{live-hooks → esm/live-hooks}/useLivePresence.js +71 -13
  175. package/bin/esm/live-hooks/useLivePresence.js.map +1 -0
  176. package/bin/esm/live-hooks/useLiveState.d.ts +66 -0
  177. package/bin/esm/live-hooks/useLiveState.d.ts.map +1 -0
  178. package/bin/{live-hooks → esm/live-hooks}/useLiveState.js +54 -5
  179. package/bin/esm/live-hooks/useLiveState.js.map +1 -0
  180. package/bin/esm/live-hooks/useLiveTimer.d.ts +80 -0
  181. package/bin/esm/live-hooks/useLiveTimer.d.ts.map +1 -0
  182. package/bin/{live-hooks → esm/live-hooks}/useLiveTimer.js +58 -3
  183. package/bin/esm/live-hooks/useLiveTimer.js.map +1 -0
  184. package/bin/esm/live-hooks/useMediaSynchronizer.d.ts +86 -0
  185. package/bin/esm/live-hooks/useMediaSynchronizer.d.ts.map +1 -0
  186. package/bin/{live-hooks → esm/live-hooks}/useMediaSynchronizer.js +65 -4
  187. package/bin/esm/live-hooks/useMediaSynchronizer.js.map +1 -0
  188. package/bin/esm/providers/AzureProvider.d.ts +113 -0
  189. package/bin/esm/providers/AzureProvider.d.ts.map +1 -0
  190. package/bin/{providers → esm/providers}/AzureProvider.js +12 -12
  191. package/bin/esm/providers/AzureProvider.js.map +1 -0
  192. package/bin/esm/providers/LiveShareProvider.d.ts +193 -0
  193. package/bin/esm/providers/LiveShareProvider.d.ts.map +1 -0
  194. package/bin/esm/providers/LiveShareProvider.js +197 -0
  195. package/bin/esm/providers/LiveShareProvider.js.map +1 -0
  196. package/bin/esm/providers/index.d.ts +3 -0
  197. package/bin/esm/providers/index.d.ts.map +1 -0
  198. package/bin/esm/providers/index.js +3 -0
  199. package/bin/esm/providers/index.js.map +1 -0
  200. package/bin/esm/shared-hooks/index.d.ts +7 -0
  201. package/bin/esm/shared-hooks/index.d.ts.map +1 -0
  202. package/bin/esm/shared-hooks/index.js +7 -0
  203. package/bin/esm/shared-hooks/index.js.map +1 -0
  204. package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts +3 -0
  205. package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts.map +1 -0
  206. package/bin/esm/shared-hooks/internals/tree-node-constants.js +3 -0
  207. package/bin/esm/shared-hooks/internals/tree-node-constants.js.map +1 -0
  208. package/bin/esm/shared-hooks/internals/tree-node-types.d.ts +10 -0
  209. package/bin/esm/shared-hooks/internals/tree-node-types.d.ts.map +1 -0
  210. package/bin/esm/shared-hooks/internals/tree-node-types.js +18 -0
  211. package/bin/esm/shared-hooks/internals/tree-node-types.js.map +1 -0
  212. package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts +33 -0
  213. package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts.map +1 -0
  214. package/bin/esm/shared-hooks/internals/tree-node-utils.js +188 -0
  215. package/bin/esm/shared-hooks/internals/tree-node-utils.js.map +1 -0
  216. package/bin/esm/shared-hooks/useDynamicDDS.d.ts +23 -0
  217. package/bin/esm/shared-hooks/useDynamicDDS.d.ts.map +1 -0
  218. package/bin/{shared-hooks → esm/shared-hooks}/useDynamicDDS.js +20 -11
  219. package/bin/esm/shared-hooks/useDynamicDDS.js.map +1 -0
  220. package/bin/esm/shared-hooks/useSharedMap.d.ts +25 -0
  221. package/bin/esm/shared-hooks/useSharedMap.d.ts.map +1 -0
  222. package/bin/{shared-hooks → esm/shared-hooks}/useSharedMap.js +27 -13
  223. package/bin/esm/shared-hooks/useSharedMap.js.map +1 -0
  224. package/bin/esm/shared-hooks/useSharedState.d.ts +22 -0
  225. package/bin/esm/shared-hooks/useSharedState.d.ts.map +1 -0
  226. package/bin/{shared-hooks → esm/shared-hooks}/useSharedState.js +2 -2
  227. package/bin/esm/shared-hooks/useSharedState.js.map +1 -0
  228. package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts +37 -0
  229. package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts.map +1 -0
  230. package/bin/{shared-hooks → esm/shared-hooks}/useSharedStateRegistry.js +27 -19
  231. package/bin/esm/shared-hooks/useSharedStateRegistry.js.map +1 -0
  232. package/bin/esm/shared-hooks/useSharedTree.d.ts +57 -0
  233. package/bin/esm/shared-hooks/useSharedTree.d.ts.map +1 -0
  234. package/bin/esm/shared-hooks/useSharedTree.js +117 -0
  235. package/bin/esm/shared-hooks/useSharedTree.js.map +1 -0
  236. package/bin/esm/shared-hooks/useTreeNode.d.ts +96 -0
  237. package/bin/esm/shared-hooks/useTreeNode.d.ts.map +1 -0
  238. package/bin/esm/shared-hooks/useTreeNode.js +132 -0
  239. package/bin/esm/shared-hooks/useTreeNode.js.map +1 -0
  240. package/bin/esm/types/ActionTypes.d.ts +112 -0
  241. package/bin/esm/types/ActionTypes.d.ts.map +1 -0
  242. package/bin/esm/types/ActionTypes.js.map +1 -0
  243. package/bin/esm/types/PropTypes.d.ts +56 -0
  244. package/bin/esm/types/PropTypes.d.ts.map +1 -0
  245. package/bin/esm/types/PropTypes.js.map +1 -0
  246. package/bin/esm/types/ResultTypes.d.ts +334 -0
  247. package/bin/esm/types/ResultTypes.d.ts.map +1 -0
  248. package/bin/esm/types/ResultTypes.js.map +1 -0
  249. package/bin/esm/types/index.d.ts +4 -0
  250. package/bin/esm/types/index.d.ts.map +1 -0
  251. package/bin/esm/types/index.js +4 -0
  252. package/bin/esm/types/index.js.map +1 -0
  253. package/bin/esm/utils/index.d.ts +2 -0
  254. package/bin/esm/utils/index.d.ts.map +1 -0
  255. package/bin/esm/utils/index.js +2 -0
  256. package/bin/esm/utils/index.js.map +1 -0
  257. package/bin/esm/utils/type-check.d.ts +15 -0
  258. package/bin/esm/utils/type-check.d.ts.map +1 -0
  259. package/bin/esm/utils/type-check.js.map +1 -0
  260. package/package.json +61 -50
  261. package/src/index.ts +6 -6
  262. package/src/interfaces/index.ts +1 -1
  263. package/src/internal/errors.ts +16 -0
  264. package/src/internal/index.ts +2 -2
  265. package/src/internal/type-guards.ts +12 -0
  266. package/src/live-hooks/index.ts +7 -7
  267. package/src/live-hooks/useLiveCanvas.ts +154 -82
  268. package/src/live-hooks/useLiveEvent.ts +43 -7
  269. package/src/live-hooks/useLiveFollowMode.ts +149 -6
  270. package/src/live-hooks/useLivePresence.ts +80 -17
  271. package/src/live-hooks/useLiveState.ts +54 -6
  272. package/src/live-hooks/useLiveTimer.ts +59 -4
  273. package/src/live-hooks/useMediaSynchronizer.ts +70 -5
  274. package/src/providers/AzureProvider.tsx +21 -21
  275. package/src/providers/LiveShareProvider.tsx +126 -12
  276. package/src/providers/index.ts +2 -2
  277. package/src/shared-hooks/index.ts +6 -4
  278. package/src/shared-hooks/internals/tree-node-constants.ts +2 -0
  279. package/src/shared-hooks/internals/tree-node-types.ts +26 -0
  280. package/src/shared-hooks/internals/tree-node-utils.ts +269 -0
  281. package/src/shared-hooks/useDynamicDDS.ts +28 -17
  282. package/src/shared-hooks/useSharedMap.ts +42 -17
  283. package/src/shared-hooks/useSharedState.ts +6 -3
  284. package/src/shared-hooks/useSharedStateRegistry.ts +44 -22
  285. package/src/shared-hooks/useSharedTree.ts +144 -0
  286. package/src/shared-hooks/useTreeNode.ts +147 -0
  287. package/src/types/ActionTypes.ts +13 -9
  288. package/src/types/PropTypes.ts +57 -0
  289. package/src/types/ResultTypes.ts +71 -17
  290. package/src/types/index.ts +3 -3
  291. package/src/utils/index.ts +1 -1
  292. package/tsconfig.cjs.json +14 -0
  293. package/tsconfig.json +65 -70
  294. package/.nycrc.json +0 -10
  295. package/bin/index.d.ts +0 -7
  296. package/bin/index.d.ts.map +0 -1
  297. package/bin/index.js +0 -7
  298. package/bin/index.js.map +0 -1
  299. package/bin/interfaces/LiveInterfaceExtensions.d.ts.map +0 -1
  300. package/bin/interfaces/LiveInterfaceExtensions.js.map +0 -1
  301. package/bin/interfaces/index.d.ts +0 -2
  302. package/bin/interfaces/index.d.ts.map +0 -1
  303. package/bin/interfaces/index.js +0 -2
  304. package/bin/interfaces/index.js.map +0 -1
  305. package/bin/internal/errors.d.ts.map +0 -1
  306. package/bin/internal/errors.js.map +0 -1
  307. package/bin/internal/index.d.ts +0 -3
  308. package/bin/internal/index.d.ts.map +0 -1
  309. package/bin/internal/index.js +0 -3
  310. package/bin/internal/index.js.map +0 -1
  311. package/bin/internal/type-guards.d.ts.map +0 -1
  312. package/bin/internal/type-guards.js +0 -8
  313. package/bin/internal/type-guards.js.map +0 -1
  314. package/bin/live-hooks/index.d.ts +0 -8
  315. package/bin/live-hooks/index.d.ts.map +0 -1
  316. package/bin/live-hooks/index.js +0 -8
  317. package/bin/live-hooks/index.js.map +0 -1
  318. package/bin/live-hooks/useLiveCanvas.d.ts +0 -29
  319. package/bin/live-hooks/useLiveCanvas.d.ts.map +0 -1
  320. package/bin/live-hooks/useLiveCanvas.js +0 -160
  321. package/bin/live-hooks/useLiveCanvas.js.map +0 -1
  322. package/bin/live-hooks/useLiveEvent.d.ts.map +0 -1
  323. package/bin/live-hooks/useLiveEvent.js.map +0 -1
  324. package/bin/live-hooks/useLiveFollowMode.d.ts +0 -24
  325. package/bin/live-hooks/useLiveFollowMode.d.ts.map +0 -1
  326. package/bin/live-hooks/useLiveFollowMode.js.map +0 -1
  327. package/bin/live-hooks/useLivePresence.d.ts +0 -26
  328. package/bin/live-hooks/useLivePresence.d.ts.map +0 -1
  329. package/bin/live-hooks/useLivePresence.js.map +0 -1
  330. package/bin/live-hooks/useLiveState.d.ts.map +0 -1
  331. package/bin/live-hooks/useLiveState.js.map +0 -1
  332. package/bin/live-hooks/useLiveTimer.d.ts.map +0 -1
  333. package/bin/live-hooks/useLiveTimer.js.map +0 -1
  334. package/bin/live-hooks/useMediaSynchronizer.d.ts +0 -25
  335. package/bin/live-hooks/useMediaSynchronizer.d.ts.map +0 -1
  336. package/bin/live-hooks/useMediaSynchronizer.js.map +0 -1
  337. package/bin/providers/AzureProvider.d.ts.map +0 -1
  338. package/bin/providers/AzureProvider.js.map +0 -1
  339. package/bin/providers/LiveShareProvider.d.ts.map +0 -1
  340. package/bin/providers/LiveShareProvider.js +0 -87
  341. package/bin/providers/LiveShareProvider.js.map +0 -1
  342. package/bin/providers/index.d.ts +0 -3
  343. package/bin/providers/index.d.ts.map +0 -1
  344. package/bin/providers/index.js +0 -3
  345. package/bin/providers/index.js.map +0 -1
  346. package/bin/shared-hooks/index.d.ts +0 -5
  347. package/bin/shared-hooks/index.d.ts.map +0 -1
  348. package/bin/shared-hooks/index.js +0 -5
  349. package/bin/shared-hooks/index.js.map +0 -1
  350. package/bin/shared-hooks/useDynamicDDS.d.ts.map +0 -1
  351. package/bin/shared-hooks/useDynamicDDS.js.map +0 -1
  352. package/bin/shared-hooks/useSharedMap.d.ts.map +0 -1
  353. package/bin/shared-hooks/useSharedMap.js.map +0 -1
  354. package/bin/shared-hooks/useSharedState.d.ts.map +0 -1
  355. package/bin/shared-hooks/useSharedState.js.map +0 -1
  356. package/bin/shared-hooks/useSharedStateRegistry.d.ts.map +0 -1
  357. package/bin/shared-hooks/useSharedStateRegistry.js.map +0 -1
  358. package/bin/types/ActionTypes.d.ts.map +0 -1
  359. package/bin/types/ActionTypes.js.map +0 -1
  360. package/bin/types/PropTypes.d.ts +0 -8
  361. package/bin/types/PropTypes.d.ts.map +0 -1
  362. package/bin/types/PropTypes.js.map +0 -1
  363. package/bin/types/ResultTypes.d.ts.map +0 -1
  364. package/bin/types/ResultTypes.js.map +0 -1
  365. package/bin/types/index.d.ts +0 -4
  366. package/bin/types/index.d.ts.map +0 -1
  367. package/bin/types/index.js +0 -4
  368. package/bin/types/index.js.map +0 -1
  369. package/bin/utils/index.d.ts +0 -2
  370. package/bin/utils/index.d.ts.map +0 -1
  371. package/bin/utils/index.js +0 -2
  372. package/bin/utils/index.js.map +0 -1
  373. package/bin/utils/type-check.d.ts.map +0 -1
  374. package/bin/utils/type-check.js.map +0 -1
  375. package/tsconfig.build.json +0 -6
  376. /package/bin/{interfaces → cjs/interfaces}/LiveInterfaceExtensions.d.ts +0 -0
  377. /package/bin/{utils → cjs/utils}/type-check.d.ts +0 -0
  378. /package/bin/{interfaces → esm/interfaces}/LiveInterfaceExtensions.js +0 -0
  379. /package/bin/{internal → esm/internal}/errors.js +0 -0
  380. /package/bin/{types → esm/types}/ActionTypes.js +0 -0
  381. /package/bin/{types → esm/types}/PropTypes.js +0 -0
  382. /package/bin/{types → esm/types}/ResultTypes.js +0 -0
  383. /package/bin/{utils → esm/utils}/type-check.js +0 -0
@@ -13,6 +13,7 @@ import {
13
13
  IFollowModeState,
14
14
  FollowModePresenceUser,
15
15
  LiveFollowMode,
16
+ LivePresenceData,
16
17
  } from "@microsoft/live-share";
17
18
  import { InkingManager, LiveCanvas } from "@microsoft/live-share-canvas";
18
19
  import {
@@ -20,15 +21,35 @@ import {
20
21
  ExtendedMediaMetadata,
21
22
  MediaPlayerSynchronizer,
22
23
  } from "@microsoft/live-share-media";
23
- import { IFluidContainer, SharedMap } from "fluid-framework";
24
- import { IReceiveLiveEvent } from "../interfaces";
24
+ import {
25
+ IFluidContainer,
26
+ ITree,
27
+ ImplicitFieldSchema,
28
+ TreeFieldFromImplicitField,
29
+ TreeView,
30
+ } from "fluid-framework";
31
+ import { SharedMap } from "fluid-framework/legacy";
32
+ import {
33
+ useSharedMap,
34
+ useTreeNode,
35
+ useSharedTree,
36
+ } from "../shared-hooks/index.js";
37
+ import {
38
+ useLiveEvent,
39
+ useLivePresence,
40
+ useMediaSynchronizer,
41
+ useLiveTimer,
42
+ useLiveCanvas,
43
+ useLiveFollowMode,
44
+ } from "../live-hooks/index.js";
45
+ import { IReceiveLiveEvent } from "../interfaces/index.js";
25
46
  import {
26
47
  OnPauseTimerAction,
27
48
  OnPlayTimerAction,
28
49
  OnStartTimerAction,
29
50
  OnUpdateLivePresenceAction,
30
51
  SendLiveEventAction,
31
- } from "./ActionTypes";
52
+ } from "./ActionTypes.js";
32
53
 
33
54
  export interface IAzureContainerResults {
34
55
  /**
@@ -49,13 +70,19 @@ export interface ILiveShareContainerResults extends IAzureContainerResults {
49
70
  }
50
71
 
51
72
  /**
52
- * Return type of `useSharedMap` hook.
73
+ * @deprecated use {@link useSharedTree} instead.
74
+ *
75
+ * Return type of {@link useSharedMap} hook.
53
76
  */
54
77
  export interface IUseSharedMapResults<TData> {
55
78
  /**
56
- * Stateful map of most recent values from `SharedMap`.
79
+ * The Fluid `SharedMap` object.
57
80
  */
58
- map: ReadonlyMap<string, TData>;
81
+ sharedMap: (Map<string, TData> & SharedMap) | undefined;
82
+ /**
83
+ * Callback method to get entries in the `SharedMap`.
84
+ */
85
+ getEntry: (key: string) => TData | undefined;
59
86
  /**
60
87
  * Callback method to set/replace new entries in the `SharedMap`.
61
88
  */
@@ -64,14 +91,38 @@ export interface IUseSharedMapResults<TData> {
64
91
  * Callback method to delete an existing entry in the `SharedMap`.
65
92
  */
66
93
  deleteEntry: (key: string) => void;
94
+ }
95
+
96
+ /**
97
+ * Return type of {@link useSharedTree} hook.
98
+ */
99
+ export interface IUseSharedTreeResults<TSchema extends ImplicitFieldSchema> {
100
+ /**
101
+ * The Fluid `TreeView`.
102
+ */
103
+ treeView: TreeView<TSchema> | undefined;
67
104
  /**
68
- * The Fluid `SharedMap` object, should you want to use it directly.
105
+ * The Fluid `SharedTree` object, should you want to use it directly.
69
106
  */
70
- sharedMap: SharedMap | undefined;
107
+ sharedTree: ITree | undefined;
108
+ /**
109
+ * Root node
110
+ */
111
+ root: TreeFieldFromImplicitField<TSchema> | undefined;
112
+ }
113
+
114
+ /**
115
+ * Return type of {@link useTreeNode} hook.
116
+ */
117
+ export interface IUseTreeNodeResults<TNode = any> {
118
+ /**
119
+ * The Fluid `TreeNode`
120
+ */
121
+ node: TNode;
71
122
  }
72
123
 
73
124
  /**
74
- * Return type of `useLiveEvent` hook.
125
+ * Return type of {@link useLiveEvent} hook.
75
126
  */
76
127
  export interface IUseLiveEventResults<TEvent = any> {
77
128
  /**
@@ -95,7 +146,7 @@ export interface IUseLiveEventResults<TEvent = any> {
95
146
  }
96
147
 
97
148
  /**
98
- * Return type of `useLiveTimer` hook.
149
+ * Return type of {@link useLiveTimer} hook.
99
150
  */
100
151
  export interface IUseLiveTimerResults {
101
152
  /**
@@ -129,9 +180,9 @@ export interface IUseLiveTimerResults {
129
180
  }
130
181
 
131
182
  /**
132
- * Return type of `useLivePresence` hook.
183
+ * Return type of {@link useLivePresence} hook.
133
184
  */
134
- export interface IUseLivePresenceResults<TData extends object = object> {
185
+ export interface IUseLivePresenceResults<TData extends LivePresenceData = any> {
135
186
  /**
136
187
  * The local user's presence object.
137
188
  */
@@ -140,6 +191,10 @@ export interface IUseLivePresenceResults<TData extends object = object> {
140
191
  * List of non-local user's presence objects.
141
192
  */
142
193
  otherUsers: LivePresenceUser<TData>[];
194
+ /**
195
+ * List of all online users.
196
+ */
197
+ onlineUsers: LivePresenceUser<TData>[];
143
198
  /**
144
199
  * List of all user's presence objects.
145
200
  */
@@ -150,15 +205,14 @@ export interface IUseLivePresenceResults<TData extends object = object> {
150
205
  livePresence: LivePresence<TData> | undefined;
151
206
  /**
152
207
  * Callback method to update the local user's presence.
153
- * @param data Optional. TData to set for user.
154
- * @param state Optional. PresenceState to set for user.
208
+ * @param data TData to set for user.
155
209
  * @returns void promise that will throw when user does not have required roles
156
210
  */
157
211
  updatePresence: OnUpdateLivePresenceAction<TData>;
158
212
  }
159
213
 
160
214
  /**
161
- * Return type of `useMediaSynchronizer` hook.
215
+ * Return type of {@link useMediaSynchronizer} hook.
162
216
  */
163
217
  export interface IUseMediaSynchronizerResults {
164
218
  /**
@@ -208,7 +262,7 @@ export interface IUseMediaSynchronizerResults {
208
262
  }
209
263
 
210
264
  /**
211
- * Return type of `useLiveCanvas` hook.
265
+ * Return type of {@link useLiveCanvas} hook.
212
266
  */
213
267
  export interface IUseLiveCanvasResults {
214
268
  /**
@@ -222,7 +276,7 @@ export interface IUseLiveCanvasResults {
222
276
  }
223
277
 
224
278
  /**
225
- * Return type of `useLiveFollowMode` hook.
279
+ * Return type of {@link useLiveFollowMode} hook.
226
280
  */
227
281
  export interface IUseLiveFollowModeResults<TData = any> {
228
282
  /**
@@ -1,3 +1,3 @@
1
- export * from "./ActionTypes";
2
- export * from "./ResultTypes";
3
- export * from "./PropTypes";
1
+ export * from "./ActionTypes.js";
2
+ export * from "./ResultTypes.js";
3
+ export * from "./PropTypes.js";
@@ -1 +1 @@
1
- export * from "./type-check";
1
+ export * from "./type-check.js";
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./bin/cjs",
5
+ "module": "CommonJS",
6
+ "moduleResolution": "Node10",
7
+ "downlevelIteration": true,
8
+ "paths": {
9
+ "@microsoft/live-share/internal": [
10
+ "../live-share/bin/esm/index.internal.d.ts"
11
+ ]
12
+ }
13
+ }
14
+ }
package/tsconfig.json CHANGED
@@ -1,72 +1,67 @@
1
1
  {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
-
5
- /* Basic Options */
6
- // "incremental": true, /* Enable incremental compilation */
7
- "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
- "module": "ES2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- "lib": ["es2020","DOM", "DOM.Iterable"], /* Specify library files to be included in the compilation. */
10
- "allowJs": false, /* Allow javascript files to be compiled. */
11
- // "checkJs": true, /* Report errors in .js files. */
12
- "jsx": "react-jsx", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
13
- "declaration": true, /* Generates corresponding '.d.ts' file. */
14
- "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
- "sourceMap": true, /* Generates corresponding '.map' file. */
16
- // "outFile": "./", /* Concatenate and emit output to single file. */
17
- "outDir": "./bin", /* Redirect output structure to the directory. */
18
- // "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19
- // "composite": true, /* Enable project compilation */
20
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
- // "removeComments": true, /* Do not emit comments to output. */
22
- // "noEmit": true, /* Do not emit outputs. */
23
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
24
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26
-
27
- /* Strict Type-Checking Options */
28
- "strict": true, /* Enable all strict type-checking options. */
29
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30
- // "strictNullChecks": true, /* Enable strict null checks. */
31
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
32
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36
-
37
- /* Additional Checks */
38
- // "noUnusedLocals": true, /* Report errors on unused locals. */
39
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
40
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42
-
43
- /* Module Resolution Options */
44
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
45
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
46
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
47
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
48
- // "typeRoots": [], /* List of folders to include type definitions from. */
49
- // "types": [], /* Type declaration files to be included in compilation. */
50
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
52
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
54
-
55
- /* Source Map Options */
56
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
57
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
59
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
60
-
61
- /* Experimental Options */
62
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
63
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
64
-
65
- /* Advanced Options */
66
- "skipLibCheck": true, /* Skip type checking of declaration files. */
67
- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
68
- },
69
- "files": [
70
- "src/index.ts"
71
- ]
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+ /* Basic Options */
5
+ // "incremental": true, /* Enable incremental compilation */
6
+ "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
7
+ "module": "Node16" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
8
+ "moduleResolution": "Node16",
9
+ "lib": [
10
+ "es2020",
11
+ "DOM"
12
+ ] /* Specify library files to be included in the compilation. */,
13
+ "allowJs": false /* Allow javascript files to be compiled. */,
14
+ // "checkJs": true, /* Report errors in .js files. */
15
+ "jsx": "react-jsx" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
16
+ "declaration": true /* Generates corresponding '.d.ts' file. */,
17
+ "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
18
+ "sourceMap": true /* Generates corresponding '.map' file. */,
19
+ // "outFile": "./", /* Concatenate and emit output to single file. */
20
+ "outDir": "./bin/esm" /* Redirect output structure to the directory. */,
21
+ // "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
22
+ // "composite": true, /* Enable project compilation */
23
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
24
+ // "removeComments": true, /* Do not emit comments to output. */
25
+ // "noEmit": true, /* Do not emit outputs. */
26
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
27
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
28
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
29
+ /* Strict Type-Checking Options */
30
+ "strict": true /* Enable all strict type-checking options. */,
31
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
32
+ // "strictNullChecks": true, /* Enable strict null checks. */
33
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
34
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
35
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
36
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
37
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+ /* Module Resolution Options */
44
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
45
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
46
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
47
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
48
+ // "typeRoots": [], /* List of folders to include type definitions from. */
49
+ // "types": [], /* Type declaration files to be included in compilation. */
50
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
52
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
54
+ /* Source Map Options */
55
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
56
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
57
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
58
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
59
+ /* Experimental Options */
60
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
61
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
62
+ /* Advanced Options */
63
+ "skipLibCheck": true /* Skip type checking of declaration files. */,
64
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
65
+ },
66
+ "files": ["src/index.ts"]
72
67
  }
package/.nycrc.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "cache": false,
3
- "extension": [".ts"],
4
- "check-coverage": true,
5
- "include": ["src/**"],
6
- "statements": 90,
7
- "branches": 90,
8
- "functions": 95,
9
- "lines": 90
10
- }
package/bin/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from "./providers";
2
- export * from "./shared-hooks";
3
- export * from "./live-hooks";
4
- export * from "./types";
5
- export * from "./providers";
6
- export * from "./interfaces";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
package/bin/index.js DELETED
@@ -1,7 +0,0 @@
1
- export * from "./providers";
2
- export * from "./shared-hooks";
3
- export * from "./live-hooks";
4
- export * from "./types";
5
- export * from "./providers";
6
- export * from "./interfaces";
7
- //# sourceMappingURL=index.js.map
package/bin/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"LiveInterfaceExtensions.d.ts","sourceRoot":"","sources":["../../src/interfaces/LiveInterfaceExtensions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,GAAG;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"LiveInterfaceExtensions.js","sourceRoot":"","sources":["../../src/interfaces/LiveInterfaceExtensions.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,2 +0,0 @@
1
- export * from "./LiveInterfaceExtensions";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./LiveInterfaceExtensions";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/internal/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAM,4BAA6B,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAIrE;AAED;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,4BAA4B;gBAC/D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAOpD;AAED;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,4BAA4B;gBACpE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAQpD;AAED;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,4BAA4B;gBACtE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAQpD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/internal/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,4BAA6B,SAAQ,KAAK;IAC5C,YAAY,OAAe,EAAE,YAAoB,EAAE,OAAe;QAC9D,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;QACzD,KAAK,CAAC,GAAG,QAAQ,IAAI,YAAY,KAAK,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,4BAA4B;IAC3E,YAAY,OAAe,EAAE,YAAoB;QAC7C,KAAK,CACD,OAAO,EACP,YAAY,EACZ,oSAAoS,CACvS,CAAC;IACN,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,4BAA4B;IAChF,YAAY,OAAe,EAAE,YAAoB;QAC7C,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;QACzD,KAAK,CACD,OAAO,EACP,YAAY,EACZ,GAAG,OAAO,uGAAuG,OAAO,kCAAkC,QAAQ,8CAA8C,CACnN,CAAC;IACN,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,oCAAqC,SAAQ,4BAA4B;IAClF,YAAY,OAAe,EAAE,YAAoB;QAC7C,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;QACzD,KAAK,CACD,OAAO,EACP,YAAY,EACZ,GAAG,OAAO,8DAA8D,OAAO,yDAAyD,QAAQ,mCAAmC,CACtL,CAAC;IACN,CAAC;CACJ;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./errors";
2
- export * from "./type-guards";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./errors";
2
- export * from "./type-guards";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../src/internal/type-guards.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EACtC,KAAK,EAAE,GAAG,GACX,KAAK,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAEpC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * @hidden
3
- * Used for useLiveState and useSharedState for checking if a value is a prevState callback
4
- */
5
- export function isPrevStateCallback(value) {
6
- return typeof value === "function";
7
- }
8
- //# sourceMappingURL=type-guards.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-guards.js","sourceRoot":"","sources":["../../src/internal/type-guards.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAC/B,KAAU;IAEV,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACvC,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from "./useLivePresence";
2
- export * from "./useLiveFollowMode";
3
- export * from "./useLiveState";
4
- export * from "./useMediaSynchronizer";
5
- export * from "./useLiveEvent";
6
- export * from "./useLiveCanvas";
7
- export * from "./useLiveTimer";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from "./useLivePresence";
2
- export * from "./useLiveFollowMode";
3
- export * from "./useLiveState";
4
- export * from "./useMediaSynchronizer";
5
- export * from "./useLiveEvent";
6
- export * from "./useLiveCanvas";
7
- export * from "./useLiveTimer";
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/live-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the Microsoft Live Share SDK License.
4
- */
5
- import { CanvasReferencePoint, IBrush, InkingTool, IPoint } from "@microsoft/live-share-canvas";
6
- import React from "react";
7
- import { IUseLiveCanvasResults } from "../types";
8
- /**
9
- * React hook for using a Live Share Canvas `LiveCanvas` and `InkingManager`.
10
- *
11
- * @remarks
12
- * Use this hook to set up an `LiveCanvas` object, which is used for collaborative inking. It takes several input parameters, including a unique key,
13
- * a reference to a canvas element, and various settings for the inking tool, brush, and canvas offset and scale.
14
- * This hook can only be used in a child component of `<LiveShareProvider>` or `<AzureProvider>`.
15
- *
16
- * @param uniqueKey the unique key for the `LiveCanvas`. If one does not yet exist, a new one.
17
- * @param canvasElementRef the HTML div element ref or document ID that `InkingManager` will use for canvas-based collaboration.
18
- * @param active Optional. Stateful boolean that will activate/de-activate `InkingManager` accordingly.
19
- * @param tool Optional. Stateful enum for what tool to use in the `InkingManager`.
20
- * @param lineBrush Optional. Stateful lineBrush object for the selected lineBrush options to use in `InkingManager`.
21
- * @param offset Optional. Stateful offset point to use in the `InkingManager`. Gets the viewport offset. Defaults to 0,0.
22
- * @param scale Optional. Stateful scale number to use in the `InkingManager`. Defaults to 1 and must be greater than 0.
23
- * @param referencePoint Optional. Stateful reference point enum to use in the `InkingManger`. Defaults to "center".
24
- * @param isCursorShared Optional. Stateful boolean flag for whether cursor should be shared in `LiveCanvas`. Defaults to false.
25
- * @param localUserPictureUrl Optional. url string for the local user to display alongside their cursor. Defaults to undefined.
26
- * @returns IUseLiveCanvasResults object that contains the `liveCanvas` data object and `inkingManager`.
27
- */
28
- export declare function useLiveCanvas(uniqueKey: string, canvasElementRef: React.RefObject<HTMLElement | null> | string, active?: boolean, tool?: InkingTool, lineBrush?: IBrush, offset?: IPoint, scale?: number, referencePoint?: CanvasReferencePoint, isCursorShared?: boolean, localUserPictureUrl?: string): IUseLiveCanvasResults;
29
- //# sourceMappingURL=useLiveCanvas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLiveCanvas.d.ts","sourceRoot":"","sources":["../../src/live-hooks/useLiveCanvas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EACpB,MAAM,EAEN,UAAU,EACV,MAAM,EAET,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CACzB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,MAAM,EAC9D,MAAM,CAAC,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,oBAAoB,EACrC,cAAc,CAAC,EAAE,OAAO,EACxB,mBAAmB,CAAC,EAAE,MAAM,GAC7B,qBAAqB,CA6IvB"}