web-materials 0.8.38 → 0.8.39
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react/jsx-runtime"),r=require("react"),a=require("./index.module.scss.js"),i=["src","alt","width","height","type","onLoad","ref","className","style"];function c(e,t){var r=e,a="?format=max_480xX_v1",i=".webp";if("origin"===t&&(a="?format=originalOFGHLERTH",i=""),r.includes("/v1/images/")||r.includes("/v1/raw/")){var c="";(c=r.includes("/v1/images/")?r.split("/v1/images/")[1]:r.split("/v1/raw/")[1]).includes(".")||c.includes("format=")?r.includes("format=")||(r="".concat(r).concat(a)):r="".concat(r).concat(i).concat(a)}return r}exports.default=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react/jsx-runtime"),r=require("react"),a=require("./index.module.scss.js"),i=["src","alt","width","height","type","onLoad","ref","className","style"];function c(e,t){var r=e,a="?format=max_480xX_v1",i=".webp";if("origin"===t&&(a="?format=originalOFGHLERTH",i=""),r.includes("/v1/images/")||r.includes("/v1/raw/")){var c="";(c=r.includes("/v1/images/")?r.split("/v1/images/")[1]:r.split("/v1/raw/")[1]).includes(".")||c.includes("format=")?r.includes("format=")||(r="".concat(r).concat(a)):r="".concat(r).concat(i).concat(a)}return r}exports.default=function(n){var o=n.src,u=n.alt,s=n.width,l=void 0===s?"100%":s,f=n.height,d=void 0===f?"100%":f,g=n.type,m=n.onLoad,v=n.ref,p=n.className,h=n.style,y=e.objectWithoutProperties(n,i),j=r.useRef(null),x=r.useRef(m);x.current=m;var b=!!o&&"string"==typeof o,w=b?c(o,g):"",_="origin"===g,L=r.useCallback((function(e){j.current=e,"function"==typeof v?v(e):v&&(v.current=e)}),[v]);if(r.useLayoutEffect((function(){var e=j.current,t=x.current;e&&t&&e.complete&&e.naturalHeight>0&&t({currentTarget:e,target:e})}),[w]),!b)return null;var q=_?e.objectSpread2({height:"auto"},h):h;return t.jsx("img",e.objectSpread2({ref:L,className:p?"".concat(a.default.img," ").concat(p):a.default.img,src:w,alt:u,width:l,height:_?void 0:d,style:q,onLoad:m},y))},exports.formatSrc=c;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/common/H5Image/index.tsx"],"sourcesContent":[null],"names":["formatSrc","src","type","showSrc","formatSuffix","webpSuffix","includes","identify","split","concat","props","alt","_props$width","width","_props$height","height","onLoad","refProp","ref","className","style","restProps","_objectWithoutProperties","_excluded","imgRef","useRef","onLoadRef","current","valid","isOrigin","setRefs","useCallback","el","useLayoutEffect","cb","complete","naturalHeight","currentTarget","target","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/common/H5Image/index.tsx"],"sourcesContent":[null],"names":["formatSrc","src","type","showSrc","formatSuffix","webpSuffix","includes","identify","split","concat","props","alt","_props$width","width","_props$height","height","onLoad","refProp","ref","className","style","restProps","_objectWithoutProperties","_excluded","imgRef","useRef","onLoadRef","current","valid","isOrigin","setRefs","useCallback","el","useLayoutEffect","cb","complete","naturalHeight","currentTarget","target","mergedStyle","_objectSpread","_jsx","jsx","s","img","default","undefined"],"mappings":"qSAIgB,SAAAA,EAAUC,EAAaC,GACrC,IAAIC,EAAUF,EACVG,EAAe,uBACfC,EAAa,QAOjB,GALa,WAATH,IACFE,EAAe,4BACfC,EAAa,IAGXF,EAAQG,SAAS,gBAAkBH,EAAQG,SAAS,YAAa,CACnE,IAAIC,EAAW,IAEZA,EADCJ,EAAQG,SAAS,eACPH,EAAQK,MAAM,eAAe,GAE5BL,EAAQK,MAAM,YAAY,IAE3BF,SAAS,MAASC,EAASD,SAAS,WAEpCH,EAAQG,SAAS,aAC3BH,EAAO,GAAAM,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vB,OAAQA,GACJK,GAGV"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{objectWithoutProperties as t,objectSpread2 as r}from"../../../_virtual/_rollupPluginBabelHelpers.mjs";import{jsx as e}from"react/jsx-runtime";import{useRef as a,useCallback as i,useLayoutEffect as o}from"react";import n from"./index.module.scss.mjs";var c=["src","alt","width","height","type","onLoad","ref","className","style"];function s(t,r){var e=t,a="?format=max_480xX_v1",i=".webp";if("origin"===r&&(a="?format=originalOFGHLERTH",i=""),e.includes("/v1/images/")||e.includes("/v1/raw/")){var o="";(o=e.includes("/v1/images/")?e.split("/v1/images/")[1]:e.split("/v1/raw/")[1]).includes(".")||o.includes("format=")?e.includes("format=")||(e="".concat(e).concat(a)):e="".concat(e).concat(i).concat(a)}return e}function l(l){var u=l.src,m=l.alt,
|
|
1
|
+
import{objectWithoutProperties as t,objectSpread2 as r}from"../../../_virtual/_rollupPluginBabelHelpers.mjs";import{jsx as e}from"react/jsx-runtime";import{useRef as a,useCallback as i,useLayoutEffect as o}from"react";import n from"./index.module.scss.mjs";var c=["src","alt","width","height","type","onLoad","ref","className","style"];function s(t,r){var e=t,a="?format=max_480xX_v1",i=".webp";if("origin"===r&&(a="?format=originalOFGHLERTH",i=""),e.includes("/v1/images/")||e.includes("/v1/raw/")){var o="";(o=e.includes("/v1/images/")?e.split("/v1/images/")[1]:e.split("/v1/raw/")[1]).includes(".")||o.includes("format=")?e.includes("format=")||(e="".concat(e).concat(a)):e="".concat(e).concat(i).concat(a)}return e}function l(l){var u=l.src,m=l.alt,f=l.width,d=void 0===f?"100%":f,g=l.height,p=void 0===g?"100%":g,v=l.type,h=l.onLoad,y=l.ref,w=l.className,j=l.style,x=t(l,c),b=a(null),H=a(h);H.current=h;var L=!!u&&"string"==typeof u,_=L?s(u,v):"",N="origin"===v,P=i((function(t){b.current=t,"function"==typeof y?y(t):y&&(y.current=t)}),[y]);if(o((function(){var t=b.current,r=H.current;t&&r&&t.complete&&t.naturalHeight>0&&r({currentTarget:t,target:t})}),[_]),!L)return null;var T=N?r({height:"auto"},j):j;return e("img",r({ref:P,className:w?"".concat(n.img," ").concat(w):n.img,src:_,alt:m,width:d,height:N?void 0:p,style:T,onLoad:h},x))}export{l as default,s as formatSrc};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../src/components/common/H5Image/index.tsx"],"sourcesContent":[null],"names":["formatSrc","src","type","showSrc","formatSuffix","webpSuffix","includes","identify","split","concat","H5Image","props","alt","_props$width","width","_props$height","height","onLoad","refProp","ref","className","style","restProps","_objectWithoutProperties","_excluded","imgRef","useRef","onLoadRef","current","valid","isOrigin","setRefs","useCallback","el","useLayoutEffect","cb","complete","naturalHeight","currentTarget","target","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../src/components/common/H5Image/index.tsx"],"sourcesContent":[null],"names":["formatSrc","src","type","showSrc","formatSuffix","webpSuffix","includes","identify","split","concat","H5Image","props","alt","_props$width","width","_props$height","height","onLoad","refProp","ref","className","style","restProps","_objectWithoutProperties","_excluded","imgRef","useRef","onLoadRef","current","valid","isOrigin","setRefs","useCallback","el","useLayoutEffect","cb","complete","naturalHeight","currentTarget","target","mergedStyle","_objectSpread","_jsx","s","img","undefined"],"mappings":"gVAIgB,SAAAA,EAAUC,EAAaC,GACrC,IAAIC,EAAUF,EACVG,EAAe,uBACfC,EAAa,QAOjB,GALa,WAATH,IACFE,EAAe,4BACfC,EAAa,IAGXF,EAAQG,SAAS,gBAAkBH,EAAQG,SAAS,YAAa,CACnE,IAAIC,EAAW,IAEZA,EADCJ,EAAQG,SAAS,eACPH,EAAQK,MAAM,eAAe,GAE5BL,EAAQK,MAAM,YAAY,IAE3BF,SAAS,MAASC,EAASD,SAAS,WAEpCH,EAAQG,SAAS,aAC3BH,EAAO,GAAAM,OAAMN,GAAOM,OAAGL,IAFvBD,EAAOM,GAAAA,OAAMN,GAAOM,OAA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