camox 0.36.3 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/editing/createEditableBlock.js +197 -231
- package/dist/features/preview/components/CreatePageModal.js +2 -9
- package/dist/features/preview/components/PageEditorSidebar.js +2 -2
- package/dist/features/preview/components/PreviewPanel.js +12 -36
- package/dist/features/preview/components/RightSidebar.js +37 -75
- package/dist/features/preview/previewStore.js +5 -59
- package/dist/features/vite/auth.js +52 -0
- package/dist/features/vite/definitionsSync.js +13 -12
- package/dist/features/vite/devAuthentication.js +188 -0
- package/dist/features/vite/vite.d.ts +1 -3
- package/dist/features/vite/vite.js +25 -43
- package/dist/lib/api-client-server.js +2 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -6
- package/skills/camox/SKILL.md +17 -0
- package/skills/{camox-block/SKILL.md → camox/references/block-definitions.md} +2 -7
- package/skills/camox/references/cli-blocks.md +78 -0
- package/skills/camox/references/cli-common.md +48 -0
- package/skills/camox/references/cli-environments.md +37 -0
- package/skills/camox/references/cli-pages.md +53 -0
- package/skills/{camox-layout/SKILL.md → camox/references/layout-definitions.md} +2 -7
- package/dist/features/agent-chat/agent-chat-labels.js +0 -200
- package/dist/features/agent-chat/components/AgentChatSidebar.js +0 -172
- package/dist/features/agent-chat/components/AgentChatThread.js +0 -593
- package/dist/features/agent-chat/components/AgentToolCallCard.js +0 -141
- package/dist/features/vite/skillGeneration.js +0 -104
- package/skills/camox-cli/SKILL.md +0 -268
|
@@ -289,9 +289,9 @@ function createEditableBlock(options) {
|
|
|
289
289
|
};
|
|
290
290
|
const Embed = (t0) => {
|
|
291
291
|
const $ = c(59);
|
|
292
|
-
if ($[0] !== "
|
|
292
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
293
293
|
for (let $i = 0; $i < 59; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
294
|
-
$[0] = "
|
|
294
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
295
295
|
}
|
|
296
296
|
const { name, children } = t0;
|
|
297
297
|
const blockContext = React.use(Context);
|
|
@@ -536,9 +536,9 @@ function createEditableBlock(options) {
|
|
|
536
536
|
};
|
|
537
537
|
const Link = (t0) => {
|
|
538
538
|
const $ = c(38);
|
|
539
|
-
if ($[0] !== "
|
|
539
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
540
540
|
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
541
|
-
$[0] = "
|
|
541
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
542
542
|
}
|
|
543
543
|
const { name, children } = t0;
|
|
544
544
|
const blockContext = React.use(Context);
|
|
@@ -777,9 +777,9 @@ function createEditableBlock(options) {
|
|
|
777
777
|
};
|
|
778
778
|
const Image = (t0) => {
|
|
779
779
|
const $ = c(22);
|
|
780
|
-
if ($[0] !== "
|
|
780
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
781
781
|
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
782
|
-
$[0] = "
|
|
782
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
783
783
|
}
|
|
784
784
|
const { name, children } = t0;
|
|
785
785
|
const blockContext = React.use(Context);
|
|
@@ -901,9 +901,9 @@ function createEditableBlock(options) {
|
|
|
901
901
|
};
|
|
902
902
|
const File = (t0) => {
|
|
903
903
|
const $ = c(9);
|
|
904
|
-
if ($[0] !== "
|
|
904
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
905
905
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
906
|
-
$[0] = "
|
|
906
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
907
907
|
}
|
|
908
908
|
const { name, children } = t0;
|
|
909
909
|
const blockContext = React.use(Context);
|
|
@@ -978,9 +978,9 @@ function createEditableBlock(options) {
|
|
|
978
978
|
const FileList = _AssetList;
|
|
979
979
|
const RepeaterItemWrapper = (t0) => {
|
|
980
980
|
const $ = c(9);
|
|
981
|
-
if ($[0] !== "
|
|
981
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
982
982
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
983
|
-
$[0] = "
|
|
983
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
984
984
|
}
|
|
985
985
|
const { itemId, blockId, mode, children } = t0;
|
|
986
986
|
const isContentEditable = useIsEditable(mode);
|
|
@@ -1021,9 +1021,9 @@ function createEditableBlock(options) {
|
|
|
1021
1021
|
};
|
|
1022
1022
|
const RepeaterHoverProvider = (t0) => {
|
|
1023
1023
|
const $ = c(7);
|
|
1024
|
-
if ($[0] !== "
|
|
1024
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
1025
1025
|
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1026
|
-
$[0] = "
|
|
1026
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
1027
1027
|
}
|
|
1028
1028
|
const { blockId, fieldName, children } = t0;
|
|
1029
1029
|
const isContentEditable = useIsEditable("site");
|
|
@@ -1054,9 +1054,9 @@ function createEditableBlock(options) {
|
|
|
1054
1054
|
};
|
|
1055
1055
|
const Repeater = (t0) => {
|
|
1056
1056
|
const $ = c(27);
|
|
1057
|
-
if ($[0] !== "
|
|
1057
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
1058
1058
|
for (let $i = 0; $i < 27; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1059
|
-
$[0] = "
|
|
1059
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
1060
1060
|
}
|
|
1061
1061
|
const { name, children } = t0;
|
|
1062
1062
|
const blockContext = React.use(Context);
|
|
@@ -1180,10 +1180,10 @@ function createEditableBlock(options) {
|
|
|
1180
1180
|
return t4;
|
|
1181
1181
|
};
|
|
1182
1182
|
const BlockComponent = (t0) => {
|
|
1183
|
-
const $ = c(
|
|
1184
|
-
if ($[0] !== "
|
|
1185
|
-
for (let $i = 0; $i <
|
|
1186
|
-
$[0] = "
|
|
1183
|
+
const $ = c(71);
|
|
1184
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
1185
|
+
for (let $i = 0; $i < 71; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1186
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
1187
1187
|
}
|
|
1188
1188
|
const { blockData, mode, isFirstBlock, showAddBlockTop, showAddBlockBottom, addBlockAfterPosition } = t0;
|
|
1189
1189
|
const isContentEditable = useIsEditable(mode);
|
|
@@ -1192,7 +1192,6 @@ function createEditableBlock(options) {
|
|
|
1192
1192
|
const selection = useSelector(previewStore, _temp5);
|
|
1193
1193
|
const isPageEditorSidebarOpen = useSelector(previewStore, _temp6);
|
|
1194
1194
|
const isAddBlockSidebarOpen = useSelector(previewStore, _temp7);
|
|
1195
|
-
const pendingAgentBlockFocus = useSelector(previewStore, _temp8);
|
|
1196
1195
|
const isBlockSelected = selection?.blockId === blockData._id;
|
|
1197
1196
|
const ref = React.useRef(null);
|
|
1198
1197
|
const [isFirstRender, setIsFirstRender] = React.useState(true);
|
|
@@ -1212,100 +1211,70 @@ function createEditableBlock(options) {
|
|
|
1212
1211
|
}
|
|
1213
1212
|
React.useEffect(t1, t2);
|
|
1214
1213
|
let t3;
|
|
1215
|
-
if ($[4] !==
|
|
1214
|
+
if ($[4] !== isBlockSelected || $[5] !== isFirstRender) {
|
|
1216
1215
|
t3 = () => {
|
|
1217
1216
|
if (!isBlockSelected || !ref.current) return;
|
|
1218
|
-
if (pendingAgentBlockFocus?.blockId === blockData._id) return;
|
|
1219
1217
|
ref.current.scrollIntoView({
|
|
1220
1218
|
behavior: isFirstRender ? "instant" : "smooth",
|
|
1221
1219
|
block: isFirstRender ? "start" : "nearest"
|
|
1222
1220
|
});
|
|
1223
1221
|
};
|
|
1224
|
-
$[4] =
|
|
1225
|
-
$[5] =
|
|
1226
|
-
$[6] =
|
|
1227
|
-
|
|
1228
|
-
$[8] = t3;
|
|
1229
|
-
} else t3 = $[8];
|
|
1222
|
+
$[4] = isBlockSelected;
|
|
1223
|
+
$[5] = isFirstRender;
|
|
1224
|
+
$[6] = t3;
|
|
1225
|
+
} else t3 = $[6];
|
|
1230
1226
|
let t4;
|
|
1231
|
-
if ($[
|
|
1227
|
+
if ($[7] !== blockData._id || $[8] !== isBlockSelected || $[9] !== isFirstRender || $[10] !== isPageEditorSidebarOpen) {
|
|
1232
1228
|
t4 = [
|
|
1233
1229
|
blockData._id,
|
|
1234
1230
|
isBlockSelected,
|
|
1235
1231
|
isFirstRender,
|
|
1236
|
-
isPageEditorSidebarOpen
|
|
1237
|
-
pendingAgentBlockFocus
|
|
1232
|
+
isPageEditorSidebarOpen
|
|
1238
1233
|
];
|
|
1239
|
-
$[
|
|
1240
|
-
$[
|
|
1241
|
-
$[
|
|
1242
|
-
$[
|
|
1243
|
-
$[
|
|
1244
|
-
|
|
1245
|
-
} else t4 = $[14];
|
|
1234
|
+
$[7] = blockData._id;
|
|
1235
|
+
$[8] = isBlockSelected;
|
|
1236
|
+
$[9] = isFirstRender;
|
|
1237
|
+
$[10] = isPageEditorSidebarOpen;
|
|
1238
|
+
$[11] = t4;
|
|
1239
|
+
} else t4 = $[11];
|
|
1246
1240
|
React.useEffect(t3, t4);
|
|
1247
|
-
|
|
1241
|
+
const t5 = String(blockData._id);
|
|
1248
1242
|
let t6;
|
|
1249
|
-
if ($[
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
});
|
|
1257
|
-
previewStore.send({
|
|
1258
|
-
type: "clearPendingAgentBlockFocus",
|
|
1259
|
-
requestId: pendingAgentBlockFocus.requestId
|
|
1260
|
-
});
|
|
1261
|
-
};
|
|
1262
|
-
t6 = [blockData._id, pendingAgentBlockFocus];
|
|
1263
|
-
$[15] = blockData._id;
|
|
1264
|
-
$[16] = pendingAgentBlockFocus;
|
|
1265
|
-
$[17] = t5;
|
|
1266
|
-
$[18] = t6;
|
|
1267
|
-
} else {
|
|
1268
|
-
t5 = $[17];
|
|
1269
|
-
t6 = $[18];
|
|
1270
|
-
}
|
|
1271
|
-
React.useEffect(t5, t6);
|
|
1272
|
-
const t7 = String(blockData._id);
|
|
1243
|
+
if ($[12] !== t5) {
|
|
1244
|
+
t6 = { blockId: t5 };
|
|
1245
|
+
$[12] = t5;
|
|
1246
|
+
$[13] = t6;
|
|
1247
|
+
} else t6 = $[13];
|
|
1248
|
+
const isHoveredFromSidebar = useOverlayMessage(iframeWindow, isContentEditable, "CAMOX_HOVER_BLOCK", "CAMOX_HOVER_BLOCK_END", t6);
|
|
1249
|
+
let t7;
|
|
1273
1250
|
let t8;
|
|
1274
|
-
if ($[
|
|
1275
|
-
|
|
1276
|
-
$[19] = t7;
|
|
1277
|
-
$[20] = t8;
|
|
1278
|
-
} else t8 = $[20];
|
|
1279
|
-
const isHoveredFromSidebar = useOverlayMessage(iframeWindow, isContentEditable, "CAMOX_HOVER_BLOCK", "CAMOX_HOVER_BLOCK_END", t8);
|
|
1280
|
-
let t10;
|
|
1281
|
-
let t9;
|
|
1282
|
-
if ($[21] !== isHoveredFromSidebar) {
|
|
1283
|
-
t9 = () => {
|
|
1251
|
+
if ($[14] !== isHoveredFromSidebar) {
|
|
1252
|
+
t7 = () => {
|
|
1284
1253
|
setIsHovered(isHoveredFromSidebar);
|
|
1285
1254
|
};
|
|
1286
|
-
|
|
1287
|
-
$[
|
|
1288
|
-
$[
|
|
1289
|
-
$[
|
|
1255
|
+
t8 = [isHoveredFromSidebar];
|
|
1256
|
+
$[14] = isHoveredFromSidebar;
|
|
1257
|
+
$[15] = t7;
|
|
1258
|
+
$[16] = t8;
|
|
1290
1259
|
} else {
|
|
1291
|
-
|
|
1292
|
-
|
|
1260
|
+
t7 = $[15];
|
|
1261
|
+
t8 = $[16];
|
|
1293
1262
|
}
|
|
1294
|
-
React.useEffect(
|
|
1263
|
+
React.useEffect(t7, t8);
|
|
1295
1264
|
let result;
|
|
1296
|
-
if ($[
|
|
1265
|
+
if ($[17] !== blockData.content) {
|
|
1297
1266
|
result = { ...blockData.content };
|
|
1298
1267
|
for (const key in result) {
|
|
1299
1268
|
const value = result[key];
|
|
1300
|
-
if (Array.isArray(value) && value.length > 0 && value[0]?.content !== void 0) result[key] = value.map(
|
|
1269
|
+
if (Array.isArray(value) && value.length > 0 && value[0]?.content !== void 0) result[key] = value.map(_temp8);
|
|
1301
1270
|
}
|
|
1302
|
-
$[
|
|
1303
|
-
$[
|
|
1304
|
-
} else result = $[
|
|
1271
|
+
$[17] = blockData.content;
|
|
1272
|
+
$[18] = result;
|
|
1273
|
+
} else result = $[18];
|
|
1305
1274
|
const normalizedContent = result;
|
|
1306
|
-
let
|
|
1307
|
-
if ($[
|
|
1308
|
-
|
|
1275
|
+
let t9;
|
|
1276
|
+
if ($[19] !== blockData._id || $[20] !== isContentEditable) {
|
|
1277
|
+
t9 = (e) => {
|
|
1309
1278
|
if (!isContentEditable) return;
|
|
1310
1279
|
if (e.target.closest("[data-camox-field-id]")) return;
|
|
1311
1280
|
previewStore.send({
|
|
@@ -1313,32 +1282,32 @@ function createEditableBlock(options) {
|
|
|
1313
1282
|
blockId: blockData._id
|
|
1314
1283
|
});
|
|
1315
1284
|
};
|
|
1316
|
-
$[
|
|
1317
|
-
$[
|
|
1318
|
-
$[
|
|
1319
|
-
} else
|
|
1320
|
-
const handleClick =
|
|
1321
|
-
let
|
|
1322
|
-
if ($[
|
|
1323
|
-
|
|
1285
|
+
$[19] = blockData._id;
|
|
1286
|
+
$[20] = isContentEditable;
|
|
1287
|
+
$[21] = t9;
|
|
1288
|
+
} else t9 = $[21];
|
|
1289
|
+
const handleClick = t9;
|
|
1290
|
+
let t10;
|
|
1291
|
+
if ($[22] !== isContentEditable) {
|
|
1292
|
+
t10 = () => {
|
|
1324
1293
|
if (isContentEditable) setIsHovered(true);
|
|
1325
1294
|
};
|
|
1326
|
-
$[
|
|
1327
|
-
$[
|
|
1328
|
-
} else
|
|
1329
|
-
const handleMouseEnter =
|
|
1330
|
-
let
|
|
1331
|
-
if ($[
|
|
1332
|
-
|
|
1295
|
+
$[22] = isContentEditable;
|
|
1296
|
+
$[23] = t10;
|
|
1297
|
+
} else t10 = $[23];
|
|
1298
|
+
const handleMouseEnter = t10;
|
|
1299
|
+
let t11;
|
|
1300
|
+
if ($[24] !== isContentEditable) {
|
|
1301
|
+
t11 = () => {
|
|
1333
1302
|
if (isContentEditable) setIsHovered(false);
|
|
1334
1303
|
};
|
|
1335
|
-
$[
|
|
1336
|
-
$[
|
|
1337
|
-
} else
|
|
1338
|
-
const handleMouseLeave =
|
|
1339
|
-
let
|
|
1340
|
-
if ($[
|
|
1341
|
-
|
|
1304
|
+
$[24] = isContentEditable;
|
|
1305
|
+
$[25] = t11;
|
|
1306
|
+
} else t11 = $[25];
|
|
1307
|
+
const handleMouseLeave = t11;
|
|
1308
|
+
let t12;
|
|
1309
|
+
if ($[26] !== addBlockAfterPosition || $[27] !== blockData.position) {
|
|
1310
|
+
t12 = (insertPosition) => {
|
|
1342
1311
|
postOverlayMessage({
|
|
1343
1312
|
type: "CAMOX_ADD_BLOCK_REQUEST",
|
|
1344
1313
|
blockPosition: blockData.position,
|
|
@@ -1346,114 +1315,114 @@ function createEditableBlock(options) {
|
|
|
1346
1315
|
...addBlockAfterPosition !== void 0 && { afterPosition: addBlockAfterPosition }
|
|
1347
1316
|
});
|
|
1348
1317
|
};
|
|
1349
|
-
$[
|
|
1350
|
-
$[
|
|
1351
|
-
$[
|
|
1352
|
-
} else
|
|
1353
|
-
const handleAddBlockClick =
|
|
1318
|
+
$[26] = addBlockAfterPosition;
|
|
1319
|
+
$[27] = blockData.position;
|
|
1320
|
+
$[28] = t12;
|
|
1321
|
+
} else t12 = $[28];
|
|
1322
|
+
const handleAddBlockClick = t12;
|
|
1354
1323
|
const shouldShowOverlay = isContentEditable && (isHovered || isBlockSelected) && !isAddBlockSidebarOpen;
|
|
1355
1324
|
const shouldShowAddBlockOverlay = isAddBlockSidebarOpen && mode !== "peek";
|
|
1356
|
-
let
|
|
1357
|
-
if ($[
|
|
1358
|
-
|
|
1325
|
+
let t13;
|
|
1326
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1327
|
+
t13 = {
|
|
1359
1328
|
position: "relative",
|
|
1360
1329
|
scrollMargin: "5rem",
|
|
1361
1330
|
background: "var(--background)"
|
|
1362
1331
|
};
|
|
1363
|
-
$[
|
|
1364
|
-
} else
|
|
1365
|
-
const
|
|
1366
|
-
const
|
|
1367
|
-
const
|
|
1368
|
-
const
|
|
1369
|
-
const
|
|
1370
|
-
let
|
|
1371
|
-
if ($[
|
|
1372
|
-
|
|
1332
|
+
$[29] = t13;
|
|
1333
|
+
} else t13 = $[29];
|
|
1334
|
+
const t14 = isContentEditable ? blockData._id : void 0;
|
|
1335
|
+
const t15 = shouldShowOverlay && !isBlockSelected || void 0;
|
|
1336
|
+
const t16 = shouldShowOverlay && isBlockSelected || void 0;
|
|
1337
|
+
const t17 = mode === "layout" ? "layout" : void 0;
|
|
1338
|
+
const t18 = blockData._id;
|
|
1339
|
+
let t19;
|
|
1340
|
+
if ($[30] !== blockData.content) {
|
|
1341
|
+
t19 = {
|
|
1373
1342
|
...contentDefaults,
|
|
1374
1343
|
...blockData.content
|
|
1375
1344
|
};
|
|
1376
|
-
$[
|
|
1377
|
-
$[
|
|
1378
|
-
} else
|
|
1379
|
-
const merged =
|
|
1345
|
+
$[30] = blockData.content;
|
|
1346
|
+
$[31] = t19;
|
|
1347
|
+
} else t19 = $[31];
|
|
1348
|
+
const merged = t19;
|
|
1380
1349
|
let overrides;
|
|
1381
|
-
if ($[
|
|
1350
|
+
if ($[32] !== merged) {
|
|
1382
1351
|
overrides = {};
|
|
1383
1352
|
for (const key_0 in merged) {
|
|
1384
1353
|
const val = merged[key_0];
|
|
1385
1354
|
if (val && typeof val === "object" && "url" in val && !val.url && contentDefaults[key_0]) overrides[key_0] = contentDefaults[key_0];
|
|
1386
1355
|
}
|
|
1387
|
-
$[
|
|
1388
|
-
$[
|
|
1389
|
-
} else overrides = $[
|
|
1390
|
-
let
|
|
1391
|
-
if ($[
|
|
1392
|
-
|
|
1356
|
+
$[32] = merged;
|
|
1357
|
+
$[33] = overrides;
|
|
1358
|
+
} else overrides = $[33];
|
|
1359
|
+
let t20;
|
|
1360
|
+
if ($[34] !== merged || $[35] !== overrides) {
|
|
1361
|
+
t20 = {
|
|
1393
1362
|
...merged,
|
|
1394
1363
|
...overrides
|
|
1395
1364
|
};
|
|
1396
|
-
$[
|
|
1397
|
-
$[
|
|
1398
|
-
$[
|
|
1399
|
-
} else
|
|
1400
|
-
const
|
|
1401
|
-
let
|
|
1402
|
-
if ($[
|
|
1403
|
-
|
|
1365
|
+
$[34] = merged;
|
|
1366
|
+
$[35] = overrides;
|
|
1367
|
+
$[36] = t20;
|
|
1368
|
+
} else t20 = $[36];
|
|
1369
|
+
const t21 = t20;
|
|
1370
|
+
let t22;
|
|
1371
|
+
if ($[37] !== blockData.settings) {
|
|
1372
|
+
t22 = {
|
|
1404
1373
|
...settingsDefaults,
|
|
1405
1374
|
...blockData.settings
|
|
1406
1375
|
};
|
|
1407
|
-
$[
|
|
1408
|
-
$[
|
|
1409
|
-
} else
|
|
1410
|
-
const
|
|
1411
|
-
let
|
|
1412
|
-
if ($[
|
|
1413
|
-
|
|
1414
|
-
blockId:
|
|
1415
|
-
content:
|
|
1416
|
-
settings:
|
|
1376
|
+
$[37] = blockData.settings;
|
|
1377
|
+
$[38] = t22;
|
|
1378
|
+
} else t22 = $[38];
|
|
1379
|
+
const t23 = t22;
|
|
1380
|
+
let t24;
|
|
1381
|
+
if ($[39] !== blockData._id || $[40] !== isHovered || $[41] !== mode || $[42] !== t21 || $[43] !== t23) {
|
|
1382
|
+
t24 = {
|
|
1383
|
+
blockId: t18,
|
|
1384
|
+
content: t21,
|
|
1385
|
+
settings: t23,
|
|
1417
1386
|
mode,
|
|
1418
1387
|
isHovered,
|
|
1419
1388
|
setIsHovered
|
|
1420
1389
|
};
|
|
1421
|
-
$[
|
|
1422
|
-
$[
|
|
1423
|
-
$[
|
|
1424
|
-
$[
|
|
1425
|
-
$[
|
|
1426
|
-
$[
|
|
1427
|
-
} else
|
|
1428
|
-
let
|
|
1429
|
-
if ($[
|
|
1430
|
-
|
|
1431
|
-
$[
|
|
1432
|
-
$[
|
|
1433
|
-
} else
|
|
1434
|
-
let
|
|
1435
|
-
if ($[
|
|
1436
|
-
|
|
1437
|
-
value:
|
|
1438
|
-
children:
|
|
1390
|
+
$[39] = blockData._id;
|
|
1391
|
+
$[40] = isHovered;
|
|
1392
|
+
$[41] = mode;
|
|
1393
|
+
$[42] = t21;
|
|
1394
|
+
$[43] = t23;
|
|
1395
|
+
$[44] = t24;
|
|
1396
|
+
} else t24 = $[44];
|
|
1397
|
+
let t25;
|
|
1398
|
+
if ($[45] !== normalizedContent) {
|
|
1399
|
+
t25 = /* @__PURE__ */ jsx(options.component, { content: normalizedContent });
|
|
1400
|
+
$[45] = normalizedContent;
|
|
1401
|
+
$[46] = t25;
|
|
1402
|
+
} else t25 = $[46];
|
|
1403
|
+
let t26;
|
|
1404
|
+
if ($[47] !== t24 || $[48] !== t25) {
|
|
1405
|
+
t26 = /* @__PURE__ */ jsx(Context.Provider, {
|
|
1406
|
+
value: t24,
|
|
1407
|
+
children: t25
|
|
1439
1408
|
});
|
|
1440
|
-
$[
|
|
1441
|
-
$[
|
|
1442
|
-
$[
|
|
1443
|
-
} else
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1446
|
-
if ($[
|
|
1447
|
-
|
|
1409
|
+
$[47] = t24;
|
|
1410
|
+
$[48] = t25;
|
|
1411
|
+
$[49] = t26;
|
|
1412
|
+
} else t26 = $[49];
|
|
1413
|
+
const t27 = shouldShowAddBlockOverlay || void 0;
|
|
1414
|
+
let t28;
|
|
1415
|
+
if ($[50] !== t27) {
|
|
1416
|
+
t28 = /* @__PURE__ */ jsx("div", {
|
|
1448
1417
|
className: "camox-sheet-overlay",
|
|
1449
|
-
"data-camox-visible":
|
|
1418
|
+
"data-camox-visible": t27
|
|
1450
1419
|
});
|
|
1451
|
-
$[
|
|
1452
|
-
$[
|
|
1453
|
-
} else
|
|
1454
|
-
let
|
|
1455
|
-
if ($[
|
|
1456
|
-
|
|
1420
|
+
$[50] = t27;
|
|
1421
|
+
$[51] = t28;
|
|
1422
|
+
} else t28 = $[51];
|
|
1423
|
+
let t29;
|
|
1424
|
+
if ($[52] !== handleAddBlockClick || $[53] !== isAddBlockSidebarOpen || $[54] !== isFirstBlock || $[55] !== mode || $[56] !== shouldShowOverlay || $[57] !== showAddBlockBottom || $[58] !== showAddBlockTop) {
|
|
1425
|
+
t29 = shouldShowOverlay && /* @__PURE__ */ jsxs(Fragment, { children: [(showAddBlockTop ?? (mode !== "layout" && !isFirstBlock)) && /* @__PURE__ */ jsx(AddBlockControlBar, {
|
|
1457
1426
|
position: "top",
|
|
1458
1427
|
hidden: isAddBlockSidebarOpen,
|
|
1459
1428
|
onMouseLeave: () => setIsHovered(false),
|
|
@@ -1464,47 +1433,47 @@ function createEditableBlock(options) {
|
|
|
1464
1433
|
onMouseLeave: () => setIsHovered(false),
|
|
1465
1434
|
onClick: () => handleAddBlockClick("after")
|
|
1466
1435
|
})] });
|
|
1467
|
-
$[
|
|
1468
|
-
$[
|
|
1469
|
-
$[
|
|
1470
|
-
$[
|
|
1471
|
-
$[
|
|
1472
|
-
$[
|
|
1473
|
-
$[
|
|
1474
|
-
$[
|
|
1475
|
-
} else
|
|
1476
|
-
let
|
|
1477
|
-
if ($[
|
|
1478
|
-
|
|
1436
|
+
$[52] = handleAddBlockClick;
|
|
1437
|
+
$[53] = isAddBlockSidebarOpen;
|
|
1438
|
+
$[54] = isFirstBlock;
|
|
1439
|
+
$[55] = mode;
|
|
1440
|
+
$[56] = shouldShowOverlay;
|
|
1441
|
+
$[57] = showAddBlockBottom;
|
|
1442
|
+
$[58] = showAddBlockTop;
|
|
1443
|
+
$[59] = t29;
|
|
1444
|
+
} else t29 = $[59];
|
|
1445
|
+
let t30;
|
|
1446
|
+
if ($[60] !== handleClick || $[61] !== handleMouseEnter || $[62] !== handleMouseLeave || $[63] !== t14 || $[64] !== t15 || $[65] !== t16 || $[66] !== t17 || $[67] !== t26 || $[68] !== t28 || $[69] !== t29) {
|
|
1447
|
+
t30 = /* @__PURE__ */ jsxs("div", {
|
|
1479
1448
|
className: "group visual-editing-block",
|
|
1480
1449
|
ref,
|
|
1481
|
-
style:
|
|
1482
|
-
"data-camox-block-id":
|
|
1483
|
-
"data-camox-hovered":
|
|
1484
|
-
"data-camox-focused":
|
|
1485
|
-
"data-camox-overlay-mode":
|
|
1450
|
+
style: t13,
|
|
1451
|
+
"data-camox-block-id": t14,
|
|
1452
|
+
"data-camox-hovered": t15,
|
|
1453
|
+
"data-camox-focused": t16,
|
|
1454
|
+
"data-camox-overlay-mode": t17,
|
|
1486
1455
|
onClick: handleClick,
|
|
1487
1456
|
onMouseEnter: handleMouseEnter,
|
|
1488
1457
|
onMouseLeave: handleMouseLeave,
|
|
1489
1458
|
children: [
|
|
1459
|
+
t26,
|
|
1490
1460
|
t28,
|
|
1491
|
-
|
|
1492
|
-
t31
|
|
1461
|
+
t29
|
|
1493
1462
|
]
|
|
1494
1463
|
});
|
|
1495
|
-
$[
|
|
1496
|
-
$[
|
|
1497
|
-
$[
|
|
1498
|
-
$[
|
|
1499
|
-
$[
|
|
1500
|
-
$[
|
|
1501
|
-
$[
|
|
1502
|
-
$[
|
|
1503
|
-
$[
|
|
1504
|
-
$[
|
|
1505
|
-
$[
|
|
1506
|
-
} else
|
|
1507
|
-
return
|
|
1464
|
+
$[60] = handleClick;
|
|
1465
|
+
$[61] = handleMouseEnter;
|
|
1466
|
+
$[62] = handleMouseLeave;
|
|
1467
|
+
$[63] = t14;
|
|
1468
|
+
$[64] = t15;
|
|
1469
|
+
$[65] = t16;
|
|
1470
|
+
$[66] = t17;
|
|
1471
|
+
$[67] = t26;
|
|
1472
|
+
$[68] = t28;
|
|
1473
|
+
$[69] = t29;
|
|
1474
|
+
$[70] = t30;
|
|
1475
|
+
} else t30 = $[70];
|
|
1476
|
+
return t30;
|
|
1508
1477
|
};
|
|
1509
1478
|
const useSetting = (name) => {
|
|
1510
1479
|
const ctx = React.use(Context);
|
|
@@ -1517,9 +1486,9 @@ function createEditableBlock(options) {
|
|
|
1517
1486
|
*/
|
|
1518
1487
|
const Detached = (t0) => {
|
|
1519
1488
|
const $ = c(31);
|
|
1520
|
-
if ($[0] !== "
|
|
1489
|
+
if ($[0] !== "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea") {
|
|
1521
1490
|
for (let $i = 0; $i < 31; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1522
|
-
$[0] = "
|
|
1491
|
+
$[0] = "8dd6d0fcda0a2856bfa1ea5193e01a6c24359a1ef955d07b1a1a1246a1ddaaea";
|
|
1523
1492
|
}
|
|
1524
1493
|
const { children } = t0;
|
|
1525
1494
|
const ctx = React.use(Context);
|
|
@@ -1527,8 +1496,8 @@ function createEditableBlock(options) {
|
|
|
1527
1496
|
const { blockId, mode, isHovered, setIsHovered } = ctx;
|
|
1528
1497
|
const isContentEditable = useIsEditable(mode);
|
|
1529
1498
|
const { window: iframeWindow } = useFrame();
|
|
1530
|
-
const selection = useSelector(previewStore,
|
|
1531
|
-
const isAddBlockSidebarOpen = useSelector(previewStore,
|
|
1499
|
+
const selection = useSelector(previewStore, _temp9);
|
|
1500
|
+
const isAddBlockSidebarOpen = useSelector(previewStore, _temp0);
|
|
1532
1501
|
const isBlockSelected = selection?.blockId === blockId;
|
|
1533
1502
|
const t1 = String(blockId);
|
|
1534
1503
|
let t2;
|
|
@@ -1734,16 +1703,13 @@ function _temp6(state_0) {
|
|
|
1734
1703
|
function _temp7(state_1) {
|
|
1735
1704
|
return state_1.context.isAddBlockSidebarOpen;
|
|
1736
1705
|
}
|
|
1737
|
-
function _temp8(
|
|
1738
|
-
return state_2.context.pendingAgentBlockFocus;
|
|
1739
|
-
}
|
|
1740
|
-
function _temp9(item) {
|
|
1706
|
+
function _temp8(item) {
|
|
1741
1707
|
return item.content;
|
|
1742
1708
|
}
|
|
1743
|
-
function
|
|
1709
|
+
function _temp9(state) {
|
|
1744
1710
|
return state.context.selection;
|
|
1745
1711
|
}
|
|
1746
|
-
function
|
|
1712
|
+
function _temp0(state_0) {
|
|
1747
1713
|
return state_0.context.isAddBlockSidebarOpen;
|
|
1748
1714
|
}
|
|
1749
1715
|
|
|
@@ -27,9 +27,9 @@ const slugifyPathSegment = (nickname) => {
|
|
|
27
27
|
};
|
|
28
28
|
const CreatePageModal = () => {
|
|
29
29
|
const $ = c(56);
|
|
30
|
-
if ($[0] !== "
|
|
30
|
+
if ($[0] !== "1b629d2817a68910dcd0da1c3da2fc0aac9482f6f60a2348db493c3af333db39") {
|
|
31
31
|
for (let $i = 0; $i < 56; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
32
|
-
$[0] = "
|
|
32
|
+
$[0] = "1b629d2817a68910dcd0da1c3da2fc0aac9482f6f60a2348db493c3af333db39";
|
|
33
33
|
}
|
|
34
34
|
const projectSlug = useProjectSlug();
|
|
35
35
|
const open = useSelector(previewStore, _temp);
|
|
@@ -129,13 +129,6 @@ const CreatePageModal = () => {
|
|
|
129
129
|
form.reset();
|
|
130
130
|
await new Promise(_temp2);
|
|
131
131
|
await navigate({ to: fullPath });
|
|
132
|
-
previewStore.send({
|
|
133
|
-
type: "openAgentChatSidebar",
|
|
134
|
-
pageScaffoldContext: {
|
|
135
|
-
nickname,
|
|
136
|
-
fullPath
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
132
|
} catch (t9) {
|
|
140
133
|
console.error("Failed to create page:", t9);
|
|
141
134
|
toast.error("Could not create page");
|
|
@@ -281,7 +281,7 @@ const PageEditorSidebar = () => {
|
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
key: "block",
|
|
284
|
-
label:
|
|
284
|
+
label: blockDef._internal.title,
|
|
285
285
|
isCurrent: ancestorChain.length === 0 && !fieldHasOwnView,
|
|
286
286
|
onClick: () => previewStore.send({
|
|
287
287
|
type: "setFocusedBlock",
|
|
@@ -290,7 +290,7 @@ const PageEditorSidebar = () => {
|
|
|
290
290
|
},
|
|
291
291
|
...ancestorChain.map((ancestor) => ({
|
|
292
292
|
key: `item-${ancestor.id}`,
|
|
293
|
-
label: ancestor.
|
|
293
|
+
label: getArraySchemaForItem(blockDef._internal.contentSchema, ancestor.id, itemsMap)?.title ?? formatFieldName(ancestor.fieldName),
|
|
294
294
|
isCurrent: ancestor.id === currentItemId && !fieldHasOwnView && ancestor.id === ancestorChain[ancestorChain.length - 1]?.id,
|
|
295
295
|
onClick: () => previewStore.send({
|
|
296
296
|
type: "selectItem",
|