@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
package/README.md CHANGED
@@ -14,32 +14,29 @@ import { LiveShareHost } from "@microsoft/teams-js";
14
14
  const host = LiveShareHost.create();
15
15
 
16
16
  export function LiveShareApp() {
17
- // Call app.initialize() from teams-js before rendering LiveShareProvider
17
+ // Call app.initialize() from teams-js before rendering LiveShareProvider
18
18
 
19
- return (
20
- <LiveShareProvider
21
- joinOnLoad={true}
22
- host={host}
23
- >
24
- <SharedCheckbox />
25
- </LiveShareProvider>
26
- );
19
+ return (
20
+ <LiveShareProvider joinOnLoad={true} host={host}>
21
+ <SharedCheckbox />
22
+ </LiveShareProvider>
23
+ );
27
24
  }
28
25
 
29
26
  // SharedCheckbox.jsx
30
27
  import { useSharedState } from "@microsoft/live-share-react";
31
28
 
32
29
  export function SharedCheckbox() {
33
- const [checked, setChecked] = useSharedState("MY-UNIQUE-ID", false);
34
- return (
35
- <input
36
- type="checkbox"
37
- checked={checked}
38
- onChange={() => {
39
- setChecked(!checked);
40
- }}
41
- />
42
- );
30
+ const [checked, setChecked] = useSharedState("MY-UNIQUE-ID", false);
31
+ return (
32
+ <input
33
+ type="checkbox"
34
+ checked={checked}
35
+ onChange={() => {
36
+ setChecked(!checked);
37
+ }}
38
+ />
39
+ );
43
40
  }
44
41
  ```
45
42
 
@@ -102,31 +99,31 @@ The following example shows how `useSharedState` can be used to dynamically crea
102
99
  import { useSharedState } from "@microsoft/live-share-react";
103
100
 
104
101
  export function CounterCard({ card, onDelete }) {
105
- const [count, setCount, disposeCount] = useSharedState(
106
- `card-count:${card.id}`,
107
- 0
108
- );
109
- return (
110
- <div className="card">
111
- <h3>{card.title}</h3>
112
- <button
113
- onClick={() => {
114
- setCount(count + 1);
115
- }}
116
- >
117
- {"+1"}
118
- </button>
119
- <span>{`${count} `}</span>
120
- <button
121
- onClick={() => {
122
- onDelete(card.id);
123
- disposeCount();
124
- }}
125
- >
126
- {"Delete"}
127
- </button>
128
- </div>
129
- );
102
+ const [count, setCount, disposeCount] = useSharedState(
103
+ `card-count:${card.id}`,
104
+ 0
105
+ );
106
+ return (
107
+ <div className="card">
108
+ <h3>{card.title}</h3>
109
+ <button
110
+ onClick={() => {
111
+ setCount(count + 1);
112
+ }}
113
+ >
114
+ {"+1"}
115
+ </button>
116
+ <span>{`${count} `}</span>
117
+ <button
118
+ onClick={() => {
119
+ onDelete(card.id);
120
+ disposeCount();
121
+ }}
122
+ >
123
+ {"Delete"}
124
+ </button>
125
+ </div>
126
+ );
130
127
  }
131
128
  ```
132
129
 
@@ -143,32 +140,32 @@ import { useSharedMap } from "@microsoft/live-share-react";
143
140
  import { v4 as uuid } from "uuid";
144
141
 
