@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.
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
- return url ? ((0, jsx_runtime_1.jsx)("a", { href: validUrl, target: target, rel: "noreferrer", children: children })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -50,6 +50,7 @@ export const CompoundItem: FC<ItemProps<TCompoundItem>> = ({ item, sectionId, on
50
50
  </div>
51
51
  <JSXStyle id={id}>{`
52
52
  .compound-${item.id} {
53
+ overflow: ${item.commonParams.overflow};
53
54
  position: absolute;
54
55
  width: 100%;
55
56
  height: 100%;
@@ -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
- target={target}
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