From 3e579167d0b8c52aa31b1136aaa22aa64f11d12b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Nov 2025 15:56:40 -0400 Subject: data: Content: chop almost everything --- .../composite/things/content/withSourceURLs.js | 62 ---------------------- 1 file changed, 62 deletions(-) delete mode 100644 src/data/composite/things/content/withSourceURLs.js (limited to 'src/data/composite/things/content/withSourceURLs.js') diff --git a/src/data/composite/things/content/withSourceURLs.js b/src/data/composite/things/content/withSourceURLs.js deleted file mode 100644 index f85ff9ea..00000000 --- a/src/data/composite/things/content/withSourceURLs.js +++ /dev/null @@ -1,62 +0,0 @@ -import {input, templateCompositeFrom} from '#composite'; - -import {raiseOutputWithoutDependency} from '#composite/control-flow'; -import {withFilteredList, withMappedList} from '#composite/data'; - -import withAnnotationParts from './withAnnotationParts.js'; - -export default templateCompositeFrom({ - annotation: `withSourceURLs`, - - outputs: ['#sourceURLs'], - - steps: () => [ - withAnnotationParts({ - mode: input.value('nodes'), - }), - - raiseOutputWithoutDependency({ - dependency: '#annotationParts', - output: input.value({'#sourceURLs': []}), - }), - - { - dependencies: ['#annotationParts'], - compute: (continuation, { - ['#annotationParts']: annotationParts, - }) => continuation({ - ['#firstPartWithExternalLink']: - annotationParts - .find(nodes => nodes - .some(node => node.type === 'external-link')) ?? - null, - }), - }, - - raiseOutputWithoutDependency({ - dependency: '#firstPartWithExternalLink', - output: input.value({'#sourceURLs': []}), - }), - - withMappedList({ - list: '#firstPartWithExternalLink', - map: input.value(node => node.type === 'external-link'), - }).outputs({ - '#mappedList': '#externalLinkFilter', - }), - - withFilteredList({ - list: '#firstPartWithExternalLink', - filter: '#externalLinkFilter', - }).outputs({ - '#filteredList': '#externalLinks', - }), - - withMappedList({ - list: '#externalLinks', - map: input.value(node => node.data.href), - }).outputs({ - '#mappedList': '#sourceURLs', - }), - ], -}); -- cgit 1.3.0-6-gf8a5