145
142
  export function CardList() {
146
- const { map, setEntry, deleteEntry } = useSharedMap("CUSTOM-MAP-ID");
147
- return (
148
- <div>
149
- <h2>{"Cards"}</h2>
150
- <button
151
- onClick={() => {
152
- const id = uuid();
153
- setEntry(id, {
154
- id,
155
- title: "Custom Card",
156
- });
157
- }}
158
- >
159
- {"+ Add card"}
160
- </button>
161
- <div className="flex wrap row hAlign">
162
- {[...map.values()].map((cardValue) => (
163
- <CounterCard
164
- key={cardValue.id}
165
- card={cardValue}
166
- onDelete={deleteEntry}
167
- />
168
- ))}
169
- </div>
170
- </div>
171
- );
143
+ const { map, setEntry, deleteEntry } = useSharedMap("CUSTOM-MAP-ID");
144
+ return (
145
+ <div>
146
+ <h2>{"Cards"}</h2>
147
+ <button
148
+ onClick={() => {
149
+ const id = uuid();
150
+ setEntry(id, {
151
+ id,
152
+ title: "Custom Card",
153
+ });
154
+ }}
155
+ >
156
+ {"+ Add card"}
157
+ </button>
158
+ <div className="flex wrap row hAlign">
159
+ {[...map.values()].map((cardValue) => (
160
+ <CounterCard
161
+ key={cardValue.id}
162
+ card={cardValue}
163
+ onDelete={deleteEntry}
164
+ />
165
+ ))}
166
+ </div>
167
+ </div>
168
+ );
172
169
  }
173
170
  ```
174
171
 
@@ -270,34 +267,34 @@ Here is a simple example:
270
267
  import { useLiveEvent } from "@microsoft/live-share-react";
271
268
 
272
269
  export function Reactions() {
273
- const { latestEvent, sendEvent } = useLiveEvent("EVENT-ID");
270
+ const { latestEvent, sendEvent } = useLiveEvent("EVENT-ID");
274
271
 
275
- return (
276
- <div>
277
- {/* Buttons for sending reactions */}
278
- <button
279
- onClick={() => {
280
- sendEvent({ emoji: "❤️" });
281
- }}
282
- >
283
- {"❤️"}
284
- </button>
285
- <button
286
- onClick={() => {
287
- sendEvent({ emoji: "😂" });
288
- }}
289
- >
290
- {"😂"}
291
- </button>
292
- {/* Show latest reaction */}
293
- {latestEvent?.local === false && (
294
- <div>{`Received: ${latestEvent?.value.emoji}`}</div>
295
- )}
296
- {latestEvent?.local === true && (
297
- <div>{`Sent: ${latestEvent?.value.emoji}`}</div>
298
- )}
299
- </div>
300
- );
272
+ return (
273
+ <div>
274
+ {/* Buttons for sending reactions */}
275
+ <button
276
+ onClick={() => {
277
+ sendEvent({ emoji: "❤️" });
278
+ }}
279
+ >
280
+ {"❤️"}
281
+ </button>
282
+ <button
283
+ onClick={() => {
284
+ sendEvent({ emoji: "😂" });
285
+ }}
286
+ >
287
+ {"😂"}
288
+ </button>
289
+ {/* Show latest reaction */}
290
+ {latestEvent?.local === false && (
291
+ <div>{`Received: ${latestEvent?.value.emoji}`}</div>
292
+ )}
293
+ {latestEvent?.local === true && (
294
+ <div>{`Sent: ${latestEvent?.value.emoji}`}</div>
295
+ )}
296
+ </div>
297
+ );
301
298
  }
302
299
  ```
303
300
 
@@ -311,37 +308,38 @@ Here is a simple example:
311
308
  import { useLiveTimer } from "@microsoft/live-share-react";
312
309
 
