@crediblemark/build 0.25.18 → 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.
Files changed (39) hide show
  1. package/dist/ArrayField-QREPD4FL.mjs +17 -0
  2. package/dist/{ObjectField-VE3JKAWT.css → ArrayField-SMHH4YM5.css} +291 -291
  3. package/dist/{Editor-6U6G5YLU.css → Editor-OKZSVOHC.css} +7 -7
  4. package/dist/{Editor-7JTCMSHZ.mjs → Editor-Z7SABUNT.mjs} +8 -8
  5. package/dist/{ArrayField-QVQ36K6O.css → ObjectField-4DTDXE62.css} +283 -283
  6. package/dist/ObjectField-5Q5QBVGN.mjs +17 -0
  7. package/dist/{Render-HVM2KISU.css → Render-DOE2LXKX.css} +1 -1
  8. package/dist/{Render-5WYR4VZX.mjs → Render-I6PZ5MEA.mjs} +1 -1
  9. package/dist/{chunk-VEQIM5ZE.mjs → chunk-66IXS5FK.mjs} +13 -13
  10. package/dist/{chunk-SOAJKHLV.mjs → chunk-7SG4VVVP.mjs} +3 -3
  11. package/dist/{chunk-LBXFITWQ.mjs → chunk-E4F5M5JH.mjs} +2 -2
  12. package/dist/{chunk-H6RPI3T6.mjs → chunk-ISXFLTBM.mjs} +1 -1
  13. package/dist/{chunk-U4NHUPA4.mjs → chunk-JR2TCNGX.mjs} +5 -5
  14. package/dist/{chunk-D4WFZ3K2.mjs → chunk-KN26YZZJ.mjs} +1 -1
  15. package/dist/{chunk-3EWP7RGL.mjs → chunk-NHF3YLSF.mjs} +382 -226
  16. package/dist/{chunk-ARM3KXOM.mjs → chunk-OYB2YQPY.mjs} +11 -11
  17. package/dist/{chunk-U7AIA2UJ.mjs → chunk-PEXHYNRZ.mjs} +2 -2
  18. package/dist/{chunk-GEYNLWCZ.mjs → chunk-PFHKXXSV.mjs} +1 -1
  19. package/dist/{chunk-D7HE7E2A.mjs → chunk-QXPX7SNK.mjs} +12 -12
  20. package/dist/{chunk-TOU7Y6T4.mjs → chunk-S32JZ2HU.mjs} +1 -1
  21. package/dist/{chunk-J4ZMH6JZ.mjs → chunk-XLRMLBFR.mjs} +1 -1
  22. package/dist/{full-2LSQUWEM.css → full-77VQ6BAW.css} +6 -6
  23. package/dist/{full-B3RS4LV3.mjs → full-LSSDDZQW.mjs} +5 -5
  24. package/dist/index.css +78 -40
  25. package/dist/index.js +363 -209
  26. package/dist/index.mjs +13 -13
  27. package/dist/{loaded-FY2TCG5Y.css → loaded-4FAPBCAU.css} +1 -1
  28. package/dist/{loaded-JIR6E6RO.mjs → loaded-C2JGMUXV.mjs} +2 -2
  29. package/dist/{loaded-XEI7CJSF.mjs → loaded-FJHWTGH6.mjs} +2 -2
  30. package/dist/{loaded-VCMCWG55.mjs → loaded-NTEK7RT3.mjs} +2 -2
  31. package/dist/no-external.css +78 -40
  32. package/dist/no-external.js +363 -209
  33. package/dist/no-external.mjs +13 -13
  34. package/dist/rsc.css +19 -19
  35. package/dist/rsc.js +64 -64
  36. package/dist/rsc.mjs +12 -12
  37. package/package.json +1 -1
  38. package/dist/ArrayField-LRIG75HP.mjs +0 -17
  39. package/dist/ObjectField-M2VTKEXM.mjs +0 -17
@@ -13,11 +13,11 @@ import {
13
13
  renderContext,
14
14
  useRichtextProps,
15
15
  useSlots
16
- } from "./chunk-VEQIM5ZE.mjs";
16
+ } from "./chunk-66IXS5FK.mjs";
17
17
  import {
18
18
  collisionStore,
19
19
  useSensors
20
- } from "./chunk-U4NHUPA4.mjs";
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-ARM3KXOM.mjs";
28
+ } from "./chunk-OYB2YQPY.mjs";
29
29
  import {
30
30
  IconButton,
31
31
  Loader
32
- } from "./chunk-D7HE7E2A.mjs";
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-D4WFZ3K2.mjs";
93
+ } from "./chunk-KN26YZZJ.mjs";
94
94
  import {
95
95
  get_class_name_factory_default
96
96
  } from "./chunk-BFHV72KK.mjs";
@@ -157,7 +157,14 @@ var HtmlModeRender = ({
157
157
  const body = document.body;
158
158
  // calculate content height safely, avoiding clientHeight/viewport height which prevents shrinking
159
159
  const height = Math.max(body.scrollHeight, body.offsetHeight);
160
- window.parent.postMessage({ type: 'resize-iframe', id: '${id}', height: height }, '*');
160
+ try {
161
+ window.parent.postMessage({ type: 'resize-iframe', id: '${id}', height: height }, '*');
162
+ if (window.top && window.top !== window.parent) {
163
+ window.top.postMessage({ type: 'resize-iframe', id: '${id}', height: height }, '*');
164
+ }
165
+ } catch (e) {
166
+ // Ignore
167
+ }
161
168
  }
162
169
  window.addEventListener('load', sendHeight);
163
170
  window.addEventListener('resize', sendHeight);
@@ -468,7 +475,7 @@ function useGetCredBuild() {
468
475
  // lib/use-component-list.tsx
469
476
  import { useEffect as useEffect4, useState as useState3 } from "react";
470
477
 
471
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/ComponentList/styles.module.css#css-module
478
+ // css-module:/home/runner/work/credbuild/credbuild/components/ComponentList/styles.module.css#css-module
472
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" };
473
480
 
474
481
  // components/ComponentList/index.tsx
@@ -642,7 +649,7 @@ var useComponentList = () => {
642
649
  // components/CredBuild/components/Components/index.tsx
643
650
  import { useMemo as useMemo2, useState as useState4 } from "react";
644
651
 
645
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Components/styles.module.css#css-module
652
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Components/styles.module.css#css-module
646
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" };
647
654
 
648
655
  // components/CredBuild/components/Components/index.tsx
@@ -737,7 +744,7 @@ var Components = () => {
737
744
  ] });
738
745
  };
739
746
 
740
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/plugins/blocks/styles.module.css#css-module
747
+ // css-module:/home/runner/work/credbuild/credbuild/plugins/blocks/styles.module.css#css-module
741
748
  var styles_module_default3 = { "BlocksPlugin": "_BlocksPlugin_1q0b2_1" };
742
749
 
743
750
  // plugins/blocks/index.tsx
@@ -750,7 +757,7 @@ var blocksPlugin = () => ({
750
757
  icon: /* @__PURE__ */ jsx6(Shapes, {})
751
758
  });
752
759
 
753
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/LayerTree/styles.module.css#css-module
760
+ // css-module:/home/runner/work/credbuild/credbuild/components/LayerTree/styles.module.css#css-module
754
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" };
755
762
 
756
763
  // components/LayerTree/index.tsx
@@ -759,7 +766,9 @@ import {
759
766
  useCallback,
760
767
  useContext as useContext2,
761
768
  useRef,
762
- memo as memo2
769
+ memo as memo2,
770
+ createContext as createContext2,
771
+ useState as useState5
763
772
  } from "react";
764
773
  import { useVirtualizer } from "@tanstack/react-virtual";
765
774
  import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -769,6 +778,7 @@ var DEFAULT_LAYER_ROW_HEIGHT = 32;
769
778
  var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
770
779
  var MIN_VIRTUALIZED_LAYER_COUNT = 25;
771
780
  var measuredRowHeights = /* @__PURE__ */ new Map();
