From 112cf48c3877e35a6fd41fc613c33cc46eaf719d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Nov 2025 17:25:50 -0400 Subject: data: ContentEntry: chop contentArtists --- src/data/things/content.js | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/data/things/content.js') diff --git a/src/data/things/content.js b/src/data/things/content.js index 49a9a0d9..8a255ac3 100644 --- a/src/data/things/content.js +++ b/src/data/things/content.js @@ -1,11 +1,12 @@ import {input} from '#composite'; import {transposeArrays} from '#sugar'; import Thing from '#thing'; -import {is, isDate} from '#validators'; +import {is, isDate, validateReferenceList} from '#validators'; import {parseDate} from '#yaml'; import {withFilteredList, withMappedList, withPropertyFromList} from '#composite/data'; +import {withResolvedReferenceList} from '#composite/wiki-data'; import {contentString, simpleDate, soupyFind, thing} from '#composite/wiki-properties'; @@ -19,9 +20,9 @@ import { } from '#composite/control-flow'; import { - contentArtists, hasAnnotationPart, withAnnotationPartNodeLists, + withExpressedOrImplicitArtistReferences, withWebArchiveDate, } from '#composite/things/content'; @@ -31,7 +32,27 @@ export class ContentEntry extends Thing { thing: thing(), - artists: contentArtists(), + artists: [ + withExpressedOrImplicitArtistReferences({ + from: input.updateValue({ + validate: validateReferenceList('artist'), + }), + }), + + exitWithoutDependency({ + dependency: '#artistReferences', + value: input.value([]), + }), + + withResolvedReferenceList({ + list: '#artistReferences', + find: soupyFind.input('artist'), + }), + + exposeDependency({ + dependency: '#resolvedReferenceList', + }), + ], artistText: contentString(), -- cgit 1.3.0-6-gf8a5