@raketa-builder/support 1.3.5 → 1.3.6

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.
@@ -1,54 +1,19 @@
1
- 'use strict';
1
+ import { __objRest, __spreadValues } from '../chunk-ORMEWXMH.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import IconButton from './IconButton';
5
+ import Container from '../Container';
2
6
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var IconButton = require('./IconButton');
6
- var Container = require('../Container');
7
-
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
-
10
- var React__default = /*#__PURE__*/_interopDefault(React);
11
- var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
12
- var Container__default = /*#__PURE__*/_interopDefault(Container);
13
-
14
- var __defProp = Object.defineProperty;
15
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
16
- var __hasOwnProp = Object.prototype.hasOwnProperty;
17
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
18
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19
- var __spreadValues = (a, b) => {
20
- for (var prop in b || (b = {}))
21
- if (__hasOwnProp.call(b, prop))
22
- __defNormalProp(a, prop, b[prop]);
23
- if (__getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(b)) {
25
- if (__propIsEnum.call(b, prop))
26
- __defNormalProp(a, prop, b[prop]);
27
- }
28
- return a;
29
- };
30
- var __objRest = (source, exclude) => {
31
- var target = {};
32
- for (var prop in source)
33
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
34
- target[prop] = source[prop];
35
- if (source != null && __getOwnPropSymbols)
36
- for (var prop of __getOwnPropSymbols(source)) {
37
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
38
- target[prop] = source[prop];
39
- }
40
- return target;
41
- };
42
7
  function cn() {
43
8
  return Array.from(arguments).filter(Boolean).map(String).join(" ");
44
9
  }
45
10
  const AdminWidgetWrapper = (_a) => {
46
11
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
47
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: cn("r-admin-widget-wrapper", className) }, rest));
12
+ return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("r-admin-widget-wrapper", className) }, rest));
48
13
  };
