yomitan-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +485 -0
- package/dist/anki-connect-BQyCGW3O.cjs +513 -0
- package/dist/anki-connect-BQyCGW3O.cjs.map +1 -0
- package/dist/anki-connect-CPPuhyiQ.js +6 -0
- package/dist/anki-connect-DbrQHphS.js +495 -0
- package/dist/anki-connect-DbrQHphS.js.map +1 -0
- package/dist/anki-connect-DcheJrp-.cjs +6 -0
- package/dist/anki.cjs +1758 -0
- package/dist/anki.cjs.map +1 -0
- package/dist/anki.d.cts +751 -0
- package/dist/anki.d.cts.map +1 -0
- package/dist/anki.d.ts +751 -0
- package/dist/anki.d.ts.map +1 -0
- package/dist/anki.js +1751 -0
- package/dist/anki.js.map +1 -0
- package/dist/audio-D9DvYyB7.d.cts +48 -0
- package/dist/audio-D9DvYyB7.d.cts.map +1 -0
- package/dist/audio-DQulUkDM.d.ts +48 -0
- package/dist/audio-DQulUkDM.d.ts.map +1 -0
- package/dist/audio-url-generator-BXvQaqUi.cjs +4 -0
- package/dist/audio-url-generator-Dy2hb2Mm.cjs +414 -0
- package/dist/audio-url-generator-Dy2hb2Mm.cjs.map +1 -0
- package/dist/audio-url-generator-Qi0rfzHz.js +4 -0
- package/dist/audio-url-generator-pFQAB5Nb.js +390 -0
- package/dist/audio-url-generator-pFQAB5Nb.js.map +1 -0
- package/dist/audio.cjs +7 -0
- package/dist/audio.d.cts +86 -0
- package/dist/audio.d.cts.map +1 -0
- package/dist/audio.d.ts +86 -0
- package/dist/audio.d.ts.map +1 -0
- package/dist/audio.js +4 -0
- package/dist/batch-processor-BR-gB3H3.js +84 -0
- package/dist/batch-processor-BR-gB3H3.js.map +1 -0
- package/dist/batch-processor-CSF1acTw.cjs +3 -0
- package/dist/batch-processor-DFqM_L-_.cjs +91 -0
- package/dist/batch-processor-DFqM_L-_.cjs.map +1 -0
- package/dist/batch-processor-Quo9jUyf.js +3 -0
- package/dist/chunk-BCwAaXi7.cjs +31 -0
- package/dist/cjk-util-Dp0ZU0sh.cjs +167 -0
- package/dist/cjk-util-Dp0ZU0sh.cjs.map +1 -0
- package/dist/cjk-util-DubXBGDG.js +94 -0
- package/dist/cjk-util-DubXBGDG.js.map +1 -0
- package/dist/core-BUpclilG.d.cts +102 -0
- package/dist/core-BUpclilG.d.cts.map +1 -0
- package/dist/core-DFUj5GtA.d.ts +102 -0
- package/dist/core-DFUj5GtA.d.ts.map +1 -0
- package/dist/database.cjs +7 -0
- package/dist/database.d.cts +4 -0
- package/dist/database.d.ts +4 -0
- package/dist/database.js +5 -0
- package/dist/dictionary-D7l-qFt1.d.cts +316 -0
- package/dist/dictionary-D7l-qFt1.d.cts.map +1 -0
- package/dist/dictionary-_vzfBLWi.d.ts +316 -0
- package/dist/dictionary-_vzfBLWi.d.ts.map +1 -0
- package/dist/dictionary-data-util-CHnRdYZ9.cjs +378 -0
- package/dist/dictionary-data-util-CHnRdYZ9.cjs.map +1 -0
- package/dist/dictionary-data-util-CfOLfEDE.js +323 -0
- package/dist/dictionary-data-util-CfOLfEDE.js.map +1 -0
- package/dist/dictionary-database-BDC2f9zc.d.ts +58 -0
- package/dist/dictionary-database-BDC2f9zc.d.ts.map +1 -0
- package/dist/dictionary-database-CU4TsvCC.js +393 -0
- package/dist/dictionary-database-CU4TsvCC.js.map +1 -0
- package/dist/dictionary-database-DsOi04Sg.d.cts +58 -0
- package/dist/dictionary-database-DsOi04Sg.d.cts.map +1 -0
- package/dist/dictionary-database-lvFvftnO.cjs +412 -0
- package/dist/dictionary-database-lvFvftnO.cjs.map +1 -0
- package/dist/dictionary-importer-BkQQSBhm.d.ts +237 -0
- package/dist/dictionary-importer-BkQQSBhm.d.ts.map +1 -0
- package/dist/dictionary-importer-Cen1z6co.js +1821 -0
- package/dist/dictionary-importer-Cen1z6co.js.map +1 -0
- package/dist/dictionary-importer-DYmmWmcX.cjs +8 -0
- package/dist/dictionary-importer-Da3AuTZw.d.cts +237 -0
- package/dist/dictionary-importer-Da3AuTZw.d.cts.map +1 -0
- package/dist/dictionary-importer-Dhn75iZ4.cjs +1834 -0
- package/dist/dictionary-importer-Dhn75iZ4.cjs.map +1 -0
- package/dist/dictionary-importer-xWkel0h-.js +8 -0
- package/dist/dictionary-update-checker-BNE4pGTx.js +4 -0
- package/dist/dictionary-update-checker-Byjvifd2.cjs +75 -0
- package/dist/dictionary-update-checker-Byjvifd2.cjs.map +1 -0
- package/dist/dictionary-update-checker-YdpalZ41.cjs +4 -0
- package/dist/dictionary-update-checker-kKukiovj.js +69 -0
- package/dist/dictionary-update-checker-kKukiovj.js.map +1 -0
- package/dist/display-generator-BGVWiI0t.js +746 -0
- package/dist/display-generator-BGVWiI0t.js.map +1 -0
- package/dist/display-generator-BMQmG5Ov.cjs +9 -0
- package/dist/display-generator-BxZ7mBjP.js +9 -0
- package/dist/display-generator-DyP-HNzP.cjs +758 -0
- package/dist/display-generator-DyP-HNzP.cjs.map +1 -0
- package/dist/errors-BSezaJwm.cjs +35 -0
- package/dist/errors-BSezaJwm.cjs.map +1 -0
- package/dist/errors-DuuDSO5N.js +22 -0
- package/dist/errors-DuuDSO5N.js.map +1 -0
- package/dist/frequency-ranking-BXjfhhUQ.js +3 -0
- package/dist/frequency-ranking-Cx1kkIrw.cjs +3 -0
- package/dist/frequency-ranking-DEJMTMdg.js +159 -0
- package/dist/frequency-ranking-DEJMTMdg.js.map +1 -0
- package/dist/frequency-ranking-DVYxTXN-.cjs +166 -0
- package/dist/frequency-ranking-DVYxTXN-.cjs.map +1 -0
- package/dist/furigana-5HK97CY8.js +4 -0
- package/dist/furigana-9bBI9-qe.d.ts +47 -0
- package/dist/furigana-9bBI9-qe.d.ts.map +1 -0
- package/dist/furigana-B3-0y231.js +471 -0
- package/dist/furigana-B3-0y231.js.map +1 -0
- package/dist/furigana-CjOhzvZt.d.cts +47 -0
- package/dist/furigana-CjOhzvZt.d.cts.map +1 -0
- package/dist/furigana-DpZLcues.cjs +609 -0
- package/dist/furigana-DpZLcues.cjs.map +1 -0
- package/dist/furigana-h3v2ub4-.cjs +4 -0
- package/dist/import.cjs +12 -0
- package/dist/import.d.cts +107 -0
- package/dist/import.d.cts.map +1 -0
- package/dist/import.d.ts +107 -0
- package/dist/import.d.ts.map +1 -0
- package/dist/import.js +9 -0
- package/dist/index.cjs +275 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +211 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +211 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +238 -0
- package/dist/index.js.map +1 -0
- package/dist/json-DGd-cunA.js +17 -0
- package/dist/json-DGd-cunA.js.map +1 -0
- package/dist/json-DKWp-B7Y.cjs +30 -0
- package/dist/json-DKWp-B7Y.cjs.map +1 -0
- package/dist/language-KN_u-nTR.d.ts +104 -0
- package/dist/language-KN_u-nTR.d.ts.map +1 -0
- package/dist/language-xAbQxgXc.d.cts +104 -0
- package/dist/language-xAbQxgXc.d.cts.map +1 -0
- package/dist/language.cjs +15626 -0
- package/dist/language.cjs.map +1 -0
- package/dist/language.d.cts +959 -0
- package/dist/language.d.cts.map +1 -0
- package/dist/language.d.ts +959 -0
- package/dist/language.d.ts.map +1 -0
- package/dist/language.js +15522 -0
- package/dist/language.js.map +1 -0
- package/dist/log-D8KtR3aP.cjs +67 -0
- package/dist/log-D8KtR3aP.cjs.map +1 -0
- package/dist/log-hgSll-dS.js +60 -0
- package/dist/log-hgSll-dS.js.map +1 -0
- package/dist/lookup.cjs +13 -0
- package/dist/lookup.d.cts +161 -0
- package/dist/lookup.d.cts.map +1 -0
- package/dist/lookup.d.ts +161 -0
- package/dist/lookup.d.ts.map +1 -0
- package/dist/lookup.js +10 -0
- package/dist/media-loader-BABA_E4W.js +3 -0
- package/dist/media-loader-Ce9cuANS.cjs +21 -0
- package/dist/media-loader-Ce9cuANS.cjs.map +1 -0
- package/dist/media-loader-qRti-Q6h.js +14 -0
- package/dist/media-loader-qRti-Q6h.js.map +1 -0
- package/dist/media-loader-xlUGaJrx.cjs +3 -0
- package/dist/multi-language-transformer-AlxOM6b3.js +637 -0
- package/dist/multi-language-transformer-AlxOM6b3.js.map +1 -0
- package/dist/multi-language-transformer-MdbQBBOt.cjs +685 -0
- package/dist/multi-language-transformer-MdbQBBOt.cjs.map +1 -0
- package/dist/multi-language-transformer-SEhcJXEB.d.ts +63 -0
- package/dist/multi-language-transformer-SEhcJXEB.d.ts.map +1 -0
- package/dist/multi-language-transformer-Ul9mbRce.d.cts +63 -0
- package/dist/multi-language-transformer-Ul9mbRce.d.cts.map +1 -0
- package/dist/pronunciation-generator-BtBc4q_V.js +397 -0
- package/dist/pronunciation-generator-BtBc4q_V.js.map +1 -0
- package/dist/pronunciation-generator-CBYdXYou.js +4 -0
- package/dist/pronunciation-generator-CFbZlf5J.cjs +445 -0
- package/dist/pronunciation-generator-CFbZlf5J.cjs.map +1 -0
- package/dist/pronunciation-generator-DOz9hEuk.cjs +4 -0
- package/dist/render.cjs +2796 -0
- package/dist/render.cjs.map +1 -0
- package/dist/render.d.cts +424 -0
- package/dist/render.d.cts.map +1 -0
- package/dist/render.d.ts +424 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +2777 -0
- package/dist/render.js.map +1 -0
- package/dist/sentence-parser-BPAJNzqW.js +126 -0
- package/dist/sentence-parser-BPAJNzqW.js.map +1 -0
- package/dist/sentence-parser-BVIOI64h.cjs +132 -0
- package/dist/sentence-parser-BVIOI64h.cjs.map +1 -0
- package/dist/sentence-parser-BoHO3cHn.js +5 -0
- package/dist/sentence-parser-DQVLSW0z.cjs +5 -0
- package/dist/structured-content-generator-BtOApkTW.cjs +4 -0
- package/dist/structured-content-generator-Bx62RYa8.js +4 -0
- package/dist/structured-content-generator-CLnybumI.js +276 -0
- package/dist/structured-content-generator-CLnybumI.js.map +1 -0
- package/dist/structured-content-generator-DrwkB0-k.cjs +282 -0
- package/dist/structured-content-generator-DrwkB0-k.cjs.map +1 -0
- package/dist/text-utilities-B7PIythe.js +8 -0
- package/dist/text-utilities-B7PIythe.js.map +1 -0
- package/dist/text-utilities-Del2Ivkg.cjs +15 -0
- package/dist/text-utilities-Del2Ivkg.cjs.map +1 -0
- package/dist/translator-CRPlPzqi.cjs +1545 -0
- package/dist/translator-CRPlPzqi.cjs.map +1 -0
- package/dist/translator-CWgG5drA.js +1539 -0
- package/dist/translator-CWgG5drA.js.map +1 -0
- package/dist/translator-CaGtJvnQ.cjs +6 -0
- package/dist/translator-Cc6OGxrW.d.ts +180 -0
- package/dist/translator-Cc6OGxrW.d.ts.map +1 -0
- package/dist/translator-CcA-s-W4.d.cts +180 -0
- package/dist/translator-CcA-s-W4.d.cts.map +1 -0
- package/dist/translator-CuJOTK6l.js +6 -0
- package/dist/utilities-C-lbZaJE.cjs +52 -0
- package/dist/utilities-C-lbZaJE.cjs.map +1 -0
- package/dist/utilities-bi3EF-q5.js +33 -0
- package/dist/utilities-bi3EF-q5.js.map +1 -0
- package/package.json +102 -0
package/dist/anki.d.cts
ADDED
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
import { ApiReflectResult, CanAddNotesDetail, CardId, CardInfo, Note, NoteId, NoteInfo, SerializableObject } from "./core-BUpclilG.cjs";
|
|
2
|
+
import { DictionaryEntry, InflectionRuleChainCandidate, KanjiDictionaryEntry, Tag$1 as Tag, TermDictionaryEntry, TermGlossaryContent } from "./dictionary-D7l-qFt1.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/anki/anki-connect.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This class controls communication with Anki via the AnkiConnect plugin.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* This class controls communication with Anki via the AnkiConnect plugin.
|
|
10
|
+
*/
|
|
11
|
+
declare class AnkiConnect {
|
|
12
|
+
private _enabled;
|
|
13
|
+
private _server;
|
|
14
|
+
private _localVersion;
|
|
15
|
+
private _remoteVersion;
|
|
16
|
+
private _versionCheckPromise;
|
|
17
|
+
private _apiKey;
|
|
18
|
+
constructor(config?: {
|
|
19
|
+
server?: string;
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
});
|
|
22
|
+
get server(): string | null;
|
|
23
|
+
set server(value: string);
|
|
24
|
+
get enabled(): boolean;
|
|
25
|
+
set enabled(value: boolean);
|
|
26
|
+
get apiKey(): string | null;
|
|
27
|
+
set apiKey(value: string | null);
|
|
28
|
+
/**
|
|
29
|
+
* Checks whether a connection to AnkiConnect can be established.
|
|
30
|
+
*/
|
|
31
|
+
isConnected(): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the AnkiConnect API version number.
|
|
34
|
+
*/
|
|
35
|
+
getVersion(): Promise<number | null>;
|
|
36
|
+
addNote(note: Note): Promise<NoteId | null>;
|
|
37
|
+
addNotes(notes: Note[]): Promise<(number | null)[] | null>;
|
|
38
|
+
updateNoteFields(noteWithId: Note & {
|
|
39
|
+
id?: NoteId;
|
|
40
|
+
}): Promise<null>;
|
|
41
|
+
canAddNotes(notes: Note[]): Promise<boolean[]>;
|
|
42
|
+
canAddNotesWithErrorDetail(notes: Note[]): Promise<CanAddNotesDetail[]>;
|
|
43
|
+
notesInfo(noteIds: NoteId[]): Promise<(NoteInfo | null)[]>;
|
|
44
|
+
cardsInfo(cardIds: CardId[]): Promise<(CardInfo | null)[]>;
|
|
45
|
+
getDeckNames(): Promise<string[]>;
|
|
46
|
+
getModelNames(): Promise<string[]>;
|
|
47
|
+
getModelFieldNames(modelName: string): Promise<string[]>;
|
|
48
|
+
guiBrowse(query: string): Promise<CardId[]>;
|
|
49
|
+
guiBrowseNote(noteId: NoteId): Promise<CardId[]>;
|
|
50
|
+
guiBrowseNotes(noteIds: NoteId[]): Promise<CardId[]>;
|
|
51
|
+
guiEditNote(noteId: NoteId): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Stores a file with the specified base64-encoded content inside Anki's media folder.
|
|
54
|
+
*/
|
|
55
|
+
storeMediaFile(fileName: string, content: string): Promise<string | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Finds notes matching a query.
|
|
58
|
+
*/
|
|
59
|
+
findNotes(query: string): Promise<NoteId[]>;
|
|
60
|
+
findNoteIds(notes: Note[]): Promise<NoteId[][]>;
|
|
61
|
+
suspendCards(cardIds: CardId[]): Promise<boolean>;
|
|
62
|
+
findCards(query: string): Promise<CardId[]>;
|
|
63
|
+
findCardsForNote(noteId: NoteId): Promise<CardId[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets information about the AnkiConnect APIs available.
|
|
66
|
+
*/
|
|
67
|
+
apiReflect(scopes: string[], actions?: string[] | null): Promise<ApiReflectResult>;
|
|
68
|
+
/**
|
|
69
|
+
* Checks whether a specific API action exists.
|
|
70
|
+
*/
|
|
71
|
+
apiExists(action: string): Promise<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if a specific error object corresponds to an unsupported action.
|
|
74
|
+
*/
|
|
75
|
+
isErrorUnsupportedAction(error: Error): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Makes Anki sync.
|
|
78
|
+
*/
|
|
79
|
+
makeAnkiSync(): Promise<unknown | null>;
|
|
80
|
+
private _checkVersion;
|
|
81
|
+
private _invoke;
|
|
82
|
+
private _invokeMulti;
|
|
83
|
+
private _escapeQuery;
|
|
84
|
+
private _fieldsToQuery;
|
|
85
|
+
private _getDuplicateScopeFromNote;
|
|
86
|
+
private _getNoteQuery;
|
|
87
|
+
private _getVersion;
|
|
88
|
+
private _createError;
|
|
89
|
+
private _createUnexpectedResultError;
|
|
90
|
+
private _getTypeName;
|
|
91
|
+
private _normalizeArray;
|
|
92
|
+
private _normalizeNoteInfoArray;
|
|
93
|
+
private _normalizeCardInfoArray;
|
|
94
|
+
private _normalizeCanAddNotesWithErrorDetailArray;
|
|
95
|
+
} //#endregion
|
|
96
|
+
//#region src/anki/anki-note-builder.d.ts
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=anki-connect.d.ts.map
|
|
99
|
+
/**
|
|
100
|
+
* Represents a template rendering result.
|
|
101
|
+
*/
|
|
102
|
+
type RenderResult = {
|
|
103
|
+
result: string;
|
|
104
|
+
requirements: Requirement[];
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Represents a rendering response from renderMulti.
|
|
108
|
+
*/
|
|
109
|
+
type RenderMultiResponse = {
|
|
110
|
+
result?: RenderResult;
|
|
111
|
+
error?: SerializedError;
|
|
112
|
+
};
|
|
113
|
+
type SerializedError = {
|
|
114
|
+
name?: string;
|
|
115
|
+
message?: string;
|
|
116
|
+
stack?: string;
|
|
117
|
+
data?: unknown;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Interface for a template renderer that can be injected into AnkiNoteBuilder.
|
|
121
|
+
*/
|
|
122
|
+
interface TemplateRenderer {
|
|
123
|
+
getModifiedData(data: {
|
|
124
|
+
marker: string;
|
|
125
|
+
commonData: CommonData;
|
|
126
|
+
}, type: string): Promise<NoteData>;
|
|
127
|
+
renderMulti(items: RenderMultiItem[]): Promise<RenderMultiResponse[]>;
|
|
128
|
+
}
|
|
129
|
+
type RenderMultiItem = {
|
|
130
|
+
template: string;
|
|
131
|
+
templateItems: RenderMultiTemplateItem$1[];
|
|
132
|
+
};
|
|
133
|
+
type RenderMultiTemplateItem$1 = {
|
|
134
|
+
type: string;
|
|
135
|
+
commonData: CommonData;
|
|
136
|
+
datas: PartialRenderData$1[];
|
|
137
|
+
};
|
|
138
|
+
type PartialRenderData$1 = {
|
|
139
|
+
marker: string;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Common data passed through the template rendering process.
|
|
143
|
+
*/
|
|
144
|
+
type CommonData = {
|
|
145
|
+
dictionaryEntry: DictionaryEntry;
|
|
146
|
+
cardFormat: AnkiCardFormat;
|
|
147
|
+
context: Context;
|
|
148
|
+
resultOutputMode: ResultOutputMode;
|
|
149
|
+
glossaryLayoutMode: GlossaryLayoutMode;
|
|
150
|
+
compactTags: boolean;
|
|
151
|
+
media?: Media;
|
|
152
|
+
dictionaryStylesMap: Map<string, string>;
|
|
153
|
+
};
|
|
154
|
+
type AnkiCardFormat = {
|
|
155
|
+
deck: string;
|
|
156
|
+
model: string;
|
|
157
|
+
fields: {
|
|
158
|
+
[fieldName: string]: {
|
|
159
|
+
value: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
type Context = {
|
|
164
|
+
url: string;
|
|
165
|
+
sentence?: {
|
|
166
|
+
text: string;
|
|
167
|
+
offset: number;
|
|
168
|
+
};
|
|
169
|
+
query: string;
|
|
170
|
+
fullQuery: string;
|
|
171
|
+
documentTitle?: string;
|
|
172
|
+
};
|
|
173
|
+
type ResultOutputMode = 'group' | 'merge' | 'split';
|
|
174
|
+
type GlossaryLayoutMode = 'default' | 'compact' | 'compact-popup-anki';
|
|
175
|
+
type MediaObject = {
|
|
176
|
+
value: string;
|
|
177
|
+
};
|
|
178
|
+
type Media = {
|
|
179
|
+
audio?: MediaObject;
|
|
180
|
+
screenshot?: MediaObject;
|
|
181
|
+
clipboardImage?: MediaObject;
|
|
182
|
+
clipboardText?: MediaObject;
|
|
183
|
+
popupSelectionText?: MediaObject;
|
|
184
|
+
textFurigana: TextFuriganaSegment[];
|
|
185
|
+
dictionaryMedia: DictionaryMedia;
|
|
186
|
+
};
|
|
187
|
+
type TextFuriganaSegment = {
|
|
188
|
+
text: string;
|
|
189
|
+
readingMode: TextFuriganaReadingMode | null;
|
|
190
|
+
detailsHtml: MediaObject;
|
|
191
|
+
detailsPlain: MediaObject;
|
|
192
|
+
};
|
|
193
|
+
type TextFuriganaReadingMode = 'hiragana' | 'katakana';
|
|
194
|
+
type DictionaryMedia = {
|
|
195
|
+
[dictionary: string]: {
|
|
196
|
+
[path: string]: MediaObject;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
type NoteData = Record<string, unknown>;
|
|
200
|
+
type Requirement = {
|
|
201
|
+
type: 'audio';
|
|
202
|
+
} | {
|
|
203
|
+
type: 'screenshot';
|
|
204
|
+
} | {
|
|
205
|
+
type: 'clipboardImage';
|
|
206
|
+
} | {
|
|
207
|
+
type: 'clipboardText';
|
|
208
|
+
} | {
|
|
209
|
+
type: 'popupSelectionText';
|
|
210
|
+
} | {
|
|
211
|
+
type: 'textFurigana';
|
|
212
|
+
text: string;
|
|
213
|
+
readingMode: TextFuriganaReadingMode | null;
|
|
214
|
+
} | {
|
|
215
|
+
type: 'dictionaryMedia';
|
|
216
|
+
dictionary: string;
|
|
217
|
+
path: string;
|
|
218
|
+
};
|
|
219
|
+
type CreateNoteDetails = {
|
|
220
|
+
dictionaryEntry: DictionaryEntry;
|
|
221
|
+
cardFormat: AnkiCardFormat;
|
|
222
|
+
context: Context;
|
|
223
|
+
template: string;
|
|
224
|
+
tags?: string[];
|
|
225
|
+
requirements?: Requirement[];
|
|
226
|
+
duplicateScope?: string;
|
|
227
|
+
duplicateScopeCheckAllModels?: boolean;
|
|
228
|
+
resultOutputMode?: ResultOutputMode;
|
|
229
|
+
glossaryLayoutMode?: GlossaryLayoutMode;
|
|
230
|
+
compactTags?: boolean;
|
|
231
|
+
mediaOptions?: MediaOptions | null;
|
|
232
|
+
dictionaryStylesMap?: Map<string, string>;
|
|
233
|
+
};
|
|
234
|
+
type MediaOptions = {
|
|
235
|
+
audio?: {
|
|
236
|
+
sources: {
|
|
237
|
+
type: string;
|
|
238
|
+
url: string;
|
|
239
|
+
voice: string;
|
|
240
|
+
}[];
|
|
241
|
+
preferredAudioIndex: number | null;
|
|
242
|
+
idleTimeout: number | null;
|
|
243
|
+
languageSummary: unknown;
|
|
244
|
+
enableDefaultAudioSources: boolean;
|
|
245
|
+
};
|
|
246
|
+
screenshot?: {
|
|
247
|
+
format: string;
|
|
248
|
+
quality: number;
|
|
249
|
+
contentOrigin: {
|
|
250
|
+
tabId: number;
|
|
251
|
+
frameId: number;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
textParsing?: {
|
|
255
|
+
optionsContext: unknown;
|
|
256
|
+
scanLength: number;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
type CreateNoteResult = {
|
|
260
|
+
note: Note;
|
|
261
|
+
errors: Error[];
|
|
262
|
+
requirements: Requirement[];
|
|
263
|
+
};
|
|
264
|
+
type InjectAnkiNoteMediaDefinitionDetails = {
|
|
265
|
+
type: 'kanji';
|
|
266
|
+
character: string;
|
|
267
|
+
} | {
|
|
268
|
+
type: 'term';
|
|
269
|
+
term: string;
|
|
270
|
+
reading: string;
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* Minimal API interface needed by AnkiNoteBuilder for media injection.
|
|
274
|
+
*/
|
|
275
|
+
interface MinimalApi {
|
|
276
|
+
injectAnkiNoteMedia(timestamp: number, dictionaryEntryDetails: InjectAnkiNoteMediaDefinitionDetails, audioDetails: unknown, screenshotDetails: unknown, clipboardDetails: {
|
|
277
|
+
image: boolean;
|
|
278
|
+
text: boolean;
|
|
279
|
+
}, dictionaryMediaDetails: {
|
|
280
|
+
dictionary: string;
|
|
281
|
+
path: string;
|
|
282
|
+
}[]): Promise<{
|
|
283
|
+
audioFileName: string | null;
|
|
284
|
+
screenshotFileName: string | null;
|
|
285
|
+
clipboardImageFileName: string | null;
|
|
286
|
+
clipboardText: string | null;
|
|
287
|
+
dictionaryMedia: {
|
|
288
|
+
dictionary: string;
|
|
289
|
+
path: string;
|
|
290
|
+
fileName: string | null;
|
|
291
|
+
}[];
|
|
292
|
+
errors: SerializedError[];
|
|
293
|
+
}>;
|
|
294
|
+
parseText(text: string, optionsContext: unknown, scanLength: number, useInternalParser: boolean, useMecabParser: boolean): Promise<{
|
|
295
|
+
source: string;
|
|
296
|
+
content: unknown;
|
|
297
|
+
}[]>;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Builds Anki notes from dictionary entries using template rendering.
|
|
301
|
+
*/
|
|
302
|
+
declare class AnkiNoteBuilder {
|
|
303
|
+
private _api;
|
|
304
|
+
private _markerPattern;
|
|
305
|
+
private _templateRenderer;
|
|
306
|
+
private _batchedRequests;
|
|
307
|
+
private _batchedRequestsQueued;
|
|
308
|
+
constructor(templateRenderer: TemplateRenderer, api?: MinimalApi);
|
|
309
|
+
createNote({
|
|
310
|
+
dictionaryEntry,
|
|
311
|
+
cardFormat,
|
|
312
|
+
context,
|
|
313
|
+
template,
|
|
314
|
+
tags,
|
|
315
|
+
requirements,
|
|
316
|
+
duplicateScope,
|
|
317
|
+
duplicateScopeCheckAllModels,
|
|
318
|
+
resultOutputMode,
|
|
319
|
+
glossaryLayoutMode,
|
|
320
|
+
compactTags,
|
|
321
|
+
mediaOptions,
|
|
322
|
+
dictionaryStylesMap
|
|
323
|
+
}: CreateNoteDetails): Promise<CreateNoteResult>;
|
|
324
|
+
getRenderingData({
|
|
325
|
+
dictionaryEntry,
|
|
326
|
+
cardFormat,
|
|
327
|
+
context,
|
|
328
|
+
resultOutputMode,
|
|
329
|
+
glossaryLayoutMode,
|
|
330
|
+
compactTags,
|
|
331
|
+
marker,
|
|
332
|
+
dictionaryStylesMap
|
|
333
|
+
}: {
|
|
334
|
+
dictionaryEntry: DictionaryEntry;
|
|
335
|
+
cardFormat: AnkiCardFormat;
|
|
336
|
+
context: Context;
|
|
337
|
+
resultOutputMode?: ResultOutputMode;
|
|
338
|
+
glossaryLayoutMode?: GlossaryLayoutMode;
|
|
339
|
+
compactTags?: boolean;
|
|
340
|
+
marker: string;
|
|
341
|
+
dictionaryStylesMap: Map<string, string>;
|
|
342
|
+
}): Promise<NoteData>;
|
|
343
|
+
getDictionaryEntryDetailsForNote(dictionaryEntry: DictionaryEntry): InjectAnkiNoteMediaDefinitionDetails;
|
|
344
|
+
private _createData;
|
|
345
|
+
private _formatField;
|
|
346
|
+
private _stringReplaceAsync;
|
|
347
|
+
private _getBatchedTemplateGroup;
|
|
348
|
+
private _renderTemplateBatched;
|
|
349
|
+
private _runBatchedRequestsDelayed;
|
|
350
|
+
private _runBatchedRequests;
|
|
351
|
+
private _resolveBatchedRequests;
|
|
352
|
+
private _injectMedia;
|
|
353
|
+
private _deserializeError;
|
|
354
|
+
} //#endregion
|
|
355
|
+
//#region src/anki/anki-note-data-creator.d.ts
|
|
356
|
+
|
|
357
|
+
//# sourceMappingURL=anki-note-builder.d.ts.map
|
|
358
|
+
type NoteData$1 = {
|
|
359
|
+
marker: string;
|
|
360
|
+
definition: AnkiDictionaryEntry;
|
|
361
|
+
glossaryLayoutMode: GlossaryLayoutMode;
|
|
362
|
+
compactTags: boolean;
|
|
363
|
+
group: boolean;
|
|
364
|
+
merge: boolean;
|
|
365
|
+
compactGlossaries: boolean;
|
|
366
|
+
uniqueExpressions: string[];
|
|
367
|
+
uniqueReadings: string[];
|
|
368
|
+
pitches: PitchGroup[];
|
|
369
|
+
pitchCount: number;
|
|
370
|
+
phoneticTranscriptions: TranscriptionGroup[];
|
|
371
|
+
context: PublicContext;
|
|
372
|
+
media: Media;
|
|
373
|
+
dictionaryEntry: DictionaryEntry;
|
|
374
|
+
};
|
|
375
|
+
type PublicContext = {
|
|
376
|
+
query: string;
|
|
377
|
+
fullQuery: string;
|
|
378
|
+
document: {
|
|
379
|
+
title: string;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
type AnkiDictionaryEntry = AnkiTermDictionaryEntry | AnkiKanjiDictionaryEntry | Record<string, never>;
|
|
383
|
+
type TermDictionaryEntryType = 'term' | 'termGrouped' | 'termMerged';
|
|
384
|
+
type Tag$1 = {
|
|
385
|
+
name: string;
|
|
386
|
+
category: string;
|
|
387
|
+
notes: string;
|
|
388
|
+
order: number;
|
|
389
|
+
score: number;
|
|
390
|
+
dictionary: string;
|
|
391
|
+
redundant: boolean;
|
|
392
|
+
};
|
|
393
|
+
type PitchTag = {
|
|
394
|
+
name: string;
|
|
395
|
+
category: string;
|
|
396
|
+
order: number;
|
|
397
|
+
score: number;
|
|
398
|
+
content: string[];
|
|
399
|
+
dictionaries: string[];
|
|
400
|
+
redundant: boolean;
|
|
401
|
+
};
|
|
402
|
+
type Pitch = {
|
|
403
|
+
expressions: string[];
|
|
404
|
+
reading: string;
|
|
405
|
+
positions: number | string;
|
|
406
|
+
nasalPositions: number[];
|
|
407
|
+
devoicePositions: number[];
|
|
408
|
+
tags: PitchTag[];
|
|
409
|
+
exclusiveExpressions: string[];
|
|
410
|
+
exclusiveReadings: string[];
|
|
411
|
+
};
|
|
412
|
+
type PitchGroup = {
|
|
413
|
+
dictionary: string;
|
|
414
|
+
pitches: Pitch[];
|
|
415
|
+
};
|
|
416
|
+
type Transcription = {
|
|
417
|
+
expressions: string[];
|
|
418
|
+
reading: string;
|
|
419
|
+
ipa: string;
|
|
420
|
+
tags: Tag[];
|
|
421
|
+
exclusiveExpressions: string[];
|
|
422
|
+
exclusiveReadings: string[];
|
|
423
|
+
};
|
|
424
|
+
type TranscriptionGroup = {
|
|
425
|
+
dictionary: string;
|
|
426
|
+
phoneticTranscriptions: Transcription[];
|
|
427
|
+
};
|
|
428
|
+
type FuriganaSegment = {
|
|
429
|
+
text: string;
|
|
430
|
+
furigana: string;
|
|
431
|
+
};
|
|
432
|
+
type Cloze = {
|
|
433
|
+
sentence: string;
|
|
434
|
+
prefix: string;
|
|
435
|
+
body: string;
|
|
436
|
+
bodyKana: string;
|
|
437
|
+
suffix: string;
|
|
438
|
+
};
|
|
439
|
+
type FrequencyNumber = {
|
|
440
|
+
dictionary: string;
|
|
441
|
+
frequency: number;
|
|
442
|
+
};
|
|
443
|
+
type TermFrequencyEntry = {
|
|
444
|
+
index: number;
|
|
445
|
+
expressionIndex: number;
|
|
446
|
+
dictionary: string;
|
|
447
|
+
dictionaryAlias: string;
|
|
448
|
+
dictionaryOrder: {
|
|
449
|
+
index: number;
|
|
450
|
+
};
|
|
451
|
+
expression: string;
|
|
452
|
+
reading: string;
|
|
453
|
+
hasReading: boolean;
|
|
454
|
+
frequency: number | string;
|
|
455
|
+
};
|
|
456
|
+
type TermPitchAccent = {
|
|
457
|
+
index: number;
|
|
458
|
+
expressionIndex: number;
|
|
459
|
+
dictionary: string;
|
|
460
|
+
dictionaryAlias: string;
|
|
461
|
+
dictionaryOrder: {
|
|
462
|
+
index: number;
|
|
463
|
+
};
|
|
464
|
+
expression: string;
|
|
465
|
+
reading: string;
|
|
466
|
+
pitches: {
|
|
467
|
+
positions: number | string;
|
|
468
|
+
tags: Tag$1[];
|
|
469
|
+
}[];
|
|
470
|
+
};
|
|
471
|
+
type TermPhoneticTranscription = {
|
|
472
|
+
index: number;
|
|
473
|
+
expressionIndex: number;
|
|
474
|
+
dictionary: string;
|
|
475
|
+
dictionaryAlias: string;
|
|
476
|
+
dictionaryOrder: {
|
|
477
|
+
index: number;
|
|
478
|
+
};
|
|
479
|
+
expression: string;
|
|
480
|
+
reading: string;
|
|
481
|
+
phoneticTranscriptions: {
|
|
482
|
+
ipa: string;
|
|
483
|
+
tags: Tag$1[];
|
|
484
|
+
}[];
|
|
485
|
+
};
|
|
486
|
+
type TermHeadword = {
|
|
487
|
+
sourceTerm: string;
|
|
488
|
+
expression: string;
|
|
489
|
+
reading: string;
|
|
490
|
+
termTags: Tag$1[];
|
|
491
|
+
frequencies: TermFrequencyEntry[];
|
|
492
|
+
pitches: TermPitchAccent[];
|
|
493
|
+
furiganaSegments: FuriganaSegment[];
|
|
494
|
+
termFrequency: 'popular' | 'rare' | 'normal';
|
|
495
|
+
wordClasses: string[];
|
|
496
|
+
};
|
|
497
|
+
type TermDefinition = {
|
|
498
|
+
sequence: number;
|
|
499
|
+
dictionary: string;
|
|
500
|
+
dictionaryAlias: string;
|
|
501
|
+
glossaryScopedStyles: string;
|
|
502
|
+
dictScopedStyles: string;
|
|
503
|
+
glossary: TermGlossaryContent[];
|
|
504
|
+
definitionTags: Tag$1[];
|
|
505
|
+
only?: string[];
|
|
506
|
+
};
|
|
507
|
+
type KanjiStat = {
|
|
508
|
+
name: string;
|
|
509
|
+
category: string;
|
|
510
|
+
notes: string;
|
|
511
|
+
order: number;
|
|
512
|
+
score: number;
|
|
513
|
+
dictionary: string;
|
|
514
|
+
value: number | string;
|
|
515
|
+
};
|
|
516
|
+
type KanjiStatGroups = {
|
|
517
|
+
[key: string]: KanjiStat[];
|
|
518
|
+
};
|
|
519
|
+
type KanjiFrequencyEntry = {
|
|
520
|
+
index: number;
|
|
521
|
+
dictionary: string;
|
|
522
|
+
dictionaryAlias: string;
|
|
523
|
+
dictionaryOrder: {
|
|
524
|
+
index: number;
|
|
525
|
+
};
|
|
526
|
+
character: string;
|
|
527
|
+
frequency: number | string;
|
|
528
|
+
};
|
|
529
|
+
type AnkiTermDictionaryEntry = {
|
|
530
|
+
type: TermDictionaryEntryType;
|
|
531
|
+
id?: number;
|
|
532
|
+
source: string | null;
|
|
533
|
+
rawSource: string | null;
|
|
534
|
+
sourceTerm?: string | null;
|
|
535
|
+
inflectionRuleChainCandidates: InflectionRuleChainCandidate[];
|
|
536
|
+
score: number;
|
|
537
|
+
isPrimary?: boolean;
|
|
538
|
+
sequence: number;
|
|
539
|
+
dictionary: string;
|
|
540
|
+
dictionaryAlias: string;
|
|
541
|
+
dictionaryOrder: {
|
|
542
|
+
index: number;
|
|
543
|
+
};
|
|
544
|
+
dictionaryNames: string[];
|
|
545
|
+
expression: string | string[];
|
|
546
|
+
reading: string | string[];
|
|
547
|
+
expressions: TermHeadword[];
|
|
548
|
+
glossary?: TermGlossaryContent[];
|
|
549
|
+
glossaryScopedStyles?: string;
|
|
550
|
+
dictScopedStyles?: string;
|
|
551
|
+
definitionTags?: Tag$1[];
|
|
552
|
+
termTags?: Tag$1[];
|
|
553
|
+
definitions?: TermDefinition[];
|
|
554
|
+
frequencies: TermFrequencyEntry[];
|
|
555
|
+
frequencyNumbers: FrequencyNumber[];
|
|
556
|
+
frequencyHarmonic: number;
|
|
557
|
+
frequencyAverage: number;
|
|
558
|
+
pitches: TermPitchAccent[];
|
|
559
|
+
phoneticTranscriptions: TermPhoneticTranscription[];
|
|
560
|
+
sourceTermExactMatchCount: number;
|
|
561
|
+
url: string;
|
|
562
|
+
cloze: Cloze;
|
|
563
|
+
furiganaSegments?: FuriganaSegment[];
|
|
564
|
+
};
|
|
565
|
+
type AnkiKanjiDictionaryEntry = {
|
|
566
|
+
type: 'kanji';
|
|
567
|
+
character: string;
|
|
568
|
+
dictionary: string;
|
|
569
|
+
dictionaryAlias: string;
|
|
570
|
+
onyomi: string[];
|
|
571
|
+
kunyomi: string[];
|
|
572
|
+
glossary: string[];
|
|
573
|
+
tags: Tag$1[];
|
|
574
|
+
stats: KanjiStatGroups;
|
|
575
|
+
frequencies: KanjiFrequencyEntry[];
|
|
576
|
+
frequencyHarmonic: number;
|
|
577
|
+
frequencyAverage: number;
|
|
578
|
+
url: string;
|
|
579
|
+
cloze: Cloze;
|
|
580
|
+
};
|
|
581
|
+
type CachedValue<T> = {
|
|
582
|
+
getter: () => T;
|
|
583
|
+
hasValue: boolean;
|
|
584
|
+
value: T | undefined;
|
|
585
|
+
};
|
|
586
|
+
declare function createCachedValue<T>(getter: () => T): CachedValue<T>;
|
|
587
|
+
declare function getCachedValue<T>(item: CachedValue<T>): T;
|
|
588
|
+
/**
|
|
589
|
+
* Creates a compatibility representation of the specified data for Anki template rendering.
|
|
590
|
+
*/
|
|
591
|
+
declare function createAnkiNoteData(marker: string, details: CommonData): NoteData$1;
|
|
592
|
+
declare function getFrequencyHarmonic(dictionaryEntry: TermDictionaryEntry | KanjiDictionaryEntry, headwordIndex: number | null): number;
|
|
593
|
+
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/anki/anki-template-renderer.d.ts
|
|
596
|
+
type HelperOptions = {
|
|
597
|
+
fn?: (context: unknown) => string;
|
|
598
|
+
inverse?: (context: unknown) => string;
|
|
599
|
+
hash: SerializableObject;
|
|
600
|
+
data: {
|
|
601
|
+
root: NoteData$1;
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
type HelperFunction<T = unknown> = (args: unknown[], context: unknown, options: HelperOptions) => T;
|
|
605
|
+
type DataType = {
|
|
606
|
+
modifier: (data: CompositeRenderData) => NoteData$1;
|
|
607
|
+
composeData: (data: PartialRenderData, commonData: CommonData) => CompositeRenderData;
|
|
608
|
+
};
|
|
609
|
+
type PartialRenderData = {
|
|
610
|
+
marker: string;
|
|
611
|
+
commonData?: CommonData;
|
|
612
|
+
};
|
|
613
|
+
type CompositeRenderData = {
|
|
614
|
+
marker: string;
|
|
615
|
+
commonData: CommonData;
|
|
616
|
+
};
|
|
617
|
+
type RenderResult$1 = {
|
|
618
|
+
result: string;
|
|
619
|
+
requirements: Requirement[];
|
|
620
|
+
};
|
|
621
|
+
type RenderMultiItem$1 = {
|
|
622
|
+
template: string;
|
|
623
|
+
templateItems: RenderMultiTemplateItem[];
|
|
624
|
+
};
|
|
625
|
+
type RenderMultiTemplateItem = {
|
|
626
|
+
type: string;
|
|
627
|
+
commonData: CommonData;
|
|
628
|
+
datas: PartialRenderData[];
|
|
629
|
+
};
|
|
630
|
+
type RenderMultiResponse$1 = {
|
|
631
|
+
result?: RenderResult$1;
|
|
632
|
+
error?: {
|
|
633
|
+
name?: string;
|
|
634
|
+
message?: string;
|
|
635
|
+
stack?: string;
|
|
636
|
+
data?: unknown;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Interface for a Handlebars-compatible template engine.
|
|
641
|
+
* Consumers should provide an implementation that wraps their Handlebars instance.
|
|
642
|
+
*/
|
|
643
|
+
interface HandlebarsInstance {
|
|
644
|
+
compileAST(template: string): (data: NoteData$1) => string;
|
|
645
|
+
registerHelper(name: string, helper: (...args: unknown[]) => unknown): void;
|
|
646
|
+
SafeString: new (value: string) => unknown;
|
|
647
|
+
Utils: {
|
|
648
|
+
escapeExpression(value: string): string;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
declare class TemplateRendererCore {
|
|
652
|
+
private _cache;
|
|
653
|
+
private _cacheMaxSize;
|
|
654
|
+
private _dataTypes;
|
|
655
|
+
private _renderSetup;
|
|
656
|
+
private _renderCleanup;
|
|
657
|
+
private _handlebars;
|
|
658
|
+
constructor(handlebars: HandlebarsInstance);
|
|
659
|
+
registerHelpers(helpers: [string, HelperFunction][]): void;
|
|
660
|
+
registerDataType(name: string, details: DataType): void;
|
|
661
|
+
setRenderCallbacks(setup: ((data: NoteData$1) => {
|
|
662
|
+
requirements: Requirement[];
|
|
663
|
+
}) | null, cleanup: ((data: NoteData$1) => void) | null): void;
|
|
664
|
+
render(template: string, data: PartialRenderData, type: string): RenderResult$1;
|
|
665
|
+
renderMulti(items: RenderMultiItem$1[]): RenderMultiResponse$1[];
|
|
666
|
+
getModifiedData(data: CompositeRenderData, type: string): NoteData$1;
|
|
667
|
+
private _getTemplateInstance;
|
|
668
|
+
private _renderTemplate;
|
|
669
|
+
private _getModifiedData;
|
|
670
|
+
private _updateCacheSize;
|
|
671
|
+
private _registerHelper;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* This class contains all Anki-specific template rendering functionality.
|
|
675
|
+
* It registers all 25+ Handlebars helpers and provides template rendering.
|
|
676
|
+
*
|
|
677
|
+
* Requires a Handlebars-compatible engine to be injected via the constructor.
|
|
678
|
+
*/
|
|
679
|
+
declare class AnkiTemplateRenderer {
|
|
680
|
+
private _templateRenderer;
|
|
681
|
+
private _mediaProvider;
|
|
682
|
+
private _stateStack;
|
|
683
|
+
private _requirements;
|
|
684
|
+
private _cleanupCallbacks;
|
|
685
|
+
private _handlebars;
|
|
686
|
+
constructor(handlebars: HandlebarsInstance);
|
|
687
|
+
/**
|
|
688
|
+
* Gets the core TemplateRenderer instance.
|
|
689
|
+
*/
|
|
690
|
+
get templateRenderer(): TemplateRendererCore;
|
|
691
|
+
/**
|
|
692
|
+
* Prepares the renderer by registering all Handlebars helpers and data types.
|
|
693
|
+
*/
|
|
694
|
+
prepare(): Promise<void>;
|
|
695
|
+
/**
|
|
696
|
+
* Renders a single template with given data.
|
|
697
|
+
*/
|
|
698
|
+
render(template: string, data: PartialRenderData, type: string): RenderResult$1;
|
|
699
|
+
/**
|
|
700
|
+
* Renders multiple templates with given data.
|
|
701
|
+
*/
|
|
702
|
+
renderMulti(items: RenderMultiItem$1[]): RenderMultiResponse$1[];
|
|
703
|
+
/**
|
|
704
|
+
* Gets modified data for a given type.
|
|
705
|
+
*/
|
|
706
|
+
getModifiedData(data: CompositeRenderData, type: string): NoteData$1;
|
|
707
|
+
private _onRenderSetup;
|
|
708
|
+
private _onRenderCleanup;
|
|
709
|
+
private _safeString;
|
|
710
|
+
private _dumpObject;
|
|
711
|
+
private _furigana;
|
|
712
|
+
private _furiganaPlain;
|
|
713
|
+
private _getFuriganaExpressionAndReading;
|
|
714
|
+
private _stringToMultiLineHtml;
|
|
715
|
+
private _multiLine;
|
|
716
|
+
private _regexReplace;
|
|
717
|
+
private _regexMatch;
|
|
718
|
+
private _mergeTags;
|
|
719
|
+
private _eachUpTo;
|
|
720
|
+
private _spread;
|
|
721
|
+
private _op;
|
|
722
|
+
private _evaluateUnaryExpression;
|
|
723
|
+
private _evaluateBinaryExpression;
|
|
724
|
+
private _evaluateTernaryExpression;
|
|
725
|
+
private _get;
|
|
726
|
+
private _set;
|
|
727
|
+
private _scope;
|
|
728
|
+
private _property;
|
|
729
|
+
private _noop;
|
|
730
|
+
private _isMoraPitchHigh;
|
|
731
|
+
private _getKanaMorae;
|
|
732
|
+
private _getTypeof;
|
|
733
|
+
private _join;
|
|
734
|
+
private _concat;
|
|
735
|
+
private _pitchCategories;
|
|
736
|
+
private _formatGlossary;
|
|
737
|
+
private _hasMedia;
|
|
738
|
+
private _getMedia;
|
|
739
|
+
private _hiragana;
|
|
740
|
+
private _katakana;
|
|
741
|
+
private _getNoteDataFromOptions;
|
|
742
|
+
private _asString;
|
|
743
|
+
private _computeValue;
|
|
744
|
+
private _computeValueString;
|
|
745
|
+
private _computeInverse;
|
|
746
|
+
private _computeInverseString;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
//#endregion
|
|
750
|
+
export { AnkiCardFormat, AnkiConnect, AnkiDictionaryEntry, FuriganaSegment as AnkiFuriganaSegment, AnkiKanjiDictionaryEntry, KanjiStat as AnkiKanjiStat, KanjiStatGroups as AnkiKanjiStatGroups, AnkiNoteBuilder, NoteData as AnkiNoteBuilderNoteData, Tag$1 as AnkiTag, NoteData$1 as AnkiTemplateNoteData, AnkiTemplateRenderer, TermDefinition as AnkiTermDefinition, AnkiTermDictionaryEntry, TermHeadword as AnkiTermHeadword, Cloze, CommonData, CompositeRenderData, Context, CreateNoteDetails, CreateNoteResult, DataType, DictionaryMedia, FrequencyNumber, GlossaryLayoutMode, HandlebarsInstance, HelperFunction, HelperOptions, InjectAnkiNoteMediaDefinitionDetails, KanjiFrequencyEntry, Media, MediaObject, MediaOptions, MinimalApi, PartialRenderData, Pitch, PitchGroup, PitchTag, PublicContext, RenderMultiItem, RenderMultiResponse, RenderResult, Requirement, ResultOutputMode, SerializedError, RenderMultiItem$1 as TemplateRenderMultiItem, RenderMultiResponse$1 as TemplateRenderMultiResponse, RenderResult$1 as TemplateRenderResult, TemplateRenderer, TermDictionaryEntryType, TermFrequencyEntry, TermPhoneticTranscription, TermPitchAccent, TextFuriganaReadingMode, TextFuriganaSegment, Transcription, TranscriptionGroup, createAnkiNoteData, createCachedValue, getCachedValue, getFrequencyHarmonic };
|
|
751
|
+
//# sourceMappingURL=anki.d.cts.map
|