@crediblemark/build 0.25.19 → 0.25.20
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-QREPD4FL.mjs +17 -0
- package/dist/{ObjectField-VE3JKAWT.css → ArrayField-SMHH4YM5.css} +291 -291
- package/dist/{Editor-6U6G5YLU.css → Editor-OKZSVOHC.css} +7 -7
- package/dist/{Editor-7JTCMSHZ.mjs → Editor-Z7SABUNT.mjs} +8 -8
- package/dist/{ArrayField-QVQ36K6O.css → ObjectField-4DTDXE62.css} +283 -283
- package/dist/ObjectField-5Q5QBVGN.mjs +17 -0
- package/dist/{Render-HVM2KISU.css → Render-DOE2LXKX.css} +1 -1
- package/dist/{Render-5WYR4VZX.mjs → Render-I6PZ5MEA.mjs} +1 -1
- package/dist/{chunk-VEQIM5ZE.mjs → chunk-66IXS5FK.mjs} +13 -13
- package/dist/{chunk-SOAJKHLV.mjs → chunk-7SG4VVVP.mjs} +3 -3
- package/dist/{chunk-LBXFITWQ.mjs → chunk-E4F5M5JH.mjs} +2 -2
- package/dist/{chunk-H6RPI3T6.mjs → chunk-ISXFLTBM.mjs} +1 -1
- package/dist/{chunk-U4NHUPA4.mjs → chunk-JR2TCNGX.mjs} +5 -5
- package/dist/{chunk-D4WFZ3K2.mjs → chunk-KN26YZZJ.mjs} +1 -1
- package/dist/{chunk-5GWBGJC4.mjs → chunk-NHF3YLSF.mjs} +181 -75
- package/dist/{chunk-ARM3KXOM.mjs → chunk-OYB2YQPY.mjs} +11 -11
- package/dist/{chunk-U7AIA2UJ.mjs → chunk-PEXHYNRZ.mjs} +2 -2
- package/dist/{chunk-GEYNLWCZ.mjs → chunk-PFHKXXSV.mjs} +1 -1
- package/dist/{chunk-D7HE7E2A.mjs → chunk-QXPX7SNK.mjs} +12 -12
- package/dist/{chunk-TOU7Y6T4.mjs → chunk-S32JZ2HU.mjs} +1 -1
- package/dist/{chunk-J4ZMH6JZ.mjs → chunk-XLRMLBFR.mjs} +1 -1
- package/dist/{full-2LSQUWEM.css → full-77VQ6BAW.css} +6 -6
- package/dist/{full-B3RS4LV3.mjs → full-LSSDDZQW.mjs} +5 -5
- package/dist/index.css +38 -38
- package/dist/index.js +196 -92
- package/dist/index.mjs +13 -13
- package/dist/{loaded-FY2TCG5Y.css → loaded-4FAPBCAU.css} +1 -1
- package/dist/{loaded-JIR6E6RO.mjs → loaded-C2JGMUXV.mjs} +2 -2
- package/dist/{loaded-XEI7CJSF.mjs → loaded-FJHWTGH6.mjs} +2 -2
- package/dist/{loaded-VCMCWG55.mjs → loaded-NTEK7RT3.mjs} +2 -2
- package/dist/no-external.css +38 -38
- package/dist/no-external.js +196 -92
- package/dist/no-external.mjs +13 -13
- package/dist/rsc.css +19 -19
- package/dist/rsc.js +64 -64
- package/dist/rsc.mjs +12 -12
- package/package.json +1 -1
- package/dist/ArrayField-LRIG75HP.mjs +0 -17
- package/dist/ObjectField-M2VTKEXM.mjs +0 -17
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
renderContext,
|
|
14
14
|
useRichtextProps,
|
|
15
15
|
useSlots
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-66IXS5FK.mjs";
|
|
17
17
|
import {
|
|
18
18
|
collisionStore,
|
|
19
19
|
useSensors
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JR2TCNGX.mjs";
|
|
21
21
|
import {
|
|
22
22
|
AutoFieldPrivate,
|
|
23
23
|
Button,
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
fieldContextStore,
|
|
26
26
|
useContextStore,
|
|
27
27
|
useSafeId
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OYB2YQPY.mjs";
|
|
29
29
|
import {
|
|
30
30
|
IconButton,
|
|
31
31
|
Loader
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QXPX7SNK.mjs";
|
|
33
33
|
import {
|
|
34
34
|
Box,
|
|
35
35
|
ChartColumn,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
useRegisterHistorySlice,
|
|
91
91
|
useRegisterPermissionsSlice,
|
|
92
92
|
useResetAutoZoom
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-KN26YZZJ.mjs";
|
|
94
94
|
import {
|
|
95
95
|
get_class_name_factory_default
|
|
96
96
|
} from "./chunk-BFHV72KK.mjs";
|
|
@@ -475,7 +475,7 @@ function useGetCredBuild() {
|
|
|
475
475
|
// lib/use-component-list.tsx
|
|
476
476
|
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
477
477
|
|
|
478
|
-
// css-module:/
|
|
478
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/ComponentList/styles.module.css#css-module
|
|
479
479
|
var styles_module_default = { "ComponentList": "_ComponentList_1dcib_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_1dcib_5", "ComponentList-content": "_ComponentList-content_1dcib_9", "ComponentList-title": "_ComponentList-title_1dcib_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_1dcib_53" };
|
|
480
480
|
|
|
481
481
|
// components/ComponentList/index.tsx
|
|
@@ -649,7 +649,7 @@ var useComponentList = () => {
|
|
|
649
649
|
// components/CredBuild/components/Components/index.tsx
|
|
650
650
|
import { useMemo as useMemo2, useState as useState4 } from "react";
|
|
651
651
|
|
|
652
|
-
// css-module:/
|
|
652
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Components/styles.module.css#css-module
|
|
653
653
|
var styles_module_default2 = { "CredBuildComponents": "_CredBuildComponents_lxrzy_1", "CredBuildComponents-searchContainer": "_CredBuildComponents-searchContainer_lxrzy_7", "CredBuildComponents-searchWrapper": "_CredBuildComponents-searchWrapper_lxrzy_16", "CredBuildComponents-searchInput": "_CredBuildComponents-searchInput_lxrzy_23", "CredBuildComponents-searchIcon": "_CredBuildComponents-searchIcon_lxrzy_42", "CredBuildComponents-clearButton": "_CredBuildComponents-clearButton_lxrzy_54", "CredBuildComponents-listContainer": "_CredBuildComponents-listContainer_lxrzy_74", "CredBuildComponents-noResults": "_CredBuildComponents-noResults_lxrzy_79" };
|
|
654
654
|
|
|
655
655
|
// components/CredBuild/components/Components/index.tsx
|
|
@@ -744,7 +744,7 @@ var Components = () => {
|
|
|
744
744
|
] });
|
|
745
745
|
};
|
|
746
746
|
|
|
747
|
-
// css-module:/
|
|
747
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/blocks/styles.module.css#css-module
|
|
748
748
|
var styles_module_default3 = { "BlocksPlugin": "_BlocksPlugin_1q0b2_1" };
|
|
749
749
|
|
|
750
750
|
// plugins/blocks/index.tsx
|
|
@@ -757,7 +757,7 @@ var blocksPlugin = () => ({
|
|
|
757
757
|
icon: /* @__PURE__ */ jsx6(Shapes, {})
|
|
758
758
|
});
|
|
759
759
|
|
|
760
|
-
// css-module:/
|
|
760
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/LayerTree/styles.module.css#css-module
|
|
761
761
|
var styles_module_default4 = { "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" };
|
|
762
762
|
|
|
763
763
|
// components/LayerTree/index.tsx
|
|
@@ -766,7 +766,9 @@ import {
|
|
|
766
766
|
useCallback,
|
|
767
767
|
useContext as useContext2,
|
|
768
768
|
useRef,
|
|
769
|
-
memo as memo2
|
|
769
|
+
memo as memo2,
|
|
770
|
+
createContext as createContext2,
|
|
771
|
+
useState as useState5
|
|
770
772
|
} from "react";
|
|
771
773
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
772
774
|
import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -776,6 +778,7 @@ var DEFAULT_LAYER_ROW_HEIGHT = 32;
|
|
|
776
778
|
var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
|
|
777
779
|
var MIN_VIRTUALIZED_LAYER_COUNT = 25;
|
|
778
780
|
var measuredRowHeights = /* @__PURE__ */ new Map();
|
|
781
|
+
var DragContext = createContext2(null);
|
|
779
782
|
var getZonesByParent = (zones) => {
|
|
780
783
|
return Object.keys(zones).reduce((acc, zone) => {
|
|
781
784
|
const [parentId] = zone.split(":");
|
|
@@ -878,7 +881,9 @@ var Layer = memo2(forwardRef(function Layer2({
|
|
|
878
881
|
selectedPathIds
|
|
879
882
|
}, ref) {
|
|
880
883
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
884
|
+
const nodes = useAppStore((s) => s.state.indexes.nodes);
|
|
881
885
|
const zoneStore = useContext2(ZoneStoreContext);
|
|
886
|
+
const dragCtx = useContext2(DragContext);
|
|
882
887
|
const isHovering = useContextStore(
|
|
883
888
|
ZoneStoreContext,
|
|
884
889
|
(s) => s.hoveringComponent === node.itemId
|
|
@@ -917,7 +922,92 @@ var Layer = memo2(forwardRef(function Layer2({
|
|
|
917
922
|
}),
|
|
918
923
|
"data-index": dataIndex,
|
|
919
924
|
"data-credbuild-layer-tree-id": node.itemId,
|
|
925
|
+
draggable: true,
|
|
926
|
+
onDragStart: (e) => {
|
|
927
|
+
dragCtx?.setDraggedItem({
|
|
928
|
+
itemId: node.itemId,
|
|
929
|
+
index: node.index,
|
|
930
|
+
zoneCompound: node.zoneCompound
|
|
931
|
+
});
|
|
932
|
+
e.dataTransfer.effectAllowed = "move";
|
|
933
|
+
},
|
|
934
|
+
onDragOver: (e) => {
|
|
935
|
+
e.preventDefault();
|
|
936
|
+
if (!dragCtx || !dragCtx.draggedItem || dragCtx.draggedItem.itemId === node.itemId) return;
|
|
937
|
+
const targetNodeIndex = nodes[node.itemId];
|
|
938
|
+
if (targetNodeIndex?.path.some((p) => p.split(":")[0] === dragCtx.draggedItem?.itemId)) {
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
942
|
+
const hoverClientY = e.clientY - rect.top;
|
|
943
|
+
const threshold = rect.height / 2;
|
|
944
|
+
const position = hoverClientY < threshold ? "before" : "after";
|
|
945
|
+
dragCtx.setHoveredItemId(node.itemId);
|
|
946
|
+
dragCtx.setHoverPosition(position);
|
|
947
|
+
},
|
|
948
|
+
onDragLeave: () => {
|
|
949
|
+
if (dragCtx?.hoveredItemId === node.itemId) {
|
|
950
|
+
dragCtx.setHoveredItemId(null);
|
|
951
|
+
dragCtx.setHoverPosition(null);
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
onDrop: (e) => {
|
|
955
|
+
e.preventDefault();
|
|
956
|
+
if (!dragCtx || !dragCtx.draggedItem || dragCtx.draggedItem.itemId === node.itemId) return;
|
|
957
|
+
let destIndex = node.index;
|
|
958
|
+
if (dragCtx.draggedItem.zoneCompound === node.zoneCompound) {
|
|
959
|
+
if (dragCtx.hoverPosition === "before") {
|
|
960
|
+
destIndex = dragCtx.draggedItem.index > node.index ? node.index : node.index - 1;
|
|
961
|
+
} else {
|
|
962
|
+
destIndex = dragCtx.draggedItem.index > node.index ? node.index + 1 : node.index;
|
|
963
|
+
}
|
|
964
|
+
} else {
|
|
965
|
+
destIndex = dragCtx.hoverPosition === "before" ? node.index : node.index + 1;
|
|
966
|
+
}
|
|
967
|
+
dispatch({
|
|
968
|
+
type: "move",
|
|
969
|
+
sourceIndex: dragCtx.draggedItem.index,
|
|
970
|
+
sourceZone: dragCtx.draggedItem.zoneCompound,
|
|
971
|
+
destinationIndex: destIndex,
|
|
972
|
+
destinationZone: node.zoneCompound
|
|
973
|
+
});
|
|
974
|
+
dispatch({
|
|
975
|
+
type: "setUi",
|
|
976
|
+
ui: {
|
|
977
|
+
itemSelector: {
|
|
978
|
+
index: destIndex,
|
|
979
|
+
zone: node.zoneCompound
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
dragCtx.setDraggedItem(null);
|
|
984
|
+
dragCtx.setHoveredItemId(null);
|
|
985
|
+
dragCtx.setHoverPosition(null);
|
|
986
|
+
},
|
|
987
|
+
onDragEnd: () => {
|
|
988
|
+
dragCtx?.setDraggedItem(null);
|
|
989
|
+
dragCtx?.setHoveredItemId(null);
|
|
990
|
+
dragCtx?.setHoverPosition(null);
|
|
991
|
+
},
|
|
992
|
+
style: {
|
|
993
|
+
opacity: dragCtx?.draggedItem?.itemId === node.itemId ? 0.4 : 1,
|
|
994
|
+
position: "relative"
|
|
995
|
+
},
|
|
920
996
|
children: [
|
|
997
|
+
dragCtx?.hoveredItemId === node.itemId && dragCtx?.hoverPosition && /* @__PURE__ */ jsx7(
|
|
998
|
+
"div",
|
|
999
|
+
{
|
|
1000
|
+
style: {
|
|
1001
|
+
position: "absolute",
|
|
1002
|
+
left: 0,
|
|
1003
|
+
right: 0,
|
|
1004
|
+
height: "2px",
|
|
1005
|
+
background: "linear-gradient(to right, var(--cb-gold, #d4af37), #f3e5ab)",
|
|
1006
|
+
zIndex: 10,
|
|
1007
|
+
...dragCtx.hoverPosition === "before" ? { top: 0 } : { bottom: 0 }
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
921
1011
|
/* @__PURE__ */ jsx7("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs3(
|
|
922
1012
|
"button",
|
|
923
1013
|
{
|
|
@@ -1115,16 +1205,32 @@ var LayerTree = memo2(({
|
|
|
1115
1205
|
selectedPathIds,
|
|
1116
1206
|
trees
|
|
1117
1207
|
}) => {
|
|
1118
|
-
|
|
1119
|
-
|
|
1208
|
+
const [draggedItem, setDraggedItem] = useState5(null);
|
|
1209
|
+
const [hoveredItemId, setHoveredItemId] = useState5(null);
|
|
1210
|
+
const [hoverPosition, setHoverPosition] = useState5(null);
|
|
1211
|
+
return /* @__PURE__ */ jsx7(
|
|
1212
|
+
DragContext.Provider,
|
|
1120
1213
|
{
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1214
|
+
value: {
|
|
1215
|
+
draggedItem,
|
|
1216
|
+
setDraggedItem,
|
|
1217
|
+
hoveredItemId,
|
|
1218
|
+
setHoveredItemId,
|
|
1219
|
+
hoverPosition,
|
|
1220
|
+
setHoverPosition
|
|
1221
|
+
},
|
|
1222
|
+
children: trees.map((tree) => /* @__PURE__ */ jsx7(
|
|
1223
|
+
LayerTreeZone,
|
|
1224
|
+
{
|
|
1225
|
+
depth: 0,
|
|
1226
|
+
selectedId,
|
|
1227
|
+
selectedPathIds,
|
|
1228
|
+
tree
|
|
1229
|
+
},
|
|
1230
|
+
tree.zoneCompound
|
|
1231
|
+
))
|
|
1232
|
+
}
|
|
1233
|
+
);
|
|
1128
1234
|
});
|
|
1129
1235
|
|
|
1130
1236
|
// components/CredBuild/components/Outline/index.tsx
|
|
@@ -1178,7 +1284,7 @@ var Outline = memo3(() => {
|
|
|
1178
1284
|
) });
|
|
1179
1285
|
});
|
|
1180
1286
|
|
|
1181
|
-
// css-module:/
|
|
1287
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/outline/styles.module.css#css-module
|
|
1182
1288
|
var styles_module_default5 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
|
|
1183
1289
|
|
|
1184
1290
|
// plugins/outline/index.tsx
|
|
@@ -1191,7 +1297,7 @@ var outlinePlugin = () => ({
|
|
|
1191
1297
|
icon: /* @__PURE__ */ jsx9(List, {})
|
|
1192
1298
|
});
|
|
1193
1299
|
|
|
1194
|
-
// css-module:/
|
|
1300
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/Breadcrumbs/styles.module.css#css-module
|
|
1195
1301
|
var styles_module_default6 = { "Breadcrumbs": "_Breadcrumbs_1e0gb_1", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1e0gb_7", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1e0gb_7" };
|
|
1196
1302
|
|
|
1197
1303
|
// lib/use-breadcrumbs.ts
|
|
@@ -1256,7 +1362,7 @@ var Breadcrumbs = ({
|
|
|
1256
1362
|
] });
|
|
1257
1363
|
};
|
|
1258
1364
|
|
|
1259
|
-
// css-module:/
|
|
1365
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Fields/styles.module.css#css-module
|
|
1260
1366
|
var styles_module_default7 = { "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" };
|
|
1261
1367
|
|
|
1262
1368
|
// components/CredBuild/components/Fields/index.tsx
|
|
@@ -1412,7 +1518,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
1412
1518
|
};
|
|
1413
1519
|
var Fields = memo4(FieldsInternal);
|
|
1414
1520
|
|
|
1415
|
-
// css-module:/
|
|
1521
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/fields/styles.module.css#css-module
|
|
1416
1522
|
var styles_module_default8 = { "FieldsPlugin": "_FieldsPlugin_6as57_1", "FieldsPlugin-header": "_FieldsPlugin-header_6as57_7" };
|
|
1417
1523
|
|
|
1418
1524
|
// plugins/fields/index.tsx
|
|
@@ -1437,18 +1543,18 @@ var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
|
1437
1543
|
});
|
|
1438
1544
|
|
|
1439
1545
|
// plugins/code/CodePanel.tsx
|
|
1440
|
-
import { useState as
|
|
1546
|
+
import { useState as useState6 } from "react";
|
|
1441
1547
|
|
|
1442
|
-
// css-module:/
|
|
1548
|
+
// css-module:/home/runner/work/credbuild/credbuild/plugins/code/styles.module.css#css-module
|
|
1443
1549
|
var styles_module_default9 = { "CodePlugin": "_CodePlugin_77s8n_1", "CodePanel": "_CodePanel_77s8n_9", "CodePanel-title": "_CodePanel-title_77s8n_18", "CodePanel-textarea": "_CodePanel-textarea_77s8n_27", "CodePanel-optionsSection": "_CodePanel-optionsSection_77s8n_49", "CodePanel-optionTitle": "_CodePanel-optionTitle_77s8n_53", "CodePanel-radioGroup": "_CodePanel-radioGroup_77s8n_62", "CodePanel-radioLabel": "_CodePanel-radioLabel_77s8n_68", "CodePanel-radioInput": "_CodePanel-radioInput_77s8n_77", "CodePanel-button": "_CodePanel-button_77s8n_87", "CodePanel-error": "_CodePanel-error_77s8n_120", "CodePanel-success": "_CodePanel-success_77s8n_131", "CodePanel-promptSection": "_CodePanel-promptSection_77s8n_142", "CodePanel-promptHeader": "_CodePanel-promptHeader_77s8n_148", "CodePanel-promptText": "_CodePanel-promptText_77s8n_155", "CodePanel-copyBtn": "_CodePanel-copyBtn_77s8n_169", "CodePanel-copyBtn--copied": "_CodePanel-copyBtn--copied_77s8n_193" };
|
|
1444
1550
|
|
|
1445
1551
|
// plugins/code/CodePanel.tsx
|
|
1446
1552
|
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1447
1553
|
var getClassName9 = get_class_name_factory_default("CodePanel", styles_module_default9);
|
|
1448
1554
|
var CodePanel = () => {
|
|
1449
|
-
const [copied, setCopied] =
|
|
1450
|
-
const [topic, setTopic] =
|
|
1451
|
-
const [promptType, setPromptType] =
|
|
1555
|
+
const [copied, setCopied] = useState6(false);
|
|
1556
|
+
const [topic, setTopic] = useState6("");
|
|
1557
|
+
const [promptType, setPromptType] = useState6("header-footer");
|
|
1452
1558
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
1453
1559
|
const root = useAppStore((s) => s.state.data.root);
|
|
1454
1560
|
const rootProps = root?.props || root;
|
|
@@ -1690,20 +1796,20 @@ import {
|
|
|
1690
1796
|
useEffect as useEffect15,
|
|
1691
1797
|
useMemo as useMemo15,
|
|
1692
1798
|
useRef as useRef9,
|
|
1693
|
-
useState as
|
|
1799
|
+
useState as useState16
|
|
1694
1800
|
} from "react";
|
|
1695
1801
|
|
|
1696
1802
|
// components/CredBuild/components/Preview/index.tsx
|
|
1697
|
-
import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef3, useMemo as useMemo7, useState as
|
|
1803
|
+
import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef3, useMemo as useMemo7, useState as useState8 } from "react";
|
|
1698
1804
|
|
|
1699
1805
|
// components/AutoFrame/index.tsx
|
|
1700
1806
|
import {
|
|
1701
|
-
createContext as
|
|
1807
|
+
createContext as createContext3,
|
|
1702
1808
|
useCallback as useCallback3,
|
|
1703
1809
|
useContext as useContext4,
|
|
1704
1810
|
useEffect as useEffect6,
|
|
1705
1811
|
useRef as useRef2,
|
|
1706
|
-
useState as
|
|
1812
|
+
useState as useState7
|
|
1707
1813
|
} from "react";
|
|
1708
1814
|
import hash from "object-hash";
|
|
1709
1815
|
import { createPortal } from "react-dom";
|
|
@@ -1923,7 +2029,7 @@ var CopyHostStyles = ({
|
|
|
1923
2029
|
}, [debug, doc, onStylesLoaded, win]);
|
|
1924
2030
|
return /* @__PURE__ */ jsx15(Fragment4, { children });
|
|
1925
2031
|
};
|
|
1926
|
-
var autoFrameContext =
|
|
2032
|
+
var autoFrameContext = createContext3({});
|
|
1927
2033
|
var useFrame = () => useContext4(autoFrameContext);
|
|
1928
2034
|
function AutoFrame({
|
|
1929
2035
|
children,
|
|
@@ -1937,10 +2043,10 @@ function AutoFrame({
|
|
|
1937
2043
|
frameRef,
|
|
1938
2044
|
...props
|
|
1939
2045
|
}) {
|
|
1940
|
-
const [loaded, setLoaded] =
|
|
1941
|
-
const [ctx, setCtx] =
|
|
1942
|
-
const [mountTarget, setMountTarget] =
|
|
1943
|
-
const [stylesLoaded, setStylesLoaded] =
|
|
2046
|
+
const [loaded, setLoaded] = useState7(false);
|
|
2047
|
+
const [ctx, setCtx] = useState7({});
|
|
2048
|
+
const [mountTarget, setMountTarget] = useState7();
|
|
2049
|
+
const [stylesLoaded, setStylesLoaded] = useState7(false);
|
|
1944
2050
|
const handleStylesLoaded = useCallback3(() => {
|
|
1945
2051
|
setStylesLoaded(true);
|
|
1946
2052
|
}, []);
|
|
@@ -1996,7 +2102,7 @@ function AutoFrame({
|
|
|
1996
2102
|
AutoFrame.displayName = "AutoFrame";
|
|
1997
2103
|
var AutoFrame_default = AutoFrame;
|
|
1998
2104
|
|
|
1999
|
-
// css-module:/
|
|
2105
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Preview/styles.module.css#css-module
|
|
2000
2106
|
var styles_module_default10 = { "CredBuildPreview": "_CredBuildPreview_17c6o_1", "CredBuildPreview-frame": "_CredBuildPreview-frame_17c6o_6", "CredBuildPreview-htmlEditor": "_CredBuildPreview-htmlEditor_17c6o_12", "CredBuildPreview-htmlTextarea": "_CredBuildPreview-htmlTextarea_17c6o_23" };
|
|
2001
2107
|
|
|
2002
2108
|
// lib/bubble-pointer-event.ts
|
|
@@ -2096,7 +2202,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
2096
2202
|
const htmlCode = rootProps?.htmlCode || "";
|
|
2097
2203
|
const ref = useRef3(null);
|
|
2098
2204
|
useBubbleIframeEvents(ref);
|
|
2099
|
-
const [localCode, setLocalCode] =
|
|
2205
|
+
const [localCode, setLocalCode] = useState8(htmlCode);
|
|
2100
2206
|
useEffect7(() => {
|
|
2101
2207
|
setLocalCode(htmlCode);
|
|
2102
2208
|
}, [htmlCode]);
|
|
@@ -2325,28 +2431,28 @@ var useLoadedOverrides = ({
|
|
|
2325
2431
|
import { deepEqual } from "fast-equals";
|
|
2326
2432
|
|
|
2327
2433
|
// components/CredBuild/components/Layout/index.tsx
|
|
2328
|
-
import { useEffect as useEffect14, useMemo as useMemo14, useState as
|
|
2434
|
+
import { useEffect as useEffect14, useMemo as useMemo14, useState as useState15 } from "react";
|
|
2329
2435
|
|
|
2330
2436
|
// components/CredBuild/context.tsx
|
|
2331
2437
|
import {
|
|
2332
|
-
createContext as
|
|
2438
|
+
createContext as createContext4,
|
|
2333
2439
|
useContext as useContext5
|
|
2334
2440
|
} from "react";
|
|
2335
2441
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2336
|
-
var propsContext =
|
|
2442
|
+
var propsContext = createContext4({});
|
|
2337
2443
|
function PropsProvider(props) {
|
|
2338
2444
|
return /* @__PURE__ */ jsx17(propsContext.Provider, { value: props, children: props.children });
|
|
2339
2445
|
}
|
|
2340
2446
|
var usePropsContext = () => useContext5(propsContext);
|
|
2341
2447
|
|
|
2342
|
-
// css-module:/
|
|
2448
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Layout/styles.module.css#css-module
|
|
2343
2449
|
var styles_module_default11 = { "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" };
|
|
2344
2450
|
|
|
2345
2451
|
// lib/use-inject-css.ts
|
|
2346
|
-
import { useEffect as useEffect8, useState as
|
|
2452
|
+
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
2347
2453
|
var styles = ``;
|
|
2348
2454
|
var useInjectStyleSheet = (initialStyles, iframeEnabled) => {
|
|
2349
|
-
const [el, setEl] =
|
|
2455
|
+
const [el, setEl] = useState9();
|
|
2350
2456
|
useEffect8(() => {
|
|
2351
2457
|
setEl(document.createElement("style"));
|
|
2352
2458
|
}, []);
|
|
@@ -2395,7 +2501,7 @@ import {
|
|
|
2395
2501
|
useEffect as useEffect9,
|
|
2396
2502
|
useMemo as useMemo9,
|
|
2397
2503
|
useRef as useRef4,
|
|
2398
|
-
useState as
|
|
2504
|
+
useState as useState10
|
|
2399
2505
|
} from "react";
|
|
2400
2506
|
import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
|
|
2401
2507
|
|
|
@@ -2750,7 +2856,7 @@ var DragDropContextClient = ({
|
|
|
2750
2856
|
const appStore = useAppStoreApi();
|
|
2751
2857
|
const debouncedParamsRef = useRef4(null);
|
|
2752
2858
|
const tempDisableFallback = useTempDisableFallback(100);
|
|
2753
|
-
const [zoneStore] =
|
|
2859
|
+
const [zoneStore] = useState10(() => {
|
|
2754
2860
|
const rootVirtualizers = /* @__PURE__ */ new Map();
|
|
2755
2861
|
return createStore2(() => ({
|
|
2756
2862
|
zoneDepthIndex: {},
|
|
@@ -2845,7 +2951,7 @@ var DragDropContextClient = ({
|
|
|
2845
2951
|
);
|
|
2846
2952
|
}
|
|
2847
2953
|
}, [zoneStore]);
|
|
2848
|
-
const [plugins] =
|
|
2954
|
+
const [plugins] = useState10(() => [
|
|
2849
2955
|
...disableAutoScroll ? defaultPreset.plugins.filter((plugin) => plugin !== AutoScroller) : defaultPreset.plugins,
|
|
2850
2956
|
createNestedDroppablePlugin(
|
|
2851
2957
|
{
|
|
@@ -2893,7 +2999,7 @@ var DragDropContextClient = ({
|
|
|
2893
2999
|
)
|
|
2894
3000
|
]);
|
|
2895
3001
|
const sensors = useSensors();
|
|
2896
|
-
const [dragListeners, setDragListeners] =
|
|
3002
|
+
const [dragListeners, setDragListeners] = useState10({});
|
|
2897
3003
|
const dragMode = useRef4(null);
|
|
2898
3004
|
const initialSelector = useRef4(void 0);
|
|
2899
3005
|
const nextContextValue = useMemo9(
|
|
@@ -3151,9 +3257,9 @@ var DragDropContext = ({
|
|
|
3151
3257
|
};
|
|
3152
3258
|
|
|
3153
3259
|
// components/CredBuild/components/Header/index.tsx
|
|
3154
|
-
import { memo as memo5, useCallback as useCallback7, useMemo as useMemo12, useState as
|
|
3260
|
+
import { memo as memo5, useCallback as useCallback7, useMemo as useMemo12, useState as useState12 } from "react";
|
|
3155
3261
|
|
|
3156
|
-
// css-module:/
|
|
3262
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/MenuBar/styles.module.css#css-module
|
|
3157
3263
|
var styles_module_default12 = { "MenuBar": "_MenuBar_1m2ld_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_1m2ld_14", "MenuBar-inner": "_MenuBar-inner_1m2ld_29", "MenuBar-history": "_MenuBar-history_1m2ld_45" };
|
|
3158
3264
|
|
|
3159
3265
|
// components/MenuBar/index.tsx
|
|
@@ -3211,9 +3317,9 @@ function MenuBar({
|
|
|
3211
3317
|
}
|
|
3212
3318
|
|
|
3213
3319
|
// components/ViewportControls/index.tsx
|
|
3214
|
-
import { useEffect as useEffect10, useMemo as useMemo10, useState as
|
|
3320
|
+
import { useEffect as useEffect10, useMemo as useMemo10, useState as useState11 } from "react";
|
|
3215
3321
|
|
|
3216
|
-
// css-module:/
|
|
3322
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/ViewportControls/styles.module.css#css-module
|
|
3217
3323
|
var styles_module_default13 = { "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" };
|
|
3218
3324
|
|
|
3219
3325
|
// components/ViewportControls/index.tsx
|
|
@@ -3278,13 +3384,13 @@ var ViewportControls = ({
|
|
|
3278
3384
|
].filter((a) => a.value <= (autoZoom || 1)).sort((a, b) => a.value > b.value ? 1 : -1);
|
|
3279
3385
|
return options.length > 0 ? options : defaultZoomOptions;
|
|
3280
3386
|
}, [autoZoom, defaultsContainAutoZoom]);
|
|
3281
|
-
const [activeViewport, setActiveViewport] =
|
|
3387
|
+
const [activeViewport, setActiveViewport] = useState11(
|
|
3282
3388
|
uiViewports.current.width
|
|
3283
3389
|
);
|
|
3284
3390
|
useEffect10(() => {
|
|
3285
3391
|
setActiveViewport(uiViewports.current.width);
|
|
3286
3392
|
}, [uiViewports.current.width, uiViewports]);
|
|
3287
|
-
const [isExpanded, setIsExpanded] =
|
|
3393
|
+
const [isExpanded, setIsExpanded] = useState11(false);
|
|
3288
3394
|
return /* @__PURE__ */ jsxs9(
|
|
3289
3395
|
"div",
|
|
3290
3396
|
{
|
|
@@ -3385,13 +3491,13 @@ import { useShallow as useShallow3 } from "zustand/react/shallow";
|
|
|
3385
3491
|
|
|
3386
3492
|
// lib/frame-context.tsx
|
|
3387
3493
|
import {
|
|
3388
|
-
createContext as
|
|
3494
|
+
createContext as createContext6,
|
|
3389
3495
|
useContext as useContext7,
|
|
3390
3496
|
useRef as useRef5,
|
|
3391
3497
|
useMemo as useMemo11
|
|
3392
3498
|
} from "react";
|
|
3393
3499
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3394
|
-
var FrameContext =
|
|
3500
|
+
var FrameContext = createContext6(null);
|
|
3395
3501
|
var FrameProvider = ({
|
|
3396
3502
|
children
|
|
3397
3503
|
}) => {
|
|
@@ -3412,7 +3518,7 @@ var useCanvasFrame = () => {
|
|
|
3412
3518
|
return context;
|
|
3413
3519
|
};
|
|
3414
3520
|
|
|
3415
|
-
// css-module:/
|
|
3521
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Header/styles.module.css#css-module
|
|
3416
3522
|
var styles_module_default14 = { "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" };
|
|
3417
3523
|
|
|
3418
3524
|
// components/CredBuild/components/Header/index.tsx
|
|
@@ -3466,7 +3572,7 @@ var HeaderInner = ({
|
|
|
3466
3572
|
const CustomHeaderActions = useAppStore(
|
|
3467
3573
|
(s) => s.overrides.headerActions || defaultHeaderActionsRender
|
|
3468
3574
|
);
|
|
3469
|
-
const [menuOpen, setMenuOpen] =
|
|
3575
|
+
const [menuOpen, setMenuOpen] = useState12(false);
|
|
3470
3576
|
const rootTitle = useAppStore((s) => {
|
|
3471
3577
|
const rootData = s.state.indexes.nodes["root"]?.data;
|
|
3472
3578
|
return rootData.props.title ?? "";
|
|
@@ -3809,7 +3915,7 @@ var HeaderInner = ({
|
|
|
3809
3915
|
};
|
|
3810
3916
|
var Header = memo5(HeaderInner);
|
|
3811
3917
|
|
|
3812
|
-
// css-module:/
|
|
3918
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/SidebarSection/styles.module.css#css-module
|
|
3813
3919
|
var styles_module_default15 = { "SidebarSection": "_SidebarSection_bv89x_1", "SidebarSection-title": "_SidebarSection-title_bv89x_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_bv89x_37", "SidebarSection-content": "_SidebarSection-content_bv89x_41", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_bv89x_50", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_bv89x_79", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_bv89x_50", "SidebarSection-heading": "_SidebarSection-heading_bv89x_91", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_bv89x_95" };
|
|
3814
3920
|
|
|
3815
3921
|
// components/SidebarSection/index.tsx
|
|
@@ -3839,10 +3945,10 @@ import {
|
|
|
3839
3945
|
useEffect as useEffect11,
|
|
3840
3946
|
useMemo as useMemo13,
|
|
3841
3947
|
useRef as useRef6,
|
|
3842
|
-
useState as
|
|
3948
|
+
useState as useState13
|
|
3843
3949
|
} from "react";
|
|
3844
3950
|
|
|
3845
|
-
// css-module:/
|
|
3951
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Canvas/styles.module.css#css-module
|
|
3846
3952
|
var styles_module_default16 = { "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" };
|
|
3847
3953
|
|
|
3848
3954
|
// components/CredBuild/components/Canvas/index.tsx
|
|
@@ -3899,7 +4005,7 @@ var Canvas = () => {
|
|
|
3899
4005
|
const isHtmlCodeEditActive = isHtmlMode && htmlViewMode === "code";
|
|
3900
4006
|
const isNonFullWidth = viewports.current.width !== "100%";
|
|
3901
4007
|
const shouldApplyViewport = true;
|
|
3902
|
-
const [showTransition, setShowTransition] =
|
|
4008
|
+
const [showTransition, setShowTransition] = useState13(false);
|
|
3903
4009
|
const isResizingRef = useRef6(false);
|
|
3904
4010
|
const defaultRender = useMemo13(() => {
|
|
3905
4011
|
const CredBuildDefault = ({ children }) => /* @__PURE__ */ jsx25(Fragment9, { children });
|
|
@@ -4013,7 +4119,7 @@ var Canvas = () => {
|
|
|
4013
4119
|
resizeObserver.disconnect();
|
|
4014
4120
|
};
|
|
4015
4121
|
}, [frameRef, resetAutoZoom]);
|
|
4016
|
-
const [showLoader, setShowLoader] =
|
|
4122
|
+
const [showLoader, setShowLoader] = useState13(false);
|
|
4017
4123
|
useEffect11(() => {
|
|
4018
4124
|
setTimeout(() => {
|
|
4019
4125
|
setShowLoader(true);
|
|
@@ -4133,9 +4239,9 @@ var Canvas = () => {
|
|
|
4133
4239
|
};
|
|
4134
4240
|
|
|
4135
4241
|
// lib/use-sidebar-resize.ts
|
|
4136
|
-
import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef7, useState as
|
|
4242
|
+
import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef7, useState as useState14 } from "react";
|
|
4137
4243
|
function useSidebarResize(position, dispatch) {
|
|
4138
|
-
const [width, setWidth] =
|
|
4244
|
+
const [width, setWidth] = useState14(null);
|
|
4139
4245
|
const sidebarRef = useRef7(null);
|
|
4140
4246
|
const storeWidth = useAppStore(
|
|
4141
4247
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
@@ -4216,7 +4322,7 @@ function useSidebarResize(position, dispatch) {
|
|
|
4216
4322
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
4217
4323
|
import { useCallback as useCallback10, useRef as useRef8 } from "react";
|
|
4218
4324
|
|
|
4219
|
-
// css-module:/
|
|
4325
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
|
|
4220
4326
|
var styles_module_default17 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
|
|
4221
4327
|
|
|
4222
4328
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
@@ -4287,7 +4393,7 @@ var ResizeHandle = ({
|
|
|
4287
4393
|
);
|
|
4288
4394
|
};
|
|
4289
4395
|
|
|
4290
|
-
// css-module:/
|
|
4396
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
|
|
4291
4397
|
var styles_module_default18 = { "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" };
|
|
4292
4398
|
|
|
4293
4399
|
// components/CredBuild/components/Sidebar/index.tsx
|
|
@@ -4380,7 +4486,7 @@ var useDeleteHotkeys = () => {
|
|
|
4380
4486
|
useHotkey({ backspace: true }, deleteSelectedComponent);
|
|
4381
4487
|
};
|
|
4382
4488
|
|
|
4383
|
-
// css-module:/
|
|
4489
|
+
// css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Nav/styles.module.css#css-module
|
|
4384
4490
|
var styles_module_default19 = { "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" };
|
|
4385
4491
|
|
|
4386
4492
|
// components/CredBuild/components/Nav/index.tsx
|
|
@@ -4501,8 +4607,8 @@ var Layout = ({ children }) => {
|
|
|
4501
4607
|
() => overrides.credbuild || DefaultOverride,
|
|
4502
4608
|
[overrides]
|
|
4503
4609
|
);
|
|
4504
|
-
const [mounted, setMounted] =
|
|
4505
|
-
const [theme, setTheme] =
|
|
4610
|
+
const [mounted, setMounted] = useState15(false);
|
|
4611
|
+
const [theme, setTheme] = useState15("dark");
|
|
4506
4612
|
useEffect14(() => {
|
|
4507
4613
|
setMounted(true);
|
|
4508
4614
|
const savedTheme = localStorage.getItem("credbuild-theme");
|
|
@@ -4542,7 +4648,7 @@ var Layout = ({ children }) => {
|
|
|
4542
4648
|
const setUi = useAppStore((s) => s.setUi);
|
|
4543
4649
|
const currentPlugin = useAppStore((s) => s.state.ui.plugin?.current);
|
|
4544
4650
|
const appStoreApi = useAppStoreApi();
|
|
4545
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] =
|
|
4651
|
+
const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState15("toggle");
|
|
4546
4652
|
const hasLegacySideBarPlugin = useMemo14(
|
|
4547
4653
|
() => !!plugins?.find((p) => p.name === "legacy-side-bar"),
|
|
4548
4654
|
[plugins]
|
|
@@ -4728,7 +4834,7 @@ function CredBuildProvider({ children }) {
|
|
|
4728
4834
|
}),
|
|
4729
4835
|
[_iframe]
|
|
4730
4836
|
);
|
|
4731
|
-
const [generatedAppState] =
|
|
4837
|
+
const [generatedAppState] = useState16(() => {
|
|
4732
4838
|
const initial = { ...defaultAppState.ui, ...initialUi };
|
|
4733
4839
|
let clientUiState = {};
|
|
4734
4840
|
if (Object.keys(initialData?.root || {}).length > 0 && !initialData?.root?.props) {
|
|
@@ -4775,7 +4881,7 @@ function CredBuildProvider({ children }) {
|
|
|
4775
4881
|
return walkAppState(newAppState, config);
|
|
4776
4882
|
});
|
|
4777
4883
|
const { appendData = true } = _initialHistory || {};
|
|
4778
|
-
const [blendedHistories] =
|
|
4884
|
+
const [blendedHistories] = useState16(
|
|
4779
4885
|
[
|
|
4780
4886
|
..._initialHistory?.histories || [],
|
|
4781
4887
|
...appendData ? [{ state: generatedAppState }] : []
|
|
@@ -4844,7 +4950,7 @@ function CredBuildProvider({ children }) {
|
|
|
4844
4950
|
loadedFieldTransforms
|
|
4845
4951
|
]
|
|
4846
4952
|
);
|
|
4847
|
-
const [appStore] =
|
|
4953
|
+
const [appStore] = useState16(
|
|
4848
4954
|
() => createAppStore(generateAppStore(initialAppState))
|
|
4849
4955
|
);
|
|
4850
4956
|
useEffect15(() => {
|