@raketa-builder/builder 1.3.4 → 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,12 +1,7 @@
1
- "use strict";
2
- var __create = Object.create;
3
1
  var __defProp = Object.defineProperty;
4
2
  var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -34,27 +29,6 @@ var __objRest = (source, exclude) => {
34
29
  }
35
30
  return target;
36
31
  };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
- var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
48
- };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
32
  var __async = (__this, __arguments, generator) => {
59
33
  return new Promise((resolve, reject) => {
60
34
  var fulfilled = (value) => {
@@ -77,31 +51,10 @@ var __async = (__this, __arguments, generator) => {
77
51
  };
78
52
 
79
53
  // src/index.js
80
- var index_exports = {};
81
- __export(index_exports, {
82
- AdminForm: () => AdminForm_default,
83
- BuilderContext: () => BuilderContext_default,
84
- Button: () => Button_default,
85
- ButtonSettings: () => ButtonSettings_default,
86
- Dialog: () => Dialog_default,
87
- FormGroup: () => import_ui20.FormGroup,
88
- Img: () => Image_default,
89
- Label: () => import_ui20.Label,
90
- Link: () => Link_default,
91
- LinkSettings: () => LinkSettings_default,
92
- List: () => List_default,
93
- ListInput: () => ListInput_default,
94
- MediaManager: () => MediaManager,
95
- PageBuilder: () => PageBuilder_default,
96
- SelectMenu: () => SelectMenu_default,
97
- TextArea: () => TextArea_default,
98
- TextInput: () => TextInput_default
99
- });
100
- module.exports = __toCommonJS(index_exports);
101
- var import_ui20 = require("@raketa-builder/ui");
54
+ import { Label as Label3, FormGroup as FormGroup5 } from "@raketa-builder/ui";
102
55
 
103
56
  // src/PageBuilder.js
104
- var import_react25 = __toESM(require("react"));
57
+ import React25 from "react";
105
58
 
106
59
  // src/lists/index.js
107
60
  var add = (items, item) => [...items, item];
@@ -135,63 +88,63 @@ var randomId = () => Math.floor(Math.random() * (999 - 100 + 1)) + 100;
135
88
  var randomString = (length) => Math.random().toString(36).substring(length);
136
89
 
137
90
  // src/HostContext.js
138
- var import_react = __toESM(require("react"));
139
- var HostContext = import_react.default.createContext({});
91
+ import React from "react";
92
+ var HostContext = React.createContext({});
140
93
  var HostContext_default = HostContext;
141
94
 
142
95
  // src/LibraryContext.js
143
- var import_react2 = __toESM(require("react"));
144
- var LibraryContext = import_react2.default.createContext({});
96
+ import React2 from "react";
97
+ var LibraryContext = React2.createContext({});
145
98
  var LibraryContext_default = LibraryContext;
146
99
 
147
100
  // src/Canvas.js
148
- var import_react6 = __toESM(require("react"));
149
- var import_react_sortablejs = require("react-sortablejs");
150
- var import_ui5 = require("@raketa-builder/ui");
101
+ import React6 from "react";
102
+ import { ReactSortable } from "react-sortablejs";
103
+ import { H, P, cn as cn5 } from "@raketa-builder/ui";
151
104
 
152
105
  // src/lib/AdminWidget.js
153
- var import_react4 = __toESM(require("react"));
106
+ import React4 from "react";
154
107
 
155
108
  // src/lib/AdminWidgetWrapper.js
156
- var import_ui = require("@raketa-builder/ui");
157
- var import_jsx_runtime = require("react/jsx-runtime");
109
+ import { cn } from "@raketa-builder/ui";
110
+ import { jsx } from "react/jsx-runtime";
158
111
  var AdminWidgetWrapper = (_a) => {
159
112
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
160
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadValues({ className: (0, import_ui.cn)("r-admin-widget-wrapper", className) }, rest));
113
+ return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("r-admin-widget-wrapper", className) }, rest));
161
114
  };
162
115
  var AdminWidgetWrapper_default = AdminWidgetWrapper;
163
116
 
164
117
  // src/lib/AdminWidgetToolbar.js
165
- var import_ui2 = require("@raketa-builder/ui");
166
- var import_jsx_runtime2 = require("react/jsx-runtime");
118
+ import { cn as cn2 } from "@raketa-builder/ui";
119
+ import { jsx as jsx2 } from "react/jsx-runtime";
167
120
  var AdminWidgetToolbar = (_a) => {
168
121
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
169
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
122
+ return /* @__PURE__ */ jsx2(
170
123
  "div",
171
124
  __spreadValues({
172
- className: (0, import_ui2.cn)("r-reset", "r-admin-widget-toolbar", className)
125
+ className: cn2("r-reset", "r-admin-widget-toolbar", className)
173
126
  }, rest)
174
127
  );
175
128
  };
176
129
  var AdminWidgetToolbar_default = AdminWidgetToolbar;
177
130
 
178
131
  // src/lib/AdminWidgetLabel.js
179
- var import_ui3 = require("@raketa-builder/ui");
180
- var import_jsx_runtime3 = require("react/jsx-runtime");
132
+ import { cn as cn3 } from "@raketa-builder/ui";
133
+ import { jsx as jsx3 } from "react/jsx-runtime";
181
134
  var AdminWidgetLabel = (_a) => {
182
135
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
183
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
136
+ return /* @__PURE__ */ jsx3(
184
137
  "div",
185
138
  __spreadValues({
186
- className: (0, import_ui3.cn)("r-reset", "r-fs-small", "r-admin-widget-label", className)
139
+ className: cn3("r-reset", "r-fs-small", "r-admin-widget-label", className)
187
140
  }, rest)
188
141
  );
189
142
  };
190
143
  var AdminWidgetLabel_default = AdminWidgetLabel;
191
144
 
192
145
  // src/lib/IconButton.js
