// What the root publishes for the converted tools (`RootView`): the record// verbs, the table definitions and the titles a link column shows.// The shipping root's are the core's (`AppTables.core`); the fixtures are for// tests and previews only.importCottonValuesimportFoundationimportSwiftUIpublicstructAppTables: Sendable {publiclet records: any Recordspubliclet definitions: TableDefinitionspubliclet linkTitles: LinkTitles/// The root's tables: every verb through the core (`CoreRecords`), the/// shipped built-ins until the catalogue of imported tools answers (the/// root reads the definitions again then). Link titles start empty: a list and a page/// resolve the titles of the rows they read (`Records.linkTitles(for:)`). @MainActorpublicstaticfunc core(_ records: CoreRecords, writer: ScreenWriter) -> AppTables {AppTables( records: records,// What the store last read, until the database's own catalogue is read. definitions: TableDefinitions(records.knownDefinitions, read: false), linkTitles: LinkTitles()) }}extensionLinkTitles {/// Every record's title by id, for link columns.publicinit(_ definitions: [TableDefinition], _ records: [String: [TableRecord]]) {var titles: [String: String] = [:]for definition in definitions {for record in records[definition.id] ?? [] { titles[record.id] = record.said?.slip.name } }self.init(titles) }}