From b4f50f29f718d6d3f6f1299d9acdf6663cb820b6 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Mon, 15 Jan 2024 22:16:36 -0800 Subject: [PATCH 1/2] Update termBank types --- src/types/yomitan/termbank.ts | 37 +++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/types/yomitan/termbank.ts b/src/types/yomitan/termbank.ts index 4c1bb30..5379b33 100644 --- a/src/types/yomitan/termbank.ts +++ b/src/types/yomitan/termbank.ts @@ -11,10 +11,11 @@ type DetailedDefinition = | { type: 'image'; path: string; - width: number; - height: number; - title: string; - description: string; + width?: number; + height?: number; + title?: string; + alt?: string; + description?: string; pixelated?: boolean; imageRendering?: 'auto' | 'pixelated' | 'crisp-edges'; appearance?: 'auto' | 'monochrome'; @@ -31,12 +32,20 @@ type StructuredContentStyle = { fontStyle?: 'normal' | 'italic'; fontWeight?: 'normal' | 'bold'; fontSize?: string; + color?: string; + backgroundColor?: string; textDecorationLine?: | 'none' | 'underline' | 'overline' | 'line-through' | ('underline' | 'overline' | 'line-through')[]; + textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy'; + textDecorationColor?: string; + borderColor?: string; + borderStyle?: string; + borderRadius?: string; + borderWidth?: string; verticalAlign?: | 'baseline' | 'sub' @@ -55,10 +64,20 @@ type StructuredContentStyle = { | 'justify' | 'justify-all' | 'match-parent'; - marginTop?: number; - marginLeft?: number; - marginRight?: number; - marginBottom?: number; + textShadow?: string; + margin?: string; + marginTop?: number | string; + marginLeft?: number | string; + marginRight?: number | string; + marginBottom?: number | string; + padding?: string; + paddingTop?: string; + paddingLeft?: string; + paddingRight?: string; + paddingBottom?: string; + wordBreak?: 'normal' | 'break-all' | 'keep-all'; + whiteSpace?: string; + cursor?: string; listStyleType?: string; }; @@ -89,6 +108,7 @@ type StructuredContentNode = content?: StructuredContentNode; data?: StructuredContentData; style?: StructuredContentStyle; + title?: string; lang?: string; } | { @@ -98,6 +118,7 @@ type StructuredContentNode = width?: number; height?: number; title?: string; + alt?: string; description?: string; pixelated?: boolean; imageRendering?: 'auto' | 'pixelated' | 'crisp-edges'; From c4aa735e8b7263a7fe41b1d6b4354bcc333d2f67 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Tue, 16 Jan 2024 17:21:23 -0800 Subject: [PATCH 2/2] Update readme --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 03976e0..d290451 100644 --- a/readme.md +++ b/readme.md @@ -3,8 +3,9 @@ [![npm](https://img.shields.io/npm/v/yomichan-dict-builder?style=for-the-badge)](https://www.npmjs.com/package/yomichan-dict-builder) This is a library for building dictionaries for -[Yomichan](https://foosoft.net/projects/yomichan/)/[Yomitan](https://github/themoeway/yomitan) -from scratch. +[Yomitan](https://github/themoeway/yomitan) from scratch. Note that Yomichan is +no longer being maintained, and thus is not compatible with some new +dictionaries that are developed using new features exclusive to Yomitan. ## Installation