From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001 From: rxliuli Date: Tue, 4 Nov 2025 05:03:50 +0800 Subject: init commit --- .../Annotation/LegacyAnnotationRenderer.svelte | 146 +++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 src/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte (limited to 'src/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte') diff --git a/src/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte b/src/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte new file mode 100644 index 0000000..fc6586f --- /dev/null +++ b/src/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte @@ -0,0 +1,146 @@ + + +{#if shouldRenderAsDefinitionList(items)} +
+ {#each items as annotationItem} +
{annotationItem.heading}
+
{annotationItem.text}
+ {/each} +
+{:else if shouldRenderAsOrderedList(items)} +
    + {#each items as annotationItem} + {#if annotationItem.textPairs} + {#each annotationItem.textPairs as [text, subtext]} +
  1. + {text} + {subtext} +
  2. + {/each} + {:else} +
  3. {annotationItem.text}
  4. + {/if} + {/each} +
+{:else if shouldRenderAsUnorderedList(items)} + +{:else if shouldRenderAsDefinitionListWithHeading(items)} + {@const [heading, ...remainingItems] = items} +
+

{heading.text}

+ +
+ {#each remainingItems as annotationItem} +
{annotationItem.heading}
+
{annotationItem.text}
+ {/each} +
+
+{:else} +
+ + {#if isSome(linkAction) && isFlowAction(linkAction)} + + {linkAction.title} + + {/if} +
+{/if} + + -- cgit v1.2.3