3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 07:05:44 +01:00

Answer architecture round 3: one joinsBreaks flag in place of the parted set and its retry loops, a directive link spells its break, and takesMarks names the table's field

This commit is contained in:
2026-10-09 11:55:32 +02:00
committed by Lillem4n
parent e04f026676
commit 77a6806160
6 changed files with 52 additions and 65 deletions
+8 -8
View File
@@ -2,15 +2,15 @@ import type { AttributeVocabulary } from './attribute-vocabulary.ts'
export type InlineNodeModel = {
attributes: AttributeVocabulary
marks: boolean
takesMarks: boolean
textAttribute?: string
}
export const inlineNodes: Readonly<Record<string, InlineNodeModel>> = {
date: { attributes: { localId: 'string', timestamp: 'string' }, marks: true },
emoji: { attributes: { id: 'string', localId: 'string', shortName: 'string', text: 'string' }, marks: true, textAttribute: 'text' },
hardBreak: { attributes: { localId: 'string', text: 'string' }, marks: false },
inlineCard: { attributes: { data: 'json', localId: 'string', url: 'string' }, marks: true },
date: { attributes: { localId: 'string', timestamp: 'string' }, takesMarks: true },
emoji: { attributes: { id: 'string', localId: 'string', shortName: 'string', text: 'string' }, takesMarks: true, textAttribute: 'text' },
hardBreak: { attributes: { localId: 'string', text: 'string' }, takesMarks: false },
inlineCard: { attributes: { data: 'json', localId: 'string', url: 'string' }, takesMarks: true },
mediaInline: {
attributes: {
alt: 'string',
@@ -23,10 +23,10 @@ export const inlineNodes: Readonly<Record<string, InlineNodeModel>> = {
type: 'string',
width: 'number',
},
marks: true,
takesMarks: true,
},
mention: { attributes: { accessLevel: 'string', id: 'string', localId: 'string', text: 'string', userType: 'string' }, marks: true, textAttribute: 'text' },
status: { attributes: { color: 'string', localId: 'string', style: 'string', text: 'string' }, marks: true, textAttribute: 'text' },
mention: { attributes: { accessLevel: 'string', id: 'string', localId: 'string', text: 'string', userType: 'string' }, takesMarks: true, textAttribute: 'text' },
status: { attributes: { color: 'string', localId: 'string', style: 'string', text: 'string' }, takesMarks: true, textAttribute: 'text' },
}
export function inlineNodeModel(type: string): InlineNodeModel | undefined {