@huddle01/react
Advanced tools
Comparing version 0.0.13-beta.9 to 0.0.13-beta.10
@@ -5,3 +5,3 @@ 'use strict'; | ||
var me_atom = require('../../dist/me.atom-0b54f4ae.cjs.dev.js'); | ||
var me_atom = require('../../dist/me.atom-9f6858e3.cjs.dev.js'); | ||
var objectWithoutProperties = require('../../dist/objectWithoutProperties-c87edf52.cjs.dev.js'); | ||
@@ -8,0 +8,0 @@ var React = require('react'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var me_atom = require('../../dist/me.atom-a0d5f446.cjs.prod.js'); | ||
var me_atom = require('../../dist/me.atom-e6143ccd.cjs.prod.js'); | ||
var objectWithoutProperties = require('../../dist/objectWithoutProperties-801abaf8.cjs.prod.js'); | ||
@@ -8,0 +8,0 @@ var React = require('react'); |
@@ -1,2 +0,2 @@ | ||
import { u as useHuddle01Atom, a as useMeAtom, _ as _objectSpread2 } from '../../dist/me.atom-5a0945b3.esm.js'; | ||
import { u as useHuddle01Atom, a as useMeAtom, _ as _objectSpread2 } from '../../dist/me.atom-255e381d.esm.js'; | ||
import { _ as _slicedToArray, a as _objectWithoutProperties } from '../../dist/objectWithoutProperties-5c235ed1.esm.js'; | ||
@@ -3,0 +3,0 @@ import { useState, useEffect } from 'react'; |
@@ -13,2 +13,6 @@ declare const useRoom: () => { | ||
}; | ||
endRoom: { | ||
(): void; | ||
isCallable: boolean; | ||
}; | ||
error: null; | ||
@@ -15,0 +19,0 @@ }; |
@@ -7,4 +7,4 @@ 'use strict'; | ||
require('@huddle01/web-core'); | ||
require('./me.atom-0b54f4ae.cjs.dev.js'); | ||
var useHuddle01 = require('./useHuddle01-bec649d3.cjs.dev.js'); | ||
require('./me.atom-9f6858e3.cjs.dev.js'); | ||
var useHuddle01 = require('./useHuddle01-62eddde4.cjs.dev.js'); | ||
require('jotai/react'); | ||
@@ -11,0 +11,0 @@ require('jotai/vanilla'); |
@@ -7,4 +7,4 @@ 'use strict'; | ||
require('@huddle01/web-core'); | ||
require('./me.atom-a0d5f446.cjs.prod.js'); | ||
var useHuddle01 = require('./useHuddle01-db60160a.cjs.prod.js'); | ||
require('./me.atom-e6143ccd.cjs.prod.js'); | ||
var useHuddle01 = require('./useHuddle01-64accc41.cjs.prod.js'); | ||
require('jotai/react'); | ||
@@ -11,0 +11,0 @@ require('jotai/vanilla'); |
import 'react'; | ||
import '@huddle01/web-core'; | ||
import './me.atom-5a0945b3.esm.js'; | ||
export { u as useHuddle01 } from './useHuddle01-9bec6f3a.esm.js'; | ||
import './me.atom-255e381d.esm.js'; | ||
export { u as useHuddle01 } from './useHuddle01-b83e7d18.esm.js'; | ||
import 'jotai/react'; | ||
@@ -6,0 +6,0 @@ import 'jotai/vanilla'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var me_atom = require('../../dist/me.atom-0b54f4ae.cjs.dev.js'); | ||
var me_atom = require('../../dist/me.atom-9f6858e3.cjs.dev.js'); | ||
var usePeer = require('../../dist/usePeer-b04a763a.cjs.dev.js'); | ||
@@ -11,3 +11,3 @@ var objectWithoutProperties = require('../../dist/objectWithoutProperties-c87edf52.cjs.dev.js'); | ||
var webCore = require('@huddle01/web-core'); | ||
var useHuddle01 = require('../../dist/useHuddle01-bec649d3.cjs.dev.js'); | ||
var useHuddle01 = require('../../dist/useHuddle01-62eddde4.cjs.dev.js'); | ||
require('jotai/react'); | ||
@@ -628,3 +628,6 @@ require('jotai/vanilla'); | ||
setState = _useHuddle01Atom2[1]; | ||
var setMe = me_atom.useMeSetAtom(); | ||
var _useMeAtom = me_atom.useMeAtom(), | ||
_useMeAtom2 = objectWithoutProperties._slicedToArray(_useMeAtom, 2), | ||
me = _useMeAtom2[0], | ||
setMe = _useMeAtom2[1]; | ||
var setPeers = useHuddle01.usePeersSetAtom(); | ||
@@ -645,2 +648,10 @@ | ||
}; | ||
var endRoom = function endRoom() { | ||
webCore.huddleClient.endRoom(); | ||
setState(function (prev) { | ||
return me_atom._objectSpread2(me_atom._objectSpread2({}, prev), {}, { | ||
roomState: 'INIT' | ||
}); | ||
}); | ||
}; | ||
@@ -650,2 +661,3 @@ // attributes | ||
leaveRoom.isCallable = roomState === 'ROOM'; | ||
endRoom.isCallable = roomState === 'ROOM' && me.role === 'host'; | ||
React.useEffect(function () { | ||
@@ -666,3 +678,7 @@ webCore.huddleClient.on('room:joined', function () { | ||
setState(me_atom.initialHuddle01State); | ||
setMe(me_atom.initialMeState); | ||
setMe(function (prev) { | ||
return me_atom._objectSpread2(me_atom._objectSpread2({}, me_atom.initialMeState), {}, { | ||
meId: prev.meId | ||
}); | ||
}); | ||
setPeers(useHuddle01.initialPeersState); | ||
@@ -677,2 +693,3 @@ }); | ||
leaveRoom: leaveRoom, | ||
endRoom: endRoom, | ||
error: error | ||
@@ -679,0 +696,0 @@ }; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var me_atom = require('../../dist/me.atom-a0d5f446.cjs.prod.js'); | ||
var me_atom = require('../../dist/me.atom-e6143ccd.cjs.prod.js'); | ||
var usePeer = require('../../dist/usePeer-71c1bfaf.cjs.prod.js'); | ||
@@ -11,3 +11,3 @@ var objectWithoutProperties = require('../../dist/objectWithoutProperties-801abaf8.cjs.prod.js'); | ||
var webCore = require('@huddle01/web-core'); | ||
var useHuddle01 = require('../../dist/useHuddle01-db60160a.cjs.prod.js'); | ||
var useHuddle01 = require('../../dist/useHuddle01-64accc41.cjs.prod.js'); | ||
require('jotai/react'); | ||
@@ -628,3 +628,6 @@ require('jotai/vanilla'); | ||
setState = _useHuddle01Atom2[1]; | ||
var setMe = me_atom.useMeSetAtom(); | ||
var _useMeAtom = me_atom.useMeAtom(), | ||
_useMeAtom2 = objectWithoutProperties._slicedToArray(_useMeAtom, 2), | ||
me = _useMeAtom2[0], | ||
setMe = _useMeAtom2[1]; | ||
var setPeers = useHuddle01.usePeersSetAtom(); | ||
@@ -645,2 +648,10 @@ | ||
}; | ||
var endRoom = function endRoom() { | ||
webCore.huddleClient.endRoom(); | ||
setState(function (prev) { | ||
return me_atom._objectSpread2(me_atom._objectSpread2({}, prev), {}, { | ||
roomState: 'INIT' | ||
}); | ||
}); | ||
}; | ||
@@ -650,2 +661,3 @@ // attributes | ||
leaveRoom.isCallable = roomState === 'ROOM'; | ||
endRoom.isCallable = roomState === 'ROOM' && me.role === 'host'; | ||
React.useEffect(function () { | ||
@@ -666,3 +678,7 @@ webCore.huddleClient.on('room:joined', function () { | ||
setState(me_atom.initialHuddle01State); | ||
setMe(me_atom.initialMeState); | ||
setMe(function (prev) { | ||
return me_atom._objectSpread2(me_atom._objectSpread2({}, me_atom.initialMeState), {}, { | ||
meId: prev.meId | ||
}); | ||
}); | ||
setPeers(useHuddle01.initialPeersState); | ||
@@ -677,2 +693,3 @@ }); | ||
leaveRoom: leaveRoom, | ||
endRoom: endRoom, | ||
error: error | ||
@@ -679,0 +696,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { b as useHuddle01AtomValue, _ as _objectSpread2, c as _defineProperty, u as useHuddle01Atom, d as _toPropertyKey, e as useMeSetAtom, i as initialHuddle01State, f as initialMeState } from '../../dist/me.atom-5a0945b3.esm.js'; | ||
import { b as useHuddle01AtomValue, _ as _objectSpread2, c as _defineProperty, u as useHuddle01Atom, d as _toPropertyKey, a as useMeAtom, i as initialHuddle01State, e as initialMeState } from '../../dist/me.atom-255e381d.esm.js'; | ||
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/usePeer-50d13e36.esm.js'; | ||
@@ -7,4 +7,4 @@ export { u as usePeer } from '../../dist/usePeer-50d13e36.esm.js'; | ||
import { huddleClient } from '@huddle01/web-core'; | ||
import { a as usePeersSetAtom, b as usePeersAtom, i as initialPeersState } from '../../dist/useHuddle01-9bec6f3a.esm.js'; | ||
export { u as useHuddle01 } from '../../dist/useHuddle01-9bec6f3a.esm.js'; | ||
import { a as usePeersSetAtom, b as usePeersAtom, i as initialPeersState } from '../../dist/useHuddle01-b83e7d18.esm.js'; | ||
export { u as useHuddle01 } from '../../dist/useHuddle01-b83e7d18.esm.js'; | ||
import 'jotai/react'; | ||
@@ -625,3 +625,6 @@ import 'jotai/vanilla'; | ||
setState = _useHuddle01Atom2[1]; | ||
var setMe = useMeSetAtom(); | ||
var _useMeAtom = useMeAtom(), | ||
_useMeAtom2 = _slicedToArray(_useMeAtom, 2), | ||
me = _useMeAtom2[0], | ||
setMe = _useMeAtom2[1]; | ||
var setPeers = usePeersSetAtom(); | ||
@@ -642,2 +645,10 @@ | ||
}; | ||
var endRoom = function endRoom() { | ||
huddleClient.endRoom(); | ||
setState(function (prev) { | ||
return _objectSpread2(_objectSpread2({}, prev), {}, { | ||
roomState: 'INIT' | ||
}); | ||
}); | ||
}; | ||
@@ -647,2 +658,3 @@ // attributes | ||
leaveRoom.isCallable = roomState === 'ROOM'; | ||
endRoom.isCallable = roomState === 'ROOM' && me.role === 'host'; | ||
useEffect(function () { | ||
@@ -663,3 +675,7 @@ huddleClient.on('room:joined', function () { | ||
setState(initialHuddle01State); | ||
setMe(initialMeState); | ||
setMe(function (prev) { | ||
return _objectSpread2(_objectSpread2({}, initialMeState), {}, { | ||
meId: prev.meId | ||
}); | ||
}); | ||
setPeers(initialPeersState); | ||
@@ -674,2 +690,3 @@ }); | ||
leaveRoom: leaveRoom, | ||
endRoom: endRoom, | ||
error: error | ||
@@ -676,0 +693,0 @@ }; |
{ | ||
"name": "@huddle01/react", | ||
"version": "0.0.13-beta.9", | ||
"version": "0.0.13-beta.10", | ||
"description": "", | ||
@@ -40,3 +40,3 @@ "main": "dist/huddle01-react.cjs.js", | ||
"dependencies": { | ||
"@huddle01/web-core": "0.0.15-beta.6", | ||
"@huddle01/web-core": "0.0.15-beta.7", | ||
"jotai": "^2.0.3", | ||
@@ -43,0 +43,0 @@ "react": "18.2.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
216943
5598
+ Added@huddle01/web-core@0.0.15-beta.7(transitive)
- Removed@huddle01/web-core@0.0.15-beta.6(transitive)