camox 0.65.1 → 0.67.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.
Files changed (42) hide show
  1. package/dist/features/canvas/CamoxCanvas.js +195 -173
  2. package/dist/features/canvas/canvasFrameCapture.js +5 -12
  3. package/dist/features/canvas/canvasFrameDocument.js +90 -29
  4. package/dist/features/canvas/canvasItems.js +22 -6
  5. package/dist/features/canvas/sidebar/ContentSidebar.js +19 -21
  6. package/dist/features/canvas/sidebar/LayoutPageOverview.js +22 -49
  7. package/dist/features/canvas/sidebar/LayoutPageSeo.js +73 -76
  8. package/dist/features/canvas/sidebar/PageInspector.js +61 -50
  9. package/dist/features/canvas/sidebar/PageInspectorSkeleton.js +4 -4
  10. package/dist/features/canvas/useCanvasCamera.js +22 -5
  11. package/dist/features/content/components/MissingFromLocale.js +1 -1
  12. package/dist/features/page/UnplacedLayoutContent.js +141 -0
  13. package/dist/features/preview/components/ItemFieldsEditor.js +50 -44
  14. package/dist/features/preview/components/PageInfo.js +103 -100
  15. package/dist/features/preview/components/SelectionEditor.js +284 -231
  16. package/dist/features/preview/components/contentFieldSchema.js +5 -1
  17. package/dist/features/runtime/RuntimeChrome.js +66 -40
  18. package/dist/features/runtime/pageApp.js +24 -10
  19. package/dist/features/runtime/runtime.d.ts +13 -0
  20. package/dist/features/runtime/runtime.js +58 -2
  21. package/dist/features/studio/components/AgentSidebar.js +3 -3
  22. package/dist/features/studio/components/ChatWidget.js +34 -29
  23. package/dist/features/studio/components/ContentFindings.js +397 -0
  24. package/dist/features/studio/components/DraftsControl.js +172 -159
  25. package/dist/features/studio/components/Patrol.js +449 -426
  26. package/dist/features/studio/components/ReviewDraftSheet.js +231 -192
  27. package/dist/features/studio/components/Squareling.js +0 -9
  28. package/dist/features/studio/components/ThreadComposer.js +183 -121
  29. package/dist/features/studio/components/ThreadMessages.js +19 -11
  30. package/dist/features/studio/components/UnnamedDraftBar.js +349 -0
  31. package/dist/features/studio/findingSentence.js +3 -5
  32. package/dist/features/studio/patrollerBio.js +39 -0
  33. package/dist/features/studio/reportSentence.js +0 -5
  34. package/dist/features/studio/studioStore.js +13 -0
  35. package/dist/features/studio/workingSentence.js +2 -11
  36. package/dist/lib/revisions.js +25 -3
  37. package/dist/lib/use-thread.js +1 -1
  38. package/dist/package.js +1 -1
  39. package/dist/studio.css +1 -1
  40. package/package.json +4 -4
  41. package/dist/features/canvas/sidebar/DerivedPageInspector.js +0 -49
  42. package/dist/features/canvas/sidebar/SingletonPageInspector.js +0 -39
@@ -5,8 +5,7 @@ import { CanvasInspectorBody, CanvasInspectorTitle } from "./CanvasInspector.js"
5
5
  import { PageInspectorSkeleton } from "./PageInspectorSkeleton.js";
6
6
  import { PreviewEditingOwnerContext } from "../../preview/previewSelection.js";
7
7
  import { CuratedPageInspector } from "./CuratedPageInspector.js";
8
- import { DerivedPageInspector } from "./DerivedPageInspector.js";
9
- import { SingletonPageInspector } from "./SingletonPageInspector.js";
8
+ import { LayoutPageOverview } from "./LayoutPageOverview.js";
10
9
  import { c } from "react/compiler-runtime";
11
10
  import * as React from "react";
12
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -38,8 +37,8 @@ var PageInspectorBoundary = class extends React.Component {
38
37
  }
39
38
  };
