@cntrl-site/sdk-nextjs 1.6.7 → 1.6.8
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/cntrl-site-sdk-nextjs-1.6.8-alpha.0.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.6.8.tgz +0 -0
- package/eslint.config.mjs +2 -1
- package/lib/components/items/CompoundItem/CompoundItem.js +1 -0
- package/lib/components/items/LinkWrapper.js +2 -1
- package/package.json +1 -1
- package/src/components/items/CompoundItem/CompoundItem.tsx +1 -0
- package/src/components/items/LinkWrapper.tsx +2 -3
- package/cntrl-site-sdk-nextjs-1.2.0.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.3.3.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.6.3.tgz +0 -0
|
Binary file
|
|
Binary file
|
package/eslint.config.mjs
CHANGED
|
@@ -28,7 +28,8 @@ export default antfu(
|
|
|
28
28
|
'no-extra-boolean-cast': 'off',
|
|
29
29
|
'prefer-promise-reject-errors': 'off',
|
|
30
30
|
'new-cap': 'off',
|
|
31
|
-
'perfectionist/sort-named-exports': 'off'
|
|
31
|
+
'perfectionist/sort-named-exports': 'off',
|
|
32
|
+
'style/multiline-ternary': 'off'
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
);
|
|
@@ -34,6 +34,7 @@ const CompoundItem = ({ item, sectionId, onResize, interactionCtrl, onVisibility
|
|
|
34
34
|
}, [isInteractive, onVisibilityChange]);
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_c = item.link) === null || _c === void 0 ? void 0 : _c.url, target: (_d = item.link) === null || _d === void 0 ? void 0 : _d.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `compound-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), { transition: (_e = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _e !== void 0 ? _e : 'none' }), children: items && items.map(item => ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
36
36
|
.compound-${item.id} {
|
|
37
|
+
overflow: ${item.commonParams.overflow};
|
|
37
38
|
position: absolute;
|
|
38
39
|
width: 100%;
|
|
39
40
|
height: 100%;
|
|
@@ -4,7 +4,8 @@ exports.LinkWrapper = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const LinkWrapper = ({ url, children, target }) => {
|
|
6
6
|
const validUrl = url && buildValidUrl(url);
|
|
7
|
-
|
|
7
|
+
const targetParams = target === '_blank' ? { target, rel: 'noreferrer' } : {};
|
|
8
|
+
return url ? ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: validUrl }, targetParams, { children: children }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }));
|
|
8
9
|
};
|
|
9
10
|
exports.LinkWrapper = LinkWrapper;
|
|
10
11
|
function buildValidUrl(url) {
|
package/package.json
CHANGED
|
@@ -8,11 +8,11 @@ interface Props {
|
|
|
8
8
|
|
|
9
9
|
export const LinkWrapper: React.FC<Props> = ({ url, children, target }) => {
|
|
10
10
|
const validUrl = url && buildValidUrl(url);
|
|
11
|
+
const targetParams = target === '_blank' ? { target, rel: 'noreferrer' } : {};
|
|
11
12
|
return url ? (
|
|
12
13
|
<a
|
|
13
14
|
href={validUrl}
|
|
14
|
-
|
|
15
|
-
rel="noreferrer"
|
|
15
|
+
{...targetParams}
|
|
16
16
|
>
|
|
17
17
|
{children}
|
|
18
18
|
</a>
|
|
@@ -21,7 +21,6 @@ export const LinkWrapper: React.FC<Props> = ({ url, children, target }) => {
|
|
|
21
21
|
);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
function buildValidUrl(url: string): string {
|
|
26
25
|
const prefixes = [
|
|
27
26
|
'http://',
|
|
Binary file
|
|
Binary file
|
|
Binary file
|