import { default as React } from 'react'; import { FieldWidgetComponentProps } from './types.js'; /** * TextAreaField - Multi-line text input widget * Supports configurable row count and preserves whitespace in readonly mode. * * Mobile UX (round 3): when the FIELD METADATA carries `mobile_fullscreen: * true`, an "expand" affordance opens a fullscreen edit dialog — much easier * on phones than tapping a 4-row textarea trapped between other fields. * * That flag has exactly one producer: `ObjectForm` stamps it onto every * long-text field when `ObjectFormSchema.mobile.fullscreenLongText` is set * (`plugin-form/src/ObjectForm.tsx`). It reaches this widget on `field` — the * single metadata carrier since objectui#3233. A `SchemaRenderer`-hosted node * arrives there too: the registry adapter (`withFieldCarrier`) maps the SDUI * `schema` node onto `field` before the widget sees it. * * The affordance, the dialog and the draft/commit semantics live in the shared * `FullscreenFieldEditor` — the same producer stamps the same flag on * rich-text fields, and `RichTextField` renders it from there too * (objectui#3301). Only the EDITOR differs per widget; here it is a * full-height `Textarea`. * * There is deliberately NO widget-prop override. A `mobileFullscreen` * (camelCase) prop was read here and written by nobody in the repo, and the * snake_case `mobile_fullscreen` prop cannot arrive either: the form renderer * strips both `mobile_fullscreen` and `fullscreen` from the props it forwards * to registered widgets (`stripRegisteredFieldProps` in * `components/src/renderers/form/form.tsx`). Reading keys nobody produces * documented a contract that never held and invited the next author to pass a * silently-ignored prop, so the reads are gone (objectui#3232). If a host * override is ever genuinely needed, declare ONE key on * `FieldWidgetComponentProps`, stop stripping it, and have a host pass it. * * ## The character counter (objectui#3408, shared across surfaces in #3417) * * Both editing surfaces below — the inline `