/** * Array Item Editor * Modal for editing one item of an array of objects (an array card, an inline * array item, a block's nested item). * * The fields inside an item are rendered, wired, and read back by form-generator * — the same code the main editor form uses. This modal owns nothing about how * an individual field looks or behaves. */ import { pushModal, removeModal } from './modal-stack.js'; import { generateFields, setupFieldHandlers, extractItem, bindOriginalValues, } from './form-generator.js'; // Fields inside the modal get their ids prefixed so they can't collide with the // same-named fields on the form behind it — two elements sharing an id would send // a