781
+ var DragContext = createContext2(null);
772
782
  var getZonesByParent = (zones) => {
773
783
  return Object.keys(zones).reduce((acc, zone) => {
774
784
  const [parentId] = zone.split(":");
@@ -871,7 +881,9 @@ var Layer = memo2(forwardRef(function Layer2({
871
881
  selectedPathIds
872
882
  }, ref) {
873
883
  const dispatch = useAppStore((s) => s.dispatch);
884
+ const nodes = useAppStore((s) => s.state.indexes.nodes);
874
885
  const zoneStore = useContext2(ZoneStoreContext);
886
+ const dragCtx = useContext2(DragContext);
875
887
  const isHovering = useContextStore(
876
888
  ZoneStoreContext,
877
889
  (s) => s.hoveringComponent === node.itemId
@@ -910,7 +922,92 @@ var Layer = memo2(forwardRef(function Layer2({
910
922
  }),
911
923
  "data-index": dataIndex,
912
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
+ },
913
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
+ ),
914
1011
  /* @__PURE__ */ jsx7("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs3(
915
1012
  "button",
916
1013
  {
@@ -1108,16 +1205,32 @@ var LayerTree = memo2(({
1108
1205
  selectedPathIds,
1109
1206
  trees
1110
1207
  }) => {
1111
- return /* @__PURE__ */ jsx7(Fragment, { children: trees.map((tree) => /* @__PURE__ */ jsx7(
1112
- LayerTreeZone,
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,
1113
1213
  {
1114
- depth: 0,
1115
- selectedId,
1116
- selectedPathIds,
1117
- tree
1118
- },
1119
- tree.zoneCompound
1120
- )) });
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
+ );
1121
1234
  });
1122
1235
 
1123
1236
  // components/CredBuild/components/Outline/index.tsx
@@ -1171,7 +1284,7 @@ var Outline = memo3(() => {
1171
1284
  ) });
1172
1285
  });
1173
1286
 
1174
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/plugins/outline/styles.module.css#css-module
1287
+ // css-module:/home/runner/work/credbuild/credbuild/plugins/outline/styles.module.css#css-module
1175
1288
  var styles_module_default5 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
1176
1289
 
1177
1290
  // plugins/outline/index.tsx
@@ -1184,7 +1297,7 @@ var outlinePlugin = () => ({
1184
1297
  icon: /* @__PURE__ */ jsx9(List, {})
1185
1298
  });
1186
1299
 
1187
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/Breadcrumbs/styles.module.css#css-module
1300
+ // css-module:/home/runner/work/credbuild/credbuild/components/Breadcrumbs/styles.module.css#css-module
1188
1301
  var styles_module_default6 = { "Breadcrumbs": "_Breadcrumbs_1e0gb_1", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1e0gb_7", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1e0gb_7" };
1189
1302
 
1190
1303
  // lib/use-breadcrumbs.ts
@@ -1249,7 +1362,7 @@ var Breadcrumbs = ({
1249
1362
  ] });
1250
1363
  };
1251
1364
 
1252
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Fields/styles.module.css#css-module
1365
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Fields/styles.module.css#css-module
1253
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" };
1254
1367
 
1255
1368
  // components/CredBuild/components/Fields/index.tsx
@@ -1405,7 +1518,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
1405
1518
  };
1406
1519
  var Fields = memo4(FieldsInternal);
1407
1520
 
1408
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/plugins/fields/styles.module.css#css-module
1521
+ // css-module:/home/runner/work/credbuild/credbuild/plugins/fields/styles.module.css#css-module
1409
1522
  var styles_module_default8 = { "FieldsPlugin": "_FieldsPlugin_6as57_1", "FieldsPlugin-header": "_FieldsPlugin-header_6as57_7" };
1410
1523
 
1411
1524
  // plugins/fields/index.tsx
@@ -1430,40 +1543,46 @@ var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
1430
1543
  });
1431
1544
 
1432
1545
  // plugins/code/CodePanel.tsx
1433
- import { useState as useState5 } from "react";
1546
+ import { useState as useState6 } from "react";
1434
1547
 
1435
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/plugins/code/styles.module.css#css-module
1548
+ // css-module:/home/runner/work/credbuild/credbuild/plugins/code/styles.module.css#css-module
1436
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" };
1437
1550
 
1438
1551
  // plugins/code/CodePanel.tsx
1439
1552
  import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1440
1553
  var getClassName9 = get_class_name_factory_default("CodePanel", styles_module_default9);