193
- var import_react3 = __toESM(require("react"));
194
- var import_jsx_runtime4 = require("react/jsx-runtime");
146
+ import React3 from "react";
147
+ import { jsx as jsx4 } from "react/jsx-runtime";
195
148
  var icons = {
196
149
  iconMove: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZpZXdCb3g9IjAgMCAyMiAyMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5tb3ZlPC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9Im1vdmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+ICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxLjAwMDAwMCwgMS4wMDAwMDApIiBpZD0iU2hhcGUiIHN0cm9rZT0iI0ZGRkZGRiIgc3Ryb2tlLXdpZHRoPSIyIj4gICAgICAgICAgICA8cG9seWxpbmUgcG9pbnRzPSIzIDcgMCAxMCAzIDEzIj48L3BvbHlsaW5lPiAgICAgICAgICAgIDxwb2x5bGluZSBwb2ludHM9IjcgMyAxMCAwIDEzIDMiPjwvcG9seWxpbmU+ICAgICAgICAgICAgPHBvbHlsaW5lIHBvaW50cz0iMTMgMTcgMTAgMjAgNyAxNyI+PC9wb2x5bGluZT4gICAgICAgICAgICA8cG9seWxpbmUgcG9pbnRzPSIxNyA3IDIwIDEwIDE3IDEzIj48L3BvbHlsaW5lPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDEwIEwyMCwxMCI+PC9wYXRoPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMCwwIEwxMCwyMCI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+",
197
150
  iconEdit: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZpZXdCb3g9IjAgMCAyMiAyMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5lZGl0LTI8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iZWRpdC0yIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPiAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMi4wMDAwMDAsIDIuMDAwMDAwKSIgaWQ9IlNoYXBlIiBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iMiI+ICAgICAgICAgICAgPHBvbHlnb24gcG9pbnRzPSIxMyAwIDE4IDUgNSAxOCAwIDE4IDAgMTMiPjwvcG9seWdvbj4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==",
@@ -206,7 +159,7 @@ var colors = {
206
159
  };
207
160
  var IconButton = (_a) => {
208
161
  var _b = _a, { type, icon, marginLeft = "0px" } = _b, rest = __objRest(_b, ["type", "icon", "marginLeft"]);
209
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
162
+ return /* @__PURE__ */ jsx4(
210
163
  "button",
211
164
  __spreadValues({
212
165
  type: "button",
@@ -262,9 +215,9 @@ var widgetData = {
262
215
  var widgetData_default = widgetData;
263
216
 
264
217
  // src/lib/AdminWidget.js
265
- var import_support = require("@raketa-builder/support");
266
- var import_ui4 = require("@raketa-builder/ui");
267
- var import_jsx_runtime5 = require("react/jsx-runtime");
218
+ import { Container } from "@raketa-builder/support";
219
+ import { cn as cn4 } from "@raketa-builder/ui";
220
+ import { Fragment, jsx as jsx5, jsxs } from "react/jsx-runtime";
268
221
  var AdminWidget = ({
269
222
  library,
270
223
  adminLibrary,
@@ -291,8 +244,8 @@ var AdminWidget = ({
291
244
  };
292
245
  if (!currentWidget || !currentAdminWidget) {
293
246
  console.error(`Unknown widget: ${widget.component}`);
294
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(AdminWidgetWrapper_default, { "data-widget": widget.component, children: [
295
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AdminWidgetToolbar_default, { "data-toolbar": true, children: !isSelected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
247
+ return /* @__PURE__ */ jsxs(AdminWidgetWrapper_default, { "data-widget": widget.component, children: [
248
+ /* @__PURE__ */ jsx5(AdminWidgetToolbar_default, { "data-toolbar": true, children: !isSelected && /* @__PURE__ */ jsx5(
296
249
  IconButton_default,
297
250
  {
298
251
  icon: "iconDelete",
@@ -300,13 +253,13 @@ var AdminWidget = ({
300
253
  onClick: () => handleDeleteWidget(widget.widgetId)
301
254
  }
302
255
  ) }),
303
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_ui4.cn)("r-reset", "r-fs-large", "r-admin-missing-widget"), children: `Unknown widget: ${widget.component}` })
256
+ /* @__PURE__ */ jsx5("div", { className: cn4("r-reset", "r-fs-large", "r-admin-missing-widget"), children: `Unknown widget: ${widget.component}` })
304
257
  ] });
305
258
  }
306
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(AdminWidgetWrapper_default, { "data-widget": widget.component, children: [
307
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "r-selected-widget" }),
308
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(AdminWidgetToolbar_default, { "data-toolbar": true, children: [
309
- !widgetData_default.deprecated(currentAdminWidget) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
259
+ return /* @__PURE__ */ jsxs(AdminWidgetWrapper_default, { "data-widget": widget.component, children: [
260
+ isSelected && /* @__PURE__ */ jsx5("div", { className: "r-selected-widget" }),
261
+ /* @__PURE__ */ jsxs(AdminWidgetToolbar_default, { "data-toolbar": true, children: [
262
+ !widgetData_default.deprecated(currentAdminWidget) && /* @__PURE__ */ jsx5(
310
263
  "input",
311
264
  {
312
265
  type: "checkbox",
@@ -318,9 +271,9 @@ var AdminWidget = ({
318
271
  checked: isSelected
319
272
  }
320
273
  ),
321
- !isSelected && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
322
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconButton_default, { icon: "iconMove", "data-drag": true }),
323
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
274
+ !isSelected && /* @__PURE__ */ jsxs(Fragment, { children: [
275
+ /* @__PURE__ */ jsx5(IconButton_default, { icon: "iconMove", "data-drag": true }),
276
+ /* @__PURE__ */ jsx5(
324
277
  IconButton_default,
325
278
  {
326
279
  icon: "iconEdit",
@@ -328,7 +281,7 @@ var AdminWidget = ({
328
281
  onClick: () => onEdit(widget)
329
282
  }
330
283
  ),
331
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
284
+ /* @__PURE__ */ jsx5(
332
285
  IconButton_default,
333
286
  {
334
287
  icon: "iconDelete",
@@ -336,7 +289,7 @@ var AdminWidget = ({
336
289
  onClick: () => handleDeleteWidget(widget.widgetId)
337
290
  }
338
291
  ),
339
- !widgetData_default.deprecated(currentAdminWidget) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
292
+ !widgetData_default.deprecated(currentAdminWidget) && /* @__PURE__ */ jsx5(
340
293
  IconButton_default,
341
294
  {
342
295
  icon: "iconCopy",
@@ -346,18 +299,18 @@ var AdminWidget = ({
346
299
  )
347
300
  ] })
348
301
  ] }),
349
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(AdminWidgetLabel_default, { "data-widget-label": true, children: [
302
+ /* @__PURE__ */ jsxs(AdminWidgetLabel_default, { "data-widget-label": true, children: [
350
303
  widgetData_default.title(currentAdminWidget),
351
304
  widgetData_default.deprecated(currentAdminWidget) && " (deprecated)"
352
305
  ] }),
353
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_support.Container, { settings: containerSettings, children: import_react4.default.createElement(currentWidget, widget.settings) })
306
+ /* @__PURE__ */ jsx5(Container, { settings: containerSettings, children: React4.createElement(currentWidget, widget.settings) })
354
307
  ] });
355
308
  };
356
309
  var AdminWidget_default = AdminWidget;
357
310
 
358
311
  // src/ErrorBoundary/ErrorBoundary.js
359
- var import_react5 = __toESM(require("react"));
360
- var ErrorBoundary = class extends import_react5.Component {
312
+ import React5, { Component } from "react";
313
+ var ErrorBoundary = class extends Component {
361
314
  constructor(props) {
362
315
  super(props);
363
316
  this.state = {
@@ -383,12 +336,12 @@ var ErrorBoundary_default = ErrorBoundary;
383
336
  var ErrorBoundary_default2 = ErrorBoundary_default;
384
337
 
385
338
  // src/Canvas.js
386
- var import_jsx_runtime6 = require("react/jsx-runtime");
339
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
387
340
  var EmptyCanvas = (_a) => {
388
341
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
389
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", __spreadValues({ className: (0, import_ui5.cn)("r-reset", "r-empty-canvas", className) }, rest));
342
+ return /* @__PURE__ */ jsx6("div", __spreadValues({ className: cn5("r-reset", "r-empty-canvas", className) }, rest));
390
343
  };
391
- var Canvas = import_react6.default.memo(
344
+ var Canvas = React6.memo(
392
345
  function Canvas2({
393
346
  selectedWidgets,
394
347
  widgets,
@@ -399,15 +352,15 @@ var Canvas = import_react6.default.memo(
399
352
  onSelectWidget,
400
353
  canvasClassName
401
354
  }) {
402
- const { library, adminLibrary } = import_react6.default.useContext(LibraryContext_default);
355
+ const { library, adminLibrary } = React6.useContext(LibraryContext_default);
403
356
  if (widgets.length === 0) {
404
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EmptyCanvas, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
405
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.H, { size: "xxlarge", children: "It's always good to start with a clean slate." }),
406
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.P, { children: "Use the sidebar to add content." })
357
+ return /* @__PURE__ */ jsx6(EmptyCanvas, { children: /* @__PURE__ */ jsxs2("div", { children: [
358
+ /* @__PURE__ */ jsx6(H, { size: "xxlarge", children: "It's always good to start with a clean slate." }),
359
+ /* @__PURE__ */ jsx6(P, { children: "Use the sidebar to add content." })
407
360
  ] }) });
408
361
  }
409
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
410
- import_react_sortablejs.ReactSortable,
362
+ return /* @__PURE__ */ jsx6(
363
+ ReactSortable,
411
364
  {
412
365
  list: widgets,
413
366
  setList: onReorder,
@@ -415,7 +368,7 @@ var Canvas = import_react6.default.memo(
415
368
  direction: "horizontal",
416
369
  dragoverBubble: true,
417
370
  className: canvasClassName,
418
- children: widgets.map((widget) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorBoundary_default2, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
371
+ children: widgets.map((widget) => /* @__PURE__ */ jsx6(ErrorBoundary_default2, { children: /* @__PURE__ */ jsx6(
419
372
  AdminWidget_default,
420
373
  {
421
374
  library,
@@ -442,32 +395,32 @@ var Canvas = import_react6.default.memo(
442
395
  var Canvas_default = Canvas;
443
396
 
444
397
  // src/lib/AdminSidebar.js
445
- var import_react10 = __toESM(require("react"));
446
- var import_ui10 = require("@raketa-builder/ui");
398
+ import React10 from "react";
399
+ import { H as H2 } from "@raketa-builder/ui";
447
400
 
448
401
  // src/lib/SideNav.js
449
- var import_react7 = __toESM(require("react"));
450
- var import_ui6 = require("@raketa-builder/ui");
451
- var import_jsx_runtime7 = require("react/jsx-runtime");
402
+ import React7 from "react";
403
+ import { cn as cn6 } from "@raketa-builder/ui";
404
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
452
405
  var SideNav = (_a) => {
453
406
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
454
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", __spreadValues({ className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav", className) }, props));
407
+ return /* @__PURE__ */ jsx7("div", __spreadValues({ className: cn6("r-reset", "r-admin-sidenav", className) }, props));
455
408
  };
456
409
  var NavGroup = (_a) => {
457
410
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
458
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
411
+ return /* @__PURE__ */ jsx7(
459
412
  "div",
460
413
  __spreadValues({
461
- className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav-group", className)
414
+ className: cn6("r-reset", "r-admin-sidenav-group", className)
462
415
  }, props)
463
416
  );
464
417
  };
465
418
  var NavItem = (_a) => {
466
419
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
467
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
420
+ return /* @__PURE__ */ jsx7(
468
421
  "div",
469
422
  __spreadValues({
470
- className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav-item", className)
423
+ className: cn6("r-reset", "r-admin-sidenav-item", className)
471
424
  }, props)
472
425
  );
473
426
  };
@@ -487,11 +440,11 @@ var NavButtonStyle = (_a) => {
487
440
  ]);
488
441
  const backgroundColor = active ? "var(--r-darker-gray)" : success ? "var(--r-success)" : "transparent";
489
442
  const _a2 = props, { clipboardCopiesCount } = _a2, otherProps = __objRest(_a2, ["clipboardCopiesCount"]);
490
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
491
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
443
+ return /* @__PURE__ */ jsxs3("div", { children: [
444
+ /* @__PURE__ */ jsx7(
492
445
  "div",
493
446
  __spreadValues({
494
- className: (0, import_ui6.cn)(
447
+ className: cn6(
495
448
  "r-reset",
496
449
  "r-reset-button",
497
450
  "r-fs-medium",
@@ -506,7 +459,7 @@ var NavButtonStyle = (_a) => {
506
459
  }
507
460
  }, otherProps)
508
461
  ),
509
- clipboardCopiesCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
462
+ clipboardCopiesCount > 0 && /* @__PURE__ */ jsx7(
510
463
  "div",
511
464
  {
512
465
  style: {
@@ -530,44 +483,44 @@ var NavButtonStyle = (_a) => {
530
483
  };
531
484
  var TooltipWrapper = (_a) => {
532
485
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
533
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
486
+ return /* @__PURE__ */ jsx7(
534
487
  "div",
535
488
  __spreadValues({
536
- className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav-tooltip-wrapper", className)
489
+ className: cn6("r-reset", "r-admin-sidenav-tooltip-wrapper", className)
537
490
  }, props)
538
491
  );
539
492
  };
540
493
  var Tooltip = (_a) => {
541
494
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
542
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
495
+ return /* @__PURE__ */ jsx7(
543
496
  "div",
544
497
  __spreadValues({
545
- className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav-tooltip", className)
498
+ className: cn6("r-reset", "r-admin-sidenav-tooltip", className)
546
499
  }, props)
547
500
  );
548
501
  };
549
502
  var NavButton = (_a) => {
550
503
  var _b = _a, { tooltip, hasChanges = true } = _b, props = __objRest(_b, ["tooltip", "hasChanges"]);
551
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(TooltipWrapper, { children: [
552
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavButtonStyle, __spreadProps(__spreadValues({}, props), { hasChanges })),
553
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tooltip, { className: "cms-tooltip", children: tooltip })
504
+ return /* @__PURE__ */ jsxs3(TooltipWrapper, { children: [
505
+ /* @__PURE__ */ jsx7(NavButtonStyle, __spreadProps(__spreadValues({}, props), { hasChanges })),
506
+ tooltip && /* @__PURE__ */ jsx7(Tooltip, { className: "cms-tooltip", children: tooltip })
554
507
  ] });
555
508
  };
556
509
  var NavPanel = (_a) => {
557
510
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
558
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
511
+ return /* @__PURE__ */ jsx7(
559
512
  "div",
560
513
  __spreadValues({
561
- className: (0, import_ui6.cn)("r-reset", "r-admin-sidenav-nav-panel", className)
514
+ className: cn6("r-reset", "r-admin-sidenav-nav-panel", className)
562
515
  }, props)
563
516
  );
564
517
  };
565
518
  var SideNavSearchWrapper = (_a) => {
566
519
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
567
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
520
+ return /* @__PURE__ */ jsx7(
568
521
  "div",
569
522
  __spreadValues({
570
- className: (0, import_ui6.cn)(
523
+ className: cn6(
571
524
  "r-reset",
572
525
  "r-fs-medium",
573
526
  "r-admin-sidenav-search-wrapper",
@@ -578,33 +531,33 @@ var SideNavSearchWrapper = (_a) => {
578
531
  };
579
532
 
580
533
  // src/lib/LanguageSwitcher.js
581
- var import_react8 = __toESM(require("react"));
582
- var import_ui7 = require("@raketa-builder/ui");
583
- var import_jsx_runtime8 = require("react/jsx-runtime");
534
+ import React8 from "react";
535
+ import { cn as cn7 } from "@raketa-builder/ui";
536
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
584
537
  var LanguageSwitcherWrapper = (_a) => {
585
538
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
586
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
539
+ return /* @__PURE__ */ jsx8(
587
540
  "div",
588
541
  __spreadValues({
589
- className: (0, import_ui7.cn)("r-reset", "r-admin-language-switcher", className)
542
+ className: cn7("r-reset", "r-admin-language-switcher", className)
590
543
  }, props)
591
544
  );
592
545
  };
593
546
  var LanguageSwitcherMenu = (_a) => {
594
547
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
595
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
548
+ return /* @__PURE__ */ jsx8(
596
549
  "div",
597
550
  __spreadValues({
598
- className: (0, import_ui7.cn)("r-reset", "r-admin-language-switcher-menu", className)
551
+ className: cn7("r-reset", "r-admin-language-switcher-menu", className)
599
552
  }, props)
600
553
  );
601
554
  };
602
555
  var LanguageSwitcherItem = (_a) => {
603
556
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
604
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
557
+ return /* @__PURE__ */ jsx8(
605
558
  "div",
606
559
  __spreadValues({
607
- className: (0, import_ui7.cn)(
560
+ className: cn7(
608
561
  "r-reset",
609
562
  "r-fs-medium r-admin-language-switcher-item",
610
563
  className
@@ -614,10 +567,10 @@ var LanguageSwitcherItem = (_a) => {
614
567
  };
615
568
  var LanguageSwitcherNewItem = (_a) => {
616
569
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
617
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
570
+ return /* @__PURE__ */ jsx8(
618
571
  "div",
619
572
  __spreadValues({
620
- className: (0, import_ui7.cn)(
573
+ className: cn7(
621
574
  "r-reset",
622
575
  "r-fs-medium r-admin-language-switcher-new-item",
623
576
  className
@@ -627,10 +580,10 @@ var LanguageSwitcherNewItem = (_a) => {
627
580
  };
628
581
  var LanguageSwitcherCurrent = (_a) => {
629
582
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
630
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
583
+ return /* @__PURE__ */ jsx8(
631
584
  "div",
632
585
  __spreadValues({
633
- className: (0, import_ui7.cn)(
586
+ className: cn7(
634
587
  "r-reset",
635
588
  "r-fs-medium r-admin-language-switcher-current",
636
589
  className
@@ -638,17 +591,17 @@ var LanguageSwitcherCurrent = (_a) => {
638
591
  }, props)
639
592
  );
640
593
  };
641
- var LanguageSwitcherItemComponent = ({ path, label }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LanguageSwitcherItem, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: path, children: label }) });
642
- var LanguageSwitcherNewItemComponent = ({ path, label }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(LanguageSwitcherNewItem, { children: [
643
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
644
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: path, children: "+" })
594
+ var LanguageSwitcherItemComponent = ({ path, label }) => /* @__PURE__ */ jsx8(LanguageSwitcherItem, { children: /* @__PURE__ */ jsx8("a", { href: path, children: label }) });
595
+ var LanguageSwitcherNewItemComponent = ({ path, label }) => /* @__PURE__ */ jsxs4(LanguageSwitcherNewItem, { children: [
596
+ /* @__PURE__ */ jsx8("span", { children: label }),
597
+ /* @__PURE__ */ jsx8("a", { href: path, children: "+" })
645
598
  ] });
646
599
  var LanguageSwitcher = ({ current, navigation }) => {
647
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(LanguageSwitcherWrapper, { children: [
648
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LanguageSwitcherCurrent, { children: current }),
649
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LanguageSwitcherMenu, { "data-switcher": true, children: navigation.map((navItem, idx) => {
600
+ return /* @__PURE__ */ jsxs4(LanguageSwitcherWrapper, { children: [
601
+ /* @__PURE__ */ jsx8(LanguageSwitcherCurrent, { children: current }),
602
+ /* @__PURE__ */ jsx8(LanguageSwitcherMenu, { "data-switcher": true, children: navigation.map((navItem, idx) => {
650
603
  const LinkComponent = navItem.newItem ? LanguageSwitcherNewItemComponent : LanguageSwitcherItemComponent;
651
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
604
+ return /* @__PURE__ */ jsx8(
652
605
  LinkComponent,
653
606
  {
654
607
  path: navItem.path,
@@ -662,14 +615,14 @@ var LanguageSwitcher = ({ current, navigation }) => {
662
615
  var LanguageSwitcher_default = LanguageSwitcher;
663
616
 
664
617
  // src/lib/SidebarItem.js
665
- var import_ui8 = require("@raketa-builder/ui");
666
- var import_jsx_runtime9 = require("react/jsx-runtime");
618
+ import { cn as cn8 } from "@raketa-builder/ui";
619
+ import { jsx as jsx9 } from "react/jsx-runtime";
667
620
  var SidebarItem = (_a) => {
668
621
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
669
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
622
+ return /* @__PURE__ */ jsx9(
670
623
  "div",
671
624
  __spreadValues({
672
- className: (0, import_ui8.cn)(
625
+ className: cn8(
673
626
  "r-reset",
674
627
  "r-reset-button",
675
628
  "r-fs-base",
@@ -681,9 +634,9 @@ var SidebarItem = (_a) => {
681
634
  };
682
635
 
683
636
  // src/forms/TextInput.js
684
- var import_react9 = __toESM(require("react"));
685
- var import_ui9 = require("@raketa-builder/ui");
686
- var import_jsx_runtime10 = require("react/jsx-runtime");
637
+ import React9 from "react";
638
+ import { FormGroup, Label, Input, Textarea, Hint } from "@raketa-builder/ui";
639
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
687
640
  var TextField = (_a) => {
688
641
  var _b = _a, {
689
642
  label,
@@ -703,10 +656,10 @@ var TextField = (_a) => {
703
656
  "placeholder"
704
657
  ]);
705
658
  const id = randomString();
706
- const Component2 = multiline ? import_ui9.Textarea : import_ui9.Input;
707
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ui9.FormGroup, { children: [
708
- label ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui9.Label, { htmlFor: id, error, children: label }) : "",
709
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
659
+ const Component2 = multiline ? Textarea : Input;
660
+ return /* @__PURE__ */ jsxs5(FormGroup, { children: [
661
+ label ? /* @__PURE__ */ jsx10(Label, { htmlFor: id, error, children: label }) : "",
662
+ /* @__PURE__ */ jsx10(
710
663
  Component2,
711
664
  __spreadValues({
712
665
  id,
@@ -715,14 +668,14 @@ var TextField = (_a) => {
715
668
  placeholder
716
669
  }, rest)
717
670
  ),
718
- hint ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui9.Hint, { children: hint }) : ""
671
+ hint ? /* @__PURE__ */ jsx10(Hint, { children: hint }) : ""
719
672
  ] });
720
673
  };
721
- var TextInput = (props) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TextField, __spreadValues({}, props));
674
+ var TextInput = (props) => /* @__PURE__ */ jsx10(TextField, __spreadValues({}, props));
722
675
  var TextInput_default = TextInput;
723
676
 
724
677
  // src/lib/AdminSidebar.js
725
- var import_jsx_runtime11 = require("react/jsx-runtime");
678
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
726
679
  var ICONS = {
727
680
  add: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZpZXdCb3g9IjAgMCAyMiAyMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5wbHVzLWNpcmNsZTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJwbHVzLWNpcmNsZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuMDAwMDAwLCAxLjAwMDAwMCkiIHN0cm9rZT0iI0ZGRkZGRiIgc3Ryb2tlLXdpZHRoPSIyIj4gICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBjeD0iMTAiIGN5PSIxMCIgcj0iMTAiPjwvY2lyY2xlPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMCw2IEwxMCwxNCIgaWQ9IlNoYXBlIj48L3BhdGg+ICAgICAgICAgICAgPHBhdGggZD0iTTYsMTAgTDE0LDEwIiBpZD0iU2hhcGUiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==",
728
681
  reorder: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZpZXdCb3g9IjAgMCAyMiAyMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5saXN0PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9Imxpc3QiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNy4wMDAwMDAsIDUuMDAwMDAwKSIgaWQ9IlNoYXBlIiBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIj4gICAgICAgICAgICA8cGF0aCBkPSJNMCwwIEwxMywwIj48L3BhdGg+ICAgICAgICAgICAgPHBhdGggZD0iTTAsNiBMMTMsNiI+PC9wYXRoPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDEyIEwxMywxMiI+PC9wYXRoPiAgICAgICAgPC9nPiAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC0yIiBmaWxsPSIjRkZGRkZGIiBjeD0iMyIgY3k9IjUiIHI9IjEiPjwvY2lyY2xlPiAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC0yIiBmaWxsPSIjRkZGRkZGIiBjeD0iMyIgY3k9IjE3IiByPSIxIj48L2NpcmNsZT4gICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMiIgZmlsbD0iI0ZGRkZGRiIgY3g9IjMiIGN5PSIxMSIgcj0iMSI+PC9jaXJjbGU+ICAgIDwvZz48L3N2Zz4=",
@@ -743,13 +696,13 @@ var sortByTitle = (a, b) => {
743
696
  return 0;
744
697
  };
745
698
  var WidgetsList = ({ library, onAddWidget }) => {
746
- const [q, setQ] = import_react10.default.useState("");
699
+ const [q, setQ] = React10.useState("");
747
700
  const widgets = Object.keys(library).filter((widgetName) => !widgetData_default.deprecated(library[widgetName])).filter((widgetName) => {
748
701
  return widgetData_default.title(library[widgetName]).toLowerCase().indexOf(q.toLowerCase()) !== -1;
749
702
  });
750
703
  const widgetsCategories = widgets.map((widgetName) => widgetData_default.category(library[widgetName])).filter((c, idx, self) => self.indexOf(c) === idx);
751
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
752
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SideNavSearchWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
704
+ return /* @__PURE__ */ jsxs6("div", { children: [
705
+ /* @__PURE__ */ jsx11(SideNavSearchWrapper, { children: /* @__PURE__ */ jsx11(
753
706
  TextInput_default,
754
707
  {
755
708
  type: "search",
@@ -759,14 +712,14 @@ var WidgetsList = ({ library, onAddWidget }) => {
759
712
  placeholder: "Search..."
760
713
  }
761
714
  ) }),
762
- widgetsCategories.map((categoryName, idx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { marginBottom: "25px" }, children: [
763
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.H, { size: "medium", style: { color: "#fff" }, children: categoryName }),
715
+ widgetsCategories.map((categoryName, idx) => /* @__PURE__ */ jsxs6("div", { style: { marginBottom: "25px" }, children: [
716
+ /* @__PURE__ */ jsx11(H2, { size: "medium", style: { color: "#fff" }, children: categoryName }),
764
717
  widgets.filter(
765
718
  (widgetName) => widgetData_default.category(library[widgetName]) === categoryName
766
719
  ).map((widgetName) => ({
767
720
  widgetName,
768
721
  widgetTitle: widgetData_default.title(library[widgetName])
769
- })).sort(sortByTitle).map((item, idx2) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
722
+ })).sort(sortByTitle).map((item, idx2) => /* @__PURE__ */ jsx11(
770
723
  SidebarItem,
771
724
  {
772
725
  onClick: () => onAddWidget(item.widgetName),
@@ -790,19 +743,19 @@ var AdminSidebar = ({
790
743
  historyIndex,
791
744
  clipboardCopiesCount
792
745
  }) => {
793
- const { adminLibrary } = import_react10.default.useContext(LibraryContext_default);
746
+ const { adminLibrary } = React10.useContext(LibraryContext_default);
794
747
  const activeUndo = historyIndex > 0;
795
748
  const activeRedo = historyIndex >= 0 && historyIndex < pageHistory.length - 1;
796
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SideNav, { children: [
797
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(NavGroup, { children: [
798
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(NavItem, { children: [
799
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavButton, { icon: ICONS.add }),
800
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(NavPanel, { children: [
801
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.H, { size: "large", style: { color: "#fff" }, children: "Library" }),
802
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(WidgetsList, { library: adminLibrary, onAddWidget })
749
+ return /* @__PURE__ */ jsxs6(SideNav, { children: [
750
+ /* @__PURE__ */ jsxs6(NavGroup, { children: [
751
+ /* @__PURE__ */ jsxs6(NavItem, { children: [
752
+ /* @__PURE__ */ jsx11(NavButton, { icon: ICONS.add }),
753
+ /* @__PURE__ */ jsxs6(NavPanel, { children: [
754
+ /* @__PURE__ */ jsx11(H2, { size: "large", style: { color: "#fff" }, children: "Library" }),
755
+ /* @__PURE__ */ jsx11(WidgetsList, { library: adminLibrary, onAddWidget })
803
756
  ] })
804
757
  ] }),
805
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
758
+ /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(
806
759
  NavButton,
807
760
  {
808
761
  tooltip: "Reorder widgets",
@@ -810,7 +763,7 @@ var AdminSidebar = ({
810
763
  onClick: onReorderDialog
811
764
  }
812
765
  ) }),
813
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
766
+ /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(
814
767
  NavButton,
815
768
  {
816
769
  tooltip: "Paste widget",
@@ -819,7 +772,7 @@ var AdminSidebar = ({
819
772
  clipboardCopiesCount
820
773
  }
821
774
  ) }),
822
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
775
+ /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(
823
776
  NavButton,
824
777
  {
825
778
  tooltip: "Undo changes",
@@ -828,7 +781,7 @@ var AdminSidebar = ({
828
781
  onClick: activeUndo ? undoChanges : null
829
782
  }
830
783
  ) }),
831
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
784
+ /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(
832
785
  NavButton,
833
786
  {
834
787
  tooltip: "Redo changes",
@@ -839,7 +792,7 @@ var AdminSidebar = ({
839
792
  ) }),
840
793
  buttons && buttons.map((button) => {
841
794
  const icon = button.icon ? ICONS[button.icon] || button.icon : null;
842
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
795
+ return /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(
843
796
  NavButton,
844
797
  {
845
798
  id: button.id,
@@ -852,23 +805,23 @@ var AdminSidebar = ({
852
805
  ) }, button.id);
853
806
  })
854
807
  ] }),
855
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(NavGroup, { children: [
856
- languageSwitcherSettings && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LanguageSwitcher_default, __spreadValues({}, languageSwitcherSettings)) }),
857
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavItem, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavButton, { tooltip: "Exit", icon: ICONS.exit, onClick: onExit }) })
808
+ /* @__PURE__ */ jsxs6(NavGroup, { children: [
809
+ languageSwitcherSettings && /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(LanguageSwitcher_default, __spreadValues({}, languageSwitcherSettings)) }),
810
+ /* @__PURE__ */ jsx11(NavItem, { children: /* @__PURE__ */ jsx11(NavButton, { tooltip: "Exit", icon: ICONS.exit, onClick: onExit }) })
858
811
  ] })
859
812
  ] });
860
813
  };
861
814
  var AdminSidebar_default = AdminSidebar;
862
815
 
863
816
  // src/dialogs/ReorderDialog.js
864
- var import_react13 = __toESM(require("react"));
865
- var import_react_sortablejs2 = require("react-sortablejs");
866
- var import_ui12 = require("@raketa-builder/ui");
817
+ import React13 from "react";
818
+ import { ReactSortable as ReactSortable2 } from "react-sortablejs";
819
+ import { H as H3, P as P2, Button as Button2, cn as cn9 } from "@raketa-builder/ui";
867
820
 
868
821
  // src/dialogs/Dialog.js
869
- var import_react11 = __toESM(require("react"));
870
- var import_ui11 = require("@raketa-builder/ui");
871
- var import_jsx_runtime12 = require("react/jsx-runtime");
822
+ import React11 from "react";
823
+ import { Modal, Button } from "@raketa-builder/ui";
824
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
872
825
  function checkForChanges(hasChanges, onClose) {
873
826
  if (!hasChanges) {
874
827
  onClose();
@@ -889,17 +842,17 @@ var Dialog = ({
889
842
  secondaryLabel = "Cancel",
890
843
  onPrimary,
891
844
  areChanges
892
- }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
893
- import_ui11.Modal,
845
+ }) => /* @__PURE__ */ jsx12(
846
+ Modal,
894
847
  {
895
848
  open,
896
849
  title: title2,
897
850
  onClose,
898
851
  areChanges,
899
- FooterContent: () => (primaryLabel || secondaryLabel) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
900
- primaryLabel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ui11.Button, { type: "button", variant: "primary", onClick: onPrimary, children: primaryLabel }),
901
- secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
902
- import_ui11.Button,
852
+ FooterContent: () => (primaryLabel || secondaryLabel) && /* @__PURE__ */ jsxs7(Fragment2, { children: [
853
+ primaryLabel && /* @__PURE__ */ jsx12(Button, { type: "button", variant: "primary", onClick: onPrimary, children: primaryLabel }),
854
+ secondaryLabel && /* @__PURE__ */ jsx12(
855
+ Button,
903
856
  {
904
857
  type: "button",
905
858
  variant: "secondary",
@@ -914,22 +867,22 @@ var Dialog = ({
914
867
  var Dialog_default = Dialog;
915
868
 
916
869
  // src/lib/ModalSelectedWidgetsToolbar.js
917
- var import_react12 = __toESM(require("react"));
918
- var import_jsx_runtime13 = require("react/jsx-runtime");
870
+ import React12 from "react";
871
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
919
872
  var ModalSelectedWidgetsToolbar = ({
920
873
  selectedWidgets,
921
874
  onSelectAll,
922
875
  areAllSelected,
923
876
  onCopy,
924
877
  onRemove
925
- }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "r-selected-widget-toolbar-reorder", children: [
926
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
878
+ }) => /* @__PURE__ */ jsxs8("div", { className: "r-selected-widget-toolbar-reorder", children: [
879
+ /* @__PURE__ */ jsxs8(
927
880
  "label",
928
881
  {
929
882
  htmlFor: "selectAll",
930
883
  className: "r-reset r-heading r-fs-base r-label-select-all",
931
884
  children: [
932
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
885
+ /* @__PURE__ */ jsx13(
933
886
  "input",
934
887
  {
935
888
  type: "checkbox",
@@ -947,8 +900,8 @@ var ModalSelectedWidgetsToolbar = ({
947
900
  ]
948
901
  }
949
902
  ),
950
- selectedWidgets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
951
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
903
+ selectedWidgets.length > 0 && /* @__PURE__ */ jsxs8(Fragment3, { children: [
904
+ /* @__PURE__ */ jsxs8(
952
905
  "button",
953
906
  {
954
907
  type: "button",
@@ -961,7 +914,7 @@ var ModalSelectedWidgetsToolbar = ({
961
914
  ]
962
915
  }
963
916
  ),
964
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
917
+ /* @__PURE__ */ jsx13(
965
918
  "button",
966
919
  {
967
920
  type: "button",
@@ -975,10 +928,10 @@ var ModalSelectedWidgetsToolbar = ({
975
928
  var ModalSelectedWidgetsToolbar_default = ModalSelectedWidgetsToolbar;
976
929
 
977
930
  // src/dialogs/ReorderDialog.js
978
- var import_jsx_runtime14 = require("react/jsx-runtime");
931
+ import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
979
932
  var ReorderDialogItem = (_a) => {
980
933
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
981
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadValues({ className: (0, import_ui12.cn)("r-reorder-dialog-item", className) }, props));
934
+ return /* @__PURE__ */ jsx14("div", __spreadValues({ className: cn9("r-reorder-dialog-item", className) }, props));
982
935
  };
983
936
  var cleanup = (string) => string.replace(/<[^>]*>?/gm, "");
984
937
  var truncate = (str, num) => {
@@ -1013,7 +966,7 @@ var ReorderDialog = ({
1013
966
  onRemove,
1014
967
  onSelectAll
1015
968
  }) => {
1016
- const { adminLibrary } = import_react13.default.useContext(LibraryContext_default);
969
+ const { adminLibrary } = React13.useContext(LibraryContext_default);
1017
970
  const isSelected = (id) => selectedWidgets.filter((w) => w === id).length > 0;
1018
971
  const areAllSelected = selectedWidgets.length === widgets.length;
1019
972
  const handleSelectWidget = (id) => onSelectWidgets(id);
@@ -1021,7 +974,7 @@ var ReorderDialog = ({
1021
974
  if (areAllSelected) return onSelectAll([]);
1022
975
  onSelectAll(widgets.map((w) => w.widgetId));
1023
976
  };
1024
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
977
+ return /* @__PURE__ */ jsxs9(
1025
978
  Dialog_default,
1026
979
  {
1027
980
  open: true,
@@ -1030,9 +983,9 @@ var ReorderDialog = ({
1030
983
  primaryLabel: "",
1031
984
  secondaryLabel: "Close",
1032
985
  children: [
1033
- widgets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1034
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui12.P, { children: "Drag and drop elements below to reorder the page layout." }),
1035
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
986
+ widgets.length > 0 ? /* @__PURE__ */ jsxs9(Fragment4, { children: [
987
+ /* @__PURE__ */ jsx14(P2, { children: "Drag and drop elements below to reorder the page layout." }),
988
+ /* @__PURE__ */ jsx14(
1036
989
  ModalSelectedWidgetsToolbar_default,
1037
990
  {
1038
991
  selectedWidgets,
@@ -1042,23 +995,23 @@ var ReorderDialog = ({
1042
995
  onRemove
1043
996
  }
1044
997
  )
1045
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui12.P, { children: "It's always good to start with a clean slate. Use the sidebar to add content." }),
1046
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1047
- import_react_sortablejs2.ReactSortable,
998
+ ] }) : /* @__PURE__ */ jsx14(P2, { children: "It's always good to start with a clean slate. Use the sidebar to add content." }),
999
+ /* @__PURE__ */ jsx14(
1000
+ ReactSortable2,
1048
1001
  {
1049
1002
  list: widgets,
1050
1003
  setList: onChange,
1051
1004
  handle: "[data-drag]",
1052
1005
  direction: "horizontal",
1053
1006
  dragoverBubble: true,
1054
- children: widgets.map((widget) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1007
+ children: widgets.map((widget) => /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsxs9(
1055
1008
  ReorderDialogItem,
1056
1009
  {
1057
1010
  "data-drag": true,
1058
1011
  className: isSelected(widget.widgetId) ? "r-selected" : "",
1059
1012
  children: [
1060
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
1061
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1013
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", alignItems: "center" }, children: [
1014
+ /* @__PURE__ */ jsx14(
1062
1015
  "input",
1063
1016
  {
1064
1017
  type: "checkbox",
@@ -1071,8 +1024,8 @@ var ReorderDialog = ({
1071
1024
  checked: isSelected(widget.widgetId)
1072
1025
  }
1073
1026
  ),
1074
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1075
- import_ui12.H,
1027
+ /* @__PURE__ */ jsx14(
1028
+ H3,
1076
1029
  {
1077
1030
  size: "base",
1078
1031
  style: {
@@ -1083,7 +1036,7 @@ var ReorderDialog = ({
1083
1036
  }
1084
1037
  )
1085
1038
  ] }),
1086
- !isSelected(widget.widgetId) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1039
+ !isSelected(widget.widgetId) && /* @__PURE__ */ jsxs9(
1087
1040
  "div",
1088
1041
  {
1089
1042
  style: {
@@ -1091,8 +1044,8 @@ var ReorderDialog = ({
1091
1044
  alignItems: "center"
1092
1045
  },
1093
1046
  children: [
1094
- adminLibrary[widget.component] && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1095
- import_ui12.Button,
1047
+ adminLibrary[widget.component] && /* @__PURE__ */ jsx14(
1048
+ Button2,
1096
1049
  {
1097
1050
  type: "button",
1098
1051
  variant: "primary",
@@ -1103,8 +1056,8 @@ var ReorderDialog = ({
1103
1056
  children: "Edit"
1104
1057
  }
1105
1058
  ),
1106
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1107
- import_ui12.Button,
1059
+ /* @__PURE__ */ jsx14(
1060
+ Button2,
1108
1061
  {
1109
1062
  type: "button",
1110
1063
  variant: "danger",
@@ -1130,20 +1083,20 @@ var ReorderDialog = ({
1130
1083
  var ReorderDialog_default = ReorderDialog;
1131
1084
 
1132
1085
  // src/dialogs/SettingsDialog.js
1133
- var import_react22 = __toESM(require("react"));
1134
- var import_ui19 = require("@raketa-builder/ui");
1086
+ import React22 from "react";
1087
+ import { Tabs } from "@raketa-builder/ui";
1135
1088
 
1136
1089
  // src/contexts/BuilderContext.js
1137
- var import_react14 = __toESM(require("react"));
1138
- var BuilderContext = import_react14.default.createContext({
1090
+ import React14 from "react";
1091
+ var BuilderContext = React14.createContext({
1139
1092
  buttonStyles: [],
1140
1093
  containerAdmin: {}
1141
1094
  });
1142
1095
  var BuilderContext_default = BuilderContext;
1143
1096
 
1144
1097
  // src/AdminForm/index.js
1145
- var import_react21 = __toESM(require("react"));
1146
- var import_ui18 = require("@raketa-builder/ui");
1098
+ import React21 from "react";
1099
+ import { FieldSet } from "@raketa-builder/ui";
1147
1100
 
1148
1101
  // src/helpers/humanize.js
1149
1102
  var toUnderscore = (string) => string.replace(/([A-Z])/g, ($1) => `_${$1.toLowerCase()}`);
@@ -1154,12 +1107,12 @@ var capitalize = (s) => {
1154
1107
  };
1155
1108
 
1156
1109
  // src/List.js
1157
- var import_react15 = __toESM(require("react"));
1158
- var import_react_sortablejs3 = require("react-sortablejs");
1159
- var import_ui13 = require("@raketa-builder/ui");
1160
- var import_ui14 = require("@raketa-builder/ui");
1161
- var import_jsx_runtime15 = require("react/jsx-runtime");
1162
- var Handle = (props) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(HandleWrapper, { "data-drag": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1110
+ import React15 from "react";
1111
+ import { ReactSortable as ReactSortable3 } from "react-sortablejs";
1112
+ import { Button as Button3, P as P3, H as H4 } from "@raketa-builder/ui";
1113
+ import { cn as cn10 } from "@raketa-builder/ui";
1114
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1115
+ var Handle = (props) => /* @__PURE__ */ jsx15(HandleWrapper, { "data-drag": true, children: /* @__PURE__ */ jsx15(
1163
1116
  "img",
1164
1117
  __spreadProps(__spreadValues({}, props), {
1165
1118
  src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggMTguNUwxMiAyMi41TDE2IDE4LjUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik04IDYuNUwxMiAyLjVMMTYgNi41IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMi41VjIyLjUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",
@@ -1171,7 +1124,7 @@ var Handle = (props) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(HandleWrap
1171
1124
  alt: "handle"
1172
1125
  })
1173
1126
  ) });
1174
- var IconDelete = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1127
+ var IconDelete = () => /* @__PURE__ */ jsx15(
1175
1128
  "img",
1176
1129
  {
1177
1130
  src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdHJhc2giPjxwb2x5bGluZSBwb2ludHM9IjMgNiA1IDYgMjEgNiI+PC9wb2x5bGluZT48cGF0aCBkPSJNMTkgNnYxNGEyIDIgMCAwIDEtMiAySDdhMiAyIDAgMCAxLTItMlY2bTMgMFY0YTIgMiAwIDAgMSAyLTJoNGEyIDIgMCAwIDEgMiAydjIiPjwvcGF0aD48L3N2Zz4=",
@@ -1179,7 +1132,7 @@ var IconDelete = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1179
1132
  alt: "delete"
1180
1133
  }
1181
1134
  );
1182
- var IconDuplicate = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1135
+ var IconDuplicate = () => /* @__PURE__ */ jsx15(
1183
1136
  "img",
1184
1137
  {
1185
1138
  src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDguNUgxMEM4Ljg5NTQzIDguNSA4IDkuMzk1NDMgOCAxMC41VjIwLjVDOCAyMS42MDQ2IDguODk1NDMgMjIuNSAxMCAyMi41SDIwQzIxLjEwNDYgMjIuNSAyMiAyMS42MDQ2IDIyIDIwLjVWMTAuNUMyMiA5LjM5NTQzIDIxLjEwNDYgOC41IDIwIDguNVoiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik00IDE2LjVDMi45IDE2LjUgMiAxNS42IDIgMTQuNVY0LjVDMiAzLjQgMi45IDIuNSA0IDIuNUgxNEMxNS4xIDIuNSAxNiAzLjQgMTYgNC41IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",
@@ -1189,63 +1142,63 @@ var IconDuplicate = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1189
1142
  );
1190
1143
  var ListWrapper = (_a) => {
1191
1144
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1192
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadValues({ className: (0, import_ui14.cn)("r-reset", "r-list-wrapper", className) }, rest));
1145
+ return /* @__PURE__ */ jsx15("div", __spreadValues({ className: cn10("r-reset", "r-list-wrapper", className) }, rest));
1193
1146
  };
1194
1147
  var AddButtonWrapepr = (_a) => {
1195
1148
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1196
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1149
+ return /* @__PURE__ */ jsx15(
1197
1150
  "div",
1198
1151
  __spreadValues({
1199
- className: (0, import_ui14.cn)("r-reset", "r-list-add-button-wrapper", className)
1152
+ className: cn10("r-reset", "r-list-add-button-wrapper", className)
1200
1153
  }, rest)
1201
1154
  );
1202
1155
  };
1203
1156
  var HandleWrapper = (_a) => {
1204
1157
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1205
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1158
+ return /* @__PURE__ */ jsx15(
1206
1159
  "div",
1207
1160
  __spreadValues({
1208
- className: (0, import_ui14.cn)("r-reset", "r-list-handle-wrapper", className)
1161
+ className: cn10("r-reset", "r-list-handle-wrapper", className)
1209
1162
  }, rest)
1210
1163
  );
1211
1164
  };
1212
1165
  var ItemWrapper = (_a) => {
1213
1166
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1214
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadValues({ className: (0, import_ui14.cn)("r-reset", "r-list-item-wrapper", className) }, rest));
1167
+ return /* @__PURE__ */ jsx15("div", __spreadValues({ className: cn10("r-reset", "r-list-item-wrapper", className) }, rest));
1215
1168
  };
1216
1169
  var TitleBar = (_a) => {
1217
1170
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1218
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadValues({ className: (0, import_ui14.cn)("r-reset", "r-list-title-bar", className) }, rest));
1171
+ return /* @__PURE__ */ jsx15("div", __spreadValues({ className: cn10("r-reset", "r-list-title-bar", className) }, rest));
1219
1172
  };
1220
1173
  var TitleWrapper = (_a) => {
1221
1174
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1222
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadValues({ className: (0, import_ui14.cn)("r-reset", "r-list-title-wrapper", className) }, rest));
1175
+ return /* @__PURE__ */ jsx15("div", __spreadValues({ className: cn10("r-reset", "r-list-title-wrapper", className) }, rest));
1223
1176
  };
1224
1177
  var ContentWrapper = (_a) => {
1225
1178
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1226
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1179
+ return /* @__PURE__ */ jsx15(
1227
1180
  "div",
1228
1181
  __spreadValues({
1229
- className: (0, import_ui14.cn)("r-reset", className),
1182
+ className: cn10("r-reset", className),
1230
1183
  style: { padding: "12px 8px" }
1231
1184
  }, rest)
1232
1185
  );
1233
1186
  };
1234
1187
  var ListButton = (_a) => {
1235
1188
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1236
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1189
+ return /* @__PURE__ */ jsx15(
1237
1190
  "div",
1238
1191
  __spreadValues({
1239
- className: (0, import_ui14.cn)("r-reset", "r-button-reset r-list-button", className)
1192
+ className: cn10("r-reset", "r-button-reset r-list-button", className)
1240
1193
  }, rest)
1241
1194
  );
1242
1195
  };
1243
1196
  var Title = (_a) => {
1244
1197
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1245
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1198
+ return /* @__PURE__ */ jsx15(
1246
1199
  "div",
1247
1200
  __spreadValues({
1248
- className: (0, import_ui14.cn)("r-reset", className),
1201
+ className: cn10("r-reset", className),
1249
1202
  style: { fontWeight: "700", fontSize: "16px", minHeight: "16px" }
1250
1203
  }, rest)
1251
1204
  );
@@ -1275,36 +1228,36 @@ var Item = ({
1275
1228
  handleDuplicate,
1276
1229
  listItem
1277
1230
  }) => {
1278
- const [open, setOpen] = import_react15.default.useState(alwaysOpened);
1279
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ItemWrapper, { children: [
1280
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TitleBar, { children: [
1281
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Handle, {}),
1282
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TitleWrapper, { onClick: () => setOpen(!open), children: [
1283
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Title, { children: extractPrimaryField(primaryField2, item, idx) }),
1284
- !alwaysOpened && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ListButton, { type: "button" })
1231
+ const [open, setOpen] = React15.useState(alwaysOpened);
1232
+ return /* @__PURE__ */ jsxs10(ItemWrapper, { children: [
1233
+ /* @__PURE__ */ jsxs10(TitleBar, { children: [
1234
+ /* @__PURE__ */ jsx15(Handle, {}),
1235
+ /* @__PURE__ */ jsxs10(TitleWrapper, { onClick: () => setOpen(!open), children: [
1236
+ /* @__PURE__ */ jsx15(Title, { children: extractPrimaryField(primaryField2, item, idx) }),
1237
+ !alwaysOpened && /* @__PURE__ */ jsx15(ListButton, { type: "button" })
1285
1238
  ] }),
1286
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1239
+ /* @__PURE__ */ jsxs10(
1287
1240
  "div",
1288
1241
  {
1289
1242
  style: {
1290
1243
  display: "flex"
1291
1244
  },
1292
1245
  children: [
1293
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1246
+ /* @__PURE__ */ jsx15(
1294
1247
  ListButton,
1295
1248
  {
1296
1249
  type: "button",
1297
1250
  danger: true,
1298
1251
  onClick: () => handleDuplicate(item, idx),
1299
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconDuplicate, {})
1252
+ children: /* @__PURE__ */ jsx15(IconDuplicate, {})
1300
1253
  }
1301
1254
  ),
1302
- (template || !template && items.length !== 1) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ListButton, { type: "button", danger: true, onClick: () => handleRemove(idx), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconDelete, {}) })
1255
+ (template || !template && items.length !== 1) && /* @__PURE__ */ jsx15(ListButton, { type: "button", danger: true, onClick: () => handleRemove(idx), children: /* @__PURE__ */ jsx15(IconDelete, {}) })
1303
1256
  ]
1304
1257
  }
1305
1258
  )
1306
1259
  ] }),
1307
- (alwaysOpened || open) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContentWrapper, { children: listItem(
1260
+ (alwaysOpened || open) && /* @__PURE__ */ jsx15(ContentWrapper, { children: listItem(
1308
1261
  item,
1309
1262
  (field, value) => handleChangeField(idx, field, value),
1310
1263
  idx
@@ -1320,7 +1273,7 @@ var List = ({
1320
1273
  onChangeList,
1321
1274
  itemsAlwaysOpen = false
1322
1275
  }) => {
1323
- const [items, setItems] = import_react15.default.useState(defaultItems);
1276
+ const [items, setItems] = React15.useState(defaultItems);
1324
1277
  const factory = (template2) => {
1325
1278
  if (!template2) throw new Error("Template not specified for this list");
1326
1279
  return Object.assign({}, template2, { id: randomId() });
@@ -1360,12 +1313,12 @@ var List = ({
1360
1313
  };
1361
1314
  if (!primaryField2) console.warn("No primaryField provided for a list", items);
1362
1315
  if (!label) console.warn("No label provided for a list", items);
1363
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ListWrapper, { children: [
1364
- label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui13.H, { size: "base", style: { fontWeight: 700 }, children: label }),
1365
- items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui13.P, { children: "There are no items yet." }),
1366
- items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react15.default.Fragment, { children: [
1367
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AddButtonWrapepr, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1368
- import_ui13.Button,
1316
+ return /* @__PURE__ */ jsxs10(ListWrapper, { children: [
1317
+ label && /* @__PURE__ */ jsx15(H4, { size: "base", style: { fontWeight: 700 }, children: label }),
1318
+ items.length === 0 && /* @__PURE__ */ jsx15(P3, { children: "There are no items yet." }),
1319
+ items.length > 0 && /* @__PURE__ */ jsxs10(React15.Fragment, { children: [
1320
+ /* @__PURE__ */ jsx15(AddButtonWrapepr, { children: /* @__PURE__ */ jsx15(
1321
+ Button3,
1369
1322
  {
1370
1323
  type: "button",
1371
1324
  variant: "success",
@@ -1373,15 +1326,15 @@ var List = ({
1373
1326
  children: "Add item"
1374
1327
  }
1375
1328
  ) }),
1376
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1377
- import_react_sortablejs3.ReactSortable,
1329
+ /* @__PURE__ */ jsx15(
1330
+ ReactSortable3,
1378
1331
  {
1379
1332
  list: items,
1380
1333
  setList: handleReorder,
1381
1334
  handle: "[data-drag]",
1382
1335
  direction: "horizontal",
1383
1336
  dragoverBubble: true,
1384
- children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1337
+ children: items.map((item, idx) => /* @__PURE__ */ jsx15(
1385
1338
  Item,
1386
1339
  {
1387
1340
  "data-id": idx,
@@ -1401,27 +1354,27 @@ var List = ({
1401
1354
  }
1402
1355
  )
1403
1356
  ] }),
1404
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui13.Button, { type: "button", variant: "success", onClick: handleAdd, children: "Add item" })
1357
+ /* @__PURE__ */ jsx15(Button3, { type: "button", variant: "success", onClick: handleAdd, children: "Add item" })
1405
1358
  ] });
1406
1359
  };
1407
1360
  var List_default = List;
1408
1361
 
1409
1362
  // src/AdminForm/SimpleInput.js
1410
- var import_react20 = __toESM(require("react"));
1363
+ import React20 from "react";
1411
1364
 
1412
1365
  // src/forms/TextArea.js
1413
- var import_react16 = __toESM(require("react"));
1414
- var import_jsx_runtime16 = require("react/jsx-runtime");
1366
+ import React16 from "react";
1367
+ import { jsx as jsx16 } from "react/jsx-runtime";
1415
1368
  function TextArea(_a) {
1416
1369
  var _b = _a, { value = "", placeholder = "" } = _b, rest = __objRest(_b, ["value", "placeholder"]);
1417
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TextInput_default, __spreadValues({ multiline: true, value, placeholder }, rest));
1370
+ return /* @__PURE__ */ jsx16(TextInput_default, __spreadValues({ multiline: true, value, placeholder }, rest));
1418
1371
  }
1419
1372
  var TextArea_default = TextArea;
1420
1373
 
1421
1374
  // src/forms/SelectMenu.js
1422
- var import_react17 = __toESM(require("react"));
1423
- var import_ui15 = require("@raketa-builder/ui");
1424
- var import_jsx_runtime17 = require("react/jsx-runtime");
1375
+ import React17 from "react";
1376
+ import { FormGroup as FormGroup2, Label as Label2, Select, Hint as Hint2 } from "@raketa-builder/ui";
1377
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1425
1378
  var getOptions = (options, placeholder) => {
1426
1379
  const initialOptions = placeholder ? [{ value: "", text: placeholder }] : [];
1427
1380
  const preparedOptions = options.map((o) => ({ value: o[0], text: o[1] }));
@@ -1436,21 +1389,21 @@ var SelectField = (props) => {
1436
1389
  delete inputProps.options;
1437
1390
  delete inputProps.placeholder;
1438
1391
  delete inputProps.onChange;
1439
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_ui15.FormGroup, { children: [
1440
- label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui15.Label, { htmlFor: id, error: props.error, children: label }) : "",
1441
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1442
- import_ui15.Select,
1392
+ return /* @__PURE__ */ jsxs11(FormGroup2, { children: [
1393
+ label ? /* @__PURE__ */ jsx17(Label2, { htmlFor: id, error: props.error, children: label }) : "",
1394
+ /* @__PURE__ */ jsxs11(
1395
+ Select,
1443
1396
  __spreadProps(__spreadValues({
1444
1397
  id,
1445
1398
  onChange: (e) => onChange(e.target.value)
1446
1399
  }, inputProps), {
1447
1400
  children: [
1448
- placeholder ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: null, children: placeholder }, "placeholder") : "",
1449
- options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: o.value, children: o.text }, o.value))
1401
+ placeholder ? /* @__PURE__ */ jsx17("option", { value: null, children: placeholder }, "placeholder") : "",
1402
+ options.map((o) => /* @__PURE__ */ jsx17("option", { value: o.value, children: o.text }, o.value))
1450
1403
  ]
1451
1404
  })
1452
1405
  ),
1453
- hint ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui15.Hint, { children: hint }) : ""
1406
+ hint ? /* @__PURE__ */ jsx17(Hint2, { children: hint }) : ""
1454
1407
  ] });
1455
1408
  };
1456
1409
  var SelectMenu = ({
@@ -1459,7 +1412,7 @@ var SelectMenu = ({
1459
1412
  placeholder = "Please select...",
1460
1413
  onChange,
1461
1414
  value = ""
1462
- }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1415
+ }) => /* @__PURE__ */ jsx17(
1463
1416
  SelectField,
1464
1417
  {
1465
1418
  label,
@@ -1471,23 +1424,23 @@ var SelectMenu = ({
1471
1424
  var SelectMenu_default = SelectMenu;
1472
1425
 
1473
1426
  // src/forms/ButtonSettings.js
1474
- var import_react18 = __toESM(require("react"));
1475
- var import_ui16 = require("@raketa-builder/ui");
1476
- var import_jsx_runtime18 = require("react/jsx-runtime");
1427
+ import React18 from "react";
1428
+ import { Hint as Hint3, FormGroup as FormGroup3, cn as cn11 } from "@raketa-builder/ui";
1429
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1477
1430
  var SettingsIcon = (_a) => {
1478
1431
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1479
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", __spreadValues({ className: (0, import_ui16.cn)("r-settings-icon", className) }, props));
1432
+ return /* @__PURE__ */ jsx18("div", __spreadValues({ className: cn11("r-settings-icon", className) }, props));
1480
1433
  };
1481
1434
  var ThreeColumns = (_a) => {
1482
1435
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1483
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", __spreadValues({ className: (0, import_ui16.cn)("r-reset", "r-three-columns", className) }, props));
1436
+ return /* @__PURE__ */ jsx18("div", __spreadValues({ className: cn11("r-reset", "r-three-columns", className) }, props));
1484
1437
  };
1485
1438
  var FormSectionTitle = (_a) => {
1486
1439
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1487
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1440
+ return /* @__PURE__ */ jsx18(
1488
1441
  "div",
1489
1442
  __spreadValues({
1490
- className: (0, import_ui16.cn)("r-reset", "r-form-section-title", className)
1443
+ className: cn11("r-reset", "r-form-section-title", className)
1491
1444
  }, props)
1492
1445
  );
1493
1446
  };
@@ -1511,15 +1464,15 @@ var ButtonSettings = ({
1511
1464
  value = DEFAULTS,
1512
1465
  onChange
1513
1466
  }) => {
1514
- const { buttonStyles } = import_react18.default.useContext(BuilderContext_default) || DEFAULT_BUTTON_STYLES;
1515
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui16.FormGroup, { children: [
1516
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FormSectionTitle, { children: [
1517
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SettingsIcon, {}),
1467
+ const { buttonStyles } = React18.useContext(BuilderContext_default) || DEFAULT_BUTTON_STYLES;
1468
+ return /* @__PURE__ */ jsxs12(FormGroup3, { children: [
1469
+ /* @__PURE__ */ jsxs12(FormSectionTitle, { children: [
1470
+ /* @__PURE__ */ jsx18(SettingsIcon, {}),
1518
1471
  " ",
1519
1472
  label
1520
1473
  ] }),
1521
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ThreeColumns, { children: [
1522
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1474
+ /* @__PURE__ */ jsxs12(ThreeColumns, { children: [
1475
+ /* @__PURE__ */ jsx18(
1523
1476
  TextInput_default,
1524
1477
  {
1525
1478
  label: "Label",
@@ -1527,7 +1480,7 @@ var ButtonSettings = ({
1527
1480
  onChange: (label2) => onChange(mergeSettings(value, "label", label2))
1528
1481
  }
1529
1482
  ),
1530
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1483
+ /* @__PURE__ */ jsx18(
1531
1484
  TextInput_default,
1532
1485
  {
1533
1486
  label: "Link",
@@ -1535,7 +1488,7 @@ var ButtonSettings = ({
1535
1488
  onChange: (link) => onChange(mergeSettings(value, "link", link))
1536
1489
  }
1537
1490
  ),
1538
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1491
+ /* @__PURE__ */ jsx18(
1539
1492
  TextInput_default,
1540
1493
  {
1541
1494
  label: "ID",
@@ -1544,8 +1497,8 @@ var ButtonSettings = ({
1544
1497
  }
1545
1498
  )
1546
1499
  ] }),
1547
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ThreeColumns, { children: [
1548
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1500
+ /* @__PURE__ */ jsxs12(ThreeColumns, { children: [
1501
+ /* @__PURE__ */ jsx18(
1549
1502
  SelectMenu_default,
1550
1503
  {
1551
1504
  label: "Type",
@@ -1554,7 +1507,7 @@ var ButtonSettings = ({
1554
1507
  onChange: (type) => onChange(mergeSettings(value, "type", type))
1555
1508
  }
1556
1509
  ),
1557
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1510
+ /* @__PURE__ */ jsx18(
1558
1511
  SelectMenu_default,
1559
1512
  {
1560
1513
  label: "Target",
@@ -1566,7 +1519,7 @@ var ButtonSettings = ({
1566
1519
  onChange: (target) => onChange(mergeSettings(value, "target", target))
1567
1520
  }
1568
1521
  ),
1569
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1522
+ /* @__PURE__ */ jsx18(
1570
1523
  SelectMenu_default,
1571
1524
  {
1572
1525
  label: "Follow Link",
@@ -1579,7 +1532,7 @@ var ButtonSettings = ({
1579
1532
  }
1580
1533
  )
1581
1534
  ] }),
1582
- hint ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui16.Hint, { children: hint }) : ""
1535
+ hint ? /* @__PURE__ */ jsx18(Hint3, { children: hint }) : ""
1583
1536
  ] });
1584
1537
  };
1585
1538
  ButtonSettings.defaults = DEFAULTS;
@@ -1587,23 +1540,23 @@ ButtonSettings.defaultButtonStyles = DEFAULT_BUTTON_STYLES;
1587
1540
  var ButtonSettings_default = ButtonSettings;
1588
1541
 
1589
1542
  // src/forms/LinkSettings.js
1590
- var import_react19 = __toESM(require("react"));
1591
- var import_ui17 = require("@raketa-builder/ui");
1592
- var import_jsx_runtime19 = require("react/jsx-runtime");
1543
+ import React19 from "react";
1544
+ import { Hint as Hint4, FormGroup as FormGroup4, cn as cn12 } from "@raketa-builder/ui";
1545
+ import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1593
1546
  var SettingsIcon2 = (_a) => {
1594
1547
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1595
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", __spreadValues({ className: (0, import_ui17.cn)("r-settings-icon", className) }, props));
1548
+ return /* @__PURE__ */ jsx19("div", __spreadValues({ className: cn12("r-settings-icon", className) }, props));
1596
1549
  };
1597
1550
  var ThreeColumns2 = (_a) => {
1598
1551
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1599
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", __spreadValues({ className: (0, import_ui17.cn)("r-reset", "r-three-columns", className) }, props));
1552
+ return /* @__PURE__ */ jsx19("div", __spreadValues({ className: cn12("r-reset", "r-three-columns", className) }, props));
1600
1553
  };
1601
1554
  var FormSectionTitle2 = (_a) => {
1602
1555
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1603
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1556
+ return /* @__PURE__ */ jsx19(
1604
1557
  "div",
1605
1558
  __spreadValues({
1606
- className: (0, import_ui17.cn)("r-reset", "r-form-section-title", className)
1559
+ className: cn12("r-reset", "r-form-section-title", className)
1607
1560
  }, props)
1608
1561
  );
1609
1562
  };
@@ -1616,14 +1569,14 @@ var DEFAULTS2 = {
1616
1569
  target: "_self",
1617
1570
  rel: "follow"
1618
1571
  };
1619
- var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui17.FormGroup, { children: [
1620
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormSectionTitle2, { children: [
1621
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SettingsIcon2, {}),
1572
+ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /* @__PURE__ */ jsxs13(FormGroup4, { children: [
1573
+ /* @__PURE__ */ jsxs13(FormSectionTitle2, { children: [
1574
+ /* @__PURE__ */ jsx19(SettingsIcon2, {}),
1622
1575
  " ",
1623
1576
  label
1624
1577
  ] }),
1625
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ThreeColumns2, { children: [
1626
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1578
+ /* @__PURE__ */ jsxs13(ThreeColumns2, { children: [
1579
+ /* @__PURE__ */ jsx19(
1627
1580
  TextInput_default,
1628
1581
  {
1629
1582
  label: "Label",
@@ -1631,7 +1584,7 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1631
1584
  onChange: (label2) => onChange(mergeSettings2(value, "label", label2))
1632
1585
  }
1633
1586
  ),
1634
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1587
+ /* @__PURE__ */ jsx19(
1635
1588
  TextInput_default,
1636
1589
  {
1637
1590
  label: "Link",
@@ -1639,7 +1592,7 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1639
1592
  onChange: (link) => onChange(mergeSettings2(value, "link", link))
1640
1593
  }
1641
1594
  ),
1642
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1595
+ /* @__PURE__ */ jsx19(
1643
1596
  TextInput_default,
1644
1597
  {
1645
1598
  label: "ID",
@@ -1648,8 +1601,8 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1648
1601
  }
1649
1602
  )
1650
1603
  ] }),
1651
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ThreeColumns2, { children: [
1652
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1604
+ /* @__PURE__ */ jsxs13(ThreeColumns2, { children: [
1605
+ /* @__PURE__ */ jsx19(
1653
1606
  TextInput_default,
1654
1607
  {
1655
1608
  label: "CSS Class",
@@ -1657,7 +1610,7 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1657
1610
  onChange: (className) => onChange(mergeSettings2(value, "className", className))
1658
1611
  }
1659
1612
  ),
1660
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1613
+ /* @__PURE__ */ jsx19(
1661
1614
  SelectMenu_default,
1662
1615
  {
1663
1616
  label: "Target",
@@ -1669,7 +1622,7 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1669
1622
  onChange: (target) => onChange(mergeSettings2(value, "target", target))
1670
1623
  }
1671
1624
  ),
1672
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1625
+ /* @__PURE__ */ jsx19(
1673
1626
  SelectMenu_default,
1674
1627
  {
1675
1628
  label: "Follow Link",
@@ -1682,13 +1635,13 @@ var LinkSettings = ({ label = "Link", hint, value = DEFAULTS2, onChange }) => /*
1682
1635
  }
1683
1636
  )
1684
1637
  ] }),
1685
- hint ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui17.Hint, { children: hint }) : ""
1638
+ hint ? /* @__PURE__ */ jsx19(Hint4, { children: hint }) : ""
1686
1639
  ] });
1687
1640
  LinkSettings.defaults = DEFAULTS2;
1688
1641
  var LinkSettings_default = LinkSettings;
1689
1642
 
1690
1643
  // src/AdminForm/SimpleInput.js
1691
- var import_jsx_runtime20 = require("react/jsx-runtime");
1644
+ import { jsx as jsx20 } from "react/jsx-runtime";
1692
1645
  var FIELDS_MAPPING = {
1693
1646
  text: TextInput_default,
1694
1647
  textarea: TextArea_default,
@@ -1701,15 +1654,15 @@ function fetchComponent(opts) {
1701
1654
  }
1702
1655
  var SimpleInput = ({ label, value, opts, onChange }) => {
1703
1656
  const Component2 = fetchComponent(opts);
1704
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Component2, __spreadValues({ label, value, onChange }, opts));
1657
+ return /* @__PURE__ */ jsx20(Component2, __spreadValues({ label, value, onChange }, opts));
1705
1658
  };
1706
1659
  var SimpleInput_default = SimpleInput;
1707
1660
 
1708
1661
  // src/AdminForm/index.js
1709
- var import_jsx_runtime21 = require("react/jsx-runtime");
1662
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1710
1663
  var ListWrapper2 = ({ field, path, value, opts, onChange }) => {
1711
1664
  const { label, template, primaryField: primaryField2, itemsAlwaysOpen = false } = opts;
1712
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1665
+ return /* @__PURE__ */ jsx21(
1713
1666
  List_default,
1714
1667
  {
1715
1668
  label,
@@ -1720,7 +1673,7 @@ var ListWrapper2 = ({ field, path, value, opts, onChange }) => {
1720
1673
  { label: capitalize(humanize(subField)) },
1721
1674
  opts.schema[subField]
1722
1675
  );
1723
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1676
+ return /* @__PURE__ */ jsx21(
1724
1677
  FormField,
1725
1678
  {
1726
1679
  path: `${path}.${subField}`,
@@ -1740,12 +1693,12 @@ var ListWrapper2 = ({ field, path, value, opts, onChange }) => {
1740
1693
  }
1741
1694
  );
1742
1695
  };
1743
- var SchemaInput = ({ field, value, path, opts, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui18.FieldSet, { legend: opts == null ? void 0 : opts.label, children: Object.keys(opts.schema).map((subField) => {
1696
+ var SchemaInput = ({ field, value, path, opts, onChange }) => /* @__PURE__ */ jsx21(FieldSet, { legend: opts == null ? void 0 : opts.label, children: Object.keys(opts.schema).map((subField) => {
1744
1697
  const subOpts = Object.assign(
1745
1698
  { label: capitalize(humanize(subField)) },
1746
1699
  opts.schema[subField]
1747
1700
  );
1748
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1701
+ return /* @__PURE__ */ jsx21(
1749
1702
  FormField,
1750
1703
  {
1751
1704
  path: `${path}.${subField}`,
@@ -1777,7 +1730,7 @@ function fetchComponent2(opts) {
1777
1730
  var FormField = ({ field, value, path, opts, onChange }) => {
1778
1731
  const Component2 = fetchComponent2(opts);
1779
1732
  if (!Component2) {
1780
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1733
+ return /* @__PURE__ */ jsxs14(
1781
1734
  "p",
1782
1735
  {
1783
1736
  style: {
@@ -1785,16 +1738,16 @@ var FormField = ({ field, value, path, opts, onChange }) => {
1785
1738
  },
1786
1739
  children: [
1787
1740
  "Component of type ",
1788
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: opts.type }),
1741
+ /* @__PURE__ */ jsx21("strong", { children: opts.type }),
1789
1742
  " for",
1790
1743
  " ",
1791
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: field }),
1744
+ /* @__PURE__ */ jsx21("strong", { children: field }),
1792
1745
  " does not exist!"
1793
1746
  ]
1794
1747
  }
1795
1748
  );
1796
1749
  }
1797
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1750
+ return /* @__PURE__ */ jsx21(
1798
1751
  Component2,
1799
1752
  {
1800
1753
  label: opts.label,
@@ -1819,7 +1772,7 @@ var AdminForm = ({ schema = {}, value = {}, onChange }) => {
1819
1772
  { label: capitalize(humanize(field)) },
1820
1773
  schema[field]
1821
1774
  );
1822
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1775
+ return /* @__PURE__ */ jsx21(
1823
1776
  FormField,
1824
1777
  {
1825
1778
  path: field,
@@ -1835,10 +1788,10 @@ var AdminForm = ({ schema = {}, value = {}, onChange }) => {
1835
1788
  var AdminForm_default = AdminForm;
1836
1789
 
1837
1790
  // src/dialogs/SettingsDialog.js
1838
- var import_jsx_runtime22 = require("react/jsx-runtime");
1791
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1839
1792
  var SettingsDialog = ({ widget, settings, onSave, onClose }) => {
1840
- const { containerAdmin } = import_react22.default.useContext(BuilderContext_default);
1841
- const [localSettings, setLocalSettings] = import_react22.default.useState(settings);
1793
+ const { containerAdmin } = React22.useContext(BuilderContext_default);
1794
+ const [localSettings, setLocalSettings] = React22.useState(settings);
1842
1795
  const handleChangeContainer = (value) => {
1843
1796
  setLocalSettings(__spreadProps(__spreadValues({}, localSettings), { containerSettings: __spreadValues({}, value) }));
1844
1797
  };
@@ -1851,7 +1804,7 @@ var SettingsDialog = ({ widget, settings, onSave, onClose }) => {
1851
1804
  );
1852
1805
  }
1853
1806
  const areChanges = JSON.stringify(settings) !== JSON.stringify(localSettings);
1854
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1807
+ return /* @__PURE__ */ jsx22(
1855
1808
  Dialog_default,
1856
1809
  {
1857
1810
  open: true,
@@ -1860,8 +1813,8 @@ var SettingsDialog = ({ widget, settings, onSave, onClose }) => {
1860
1813
  onPrimary: () => onSave(localSettings),
1861
1814
  onClose,
1862
1815
  areChanges,
1863
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_ui19.Tabs, { children: [
1864
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { title: "Content", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1816
+ children: /* @__PURE__ */ jsxs15(Tabs, { children: [
1817
+ /* @__PURE__ */ jsx22("div", { title: "Content", children: /* @__PURE__ */ jsx22(
1865
1818
  AdminForm_default,
1866
1819
  {
1867
1820
  schema,
@@ -1869,7 +1822,7 @@ var SettingsDialog = ({ widget, settings, onSave, onClose }) => {
1869
1822
  onChange: (newValue) => setLocalSettings(__spreadValues({}, newValue))
1870
1823
  }
1871
1824
  ) }),
1872
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { title: "Container", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1825
+ /* @__PURE__ */ jsx22("div", { title: "Container", children: /* @__PURE__ */ jsx22(
1873
1826
  AdminForm_default,
1874
1827
  {
1875
1828
  schema: containerAdmin,
@@ -1884,11 +1837,11 @@ var SettingsDialog = ({ widget, settings, onSave, onClose }) => {
1884
1837
  var SettingsDialog_default = SettingsDialog;
1885
1838
 
1886
1839
  // src/lib/SelectedWidgetsToolbar.js
1887
- var import_react23 = __toESM(require("react"));
1840
+ import React23 from "react";
1888
1841
 
1889
1842
  // src/icons/IconCopy.js
1890
- var import_jsx_runtime23 = require("react/jsx-runtime");
1891
- var IconCopy = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1843
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1844
+ var IconCopy = () => /* @__PURE__ */ jsxs16(
1892
1845
  "svg",
1893
1846
  {
1894
1847
  xmlns: "http://www.w3.org/2000/svg",
@@ -1897,8 +1850,8 @@ var IconCopy = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1897
1850
  viewBox: "0 0 16 16",
1898
1851
  fill: "none",
1899
1852
  children: [
1900
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("g", { clipPath: "url(#clip0_2312_498)", children: [
1901
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1853
+ /* @__PURE__ */ jsxs16("g", { clipPath: "url(#clip0_2312_498)", children: [
1854
+ /* @__PURE__ */ jsx23(
1902
1855
  "path",
1903
1856
  {
1904
1857
  d: "M13.3334 5.33331H6.66671C5.93033 5.33331 5.33337 5.93027 5.33337 6.66665V13.3333C5.33337 14.0697 5.93033 14.6666 6.66671 14.6666H13.3334C14.0698 14.6666 14.6667 14.0697 14.6667 13.3333V6.66665C14.6667 5.93027 14.0698 5.33331 13.3334 5.33331Z",
@@ -1908,7 +1861,7 @@ var IconCopy = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1908
1861
  strokeLinejoin: "round"
1909
1862
  }
1910
1863
  ),
1911
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1864
+ /* @__PURE__ */ jsx23(
1912
1865
  "path",
1913
1866
  {
1914
1867
  d: "M2.66671 10.6666C1.93337 10.6666 1.33337 10.0666 1.33337 9.33331V2.66665C1.33337 1.93331 1.93337 1.33331 2.66671 1.33331H9.33337C10.0667 1.33331 10.6667 1.93331 10.6667 2.66665",
@@ -1919,15 +1872,15 @@ var IconCopy = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1919
1872
  }
1920
1873
  )
1921
1874
  ] }),
1922
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("clipPath", { id: "clip0_2312_498", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
1875
+ /* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsx23("clipPath", { id: "clip0_2312_498", children: /* @__PURE__ */ jsx23("rect", { width: "16", height: "16", fill: "white" }) }) })
1923
1876
  ]
1924
1877
  }
1925
1878
  );
1926
1879
  var IconCopy_default = IconCopy;
1927
1880
 
1928
1881
  // src/icons/IconDelete.js
1929
- var import_jsx_runtime24 = require("react/jsx-runtime");
1930
- var IconDelete2 = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1882
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1883
+ var IconDelete2 = () => /* @__PURE__ */ jsxs17(
1931
1884
  "svg",
1932
1885
  {
1933
1886
  xmlns: "http://www.w3.org/2000/svg",
@@ -1936,7 +1889,7 @@ var IconDelete2 = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1936
1889
  viewBox: "0 0 16 16",
1937
1890
  fill: "none",
1938
1891
  children: [
1939
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1892
+ /* @__PURE__ */ jsx24(
1940
1893
  "path",
1941
1894
  {
1942
1895
  d: "M2 4H14",
@@ -1946,7 +1899,7 @@ var IconDelete2 = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1946
1899
  strokeLinejoin: "round"
1947
1900
  }
1948
1901
  ),
1949
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1902
+ /* @__PURE__ */ jsx24(
1950
1903
  "path",
1951
1904
  {
1952
1905
  d: "M12.6667 4V13.3333C12.6667 14 12 14.6667 11.3334 14.6667H4.66671C4.00004 14.6667 3.33337 14 3.33337 13.3333V4",
@@ -1956,7 +1909,7 @@ var IconDelete2 = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1956
1909
  strokeLinejoin: "round"
1957
1910
  }
1958
1911
  ),
1959
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1912
+ /* @__PURE__ */ jsx24(
1960
1913
  "path",
1961
1914
  {
1962
1915
  d: "M5.33337 3.99998V2.66665C5.33337 1.99998 6.00004 1.33331 6.66671 1.33331H9.33337C10 1.33331 10.6667 1.99998 10.6667 2.66665V3.99998",
@@ -1972,30 +1925,30 @@ var IconDelete2 = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1972
1925
  var IconDelete_default = IconDelete2;
1973
1926
 
1974
1927
  // src/lib/SelectedWidgetsToolbar.js
1975
- var import_jsx_runtime25 = require("react/jsx-runtime");
1976
- var SelectedWidgetsToolbar = ({ length, onRemove, onCopy }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "r-selected-widgets-toolbar", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "r-toolbar-inner", children: [
1977
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1928
+ import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
1929
+ var SelectedWidgetsToolbar = ({ length, onRemove, onCopy }) => /* @__PURE__ */ jsx25("div", { className: "r-selected-widgets-toolbar", children: /* @__PURE__ */ jsxs18("div", { className: "r-toolbar-inner", children: [
1930
+ /* @__PURE__ */ jsxs18(
1978
1931
  "button",
1979
1932
  {
1980
1933
  type: "button",
1981
1934
  className: "r-button-reset r-toolbar-button r-toolbar-button-copy",
1982
1935
  onClick: onCopy,
1983
1936
  children: [
1984
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconCopy_default, {}),
1937
+ /* @__PURE__ */ jsx25(IconCopy_default, {}),
1985
1938
  "Copy selected (",
1986
1939
  length,
1987
1940
  ")"
1988
1941
  ]
1989
1942
  }
1990
1943
  ),
1991
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1944
+ /* @__PURE__ */ jsxs18(
1992
1945
  "button",
1993
1946
  {
1994
1947
  type: "button",
1995
1948
  className: "r-button-reset r-toolbar-button r-toolbar-button-delete",
1996
1949
  onClick: onRemove,
1997
1950
  children: [
1998
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconDelete_default, {}),
1951
+ /* @__PURE__ */ jsx25(IconDelete_default, {}),
1999
1952
  "Delete selected"
2000
1953
  ]
2001
1954
  }
@@ -2004,17 +1957,17 @@ var SelectedWidgetsToolbar = ({ length, onRemove, onCopy }) => /* @__PURE__ */ (
2004
1957
  var SelectedWidgetsToolbar_default = SelectedWidgetsToolbar;
2005
1958
 
2006
1959
  // src/AutoSaveNotification.js
2007
- var import_react24 = __toESM(require("react"));
2008
- var import_jsx_runtime26 = require("react/jsx-runtime");
1960
+ import React24 from "react";
1961
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
2009
1962
  var Notification = ({ text }) => {
2010
- const [show, setShow] = import_react24.default.useState(true);
1963
+ const [show, setShow] = React24.useState(true);
2011
1964
  setTimeout(() => {
2012
1965
  setShow(false);
2013
1966
  }, 3e3);
2014
1967
  if (show) {
2015
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "r-autosave-notification", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "r-autosave-wrapper", children: [
2016
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "r-autosave-text", children: text || "Revision saved" }),
2017
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "r-autosave-flash" })
1968
+ return /* @__PURE__ */ jsx26("div", { className: "r-autosave-notification", children: /* @__PURE__ */ jsxs19("div", { className: "r-autosave-wrapper", children: [
1969
+ /* @__PURE__ */ jsx26("div", { className: "r-autosave-text", children: text || "Revision saved" }),
1970
+ /* @__PURE__ */ jsx26("div", { className: "r-autosave-flash" })
2018
1971
  ] }) });
2019
1972
  }
2020
1973
  return null;
@@ -2022,7 +1975,7 @@ var Notification = ({ text }) => {
2022
1975
  var AutoSaveNotification_default = Notification;
2023
1976
 
2024
1977
  // src/PageBuilder.js
2025
- var import_jsx_runtime27 = require("react/jsx-runtime");
1978
+ import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
2026
1979
  var saveToLocalStorage = (identifier, widgets) => window.localStorage.setItem(
2027
1980
  `clipboard\u2013${identifier}`,
2028
1981
  JSON.stringify(widgets)
@@ -2055,14 +2008,14 @@ var PageBuilder = ({
2055
2008
  canvasClassName = "",
2056
2009
  notifications
2057
2010
  }) => {
2058
- const [page, setPage] = import_react25.default.useState(initialPage);
2059
- const [preloadedData, setPreloadedData] = import_react25.default.useState(preloaded);
2060
- const [pageHistory, setPageHistory] = import_react25.default.useState([initialPage]);
2061
- const [historyIndex, setHistoryIndex] = import_react25.default.useState(0);
2062
- const [selectedWidget, setSelectedWidget] = import_react25.default.useState(null);
2063
- const [reorderOpen, setReorderOpen] = import_react25.default.useState(false);
2064
- const [selectedWidgets, setSelectedWidgets] = import_react25.default.useState([]);
2065
- const [numberOfCopies, setNumberOfCopies] = import_react25.default.useState(0);
2011
+ const [page, setPage] = React25.useState(initialPage);
2012
+ const [preloadedData, setPreloadedData] = React25.useState(preloaded);
2013
+ const [pageHistory, setPageHistory] = React25.useState([initialPage]);
2014
+ const [historyIndex, setHistoryIndex] = React25.useState(0);
2015
+ const [selectedWidget, setSelectedWidget] = React25.useState(null);
2016
+ const [reorderOpen, setReorderOpen] = React25.useState(false);
2017
+ const [selectedWidgets, setSelectedWidgets] = React25.useState([]);
2018
+ const [numberOfCopies, setNumberOfCopies] = React25.useState(0);
2066
2019
  const handleUndoChanges = () => {
2067
2020
  const newPage = pageHistory[historyIndex - 1];
2068
2021
  if (historyIndex > 0) setHistoryIndex(historyIndex - 1);
@@ -2248,12 +2201,12 @@ var PageBuilder = ({
2248
2201
  chosen: false,
2249
2202
  selected: false
2250
2203
  }));
2251
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HostContext_default.Provider, { value: { host }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(LibraryContext_default.Provider, { value: { library, adminLibrary }, children: [
2204
+ return /* @__PURE__ */ jsx27(HostContext_default.Provider, { value: { host }, children: /* @__PURE__ */ jsxs20(LibraryContext_default.Provider, { value: { library, adminLibrary }, children: [
2252
2205
  notifications.length > 0 && notifications.map((notif) => {
2253
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AutoSaveNotification_default, __spreadValues({}, notif), notif.id);
2206
+ return /* @__PURE__ */ jsx27(AutoSaveNotification_default, __spreadValues({}, notif), notif.id);
2254
2207
  }),
2255
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { paddingLeft: "64px" }, children: [
2256
- !reorderOpen && selectedWidgets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2208
+ /* @__PURE__ */ jsxs20("div", { style: { paddingLeft: "64px" }, children: [
2209
+ !reorderOpen && selectedWidgets.length > 0 && /* @__PURE__ */ jsx27(
2257
2210
  SelectedWidgetsToolbar_default,
2258
2211
  {
2259
2212
  length: selectedWidgets.length,
@@ -2261,7 +2214,7 @@ var PageBuilder = ({
2261
2214
  onRemove: handleRemoveMultiple
2262
2215
  }
2263
2216
  ),
2264
- reorderOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2217
+ reorderOpen && /* @__PURE__ */ jsx27(
2265
2218
  ReorderDialog_default,
2266
2219
  {
2267
2220
  widgets: sortableWidgets,
@@ -2276,7 +2229,7 @@ var PageBuilder = ({
2276
2229
  onSelectAll: handleSelectAll
2277
2230
  }
2278
2231
  ),
2279
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2232
+ /* @__PURE__ */ jsx27(
2280
2233
  AdminSidebar_default,
2281
2234
  {
2282
2235
  languageSwitcherSettings,
@@ -2293,7 +2246,7 @@ var PageBuilder = ({
2293
2246
  clipboardCopiesCount: numberOfCopies
2294
2247
  }
2295
2248
  ),
2296
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2249
+ /* @__PURE__ */ jsx27(
2297
2250
  Canvas_default,
2298
2251
  {
2299
2252
  widgets: sortableWidgets,
@@ -2306,7 +2259,7 @@ var PageBuilder = ({
2306
2259
  canvasClassName
2307
2260
  }
2308
2261
  ),
2309
- selectedWidget && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2262
+ selectedWidget && /* @__PURE__ */ jsx27(
2310
2263
  SettingsDialog_default,
2311
2264
  {
2312
2265
  widget: currentWidget,
@@ -2321,8 +2274,8 @@ var PageBuilder = ({
2321
2274
  var PageBuilder_default = PageBuilder;
2322
2275
 
2323
2276
  // src/lib/Image.js
2324
- var import_react26 = __toESM(require("react"));
2325
- var import_jsx_runtime28 = require("react/jsx-runtime");
2277
+ import React26 from "react";
2278
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
2326
2279
  var getWebp = (url) => {
2327
2280
  if (!url) return null;
2328
2281
  const segments = url.split(".");
@@ -2397,10 +2350,10 @@ var Image = (_a) => {
2397
2350
  const [width, height] = getDimensions(imageObjOrSrc, variant);
2398
2351
  const altAttr = alt || getAlt(src);
2399
2352
  const [webp, fallback] = getSrc(imageObjOrSrc, variant);
2400
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("picture", { children: [
2401
- webp && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("source", { srcSet: encodeURI(webp), type: "image/webp" }),
2402
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("source", { srcSet: encodeURI(fallback), type: src.mime_type }),
2403
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2353
+ return /* @__PURE__ */ jsxs21("picture", { children: [
2354
+ webp && /* @__PURE__ */ jsx28("source", { srcSet: encodeURI(webp), type: "image/webp" }),
2355
+ /* @__PURE__ */ jsx28("source", { srcSet: encodeURI(fallback), type: src.mime_type }),
2356
+ /* @__PURE__ */ jsx28(
2404
2357
  "img",
2405
2358
  __spreadValues({
2406
2359
  src: fallback,
@@ -2432,14 +2385,14 @@ var MediaManager = class {
2432
2385
  };
2433
2386
 
2434
2387
  // src/ListInput.js
2435
- var import_react27 = __toESM(require("react"));
2436
- var import_jsx_runtime29 = require("react/jsx-runtime");
2437
- var ListInput = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(List_default, __spreadValues({}, props));
2388
+ import React27 from "react";
2389
+ import { jsx as jsx29 } from "react/jsx-runtime";
2390
+ var ListInput = (props) => /* @__PURE__ */ jsx29(List_default, __spreadValues({}, props));
2438
2391
  var ListInput_default = ListInput;
2439
2392
 
2440
2393
  // src/forms/Button.js
2441
- var import_react28 = __toESM(require("react"));
2442
- var import_jsx_runtime30 = require("react/jsx-runtime");
2394
+ import React28 from "react";
2395
+ import { jsx as jsx30 } from "react/jsx-runtime";
2443
2396
  var Button4 = ({ settings, className }) => {
2444
2397
  const {
2445
2398
  button_id,
@@ -2454,7 +2407,7 @@ var Button4 = ({ settings, className }) => {
2454
2407
  if (button_type === "regular") buttonClass = "btn-passive-light";
2455
2408
  if (button_type === "link") buttonClass = "btn-text";
2456
2409
  if (className) buttonClass = `${buttonClass} ${className}`;
2457
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2410
+ return /* @__PURE__ */ jsx30(
2458
2411
  "a",
2459
2412
  {
2460
2413
  href: button_link,
@@ -2469,11 +2422,11 @@ var Button4 = ({ settings, className }) => {
2469
2422
  var Button_default = Button4;
2470
2423
 
2471
2424
  // src/lib/Link.js
2472
- var import_react29 = __toESM(require("react"));
2473
- var import_jsx_runtime31 = require("react/jsx-runtime");
2425
+ import React29 from "react";
2426
+ import { jsx as jsx31 } from "react/jsx-runtime";
2474
2427
  var Link = ({ settings, children, className }) => {
2475
2428
  const { id, label, link, target, rel } = settings;
2476
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2429
+ return /* @__PURE__ */ jsx31(
2477
2430
  "a",
2478
2431
  {
2479
2432
  href: link,
@@ -2486,23 +2439,22 @@ var Link = ({ settings, children, className }) => {
2486
2439
  );
2487
2440
  };
2488
2441
  var Link_default = Link;
2489
- // Annotate the CommonJS export names for ESM import in node:
2490
- 0 && (module.exports = {
2491
- AdminForm,
2492
- BuilderContext,
2493
- Button,
2494
- ButtonSettings,
2495
- Dialog,
2496
- FormGroup,
2497
- Img,
2498
- Label,
2499
- Link,
2500
- LinkSettings,
2501
- List,
2502
- ListInput,
2442
+ export {
2443
+ AdminForm_default as AdminForm,
2444
+ BuilderContext_default as BuilderContext,
2445
+ Button_default as Button,
2446
+ ButtonSettings_default as ButtonSettings,
2447
+ Dialog_default as Dialog,
2448
+ FormGroup5 as FormGroup,
2449
+ Image_default as Img,
2450
+ Label3 as Label,
2451
+ Link_default as Link,
2452
+ LinkSettings_default as LinkSettings,
2453
+ List_default as List,
2454
+ ListInput_default as ListInput,
2503
2455
  MediaManager,
2504
- PageBuilder,
2505
- SelectMenu,
2506
- TextArea,
2507
- TextInput
2508
- });
2456
+ PageBuilder_default as PageBuilder,
2457
+ SelectMenu_default as SelectMenu,
2458
+ TextArea_default as TextArea,
2459
+ TextInput_default as TextInput
2460
+ };