camox 0.66.0 → 0.68.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 (31) hide show
  1. package/dist/core/editing/createEditableBlock.js +2 -1
  2. package/dist/features/content/components/MissingFromLocale.js +1 -1
  3. package/dist/features/page/UnplacedLayoutContent.js +141 -0
  4. package/dist/features/preview/components/ItemFieldsEditor.js +50 -44
  5. package/dist/features/preview/components/PreviewToolbar.js +77 -68
  6. package/dist/features/preview/components/SelectionEditor.js +284 -231
  7. package/dist/features/preview/components/contentFieldSchema.js +5 -1
  8. package/dist/features/preview/repeatableItemTargets.js +13 -7
  9. package/dist/features/runtime/RuntimeChrome.js +47 -61
  10. package/dist/features/runtime/pageApp.js +24 -10
  11. package/dist/features/runtime/runtime.d.ts +13 -0
  12. package/dist/features/runtime/runtime.js +58 -2
  13. package/dist/features/studio/components/ChatWidget.js +3 -4
  14. package/dist/features/studio/components/ConnectAgent.js +33 -59
  15. package/dist/features/studio/components/ContentFindings.js +397 -0
  16. package/dist/features/studio/components/DraftBar.js +139 -0
  17. package/dist/features/studio/components/DraftsControl.js +13 -57
  18. package/dist/features/studio/components/Navbar.js +3 -2
  19. package/dist/features/studio/components/Patrol.js +52 -34
  20. package/dist/features/studio/components/ReviewDraftSheet.js +4 -4
  21. package/dist/features/studio/components/Squareling.js +0 -9
  22. package/dist/features/studio/components/UserButton.js +7 -11
  23. package/dist/features/studio/findingSentence.js +3 -5
  24. package/dist/features/studio/patrollerBio.js +0 -1
  25. package/dist/features/studio/reportSentence.js +0 -5
  26. package/dist/features/studio/studioStore.js +0 -13
  27. package/dist/features/studio/workingSentence.js +0 -4
  28. package/dist/package.js +1 -1
  29. package/dist/studio.css +1 -1
  30. package/package.json +4 -4
  31. package/dist/features/studio/components/UnnamedDraftBar.js +0 -349
@@ -11,8 +11,9 @@ import { SelectionViewCount, SidebarStackHeader, SidebarStackView } from "./Side
11
11
  import { PreviewEditingOwnerContext } from "../previewSelection.js";
12
12
  import { entityName } from "../entityName.js";
13
13
  import { fieldTypesDictionary } from "../../../core/lib/fieldTypes.js";
14
+ import { ContentFindings, findingsHint, useContentFindings } from "../../studio/components/ContentFindings.js";
14
15
  import { usePageRecordPlacer } from "../pageRecord.js";
15
- import { contentFieldSchema } from "./contentFieldSchema.js";
16
+ import { contentFieldNames, contentFieldSchema } from "./contentFieldSchema.js";
16
17
  import { useRepeatableItemActions } from "./useRepeatableItemActions.js";
17
18
  import { ItemFieldsEditor, formatFieldName } from "./ItemFieldsEditor.js";
18
19
  import { LinkFieldEditor } from "./LinkFieldEditor.js";
@@ -139,7 +140,7 @@ const SelectionEditor = (t0) => {
139
140
  return t2;
140
141
  };
