@shopify/react-async
Advanced tools
Comparing version 4.1.9 to 4.1.11
@@ -61,3 +61,3 @@ 'use strict'; | ||
if (progressivelyHydrated && !startedHydrated) { | ||
loadingMarkup = /*#__PURE__*/React__default['default'].createElement(Loader, { | ||
loadingMarkup = /*#__PURE__*/React__default["default"].createElement(Loader, { | ||
defer: deferHydration, | ||
@@ -68,3 +68,3 @@ load: load, | ||
} else if (loading) { | ||
loadingMarkup = /*#__PURE__*/React__default['default'].createElement(Loader, { | ||
loadingMarkup = /*#__PURE__*/React__default["default"].createElement(Loader, { | ||
defer: defer, | ||
@@ -77,8 +77,8 @@ load: load, | ||
let contentMarkup = null; | ||
const rendered = Component ? /*#__PURE__*/React__default['default'].createElement(Component, props) : null; | ||
const rendered = Component ? /*#__PURE__*/React__default["default"].createElement(Component, props) : null; | ||
if (progressivelyHydrated && !startedHydrated) { | ||
contentMarkup = rendered ? /*#__PURE__*/React__default['default'].createElement(reactHydrate.Hydrator, { | ||
contentMarkup = rendered ? /*#__PURE__*/React__default["default"].createElement(reactHydrate.Hydrator, { | ||
id: resolver.id | ||
}, rendered) : /*#__PURE__*/React__default['default'].createElement(reactHydrate.Hydrator, { | ||
}, rendered) : /*#__PURE__*/React__default["default"].createElement(reactHydrate.Hydrator, { | ||
id: resolver.id | ||
@@ -92,3 +92,3 @@ }); | ||
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, contentMarkup, loadingMarkup); | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, contentMarkup, loadingMarkup); | ||
} | ||
@@ -255,3 +255,3 @@ | ||
case async.DeferTiming.Idle: | ||
return /*#__PURE__*/React__default['default'].createElement(reactIdle.OnIdle, { | ||
return /*#__PURE__*/React__default["default"].createElement(reactIdle.OnIdle, { | ||
perform: load | ||
@@ -261,3 +261,3 @@ }); | ||
case async.DeferTiming.InViewport: | ||
return /*#__PURE__*/React__default['default'].createElement(reactIntersectionObserver.IntersectionObserver, { | ||
return /*#__PURE__*/React__default["default"].createElement(reactIntersectionObserver.IntersectionObserver, { | ||
threshold: 0, | ||
@@ -264,0 +264,0 @@ onIntersectionChange: handleIntersection |
@@ -71,3 +71,3 @@ 'use strict'; | ||
} | ||
const AsyncAssetContext = /*#__PURE__*/React__default['default'].createContext(null); | ||
const AsyncAssetContext = /*#__PURE__*/React__default["default"].createContext(null); | ||
@@ -74,0 +74,0 @@ exports.AsyncAssetContext = AsyncAssetContext; |
@@ -23,5 +23,5 @@ 'use strict'; | ||
} | ||
const PrefetchContext = /*#__PURE__*/React__default['default'].createContext(new PrefetchManager()); | ||
const PrefetchContext = /*#__PURE__*/React__default["default"].createContext(new PrefetchManager()); | ||
exports.PrefetchContext = PrefetchContext; | ||
exports.PrefetchManager = PrefetchManager; |
@@ -14,3 +14,3 @@ 'use strict'; | ||
// see https://github.com/oliviertassinari/react-event-listener/ | ||
class EventListener extends React__default['default'].PureComponent { | ||
class EventListener extends React__default["default"].PureComponent { | ||
componentDidMount() { | ||
@@ -17,0 +17,0 @@ this.attachListener(); |
@@ -19,11 +19,7 @@ 'use strict'; | ||
enumerable: true, | ||
get: function () { | ||
return async.DeferTiming; | ||
} | ||
get: function () { return async.DeferTiming; } | ||
}); | ||
Object.defineProperty(exports, 'AssetTiming', { | ||
enumerable: true, | ||
get: function () { | ||
return types.AssetTiming; | ||
} | ||
get: function () { return types.AssetTiming; } | ||
}); | ||
@@ -30,0 +26,0 @@ exports.useAsync = hooks.useAsync; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
class ConnectedPrefetcher extends React__default['default'].PureComponent { | ||
class ConnectedPrefetcher extends React__default["default"].PureComponent { | ||
constructor(...args) { | ||
@@ -122,3 +122,3 @@ super(...args); | ||
} = this.props; | ||
const preloadMarkup = url ? /*#__PURE__*/React__default['default'].createElement("div", { | ||
const preloadMarkup = url ? /*#__PURE__*/React__default["default"].createElement("div", { | ||
style: { | ||
@@ -132,19 +132,19 @@ visibility: 'hidden' | ||
// eslint-disable-next-line react/no-array-index-key | ||
return /*#__PURE__*/React__default['default'].createElement("div", { | ||
return /*#__PURE__*/React__default["default"].createElement("div", { | ||
key: `${path}${index}` | ||
}, render(url)); | ||
})) : null; | ||
const expensiveListeners = this.prefetchAgressively ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
const expensiveListeners = this.prefetchAgressively ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
event: "mouseover", | ||
handler: this.handlePointerEnter | ||
}), /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
}), /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
event: "focusin", | ||
handler: this.handlePointerEnter | ||
}), /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
}), /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
event: "mouseout", | ||
handler: this.handlePointerLeave | ||
}), /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
}), /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
@@ -154,7 +154,7 @@ event: "focusout", | ||
})) : null; | ||
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
event: "mousedown", | ||
handler: this.handlePressStart | ||
}), /*#__PURE__*/React__default['default'].createElement(EventListener.EventListener, { | ||
}), /*#__PURE__*/React__default["default"].createElement(EventListener.EventListener, { | ||
passive: true, | ||
@@ -177,3 +177,3 @@ event: "touchstart", | ||
function Prefetcher(props) { | ||
return /*#__PURE__*/React__default['default'].createElement(prefetch.PrefetchContext.Consumer, null, manager => /*#__PURE__*/React__default['default'].createElement(ConnectedPrefetcher, Object.assign({}, props, { | ||
return /*#__PURE__*/React__default["default"].createElement(prefetch.PrefetchContext.Consumer, null, manager => /*#__PURE__*/React__default["default"].createElement(ConnectedPrefetcher, Object.assign({}, props, { | ||
manager: manager | ||
@@ -180,0 +180,0 @@ }))); |
@@ -12,3 +12,3 @@ 'use strict'; | ||
class ConnectedPrefetchRoute extends React__default['default'].Component { | ||
class ConnectedPrefetchRoute extends React__default["default"].Component { | ||
constructor(...args) { | ||
@@ -44,3 +44,3 @@ super(...args); | ||
function PrefetchRoute(props) { | ||
return /*#__PURE__*/React__default['default'].createElement(prefetch.PrefetchContext.Consumer, null, manager => /*#__PURE__*/React__default['default'].createElement(ConnectedPrefetchRoute, Object.assign({ | ||
return /*#__PURE__*/React__default["default"].createElement(prefetch.PrefetchContext.Consumer, null, manager => /*#__PURE__*/React__default["default"].createElement(ConnectedPrefetchRoute, Object.assign({ | ||
manager: manager | ||
@@ -47,0 +47,0 @@ }, props))); |
@@ -23,3 +23,3 @@ 'use strict'; | ||
}); | ||
const Context = /*#__PURE__*/React__default['default'].createContext(null); // Just like a "normal" value returned from `createContext`, rendering | ||
const Context = /*#__PURE__*/React__default["default"].createContext(null); // Just like a "normal" value returned from `createContext`, rendering | ||
// the value itself is not supported. This component is just a placeholder | ||
@@ -42,3 +42,3 @@ // to provide a more useful error. | ||
}, [load]); | ||
return /*#__PURE__*/React__default['default'].createElement(Context.Provider, Object.assign({ | ||
return /*#__PURE__*/React__default["default"].createElement(Context.Provider, Object.assign({ | ||
value: resolved | ||
@@ -49,3 +49,3 @@ }, props)); | ||
function Consumer(props) { | ||
return /*#__PURE__*/React__default['default'].createElement(Context.Consumer, props); | ||
return /*#__PURE__*/React__default["default"].createElement(Context.Consumer, props); | ||
} | ||
@@ -52,0 +52,0 @@ |
@@ -22,3 +22,3 @@ 'use strict'; | ||
yield server.extract(element, { | ||
decorate: element => /*#__PURE__*/React__default['default'].createElement(assets.AsyncAssetContext.Provider, { | ||
decorate: element => /*#__PURE__*/React__default["default"].createElement(assets.AsyncAssetContext.Provider, { | ||
value: asyncAssets | ||
@@ -25,0 +25,0 @@ }, element) |
{ | ||
"name": "@shopify/react-async", | ||
"version": "4.1.9", | ||
"version": "4.1.11", | ||
"license": "MIT", | ||
@@ -34,7 +34,7 @@ "description": "Tools for creating powerful, asynchronously-loaded React components", | ||
"dependencies": { | ||
"@shopify/async": "^3.0.5", | ||
"@shopify/react-effect": "^4.1.5", | ||
"@shopify/react-hooks": "^2.1.6", | ||
"@shopify/react-hydrate": "^2.1.7", | ||
"@shopify/react-idle": "^2.1.4", | ||
"@shopify/async": "^3.0.7", | ||
"@shopify/react-effect": "^4.1.7", | ||
"@shopify/react-hooks": "^2.1.8", | ||
"@shopify/react-hydrate": "^2.1.9", | ||
"@shopify/react-idle": "^2.1.6", | ||
"@shopify/react-intersection-observer": "^3.1.7", | ||
@@ -72,3 +72,3 @@ "@shopify/useful-types": "^3.0.5" | ||
}, | ||
"gitHead": "e706481f46b38705389d37e09caf3450630ab0ba" | ||
"gitHead": "e72b4ed29e23c1444a652cd1bf21d906bf01f942" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
116393
1935
Updated@shopify/async@^3.0.7
Updated@shopify/react-effect@^4.1.7
Updated@shopify/react-hooks@^2.1.8
Updated@shopify/react-idle@^2.1.6