@microsoft/live-share-react 2.0.0-internal.4 → 2.0.0-internal.6

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 (380) hide show
  1. package/.nycrc.json +9 -9
  2. package/LICENSE +64 -61
  3. package/README.md +173 -168
  4. package/bin/cjs/index.d.ts +7 -0
  5. package/bin/cjs/index.d.ts.map +1 -0
  6. package/bin/cjs/index.js +23 -0
  7. package/bin/cjs/index.js.map +1 -0
  8. package/bin/cjs/interfaces/LiveInterfaceExtensions.d.ts.map +1 -0
  9. package/bin/cjs/interfaces/LiveInterfaceExtensions.js +7 -0
  10. package/bin/cjs/interfaces/LiveInterfaceExtensions.js.map +1 -0
  11. package/bin/cjs/interfaces/index.d.ts +2 -0
  12. package/bin/cjs/interfaces/index.d.ts.map +1 -0
  13. package/bin/cjs/interfaces/index.js +18 -0
  14. package/bin/cjs/interfaces/index.js.map +1 -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 +1 -1
  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 +166 -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 +130 -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 +46 -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.map +1 -0
  155. package/bin/esm/live-hooks/index.d.ts +8 -0
  156. package/bin/esm/live-hooks/index.d.ts.map +1 -0
  157. package/bin/esm/live-hooks/index.js +8 -0
  158. package/bin/esm/live-hooks/index.js.map +1 -0
  159. package/bin/esm/live-hooks/useLiveCanvas.d.ts +80 -0
  160. package/bin/esm/live-hooks/useLiveCanvas.d.ts.map +1 -0
  161. package/bin/esm/live-hooks/useLiveCanvas.js +238 -0
  162. package/bin/esm/live-hooks/useLiveCanvas.js.map +1 -0
  163. package/bin/esm/live-hooks/useLiveEvent.d.ts +59 -0
  164. package/bin/esm/live-hooks/useLiveEvent.d.ts.map +1 -0
  165. package/bin/{live-hooks → esm/live-hooks}/useLiveEvent.js +41 -5
  166. package/bin/esm/live-hooks/useLiveEvent.js.map +1 -0
  167. package/bin/esm/live-hooks/useLiveFollowMode.d.ts +163 -0
  168. package/bin/esm/live-hooks/useLiveFollowMode.d.ts.map +1 -0
  169. package/bin/{live-hooks → esm/live-hooks}/useLiveFollowMode.js +148 -5
  170. package/bin/esm/live-hooks/useLiveFollowMode.js.map +1 -0
  171. package/bin/esm/live-hooks/useLivePresence.d.ts +76 -0
  172. package/bin/esm/live-hooks/useLivePresence.d.ts.map +1 -0
  173. package/bin/{live-hooks → esm/live-hooks}/useLivePresence.js +67 -13
  174. package/bin/esm/live-hooks/useLivePresence.js.map +1 -0
  175. package/bin/esm/live-hooks/useLiveState.d.ts +66 -0
  176. package/bin/esm/live-hooks/useLiveState.d.ts.map +1 -0
  177. package/bin/{live-hooks → esm/live-hooks}/useLiveState.js +48 -3
  178. package/bin/esm/live-hooks/useLiveState.js.map +1 -0
  179. package/bin/esm/live-hooks/useLiveTimer.d.ts +80 -0
  180. package/bin/esm/live-hooks/useLiveTimer.d.ts.map +1 -0
  181. package/bin/{live-hooks → esm/live-hooks}/useLiveTimer.js +58 -3
  182. package/bin/esm/live-hooks/useLiveTimer.js.map +1 -0
  183. package/bin/esm/live-hooks/useMediaSynchronizer.d.ts +86 -0
  184. package/bin/esm/live-hooks/useMediaSynchronizer.d.ts.map +1 -0
  185. package/bin/{live-hooks → esm/live-hooks}/useMediaSynchronizer.js +65 -4
  186. package/bin/esm/live-hooks/useMediaSynchronizer.js.map +1 -0
  187. package/bin/esm/providers/AzureProvider.d.ts +113 -0
  188. package/bin/esm/providers/AzureProvider.d.ts.map +1 -0
  189. package/bin/{providers → esm/providers}/AzureProvider.js +10 -10
  190. package/bin/esm/providers/AzureProvider.js.map +1 -0
  191. package/bin/esm/providers/LiveShareProvider.d.ts +193 -0
  192. package/bin/esm/providers/LiveShareProvider.d.ts.map +1 -0
  193. package/bin/{providers → esm/providers}/LiveShareProvider.js +111 -9
  194. package/bin/esm/providers/LiveShareProvider.js.map +1 -0
  195. package/bin/esm/providers/index.d.ts +3 -0
  196. package/bin/esm/providers/index.d.ts.map +1 -0
  197. package/bin/esm/providers/index.js +3 -0
  198. package/bin/esm/providers/index.js.map +1 -0
  199. package/bin/esm/shared-hooks/index.d.ts +7 -0
  200. package/bin/esm/shared-hooks/index.d.ts.map +1 -0
  201. package/bin/esm/shared-hooks/index.js +7 -0
  202. package/bin/esm/shared-hooks/index.js.map +1 -0
  203. package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts +3 -0
  204. package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts.map +1 -0
  205. package/bin/esm/shared-hooks/internals/tree-node-constants.js +3 -0
  206. package/bin/esm/shared-hooks/internals/tree-node-constants.js.map +1 -0
  207. package/bin/esm/shared-hooks/internals/tree-node-types.d.ts +10 -0
  208. package/bin/esm/shared-hooks/internals/tree-node-types.d.ts.map +1 -0
  209. package/bin/esm/shared-hooks/internals/tree-node-types.js +18 -0
  210. package/bin/esm/shared-hooks/internals/tree-node-types.js.map +1 -0
  211. package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts +33 -0
  212. package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts.map +1 -0
  213. package/bin/esm/shared-hooks/internals/tree-node-utils.js +188 -0
  214. package/bin/esm/shared-hooks/internals/tree-node-utils.js.map +1 -0
  215. package/bin/esm/shared-hooks/useDynamicDDS.d.ts +23 -0
  216. package/bin/esm/shared-hooks/useDynamicDDS.d.ts.map +1 -0
  217. package/bin/{shared-hooks → esm/shared-hooks}/useDynamicDDS.js +20 -11
  218. package/bin/esm/shared-hooks/useDynamicDDS.js.map +1 -0
  219. package/bin/esm/shared-hooks/useSharedMap.d.ts +25 -0
  220. package/bin/esm/shared-hooks/useSharedMap.d.ts.map +1 -0
  221. package/bin/{shared-hooks → esm/shared-hooks}/useSharedMap.js +27 -13
  222. package/bin/esm/shared-hooks/useSharedMap.js.map +1 -0
  223. package/bin/esm/shared-hooks/useSharedState.d.ts +22 -0
  224. package/bin/esm/shared-hooks/useSharedState.d.ts.map +1 -0
  225. package/bin/{shared-hooks → esm/shared-hooks}/useSharedState.js +2 -2
  226. package/bin/esm/shared-hooks/useSharedState.js.map +1 -0
  227. package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts +37 -0
  228. package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts.map +1 -0
  229. package/bin/{shared-hooks → esm/shared-hooks}/useSharedStateRegistry.js +27 -19
  230. package/bin/esm/shared-hooks/useSharedStateRegistry.js.map +1 -0
  231. package/bin/esm/shared-hooks/useSharedTree.d.ts +57 -0
  232. package/bin/esm/shared-hooks/useSharedTree.d.ts.map +1 -0
  233. package/bin/esm/shared-hooks/useSharedTree.js +117 -0
  234. package/bin/esm/shared-hooks/useSharedTree.js.map +1 -0
  235. package/bin/esm/shared-hooks/useTreeNode.d.ts +96 -0
  236. package/bin/esm/shared-hooks/useTreeNode.d.ts.map +1 -0
  237. package/bin/esm/shared-hooks/useTreeNode.js +132 -0
  238. package/bin/esm/shared-hooks/useTreeNode.js.map +1 -0
  239. package/bin/esm/types/ActionTypes.d.ts +112 -0
  240. package/bin/esm/types/ActionTypes.d.ts.map +1 -0
  241. package/bin/esm/types/ActionTypes.js.map +1 -0
  242. package/bin/esm/types/PropTypes.d.ts +56 -0
  243. package/bin/esm/types/PropTypes.d.ts.map +1 -0
  244. package/bin/esm/types/PropTypes.js.map +1 -0
  245. package/bin/esm/types/ResultTypes.d.ts +330 -0
  246. package/bin/esm/types/ResultTypes.d.ts.map +1 -0
  247. package/bin/esm/types/ResultTypes.js.map +1 -0
  248. package/bin/esm/types/index.d.ts +4 -0
  249. package/bin/esm/types/index.d.ts.map +1 -0
  250. package/bin/esm/types/index.js +4 -0
  251. package/bin/esm/types/index.js.map +1 -0
  252. package/bin/esm/utils/index.d.ts +2 -0
  253. package/bin/esm/utils/index.d.ts.map +1 -0
  254. package/bin/esm/utils/index.js +2 -0
  255. package/bin/esm/utils/index.js.map +1 -0
  256. package/bin/esm/utils/type-check.d.ts +15 -0
  257. package/bin/esm/utils/type-check.d.ts.map +1 -0
  258. package/bin/esm/utils/type-check.js.map +1 -0
  259. package/package.json +61 -47
  260. package/src/index.ts +6 -6
  261. package/src/interfaces/index.ts +1 -1
  262. package/src/internal/index.ts +2 -2
  263. package/src/internal/type-guards.ts +1 -1
  264. package/src/live-hooks/index.ts +7 -7
  265. package/src/live-hooks/useLiveCanvas.ts +154 -82
  266. package/src/live-hooks/useLiveEvent.ts +43 -7
  267. package/src/live-hooks/useLiveFollowMode.ts +149 -6
  268. package/src/live-hooks/useLivePresence.ts +74 -17
  269. package/src/live-hooks/useLiveState.ts +49 -4
  270. package/src/live-hooks/useLiveTimer.ts +59 -4
  271. package/src/live-hooks/useMediaSynchronizer.ts +70 -5
  272. package/src/providers/AzureProvider.tsx +21 -21
  273. package/src/providers/LiveShareProvider.tsx +115 -13
  274. package/src/providers/index.ts +2 -2
  275. package/src/shared-hooks/index.ts +6 -4
  276. package/src/shared-hooks/internals/tree-node-constants.ts +2 -0
  277. package/src/shared-hooks/internals/tree-node-types.ts +26 -0
  278. package/src/shared-hooks/internals/tree-node-utils.ts +269 -0
  279. package/src/shared-hooks/useDynamicDDS.ts +28 -17
  280. package/src/shared-hooks/useSharedMap.ts +42 -17
  281. package/src/shared-hooks/useSharedState.ts +6 -3
  282. package/src/shared-hooks/useSharedStateRegistry.ts +44 -22
  283. package/src/shared-hooks/useSharedTree.ts +144 -0
  284. package/src/shared-hooks/useTreeNode.ts +147 -0
  285. package/src/types/ActionTypes.ts +13 -9
  286. package/src/types/PropTypes.ts +57 -0
  287. package/src/types/ResultTypes.ts +67 -17
  288. package/src/types/index.ts +3 -3
  289. package/src/utils/index.ts +1 -1
  290. package/tsconfig.cjs.json +14 -0
  291. package/tsconfig.json +65 -70
  292. package/bin/index.d.ts +0 -7
  293. package/bin/index.d.ts.map +0 -1
  294. package/bin/index.js +0 -7
  295. package/bin/index.js.map +0 -1
  296. package/bin/interfaces/LiveInterfaceExtensions.d.ts.map +0 -1
  297. package/bin/interfaces/LiveInterfaceExtensions.js.map +0 -1
  298. package/bin/interfaces/index.d.ts +0 -2
  299. package/bin/interfaces/index.d.ts.map +0 -1
  300. package/bin/interfaces/index.js +0 -2
  301. package/bin/interfaces/index.js.map +0 -1
  302. package/bin/internal/errors.d.ts.map +0 -1
  303. package/bin/internal/errors.js.map +0 -1
  304. package/bin/internal/index.d.ts +0 -3
  305. package/bin/internal/index.d.ts.map +0 -1
  306. package/bin/internal/index.js +0 -3
  307. package/bin/internal/index.js.map +0 -1
  308. package/bin/internal/type-guards.d.ts.map +0 -1
  309. package/bin/internal/type-guards.js.map +0 -1
  310. package/bin/live-hooks/index.d.ts +0 -8
  311. package/bin/live-hooks/index.d.ts.map +0 -1
  312. package/bin/live-hooks/index.js +0 -8
  313. package/bin/live-hooks/index.js.map +0 -1
  314. package/bin/live-hooks/useLiveCanvas.d.ts +0 -29
  315. package/bin/live-hooks/useLiveCanvas.d.ts.map +0 -1
  316. package/bin/live-hooks/useLiveCanvas.js +0 -160
  317. package/bin/live-hooks/useLiveCanvas.js.map +0 -1
  318. package/bin/live-hooks/useLiveEvent.d.ts.map +0 -1
  319. package/bin/live-hooks/useLiveEvent.js.map +0 -1
  320. package/bin/live-hooks/useLiveFollowMode.d.ts +0 -24
  321. package/bin/live-hooks/useLiveFollowMode.d.ts.map +0 -1
  322. package/bin/live-hooks/useLiveFollowMode.js.map +0 -1
  323. package/bin/live-hooks/useLivePresence.d.ts +0 -26
  324. package/bin/live-hooks/useLivePresence.d.ts.map +0 -1
  325. package/bin/live-hooks/useLivePresence.js.map +0 -1
  326. package/bin/live-hooks/useLiveState.d.ts.map +0 -1
  327. package/bin/live-hooks/useLiveState.js.map +0 -1
  328. package/bin/live-hooks/useLiveTimer.d.ts.map +0 -1
  329. package/bin/live-hooks/useLiveTimer.js.map +0 -1
  330. package/bin/live-hooks/useMediaSynchronizer.d.ts +0 -25
  331. package/bin/live-hooks/useMediaSynchronizer.d.ts.map +0 -1
  332. package/bin/live-hooks/useMediaSynchronizer.js.map +0 -1
  333. package/bin/providers/AzureProvider.d.ts.map +0 -1
  334. package/bin/providers/AzureProvider.js.map +0 -1
  335. package/bin/providers/LiveShareProvider.d.ts.map +0 -1
  336. package/bin/providers/LiveShareProvider.js.map +0 -1
  337. package/bin/providers/index.d.ts +0 -3
  338. package/bin/providers/index.d.ts.map +0 -1
  339. package/bin/providers/index.js +0 -3
  340. package/bin/providers/index.js.map +0 -1
  341. package/bin/shared-hooks/index.d.ts +0 -5
  342. package/bin/shared-hooks/index.d.ts.map +0 -1
  343. package/bin/shared-hooks/index.js +0 -5
  344. package/bin/shared-hooks/index.js.map +0 -1
  345. package/bin/shared-hooks/useDynamicDDS.d.ts.map +0 -1
  346. package/bin/shared-hooks/useDynamicDDS.js.map +0 -1
  347. package/bin/shared-hooks/useSharedMap.d.ts.map +0 -1
  348. package/bin/shared-hooks/useSharedMap.js.map +0 -1
  349. package/bin/shared-hooks/useSharedState.d.ts.map +0 -1
  350. package/bin/shared-hooks/useSharedState.js.map +0 -1
  351. package/bin/shared-hooks/useSharedStateRegistry.d.ts.map +0 -1
  352. package/bin/shared-hooks/useSharedStateRegistry.js.map +0 -1
  353. package/bin/types/ActionTypes.d.ts.map +0 -1
  354. package/bin/types/ActionTypes.js.map +0 -1
  355. package/bin/types/PropTypes.d.ts +0 -8
  356. package/bin/types/PropTypes.d.ts.map +0 -1
  357. package/bin/types/PropTypes.js.map +0 -1
  358. package/bin/types/ResultTypes.d.ts.map +0 -1
  359. package/bin/types/ResultTypes.js.map +0 -1
  360. package/bin/types/index.d.ts +0 -4
  361. package/bin/types/index.d.ts.map +0 -1
  362. package/bin/types/index.js +0 -4
  363. package/bin/types/index.js.map +0 -1
  364. package/bin/utils/index.d.ts +0 -2
  365. package/bin/utils/index.d.ts.map +0 -1
  366. package/bin/utils/index.js +0 -2
  367. package/bin/utils/index.js.map +0 -1
  368. package/bin/utils/type-check.d.ts.map +0 -1
  369. package/bin/utils/type-check.js.map +0 -1
  370. package/tsconfig.build.json +0 -6
  371. /package/bin/{interfaces → cjs/interfaces}/LiveInterfaceExtensions.d.ts +0 -0
  372. /package/bin/{internal → cjs/internal}/errors.d.ts +0 -0
  373. /package/bin/{utils → cjs/utils}/type-check.d.ts +0 -0
  374. /package/bin/{interfaces → esm/interfaces}/LiveInterfaceExtensions.js +0 -0
  375. /package/bin/{internal → esm/internal}/errors.js +0 -0
  376. /package/bin/{internal → esm/internal}/type-guards.js +0 -0
  377. /package/bin/{types → esm/types}/ActionTypes.js +0 -0
  378. /package/bin/{types → esm/types}/PropTypes.js +0 -0
  379. /package/bin/{types → esm/types}/ResultTypes.js +0 -0
  380. /package/bin/{utils → esm/utils}/type-check.js +0 -0
