@raketa-builder/builder 0.11.1 → 0.13.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.
@@ -4,5 +4,5 @@ CLI Using tsconfig: tsconfig.json
4
4
  CLI tsup v6.5.0
5
5
  CLI Target: es6
6
6
  CJS Build start
7
- CJS dist/index.js 129.33 KB
8
- CJS ⚡️ Build success in 20ms
7
+ CJS dist/index.js 129.31 KB
8
+ CJS ⚡️ Build success in 248ms
@@ -1,13 +1,13 @@
1
1
  $ TIMING=1 eslint "**/*.js"
2
- Rule | Time (ms) | Relative
3
- :------------------------------------|----------:|--------:
4
- react/display-name | 46.161 | 39.4%
5
- react/no-direct-mutation-state | 21.729 | 18.6%
6
- react/require-render-return | 20.297 | 17.3%
7
- @next/next/no-assign-module-variable | 3.599 | 3.1%
8
- react/no-deprecated | 3.552 | 3.0%
9
- react-hooks/rules-of-hooks | 3.002 | 2.6%
10
- react/no-string-refs | 2.496 | 2.1%
11
- turbo/no-undeclared-env-vars | 2.314 | 2.0%
12
- react/jsx-no-comment-textnodes | 1.558 | 1.3%
13
- jsx-a11y/role-supports-aria-props | 1.496 | 1.3%
2
+ Rule | Time (ms) | Relative
3
+ :---------------------------------|----------:|--------:
4
+ react/display-name | 86.473 | 28.1%
5
+ react/no-direct-mutation-state | 79.777 | 25.9%
6
+ react/require-render-return | 61.222 | 19.9%
7
+ react/no-deprecated | 15.966 | 5.2%
8
+ react/no-string-refs | 9.252 | 3.0%
9
+ react-hooks/rules-of-hooks | 8.985 | 2.9%
10
+ jsx-a11y/role-supports-aria-props | 4.664 | 1.5%
11
+ react/no-unescaped-entities | 4.425 | 1.4%
12
+ react/jsx-no-comment-textnodes | 4.237 | 1.4%
13
+ react-hooks/exhaustive-deps | 4.217 | 1.4%
package/dist/index.js CHANGED
@@ -1458,7 +1458,7 @@ var SideNav = import_styled_components5.default.div`
1458
1458
  width: 64px;
1459
1459
  background-color: ${(props) => props.theme.colors.black};
1460
1460
  border-right: 1px solid ${(props) => props.theme.colors.darkerGray};
1461
- z-index: 30;
1461
+ z-index: 1000;
1462
1462
  `;
1463
1463
  var NavGroup = import_styled_components5.default.div`
1464
1464
  ${import_ui3.reset};
@@ -3044,10 +3044,15 @@ var videoType = (url) => {
3044
3044
  return "wistia";
3045
3045
  };
3046
3046
  var youtubeId = (url) => {
3047
- const matches = url.match(
3047
+ var _a;
3048
+ let matches = url.match(
3048
3049
  /(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/
3049
3050
  );
3050
- return matches !== "" && matches !== null ? matches[5] : "";
3051
+ if (matches && matches[5]) {
3052
+ return matches[5];
3053
+ }
3054
+ matches = url.match(new RegExp("youtu\\.be\\/|youtube\\.com\\/shorts\\/(?<id>.*)(\\?.*)?"));
3055
+ return ((_a = matches == null ? void 0 : matches.groups) == null ? void 0 : _a.id) || "";
3051
3056
  };
3052
3057
  var vimeoId = (url) => {
3053
3058
  const matches = url.match(/http(s?):\/\/(www\.)?vimeo\.com\/(\d+)($|\/)/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/builder",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
@@ -70,11 +70,18 @@ const videoType = (url) => {
70
70
  };
71
71
 
72
72
  const youtubeId = (url) => {
73
- const matches = url.match(
73
+ let matches = url.match(
74
74
  /(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/
75
- );
76
- return matches !== "" && matches !== null ? matches[5] : "";
77
- };
75
+ )
76
+
77
+ if (matches && matches[5]) {
78
+ return matches[5]
79
+ }
80
+
81
+ matches = url.match(/youtu\.be\/|youtube\.com\/shorts\/(?<id>.*)(\?.*)?/)
82
+
83
+ return matches?.groups?.id || ''
84
+ }
78
85
 
79
86
  const vimeoId = (url) => {
80
87
  const matches = url.match(/http(s?):\/\/(www\.)?vimeo\.com\/(\d+)($|\/)/);
@@ -14,7 +14,7 @@ export const SideNav = styled.div`
14
14
  width: 64px;
15
15
  background-color: ${(props) => props.theme.colors.black};
16
16
  border-right: 1px solid ${(props) => props.theme.colors.darkerGray};
17
- z-index: 30;
17
+ z-index: 1000;
18
18
  `;
19
19
 
20
20
  export const NavGroup = styled.div`