@data-client/img 0.9.2 → 0.9.4
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.umd.min.js +1 -1
- package/package.json +2 -2
package/dist/index.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@data-client/react"),require("react")
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@data-client/react"),require("react")):"function"==typeof define&&define.amd?define(["exports","@data-client/react","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Img={},e.RDC,e.React)}(this,(function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n);var s,c,u=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports})),i=(s=u)&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s;const a="undefined"!=typeof document;let l=a&&!(null!=(c=document.querySelector("meta[http-equiv='Content-Security-Policy']"))&&c.getAttribute("content"));try{l||Function()}catch(e){l=!0,a&&console.error("Content Security Policy: The previous CSP log can be safely ignored - @data-client/endpoint will use setPrototypeOf instead")}var f;class p extends Function{constructor(e,t){let n,r;return l?(n=(...e)=>n.fetch(...e),Object.setPrototypeOf(n,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),n=this),e&&(n.fetch=e),t&&"name"in t||!e||!e.name||"anonymous"===e.name||(r=e.name),Object.defineProperty(n,"name",{get(){return r||this.__name},set(e){this.__name=e}}),Object.assign(n,t),n}key(...e){return`${this.name} ${JSON.stringify(e)}`}testKey(e){return e.startsWith(this.name)}bind(e,...t){const n=this.fetch,r=this.key;return this.extend({fetch(){return n.apply(null!=e?e:this,t)},key(){return r.apply(this,t)}})}extend(e){class t extends this.constructor{}return Object.assign(t.prototype,this),new t(e.fetch,e)}}f=p,(()=>{if("undefined"!=typeof document&&document.FUNC_MANGLE){const e=f.prototype.key;f.prototype.key=function(...t){return null==document.FUNC_MANGLE||document.FUNC_MANGLE(this),this.prototype.key=e,e.call(this,...t)}}})();var d=new p((async function({src:e}){return new Promise((t=>{"undefined"!=typeof window&&"function"==typeof Image||t(e);const n=new Image;n.onload=()=>{t(e)},n.onerror=n=>{t(e)},n.src=e}))}),{key:({src:e})=>`GET ${e}`,schema:""});const y=["component"];function m(e){const{component:n}=e,r=i(e,y);return t.useSuspense(d,r.src?{src:r.src}:null),o.default.createElement(n,r)}m.defaultProps={component:"img"},e.Img=m,e.getImage=d,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-client/img",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Suspenseful images",
|
|
5
5
|
"homepage": "https://dataclient.io/docs/guides/img-media#just-images",
|
|
6
6
|
"repository": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"license": "Apache-2.0",
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@babel/runtime": "^7.17.0",
|
|
72
|
-
"@data-client/endpoint": "^0.9.
|
|
72
|
+
"@data-client/endpoint": "^0.9.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@data-client/react": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0",
|