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.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
function ___$insertStyle(css) {
|
|
6
|
-
if (!css ||
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const style = document.createElement('style');
|
|
10
|
-
style.setAttribute('type', 'text/css');
|
|
11
|
-
style.innerHTML = css;
|
|
12
|
-
document.head.appendChild(style);
|
|
13
|
-
return css;
|
|
5
|
+
function ___$insertStyle(css) {
|
|
6
|
+
if (!css || !window) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const style = document.createElement('style');
|
|
10
|
+
style.setAttribute('type', 'text/css');
|
|
11
|
+
style.innerHTML = css;
|
|
12
|
+
document.head.appendChild(style);
|
|
13
|
+
return css;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -2286,39 +2286,27 @@ const NextImageRenderer = ({
|
|
|
2286
2286
|
src,
|
|
2287
2287
|
...props
|
|
2288
2288
|
}) => {
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
});
|
|
2311
|
-
} else {
|
|
2312
|
-
return /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2313
|
-
ref: refSetter,
|
|
2314
|
-
className: className,
|
|
2315
|
-
src: src
|
|
2316
|
-
});
|
|
2317
|
-
}
|
|
2318
|
-
} catch (err) {
|
|
2319
|
-
return {
|
|
2320
|
-
notFound: true
|
|
2321
|
-
};
|
|
2289
|
+
const {
|
|
2290
|
+
isCustomWebsite
|
|
2291
|
+
} = React.useContext(PageContext);
|
|
2292
|
+
let {
|
|
2293
|
+
refSetter,
|
|
2294
|
+
className
|
|
2295
|
+
} = props;
|
|
2296
|
+
if (isCustomWebsite) {
|
|
2297
|
+
const NextImage = require('next/image').default;
|
|
2298
|
+
return /*#__PURE__*/React__default["default"].createElement(NextImage, _extends({
|
|
2299
|
+
src: src,
|
|
2300
|
+
layout: 'fill',
|
|
2301
|
+
ref: refSetter,
|
|
2302
|
+
className: className
|
|
2303
|
+
}, props));
|
|
2304
|
+
} else {
|
|
2305
|
+
return /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2306
|
+
ref: refSetter,
|
|
2307
|
+
className: className,
|
|
2308
|
+
src: src
|
|
2309
|
+
});
|
|
2322
2310
|
}
|
|
2323
2311
|
};
|
|
2324
2312
|
|