@@ -5,8 +5,12 @@
5
5
 
6
6
  import React from "react";
7
7
  import { IFluidLoadable } from "@fluidframework/core-interfaces";
8
- import { LoadableObjectClass } from "fluid-framework";
9
- import { ITimerConfig, ILiveEvent, PresenceState } from "@microsoft/live-share";
8
+ import {
9
+ ITimerConfig,
10
+ ILiveEvent,
11
+ LivePresenceData,
12
+ } from "@microsoft/live-share";
13
+ import { SharedObjectKind } from "fluid-framework";
10
14
 
11
15
  // React actions
12
16
 
@@ -25,12 +29,12 @@ export type SetLocalStateAction = React.Dispatch<React.SetStateAction<any>>;
25
29
 
26
30
  /**
27
31
  * Callback for UnregisterDDSSetStateAction.
28
- * <T extends IFluidLoadable>(uniqueKey: string, componentId: string, objectClass: LoadableObjectClass<T>, setLocalStateAction: SetLocalStateAction, onDidFirstInitialize?: (dds: T) => void) => void
32
+ * <T extends IFluidLoadable>(uniqueKey: string, componentId: string, objectClass: SharedObjectKind<T>, setLocalStateAction: SetLocalStateAction, onDidFirstInitialize?: (dds: T) => void) => void
29
33
  */