1441
1554
  var CodePanel = () => {
1442
- const [copied, setCopied] = useState5(false);
1443
- const [promptType, setPromptType] = useState5("with-header");
1555
+ const [copied, setCopied] = useState6(false);
1556
+ const [topic, setTopic] = useState6("");
1557
+ const [promptType, setPromptType] = useState6("header-footer");
1444
1558
  const dispatch = useAppStore((s) => s.dispatch);
1445
1559
  const root = useAppStore((s) => s.state.data.root);
1446
1560
  const rootProps = root?.props || root;
1447
1561
  const currentMode = rootProps?.mode || "blocks";
1448
- const aiPromptWithHeader = `Buatkan desain landing page lengkap dan premium dengan pendekatan mobile-first, modern, rapi, dan compact (padat & elegan) menggunakan HTML murni dan utilitas kelas Tailwind CSS. Halaman harus memuat struktur lengkap seperti Header/Navigation, Hero Section, Features/Layanan, Testimoni, Call-to-Action (CTA), dan Footer.
1449
-
1450
- Ketentuan penulisan kode:
1451
- 1. STRUKTUR BERSIH: Gunakan elemen semantik HTML5 seperti <section>, <header>, atau <div> sebagai wrapper utama per seksi. JANGAN sertakan tag <html>, <body>, <head>, atau <script>.
1452
- 2. MOBILE-FIRST & RESPONSIF: Desain harus sepenuhnya responsif. Mulai dari layout ponsel (default), lalu gunakan breakpoint (sm:, md:, lg:, xl:) secara terstruktur untuk layar yang lebih besar.
1453
- 3. ESTETIKA MODERN & PREMIUM: Gunakan skema warna harmonis (misal: warna gelap bernuansa glassmorphism, gradasi halus, border tipis semi-transparan, efek hover mikro interaktif).
1454
- 4. COMPACT & EFISIEN: Hindari padding/margin berlebih yang membuat halaman kosong melompong. Pastikan konten padat, terbaca dengan baik, dan memiliki rasio grid/flexbox yang rapi.
1455
- 5. BEBAS JAVASCRIPT: Seluruh interaktivitas dasar (seperti hover, focus, state) harus ditangani murni menggunakan utilitas kelas CSS Tailwind.`;
1456
- const aiPromptNoHeader = `Buatkan desain landing page lengkap dan premium TANPA bagian Header/Navigation dengan pendekatan mobile-first, modern, rapi, dan compact (padat & elegan) menggunakan HTML murni dan utilitas kelas Tailwind CSS. Halaman harus memuat struktur lengkap seperti Hero Section, Features/Layanan, Testimoni, Call-to-Action (CTA), dan Footer (tanpa memuat menu navigasi atau header di bagian atas).
1562
+ const generatePrompt = (variant, landingPageTopic) => {
1563
+ const topicDesc = landingPageTopic.trim() ? `untuk "${landingPageTopic.trim()}"` : "lengkap dan premium";
1564
+ let structureRequirements = "";
1565
+ if (variant === "header-footer") {
1566
+ structureRequirements = "1. STRUKTUR LENGKAP: Halaman HARUS memuat seluruh bagian berikut secara lengkap: Header/Navigation menu di bagian paling atas, Hero Section, Features/Layanan, Testimoni, Call-to-Action (CTA), dan Footer di bagian paling bawah.";
1567
+ } else if (variant === "header-no-footer") {
1568
+ structureRequirements = "1. DENGAN HEADER & TANPA FOOTER: Halaman HARUS memuat Header/Navigation menu di bagian paling atas, Hero Section, Features/Layanan, Testimoni, dan Call-to-Action (CTA). Namun, pastikan sama sekali TIDAK ada bagian Footer di bagian bawah halaman.";
1569
+ } else if (variant === "no-header-footer") {
1570
+ structureRequirements = "1. TANPA HEADER & DENGAN FOOTER: Halaman HARUS memuat Hero Section, Features/Layanan, Testimoni, Call-to-Action (CTA), dan Footer di bagian paling bawah. Namun, pastikan sama sekali TIDAK ada bagian Header/Navigation/Navbar di bagian atas halaman.";
1571
+ } else {
1572
+ structureRequirements = "1. TANPA HEADER & TANPA FOOTER: Halaman HARUS memuat Hero Section, Features/Layanan, Testimoni, dan Call-to-Action (CTA). Pastikan sama sekali TIDAK ada bagian Header/Navigation/Navbar di bagian atas, dan TIDAK ada bagian Footer di bagian bawah halaman.";
1573
+ }
1574
+ return `Buatkan desain landing page ${topicDesc} dengan pendekatan mobile-first, modern, rapi, dan compact (padat & elegan) menggunakan HTML murni dan utilitas kelas Tailwind CSS.
1457
1575
 
1458
1576
  Ketentuan penulisan kode:
1459
- 1. STRUKTUR BERSIH: Gunakan elemen semantik HTML5 seperti <section>, <header>, atau <div> sebagai wrapper utama per seksi. JANGAN sertakan tag <html>, <body>, <head>, atau <script>.
1460
- 2. TANPA HEADER: Pastikan sama sekali tidak ada bagian Header/Navbar/Navigation menu di bagian atas halaman. Desain harus langsung dimulai dengan Hero Section yang menarik dan berdampak tinggi.
1577
+ ${structureRequirements}
1578
+ 2. STRUKTUR BERSIH: Gunakan elemen semantik HTML5 seperti <section>, <header>, atau <div> sebagai wrapper utama per seksi. JANGAN sertakan tag <html>, <body>, <head>, atau <script>.
1461
1579
  3. MOBILE-FIRST & RESPONSIF: Desain harus sepenuhnya responsif. Mulai dari layout ponsel (default), lalu gunakan breakpoint (sm:, md:, lg:, xl:) secara terstruktur untuk layar yang lebih besar.
1462
1580
  4. ESTETIKA MODERN & PREMIUM: Gunakan skema warna harmonis (misal: warna gelap bernuansa glassmorphism, gradasi halus, border tipis semi-transparan, efek hover mikro interaktif).
1463
1581
  5. COMPACT & EFISIEN: Hindari padding/margin berlebih yang membuat halaman kosong melompong. Pastikan konten padat, terbaca dengan baik, dan memiliki rasio grid/flexbox yang rapi.
1464
1582
  6. BEBAS JAVASCRIPT: Seluruh interaktivitas dasar (seperti hover, focus, state) harus ditangani murni menggunakan utilitas kelas CSS Tailwind.`;
1583
+ };
1465
1584
  const handleCopyPrompt = () => {
1466
- const selectedPrompt = promptType === "with-header" ? aiPromptWithHeader : aiPromptNoHeader;
1585
+ const selectedPrompt = generatePrompt(promptType, topic);
1467
1586
  navigator.clipboard.writeText(selectedPrompt);
1468
1587
  setCopied(true);
1469
1588
  setTimeout(() => setCopied(false), 2e3);
@@ -1569,37 +1688,94 @@ Ketentuan penulisan kode:
1569
1688
  }
1570
1689
  )
1571
1690
  ] }),
1572
- /* @__PURE__ */ jsx13("div", { className: getClassName9("optionsSection"), style: { marginBottom: 12 }, children: /* @__PURE__ */ jsxs7("div", { className: getClassName9("radioGroup"), children: [
1573
- /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1574
- /* @__PURE__ */ jsx13(
1575
- "input",
1576
- {
1577
- type: "radio",
1578
- name: "promptType",
1579
- value: "with-header",
1580
- checked: promptType === "with-header",
1581
- onChange: () => setPromptType("with-header"),
1582
- className: getClassName9("radioInput")
1583
- }
1584
- ),
1585
- /* @__PURE__ */ jsx13("span", { children: "Dengan Header" })
1586
- ] }),
1587
- /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1588
- /* @__PURE__ */ jsx13(
1589
- "input",
1590
- {
1591
- type: "radio",
1592
- name: "promptType",
1593
- value: "no-header",
1594
- checked: promptType === "no-header",
1595
- onChange: () => setPromptType("no-header"),
1596
- className: getClassName9("radioInput")
1597
- }
1598
- ),
1599
- /* @__PURE__ */ jsx13("span", { children: "Tanpa Header" })
1691
+ /* @__PURE__ */ jsxs7("div", { style: { marginBottom: 12 }, children: [
1692
+ /* @__PURE__ */ jsx13("div", { className: getClassName9("optionTitle"), style: { marginBottom: 6 }, children: "Topik / Jenis Landing Page" }),
1693
+ /* @__PURE__ */ jsx13(
1694
+ "input",
1695
+ {
1696
+ type: "text",
1697
+ value: topic,
1698
+ onChange: (e) => setTopic(e.target.value),
1699
+ placeholder: "Contoh: Klinik Gigi, SaaS AI, Agensi Desain...",
1700
+ style: {
1701
+ boxSizing: "border-box",
1702
+ width: "100%",
1703
+ padding: "8px 10px",
1704
+ fontSize: "12px",
1705
+ borderRadius: "5px",
1706
+ border: "1px solid var(--cb-border)",
1707
+ backgroundColor: "var(--cb-bg-base)",
1708
+ color: "var(--cb-silver)",
1709
+ outline: "none",
1710
+ transition: "border-color 0.2s"
1711
+ },
1712
+ onFocus: (e) => e.target.style.borderColor = "var(--cb-gold)",
1713
+ onBlur: (e) => e.target.style.borderColor = "var(--cb-border)"
1714
+ }
1715
+ )
1716
+ ] }),
1717
+ /* @__PURE__ */ jsxs7("div", { className: getClassName9("optionsSection"), style: { marginBottom: 12 }, children: [
1718
+ /* @__PURE__ */ jsx13("div", { className: getClassName9("optionTitle"), style: { marginBottom: 6 }, children: "Varian Struktur Template" }),
1719
+ /* @__PURE__ */ jsxs7("div", { className: getClassName9("radioGroup"), children: [
1720
+ /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1721
+ /* @__PURE__ */ jsx13(
1722
+ "input",
1723
+ {
1724
+ type: "radio",
1725
+ name: "promptType",
1726
+ value: "header-footer",
1727
+ checked: promptType === "header-footer",
1728
+ onChange: () => setPromptType("header-footer"),
1729
+ className: getClassName9("radioInput")
1730
+ }
1731
+ ),
1732
+ /* @__PURE__ */ jsx13("span", { children: "Dengan Header & Footer" })
1733
+ ] }),
1734
+ /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1735
+ /* @__PURE__ */ jsx13(
1736
+ "input",
1737
+ {
1738
+ type: "radio",
1739
+ name: "promptType",
1740
+ value: "header-no-footer",
1741
+ checked: promptType === "header-no-footer",
1742
+ onChange: () => setPromptType("header-no-footer"),
1743
+ className: getClassName9("radioInput")
1744
+ }
1745
+ ),
1746
+ /* @__PURE__ */ jsx13("span", { children: "Dengan Header, Tanpa Footer" })
1747
+ ] }),
1748
+ /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1749
+ /* @__PURE__ */ jsx13(
1750
+ "input",
1751
+ {
1752
+ type: "radio",
1753
+ name: "promptType",
1754
+ value: "no-header-footer",
1755
+ checked: promptType === "no-header-footer",
1756
+ onChange: () => setPromptType("no-header-footer"),
1757
+ className: getClassName9("radioInput")
1758
+ }
1759
+ ),
1760
+ /* @__PURE__ */ jsx13("span", { children: "Tanpa Header, Dengan Footer" })
1761
+ ] }),
1762
+ /* @__PURE__ */ jsxs7("label", { className: getClassName9("radioLabel"), children: [
1763
+ /* @__PURE__ */ jsx13(
1764
+ "input",
1765
+ {
1766
+ type: "radio",
1767
+ name: "promptType",
1768
+ value: "no-header-no-footer",
1769
+ checked: promptType === "no-header-no-footer",
1770
+ onChange: () => setPromptType("no-header-no-footer"),
1771
+ className: getClassName9("radioInput")
1772
+ }
1773
+ ),
1774
+ /* @__PURE__ */ jsx13("span", { children: "Tanpa Keduanya" })
1775
+ ] })
1600
1776
  ] })
1601
- ] }) }),
1602
- /* @__PURE__ */ jsx13("div", { className: getClassName9("promptText"), children: promptType === "with-header" ? aiPromptWithHeader : aiPromptNoHeader })
1777
+ ] }),
1778
+ /* @__PURE__ */ jsx13("div", { className: getClassName9("promptText"), style: { maxHeight: 110 }, children: generatePrompt(promptType, topic) })
1603
1779
  ] })
1604
1780
  ] });
1605
1781
  };
@@ -1620,20 +1796,20 @@ import {
1620
1796
  useEffect as useEffect15,
1621
1797
  useMemo as useMemo15,
1622
1798
  useRef as useRef9,
1623
- useState as useState15
1799
+ useState as useState16
1624
1800
  } from "react";
1625
1801
 
1626
1802
  // components/CredBuild/components/Preview/index.tsx
1627
- import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef3, useMemo as useMemo7, useState as useState7 } from "react";
1803
+ import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef3, useMemo as useMemo7, useState as useState8 } from "react";
1628
1804
 
1629
1805
  // components/AutoFrame/index.tsx
1630
1806
  import {
1631
- createContext as createContext2,
1807
+ createContext as createContext3,
1632
1808
  useCallback as useCallback3,
1633
1809
  useContext as useContext4,
1634
1810
  useEffect as useEffect6,
1635
1811
  useRef as useRef2,
1636
- useState as useState6
1812
+ useState as useState7
1637
1813
  } from "react";
1638
1814
  import hash from "object-hash";
1639
1815
  import { createPortal } from "react-dom";
@@ -1853,7 +2029,7 @@ var CopyHostStyles = ({
1853
2029
  }, [debug, doc, onStylesLoaded, win]);
1854
2030
  return /* @__PURE__ */ jsx15(Fragment4, { children });
1855
2031
  };
1856
- var autoFrameContext = createContext2({});
2032
+ var autoFrameContext = createContext3({});
1857
2033
  var useFrame = () => useContext4(autoFrameContext);
1858
2034
  function AutoFrame({
1859
2035
  children,
@@ -1867,10 +2043,10 @@ function AutoFrame({
1867
2043
  frameRef,
1868
2044
  ...props
1869
2045
  }) {
1870
- const [loaded, setLoaded] = useState6(false);
1871
- const [ctx, setCtx] = useState6({});
1872
- const [mountTarget, setMountTarget] = useState6();
1873
- const [stylesLoaded, setStylesLoaded] = useState6(false);
2046
+ const [loaded, setLoaded] = useState7(false);
2047
+ const [ctx, setCtx] = useState7({});
2048
+ const [mountTarget, setMountTarget] = useState7();
2049
+ const [stylesLoaded, setStylesLoaded] = useState7(false);
1874
2050
  const handleStylesLoaded = useCallback3(() => {
1875
2051
  setStylesLoaded(true);
1876
2052
  }, []);
@@ -1926,8 +2102,8 @@ function AutoFrame({
1926
2102
  AutoFrame.displayName = "AutoFrame";
1927
2103
  var AutoFrame_default = AutoFrame;
1928
2104
 
1929
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Preview/styles.module.css#css-module
1930
- var styles_module_default10 = { "CredBuildPreview": "_CredBuildPreview_1z08a_1", "CredBuildPreview-frame": "_CredBuildPreview-frame_1z08a_6" };
2105
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Preview/styles.module.css#css-module
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" };
1931
2107
 
1932
2108
  // lib/bubble-pointer-event.ts
1933
2109
  var BaseEvent = typeof PointerEvent !== "undefined" ? PointerEvent : Event;
@@ -1948,7 +2124,7 @@ var BubbledPointerEvent = class extends BaseEvent {
1948
2124
  };
1949
2125
 
1950
2126
  // components/CredBuild/components/Preview/index.tsx
1951
- import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
2127
+ import { Fragment as Fragment5, jsx as jsx16 } from "react/jsx-runtime";
1952
2128
  var getClassName11 = get_class_name_factory_default("CredBuildPreview", styles_module_default10);
1953
2129
  var useBubbleIframeEvents = (ref) => {
1954
2130
  const status = useAppStore((s) => s.status);
@@ -2026,7 +2202,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
2026
2202
  const htmlCode = rootProps?.htmlCode || "";
2027
2203
  const ref = useRef3(null);
2028
2204
  useBubbleIframeEvents(ref);
2029
- const [localCode, setLocalCode] = useState7(htmlCode);
2205
+ const [localCode, setLocalCode] = useState8(htmlCode);
2030
2206
  useEffect7(() => {
2031
2207
  setLocalCode(htmlCode);
2032
2208
  }, [htmlCode]);
@@ -2136,58 +2312,22 @@ var Preview = ({ id = "credbuild-preview" }) => {
2136
2312
  id,
2137
2313
  "data-credbuild-preview": true,
2138
2314
  style: { height: "100%", display: "flex", flexDirection: "column" },
2139
- children: /* @__PURE__ */ jsx16("div", { style: {
2140
- display: "flex",
2141
- flexDirection: "column",
2142
- flex: 1,
2143
- background: "#020617",
2144
- position: "relative"
2145
- }, children: /* @__PURE__ */ jsxs8("div", { style: {
2315
+ children: /* @__PURE__ */ jsx16("div", { className: getClassName11("htmlEditor"), children: /* @__PURE__ */ jsx16("div", { style: {
2146
2316
  display: "flex",
2147
2317
  flex: 1,
2148
2318
  position: "relative",
2149
2319
  overflow: "hidden"
2150
- }, children: [
2151
- /* @__PURE__ */ jsx16("div", { style: {
2152
- width: 45,
2153
- background: "#0b0f19",
2154
- borderRight: "1px solid #1e293b",
2155
- display: "flex",
2156
- flexDirection: "column",
2157
- alignItems: "flex-end",
2158
- padding: "16px 8px 16px 0",
2159
- fontFamily: "Menlo, Monaco, Consolas, monospace",
2160
- fontSize: 12,
2161
- color: "#475569",
2162
- userSelect: "none",
2163
- lineHeight: 1.6
2164
- }, children: Array.from({ length: Math.max(localCode.split("\n").length, 25) }).map((_, i) => /* @__PURE__ */ jsx16("div", { children: i + 1 }, i)) }),
2165
- /* @__PURE__ */ jsx16(
2166
- "textarea",
2167
- {
2168
- value: localCode,
2169
- onChange: (e) => setLocalCode(e.target.value),
2170
- onBlur: handleSaveOnBlur,
2171
- placeholder: "<!-- Tempel kode HTML/Tailwind di sini -->\n<section class='bg-zinc-900 text-white p-12'>\n <h1 class='text-3xl font-bold'>Hello World</h1>\n</section>",
2172
- spellCheck: false,
2173
- style: {
2174
- flex: 1,
2175
- background: "transparent",
2176
- border: "none",
2177
- outline: "none",
2178
- color: "#e2e8f0",
2179
- fontFamily: "Menlo, Monaco, Consolas, 'Fira Code', monospace",
2180
- fontSize: 13,
2181
- lineHeight: 1.6,
2182
- padding: "16px 20px",
2183
- resize: "none",
2184
- height: "100%",
2185
- width: "100%",
2186
- overflowY: "auto"
2187
- }
2188
- }
2189
- )
2190
- ] }) })
2320
+ }, children: /* @__PURE__ */ jsx16(
2321
+ "textarea",
2322
+ {
2323
+ value: localCode,
2324
+ onChange: (e) => setLocalCode(e.target.value),
2325
+ onBlur: handleSaveOnBlur,
2326
+ placeholder: "<!-- Tempel kode HTML/Tailwind di sini -->\n<section class='bg-zinc-900 text-white p-12'>\n <h1 class='text-3xl font-bold'>Hello World</h1>\n</section>",
2327
+ spellCheck: false,
2328
+ className: getClassName11("htmlTextarea")
2329
+ }
2330
+ ) }) })
2191
2331
  }
2192
2332
  );
2193
2333
  }
@@ -2291,28 +2431,28 @@ var useLoadedOverrides = ({
2291
2431
  import { deepEqual } from "fast-equals";
2292
2432
 
2293
2433
  // components/CredBuild/components/Layout/index.tsx
2294
- import { useEffect as useEffect14, useMemo as useMemo14, useState as useState14 } from "react";
2434
+ import { useEffect as useEffect14, useMemo as useMemo14, useState as useState15 } from "react";
2295
2435
 
2296
2436
  // components/CredBuild/context.tsx
2297
2437
  import {
2298
- createContext as createContext3,
2438
+ createContext as createContext4,
2299
2439
  useContext as useContext5
2300
2440
  } from "react";
2301
2441
  import { jsx as jsx17 } from "react/jsx-runtime";
2302
- var propsContext = createContext3({});
2442
+ var propsContext = createContext4({});
2303
2443
  function PropsProvider(props) {
2304
2444
  return /* @__PURE__ */ jsx17(propsContext.Provider, { value: props, children: props.children });
2305
2445
  }
2306
2446
  var usePropsContext = () => useContext5(propsContext);
2307
2447
 
2308
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Layout/styles.module.css#css-module
2448
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Layout/styles.module.css#css-module
2309
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" };
2310
2450
 
2311
2451
  // lib/use-inject-css.ts
2312
- import { useEffect as useEffect8, useState as useState8 } from "react";
2452
+ import { useEffect as useEffect8, useState as useState9 } from "react";
2313
2453
  var styles = ``;
2314
2454
  var useInjectStyleSheet = (initialStyles, iframeEnabled) => {
2315
- const [el, setEl] = useState8();
2455
+ const [el, setEl] = useState9();
2316
2456
  useEffect8(() => {
2317
2457
  setEl(document.createElement("style"));
2318
2458
  }, []);
@@ -2361,7 +2501,7 @@ import {
2361
2501
  useEffect as useEffect9,
2362
2502
  useMemo as useMemo9,
2363
2503
  useRef as useRef4,
2364
- useState as useState9
2504
+ useState as useState10
2365
2505
  } from "react";
2366
2506
  import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
2367
2507
 
@@ -2716,7 +2856,7 @@ var DragDropContextClient = ({
2716
2856
  const appStore = useAppStoreApi();
2717
2857
  const debouncedParamsRef = useRef4(null);
2718
2858
  const tempDisableFallback = useTempDisableFallback(100);
2719
- const [zoneStore] = useState9(() => {
2859
+ const [zoneStore] = useState10(() => {
2720
2860
  const rootVirtualizers = /* @__PURE__ */ new Map();
2721
2861
  return createStore2(() => ({
2722
2862
  zoneDepthIndex: {},
@@ -2811,7 +2951,7 @@ var DragDropContextClient = ({
2811
2951
  );
2812
2952
  }
2813
2953
  }, [zoneStore]);
2814
- const [plugins] = useState9(() => [
2954
+ const [plugins] = useState10(() => [
2815
2955
  ...disableAutoScroll ? defaultPreset.plugins.filter((plugin) => plugin !== AutoScroller) : defaultPreset.plugins,
2816
2956
  createNestedDroppablePlugin(
2817
2957
  {
@@ -2859,7 +2999,7 @@ var DragDropContextClient = ({
2859
2999
  )
2860
3000
  ]);
2861
3001
  const sensors = useSensors();
2862
- const [dragListeners, setDragListeners] = useState9({});
3002
+ const [dragListeners, setDragListeners] = useState10({});
2863
3003
  const dragMode = useRef4(null);
2864
3004
  const initialSelector = useRef4(void 0);
2865
3005
  const nextContextValue = useMemo9(
@@ -3117,13 +3257,13 @@ var DragDropContext = ({
3117
3257
  };
3118
3258
 
3119
3259
  // components/CredBuild/components/Header/index.tsx
3120
- import { memo as memo5, useCallback as useCallback7, useMemo as useMemo12, useState as useState11 } from "react";
3260
+ import { memo as memo5, useCallback as useCallback7, useMemo as useMemo12, useState as useState12 } from "react";
3121
3261
 
3122
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/MenuBar/styles.module.css#css-module
3262
+ // css-module:/home/runner/work/credbuild/credbuild/components/MenuBar/styles.module.css#css-module
3123
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" };
3124
3264
 
3125
3265
  // components/MenuBar/index.tsx
3126
- import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
3266
+ import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
3127
3267
  var getClassName12 = get_class_name_factory_default("MenuBar", styles_module_default12);
3128
3268
  function MenuBar({
3129
3269
  menuOpen = false,
@@ -3147,8 +3287,8 @@ function MenuBar({
3147
3287
  setMenuOpen(false);
3148
3288
  }
3149
3289
  },
3150
- children: /* @__PURE__ */ jsxs9("div", { className: getClassName12("inner"), children: [
3151
- /* @__PURE__ */ jsxs9("div", { className: getClassName12("history"), children: [
3290
+ children: /* @__PURE__ */ jsxs8("div", { className: getClassName12("inner"), children: [
3291
+ /* @__PURE__ */ jsxs8("div", { className: getClassName12("history"), children: [
3152
3292
  /* @__PURE__ */ jsx20(
3153
3293
  IconButton,
3154
3294
  {
@@ -3177,13 +3317,13 @@ function MenuBar({
3177
3317
  }
3178
3318
 
3179
3319
  // components/ViewportControls/index.tsx
3180
- import { useEffect as useEffect10, useMemo as useMemo10, useState as useState10 } from "react";
3320
+ import { useEffect as useEffect10, useMemo as useMemo10, useState as useState11 } from "react";
3181
3321
 
3182
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/ViewportControls/styles.module.css#css-module
3322
+ // css-module:/home/runner/work/credbuild/credbuild/components/ViewportControls/styles.module.css#css-module
3183
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" };
3184
3324
 
3185
3325
  // components/ViewportControls/index.tsx
3186
- import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
3326
+ import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
3187
3327
  var icons = {
3188
3328
  Smartphone: /* @__PURE__ */ jsx21(Smartphone, { size: 16 }),
3189
3329
  Tablet: /* @__PURE__ */ jsx21(Tablet, { size: 16 }),
@@ -3244,20 +3384,20 @@ var ViewportControls = ({
3244
3384
  ].filter((a) => a.value <= (autoZoom || 1)).sort((a, b) => a.value > b.value ? 1 : -1);
3245
3385
  return options.length > 0 ? options : defaultZoomOptions;
3246
3386
  }, [autoZoom, defaultsContainAutoZoom]);
3247
- const [activeViewport, setActiveViewport] = useState10(
3387
+ const [activeViewport, setActiveViewport] = useState11(
3248
3388
  uiViewports.current.width
3249
3389
  );
3250
3390
  useEffect10(() => {
3251
3391
  setActiveViewport(uiViewports.current.width);
3252
3392
  }, [uiViewports.current.width, uiViewports]);
3253
- const [isExpanded, setIsExpanded] = useState10(false);
3254
- return /* @__PURE__ */ jsxs10(
3393
+ const [isExpanded, setIsExpanded] = useState11(false);
3394
+ return /* @__PURE__ */ jsxs9(
3255
3395
  "div",
3256
3396
  {
3257
3397
  className: getClassName13({ isExpanded, fullScreen }),
3258
3398
  suppressHydrationWarning: true,
3259
3399
  children: [
3260
- /* @__PURE__ */ jsx21("div", { className: getClassName13("actions"), children: /* @__PURE__ */ jsxs10("div", { className: getClassName13("actionsInner"), children: [
3400
+ /* @__PURE__ */ jsx21("div", { className: getClassName13("actions"), children: /* @__PURE__ */ jsxs9("div", { className: getClassName13("actionsInner"), children: [
3261
3401
  viewports.map((viewport, i) => /* @__PURE__ */ jsx21(
3262
3402
  ActionButton,
3263
3403
  {
@@ -3306,7 +3446,7 @@ var ViewportControls = ({
3306
3446
  children: /* @__PURE__ */ jsx21(ZoomIn, { size: 16 })
3307
3447
  }
3308
3448
  ),
3309
- /* @__PURE__ */ jsxs10("div", { className: getClassName13("zoom"), children: [
3449
+ /* @__PURE__ */ jsxs9("div", { className: getClassName13("zoom"), children: [
3310
3450
  /* @__PURE__ */ jsx21("div", { className: getClassName13("divider") }),
3311
3451
  /* @__PURE__ */ jsx21(
3312
3452
  "select",
@@ -3351,13 +3491,13 @@ import { useShallow as useShallow3 } from "zustand/react/shallow";
3351
3491
 
3352
3492
  // lib/frame-context.tsx
3353
3493
  import {
3354
- createContext as createContext5,
3494
+ createContext as createContext6,
3355
3495
  useContext as useContext7,
3356
3496
  useRef as useRef5,
3357
3497
  useMemo as useMemo11
3358
3498
  } from "react";
3359
3499
  import { jsx as jsx22 } from "react/jsx-runtime";
3360
- var FrameContext = createContext5(null);
3500
+ var FrameContext = createContext6(null);
3361
3501
  var FrameProvider = ({
3362
3502
  children
3363
3503
  }) => {
@@ -3378,11 +3518,11 @@ var useCanvasFrame = () => {
3378
3518
  return context;
3379
3519
  };
3380
3520
 
3381
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Header/styles.module.css#css-module
3521
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Header/styles.module.css#css-module
3382
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" };
3383
3523
 
3384
3524
  // components/CredBuild/components/Header/index.tsx
3385
- import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
3525
+ import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
3386
3526
  var getClassName14 = get_class_name_factory_default("CredBuildHeader", styles_module_default14);
3387
3527
  var HeaderInner = ({
3388
3528
  hidePlugins,
@@ -3432,7 +3572,7 @@ var HeaderInner = ({
3432
3572
  const CustomHeaderActions = useAppStore(
3433
3573
  (s) => s.overrides.headerActions || defaultHeaderActionsRender
3434
3574
  );
3435
- const [menuOpen, setMenuOpen] = useState11(false);
3575
+ const [menuOpen, setMenuOpen] = useState12(false);
3436
3576
  const rootTitle = useAppStore((s) => {
3437
3577
  const rootData = s.state.indexes.nodes["root"]?.data;
3438
3578
  return rootData.props.title ?? "";
@@ -3516,7 +3656,7 @@ var HeaderInner = ({
3516
3656
  return /* @__PURE__ */ jsx23(
3517
3657
  CustomHeader,
3518
3658
  {
3519
- actions: /* @__PURE__ */ jsx23(Fragment8, { children: /* @__PURE__ */ jsxs11(CustomHeaderActions, { children: [
3659
+ actions: /* @__PURE__ */ jsx23(Fragment8, { children: /* @__PURE__ */ jsxs10(CustomHeaderActions, { children: [
3520
3660
  /* @__PURE__ */ jsx23(
3521
3661
  Button,
3522
3662
  {
@@ -3549,9 +3689,9 @@ var HeaderInner = ({
3549
3689
  rightSideBarVisible,
3550
3690
  hidePlugins
3551
3691
  }),
3552
- children: /* @__PURE__ */ jsxs11("div", { className: getClassName14("inner"), children: [
3553
- /* @__PURE__ */ jsxs11("div", { className: getClassName14("leftActions"), children: [
3554
- /* @__PURE__ */ jsxs11("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
3692
+ children: /* @__PURE__ */ jsxs10("div", { className: getClassName14("inner"), children: [
3693
+ /* @__PURE__ */ jsxs10("div", { className: getClassName14("leftActions"), children: [
3694
+ /* @__PURE__ */ jsxs10("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
3555
3695
  /* @__PURE__ */ jsx23(
3556
3696
  Button,
3557
3697
  {
@@ -3584,7 +3724,7 @@ var HeaderInner = ({
3584
3724
  }
3585
3725
  )
3586
3726
  ] }),
3587
- /* @__PURE__ */ jsxs11("div", { className: getClassName14("toggle"), children: [
3727
+ /* @__PURE__ */ jsxs10("div", { className: getClassName14("toggle"), children: [
3588
3728
  /* @__PURE__ */ jsx23("div", { className: getClassName14("leftSideBarToggle"), children: /* @__PURE__ */ jsx23(
3589
3729
  IconButton,
3590
3730
  {
@@ -3608,25 +3748,25 @@ var HeaderInner = ({
3608
3748
  }
3609
3749
  ) })
3610
3750
  ] }),
3611
- /* @__PURE__ */ jsx23("div", { className: getClassName14("title"), children: /* @__PURE__ */ jsxs11(Heading, { rank: "2", size: "xs", children: [
3751
+ /* @__PURE__ */ jsx23("div", { className: getClassName14("title"), children: /* @__PURE__ */ jsxs10(Heading, { rank: "2", size: "xs", children: [
3612
3752
  /* @__PURE__ */ jsx23("span", { style: { fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.08em", fontWeight: 600 }, children: headerTitle || rootTitle || "Page" }),
3613
3753
  headerPath && /* @__PURE__ */ jsx23(Fragment8, { children: /* @__PURE__ */ jsx23("code", { className: getClassName14("path"), style: { fontSize: "10px", opacity: 0.6, marginLeft: "8px" }, children: headerPath }) })
3614
3754
  ] }) })
3615
3755
  ] }),
3616
- /* @__PURE__ */ jsxs11("div", { className: getClassName14("viewportTools"), style: { display: "flex", gap: "16px", alignItems: "center" }, children: [
3617
- isHtmlMode && /* @__PURE__ */ jsxs11("div", { style: {
3756
+ /* @__PURE__ */ jsxs10("div", { className: getClassName14("viewportTools"), style: { display: "flex", gap: "16px", alignItems: "center" }, children: [
3757
+ isHtmlMode && /* @__PURE__ */ jsxs10("div", { style: {
3618
3758
  display: "flex",
3619
3759
  alignItems: "center",
3620
3760
  gap: "8px"
3621
3761
  }, children: [
3622
- /* @__PURE__ */ jsxs11("div", { style: {
3762
+ /* @__PURE__ */ jsxs10("div", { style: {
3623
3763
  display: "flex",
3624
3764
  background: "var(--credbuild-color-grey-09)",
3625
3765
  padding: 2,
3626
3766
  borderRadius: 6,
3627
3767
  border: "1px solid var(--credbuild-color-grey-10)"
3628
3768
  }, children: [
3629
- /* @__PURE__ */ jsxs11(
3769
+ /* @__PURE__ */ jsxs10(
3630
3770
  "button",
3631
3771
  {
3632
3772
  type: "button",
@@ -3653,7 +3793,7 @@ var HeaderInner = ({
3653
3793
  ]
3654
3794
  }
3655
3795
  ),
3656
- /* @__PURE__ */ jsxs11(
3796
+ /* @__PURE__ */ jsxs10(
3657
3797
  "button",
3658
3798
  {
3659
3799
  type: "button",
@@ -3720,7 +3860,7 @@ var HeaderInner = ({
3720
3860
  }
3721
3861
  )
3722
3862
  ] }),
3723
- /* @__PURE__ */ jsxs11("div", { className: getClassName14("tools"), children: [
3863
+ /* @__PURE__ */ jsxs10("div", { className: getClassName14("tools"), children: [
3724
3864
  /* @__PURE__ */ jsx23("div", { className: getClassName14("menuButton"), children: /* @__PURE__ */ jsx23(
3725
3865
  IconButton,
3726
3866
  {
@@ -3738,7 +3878,7 @@ var HeaderInner = ({
3738
3878
  dispatch,
3739
3879
  onPublish,
3740
3880
  menuOpen,
3741
- renderHeaderActions: () => /* @__PURE__ */ jsxs11(CustomHeaderActions, { children: [
3881
+ renderHeaderActions: () => /* @__PURE__ */ jsxs10(CustomHeaderActions, { children: [
3742
3882
  /* @__PURE__ */ jsx23(
3743
3883
  Button,
3744
3884
  {
@@ -3775,11 +3915,11 @@ var HeaderInner = ({
3775
3915
  };
3776
3916
  var Header = memo5(HeaderInner);
3777
3917
 
3778
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/SidebarSection/styles.module.css#css-module
3918
+ // css-module:/home/runner/work/credbuild/credbuild/components/SidebarSection/styles.module.css#css-module
3779
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" };
3780
3920
 
3781
3921
  // components/SidebarSection/index.tsx
3782
- import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
3922
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
3783
3923
  var getClassName15 = get_class_name_factory_default("SidebarSection", styles_module_default15);
3784
3924
  var SidebarSection = ({
3785
3925
  children,
@@ -3789,8 +3929,8 @@ var SidebarSection = ({
3789
3929
  noBorderTop,
3790
3930
  isLoading
3791
3931
  }) => {
3792
- return /* @__PURE__ */ jsxs12("div", { className: getClassName15({ noBorderTop }), style: { background }, children: [
3793
- /* @__PURE__ */ jsx24("div", { className: getClassName15("title"), children: /* @__PURE__ */ jsxs12("div", { className: getClassName15("breadcrumbs"), children: [
3932
+ return /* @__PURE__ */ jsxs11("div", { className: getClassName15({ noBorderTop }), style: { background }, children: [
3933
+ /* @__PURE__ */ jsx24("div", { className: getClassName15("title"), children: /* @__PURE__ */ jsxs11("div", { className: getClassName15("breadcrumbs"), children: [
3794
3934
  showBreadcrumbs && /* @__PURE__ */ jsx24(Breadcrumbs, {}),
3795
3935
  /* @__PURE__ */ jsx24("div", { className: getClassName15("heading"), children: /* @__PURE__ */ jsx24(Heading, { rank: "2", size: "xs", children: title }) })
3796
3936
  ] }) }),
@@ -3805,15 +3945,15 @@ import {
3805
3945
  useEffect as useEffect11,
3806
3946
  useMemo as useMemo13,
3807
3947
  useRef as useRef6,
3808
- useState as useState12
3948
+ useState as useState13
3809
3949
  } from "react";
3810
3950
 
3811
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Canvas/styles.module.css#css-module
3951
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Canvas/styles.module.css#css-module
3812
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" };
3813
3953
 
3814
3954
  // components/CredBuild/components/Canvas/index.tsx
3815
3955
  import { useShallow as useShallow4 } from "zustand/react/shallow";
3816
- import { Fragment as Fragment9, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
3956
+ import { Fragment as Fragment9, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
3817
3957
  var getClassName16 = get_class_name_factory_default("CredBuildCanvas", styles_module_default16);
3818
3958
  var ZOOM_ON_CHANGE = true;
3819
3959
  var TRANSITION_DURATION = 150;
@@ -3859,9 +3999,13 @@ var Canvas = () => {
3859
3999
  root: s.state.data.root
3860
4000
  }))
3861
4001
  );
4002
+ const rootProps = root?.props || root;
4003
+ const isHtmlMode = rootProps?.mode === "html";
4004
+ const htmlViewMode = rootProps?.htmlViewMode || (rootProps?.htmlCode ? "preview" : "code");
4005
+ const isHtmlCodeEditActive = isHtmlMode && htmlViewMode === "code";
3862
4006
  const isNonFullWidth = viewports.current.width !== "100%";
3863
4007
  const shouldApplyViewport = true;
3864
- const [showTransition, setShowTransition] = useState12(false);
4008
+ const [showTransition, setShowTransition] = useState13(false);
3865
4009
  const isResizingRef = useRef6(false);
3866
4010
  const defaultRender = useMemo13(() => {
3867
4011
  const CredBuildDefault = ({ children }) => /* @__PURE__ */ jsx25(Fragment9, { children });
@@ -3975,7 +4119,7 @@ var Canvas = () => {
3975
4119
  resizeObserver.disconnect();
3976
4120
  };
3977
4121
  }, [frameRef, resetAutoZoom]);
3978
- const [showLoader, setShowLoader] = useState12(false);
4122
+ const [showLoader, setShowLoader] = useState13(false);
3979
4123
  useEffect11(() => {
3980
4124
  setTimeout(() => {
3981
4125
  setShowLoader(true);
@@ -4044,6 +4188,7 @@ var Canvas = () => {
4044
4188
  showLoader,
4045
4189
  fullScreen: _experimentalFullScreenCanvas
4046
4190
  }),
4191
+ style: isHtmlCodeEditActive ? { overflow: "hidden" } : void 0,
4047
4192
  onClick: (e) => {
4048
4193
  const el = e.target;
4049
4194
  if (!el.hasAttribute("data-credbuild-component") && !el.hasAttribute("data-credbuild-dropzone")) {
@@ -4054,38 +4199,49 @@ var Canvas = () => {
4054
4199
  });
4055
4200
  }
4056
4201
  },
4057
- children: /* @__PURE__ */ jsxs13("div", { className: getClassName16("inner"), ref: frameRef, children: [
4058
- /* @__PURE__ */ jsx25(
4059
- "div",
4060
- {
4061
- className: getClassName16("root"),
4062
- style: {
4063
- width: viewports.current.width || "100%",
4064
- height: !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : zoomConfig.rootHeight,
4065
- minHeight: "100%",
4066
- transform: `scale(${zoomConfig.zoom})`,
4067
- transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, height ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : "",
4068
- overflow: isNonFullWidth ? void 0 : "auto"
4069
- },
4070
- suppressHydrationWarning: true,
4071
- id: "credbuild-canvas-root",
4072
- onTransitionEnd: () => {
4073
- setShowTransition(false);
4074
- isResizingRef.current = false;
4075
- },
4076
- children: /* @__PURE__ */ jsx25(CustomPreview, { children: /* @__PURE__ */ jsx25(Preview, {}) })
4077
- }
4078
- ),
4079
- /* @__PURE__ */ jsx25("div", { className: getClassName16("loader"), children: /* @__PURE__ */ jsx25(Loader, { size: 24 }) })
4080
- ] })
4202
+ children: /* @__PURE__ */ jsxs12(
4203
+ "div",
4204
+ {
4205
+ className: getClassName16("inner"),
4206
+ ref: frameRef,
4207
+ style: {
4208
+ minHeight: "100%",
4209
+ height: isHtmlCodeEditActive ? "100%" : !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : `${zoomConfig.rootHeight * zoomConfig.zoom}px`
4210
+ },
4211
+ children: [
4212
+ /* @__PURE__ */ jsx25(
4213
+ "div",
4214
+ {
4215
+ className: getClassName16("root"),
4216
+ style: {
4217
+ width: isHtmlCodeEditActive ? "100%" : viewports.current.width || "100%",
4218
+ height: isHtmlCodeEditActive ? "100%" : !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : zoomConfig.rootHeight,
4219
+ minHeight: "100%",
4220
+ transform: isHtmlCodeEditActive ? "none" : `scale(${zoomConfig.zoom})`,
4221
+ transition: showTransition ? `width ${TRANSITION_DURATION}ms ease-out, height ${TRANSITION_DURATION}ms ease-out, transform ${TRANSITION_DURATION}ms ease-out` : "",
4222
+ overflow: isHtmlCodeEditActive ? "hidden" : isNonFullWidth ? void 0 : "auto"
4223
+ },
4224
+ suppressHydrationWarning: true,
4225
+ id: "credbuild-canvas-root",
4226
+ onTransitionEnd: () => {
4227
+ setShowTransition(false);
4228
+ isResizingRef.current = false;
4229
+ },
4230
+ children: /* @__PURE__ */ jsx25(CustomPreview, { children: /* @__PURE__ */ jsx25(Preview, {}) })
4231
+ }
4232
+ ),
4233
+ /* @__PURE__ */ jsx25("div", { className: getClassName16("loader"), children: /* @__PURE__ */ jsx25(Loader, { size: 24 }) })
4234
+ ]
4235
+ }
4236
+ )
4081
4237
  }
4082
4238
  );
4083
4239
  };
4084
4240
 
4085
4241
  // lib/use-sidebar-resize.ts
4086
- import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef7, useState as useState13 } from "react";
4242
+ import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef7, useState as useState14 } from "react";
4087
4243
  function useSidebarResize(position, dispatch) {
4088
- const [width, setWidth] = useState13(null);
4244
+ const [width, setWidth] = useState14(null);
4089
4245
  const sidebarRef = useRef7(null);
4090
4246
  const storeWidth = useAppStore(
4091
4247
  (s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
@@ -4166,7 +4322,7 @@ function useSidebarResize(position, dispatch) {
4166
4322
  // components/CredBuild/components/ResizeHandle/index.tsx
4167
4323
  import { useCallback as useCallback10, useRef as useRef8 } from "react";
4168
4324
 
4169
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
4325
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
4170
4326
  var styles_module_default17 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
4171
4327
 
4172
4328
  // components/CredBuild/components/ResizeHandle/index.tsx
@@ -4237,11 +4393,11 @@ var ResizeHandle = ({
4237
4393
  );
4238
4394
  };
4239
4395
 
4240
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
4396
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
4241
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" };
4242
4398
 
4243
4399
  // components/CredBuild/components/Sidebar/index.tsx
4244
- import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
4400
+ import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
4245
4401
  var getClassName18 = get_class_name_factory_default("Sidebar", styles_module_default18);
4246
4402
  var Sidebar = ({
4247
4403
  position,
@@ -4251,7 +4407,7 @@ var Sidebar = ({
4251
4407
  onResizeEnd,
4252
4408
  children
4253
4409
  }) => {
4254
- return /* @__PURE__ */ jsxs14(Fragment10, { children: [
4410
+ return /* @__PURE__ */ jsxs13(Fragment10, { children: [
4255
4411
  /* @__PURE__ */ jsx27(
4256
4412
  "div",
4257
4413
  {
@@ -4330,11 +4486,11 @@ var useDeleteHotkeys = () => {
4330
4486
  useHotkey({ backspace: true }, deleteSelectedComponent);
4331
4487
  };
4332
4488
 
4333
- // css-module:/media/rasyiqi/PROJECT/credibuild-project/credbuild/components/CredBuild/components/Nav/styles.module.css#css-module
4489
+ // css-module:/home/runner/work/credbuild/credbuild/components/CredBuild/components/Nav/styles.module.css#css-module
4334
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" };
4335
4491
 
4336
4492
  // components/CredBuild/components/Nav/index.tsx
4337
- import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
4493
+ import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
4338
4494
  var getClassName19 = get_class_name_factory_default("Nav", styles_module_default19);
4339
4495
  var getClassNameItem = get_class_name_factory_default("NavItem", styles_module_default19);
4340
4496
  var MenuItem = ({
@@ -4361,14 +4517,14 @@ var Nav = ({
4361
4517
  items,
4362
4518
  mobileActions
4363
4519
  }) => {
4364
- return /* @__PURE__ */ jsxs15("nav", { className: getClassName19(), children: [
4520
+ return /* @__PURE__ */ jsxs14("nav", { className: getClassName19(), children: [
4365
4521
  /* @__PURE__ */ jsx28("ul", { className: getClassName19("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx28(MenuItem, { ...item }, key)) }),
4366
4522
  mobileActions && /* @__PURE__ */ jsx28("div", { className: getClassName19("mobileActions"), children: mobileActions })
4367
4523
  ] });
4368
4524
  };
4369
4525
 
4370
4526
  // components/CredBuild/components/Layout/index.tsx
4371
- import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
4527
+ import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
4372
4528
  var getClassName20 = get_class_name_factory_default("CredBuild", styles_module_default11);
4373
4529
  var getLayoutClassName = get_class_name_factory_default("CredBuildLayout", styles_module_default11);
4374
4530
  var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab", styles_module_default11);
@@ -4451,8 +4607,8 @@ var Layout = ({ children }) => {
4451
4607
  () => overrides.credbuild || DefaultOverride,
4452
4608
  [overrides]
4453
4609
  );
4454
- const [mounted, setMounted] = useState14(false);
4455
- const [theme, setTheme] = useState14("dark");
4610
+ const [mounted, setMounted] = useState15(false);
4611
+ const [theme, setTheme] = useState15("dark");
4456
4612
  useEffect14(() => {
4457
4613
  setMounted(true);
4458
4614
  const savedTheme = localStorage.getItem("credbuild-theme");
@@ -4492,7 +4648,7 @@ var Layout = ({ children }) => {
4492
4648
  const setUi = useAppStore((s) => s.setUi);
4493
4649
  const currentPlugin = useAppStore((s) => s.state.ui.plugin?.current);
4494
4650
  const appStoreApi = useAppStoreApi();
4495
- const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState14("toggle");
4651
+ const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState15("toggle");
4496
4652
  const hasLegacySideBarPlugin = useMemo14(
4497
4653
  () => !!plugins?.find((p) => p.name === "legacy-side-bar"),
4498
4654
  [plugins]
@@ -4556,7 +4712,7 @@ var Layout = ({ children }) => {
4556
4712
  const mobilePanelExpanded = useAppStore(
4557
4713
  (s) => s.state.ui.mobilePanelExpanded ?? false
4558
4714
  );
4559
- return /* @__PURE__ */ jsxs16(
4715
+ return /* @__PURE__ */ jsxs15(
4560
4716
  "div",
4561
4717
  {
4562
4718
  className: `CredBuild ${theme === "dark" ? "dark" : ""} ${getClassName20({
@@ -4578,14 +4734,14 @@ var Layout = ({ children }) => {
4578
4734
  mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
4579
4735
  }),
4580
4736
  style: { height: typeof height === "number" && isNaN(height) ? void 0 : height },
4581
- children: /* @__PURE__ */ jsxs16(
4737
+ children: /* @__PURE__ */ jsxs15(
4582
4738
  "div",
4583
4739
  {
4584
4740
  className: getLayoutClassName("inner"),
4585
4741
  style: layoutOptions,
4586
4742
  children: [
4587
4743
  /* @__PURE__ */ jsx29("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx29(Header, { theme, hidePlugins: hasLegacySideBarPlugin }) }),
4588
- /* @__PURE__ */ jsxs16(
4744
+ /* @__PURE__ */ jsxs15(
4589
4745
  Sidebar,
4590
4746
  {
4591
4747
  position: "left",
@@ -4678,7 +4834,7 @@ function CredBuildProvider({ children }) {
4678
4834
  }),
4679
4835
  [_iframe]
4680
4836
  );
4681
- const [generatedAppState] = useState15(() => {
4837
+ const [generatedAppState] = useState16(() => {
4682
4838
  const initial = { ...defaultAppState.ui, ...initialUi };
4683
4839
  let clientUiState = {};
4684
4840
  if (Object.keys(initialData?.root || {}).length > 0 && !initialData?.root?.props) {
@@ -4725,7 +4881,7 @@ function CredBuildProvider({ children }) {
4725
4881
  return walkAppState(newAppState, config);
4726
4882
  });
4727
4883
  const { appendData = true } = _initialHistory || {};
4728
- const [blendedHistories] = useState15(
4884
+ const [blendedHistories] = useState16(
4729
4885
  [
4730
4886
  ..._initialHistory?.histories || [],
4731
4887
  ...appendData ? [{ state: generatedAppState }] : []
@@ -4794,7 +4950,7 @@ function CredBuildProvider({ children }) {
4794
4950
  loadedFieldTransforms
4795
4951
  ]
4796
4952
  );
4797
- const [appStore] = useState15(
4953
+ const [appStore] = useState16(
4798
4954
  () => createAppStore(generateAppStore(initialAppState))
4799
4955
  );
4800
4956
  useEffect15(() => {
@@ -4846,10 +5002,10 @@ CredBuild.Outline = Outline;
4846
5002
  CredBuild.Preview = Preview;
4847
5003
 
4848
5004
  // plugins/legacy-side-bar/index.tsx
4849
- import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
5005
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
4850
5006
  var legacySideBarPlugin = () => ({
4851
5007
  name: "legacy-side-bar",
4852
- render: () => /* @__PURE__ */ jsxs17("div", { style: { overflowY: "auto" }, children: [
5008
+ render: () => /* @__PURE__ */ jsxs16("div", { style: { overflowY: "auto" }, children: [
4853
5009
  /* @__PURE__ */ jsx31(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx31(Components, {}) }),
4854
5010
  /* @__PURE__ */ jsx31(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx31(Outline, {}) })
4855
5011
  ] })