camox 0.48.0 → 0.52.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.
Files changed (127) hide show
  1. package/dist/core/createApp.d.ts +1 -0
  2. package/dist/core/createApp.js +1 -0
  3. package/dist/core/editing/contentEdits.js +78 -0
  4. package/dist/core/editing/createEditableBlock.js +277 -311
  5. package/dist/core/layoutContext.d.ts +1 -0
  6. package/dist/core/lib/contentType.js +2 -2
  7. package/dist/core/recordItem.js +3 -3
  8. package/dist/features/canvas/CamoxCanvas.js +15 -15
  9. package/dist/features/canvas/CanvasLoadingScreen.js +15 -11
  10. package/dist/features/canvas/CanvasPageFrame.js +81 -87
  11. package/dist/features/canvas/CanvasPreviewPageSlot.js +1 -1
  12. package/dist/features/canvas/DerivedPagePathInput.js +12 -12
  13. package/dist/features/canvas/canvasOverlayGeometry.js +1 -1
  14. package/dist/features/canvas/canvasStore.js +2 -2
  15. package/dist/features/canvas/sidebar/CanvasInspector.js +1 -1
  16. package/dist/features/canvas/sidebar/CuratedPageInspector.js +1 -1
  17. package/dist/features/canvas/sidebar/LayoutPageBlocks.js +23 -31
  18. package/dist/features/canvas/useCanvasCamera.js +1 -1
  19. package/dist/features/canvas/useDiscoveredPreviewPaths.js +16 -9
  20. package/dist/features/content/ContentAssets.js +84 -88
  21. package/dist/features/page/CuratedPageContent.js +1 -1
  22. package/dist/features/preview/CamoxPreview.d.ts +8 -4
  23. package/dist/features/preview/CamoxPreview.js +258 -443
  24. package/dist/features/preview/EditablePageContent.js +244 -2
  25. package/dist/features/preview/EditablePageExperience.js +19 -13
  26. package/dist/features/preview/components/AddBlockSheet.js +55 -15
  27. package/dist/features/preview/components/BlockActionsPopover.js +23 -51
  28. package/dist/features/preview/components/BlockPeek.js +66 -0
  29. package/dist/features/preview/components/BlockThumbnail.js +134 -119
  30. package/dist/features/preview/components/CanvasPreview.js +1 -1
  31. package/dist/features/preview/components/CreatePageModal.js +150 -156
  32. package/dist/features/preview/components/FieldToolbar.js +1 -1
  33. package/dist/features/preview/components/Frame.js +27 -4
  34. package/dist/features/preview/components/MobilePreviewDrawer.js +6 -9
  35. package/dist/features/preview/components/PageInfo.js +161 -126
  36. package/dist/features/preview/components/PagePicker.js +2 -2
  37. package/dist/features/preview/components/PageTree.js +174 -190
  38. package/dist/features/preview/components/PreviewPanel.js +13 -67
  39. package/dist/features/preview/components/PreviewToolbar.js +1 -1
  40. package/dist/features/preview/components/ReferenceFieldEditor.js +4 -4
  41. package/dist/features/preview/components/ReferenceListFieldEditor.js +4 -4
  42. package/dist/features/preview/components/RemovedBlockPlaceholder.js +37 -70
  43. package/dist/features/preview/components/RepeatableItemsList.js +1 -1
  44. package/dist/features/preview/components/SelectionEditor.js +248 -256
  45. package/dist/features/preview/components/StudioEditingFallback.js +22 -26
  46. package/dist/features/preview/components/useFieldWriter.js +19 -19
  47. package/dist/features/preview/components/useRecordView.js +105 -147
  48. package/dist/features/preview/components/useRepeatableItemActions.js +0 -2
  49. package/dist/features/preview/pageRecord.js +30 -24
  50. package/dist/features/preview/previewConstants.js +2 -8
  51. package/dist/features/preview/previewStore.js +2 -0
  52. package/dist/features/preview/studioNotice.js +20 -0
  53. package/dist/features/preview/usePreviewViewportActions.js +1 -1
  54. package/dist/features/provider/AuthenticatedCamoxProvider.js +47 -31
  55. package/dist/features/provider/components/CommandPalette.js +2 -5
  56. package/dist/features/provider/signInShortcut.js +1 -2
  57. package/dist/features/provider/useAdminShortcuts.js +47 -53
  58. package/dist/features/renderer/RendererApp.js +542 -0
  59. package/dist/features/renderer/RendererFrames.js +450 -0
  60. package/dist/features/renderer/definitionAnswers.js +26 -0
  61. package/dist/features/renderer/protocol.js +35 -0
  62. package/dist/features/renderer/rendererHost.js +249 -0
  63. package/dist/features/renderer/studioConnection.js +186 -0
  64. package/dist/features/routes/pageRuntime.d.ts +2 -1
  65. package/dist/features/routes/pageRuntime.js +34 -22
  66. package/dist/features/runtime/RuntimeChrome.js +2 -5
  67. package/dist/features/runtime/assetPrefix.js +14 -0
  68. package/dist/features/runtime/breadcrumbs.js +1 -1
  69. package/dist/features/runtime/editingFallback.js +4 -8
  70. package/dist/features/runtime/livePages.js +1 -1
  71. package/dist/features/runtime/pageApp.js +57 -83
  72. package/dist/features/runtime/pageClient.js +1 -1
  73. package/dist/features/runtime/pageNavigation.js +3 -2
  74. package/dist/features/runtime/publicCache.js +95 -0
  75. package/dist/features/runtime/publishingDraft.js +23 -0
  76. package/dist/features/runtime/rendererClient.d.ts +8 -0
  77. package/dist/features/runtime/rendererClient.js +77 -0
  78. package/dist/features/runtime/runtime.d.ts +22 -3
  79. package/dist/features/runtime/runtime.js +209 -96
  80. package/dist/features/runtime/runtimeRoutes.d.ts +2 -0
  81. package/dist/features/runtime/runtimeRoutes.js +2 -0
  82. package/dist/features/runtime/worker.d.ts +14 -1
  83. package/dist/features/runtime/worker.js +34 -4
  84. package/dist/features/settings/AnalyticsSettings.js +622 -0
  85. package/dist/features/settings/CamoxSettings.js +95 -0
  86. package/dist/features/settings/FaviconSettings.js +254 -0
  87. package/dist/features/settings/ProjectNameSettings.js +145 -0
  88. package/dist/features/settings/SettingsPart.js +73 -0
  89. package/dist/features/settings/SocialProfilesSettings.js +245 -0
  90. package/dist/features/settings/useProjectMutation.js +61 -0
  91. package/dist/features/studio/FollowAgentProvider.js +10 -10
  92. package/dist/features/studio/components/DraftsControl.js +136 -131
  93. package/dist/features/studio/components/LocalePicker.js +178 -174
  94. package/dist/features/studio/components/Navbar.js +107 -66
  95. package/dist/features/studio/components/ProjectMenu.js +119 -171
  96. package/dist/features/studio/components/ReviewDraftSheet.js +1151 -991
  97. package/dist/features/studio/components/ThreadMessages.js +100 -65
  98. package/dist/features/studio/components/UserButton.js +2 -2
  99. package/dist/features/studio/routes.js +3 -1
  100. package/dist/features/studio/showInCanvas.js +129 -0
  101. package/dist/features/vite/definitionsSync.js +5 -6
  102. package/dist/features/vite/hostedChecks.js +127 -0
  103. package/dist/features/vite/runtimeDev.js +58 -17
  104. package/dist/features/vite/staticAssetHeaders.js +52 -0
  105. package/dist/features/vite/vite.d.ts +1 -1
  106. package/dist/features/vite/vite.js +49 -9
  107. package/dist/hooks/use-page-destinations.js +10 -10
  108. package/dist/lib/api-client-server.d.ts +1 -1
  109. package/dist/lib/api-client.d.ts +2 -1
  110. package/dist/lib/draft-scope.d.ts +1 -0
  111. package/dist/lib/locale-path.d.ts +3 -11
  112. package/dist/lib/locale-path.js +3 -27
  113. package/dist/lib/queries.js +7 -1
  114. package/dist/lib/revisions.js +20 -0
  115. package/dist/lib/shortcuts.js +29 -0
  116. package/dist/lib/studio-definitions.js +160 -0
  117. package/dist/lib/studio-reads.d.ts +1 -0
  118. package/dist/lib/studio-reads.js +65 -21
  119. package/dist/lib/use-project-room.js +16 -10
  120. package/dist/lib/utils.js +1 -104
  121. package/dist/package.js +1 -1
  122. package/dist/studio.css +1 -1
  123. package/package.json +9 -4
  124. package/skills/camox/SKILL.md +4 -0
  125. package/skills/camox/references/artifacts.md +1 -1
  126. package/dist/features/studio/components/FaviconDialog.js +0 -318
  127. package/dist/features/studio/components/SocialProfilesDialog.js +0 -342
