@crediblemark/build 0.25.0 → 0.25.2
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/README.md +88 -152
- package/dist/{ArrayField-ABD3HGQK.css → ArrayField-HGGIE5AL.css} +73 -72
- package/dist/ArrayField-JZ2XQAUS.mjs +19 -0
- package/dist/{Editor-CD7CMRO5.mjs → Editor-GGSPWIO6.mjs} +7 -7
- package/dist/{ObjectField-RGVFMP6O.css → ObjectField-NKMT3CLS.css} +73 -72
- package/dist/ObjectField-ZUGNSCNN.mjs +19 -0
- package/dist/{actions-CEH_5LMY.d.mts → actions-LaZpJ1KE.d.mts} +6 -1
- package/dist/{actions-CEH_5LMY.d.ts → actions-LaZpJ1KE.d.ts} +6 -1
- package/dist/{chunk-WEPD3OBO.mjs → chunk-3R4HYYSJ.mjs} +2 -2
- package/dist/{chunk-NW76XMQS.mjs → chunk-4CV4HOSK.mjs} +4 -4
- package/dist/{chunk-BC5TH63U.mjs → chunk-4Z54QJVQ.mjs} +1 -1
- package/dist/{chunk-NSDGBGNG.mjs → chunk-A7MU7FEU.mjs} +1 -1
- package/dist/{chunk-7RH2UOWD.mjs → chunk-BVZDBEP4.mjs} +355 -273
- package/dist/{chunk-MLM27DOG.mjs → chunk-DWF5T7E3.mjs} +1 -1
- package/dist/{chunk-7RA5W2MP.mjs → chunk-GY4BXVOH.mjs} +9 -9
- package/dist/{chunk-UPNU77XM.mjs → chunk-IJPF46QY.mjs} +1 -1
- package/dist/{chunk-BPBYJDIJ.mjs → chunk-J66BZ4WH.mjs} +95 -80
- package/dist/{chunk-JKWSSGAY.mjs → chunk-KRFBBRUA.mjs} +7 -7
- package/dist/{chunk-FON7BVSU.mjs → chunk-YDODUFKC.mjs} +2 -2
- package/dist/{full-HTQAR5N2.mjs → full-KPGLJZI5.mjs} +5 -5
- package/dist/{index-CkSfgrvw.d.ts → index-Bj2x5pZ7.d.ts} +1 -1
- package/dist/{index-Cxwg4vUV.d.mts → index-CD3PszvP.d.mts} +1 -1
- package/dist/index.css +192 -112
- package/dist/index.d.mts +8 -12
- package/dist/index.d.ts +8 -12
- package/dist/index.js +745 -638
- package/dist/index.mjs +11 -11
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-AHSNCA4P.mjs → loaded-5QLBLQ3N.mjs} +2 -2
- package/dist/{loaded-Q7N3MNZB.mjs → loaded-HEYQUU36.mjs} +2 -2
- package/dist/{loaded-CDAPR2WZ.mjs → loaded-RXPNBJYA.mjs} +2 -2
- package/dist/no-external.css +192 -112
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +745 -638
- package/dist/no-external.mjs +11 -11
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/{walk-tree-B4ZvMfxS.d.ts → walk-tree-BEw6kTXm.d.ts} +1 -1
- package/dist/{walk-tree-C78ZVz19.d.mts → walk-tree-BO8uRNcW.d.mts} +1 -1
- package/package.json +1 -1
- package/dist/ArrayField-PRFYE7UT.mjs +0 -19
- package/dist/ObjectField-G5CR3WD3.mjs +0 -19
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3R4HYYSJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DragIcon,
|
|
6
6
|
collisionStore,
|
|
7
7
|
createDynamicCollisionDetector,
|
|
8
8
|
setDeep,
|
|
9
9
|
useSensors
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4CV4HOSK.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AutoFieldPrivate,
|
|
13
13
|
Button,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
fieldContextStore,
|
|
17
17
|
useContextStore,
|
|
18
18
|
useSafeId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GY4BXVOH.mjs";
|
|
20
20
|
import {
|
|
21
21
|
RichTextRenderFallback,
|
|
22
22
|
SlotRender,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
ActionBar,
|
|
31
31
|
IconButton,
|
|
32
32
|
Loader
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KRFBBRUA.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Box,
|
|
36
36
|
ChartColumn,
|
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
ExternalLink,
|
|
45
45
|
FileText,
|
|
46
46
|
Image,
|
|
47
|
+
Inbox,
|
|
47
48
|
Info,
|
|
48
49
|
Layers,
|
|
49
50
|
LayoutDashboard,
|
|
@@ -60,6 +61,7 @@ import {
|
|
|
60
61
|
Quote,
|
|
61
62
|
RectangleEllipsis,
|
|
62
63
|
Redo2,
|
|
64
|
+
Search,
|
|
63
65
|
Settings,
|
|
64
66
|
Shapes,
|
|
65
67
|
Smartphone,
|
|
@@ -85,7 +87,7 @@ import {
|
|
|
85
87
|
useRegisterHistorySlice,
|
|
86
88
|
useRegisterPermissionsSlice,
|
|
87
89
|
useResetAutoZoom
|
|
88
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-J66BZ4WH.mjs";
|
|
89
91
|
import {
|
|
90
92
|
getItem,
|
|
91
93
|
insert,
|
|
@@ -136,7 +138,8 @@ var SliderField = ({
|
|
|
136
138
|
step = 1,
|
|
137
139
|
unit = "px",
|
|
138
140
|
defaultValue = 0,
|
|
139
|
-
useUnits = true
|
|
141
|
+
useUnits = true,
|
|
142
|
+
style = {}
|
|
140
143
|
}) => {
|
|
141
144
|
const parseValue = (val) => {
|
|
142
145
|
if (typeof val === "number") return val;
|
|
@@ -167,7 +170,7 @@ var SliderField = ({
|
|
|
167
170
|
const newUnit = e.target.value;
|
|
168
171
|
onChange(`${numericValue}${newUnit}`);
|
|
169
172
|
};
|
|
170
|
-
return /* @__PURE__ */ jsxs("div", { style: { padding: "
|
|
173
|
+
return /* @__PURE__ */ jsxs("div", { style: { padding: "0", ...style }, children: [
|
|
171
174
|
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: `
|
|
172
175
|
.cb-slider-input {
|
|
173
176
|
-webkit-appearance: none;
|
|
@@ -271,7 +274,6 @@ var SliderField = ({
|
|
|
271
274
|
};
|
|
272
275
|
|
|
273
276
|
// components/AutoField/fields/ResponsiveSliderField/index.tsx
|
|
274
|
-
import { useState } from "react";
|
|
275
277
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
276
278
|
var DesktopIcon = () => /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
277
279
|
/* @__PURE__ */ jsx2("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
|
|
@@ -296,7 +298,39 @@ var ResponsiveSliderField = ({
|
|
|
296
298
|
step = 1,
|
|
297
299
|
defaultValue = 0
|
|
298
300
|
}) => {
|
|
299
|
-
const
|
|
301
|
+
const setUi = useAppStore((s) => s.setUi);
|
|
302
|
+
const viewportsState = useAppStore((s) => s.state.ui.viewports);
|
|
303
|
+
const zoomConfig = useAppStore((s) => s.zoomConfig);
|
|
304
|
+
const setZoomConfig = useAppStore((s) => s.setZoomConfig);
|
|
305
|
+
const viewportConfigOptions = useAppStore((s) => s.viewports);
|
|
306
|
+
const getModeFromWidth = (width) => {
|
|
307
|
+
if (width === "100%") return "desktop";
|
|
308
|
+
const w = typeof width === "string" ? parseInt(width) : width;
|
|
309
|
+
if (w <= 480) return "mobile";
|
|
310
|
+
if (w <= 900) return "tablet";
|
|
311
|
+
return "desktop";
|
|
312
|
+
};
|
|
313
|
+
const mode = getModeFromWidth(viewportsState.current.width);
|
|
314
|
+
const changeGlobalViewport = (targetMode) => {
|
|
315
|
+
const targetIcon = targetMode === "mobile" ? "Smartphone" : targetMode === "tablet" ? "Tablet" : "Monitor";
|
|
316
|
+
const matched = viewportConfigOptions.find((v) => v.icon === targetIcon) || viewportConfigOptions.find((v) => {
|
|
317
|
+
if (targetMode === "mobile") return v.width !== "100%" && parseInt(String(v.width)) <= 480;
|
|
318
|
+
if (targetMode === "tablet") return v.width !== "100%" && parseInt(String(v.width)) > 480 && parseInt(String(v.width)) <= 900;
|
|
319
|
+
return v.width === "100%" || parseInt(String(v.width)) > 900;
|
|
320
|
+
}) || viewportConfigOptions[0];
|
|
321
|
+
const isFullWidth = matched.width === "100%";
|
|
322
|
+
const uiViewport = {
|
|
323
|
+
...matched,
|
|
324
|
+
height: matched.height || "auto",
|
|
325
|
+
zoom: isFullWidth ? 1 : zoomConfig.zoom
|
|
326
|
+
};
|
|
327
|
+
if (isFullWidth) {
|
|
328
|
+
setZoomConfig({ ...zoomConfig, zoom: 1 });
|
|
329
|
+
}
|
|
330
|
+
setUi({
|
|
331
|
+
viewports: { ...viewportsState, current: uiViewport }
|
|
332
|
+
});
|
|
333
|
+
};
|
|
300
334
|
const getCurrentValue = () => {
|
|
301
335
|
const val = value?.[mode];
|
|
302
336
|
if (val !== void 0 && val !== null) {
|
|
@@ -324,34 +358,37 @@ var ResponsiveSliderField = ({
|
|
|
324
358
|
[mode]: newVal
|
|
325
359
|
});
|
|
326
360
|
};
|
|
327
|
-
return /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
] })
|
|
361
|
+
return /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: "2px", width: "100%" }, children: [
|
|
362
|
+
label && /* @__PURE__ */ jsx2("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "2px" }, children: /* @__PURE__ */ jsxs2("label", { style: {
|
|
363
|
+
fontSize: "10px",
|
|
364
|
+
fontWeight: 600,
|
|
365
|
+
color: "var(--cb-silver-muted, #71717a)",
|
|
366
|
+
display: "flex",
|
|
367
|
+
alignItems: "center",
|
|
368
|
+
gap: "4px",
|
|
369
|
+
textTransform: "uppercase",
|
|
370
|
+
letterSpacing: "0.05em"
|
|
371
|
+
}, children: [
|
|
372
|
+
label,
|
|
373
|
+
/* @__PURE__ */ jsxs2("span", { style: { fontSize: "9px", opacity: 0.5, fontWeight: "400" }, children: [
|
|
374
|
+
"(",
|
|
375
|
+
mode,
|
|
376
|
+
")"
|
|
377
|
+
] })
|
|
378
|
+
] }) }),
|
|
379
|
+
/* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: "8px", width: "100%" }, children: [
|
|
344
380
|
/* @__PURE__ */ jsxs2("div", { style: {
|
|
345
381
|
display: "flex",
|
|
346
382
|
backgroundColor: "var(--cb-bg-panel, #f1f5f9)",
|
|
347
383
|
borderRadius: "4px",
|
|
348
384
|
padding: "1px",
|
|
349
|
-
border: "1px solid var(--cb-border, #e2e8f0)"
|
|
385
|
+
border: "1px solid var(--cb-border, #e2e8f0)",
|
|
386
|
+
flexShrink: 0
|
|
350
387
|
}, children: [
|
|
351
388
|
/* @__PURE__ */ jsx2(
|
|
352
389
|
"button",
|
|
353
390
|
{
|
|
354
|
-
onClick: () =>
|
|
391
|
+
onClick: () => changeGlobalViewport("desktop"),
|
|
355
392
|
style: {
|
|
356
393
|
padding: "2px 5px",
|
|
357
394
|
border: "none",
|
|
@@ -371,7 +408,7 @@ var ResponsiveSliderField = ({
|
|
|
371
408
|
/* @__PURE__ */ jsx2(
|
|
372
409
|
"button",
|
|
373
410
|
{
|
|
374
|
-
onClick: () =>
|
|
411
|
+
onClick: () => changeGlobalViewport("tablet"),
|
|
375
412
|
style: {
|
|
376
413
|
padding: "2px 5px",
|
|
377
414
|
border: "none",
|
|
@@ -391,7 +428,7 @@ var ResponsiveSliderField = ({
|
|
|
391
428
|
/* @__PURE__ */ jsx2(
|
|
392
429
|
"button",
|
|
393
430
|
{
|
|
394
|
-
onClick: () =>
|
|
431
|
+
onClick: () => changeGlobalViewport("mobile"),
|
|
395
432
|
style: {
|
|
396
433
|
padding: "2px 5px",
|
|
397
434
|
border: "none",
|
|
@@ -408,20 +445,20 @@ var ResponsiveSliderField = ({
|
|
|
408
445
|
children: /* @__PURE__ */ jsx2(MobileIcon, {})
|
|
409
446
|
}
|
|
410
447
|
)
|
|
411
|
-
] })
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
)
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ jsx2("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx2(
|
|
450
|
+
SliderField,
|
|
451
|
+
{
|
|
452
|
+
value: getCurrentValue(),
|
|
453
|
+
onChange: handleChange,
|
|
454
|
+
unit,
|
|
455
|
+
max,
|
|
456
|
+
min,
|
|
457
|
+
step,
|
|
458
|
+
useUnits: false
|
|
459
|
+
}
|
|
460
|
+
) })
|
|
461
|
+
] })
|
|
425
462
|
] });
|
|
426
463
|
};
|
|
427
464
|
|
|
@@ -491,7 +528,7 @@ var ColorPickerField = ({ value, onChange }) => {
|
|
|
491
528
|
var styles_module_default = { "Drawer": "_Drawer_1bd7y_1", "Drawer-draggable": "_Drawer-draggable_1bd7y_7", "Drawer-draggableBg": "_Drawer-draggableBg_1bd7y_11", "DrawerItem-draggable": "_DrawerItem-draggable_1bd7y_21", "DrawerItem--disabled": "_DrawerItem--disabled_1bd7y_34", "DrawerItem": "_DrawerItem_1bd7y_21", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_1bd7y_43", "DrawerItem-default": "_DrawerItem-default_1bd7y_44", "DrawerItem-name": "_DrawerItem-name_1bd7y_61" };
|
|
492
529
|
|
|
493
530
|
// components/Drawer/index.tsx
|
|
494
|
-
import { useMemo, useState
|
|
531
|
+
import { useMemo, useState } from "react";
|
|
495
532
|
|
|
496
533
|
// components/DragDropContext/context.tsx
|
|
497
534
|
import {
|
|
@@ -597,7 +634,7 @@ var DrawerItem = ({
|
|
|
597
634
|
isDragDisabled
|
|
598
635
|
}) => {
|
|
599
636
|
const resolvedId = id || name;
|
|
600
|
-
const [dynamicId, setDynamicId] =
|
|
637
|
+
const [dynamicId, setDynamicId] = useState(generateId(resolvedId));
|
|
601
638
|
if (typeof index !== "undefined") {
|
|
602
639
|
console.error(
|
|
603
640
|
"Warning: The `index` prop on Drawer.Item is deprecated and no longer required."
|
|
@@ -723,7 +760,7 @@ import {
|
|
|
723
760
|
useLayoutEffect,
|
|
724
761
|
useMemo as useMemo3,
|
|
725
762
|
useRef as useRef2,
|
|
726
|
-
useState as
|
|
763
|
+
useState as useState2,
|
|
727
764
|
useTransition
|
|
728
765
|
} from "react";
|
|
729
766
|
|
|
@@ -906,7 +943,7 @@ var DraggableComponent = ({
|
|
|
906
943
|
const iframe = useAppStore((s) => s.iframe);
|
|
907
944
|
const lastMeasureRef = useRef2(0);
|
|
908
945
|
const ctx = useContext2(dropZoneContext);
|
|
909
|
-
const [localZones, setLocalZones] =
|
|
946
|
+
const [localZones, setLocalZones] = useState2({});
|
|
910
947
|
const registerLocalZone = useCallback3(
|
|
911
948
|
(zoneCompound2, active) => {
|
|
912
949
|
ctx?.registerLocalZone?.(zoneCompound2, active);
|
|
@@ -939,7 +976,7 @@ var DraggableComponent = ({
|
|
|
939
976
|
})
|
|
940
977
|
);
|
|
941
978
|
const zoneStore = useContext2(ZoneStoreContext);
|
|
942
|
-
const [dragAxis, setDragAxis] =
|
|
979
|
+
const [dragAxis, setDragAxis] = useState2(userDragAxis || autoDragAxis);
|
|
943
980
|
const dynamicCollisionDetector = useMemo3(
|
|
944
981
|
() => createDynamicCollisionDetector(dragAxis),
|
|
945
982
|
[dragAxis]
|
|
@@ -988,7 +1025,7 @@ var DraggableComponent = ({
|
|
|
988
1025
|
}
|
|
989
1026
|
return cleanup;
|
|
990
1027
|
}, [permissions.drag, zoneCompound, sortable.draggable, sortable.droppable, zoneStore]);
|
|
991
|
-
const [, setRerender] =
|
|
1028
|
+
const [, setRerender] = useState2(0);
|
|
992
1029
|
const ref = useRef2(null);
|
|
993
1030
|
const refSetter = useCallback3(
|
|
994
1031
|
(el) => {
|
|
@@ -1003,7 +1040,7 @@ var DraggableComponent = ({
|
|
|
1003
1040
|
},
|
|
1004
1041
|
[itemRef, sortableRef]
|
|
1005
1042
|
);
|
|
1006
|
-
const [portalEl, setPortalEl] =
|
|
1043
|
+
const [portalEl, setPortalEl] = useState2();
|
|
1007
1044
|
useEffect2(() => {
|
|
1008
1045
|
setPortalEl(
|
|
1009
1046
|
iframe.enabled ? ref.current?.ownerDocument.body : ref.current?.closest("[data-credbuild-preview]") ?? document.body
|
|
@@ -1040,7 +1077,7 @@ var DraggableComponent = ({
|
|
|
1040
1077
|
};
|
|
1041
1078
|
return style2;
|
|
1042
1079
|
}, [iframe.enabled]);
|
|
1043
|
-
const [style, setStyle] =
|
|
1080
|
+
const [style, setStyle] = useState2();
|
|
1044
1081
|
const lastRectRef = useRef2(null);
|
|
1045
1082
|
const syncRafRef = useRef2(null);
|
|
1046
1083
|
const sync = useCallback3(() => {
|
|
@@ -1171,7 +1208,7 @@ var DraggableComponent = ({
|
|
|
1171
1208
|
zone: zoneCompound
|
|
1172
1209
|
});
|
|
1173
1210
|
}, [index, zoneCompound, dispatch]);
|
|
1174
|
-
const [hover, setHover] =
|
|
1211
|
+
const [hover, setHover] = useState2(false);
|
|
1175
1212
|
const indicativeHover = useContextStore(
|
|
1176
1213
|
ZoneStoreContext,
|
|
1177
1214
|
(s) => s.hoveringComponent === id
|
|
@@ -1223,8 +1260,8 @@ var DraggableComponent = ({
|
|
|
1223
1260
|
zoneStore,
|
|
1224
1261
|
id
|
|
1225
1262
|
]);
|
|
1226
|
-
const [isVisible, setIsVisible] =
|
|
1227
|
-
const [dragFinished, setDragFinished] =
|
|
1263
|
+
const [isVisible, setIsVisible] = useState2(false);
|
|
1264
|
+
const [dragFinished, setDragFinished] = useState2(true);
|
|
1228
1265
|
const [_, startTransition] = useTransition();
|
|
1229
1266
|
useEffect2(() => {
|
|
1230
1267
|
startTransition(() => {
|
|
@@ -1237,7 +1274,7 @@ var DraggableComponent = ({
|
|
|
1237
1274
|
}
|
|
1238
1275
|
});
|
|
1239
1276
|
}, [hover, indicativeHover, isSelected, iframe, scheduleSync]);
|
|
1240
|
-
const [thisWasDragging, setThisWasDragging] =
|
|
1277
|
+
const [thisWasDragging, setThisWasDragging] = useState2(false);
|
|
1241
1278
|
const onDragFinished = useOnDragFinished(
|
|
1242
1279
|
useCallback3(
|
|
1243
1280
|
(finished) => {
|
|
@@ -1453,7 +1490,7 @@ import { useDroppable as useDroppable2 } from "@dnd-kit/react";
|
|
|
1453
1490
|
import { pointerIntersection } from "@dnd-kit/collision";
|
|
1454
1491
|
|
|
1455
1492
|
// components/DropZone/lib/use-min-empty-height.ts
|
|
1456
|
-
import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef3, useState as
|
|
1493
|
+
import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1457
1494
|
var getNumItems = (appStore, zoneCompound) => appStore.getState().state.indexes.zones[zoneCompound].contentIds.length;
|
|
1458
1495
|
var useMinEmptyHeight = ({
|
|
1459
1496
|
zoneCompound,
|
|
@@ -1461,8 +1498,8 @@ var useMinEmptyHeight = ({
|
|
|
1461
1498
|
ref
|
|
1462
1499
|
}) => {
|
|
1463
1500
|
const appStore = useAppStoreApi();
|
|
1464
|
-
const [prevHeight, setPrevHeight] =
|
|
1465
|
-
const [isAnimating, setIsAnimating] =
|
|
1501
|
+
const [prevHeight, setPrevHeight] = useState3(0);
|
|
1502
|
+
const [isAnimating, setIsAnimating] = useState3(false);
|
|
1466
1503
|
const { draggedItem, isZone } = useContextStore(ZoneStoreContext, (s) => {
|
|
1467
1504
|
return {
|
|
1468
1505
|
draggedItem: s.draggedItem?.data.zone === zoneCompound ? s.draggedItem : null,
|
|
@@ -1516,7 +1553,7 @@ var useMinEmptyHeight = ({
|
|
|
1516
1553
|
};
|
|
1517
1554
|
|
|
1518
1555
|
// components/DropZone/lib/use-content-with-preview.ts
|
|
1519
|
-
import { useCallback as useCallback6, useContext as useContext3, useEffect as useEffect4, useState as
|
|
1556
|
+
import { useCallback as useCallback6, useContext as useContext3, useEffect as useEffect4, useState as useState4 } from "react";
|
|
1520
1557
|
|
|
1521
1558
|
// lib/dnd/use-rendered-callback.ts
|
|
1522
1559
|
import { useDragDropManager } from "@dnd-kit/react";
|
|
@@ -1540,8 +1577,8 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
1540
1577
|
(s) => s.previewIndex[zoneCompound]
|
|
1541
1578
|
);
|
|
1542
1579
|
const isDragging = useAppStore((s) => s.state.ui.isDragging);
|
|
1543
|
-
const [contentIdsWithPreview, setContentIdsWithPreview] =
|
|
1544
|
-
const [localPreview, setLocalPreview] =
|
|
1580
|
+
const [contentIdsWithPreview, setContentIdsWithPreview] = useState4(contentIds);
|
|
1581
|
+
const [localPreview, setLocalPreview] = useState4(
|
|
1545
1582
|
preview
|
|
1546
1583
|
);
|
|
1547
1584
|
const updateContent = useRenderedCallback(
|
|
@@ -1594,13 +1631,13 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
1594
1631
|
};
|
|
1595
1632
|
|
|
1596
1633
|
// components/DropZone/lib/use-drag-axis.ts
|
|
1597
|
-
import { useCallback as useCallback7, useEffect as useEffect5, useState as
|
|
1634
|
+
import { useCallback as useCallback7, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1598
1635
|
var GRID_DRAG_AXIS = "dynamic";
|
|
1599
1636
|
var FLEX_ROW_DRAG_AXIS = "x";
|
|
1600
1637
|
var DEFAULT_DRAG_AXIS = "y";
|
|
1601
1638
|
var useDragAxis = (ref, collisionAxis) => {
|
|
1602
1639
|
const status = useAppStore((s) => s.status);
|
|
1603
|
-
const [dragAxis, setDragAxis] =
|
|
1640
|
+
const [dragAxis, setDragAxis] = useState5(
|
|
1604
1641
|
collisionAxis || DEFAULT_DRAG_AXIS
|
|
1605
1642
|
);
|
|
1606
1643
|
const calculateDragAxis = useCallback7(() => {
|
|
@@ -1632,8 +1669,8 @@ var useDragAxis = (ref, collisionAxis) => {
|
|
|
1632
1669
|
import { useShallow as useShallow3 } from "zustand/react/shallow";
|
|
1633
1670
|
|
|
1634
1671
|
// components/Render/context.tsx
|
|
1635
|
-
import
|
|
1636
|
-
var renderContext =
|
|
1672
|
+
import React2 from "react";
|
|
1673
|
+
var renderContext = React2.createContext({
|
|
1637
1674
|
config: { components: {} },
|
|
1638
1675
|
data: { root: {}, content: [] },
|
|
1639
1676
|
metadata: {}
|
|
@@ -1708,7 +1745,7 @@ function useFieldTransformsTracked(config, item, transforms, readOnly, forceRead
|
|
|
1708
1745
|
}
|
|
1709
1746
|
|
|
1710
1747
|
// components/InlineTextField/index.tsx
|
|
1711
|
-
import { memo, useEffect as useEffect6, useRef as useRef5, useState as
|
|
1748
|
+
import { memo, useEffect as useEffect6, useRef as useRef5, useState as useState6 } from "react";
|
|
1712
1749
|
|
|
1713
1750
|
// css-module:/home/crediblemark/Project/Credibuild/components/InlineTextField/styles.module.css#css-module
|
|
1714
1751
|
var styles_module_default4 = { "InlineTextField": "_InlineTextField_104qp_1" };
|
|
@@ -1780,8 +1817,8 @@ var InlineTextFieldInternal = ({
|
|
|
1780
1817
|
};
|
|
1781
1818
|
}
|
|
1782
1819
|
}, [appStoreApi, ref, value, disableLineBreaks, componentId, propPath]);
|
|
1783
|
-
const [isHovering, setIsHovering] =
|
|
1784
|
-
const [isFocused, setIsFocused] =
|
|
1820
|
+
const [isHovering, setIsHovering] = useState6(false);
|
|
1821
|
+
const [isFocused, setIsFocused] = useState6(false);
|
|
1785
1822
|
return /* @__PURE__ */ jsx8(
|
|
1786
1823
|
"span",
|
|
1787
1824
|
{
|
|
@@ -1879,7 +1916,7 @@ import {
|
|
|
1879
1916
|
} from "react";
|
|
1880
1917
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1881
1918
|
var Editor = lazy(
|
|
1882
|
-
() => import("./Editor-
|
|
1919
|
+
() => import("./Editor-GGSPWIO6.mjs").then((m) => ({
|
|
1883
1920
|
default: m.Editor
|
|
1884
1921
|
}))
|
|
1885
1922
|
);
|
|
@@ -2758,7 +2795,7 @@ function Render({
|
|
|
2758
2795
|
}
|
|
2759
2796
|
|
|
2760
2797
|
// lib/use-credbuild.ts
|
|
2761
|
-
import { createContext as createContext3, useContext as useContext6, useEffect as useEffect10, useState as
|
|
2798
|
+
import { createContext as createContext3, useContext as useContext6, useEffect as useEffect10, useState as useState7 } from "react";
|
|
2762
2799
|
import { createStore as createStore2, useStore } from "zustand";
|
|
2763
2800
|
|
|
2764
2801
|
// lib/data/resolve-and-replace-data.ts
|
|
@@ -2866,7 +2903,7 @@ var convertToPickedStore = (store) => {
|
|
|
2866
2903
|
};
|
|
2867
2904
|
};
|
|
2868
2905
|
var useRegisterUseCredBuildStore = (appStore) => {
|
|
2869
|
-
const [useCredBuildStore] =
|
|
2906
|
+
const [useCredBuildStore] = useState7(
|
|
2870
2907
|
() => createStore2(
|
|
2871
2908
|
() => generateUseCredBuild(
|
|
2872
2909
|
convertToPickedStore(appStore.getState()),
|
|
@@ -2916,14 +2953,13 @@ function useGetCredBuild() {
|
|
|
2916
2953
|
}
|
|
2917
2954
|
|
|
2918
2955
|
// lib/use-component-list.tsx
|
|
2919
|
-
import { useEffect as useEffect12, useState as
|
|
2956
|
+
import { useEffect as useEffect12, useState as useState8 } from "react";
|
|
2920
2957
|
|
|
2921
2958
|
// css-module:/home/crediblemark/Project/Credibuild/components/ComponentList/styles.module.css#css-module
|
|
2922
2959
|
var styles_module_default5 = { "ComponentList": "_ComponentList_10tqo_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_10tqo_5", "ComponentList-content": "_ComponentList-content_10tqo_9", "ComponentList-title": "_ComponentList-title_10tqo_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_10tqo_53" };
|
|
2923
2960
|
|
|
2924
2961
|
// components/ComponentList/index.tsx
|
|
2925
|
-
import { useEffect as useEffect11
|
|
2926
|
-
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
2962
|
+
import { useEffect as useEffect11 } from "react";
|
|
2927
2963
|
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2928
2964
|
var getClassName5 = get_class_name_factory_default("ComponentList", styles_module_default5);
|
|
2929
2965
|
var ComponentListItem = ({
|
|
@@ -2953,16 +2989,8 @@ var ComponentList = ({
|
|
|
2953
2989
|
const config = useAppStore((s) => s.config);
|
|
2954
2990
|
const setUi = useAppStore((s) => s.setUi);
|
|
2955
2991
|
const componentList = useAppStore((s) => s.state.ui.componentList);
|
|
2956
|
-
const parentRef = useRef9(null);
|
|
2957
2992
|
const { expanded = true } = componentList[id] || {};
|
|
2958
2993
|
const components = Object.keys(config.components);
|
|
2959
|
-
const virtualizer = useVirtualizer2({
|
|
2960
|
-
count: components.length,
|
|
2961
|
-
getScrollElement: () => parentRef.current,
|
|
2962
|
-
estimateSize: () => 32,
|
|
2963
|
-
// Estimated height of each item
|
|
2964
|
-
overscan: 5
|
|
2965
|
-
});
|
|
2966
2994
|
return /* @__PURE__ */ jsxs7("div", { className: getClassName5({ isExpanded: expanded }), children: [
|
|
2967
2995
|
title && /* @__PURE__ */ jsxs7(
|
|
2968
2996
|
"button",
|
|
@@ -2995,47 +3023,22 @@ var ComponentList = ({
|
|
|
2995
3023
|
/* @__PURE__ */ jsx15(
|
|
2996
3024
|
"div",
|
|
2997
3025
|
{
|
|
2998
|
-
ref: parentRef,
|
|
2999
3026
|
className: getClassName5("content"),
|
|
3000
3027
|
style: {
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
transition: "max-height 0.3s ease-in-out"
|
|
3028
|
+
overflow: "visible",
|
|
3029
|
+
display: expanded ? "block" : "none"
|
|
3004
3030
|
},
|
|
3005
|
-
children: /* @__PURE__ */ jsx15(
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3031
|
+
children: /* @__PURE__ */ jsx15(Drawer, { children: children || components.map((componentKey, i) => {
|
|
3032
|
+
return /* @__PURE__ */ jsx15(
|
|
3033
|
+
ComponentListItem,
|
|
3034
|
+
{
|
|
3035
|
+
label: config.components[componentKey]["label"] ?? componentKey,
|
|
3036
|
+
name: componentKey,
|
|
3037
|
+
index: i
|
|
3012
3038
|
},
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
"div",
|
|
3017
|
-
{
|
|
3018
|
-
style: {
|
|
3019
|
-
position: "absolute",
|
|
3020
|
-
top: 0,
|
|
3021
|
-
left: 0,
|
|
3022
|
-
width: "100%",
|
|
3023
|
-
height: `${virtualItem.size}px`,
|
|
3024
|
-
transform: `translateY(${virtualItem.start}px)`
|
|
3025
|
-
},
|
|
3026
|
-
children: /* @__PURE__ */ jsx15(
|
|
3027
|
-
ComponentListItem,
|
|
3028
|
-
{
|
|
3029
|
-
label: config.components[componentKey]["label"] ?? componentKey,
|
|
3030
|
-
name: componentKey
|
|
3031
|
-
}
|
|
3032
|
-
)
|
|
3033
|
-
},
|
|
3034
|
-
virtualItem.key
|
|
3035
|
-
);
|
|
3036
|
-
}) })
|
|
3037
|
-
}
|
|
3038
|
-
)
|
|
3039
|
+
componentKey
|
|
3040
|
+
);
|
|
3041
|
+
}) })
|
|
3039
3042
|
}
|
|
3040
3043
|
)
|
|
3041
3044
|
] });
|
|
@@ -3045,7 +3048,7 @@ ComponentList.Item = ComponentListItem;
|
|
|
3045
3048
|
// lib/use-component-list.tsx
|
|
3046
3049
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3047
3050
|
var useComponentList = () => {
|
|
3048
|
-
const [componentList, setComponentList] =
|
|
3051
|
+
const [componentList, setComponentList] = useState8();
|
|
3049
3052
|
const config = useAppStore((s) => s.config);
|
|
3050
3053
|
const uiComponentList = useAppStore((s) => s.state.ui.componentList);
|
|
3051
3054
|
useEffect12(() => {
|
|
@@ -3119,10 +3122,18 @@ var useComponentList = () => {
|
|
|
3119
3122
|
};
|
|
3120
3123
|
|
|
3121
3124
|
// components/CredBuild/components/Components/index.tsx
|
|
3122
|
-
import { useMemo as useMemo8 } from "react";
|
|
3123
|
-
|
|
3125
|
+
import { useMemo as useMemo8, useState as useState9 } from "react";
|
|
3126
|
+
|
|
3127
|
+
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Components/styles.module.css#css-module
|
|
3128
|
+
var styles_module_default6 = { "CredBuildComponents": "_CredBuildComponents_17idm_1", "CredBuildComponents-searchContainer": "_CredBuildComponents-searchContainer_17idm_7", "CredBuildComponents-searchWrapper": "_CredBuildComponents-searchWrapper_17idm_16", "CredBuildComponents-searchInput": "_CredBuildComponents-searchInput_17idm_23", "CredBuildComponents-searchIcon": "_CredBuildComponents-searchIcon_17idm_42", "CredBuildComponents-clearButton": "_CredBuildComponents-clearButton_17idm_49", "CredBuildComponents-listContainer": "_CredBuildComponents-listContainer_17idm_69", "CredBuildComponents-noResults": "_CredBuildComponents-noResults_17idm_74" };
|
|
3129
|
+
|
|
3130
|
+
// components/CredBuild/components/Components/index.tsx
|
|
3131
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3132
|
+
var getClassName6 = get_class_name_factory_default("CredBuildComponents", styles_module_default6);
|
|
3124
3133
|
var Components = () => {
|
|
3125
3134
|
const overrides = useAppStore((s) => s.overrides);
|
|
3135
|
+
const config = useAppStore((s) => s.config);
|
|
3136
|
+
const [searchTerm, setSearchTerm] = useState9("");
|
|
3126
3137
|
const componentList = useComponentList();
|
|
3127
3138
|
const Wrapper = useMemo8(() => {
|
|
3128
3139
|
if (overrides.components) {
|
|
@@ -3132,36 +3143,107 @@ var Components = () => {
|
|
|
3132
3143
|
}
|
|
3133
3144
|
return overrides.components || overrides.drawer || "div";
|
|
3134
3145
|
}, [overrides]);
|
|
3135
|
-
|
|
3146
|
+
const matchingComponents = useMemo8(() => {
|
|
3147
|
+
if (!searchTerm.trim()) return [];
|
|
3148
|
+
return Object.keys(config.components).filter((componentKey) => {
|
|
3149
|
+
const componentConf = config.components[componentKey] || {};
|
|
3150
|
+
const label = componentConf["label"] ?? componentKey;
|
|
3151
|
+
return label.toLowerCase().includes(searchTerm.toLowerCase()) || componentKey.toLowerCase().includes(searchTerm.toLowerCase());
|
|
3152
|
+
});
|
|
3153
|
+
}, [searchTerm, config.components]);
|
|
3154
|
+
return /* @__PURE__ */ jsxs8(Wrapper, { className: getClassName6(), children: [
|
|
3155
|
+
/* @__PURE__ */ jsx17("div", { className: getClassName6("searchContainer"), children: /* @__PURE__ */ jsxs8("div", { className: getClassName6("searchWrapper"), children: [
|
|
3156
|
+
/* @__PURE__ */ jsx17(Search, { size: 14, className: getClassName6("searchIcon") }),
|
|
3157
|
+
/* @__PURE__ */ jsx17(
|
|
3158
|
+
"input",
|
|
3159
|
+
{
|
|
3160
|
+
type: "text",
|
|
3161
|
+
className: getClassName6("searchInput"),
|
|
3162
|
+
placeholder: "Search blocks...",
|
|
3163
|
+
value: searchTerm,
|
|
3164
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
3165
|
+
}
|
|
3166
|
+
),
|
|
3167
|
+
searchTerm && /* @__PURE__ */ jsx17(
|
|
3168
|
+
"button",
|
|
3169
|
+
{
|
|
3170
|
+
type: "button",
|
|
3171
|
+
className: getClassName6("clearButton"),
|
|
3172
|
+
onClick: () => setSearchTerm(""),
|
|
3173
|
+
title: "Clear search",
|
|
3174
|
+
children: /* @__PURE__ */ jsx17(X, { size: 12 })
|
|
3175
|
+
}
|
|
3176
|
+
)
|
|
3177
|
+
] }) }),
|
|
3178
|
+
/* @__PURE__ */ jsx17("div", { className: getClassName6("listContainer"), children: searchTerm.trim() ? matchingComponents.length > 0 ? /* @__PURE__ */ jsxs8("div", { style: { padding: "10px 12px" }, children: [
|
|
3179
|
+
/* @__PURE__ */ jsxs8(
|
|
3180
|
+
"div",
|
|
3181
|
+
{
|
|
3182
|
+
style: {
|
|
3183
|
+
fontSize: "10px",
|
|
3184
|
+
fontWeight: 700,
|
|
3185
|
+
color: "var(--cb-silver-muted)",
|
|
3186
|
+
marginBottom: "8px",
|
|
3187
|
+
textTransform: "uppercase",
|
|
3188
|
+
letterSpacing: "0.05em"
|
|
3189
|
+
},
|
|
3190
|
+
children: [
|
|
3191
|
+
"Search Results (",
|
|
3192
|
+
matchingComponents.length,
|
|
3193
|
+
")"
|
|
3194
|
+
]
|
|
3195
|
+
}
|
|
3196
|
+
),
|
|
3197
|
+
/* @__PURE__ */ jsx17(Drawer, { children: /* @__PURE__ */ jsx17("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: matchingComponents.map((componentName, i) => {
|
|
3198
|
+
const componentConf = config.components[componentName] || {};
|
|
3199
|
+
return /* @__PURE__ */ jsx17(
|
|
3200
|
+
ComponentList.Item,
|
|
3201
|
+
{
|
|
3202
|
+
label: componentConf["label"] ?? componentName,
|
|
3203
|
+
name: componentName,
|
|
3204
|
+
index: i
|
|
3205
|
+
},
|
|
3206
|
+
componentName
|
|
3207
|
+
);
|
|
3208
|
+
}) }) })
|
|
3209
|
+
] }) : /* @__PURE__ */ jsxs8("div", { className: getClassName6("noResults"), children: [
|
|
3210
|
+
/* @__PURE__ */ jsx17(Inbox, { size: 20, strokeWidth: 1.5 }),
|
|
3211
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
3212
|
+
'No blocks found matching "',
|
|
3213
|
+
searchTerm,
|
|
3214
|
+
'"'
|
|
3215
|
+
] })
|
|
3216
|
+
] }) : componentList ? componentList : /* @__PURE__ */ jsx17(ComponentList, { id: "all" }) })
|
|
3217
|
+
] });
|
|
3136
3218
|
};
|
|
3137
3219
|
|
|
3138
3220
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/blocks/styles.module.css#css-module
|
|
3139
|
-
var
|
|
3221
|
+
var styles_module_default7 = { "BlocksPlugin": "_BlocksPlugin_1ey1i_1" };
|
|
3140
3222
|
|
|
3141
3223
|
// plugins/blocks/index.tsx
|
|
3142
3224
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3143
|
-
var
|
|
3225
|
+
var getClassName7 = get_class_name_factory_default("BlocksPlugin", styles_module_default7);
|
|
3144
3226
|
var blocksPlugin = () => ({
|
|
3145
3227
|
name: "blocks",
|
|
3146
3228
|
label: "Blocks",
|
|
3147
|
-
render: () => /* @__PURE__ */ jsx18("div", { className:
|
|
3229
|
+
render: () => /* @__PURE__ */ jsx18("div", { className: getClassName7(), children: /* @__PURE__ */ jsx18(Components, {}) }),
|
|
3148
3230
|
icon: /* @__PURE__ */ jsx18(Shapes, {})
|
|
3149
3231
|
});
|
|
3150
3232
|
|
|
3151
3233
|
// css-module:/home/crediblemark/Project/Credibuild/components/LayerTree/styles.module.css#css-module
|
|
3152
|
-
var
|
|
3234
|
+
var styles_module_default8 = { "LayerTree": "_LayerTree_nus40_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_nus40_11", "LayerTree-helper": "_LayerTree-helper_nus40_17", "Layer": "_Layer_nus40_1", "Layer-inner": "_Layer-inner_nus40_29", "Layer--containsZone": "_Layer--containsZone_nus40_35", "Layer-clickable": "_Layer-clickable_nus40_39", "Layer--isSelected": "_Layer--isSelected_nus40_58", "Layer-chevron": "_Layer-chevron_nus40_79", "Layer--childIsSelected": "_Layer--childIsSelected_nus40_80", "Layer-zones": "_Layer-zones_nus40_84", "Layer-title": "_Layer-title_nus40_98", "Layer-name": "_Layer-name_nus40_107", "Layer-icon": "_Layer-icon_nus40_113", "Layer-zoneIcon": "_Layer-zoneIcon_nus40_118" };
|
|
3153
3235
|
|
|
3154
3236
|
// components/LayerTree/index.tsx
|
|
3155
3237
|
import {
|
|
3156
3238
|
forwardRef as forwardRef2,
|
|
3157
3239
|
useCallback as useCallback11,
|
|
3158
3240
|
useContext as useContext7,
|
|
3159
|
-
useRef as
|
|
3241
|
+
useRef as useRef9
|
|
3160
3242
|
} from "react";
|
|
3161
|
-
import { useVirtualizer as
|
|
3162
|
-
import { Fragment as Fragment5, jsx as jsx19, jsxs as
|
|
3163
|
-
var
|
|
3164
|
-
var getClassNameLayer = get_class_name_factory_default("Layer",
|
|
3243
|
+
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
3244
|
+
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3245
|
+
var getClassName8 = get_class_name_factory_default("LayerTree", styles_module_default8);
|
|
3246
|
+
var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default8);
|
|
3165
3247
|
var DEFAULT_LAYER_ROW_HEIGHT = 32;
|
|
3166
3248
|
var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
|
|
3167
3249
|
var MIN_VIRTUALIZED_LAYER_COUNT = 25;
|
|
@@ -3295,7 +3377,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3295
3377
|
if (t.includes("container") || t.includes("layout") || t.includes("flex")) return /* @__PURE__ */ jsx19(Box, { size: "14", strokeWidth: 2.5 });
|
|
3296
3378
|
return /* @__PURE__ */ jsx19(LayoutGrid, { size: "14", strokeWidth: 2.5 });
|
|
3297
3379
|
};
|
|
3298
|
-
return /* @__PURE__ */
|
|
3380
|
+
return /* @__PURE__ */ jsxs9(
|
|
3299
3381
|
"li",
|
|
3300
3382
|
{
|
|
3301
3383
|
ref,
|
|
@@ -3308,7 +3390,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3308
3390
|
"data-index": dataIndex,
|
|
3309
3391
|
"data-credbuild-layer-tree-id": node.itemId,
|
|
3310
3392
|
children: [
|
|
3311
|
-
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs9(
|
|
3312
3394
|
"button",
|
|
3313
3395
|
{
|
|
3314
3396
|
type: "button",
|
|
@@ -3341,7 +3423,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3341
3423
|
children: /* @__PURE__ */ jsx19(ChevronDown, { size: "12" })
|
|
3342
3424
|
}
|
|
3343
3425
|
),
|
|
3344
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsxs9("div", { className: getClassNameLayer("title"), children: [
|
|
3345
3427
|
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("icon"), children: getLayerIcon(node.componentType) }),
|
|
3346
3428
|
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("name"), children: node.label })
|
|
3347
3429
|
] })
|
|
@@ -3375,9 +3457,9 @@ var LayerTreeZone = ({
|
|
|
3375
3457
|
tree
|
|
3376
3458
|
}) => {
|
|
3377
3459
|
const shouldVirtualize = depth === 0 && tree.items.length >= MIN_VIRTUALIZED_LAYER_COUNT;
|
|
3378
|
-
return /* @__PURE__ */
|
|
3379
|
-
tree.label && /* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */ jsx19("div", { className:
|
|
3460
|
+
return /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
3461
|
+
tree.label && /* @__PURE__ */ jsxs9("div", { className: getClassName8("zoneTitle"), children: [
|
|
3462
|
+
/* @__PURE__ */ jsx19("div", { className: getClassName8("zoneIcon"), children: /* @__PURE__ */ jsx19(Layers, { size: "16" }) }),
|
|
3381
3463
|
tree.label
|
|
3382
3464
|
] }),
|
|
3383
3465
|
shouldVirtualize ? /* @__PURE__ */ jsx19(
|
|
@@ -3405,8 +3487,8 @@ var StaticLayerTreeItems = ({
|
|
|
3405
3487
|
selectedPathIds,
|
|
3406
3488
|
tree
|
|
3407
3489
|
}) => {
|
|
3408
|
-
return /* @__PURE__ */
|
|
3409
|
-
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className:
|
|
3490
|
+
return /* @__PURE__ */ jsxs9("ul", { className: getClassName8(), children: [
|
|
3491
|
+
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className: getClassName8("helper"), children: "No items" }),
|
|
3410
3492
|
tree.items.map((node) => /* @__PURE__ */ jsx19(
|
|
3411
3493
|
Layer,
|
|
3412
3494
|
{
|
|
@@ -3427,8 +3509,8 @@ var VirtualizedLayerTreeItems = ({
|
|
|
3427
3509
|
selectedPathIds,
|
|
3428
3510
|
tree
|
|
3429
3511
|
}) => {
|
|
3430
|
-
const listRef =
|
|
3431
|
-
const virtualizer =
|
|
3512
|
+
const listRef = useRef9(null);
|
|
3513
|
+
const virtualizer = useVirtualizer2({
|
|
3432
3514
|
count: tree.items.length,
|
|
3433
3515
|
estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
|
|
3434
3516
|
getItemKey: (index) => tree.items[index].itemId,
|
|
@@ -3495,8 +3577,8 @@ var VirtualizedLayerTreeItems = ({
|
|
|
3495
3577
|
)
|
|
3496
3578
|
);
|
|
3497
3579
|
}
|
|
3498
|
-
return /* @__PURE__ */
|
|
3499
|
-
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className:
|
|
3580
|
+
return /* @__PURE__ */ jsxs9("ul", { className: getClassName8(), ref: listRef, children: [
|
|
3581
|
+
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className: getClassName8("helper"), children: "No items" }),
|
|
3500
3582
|
renderedItems
|
|
3501
3583
|
] });
|
|
3502
3584
|
};
|
|
@@ -3569,20 +3651,20 @@ var Outline = () => {
|
|
|
3569
3651
|
};
|
|
3570
3652
|
|
|
3571
3653
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/outline/styles.module.css#css-module
|
|
3572
|
-
var
|
|
3654
|
+
var styles_module_default9 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
|
|
3573
3655
|
|
|
3574
3656
|
// plugins/outline/index.tsx
|
|
3575
3657
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3576
|
-
var
|
|
3658
|
+
var getClassName9 = get_class_name_factory_default("OutlinePlugin", styles_module_default9);
|
|
3577
3659
|
var outlinePlugin = () => ({
|
|
3578
3660
|
name: "outline",
|
|
3579
3661
|
label: "Outline",
|
|
3580
|
-
render: () => /* @__PURE__ */ jsx21("div", { className:
|
|
3662
|
+
render: () => /* @__PURE__ */ jsx21("div", { className: getClassName9(), children: /* @__PURE__ */ jsx21(Outline, {}) }),
|
|
3581
3663
|
icon: /* @__PURE__ */ jsx21(List, {})
|
|
3582
3664
|
});
|
|
3583
3665
|
|
|
3584
3666
|
// css-module:/home/crediblemark/Project/Credibuild/components/Breadcrumbs/styles.module.css#css-module
|
|
3585
|
-
var
|
|
3667
|
+
var styles_module_default10 = { "Breadcrumbs": "_Breadcrumbs_1e0gb_1", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1e0gb_7", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1e0gb_7" };
|
|
3586
3668
|
|
|
3587
3669
|
// lib/use-breadcrumbs.ts
|
|
3588
3670
|
import { useMemo as useMemo10 } from "react";
|
|
@@ -3621,21 +3703,21 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
3621
3703
|
};
|
|
3622
3704
|
|
|
3623
3705
|
// components/Breadcrumbs/index.tsx
|
|
3624
|
-
import { jsx as jsx22, jsxs as
|
|
3625
|
-
var
|
|
3706
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3707
|
+
var getClassName10 = get_class_name_factory_default("Breadcrumbs", styles_module_default10);
|
|
3626
3708
|
var Breadcrumbs = ({
|
|
3627
3709
|
children,
|
|
3628
3710
|
numParents = 1
|
|
3629
3711
|
}) => {
|
|
3630
3712
|
const setUi = useAppStore((s) => s.setUi);
|
|
3631
3713
|
const breadcrumbs = useBreadcrumbs(numParents);
|
|
3632
|
-
return /* @__PURE__ */
|
|
3633
|
-
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */
|
|
3714
|
+
return /* @__PURE__ */ jsxs10("div", { className: getClassName10(), children: [
|
|
3715
|
+
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs10("div", { className: getClassName10("breadcrumb"), children: [
|
|
3634
3716
|
/* @__PURE__ */ jsx22(
|
|
3635
3717
|
"button",
|
|
3636
3718
|
{
|
|
3637
3719
|
type: "button",
|
|
3638
|
-
className:
|
|
3720
|
+
className: getClassName10("breadcrumbLabel"),
|
|
3639
3721
|
onClick: () => setUi({ itemSelector: breadcrumb.selector }),
|
|
3640
3722
|
children: breadcrumb.label
|
|
3641
3723
|
}
|
|
@@ -3647,7 +3729,7 @@ var Breadcrumbs = ({
|
|
|
3647
3729
|
};
|
|
3648
3730
|
|
|
3649
3731
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Fields/styles.module.css#css-module
|
|
3650
|
-
var
|
|
3732
|
+
var styles_module_default11 = { "CredBuildFields": "_CredBuildFields_53gu7_1", "CredBuildFields--isLoading": "_CredBuildFields--isLoading_53gu7_6", "CredBuildFields-loadingOverlay": "_CredBuildFields-loadingOverlay_53gu7_10", "CredBuildFields-loadingOverlayInner": "_CredBuildFields-loadingOverlayInner_53gu7_25", "CredBuildFields-field": "_CredBuildFields-field_53gu7_32", "CredBuildFields--wrapFields": "_CredBuildFields--wrapFields_53gu7_36" };
|
|
3651
3733
|
|
|
3652
3734
|
// components/CredBuild/components/Fields/index.tsx
|
|
3653
3735
|
import {
|
|
@@ -3658,8 +3740,8 @@ import {
|
|
|
3658
3740
|
useMemo as useMemo11
|
|
3659
3741
|
} from "react";
|
|
3660
3742
|
import { useShallow as useShallow5 } from "zustand/react/shallow";
|
|
3661
|
-
import { Fragment as Fragment6, jsx as jsx23, jsxs as
|
|
3662
|
-
var
|
|
3743
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3744
|
+
var getClassName11 = get_class_name_factory_default("CredBuildFields", styles_module_default11);
|
|
3663
3745
|
var DefaultFields = ({
|
|
3664
3746
|
children
|
|
3665
3747
|
}) => {
|
|
@@ -3745,7 +3827,7 @@ var FieldsChildInner = ({ fieldName }) => {
|
|
|
3745
3827
|
}, [appStore, fieldStore, fieldName]);
|
|
3746
3828
|
if (!field || !id || !visible) return null;
|
|
3747
3829
|
if (field.type === "slot") return null;
|
|
3748
|
-
return /* @__PURE__ */ jsx23("div", { className:
|
|
3830
|
+
return /* @__PURE__ */ jsx23("div", { className: getClassName11("field"), children: /* @__PURE__ */ jsx23(
|
|
3749
3831
|
AutoFieldPrivate,
|
|
3750
3832
|
{
|
|
3751
3833
|
field,
|
|
@@ -3786,16 +3868,16 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
3786
3868
|
);
|
|
3787
3869
|
const isLoading = fieldsLoading || componentResolving;
|
|
3788
3870
|
const Wrapper = useMemo11(() => overrides.fields || DefaultFields, [overrides]);
|
|
3789
|
-
return /* @__PURE__ */
|
|
3871
|
+
return /* @__PURE__ */ jsxs11(
|
|
3790
3872
|
"form",
|
|
3791
3873
|
{
|
|
3792
|
-
className:
|
|
3874
|
+
className: getClassName11({ wrapFields }),
|
|
3793
3875
|
onSubmit: (e) => {
|
|
3794
3876
|
e.preventDefault();
|
|
3795
3877
|
},
|
|
3796
3878
|
children: [
|
|
3797
3879
|
/* @__PURE__ */ jsx23(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx23(FieldsChildMemo, { fieldName }, fieldName)) }),
|
|
3798
|
-
isLoading && /* @__PURE__ */ jsx23("div", { className:
|
|
3880
|
+
isLoading && /* @__PURE__ */ jsx23("div", { className: getClassName11("loadingOverlay"), children: /* @__PURE__ */ jsx23("div", { className: getClassName11("loadingOverlayInner"), children: /* @__PURE__ */ jsx23(Loader, { size: 16 }) }) })
|
|
3799
3881
|
]
|
|
3800
3882
|
}
|
|
3801
3883
|
);
|
|
@@ -3803,11 +3885,11 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
3803
3885
|
var Fields = memo5(FieldsInternal);
|
|
3804
3886
|
|
|
3805
3887
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/fields/styles.module.css#css-module
|
|
3806
|
-
var
|
|
3888
|
+
var styles_module_default12 = { "FieldsPlugin": "_FieldsPlugin_6as57_1", "FieldsPlugin-header": "_FieldsPlugin-header_6as57_7" };
|
|
3807
3889
|
|
|
3808
3890
|
// plugins/fields/index.tsx
|
|
3809
|
-
import { jsx as jsx24, jsxs as
|
|
3810
|
-
var
|
|
3891
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3892
|
+
var getClassName12 = get_class_name_factory_default("FieldsPlugin", styles_module_default12);
|
|
3811
3893
|
var CurrentTitle = () => {
|
|
3812
3894
|
const label = useAppStore((s) => {
|
|
3813
3895
|
const selectedItem = s.selectedItem;
|
|
@@ -3818,8 +3900,8 @@ var CurrentTitle = () => {
|
|
|
3818
3900
|
var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
3819
3901
|
name: "fields",
|
|
3820
3902
|
label: "Fields",
|
|
3821
|
-
render: () => /* @__PURE__ */
|
|
3822
|
-
/* @__PURE__ */ jsx24("div", { className:
|
|
3903
|
+
render: () => /* @__PURE__ */ jsxs12("div", { className: getClassName12(), children: [
|
|
3904
|
+
/* @__PURE__ */ jsx24("div", { className: getClassName12("header"), children: /* @__PURE__ */ jsx24(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx24(CurrentTitle, {}) }) }),
|
|
3823
3905
|
/* @__PURE__ */ jsx24(Fields, {})
|
|
3824
3906
|
] }),
|
|
3825
3907
|
icon: /* @__PURE__ */ jsx24(RectangleEllipsis, {}),
|
|
@@ -3831,12 +3913,12 @@ import {
|
|
|
3831
3913
|
useCallback as useCallback22,
|
|
3832
3914
|
useEffect as useEffect23,
|
|
3833
3915
|
useMemo as useMemo21,
|
|
3834
|
-
useRef as
|
|
3916
|
+
useRef as useRef17,
|
|
3835
3917
|
useState as useState18
|
|
3836
3918
|
} from "react";
|
|
3837
3919
|
|
|
3838
3920
|
// components/CredBuild/components/Preview/index.tsx
|
|
3839
|
-
import { useCallback as useCallback14, useEffect as useEffect15, useRef as
|
|
3921
|
+
import { useCallback as useCallback14, useEffect as useEffect15, useRef as useRef11, useMemo as useMemo13 } from "react";
|
|
3840
3922
|
|
|
3841
3923
|
// components/AutoFrame/index.tsx
|
|
3842
3924
|
import {
|
|
@@ -3844,7 +3926,7 @@ import {
|
|
|
3844
3926
|
useCallback as useCallback13,
|
|
3845
3927
|
useContext as useContext9,
|
|
3846
3928
|
useEffect as useEffect14,
|
|
3847
|
-
useRef as
|
|
3929
|
+
useRef as useRef10,
|
|
3848
3930
|
useState as useState10
|
|
3849
3931
|
} from "react";
|
|
3850
3932
|
import hash from "object-hash";
|
|
@@ -4086,8 +4168,8 @@ function AutoFrame({
|
|
|
4086
4168
|
const handleStylesLoaded = useCallback13(() => {
|
|
4087
4169
|
setStylesLoaded(true);
|
|
4088
4170
|
}, []);
|
|
4089
|
-
const onReadyRef =
|
|
4090
|
-
const onNotReadyRef =
|
|
4171
|
+
const onReadyRef = useRef10(onReady);
|
|
4172
|
+
const onNotReadyRef = useRef10(onNotReady);
|
|
4091
4173
|
useEffect14(() => {
|
|
4092
4174
|
onReadyRef.current = onReady;
|
|
4093
4175
|
onNotReadyRef.current = onNotReady;
|
|
@@ -4139,7 +4221,7 @@ AutoFrame.displayName = "AutoFrame";
|
|
|
4139
4221
|
var AutoFrame_default = AutoFrame;
|
|
4140
4222
|
|
|
4141
4223
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Preview/styles.module.css#css-module
|
|
4142
|
-
var
|
|
4224
|
+
var styles_module_default13 = { "CredBuildPreview": "_CredBuildPreview_1z08a_1", "CredBuildPreview-frame": "_CredBuildPreview-frame_1z08a_6" };
|
|
4143
4225
|
|
|
4144
4226
|
// lib/bubble-pointer-event.ts
|
|
4145
4227
|
var BaseEvent = typeof PointerEvent !== "undefined" ? PointerEvent : Event;
|
|
@@ -4161,7 +4243,7 @@ var BubbledPointerEvent = class extends BaseEvent {
|
|
|
4161
4243
|
|
|
4162
4244
|
// components/CredBuild/components/Preview/index.tsx
|
|
4163
4245
|
import { Fragment as Fragment8, jsx as jsx26 } from "react/jsx-runtime";
|
|
4164
|
-
var
|
|
4246
|
+
var getClassName13 = get_class_name_factory_default("CredBuildPreview", styles_module_default13);
|
|
4165
4247
|
var useBubbleIframeEvents = (ref) => {
|
|
4166
4248
|
const status = useAppStore((s) => s.status);
|
|
4167
4249
|
useEffect15(() => {
|
|
@@ -4233,7 +4315,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4233
4315
|
);
|
|
4234
4316
|
const Frame = useMemo13(() => overrides.iframe, [overrides]);
|
|
4235
4317
|
const rootProps = root.props || root;
|
|
4236
|
-
const ref =
|
|
4318
|
+
const ref = useRef11(null);
|
|
4237
4319
|
useBubbleIframeEvents(ref);
|
|
4238
4320
|
const inner = !renderData ? /* @__PURE__ */ jsx26(
|
|
4239
4321
|
Page,
|
|
@@ -4257,7 +4339,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4257
4339
|
return /* @__PURE__ */ jsx26(
|
|
4258
4340
|
"div",
|
|
4259
4341
|
{
|
|
4260
|
-
className:
|
|
4342
|
+
className: getClassName13(),
|
|
4261
4343
|
id,
|
|
4262
4344
|
"data-credbuild-preview": true,
|
|
4263
4345
|
onClick: (e) => {
|
|
@@ -4270,7 +4352,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4270
4352
|
AutoFrame_default,
|
|
4271
4353
|
{
|
|
4272
4354
|
id: "preview-frame",
|
|
4273
|
-
className:
|
|
4355
|
+
className: getClassName13("frame"),
|
|
4274
4356
|
"data-rfd-iframe": true,
|
|
4275
4357
|
onReady: () => {
|
|
4276
4358
|
setStatus("READY");
|
|
@@ -4290,7 +4372,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4290
4372
|
"div",
|
|
4291
4373
|
{
|
|
4292
4374
|
id: "preview-frame",
|
|
4293
|
-
className:
|
|
4375
|
+
className: getClassName13("frame"),
|
|
4294
4376
|
ref,
|
|
4295
4377
|
"data-credbuild-entry": true,
|
|
4296
4378
|
children: inner
|
|
@@ -4367,7 +4449,7 @@ function PropsProvider(props) {
|
|
|
4367
4449
|
var usePropsContext = () => useContext10(propsContext);
|
|
4368
4450
|
|
|
4369
4451
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Layout/styles.module.css#css-module
|
|
4370
|
-
var
|
|
4452
|
+
var styles_module_default14 = { "CredBuildLayout": "_CredBuildLayout_14aaz_1", "CredBuildLayout-inner": "_CredBuildLayout-inner_14aaz_8", "CredBuildLayout--leftSideBarVisible": "_CredBuildLayout--leftSideBarVisible_14aaz_29", "CredBuildLayout--rightSideBarVisible": "_CredBuildLayout--rightSideBarVisible_14aaz_33", "CredBuild--hidePlugins": "_CredBuild--hidePlugins_14aaz_37", "CredBuildLayout-item": "_CredBuildLayout-item_14aaz_43", "CredBuildLayout-header": "_CredBuildLayout-header_14aaz_49", "CredBuildLayout-left": "_CredBuildLayout-left_14aaz_54", "CredBuildLayout-editor": "_CredBuildLayout-editor_14aaz_67", "CredBuildLayout-right": "_CredBuildLayout-right_14aaz_75", "CredBuildLayout-sidebar": "_CredBuildLayout-sidebar_14aaz_92", "CredBuildPluginTab": "_CredBuildPluginTab_14aaz_107", "CredBuildPluginTab--visible": "_CredBuildPluginTab--visible_14aaz_114", "CredBuildPluginTab-body": "_CredBuildPluginTab-body_14aaz_118", "CredBuildLayout--mounted": "_CredBuildLayout--mounted_14aaz_134" };
|
|
4371
4453
|
|
|
4372
4454
|
// lib/use-inject-css.ts
|
|
4373
4455
|
import { useEffect as useEffect16, useState as useState11 } from "react";
|
|
@@ -4421,7 +4503,7 @@ import {
|
|
|
4421
4503
|
useCallback as useCallback16,
|
|
4422
4504
|
useEffect as useEffect17,
|
|
4423
4505
|
useMemo as useMemo15,
|
|
4424
|
-
useRef as
|
|
4506
|
+
useRef as useRef12,
|
|
4425
4507
|
useState as useState12
|
|
4426
4508
|
} from "react";
|
|
4427
4509
|
import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
|
|
@@ -4755,7 +4837,7 @@ import { jsx as jsx29 } from "react/jsx-runtime";
|
|
|
4755
4837
|
var DEBUG2 = false;
|
|
4756
4838
|
var AREA_CHANGE_DEBOUNCE_MS = 100;
|
|
4757
4839
|
var useTempDisableFallback = (timeout2) => {
|
|
4758
|
-
const lastFallbackDisable =
|
|
4840
|
+
const lastFallbackDisable = useRef12(null);
|
|
4759
4841
|
return useCallback16((manager) => {
|
|
4760
4842
|
collisionStore.setState({ fallbackEnabled: false });
|
|
4761
4843
|
const fallbackId = generateId();
|
|
@@ -4775,7 +4857,7 @@ var DragDropContextClient = ({
|
|
|
4775
4857
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
4776
4858
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
4777
4859
|
const appStore = useAppStoreApi();
|
|
4778
|
-
const debouncedParamsRef =
|
|
4860
|
+
const debouncedParamsRef = useRef12(null);
|
|
4779
4861
|
const tempDisableFallback = useTempDisableFallback(100);
|
|
4780
4862
|
const [zoneStore] = useState12(() => {
|
|
4781
4863
|
const rootVirtualizers = /* @__PURE__ */ new Map();
|
|
@@ -4921,8 +5003,8 @@ var DragDropContextClient = ({
|
|
|
4921
5003
|
]);
|
|
4922
5004
|
const sensors = useSensors();
|
|
4923
5005
|
const [dragListeners, setDragListeners] = useState12({});
|
|
4924
|
-
const dragMode =
|
|
4925
|
-
const initialSelector =
|
|
5006
|
+
const dragMode = useRef12(null);
|
|
5007
|
+
const initialSelector = useRef12(void 0);
|
|
4926
5008
|
const nextContextValue = useMemo15(
|
|
4927
5009
|
() => ({
|
|
4928
5010
|
mode: "edit",
|
|
@@ -5181,11 +5263,11 @@ var DragDropContext = ({
|
|
|
5181
5263
|
import { memo as memo6, useCallback as useCallback17, useMemo as useMemo18, useState as useState14 } from "react";
|
|
5182
5264
|
|
|
5183
5265
|
// css-module:/home/crediblemark/Project/Credibuild/components/MenuBar/styles.module.css#css-module
|
|
5184
|
-
var
|
|
5266
|
+
var styles_module_default15 = { "MenuBar": "_MenuBar_1m2ld_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_1m2ld_14", "MenuBar-inner": "_MenuBar-inner_1m2ld_29", "MenuBar-history": "_MenuBar-history_1m2ld_45" };
|
|
5185
5267
|
|
|
5186
5268
|
// components/MenuBar/index.tsx
|
|
5187
|
-
import { Fragment as Fragment10, jsx as jsx30, jsxs as
|
|
5188
|
-
var
|
|
5269
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5270
|
+
var getClassName14 = get_class_name_factory_default("MenuBar", styles_module_default15);
|
|
5189
5271
|
function MenuBar({
|
|
5190
5272
|
menuOpen = false,
|
|
5191
5273
|
renderHeaderActions,
|
|
@@ -5198,7 +5280,7 @@ function MenuBar({
|
|
|
5198
5280
|
return /* @__PURE__ */ jsx30(
|
|
5199
5281
|
"div",
|
|
5200
5282
|
{
|
|
5201
|
-
className:
|
|
5283
|
+
className: getClassName14({ menuOpen }),
|
|
5202
5284
|
onClick: (event) => {
|
|
5203
5285
|
const element = event.target;
|
|
5204
5286
|
if (window.matchMedia("(min-width: 638px)").matches) {
|
|
@@ -5208,8 +5290,8 @@ function MenuBar({
|
|
|
5208
5290
|
setMenuOpen(false);
|
|
5209
5291
|
}
|
|
5210
5292
|
},
|
|
5211
|
-
children: /* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5293
|
+
children: /* @__PURE__ */ jsxs13("div", { className: getClassName14("inner"), children: [
|
|
5294
|
+
/* @__PURE__ */ jsxs13("div", { className: getClassName14("history"), children: [
|
|
5213
5295
|
/* @__PURE__ */ jsx30(
|
|
5214
5296
|
IconButton,
|
|
5215
5297
|
{
|
|
@@ -5241,18 +5323,18 @@ function MenuBar({
|
|
|
5241
5323
|
import { useEffect as useEffect18, useMemo as useMemo16, useState as useState13 } from "react";
|
|
5242
5324
|
|
|
5243
5325
|
// css-module:/home/crediblemark/Project/Credibuild/components/ViewportControls/styles.module.css#css-module
|
|
5244
|
-
var
|
|
5326
|
+
var styles_module_default16 = { "ViewportControls": "_ViewportControls_gefvg_1", "ViewportControls--fullScreen": "_ViewportControls--fullScreen_gefvg_5", "ViewportControls-toggleButton": "_ViewportControls-toggleButton_gefvg_14", "ViewportControls--isExpanded": "_ViewportControls--isExpanded_gefvg_38", "ViewportControls-actions": "_ViewportControls-actions_gefvg_42", "ViewportControls-actionsInner": "_ViewportControls-actionsInner_gefvg_46", "ViewportControls-divider": "_ViewportControls-divider_gefvg_76", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_gefvg_83", "ViewportControls-zoom": "_ViewportControls-zoom_gefvg_83", "ViewportButton-inner": "_ViewportButton-inner_gefvg_114", "ViewportButton--isActive": "_ViewportButton--isActive_gefvg_122" };
|
|
5245
5327
|
|
|
5246
5328
|
// components/ViewportControls/index.tsx
|
|
5247
|
-
import { jsx as jsx31, jsxs as
|
|
5329
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5248
5330
|
var icons = {
|
|
5249
5331
|
Smartphone: /* @__PURE__ */ jsx31(Smartphone, { size: 16 }),
|
|
5250
5332
|
Tablet: /* @__PURE__ */ jsx31(Tablet, { size: 16 }),
|
|
5251
5333
|
Monitor: /* @__PURE__ */ jsx31(Monitor, { size: 16 }),
|
|
5252
5334
|
FullWidth: /* @__PURE__ */ jsx31(Expand, { size: 16 })
|
|
5253
5335
|
};
|
|
5254
|
-
var
|
|
5255
|
-
var getClassNameButton = get_class_name_factory_default("ViewportButton",
|
|
5336
|
+
var getClassName15 = get_class_name_factory_default("ViewportControls", styles_module_default16);
|
|
5337
|
+
var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default16);
|
|
5256
5338
|
var ActionButton = ({
|
|
5257
5339
|
children,
|
|
5258
5340
|
title,
|
|
@@ -5312,13 +5394,13 @@ var ViewportControls = ({
|
|
|
5312
5394
|
setActiveViewport(uiViewports.current.width);
|
|
5313
5395
|
}, [uiViewports.current.width, uiViewports]);
|
|
5314
5396
|
const [isExpanded, setIsExpanded] = useState13(false);
|
|
5315
|
-
return /* @__PURE__ */
|
|
5397
|
+
return /* @__PURE__ */ jsxs14(
|
|
5316
5398
|
"div",
|
|
5317
5399
|
{
|
|
5318
|
-
className:
|
|
5400
|
+
className: getClassName15({ isExpanded, fullScreen }),
|
|
5319
5401
|
suppressHydrationWarning: true,
|
|
5320
5402
|
children: [
|
|
5321
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5403
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("actions"), children: /* @__PURE__ */ jsxs14("div", { className: getClassName15("actionsInner"), children: [
|
|
5322
5404
|
viewports.map((viewport, i) => /* @__PURE__ */ jsx31(
|
|
5323
5405
|
ActionButton,
|
|
5324
5406
|
{
|
|
@@ -5332,7 +5414,7 @@ var ViewportControls = ({
|
|
|
5332
5414
|
},
|
|
5333
5415
|
i
|
|
5334
5416
|
)),
|
|
5335
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5417
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("divider") }),
|
|
5336
5418
|
/* @__PURE__ */ jsx31(
|
|
5337
5419
|
ActionButton,
|
|
5338
5420
|
{
|
|
@@ -5367,12 +5449,12 @@ var ViewportControls = ({
|
|
|
5367
5449
|
children: /* @__PURE__ */ jsx31(ZoomIn, { size: 16 })
|
|
5368
5450
|
}
|
|
5369
5451
|
),
|
|
5370
|
-
/* @__PURE__ */
|
|
5371
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5452
|
+
/* @__PURE__ */ jsxs14("div", { className: getClassName15("zoom"), children: [
|
|
5453
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("divider") }),
|
|
5372
5454
|
/* @__PURE__ */ jsx31(
|
|
5373
5455
|
"select",
|
|
5374
5456
|
{
|
|
5375
|
-
className:
|
|
5457
|
+
className: getClassName15("zoomSelect"),
|
|
5376
5458
|
value: zoom.toString(),
|
|
5377
5459
|
onClick: (e) => {
|
|
5378
5460
|
e.stopPropagation();
|
|
@@ -5395,7 +5477,7 @@ var ViewportControls = ({
|
|
|
5395
5477
|
/* @__PURE__ */ jsx31(
|
|
5396
5478
|
"button",
|
|
5397
5479
|
{
|
|
5398
|
-
className:
|
|
5480
|
+
className: getClassName15("toggleButton"),
|
|
5399
5481
|
title: "Toggle viewport menu",
|
|
5400
5482
|
onClick: () => setIsExpanded((s) => !s),
|
|
5401
5483
|
children: isExpanded ? /* @__PURE__ */ jsx31(X, { size: 16 }) : /* @__PURE__ */ jsx31(Monitor, { size: 16 })
|
|
@@ -5413,7 +5495,7 @@ import { useShallow as useShallow6 } from "zustand/react/shallow";
|
|
|
5413
5495
|
import {
|
|
5414
5496
|
createContext as createContext7,
|
|
5415
5497
|
useContext as useContext12,
|
|
5416
|
-
useRef as
|
|
5498
|
+
useRef as useRef13,
|
|
5417
5499
|
useMemo as useMemo17
|
|
5418
5500
|
} from "react";
|
|
5419
5501
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
@@ -5421,7 +5503,7 @@ var FrameContext = createContext7(null);
|
|
|
5421
5503
|
var FrameProvider = ({
|
|
5422
5504
|
children
|
|
5423
5505
|
}) => {
|
|
5424
|
-
const frameRef =
|
|
5506
|
+
const frameRef = useRef13(null);
|
|
5425
5507
|
const value = useMemo17(
|
|
5426
5508
|
() => ({
|
|
5427
5509
|
frameRef
|
|
@@ -5439,11 +5521,11 @@ var useCanvasFrame = () => {
|
|
|
5439
5521
|
};
|
|
5440
5522
|
|
|
5441
5523
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Header/styles.module.css#css-module
|
|
5442
|
-
var
|
|
5524
|
+
var styles_module_default17 = { "CredBuildHeader": "_CredBuildHeader_qzv5u_1", "CredBuildHeader-inner": "_CredBuildHeader-inner_qzv5u_20", "CredBuildHeader-viewportTools": "_CredBuildHeader-viewportTools_qzv5u_28", "CredBuildHeader-leftActions": "_CredBuildHeader-leftActions_qzv5u_35", "CredBuildHeader-toggle": "_CredBuildHeader-toggle_qzv5u_41", "CredBuildHeader-leftSideBarToggle": "_CredBuildHeader-leftSideBarToggle_qzv5u_47", "CredBuildHeader-rightSideBarToggle": "_CredBuildHeader-rightSideBarToggle_qzv5u_48", "CredBuildHeader-title": "_CredBuildHeader-title_qzv5u_52", "CredBuildHeader-path": "_CredBuildHeader-path_qzv5u_57", "CredBuildHeader-tools": "_CredBuildHeader-tools_qzv5u_68", "CredBuildHeader-menuButton": "_CredBuildHeader-menuButton_qzv5u_75" };
|
|
5443
5525
|
|
|
5444
5526
|
// components/CredBuild/components/Header/index.tsx
|
|
5445
|
-
import { Fragment as Fragment11, jsx as jsx33, jsxs as
|
|
5446
|
-
var
|
|
5527
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5528
|
+
var getClassName16 = get_class_name_factory_default("CredBuildHeader", styles_module_default17);
|
|
5447
5529
|
var HeaderInner = ({
|
|
5448
5530
|
hidePlugins,
|
|
5449
5531
|
theme
|
|
@@ -5539,7 +5621,7 @@ var HeaderInner = ({
|
|
|
5539
5621
|
return /* @__PURE__ */ jsx33(
|
|
5540
5622
|
CustomHeader,
|
|
5541
5623
|
{
|
|
5542
|
-
actions: /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */
|
|
5624
|
+
actions: /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsxs15(CustomHeaderActions, { children: [
|
|
5543
5625
|
/* @__PURE__ */ jsx33(
|
|
5544
5626
|
Button,
|
|
5545
5627
|
{
|
|
@@ -5565,14 +5647,14 @@ var HeaderInner = ({
|
|
|
5565
5647
|
children: /* @__PURE__ */ jsx33(
|
|
5566
5648
|
"header",
|
|
5567
5649
|
{
|
|
5568
|
-
className:
|
|
5650
|
+
className: getClassName16({
|
|
5569
5651
|
leftSideBarVisible,
|
|
5570
5652
|
rightSideBarVisible,
|
|
5571
5653
|
hidePlugins
|
|
5572
5654
|
}),
|
|
5573
|
-
children: /* @__PURE__ */
|
|
5574
|
-
/* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5655
|
+
children: /* @__PURE__ */ jsxs15("div", { className: getClassName16("inner"), children: [
|
|
5656
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("leftActions"), children: [
|
|
5657
|
+
/* @__PURE__ */ jsxs15("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
5576
5658
|
/* @__PURE__ */ jsx33(
|
|
5577
5659
|
Button,
|
|
5578
5660
|
{
|
|
@@ -5605,8 +5687,8 @@ var HeaderInner = ({
|
|
|
5605
5687
|
}
|
|
5606
5688
|
)
|
|
5607
5689
|
] }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5690
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("toggle"), children: [
|
|
5691
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("leftSideBarToggle"), children: /* @__PURE__ */ jsx33(
|
|
5610
5692
|
IconButton,
|
|
5611
5693
|
{
|
|
5612
5694
|
type: "button",
|
|
@@ -5617,7 +5699,7 @@ var HeaderInner = ({
|
|
|
5617
5699
|
children: /* @__PURE__ */ jsx33(PanelLeft, { size: 16, focusable: "false" })
|
|
5618
5700
|
}
|
|
5619
5701
|
) }),
|
|
5620
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5702
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("rightSideBarToggle"), children: /* @__PURE__ */ jsx33(
|
|
5621
5703
|
IconButton,
|
|
5622
5704
|
{
|
|
5623
5705
|
type: "button",
|
|
@@ -5629,12 +5711,12 @@ var HeaderInner = ({
|
|
|
5629
5711
|
}
|
|
5630
5712
|
) })
|
|
5631
5713
|
] }),
|
|
5632
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5714
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("title"), children: /* @__PURE__ */ jsxs15(Heading, { rank: "2", size: "xs", children: [
|
|
5633
5715
|
/* @__PURE__ */ jsx33("span", { style: { fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.08em", fontWeight: 600 }, children: headerTitle || rootTitle || "Page" }),
|
|
5634
|
-
headerPath && /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsx33("code", { className:
|
|
5716
|
+
headerPath && /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsx33("code", { className: getClassName16("path"), style: { fontSize: "10px", opacity: 0.6, marginLeft: "8px" }, children: headerPath }) })
|
|
5635
5717
|
] }) })
|
|
5636
5718
|
] }),
|
|
5637
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5719
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("viewportTools"), children: /* @__PURE__ */ jsx33(
|
|
5638
5720
|
ViewportControls,
|
|
5639
5721
|
{
|
|
5640
5722
|
fullScreen: _experimentalFullScreenCanvas,
|
|
@@ -5660,8 +5742,8 @@ var HeaderInner = ({
|
|
|
5660
5742
|
}
|
|
5661
5743
|
}
|
|
5662
5744
|
) }),
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5745
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("tools"), children: [
|
|
5746
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("menuButton"), children: /* @__PURE__ */ jsx33(
|
|
5665
5747
|
IconButton,
|
|
5666
5748
|
{
|
|
5667
5749
|
type: "button",
|
|
@@ -5678,7 +5760,7 @@ var HeaderInner = ({
|
|
|
5678
5760
|
dispatch,
|
|
5679
5761
|
onPublish,
|
|
5680
5762
|
menuOpen,
|
|
5681
|
-
renderHeaderActions: () => /* @__PURE__ */
|
|
5763
|
+
renderHeaderActions: () => /* @__PURE__ */ jsxs15(CustomHeaderActions, { children: [
|
|
5682
5764
|
/* @__PURE__ */ jsx33(
|
|
5683
5765
|
Button,
|
|
5684
5766
|
{
|
|
@@ -5714,11 +5796,11 @@ var HeaderInner = ({
|
|
|
5714
5796
|
var Header = memo6(HeaderInner);
|
|
5715
5797
|
|
|
5716
5798
|
// css-module:/home/crediblemark/Project/Credibuild/components/SidebarSection/styles.module.css#css-module
|
|
5717
|
-
var
|
|
5799
|
+
var styles_module_default18 = { "SidebarSection": "_SidebarSection_1w6vl_1", "SidebarSection-title": "_SidebarSection-title_1w6vl_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_1w6vl_38", "SidebarSection-content": "_SidebarSection-content_1w6vl_42", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_1w6vl_51", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_1w6vl_80", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_1w6vl_51", "SidebarSection-heading": "_SidebarSection-heading_1w6vl_92", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_1w6vl_96" };
|
|
5718
5800
|
|
|
5719
5801
|
// components/SidebarSection/index.tsx
|
|
5720
|
-
import { jsx as jsx34, jsxs as
|
|
5721
|
-
var
|
|
5802
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5803
|
+
var getClassName17 = get_class_name_factory_default("SidebarSection", styles_module_default18);
|
|
5722
5804
|
var SidebarSection = ({
|
|
5723
5805
|
children,
|
|
5724
5806
|
title,
|
|
@@ -5727,13 +5809,13 @@ var SidebarSection = ({
|
|
|
5727
5809
|
noBorderTop,
|
|
5728
5810
|
isLoading
|
|
5729
5811
|
}) => {
|
|
5730
|
-
return /* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5812
|
+
return /* @__PURE__ */ jsxs16("div", { className: getClassName17({ noBorderTop }), style: { background }, children: [
|
|
5813
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("title"), children: /* @__PURE__ */ jsxs16("div", { className: getClassName17("breadcrumbs"), children: [
|
|
5732
5814
|
showBreadcrumbs && /* @__PURE__ */ jsx34(Breadcrumbs, {}),
|
|
5733
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5815
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("heading"), children: /* @__PURE__ */ jsx34(Heading, { rank: "2", size: "xs", children: title }) })
|
|
5734
5816
|
] }) }),
|
|
5735
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5736
|
-
isLoading && /* @__PURE__ */ jsx34("div", { className:
|
|
5817
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("content"), children }),
|
|
5818
|
+
isLoading && /* @__PURE__ */ jsx34("div", { className: getClassName17("loadingOverlay"), children: /* @__PURE__ */ jsx34(Loader, { size: 32 }) })
|
|
5737
5819
|
] });
|
|
5738
5820
|
};
|
|
5739
5821
|
|
|
@@ -5742,17 +5824,17 @@ import {
|
|
|
5742
5824
|
useCallback as useCallback18,
|
|
5743
5825
|
useEffect as useEffect19,
|
|
5744
5826
|
useMemo as useMemo19,
|
|
5745
|
-
useRef as
|
|
5827
|
+
useRef as useRef14,
|
|
5746
5828
|
useState as useState15
|
|
5747
5829
|
} from "react";
|
|
5748
5830
|
|
|
5749
5831
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Canvas/styles.module.css#css-module
|
|
5750
|
-
var
|
|
5832
|
+
var styles_module_default19 = { "CredBuildCanvas": "_CredBuildCanvas_1ivia_1", "CredBuildCanvas--fullScreen": "_CredBuildCanvas--fullScreen_1ivia_22", "CredBuildCanvas-inner": "_CredBuildCanvas-inner_1ivia_33", "CredBuildCanvas-root": "_CredBuildCanvas-root_1ivia_42", "CredBuildCanvas--ready": "_CredBuildCanvas--ready_1ivia_67", "CredBuildCanvas-loader": "_CredBuildCanvas-loader_1ivia_72", "CredBuildCanvas--showLoader": "_CredBuildCanvas--showLoader_1ivia_82" };
|
|
5751
5833
|
|
|
5752
5834
|
// components/CredBuild/components/Canvas/index.tsx
|
|
5753
5835
|
import { useShallow as useShallow7 } from "zustand/react/shallow";
|
|
5754
|
-
import { Fragment as Fragment12, jsx as jsx35, jsxs as
|
|
5755
|
-
var
|
|
5836
|
+
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5837
|
+
var getClassName18 = get_class_name_factory_default("CredBuildCanvas", styles_module_default19);
|
|
5756
5838
|
var ZOOM_ON_CHANGE = true;
|
|
5757
5839
|
var TRANSITION_DURATION = 150;
|
|
5758
5840
|
var Canvas = () => {
|
|
@@ -5796,7 +5878,7 @@ var Canvas = () => {
|
|
|
5796
5878
|
}))
|
|
5797
5879
|
);
|
|
5798
5880
|
const [showTransition, setShowTransition] = useState15(false);
|
|
5799
|
-
const isResizingRef =
|
|
5881
|
+
const isResizingRef = useRef14(false);
|
|
5800
5882
|
const defaultRender = useMemo19(() => {
|
|
5801
5883
|
const CredBuildDefault = ({ children }) => /* @__PURE__ */ jsx35(Fragment12, { children });
|
|
5802
5884
|
return CredBuildDefault;
|
|
@@ -5922,7 +6004,7 @@ var Canvas = () => {
|
|
|
5922
6004
|
return /* @__PURE__ */ jsx35(
|
|
5923
6005
|
"div",
|
|
5924
6006
|
{
|
|
5925
|
-
className:
|
|
6007
|
+
className: getClassName18({
|
|
5926
6008
|
ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
|
|
5927
6009
|
showLoader,
|
|
5928
6010
|
fullScreen: _experimentalFullScreenCanvas
|
|
@@ -5937,11 +6019,11 @@ var Canvas = () => {
|
|
|
5937
6019
|
});
|
|
5938
6020
|
}
|
|
5939
6021
|
},
|
|
5940
|
-
children: /* @__PURE__ */
|
|
6022
|
+
children: /* @__PURE__ */ jsxs17("div", { className: getClassName18("inner"), ref: frameRef, children: [
|
|
5941
6023
|
/* @__PURE__ */ jsx35(
|
|
5942
6024
|
"div",
|
|
5943
6025
|
{
|
|
5944
|
-
className:
|
|
6026
|
+
className: getClassName18("root"),
|
|
5945
6027
|
style: {
|
|
5946
6028
|
width: iframe.enabled ? viewports.current.width : "100%",
|
|
5947
6029
|
height: !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : zoomConfig.rootHeight,
|
|
@@ -5959,17 +6041,17 @@ var Canvas = () => {
|
|
|
5959
6041
|
children: /* @__PURE__ */ jsx35(CustomPreview, { children: /* @__PURE__ */ jsx35(Preview, {}) })
|
|
5960
6042
|
}
|
|
5961
6043
|
),
|
|
5962
|
-
/* @__PURE__ */ jsx35("div", { className:
|
|
6044
|
+
/* @__PURE__ */ jsx35("div", { className: getClassName18("loader"), children: /* @__PURE__ */ jsx35(Loader, { size: 24 }) })
|
|
5963
6045
|
] })
|
|
5964
6046
|
}
|
|
5965
6047
|
);
|
|
5966
6048
|
};
|
|
5967
6049
|
|
|
5968
6050
|
// lib/use-sidebar-resize.ts
|
|
5969
|
-
import { useCallback as useCallback19, useEffect as useEffect20, useRef as
|
|
6051
|
+
import { useCallback as useCallback19, useEffect as useEffect20, useRef as useRef15, useState as useState16 } from "react";
|
|
5970
6052
|
function useSidebarResize(position, dispatch) {
|
|
5971
6053
|
const [width, setWidth] = useState16(null);
|
|
5972
|
-
const sidebarRef =
|
|
6054
|
+
const sidebarRef = useRef15(null);
|
|
5973
6055
|
const storeWidth = useAppStore(
|
|
5974
6056
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
5975
6057
|
);
|
|
@@ -6047,14 +6129,14 @@ function useSidebarResize(position, dispatch) {
|
|
|
6047
6129
|
}
|
|
6048
6130
|
|
|
6049
6131
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
6050
|
-
import { useCallback as useCallback20, useRef as
|
|
6132
|
+
import { useCallback as useCallback20, useRef as useRef16 } from "react";
|
|
6051
6133
|
|
|
6052
6134
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
|
|
6053
|
-
var
|
|
6135
|
+
var styles_module_default20 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
|
|
6054
6136
|
|
|
6055
6137
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
6056
6138
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6057
|
-
var
|
|
6139
|
+
var getClassName19 = get_class_name_factory_default("ResizeHandle", styles_module_default20);
|
|
6058
6140
|
var ResizeHandle = ({
|
|
6059
6141
|
position,
|
|
6060
6142
|
sidebarRef,
|
|
@@ -6063,10 +6145,10 @@ var ResizeHandle = ({
|
|
|
6063
6145
|
}) => {
|
|
6064
6146
|
const { frameRef } = useCanvasFrame();
|
|
6065
6147
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
6066
|
-
const handleRef =
|
|
6067
|
-
const isDragging =
|
|
6068
|
-
const startX =
|
|
6069
|
-
const startWidth =
|
|
6148
|
+
const handleRef = useRef16(null);
|
|
6149
|
+
const isDragging = useRef16(false);
|
|
6150
|
+
const startX = useRef16(0);
|
|
6151
|
+
const startWidth = useRef16(0);
|
|
6070
6152
|
const handleMouseMove = useCallback20(
|
|
6071
6153
|
(e) => {
|
|
6072
6154
|
if (!isDragging.current) return;
|
|
@@ -6114,18 +6196,18 @@ var ResizeHandle = ({
|
|
|
6114
6196
|
"div",
|
|
6115
6197
|
{
|
|
6116
6198
|
ref: handleRef,
|
|
6117
|
-
className:
|
|
6199
|
+
className: getClassName19({ [position]: true }),
|
|
6118
6200
|
onMouseDown: handleMouseDown
|
|
6119
6201
|
}
|
|
6120
6202
|
);
|
|
6121
6203
|
};
|
|
6122
6204
|
|
|
6123
6205
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
|
|
6124
|
-
var
|
|
6206
|
+
var styles_module_default21 = { "Sidebar": "_Sidebar_1kcif_1", "Sidebar--isVisible": "_Sidebar--isVisible_1kcif_13", "Sidebar--left": "_Sidebar--left_1kcif_17", "Sidebar--right": "_Sidebar--right_1kcif_29", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_1kcif_42" };
|
|
6125
6207
|
|
|
6126
6208
|
// components/CredBuild/components/Sidebar/index.tsx
|
|
6127
|
-
import { Fragment as Fragment13, jsx as jsx37, jsxs as
|
|
6128
|
-
var
|
|
6209
|
+
import { Fragment as Fragment13, jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6210
|
+
var getClassName20 = get_class_name_factory_default("Sidebar", styles_module_default21);
|
|
6129
6211
|
var Sidebar = ({
|
|
6130
6212
|
position,
|
|
6131
6213
|
sidebarRef,
|
|
@@ -6134,16 +6216,16 @@ var Sidebar = ({
|
|
|
6134
6216
|
onResizeEnd,
|
|
6135
6217
|
children
|
|
6136
6218
|
}) => {
|
|
6137
|
-
return /* @__PURE__ */
|
|
6219
|
+
return /* @__PURE__ */ jsxs18(Fragment13, { children: [
|
|
6138
6220
|
/* @__PURE__ */ jsx37(
|
|
6139
6221
|
"div",
|
|
6140
6222
|
{
|
|
6141
6223
|
ref: sidebarRef,
|
|
6142
|
-
className:
|
|
6224
|
+
className: getClassName20({ [position]: true, isVisible }),
|
|
6143
6225
|
children
|
|
6144
6226
|
}
|
|
6145
6227
|
),
|
|
6146
|
-
/* @__PURE__ */ jsx37("div", { className: `${
|
|
6228
|
+
/* @__PURE__ */ jsx37("div", { className: `${getClassName20("resizeHandle")}`, children: /* @__PURE__ */ jsx37(
|
|
6147
6229
|
ResizeHandle,
|
|
6148
6230
|
{
|
|
6149
6231
|
position,
|
|
@@ -6214,12 +6296,12 @@ var useDeleteHotkeys = () => {
|
|
|
6214
6296
|
};
|
|
6215
6297
|
|
|
6216
6298
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Nav/styles.module.css#css-module
|
|
6217
|
-
var
|
|
6299
|
+
var styles_module_default22 = { "Nav": "_Nav_wbh7e_1", "Nav-list": "_Nav-list_wbh7e_9", "CredBuildHeader-path": "_CredBuildHeader-path_wbh7e_20", "NavItem": "_NavItem_wbh7e_38", "NavItem-link": "_NavItem-link_wbh7e_43", "NavItem-linkIcon": "_NavItem-linkIcon_wbh7e_64", "NavItem--active": "_NavItem--active_wbh7e_77", "NavItem--mobileOnly": "_NavItem--mobileOnly_wbh7e_90", "NavItem--desktopOnly": "_NavItem--desktopOnly_wbh7e_95" };
|
|
6218
6300
|
|
|
6219
6301
|
// components/CredBuild/components/Nav/index.tsx
|
|
6220
|
-
import { jsx as jsx38, jsxs as
|
|
6221
|
-
var
|
|
6222
|
-
var getClassNameItem2 = get_class_name_factory_default("NavItem",
|
|
6302
|
+
import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6303
|
+
var getClassName21 = get_class_name_factory_default("Nav", styles_module_default22);
|
|
6304
|
+
var getClassNameItem2 = get_class_name_factory_default("NavItem", styles_module_default22);
|
|
6223
6305
|
var MenuItem = ({
|
|
6224
6306
|
label,
|
|
6225
6307
|
icon,
|
|
@@ -6236,7 +6318,7 @@ var MenuItem = ({
|
|
|
6236
6318
|
mobileOnly,
|
|
6237
6319
|
desktopOnly
|
|
6238
6320
|
}),
|
|
6239
|
-
children: onClick && /* @__PURE__ */
|
|
6321
|
+
children: onClick && /* @__PURE__ */ jsxs19("div", { className: getClassNameItem2("link"), onClick, children: [
|
|
6240
6322
|
icon && /* @__PURE__ */ jsx38("span", { className: getClassNameItem2("linkIcon"), children: icon }),
|
|
6241
6323
|
/* @__PURE__ */ jsx38("span", { className: getClassNameItem2("linkLabel"), children: label })
|
|
6242
6324
|
] })
|
|
@@ -6247,17 +6329,17 @@ var Nav = ({
|
|
|
6247
6329
|
items,
|
|
6248
6330
|
mobileActions
|
|
6249
6331
|
}) => {
|
|
6250
|
-
return /* @__PURE__ */
|
|
6251
|
-
/* @__PURE__ */ jsx38("ul", { className:
|
|
6252
|
-
mobileActions && /* @__PURE__ */ jsx38("div", { className:
|
|
6332
|
+
return /* @__PURE__ */ jsxs19("nav", { className: getClassName21(), children: [
|
|
6333
|
+
/* @__PURE__ */ jsx38("ul", { className: getClassName21("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx38(MenuItem, { ...item }, key)) }),
|
|
6334
|
+
mobileActions && /* @__PURE__ */ jsx38("div", { className: getClassName21("mobileActions"), children: mobileActions })
|
|
6253
6335
|
] });
|
|
6254
6336
|
};
|
|
6255
6337
|
|
|
6256
6338
|
// components/CredBuild/components/Layout/index.tsx
|
|
6257
|
-
import { jsx as jsx39, jsxs as
|
|
6258
|
-
var
|
|
6259
|
-
var getLayoutClassName = get_class_name_factory_default("CredBuildLayout",
|
|
6260
|
-
var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab",
|
|
6339
|
+
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6340
|
+
var getClassName22 = get_class_name_factory_default("CredBuild", styles_module_default14);
|
|
6341
|
+
var getLayoutClassName = get_class_name_factory_default("CredBuildLayout", styles_module_default14);
|
|
6342
|
+
var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab", styles_module_default14);
|
|
6261
6343
|
var FieldSideBar = () => {
|
|
6262
6344
|
const title = useAppStore(
|
|
6263
6345
|
(s) => s.selectedItem ? s.config.components[s.selectedItem.type]?.["label"] ?? s.selectedItem.type.toString() : s.config.root?.label || "Page"
|
|
@@ -6438,10 +6520,10 @@ var Layout = ({ children }) => {
|
|
|
6438
6520
|
const mobilePanelExpanded = useAppStore(
|
|
6439
6521
|
(s) => s.state.ui.mobilePanelExpanded ?? false
|
|
6440
6522
|
);
|
|
6441
|
-
return /* @__PURE__ */
|
|
6523
|
+
return /* @__PURE__ */ jsxs20(
|
|
6442
6524
|
"div",
|
|
6443
6525
|
{
|
|
6444
|
-
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${
|
|
6526
|
+
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${getClassName22({
|
|
6445
6527
|
hidePlugins: hasLegacySideBarPlugin
|
|
6446
6528
|
})}`,
|
|
6447
6529
|
"data-theme": theme,
|
|
@@ -6460,14 +6542,14 @@ var Layout = ({ children }) => {
|
|
|
6460
6542
|
mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
|
|
6461
6543
|
}),
|
|
6462
6544
|
style: { height: typeof height === "number" && isNaN(height) ? void 0 : height },
|
|
6463
|
-
children: /* @__PURE__ */
|
|
6545
|
+
children: /* @__PURE__ */ jsxs20(
|
|
6464
6546
|
"div",
|
|
6465
6547
|
{
|
|
6466
6548
|
className: getLayoutClassName("inner"),
|
|
6467
6549
|
style: layoutOptions,
|
|
6468
6550
|
children: [
|
|
6469
6551
|
/* @__PURE__ */ jsx39("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx39(Header, { theme, hidePlugins: hasLegacySideBarPlugin }) }),
|
|
6470
|
-
/* @__PURE__ */
|
|
6552
|
+
/* @__PURE__ */ jsxs20(
|
|
6471
6553
|
Sidebar,
|
|
6472
6554
|
{
|
|
6473
6555
|
position: "left",
|
|
@@ -6526,7 +6608,7 @@ var Layout = ({ children }) => {
|
|
|
6526
6608
|
)
|
|
6527
6609
|
}
|
|
6528
6610
|
) }) }) }),
|
|
6529
|
-
/* @__PURE__ */ jsx39("div", { id: "credbuild-portal-root", className:
|
|
6611
|
+
/* @__PURE__ */ jsx39("div", { id: "credbuild-portal-root", className: getClassName22("portal") })
|
|
6530
6612
|
]
|
|
6531
6613
|
}
|
|
6532
6614
|
);
|
|
@@ -6695,7 +6777,7 @@ function CredBuildProvider({ children }) {
|
|
|
6695
6777
|
index: initialHistoryIndex,
|
|
6696
6778
|
initialAppState
|
|
6697
6779
|
});
|
|
6698
|
-
const previousData =
|
|
6780
|
+
const previousData = useRef17(null);
|
|
6699
6781
|
useEffect23(() => {
|
|
6700
6782
|
return appStore.subscribe(
|
|
6701
6783
|
(s) => s.state.data,
|
|
@@ -6728,10 +6810,10 @@ CredBuild.Outline = Outline;
|
|
|
6728
6810
|
CredBuild.Preview = Preview;
|
|
6729
6811
|
|
|
6730
6812
|
// plugins/legacy-side-bar/index.tsx
|
|
6731
|
-
import { jsx as jsx41, jsxs as
|
|
6813
|
+
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6732
6814
|
var legacySideBarPlugin = () => ({
|
|
6733
6815
|
name: "legacy-side-bar",
|
|
6734
|
-
render: () => /* @__PURE__ */
|
|
6816
|
+
render: () => /* @__PURE__ */ jsxs21("div", { style: { overflowY: "auto" }, children: [
|
|
6735
6817
|
/* @__PURE__ */ jsx41(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx41(Components, {}) }),
|
|
6736
6818
|
/* @__PURE__ */ jsx41(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx41(Outline, {}) })
|
|
6737
6819
|
] })
|