@agent-native/core-corpus 0.213.1 → 0.214.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 (22) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/community/qr/package.json +1 -1
  3. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +15 -1
  4. package/corpus/templates/content/CHANGELOG.md +5 -0
  5. package/corpus/templates/content/actions/_database-view-setup.ts +305 -11
  6. package/corpus/templates/content/actions/_property-utils.ts +3 -0
  7. package/corpus/templates/content/actions/update-content-database-view.ts +18 -2
  8. package/corpus/templates/content/actions/view-screen.ts +12 -0
  9. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +91 -16
  10. package/corpus/templates/content/app/components/editor/database/ListItemLayout.tsx +410 -0
  11. package/corpus/templates/content/app/components/editor/database/ListItemRow.tsx +426 -0
  12. package/corpus/templates/content/app/components/editor/database/ListView.tsx +136 -18
  13. package/corpus/templates/content/app/components/editor/database/navigation-state.ts +3 -0
  14. package/corpus/templates/content/app/components/editor/database/settings.tsx +3 -3
  15. package/corpus/templates/content/app/components/editor/database/view-config.ts +4 -0
  16. package/corpus/templates/content/app/global.css +13 -0
  17. package/corpus/templates/content/app/i18n-data.ts +32 -0
  18. package/corpus/templates/content/changelog/2026-10-19-list-rows-can-be-customized.md +6 -0
  19. package/corpus/templates/content/changelog/2026-10-19-list-views-fit-phone-screens.md +6 -0
  20. package/corpus/templates/content/shared/api.ts +18 -0
  21. package/corpus/templates/content/shared/database-item-layout.ts +591 -0
  22. package/package.json +1 -1
