Skip to content

Commit

Permalink
Merge pull request #10 from MarvNC/Update-Schema-Types
Browse files Browse the repository at this point in the history
Update Types for Term Bank Schema Changes
  • Loading branch information
MarvNC authored Jan 17, 2024
2 parents be0d1d9 + c4aa735 commit f73de0e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
37 changes: 29 additions & 8 deletions src/types/yomitan/termbank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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'
Expand All @@ -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;
};

Expand Down Expand Up @@ -89,6 +108,7 @@ type StructuredContentNode =
content?: StructuredContentNode;
data?: StructuredContentData;
style?: StructuredContentStyle;
title?: string;
lang?: string;
}
| {
Expand All @@ -98,6 +118,7 @@ type StructuredContentNode =
width?: number;
height?: number;
title?: string;
alt?: string;
description?: string;
pixelated?: boolean;
imageRendering?: 'auto' | 'pixelated' | 'crisp-edges';
Expand Down

0 comments on commit f73de0e

Please sign in to comment.