@crediblemark/build 0.25.1 → 0.25.3
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/ArrayField-HI4LZRUN.mjs +19 -0
- package/dist/{ArrayField-HGGIE5AL.css → ArrayField-JRN7ZFM7.css} +15 -15
- package/dist/{Editor-E7FALXHL.css → Editor-CVT4RKSU.css} +7 -7
- package/dist/{Editor-CD7CMRO5.mjs → Editor-IPG4RO2L.mjs} +8 -8
- package/dist/ObjectField-CHMT4KPZ.mjs +19 -0
- package/dist/{ObjectField-NKMT3CLS.css → ObjectField-JYRSRCWB.css} +15 -15
- package/dist/{Render-JDXVKZXN.css → Render-DOE2LXKX.css} +1 -1
- package/dist/{Render-WP5OOTBB.mjs → Render-I6PZ5MEA.mjs} +4 -2
- package/dist/{chunk-DVK7K7D6.mjs → chunk-2RLA42JA.mjs} +4 -3
- package/dist/{chunk-JKWSSGAY.mjs → chunk-3Q7JODIK.mjs} +16 -15
- package/dist/{chunk-BPBYJDIJ.mjs → chunk-F2M5GHDX.mjs} +96 -81
- package/dist/{chunk-OUXISRNA.mjs → chunk-FQKSRGRK.mjs} +435 -336
- package/dist/{chunk-AL77I3BV.mjs → chunk-ISXFLTBM.mjs} +1 -1
- package/dist/{chunk-UPNU77XM.mjs → chunk-MZIV4ZKR.mjs} +2 -2
- package/dist/{chunk-WEPD3OBO.mjs → chunk-NYBTD3FJ.mjs} +2 -2
- package/dist/{chunk-PQXVFRLA.mjs → chunk-NYIULQV4.mjs} +31 -15
- package/dist/{chunk-BC5TH63U.mjs → chunk-PWRZZUWM.mjs} +1 -1
- package/dist/{chunk-NJZPPQVT.mjs → chunk-QMMMJ4RO.mjs} +7 -5
- package/dist/{chunk-3S3KWE2J.mjs → chunk-RBWVOMMW.mjs} +6 -4
- package/dist/{chunk-NSDGBGNG.mjs → chunk-UNMCNIJ3.mjs} +1 -1
- package/dist/{chunk-MLM27DOG.mjs → chunk-W57TTDB2.mjs} +1 -1
- package/dist/{full-HTQAR5N2.mjs → full-A2JX3OI2.mjs} +5 -5
- package/dist/{full-MY4DABK6.css → full-C7RVGAUA.css} +6 -6
- package/dist/index.css +155 -76
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +906 -759
- package/dist/index.mjs +13 -13
- package/dist/{loaded-Q7N3MNZB.mjs → loaded-2FUW3WCF.mjs} +2 -2
- package/dist/{loaded-E7C36OKZ.css → loaded-4FAPBCAU.css} +1 -1
- package/dist/{loaded-CDAPR2WZ.mjs → loaded-6L45JULO.mjs} +2 -2
- package/dist/{loaded-AHSNCA4P.mjs → loaded-Y7SRBM7R.mjs} +2 -2
- package/dist/no-external.css +155 -76
- package/dist/no-external.js +906 -759
- package/dist/no-external.mjs +13 -13
- package/dist/rsc.css +1 -1
- package/dist/rsc.js +10 -7
- package/dist/rsc.mjs +2 -2
- package/package.json +2 -1
- package/dist/ArrayField-N36WXYIG.mjs +0 -19
- package/dist/ObjectField-RMXFC6TI.mjs +0 -19
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NYBTD3FJ.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-QMMMJ4RO.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-NYIULQV4.mjs";
|
|
20
20
|
import {
|
|
21
21
|
RichTextRenderFallback,
|
|
22
22
|
SlotRender,
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
getSlotTransform,
|
|
26
26
|
useRichtextProps,
|
|
27
27
|
useSlots
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2RLA42JA.mjs";
|
|
29
29
|
import {
|
|
30
30
|
ActionBar,
|
|
31
31
|
IconButton,
|
|
32
32
|
Loader
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3Q7JODIK.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-F2M5GHDX.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,38 @@ 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
|
-
|
|
391
|
+
type: "button",
|
|
392
|
+
onClick: () => changeGlobalViewport("desktop"),
|
|
355
393
|
style: {
|
|
356
394
|
padding: "2px 5px",
|
|
357
395
|
border: "none",
|
|
@@ -365,13 +403,16 @@ var ResponsiveSliderField = ({
|
|
|
365
403
|
transition: "all 0.1s ease"
|
|
366
404
|
},
|
|
367
405
|
title: "Desktop",
|
|
406
|
+
"aria-label": "Desktop viewport",
|
|
407
|
+
"aria-pressed": mode === "desktop",
|
|
368
408
|
children: /* @__PURE__ */ jsx2(DesktopIcon, {})
|
|
369
409
|
}
|
|
370
410
|
),
|
|
371
411
|
/* @__PURE__ */ jsx2(
|
|
372
412
|
"button",
|
|
373
413
|
{
|
|
374
|
-
|
|
414
|
+
type: "button",
|
|
415
|
+
onClick: () => changeGlobalViewport("tablet"),
|
|
375
416
|
style: {
|
|
376
417
|
padding: "2px 5px",
|
|
377
418
|
border: "none",
|
|
@@ -385,13 +426,16 @@ var ResponsiveSliderField = ({
|
|
|
385
426
|
transition: "all 0.1s ease"
|
|
386
427
|
},
|
|
387
428
|
title: "Tablet",
|
|
429
|
+
"aria-label": "Tablet viewport",
|
|
430
|
+
"aria-pressed": mode === "tablet",
|
|
388
431
|
children: /* @__PURE__ */ jsx2(TabletIcon, {})
|
|
389
432
|
}
|
|
390
433
|
),
|
|
391
434
|
/* @__PURE__ */ jsx2(
|
|
392
435
|
"button",
|
|
393
436
|
{
|
|
394
|
-
|
|
437
|
+
type: "button",
|
|
438
|
+
onClick: () => changeGlobalViewport("mobile"),
|
|
395
439
|
style: {
|
|
396
440
|
padding: "2px 5px",
|
|
397
441
|
border: "none",
|
|
@@ -405,23 +449,25 @@ var ResponsiveSliderField = ({
|
|
|
405
449
|
transition: "all 0.1s ease"
|
|
406
450
|
},
|
|
407
451
|
title: "Mobile",
|
|
452
|
+
"aria-label": "Mobile viewport",
|
|
453
|
+
"aria-pressed": mode === "mobile",
|
|
408
454
|
children: /* @__PURE__ */ jsx2(MobileIcon, {})
|
|
409
455
|
}
|
|
410
456
|
)
|
|
411
|
-
] })
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
)
|
|
457
|
+
] }),
|
|
458
|
+
/* @__PURE__ */ jsx2("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx2(
|
|
459
|
+
SliderField,
|
|
460
|
+
{
|
|
461
|
+
value: getCurrentValue(),
|
|
462
|
+
onChange: handleChange,
|
|
463
|
+
unit,
|
|
464
|
+
max,
|
|
465
|
+
min,
|
|
466
|
+
step,
|
|
467
|
+
useUnits: false
|
|
468
|
+
}
|
|
469
|
+
) })
|
|
470
|
+
] })
|
|
425
471
|
] });
|
|
426
472
|
};
|
|
427
473
|
|
|
@@ -487,11 +533,11 @@ var ColorPickerField = ({ value, onChange }) => {
|
|
|
487
533
|
] });
|
|
488
534
|
};
|
|
489
535
|
|
|
490
|
-
// css-module:/home/
|
|
536
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/Drawer/styles.module.css#css-module
|
|
491
537
|
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
538
|
|
|
493
539
|
// components/Drawer/index.tsx
|
|
494
|
-
import { useMemo, useState
|
|
540
|
+
import { useMemo, useState } from "react";
|
|
495
541
|
|
|
496
542
|
// components/DragDropContext/context.tsx
|
|
497
543
|
import {
|
|
@@ -597,7 +643,7 @@ var DrawerItem = ({
|
|
|
597
643
|
isDragDisabled
|
|
598
644
|
}) => {
|
|
599
645
|
const resolvedId = id || name;
|
|
600
|
-
const [dynamicId, setDynamicId] =
|
|
646
|
+
const [dynamicId, setDynamicId] = useState(generateId(resolvedId));
|
|
601
647
|
if (typeof index !== "undefined") {
|
|
602
648
|
console.error(
|
|
603
649
|
"Warning: The `index` prop on Drawer.Item is deprecated and no longer required."
|
|
@@ -714,6 +760,7 @@ import {
|
|
|
714
760
|
useMemo as useMemo6,
|
|
715
761
|
useRef as useRef8
|
|
716
762
|
} from "react";
|
|
763
|
+
import DOMPurify from "isomorphic-dompurify";
|
|
717
764
|
|
|
718
765
|
// components/DraggableComponent/index.tsx
|
|
719
766
|
import {
|
|
@@ -723,11 +770,11 @@ import {
|
|
|
723
770
|
useLayoutEffect,
|
|
724
771
|
useMemo as useMemo3,
|
|
725
772
|
useRef as useRef2,
|
|
726
|
-
useState as
|
|
773
|
+
useState as useState2,
|
|
727
774
|
useTransition
|
|
728
775
|
} from "react";
|
|
729
776
|
|
|
730
|
-
// css-module:/home/
|
|
777
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/DraggableComponent/styles.module.css#css-module
|
|
731
778
|
var styles_module_default2 = { "DraggableComponent": "_DraggableComponent_yrtpz_1", "DraggableComponent-overlayWrapper": "_DraggableComponent-overlayWrapper_yrtpz_12", "DraggableComponent-overlay": "_DraggableComponent-overlay_yrtpz_12", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_yrtpz_34", "DraggableComponent--hover": "_DraggableComponent--hover_yrtpz_50", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_yrtpz_57", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_yrtpz_71", "DraggableComponent-actions": "_DraggableComponent-actions_yrtpz_71" };
|
|
732
779
|
|
|
733
780
|
// components/DraggableComponent/index.tsx
|
|
@@ -903,10 +950,10 @@ var DraggableComponent = ({
|
|
|
903
950
|
);
|
|
904
951
|
const overrides = useAppStore((s) => s.overrides);
|
|
905
952
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
906
|
-
const
|
|
953
|
+
const isIframeEnabled = useAppStore((s) => s.iframe.enabled);
|
|
907
954
|
const lastMeasureRef = useRef2(0);
|
|
908
955
|
const ctx = useContext2(dropZoneContext);
|
|
909
|
-
const [localZones, setLocalZones] =
|
|
956
|
+
const [localZones, setLocalZones] = useState2({});
|
|
910
957
|
const registerLocalZone = useCallback3(
|
|
911
958
|
(zoneCompound2, active) => {
|
|
912
959
|
ctx?.registerLocalZone?.(zoneCompound2, active);
|
|
@@ -939,7 +986,7 @@ var DraggableComponent = ({
|
|
|
939
986
|
})
|
|
940
987
|
);
|
|
941
988
|
const zoneStore = useContext2(ZoneStoreContext);
|
|
942
|
-
const [dragAxis, setDragAxis] =
|
|
989
|
+
const [dragAxis, setDragAxis] = useState2(userDragAxis || autoDragAxis);
|
|
943
990
|
const dynamicCollisionDetector = useMemo3(
|
|
944
991
|
() => createDynamicCollisionDetector(dragAxis),
|
|
945
992
|
[dragAxis]
|
|
@@ -988,7 +1035,7 @@ var DraggableComponent = ({
|
|
|
988
1035
|
}
|
|
989
1036
|
return cleanup;
|
|
990
1037
|
}, [permissions.drag, zoneCompound, sortable.draggable, sortable.droppable, zoneStore]);
|
|
991
|
-
const [, setRerender] =
|
|
1038
|
+
const [, setRerender] = useState2(0);
|
|
992
1039
|
const ref = useRef2(null);
|
|
993
1040
|
const refSetter = useCallback3(
|
|
994
1041
|
(el) => {
|
|
@@ -1003,17 +1050,17 @@ var DraggableComponent = ({
|
|
|
1003
1050
|
},
|
|
1004
1051
|
[itemRef, sortableRef]
|
|
1005
1052
|
);
|
|
1006
|
-
const [portalEl, setPortalEl] =
|
|
1053
|
+
const [portalEl, setPortalEl] = useState2();
|
|
1007
1054
|
useEffect2(() => {
|
|
1008
1055
|
setPortalEl(
|
|
1009
|
-
|
|
1056
|
+
isIframeEnabled ? ref.current?.ownerDocument.body : ref.current?.closest("[data-credbuild-preview]") ?? document.body
|
|
1010
1057
|
);
|
|
1011
|
-
}, [
|
|
1058
|
+
}, [isIframeEnabled]);
|
|
1012
1059
|
const getStyle = useCallback3(() => {
|
|
1013
1060
|
if (!ref.current) return;
|
|
1014
1061
|
const el = ref.current;
|
|
1015
1062
|
const rect = el.getBoundingClientRect();
|
|
1016
|
-
const portalContainerEl =
|
|
1063
|
+
const portalContainerEl = isIframeEnabled ? null : el.closest("[data-credbuild-preview]");
|
|
1017
1064
|
const targetIsFixed = (() => {
|
|
1018
1065
|
let node = el;
|
|
1019
1066
|
while (node && node !== document.documentElement) {
|
|
@@ -1039,8 +1086,8 @@ var DraggableComponent = ({
|
|
|
1039
1086
|
position: targetIsFixed ? "fixed" : void 0
|
|
1040
1087
|
};
|
|
1041
1088
|
return style2;
|
|
1042
|
-
}, [
|
|
1043
|
-
const [style, setStyle] =
|
|
1089
|
+
}, [isIframeEnabled]);
|
|
1090
|
+
const [style, setStyle] = useState2();
|
|
1044
1091
|
const lastRectRef = useRef2(null);
|
|
1045
1092
|
const syncRafRef = useRef2(null);
|
|
1046
1093
|
const sync = useCallback3(() => {
|
|
@@ -1171,7 +1218,7 @@ var DraggableComponent = ({
|
|
|
1171
1218
|
zone: zoneCompound
|
|
1172
1219
|
});
|
|
1173
1220
|
}, [index, zoneCompound, dispatch]);
|
|
1174
|
-
const [hover, setHover] =
|
|
1221
|
+
const [hover, setHover] = useState2(false);
|
|
1175
1222
|
const indicativeHover = useContextStore(
|
|
1176
1223
|
ZoneStoreContext,
|
|
1177
1224
|
(s) => s.hoveringComponent === id
|
|
@@ -1223,8 +1270,8 @@ var DraggableComponent = ({
|
|
|
1223
1270
|
zoneStore,
|
|
1224
1271
|
id
|
|
1225
1272
|
]);
|
|
1226
|
-
const [isVisible, setIsVisible] =
|
|
1227
|
-
const [dragFinished, setDragFinished] =
|
|
1273
|
+
const [isVisible, setIsVisible] = useState2(false);
|
|
1274
|
+
const [dragFinished, setDragFinished] = useState2(true);
|
|
1228
1275
|
const [_, startTransition] = useTransition();
|
|
1229
1276
|
useEffect2(() => {
|
|
1230
1277
|
startTransition(() => {
|
|
@@ -1236,8 +1283,8 @@ var DraggableComponent = ({
|
|
|
1236
1283
|
setIsVisible(false);
|
|
1237
1284
|
}
|
|
1238
1285
|
});
|
|
1239
|
-
}, [hover, indicativeHover, isSelected,
|
|
1240
|
-
const [thisWasDragging, setThisWasDragging] =
|
|
1286
|
+
}, [hover, indicativeHover, isSelected, isIframeEnabled, scheduleSync]);
|
|
1287
|
+
const [thisWasDragging, setThisWasDragging] = useState2(false);
|
|
1241
1288
|
const onDragFinished = useOnDragFinished(
|
|
1242
1289
|
useCallback3(
|
|
1243
1290
|
(finished) => {
|
|
@@ -1445,7 +1492,7 @@ var DraggableComponent = ({
|
|
|
1445
1492
|
] });
|
|
1446
1493
|
};
|
|
1447
1494
|
|
|
1448
|
-
// css-module:/home/
|
|
1495
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/DropZone/styles.module.css#css-module
|
|
1449
1496
|
var styles_module_default3 = { "DropZone": "_DropZone_1vmgt_1", "DropZone--hasChildren": "_DropZone--hasChildren_1vmgt_11", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_1vmgt_24", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_1vmgt_25", "DropZone--isRootZone": "_DropZone--isRootZone_1vmgt_25", "DropZone--isDestination": "_DropZone--isDestination_1vmgt_35", "DropZone-item": "_DropZone-item_1vmgt_47", "DropZone-hitbox": "_DropZone-hitbox_1vmgt_51", "DropZone--isEnabled": "_DropZone--isEnabled_1vmgt_59", "DropZone--isAnimating": "_DropZone--isAnimating_1vmgt_68" };
|
|
1450
1497
|
|
|
1451
1498
|
// components/DropZone/index.tsx
|
|
@@ -1453,7 +1500,7 @@ import { useDroppable as useDroppable2 } from "@dnd-kit/react";
|
|
|
1453
1500
|
import { pointerIntersection } from "@dnd-kit/collision";
|
|
1454
1501
|
|
|
1455
1502
|
// components/DropZone/lib/use-min-empty-height.ts
|
|
1456
|
-
import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef3, useState as
|
|
1503
|
+
import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1457
1504
|
var getNumItems = (appStore, zoneCompound) => appStore.getState().state.indexes.zones[zoneCompound].contentIds.length;
|
|
1458
1505
|
var useMinEmptyHeight = ({
|
|
1459
1506
|
zoneCompound,
|
|
@@ -1461,8 +1508,8 @@ var useMinEmptyHeight = ({
|
|
|
1461
1508
|
ref
|
|
1462
1509
|
}) => {
|
|
1463
1510
|
const appStore = useAppStoreApi();
|
|
1464
|
-
const [prevHeight, setPrevHeight] =
|
|
1465
|
-
const [isAnimating, setIsAnimating] =
|
|
1511
|
+
const [prevHeight, setPrevHeight] = useState3(0);
|
|
1512
|
+
const [isAnimating, setIsAnimating] = useState3(false);
|
|
1466
1513
|
const { draggedItem, isZone } = useContextStore(ZoneStoreContext, (s) => {
|
|
1467
1514
|
return {
|
|
1468
1515
|
draggedItem: s.draggedItem?.data.zone === zoneCompound ? s.draggedItem : null,
|
|
@@ -1516,7 +1563,7 @@ var useMinEmptyHeight = ({
|
|
|
1516
1563
|
};
|
|
1517
1564
|
|
|
1518
1565
|
// components/DropZone/lib/use-content-with-preview.ts
|
|
1519
|
-
import { useCallback as useCallback6, useContext as useContext3, useEffect as useEffect4, useState as
|
|
1566
|
+
import { useCallback as useCallback6, useContext as useContext3, useEffect as useEffect4, useState as useState4 } from "react";
|
|
1520
1567
|
|
|
1521
1568
|
// lib/dnd/use-rendered-callback.ts
|
|
1522
1569
|
import { useDragDropManager } from "@dnd-kit/react";
|
|
@@ -1540,8 +1587,8 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
1540
1587
|
(s) => s.previewIndex[zoneCompound]
|
|
1541
1588
|
);
|
|
1542
1589
|
const isDragging = useAppStore((s) => s.state.ui.isDragging);
|
|
1543
|
-
const [contentIdsWithPreview, setContentIdsWithPreview] =
|
|
1544
|
-
const [localPreview, setLocalPreview] =
|
|
1590
|
+
const [contentIdsWithPreview, setContentIdsWithPreview] = useState4(contentIds);
|
|
1591
|
+
const [localPreview, setLocalPreview] = useState4(
|
|
1545
1592
|
preview
|
|
1546
1593
|
);
|
|
1547
1594
|
const updateContent = useRenderedCallback(
|
|
@@ -1594,13 +1641,13 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
1594
1641
|
};
|
|
1595
1642
|
|
|
1596
1643
|
// components/DropZone/lib/use-drag-axis.ts
|
|
1597
|
-
import { useCallback as useCallback7, useEffect as useEffect5, useState as
|
|
1644
|
+
import { useCallback as useCallback7, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1598
1645
|
var GRID_DRAG_AXIS = "dynamic";
|
|
1599
1646
|
var FLEX_ROW_DRAG_AXIS = "x";
|
|
1600
1647
|
var DEFAULT_DRAG_AXIS = "y";
|
|
1601
1648
|
var useDragAxis = (ref, collisionAxis) => {
|
|
1602
1649
|
const status = useAppStore((s) => s.status);
|
|
1603
|
-
const [dragAxis, setDragAxis] =
|
|
1650
|
+
const [dragAxis, setDragAxis] = useState5(
|
|
1604
1651
|
collisionAxis || DEFAULT_DRAG_AXIS
|
|
1605
1652
|
);
|
|
1606
1653
|
const calculateDragAxis = useCallback7(() => {
|
|
@@ -1632,8 +1679,8 @@ var useDragAxis = (ref, collisionAxis) => {
|
|
|
1632
1679
|
import { useShallow as useShallow3 } from "zustand/react/shallow";
|
|
1633
1680
|
|
|
1634
1681
|
// components/Render/context.tsx
|
|
1635
|
-
import
|
|
1636
|
-
var renderContext =
|
|
1682
|
+
import React2 from "react";
|
|
1683
|
+
var renderContext = React2.createContext({
|
|
1637
1684
|
config: { components: {} },
|
|
1638
1685
|
data: { root: {}, content: [] },
|
|
1639
1686
|
metadata: {}
|
|
@@ -1708,9 +1755,9 @@ function useFieldTransformsTracked(config, item, transforms, readOnly, forceRead
|
|
|
1708
1755
|
}
|
|
1709
1756
|
|
|
1710
1757
|
// components/InlineTextField/index.tsx
|
|
1711
|
-
import { memo, useEffect as useEffect6, useRef as useRef5, useState as
|
|
1758
|
+
import { memo, useEffect as useEffect6, useRef as useRef5, useState as useState6 } from "react";
|
|
1712
1759
|
|
|
1713
|
-
// css-module:/home/
|
|
1760
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/InlineTextField/styles.module.css#css-module
|
|
1714
1761
|
var styles_module_default4 = { "InlineTextField": "_InlineTextField_104qp_1" };
|
|
1715
1762
|
|
|
1716
1763
|
// lib/get-selector-for-id.ts
|
|
@@ -1780,8 +1827,8 @@ var InlineTextFieldInternal = ({
|
|
|
1780
1827
|
};
|
|
1781
1828
|
}
|
|
1782
1829
|
}, [appStoreApi, ref, value, disableLineBreaks, componentId, propPath]);
|
|
1783
|
-
const [isHovering, setIsHovering] =
|
|
1784
|
-
const [isFocused, setIsFocused] =
|
|
1830
|
+
const [isHovering, setIsHovering] = useState6(false);
|
|
1831
|
+
const [isFocused, setIsFocused] = useState6(false);
|
|
1785
1832
|
return /* @__PURE__ */ jsx8(
|
|
1786
1833
|
"span",
|
|
1787
1834
|
{
|
|
@@ -1879,12 +1926,12 @@ import {
|
|
|
1879
1926
|
} from "react";
|
|
1880
1927
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1881
1928
|
var Editor = lazy(
|
|
1882
|
-
() => import("./Editor-
|
|
1929
|
+
() => import("./Editor-IPG4RO2L.mjs").then((m) => ({
|
|
1883
1930
|
default: m.Editor
|
|
1884
1931
|
}))
|
|
1885
1932
|
);
|
|
1886
1933
|
var RichTextRender = lazy(
|
|
1887
|
-
() => import("./Render-
|
|
1934
|
+
() => import("./Render-I6PZ5MEA.mjs").then((m) => ({
|
|
1888
1935
|
default: m.RichTextRender
|
|
1889
1936
|
}))
|
|
1890
1937
|
);
|
|
@@ -2259,7 +2306,7 @@ var InsertPreview = ({
|
|
|
2259
2306
|
if (element) {
|
|
2260
2307
|
return (
|
|
2261
2308
|
// Safe to use this since the HTML is set by the user
|
|
2262
|
-
/* @__PURE__ */ jsx13("div", { dangerouslySetInnerHTML: { __html: element.outerHTML } })
|
|
2309
|
+
/* @__PURE__ */ jsx13("div", { dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(element.outerHTML) } })
|
|
2263
2310
|
);
|
|
2264
2311
|
}
|
|
2265
2312
|
return /* @__PURE__ */ jsx13(DrawerItemInner, { name: label, children: override });
|
|
@@ -2631,7 +2678,7 @@ var DropZoneEdit = forwardRef(
|
|
|
2631
2678
|
);
|
|
2632
2679
|
}
|
|
2633
2680
|
);
|
|
2634
|
-
var DropZoneRenderItem = ({
|
|
2681
|
+
var DropZoneRenderItem = memo4(({
|
|
2635
2682
|
config,
|
|
2636
2683
|
item,
|
|
2637
2684
|
metadata
|
|
@@ -2658,7 +2705,7 @@ var DropZoneRenderItem = ({
|
|
|
2658
2705
|
}
|
|
2659
2706
|
}
|
|
2660
2707
|
) }, props.id);
|
|
2661
|
-
};
|
|
2708
|
+
});
|
|
2662
2709
|
var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx13(DropZoneRender, { ...props });
|
|
2663
2710
|
var DropZoneRender = forwardRef(
|
|
2664
2711
|
function DropZoneRenderInternal({ className, style, zone, as }, ref) {
|
|
@@ -2758,7 +2805,7 @@ function Render({
|
|
|
2758
2805
|
}
|
|
2759
2806
|
|
|
2760
2807
|
// lib/use-credbuild.ts
|
|
2761
|
-
import { createContext as createContext3, useContext as useContext6, useEffect as useEffect10, useState as
|
|
2808
|
+
import { createContext as createContext3, useContext as useContext6, useEffect as useEffect10, useState as useState7 } from "react";
|
|
2762
2809
|
import { createStore as createStore2, useStore } from "zustand";
|
|
2763
2810
|
|
|
2764
2811
|
// lib/data/resolve-and-replace-data.ts
|
|
@@ -2866,7 +2913,7 @@ var convertToPickedStore = (store) => {
|
|
|
2866
2913
|
};
|
|
2867
2914
|
};
|
|
2868
2915
|
var useRegisterUseCredBuildStore = (appStore) => {
|
|
2869
|
-
const [useCredBuildStore] =
|
|
2916
|
+
const [useCredBuildStore] = useState7(
|
|
2870
2917
|
() => createStore2(
|
|
2871
2918
|
() => generateUseCredBuild(
|
|
2872
2919
|
convertToPickedStore(appStore.getState()),
|
|
@@ -2916,17 +2963,16 @@ function useGetCredBuild() {
|
|
|
2916
2963
|
}
|
|
2917
2964
|
|
|
2918
2965
|
// lib/use-component-list.tsx
|
|
2919
|
-
import { useEffect as useEffect12, useState as
|
|
2966
|
+
import { useEffect as useEffect12, useState as useState8 } from "react";
|
|
2920
2967
|
|
|
2921
|
-
// css-module:/home/
|
|
2968
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/ComponentList/styles.module.css#css-module
|
|
2922
2969
|
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
2970
|
|
|
2924
2971
|
// components/ComponentList/index.tsx
|
|
2925
|
-
import { useEffect as useEffect11,
|
|
2926
|
-
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
2972
|
+
import { useEffect as useEffect11, memo as memo5 } from "react";
|
|
2927
2973
|
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2928
2974
|
var getClassName5 = get_class_name_factory_default("ComponentList", styles_module_default5);
|
|
2929
|
-
var ComponentListItem = ({
|
|
2975
|
+
var ComponentListItem = memo5(({
|
|
2930
2976
|
name,
|
|
2931
2977
|
label
|
|
2932
2978
|
}) => {
|
|
@@ -2944,40 +2990,36 @@ var ComponentListItem = ({
|
|
|
2944
2990
|
}
|
|
2945
2991
|
}, [overrides]);
|
|
2946
2992
|
return /* @__PURE__ */ jsx15(Drawer.Item, { label, name, isDragDisabled: !canInsert, children: overrides.componentItem ?? overrides.drawerItem });
|
|
2947
|
-
};
|
|
2993
|
+
});
|
|
2948
2994
|
var ComponentList = ({
|
|
2949
2995
|
children,
|
|
2950
2996
|
title,
|
|
2951
2997
|
id
|
|
2952
2998
|
}) => {
|
|
2953
2999
|
const config = useAppStore((s) => s.config);
|
|
2954
|
-
const
|
|
2955
|
-
const
|
|
2956
|
-
const parentRef = useRef9(null);
|
|
2957
|
-
const { expanded = true } = componentList[id] || {};
|
|
3000
|
+
const expanded = useAppStore((s) => s.state.ui.componentList[id]?.expanded ?? true);
|
|
3001
|
+
const appStoreApi = useAppStoreApi();
|
|
2958
3002
|
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
3003
|
return /* @__PURE__ */ jsxs7("div", { className: getClassName5({ isExpanded: expanded }), children: [
|
|
2967
3004
|
title && /* @__PURE__ */ jsxs7(
|
|
2968
3005
|
"button",
|
|
2969
3006
|
{
|
|
2970
3007
|
type: "button",
|
|
2971
3008
|
className: getClassName5("title"),
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
3009
|
+
"aria-expanded": expanded,
|
|
3010
|
+
"aria-controls": `${id}-content`,
|
|
3011
|
+
onClick: () => {
|
|
3012
|
+
const currentComponentList = appStoreApi.getState().state.ui.componentList;
|
|
3013
|
+
appStoreApi.getState().setUi({
|
|
3014
|
+
componentList: {
|
|
3015
|
+
...currentComponentList,
|
|
3016
|
+
[id]: {
|
|
3017
|
+
...currentComponentList[id],
|
|
3018
|
+
expanded: !expanded
|
|
3019
|
+
}
|
|
2978
3020
|
}
|
|
2979
|
-
}
|
|
2980
|
-
}
|
|
3021
|
+
});
|
|
3022
|
+
},
|
|
2981
3023
|
children: [
|
|
2982
3024
|
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2983
3025
|
id.toLowerCase().includes("hero") && /* @__PURE__ */ jsx15(LayoutTemplate, { size: 12, strokeWidth: 2.5 }),
|
|
@@ -2995,47 +3037,23 @@ var ComponentList = ({
|
|
|
2995
3037
|
/* @__PURE__ */ jsx15(
|
|
2996
3038
|
"div",
|
|
2997
3039
|
{
|
|
2998
|
-
|
|
3040
|
+
id: `${id}-content`,
|
|
2999
3041
|
className: getClassName5("content"),
|
|
3000
3042
|
style: {
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
transition: "max-height 0.3s ease-in-out"
|
|
3043
|
+
overflow: "visible",
|
|
3044
|
+
display: expanded ? "block" : "none"
|
|
3004
3045
|
},
|
|
3005
|
-
children: /* @__PURE__ */ jsx15(
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3046
|
+
children: /* @__PURE__ */ jsx15(Drawer, { children: children || components.map((componentKey, i) => {
|
|
3047
|
+
return /* @__PURE__ */ jsx15(
|
|
3048
|
+
ComponentListItem,
|
|
3049
|
+
{
|
|
3050
|
+
label: config.components[componentKey]["label"] ?? componentKey,
|
|
3051
|
+
name: componentKey,
|
|
3052
|
+
index: i
|
|
3012
3053
|
},
|
|
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
|
-
)
|
|
3054
|
+
componentKey
|
|
3055
|
+
);
|
|
3056
|
+
}) })
|
|
3039
3057
|
}
|
|
3040
3058
|
)
|
|
3041
3059
|
] });
|
|
@@ -3045,7 +3063,7 @@ ComponentList.Item = ComponentListItem;
|
|
|
3045
3063
|
// lib/use-component-list.tsx
|
|
3046
3064
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3047
3065
|
var useComponentList = () => {
|
|
3048
|
-
const [componentList, setComponentList] =
|
|
3066
|
+
const [componentList, setComponentList] = useState8();
|
|
3049
3067
|
const config = useAppStore((s) => s.config);
|
|
3050
3068
|
const uiComponentList = useAppStore((s) => s.state.ui.componentList);
|
|
3051
3069
|
useEffect12(() => {
|
|
@@ -3119,10 +3137,18 @@ var useComponentList = () => {
|
|
|
3119
3137
|
};
|
|
3120
3138
|
|
|
3121
3139
|
// components/CredBuild/components/Components/index.tsx
|
|
3122
|
-
import { useMemo as useMemo8 } from "react";
|
|
3123
|
-
|
|
3140
|
+
import { useMemo as useMemo8, useState as useState9 } from "react";
|
|
3141
|
+
|
|
3142
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Components/styles.module.css#css-module
|
|
3143
|
+
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" };
|
|
3144
|
+
|
|
3145
|
+
// components/CredBuild/components/Components/index.tsx
|
|
3146
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3147
|
+
var getClassName6 = get_class_name_factory_default("CredBuildComponents", styles_module_default6);
|
|
3124
3148
|
var Components = () => {
|
|
3125
3149
|
const overrides = useAppStore((s) => s.overrides);
|
|
3150
|
+
const config = useAppStore((s) => s.config);
|
|
3151
|
+
const [searchTerm, setSearchTerm] = useState9("");
|
|
3126
3152
|
const componentList = useComponentList();
|
|
3127
3153
|
const Wrapper = useMemo8(() => {
|
|
3128
3154
|
if (overrides.components) {
|
|
@@ -3132,36 +3158,108 @@ var Components = () => {
|
|
|
3132
3158
|
}
|
|
3133
3159
|
return overrides.components || overrides.drawer || "div";
|
|
3134
3160
|
}, [overrides]);
|
|
3135
|
-
|
|
3161
|
+
const matchingComponents = useMemo8(() => {
|
|
3162
|
+
if (!searchTerm.trim()) return [];
|
|
3163
|
+
return Object.keys(config.components).filter((componentKey) => {
|
|
3164
|
+
const componentConf = config.components[componentKey] || {};
|
|
3165
|
+
const label = componentConf["label"] ?? componentKey;
|
|
3166
|
+
return label.toLowerCase().includes(searchTerm.toLowerCase()) || componentKey.toLowerCase().includes(searchTerm.toLowerCase());
|
|
3167
|
+
});
|
|
3168
|
+
}, [searchTerm, config.components]);
|
|
3169
|
+
return /* @__PURE__ */ jsxs8(Wrapper, { className: getClassName6(), children: [
|
|
3170
|
+
/* @__PURE__ */ jsx17("div", { className: getClassName6("searchContainer"), children: /* @__PURE__ */ jsxs8("div", { className: getClassName6("searchWrapper"), children: [
|
|
3171
|
+
/* @__PURE__ */ jsx17(Search, { size: 14, className: getClassName6("searchIcon") }),
|
|
3172
|
+
/* @__PURE__ */ jsx17(
|
|
3173
|
+
"input",
|
|
3174
|
+
{
|
|
3175
|
+
type: "text",
|
|
3176
|
+
className: getClassName6("searchInput"),
|
|
3177
|
+
placeholder: "Search blocks...",
|
|
3178
|
+
value: searchTerm,
|
|
3179
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
3180
|
+
}
|
|
3181
|
+
),
|
|
3182
|
+
searchTerm && /* @__PURE__ */ jsx17(
|
|
3183
|
+
"button",
|
|
3184
|
+
{
|
|
3185
|
+
type: "button",
|
|
3186
|
+
className: getClassName6("clearButton"),
|
|
3187
|
+
onClick: () => setSearchTerm(""),
|
|
3188
|
+
title: "Clear search",
|
|
3189
|
+
children: /* @__PURE__ */ jsx17(X, { size: 12 })
|
|
3190
|
+
}
|
|
3191
|
+
)
|
|
3192
|
+
] }) }),
|
|
3193
|
+
/* @__PURE__ */ jsx17("div", { className: getClassName6("listContainer"), children: searchTerm.trim() ? matchingComponents.length > 0 ? /* @__PURE__ */ jsxs8("div", { style: { padding: "10px 12px" }, children: [
|
|
3194
|
+
/* @__PURE__ */ jsxs8(
|
|
3195
|
+
"div",
|
|
3196
|
+
{
|
|
3197
|
+
style: {
|
|
3198
|
+
fontSize: "10px",
|
|
3199
|
+
fontWeight: 700,
|
|
3200
|
+
color: "var(--cb-silver-muted)",
|
|
3201
|
+
marginBottom: "8px",
|
|
3202
|
+
textTransform: "uppercase",
|
|
3203
|
+
letterSpacing: "0.05em"
|
|
3204
|
+
},
|
|
3205
|
+
children: [
|
|
3206
|
+
"Search Results (",
|
|
3207
|
+
matchingComponents.length,
|
|
3208
|
+
")"
|
|
3209
|
+
]
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3212
|
+
/* @__PURE__ */ jsx17(Drawer, { children: /* @__PURE__ */ jsx17("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: matchingComponents.map((componentName, i) => {
|
|
3213
|
+
const componentConf = config.components[componentName] || {};
|
|
3214
|
+
return /* @__PURE__ */ jsx17(
|
|
3215
|
+
ComponentList.Item,
|
|
3216
|
+
{
|
|
3217
|
+
label: componentConf["label"] ?? componentName,
|
|
3218
|
+
name: componentName,
|
|
3219
|
+
index: i
|
|
3220
|
+
},
|
|
3221
|
+
componentName
|
|
3222
|
+
);
|
|
3223
|
+
}) }) })
|
|
3224
|
+
] }) : /* @__PURE__ */ jsxs8("div", { className: getClassName6("noResults"), children: [
|
|
3225
|
+
/* @__PURE__ */ jsx17(Inbox, { size: 20, strokeWidth: 1.5 }),
|
|
3226
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
3227
|
+
'No blocks found matching "',
|
|
3228
|
+
searchTerm,
|
|
3229
|
+
'"'
|
|
3230
|
+
] })
|
|
3231
|
+
] }) : componentList ? componentList : /* @__PURE__ */ jsx17(ComponentList, { id: "all" }) })
|
|
3232
|
+
] });
|
|
3136
3233
|
};
|
|
3137
3234
|
|
|
3138
|
-
// css-module:/home/
|
|
3139
|
-
var
|
|
3235
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/blocks/styles.module.css#css-module
|
|
3236
|
+
var styles_module_default7 = { "BlocksPlugin": "_BlocksPlugin_1ey1i_1" };
|
|
3140
3237
|
|
|
3141
3238
|
// plugins/blocks/index.tsx
|
|
3142
3239
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3143
|
-
var
|
|
3240
|
+
var getClassName7 = get_class_name_factory_default("BlocksPlugin", styles_module_default7);
|
|
3144
3241
|
var blocksPlugin = () => ({
|
|
3145
3242
|
name: "blocks",
|
|
3146
3243
|
label: "Blocks",
|
|
3147
|
-
render: () => /* @__PURE__ */ jsx18("div", { className:
|
|
3244
|
+
render: () => /* @__PURE__ */ jsx18("div", { className: getClassName7(), children: /* @__PURE__ */ jsx18(Components, {}) }),
|
|
3148
3245
|
icon: /* @__PURE__ */ jsx18(Shapes, {})
|
|
3149
3246
|
});
|
|
3150
3247
|
|
|
3151
|
-
// css-module:/home/
|
|
3152
|
-
var
|
|
3248
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/LayerTree/styles.module.css#css-module
|
|
3249
|
+
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
3250
|
|
|
3154
3251
|
// components/LayerTree/index.tsx
|
|
3155
3252
|
import {
|
|
3156
3253
|
forwardRef as forwardRef2,
|
|
3157
3254
|
useCallback as useCallback11,
|
|
3158
3255
|
useContext as useContext7,
|
|
3159
|
-
useRef as
|
|
3256
|
+
useRef as useRef9,
|
|
3257
|
+
memo as memo6
|
|
3160
3258
|
} 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",
|
|
3259
|
+
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
3260
|
+
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3261
|
+
var getClassName8 = get_class_name_factory_default("LayerTree", styles_module_default8);
|
|
3262
|
+
var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default8);
|
|
3165
3263
|
var DEFAULT_LAYER_ROW_HEIGHT = 32;
|
|
3166
3264
|
var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
|
|
3167
3265
|
var MIN_VIRTUALIZED_LAYER_COUNT = 25;
|
|
@@ -3258,7 +3356,7 @@ var getScrollParent = (el) => {
|
|
|
3258
3356
|
}
|
|
3259
3357
|
return null;
|
|
3260
3358
|
};
|
|
3261
|
-
var Layer = forwardRef2(function Layer2({
|
|
3359
|
+
var Layer = memo6(forwardRef2(function Layer2({
|
|
3262
3360
|
childIsSelected,
|
|
3263
3361
|
dataIndex,
|
|
3264
3362
|
depth,
|
|
@@ -3295,7 +3393,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3295
3393
|
if (t.includes("container") || t.includes("layout") || t.includes("flex")) return /* @__PURE__ */ jsx19(Box, { size: "14", strokeWidth: 2.5 });
|
|
3296
3394
|
return /* @__PURE__ */ jsx19(LayoutGrid, { size: "14", strokeWidth: 2.5 });
|
|
3297
3395
|
};
|
|
3298
|
-
return /* @__PURE__ */
|
|
3396
|
+
return /* @__PURE__ */ jsxs9(
|
|
3299
3397
|
"li",
|
|
3300
3398
|
{
|
|
3301
3399
|
ref,
|
|
@@ -3308,7 +3406,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3308
3406
|
"data-index": dataIndex,
|
|
3309
3407
|
"data-credbuild-layer-tree-id": node.itemId,
|
|
3310
3408
|
children: [
|
|
3311
|
-
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */
|
|
3409
|
+
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs9(
|
|
3312
3410
|
"button",
|
|
3313
3411
|
{
|
|
3314
3412
|
type: "button",
|
|
@@ -3341,7 +3439,7 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3341
3439
|
children: /* @__PURE__ */ jsx19(ChevronDown, { size: "12" })
|
|
3342
3440
|
}
|
|
3343
3441
|
),
|
|
3344
|
-
/* @__PURE__ */
|
|
3442
|
+
/* @__PURE__ */ jsxs9("div", { className: getClassNameLayer("title"), children: [
|
|
3345
3443
|
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("icon"), children: getLayerIcon(node.componentType) }),
|
|
3346
3444
|
/* @__PURE__ */ jsx19("div", { className: getClassNameLayer("name"), children: node.label })
|
|
3347
3445
|
] })
|
|
@@ -3367,17 +3465,17 @@ var Layer = forwardRef2(function Layer2({
|
|
|
3367
3465
|
]
|
|
3368
3466
|
}
|
|
3369
3467
|
);
|
|
3370
|
-
});
|
|
3371
|
-
var LayerTreeZone = ({
|
|
3468
|
+
}));
|
|
3469
|
+
var LayerTreeZone = memo6(({
|
|
3372
3470
|
depth,
|
|
3373
3471
|
selectedId,
|
|
3374
3472
|
selectedPathIds,
|
|
3375
3473
|
tree
|
|
3376
3474
|
}) => {
|
|
3377
3475
|
const shouldVirtualize = depth === 0 && tree.items.length >= MIN_VIRTUALIZED_LAYER_COUNT;
|
|
3378
|
-
return /* @__PURE__ */
|
|
3379
|
-
tree.label && /* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */ jsx19("div", { className:
|
|
3476
|
+
return /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
3477
|
+
tree.label && /* @__PURE__ */ jsxs9("div", { className: getClassName8("zoneTitle"), children: [
|
|
3478
|
+
/* @__PURE__ */ jsx19("div", { className: getClassName8("zoneIcon"), children: /* @__PURE__ */ jsx19(Layers, { size: "16" }) }),
|
|
3381
3479
|
tree.label
|
|
3382
3480
|
] }),
|
|
3383
3481
|
shouldVirtualize ? /* @__PURE__ */ jsx19(
|
|
@@ -3398,15 +3496,15 @@ var LayerTreeZone = ({
|
|
|
3398
3496
|
}
|
|
3399
3497
|
)
|
|
3400
3498
|
] });
|
|
3401
|
-
};
|
|
3402
|
-
var StaticLayerTreeItems = ({
|
|
3499
|
+
});
|
|
3500
|
+
var StaticLayerTreeItems = memo6(({
|
|
3403
3501
|
depth,
|
|
3404
3502
|
selectedId,
|
|
3405
3503
|
selectedPathIds,
|
|
3406
3504
|
tree
|
|
3407
3505
|
}) => {
|
|
3408
|
-
return /* @__PURE__ */
|
|
3409
|
-
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className:
|
|
3506
|
+
return /* @__PURE__ */ jsxs9("ul", { className: getClassName8(), children: [
|
|
3507
|
+
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className: getClassName8("helper"), children: "No items" }),
|
|
3410
3508
|
tree.items.map((node) => /* @__PURE__ */ jsx19(
|
|
3411
3509
|
Layer,
|
|
3412
3510
|
{
|
|
@@ -3420,15 +3518,15 @@ var StaticLayerTreeItems = ({
|
|
|
3420
3518
|
node.itemId
|
|
3421
3519
|
))
|
|
3422
3520
|
] });
|
|
3423
|
-
};
|
|
3424
|
-
var VirtualizedLayerTreeItems = ({
|
|
3521
|
+
});
|
|
3522
|
+
var VirtualizedLayerTreeItems = memo6(({
|
|
3425
3523
|
depth,
|
|
3426
3524
|
selectedId,
|
|
3427
3525
|
selectedPathIds,
|
|
3428
3526
|
tree
|
|
3429
3527
|
}) => {
|
|
3430
|
-
const listRef =
|
|
3431
|
-
const virtualizer =
|
|
3528
|
+
const listRef = useRef9(null);
|
|
3529
|
+
const virtualizer = useVirtualizer2({
|
|
3432
3530
|
count: tree.items.length,
|
|
3433
3531
|
estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
|
|
3434
3532
|
getItemKey: (index) => tree.items[index].itemId,
|
|
@@ -3495,12 +3593,12 @@ var VirtualizedLayerTreeItems = ({
|
|
|
3495
3593
|
)
|
|
3496
3594
|
);
|
|
3497
3595
|
}
|
|
3498
|
-
return /* @__PURE__ */
|
|
3499
|
-
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className:
|
|
3596
|
+
return /* @__PURE__ */ jsxs9("ul", { className: getClassName8(), ref: listRef, children: [
|
|
3597
|
+
tree.items.length === 0 && /* @__PURE__ */ jsx19("div", { className: getClassName8("helper"), children: "No items" }),
|
|
3500
3598
|
renderedItems
|
|
3501
3599
|
] });
|
|
3502
|
-
};
|
|
3503
|
-
var LayerTree = ({
|
|
3600
|
+
});
|
|
3601
|
+
var LayerTree = memo6(({
|
|
3504
3602
|
selectedId,
|
|
3505
3603
|
selectedPathIds,
|
|
3506
3604
|
trees
|
|
@@ -3515,10 +3613,10 @@ var LayerTree = ({
|
|
|
3515
3613
|
},
|
|
3516
3614
|
tree.zoneCompound
|
|
3517
3615
|
)) });
|
|
3518
|
-
};
|
|
3616
|
+
});
|
|
3519
3617
|
|
|
3520
3618
|
// components/CredBuild/components/Outline/index.tsx
|
|
3521
|
-
import { useMemo as useMemo9 } from "react";
|
|
3619
|
+
import { useMemo as useMemo9, memo as memo7 } from "react";
|
|
3522
3620
|
|
|
3523
3621
|
// lib/data/find-zones-for-area.ts
|
|
3524
3622
|
var findZonesForArea = (state, area) => {
|
|
@@ -3530,7 +3628,7 @@ var findZonesForArea = (state, area) => {
|
|
|
3530
3628
|
// components/CredBuild/components/Outline/index.tsx
|
|
3531
3629
|
import { useShallow as useShallow4 } from "zustand/react/shallow";
|
|
3532
3630
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3533
|
-
var Outline = () => {
|
|
3631
|
+
var Outline = memo7(() => {
|
|
3534
3632
|
const outlineOverride = useAppStore((s) => s.overrides.outline);
|
|
3535
3633
|
const config = useAppStore((s) => s.config);
|
|
3536
3634
|
const nodes = useAppStore((s) => s.state.indexes.nodes);
|
|
@@ -3566,23 +3664,23 @@ var Outline = () => {
|
|
|
3566
3664
|
trees
|
|
3567
3665
|
}
|
|
3568
3666
|
) });
|
|
3569
|
-
};
|
|
3667
|
+
});
|
|
3570
3668
|
|
|
3571
|
-
// css-module:/home/
|
|
3572
|
-
var
|
|
3669
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/outline/styles.module.css#css-module
|
|
3670
|
+
var styles_module_default9 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
|
|
3573
3671
|
|
|
3574
3672
|
// plugins/outline/index.tsx
|
|
3575
3673
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3576
|
-
var
|
|
3674
|
+
var getClassName9 = get_class_name_factory_default("OutlinePlugin", styles_module_default9);
|
|
3577
3675
|
var outlinePlugin = () => ({
|
|
3578
3676
|
name: "outline",
|
|
3579
3677
|
label: "Outline",
|
|
3580
|
-
render: () => /* @__PURE__ */ jsx21("div", { className:
|
|
3678
|
+
render: () => /* @__PURE__ */ jsx21("div", { className: getClassName9(), children: /* @__PURE__ */ jsx21(Outline, {}) }),
|
|
3581
3679
|
icon: /* @__PURE__ */ jsx21(List, {})
|
|
3582
3680
|
});
|
|
3583
3681
|
|
|
3584
|
-
// css-module:/home/
|
|
3585
|
-
var
|
|
3682
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/Breadcrumbs/styles.module.css#css-module
|
|
3683
|
+
var styles_module_default10 = { "Breadcrumbs": "_Breadcrumbs_1e0gb_1", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1e0gb_7", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1e0gb_7" };
|
|
3586
3684
|
|
|
3587
3685
|
// lib/use-breadcrumbs.ts
|
|
3588
3686
|
import { useMemo as useMemo10 } from "react";
|
|
@@ -3621,21 +3719,21 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
3621
3719
|
};
|
|
3622
3720
|
|
|
3623
3721
|
// components/Breadcrumbs/index.tsx
|
|
3624
|
-
import { jsx as jsx22, jsxs as
|
|
3625
|
-
var
|
|
3722
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3723
|
+
var getClassName10 = get_class_name_factory_default("Breadcrumbs", styles_module_default10);
|
|
3626
3724
|
var Breadcrumbs = ({
|
|
3627
3725
|
children,
|
|
3628
3726
|
numParents = 1
|
|
3629
3727
|
}) => {
|
|
3630
3728
|
const setUi = useAppStore((s) => s.setUi);
|
|
3631
3729
|
const breadcrumbs = useBreadcrumbs(numParents);
|
|
3632
|
-
return /* @__PURE__ */
|
|
3633
|
-
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */
|
|
3730
|
+
return /* @__PURE__ */ jsxs10("div", { className: getClassName10(), children: [
|
|
3731
|
+
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs10("div", { className: getClassName10("breadcrumb"), children: [
|
|
3634
3732
|
/* @__PURE__ */ jsx22(
|
|
3635
3733
|
"button",
|
|
3636
3734
|
{
|
|
3637
3735
|
type: "button",
|
|
3638
|
-
className:
|
|
3736
|
+
className: getClassName10("breadcrumbLabel"),
|
|
3639
3737
|
onClick: () => setUi({ itemSelector: breadcrumb.selector }),
|
|
3640
3738
|
children: breadcrumb.label
|
|
3641
3739
|
}
|
|
@@ -3646,20 +3744,20 @@ var Breadcrumbs = ({
|
|
|
3646
3744
|
] });
|
|
3647
3745
|
};
|
|
3648
3746
|
|
|
3649
|
-
// css-module:/home/
|
|
3650
|
-
var
|
|
3747
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Fields/styles.module.css#css-module
|
|
3748
|
+
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
3749
|
|
|
3652
3750
|
// components/CredBuild/components/Fields/index.tsx
|
|
3653
3751
|
import {
|
|
3654
|
-
memo as
|
|
3752
|
+
memo as memo8,
|
|
3655
3753
|
useCallback as useCallback12,
|
|
3656
3754
|
useContext as useContext8,
|
|
3657
3755
|
useEffect as useEffect13,
|
|
3658
3756
|
useMemo as useMemo11
|
|
3659
3757
|
} from "react";
|
|
3660
3758
|
import { useShallow as useShallow5 } from "zustand/react/shallow";
|
|
3661
|
-
import { Fragment as Fragment6, jsx as jsx23, jsxs as
|
|
3662
|
-
var
|
|
3759
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3760
|
+
var getClassName11 = get_class_name_factory_default("CredBuildFields", styles_module_default11);
|
|
3663
3761
|
var DefaultFields = ({
|
|
3664
3762
|
children
|
|
3665
3763
|
}) => {
|
|
@@ -3745,7 +3843,7 @@ var FieldsChildInner = ({ fieldName }) => {
|
|
|
3745
3843
|
}, [appStore, fieldStore, fieldName]);
|
|
3746
3844
|
if (!field || !id || !visible) return null;
|
|
3747
3845
|
if (field.type === "slot") return null;
|
|
3748
|
-
return /* @__PURE__ */ jsx23("div", { className:
|
|
3846
|
+
return /* @__PURE__ */ jsx23("div", { className: getClassName11("field"), children: /* @__PURE__ */ jsx23(
|
|
3749
3847
|
AutoFieldPrivate,
|
|
3750
3848
|
{
|
|
3751
3849
|
field,
|
|
@@ -3764,7 +3862,7 @@ var FieldsChild = ({ fieldName }) => {
|
|
|
3764
3862
|
}, [appStore, fieldName]);
|
|
3765
3863
|
return /* @__PURE__ */ jsx23(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ jsx23(FieldsChildInner, { fieldName }) });
|
|
3766
3864
|
};
|
|
3767
|
-
var FieldsChildMemo =
|
|
3865
|
+
var FieldsChildMemo = memo8(FieldsChild);
|
|
3768
3866
|
var FieldsInternal = ({ wrapFields = true }) => {
|
|
3769
3867
|
const overrides = useAppStore((s) => s.overrides);
|
|
3770
3868
|
const componentResolving = useAppStore((s) => {
|
|
@@ -3786,28 +3884,28 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
3786
3884
|
);
|
|
3787
3885
|
const isLoading = fieldsLoading || componentResolving;
|
|
3788
3886
|
const Wrapper = useMemo11(() => overrides.fields || DefaultFields, [overrides]);
|
|
3789
|
-
return /* @__PURE__ */
|
|
3887
|
+
return /* @__PURE__ */ jsxs11(
|
|
3790
3888
|
"form",
|
|
3791
3889
|
{
|
|
3792
|
-
className:
|
|
3890
|
+
className: getClassName11({ wrapFields }),
|
|
3793
3891
|
onSubmit: (e) => {
|
|
3794
3892
|
e.preventDefault();
|
|
3795
3893
|
},
|
|
3796
3894
|
children: [
|
|
3797
3895
|
/* @__PURE__ */ jsx23(Wrapper, { isLoading, itemSelector, children: fieldNames.map((fieldName) => /* @__PURE__ */ jsx23(FieldsChildMemo, { fieldName }, fieldName)) }),
|
|
3798
|
-
isLoading && /* @__PURE__ */ jsx23("div", { className:
|
|
3896
|
+
isLoading && /* @__PURE__ */ jsx23("div", { className: getClassName11("loadingOverlay"), children: /* @__PURE__ */ jsx23("div", { className: getClassName11("loadingOverlayInner"), children: /* @__PURE__ */ jsx23(Loader, { size: 16 }) }) })
|
|
3799
3897
|
]
|
|
3800
3898
|
}
|
|
3801
3899
|
);
|
|
3802
3900
|
};
|
|
3803
|
-
var Fields =
|
|
3901
|
+
var Fields = memo8(FieldsInternal);
|
|
3804
3902
|
|
|
3805
|
-
// css-module:/home/
|
|
3806
|
-
var
|
|
3903
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/fields/styles.module.css#css-module
|
|
3904
|
+
var styles_module_default12 = { "FieldsPlugin": "_FieldsPlugin_6as57_1", "FieldsPlugin-header": "_FieldsPlugin-header_6as57_7" };
|
|
3807
3905
|
|
|
3808
3906
|
// plugins/fields/index.tsx
|
|
3809
|
-
import { jsx as jsx24, jsxs as
|
|
3810
|
-
var
|
|
3907
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3908
|
+
var getClassName12 = get_class_name_factory_default("FieldsPlugin", styles_module_default12);
|
|
3811
3909
|
var CurrentTitle = () => {
|
|
3812
3910
|
const label = useAppStore((s) => {
|
|
3813
3911
|
const selectedItem = s.selectedItem;
|
|
@@ -3818,8 +3916,8 @@ var CurrentTitle = () => {
|
|
|
3818
3916
|
var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
3819
3917
|
name: "fields",
|
|
3820
3918
|
label: "Fields",
|
|
3821
|
-
render: () => /* @__PURE__ */
|
|
3822
|
-
/* @__PURE__ */ jsx24("div", { className:
|
|
3919
|
+
render: () => /* @__PURE__ */ jsxs12("div", { className: getClassName12(), children: [
|
|
3920
|
+
/* @__PURE__ */ jsx24("div", { className: getClassName12("header"), children: /* @__PURE__ */ jsx24(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx24(CurrentTitle, {}) }) }),
|
|
3823
3921
|
/* @__PURE__ */ jsx24(Fields, {})
|
|
3824
3922
|
] }),
|
|
3825
3923
|
icon: /* @__PURE__ */ jsx24(RectangleEllipsis, {}),
|
|
@@ -3831,12 +3929,12 @@ import {
|
|
|
3831
3929
|
useCallback as useCallback22,
|
|
3832
3930
|
useEffect as useEffect23,
|
|
3833
3931
|
useMemo as useMemo21,
|
|
3834
|
-
useRef as
|
|
3932
|
+
useRef as useRef17,
|
|
3835
3933
|
useState as useState18
|
|
3836
3934
|
} from "react";
|
|
3837
3935
|
|
|
3838
3936
|
// components/CredBuild/components/Preview/index.tsx
|
|
3839
|
-
import { useCallback as useCallback14, useEffect as useEffect15, useRef as
|
|
3937
|
+
import { useCallback as useCallback14, useEffect as useEffect15, useRef as useRef11, useMemo as useMemo13 } from "react";
|
|
3840
3938
|
|
|
3841
3939
|
// components/AutoFrame/index.tsx
|
|
3842
3940
|
import {
|
|
@@ -3844,7 +3942,7 @@ import {
|
|
|
3844
3942
|
useCallback as useCallback13,
|
|
3845
3943
|
useContext as useContext9,
|
|
3846
3944
|
useEffect as useEffect14,
|
|
3847
|
-
useRef as
|
|
3945
|
+
useRef as useRef10,
|
|
3848
3946
|
useState as useState10
|
|
3849
3947
|
} from "react";
|
|
3850
3948
|
import hash from "object-hash";
|
|
@@ -4086,8 +4184,8 @@ function AutoFrame({
|
|
|
4086
4184
|
const handleStylesLoaded = useCallback13(() => {
|
|
4087
4185
|
setStylesLoaded(true);
|
|
4088
4186
|
}, []);
|
|
4089
|
-
const onReadyRef =
|
|
4090
|
-
const onNotReadyRef =
|
|
4187
|
+
const onReadyRef = useRef10(onReady);
|
|
4188
|
+
const onNotReadyRef = useRef10(onNotReady);
|
|
4091
4189
|
useEffect14(() => {
|
|
4092
4190
|
onReadyRef.current = onReady;
|
|
4093
4191
|
onNotReadyRef.current = onNotReady;
|
|
@@ -4138,8 +4236,8 @@ function AutoFrame({
|
|
|
4138
4236
|
AutoFrame.displayName = "AutoFrame";
|
|
4139
4237
|
var AutoFrame_default = AutoFrame;
|
|
4140
4238
|
|
|
4141
|
-
// css-module:/home/
|
|
4142
|
-
var
|
|
4239
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Preview/styles.module.css#css-module
|
|
4240
|
+
var styles_module_default13 = { "CredBuildPreview": "_CredBuildPreview_1z08a_1", "CredBuildPreview-frame": "_CredBuildPreview-frame_1z08a_6" };
|
|
4143
4241
|
|
|
4144
4242
|
// lib/bubble-pointer-event.ts
|
|
4145
4243
|
var BaseEvent = typeof PointerEvent !== "undefined" ? PointerEvent : Event;
|
|
@@ -4161,7 +4259,7 @@ var BubbledPointerEvent = class extends BaseEvent {
|
|
|
4161
4259
|
|
|
4162
4260
|
// components/CredBuild/components/Preview/index.tsx
|
|
4163
4261
|
import { Fragment as Fragment8, jsx as jsx26 } from "react/jsx-runtime";
|
|
4164
|
-
var
|
|
4262
|
+
var getClassName13 = get_class_name_factory_default("CredBuildPreview", styles_module_default13);
|
|
4165
4263
|
var useBubbleIframeEvents = (ref) => {
|
|
4166
4264
|
const status = useAppStore((s) => s.status);
|
|
4167
4265
|
useEffect15(() => {
|
|
@@ -4233,7 +4331,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4233
4331
|
);
|
|
4234
4332
|
const Frame = useMemo13(() => overrides.iframe, [overrides]);
|
|
4235
4333
|
const rootProps = root.props || root;
|
|
4236
|
-
const ref =
|
|
4334
|
+
const ref = useRef11(null);
|
|
4237
4335
|
useBubbleIframeEvents(ref);
|
|
4238
4336
|
const inner = !renderData ? /* @__PURE__ */ jsx26(
|
|
4239
4337
|
Page,
|
|
@@ -4257,7 +4355,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4257
4355
|
return /* @__PURE__ */ jsx26(
|
|
4258
4356
|
"div",
|
|
4259
4357
|
{
|
|
4260
|
-
className:
|
|
4358
|
+
className: getClassName13(),
|
|
4261
4359
|
id,
|
|
4262
4360
|
"data-credbuild-preview": true,
|
|
4263
4361
|
onClick: (e) => {
|
|
@@ -4270,7 +4368,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4270
4368
|
AutoFrame_default,
|
|
4271
4369
|
{
|
|
4272
4370
|
id: "preview-frame",
|
|
4273
|
-
className:
|
|
4371
|
+
className: getClassName13("frame"),
|
|
4274
4372
|
"data-rfd-iframe": true,
|
|
4275
4373
|
onReady: () => {
|
|
4276
4374
|
setStatus("READY");
|
|
@@ -4290,7 +4388,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
4290
4388
|
"div",
|
|
4291
4389
|
{
|
|
4292
4390
|
id: "preview-frame",
|
|
4293
|
-
className:
|
|
4391
|
+
className: getClassName13("frame"),
|
|
4294
4392
|
ref,
|
|
4295
4393
|
"data-credbuild-entry": true,
|
|
4296
4394
|
children: inner
|
|
@@ -4366,8 +4464,8 @@ function PropsProvider(props) {
|
|
|
4366
4464
|
}
|
|
4367
4465
|
var usePropsContext = () => useContext10(propsContext);
|
|
4368
4466
|
|
|
4369
|
-
// css-module:/home/
|
|
4370
|
-
var
|
|
4467
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Layout/styles.module.css#css-module
|
|
4468
|
+
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
4469
|
|
|
4372
4470
|
// lib/use-inject-css.ts
|
|
4373
4471
|
import { useEffect as useEffect16, useState as useState11 } from "react";
|
|
@@ -4421,7 +4519,7 @@ import {
|
|
|
4421
4519
|
useCallback as useCallback16,
|
|
4422
4520
|
useEffect as useEffect17,
|
|
4423
4521
|
useMemo as useMemo15,
|
|
4424
|
-
useRef as
|
|
4522
|
+
useRef as useRef12,
|
|
4425
4523
|
useState as useState12
|
|
4426
4524
|
} from "react";
|
|
4427
4525
|
import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
|
|
@@ -4755,7 +4853,7 @@ import { jsx as jsx29 } from "react/jsx-runtime";
|
|
|
4755
4853
|
var DEBUG2 = false;
|
|
4756
4854
|
var AREA_CHANGE_DEBOUNCE_MS = 100;
|
|
4757
4855
|
var useTempDisableFallback = (timeout2) => {
|
|
4758
|
-
const lastFallbackDisable =
|
|
4856
|
+
const lastFallbackDisable = useRef12(null);
|
|
4759
4857
|
return useCallback16((manager) => {
|
|
4760
4858
|
collisionStore.setState({ fallbackEnabled: false });
|
|
4761
4859
|
const fallbackId = generateId();
|
|
@@ -4775,7 +4873,7 @@ var DragDropContextClient = ({
|
|
|
4775
4873
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
4776
4874
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
4777
4875
|
const appStore = useAppStoreApi();
|
|
4778
|
-
const debouncedParamsRef =
|
|
4876
|
+
const debouncedParamsRef = useRef12(null);
|
|
4779
4877
|
const tempDisableFallback = useTempDisableFallback(100);
|
|
4780
4878
|
const [zoneStore] = useState12(() => {
|
|
4781
4879
|
const rootVirtualizers = /* @__PURE__ */ new Map();
|
|
@@ -4921,8 +5019,8 @@ var DragDropContextClient = ({
|
|
|
4921
5019
|
]);
|
|
4922
5020
|
const sensors = useSensors();
|
|
4923
5021
|
const [dragListeners, setDragListeners] = useState12({});
|
|
4924
|
-
const dragMode =
|
|
4925
|
-
const initialSelector =
|
|
5022
|
+
const dragMode = useRef12(null);
|
|
5023
|
+
const initialSelector = useRef12(void 0);
|
|
4926
5024
|
const nextContextValue = useMemo15(
|
|
4927
5025
|
() => ({
|
|
4928
5026
|
mode: "edit",
|
|
@@ -5178,14 +5276,14 @@ var DragDropContext = ({
|
|
|
5178
5276
|
};
|
|
5179
5277
|
|
|
5180
5278
|
// components/CredBuild/components/Header/index.tsx
|
|
5181
|
-
import { memo as
|
|
5279
|
+
import { memo as memo9, useCallback as useCallback17, useMemo as useMemo18, useState as useState14 } from "react";
|
|
5182
5280
|
|
|
5183
|
-
// css-module:/home/
|
|
5184
|
-
var
|
|
5281
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/MenuBar/styles.module.css#css-module
|
|
5282
|
+
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
5283
|
|
|
5186
5284
|
// components/MenuBar/index.tsx
|
|
5187
|
-
import { Fragment as Fragment10, jsx as jsx30, jsxs as
|
|
5188
|
-
var
|
|
5285
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5286
|
+
var getClassName14 = get_class_name_factory_default("MenuBar", styles_module_default15);
|
|
5189
5287
|
function MenuBar({
|
|
5190
5288
|
menuOpen = false,
|
|
5191
5289
|
renderHeaderActions,
|
|
@@ -5198,7 +5296,7 @@ function MenuBar({
|
|
|
5198
5296
|
return /* @__PURE__ */ jsx30(
|
|
5199
5297
|
"div",
|
|
5200
5298
|
{
|
|
5201
|
-
className:
|
|
5299
|
+
className: getClassName14({ menuOpen }),
|
|
5202
5300
|
onClick: (event) => {
|
|
5203
5301
|
const element = event.target;
|
|
5204
5302
|
if (window.matchMedia("(min-width: 638px)").matches) {
|
|
@@ -5208,8 +5306,8 @@ function MenuBar({
|
|
|
5208
5306
|
setMenuOpen(false);
|
|
5209
5307
|
}
|
|
5210
5308
|
},
|
|
5211
|
-
children: /* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5309
|
+
children: /* @__PURE__ */ jsxs13("div", { className: getClassName14("inner"), children: [
|
|
5310
|
+
/* @__PURE__ */ jsxs13("div", { className: getClassName14("history"), children: [
|
|
5213
5311
|
/* @__PURE__ */ jsx30(
|
|
5214
5312
|
IconButton,
|
|
5215
5313
|
{
|
|
@@ -5240,19 +5338,19 @@ function MenuBar({
|
|
|
5240
5338
|
// components/ViewportControls/index.tsx
|
|
5241
5339
|
import { useEffect as useEffect18, useMemo as useMemo16, useState as useState13 } from "react";
|
|
5242
5340
|
|
|
5243
|
-
// css-module:/home/
|
|
5244
|
-
var
|
|
5341
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/ViewportControls/styles.module.css#css-module
|
|
5342
|
+
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
5343
|
|
|
5246
5344
|
// components/ViewportControls/index.tsx
|
|
5247
|
-
import { jsx as jsx31, jsxs as
|
|
5345
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5248
5346
|
var icons = {
|
|
5249
5347
|
Smartphone: /* @__PURE__ */ jsx31(Smartphone, { size: 16 }),
|
|
5250
5348
|
Tablet: /* @__PURE__ */ jsx31(Tablet, { size: 16 }),
|
|
5251
5349
|
Monitor: /* @__PURE__ */ jsx31(Monitor, { size: 16 }),
|
|
5252
5350
|
FullWidth: /* @__PURE__ */ jsx31(Expand, { size: 16 })
|
|
5253
5351
|
};
|
|
5254
|
-
var
|
|
5255
|
-
var getClassNameButton = get_class_name_factory_default("ViewportButton",
|
|
5352
|
+
var getClassName15 = get_class_name_factory_default("ViewportControls", styles_module_default16);
|
|
5353
|
+
var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default16);
|
|
5256
5354
|
var ActionButton = ({
|
|
5257
5355
|
children,
|
|
5258
5356
|
title,
|
|
@@ -5312,13 +5410,13 @@ var ViewportControls = ({
|
|
|
5312
5410
|
setActiveViewport(uiViewports.current.width);
|
|
5313
5411
|
}, [uiViewports.current.width, uiViewports]);
|
|
5314
5412
|
const [isExpanded, setIsExpanded] = useState13(false);
|
|
5315
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ jsxs14(
|
|
5316
5414
|
"div",
|
|
5317
5415
|
{
|
|
5318
|
-
className:
|
|
5416
|
+
className: getClassName15({ isExpanded, fullScreen }),
|
|
5319
5417
|
suppressHydrationWarning: true,
|
|
5320
5418
|
children: [
|
|
5321
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5419
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("actions"), children: /* @__PURE__ */ jsxs14("div", { className: getClassName15("actionsInner"), children: [
|
|
5322
5420
|
viewports.map((viewport, i) => /* @__PURE__ */ jsx31(
|
|
5323
5421
|
ActionButton,
|
|
5324
5422
|
{
|
|
@@ -5332,7 +5430,7 @@ var ViewportControls = ({
|
|
|
5332
5430
|
},
|
|
5333
5431
|
i
|
|
5334
5432
|
)),
|
|
5335
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5433
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("divider") }),
|
|
5336
5434
|
/* @__PURE__ */ jsx31(
|
|
5337
5435
|
ActionButton,
|
|
5338
5436
|
{
|
|
@@ -5367,12 +5465,12 @@ var ViewportControls = ({
|
|
|
5367
5465
|
children: /* @__PURE__ */ jsx31(ZoomIn, { size: 16 })
|
|
5368
5466
|
}
|
|
5369
5467
|
),
|
|
5370
|
-
/* @__PURE__ */
|
|
5371
|
-
/* @__PURE__ */ jsx31("div", { className:
|
|
5468
|
+
/* @__PURE__ */ jsxs14("div", { className: getClassName15("zoom"), children: [
|
|
5469
|
+
/* @__PURE__ */ jsx31("div", { className: getClassName15("divider") }),
|
|
5372
5470
|
/* @__PURE__ */ jsx31(
|
|
5373
5471
|
"select",
|
|
5374
5472
|
{
|
|
5375
|
-
className:
|
|
5473
|
+
className: getClassName15("zoomSelect"),
|
|
5376
5474
|
value: zoom.toString(),
|
|
5377
5475
|
onClick: (e) => {
|
|
5378
5476
|
e.stopPropagation();
|
|
@@ -5395,8 +5493,9 @@ var ViewportControls = ({
|
|
|
5395
5493
|
/* @__PURE__ */ jsx31(
|
|
5396
5494
|
"button",
|
|
5397
5495
|
{
|
|
5398
|
-
className:
|
|
5496
|
+
className: getClassName15("toggleButton"),
|
|
5399
5497
|
title: "Toggle viewport menu",
|
|
5498
|
+
"aria-expanded": isExpanded,
|
|
5400
5499
|
onClick: () => setIsExpanded((s) => !s),
|
|
5401
5500
|
children: isExpanded ? /* @__PURE__ */ jsx31(X, { size: 16 }) : /* @__PURE__ */ jsx31(Monitor, { size: 16 })
|
|
5402
5501
|
}
|
|
@@ -5413,7 +5512,7 @@ import { useShallow as useShallow6 } from "zustand/react/shallow";
|
|
|
5413
5512
|
import {
|
|
5414
5513
|
createContext as createContext7,
|
|
5415
5514
|
useContext as useContext12,
|
|
5416
|
-
useRef as
|
|
5515
|
+
useRef as useRef13,
|
|
5417
5516
|
useMemo as useMemo17
|
|
5418
5517
|
} from "react";
|
|
5419
5518
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
@@ -5421,7 +5520,7 @@ var FrameContext = createContext7(null);
|
|
|
5421
5520
|
var FrameProvider = ({
|
|
5422
5521
|
children
|
|
5423
5522
|
}) => {
|
|
5424
|
-
const frameRef =
|
|
5523
|
+
const frameRef = useRef13(null);
|
|
5425
5524
|
const value = useMemo17(
|
|
5426
5525
|
() => ({
|
|
5427
5526
|
frameRef
|
|
@@ -5438,12 +5537,12 @@ var useCanvasFrame = () => {
|
|
|
5438
5537
|
return context;
|
|
5439
5538
|
};
|
|
5440
5539
|
|
|
5441
|
-
// css-module:/home/
|
|
5442
|
-
var
|
|
5540
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Header/styles.module.css#css-module
|
|
5541
|
+
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
5542
|
|
|
5444
5543
|
// components/CredBuild/components/Header/index.tsx
|
|
5445
|
-
import { Fragment as Fragment11, jsx as jsx33, jsxs as
|
|
5446
|
-
var
|
|
5544
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5545
|
+
var getClassName16 = get_class_name_factory_default("CredBuildHeader", styles_module_default17);
|
|
5447
5546
|
var HeaderInner = ({
|
|
5448
5547
|
hidePlugins,
|
|
5449
5548
|
theme
|
|
@@ -5539,7 +5638,7 @@ var HeaderInner = ({
|
|
|
5539
5638
|
return /* @__PURE__ */ jsx33(
|
|
5540
5639
|
CustomHeader,
|
|
5541
5640
|
{
|
|
5542
|
-
actions: /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */
|
|
5641
|
+
actions: /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsxs15(CustomHeaderActions, { children: [
|
|
5543
5642
|
/* @__PURE__ */ jsx33(
|
|
5544
5643
|
Button,
|
|
5545
5644
|
{
|
|
@@ -5565,14 +5664,14 @@ var HeaderInner = ({
|
|
|
5565
5664
|
children: /* @__PURE__ */ jsx33(
|
|
5566
5665
|
"header",
|
|
5567
5666
|
{
|
|
5568
|
-
className:
|
|
5667
|
+
className: getClassName16({
|
|
5569
5668
|
leftSideBarVisible,
|
|
5570
5669
|
rightSideBarVisible,
|
|
5571
5670
|
hidePlugins
|
|
5572
5671
|
}),
|
|
5573
|
-
children: /* @__PURE__ */
|
|
5574
|
-
/* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5672
|
+
children: /* @__PURE__ */ jsxs15("div", { className: getClassName16("inner"), children: [
|
|
5673
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("leftActions"), children: [
|
|
5674
|
+
/* @__PURE__ */ jsxs15("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
5576
5675
|
/* @__PURE__ */ jsx33(
|
|
5577
5676
|
Button,
|
|
5578
5677
|
{
|
|
@@ -5605,8 +5704,8 @@ var HeaderInner = ({
|
|
|
5605
5704
|
}
|
|
5606
5705
|
)
|
|
5607
5706
|
] }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5707
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("toggle"), children: [
|
|
5708
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("leftSideBarToggle"), children: /* @__PURE__ */ jsx33(
|
|
5610
5709
|
IconButton,
|
|
5611
5710
|
{
|
|
5612
5711
|
type: "button",
|
|
@@ -5617,7 +5716,7 @@ var HeaderInner = ({
|
|
|
5617
5716
|
children: /* @__PURE__ */ jsx33(PanelLeft, { size: 16, focusable: "false" })
|
|
5618
5717
|
}
|
|
5619
5718
|
) }),
|
|
5620
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5719
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("rightSideBarToggle"), children: /* @__PURE__ */ jsx33(
|
|
5621
5720
|
IconButton,
|
|
5622
5721
|
{
|
|
5623
5722
|
type: "button",
|
|
@@ -5629,12 +5728,12 @@ var HeaderInner = ({
|
|
|
5629
5728
|
}
|
|
5630
5729
|
) })
|
|
5631
5730
|
] }),
|
|
5632
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5731
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("title"), children: /* @__PURE__ */ jsxs15(Heading, { rank: "2", size: "xs", children: [
|
|
5633
5732
|
/* @__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:
|
|
5733
|
+
headerPath && /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsx33("code", { className: getClassName16("path"), style: { fontSize: "10px", opacity: 0.6, marginLeft: "8px" }, children: headerPath }) })
|
|
5635
5734
|
] }) })
|
|
5636
5735
|
] }),
|
|
5637
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5736
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("viewportTools"), children: /* @__PURE__ */ jsx33(
|
|
5638
5737
|
ViewportControls,
|
|
5639
5738
|
{
|
|
5640
5739
|
fullScreen: _experimentalFullScreenCanvas,
|
|
@@ -5660,8 +5759,8 @@ var HeaderInner = ({
|
|
|
5660
5759
|
}
|
|
5661
5760
|
}
|
|
5662
5761
|
) }),
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
/* @__PURE__ */ jsx33("div", { className:
|
|
5762
|
+
/* @__PURE__ */ jsxs15("div", { className: getClassName16("tools"), children: [
|
|
5763
|
+
/* @__PURE__ */ jsx33("div", { className: getClassName16("menuButton"), children: /* @__PURE__ */ jsx33(
|
|
5665
5764
|
IconButton,
|
|
5666
5765
|
{
|
|
5667
5766
|
type: "button",
|
|
@@ -5678,7 +5777,7 @@ var HeaderInner = ({
|
|
|
5678
5777
|
dispatch,
|
|
5679
5778
|
onPublish,
|
|
5680
5779
|
menuOpen,
|
|
5681
|
-
renderHeaderActions: () => /* @__PURE__ */
|
|
5780
|
+
renderHeaderActions: () => /* @__PURE__ */ jsxs15(CustomHeaderActions, { children: [
|
|
5682
5781
|
/* @__PURE__ */ jsx33(
|
|
5683
5782
|
Button,
|
|
5684
5783
|
{
|
|
@@ -5711,14 +5810,14 @@ var HeaderInner = ({
|
|
|
5711
5810
|
}
|
|
5712
5811
|
);
|
|
5713
5812
|
};
|
|
5714
|
-
var Header =
|
|
5813
|
+
var Header = memo9(HeaderInner);
|
|
5715
5814
|
|
|
5716
|
-
// css-module:/home/
|
|
5717
|
-
var
|
|
5815
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/SidebarSection/styles.module.css#css-module
|
|
5816
|
+
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
5817
|
|
|
5719
5818
|
// components/SidebarSection/index.tsx
|
|
5720
|
-
import { jsx as jsx34, jsxs as
|
|
5721
|
-
var
|
|
5819
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5820
|
+
var getClassName17 = get_class_name_factory_default("SidebarSection", styles_module_default18);
|
|
5722
5821
|
var SidebarSection = ({
|
|
5723
5822
|
children,
|
|
5724
5823
|
title,
|
|
@@ -5727,13 +5826,13 @@ var SidebarSection = ({
|
|
|
5727
5826
|
noBorderTop,
|
|
5728
5827
|
isLoading
|
|
5729
5828
|
}) => {
|
|
5730
|
-
return /* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5829
|
+
return /* @__PURE__ */ jsxs16("div", { className: getClassName17({ noBorderTop }), style: { background }, children: [
|
|
5830
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("title"), children: /* @__PURE__ */ jsxs16("div", { className: getClassName17("breadcrumbs"), children: [
|
|
5732
5831
|
showBreadcrumbs && /* @__PURE__ */ jsx34(Breadcrumbs, {}),
|
|
5733
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5832
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("heading"), children: /* @__PURE__ */ jsx34(Heading, { rank: "2", size: "xs", children: title }) })
|
|
5734
5833
|
] }) }),
|
|
5735
|
-
/* @__PURE__ */ jsx34("div", { className:
|
|
5736
|
-
isLoading && /* @__PURE__ */ jsx34("div", { className:
|
|
5834
|
+
/* @__PURE__ */ jsx34("div", { className: getClassName17("content"), children }),
|
|
5835
|
+
isLoading && /* @__PURE__ */ jsx34("div", { className: getClassName17("loadingOverlay"), children: /* @__PURE__ */ jsx34(Loader, { size: 32 }) })
|
|
5737
5836
|
] });
|
|
5738
5837
|
};
|
|
5739
5838
|
|
|
@@ -5742,17 +5841,17 @@ import {
|
|
|
5742
5841
|
useCallback as useCallback18,
|
|
5743
5842
|
useEffect as useEffect19,
|
|
5744
5843
|
useMemo as useMemo19,
|
|
5745
|
-
useRef as
|
|
5844
|
+
useRef as useRef14,
|
|
5746
5845
|
useState as useState15
|
|
5747
5846
|
} from "react";
|
|
5748
5847
|
|
|
5749
|
-
// css-module:/home/
|
|
5750
|
-
var
|
|
5848
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Canvas/styles.module.css#css-module
|
|
5849
|
+
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
5850
|
|
|
5752
5851
|
// components/CredBuild/components/Canvas/index.tsx
|
|
5753
5852
|
import { useShallow as useShallow7 } from "zustand/react/shallow";
|
|
5754
|
-
import { Fragment as Fragment12, jsx as jsx35, jsxs as
|
|
5755
|
-
var
|
|
5853
|
+
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5854
|
+
var getClassName18 = get_class_name_factory_default("CredBuildCanvas", styles_module_default19);
|
|
5756
5855
|
var ZOOM_ON_CHANGE = true;
|
|
5757
5856
|
var TRANSITION_DURATION = 150;
|
|
5758
5857
|
var Canvas = () => {
|
|
@@ -5796,7 +5895,7 @@ var Canvas = () => {
|
|
|
5796
5895
|
}))
|
|
5797
5896
|
);
|
|
5798
5897
|
const [showTransition, setShowTransition] = useState15(false);
|
|
5799
|
-
const isResizingRef =
|
|
5898
|
+
const isResizingRef = useRef14(false);
|
|
5800
5899
|
const defaultRender = useMemo19(() => {
|
|
5801
5900
|
const CredBuildDefault = ({ children }) => /* @__PURE__ */ jsx35(Fragment12, { children });
|
|
5802
5901
|
return CredBuildDefault;
|
|
@@ -5922,7 +6021,7 @@ var Canvas = () => {
|
|
|
5922
6021
|
return /* @__PURE__ */ jsx35(
|
|
5923
6022
|
"div",
|
|
5924
6023
|
{
|
|
5925
|
-
className:
|
|
6024
|
+
className: getClassName18({
|
|
5926
6025
|
ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
|
|
5927
6026
|
showLoader,
|
|
5928
6027
|
fullScreen: _experimentalFullScreenCanvas
|
|
@@ -5937,11 +6036,11 @@ var Canvas = () => {
|
|
|
5937
6036
|
});
|
|
5938
6037
|
}
|
|
5939
6038
|
},
|
|
5940
|
-
children: /* @__PURE__ */
|
|
6039
|
+
children: /* @__PURE__ */ jsxs17("div", { className: getClassName18("inner"), ref: frameRef, children: [
|
|
5941
6040
|
/* @__PURE__ */ jsx35(
|
|
5942
6041
|
"div",
|
|
5943
6042
|
{
|
|
5944
|
-
className:
|
|
6043
|
+
className: getClassName18("root"),
|
|
5945
6044
|
style: {
|
|
5946
6045
|
width: iframe.enabled ? viewports.current.width : "100%",
|
|
5947
6046
|
height: !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : zoomConfig.rootHeight,
|
|
@@ -5959,17 +6058,17 @@ var Canvas = () => {
|
|
|
5959
6058
|
children: /* @__PURE__ */ jsx35(CustomPreview, { children: /* @__PURE__ */ jsx35(Preview, {}) })
|
|
5960
6059
|
}
|
|
5961
6060
|
),
|
|
5962
|
-
/* @__PURE__ */ jsx35("div", { className:
|
|
6061
|
+
/* @__PURE__ */ jsx35("div", { className: getClassName18("loader"), children: /* @__PURE__ */ jsx35(Loader, { size: 24 }) })
|
|
5963
6062
|
] })
|
|
5964
6063
|
}
|
|
5965
6064
|
);
|
|
5966
6065
|
};
|
|
5967
6066
|
|
|
5968
6067
|
// lib/use-sidebar-resize.ts
|
|
5969
|
-
import { useCallback as useCallback19, useEffect as useEffect20, useRef as
|
|
6068
|
+
import { useCallback as useCallback19, useEffect as useEffect20, useRef as useRef15, useState as useState16 } from "react";
|
|
5970
6069
|
function useSidebarResize(position, dispatch) {
|
|
5971
6070
|
const [width, setWidth] = useState16(null);
|
|
5972
|
-
const sidebarRef =
|
|
6071
|
+
const sidebarRef = useRef15(null);
|
|
5973
6072
|
const storeWidth = useAppStore(
|
|
5974
6073
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
5975
6074
|
);
|
|
@@ -6047,14 +6146,14 @@ function useSidebarResize(position, dispatch) {
|
|
|
6047
6146
|
}
|
|
6048
6147
|
|
|
6049
6148
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
6050
|
-
import { useCallback as useCallback20, useRef as
|
|
6149
|
+
import { useCallback as useCallback20, useRef as useRef16 } from "react";
|
|
6051
6150
|
|
|
6052
|
-
// css-module:/home/
|
|
6053
|
-
var
|
|
6151
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
|
|
6152
|
+
var styles_module_default20 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
|
|
6054
6153
|
|
|
6055
6154
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
6056
6155
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6057
|
-
var
|
|
6156
|
+
var getClassName19 = get_class_name_factory_default("ResizeHandle", styles_module_default20);
|
|
6058
6157
|
var ResizeHandle = ({
|
|
6059
6158
|
position,
|
|
6060
6159
|
sidebarRef,
|
|
@@ -6063,10 +6162,10 @@ var ResizeHandle = ({
|
|
|
6063
6162
|
}) => {
|
|
6064
6163
|
const { frameRef } = useCanvasFrame();
|
|
6065
6164
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
6066
|
-
const handleRef =
|
|
6067
|
-
const isDragging =
|
|
6068
|
-
const startX =
|
|
6069
|
-
const startWidth =
|
|
6165
|
+
const handleRef = useRef16(null);
|
|
6166
|
+
const isDragging = useRef16(false);
|
|
6167
|
+
const startX = useRef16(0);
|
|
6168
|
+
const startWidth = useRef16(0);
|
|
6070
6169
|
const handleMouseMove = useCallback20(
|
|
6071
6170
|
(e) => {
|
|
6072
6171
|
if (!isDragging.current) return;
|
|
@@ -6114,18 +6213,18 @@ var ResizeHandle = ({
|
|
|
6114
6213
|
"div",
|
|
6115
6214
|
{
|
|
6116
6215
|
ref: handleRef,
|
|
6117
|
-
className:
|
|
6216
|
+
className: getClassName19({ [position]: true }),
|
|
6118
6217
|
onMouseDown: handleMouseDown
|
|
6119
6218
|
}
|
|
6120
6219
|
);
|
|
6121
6220
|
};
|
|
6122
6221
|
|
|
6123
|
-
// css-module:/home/
|
|
6124
|
-
var
|
|
6222
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
|
|
6223
|
+
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
6224
|
|
|
6126
6225
|
// components/CredBuild/components/Sidebar/index.tsx
|
|
6127
|
-
import { Fragment as Fragment13, jsx as jsx37, jsxs as
|
|
6128
|
-
var
|
|
6226
|
+
import { Fragment as Fragment13, jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6227
|
+
var getClassName20 = get_class_name_factory_default("Sidebar", styles_module_default21);
|
|
6129
6228
|
var Sidebar = ({
|
|
6130
6229
|
position,
|
|
6131
6230
|
sidebarRef,
|
|
@@ -6134,16 +6233,16 @@ var Sidebar = ({
|
|
|
6134
6233
|
onResizeEnd,
|
|
6135
6234
|
children
|
|
6136
6235
|
}) => {
|
|
6137
|
-
return /* @__PURE__ */
|
|
6236
|
+
return /* @__PURE__ */ jsxs18(Fragment13, { children: [
|
|
6138
6237
|
/* @__PURE__ */ jsx37(
|
|
6139
6238
|
"div",
|
|
6140
6239
|
{
|
|
6141
6240
|
ref: sidebarRef,
|
|
6142
|
-
className:
|
|
6241
|
+
className: getClassName20({ [position]: true, isVisible }),
|
|
6143
6242
|
children
|
|
6144
6243
|
}
|
|
6145
6244
|
),
|
|
6146
|
-
/* @__PURE__ */ jsx37("div", { className: `${
|
|
6245
|
+
/* @__PURE__ */ jsx37("div", { className: `${getClassName20("resizeHandle")}`, children: /* @__PURE__ */ jsx37(
|
|
6147
6246
|
ResizeHandle,
|
|
6148
6247
|
{
|
|
6149
6248
|
position,
|
|
@@ -6213,13 +6312,13 @@ var useDeleteHotkeys = () => {
|
|
|
6213
6312
|
useHotkey({ backspace: true }, deleteSelectedComponent);
|
|
6214
6313
|
};
|
|
6215
6314
|
|
|
6216
|
-
// css-module:/home/
|
|
6217
|
-
var
|
|
6315
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Nav/styles.module.css#css-module
|
|
6316
|
+
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
6317
|
|
|
6219
6318
|
// components/CredBuild/components/Nav/index.tsx
|
|
6220
|
-
import { jsx as jsx38, jsxs as
|
|
6221
|
-
var
|
|
6222
|
-
var getClassNameItem2 = get_class_name_factory_default("NavItem",
|
|
6319
|
+
import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6320
|
+
var getClassName21 = get_class_name_factory_default("Nav", styles_module_default22);
|
|
6321
|
+
var getClassNameItem2 = get_class_name_factory_default("NavItem", styles_module_default22);
|
|
6223
6322
|
var MenuItem = ({
|
|
6224
6323
|
label,
|
|
6225
6324
|
icon,
|
|
@@ -6236,7 +6335,7 @@ var MenuItem = ({
|
|
|
6236
6335
|
mobileOnly,
|
|
6237
6336
|
desktopOnly
|
|
6238
6337
|
}),
|
|
6239
|
-
children: onClick && /* @__PURE__ */
|
|
6338
|
+
children: onClick && /* @__PURE__ */ jsxs19("div", { className: getClassNameItem2("link"), onClick, children: [
|
|
6240
6339
|
icon && /* @__PURE__ */ jsx38("span", { className: getClassNameItem2("linkIcon"), children: icon }),
|
|
6241
6340
|
/* @__PURE__ */ jsx38("span", { className: getClassNameItem2("linkLabel"), children: label })
|
|
6242
6341
|
] })
|
|
@@ -6247,17 +6346,17 @@ var Nav = ({
|
|
|
6247
6346
|
items,
|
|
6248
6347
|
mobileActions
|
|
6249
6348
|
}) => {
|
|
6250
|
-
return /* @__PURE__ */
|
|
6251
|
-
/* @__PURE__ */ jsx38("ul", { className:
|
|
6252
|
-
mobileActions && /* @__PURE__ */ jsx38("div", { className:
|
|
6349
|
+
return /* @__PURE__ */ jsxs19("nav", { className: getClassName21(), children: [
|
|
6350
|
+
/* @__PURE__ */ jsx38("ul", { className: getClassName21("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx38(MenuItem, { ...item }, key)) }),
|
|
6351
|
+
mobileActions && /* @__PURE__ */ jsx38("div", { className: getClassName21("mobileActions"), children: mobileActions })
|
|
6253
6352
|
] });
|
|
6254
6353
|
};
|
|
6255
6354
|
|
|
6256
6355
|
// 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",
|
|
6356
|
+
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6357
|
+
var getClassName22 = get_class_name_factory_default("CredBuild", styles_module_default14);
|
|
6358
|
+
var getLayoutClassName = get_class_name_factory_default("CredBuildLayout", styles_module_default14);
|
|
6359
|
+
var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab", styles_module_default14);
|
|
6261
6360
|
var FieldSideBar = () => {
|
|
6262
6361
|
const title = useAppStore(
|
|
6263
6362
|
(s) => s.selectedItem ? s.config.components[s.selectedItem.type]?.["label"] ?? s.selectedItem.type.toString() : s.config.root?.label || "Page"
|
|
@@ -6438,10 +6537,10 @@ var Layout = ({ children }) => {
|
|
|
6438
6537
|
const mobilePanelExpanded = useAppStore(
|
|
6439
6538
|
(s) => s.state.ui.mobilePanelExpanded ?? false
|
|
6440
6539
|
);
|
|
6441
|
-
return /* @__PURE__ */
|
|
6540
|
+
return /* @__PURE__ */ jsxs20(
|
|
6442
6541
|
"div",
|
|
6443
6542
|
{
|
|
6444
|
-
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${
|
|
6543
|
+
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${getClassName22({
|
|
6445
6544
|
hidePlugins: hasLegacySideBarPlugin
|
|
6446
6545
|
})}`,
|
|
6447
6546
|
"data-theme": theme,
|
|
@@ -6460,14 +6559,14 @@ var Layout = ({ children }) => {
|
|
|
6460
6559
|
mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
|
|
6461
6560
|
}),
|
|
6462
6561
|
style: { height: typeof height === "number" && isNaN(height) ? void 0 : height },
|
|
6463
|
-
children: /* @__PURE__ */
|
|
6562
|
+
children: /* @__PURE__ */ jsxs20(
|
|
6464
6563
|
"div",
|
|
6465
6564
|
{
|
|
6466
6565
|
className: getLayoutClassName("inner"),
|
|
6467
6566
|
style: layoutOptions,
|
|
6468
6567
|
children: [
|
|
6469
6568
|
/* @__PURE__ */ jsx39("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx39(Header, { theme, hidePlugins: hasLegacySideBarPlugin }) }),
|
|
6470
|
-
/* @__PURE__ */
|
|
6569
|
+
/* @__PURE__ */ jsxs20(
|
|
6471
6570
|
Sidebar,
|
|
6472
6571
|
{
|
|
6473
6572
|
position: "left",
|
|
@@ -6526,7 +6625,7 @@ var Layout = ({ children }) => {
|
|
|
6526
6625
|
)
|
|
6527
6626
|
}
|
|
6528
6627
|
) }) }) }),
|
|
6529
|
-
/* @__PURE__ */ jsx39("div", { id: "credbuild-portal-root", className:
|
|
6628
|
+
/* @__PURE__ */ jsx39("div", { id: "credbuild-portal-root", className: getClassName22("portal") })
|
|
6530
6629
|
]
|
|
6531
6630
|
}
|
|
6532
6631
|
);
|
|
@@ -6695,7 +6794,7 @@ function CredBuildProvider({ children }) {
|
|
|
6695
6794
|
index: initialHistoryIndex,
|
|
6696
6795
|
initialAppState
|
|
6697
6796
|
});
|
|
6698
|
-
const previousData =
|
|
6797
|
+
const previousData = useRef17(null);
|
|
6699
6798
|
useEffect23(() => {
|
|
6700
6799
|
return appStore.subscribe(
|
|
6701
6800
|
(s) => s.state.data,
|
|
@@ -6728,10 +6827,10 @@ CredBuild.Outline = Outline;
|
|
|
6728
6827
|
CredBuild.Preview = Preview;
|
|
6729
6828
|
|
|
6730
6829
|
// plugins/legacy-side-bar/index.tsx
|
|
6731
|
-
import { jsx as jsx41, jsxs as
|
|
6830
|
+
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6732
6831
|
var legacySideBarPlugin = () => ({
|
|
6733
6832
|
name: "legacy-side-bar",
|
|
6734
|
-
render: () => /* @__PURE__ */
|
|
6833
|
+
render: () => /* @__PURE__ */ jsxs21("div", { style: { overflowY: "auto" }, children: [
|
|
6735
6834
|
/* @__PURE__ */ jsx41(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx41(Components, {}) }),
|
|
6736
6835
|
/* @__PURE__ */ jsx41(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx41(Outline, {}) })
|
|
6737
6836
|
] })
|