313
310
  export function CountdownTimer() {
314
- const { milliRemaining, timerConfig, start, pause, play } = useLiveTimer("TIMER-ID");
311
+ const { milliRemaining, timerConfig, start, pause, play } =
312
+ useLiveTimer("TIMER-ID");
315
313
 
316
- return (
317
- <div>
318
- <button
319
- onClick={() => {
320
- start(60 * 1000);
321
- }}
322
- >
323
- { timerConfig === undefined ? "Start" : "Reset" }
324
- </button>
325
- { timerConfig !== undefined && (
326
- <button
327
- onClick={() => {
328
- if (timerConfig.running) {
329
- pause();
330
- } else {
331
- play();
332
- }
333
- }}
334
- >
335
- {timerConfig.running ? "Pause" : "Play" }
336
- </button>
337
- )}
338
- { milliRemaining !== undefined && (
339
- <p>
340
- { `${Math.round(milliRemaining / 1000)} / ${Math.round(timerConfig.duration) / 1000}` }
341
- </p>
342
- )}
343
- </div>
344
- );
314
+ return (
315
+ <div>
316
+ <button
317
+ onClick={() => {
318
+ start(60 * 1000);
319
+ }}
320
+ >
321
+ {timerConfig === undefined ? "Start" : "Reset"}
322
+ </button>
323
+ {timerConfig !== undefined && (
324
+ <button
325
+ onClick={() => {
326
+ if (timerConfig.running) {
327
+ pause();
328
+ } else {
329
+ play();
330
+ }
331
+ }}
332
+ >
333
+ {timerConfig.running ? "Pause" : "Play"}
334
+ </button>
335
+ )}
336
+ {milliRemaining !== undefined && (
337
+ <p>
338
+ {`${Math.round(milliRemaining / 1000)} / ${Math.round(timerConfig.duration) / 1000}`}
339
+ </p>
340
+ )}
341
+ </div>
342
+ );
345
343
  }
346
344
  ```
347
345
 
@@ -359,24 +357,24 @@ import { useRef } from "react";
359
357
  const ALLOWED_ROLES = [UserMeetingRole.organizer, UserMeetingRole.presenter];
360
358
 
361
359
  const INITIAL_TRACK =
362
- "https://storage.googleapis.com/media-session/big-buck-bunny/trailer.mov";
360
+ "https://storage.googleapis.com/media-session/big-buck-bunny/trailer.mov";
363
361
 
364
362
  export function VideoPlayer() {
365
- const videoRef = useRef(null);
366
- const { play, pause } = useMediaSynchronizer(
367
- "MEDIA-SESSION-ID",
368
- videoRef,
369
- INITIAL_TRACK,
370
- ALLOWED_ROLES
371
- );
363
+ const videoRef = useRef(null);
364
+ const { play, pause } = useMediaSynchronizer(
365
+ "MEDIA-SESSION-ID",
366
+ videoRef,
367
+ INITIAL_TRACK,
368
+ ALLOWED_ROLES
369
+ );
372
370
 
373
- return (
374
- <div>
375
- <video ref={videoRef} />
376
- <button onClick={play}>{"Play"}</button>
377
- <button onClick={pause}>{"Pause"}</button>
378
- </div>
379
- );
371
+ return (
372
+ <div>
373
+ <video ref={videoRef} />
374
+ <button onClick={play}>{"Play"}</button>
375
+ <button onClick={pause}>{"Pause"}</button>
376
+ </div>
377
+ );
380
378
  }
381
379
  ```
382
380
 
@@ -440,10 +438,7 @@ import { useTaskManager } from "@microsoft/live-share-react";
440
438
 