49
14
  const AdminWidgetToolbar = (_c) => {
50
15
  var _d = _c, { className } = _d, rest = __objRest(_d, ["className"]);
51
- return /* @__PURE__ */ jsxRuntime.jsx(
16
+ return /* @__PURE__ */ jsx(
52
17
  "div",
53
18
  __spreadValues({
54
19
  className: cn("r-reset", "r-admin-widget-toolbar", className)
@@ -57,7 +22,7 @@ const AdminWidgetToolbar = (_c) => {
57
22
  };
58
23
  const AdminWidgetLabel = (_e) => {
59
24
  var _f = _e, { className } = _f, rest = __objRest(_f, ["className"]);
60
- return /* @__PURE__ */ jsxRuntime.jsx(
25
+ return /* @__PURE__ */ jsx(
61
26
  "div",
62
27
  __spreadValues({
63
28
  className: cn("r-reset", "r-fs-small", "r-admin-widget-label", className)
@@ -85,17 +50,17 @@ const AdminWidgetMinimal = ({
85
50
  const isSelected = selectedWidgets.filter((w) => w === widget.widgetId).length > 0;
86
51
  if (!currentWidget || !currentAdminWidget) {
87
52
  console.error(`Unknown widget: ${widget.component}`);
88
- return /* @__PURE__ */ jsxRuntime.jsx(AdminWidgetWrapper, { "data-widget": widget.component, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("r-reset", "r-fs-large", "r-admin-missing-widget"), children: `Unknown widget: ${widget.component}` }) });
53
+ return /* @__PURE__ */ jsx(AdminWidgetWrapper, { "data-widget": widget.component, children: /* @__PURE__ */ jsx("div", { className: cn("r-reset", "r-fs-large", "r-admin-missing-widget"), children: `Unknown widget: ${widget.component}` }) });
89
54
  }
90
55
  const handleCopyWidget = () => {
91
56
  const widgetsToCopy = [widget];
92
57
  onCopy(widgetsToCopy);
93
58
  };
94
59
  const handleSelectWidget = () => onSelectWidget(widget.widgetId);
95
- return /* @__PURE__ */ jsxRuntime.jsxs(AdminWidgetWrapper, { "data-widget": widget.component, children: [
96
- isSelected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "r-selected-widget" }),
97
- /* @__PURE__ */ jsxRuntime.jsxs(AdminWidgetToolbar, { "data-toolbar": true, children: [
98
- /* @__PURE__ */ jsxRuntime.jsx(
60
+ return /* @__PURE__ */ jsxs(AdminWidgetWrapper, { "data-widget": widget.component, children: [
61
+ isSelected && /* @__PURE__ */ jsx("div", { className: "r-selected-widget" }),
62
+ /* @__PURE__ */ jsxs(AdminWidgetToolbar, { "data-toolbar": true, children: [
63
+ /* @__PURE__ */ jsx(
99
64
  "input",
100
65
  {
101
66
  type: "checkbox",
@@ -107,12 +72,12 @@ const AdminWidgetMinimal = ({
107
72
  checked: isSelected
108
73
  }
109
74
  ),
110
- !isSelected && !deprecated(currentAdminWidget) && /* @__PURE__ */ jsxRuntime.jsx(IconButton__default.default, { onClick: handleCopyWidget })
75
+ !isSelected && !deprecated(currentAdminWidget) && /* @__PURE__ */ jsx(IconButton, { onClick: handleCopyWidget })
111
76
  ] }),
112
- /* @__PURE__ */ jsxRuntime.jsx(AdminWidgetLabel, { "data-widget-label": true, children: title(currentAdminWidget) }),
113
- /* @__PURE__ */ jsxRuntime.jsx(Container__default.default, { settings: containerSettings, children: React__default.default.createElement(currentWidget, widget.settings) })
77
+ /* @__PURE__ */ jsx(AdminWidgetLabel, { "data-widget-label": true, children: title(currentAdminWidget) }),
78
+ /* @__PURE__ */ jsx(Container, { settings: containerSettings, children: React.createElement(currentWidget, widget.settings) })
114
79
  ] });
115
80
  };
116
81
  var AdminWidgetMinimal_default = AdminWidgetMinimal;
117
82
 
118
- module.exports = AdminWidgetMinimal_default;
83
+ export { AdminWidgetMinimal_default as default };
@@ -1,26 +1,9 @@
1
- 'use strict';
1
+ import { __spreadValues } from '../chunk-ORMEWXMH.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import 'react';
2
4
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- require('react');
5
-
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
5
  const ICON_COPY = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29weSI+PHJlY3QgeD0iOSIgeT0iOSIgd2lkdGg9IjEzIiBoZWlnaHQ9IjEzIiByeD0iMiIgcnk9IjIiPjwvcmVjdD48cGF0aCBkPSJNNSAxNUg0YTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDlhMiAyIDAgMCAxIDIgMnYxIj48L3BhdGg+PC9zdmc+";
23
- const IconButton = (props) => /* @__PURE__ */ jsxRuntime.jsx(
6
+ const IconButton = (props) => /* @__PURE__ */ jsx(
24
7
  "button",
25
8
  __spreadValues({
26
9
  type: "button",
@@ -46,4 +29,4 @@ const IconButton = (props) => /* @__PURE__ */ jsxRuntime.jsx(
46
29
  );
47
30
  var IconButton_default = IconButton;
48
31
 
49
- module.exports = IconButton_default;
32
+ export { IconButton_default as default };
@@ -1,35 +1,9 @@
1
- 'use strict';
1
+ import { __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import AdminWidgetMinimal from './AdminWidgetMinimal';
5
+ import SelectedWidgetsToolbar from '../lib/SelectedWidgetsToolbar';
2
6
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var AdminWidgetMinimal = require('./AdminWidgetMinimal');
6
- var SelectedWidgetsToolbar = require('../lib/SelectedWidgetsToolbar');
7
-
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
-
10
- var React__default = /*#__PURE__*/_interopDefault(React);
11
- var AdminWidgetMinimal__default = /*#__PURE__*/_interopDefault(AdminWidgetMinimal);
12
- var SelectedWidgetsToolbar__default = /*#__PURE__*/_interopDefault(SelectedWidgetsToolbar);
13
-
14
- var __defProp = Object.defineProperty;
15
- var __defProps = Object.defineProperties;
16
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
17
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
18
- var __hasOwnProp = Object.prototype.hasOwnProperty;
19
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
20
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21
- var __spreadValues = (a, b) => {
22
- for (var prop in b || (b = {}))
23
- if (__hasOwnProp.call(b, prop))
24
- __defNormalProp(a, prop, b[prop]);
25
- if (__getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(b)) {
27
- if (__propIsEnum.call(b, prop))
28
- __defNormalProp(a, prop, b[prop]);
29
- }
30
- return a;
31
- };
32
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
33
7
  const saveToLocalStorage = (identifier, widgets) => window.localStorage.setItem(
34
8
  `clipboard\u2013${identifier}`,
35
9
  JSON.stringify(widgets)
@@ -45,7 +19,7 @@ const AdminPageRender = ({
45
19
  canvasClassName = "",
46
20
  layoutMessage = ""
47
21
  }) => {
48
- const [selectedWidgets, setSelectedWidgets] = React__default.default.useState([]);
22
+ const [selectedWidgets, setSelectedWidgets] = React.useState([]);
49
23
  const entity = __spreadProps(__spreadValues({}, page), {
50
24
  widgets: page.widgets.map((w) => __spreadProps(__spreadValues({}, w), {
51
25
  settings: __spreadProps(__spreadValues({}, w.settings), {
@@ -80,16 +54,16 @@ const AdminPageRender = ({
80
54
  if (areAllSelected) return setSelectedWidgets([]);
81
55
  setSelectedWidgets(entity.widgets.map((w) => w.widgetId));
82
56
  };
83
- return /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
84
- layoutMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "r-reset r-fs-base r-layout-message", children: layoutMessage }),
85
- selectedWidgets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
86
- SelectedWidgetsToolbar__default.default,
57
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
58
+ layoutMessage && /* @__PURE__ */ jsx("div", { className: "r-reset r-fs-base r-layout-message", children: layoutMessage }),
59
+ selectedWidgets.length > 0 && /* @__PURE__ */ jsx(
60
+ SelectedWidgetsToolbar,
87
61
  {
88
62
  length: selectedWidgets.length,
89
63
  onCopy: () => handleCopyWidgets(selectedWidgets, "multiple")
90
64
  }
91
65
  ),
92
- entity.widgets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
66
+ entity.widgets.length > 0 && /* @__PURE__ */ jsx(
93
67
  "button",
94
68
  {
95
69
  className: `r-button-reset r-button-select-all ${areAllSelected ? "r-all-selected" : ""}`,
@@ -98,9 +72,9 @@ const AdminPageRender = ({
98
72
  onClick: () => handleSelectAll()
99
73
  }
100
74
  ),
101
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: detailPath, className: "r-reset r-details-link", title: "Details" }),
102
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: canvasClassName, children: entity.widgets.map(({ widgetId, component, settings }) => /* @__PURE__ */ jsxRuntime.jsx(
103
- AdminWidgetMinimal__default.default,
75
+ /* @__PURE__ */ jsx("a", { href: detailPath, className: "r-reset r-details-link", title: "Details" }),
76
+ /* @__PURE__ */ jsx("div", { className: canvasClassName, children: entity.widgets.map(({ widgetId, component, settings }) => /* @__PURE__ */ jsx(
77
+ AdminWidgetMinimal,
104
78
  {
105
79
  library,
106
80
  adminLibrary,
@@ -115,4 +89,4 @@ const AdminPageRender = ({
115
89
  };
116
90
  var AdminPageRender_default = AdminPageRender;
117
91
 
118
- module.exports = AdminPageRender_default;
92
+ export { AdminPageRender_default as default };
package/dist/Container.js CHANGED
@@ -1,45 +1,13 @@
1
- 'use strict';
1
+ import { __objRest, __spreadProps, __spreadValues } from './chunk-ORMEWXMH.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import 'react';
2
4
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- require('react');
5
-
6
- var __defProp = Object.defineProperty;
7
- var __defProps = Object.defineProperties;
8
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
5
  const Container = (_a) => {
38
6
  var _b = _a, { settings, className, children } = _b, rest = __objRest(_b, ["settings", "className", "children"]);
39
7
  const _a2 = settings || {}, { containerID } = _a2, restSettings = __objRest(_a2, ["containerID"]);
40
8
  const cssClasses = [...Object.values(restSettings), className].join(" ");
41
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ id: containerID, className: cssClasses }, rest), { children }));
9
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ id: containerID, className: cssClasses }, rest), { children }));
42
10
  };
43
11
  var Container_default = Container;
44
12
 
45
- module.exports = Container_default;
13
+ export { Container_default as default };
@@ -1,9 +1,8 @@
1
- 'use strict';
1
+ import './chunk-ORMEWXMH.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import 'react';
2
4
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- require('react');
5
-
6
- const VimeoEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRuntime.jsx(
5
+ const VimeoEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
7
6
  "iframe",
8
7
  {
9
8
  frameBorder: "0",
@@ -13,7 +12,7 @@ const VimeoEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRunti
13
12
  allow: "autoplay"
14
13
  }
15
14
  );
16
- const YoukuEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRuntime.jsx(
15
+ const YoukuEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
17
16
  "iframe",
18
17
  {
19
18
  height: "0",
@@ -25,7 +24,7 @@ const YoukuEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRunti
25
24
  allow: "autoplay"
26
25
  }
27
26
  );
28
- const YouTubeEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRuntime.jsx(
27
+ const YouTubeEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
29
28
  "iframe",
30
29
  {
31
30
  frameBorder: "0",
@@ -35,7 +34,7 @@ const YouTubeEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRun
35
34
  allow: "autoplay"
36
35
  }
37
36
  );
38
- const YouTubeNoCookieEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRuntime.jsx(
37
+ const YouTubeNoCookieEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
39
38
  "iframe",
40
39
  {
41
40
  frameBorder: "0",
@@ -45,7 +44,7 @@ const YouTubeNoCookieEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ *
45
44
  allow: "autoplay"
46
45
  }
47
46
  );
48
- const WistiaEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsxRuntime.jsx(
47
+ const WistiaEmbed = ({ videoId: videoId2, autoplay }) => /* @__PURE__ */ jsx(
49
48
  "iframe",
50
49
  {
51
50
  frameBorder: "0",
@@ -122,10 +121,10 @@ const EmbeddedVideo = ({
122
121
  const vId = videoId(videoUrl);
123
122
  const VideoComponent = VideoComponentType(vType, noCookieDomains);
124
123
  if (VideoComponent) {
125
- return /* @__PURE__ */ jsxRuntime.jsx(VideoComponent, { videoId: vId, autoplay });
124
+ return /* @__PURE__ */ jsx(VideoComponent, { videoId: vId, autoplay });
126
125
  }
127
126
  return null;
128
127
  };
129
128
  var EmbeddedVideo_default = EmbeddedVideo;
130
129
 
131
- module.exports = EmbeddedVideo_default;
130
+ export { EmbeddedVideo_default as default };
package/dist/Image.js CHANGED
@@ -1,36 +1,7 @@
1
- 'use strict';
1
+ import { __objRest, __spreadValues } from './chunk-ORMEWXMH.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
2
4
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- require('react');
5
-
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
5
  const getWebp = (url) => {
35
6
  if (!url) return null;
36
7
  const segments = url.split(".");
@@ -111,11 +82,11 @@ const Image = (_a) => {
111
82
  const [width, height] = getDimensions(imageObjOrSrc, variant);
112
83
  const altAttr = alt || getAlt(src);
113
84
  const [webp, avif, fallback] = getSrc(imageObjOrSrc, variant);
114
- return /* @__PURE__ */ jsxRuntime.jsxs("picture", { children: [
115
- avif && /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: encodeURI(avif), type: "image/avif" }),
116
- webp && /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: encodeURI(webp), type: "image/webp" }),
117
- /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: encodeURI(fallback), type: src.mime_type }),
118
- /* @__PURE__ */ jsxRuntime.jsx(
85
+ return /* @__PURE__ */ jsxs("picture", { children: [
86
+ avif && /* @__PURE__ */ jsx("source", { srcSet: encodeURI(avif), type: "image/avif" }),
87
+ webp && /* @__PURE__ */ jsx("source", { srcSet: encodeURI(webp), type: "image/webp" }),
88
+ /* @__PURE__ */ jsx("source", { srcSet: encodeURI(fallback), type: src.mime_type }),
89
+ /* @__PURE__ */ jsx(
119
90
  "img",
120
91
  __spreadValues({
121
92
  src: fallback,
@@ -129,4 +100,4 @@ const Image = (_a) => {
129
100
  };
130
101
  var Image_default = Image;
131
102
 
132
- module.exports = Image_default;
103
+ export { Image_default as default };
@@ -1,33 +1,8 @@
1
- 'use strict';
1
+ import { __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import Container from '../Container';
2
5
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var Container = require('../Container');
6
-
7
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
-
9
- var React__default = /*#__PURE__*/_interopDefault(React);
10
- var Container__default = /*#__PURE__*/_interopDefault(Container);
11
-
12
- var __defProp = Object.defineProperty;
13
- var __defProps = Object.defineProperties;
14
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
15
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
16
- var __hasOwnProp = Object.prototype.hasOwnProperty;
17
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
18
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19
- var __spreadValues = (a, b) => {
20
- for (var prop in b || (b = {}))
21
- if (__hasOwnProp.call(b, prop))
22
- __defNormalProp(a, prop, b[prop]);
23
- if (__getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(b)) {
25
- if (__propIsEnum.call(b, prop))
26
- __defNormalProp(a, prop, b[prop]);
27
- }
28
- return a;
29
- };
30
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
31
6
  const WidgetRender = ({
32
7
  library,
33
8
  entity,
@@ -41,19 +16,19 @@ const WidgetRender = ({
41
16
  context = __spreadProps(__spreadValues({}, context), {
42
17
  locale: (_a = context.locale) != null ? _a : locale
43
18
  });
44
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: pageData.widgets.map(({ widgetId, component, settings }) => {
19
+ return /* @__PURE__ */ jsx(Fragment, { children: pageData.widgets.map(({ widgetId, component, settings }) => {
45
20
  if (!library[component]) {
46
21
  console.error(
47
22
  `Unknown widget: {widgetId: ${widgetId}, component: ${component}, settings: ${settings}}`
48
23
  );
49
24
  return null;
50
25
  }
51
- return /* @__PURE__ */ jsxRuntime.jsx(
52
- Container__default.default,
26
+ return /* @__PURE__ */ jsx(
27
+ Container,
53
28
  {
54
29
  settings: (settings == null ? void 0 : settings.containerSettings) || {},
55
30
  "data-widget": component,
56
- children: React__default.default.createElement(library[component], __spreadProps(__spreadValues({}, settings), {
31
+ children: React.createElement(library[component], __spreadProps(__spreadValues({}, settings), {
57
32
  __ctx: context,
58
33
  __data: (preloaded == null ? void 0 : preloaded[widgetId]) || {}
59
34
  }))
@@ -64,4 +39,4 @@ const WidgetRender = ({
64
39
  };
65
40
  var WidgetRender_default = WidgetRender;
66
41
 
67
- module.exports = WidgetRender_default;
42
+ export { WidgetRender_default as default };
@@ -1,4 +1,4 @@
1
- 'use strict';
1
+ import './chunk-ORMEWXMH.js';
2
2
 
3
3
  function extractImageValue(value) {
4
4
  if (!value) {
@@ -8,4 +8,4 @@ function extractImageValue(value) {
8
8
  }
9
9
  var extractImageValue_default = extractImageValue;
10
10
 
11
- module.exports = extractImageValue_default;
11
+ export { extractImageValue_default as default };
@@ -1,8 +1,8 @@
1
- 'use strict';
1
+ import './chunk-ORMEWXMH.js';
2
2
 
3
3
  const imagePlaceholder = (size) => {
4
4
  return `https://placeholder.raketa.cloud/images/${size}`;
5
5
  };
6
6
  var imagePlaceholder_default = imagePlaceholder;
7
7
 
8
- module.exports = imagePlaceholder_default;
8
+ export { imagePlaceholder_default as default };
package/dist/imageSrc.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';
1
+ import './chunk-ORMEWXMH.js';
2
2
 
3
3
  const imageSrc = (src, variant) => {
4
4
  if (typeof src === "object" && !("name" in src))
@@ -11,4 +11,4 @@ const imageSrc = (src, variant) => {
11
11
  };
12
12
  var imageSrc_default = imageSrc;
13
13
 
14
- module.exports = imageSrc_default;
14
+ export { imageSrc_default as default };
package/dist/index.js CHANGED
@@ -1,68 +1,11 @@
1
- 'use strict';
2
-
3
- var Image = require('./Image');
4
- var imageSrc = require('./imageSrc');
5
- var imagePlaceholder = require('./imagePlaceholder');
6
- var Container = require('./Container');
7
- var EmbeddedVideo = require('./EmbeddedVideo');
8
- var toHTML = require('./toHTML');
9
- var isImagePresent = require('./isImagePresent');
10
- var AdminPageRender = require('./AdminPageRender');
11
- var WidgetRender = require('./WidgetRender');
12
- var extractImageValue = require('./extractImageValue');
13
-
14
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
-
16
- var Image__default = /*#__PURE__*/_interopDefault(Image);
17
- var imageSrc__default = /*#__PURE__*/_interopDefault(imageSrc);
18
- var imagePlaceholder__default = /*#__PURE__*/_interopDefault(imagePlaceholder);
19
- var Container__default = /*#__PURE__*/_interopDefault(Container);
20
- var EmbeddedVideo__default = /*#__PURE__*/_interopDefault(EmbeddedVideo);
21
- var toHTML__default = /*#__PURE__*/_interopDefault(toHTML);
22
- var isImagePresent__default = /*#__PURE__*/_interopDefault(isImagePresent);
23
- var AdminPageRender__default = /*#__PURE__*/_interopDefault(AdminPageRender);
24
- var WidgetRender__default = /*#__PURE__*/_interopDefault(WidgetRender);
25
- var extractImageValue__default = /*#__PURE__*/_interopDefault(extractImageValue);
26
-
27
-
28
-
29
- Object.defineProperty(exports, "Image", {
30
- enumerable: true,
31
- get: function () { return Image__default.default; }
32
- });
33
- Object.defineProperty(exports, "imageSrc", {
34
- enumerable: true,
35
- get: function () { return imageSrc__default.default; }
36
- });
37
- Object.defineProperty(exports, "imagePlaceholder", {
38
- enumerable: true,
39
- get: function () { return imagePlaceholder__default.default; }
40
- });
41
- Object.defineProperty(exports, "Container", {
42
- enumerable: true,
43
- get: function () { return Container__default.default; }
44
- });
45
- Object.defineProperty(exports, "EmbeddedVideo", {
46
- enumerable: true,
47
- get: function () { return EmbeddedVideo__default.default; }
48
- });
49
- Object.defineProperty(exports, "toHTML", {
50
- enumerable: true,
51
- get: function () { return toHTML__default.default; }
52
- });
53
- Object.defineProperty(exports, "isImagePresent", {
54
- enumerable: true,
55
- get: function () { return isImagePresent__default.default; }
56
- });
57
- Object.defineProperty(exports, "AdminPageRender", {
58
- enumerable: true,
59
- get: function () { return AdminPageRender__default.default; }
60
- });
61
- Object.defineProperty(exports, "WidgetRender", {
62
- enumerable: true,
63
- get: function () { return WidgetRender__default.default; }
64
- });
65
- Object.defineProperty(exports, "extractImageValue", {
66
- enumerable: true,
67
- get: function () { return extractImageValue__default.default; }
68
- });
1
+ import './chunk-ORMEWXMH.js';
2
+ export { default as Image } from './Image';
3
+ export { default as imageSrc } from './imageSrc';
4
+ export { default as imagePlaceholder } from './imagePlaceholder';
5
+ export { default as Container } from './Container';
6
+ export { default as EmbeddedVideo } from './EmbeddedVideo';
7
+ export { default as toHTML } from './toHTML';
8
+ export { default as isImagePresent } from './isImagePresent';
9
+ export { default as AdminPageRender } from './AdminPageRender';
10
+ export { default as WidgetRender } from './WidgetRender';
11
+ export { default as extractImageValue } from './extractImageValue';
@@ -1,4 +1,4 @@
1
- 'use strict';
1
+ import './chunk-ORMEWXMH.js';
2
2
 
3
3
  function isImagePresent(value) {
4
4
  if (!value) {
@@ -14,4 +14,4 @@ function isImagePresent(value) {
14
14
  }
15
15
  var isImagePresent_default = isImagePresent;
16
16
 
17
- module.exports = isImagePresent_default;
17
+ export { isImagePresent_default as default };