camox 0.52.3 → 0.53.1
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 +1 -1
- package/dist/features/canvas/CamoxCanvas.js +103 -83
- package/dist/features/canvas/CanvasPageFrame.js +1 -1
- package/dist/features/canvas/CanvasPreviewPageSlot.js +1 -1
- package/dist/features/canvas/canvasCamera.js +3 -3
- package/dist/features/canvas/sidebar/CanvasInspector.js +4 -159
- package/dist/features/canvas/sidebar/CanvasNavigator.js +41 -85
- package/dist/features/canvas/sidebar/CanvasSidebar.js +54 -32
- package/dist/features/canvas/sidebar/CanvasSidebarFrame.js +4 -3
- package/dist/features/canvas/sidebar/CanvasSidebarSkeleton.js +14 -6
- package/dist/features/canvas/sidebar/CanvasViewHeader.js +50 -0
- package/dist/features/canvas/sidebar/DerivedPageInspector.js +30 -18
- package/dist/features/canvas/sidebar/LayoutPageOverview.js +28 -11
- package/dist/features/canvas/sidebar/LayoutPageSeo.js +356 -0
- package/dist/features/canvas/sidebar/PageInspector.js +118 -80
- package/dist/features/canvas/sidebar/PageOverview.js +6 -1
- package/dist/features/canvas/sidebar/SingletonPageInspector.js +22 -14
- package/dist/features/canvas/useCanvasCamera.js +36 -39
- package/dist/features/preview/CamoxPreview.js +1 -1
- package/dist/features/preview/components/BlockActionsPopover.js +1 -1
- package/dist/features/preview/components/BlockThumbnail.js +1 -1
- package/dist/features/preview/components/CanvasPreview.js +1 -1
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/ItemFieldsEditor.js +1 -1
- package/dist/features/preview/components/OverlayTracker.js +1 -1
- package/dist/features/preview/components/PageInfo.js +345 -228
- package/dist/features/preview/components/PageTree.js +1 -1
- package/dist/features/preview/components/PreviewPanel.js +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +2 -2
- package/dist/features/preview/components/RepeatableItemsList.js +1 -1
- package/dist/features/preview/components/SelectionEditor.js +645 -655
- package/dist/features/preview/components/SidebarStack.js +553 -0
- package/dist/features/preview/components/StudioEditingFallback.js +2 -2
- package/dist/features/renderer/RendererFrames.js +34 -27
- package/dist/features/runtime/RuntimeChrome.js +1 -1
- package/dist/features/runtime/runtime.js +84 -26
- package/dist/features/studio/components/ChatSidebar.js +27 -19
- package/dist/features/studio/components/Navbar.js +1 -1
- package/dist/features/studio/components/UserButton.js +1 -1
- package/dist/lib/studio-reads.js +18 -0
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
|
@@ -10,10 +10,10 @@ import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
|
|
|
10
10
|
import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
|
|
11
11
|
import { Metadata, MetadataRow, formatRelativeTime } from "./Metadata.js";
|
|
12
12
|
import { useLocalizedPath } from "../../../lib/view-locale.js";
|
|
13
|
-
import { PageNicknameField } from "./PageNicknameField.js";
|
|
14
13
|
import { PageInfoSkeleton } from "./PageInfoSkeleton.js";
|
|
15
14
|
import { useRendererAnswer } from "../../renderer/RendererFrames.js";
|
|
16
15
|
import { PageLocationFieldset } from "./PageLocationFieldset.js";
|
|
16
|
+
import { PageNicknameField } from "./PageNicknameField.js";
|
|
17
17
|
import { pageImageUrl } from "../../og/pageImage.js";
|
|
18
18
|
import { ShikiMarkdown } from "./ShikiMarkdown.js";
|
|
19
19
|
import { c } from "react/compiler-runtime";
|
|
@@ -364,25 +364,10 @@ const PageInfo = (t0) => {
|
|
|
364
364
|
let t22;
|
|
365
365
|
if ($[40] !== aboutOnly || $[41] !== pageSettings || $[42] !== setShowPageSettings || $[43] !== settingsPanelId || $[44] !== showPageSettings || $[45] !== showSettingsId) {
|
|
366
366
|
t22 = aboutOnly ? pageSettings : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
variant: "outline",
|
|
372
|
-
className: "w-full",
|
|
373
|
-
onClick: () => setIsSeoSheetOpen(true),
|
|
374
|
-
children: "Manage page metadata"
|
|
375
|
-
})]
|
|
376
|
-
}),
|
|
377
|
-
/* @__PURE__ */ jsxs("div", {
|
|
378
|
-
className: "space-y-2",
|
|
379
|
-
children: [/* @__PURE__ */ jsx(Label, { children: "GEO" }), /* @__PURE__ */ jsx(Button, {
|
|
380
|
-
type: "button",
|
|
381
|
-
variant: "outline",
|
|
382
|
-
className: "w-full",
|
|
383
|
-
onClick: () => setIsMarkdownSheetOpen(true),
|
|
384
|
-
children: "View page markdown"
|
|
385
|
-
})]
|
|
367
|
+
/* @__PURE__ */ jsx(PageDiscoverabilityButtons, {
|
|
368
|
+
metadataLabel: "Manage page metadata",
|
|
369
|
+
onOpenMetadata: () => setIsSeoSheetOpen(true),
|
|
370
|
+
onOpenMarkdown: () => setIsMarkdownSheetOpen(true)
|
|
386
371
|
}),
|
|
387
372
|
/* @__PURE__ */ jsxs("div", {
|
|
388
373
|
className: "flex items-center gap-2",
|
|
@@ -476,6 +461,60 @@ const PageInfo = (t0) => {
|
|
|
476
461
|
} else t26 = $[63];
|
|
477
462
|
return t26;
|
|
478
463
|
};
|
|
464
|
+
/** What opens a page's SEO metadata and its Markdown, which agents read (GEO). */
|
|
465
|
+
const PageDiscoverabilityButtons = (t0) => {
|
|
466
|
+
const $ = c(10);
|
|
467
|
+
const { metadataLabel, onOpenMetadata, onOpenMarkdown } = t0;
|
|
468
|
+
let t1;
|
|
469
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
470
|
+
t1 = /* @__PURE__ */ jsx(Label, { children: "SEO" });
|
|
471
|
+
$[0] = t1;
|
|
472
|
+
} else t1 = $[0];
|
|
473
|
+
let t2;
|
|
474
|
+
if ($[1] !== metadataLabel || $[2] !== onOpenMetadata) {
|
|
475
|
+
t2 = /* @__PURE__ */ jsxs("div", {
|
|
476
|
+
className: "space-y-2",
|
|
477
|
+
children: [t1, /* @__PURE__ */ jsx(Button, {
|
|
478
|
+
type: "button",
|
|
479
|
+
variant: "outline",
|
|
480
|
+
className: "w-full",
|
|
481
|
+
onClick: onOpenMetadata,
|
|
482
|
+
children: metadataLabel
|
|
483
|
+
})]
|
|
484
|
+
});
|
|
485
|
+
$[1] = metadataLabel;
|
|
486
|
+
$[2] = onOpenMetadata;
|
|
487
|
+
$[3] = t2;
|
|
488
|
+
} else t2 = $[3];
|
|
489
|
+
let t3;
|
|
490
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
491
|
+
t3 = /* @__PURE__ */ jsx(Label, { children: "GEO" });
|
|
492
|
+
$[4] = t3;
|
|
493
|
+
} else t3 = $[4];
|
|
494
|
+
let t4;
|
|
495
|
+
if ($[5] !== onOpenMarkdown) {
|
|
496
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
497
|
+
className: "space-y-2",
|
|
498
|
+
children: [t3, /* @__PURE__ */ jsx(Button, {
|
|
499
|
+
type: "button",
|
|
500
|
+
variant: "outline",
|
|
501
|
+
className: "w-full",
|
|
502
|
+
onClick: onOpenMarkdown,
|
|
503
|
+
children: "View page markdown"
|
|
504
|
+
})]
|
|
505
|
+
});
|
|
506
|
+
$[5] = onOpenMarkdown;
|
|
507
|
+
$[6] = t4;
|
|
508
|
+
} else t4 = $[6];
|
|
509
|
+
let t5;
|
|
510
|
+
if ($[7] !== t2 || $[8] !== t4) {
|
|
511
|
+
t5 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t4] });
|
|
512
|
+
$[7] = t2;
|
|
513
|
+
$[8] = t4;
|
|
514
|
+
$[9] = t5;
|
|
515
|
+
} else t5 = $[9];
|
|
516
|
+
return t5;
|
|
517
|
+
};
|
|
479
518
|
const PageDeleteButton = ({ page }) => {
|
|
480
519
|
const [isConfirmOpen, setIsConfirmOpen] = React.useState(false);
|
|
481
520
|
const deletePage = useMutation(pageMutations.delete());
|
|
@@ -973,27 +1012,51 @@ const PageStructureEditor = (t0) => {
|
|
|
973
1012
|
return t19;
|
|
974
1013
|
};
|
|
975
1014
|
const PageSeoSheet = (t0) => {
|
|
976
|
-
const $ = c(
|
|
1015
|
+
const $ = c(6);
|
|
977
1016
|
const { open, onOpenChange, pageId } = t0;
|
|
978
1017
|
let t1;
|
|
1018
|
+
if ($[0] !== pageId) {
|
|
1019
|
+
t1 = /* @__PURE__ */ jsx(PageSeoContent, { pageId });
|
|
1020
|
+
$[0] = pageId;
|
|
1021
|
+
$[1] = t1;
|
|
1022
|
+
} else t1 = $[1];
|
|
1023
|
+
let t2;
|
|
1024
|
+
if ($[2] !== onOpenChange || $[3] !== open || $[4] !== t1) {
|
|
1025
|
+
t2 = /* @__PURE__ */ jsx(PageSeoSheetFrame, {
|
|
1026
|
+
open,
|
|
1027
|
+
onOpenChange,
|
|
1028
|
+
children: t1
|
|
1029
|
+
});
|
|
1030
|
+
$[2] = onOpenChange;
|
|
1031
|
+
$[3] = open;
|
|
1032
|
+
$[4] = t1;
|
|
1033
|
+
$[5] = t2;
|
|
1034
|
+
} else t2 = $[5];
|
|
1035
|
+
return t2;
|
|
1036
|
+
};
|
|
1037
|
+
/** The sheet a page's SEO metadata opens in, whoever writes it. */
|
|
1038
|
+
const PageSeoSheetFrame = (t0) => {
|
|
1039
|
+
const $ = c(7);
|
|
1040
|
+
const { open, onOpenChange, children } = t0;
|
|
1041
|
+
let t1;
|
|
979
1042
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
980
1043
|
t1 = /* @__PURE__ */ jsxs(SheetHeader, {
|
|
981
1044
|
className: "border-b",
|
|
982
|
-
children: [/* @__PURE__ */ jsx(SheetTitle, { children: "SEO metadata" }), /* @__PURE__ */ jsx(SheetDescription, { children: "
|
|
1045
|
+
children: [/* @__PURE__ */ jsx(SheetTitle, { children: "SEO metadata" }), /* @__PURE__ */ jsx(SheetDescription, { children: "How this page appears in search and social previews." })]
|
|
983
1046
|
});
|
|
984
1047
|
$[0] = t1;
|
|
985
1048
|
} else t1 = $[0];
|
|
986
1049
|
let t2;
|
|
987
|
-
if ($[1] !==
|
|
1050
|
+
if ($[1] !== children) {
|
|
988
1051
|
t2 = /* @__PURE__ */ jsxs(SheetContent, {
|
|
989
1052
|
side: "right",
|
|
990
1053
|
className: "gap-0 data-[side=right]:sm:max-w-xl",
|
|
991
1054
|
children: [t1, /* @__PURE__ */ jsx("div", {
|
|
992
1055
|
className: "flex-1 overflow-y-auto p-4",
|
|
993
|
-
children
|
|
1056
|
+
children
|
|
994
1057
|
})]
|
|
995
1058
|
});
|
|
996
|
-
$[1] =
|
|
1059
|
+
$[1] = children;
|
|
997
1060
|
$[2] = t2;
|
|
998
1061
|
} else t2 = $[2];
|
|
999
1062
|
let t3;
|
|
@@ -1030,7 +1093,7 @@ const PageSeoContent = (t0) => {
|
|
|
1030
1093
|
return t1;
|
|
1031
1094
|
};
|
|
1032
1095
|
const PageSeoEditor = (t0) => {
|
|
1033
|
-
const $ = c(
|
|
1096
|
+
const $ = c(41);
|
|
1034
1097
|
const { page, metaTitle } = t0;
|
|
1035
1098
|
let t1;
|
|
1036
1099
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -1038,6 +1101,7 @@ const PageSeoEditor = (t0) => {
|
|
|
1038
1101
|
$[0] = t1;
|
|
1039
1102
|
} else t1 = $[0];
|
|
1040
1103
|
const setSeo = useMutation(t1);
|
|
1104
|
+
const localized = useLocalizedPath();
|
|
1041
1105
|
let t2;
|
|
1042
1106
|
if ($[1] !== page.id || $[2] !== setSeo) {
|
|
1043
1107
|
t2 = (checked) => {
|
|
@@ -1129,57 +1193,94 @@ const PageSeoEditor = (t0) => {
|
|
|
1129
1193
|
$[22] = t9;
|
|
1130
1194
|
$[23] = t11;
|
|
1131
1195
|
} else t11 = $[23];
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
metaTitle,
|
|
1138
|
-
metaDescription: t12
|
|
1139
|
-
});
|
|
1140
|
-
$[24] = metaTitle;
|
|
1141
|
-
$[25] = page;
|
|
1196
|
+
let t12;
|
|
1197
|
+
if ($[24] !== localized || $[25] !== page.fullPath) {
|
|
1198
|
+
t12 = localized(page.fullPath);
|
|
1199
|
+
$[24] = localized;
|
|
1200
|
+
$[25] = page.fullPath;
|
|
1142
1201
|
$[26] = t12;
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
page,
|
|
1202
|
+
} else t12 = $[26];
|
|
1203
|
+
const t13 = page.metaDescription ?? "";
|
|
1204
|
+
let t14;
|
|
1205
|
+
if ($[27] !== metaTitle || $[28] !== t12 || $[29] !== t13) {
|
|
1206
|
+
t14 = /* @__PURE__ */ jsx(SearchEnginePreview, {
|
|
1207
|
+
path: t12,
|
|
1150
1208
|
metaTitle,
|
|
1151
|
-
metaDescription:
|
|
1209
|
+
metaDescription: t13
|
|
1152
1210
|
});
|
|
1153
|
-
$[
|
|
1154
|
-
$[
|
|
1211
|
+
$[27] = metaTitle;
|
|
1212
|
+
$[28] = t12;
|
|
1213
|
+
$[29] = t13;
|
|
1155
1214
|
$[30] = t14;
|
|
1156
|
-
|
|
1157
|
-
|
|
1215
|
+
} else t14 = $[30];
|
|
1216
|
+
const t15 = page.metaDescription ?? "";
|
|
1158
1217
|
let t16;
|
|
1159
|
-
if ($[
|
|
1160
|
-
t16 = /* @__PURE__ */
|
|
1218
|
+
if ($[31] !== metaTitle || $[32] !== page || $[33] !== t15) {
|
|
1219
|
+
t16 = /* @__PURE__ */ jsx(SocialPreviewSection, {
|
|
1220
|
+
page,
|
|
1221
|
+
metaTitle,
|
|
1222
|
+
metaDescription: t15
|
|
1223
|
+
});
|
|
1224
|
+
$[31] = metaTitle;
|
|
1225
|
+
$[32] = page;
|
|
1226
|
+
$[33] = t15;
|
|
1227
|
+
$[34] = t16;
|
|
1228
|
+
} else t16 = $[34];
|
|
1229
|
+
let t17;
|
|
1230
|
+
if ($[35] !== t11 || $[36] !== t14 || $[37] !== t16 || $[38] !== t5 || $[39] !== t8) {
|
|
1231
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
1161
1232
|
className: "space-y-4",
|
|
1162
1233
|
children: [
|
|
1163
1234
|
t5,
|
|
1164
1235
|
t8,
|
|
1165
1236
|
t11,
|
|
1166
|
-
|
|
1167
|
-
|
|
1237
|
+
t14,
|
|
1238
|
+
t16
|
|
1168
1239
|
]
|
|
1169
1240
|
});
|
|
1170
|
-
$[
|
|
1171
|
-
$[
|
|
1172
|
-
$[34] = t15;
|
|
1173
|
-
$[35] = t5;
|
|
1174
|
-
$[36] = t8;
|
|
1241
|
+
$[35] = t11;
|
|
1242
|
+
$[36] = t14;
|
|
1175
1243
|
$[37] = t16;
|
|
1176
|
-
|
|
1177
|
-
|
|
1244
|
+
$[38] = t5;
|
|
1245
|
+
$[39] = t8;
|
|
1246
|
+
$[40] = t17;
|
|
1247
|
+
} else t17 = $[40];
|
|
1248
|
+
return t17;
|
|
1178
1249
|
};
|
|
1179
1250
|
const PageMarkdownSheet = (t0) => {
|
|
1180
|
-
const $ = c(
|
|
1251
|
+
const $ = c(8);
|
|
1181
1252
|
const { open, onOpenChange, pageId, metaTitle, metaDescription } = t0;
|
|
1182
1253
|
let t1;
|
|
1254
|
+
if ($[0] !== metaDescription || $[1] !== metaTitle || $[2] !== pageId) {
|
|
1255
|
+
t1 = /* @__PURE__ */ jsx(PageMarkdownPreview, {
|
|
1256
|
+
pageId,
|
|
1257
|
+
metaTitle,
|
|
1258
|
+
metaDescription
|
|
1259
|
+
});
|
|
1260
|
+
$[0] = metaDescription;
|
|
1261
|
+
$[1] = metaTitle;
|
|
1262
|
+
$[2] = pageId;
|
|
1263
|
+
$[3] = t1;
|
|
1264
|
+
} else t1 = $[3];
|
|
1265
|
+
let t2;
|
|
1266
|
+
if ($[4] !== onOpenChange || $[5] !== open || $[6] !== t1) {
|
|
1267
|
+
t2 = /* @__PURE__ */ jsx(PageMarkdownSheetFrame, {
|
|
1268
|
+
open,
|
|
1269
|
+
onOpenChange,
|
|
1270
|
+
children: t1
|
|
1271
|
+
});
|
|
1272
|
+
$[4] = onOpenChange;
|
|
1273
|
+
$[5] = open;
|
|
1274
|
+
$[6] = t1;
|
|
1275
|
+
$[7] = t2;
|
|
1276
|
+
} else t2 = $[7];
|
|
1277
|
+
return t2;
|
|
1278
|
+
};
|
|
1279
|
+
/** The sheet a page's Markdown Representation opens in. */
|
|
1280
|
+
const PageMarkdownSheetFrame = (t0) => {
|
|
1281
|
+
const $ = c(7);
|
|
1282
|
+
const { open, onOpenChange, children } = t0;
|
|
1283
|
+
let t1;
|
|
1183
1284
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1184
1285
|
t1 = /* @__PURE__ */ jsxs(SheetHeader, {
|
|
1185
1286
|
className: "border-b",
|
|
@@ -1188,36 +1289,30 @@ const PageMarkdownSheet = (t0) => {
|
|
|
1188
1289
|
$[0] = t1;
|
|
1189
1290
|
} else t1 = $[0];
|
|
1190
1291
|
let t2;
|
|
1191
|
-
if ($[1] !==
|
|
1292
|
+
if ($[1] !== children) {
|
|
1192
1293
|
t2 = /* @__PURE__ */ jsxs(SheetContent, {
|
|
1193
1294
|
side: "right",
|
|
1194
1295
|
className: "gap-0 data-[side=right]:sm:max-w-2xl",
|
|
1195
1296
|
children: [t1, /* @__PURE__ */ jsx("div", {
|
|
1196
1297
|
className: "flex-1 overflow-y-auto p-4",
|
|
1197
|
-
children
|
|
1198
|
-
pageId,
|
|
1199
|
-
metaTitle,
|
|
1200
|
-
metaDescription
|
|
1201
|
-
})
|
|
1298
|
+
children
|
|
1202
1299
|
})]
|
|
1203
1300
|
});
|
|
1204
|
-
$[1] =
|
|
1205
|
-
$[2] =
|
|
1206
|
-
|
|
1207
|
-
$[4] = t2;
|
|
1208
|
-
} else t2 = $[4];
|
|
1301
|
+
$[1] = children;
|
|
1302
|
+
$[2] = t2;
|
|
1303
|
+
} else t2 = $[2];
|
|
1209
1304
|
let t3;
|
|
1210
|
-
if ($[
|
|
1305
|
+
if ($[3] !== onOpenChange || $[4] !== open || $[5] !== t2) {
|
|
1211
1306
|
t3 = /* @__PURE__ */ jsx(Sheet, {
|
|
1212
1307
|
open,
|
|
1213
1308
|
onOpenChange,
|
|
1214
1309
|
children: t2
|
|
1215
1310
|
});
|
|
1216
|
-
$[
|
|
1217
|
-
$[
|
|
1218
|
-
$[
|
|
1219
|
-
$[
|
|
1220
|
-
} else t3 = $[
|
|
1311
|
+
$[3] = onOpenChange;
|
|
1312
|
+
$[4] = open;
|
|
1313
|
+
$[5] = t2;
|
|
1314
|
+
$[6] = t3;
|
|
1315
|
+
} else t3 = $[6];
|
|
1221
1316
|
return t3;
|
|
1222
1317
|
};
|
|
1223
1318
|
const PageMarkdownContent = (t0) => {
|
|
@@ -1252,97 +1347,88 @@ function truncateText(text, maxLen) {
|
|
|
1252
1347
|
return text.slice(0, maxLen) + "...";
|
|
1253
1348
|
}
|
|
1254
1349
|
const SearchEnginePreview = (t0) => {
|
|
1255
|
-
const $ = c(
|
|
1256
|
-
const {
|
|
1257
|
-
const
|
|
1258
|
-
const origin = typeof window !== "undefined" ? window.location.origin : "";
|
|
1350
|
+
const $ = c(16);
|
|
1351
|
+
const { path, metaTitle, metaDescription } = t0;
|
|
1352
|
+
const url = `${typeof window !== "undefined" ? window.location.origin : ""}${path}`;
|
|
1259
1353
|
let t1;
|
|
1260
|
-
if ($[0]
|
|
1261
|
-
t1 =
|
|
1262
|
-
$[0] =
|
|
1263
|
-
|
|
1264
|
-
$[2] = t1;
|
|
1265
|
-
} else t1 = $[2];
|
|
1266
|
-
const url = `${origin}${t1}`;
|
|
1354
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1355
|
+
t1 = /* @__PURE__ */ jsx(Label, { children: "Search engine preview" });
|
|
1356
|
+
$[0] = t1;
|
|
1357
|
+
} else t1 = $[0];
|
|
1267
1358
|
let t2;
|
|
1268
|
-
if ($[
|
|
1269
|
-
t2 = /* @__PURE__ */
|
|
1270
|
-
$[3] = t2;
|
|
1271
|
-
} else t2 = $[3];
|
|
1272
|
-
let t3;
|
|
1273
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1274
|
-
t3 = /* @__PURE__ */ jsxs("div", {
|
|
1359
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1360
|
+
t2 = /* @__PURE__ */ jsxs("div", {
|
|
1275
1361
|
className: "flex items-center gap-1.5",
|
|
1276
|
-
children: [
|
|
1362
|
+
children: [t1, /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
1277
1363
|
delay: 50,
|
|
1278
1364
|
render: /* @__PURE__ */ jsx(Info, { className: "text-muted-foreground size-3.5" })
|
|
1279
1365
|
}), /* @__PURE__ */ jsx(TooltipContent, { children: "Titles are cropped after 60 characters and descriptions after 155, like on Google Search results." })] })]
|
|
1280
1366
|
});
|
|
1281
|
-
$[
|
|
1282
|
-
} else
|
|
1283
|
-
let
|
|
1284
|
-
if ($[
|
|
1285
|
-
|
|
1367
|
+
$[1] = t2;
|
|
1368
|
+
} else t2 = $[1];
|
|
1369
|
+
let t3;
|
|
1370
|
+
if ($[2] !== url) {
|
|
1371
|
+
t3 = /* @__PURE__ */ jsx("p", {
|
|
1286
1372
|
className: "text-muted-foreground truncate text-xs",
|
|
1287
1373
|
children: url
|
|
1288
1374
|
});
|
|
1289
|
-
$[
|
|
1290
|
-
$[
|
|
1291
|
-
} else
|
|
1292
|
-
const
|
|
1375
|
+
$[2] = url;
|
|
1376
|
+
$[3] = t3;
|
|
1377
|
+
} else t3 = $[3];
|
|
1378
|
+
const t4 = metaTitle || "Untitled";
|
|
1379
|
+
let t5;
|
|
1380
|
+
if ($[4] !== t4) {
|
|
1381
|
+
t5 = truncateText(t4, 60);
|
|
1382
|
+
$[4] = t4;
|
|
1383
|
+
$[5] = t5;
|
|
1384
|
+
} else t5 = $[5];
|
|
1293
1385
|
let t6;
|
|
1294
|
-
if ($[
|
|
1295
|
-
t6 =
|
|
1296
|
-
$[7] = t5;
|
|
1297
|
-
$[8] = t6;
|
|
1298
|
-
} else t6 = $[8];
|
|
1299
|
-
let t7;
|
|
1300
|
-
if ($[9] !== t6) {
|
|
1301
|
-
t7 = /* @__PURE__ */ jsx("p", {
|
|
1386
|
+
if ($[6] !== t5) {
|
|
1387
|
+
t6 = /* @__PURE__ */ jsx("p", {
|
|
1302
1388
|
className: "text-base font-medium text-blue-600 dark:text-blue-400",
|
|
1303
|
-
children:
|
|
1389
|
+
children: t5
|
|
1304
1390
|
});
|
|
1305
|
-
$[
|
|
1306
|
-
$[
|
|
1307
|
-
} else
|
|
1308
|
-
const
|
|
1391
|
+
$[6] = t5;
|
|
1392
|
+
$[7] = t6;
|
|
1393
|
+
} else t6 = $[7];
|
|
1394
|
+
const t7 = metaDescription || "No description";
|
|
1395
|
+
let t8;
|
|
1396
|
+
if ($[8] !== t7) {
|
|
1397
|
+
t8 = truncateText(t7, 155);
|
|
1398
|
+
$[8] = t7;
|
|
1399
|
+
$[9] = t8;
|
|
1400
|
+
} else t8 = $[9];
|
|
1309
1401
|
let t9;
|
|
1310
|
-
if ($[
|
|
1311
|
-
t9 =
|
|
1312
|
-
$[11] = t8;
|
|
1313
|
-
$[12] = t9;
|
|
1314
|
-
} else t9 = $[12];
|
|
1315
|
-
let t10;
|
|
1316
|
-
if ($[13] !== t9) {
|
|
1317
|
-
t10 = /* @__PURE__ */ jsx("p", {
|
|
1402
|
+
if ($[10] !== t8) {
|
|
1403
|
+
t9 = /* @__PURE__ */ jsx("p", {
|
|
1318
1404
|
className: "text-muted-foreground line-clamp-2 text-xs",
|
|
1319
|
-
children:
|
|
1405
|
+
children: t8
|
|
1320
1406
|
});
|
|
1321
|
-
$[
|
|
1322
|
-
$[
|
|
1323
|
-
} else
|
|
1324
|
-
let
|
|
1325
|
-
if ($[
|
|
1326
|
-
|
|
1407
|
+
$[10] = t8;
|
|
1408
|
+
$[11] = t9;
|
|
1409
|
+
} else t9 = $[11];
|
|
1410
|
+
let t10;
|
|
1411
|
+
if ($[12] !== t3 || $[13] !== t6 || $[14] !== t9) {
|
|
1412
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
1327
1413
|
className: "space-y-1 pt-2",
|
|
1328
|
-
children: [
|
|
1414
|
+
children: [t2, /* @__PURE__ */ jsxs("div", {
|
|
1329
1415
|
className: "border-border space-y-0.5 rounded-lg border p-3",
|
|
1330
1416
|
children: [
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1417
|
+
t3,
|
|
1418
|
+
t6,
|
|
1419
|
+
t9
|
|
1334
1420
|
]
|
|
1335
1421
|
})]
|
|
1336
1422
|
});
|
|
1423
|
+
$[12] = t3;
|
|
1424
|
+
$[13] = t6;
|
|
1425
|
+
$[14] = t9;
|
|
1337
1426
|
$[15] = t10;
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
$[18] = t11;
|
|
1341
|
-
} else t11 = $[18];
|
|
1342
|
-
return t11;
|
|
1427
|
+
} else t10 = $[15];
|
|
1428
|
+
return t10;
|
|
1343
1429
|
};
|
|
1344
1430
|
const SocialPreviewSection = (t0) => {
|
|
1345
|
-
const $ = c(
|
|
1431
|
+
const $ = c(60);
|
|
1346
1432
|
const { page, metaTitle, metaDescription } = t0;
|
|
1347
1433
|
const studioCache = useStudioCache();
|
|
1348
1434
|
const localized = useLocalizedPath();
|
|
@@ -1529,114 +1615,145 @@ const SocialPreviewSection = (t0) => {
|
|
|
1529
1615
|
} else t17 = $[45];
|
|
1530
1616
|
const t18 = hasCustomImage ? "Drop image to replace" : "Drop image to upload";
|
|
1531
1617
|
let t19;
|
|
1532
|
-
if ($[46]
|
|
1533
|
-
t19 = {
|
|
1534
|
-
$[46] =
|
|
1535
|
-
|
|
1618
|
+
if ($[46] !== ogImage) {
|
|
1619
|
+
t19 = /* @__PURE__ */ jsx(SocialPreviewImage, { src: ogImage });
|
|
1620
|
+
$[46] = ogImage;
|
|
1621
|
+
$[47] = t19;
|
|
1622
|
+
} else t19 = $[47];
|
|
1536
1623
|
let t20;
|
|
1537
|
-
if ($[
|
|
1538
|
-
t20 = /* @__PURE__ */ jsx(
|
|
1539
|
-
src: ogImage,
|
|
1540
|
-
alt: "",
|
|
1541
|
-
className: "w-full object-cover",
|
|
1542
|
-
style: t19
|
|
1543
|
-
});
|
|
1544
|
-
$[47] = ogImage;
|
|
1545
|
-
$[48] = t20;
|
|
1546
|
-
} else t20 = $[48];
|
|
1547
|
-
let t21;
|
|
1548
|
-
if ($[49] !== handleFiles || $[50] !== t18 || $[51] !== t20) {
|
|
1549
|
-
t21 = /* @__PURE__ */ jsx(UploadDropZone, {
|
|
1624
|
+
if ($[48] !== handleFiles || $[49] !== t18 || $[50] !== t19) {
|
|
1625
|
+
t20 = /* @__PURE__ */ jsx(UploadDropZone, {
|
|
1550
1626
|
onDrop: handleFiles,
|
|
1551
1627
|
label: t18,
|
|
1552
1628
|
className: "block",
|
|
1553
|
-
children:
|
|
1629
|
+
children: t19
|
|
1554
1630
|
});
|
|
1555
|
-
$[
|
|
1556
|
-
$[
|
|
1631
|
+
$[48] = handleFiles;
|
|
1632
|
+
$[49] = t18;
|
|
1633
|
+
$[50] = t19;
|
|
1557
1634
|
$[51] = t20;
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1635
|
+
} else t20 = $[51];
|
|
1636
|
+
let t21;
|
|
1637
|
+
if ($[52] !== metaDescription || $[53] !== metaTitle || $[54] !== t20 || $[55] !== url) {
|
|
1638
|
+
t21 = /* @__PURE__ */ jsx(SocialPreviewCard, {
|
|
1639
|
+
image: t20,
|
|
1640
|
+
metaTitle,
|
|
1641
|
+
metaDescription,
|
|
1642
|
+
url
|
|
1643
|
+
});
|
|
1644
|
+
$[52] = metaDescription;
|
|
1645
|
+
$[53] = metaTitle;
|
|
1646
|
+
$[54] = t20;
|
|
1647
|
+
$[55] = url;
|
|
1648
|
+
$[56] = t21;
|
|
1649
|
+
} else t21 = $[56];
|
|
1650
|
+
let t22;
|
|
1651
|
+
if ($[57] !== t17 || $[58] !== t21) {
|
|
1652
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
1653
|
+
className: "space-y-2 pt-2",
|
|
1654
|
+
children: [
|
|
1655
|
+
t10,
|
|
1656
|
+
t17,
|
|
1657
|
+
t21
|
|
1658
|
+
]
|
|
1659
|
+
});
|
|
1660
|
+
$[57] = t17;
|
|
1661
|
+
$[58] = t21;
|
|
1662
|
+
$[59] = t22;
|
|
1663
|
+
} else t22 = $[59];
|
|
1664
|
+
return t22;
|
|
1665
|
+
};
|
|
1666
|
+
const SocialPreviewImage = (t0) => {
|
|
1667
|
+
const $ = c(3);
|
|
1668
|
+
const { src } = t0;
|
|
1669
|
+
let t1;
|
|
1670
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1671
|
+
t1 = { aspectRatio: "1200 / 630" };
|
|
1672
|
+
$[0] = t1;
|
|
1673
|
+
} else t1 = $[0];
|
|
1674
|
+
let t2;
|
|
1675
|
+
if ($[1] !== src) {
|
|
1676
|
+
t2 = /* @__PURE__ */ jsx("img", {
|
|
1677
|
+
src,
|
|
1678
|
+
alt: "",
|
|
1679
|
+
className: "w-full object-cover",
|
|
1680
|
+
style: t1
|
|
1681
|
+
});
|
|
1682
|
+
$[1] = src;
|
|
1683
|
+
$[2] = t2;
|
|
1684
|
+
} else t2 = $[2];
|
|
1685
|
+
return t2;
|
|
1686
|
+
};
|
|
1687
|
+
/** How a page shows when shared: its image, title, description and URL. */
|
|
1688
|
+
const SocialPreviewCard = (t0) => {
|
|
1689
|
+
const $ = c(14);
|
|
1690
|
+
const { image, metaTitle, metaDescription, url } = t0;
|
|
1691
|
+
const t1 = metaTitle || "Untitled";
|
|
1692
|
+
let t2;
|
|
1693
|
+
if ($[0] !== t1) {
|
|
1694
|
+
t2 = /* @__PURE__ */ jsx("p", {
|
|
1564
1695
|
className: "text-foreground truncate text-sm font-semibold",
|
|
1565
|
-
children:
|
|
1696
|
+
children: t1
|
|
1566
1697
|
});
|
|
1567
|
-
$[
|
|
1568
|
-
$[
|
|
1569
|
-
} else
|
|
1570
|
-
const
|
|
1571
|
-
let
|
|
1572
|
-
if ($[
|
|
1573
|
-
|
|
1698
|
+
$[0] = t1;
|
|
1699
|
+
$[1] = t2;
|
|
1700
|
+
} else t2 = $[1];
|
|
1701
|
+
const t3 = metaDescription || "No description";
|
|
1702
|
+
let t4;
|
|
1703
|
+
if ($[2] !== t3) {
|
|
1704
|
+
t4 = /* @__PURE__ */ jsx("p", {
|
|
1574
1705
|
className: "text-muted-foreground line-clamp-2 text-xs",
|
|
1575
|
-
children:
|
|
1706
|
+
children: t3
|
|
1576
1707
|
});
|
|
1577
|
-
$[
|
|
1578
|
-
$[
|
|
1579
|
-
} else
|
|
1580
|
-
let
|
|
1581
|
-
if ($[
|
|
1582
|
-
|
|
1583
|
-
$[
|
|
1584
|
-
} else
|
|
1585
|
-
let
|
|
1586
|
-
if ($[
|
|
1587
|
-
|
|
1708
|
+
$[2] = t3;
|
|
1709
|
+
$[3] = t4;
|
|
1710
|
+
} else t4 = $[3];
|
|
1711
|
+
let t5;
|
|
1712
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1713
|
+
t5 = /* @__PURE__ */ jsx(Globe, { className: "size-3 shrink-0" });
|
|
1714
|
+
$[4] = t5;
|
|
1715
|
+
} else t5 = $[4];
|
|
1716
|
+
let t6;
|
|
1717
|
+
if ($[5] !== url) {
|
|
1718
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
1588
1719
|
className: "pt-1.5",
|
|
1589
1720
|
children: /* @__PURE__ */ jsxs("p", {
|
|
1590
1721
|
className: "text-muted-foreground flex items-center gap-1 text-xs",
|
|
1591
|
-
children: [
|
|
1722
|
+
children: [t5, /* @__PURE__ */ jsx("span", {
|
|
1592
1723
|
className: "truncate",
|
|
1593
1724
|
children: url
|
|
1594
1725
|
})]
|
|
1595
1726
|
})
|
|
1596
1727
|
});
|
|
1597
|
-
$[
|
|
1598
|
-
$[
|
|
1599
|
-
} else
|
|
1600
|
-
let
|
|
1601
|
-
if ($[
|
|
1602
|
-
|
|
1728
|
+
$[5] = url;
|
|
1729
|
+
$[6] = t6;
|
|
1730
|
+
} else t6 = $[6];
|
|
1731
|
+
let t7;
|
|
1732
|
+
if ($[7] !== t2 || $[8] !== t4 || $[9] !== t6) {
|
|
1733
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
1603
1734
|
className: "space-y-1.5 border-t px-3 py-2.5",
|
|
1604
1735
|
children: [
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1736
|
+
t2,
|
|
1737
|
+
t4,
|
|
1738
|
+
t6
|
|
1608
1739
|
]
|
|
1609
1740
|
});
|
|
1610
|
-
$[
|
|
1611
|
-
$[
|
|
1612
|
-
$[
|
|
1613
|
-
$[
|
|
1614
|
-
} else
|
|
1615
|
-
let
|
|
1616
|
-
if ($[
|
|
1617
|
-
|
|
1741
|
+
$[7] = t2;
|
|
1742
|
+
$[8] = t4;
|
|
1743
|
+
$[9] = t6;
|
|
1744
|
+
$[10] = t7;
|
|
1745
|
+
} else t7 = $[10];
|
|
1746
|
+
let t8;
|
|
1747
|
+
if ($[11] !== image || $[12] !== t7) {
|
|
1748
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
1618
1749
|
className: "border-border max-w-xl overflow-hidden rounded-lg border",
|
|
1619
|
-
children: [
|
|
1620
|
-
});
|
|
1621
|
-
$[64] = t21;
|
|
1622
|
-
$[65] = t28;
|
|
1623
|
-
$[66] = t29;
|
|
1624
|
-
} else t29 = $[66];
|
|
1625
|
-
let t30;
|
|
1626
|
-
if ($[67] !== t17 || $[68] !== t29) {
|
|
1627
|
-
t30 = /* @__PURE__ */ jsxs("div", {
|
|
1628
|
-
className: "space-y-2 pt-2",
|
|
1629
|
-
children: [
|
|
1630
|
-
t10,
|
|
1631
|
-
t17,
|
|
1632
|
-
t29
|
|
1633
|
-
]
|
|
1750
|
+
children: [image, t7]
|
|
1634
1751
|
});
|
|
1635
|
-
$[
|
|
1636
|
-
$[
|
|
1637
|
-
$[
|
|
1638
|
-
} else
|
|
1639
|
-
return
|
|
1752
|
+
$[11] = image;
|
|
1753
|
+
$[12] = t7;
|
|
1754
|
+
$[13] = t8;
|
|
1755
|
+
} else t8 = $[13];
|
|
1756
|
+
return t8;
|
|
1640
1757
|
};
|
|
1641
1758
|
const PageMarkdownPreview = (t0) => {
|
|
1642
1759
|
const $ = c(8);
|
|
@@ -1760,4 +1877,4 @@ function _temp14() {
|
|
|
1760
1877
|
}
|
|
1761
1878
|
|
|
1762
1879
|
//#endregion
|
|
1763
|
-
export { PageInfo, PageMarkdownContent, PageSeoContent };
|
|
1880
|
+
export { PageDiscoverabilityButtons, PageInfo, PageMarkdownContent, PageMarkdownSheetFrame, PageSeoContent, PageSeoSheetFrame, SearchEnginePreview, SocialPreviewCard, SocialPreviewImage };
|