@raketa-builder/support 1.8.0 → 1.8.1
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/dist/AdminPageRender/IconButton.js +0 -1
- package/dist/AdminPageRender/index.js +9 -1
- package/dist/Container.js +0 -1
- package/dist/EmbeddedVideo.js +7 -3
- package/dist/Image.js +1 -2
- package/dist/extractImageValue.js +1 -1
- package/dist/isImagePresent.js +1 -1
- package/dist/toHTML.js +11 -4
- package/package.json +5 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __spreadValues } from '../chunk-BBZEL7EG.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
3
|
|
|
5
4
|
const ICON_COPY = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29weSI+PHJlY3QgeD0iOSIgeT0iOSIgd2lkdGg9IjEzIiBoZWlnaHQ9IjEzIiByeD0iMiIgcnk9IjIiPjwvcmVjdD48cGF0aCBkPSJNNSAxNUg0YTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDlhMiAyIDAgMCAxIDIgMnYxIj48L3BhdGg+PC9zdmc+";
|
|
6
5
|
const IconButton = (props) => /* @__PURE__ */ jsx(
|
|
@@ -82,7 +82,15 @@ const AdminPageRender = ({
|
|
|
82
82
|
onClick: () => handleSelectAll()
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
/* @__PURE__ */ jsx(
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
"a",
|
|
87
|
+
{
|
|
88
|
+
href: detailPath,
|
|
89
|
+
className: "r-reset r-details-link",
|
|
90
|
+
title: "Details",
|
|
91
|
+
"aria-label": "Details"
|
|
92
|
+
}
|
|
93
|
+
),
|
|
86
94
|
/* @__PURE__ */ jsx("div", { className: canvasClassName, children: entity.widgets.map(({ widgetId, component, settings }) => /* @__PURE__ */ jsx(
|
|
87
95
|
AdminWidgetMinimal,
|
|
88
96
|
{
|
package/dist/Container.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __objRest, __spreadProps, __spreadValues } from './chunk-BBZEL7EG.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
3
|
|
|
5
4
|
const Container = (_a) => {
|
|
6
5
|
var _b = _a, { settings, className, children } = _b, rest = __objRest(_b, ["settings", "className", "children"]);
|
package/dist/EmbeddedVideo.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './chunk-BBZEL7EG.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
3
|
|
|
5
4
|
const VimeoEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
6
5
|
"iframe",
|
|
7
6
|
{
|
|
7
|
+
title: `Vimeo embed video ${videoId2}`,
|
|
8
8
|
frameBorder: "0",
|
|
9
9
|
allowFullScreen: "0",
|
|
10
10
|
src: `https://player.vimeo.com/video/${videoId2}?color=ffffff&title=0&byline=0&portrait=0&autoplay=${autoplay === true ? "1" : "0"}`,
|
|
@@ -15,6 +15,7 @@ const VimeoEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
|
15
15
|
const YoukuEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
16
16
|
"iframe",
|
|
17
17
|
{
|
|
18
|
+
title: `Youku embed video ${videoId2}`,
|
|
18
19
|
height: "0",
|
|
19
20
|
width: "0",
|
|
20
21
|
src: `https://player.youku.com/embed/${videoId2}?autoplay=${autoplay === true ? "1" : "0"}`,
|
|
@@ -27,6 +28,7 @@ const YoukuEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
|
27
28
|
const YouTubeEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
28
29
|
"iframe",
|
|
29
30
|
{
|
|
31
|
+
title: `YouTube embed video ${videoId2}`,
|
|
30
32
|
frameBorder: "0",
|
|
31
33
|
allowFullScreen: true,
|
|
32
34
|
src: `https://youtube.com/embed/${videoId2}?autoplay=${autoplay === true ? "1" : "0"}`,
|
|
@@ -37,6 +39,7 @@ const YouTubeEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
|
37
39
|
const YouTubeNoCookieEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
38
40
|
"iframe",
|
|
39
41
|
{
|
|
42
|
+
title: `YouTube no cookie embed video ${videoId2}`,
|
|
40
43
|
frameBorder: "0",
|
|
41
44
|
allowFullScreen: true,
|
|
42
45
|
src: `https://www.youtube-nocookie.com/embed/${videoId2}?autoplay=${autoplay === true ? "1" : "0"}`,
|
|
@@ -47,6 +50,7 @@ const YouTubeNoCookieEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ *
|
|
|
47
50
|
const WistiaEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
|
|
48
51
|
"iframe",
|
|
49
52
|
{
|
|
53
|
+
title: `Wistia video ${videoId2}`,
|
|
50
54
|
frameBorder: "0",
|
|
51
55
|
allowFullScreen: true,
|
|
52
56
|
src: `https://fast.wistia.net/embed/iframe/${videoId2}${autoplay ? "?autoPlay=true" : ""}`,
|
|
@@ -63,9 +67,9 @@ const videoType = (url) => {
|
|
|
63
67
|
const youtubeId = (url) => {
|
|
64
68
|
var _a;
|
|
65
69
|
let matches = url.match(
|
|
66
|
-
/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([
|
|
70
|
+
/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^?&"'>]+)/
|
|
67
71
|
);
|
|
68
|
-
if (matches
|
|
72
|
+
if (matches == null ? void 0 : matches[5]) {
|
|
69
73
|
return matches[5];
|
|
70
74
|
}
|
|
71
75
|
matches = url.match(new RegExp("youtu\\.be\\/|youtube\\.com\\/shorts\\/(?<id>.*)(\\?.*)?"));
|
package/dist/Image.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __objRest, __spreadValues } from './chunk-BBZEL7EG.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
3
|
|
|
5
4
|
const getWebp = (url) => {
|
|
6
5
|
if (!url) return null;
|
|
@@ -59,7 +58,7 @@ const getSrc = (src, variant, optimizedFormats) => {
|
|
|
59
58
|
};
|
|
60
59
|
const getImageObjOrSrc = (value) => {
|
|
61
60
|
const type = typeof value;
|
|
62
|
-
if (type === "object" &&
|
|
61
|
+
if (type === "object" && Object.hasOwn(value, "image")) {
|
|
63
62
|
return value.image;
|
|
64
63
|
}
|
|
65
64
|
return value;
|
package/dist/isImagePresent.js
CHANGED
package/dist/toHTML.js
CHANGED
|
@@ -20,14 +20,14 @@ const attributes = {
|
|
|
20
20
|
type: "attributes",
|
|
21
21
|
raw: match[0]
|
|
22
22
|
};
|
|
23
|
-
} catch (
|
|
23
|
+
} catch (_error) {
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
return false;
|
|
29
29
|
},
|
|
30
|
-
renderer(
|
|
30
|
+
renderer(_token) {
|
|
31
31
|
return "";
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -67,11 +67,18 @@ function addNewTabAttrs(match, href, rest) {
|
|
|
67
67
|
}
|
|
68
68
|
const toHTML = (string, options = {}) => {
|
|
69
69
|
if (!string) return "";
|
|
70
|
-
const {
|
|
70
|
+
const {
|
|
71
|
+
inline = false,
|
|
72
|
+
externalLinksNewTab = true,
|
|
73
|
+
internalDomains = []
|
|
74
|
+
} = options;
|
|
71
75
|
try {
|
|
72
76
|
const html = inline ? markedInstance.parseInline(string) : markedInstance.parse(string);
|
|
73
77
|
if (!externalLinksNewTab) return html;
|
|
74
|
-
return html.replace(
|
|
78
|
+
return html.replace(
|
|
79
|
+
buildExternalLinkRegex(internalDomains),
|
|
80
|
+
addNewTabAttrs
|
|
81
|
+
);
|
|
75
82
|
} catch (error) {
|
|
76
83
|
console.error("Parse error:", error);
|
|
77
84
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raketa-builder/support",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -27,8 +27,10 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup",
|
|
29
29
|
"dev": "tsup --watch",
|
|
30
|
-
"format": "prettier --write .",
|
|
31
|
-
"
|
|
30
|
+
"format": "prettier --ignore-path ../../.prettierignore --write .",
|
|
31
|
+
"format:check": "prettier --ignore-path ../../.prettierignore --check .",
|
|
32
|
+
"lint": "biome lint --write --max-diagnostics=5000 .",
|
|
33
|
+
"lint:check": "biome lint --max-diagnostics=5000 ."
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
36
|
"react": ">=19.1.0 && <=19.3.0",
|