@cntrl-site/sdk-nextjs 1.6.6 → 1.6.8-alpha.0

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/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
  );
@@ -75,6 +75,8 @@ const CompoundChild = ({ item, sectionId, isParentVisible = true }) => {
75
75
  const scaleAnchor = area.scaleAnchor;
76
76
  return (`
77
77
  .item-${item.id}-inner {
78
+ width: 100%;
79
+ height: 100%;
78
80
  transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
79
81
  transform: scale(${area.scale});
80
82
  }
@@ -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.6",
3
+ "version": "1.6.8-alpha.0",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -119,6 +119,8 @@ export const CompoundChild: FC<ChildItemProps> = ({ item, sectionId, isParentVis
119
119
  const scaleAnchor = area.scaleAnchor as AreaAnchor;
120
120
  return (`
121
121
  .item-${item.id}-inner {
122
+ width: 100%;
123
+ height: 100%;
122
124
  transform-origin: ${ScaleAnchorMap[scaleAnchor]};
123
125
  transform: scale(${area.scale});
124
126
  }
@@ -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://',