@@ -1,19 +1,24 @@
1
1
  import { useProjectUuid } from "../../lib/auth.js";
2
- import { useCamoxApp } from "../provider/components/CamoxAppContext.js";
3
2
  import { reads, useReadQueries } from "../../lib/studio-reads.js";
3
+ import { useLayoutDefinitions } from "../../lib/studio-definitions.js";
4
+ import { routeSegments } from "../../core/derivedRoutes.js";
4
5
  import { c } from "react/compiler-runtime";
5
6
 
6
7
  //#region src/features/canvas/useDiscoveredPreviewPaths.ts
7
- /** Each derived layout's first discovered page, keyed by layout id. */
8
+ /**
9
+ * Each derived layout's first discovered page, keyed by layout id. Only a layout with params
10
+ * needs one. Whether it discovers pages is its code's to say: the runtime runs it, and answers
11
+ * no page for a layout without routes.
12
+ */
8
13
  function useDiscoveredPreviewPaths(runtimeBasePath) {
9
14
  const $ = c(11);
10
15
  const projectUuid = useProjectUuid();
11
- const t0 = useCamoxApp();
16
+ const t0 = useLayoutDefinitions();
12
17
  let ids;
13
18
  let t1;
14
19
  let t2;
15
20
  if ($[0] !== projectUuid || $[1] !== runtimeBasePath || $[2] !== t0) {
16
- ids = t0.getLayouts().filter(_temp).map(_temp2);
21
+ ids = t0.filter(_temp2).map(_temp3);
17
22
  t1 = useReadQueries;
18
23
  let t3;
19
24
  if ($[6] !== projectUuid || $[7] !== runtimeBasePath) {
@@ -49,13 +54,15 @@ function useDiscoveredPreviewPaths(runtimeBasePath) {
49
54
  } else t3 = $[10];
50
55
  return t1(t2, t3);
51
56
  }
52
- function _temp2(t0) {
53
- const { _internal: t1 } = t0;
54
- const { id } = t1;
57
+ function _temp3(t0) {
58
+ const { id } = t0;
55
59
  return id;
56
60
  }
57
- function _temp(layout) {
58
- return layout._internal.kind === "derived" && layout._internal.routes;
61
+ function _temp2(layout) {
62
+ return layout.kind === "derived" && routeSegments(layout.id).some(_temp);
63
+ }
64
+ function _temp(segment) {
65
+ return segment.startsWith("$");
59
66
  }
60
67
 
61
68
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { useProjectUuid } from "../../lib/auth.js";
2
2
  import { reads, useReadQuery } from "../../lib/studio-reads.js";
3
- import { checkIfInputFocused } from "../../lib/utils.js";
4
3
  import { UploadDropZone } from "./components/UploadDropZone.js";
5
4
  import { UploadProgressDrawer } from "./components/UploadProgressDrawer.js";
6
5
  import { useFileUpload } from "../../hooks/use-file-upload.js";
@@ -10,12 +9,13 @@ import { AssetCard } from "./components/AssetCard.js";
10
9
  import { useMarqueeSelection } from "../../hooks/use-marquee-selection.js";
11
10
  import { AssetCardSkeleton } from "./components/AssetCardSkeleton.js";
12
11
  import { c } from "react/compiler-runtime";
13
- import { useEffect, useRef, useState } from "react";
12
+ import { useRef, useState } from "react";
14
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
14
  import { useMutation } from "@tanstack/react-query";
16
15
  import { Button } from "@camox/ui/button";
17
16
  import { PanelContent } from "@camox/ui/panel";
18
17
  import { ImageIcon, UploadIcon } from "lucide-react";
18
+ import { useHotkey } from "@tanstack/react-hotkeys";
19
19
  import { FloatingToolbar } from "@camox/ui/floating-toolbar";
20
20
 
21
21
  //#region src/features/content/ContentAssets.tsx
@@ -74,31 +74,27 @@ const ContentAssets = () => {
74
74
  $[10] = t8;
75
75
  } else t8 = $[10];
76
76
  const { selectionRect, didDragRef, handlers } = useMarqueeSelection(containerRef, t8);
77
- let t10;
78
77
  let t9;
79
- if ($[11] !== lightboxFileId) {
80
- t9 = () => {
81
- const handleKeyDown = (event) => {
82
- if (event.key !== "Escape") return;
83
- if (lightboxFileId !== null) return;
84
- if (checkIfInputFocused()) return;
85
- setSelectedIds(_temp);
86
- };
87
- document.addEventListener("keydown", handleKeyDown);
88
- return () => document.removeEventListener("keydown", handleKeyDown);
78
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
79
+ t9 = () => setSelectedIds(_temp);
80
+ $[11] = t9;
81
+ } else t9 = $[11];
82
+ const t10 = lightboxFileId === null;
83
+ let t11;
84
+ if ($[12] !== t10) {
85
+ t11 = {
86
+ enabled: t10,
87
+ ignoreInputs: true,
88
+ preventDefault: false,
89
+ stopPropagation: false
89
90
  };
90
- t10 = [lightboxFileId];
91
- $[11] = lightboxFileId;
92
91
  $[12] = t10;
93
- $[13] = t9;
94
- } else {
95
- t10 = $[12];
96
- t9 = $[13];
97
- }
98
- useEffect(t9, t10);
99
- let t11;
92
+ $[13] = t11;
93
+ } else t11 = $[13];
94
+ useHotkey("Escape", t9, t11);
95
+ let t12;
100
96
  if ($[14] !== didDragRef) {
101
- t11 = () => {
97
+ t12 = () => {
102
98
  if (didDragRef.current) {
103
99
  didDragRef.current = false;
104
100
  return;
@@ -106,20 +102,20 @@ const ContentAssets = () => {
106
102
  setSelectedIds(/* @__PURE__ */ new Set());
107
103
  };
108
104
  $[14] = didDragRef;
109
- $[15] = t11;
110
- } else t11 = $[15];
111
- let t12;
105
+ $[15] = t12;
106
+ } else t12 = $[15];
107
+ let t13;
112
108
  if ($[16] !== files) {
113
- t12 = files === void 0 && /* @__PURE__ */ jsx("div", {
109
+ t13 = files === void 0 && /* @__PURE__ */ jsx("div", {
114
110
  className: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-4",
115
111
  children: Array.from({ length: 12 }, _temp2)
116
112
  });
117
113
  $[16] = files;
118
- $[17] = t12;
119
- } else t12 = $[17];
120
- let t13;
114
+ $[17] = t13;
115
+ } else t13 = $[17];
116
+ let t14;
121
117
  if ($[18] !== files?.length || $[19] !== uploadFiles) {
122
- t13 = files?.length === 0 && /* @__PURE__ */ jsx("div", {
118
+ t14 = files?.length === 0 && /* @__PURE__ */ jsx("div", {
123
119
  className: "flex h-full items-center justify-center",
124
120
  children: /* @__PURE__ */ jsxs("div", {
125
121
  className: "flex max-w-sm flex-col items-center gap-2 text-center",
@@ -150,9 +146,9 @@ const ContentAssets = () => {
150
146
  type: "file",
151
147
  className: "sr-only",
152
148
  multiple: true,
153
- onChange: (event_0) => {
154
- if (event_0.target.files) uploadFiles(event_0.target.files);
155
- event_0.target.value = "";
149
+ onChange: (event) => {
150
+ if (event.target.files) uploadFiles(event.target.files);
151
+ event.target.value = "";
156
152
  }
157
153
  })
158
154
  ]
@@ -162,11 +158,11 @@ const ContentAssets = () => {
162
158
  });
163
159
  $[18] = files?.length;
164
160
  $[19] = uploadFiles;
165
- $[20] = t13;
166
- } else t13 = $[20];
167
- let t14;
161
+ $[20] = t14;
162
+ } else t14 = $[20];
163
+ let t15;
168
164
  if ($[21] !== files || $[22] !== selectedIds) {
169
- t14 = files && files.length > 0 && /* @__PURE__ */ jsx("div", {
165
+ t15 = files && files.length > 0 && /* @__PURE__ */ jsx("div", {
170
166
  className: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-4",
171
167
  children: files.map((file) => /* @__PURE__ */ jsx(AssetCard, {
172
168
  file,
@@ -184,11 +180,11 @@ const ContentAssets = () => {
184
180
  });
185
181
  $[21] = files;
186
182
  $[22] = selectedIds;
187
- $[23] = t14;
188
- } else t14 = $[23];
189
- let t15;
183
+ $[23] = t15;
184
+ } else t15 = $[23];
185
+ let t16;
190
186
  if ($[24] !== selectionRect) {
191
- t15 = selectionRect && /* @__PURE__ */ jsx("div", {
187
+ t16 = selectionRect && /* @__PURE__ */ jsx("div", {
192
188
  className: "border-primary bg-primary/10 pointer-events-none absolute z-50 border",
193
189
  style: {
194
190
  left: selectionRect.left,
@@ -198,61 +194,61 @@ const ContentAssets = () => {
198
194
  }
199
195
  });
200
196
  $[24] = selectionRect;
201
- $[25] = t15;
202
- } else t15 = $[25];
203
- let t16;
204
- if ($[26] !== handlers.onPointerDown || $[27] !== handlers.onPointerMove || $[28] !== handlers.onPointerUp || $[29] !== t11 || $[30] !== t12 || $[31] !== t13 || $[32] !== t14 || $[33] !== t15) {
205
- t16 = /* @__PURE__ */ jsxs(PanelContent, {
197
+ $[25] = t16;
198
+ } else t16 = $[25];
199
+ let t17;
200
+ if ($[26] !== handlers.onPointerDown || $[27] !== handlers.onPointerMove || $[28] !== handlers.onPointerUp || $[29] !== t12 || $[30] !== t13 || $[31] !== t14 || $[32] !== t15 || $[33] !== t16) {
201
+ t17 = /* @__PURE__ */ jsxs(PanelContent, {
206
202
  ref: containerRef,
207
203
  className: "relative p-4 select-none",
208
- onClick: t11,
204
+ onClick: t12,
209
205
  onPointerDown: handlers.onPointerDown,
210
206
  onPointerMove: handlers.onPointerMove,
211
207
  onPointerUp: handlers.onPointerUp,
212
208
  children: [
213
- t12,
214
209
  t13,
215
210
  t14,
216
- t15
211
+ t15,
212
+ t16
217
213
  ]
218
214
  });
219
215
  $[26] = handlers.onPointerDown;
220
216
  $[27] = handlers.onPointerMove;
221
217
  $[28] = handlers.onPointerUp;
222
- $[29] = t11;
223
- $[30] = t12;
224
- $[31] = t13;
225
- $[32] = t14;
226
- $[33] = t15;
227
- $[34] = t16;
228
- } else t16 = $[34];
229
- let t17;
230
- if ($[35] !== t16 || $[36] !== uploadFiles) {
231
- t17 = /* @__PURE__ */ jsx("div", {
218
+ $[29] = t12;
219
+ $[30] = t13;
220
+ $[31] = t14;
221
+ $[32] = t15;
222
+ $[33] = t16;
223
+ $[34] = t17;
224
+ } else t17 = $[34];
225
+ let t18;
226
+ if ($[35] !== t17 || $[36] !== uploadFiles) {
227
+ t18 = /* @__PURE__ */ jsx("div", {
232
228
  className: "flex min-h-0 min-w-0 flex-1 flex-col",
233
229
  children: /* @__PURE__ */ jsx(UploadDropZone, {
234
230
  onDrop: uploadFiles,
235
231
  className: "flex min-h-0 flex-1 flex-col",
236
- children: t16
232
+ children: t17
237
233
  })
238
234
  });
239
- $[35] = t16;
235
+ $[35] = t17;
240
236
  $[36] = uploadFiles;
241
- $[37] = t17;
242
- } else t17 = $[37];
243
- let t18;
237
+ $[37] = t18;
238
+ } else t18 = $[37];
239
+ let t19;
244
240
  if ($[38] !== clearAll || $[39] !== uploads) {
245
- t18 = /* @__PURE__ */ jsx(UploadProgressDrawer, {
241
+ t19 = /* @__PURE__ */ jsx(UploadProgressDrawer, {
246
242
  uploads,
247
243
  onClose: clearAll
248
244
  });
249
245
  $[38] = clearAll;
250
246
  $[39] = uploads;
251
- $[40] = t18;
252
- } else t18 = $[40];
253
- let t19;
247
+ $[40] = t19;
248
+ } else t19 = $[40];
249
+ let t20;
254
250
  if ($[41] !== deleteFiles || $[42] !== selectedIds) {
255
- t19 = selectedIds.size > 0 && /* @__PURE__ */ jsxs(FloatingToolbar, {
251
+ t20 = selectedIds.size > 0 && /* @__PURE__ */ jsxs(FloatingToolbar, {
256
252
  className: "bottom-4 min-w-xs justify-between gap-4 pl-3",
257
253
  children: [/* @__PURE__ */ jsxs("span", {
258
254
  className: "text-muted-foreground",
@@ -274,11 +270,11 @@ const ContentAssets = () => {
274
270
  });
275
271
  $[41] = deleteFiles;
276
272
  $[42] = selectedIds;
277
- $[43] = t19;
278
- } else t19 = $[43];
279
- let t20;
273
+ $[43] = t20;
274
+ } else t20 = $[43];
275
+ let t21;
280
276
  if ($[44] !== lightboxFileId) {
281
- t20 = lightboxFileId && /* @__PURE__ */ jsx(AssetLightbox, {
277
+ t21 = lightboxFileId && /* @__PURE__ */ jsx(AssetLightbox, {
282
278
  open: true,
283
279
  onOpenChange: (open) => {
284
280
  if (!open) setLightboxFileId(null);
@@ -286,23 +282,23 @@ const ContentAssets = () => {
286
282
  fileId: lightboxFileId
287
283
  });
288
284
  $[44] = lightboxFileId;
289
- $[45] = t20;
290
- } else t20 = $[45];
291
- let t21;
292
- if ($[46] !== t17 || $[47] !== t18 || $[48] !== t19 || $[49] !== t20) {
293
- t21 = /* @__PURE__ */ jsxs(Fragment, { children: [
294
- t17,
285
+ $[45] = t21;
286
+ } else t21 = $[45];
287
+ let t22;
288
+ if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t21) {
289
+ t22 = /* @__PURE__ */ jsxs(Fragment, { children: [
295
290
  t18,
296
291
  t19,
297
- t20
292
+ t20,
293
+ t21
298
294
  ] });
299
- $[46] = t17;
300
- $[47] = t18;
301
- $[48] = t19;
302
- $[49] = t20;
303
- $[50] = t21;
304
- } else t21 = $[50];
305
- return t21;
295
+ $[46] = t18;
296
+ $[47] = t19;
297
+ $[48] = t20;
298
+ $[49] = t21;
299
+ $[50] = t22;
300
+ } else t22 = $[50];
301
+ return t22;
306
302
  };
307
303
  function _temp(prev) {
308
304
  return prev.size === 0 ? prev : /* @__PURE__ */ new Set();
@@ -4,8 +4,8 @@ import { useCamoxApp } from "../provider/components/CamoxAppContext.js";
4
4
  import { NormalizedDataProvider, usePageBlocks } from "../../lib/normalized-data.js";
5
5
  import { reads, useRead } from "../../lib/studio-reads.js";
6
6
  import { BlockErrorBoundary } from "../preview/components/BlockErrorBoundary.js";
7
- import { curatedLayoutContext } from "../../core/layoutContext.js";
8
7
  import { useLocalePath } from "../../lib/view-locale.js";
8
+ import { curatedLayoutContext } from "../../core/layoutContext.js";
9
9
  import { SharedLayoutContent } from "./SharedLayoutContent.js";
10
10
  import { c } from "react/compiler-runtime";
11
11
  import * as React from "react";
@@ -6,15 +6,17 @@ import * as React from "react";
6
6
  //#region src/features/preview/CamoxPreview.d.ts
7
7
  /** The page the Preview shows: as the server rendered it, then following edits. */
8
8
  export declare function usePreviewedPage(): PageStructure;
9
- export declare const PageContent: () => React.JSX.Element;
10
- export declare const CamoxPreview: ({ children, runtimeBasePath, derived, canvasOnly }: {
11
- children: React.ReactNode;
9
+ /**
10
+ * The signed-in Website Section. The studio never renders the page itself: the renderer frame,
11
+ * which runs the shown draft's code, renders it into the Preview's slot.
12
+ */
13
+ export declare const CamoxPreview: ({ runtimeBasePath, derived, canvasOnly }: {
12
14
  runtimeBasePath?: string;
13
15
  derived?: PageRenderInput["derived"];
14
16
  canvasOnly?: PageRenderInput["canvasOnly"];
15
17
  }) => React.JSX.Element;
16
18
  /** Studio chrome is shared; only curated previews require a Camox page record. */
17
- export declare const PreviewShell: ({ children, pageData, derivedLayout, pageLocation, canvasOnly, runtimeBasePath }: {
19
+ export declare const PreviewShell: ({ children, pageData, derivedLayout, pageLocation, canvasOnly, runtimeBasePath, pageShown }: {
18
20
  children: React.ReactNode;
19
21
  pageData?: ReturnType<typeof usePreviewedPage>;
20
22
  derivedLayout?: LayoutStructure;
@@ -22,6 +24,8 @@ export declare const PreviewShell: ({ children, pageData, derivedLayout, pageLoc
22
24
  pageLocation?: LocationState;
23
25
  canvasOnly?: PageRenderInput["canvasOnly"];
24
26
  runtimeBasePath?: string;
27
+ /** Whether the Preview's page showed: until then, a loading screen covers the Preview. */
28
+ pageShown?: boolean;
25
29
  }) => React.JSX.Element;
26
30
  /** Zooms out to the whole Canvas, from anywhere in the site or the Studio. */
27
31
  export declare function useShowCanvasAction(): void;