diy-template-components 0.2.33 → 0.2.35
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/build/index.es.js +30 -42
- package/build/index.es.js.map +1 -1
- package/build/index.js +30 -42
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function ___$insertStyle(css) {
|
|
2
|
-
if (!css ||
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
const style = document.createElement('style');
|
|
6
|
-
style.setAttribute('type', 'text/css');
|
|
7
|
-
style.innerHTML = css;
|
|
8
|
-
document.head.appendChild(style);
|
|
9
|
-
return css;
|
|
1
|
+
function ___$insertStyle(css) {
|
|
2
|
+
if (!css || !window) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
const style = document.createElement('style');
|
|
6
|
+
style.setAttribute('type', 'text/css');
|
|
7
|
+
style.innerHTML = css;
|
|
8
|
+
document.head.appendChild(style);
|
|
9
|
+
return css;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
|
|
@@ -2271,39 +2271,27 @@ const NextImageRenderer = ({
|
|
|
2271
2271
|
src,
|
|
2272
2272
|
...props
|
|
2273
2273
|
}) => {
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
});
|
|
2296
|
-
} else {
|
|
2297
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
2298
|
-
ref: refSetter,
|
|
2299
|
-
className: className,
|
|
2300
|
-
src: src
|
|
2301
|
-
});
|
|
2302
|
-
}
|
|
2303
|
-
} catch (err) {
|
|
2304
|
-
return {
|
|
2305
|
-
notFound: true
|
|
2306
|
-
};
|
|
2274
|
+
const {
|
|
2275
|
+
isCustomWebsite
|
|
2276
|
+
} = useContext(PageContext);
|
|
2277
|
+
let {
|
|
2278
|
+
refSetter,
|
|
2279
|
+
className
|
|
2280
|
+
} = props;
|
|
2281
|
+
if (isCustomWebsite) {
|
|
2282
|
+
const NextImage = require('next/image').default;
|
|
2283
|
+
return /*#__PURE__*/React.createElement(NextImage, _extends({
|
|
2284
|
+
src: src,
|
|
2285
|
+
layout: 'fill',
|
|
2286
|
+
ref: refSetter,
|
|
2287
|
+
className: className
|
|
2288
|
+
}, props));
|
|
2289
|
+
} else {
|
|
2290
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
2291
|
+
ref: refSetter,
|
|
2292
|
+
className: className,
|
|
2293
|
+
src: src
|
|
2294
|
+
});
|
|
2307
2295
|
}
|
|
2308
2296
|
};
|
|
2309
2297
|
|