ywana-core8 0.0.988 → 0.0.989

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/dist/index.cjs CHANGED
@@ -5522,11 +5522,13 @@ var TaskContextProvider = function TaskContextProvider(props) {
5522
5522
  url = _props$url === void 0 ? "/tasks" : _props$url,
5523
5523
  _props$frequency = props.frequency,
5524
5524
  frequency = _props$frequency === void 0 ? 1000 : _props$frequency,
5525
- children = props.children;
5525
+ children = props.children,
5526
+ ctx = props.ctx;
5526
5527
  var API = CollectionAPI$1(url, host, "");
5527
5528
  var _useState = React.useState({}),
5528
5529
  listeners = _useState[0],
5529
5530
  setListeners = _useState[1];
5531
+ var appContext = React.useContext(ctx);
5530
5532
  React.useEffect(function () {
5531
5533
  if (Object.keys(listeners).length === 0) return;
5532
5534
  var _interval = setInterval(function () {
@@ -5536,7 +5538,7 @@ var TaskContextProvider = function TaskContextProvider(props) {
5536
5538
  var taskID = taskIDs[i];
5537
5539
  return Promise.resolve(task(taskID)).then(function (tsk) {
5538
5540
  var listener = listeners[taskID];
5539
- if (listener) listener(tsk);
5541
+ if (listener) listener(tsk, appContext);
5540
5542
  });
5541
5543
  });
5542
5544
  return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);