441
439
  export const ExampleTaskManager = () => {
442
440
  const [taskId, setTaskId] = useState(undefined);
443
- const { lockedTask } = useTaskManager(
444
- "CUSTOM-TASK-MANAGER",
445
- taskId,
446
- );
441
+ const { lockedTask } = useTaskManager("CUSTOM-TASK-MANAGER", taskId);
447
442
 
448
443
  const displayText = lockedTask
449
444
  ? "You are assigned the task"
@@ -454,19 +449,19 @@ export const ExampleTaskManager = () => {
454
449
  {!taskId && (
455
450
  <button
456
451
  onClick={() => {
457
- setTaskId("task-id")
452
+ setTaskId("task-id");
458
453
  }}
459
454
  >
460
- {'Join task queue'}
455
+ {"Join task queue"}
461
456
  </button>
462
457
  )}
463
458
  {taskId && (
464
459
  <button
465
460
  onClick={() => {
466
- setTaskId(undefined)
461
+ setTaskId(undefined);
467
462
  }}
468
463
  >
469
- {'Leave task queue'}
464
+ {"Leave task queue"}
470
465
  </button>
471
466
  )}
472
467
  <p>{displayText}</p>
@@ -477,7 +472,7 @@ export const ExampleTaskManager = () => {
477
472
 
478
473
  ### Custom Fluid object hooks
479
474
 
480
- If you want to dynamically load a custom Fluid object in your app, use the `useDynamicDDS` to create a custom hook. This is the same hook that Live Share React uses internally within our custom hooks, such as `useLiveEvent`. If you made a custom data object or are using one of Fluid's experimental data structures, you also must register your Fluid `LoadableObjectClass` with `DynamicObjectRegistry.registerObjectClass` to `@microsoft/live-share`, if it is not already.
475
+ If you want to dynamically load a custom Fluid object in your app, use the `useDynamicDDS` to create a custom hook. This is the same hook that Live Share React uses internally within our custom hooks, such as `useLiveEvent`. If you made a custom data object or are using one of Fluid's experimental data structures, you also must register your Fluid `SharedObjectKind` with `DynamicObjectRegistry.registerObjectClass` to `@microsoft/live-share`, if it is not already.
481
476
 
482
477
  Implementations may vary for each dynamic object & hook. We will try and update this package periodically with new packages released by Fluid Framework and Live Share, as they are published.
483
478
 
@@ -487,19 +482,25 @@ Example:
487
482
  import React from "react";
488
483
  import { useDynamicDDS } from "@microsoft/live-share-react";
489
484
  import { DynamicObjectRegistry } from "@microsoft/live-share";
490
- import { TaskManager } from "@fluid-experimental/task-manager";
485
+ import { TaskManager } from "@fluid-experimental/task-manager";
491
486
 
492
487
  // Register TaskManager as dynamic object
493
- DynamicObjectRegistry.registerObjectClass(TaskManager, TaskManager.getFactory().type);
488
+ DynamicObjectRegistry.registerObjectClass(
489
+ TaskManager,
490
+ TaskManager.getFactory().type
491
+ );
494
492
 
495
493
  /**
496
494
  * A hook for joining a queue to lock tasks for a given id. Guaranteed to have only one user assigned to a task at a time.
497
- *
495
+ *
498
496
  * @param uniqueKey the unique key for the TaskManager DDS
499
497
  * @param taskId the task id to lock
500
498
  * @returns stateful data about the status of the task lock
501
499
  */
502
- export const useTaskManager = (uniqueKey: string, taskId?: string): {
500
+ export const useTaskManager = (
501
+ uniqueKey: string,
502
+ taskId?: string
503
+ ): {
503
504
  lockedTask: boolean;
504
505
  taskManager: TaskManager | undefined;
505
506
  } => {
@@ -515,7 +516,10 @@ export const useTaskManager = (uniqueKey: string, taskId?: string): {
515
516
  /**
516
517
  * User facing: dynamically load the TaskManager DDS for the given unique key.
517
518
  */
518
- const { dds: taskManager } = useDynamicDDS<TaskManager>(uniqueKey, TaskManager);
519
+ const { dds: taskManager } = useDynamicDDS<TaskManager>(
520
+ uniqueKey,
521
+ TaskManager
522
+ );
519
523
 
520
524
  /**
521
525
  * When the task id changes, lock the task. When the task id is undefined, abandon the task.
@@ -541,7 +545,7 @@ export const useTaskManager = (uniqueKey: string, taskId?: string): {
541
545
  currentTaskIdRef.current = undefined;
542
546
  }
543
547
  }
544
- }
548
+ };
545
549
  onLockTask();
546
550
  } else if (!taskId && currentTaskIdRef.current) {
547
551
  taskManager.abandon(currentTaskIdRef.current);
@@ -558,7 +562,7 @@ export const useTaskManager = (uniqueKey: string, taskId?: string): {
558
562
  taskManager?.abandon(currentTaskIdRef.current);
559
563
  }
560
564
  currentTaskIdRef.current = undefined;
561
- }
565
+ };
562
566
  }, [taskManager, taskId]);
563
567
 
564
568
  return {
@@ -570,9 +574,9 @@ export const useTaskManager = (uniqueKey: string, taskId?: string): {
570
574
 
571
575
  ## Code samples
572
576
 
573
- | Sample name | Description | Javascript |
574
- | ----------------- | ----------------------------------------------------------------------- | ----------------------------------------------------- |
575
- | Live Share React | Simple example with each of our custom Live Share React hooks. | [View](../../samples/javascript/04.live-share-react) |
577
+ | Sample name | Description | Javascript |
578
+ | ---------------- | -------------------------------------------------------------- | ---------------------------------------------------- |
579
+ | Live Share React | Simple example with each of our custom Live Share React hooks. | [View](../../samples/javascript/04.live-share-react) |
576
580
 
577
581
  ## React version compatibility
578
582
 
@@ -584,18 +588,19 @@ The Live Share SDK contains dependencies for [@microsoft/teams-js](https://www.n
584
588
 
585
589
  **It is critical that your app use the package dependencies listed in the table below.** Lookup the version of the `@microsoft/live-share` you're using and set any other dependencies in your package.json file to match:
586
590
 
587
- | @microsoft/live-share | @microsoft/teams-js | fluid-framework | @microsoft/live-share-\* | @fluidframework/azure-client | @microsoft/TeamsFx | @microsoft/TeamsFx-react |
588
- | --------------------- | -------------------- | --------------- | -------------------------- | ---------------------------- | ------------------------------- | ------------------------------- |
589
- | ^1.0.0 | ^2.11.0 | ^1.2.3 | ^1.0.0 | ^1.0.0 | ^2.5.0 | ^2.5.0 |
591
+ | @microsoft/live-share | @microsoft/teams-js | fluid-framework | @microsoft/live-share-\* | @fluidframework/azure-client | @microsoft/TeamsFx | @microsoft/TeamsFx-react |
592
+ | --------------------- | ------------------- | --------------- | ------------------------ | ---------------------------- | ------------------ | ------------------------ |
593
+ | ^2.0.0 | ^2.11.0 | ^2.0.0 | ^2.0.0 | ^2.0.0 | ^2.5.0 | ^2.5.0 |
594
+ | ^1.0.0 | ^2.11.0 | ^1.2.3 | ^1.0.0 | ^1.0.0 | ^2.5.0 | ^2.5.0 |
590
595
 
591
596
  ## Contributing
592
597
 
593
598
  There are several ways you can [contribute](../../CONTRIBUTING.md) to this project:
594
599
 
595
- - [Submit bugs](https://github.com/microsoft/live-share-sdk/issues) and help us verify fixes as they are checked in.
596
- - Review the source code changes.
597
- - Engage with other Live Share developers on [StackOverflow](https://stackoverflow.com/questions/tagged/live-share).
598
- - [Contribute bug fixes](../../CONTRIBUTING.md).
600
+ - [Submit bugs](https://github.com/microsoft/live-share-sdk/issues) and help us verify fixes as they are checked in.
601
+ - Review the source code changes.
602
+ - Engage with other Live Share developers on [StackOverflow](https://stackoverflow.com/questions/tagged/live-share).
603
+ - [Contribute bug fixes](../../CONTRIBUTING.md).
599
604
 
600
605
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact <opencode@microsoft.com> with any additional questions or comments.
601
606
 
@@ -0,0 +1,7 @@
1
+ export * from "./providers/index.js";
2
+ export * from "./shared-hooks/index.js";
3
+ export * from "./live-hooks/index.js";
4
+ export * from "./types/index.js";
5
+ export * from "./providers/index.js";
6
+ export * from "./interfaces/index.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./providers/index.js"), exports);
18
+ __exportStar(require("./shared-hooks/index.js"), exports);
19
+ __exportStar(require("./live-hooks/index.js"), exports);
20
+ __exportStar(require("./types/index.js"), exports);
21
+ __exportStar(require("./providers/index.js"), exports);
22
+ __exportStar(require("./interfaces/index.js"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,uDAAqC;AACrC,wDAAsC"}
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the Microsoft Live Share SDK License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=LiveInterfaceExtensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiveInterfaceExtensions.js","sourceRoot":"","sources":["../../../src/interfaces/LiveInterfaceExtensions.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,2 @@
1
+ export * from "./LiveInterfaceExtensions.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./LiveInterfaceExtensions.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
@@ -22,5 +22,20 @@ export declare class ActionLiveDataObjectUndefinedError extends UseLiveDataObjec
22
22
  export declare class ActionLiveDataObjectInitializedError extends UseLiveDataObjectActionError {
23
23
  constructor(ddsName: string, functionName: string);
24
24
  }
25
+ /**
26
+ * @hidden
27
+ */
28
+ export interface ITeamsJsSdkError {
29
+ /**
30
+ * error code
31
+ */
32
+ errorCode: number;
33
+ /**
34
+ * Optional description for the error. This may contain useful information for web-app developers.
35
+ * This string will not be localized and is not for end-user consumption.
36
+ * App should not depend on the string content. The exact value may change. This is only for debugging purposes.
37
+ */
38
+ message?: string;
39
+ }
25
40
  export {};
26
41
  //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionLiveDataObjectInitializedError = exports.ActionLiveDataObjectUndefinedError = exports.ActionContainerNotJoinedError = void 0;
4
+ /**
5
+ * @hidden
6
+ */
7
+ class UseLiveDataObjectActionError extends Error {
8
+ constructor(ddsName, functionName, message) {
9
+ const hookName = `use${toFirstLetterUppercase(ddsName)}`;
10
+ super(`${hookName} ${functionName}: ${message}`);
11
+ }
12
+ }
13
+ /**
14
+ * @hidden
15
+ */
16
+ class ActionContainerNotJoinedError extends UseLiveDataObjectActionError {
17
+ constructor(ddsName, functionName) {
18
+ super(ddsName, functionName, "container has not yet been joined.\nTo fix this error, ensure `container` from `useFluidObjectsContext()` is defined before calling this function.\nIf using `<LiveShareProvider>`, you can instead check the `joined` response is true from `useLiveShareContext()` before calling this function.");
19
+ }
20
+ }
21
+ exports.ActionContainerNotJoinedError = ActionContainerNotJoinedError;
22
+ /**
23
+ * @hidden
24
+ */
25
+ class ActionLiveDataObjectUndefinedError extends UseLiveDataObjectActionError {
26
+ constructor(ddsName, functionName) {
27
+ const hookName = `use${toFirstLetterUppercase(ddsName)}`;
28
+ super(ddsName, functionName, `${ddsName} is undefined, which means it is still being dynamically created.\nTo fix this error, ensure that \`${ddsName}\` (found in the response of \`${hookName}\`) is defined before calling this function.`);
29
+ }
30
+ }
31
+ exports.ActionLiveDataObjectUndefinedError = ActionLiveDataObjectUndefinedError;
32
+ /**
33
+ * @hidden
34
+ */
35
+ class ActionLiveDataObjectInitializedError extends UseLiveDataObjectActionError {
36
+ constructor(ddsName, functionName) {
37
+ const hookName = `use${toFirstLetterUppercase(ddsName)}`;
38
+ super(ddsName, functionName, `${ddsName} is not yet initialized.\nTo fix this error, ensure that \`${ddsName}?.isInitialized\` is true (found in the response of \`${hookName}\`) before calling this function.`);
39
+ }
40
+ }
41
+ exports.ActionLiveDataObjectInitializedError = ActionLiveDataObjectInitializedError;
42
+ /**
43
+ * @hidden
44
+ */
45
+ function toFirstLetterUppercase(word) {
46
+ return word[0].toUpperCase() + word.substring(1);
47
+ }
48
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
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,MAAa,6BAA8B,SAAQ,4BAA4B;IAC3E,YAAY,OAAe,EAAE,YAAoB;QAC7C,KAAK,CACD,OAAO,EACP,YAAY,EACZ,oSAAoS,CACvS,CAAC;IACN,CAAC;CACJ;AARD,sEAQC;AAED;;GAEG;AACH,MAAa,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;AATD,gFASC;AAED;;GAEG;AACH,MAAa,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;AATD,oFASC;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"}
@@ -0,0 +1,3 @@
1
+ export * from "./errors.js";
2
+ export * from "./type-guards.js";
3
+ //# sourceMappingURL=index.d.ts.map