141
142
  const SelectionEditorContent = (t0) => {
142
- const $ = c(131);
143
+ const $ = c(138);
143
144
  const { owner, pageCrumb } = t0;
144
145
  let t1;
145
146
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -314,131 +315,172 @@ const SelectionEditorContent = (t0) => {
314
315
  $[43] = t17;
315
316
  } else t17 = $[43];
316
317
  const { recordView, viewSelection, recordCrumbs } = useRecordView(t17);
318
+ const recordId = recordView?.record.id;
319
+ let t18;
320
+ bb1: {
321
+ if (recordId !== void 0) {
322
+ let t19;
323
+ if ($[44] !== recordId) {
324
+ t19 = {
325
+ entity: "record",
326
+ id: recordId
327
+ };
328
+ $[44] = recordId;
329
+ $[45] = t19;
330
+ } else t19 = $[45];
331
+ t18 = t19;
332
+ break bb1;
333
+ }
334
+ if (currentItemId != null) {
335
+ let t19;
336
+ if ($[46] !== currentItemId) {
337
+ t19 = {
338
+ entity: "repeatableItem",
339
+ id: currentItemId
340
+ };
341
+ $[46] = currentItemId;
342
+ $[47] = t19;
343
+ } else t19 = $[47];
344
+ t18 = t19;
345
+ break bb1;
346
+ }
347
+ let t19;
348
+ if ($[48] !== block) {
349
+ t19 = block ? {
350
+ entity: "block",
351
+ id: block.id
352
+ } : null;
353
+ $[48] = block;
354
+ $[49] = t19;
355
+ } else t19 = $[49];
356
+ t18 = t19;
357
+ }
358
+ const findings = useContentFindings(t18);
317
359
  const selectedField = recordView?.selection.type === "record-field" ? {
318
360
  fieldName: recordView.selection.recordFieldName,
319
361
  fieldType: recordView.selection.recordFieldType
320
362
  } : selectionField(viewSelection);
321
- let t18;
322
- if ($[44] !== blockDef) {
323
- t18 = blockDef ? getSettingsFields(blockDef.settingsSchema) : [];
324
- $[44] = blockDef;
325
- $[45] = t18;
326
- } else t18 = $[45];
327
- const settingsFields = t18;
328
363
  let t19;
329
- bb1: {
364
+ if ($[50] !== blockDef) {
365
+ t19 = blockDef ? getSettingsFields(blockDef.settingsSchema) : [];
366
+ $[50] = blockDef;
367
+ $[51] = t19;
368
+ } else t19 = $[51];
369
+ const settingsFields = t19;
370
+ let t20;
371
+ bb2: {
330
372
  if (!blockDef || currentItemId == null) {
331
- t19 = null;
332
- break bb1;
373
+ t20 = null;
374
+ break bb2;
333
375
  }
334
- let t20;
335
- if ($[46] !== blockDef.contentSchema || $[47] !== currentItemId || $[48] !== itemsMap) {
336
- t20 = getArraySchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
337
- $[46] = blockDef.contentSchema;
338
- $[47] = currentItemId;
339
- $[48] = itemsMap;
340
- $[49] = t20;
341
- } else t20 = $[49];
342
- t19 = t20;
376
+ let t21;
377
+ if ($[52] !== blockDef.contentSchema || $[53] !== currentItemId || $[54] !== itemsMap) {
378
+ t21 = getArraySchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
379
+ $[52] = blockDef.contentSchema;
380
+ $[53] = currentItemId;
381
+ $[54] = itemsMap;
382
+ $[55] = t21;
383
+ } else t21 = $[55];
384
+ t20 = t21;
343
385
  }
344
- const itemArraySchema = t19;
345
- const t20 = itemArraySchema?.itemSettingsSchema;
346
- let t21;
347
- if ($[50] !== t20) {
348
- t21 = getSettingsFields(t20);
349
- $[50] = t20;
350
- $[51] = t21;
351
- } else t21 = $[51];
352
- const itemSettingsFields = t21;
386
+ const itemArraySchema = t20;
387
+ const t21 = itemArraySchema?.itemSettingsSchema;
388
+ let t22;
389
+ if ($[56] !== t21) {
390
+ t22 = getSettingsFields(t21);
391
+ $[56] = t21;
392
+ $[57] = t22;
393
+ } else t22 = $[57];
394
+ const itemSettingsFields = t22;
353
395
  const recordSchema = recordView?.collection.contentSchema;
354
396
  const recordInList = recordView?.inList === true;
355
- let t22;
356
- bb2: {
397
+ let t23;
398
+ bb3: {
357
399
  if (recordSchema) {
358
- t22 = recordSchema;
359
- break bb2;
400
+ t23 = recordSchema;
401
+ break bb3;
360
402
  }
361
403
  if (!blockDef) {
362
- t22 = null;
363
- break bb2;
404
+ t23 = null;
405
+ break bb3;
364
406
  }
365
407
  if (currentItemId == null) {
366
- t22 = blockDef.contentSchema;
367
- break bb2;
408
+ t23 = blockDef.contentSchema;
409
+ break bb3;
368
410
  }
369
- let t23;
370
- if ($[52] !== blockDef.contentSchema || $[53] !== currentItemId || $[54] !== itemsMap) {
371
- t23 = getSchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
372
- $[52] = blockDef.contentSchema;
373
- $[53] = currentItemId;
374
- $[54] = itemsMap;
375
- $[55] = t23;
376
- } else t23 = $[55];
377
- t22 = t23;
411
+ let t24;
412
+ if ($[58] !== blockDef.contentSchema || $[59] !== currentItemId || $[60] !== itemsMap) {
413
+ t24 = getSchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
414
+ $[58] = blockDef.contentSchema;
415
+ $[59] = currentItemId;
416
+ $[60] = itemsMap;
417
+ $[61] = t24;
418
+ } else t24 = $[61];
419
+ t23 = t24;
378
420
  }
379
- const currentSchema = t22;
380
- let t23;
381
- if ($[56] !== currentItemId || $[57] !== itemsMap) {
382
- t23 = currentItemId != null ? itemsMap.get(currentItemId) : null;
383
- $[56] = currentItemId;
384
- $[57] = itemsMap;
385
- $[58] = t23;
386
- } else t23 = $[58];
387
- const currentItem = t23;
388
- const isItemLoading = currentItemId != null && !currentItem;
421
+ const currentSchema = t23;
389
422
  let t24;
390
- bb3: {
423
+ if ($[62] !== currentItemId || $[63] !== itemsMap) {
424
+ t24 = currentItemId != null ? itemsMap.get(currentItemId) : null;
425
+ $[62] = currentItemId;
426
+ $[63] = itemsMap;
427
+ $[64] = t24;
428
+ } else t24 = $[64];
429
+ const currentItem = t24;
430
+ const isItemLoading = currentItemId != null && !currentItem;
431
+ let t25;
432
+ bb4: {
391
433
  if (!currentItem) {
392
- t24 = 0;
393
- break bb3;
434
+ t25 = 0;
435
+ break bb4;
394
436
  }
395
437
  let count = 0;
396
438
  for (const it of itemsMap.values()) if (it.fieldName === currentItem.fieldName && it.parentItemId === currentItem.parentItemId) count++;
397
- t24 = count;
439
+ t25 = count;
398
440
  }
399
- const siblingCount = t24;
400
- const t25 = block?.id ?? "";
401
- const t26 = currentItem?.fieldName ?? "";
402
- const t27 = currentItem?.parentItemId ?? null;
403
- const t28 = itemArraySchema;
404
- let t29;
405
- if ($[59] !== siblingCount || $[60] !== t25 || $[61] !== t26 || $[62] !== t27 || $[63] !== t28) {
406
- t29 = {
407
- blockId: t25,
408
- fieldName: t26,
409
- parentItemId: t27,
410
- arraySchema: t28,
441
+ const siblingCount = t25;
442
+ const t26 = block?.id ?? "";
443
+ const t27 = currentItem?.fieldName ?? "";
444
+ const t28 = currentItem?.parentItemId ?? null;
445
+ const t29 = itemArraySchema;
446
+ let t30;
447
+ if ($[65] !== siblingCount || $[66] !== t26 || $[67] !== t27 || $[68] !== t28 || $[69] !== t29) {
448
+ t30 = {
449
+ blockId: t26,
450
+ fieldName: t27,
451
+ parentItemId: t28,
452
+ arraySchema: t29,
411
453
  siblingCount
412
454
  };
413
- $[59] = siblingCount;
414
- $[60] = t25;
415
- $[61] = t26;
416
- $[62] = t27;
417
- $[63] = t28;
418
- $[64] = t29;
419
- } else t29 = $[64];
420
- const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(t29);
455
+ $[65] = siblingCount;
456
+ $[66] = t26;
457
+ $[67] = t27;
458
+ $[68] = t28;
459
+ $[69] = t29;
460
+ $[70] = t30;
461
+ } else t30 = $[70];
462
+ const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(t30);
421
463
  const recordContent = recordView?.record.content;
422
464
  const rawCurrentData = currentItem ? currentItem.content : block?.content ?? EMPTY_CONTENT;
423
- let t30;
424
- bb4: {
465
+ let t31;
466
+ bb5: {
425
467
  if (recordContent) {
426
- let t31;
427
- if ($[65] !== recordContent || $[66] !== recordSchema) {
428
- t31 = Object.fromEntries(Object.entries(recordContent).map((t32) => {
429
- const [key, value] = t32;
468
+ let t32;
469
+ if ($[71] !== recordContent || $[72] !== recordSchema) {
470
+ t32 = Object.fromEntries(Object.entries(recordContent).map((t33) => {
471
+ const [key, value] = t33;
430
472
  return [key, editorAssetField(contentFieldSchema(recordSchema, key)?.fieldType, value)];
431
473
  }));
432
- $[65] = recordContent;
433
- $[66] = recordSchema;
434
- $[67] = t31;
435
- } else t31 = $[67];
436
- t30 = t31;
437
- break bb4;
474
+ $[71] = recordContent;
475
+ $[72] = recordSchema;
476
+ $[73] = t32;
477
+ } else t32 = $[73];
478
+ t31 = t32;
479
+ break bb5;
438
480
  }
439
- let t31;
440
- if ($[68] !== filesMap) {
441
- t31 = (marker) => {
481
+ let t32;
482
+ if ($[74] !== filesMap) {
483
+ t32 = (marker) => {
442
484
  const file = filesMap.get(marker._fileId);
443
485
  return file ? {
444
486
  url: file.url,
@@ -453,12 +495,12 @@ const SelectionEditorContent = (t0) => {
453
495
  mimeType: ""
454
496
  };
455
497
  };
456
- $[68] = filesMap;
457
- $[69] = t31;
458
- } else t31 = $[69];
459
- const resolveFile = t31;
498
+ $[74] = filesMap;
499
+ $[75] = t32;
500
+ } else t32 = $[75];
501
+ const resolveFile = t32;
460
502
  let resolved_0;
461
- if ($[70] !== rawCurrentData || $[71] !== resolveFile) {
503
+ if ($[76] !== rawCurrentData || $[77] !== resolveFile) {
462
504
  const resolveValue = (value_0) => {
463
505
  if (isFileMarker(value_0)) return resolveFile(value_0);
464
506
  if (Array.isArray(value_0)) return value_0.map(resolveValue);
@@ -472,13 +514,13 @@ const SelectionEditorContent = (t0) => {
472
514
  };
473
515
  resolved_0 = {};
474
516
  for (const [key_0, value_1] of Object.entries(rawCurrentData)) resolved_0[key_0] = resolveValue(value_1);
475
- $[70] = rawCurrentData;
476
- $[71] = resolveFile;
477
- $[72] = resolved_0;
478
- } else resolved_0 = $[72];
479
- t30 = resolved_0;
517
+ $[76] = rawCurrentData;
518
+ $[77] = resolveFile;
519
+ $[78] = resolved_0;
520
+ } else resolved_0 = $[78];
521
+ t31 = resolved_0;
480
522
  }
481
- const currentData = t30;
523
+ const currentData = t31;
482
524
  const fieldInfo = selectedField ? {
483
525
  ...selectedField,
484
526
  fieldType: contentFieldSchema(currentSchema, selectedField.fieldName)?.fieldType ?? selectedField.fieldType
@@ -499,75 +541,75 @@ const SelectionEditorContent = (t0) => {
499
541
  const fieldIdPrefix = React.useId();
500
542
  const blockIdForWrites = block?.id;
501
543
  const recordForWrites = recordView?.record;
502
- let t31;
503
- bb5: {
544
+ let t32;
545
+ bb6: {
504
546
  if (recordForWrites) {
505
- let t32;
506
- if ($[73] !== recordForWrites) {
507
- t32 = {
547
+ let t33;
548
+ if ($[79] !== recordForWrites) {
549
+ t33 = {
508
550
  kind: "record",
509
551
  record: recordForWrites
510
552
  };
511
- $[73] = recordForWrites;
512
- $[74] = t32;
513
- } else t32 = $[74];
514
- t31 = t32;
515
- break bb5;
553
+ $[79] = recordForWrites;
554
+ $[80] = t33;
555
+ } else t33 = $[80];
556
+ t32 = t33;
557
+ break bb6;
516
558
  }
517
559
  if (blockIdForWrites == null) {
518
- t31 = null;
519
- break bb5;
560
+ t32 = null;
561
+ break bb6;
520
562
  }
521
563
  if (currentItemId == null) {
522
- let t32;
523
- if ($[75] !== blockIdForWrites) {
524
- t32 = {
564
+ let t33;
565
+ if ($[81] !== blockIdForWrites) {
566
+ t33 = {
525
567
  kind: "block",
526
568
  blockId: blockIdForWrites
527
569
  };
528
- $[75] = blockIdForWrites;
529
- $[76] = t32;
530
- } else t32 = $[76];
531
- t31 = t32;
532
- break bb5;
570
+ $[81] = blockIdForWrites;
571
+ $[82] = t33;
572
+ } else t33 = $[82];
573
+ t32 = t33;
574
+ break bb6;
533
575
  }
534
- let t32;
535
- if ($[77] !== blockIdForWrites || $[78] !== currentItemId) {
536
- t32 = {
576
+ let t33;
577
+ if ($[83] !== blockIdForWrites || $[84] !== currentItemId) {
578
+ t33 = {
537
579
  kind: "item",
538
580
  blockId: blockIdForWrites,
539
581
  itemId: currentItemId
540
582
  };
541
- $[77] = blockIdForWrites;
542
- $[78] = currentItemId;
543
- $[79] = t32;
544
- } else t32 = $[79];
545
- t31 = t32;
583
+ $[83] = blockIdForWrites;
584
+ $[84] = currentItemId;
585
+ $[85] = t33;
586
+ } else t33 = $[85];
587
+ t32 = t33;
546
588
  }
547
- const writeField = useFieldWriter(t31, currentSchema);
548
- let t32;
549
- if ($[80] !== currentItemId || $[81] !== itemsMap) {
550
- t32 = currentItemId != null ? buildAncestorChain(currentItemId, itemsMap) : [];
551
- $[80] = currentItemId;
552
- $[81] = itemsMap;
553
- $[82] = t32;
554
- } else t32 = $[82];
555
- const ancestorChain = t32;
589
+ const writeField = useFieldWriter(t32, currentSchema);
590
+ let t33;
591
+ if ($[86] !== currentItemId || $[87] !== itemsMap) {
592
+ t33 = currentItemId != null ? buildAncestorChain(currentItemId, itemsMap) : [];
593
+ $[86] = currentItemId;
594
+ $[87] = itemsMap;
595
+ $[88] = t33;
596
+ } else t33 = $[88];
597
+ const ancestorChain = t33;
556
598
  if (!currentSchema || !recordView && (!block || !blockDef)) {
557
- let t33;
558
- if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
559
- t33 = /* @__PURE__ */ jsxs("div", {
599
+ let t34;
600
+ if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
601
+ t34 = /* @__PURE__ */ jsxs("div", {
560
602
  className: "text-muted-foreground flex flex-1 items-center justify-center px-2 text-sm",
561
603
  children: [/* @__PURE__ */ jsx(Spinner, { className: "mr-2 size-3.5" }), " Loading block..."]
562
604
  });
563
- $[83] = t33;
564
- } else t33 = $[83];
565
- return t33;
605
+ $[89] = t34;
606
+ } else t34 = $[89];
607
+ return t34;
566
608
  }
567
609
  const fieldHasOwnView = fieldInfo ? fieldTypesDictionary[fieldInfo.fieldType].hasOwnView : false;
568
- let t33;
569
- if ($[84] !== ancestorChain || $[85] !== currentItemId || $[86] !== fieldHasOwnView || $[87] !== itemsMap || $[88] !== owner || $[89] !== recordView) {
570
- t33 = (block_0, blockDef_0) => [{
610
+ let t34;
611
+ if ($[90] !== ancestorChain || $[91] !== currentItemId || $[92] !== fieldHasOwnView || $[93] !== itemsMap || $[94] !== owner || $[95] !== recordView) {
612
+ t34 = (block_0, blockDef_0) => [{
571
613
  key: "block",
572
614
  label: blockDef_0.title,
573
615
  isCurrent: ancestorChain.length === 0 && !fieldHasOwnView && !recordView,
@@ -622,15 +664,15 @@ const SelectionEditorContent = (t0) => {
622
664
  itemId: ancestor.id
623
665
  })
624
666
  }])];
625
- $[84] = ancestorChain;
626
- $[85] = currentItemId;
627
- $[86] = fieldHasOwnView;
628
- $[87] = itemsMap;
629
- $[88] = owner;
630
- $[89] = recordView;
631
- $[90] = t33;
632
- } else t33 = $[90];
633
- const blockCrumbs = t33;
667
+ $[90] = ancestorChain;
668
+ $[91] = currentItemId;
669
+ $[92] = fieldHasOwnView;
670
+ $[93] = itemsMap;
671
+ $[94] = owner;
672
+ $[95] = recordView;
673
+ $[96] = t34;
674
+ } else t34 = $[96];
675
+ const blockCrumbs = t34;
634
676
  const navigationItems = [
635
677
  {
636
678
  key: "page",
@@ -653,10 +695,10 @@ const SelectionEditorContent = (t0) => {
653
695
  const firstDepth = pageCrumb ? 1 : 2;
654
696
  const front = stackedItems[stackedItems.length - 1];
655
697
  const rows = stackRows(stackedItems, pageCrumb ? 1 : 0);
656
- const t34 = "Selection path";
657
- const t35 = "shrink-0";
658
- const t36 = "flex flex-col";
659
- const t37 = rows.map((row, index) => {
698
+ const t35 = "Selection path";
699
+ const t36 = "shrink-0";
700
+ const t37 = "flex flex-col";
701
+ const t38 = rows.map((row, index) => {
660
702
  const distance = rows.length - 1 - index;
661
703
  const covered = distance > 0;
662
704
  const depth = firstDepth + row.index;
@@ -695,27 +737,32 @@ const SelectionEditorContent = (t0) => {
695
737
  })
696
738
  }, item_0.key);
697
739
  });
698
- let t38;
699
- if ($[91] !== t37) {
700
- t38 = /* @__PURE__ */ jsx("nav", {
701
- "aria-label": t34,
702
- className: t35,
740
+ let t39;
741
+ if ($[97] !== t38) {
742
+ t39 = /* @__PURE__ */ jsx("nav", {
743
+ "aria-label": t35,
744
+ className: t36,
703
745
  children: /* @__PURE__ */ jsx("ol", {
704
- className: t36,
705
- children: t37
746
+ className: t37,
747
+ children: t38
706
748
  })
707
749
  });
708
- $[91] = t37;
709
- $[92] = t38;
710
- } else t38 = $[92];
711
- const t39 = `${block?.id ?? "layout"}:${front?.key}`;
712
- const t40 = firstDepth + stackedItems.length - 1;
713
- let t41;
714
- if ($[93] !== addSibling || $[94] !== assetAccept || $[95] !== assetFieldName || $[96] !== assetType || $[97] !== block || $[98] !== blockDef || $[99] !== canAddSibling || $[100] !== canRemoveCurrent || $[101] !== currentData || $[102] !== currentItem || $[103] !== currentItemId || $[104] !== currentSchema || $[105] !== fieldHasOwnView || $[106] !== fieldIdPrefix || $[107] !== fieldInfo?.fieldName || $[108] !== filesMap || $[109] !== isItemLoading || $[110] !== isMultipleAsset || $[111] !== isViewingAsset || $[112] !== isViewingLink || $[113] !== itemArraySchema || $[114] !== itemSettingsFields || $[115] !== itemsMap || $[116] !== linkFieldName || $[117] !== owner || $[118] !== recordInList || $[119] !== recordView || $[120] !== removeCurrent || $[121] !== send || $[122] !== settingsFields || $[123] !== updateRepeatableSettings || $[124] !== updateSettings || $[125] !== writeField) {
715
- t41 = /* @__PURE__ */ jsx("div", { children: isItemLoading ? /* @__PURE__ */ jsx("div", {
750
+ $[97] = t38;
751
+ $[98] = t39;
752
+ } else t39 = $[98];
753
+ const t40 = `${block?.id ?? "layout"}:${front?.key}`;
754
+ const t41 = firstDepth + stackedItems.length - 1;
755
+ let t42;
756
+ if ($[99] !== addSibling || $[100] !== assetAccept || $[101] !== assetFieldName || $[102] !== assetType || $[103] !== block || $[104] !== blockDef || $[105] !== canAddSibling || $[106] !== canRemoveCurrent || $[107] !== currentData || $[108] !== currentItem || $[109] !== currentItemId || $[110] !== currentSchema || $[111] !== fieldHasOwnView || $[112] !== fieldIdPrefix || $[113] !== fieldInfo || $[114] !== filesMap || $[115] !== findings || $[116] !== isItemLoading || $[117] !== isMultipleAsset || $[118] !== isViewingAsset || $[119] !== isViewingLink || $[120] !== itemArraySchema || $[121] !== itemSettingsFields || $[122] !== itemsMap || $[123] !== linkFieldName || $[124] !== owner || $[125] !== recordInList || $[126] !== recordView || $[127] !== removeCurrent || $[128] !== send || $[129] !== settingsFields || $[130] !== updateRepeatableSettings || $[131] !== updateSettings || $[132] !== writeField) {
757
+ t42 = /* @__PURE__ */ jsx("div", { children: isItemLoading ? /* @__PURE__ */ jsx("div", {
716
758
  className: "flex h-full items-center justify-center py-12",
717
759
  children: /* @__PURE__ */ jsx(Spinner, {})
718
760
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [
761
+ !fieldInfo && /* @__PURE__ */ jsx(ContentFindings, {
762
+ view: findings,
763
+ fields: contentFieldNames(currentSchema),
764
+ className: "space-y-2 px-2 pt-4"
765
+ }),
719
766
  !fieldHasOwnView && !recordView && currentItemId != null && currentItem && /* @__PURE__ */ jsxs(SidebarSection, {
720
767
  divider: "bottom",
721
768
  "aria-label": "List actions",
@@ -915,60 +962,66 @@ const SelectionEditorContent = (t0) => {
915
962
  itemsMap,
916
963
  references: recordView ? recordView.record.references : (currentItem ?? block)?.references,
917
964
  placement: recordView ? recordPlacement(recordView.selection) : void 0,
918
- fieldIdPrefix
919
- }, `${block?.id ?? "layout"}-${recordView ? `record-${recordView.record.id}` : currentItemId ?? "block"}-${fieldInfo?.fieldName ?? "fields"}`)
965
+ fieldIdPrefix,
966
+ fieldHint: (name) => findingsHint(findings, name)
967
+ }, `${block?.id ?? "layout"}-${recordView ? `record-${recordView.record.id}` : currentItemId ?? "block"}-${fieldInfo?.fieldName ?? "fields"}`),
968
+ fieldInfo && /* @__PURE__ */ jsx(ContentFindings, {
969
+ view: findings,
970
+ field: fieldInfo.fieldName
971
+ })
920
972
  ] }) });
921
- $[93] = addSibling;
922
- $[94] = assetAccept;
923
- $[95] = assetFieldName;
924
- $[96] = assetType;
925
- $[97] = block;
926
- $[98] = blockDef;
927
- $[99] = canAddSibling;
928
- $[100] = canRemoveCurrent;
929
- $[101] = currentData;
930
- $[102] = currentItem;
931
- $[103] = currentItemId;
932
- $[104] = currentSchema;
933
- $[105] = fieldHasOwnView;
934
- $[106] = fieldIdPrefix;
935
- $[107] = fieldInfo?.fieldName;
936
- $[108] = filesMap;
937
- $[109] = isItemLoading;
938
- $[110] = isMultipleAsset;
939
- $[111] = isViewingAsset;
940
- $[112] = isViewingLink;
941
- $[113] = itemArraySchema;
942
- $[114] = itemSettingsFields;
943
- $[115] = itemsMap;
944
- $[116] = linkFieldName;
945
- $[117] = owner;
946
- $[118] = recordInList;
947
- $[119] = recordView;
948
- $[120] = removeCurrent;
949
- $[121] = send;
950
- $[122] = settingsFields;
951
- $[123] = updateRepeatableSettings;
952
- $[124] = updateSettings;
953
- $[125] = writeField;
954
- $[126] = t41;
955
- } else t41 = $[126];
956
- let t42;
957
- if ($[127] !== t39 || $[128] !== t40 || $[129] !== t41) {
958
- t42 = /* @__PURE__ */ jsx(SidebarStackView, {
959
- depth: t40,
973
+ $[99] = addSibling;
974
+ $[100] = assetAccept;
975
+ $[101] = assetFieldName;
976
+ $[102] = assetType;
977
+ $[103] = block;
978
+ $[104] = blockDef;
979
+ $[105] = canAddSibling;
980
+ $[106] = canRemoveCurrent;
981
+ $[107] = currentData;
982
+ $[108] = currentItem;
983
+ $[109] = currentItemId;
984
+ $[110] = currentSchema;
985
+ $[111] = fieldHasOwnView;
986
+ $[112] = fieldIdPrefix;
987
+ $[113] = fieldInfo;
988
+ $[114] = filesMap;
989
+ $[115] = findings;
990
+ $[116] = isItemLoading;
991
+ $[117] = isMultipleAsset;
992
+ $[118] = isViewingAsset;
993
+ $[119] = isViewingLink;
994
+ $[120] = itemArraySchema;
995
+ $[121] = itemSettingsFields;
996
+ $[122] = itemsMap;
997
+ $[123] = linkFieldName;
998
+ $[124] = owner;
999
+ $[125] = recordInList;
1000
+ $[126] = recordView;
1001
+ $[127] = removeCurrent;
1002
+ $[128] = send;
1003
+ $[129] = settingsFields;
1004
+ $[130] = updateRepeatableSettings;
1005
+ $[131] = updateSettings;
1006
+ $[132] = writeField;
1007
+ $[133] = t42;
1008
+ } else t42 = $[133];
1009
+ let t43;
1010
+ if ($[134] !== t40 || $[135] !== t41 || $[136] !== t42) {
1011
+ t43 = /* @__PURE__ */ jsx(SidebarStackView, {
1012
+ depth: t41,
960
1013
  className: "relative min-w-0 overflow-x-hidden overflow-y-auto",
961
- children: t41
962
- }, t39);
963
- $[127] = t39;
964
- $[128] = t40;
965
- $[129] = t41;
966
- $[130] = t42;
967
- } else t42 = $[130];
1014
+ children: t42
1015
+ }, t40);
1016
+ $[134] = t40;
1017
+ $[135] = t41;
1018
+ $[136] = t42;
1019
+ $[137] = t43;
1020
+ } else t43 = $[137];
968
1021
  return /* @__PURE__ */ jsxs(Fragment, { children: [
969
1022
  /* @__PURE__ */ jsx(SelectionViewCount, { count: rows.length }),
970
- t38,
971
- t42
1023
+ t39,
1024
+ t43
972
1025
  ] });
973
1026
  };
974
1027
  function _temp(i) {
@@ -3,6 +3,10 @@
3
3
  function contentFieldSchema(schema, fieldName) {
4
4
  return schema?.properties?.[fieldName];
5
5
  }
6
+ /** The names of a block, repeater item or collection content schema's fields. */
7
+ function contentFieldNames(schema) {
8
+ return Object.keys(schema?.properties ?? {});
9
+ }
6
10
 
7
11
  //#endregion
8
- export { contentFieldSchema };
12
+ export { contentFieldNames, contentFieldSchema };