40
39
  function PageInspectorContent(t0) {
41
- const $ = c(8);
42
- const { page, pageRecord, runtimeBasePath } = t0;
40
+ const $ = c(12);
41
+ const { page, runtimeBasePath } = t0;
43
42
  switch (page.kind) {
44
43
  case "curated": {
45
44
  let t1;
@@ -51,31 +50,45 @@ function PageInspectorContent(t0) {
51
50
  }
52
51
  case "singleton": {
53
52
  let t1;
54
- if ($[1] !== page.layoutId || $[2] !== runtimeBasePath) {
55
- t1 = /* @__PURE__ */ jsx(SingletonPageInspector, {
53
+ if ($[1] !== runtimeBasePath) {
54
+ t1 = { runtimeBasePath };
55
+ $[1] = runtimeBasePath;
56
+ $[2] = t1;
57
+ } else t1 = $[2];
58
+ let t2;
59
+ if ($[3] !== page.layoutId || $[4] !== t1) {
60
+ t2 = /* @__PURE__ */ jsx(LayoutPageOverview, {
56
61
  layoutId: page.layoutId,
57
- runtimeBasePath
62
+ target: t1
58
63
  });
59
- $[1] = page.layoutId;
60
- $[2] = runtimeBasePath;
61
- $[3] = t1;
62
- } else t1 = $[3];
63
- return t1;
64
+ $[3] = page.layoutId;
65
+ $[4] = t1;
66
+ $[5] = t2;
67
+ } else t2 = $[5];
68
+ return t2;
64
69
  }
65
70
  case "derived": {
66
71
  let t1;
67
- if ($[4] !== page.layoutId || $[5] !== pageRecord || $[6] !== runtimeBasePath) {
68
- t1 = /* @__PURE__ */ jsx(DerivedPageInspector, {
72
+ if ($[6] !== page.layoutId || $[7] !== runtimeBasePath) {
73
+ t1 = {
74
+ runtimeBasePath,
75
+ derivedLayoutId: page.layoutId
76
+ };
77
+ $[6] = page.layoutId;
78
+ $[7] = runtimeBasePath;
79
+ $[8] = t1;
80
+ } else t1 = $[8];
81
+ let t2;
82
+ if ($[9] !== page.layoutId || $[10] !== t1) {
83
+ t2 = /* @__PURE__ */ jsx(LayoutPageOverview, {
69
84
  layoutId: page.layoutId,
70
- pageRecord,
71
- runtimeBasePath
85
+ target: t1
72
86
  });
73
- $[4] = page.layoutId;
74
- $[5] = pageRecord;
75
- $[6] = runtimeBasePath;
76
- $[7] = t1;
77
- } else t1 = $[7];
78
- return t1;
87
+ $[9] = page.layoutId;
88
+ $[10] = t1;
89
+ $[11] = t2;
90
+ } else t2 = $[11];
91
+ return t2;
79
92
  }
80
93
  }
81
94
  }
@@ -85,8 +98,8 @@ function PageInspectorContent(t0) {
85
98
  * overview, and the name's header goes back to it.
86
99
  */
87
100
  function PageInspector(t0) {
88
- const $ = c(27);
89
- const { page, owner, pageRecord, runtimeBasePath } = t0;
101
+ const $ = c(26);
102
+ const { page, owner, runtimeBasePath } = t0;
90
103
  const { pathname } = useLocation();
91
104
  let t1;
92
105
  if ($[0] !== owner) {
@@ -140,51 +153,49 @@ function PageInspector(t0) {
140
153
  $[10] = t6;
141
154
  } else t6 = $[10];
142
155
  let t7;
143
- if ($[11] !== page || $[12] !== pageRecord || $[13] !== runtimeBasePath) {
156
+ if ($[11] !== page || $[12] !== runtimeBasePath) {
144
157
  t7 = /* @__PURE__ */ jsx(PageInspectorContent, {
145
158
  page,
146
- pageRecord,
147
159
  runtimeBasePath
148
160
  });
149
161
  $[11] = page;
150
- $[12] = pageRecord;
151
- $[13] = runtimeBasePath;
152
- $[14] = t7;
153
- } else t7 = $[14];
162
+ $[12] = runtimeBasePath;
163
+ $[13] = t7;
164
+ } else t7 = $[13];
154
165
  let t8;
155
- if ($[15] !== t6 || $[16] !== t7) {
166
+ if ($[14] !== t6 || $[15] !== t7) {
156
167
  t8 = /* @__PURE__ */ jsx(React.Suspense, {
157
168
  fallback: t6,
158
169
  children: t7
159
170
  });
160
- $[15] = t6;
161
- $[16] = t7;
162
- $[17] = t8;
163
- } else t8 = $[17];
171
+ $[14] = t6;
172
+ $[15] = t7;
173
+ $[16] = t8;
174
+ } else t8 = $[16];
164
175
  let t9;
165
- if ($[18] !== t5 || $[19] !== t8) {
176
+ if ($[17] !== t5 || $[18] !== t8) {
166
177
  t9 = /* @__PURE__ */ jsx(PageInspectorBoundary, { children: t8 }, t5);
167
- $[18] = t5;
168
- $[19] = t8;
169
- $[20] = t9;
170
- } else t9 = $[20];
178
+ $[17] = t5;
179
+ $[18] = t8;
180
+ $[19] = t9;
181
+ } else t9 = $[19];
171
182
  let t10;
172
- if ($[21] !== owner || $[22] !== t9) {
183
+ if ($[20] !== owner || $[21] !== t9) {
173
184
  t10 = /* @__PURE__ */ jsx(CanvasInspectorBody, { children: /* @__PURE__ */ jsx(PreviewEditingOwnerContext, {
174
185
  value: owner,
175
186
  children: t9
176
187
  }) });
177
- $[21] = owner;
178
- $[22] = t9;
179
- $[23] = t10;
180
- } else t10 = $[23];
188
+ $[20] = owner;
189
+ $[21] = t9;
190
+ $[22] = t10;
191
+ } else t10 = $[22];
181
192
  let t11;
182
- if ($[24] !== t10 || $[25] !== t4) {
193
+ if ($[23] !== t10 || $[24] !== t4) {
183
194
  t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t4, t10] });
184
- $[24] = t10;
185
- $[25] = t4;
186
- $[26] = t11;
187
- } else t11 = $[26];
195
+ $[23] = t10;
196
+ $[24] = t4;
197
+ $[25] = t11;
198
+ } else t11 = $[25];
188
199
  return t11;
189
200
  }
190
201
  function _temp() {
@@ -61,14 +61,14 @@ function CuratedPageSkeleton() {
61
61
  } else t0 = $[0];
62
62
  return t0;
63
63
  }
64
- /** A layout page's blocks and notice. */
64
+ /** A layout page's blocks. */
65
65
  function LayoutPageSkeleton() {
66
66
  const $ = c(1);
67
67
  let t0;
68
68
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
69
- t0 = /* @__PURE__ */ jsx(LoadingPage, { children: /* @__PURE__ */ jsxs("div", {
70
- className: "flex flex-col gap-4 px-2 pt-4",
71
- children: [/* @__PURE__ */ jsx(BlocksGroupSkeleton, {}), /* @__PURE__ */ jsx(Skeleton, { className: "h-20 w-full rounded-lg" })]
69
+ t0 = /* @__PURE__ */ jsx(LoadingPage, { children: /* @__PURE__ */ jsx("div", {
70
+ className: "px-2 pt-4",
71
+ children: /* @__PURE__ */ jsx(BlocksGroupSkeleton, {})
72
72
  }) });
73
73
  $[0] = t0;
74
74
  } else t0 = $[0];
@@ -1,7 +1,7 @@
1
1
  import { canvasStore } from "./canvasStore.js";
2
2
  import { ViewportContinuityContext, captureViewportAnchor, resolveViewportAnchor } from "../preview/viewportContinuity.js";
3
3
  import { canvasPageIframe } from "../preview/previewPageFrame.js";
4
- import { canvasBlockOverlap } from "./canvasFrameDocument.js";
4
+ import { canvasSeamCover } from "./canvasFrameDocument.js";
5
5
  import { revealScrollDelta } from "../preview/selectionReveal.js";
6
6
  import { CANVAS_WHEEL_ZOOM_RATE, ZOOM_STRETCH, canvasMaximumScale, canvasMinimumScale, canvasOverview, canvasVerticalRail, canvasWheelDelta, constrainCanvasCamera, findCanvasSnapTarget, fitCanvasPage, isCanvasCameraSnapped, isCanvasPageScale, isInCanvasSnapWindow, placeCanvasPageAnchor, snapCanvasZoom, stretchCanvasZoom, unstretchCanvasZoom, zoomCanvasAt } from "./canvasCamera.js";
7
7
  import { createCanvasFlight, createCanvasPan } from "./canvasFlight.js";
@@ -73,7 +73,7 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
73
73
  for (const name of CAMERA_PROPERTIES) element.style.removeProperty(name);
74
74
  delete element.dataset.canvasPan;
75
75
  delete element.dataset.canvasPromoted;
76
- delete element.dataset.canvasBlockOverlap;
76
+ delete element.dataset.canvasSeamCover;
77
77
  };
78
78
  }, []);
79
79
  /**
@@ -289,10 +289,10 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
289
289
  };
290
290
  const paintAtRest = () => {
291
291
  if (settle) return;
292
- const overlap = String(canvasBlockOverlap(camera.scale, ownerWindow.devicePixelRatio));
292
+ const seamCover = String(canvasSeamCover(camera.scale, ownerWindow.devicePixelRatio));
293
293
  const zoom = String(camera.scale);
294
294
  for (const element of [viewport, ...mirrors.current]) {
295
- if (element.dataset.canvasBlockOverlap !== overlap) element.dataset.canvasBlockOverlap = overlap;
295
+ if (element.dataset.canvasSeamCover !== seamCover) element.dataset.canvasSeamCover = seamCover;
296
296
  if (element.style.getPropertyValue("--canvas-rest-zoom") !== zoom) element.style.setProperty("--canvas-rest-zoom", zoom);
297
297
  }
298
298
  };
@@ -426,6 +426,7 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
426
426
  };
427
427
  animation = requestAnimationFrame(animate);
428
428
  };
429
+ let syncedTargets = targets();
429
430
  flightControls.current = {
430
431
  flyTo: startFlight,
431
432
  reveal: (element, immediate) => {
@@ -451,6 +452,8 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
451
452
  syncRow: () => {
452
453
  const key = rowRef.current?.selected ?? null;
453
454
  const destination = targetOf(key);
455
+ const previousTargets = syncedTargets;
456
+ syncedTargets = targets();
454
457
  if (key !== requested) {
455
458
  requested = key;
456
459
  selection = key;
@@ -463,6 +466,20 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
463
466
  else if (page.left !== flight.page.left || page.width !== flight.page.width) startFlight(page.key);
464
467
  return;
465
468
  }
469
+ const previous = previousTargets[syncedTargets.findIndex((candidate) => candidate.key === key)];
470
+ if (destination && previous?.key === key && previous.left !== destination.left && previous.width === destination.width && selection === key && !flight && isCanvasCameraSnapped(rest(target), viewportSize, previous)) {
471
+ updateGeometry();
472
+ const fit = fitCanvasPage(viewportSize, destination);
473
+ const next = {
474
+ ...fit,
475
+ y: rescaleY(restoredCamera ?? target, fit.scale)
476
+ };
477
+ if (restoredCamera || fittingInitialPage) restoredCamera = next;
478
+ fittingInitialPage = false;
479
+ camera = constrain(camera, true);
480
+ applyCamera(next, true);
481
+ return;
482
+ }
466
483
  if (destination && selection === key && !flight && !fittingInitialPage && !isCanvasCameraSnapped(rest(target), viewportSize, destination)) startFlight(destination.key);
467
484
  },
468
485
  fitAll: startOverviewFlight
@@ -771,7 +788,7 @@ function useCanvasCamera(workspaceKey, initialTarget, row) {
771
788
  ownerWindow.removeEventListener("blur", releaseSpace);
772
789
  delete viewport.dataset.canvasPan;
773
790
  delete viewport.dataset.canvasPromoted;
774
- delete viewport.dataset.canvasBlockOverlap;
791
+ delete viewport.dataset.canvasSeamCover;
775
792
  paintMirror.current = null;
776
793
  };
777
794
  }, [workspaceKey, continuity]);
@@ -2,8 +2,8 @@ import { useViewLocale } from "../../../lib/view-locale-context.js";
2
2
  import { useProjectUuid } from "../../../lib/auth.js";
3
3
  import { reads, useReadQuery, useStudioCache } from "../../../lib/studio-reads.js";
4
4
  import { localeMutations } from "../../../lib/queries.js";
5
- import { ContentSidebarGroup } from "./ContentSidebarGroup.js";
6
5
  import { localeLabel } from "../../studio/localeOptions.js";
6
+ import { ContentSidebarGroup } from "./ContentSidebarGroup.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useMutation } from "@tanstack/react-query";
@@ -0,0 +1,141 @@
1
+ import { useViewLocale } from "../../lib/view-locale-context.js";
2
+ import { usePageBlocks } from "../../lib/normalized-data.js";
3
+ import { buildLayoutContext } from "../../core/layoutContext.js";
4
+ import { SharedLayoutContent } from "./SharedLayoutContent.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/features/page/UnplacedLayoutContent.tsx
9
+ const EMPTY_PAGE = { blockIds: [] };
10
+ /**
11
+ * How tall the placeholder stands: short enough to leave the footer on the first screen, which
12
+ * shows whether it rises up it, or taller than any screen, as a long page is.
13
+ */
14
+ const PLACEHOLDER_HEIGHTS = {
15
+ short: "16rem",
16
+ tall: "300vh"
17
+ };
18
+ /** A grey that reads on light and dark Themes alike. */
19
+ const HATCH = "rgba(128, 128, 128, 0.35)";
20
+ /**
21
+ * Where a page's content goes, as the look document's Layout Definition mode shows it: a labelled,
22
+ * hatched area, styled inline, since the site's stylesheet knows nothing of it.
23
+ */
24
+ function PageContentPlaceholder(t0) {
25
+ const $ = c(6);
26
+ const { height } = t0;
27
+ const t1 = PLACEHOLDER_HEIGHTS[height];
28
+ let t2;
29
+ if ($[0] !== t1) {
30
+ t2 = {
31
+ minHeight: t1,
32
+ display: "flex",
33
+ alignItems: "flex-start",
34
+ justifyContent: "center",
35
+ padding: "2rem",
36
+ border: `2px dashed ${HATCH}`,
37
+ backgroundImage: `repeating-linear-gradient(45deg, ${HATCH} 0 2px, transparent 2px 14px)`,
38
+ font: "600 14px/1.4 system-ui, sans-serif",
39
+ color: "rgb(128, 128, 128)"
40
+ };
41
+ $[0] = t1;
42
+ $[1] = t2;
43
+ } else t2 = $[1];
44
+ const style = t2;
45
+ let t3;
46
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
47
+ t3 = /* @__PURE__ */ jsx("span", { children: "Page content" });
48
+ $[2] = t3;
49
+ } else t3 = $[2];
50
+ let t4;
51
+ if ($[3] !== height || $[4] !== style) {
52
+ t4 = /* @__PURE__ */ jsx("div", {
53
+ "data-camox-look-placeholder": height,
54
+ style,
55
+ children: t3
56
+ });
57
+ $[3] = height;
58
+ $[4] = style;
59
+ $[5] = t4;
60
+ } else t4 = $[5];
61
+ return t4;
62
+ }
63
+ /**
64
+ * A curated Layout around no page, alone, as the look document's Layout Definition mode shows it
65
+ * (ADR 0032): its blocks, read like a Layout's, around a placeholder for a page's content.
66
+ */
67
+ function UnplacedLayoutContent(t0) {
68
+ const $ = c(21);
69
+ const { camoxApp, lookLayout } = t0;
70
+ let t1;
71
+ if ($[0] !== lookLayout.layout) {
72
+ t1 = {
73
+ page: EMPTY_PAGE,
74
+ layout: lookLayout.layout
75
+ };
76
+ $[0] = lookLayout.layout;
77
+ $[1] = t1;
78
+ } else t1 = $[1];
79
+ const { beforeBlocks, afterBlocks, layoutFiles, layoutItems } = usePageBlocks(t1);
80
+ const { locale } = useViewLocale();
81
+ let t2;
82
+ if ($[2] !== camoxApp || $[3] !== lookLayout.layoutId) {
83
+ t2 = camoxApp.getLayoutById(lookLayout.layoutId);
84
+ $[2] = camoxApp;
85
+ $[3] = lookLayout.layoutId;
86
+ $[4] = t2;
87
+ } else t2 = $[4];
88
+ const layout = t2;
89
+ if (!layout) throw new Error(`Unknown layout: ${lookLayout.layoutId}`);
90
+ let t3;
91
+ if ($[5] !== locale.tag || $[6] !== lookLayout.path || $[7] !== lookLayout.projectName) {
92
+ t3 = buildLayoutContext({
93
+ kind: "curated",
94
+ title: ""
95
+ }, {
96
+ path: lookLayout.path,
97
+ locale: locale.tag,
98
+ projectName: lookLayout.projectName
99
+ });
100
+ $[5] = locale.tag;
101
+ $[6] = lookLayout.path;
102
+ $[7] = lookLayout.projectName;
103
+ $[8] = t3;
104
+ } else t3 = $[8];
105
+ const context = t3;
106
+ let t4;
107
+ if ($[9] !== afterBlocks || $[10] !== beforeBlocks) {
108
+ t4 = [...beforeBlocks, ...afterBlocks];
109
+ $[9] = afterBlocks;
110
+ $[10] = beforeBlocks;
111
+ $[11] = t4;
112
+ } else t4 = $[11];
113
+ let t5;
114
+ if ($[12] !== lookLayout.placeholder) {
115
+ t5 = /* @__PURE__ */ jsx(PageContentPlaceholder, { height: lookLayout.placeholder });
116
+ $[12] = lookLayout.placeholder;
117
+ $[13] = t5;
118
+ } else t5 = $[13];
119
+ let t6;
120
+ if ($[14] !== context || $[15] !== layout || $[16] !== layoutFiles || $[17] !== layoutItems || $[18] !== t4 || $[19] !== t5) {
121
+ t6 = /* @__PURE__ */ jsx(SharedLayoutContent, {
122
+ layout,
123
+ context,
124
+ blocks: t4,
125
+ files: layoutFiles,
126
+ repeatableItems: layoutItems,
127
+ children: t5
128
+ });
129
+ $[14] = context;
130
+ $[15] = layout;
131
+ $[16] = layoutFiles;
132
+ $[17] = layoutItems;
133
+ $[18] = t4;
134
+ $[19] = t5;
135
+ $[20] = t6;
136
+ } else t6 = $[20];
137
+ return t6;
138
+ }
139
+
140
+ //#endregion
141
+ export { UnplacedLayoutContent };
@@ -45,8 +45,8 @@ const getSchemaFieldsInOrder = (schema) => {
45
45
  });
46
46
  };
47
47
  const ItemFieldsEditor = (t0) => {
48
- const $ = c(58);
49
- const { selectedFieldName, schema, data, blockId, itemId, onFieldChange, postToIframe, filesMap, itemsMap, references, placement, fieldIdPrefix } = t0;
48
+ const $ = c(59);
49
+ const { selectedFieldName, schema, data, blockId, itemId, onFieldChange, postToIframe, filesMap, itemsMap, references, placement, fieldIdPrefix, fieldHint } = t0;
50
50
  const owner = React.useContext(PreviewEditingOwnerContext);
51
51
  let t1;
52
52
  if ($[0] !== schema || $[1] !== selectedFieldName) {
@@ -146,7 +146,7 @@ const ItemFieldsEditor = (t0) => {
146
146
  React.useEffect(t8, t9);
147
147
  let t10;
148
148
  let t11;
149
- if ($[25] !== blockId || $[26] !== data || $[27] !== fields || $[28] !== filesMap || $[29] !== form || $[30] !== getFieldElementId || $[31] !== getFieldId || $[32] !== itemId || $[33] !== itemsMap || $[34] !== onFieldChange || $[35] !== owner || $[36] !== placement || $[37] !== postToIframe || $[38] !== references || $[39] !== schema || $[40] !== selectedFieldName) {
149
+ if ($[25] !== blockId || $[26] !== data || $[27] !== fieldHint || $[28] !== fields || $[29] !== filesMap || $[30] !== form || $[31] !== getFieldElementId || $[32] !== getFieldId || $[33] !== itemId || $[34] !== itemsMap || $[35] !== onFieldChange || $[36] !== owner || $[37] !== placement || $[38] !== postToIframe || $[39] !== references || $[40] !== schema || $[41] !== selectedFieldName) {
150
150
  const handleScalarChange = (fieldName_2, value, fieldApi) => {
151
151
  fieldApi.handleChange(value);
152
152
  if (timerRef.current) clearTimeout(timerRef.current);
@@ -158,7 +158,7 @@ const ItemFieldsEditor = (t0) => {
158
158
  }, 500);
159
159
  };
160
160
  let t12;
161
- if ($[43] !== blockId || $[44] !== itemId || $[45] !== owner || $[46] !== placement) {
161
+ if ($[44] !== blockId || $[45] !== itemId || $[46] !== owner || $[47] !== placement) {
162
162
  t12 = (fieldName_3, fieldType) => {
163
163
  if (owner === null) return;
164
164
  if (placement) {
@@ -190,12 +190,12 @@ const ItemFieldsEditor = (t0) => {
190
190
  fieldType
191
191
  });
192
192
  };
193
- $[43] = blockId;
194
- $[44] = itemId;
195
- $[45] = owner;
196
- $[46] = placement;
197
- $[47] = t12;
198
- } else t12 = $[47];
193
+ $[44] = blockId;
194
+ $[45] = itemId;
195
+ $[46] = owner;
196
+ $[47] = placement;
197
+ $[48] = t12;
198
+ } else t12 = $[48];
199
199
  const selectField = t12;
200
200
  const handleFieldFocus = (fieldName_4, fieldType_0) => {
201
201
  if (owner === null) return;
@@ -216,7 +216,7 @@ const ItemFieldsEditor = (t0) => {
216
216
  });
217
217
  };
218
218
  let t13;
219
- if ($[48] !== blockId || $[49] !== itemId || $[50] !== placement) {
219
+ if ($[49] !== blockId || $[50] !== itemId || $[51] !== placement) {
220
220
  t13 = (fieldName_6, recordId) => placement ? {
221
221
  ...placement,
222
222
  nested: {
@@ -229,15 +229,15 @@ const ItemFieldsEditor = (t0) => {
229
229
  fieldName: fieldName_6,
230
230
  recordId
231
231
  };
232
- $[48] = blockId;
233
- $[49] = itemId;
234
- $[50] = placement;
235
- $[51] = t13;
236
- } else t13 = $[51];
232
+ $[49] = blockId;
233
+ $[50] = itemId;
234
+ $[51] = placement;
235
+ $[52] = t13;
236
+ } else t13 = $[52];
237
237
  const placementOf = t13;
238
238
  const opensRecords = !placement?.nested;
239
239
  let t14;
240
- if ($[52] !== owner || $[53] !== placementOf) {
240
+ if ($[53] !== owner || $[54] !== placementOf) {
241
241
  t14 = (fieldName_7, recordId_0) => {
242
242
  if (owner === null) return;
243
243
  previewStore.send({
@@ -246,10 +246,10 @@ const ItemFieldsEditor = (t0) => {
246
246
  ...placementOf(fieldName_7, recordId_0)
247
247
  });
248
248
  };
249
- $[52] = owner;
250
- $[53] = placementOf;
251
- $[54] = t14;
252
- } else t14 = $[54];
249
+ $[53] = owner;
250
+ $[54] = placementOf;
251
+ $[55] = t14;
252
+ } else t14 = $[55];
253
253
  const openRecord = t14;
254
254
  t10 = "space-y-4 px-2 py-4";
255
255
  t11 = fields.map((field_0) => {
@@ -342,6 +342,7 @@ const ItemFieldsEditor = (t0) => {
342
342
  const preview = field_0.fieldType === "String" ? lexicalStateToPlainText(value_2 ?? "") || "Empty text" : field_0.fieldType === "Repeater" ? `${Array.isArray(value_2) ? value_2.length : 0} items` : field_0.fieldType === "Boolean" ? value_2 ? "On" : "Off" : typeof value_2 === "string" && value_2 ? value_2 : "Empty";
343
343
  return /* @__PURE__ */ jsx(DrillRow, {
344
344
  label,
345
+ hint: fieldHint?.(field_0.name),
345
346
  preview,
346
347
  Icon: field_0.fieldType === "String" ? Type : field_0.fieldType === "Repeater" ? List : field_0.fieldType === "Embed" ? Code : field_0.fieldType === "Boolean" ? ToggleLeft : ListFilter,
347
348
  onClick: () => selectField(field_0.name, field_0.fieldType),
@@ -444,6 +445,7 @@ const ItemFieldsEditor = (t0) => {
444
445
  const preview_0 = linkValue?.text || linkValue?.href || "Empty link";
445
446
  return /* @__PURE__ */ jsx(DrillRow, {
446
447
  label,
448
+ hint: fieldHint?.(field_0.name),
447
449
  preview: preview_0,
448
450
  Icon: Link2,
449
451
  onClick: () => selectField(field_0.name, "Link"),
@@ -465,6 +467,7 @@ const ItemFieldsEditor = (t0) => {
465
467
  else preview_1 = `${count} ${noun}s`;
466
468
  return /* @__PURE__ */ jsx(DrillRow, {
467
469
  label,
470
+ hint: fieldHint?.(field_0.name),
468
471
  preview: preview_1,
469
472
  Icon: isImage ? Images : FileIcon,
470
473
  onClick: () => selectField(field_0.name, isImage ? "Image" : "File"),
@@ -480,6 +483,7 @@ const ItemFieldsEditor = (t0) => {
480
483
  const preview_2 = resolveAssetValue(data[field_0.name], filesMap)?.filename || "No image";
481
484
  return /* @__PURE__ */ jsx(DrillRow, {
482
485
  label,
486
+ hint: fieldHint?.(field_0.name),
483
487
  preview: preview_2,
484
488
  Icon: ImageIcon,
485
489
  onClick: () => selectField(field_0.name, "Image"),
@@ -494,6 +498,7 @@ const ItemFieldsEditor = (t0) => {
494
498
  const preview_3 = resolveAssetValue(data[field_0.name], filesMap)?.filename || "No file";
495
499
  return /* @__PURE__ */ jsx(DrillRow, {
496
500
  label,
501
+ hint: fieldHint?.(field_0.name),
497
502
  preview: preview_3,
498
503
  Icon: FileIcon,
499
504
  onClick: () => selectField(field_0.name, "File"),
@@ -526,36 +531,37 @@ const ItemFieldsEditor = (t0) => {
526
531
  });
527
532
  $[25] = blockId;
528
533
  $[26] = data;
529
- $[27] = fields;
530
- $[28] = filesMap;
531
- $[29] = form;
532
- $[30] = getFieldElementId;
533
- $[31] = getFieldId;
534
- $[32] = itemId;
535
- $[33] = itemsMap;
536
- $[34] = onFieldChange;
537
- $[35] = owner;
538
- $[36] = placement;
539
- $[37] = postToIframe;
540
- $[38] = references;
541
- $[39] = schema;
542
- $[40] = selectedFieldName;
543
- $[41] = t10;
544
- $[42] = t11;
534
+ $[27] = fieldHint;
535
+ $[28] = fields;
536
+ $[29] = filesMap;
537
+ $[30] = form;
538
+ $[31] = getFieldElementId;
539
+ $[32] = getFieldId;
540
+ $[33] = itemId;
541
+ $[34] = itemsMap;
542
+ $[35] = onFieldChange;
543
+ $[36] = owner;
544
+ $[37] = placement;
545
+ $[38] = postToIframe;
546
+ $[39] = references;
547
+ $[40] = schema;
548
+ $[41] = selectedFieldName;
549
+ $[42] = t10;
550
+ $[43] = t11;
545
551
  } else {
546
- t10 = $[41];
547
- t11 = $[42];
552
+ t10 = $[42];
553
+ t11 = $[43];
548
554
  }
549
555
  let t12;
550
- if ($[55] !== t10 || $[56] !== t11) {
556
+ if ($[56] !== t10 || $[57] !== t11) {
551
557
  t12 = /* @__PURE__ */ jsx("form", {
552
558
  className: t10,
553
559
  children: t11
554
560
  });
555
- $[55] = t10;
556
- $[56] = t11;
557
- $[57] = t12;
558
- } else t12 = $[57];
561
+ $[56] = t10;
562
+ $[57] = t11;
563
+ $[58] = t12;
564
+ } else t12 = $[58];
559
565
  return t12;
560
566
  };
561
567
  function _temp(f) {