@microsoft/live-share-react 2.0.0-internal.1 → 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.
- package/LICENSE +64 -61
- package/README.md +173 -168
- package/bin/cjs/index.d.ts +7 -0
- package/bin/cjs/index.d.ts.map +1 -0
- package/bin/cjs/index.js +23 -0
- package/bin/cjs/index.js.map +1 -0
- package/bin/cjs/interfaces/LiveInterfaceExtensions.d.ts.map +1 -0
- package/bin/cjs/interfaces/LiveInterfaceExtensions.js +7 -0
- package/bin/cjs/interfaces/LiveInterfaceExtensions.js.map +1 -0
- package/bin/cjs/interfaces/index.d.ts +2 -0
- package/bin/cjs/interfaces/index.d.ts.map +1 -0
- package/bin/cjs/interfaces/index.js +18 -0
- package/bin/cjs/interfaces/index.js.map +1 -0
- package/bin/cjs/internal/errors.d.ts.map +1 -0
- package/bin/cjs/internal/errors.js +48 -0
- package/bin/cjs/internal/errors.js.map +1 -0
- package/bin/cjs/internal/index.d.ts +3 -0
- package/bin/cjs/internal/index.d.ts.map +1 -0
- package/bin/cjs/internal/index.js +19 -0
- package/bin/cjs/internal/index.js.map +1 -0
- package/bin/{internal → cjs/internal}/type-guards.d.ts +1 -1
- package/bin/cjs/internal/type-guards.d.ts.map +1 -0
- package/bin/cjs/internal/type-guards.js +24 -0
- package/bin/cjs/internal/type-guards.js.map +1 -0
- package/bin/cjs/live-hooks/index.d.ts +8 -0
- package/bin/cjs/live-hooks/index.d.ts.map +1 -0
- package/bin/cjs/live-hooks/index.js +24 -0
- package/bin/cjs/live-hooks/index.js.map +1 -0
- package/bin/cjs/live-hooks/useLiveCanvas.d.ts +80 -0
- package/bin/cjs/live-hooks/useLiveCanvas.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLiveCanvas.js +244 -0
- package/bin/cjs/live-hooks/useLiveCanvas.js.map +1 -0
- package/bin/{live-hooks → cjs/live-hooks}/useLiveEvent.d.ts +37 -1
- package/bin/cjs/live-hooks/useLiveEvent.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLiveEvent.js +150 -0
- package/bin/cjs/live-hooks/useLiveEvent.js.map +1 -0
- package/bin/cjs/live-hooks/useLiveFollowMode.d.ts +163 -0
- package/bin/cjs/live-hooks/useLiveFollowMode.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLiveFollowMode.js +360 -0
- package/bin/cjs/live-hooks/useLiveFollowMode.js.map +1 -0
- package/bin/cjs/live-hooks/useLivePresence.d.ts +76 -0
- package/bin/cjs/live-hooks/useLivePresence.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLivePresence.js +170 -0
- package/bin/cjs/live-hooks/useLivePresence.js.map +1 -0
- package/bin/{live-hooks → cjs/live-hooks}/useLiveState.d.ts +46 -1
- package/bin/cjs/live-hooks/useLiveState.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLiveState.js +134 -0
- package/bin/cjs/live-hooks/useLiveState.js.map +1 -0
- package/bin/{live-hooks → cjs/live-hooks}/useLiveTimer.d.ts +56 -1
- package/bin/cjs/live-hooks/useLiveTimer.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useLiveTimer.js +233 -0
- package/bin/cjs/live-hooks/useLiveTimer.js.map +1 -0
- package/bin/cjs/live-hooks/useMediaSynchronizer.d.ts +86 -0
- package/bin/cjs/live-hooks/useMediaSynchronizer.d.ts.map +1 -0
- package/bin/cjs/live-hooks/useMediaSynchronizer.js +301 -0
- package/bin/cjs/live-hooks/useMediaSynchronizer.js.map +1 -0
- package/bin/cjs/package.json +1 -0
- package/bin/{providers → cjs/providers}/AzureProvider.d.ts +9 -9
- package/bin/cjs/providers/AzureProvider.d.ts.map +1 -0
- package/bin/cjs/providers/AzureProvider.js +127 -0
- package/bin/cjs/providers/AzureProvider.js.map +1 -0
- package/bin/{providers → cjs/providers}/LiveShareProvider.d.ts +106 -4
- package/bin/cjs/providers/LiveShareProvider.d.ts.map +1 -0
- package/bin/cjs/providers/LiveShareProvider.js +205 -0
- package/bin/cjs/providers/LiveShareProvider.js.map +1 -0
- package/bin/cjs/providers/index.d.ts +3 -0
- package/bin/cjs/providers/index.d.ts.map +1 -0
- package/bin/cjs/providers/index.js +19 -0
- package/bin/cjs/providers/index.js.map +1 -0
- package/bin/cjs/shared-hooks/index.d.ts +7 -0
- package/bin/cjs/shared-hooks/index.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/index.js +23 -0
- package/bin/cjs/shared-hooks/index.js.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-constants.d.ts +3 -0
- package/bin/cjs/shared-hooks/internals/tree-node-constants.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-constants.js +6 -0
- package/bin/cjs/shared-hooks/internals/tree-node-constants.js.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-types.d.ts +10 -0
- package/bin/cjs/shared-hooks/internals/tree-node-types.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-types.js +23 -0
- package/bin/cjs/shared-hooks/internals/tree-node-types.js.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-utils.d.ts +33 -0
- package/bin/cjs/shared-hooks/internals/tree-node-utils.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/internals/tree-node-utils.js +193 -0
- package/bin/cjs/shared-hooks/internals/tree-node-utils.js.map +1 -0
- package/bin/{shared-hooks → cjs/shared-hooks}/useDynamicDDS.d.ts +4 -4
- package/bin/cjs/shared-hooks/useDynamicDDS.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useDynamicDDS.js +87 -0
- package/bin/cjs/shared-hooks/useDynamicDDS.js.map +1 -0
- package/bin/{shared-hooks → cjs/shared-hooks}/useSharedMap.d.ts +4 -2
- package/bin/cjs/shared-hooks/useSharedMap.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useSharedMap.js +134 -0
- package/bin/cjs/shared-hooks/useSharedMap.js.map +1 -0
- package/bin/{shared-hooks → cjs/shared-hooks}/useSharedState.d.ts +1 -1
- package/bin/cjs/shared-hooks/useSharedState.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useSharedState.js +80 -0
- package/bin/cjs/shared-hooks/useSharedState.js.map +1 -0
- package/bin/{shared-hooks → cjs/shared-hooks}/useSharedStateRegistry.d.ts +1 -1
- package/bin/cjs/shared-hooks/useSharedStateRegistry.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useSharedStateRegistry.js +120 -0
- package/bin/cjs/shared-hooks/useSharedStateRegistry.js.map +1 -0
- package/bin/cjs/shared-hooks/useSharedTree.d.ts +57 -0
- package/bin/cjs/shared-hooks/useSharedTree.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useSharedTree.js +123 -0
- package/bin/cjs/shared-hooks/useSharedTree.js.map +1 -0
- package/bin/cjs/shared-hooks/useTreeNode.d.ts +96 -0
- package/bin/cjs/shared-hooks/useTreeNode.d.ts.map +1 -0
- package/bin/cjs/shared-hooks/useTreeNode.js +135 -0
- package/bin/cjs/shared-hooks/useTreeNode.js.map +1 -0
- package/bin/{types → cjs/types}/ActionTypes.d.ts +7 -7
- package/bin/cjs/types/ActionTypes.d.ts.map +1 -0
- package/bin/cjs/types/ActionTypes.js +7 -0
- package/bin/cjs/types/ActionTypes.js.map +1 -0
- package/bin/cjs/types/PropTypes.d.ts +56 -0
- package/bin/cjs/types/PropTypes.d.ts.map +1 -0
- package/bin/cjs/types/PropTypes.js +7 -0
- package/bin/cjs/types/PropTypes.js.map +1 -0
- package/bin/{types → cjs/types}/ResultTypes.d.ts +50 -18
- package/bin/cjs/types/ResultTypes.d.ts.map +1 -0
- package/bin/cjs/types/ResultTypes.js +7 -0
- package/bin/cjs/types/ResultTypes.js.map +1 -0
- package/bin/cjs/types/index.d.ts +4 -0
- package/bin/cjs/types/index.d.ts.map +1 -0
- package/bin/cjs/types/index.js +20 -0
- package/bin/cjs/types/index.js.map +1 -0
- package/bin/cjs/utils/index.d.ts +2 -0
- package/bin/cjs/utils/index.d.ts.map +1 -0
- package/bin/cjs/utils/index.js +18 -0
- package/bin/cjs/utils/index.js.map +1 -0
- package/bin/cjs/utils/type-check.d.ts.map +1 -0
- package/bin/cjs/utils/type-check.js +62 -0
- package/bin/cjs/utils/type-check.js.map +1 -0
- package/bin/esm/index.d.ts +7 -0
- package/bin/esm/index.d.ts.map +1 -0
- package/bin/esm/index.js +7 -0
- package/bin/esm/index.js.map +1 -0
- package/bin/esm/interfaces/LiveInterfaceExtensions.d.ts +26 -0
- package/bin/esm/interfaces/LiveInterfaceExtensions.d.ts.map +1 -0
- package/bin/esm/interfaces/LiveInterfaceExtensions.js.map +1 -0
- package/bin/esm/interfaces/index.d.ts +2 -0
- package/bin/esm/interfaces/index.d.ts.map +1 -0
- package/bin/esm/interfaces/index.js +2 -0
- package/bin/esm/interfaces/index.js.map +1 -0
- package/bin/esm/internal/errors.d.ts +41 -0
- package/bin/esm/internal/errors.d.ts.map +1 -0
- package/bin/esm/internal/errors.js.map +1 -0
- package/bin/esm/internal/index.d.ts +3 -0
- package/bin/esm/internal/index.d.ts.map +1 -0
- package/bin/esm/internal/index.js +3 -0
- package/bin/esm/internal/index.js.map +1 -0
- package/bin/esm/internal/type-guards.d.ts +11 -0
- package/bin/esm/internal/type-guards.d.ts.map +1 -0
- package/bin/esm/internal/type-guards.js.map +1 -0
- package/bin/esm/live-hooks/index.d.ts +8 -0
- package/bin/esm/live-hooks/index.d.ts.map +1 -0
- package/bin/esm/live-hooks/index.js +8 -0
- package/bin/esm/live-hooks/index.js.map +1 -0
- package/bin/esm/live-hooks/useLiveCanvas.d.ts +80 -0
- package/bin/esm/live-hooks/useLiveCanvas.d.ts.map +1 -0
- package/bin/esm/live-hooks/useLiveCanvas.js +238 -0
- package/bin/esm/live-hooks/useLiveCanvas.js.map +1 -0
- package/bin/esm/live-hooks/useLiveEvent.d.ts +59 -0
- package/bin/esm/live-hooks/useLiveEvent.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useLiveEvent.js +41 -5
- package/bin/esm/live-hooks/useLiveEvent.js.map +1 -0
- package/bin/esm/live-hooks/useLiveFollowMode.d.ts +163 -0
- package/bin/esm/live-hooks/useLiveFollowMode.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useLiveFollowMode.js +148 -5
- package/bin/esm/live-hooks/useLiveFollowMode.js.map +1 -0
- package/bin/esm/live-hooks/useLivePresence.d.ts +76 -0
- package/bin/esm/live-hooks/useLivePresence.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useLivePresence.js +71 -13
- package/bin/esm/live-hooks/useLivePresence.js.map +1 -0
- package/bin/esm/live-hooks/useLiveState.d.ts +66 -0
- package/bin/esm/live-hooks/useLiveState.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useLiveState.js +54 -5
- package/bin/esm/live-hooks/useLiveState.js.map +1 -0
- package/bin/esm/live-hooks/useLiveTimer.d.ts +80 -0
- package/bin/esm/live-hooks/useLiveTimer.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useLiveTimer.js +58 -3
- package/bin/esm/live-hooks/useLiveTimer.js.map +1 -0
- package/bin/esm/live-hooks/useMediaSynchronizer.d.ts +86 -0
- package/bin/esm/live-hooks/useMediaSynchronizer.d.ts.map +1 -0
- package/bin/{live-hooks → esm/live-hooks}/useMediaSynchronizer.js +66 -5
- package/bin/esm/live-hooks/useMediaSynchronizer.js.map +1 -0
- package/bin/esm/providers/AzureProvider.d.ts +113 -0
- package/bin/esm/providers/AzureProvider.d.ts.map +1 -0
- package/bin/{providers → esm/providers}/AzureProvider.js +10 -10
- package/bin/esm/providers/AzureProvider.js.map +1 -0
- package/bin/esm/providers/LiveShareProvider.d.ts +193 -0
- package/bin/esm/providers/LiveShareProvider.d.ts.map +1 -0
- package/bin/{providers → esm/providers}/LiveShareProvider.js +111 -9
- package/bin/esm/providers/LiveShareProvider.js.map +1 -0
- package/bin/esm/providers/index.d.ts +3 -0
- package/bin/esm/providers/index.d.ts.map +1 -0
- package/bin/esm/providers/index.js +3 -0
- package/bin/esm/providers/index.js.map +1 -0
- package/bin/esm/shared-hooks/index.d.ts +7 -0
- package/bin/esm/shared-hooks/index.d.ts.map +1 -0
- package/bin/esm/shared-hooks/index.js +7 -0
- package/bin/esm/shared-hooks/index.js.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts +3 -0
- package/bin/esm/shared-hooks/internals/tree-node-constants.d.ts.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-constants.js +3 -0
- package/bin/esm/shared-hooks/internals/tree-node-constants.js.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-types.d.ts +10 -0
- package/bin/esm/shared-hooks/internals/tree-node-types.d.ts.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-types.js +18 -0
- package/bin/esm/shared-hooks/internals/tree-node-types.js.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts +33 -0
- package/bin/esm/shared-hooks/internals/tree-node-utils.d.ts.map +1 -0
- package/bin/esm/shared-hooks/internals/tree-node-utils.js +188 -0
- package/bin/esm/shared-hooks/internals/tree-node-utils.js.map +1 -0
- package/bin/esm/shared-hooks/useDynamicDDS.d.ts +23 -0
- package/bin/esm/shared-hooks/useDynamicDDS.d.ts.map +1 -0
- package/bin/{shared-hooks → esm/shared-hooks}/useDynamicDDS.js +20 -11
- package/bin/esm/shared-hooks/useDynamicDDS.js.map +1 -0
- package/bin/esm/shared-hooks/useSharedMap.d.ts +25 -0
- package/bin/esm/shared-hooks/useSharedMap.d.ts.map +1 -0
- package/bin/{shared-hooks → esm/shared-hooks}/useSharedMap.js +27 -13
- package/bin/esm/shared-hooks/useSharedMap.js.map +1 -0
- package/bin/esm/shared-hooks/useSharedState.d.ts +22 -0
- package/bin/esm/shared-hooks/useSharedState.d.ts.map +1 -0
- package/bin/{shared-hooks → esm/shared-hooks}/useSharedState.js +2 -2
- package/bin/esm/shared-hooks/useSharedState.js.map +1 -0
- package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts +37 -0
- package/bin/esm/shared-hooks/useSharedStateRegistry.d.ts.map +1 -0
- package/bin/{shared-hooks → esm/shared-hooks}/useSharedStateRegistry.js +27 -19
- package/bin/esm/shared-hooks/useSharedStateRegistry.js.map +1 -0
- package/bin/esm/shared-hooks/useSharedTree.d.ts +57 -0
- package/bin/esm/shared-hooks/useSharedTree.d.ts.map +1 -0
- package/bin/esm/shared-hooks/useSharedTree.js +117 -0
- package/bin/esm/shared-hooks/useSharedTree.js.map +1 -0
- package/bin/esm/shared-hooks/useTreeNode.d.ts +96 -0
- package/bin/esm/shared-hooks/useTreeNode.d.ts.map +1 -0
- package/bin/esm/shared-hooks/useTreeNode.js +132 -0
- package/bin/esm/shared-hooks/useTreeNode.js.map +1 -0
- package/bin/esm/types/ActionTypes.d.ts +112 -0
- package/bin/esm/types/ActionTypes.d.ts.map +1 -0
- package/bin/esm/types/ActionTypes.js.map +1 -0
- package/bin/esm/types/PropTypes.d.ts +56 -0
- package/bin/esm/types/PropTypes.d.ts.map +1 -0
- package/bin/esm/types/PropTypes.js.map +1 -0
- package/bin/esm/types/ResultTypes.d.ts +334 -0
- package/bin/esm/types/ResultTypes.d.ts.map +1 -0
- package/bin/esm/types/ResultTypes.js.map +1 -0
- package/bin/esm/types/index.d.ts +4 -0
- package/bin/esm/types/index.d.ts.map +1 -0
- package/bin/esm/types/index.js +4 -0
- package/bin/esm/types/index.js.map +1 -0
- package/bin/esm/utils/index.d.ts +2 -0
- package/bin/esm/utils/index.d.ts.map +1 -0
- package/bin/esm/utils/index.js +2 -0
- package/bin/esm/utils/index.js.map +1 -0
- package/bin/esm/utils/type-check.d.ts +15 -0
- package/bin/esm/utils/type-check.d.ts.map +1 -0
- package/bin/esm/utils/type-check.js.map +1 -0
- package/package.json +61 -47
- package/src/index.ts +6 -6
- package/src/interfaces/index.ts +1 -1
- package/src/internal/index.ts +2 -2
- package/src/internal/type-guards.ts +1 -1
- package/src/live-hooks/index.ts +7 -7
- package/src/live-hooks/useLiveCanvas.ts +154 -82
- package/src/live-hooks/useLiveEvent.ts +43 -7
- package/src/live-hooks/useLiveFollowMode.ts +149 -6
- package/src/live-hooks/useLivePresence.ts +80 -17
- package/src/live-hooks/useLiveState.ts +54 -6
- package/src/live-hooks/useLiveTimer.ts +59 -4
- package/src/live-hooks/useMediaSynchronizer.ts +71 -6
- package/src/providers/AzureProvider.tsx +21 -21
- package/src/providers/LiveShareProvider.tsx +115 -13
- package/src/providers/index.ts +2 -2
- package/src/shared-hooks/index.ts +6 -4
- package/src/shared-hooks/internals/tree-node-constants.ts +2 -0
- package/src/shared-hooks/internals/tree-node-types.ts +26 -0
- package/src/shared-hooks/internals/tree-node-utils.ts +269 -0
- package/src/shared-hooks/useDynamicDDS.ts +28 -17
- package/src/shared-hooks/useSharedMap.ts +42 -17
- package/src/shared-hooks/useSharedState.ts +6 -3
- package/src/shared-hooks/useSharedStateRegistry.ts +44 -22
- package/src/shared-hooks/useSharedTree.ts +144 -0
- package/src/shared-hooks/useTreeNode.ts +147 -0
- package/src/types/ActionTypes.ts +13 -9
- package/src/types/PropTypes.ts +57 -0
- package/src/types/ResultTypes.ts +71 -17
- package/src/types/index.ts +3 -3
- package/src/utils/index.ts +1 -1
- package/tsconfig.cjs.json +14 -0
- package/tsconfig.json +65 -70
- package/.nycrc.json +0 -10
- package/bin/index.d.ts +0 -7
- package/bin/index.d.ts.map +0 -1
- package/bin/index.js +0 -7
- package/bin/index.js.map +0 -1
- package/bin/interfaces/LiveInterfaceExtensions.d.ts.map +0 -1
- package/bin/interfaces/LiveInterfaceExtensions.js.map +0 -1
- package/bin/interfaces/index.d.ts +0 -2
- package/bin/interfaces/index.d.ts.map +0 -1
- package/bin/interfaces/index.js +0 -2
- package/bin/interfaces/index.js.map +0 -1
- package/bin/internal/errors.d.ts.map +0 -1
- package/bin/internal/errors.js.map +0 -1
- package/bin/internal/index.d.ts +0 -3
- package/bin/internal/index.d.ts.map +0 -1
- package/bin/internal/index.js +0 -3
- package/bin/internal/index.js.map +0 -1
- package/bin/internal/type-guards.d.ts.map +0 -1
- package/bin/internal/type-guards.js.map +0 -1
- package/bin/live-hooks/index.d.ts +0 -8
- package/bin/live-hooks/index.d.ts.map +0 -1
- package/bin/live-hooks/index.js +0 -8
- package/bin/live-hooks/index.js.map +0 -1
- package/bin/live-hooks/useLiveCanvas.d.ts +0 -29
- package/bin/live-hooks/useLiveCanvas.d.ts.map +0 -1
- package/bin/live-hooks/useLiveCanvas.js +0 -160
- package/bin/live-hooks/useLiveCanvas.js.map +0 -1
- package/bin/live-hooks/useLiveEvent.d.ts.map +0 -1
- package/bin/live-hooks/useLiveEvent.js.map +0 -1
- package/bin/live-hooks/useLiveFollowMode.d.ts +0 -24
- package/bin/live-hooks/useLiveFollowMode.d.ts.map +0 -1
- package/bin/live-hooks/useLiveFollowMode.js.map +0 -1
- package/bin/live-hooks/useLivePresence.d.ts +0 -26
- package/bin/live-hooks/useLivePresence.d.ts.map +0 -1
- package/bin/live-hooks/useLivePresence.js.map +0 -1
- package/bin/live-hooks/useLiveState.d.ts.map +0 -1
- package/bin/live-hooks/useLiveState.js.map +0 -1
- package/bin/live-hooks/useLiveTimer.d.ts.map +0 -1
- package/bin/live-hooks/useLiveTimer.js.map +0 -1
- package/bin/live-hooks/useMediaSynchronizer.d.ts +0 -25
- package/bin/live-hooks/useMediaSynchronizer.d.ts.map +0 -1
- package/bin/live-hooks/useMediaSynchronizer.js.map +0 -1
- package/bin/providers/AzureProvider.d.ts.map +0 -1
- package/bin/providers/AzureProvider.js.map +0 -1
- package/bin/providers/LiveShareProvider.d.ts.map +0 -1
- package/bin/providers/LiveShareProvider.js.map +0 -1
- package/bin/providers/index.d.ts +0 -3
- package/bin/providers/index.d.ts.map +0 -1
- package/bin/providers/index.js +0 -3
- package/bin/providers/index.js.map +0 -1
- package/bin/shared-hooks/index.d.ts +0 -5
- package/bin/shared-hooks/index.d.ts.map +0 -1
- package/bin/shared-hooks/index.js +0 -5
- package/bin/shared-hooks/index.js.map +0 -1
- package/bin/shared-hooks/useDynamicDDS.d.ts.map +0 -1
- package/bin/shared-hooks/useDynamicDDS.js.map +0 -1
- package/bin/shared-hooks/useSharedMap.d.ts.map +0 -1
- package/bin/shared-hooks/useSharedMap.js.map +0 -1
- package/bin/shared-hooks/useSharedState.d.ts.map +0 -1
- package/bin/shared-hooks/useSharedState.js.map +0 -1
- package/bin/shared-hooks/useSharedStateRegistry.d.ts.map +0 -1
- package/bin/shared-hooks/useSharedStateRegistry.js.map +0 -1
- package/bin/types/ActionTypes.d.ts.map +0 -1
- package/bin/types/ActionTypes.js.map +0 -1
- package/bin/types/PropTypes.d.ts +0 -8
- package/bin/types/PropTypes.d.ts.map +0 -1
- package/bin/types/PropTypes.js.map +0 -1
- package/bin/types/ResultTypes.d.ts.map +0 -1
- package/bin/types/ResultTypes.js.map +0 -1
- package/bin/types/index.d.ts +0 -4
- package/bin/types/index.d.ts.map +0 -1
- package/bin/types/index.js +0 -4
- package/bin/types/index.js.map +0 -1
- package/bin/utils/index.d.ts +0 -2
- package/bin/utils/index.d.ts.map +0 -1
- package/bin/utils/index.js +0 -2
- package/bin/utils/index.js.map +0 -1
- package/bin/utils/type-check.d.ts.map +0 -1
- package/bin/utils/type-check.js.map +0 -1
- package/tsconfig.build.json +0 -6
- /package/bin/{interfaces → cjs/interfaces}/LiveInterfaceExtensions.d.ts +0 -0
- /package/bin/{internal → cjs/internal}/errors.d.ts +0 -0
- /package/bin/{utils → cjs/utils}/type-check.d.ts +0 -0
- /package/bin/{interfaces → esm/interfaces}/LiveInterfaceExtensions.js +0 -0
- /package/bin/{internal → esm/internal}/errors.js +0 -0
- /package/bin/{internal → esm/internal}/type-guards.js +0 -0
- /package/bin/{types → esm/types}/ActionTypes.js +0 -0
- /package/bin/{types → esm/types}/PropTypes.js +0 -0
- /package/bin/{types → esm/types}/ResultTypes.js +0 -0
- /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
|
-
|
|
17
|
+
// Call app.initialize() from teams-js before rendering LiveShareProvider
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
270
|
+
const { latestEvent, sendEvent } = useLiveEvent("EVENT-ID");
|
|
274
271
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
-
|
|
311
|
+
const { milliRemaining, timerConfig, start, pause, play } =
|
|
312
|
+
useLiveTimer("TIMER-ID");
|
|
315
313
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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
|
-
|
|
360
|
+
"https://storage.googleapis.com/media-session/big-buck-bunny/trailer.mov";
|
|
363
361
|
|
|
364
362
|
export function VideoPlayer() {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
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
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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 `
|
|
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
|
|
485
|
+
import { TaskManager } from "@fluid-experimental/task-manager";
|
|
491
486
|
|
|
492
487
|
// Register TaskManager as dynamic object
|
|
493
|
-
DynamicObjectRegistry.registerObjectClass(
|
|
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 = (
|
|
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>(
|
|
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
|
|
574
|
-
|
|
|
575
|
-
| 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
|
|
588
|
-
| --------------------- |
|
|
589
|
-
| ^
|
|
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
|
-
-
|
|
596
|
-
-
|
|
597
|
-
-
|
|
598
|
-
-
|
|
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"}
|
package/bin/cjs/index.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"LiveInterfaceExtensions.js","sourceRoot":"","sources":["../../../src/interfaces/LiveInterfaceExtensions.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -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"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./errors.js"), exports);
|
|
18
|
+
__exportStar(require("./type-guards.js"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|