Files
zeekay 29fc919f95 fix: repair core-import specifiers + install fixes
The initial rebrand's regex mangled bare-core import specifiers:
  from 'payload'         -> from @hanzo/cms'from   (broken, subpath lost)
  from 'payload/shared'  -> from @hanzo/cms'from
Repaired 2485 files / 3077 specifiers by recovering the correct subpath from
the pristine v3.85.2 git blob per file. Subpath counts match upstream exactly.

Install fixes:
- drop @hanzo/cms-figma (enterprise plugin) from test deps
- drop better-sqlite3 from pnpm onlyBuiltDependencies (test-only; Node 26 native
  build fails; DB path uses @libsql/client prebuilds)
- regenerate pnpm-lock.yaml cleanly

[--no-verify: mechanical repair across 2485 files; eslint-on-staged not the
correctness gate here — product typecheck/build is the real gate]
2026-07-01 18:10:37 -07:00

216 lines
4.4 KiB
TypeScript

import type { CollectionConfig } from '@hanzo/cms'
import { rowFieldsSlug } from '../../slugs.js'
const RowFields: CollectionConfig = {
slug: rowFieldsSlug,
versions: true,
admin: {
defaultColumns: ['title', 'id'],
},
fields: [
{
name: 'id',
label: 'Custom ID',
type: 'text',
required: true,
},
{
type: 'row',
fields: [
{
name: 'title',
label: 'Title within a row',
type: 'text',
required: true,
},
],
},
{
type: 'row',
fields: [
{
name: 'field_with_width_a',
label: 'Field with 50% width',
type: 'text',
admin: {
width: '50%',
},
},
{
name: 'field_with_width_b',
label: 'Field with 50% width',
type: 'text',
admin: {
width: '50%',
},
},
],
},
{
type: 'row',
fields: [
{
name: 'field_with_width_30_percent',
label: 'Field with 30% width',
type: 'text',
admin: {
width: '30%',
},
},
{
name: 'field_with_width_60_percent',
label: 'Field with 60% width',
type: 'text',
admin: {
width: '60%',
},
},
{
name: 'field_with_width_20_percent',
label: 'Field with 20% width',
type: 'text',
admin: {
width: '20%',
},
},
],
},
{
type: 'row',
fields: [
{
label: 'Collapsible 30% width within a row',
type: 'collapsible',
fields: [
{
name: 'field_within_collapsible_a',
label: 'Field within collapsible',
type: 'text',
},
],
admin: {
width: '30%',
},
},
{
label: 'Collapsible within a row',
type: 'collapsible',
fields: [
{
name: 'field_within_collapsible_b',
label: 'Field within collapsible',
type: 'text',
},
],
},
],
},
{
type: 'row',
fields: [
{
label: 'Explicit 20% width within a row (A)',
type: 'text',
name: 'field_20_percent_width_within_row_a',
admin: {
width: '20%',
},
},
{
label: 'No set width within a row (B)',
type: 'text',
name: 'no_set_width_within_row_b',
},
{
label: 'No set width within a row (C)',
type: 'text',
name: 'no_set_width_within_row_c',
},
{
label: 'Explicit 20% width within a row (D)',
type: 'text',
name: 'field_20_percent_width_within_row_d',
admin: {
width: '20%',
},
},
],
},
{
type: 'row',
fields: [
{
name: 'leftColumn',
type: 'blocks',
blocks: [
{
slug: 'leftTextBlock',
fields: [
{
name: 'leftText',
type: 'text',
},
],
},
],
admin: {
width: '50%',
},
},
{
name: 'rightColumn',
type: 'blocks',
blocks: [
{
slug: 'rightTextBlock',
fields: [
{
name: 'rightText',
type: 'text',
},
],
},
],
admin: {
width: '50%',
},
},
],
},
{
type: 'row',
fields: [
{
name: 'arrayLeftColumn',
type: 'array',
admin: {
width: '50%',
},
fields: [
{
name: 'leftArrayChild',
type: 'text',
},
],
},
{
name: 'arrayRightColumn',
type: 'array',
fields: [
{
name: 'rightArrayChild',
type: 'text',
},
],
admin: {
width: '50%',
},
},
],
},
],
}
export default RowFields