mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
format proper jsdoc
This commit is contained in:
1 parent
bedb810119
commit
1b2ee0f691
6 files changed
+309
-182
No files matched your search
@@ -147,56 +147,65 @@ if (require.main === module) {
|
|||||||
* @see https://github.com/yomidevs/yomitan/blob/master/ext/data/schemas/dictionary-index-schema.json
|
* @see https://github.com/yomidevs/yomitan/blob/master/ext/data/schemas/dictionary-index-schema.json
|
||||||
*/
|
*/
|
||||||
interface DictionaryIndex {
|
interface DictionaryIndex {
|
||||||
|
/** Title of the dictionary. */
|
||||||
title: string;
|
title: string;
|
||||||
// "description": "Title of the dictionary."
|
/** Revision of the dictionary. This value is displayed, and used to check for dictionary updates. */
|
||||||
revision: string;
|
revision: string;
|
||||||
// "description": "Revision of the dictionary. This value is displayed, and used to check for dictionary updates."
|
/** Minimum version of Yomitan that is compatible with this dictionary. */
|
||||||
minimumYomitanVersion?: string;
|
minimumYomitanVersion?: string;
|
||||||
// "description": "Minimum version of Yomitan that is compatible with this dictionary."
|
/**
|
||||||
|
* Whether or not this dictionary contains sequencing information for related terms.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
sequenced?: boolean;
|
sequenced?: boolean;
|
||||||
// "default": false,
|
/** Format of data found in the JSON data files. */
|
||||||
// "description": "Whether or not this dictionary contains sequencing information for related terms."
|
|
||||||
format?: 1 | 2 | 3;
|
format?: 1 | 2 | 3;
|
||||||
// "type": "integer",
|
/** Alias for format. */
|
||||||
// "description": "Format of data found in the JSON data files.",
|
|
||||||
// "enum": [1, 2, 3]
|
|
||||||
version?: 1 | 2 | 3;
|
version?: 1 | 2 | 3;
|
||||||
// "type": "integer",
|
/** Creator of the dictionary. */
|
||||||
// "description": "Alias for format.",
|
|
||||||
// "enum": [1, 2, 3]
|
|
||||||
author?: string;
|
author?: string;
|
||||||
// "description": "Creator of the dictionary."
|
/**
|
||||||
|
* Whether this dictionary contains links to its latest version.
|
||||||
|
* @constant true
|
||||||
|
*/
|
||||||
isUpdatable?: boolean;
|
isUpdatable?: boolean;
|
||||||
// "const": true,
|
/** URL for the index file of the latest revision of the dictionary, used to check for updates. */
|
||||||
// "description": "Whether this dictionary contains links to its latest version."
|
|
||||||
indexUrl?: string;
|
indexUrl?: string;
|
||||||
// "description": "URL for the index file of the latest revision of the dictionary, used to check for updates."
|
/** URL for the download of the latest revision of the dictionary. */
|
||||||
downloadUrl?: string;
|
downloadUrl?: string;
|
||||||
// "description": "URL for the download of the latest revision of the dictionary."
|
/** URL for the source of the dictionary, displayed in the dictionary details. */
|
||||||
url?: string;
|
url?: string;
|
||||||
// "description": "URL for the source of the dictionary, displayed in the dictionary details."
|
/** Description of the dictionary data. */
|
||||||
description?: string;
|
description?: string;
|
||||||
// "description": "Description of the dictionary data."
|
/** Attribution information for the dictionary data. */
|
||||||
attribution?: string;
|
attribution?: string;
|
||||||
// "description": "Attribution information for the dictionary data."
|
/**
|
||||||
|
* Language of the terms in the dictionary.
|
||||||
|
* @ref #/definitions/isoLanguageCode
|
||||||
|
*/
|
||||||
sourceLanguage?: string;
|
sourceLanguage?: string;
|
||||||
// "$ref": "#/definitions/isoLanguageCode",
|
/**
|
||||||
// "description": "Language of the terms in the dictionary."
|
* Main language of the definitions in the dictionary.
|
||||||
|
* @ref #/definitions/isoLanguageCode
|
||||||
|
*/
|
||||||
targetLanguage?: string;
|
targetLanguage?: string;
|
||||||
// "$ref": "#/definitions/isoLanguageCode",
|
|
||||||
// "description": "Main language of the definitions in the dictionary."
|
|
||||||
frequencyMode?: "occurrence-based" | "rank-based";
|
|
||||||
tagMeta?: {
|
|
||||||
// "description": "Tag information for terms and kanji. This object is obsolete and individual tag files should be used instead.",
|
|
||||||
|
|
||||||
// "description": "Information about a single tag. The object key is the name of the tag.",
|
frequencyMode?: "occurrence-based" | "rank-based";
|
||||||
|
/**
|
||||||
|
* Tag information for terms and kanji. This object is obsolete and individual tag files should be used instead.
|
||||||
|
* Information about a single tag. The object key is the name of the tag.
|
||||||
|
*/
|
||||||
|
tagMeta?: {
|
||||||
|
/** Category for the tag. */
|
||||||
category?: string;
|
category?: string;
|
||||||
// "description": "Category for the tag."
|
/** Sorting order for the tag. */
|
||||||
order?: number;
|
order?: number;
|
||||||
// "description": "Sorting order for the tag."
|
/** Notes for the tag. */
|
||||||
notes?: string;
|
notes?: string;
|
||||||
// "description": "Notes for the tag."
|
/** Score used to determine popularity.
|
||||||
|
* Negative values are more rare and positive values are more frequent.
|
||||||
|
* This score is also used to sort search results.
|
||||||
|
*/
|
||||||
score?: number;
|
score?: number;
|
||||||
// "description": "Score used to determine popularity. Negative values are more rare and positive values are more frequent. This score is also used to sort search results."
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -37,20 +37,24 @@ export class KanjiMetaEntry {
|
|||||||
*
|
*
|
||||||
* The meta bank for kanji information. Right now, this is only used to store kanji frequency data.
|
* The meta bank for kanji information. Right now, this is only used to store kanji frequency data.
|
||||||
*
|
*
|
||||||
* @see https://github.com/themoeway/yomitan/tree/master/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json
|
* @see https://github.com/yomidevs/yomitan/tree/master/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json
|
||||||
*/
|
*/
|
||||||
type DictionaryKanjiMetaBankV3 = DictionaryKanjiMeta[];
|
type DictionaryKanjiMetaBankV3 = DictionaryKanjiMeta[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata about a single kanji character.
|
||||||
|
* "minItems": 3,
|
||||||
|
* "maxItems": 3,
|
||||||
|
*/
|
||||||
type DictionaryKanjiMeta = [
|
type DictionaryKanjiMeta = [
|
||||||
// "description": "Metadata about a single kanji character.",
|
/** "minLength": 1 */
|
||||||
// "minItems": 3,
|
string,
|
||||||
// "maxItems": 3,
|
/**
|
||||||
|
* "const": "freq",
|
||||||
|
* Type of data. "freq" corresponds to frequency information.
|
||||||
|
*/
|
||||||
|
string,
|
||||||
|
|
||||||
string,
|
|
||||||
// "minLength": 1
|
|
||||||
string,
|
|
||||||
// "const": "freq",
|
|
||||||
// "description": "Type of data. \"freq\" corresponds to frequency information."
|
|
||||||
Frequency,
|
Frequency,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -39,25 +39,27 @@ export class KanjiEntry {
|
|||||||
*/
|
*/
|
||||||
type DictionaryKanjiBankV3 = DictionaryKanji[];
|
type DictionaryKanjiBankV3 = DictionaryKanji[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a single kanji character.
|
||||||
|
* "minItems": 6,
|
||||||
|
* "maxItems": 6,
|
||||||
|
*/
|
||||||
type DictionaryKanji = [
|
type DictionaryKanji = [
|
||||||
// "description": "Information about a single kanji character.",
|
/**
|
||||||
// "minItems": 6,
|
* Kanji character.
|
||||||
// "maxItems": 6,
|
* "minLength": 1
|
||||||
|
*/
|
||||||
string,
|
string,
|
||||||
// "description": "Kanji character.",
|
/** String of space-separated onyomi readings for the kanji character. An empty string is treated as no readings. */
|
||||||
// "minLength": 1
|
|
||||||
string,
|
string,
|
||||||
// "description": "String of space-separated onyomi readings for the kanji character. An empty string is treated as no readings."
|
/** String of space-separated kunyomi readings for the kanji character. An empty string is treated as no readings. */
|
||||||
string,
|
string,
|
||||||
// "description": "String of space-separated kunyomi readings for the kanji character. An empty string is treated as no readings."
|
/** String of space-separated tags for the kanji character. An empty string is treated as no tags. */
|
||||||
string,
|
string,
|
||||||
// "description": "String of space-separated tags for the kanji character. An empty string is treated as no tags."
|
/** Array of meanings for the kanji character. */
|
||||||
string[],
|
string[],
|
||||||
// "description": "Array of meanings for the kanji character.",
|
/** Various stats for the kanji character. */
|
||||||
|
|
||||||
{
|
{
|
||||||
// "description": "Various stats for the kanji character.",
|
|
||||||
[k: string]: string;
|
[k: string]: string;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -32,21 +32,24 @@ export class TagEntry {
|
|||||||
*/
|
*/
|
||||||
type DictionaryTagBankV3 = DictionaryTag[];
|
type DictionaryTagBankV3 = DictionaryTag[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a single tag.
|
||||||
|
* "minItems": 5,
|
||||||
|
* "maxItems": 5,
|
||||||
|
*/
|
||||||
type DictionaryTag = [
|
type DictionaryTag = [
|
||||||
// "description": "Information about a single tag.",
|
/** Tag name. */
|
||||||
// "minItems": 5,
|
|
||||||
// "maxItems": 5,
|
|
||||||
|
|
||||||
string,
|
string,
|
||||||
// "description": "Tag name."
|
/** Category for the tag. */
|
||||||
string,
|
string,
|
||||||
// "description": "Category for the tag."
|
/** Sorting order for the tag. */
|
||||||
number,
|
number,
|
||||||
// "description": "Sorting order for the tag."
|
/** Notes for the tag. */
|
||||||
string,
|
string,
|
||||||
// "description": "Notes for the tag."
|
/**
|
||||||
|
* Score used to determine popularity.
|
||||||
|
* Negative values are more rare and positive values are more frequent.
|
||||||
|
* This score is also used to sort search results.
|
||||||
|
*/
|
||||||
number,
|
number,
|
||||||
// "description": "Score used to determine popularity.
|
|
||||||
// Negative values are more rare and positive values are more frequent.
|
|
||||||
// This score is also used to sort search results."
|
|
||||||
];
|
];
|
||||||
@@ -89,6 +89,13 @@ export class TermMetaEntry {
|
|||||||
constructor(public json: TermMeta) {}
|
constructor(public json: TermMeta) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* term_meta_bank_${number}.json
|
||||||
|
*
|
||||||
|
* Stores meta information about terms, such as frequency data and pitch accent data.
|
||||||
|
*
|
||||||
|
* @see https://github.com/yomidevs/yomitan/blob/master/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json
|
||||||
|
*/
|
||||||
type DictionaryTermMetaBankV3 = DictionaryTermMeta[];
|
type DictionaryTermMetaBankV3 = DictionaryTermMeta[];
|
||||||
|
|
||||||
type DictionaryTermMeta =
|
type DictionaryTermMeta =
|
||||||
@@ -101,8 +108,8 @@ type DictionaryTermMeta_pitch = [string, "pitch", Pitch];
|
|||||||
type DictionaryTermMeta_ipa = [string, "ipa", IPA];
|
type DictionaryTermMeta_ipa = [string, "ipa", IPA];
|
||||||
|
|
||||||
interface ReadingFrequency {
|
interface ReadingFrequency {
|
||||||
|
/** Reading for the term. */
|
||||||
reading: string;
|
reading: string;
|
||||||
// "description": "Reading for the term."
|
|
||||||
frequency: Frequency;
|
frequency: Frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,40 +122,54 @@ interface PitchEntry {
|
|||||||
position: PitchPosition_integer | PitchPosition_string;
|
position: PitchPosition_integer | PitchPosition_string;
|
||||||
nasal?: PitchNasal | PitchNasal[];
|
nasal?: PitchNasal | PitchNasal[];
|
||||||
devoice?: PitchDevoice | PitchDevoice[];
|
devoice?: PitchDevoice | PitchDevoice[];
|
||||||
|
/** Tag for this pitch accent. This typically corresponds to a certain type of part of speech. */
|
||||||
tags?: string[];
|
tags?: string[];
|
||||||
// "description": "Tag for this pitch accent. This typically corresponds to a certain type of part of speech."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mora position of the pitch accent downstep. A value of 0 indicates that the word does not have a downstep (heiban).
|
||||||
|
*
|
||||||
|
* "minimum": 0,
|
||||||
|
* "type": "integer",
|
||||||
|
*/
|
||||||
type PitchPosition_integer = number;
|
type PitchPosition_integer = number;
|
||||||
// "type": "integer",
|
|
||||||
// "description": "Mora position of the pitch accent downstep. A value of 0 indicates that the word does not have a downstep (heiban).",
|
|
||||||
// "minimum": 0
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pitch level of each mora with H representing high and L representing low.
|
||||||
|
* For example: HHLL for a 4 mora word. Add an additional pitch level at the end to explicitly define the suffix.
|
||||||
|
*
|
||||||
|
* "pattern": "^[HL]+$"
|
||||||
|
*/
|
||||||
type PitchPosition_string = string;
|
type PitchPosition_string = string;
|
||||||
// "type": "string",
|
|
||||||
// "description": "Pitch level of each mora with H representing high and L representing low. For example: HHLL for a 4 mora word. Add an additional pitch level at the end to explicitly define the suffix.",
|
|
||||||
// "pattern": "^[HL]+$"
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Position of a mora with nasal sound.
|
||||||
|
*
|
||||||
|
* "minimum": 0,
|
||||||
|
* "type": "integer",
|
||||||
|
*/
|
||||||
type PitchNasal = number;
|
type PitchNasal = number;
|
||||||
// "type": "integer",
|
|
||||||
// "description": "Position of a mora with nasal sound.",
|
|
||||||
// "minimum": 0
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Position of a mora with devoiced sound.
|
||||||
|
*
|
||||||
|
* "minimum": 0,
|
||||||
|
* "type": "integer",
|
||||||
|
*/
|
||||||
type PitchDevoice = number;
|
type PitchDevoice = number;
|
||||||
// "type": "integer",
|
|
||||||
// "description": "Position of a mora with devoiced sound.",
|
|
||||||
// "minimum": 0
|
|
||||||
|
|
||||||
|
/** IPA transcription information for the term. */
|
||||||
interface IPA {
|
interface IPA {
|
||||||
// "description": "IPA transcription information for the term.",
|
/** Reading for the term. */
|
||||||
reading: string;
|
reading: string;
|
||||||
// "description": "Reading for the term."
|
|
||||||
transcriptions: IPATranscription[];
|
transcriptions: IPATranscription[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** IPA transcription for the term. */
|
||||||
interface IPATranscription {
|
interface IPATranscription {
|
||||||
|
/** IPA transcription for the term. */
|
||||||
ipa?: string;
|
ipa?: string;
|
||||||
// "description": "IPA transcription for the term."
|
/** Tag for this IPA transcription. */
|
||||||
tags: string[];
|
tags: string[];
|
||||||
// "description": "Tag for this IPA transcription."
|
|
||||||
}
|
}
|
||||||
+189
-101
@@ -22,7 +22,7 @@ export class TermEntry {
|
|||||||
]: DictionaryTerm) {
|
]: DictionaryTerm) {
|
||||||
return new TermEntry({
|
return new TermEntry({
|
||||||
text,
|
text,
|
||||||
reading,
|
reading: reading === text ? undefined : reading || undefined,
|
||||||
defTags: defTags ? defTags.split(" ") : undefined,
|
defTags: defTags ? defTags.split(" ") : undefined,
|
||||||
rules: rules ? rules.split(" ") : undefined,
|
rules: rules ? rules.split(" ") : undefined,
|
||||||
popularity,
|
popularity,
|
||||||
@@ -40,35 +40,46 @@ export class TermEntry {
|
|||||||
*
|
*
|
||||||
* The term bank for term information. This is where dictionary readings, definitions, and such are stored.
|
* The term bank for term information. This is where dictionary readings, definitions, and such are stored.
|
||||||
*
|
*
|
||||||
* @see https://github.com/themoeway/yomitan/tree/master/ext/data/schemas/dictionary-term-bank-v3-schema.json
|
* @see https://github.com/yomidevs/yomitan/tree/master/ext/data/schemas/dictionary-term-bank-v3-schema.json
|
||||||
*/
|
*/
|
||||||
type DictionaryTermBankV3 = DictionaryTerm[];
|
type DictionaryTermBankV3 = DictionaryTerm[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a single term.
|
||||||
|
* "minItems": 8,
|
||||||
|
* "maxItems": 8,
|
||||||
|
*/
|
||||||
type DictionaryTerm = [
|
type DictionaryTerm = [
|
||||||
// "description": "Information about a single term.",
|
/** The text for the term. */
|
||||||
// "minItems": 8,
|
string,
|
||||||
// "maxItems": 8,
|
/** Reading of the term, or an empty string if the reading is the same as the term. */
|
||||||
|
string,
|
||||||
|
(
|
||||||
|
/** String of space-separated tags for the definition. An empty string is treated as no tags. */
|
||||||
|
string | null
|
||||||
|
),
|
||||||
|
/**
|
||||||
|
* String of space-separated rule identifiers for the definition which is used to validate deinflection.
|
||||||
|
* An empty string should be used for words which aren't inflected.
|
||||||
|
*/
|
||||||
|
string,
|
||||||
|
/**
|
||||||
|
* Score used to determine popularity.
|
||||||
|
* Negative values are more rare and positive values are more frequent.
|
||||||
|
* This score is also used to sort search results.
|
||||||
|
*/
|
||||||
|
number,
|
||||||
|
|
||||||
string,
|
|
||||||
// "description": "The text for the term."
|
|
||||||
// "description": "Reading of the term, or an empty string if the reading is the same as the term."
|
|
||||||
string,
|
|
||||||
string | null,
|
|
||||||
// "description": "String of space-separated tags for the definition. An empty string is treated as no tags."
|
|
||||||
string,
|
|
||||||
// "description": "String of space-separated rule identifiers for the definition which is used to validate deinflection.
|
|
||||||
// An empty string should be used for words which aren't inflected."
|
|
||||||
number,
|
|
||||||
// "description": "Score used to determine popularity.
|
|
||||||
// Negative values are more rare and positive values are more frequent.
|
|
||||||
// This score is also used to sort search results."
|
|
||||||
DictionaryDefinition,
|
DictionaryDefinition,
|
||||||
|
/**
|
||||||
|
* Sequence number for the term.
|
||||||
|
* Terms with the same sequence number can be shown together when the "resultOutputMode" option is set to "merge".
|
||||||
|
*
|
||||||
|
* "type": "integer",
|
||||||
|
*/
|
||||||
number,
|
number,
|
||||||
// "type": "integer",
|
/** String of space-separated tags for the term. An empty string is treated as no tags. */
|
||||||
// "description": "Sequence number for the term.
|
|
||||||
// Terms with the same sequence number can be shown together when the \"resultOutputMode\" option is set to \"merge\"."
|
|
||||||
string,
|
string,
|
||||||
// "description": "String of space-separated tags for the term. An empty string is treated as no tags."
|
|
||||||
];
|
];
|
||||||
|
|
||||||
type DictionaryDefinition =
|
type DictionaryDefinition =
|
||||||
@@ -81,22 +92,26 @@ type DictionaryDefinitionObject =
|
|||||||
| DictionaryDefinition_structured
|
| DictionaryDefinition_structured
|
||||||
| DictionaryDefinition_img;
|
| DictionaryDefinition_img;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deinflection of the term to an uninflected term.
|
||||||
|
*
|
||||||
|
* "minItems": 2,
|
||||||
|
* "maxItems": 2,
|
||||||
|
*/
|
||||||
type DictionaryDefinitionInflected = [
|
type DictionaryDefinitionInflected = [
|
||||||
// "description": "Deinflection of the term to an uninflected term.",
|
/** The uninflected term. */
|
||||||
// "minItems": 2,
|
|
||||||
// "maxItems": 2,
|
|
||||||
|
|
||||||
string,
|
string,
|
||||||
// "description": "The uninflected term."
|
/**
|
||||||
|
* A chain of inflection rules that produced the inflected term.
|
||||||
|
* Array of single inflection rules.
|
||||||
|
*/
|
||||||
string[],
|
string[],
|
||||||
// "description": "A chain of inflection rules that produced the inflected term",
|
|
||||||
// "description": "A single inflection rule."
|
|
||||||
];
|
];
|
||||||
|
|
||||||
interface DictionaryDefinition_text {
|
interface DictionaryDefinition_text {
|
||||||
type: "text";
|
type: "text";
|
||||||
|
/** Single definition for the term. */
|
||||||
text: string;
|
text: string;
|
||||||
// "description": "Single definition for the term."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DictionaryDefinition_structured {
|
interface DictionaryDefinition_structured {
|
||||||
@@ -107,39 +122,55 @@ interface DictionaryDefinition_structured {
|
|||||||
interface DictionaryDefinition_img {
|
interface DictionaryDefinition_img {
|
||||||
type: "image";
|
type: "image";
|
||||||
path: string;
|
path: string;
|
||||||
|
/**
|
||||||
|
* "type": "integer",
|
||||||
|
* "description": "Preferred width of the image.",
|
||||||
|
* "minimum": 1
|
||||||
|
*/
|
||||||
width?: number;
|
width?: number;
|
||||||
// "type": "integer",
|
/**
|
||||||
// "description": "Preferred width of the image.",
|
* "type": "integer",
|
||||||
// "minimum": 1
|
* "description": "Preferred height of the image.",
|
||||||
|
* "minimum": 1
|
||||||
|
*/
|
||||||
height?: number;
|
height?: number;
|
||||||
// "type": "integer",
|
/** Hover text for the image. */
|
||||||
// "description": "Preferred height of the image.",
|
|
||||||
// "minimum": 1
|
|
||||||
title?: string;
|
title?: string;
|
||||||
// "description": "Hover text for the image."
|
/** Alt text for the image. */
|
||||||
alt?: string;
|
alt?: string;
|
||||||
// "description": "Alt text for the image."
|
/** Description of the image. */
|
||||||
description?: string;
|
description?: string;
|
||||||
// "description": "Description of the image."
|
/**
|
||||||
|
* Whether or not the image should appear pixelated at sizes larger than the image's native resolution.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
pixelated?: boolean;
|
pixelated?: boolean;
|
||||||
// "description": "Whether or not the image should appear pixelated at sizes larger than the image's native resolution.",
|
/**
|
||||||
// "default": false
|
* Controls how the image is rendered. The value of this field supersedes the pixelated field.
|
||||||
|
* @default "auto"
|
||||||
|
*/
|
||||||
imageRendering?: "auto" | "pixelated" | "crisp-edges";
|
imageRendering?: "auto" | "pixelated" | "crisp-edges";
|
||||||
// "description": "Controls how the image is rendered. The value of this field supersedes the pixelated field.",
|
/**
|
||||||
// "default": "auto"
|
* Controls the appearance of the image.
|
||||||
|
* The "monochrome" value will mask the opaque parts of the image using the current text color.
|
||||||
|
* @default "auto"
|
||||||
|
*/
|
||||||
appearance?: "auto" | "monochrome";
|
appearance?: "auto" | "monochrome";
|
||||||
// "description": "Controls the appearance of the image.
|
/**
|
||||||
// The \"monochrome\" value will mask the opaque parts of the image using the current text color.",
|
* Whether or not a background color is displayed behind the image.
|
||||||
// "default": "auto"
|
* @default true
|
||||||
|
*/
|
||||||
background?: boolean;
|
background?: boolean;
|
||||||
// "description": "Whether or not a background color is displayed behind the image.",
|
/**
|
||||||
// "default": true
|
* Whether or not the image is collapsed by default.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
collapsed?: boolean;
|
collapsed?: boolean;
|
||||||
// "description": "Whether or not the image is collapsed by default.",
|
/**
|
||||||
// "default": false
|
* Whether or not the image can be collapsed.
|
||||||
|
* @default true
|
||||||
|
*/
|
||||||
collapsible?: boolean;
|
collapsible?: boolean;
|
||||||
// "description": "Whether or not the image can be collapsed.",
|
|
||||||
// "default": true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type StructuredContent =
|
type StructuredContent =
|
||||||
@@ -168,12 +199,16 @@ interface StructuredContent_table {
|
|||||||
tag: "td" | "th";
|
tag: "td" | "th";
|
||||||
content?: StructuredContent;
|
content?: StructuredContent;
|
||||||
data?: StructuredContentData;
|
data?: StructuredContentData;
|
||||||
|
/**
|
||||||
|
* "type": "integer",
|
||||||
|
* "minimum": 1
|
||||||
|
*/
|
||||||
colSpan?: number;
|
colSpan?: number;
|
||||||
// "type": "integer",
|
/**
|
||||||
// "minimum": 1
|
* "type": "integer",
|
||||||
|
* "minimum": 1
|
||||||
|
*/
|
||||||
rowSpan?: number;
|
rowSpan?: number;
|
||||||
// "type": "integer",
|
|
||||||
// "minimum": 1
|
|
||||||
lang?: string;
|
lang?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,48 +217,65 @@ interface StructuredContent_styled_container {
|
|||||||
content?: StructuredContent;
|
content?: StructuredContent;
|
||||||
data?: StructuredContentData;
|
data?: StructuredContentData;
|
||||||
style: StructuredContentStyle;
|
style: StructuredContentStyle;
|
||||||
|
/** Hover text for the element. */
|
||||||
title?: string;
|
title?: string;
|
||||||
// "description": "Hover text for the element."
|
/** Whether or not the details element is open by default. */
|
||||||
open?: boolean;
|
open?: boolean;
|
||||||
// "description": "Whether or not the details element is open by default."
|
|
||||||
lang?: string;
|
lang?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StructuredContent_img {
|
interface StructuredContent_img {
|
||||||
tag: "img";
|
tag: "img";
|
||||||
data?: StructuredContentData;
|
data?: StructuredContentData;
|
||||||
|
/** Path to the image file in the archive. */
|
||||||
path: string;
|
path: string;
|
||||||
// "description": "Path to the image file in the archive."
|
/**
|
||||||
|
* Preferred width of the image.
|
||||||
|
* "minimum": 0
|
||||||
|
*/
|
||||||
width?: number;
|
width?: number;
|
||||||
// "description": "Preferred width of the image.",
|
/**
|
||||||
// "minimum": 0
|
* Preferred height of the image.
|
||||||
|
* "minimum": 0
|
||||||
|
*/
|
||||||
height?: number;
|
height?: number;
|
||||||
// "description": "Preferred height of the image.",
|
/** Hover text for the image. */
|
||||||
// "minimum": 0
|
|
||||||
title?: string;
|
title?: string;
|
||||||
// "description": "Hover text for the image."
|
/** Alt text for the image. */
|
||||||
alt?: string;
|
alt?: string;
|
||||||
// "description": "Alt text for the image."
|
/** Description of the image. */
|
||||||
description?: string;
|
description?: string;
|
||||||
// "description": "Description of the image."
|
/**
|
||||||
|
* Whether or not the image should appear pixelated at sizes larger than the image's native resolution.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
pixelated?: boolean;
|
pixelated?: boolean;
|
||||||
// "description": "Whether or not the image should appear pixelated at sizes larger than the image's native resolution.",
|
/**
|
||||||
// "default": false
|
* Controls how the image is rendered. The value of this field supersedes the pixelated field.
|
||||||
|
* @default "auto"
|
||||||
|
*/
|
||||||
imageRendering?: "auto" | "pixelated" | "crisp-edges";
|
imageRendering?: "auto" | "pixelated" | "crisp-edges";
|
||||||
// "description": "Controls how the image is rendered. The value of this field supersedes the pixelated field.",
|
/**
|
||||||
// "default": "auto"
|
* Controls the appearance of the image. The "monochrome" value will mask the opaque parts of the image using the current text color.
|
||||||
|
* @default "auto"
|
||||||
|
*/
|
||||||
appearance?: "auto" | "monochrome";
|
appearance?: "auto" | "monochrome";
|
||||||
// "description": "Controls the appearance of the image. The \"monochrome\" value will mask the opaque parts of the image using the current text color.",
|
/**
|
||||||
// "default": "auto"
|
* Whether or not a background color is displayed behind the image.
|
||||||
|
* @default true
|
||||||
|
*/
|
||||||
background?: boolean;
|
background?: boolean;
|
||||||
// "description": "Whether or not a background color is displayed behind the image.",
|
/**
|
||||||
// "default": true
|
* Whether or not the image is collapsed by default.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
collapsed?: boolean;
|
collapsed?: boolean;
|
||||||
// "description": "Whether or not the image is collapsed by default.",
|
/**
|
||||||
// "default": false
|
* Whether or not the image can be collapsed.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
collapsible?: boolean;
|
collapsible?: boolean;
|
||||||
// "description": "Whether or not the image can be collapsed.",
|
/** The vertical alignment of the image. */
|
||||||
// "default": false
|
|
||||||
verticalAlign:
|
verticalAlign:
|
||||||
| "baseline"
|
| "baseline"
|
||||||
| "sub"
|
| "sub"
|
||||||
@@ -233,54 +285,68 @@ interface StructuredContent_img {
|
|||||||
| "middle"
|
| "middle"
|
||||||
| "top"
|
| "top"
|
||||||
| "bottom";
|
| "bottom";
|
||||||
// "description": "The vertical alignment of the image.",
|
/** Shorthand for border width, style, and color. */
|
||||||
border?: string;
|
border?: string;
|
||||||
// "description": "Shorthand for border width, style, and color."
|
/** Roundness of the corners of the image's outer border edge. */
|
||||||
borderRadius?: string;
|
borderRadius?: string;
|
||||||
// "description": "Roundness of the corners of the image's outer border edge."
|
/** The units for the width and height. */
|
||||||
sizeUnits: "px" | "em";
|
sizeUnits: "px" | "em";
|
||||||
// "description": "The units for the width and height.",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StructuredContent_link {
|
interface StructuredContent_link {
|
||||||
tag: "a";
|
tag: "a";
|
||||||
content?: StructuredContent;
|
content?: StructuredContent;
|
||||||
|
/**
|
||||||
|
* The URL for the link. URLs starting with a ? are treated as internal links to other dictionary content.
|
||||||
|
* "pattern": "^(?:https?:|\\?)[\\w\\W]*"
|
||||||
|
*/
|
||||||
href: string;
|
href: string;
|
||||||
// "description": "The URL for the link. URLs starting with a ? are treated as internal links to other dictionary content.",
|
|
||||||
// "pattern": "^(?:https?:|\\?)[\\w\\W]*"
|
|
||||||
lang?: string;
|
lang?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Generic data attributes that should be added to the element. */
|
||||||
interface StructuredContentData {
|
interface StructuredContentData {
|
||||||
// "description": "Generic data attributes that should be added to the element.",
|
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StructuredContentStyle {
|
interface StructuredContentStyle {
|
||||||
|
/**
|
||||||
|
* @default "normal"
|
||||||
|
*/
|
||||||
fontStyle?: "normal" | "italic";
|
fontStyle?: "normal" | "italic";
|
||||||
// "default": "normal"
|
/**
|
||||||
|
* @default "normal"
|
||||||
|
*/
|
||||||
fontWeight?: "normal" | "bold";
|
fontWeight?: "normal" | "bold";
|
||||||
// "default": "normal"
|
/**
|
||||||
|
* @default "medium"
|
||||||
|
*/
|
||||||
fontSize?: string;
|
fontSize?: string;
|
||||||
// "default": "medium"
|
|
||||||
color?: string;
|
color?: string;
|
||||||
background?: string;
|
background?: string;
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
|
/**
|
||||||
|
* @default "none"
|
||||||
|
*/
|
||||||
textDecorationLine?:
|
textDecorationLine?:
|
||||||
| "none"
|
| "none"
|
||||||
| "underline"
|
| "underline"
|
||||||
| "overline"
|
| "overline"
|
||||||
| "line-through"
|
| "line-through"
|
||||||
| StructuredContentStyle_textDecorationLine[];
|
| StructuredContentStyle_textDecorationLine[];
|
||||||
// "default": "none"
|
/**
|
||||||
|
* @default "solid"
|
||||||
|
*/
|
||||||
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | "wavy";
|
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | "wavy";
|
||||||
// "default": "solid"
|
|
||||||
textDecorationColor?: string;
|
textDecorationColor?: string;
|
||||||
borderColor?: string;
|
borderColor?: string;
|
||||||
borderStyle?: string;
|
borderStyle?: string;
|
||||||
borderRadius?: string;
|
borderRadius?: string;
|
||||||
borderWidth?: string;
|
borderWidth?: string;
|
||||||
clipPath?: string;
|
clipPath?: string;
|
||||||
|
/**
|
||||||
|
* @default "baseline"
|
||||||
|
*/
|
||||||
verticalAlign?:
|
verticalAlign?:
|
||||||
| "baseline"
|
| "baseline"
|
||||||
| "sub"
|
| "sub"
|
||||||
@@ -290,7 +356,9 @@ interface StructuredContentStyle {
|
|||||||
| "middle"
|
| "middle"
|
||||||
| "top"
|
| "top"
|
||||||
| "bottom";
|
| "bottom";
|
||||||
// "default": "baseline"
|
/**
|
||||||
|
* @default "start"
|
||||||
|
*/
|
||||||
textAlign?:
|
textAlign?:
|
||||||
| "start"
|
| "start"
|
||||||
| "end"
|
| "end"
|
||||||
@@ -300,35 +368,55 @@ interface StructuredContentStyle {
|
|||||||
| "justify"
|
| "justify"
|
||||||
| "justify-all"
|
| "justify-all"
|
||||||
| "match-parent";
|
| "match-parent";
|
||||||
// "default": "start"
|
|
||||||
textEmphasis?: string;
|
textEmphasis?: string;
|
||||||
textShadow?: string;
|
textShadow?: string;
|
||||||
margin?: string;
|
margin?: string;
|
||||||
|
/**
|
||||||
|
* @default 0
|
||||||
|
*/
|
||||||
marginTop?: number | string;
|
marginTop?: number | string;
|
||||||
// "default": 0
|
/**
|
||||||
|
* @default 0
|
||||||
|
*/
|
||||||
marginLeft?: number | string;
|
marginLeft?: number | string;
|
||||||
// "default": 0
|
/**
|
||||||
|
* @default 0
|
||||||
|
*/
|
||||||
marginRight?: number | string;
|
marginRight?: number | string;
|
||||||
// "default": 0
|
/**
|
||||||
|
* @default 0
|
||||||
|
*/
|
||||||
marginBottom?: number | string;
|
marginBottom?: number | string;
|
||||||
// "default": 0
|
/**
|
||||||
|
* @default 0
|
||||||
|
*/
|
||||||
padding?: string;
|
padding?: string;
|
||||||
paddingTop?: string;
|
paddingTop?: string;
|
||||||
paddingLeft?: string;
|
paddingLeft?: string;
|
||||||
paddingRight?: string;
|
paddingRight?: string;
|
||||||
paddingBottom?: string;
|
paddingBottom?: string;
|
||||||
|
/**
|
||||||
|
* @default "normal"
|
||||||
|
*/
|
||||||
wordBreak?: "normal" | "break-all" | "keep-all";
|
wordBreak?: "normal" | "break-all" | "keep-all";
|
||||||
// "default": "normal"
|
/**
|
||||||
|
* @default "normal"
|
||||||
|
*/
|
||||||
whiteSpace?: string;
|
whiteSpace?: string;
|
||||||
// "default": "normal"
|
/**
|
||||||
|
* @default "auto"
|
||||||
|
*/
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
// "default": "auto"
|
/**
|
||||||
|
* @default "disc"
|
||||||
|
*/
|
||||||
listStyleType?: string;
|
listStyleType?: string;
|
||||||
// "default": "disc"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @default "none"
|
||||||
|
*/
|
||||||
type StructuredContentStyle_textDecorationLine =
|
type StructuredContentStyle_textDecorationLine =
|
||||||
| "underline"
|
| "underline"
|
||||||
| "overline"
|
| "overline"
|
||||||
| "line-through";
|
| "line-through";
|
||||||
// "default": "none"
|
|
||||||
Reference in new issue
Block a user