30
34
  export type RegisterDDSSetStateAction = <T extends IFluidLoadable>(
31
35
  uniqueKey: string,
32
36
  componentId: string,
33
- objectClass: LoadableObjectClass<T>,
37
+ objectClass: SharedObjectKind<T>,
34
38
  setLocalStateAction: SetLocalStateAction,
35
39
  onDidFirstInitialize?: (dds: T) => void
36
40
  ) => void;
@@ -92,10 +96,11 @@ export type SetLiveStateAction<TState = undefined> = (
92
96
 
93
97
  /**
94
98
  * Callback for SendLiveEventAction<TEvent>.
95
- * (event: TEvent) => Promise<void>
99
+ * (event: TEvent, targetClientId?: string) => Promise<void>
96
100
  */
97
101
  export type SendLiveEventAction<TEvent> = (
98
- event: TEvent
102
+ event: TEvent,
103
+ targetClientId?: string
99
104
  ) => Promise<ILiveEvent<TEvent>>;
100
105
 
101
106
  /**
@@ -111,9 +116,8 @@ export type OnReceivedLiveEventAction<TEvent> = (
111
116
  * Callback for OnUpdateLivePresenceAction<TData extends object = object>.
112
117
  * (data?: TData | undefined, state?: PresenceState | undefined) => Promise<void>
113
118
  */
114
- export type OnUpdateLivePresenceAction<TData extends object = object> = (
115
- data?: TData | undefined,
116
- state?: PresenceState | undefined
119
+ export type OnUpdateLivePresenceAction<TData extends LivePresenceData = any> = (
120
+ data: TData
117
121
  ) => Promise<void>;
118
122
 
119
123
  /**
@@ -3,8 +3,65 @@
3
3
  * Licensed under the Microsoft Live Share SDK License.
4
4
  */
5
5
 
6
+ import { UserMeetingRole } from "@microsoft/live-share";
7
+ import {
8
+ CanvasReferencePoint,
9
+ IBrush,
10
+ IPoint,
11
+ InkingTool,
12
+ LiveCanvasTreeNode,
13
+ } from "@microsoft/live-share-canvas";
14
+ import { useLiveCanvas } from "../live-hooks/index.js";
15
+
6
16
  export type SharedMapInitialData<T> =
7
17
  | Map<string, T>
8
18
  | readonly (readonly [string, T])[]
9
19
  | { [key: string]: T }
10
20
  | undefined;
21
+
22
+ /**
23
+ * Optional props for {@link useLiveCanvas}
24
+ */
25
+ export interface IUseLiveCanvasOptionalProps {
26
+ /**
27
+ * Optional. Stateful boolean that will activate/de-activate `InkingManager` accordingly.
28
+ */
29
+ active?: boolean;
30
+ /**
31
+ * Optional. Stateful enum for what tool to use in the `InkingManager`.
32
+ */
33
+ tool?: InkingTool;
34
+ /**
35
+ * Optional. Stateful lineBrush object for the selected lineBrush options to use in `InkingManager`.
36
+ */
37
+ lineBrush?: IBrush;
38
+ /**
39
+ * Optional. Stateful offset point to use in the `InkingManager`. Gets the viewport offset. Defaults to 0,0.
40
+ */
41
+ offset?: IPoint;
42
+ /**
43
+ * Optional. Stateful scale number to use in the `InkingManager`. Defaults to 1 and must be greater than 0.
44
+ */
45
+ scale?: number;
46
+ /**
47
+ * Optional. Stateful reference point enum to use in the `InkingManger`. Defaults to "center".
48
+ */
49
+ referencePoint?: CanvasReferencePoint;
50
+ /**
51
+ * Optional. Stateful boolean flag for whether cursor should be shared in `LiveCanvas`. Defaults to false.
52
+ */
53
+ isCursorShared?: boolean;
54
+ /**
55
+ * Optional. url string for the local user to display alongside their cursor. Defaults to undefined.
56
+ */
57
+ localUserPictureUrl?: string;
58
+ /**
59
+ * Optional. A Fluid `LiveCanvasTree` `TreeNode` instance to swap out the underlying storage solution for strokes.
60
+ * To learn more, look at Fluid's [SharedTree](https://fluidframework.com/docs/data-structures/tree/) documentation.
61
+ */
62
+ node?: LiveCanvasTreeNode;
63
+ /**
64
+ * Optional. The user roles that are allowed to start/stop/pause the timer.
65
+ */
66
+ allowedRoles?: UserMeetingRole[];
67
+ }
@@ -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.
80
+ */
81
+ sharedMap: (Map<string, TData> & SharedMap) | undefined;
82
+ /**
83
+ * Callback method to get entries in the `SharedMap`.
57
84
  */
58
- map: ReadonlyMap<string, TData>;
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;
104
+ /**
105
+ * The Fluid `SharedTree` object, should you want to use it directly.
106
+ */
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> {
67
118
  /**
68
- * The Fluid `SharedMap` object, should you want to use it directly.
119
+ * The Fluid `TreeNode`
69
120
  */
70
- sharedMap: SharedMap | undefined;
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
  */
@@ -150,15 +201,14 @@ export interface IUseLivePresenceResults<TData extends object = object> {
150
201
  livePresence: LivePresence<TData> | undefined;
151
202
  /**
152
203
  * 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.
204
+ * @param data TData to set for user.
155
205
  * @returns void promise that will throw when user does not have required roles
156
206
  */
157
207
  updatePresence: OnUpdateLivePresenceAction<TData>;
158
208
  }
159
209
 
160
210
  /**
161
- * Return type of `useMediaSynchronizer` hook.
211
+ * Return type of {@link useMediaSynchronizer} hook.
162
212
  */
163
213
  export interface IUseMediaSynchronizerResults {
164
214
  /**
@@ -208,7 +258,7 @@ export interface IUseMediaSynchronizerResults {
208
258
  }
209
259
 
210
260
  /**
211
- * Return type of `useLiveCanvas` hook.
261
+ * Return type of {@link useLiveCanvas} hook.
212
262
  */
213
263
  export interface IUseLiveCanvasResults {
214
264
  /**
@@ -222,7 +272,7 @@ export interface IUseLiveCanvasResults {
222
272
  }
223
273
 
224
274
  /**
225
- * Return type of `useLiveFollowMode` hook.
275
+ * Return type of {@link useLiveFollowMode} hook.
226
276
  */
227
277
  export interface IUseLiveFollowModeResults<TData = any> {
228
278
  /**
@@ -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/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;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -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;AAkBD;;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,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EACtC,KAAK,EAAE,GAAG,GACX,KAAK,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAEpC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB,CAKxE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-guards.js","sourceRoot":"","sources":["../../src/internal/type-guards.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAC/B,KAAU;IAEV,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAU;IACzC,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC7C,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC;AAC7C,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"}