@@ -172,6 +172,7 @@ export function databaseNavigationState({
172
172
  | "rowDensity"
173
173
  | "openPagesIn"
174
174
  | "formQuestions"
175
+ | "itemLayout"
175
176
  >;
176
177
  searchQuery?: string;
177
178
  sorts?: DatabaseSort[];
@@ -286,6 +287,8 @@ export function databaseNavigationState({
286
287
  : undefined,
287
288
  databaseFormQuestions:
288
289
  activeView.type === "form" ? activeView.formQuestions : undefined,
290
+ databaseItemLayout:
291
+ activeView.type === "list" ? (activeView.itemLayout ?? null) : undefined,
289
292
  databaseVisibleItemCount: visibleItemCount,
290
293
  databaseTotalItemCount: totalItemCount,
291
294
  databaseVisibleItems: databaseVisibleItemSummaries(
@@ -2066,7 +2066,7 @@ function SourceDetailsFieldPicker({
2066
2066
  className={cn(
2067
2067
  "flex size-4 shrink-0 items-center justify-center rounded border",
2068
2068
  selected.has(field.id)
2069
- ? "border-[#2383e2] bg-[#2383e2] text-white"
2069
+ ? "border-database-blue bg-database-blue text-database-blue-foreground"
2070
2070
  : "border-muted-foreground/40 text-transparent",
2071
2071
  )}
2072
2072
  >
@@ -2644,7 +2644,7 @@ function DatabaseSettingsSwitch({
2644
2644
  <span
2645
2645
  className={cn(
2646
2646
  "relative h-5 w-9 rounded-full transition-colors",
2647
- checked ? "bg-[#2383e2]" : "bg-muted-foreground/25",
2647
+ checked ? "bg-database-blue" : "bg-muted-foreground/25",
2648
2648
  )}
2649
2649
  >
2650
2650
  <span
@@ -2683,7 +2683,7 @@ function DatabaseSettingsLayoutPanel({
2683
2683
  className={cn(
2684
2684
  "flex h-16 flex-col items-center justify-center gap-1 rounded-md border text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2685
2685
  activeView.type === type
2686
- ? "border-[#2383e2] bg-[#2383e2]/5 text-[#2383e2]"
2686
+ ? "border-database-blue bg-database-blue/5 text-database-blue"
2687
2687
  : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
2688
2688
  )}
2689
2689
  onClick={() => onViewTypeChange(type)}
@@ -3,6 +3,7 @@ import type {
3
3
  ContentDatabaseViewConfig,
4
4
  ContentDatabaseViewType,
5
5
  } from "@shared/api";
6
+ import { contentDatabaseItemLayoutField } from "@shared/database-item-layout";
6
7
 
7
8
  import {
8
9
  type DatabaseColumnCalculation,
@@ -60,6 +61,7 @@ export function createDatabaseView(
60
61
  rowDensity: normalizeClientDatabaseRowDensity(values.rowDensity),
61
62
  openPagesIn: normalizeClientDatabaseOpenPagesIn(values.openPagesIn),
62
63
  formQuestions: normalizeClientDatabaseFormQuestions(values.formQuestions),
64
+ ...contentDatabaseItemLayoutField(values.itemLayout),
63
65
  };
64
66
  }
65
67
 
@@ -219,6 +221,7 @@ export function duplicateDatabaseView(
219
221
  rowDensity: view.rowDensity,
220
222
  openPagesIn: view.openPagesIn,
221
223
  formQuestions: view.formQuestions,
224
+ itemLayout: view.itemLayout,
222
225
  },
223
226
  view.type,
224
227
  );
@@ -360,6 +363,7 @@ function normalizeClientDatabaseView(
360
363
  rowDensity: normalizeClientDatabaseRowDensity(value.rowDensity),
361
364
  openPagesIn: normalizeClientDatabaseOpenPagesIn(value.openPagesIn),
362
365
  formQuestions: normalizeClientDatabaseFormQuestions(value.formQuestions),
366
+ itemLayout: value.itemLayout,
363
367
  },
364
368
  type,
365
369
  );
@@ -70,10 +70,20 @@
70
70
  --block-bg-purple: #ad46ff19;
71
71
  --block-bg-pink: #f6339a19;
72
72
  --block-bg-red: #fb2c3619;
73
+
74
+ /* Active filter and sort chips in collection views. */
75
+ --database-chip: #2383e2;
76
+ --database-chip-foreground: #0f5ea8;
73
77
  }
74
78
 
75
79
  @theme {
76
80
  --color-sidebar-muted: hsl(var(--sidebar-muted));
81
+ /* Checked, selected, and focused controls in collection views, the same in
82
+ light and dark mode. */
83
+ --color-database-blue: #2383e2;
84
+ --color-database-blue-foreground: #fff;
85
+ --color-database-chip: var(--database-chip);
86
+ --color-database-chip-foreground: var(--database-chip-foreground);
77
87
  /* Comment cards: resting in the margin, floating as a popover, and the
78
88
  lifted state for the hovered, focused, or selected thread. */
79
89
  --shadow-comment-card:
@@ -143,6 +153,9 @@
143
153
  --block-bg-purple: #ad46ff26;
144
154
  --block-bg-pink: #f6339a26;
145
155
  --block-bg-red: #fb2c3626;
156
+
157
+ --database-chip: #529cca;
158
+ --database-chip-foreground: #8ec7ff;
146
159
  }
147
160
 
148
161
  @layer base {
@@ -444,6 +444,38 @@ const databaseMessages = {
444
444
  hideInView: "Hide in view",
445
445
  integrations: "Integrations",
446
446
  list: "List",
447
+ listRows: "Rows",
448
+ listRowsDescription:
449
+ "Pick a preset, or choose what each part of a row shows.",
450
+ listRowsEdit: "Edit rows",
451
+ listRowsDone: "Done",
452
+ listRowsEditOnList: "Edit on the list",
453
+ listRowsEditHint: "Click any part of a row to change it.",
454
+ listRowsPresetDefault: "Default",
455
+ listRowsPresetChecklist: "Checklist",
456
+ listRowsPresetReminders: "Reminders",
457
+ listRowsPresetTracker: "Tracker",
458
+ listRowsPresetDigest: "Digest",
459
+ listRowsNeedsCheckbox: "Needs a checkbox property",
460
+ listRowsNeedsStatus: "Needs a status property",
461
+ listRowsStart: "Start",
462
+ listRowsTitle: "Title",
463
+ listRowsLine2: "Line 2",
464
+ listRowsLine3: "Line 3",
465
+ listRowsEnd: "End",
466
+ listRowsEndHint: "Moves under the title on narrow screens.",
467
+ listRowsChangeSlot: "Change {{slot}}",
468
+ listRowsAddSlot: "Add {{slot}}",
469
+ listRowsPageIcon: "Page icon",
470
+ listRowsCheckbox: "Checkbox",
471
+ listRowsStatus: "Status",
472
+ listRowsRegular: "Regular",
473
+ listRowsMedium: "Medium",
474
+ listRowsBold: "Bold",
475
+ listRowsNothing: "Nothing",
476
+ listRowsOneLine: "1 line",
477
+ listRowsLineCount: "{{count}} lines",
478
+ listRowsNoStatus: "No status",
447
479
  liveWritesOn: "Live writes on",
448
480
  loadingBoard: "Loading board",
449
481
  loadingBuilderModels: "Loading Builder models",
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: added
3
+ date: 2026-10-19
4
+ ---
5
+
6
+ List rows can be customized: start from a preset like **Checklist**, then choose what shows before, under, and after each title
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-19
4
+ ---
5
+
6
+ List views no longer run off the side of the screen on phones
@@ -453,6 +453,22 @@ export interface ContentDatabaseFormQuestion {
453
453
  required: boolean;
454
454
  }
455
455
 
456
+ export type ContentDatabaseItemLeadingKind =
457
+ | "none"
458
+ | "page_icon"
459
+ | "checkbox"
460
+ | "status";
461
+ export type ContentDatabaseItemTitleWeight = "regular" | "medium" | "bold";
462
+
463
+ /** Which property fills each part of a list row. */
464
+ export interface ContentDatabaseItemLayout {
465
+ leading: { kind: ContentDatabaseItemLeadingKind; propertyId: string | null };
466
+ titleWeight: ContentDatabaseItemTitleWeight;
467
+ line2: { propertyId: string | null; lines: 1 | 2 | 3 };
468
+ line3: string[];
469
+ trailing: string[];
470
+ }
471
+
456
472
  export interface ContentDatabaseView {
457
473
  id: string;
458
474
  name: string;
@@ -477,6 +493,8 @@ export interface ContentDatabaseView {
477
493
  rowDensity?: ContentDatabaseRowDensity;
478
494
  openPagesIn?: ContentDatabaseOpenPagesIn;
479
495
  formQuestions?: ContentDatabaseFormQuestion[];
496
+ /** List rows only. Null or absent keeps the default rows. */
497
+ itemLayout?: ContentDatabaseItemLayout | null;
480
498
  }
481
499
 
482
500
  export interface ContentDatabaseViewConfig {