@simple-builder/react 1.3.8 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-container-client-NXIMV3RF.js → build-container-client-EQBL556Y.js} +148 -115
- package/dist/{build-container-client-5QC5KVS3.mjs → build-container-client-LMZUWEUI.mjs} +53 -20
- package/dist/{builder-content-4ZNXUE7D.mjs → builder-content-OR2VTIUY.mjs} +2 -2
- package/dist/{builder-content-2MA6BKJ5.js → builder-content-XNIM2YVG.js} +7 -7
- package/dist/{chunk-EVMN5SX2.js → chunk-4SFXTFFU.js} +5 -5
- package/dist/{chunk-4TVSMCQU.js → chunk-7I4RGF45.js} +3 -3
- package/dist/{chunk-5OV6KPTF.mjs → chunk-MXIMMIPT.mjs} +1 -1
- package/dist/{chunk-5Q4KJW4A.mjs → chunk-UA2CNH3R.mjs} +2 -2
- package/dist/{chunk-2CPAROZB.js → chunk-YFRFNRKR.js} +1 -1
- package/dist/{chunk-B5R6QY7N.mjs → chunk-ZQBKKI2S.mjs} +1 -1
- package/dist/index.css +0 -3
- package/dist/index.d.mts +6 -12
- package/dist/index.d.ts +6 -12
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/build-container-client-7Z6WZVBX.js +0 -2294
- package/dist/build-container-client-DWKVE65B.mjs +0 -2261
- package/dist/build-container-client-FN3PZMM7.mjs +0 -2256
- package/dist/build-container-client-FVDRMOZ7.mjs +0 -2254
- package/dist/build-container-client-GV52F5RP.js +0 -2297
- package/dist/build-container-client-J56NWFBF.mjs +0 -2260
- package/dist/build-container-client-L3WD4CG7.mjs +0 -2258
- package/dist/build-container-client-RSJ4H3SB.js +0 -2289
- package/dist/build-container-client-THZHNQ5S.mjs +0 -2263
- package/dist/build-container-client-WGVIYK47.css +0 -1968
- package/dist/build-container-client-WHIUDBOZ.mjs +0 -2262
- package/dist/build-container-client-WIGFVNOW.css +0 -1971
- package/dist/build-container-client-WN35X6JD.js +0 -2290
- package/dist/build-container-client-WYIHRPSW.js +0 -2298
- package/dist/build-container-client-XAQDWWKB.mjs +0 -2253
- package/dist/build-container-client-XOHYMPBB.js +0 -2292
- package/dist/build-container-client-YDRPPWCU.js +0 -2296
- package/dist/build-container-client-YWNDWXO2.css +0 -1967
- package/dist/build-container-client-ZXO66OL5.js +0 -2299
- package/dist/builder-content-2ZXIEMS3.js +0 -42
- package/dist/builder-content-3H7GF3KF.mjs +0 -20
- package/dist/builder-content-3HENFCB5.js +0 -42
- package/dist/builder-content-6PIBXDPE.mjs +0 -20
- package/dist/builder-content-73ZKCEIT.mjs +0 -20
- package/dist/builder-content-BIVYFWCC.js +0 -42
- package/dist/builder-content-BKE4JZ75.js +0 -42
- package/dist/builder-content-BU4BXER7.mjs +0 -20
- package/dist/builder-content-CP5VLMVD.mjs +0 -20
- package/dist/builder-content-CY43LFAA.js +0 -42
- package/dist/builder-content-FMTTH7R2.js +0 -42
- package/dist/builder-content-GBSIY2Z7.js +0 -42
- package/dist/builder-content-GJ4HYIOA.mjs +0 -20
- package/dist/builder-content-HQXSXBFZ.mjs +0 -20
- package/dist/builder-content-MI55X5HA.css +0 -1971
- package/dist/builder-content-PWV6LNFT.mjs +0 -20
- package/dist/builder-content-RROSPBT4.css +0 -1968
- package/dist/builder-content-RV3DPWFH.js +0 -42
- package/dist/builder-content-V2MDRHJI.css +0 -1967
- package/dist/chunk-2GOYHVMW.mjs +0 -123
- package/dist/chunk-2OHBCAZQ.mjs +0 -244
- package/dist/chunk-2OYBZSJQ.mjs +0 -123
- package/dist/chunk-3QWMKMTN.js +0 -269
- package/dist/chunk-454D7NIH.js +0 -153
- package/dist/chunk-6GCMYFBT.mjs +0 -20
- package/dist/chunk-6GCUWI4L.mjs +0 -135
- package/dist/chunk-6KNCX5O5.mjs +0 -123
- package/dist/chunk-6VINC5E2.mjs +0 -244
- package/dist/chunk-7X5S5JRE.js +0 -42
- package/dist/chunk-C5GHD62W.mjs +0 -20
- package/dist/chunk-CARNMQP6.mjs +0 -20
- package/dist/chunk-CJGHP5Q7.mjs +0 -244
- package/dist/chunk-CJNSRJNF.js +0 -42
- package/dist/chunk-DZLUIOVD.js +0 -153
- package/dist/chunk-EZFQOJHG.mjs +0 -244
- package/dist/chunk-F5JWY4CM.mjs +0 -20
- package/dist/chunk-H357GPTV.mjs +0 -244
- package/dist/chunk-H6OM2V2U.mjs +0 -20
- package/dist/chunk-HCM5NR6G.js +0 -269
- package/dist/chunk-IQX5LONG.js +0 -153
- package/dist/chunk-LEIASP7E.js +0 -153
- package/dist/chunk-MBISMJDL.js +0 -269
- package/dist/chunk-NDE4WSBA.js +0 -269
- package/dist/chunk-NUDE6YTK.js +0 -165
- package/dist/chunk-NZ4ZQMIS.js +0 -42
- package/dist/chunk-OWZPAOR6.mjs +0 -244
- package/dist/chunk-PADTJYXB.mjs +0 -20
- package/dist/chunk-QZQRUNAY.js +0 -153
- package/dist/chunk-RGBUK5SR.js +0 -269
- package/dist/chunk-RNGHWAPZ.js +0 -269
- package/dist/chunk-RZFAIM2Q.mjs +0 -123
- package/dist/chunk-SFYJAJOD.js +0 -42
- package/dist/chunk-SLWJHIVH.mjs +0 -123
- package/dist/chunk-TMDKQB2L.js +0 -153
- package/dist/chunk-TQQ4WVQU.mjs +0 -123
- package/dist/chunk-VCXFPTGD.js +0 -42
- package/dist/chunk-VNNNLYSW.js +0 -42
- package/dist/chunk-WA7TKN6M.js +0 -42
- package/dist/chunk-WI3YU7TV.js +0 -42
- package/dist/chunk-WPBR7BJZ.js +0 -269
- package/dist/chunk-X5A4S44V.mjs +0 -244
- package/dist/chunk-X5GVLHI2.mjs +0 -20
- package/dist/chunk-XLE7GSYM.mjs +0 -244
- package/dist/chunk-XSG7W73Z.mjs +0 -20
- package/dist/chunk-XZNO7DXS.js +0 -153
- package/dist/chunk-YKPZPQ5D.js +0 -269
- package/dist/chunk-ZZT7HGAM.mjs +0 -123
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'use client';
|
|
6
|
-
'use client';
|
|
7
|
-
'use client';
|
|
8
|
-
'use client';
|
|
9
|
-
'use client';
|
|
10
|
-
'use client';
|
|
11
|
-
'use client';
|
|
12
|
-
'use client';
|
|
13
|
-
import './chunk-XSG7W73Z.mjs';
|
|
14
|
-
import { buttonVariants, Button, useBuilder } from './chunk-CJGHP5Q7.mjs';
|
|
15
|
-
import { cn, tv, DesignWrapper, builder, Image } from './chunk-B5R6QY7N.mjs';
|
|
2
|
+
import './chunk-UA2CNH3R.mjs';
|
|
3
|
+
import { buttonVariants, Button, useBuilder } from './chunk-MXIMMIPT.mjs';
|
|
4
|
+
import { cn, tv, DesignWrapper, builder, Image } from './chunk-ZQBKKI2S.mjs';
|
|
16
5
|
import * as React25 from 'react';
|
|
17
6
|
import { useCallback } from 'react';
|
|
18
7
|
import { ChevronRight, Check, Circle, X, ChevronDown, ChevronUp, PlusIcon, ArrowUp, ArrowDown, Edit2Icon, Trash2Icon, ImageIcon, XIcon, PlusCircleIcon, CalendarIcon, MonitorIcon, SmartphoneIcon, ChevronLeftIcon, ChevronRightIcon, PaintbrushIcon, Loader2Icon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon } from 'lucide-react';
|
|
@@ -1174,11 +1163,26 @@ var ColorPicker = (props) => {
|
|
|
1174
1163
|
}
|
|
1175
1164
|
))));
|
|
1176
1165
|
};
|
|
1166
|
+
var IMAGE_FILE_ACCEPT = ".png,.jpg,.jpeg,.webp,.gif,.svg";
|
|
1167
|
+
var MEDIA_FILE_ACCEPT = `${IMAGE_FILE_ACCEPT},.mp4,.webm,.mov,.ogg,.ogv,.m4v,video/*`;
|
|
1168
|
+
var VIDEO_EXTENSIONS = [".mp4", ".webm", ".mov", ".ogg", ".ogv", ".m4v"];
|
|
1169
|
+
var isVideoUrl = (src) => {
|
|
1170
|
+
const path = src.split("?")[0].split("#")[0].toLowerCase();
|
|
1171
|
+
return VIDEO_EXTENSIONS.some((ext) => path.endsWith(ext));
|
|
1172
|
+
};
|
|
1173
|
+
var isVideoFile = (file) => file.type.startsWith("video/") || isVideoUrl(file.name);
|
|
1177
1174
|
var MediaInput = (props) => {
|
|
1178
|
-
const {
|
|
1175
|
+
const {
|
|
1176
|
+
onFilesChange,
|
|
1177
|
+
limit = 32,
|
|
1178
|
+
multiple = false,
|
|
1179
|
+
onError,
|
|
1180
|
+
accept = MEDIA_FILE_ACCEPT
|
|
1181
|
+
} = props;
|
|
1179
1182
|
const id = React25.useId();
|
|
1180
1183
|
const [queue, setQueue] = React25.useState([]);
|
|
1181
1184
|
const [sources, setSources] = React25.useState(props.files ?? []);
|
|
1185
|
+
const [videoUrls, setVideoUrls] = React25.useState({});
|
|
1182
1186
|
const maxConcurrentUploads = 3;
|
|
1183
1187
|
const uploadingCountRef = React25.useRef(0);
|
|
1184
1188
|
const handleFilesAdd = async (e) => {
|
|
@@ -1228,6 +1232,9 @@ var MediaInput = (props) => {
|
|
|
1228
1232
|
);
|
|
1229
1233
|
continue;
|
|
1230
1234
|
}
|
|
1235
|
+
if (isVideoFile(file)) {
|
|
1236
|
+
setVideoUrls((prev) => ({ ...prev, [url]: true }));
|
|
1237
|
+
}
|
|
1231
1238
|
setSources((prev) => [...prev, url]);
|
|
1232
1239
|
onFilesChange?.([...sources, url]);
|
|
1233
1240
|
} catch (e2) {
|
|
@@ -1252,12 +1259,10 @@ var MediaInput = (props) => {
|
|
|
1252
1259
|
});
|
|
1253
1260
|
};
|
|
1254
1261
|
return /* @__PURE__ */ React25.createElement("div", { className: cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React25.createElement(MediaInputItem, { key: src, className: cn("group", props.itemClassName) }, /* @__PURE__ */ React25.createElement(
|
|
1255
|
-
|
|
1262
|
+
MediaPreview,
|
|
1256
1263
|
{
|
|
1257
1264
|
src,
|
|
1258
|
-
|
|
1259
|
-
fill: true,
|
|
1260
|
-
className: "sb:absolute sb:inset-0 sb:object-cover sb:pointer-events-none"
|
|
1265
|
+
isVideo: !!videoUrls[src] || isVideoUrl(src)
|
|
1261
1266
|
}
|
|
1262
1267
|
), /* @__PURE__ */ React25.createElement("div", { className: "sb:absolute sb:right-1 sb:top-1 sb:z-30 sb:flex sb:items-center sb:justify-end sb:gap-3 sb:opacity-0 sb:transition-opacity sb:group-hover:opacity-100" }, /* @__PURE__ */ React25.createElement(
|
|
1263
1268
|
"button",
|
|
@@ -1293,7 +1298,7 @@ var MediaInput = (props) => {
|
|
|
1293
1298
|
type: "file",
|
|
1294
1299
|
onChange: handleFilesAdd,
|
|
1295
1300
|
multiple,
|
|
1296
|
-
accept
|
|
1301
|
+
accept,
|
|
1297
1302
|
className: "sb:hidden"
|
|
1298
1303
|
}
|
|
1299
1304
|
)
|
|
@@ -1311,6 +1316,33 @@ var MediaInputItem = (props) => {
|
|
|
1311
1316
|
props.children
|
|
1312
1317
|
);
|
|
1313
1318
|
};
|
|
1319
|
+
var MediaPreview = (props) => {
|
|
1320
|
+
const [kind, setKind] = React25.useState(
|
|
1321
|
+
props.isVideo ? "video" : "image"
|
|
1322
|
+
);
|
|
1323
|
+
if (kind === "video") {
|
|
1324
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1325
|
+
"video",
|
|
1326
|
+
{
|
|
1327
|
+
src: props.src,
|
|
1328
|
+
muted: true,
|
|
1329
|
+
playsInline: true,
|
|
1330
|
+
preload: "metadata",
|
|
1331
|
+
className: "sb:absolute sb:inset-0 sb:h-full sb:w-full sb:object-cover sb:pointer-events-none"
|
|
1332
|
+
}
|
|
1333
|
+
);
|
|
1334
|
+
}
|
|
1335
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1336
|
+
Image,
|
|
1337
|
+
{
|
|
1338
|
+
src: props.src,
|
|
1339
|
+
alt: "",
|
|
1340
|
+
fill: true,
|
|
1341
|
+
className: "sb:absolute sb:inset-0 sb:object-cover sb:pointer-events-none",
|
|
1342
|
+
onError: () => setKind("video")
|
|
1343
|
+
}
|
|
1344
|
+
);
|
|
1345
|
+
};
|
|
1314
1346
|
var MediaInputError = class extends Error {
|
|
1315
1347
|
title;
|
|
1316
1348
|
description;
|
|
@@ -1782,6 +1814,7 @@ var BackgroundPicker = (props) => {
|
|
|
1782
1814
|
className: "sb:grid sb:grid-cols-2 sb:gap-1",
|
|
1783
1815
|
itemClassName: "sb:aspect-video sb:h-auto sb:w-full",
|
|
1784
1816
|
multiple: false,
|
|
1817
|
+
accept: IMAGE_FILE_ACCEPT,
|
|
1785
1818
|
onFilesChange: (files) => {
|
|
1786
1819
|
if (!files.length)
|
|
1787
1820
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuilderProvider, useBuilder, Button } from './chunk-
|
|
2
|
-
import { BuildContainer } from './chunk-
|
|
1
|
+
import { BuilderProvider, useBuilder, Button } from './chunk-MXIMMIPT.mjs';
|
|
2
|
+
import { BuildContainer } from './chunk-ZQBKKI2S.mjs';
|
|
3
3
|
import * as React2 from 'react';
|
|
4
4
|
|
|
5
5
|
var BuilderHeader = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk4SFXTFFU_js = require('./chunk-4SFXTFFU.js');
|
|
4
|
+
var chunkYFRFNRKR_js = require('./chunk-YFRFNRKR.js');
|
|
5
5
|
var React2 = require('react');
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
@@ -25,17 +25,17 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
26
26
|
|
|
27
27
|
var BuilderHeader = () => {
|
|
28
|
-
const { save } =
|
|
29
|
-
return /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb:grid sb:grid-cols-3 sb:gap-4 sb:items-center sb:p-2 sb:shadow-lg sb:sticky sb:inset-x-0 sb:top-0 sb:bg-background sb:z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb:flex sb:gap-4 sb:items-center" }, /* @__PURE__ */ React2__namespace.createElement(
|
|
28
|
+
const { save } = chunk4SFXTFFU_js.useBuilder();
|
|
29
|
+
return /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb:grid sb:grid-cols-3 sb:gap-4 sb:items-center sb:p-2 sb:shadow-lg sb:sticky sb:inset-x-0 sb:top-0 sb:bg-background sb:z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb:flex sb:gap-4 sb:items-center" }, /* @__PURE__ */ React2__namespace.createElement(chunk4SFXTFFU_js.Button, { variant: "ghost", size: "sm", onClick: save }, "Opslaan")));
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// src/components/builder-content.tsx
|
|
33
33
|
var BuilderContent = (props) => {
|
|
34
|
-
return /* @__PURE__ */ React2__namespace.createElement(
|
|
34
|
+
return /* @__PURE__ */ React2__namespace.createElement(chunk4SFXTFFU_js.BuilderProvider, { content: props.content }, /* @__PURE__ */ React2__namespace.createElement(BuilderContentInner, null));
|
|
35
35
|
};
|
|
36
36
|
var BuilderContentInner = () => {
|
|
37
|
-
const { content } =
|
|
38
|
-
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(
|
|
37
|
+
const { content } = chunk4SFXTFFU_js.useBuilder();
|
|
38
|
+
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(chunkYFRFNRKR_js.BuildContainer, { name: "root", edit: true, multiple: true, content }));
|
|
39
39
|
};
|
|
40
40
|
var builder_content_default = BuilderContent;
|
|
41
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYFRFNRKR_js = require('./chunk-YFRFNRKR.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -57,7 +57,7 @@ var BuilderProvider = (props) => {
|
|
|
57
57
|
);
|
|
58
58
|
const addContent = React__namespace.useCallback(
|
|
59
59
|
(name, container, parent, index = 0) => {
|
|
60
|
-
const component =
|
|
60
|
+
const component = chunkYFRFNRKR_js.builder.getComponent(name);
|
|
61
61
|
if (!component) {
|
|
62
62
|
throw new Error(`[simple-builder]: Component "${name}" not found`);
|
|
63
63
|
}
|
|
@@ -79,7 +79,7 @@ var BuilderProvider = (props) => {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
if (!parent) {
|
|
82
|
-
setContent((content2) =>
|
|
82
|
+
setContent((content2) => chunkYFRFNRKR_js.insertAt(content2, index, entry));
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
setContent(
|
|
@@ -89,7 +89,7 @@ var BuilderProvider = (props) => {
|
|
|
89
89
|
...item,
|
|
90
90
|
content: {
|
|
91
91
|
...item.content,
|
|
92
|
-
[container]:
|
|
92
|
+
[container]: chunkYFRFNRKR_js.insertAt(item.content?.[container], index, entry)
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|
|
@@ -254,7 +254,7 @@ var Button = React__namespace.forwardRef(
|
|
|
254
254
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
255
255
|
Comp,
|
|
256
256
|
{
|
|
257
|
-
className:
|
|
257
|
+
className: chunkYFRFNRKR_js.cn(buttonVariants({ variant, size, className })),
|
|
258
258
|
ref,
|
|
259
259
|
...props
|
|
260
260
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYFRFNRKR_js = require('./chunk-YFRFNRKR.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
|
|
6
6
|
function _interopNamespace(e) {
|
|
@@ -25,7 +25,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
25
25
|
|
|
26
26
|
var StaticContent = (props) => {
|
|
27
27
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
28
|
-
|
|
28
|
+
chunkYFRFNRKR_js.BuildContainer,
|
|
29
29
|
{
|
|
30
30
|
name: "root",
|
|
31
31
|
edit: false,
|
|
@@ -36,7 +36,7 @@ var StaticContent = (props) => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
// src/index.ts
|
|
39
|
-
var BuilderContent = React.lazy(() => import('./builder-content-
|
|
39
|
+
var BuilderContent = React.lazy(() => import('./builder-content-XNIM2YVG.js'));
|
|
40
40
|
|
|
41
41
|
exports.BuilderContent = BuilderContent;
|
|
42
42
|
exports.StaticContent = StaticContent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildContainer } from './chunk-
|
|
1
|
+
import { BuildContainer } from './chunk-ZQBKKI2S.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { lazy } from 'react';
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ var StaticContent = (props) => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// src/index.ts
|
|
18
|
-
var BuilderContent = lazy(() => import('./builder-content-
|
|
18
|
+
var BuilderContent = lazy(() => import('./builder-content-OR2VTIUY.mjs'));
|
|
19
19
|
|
|
20
20
|
export { BuilderContent, StaticContent };
|
|
@@ -133,7 +133,7 @@ var DesignWrapper = (props) => {
|
|
|
133
133
|
`.replace(/\s\s+/g, " ")));
|
|
134
134
|
};
|
|
135
135
|
var BuildContainerInner = React3__namespace.lazy(
|
|
136
|
-
() => import('./build-container-client-
|
|
136
|
+
() => import('./build-container-client-EQBL556Y.js')
|
|
137
137
|
);
|
|
138
138
|
var BuildContainer = (props) => {
|
|
139
139
|
const { content, edit, name } = props;
|
|
@@ -109,7 +109,7 @@ var DesignWrapper = (props) => {
|
|
|
109
109
|
`.replace(/\s\s+/g, " ")));
|
|
110
110
|
};
|
|
111
111
|
var BuildContainerInner = React3.lazy(
|
|
112
|
-
() => import('./build-container-client-
|
|
112
|
+
() => import('./build-container-client-LMZUWEUI.mjs')
|
|
113
113
|
);
|
|
114
114
|
var BuildContainer = (props) => {
|
|
115
115
|
const { content, edit, name } = props;
|
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { createElement } from 'react';
|
|
3
2
|
import * as _simple_builder_server from '@simple-builder/server';
|
|
4
3
|
import { BuilderContent as BuilderContent$1, ContentItem } from '@simple-builder/server';
|
|
5
4
|
|
|
@@ -37,17 +36,12 @@ type BuildContainerProps$1 = {
|
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
declare
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
getComponents(): Component[];
|
|
47
|
-
getComponent(name: string): Component | undefined;
|
|
48
|
-
bindComponent({ content, ...block }: ContentItem, edit?: boolean): ReturnType<typeof createElement>;
|
|
49
|
-
}
|
|
50
|
-
declare const builder: Builder;
|
|
39
|
+
declare const builder: {
|
|
40
|
+
register: (component: any, config: Omit<Component, "component">) => void;
|
|
41
|
+
getComponents: () => Component[];
|
|
42
|
+
getComponent: (name: string) => Component | undefined;
|
|
43
|
+
bindComponent: ({ content, ...block }: ContentItem, edit?: boolean) => React.FunctionComponentElement<any>;
|
|
44
|
+
};
|
|
51
45
|
|
|
52
46
|
type StaticContentProps = {
|
|
53
47
|
content?: BuilderContent$1;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { createElement } from 'react';
|
|
3
2
|
import * as _simple_builder_server from '@simple-builder/server';
|
|
4
3
|
import { BuilderContent as BuilderContent$1, ContentItem } from '@simple-builder/server';
|
|
5
4
|
|
|
@@ -37,17 +36,12 @@ type BuildContainerProps$1 = {
|
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
declare
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
getComponents(): Component[];
|
|
47
|
-
getComponent(name: string): Component | undefined;
|
|
48
|
-
bindComponent({ content, ...block }: ContentItem, edit?: boolean): ReturnType<typeof createElement>;
|
|
49
|
-
}
|
|
50
|
-
declare const builder: Builder;
|
|
39
|
+
declare const builder: {
|
|
40
|
+
register: (component: any, config: Omit<Component, "component">) => void;
|
|
41
|
+
getComponents: () => Component[];
|
|
42
|
+
getComponent: (name: string) => Component | undefined;
|
|
43
|
+
bindComponent: ({ content, ...block }: ContentItem, edit?: boolean) => React.FunctionComponentElement<any>;
|
|
44
|
+
};
|
|
51
45
|
|
|
52
46
|
type StaticContentProps = {
|
|
53
47
|
content?: BuilderContent$1;
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk7I4RGF45_js = require('./chunk-7I4RGF45.js');
|
|
4
|
+
var chunkYFRFNRKR_js = require('./chunk-YFRFNRKR.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "BuilderContent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk7I4RGF45_js.BuilderContent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "StaticContent", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk7I4RGF45_js.StaticContent; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "BuildContainer", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkYFRFNRKR_js.BuildContainer; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "builder", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkYFRFNRKR_js.builder; }
|
|
23
23
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BuilderContent, StaticContent } from './chunk-
|
|
2
|
-
export { BuildContainer, builder } from './chunk-
|
|
1
|
+
export { BuilderContent, StaticContent } from './chunk-UA2CNH3R.mjs';
|
|
2
|
+
export { BuildContainer, builder } from './chunk-ZQBKKI2S.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-builder/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "React package for the simple builder package.",
|
|
6
6
|
"repository": "https://github.com/pieter-berkel/simple-builder.git",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"tailwind-merge": "^2.2.0",
|
|
60
60
|
"tailwind-variants": "^0.1.20",
|
|
61
61
|
"zod": "^3.22.4",
|
|
62
|
-
"@simple-builder/server": "1.
|
|
62
|
+
"@simple-builder/server": "1.4.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": ">=16.8.0",
|