@panda-lingo/goldendict 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/LICENSE +691 -0
- package/README.md +50 -0
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/UPGRADING_GOLDENDICT.md +33 -0
- package/dist/assets.d.ts +4 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/client/dictionary-client.d.ts +18 -0
- package/dist/client/dictionary-client.d.ts.map +1 -0
- package/dist/element/goldendict-view.d.ts +59 -0
- package/dist/element/goldendict-view.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8726 -0
- package/dist/index.js.map +1 -0
- package/dist/renderer/article-document.d.ts +9 -0
- package/dist/renderer/article-document.d.ts.map +1 -0
- package/dist/renderer/article-html.d.ts +5 -0
- package/dist/renderer/article-html.d.ts.map +1 -0
- package/dist/renderer/link-router.d.ts +42 -0
- package/dist/renderer/link-router.d.ts.map +1 -0
- package/dist/renderer/theme.d.ts +7 -0
- package/dist/renderer/theme.d.ts.map +1 -0
- package/dist/styles/fidelity.d.ts +5 -0
- package/dist/styles/fidelity.d.ts.map +1 -0
- package/dist/styles/vendor.generated.d.ts +3 -0
- package/dist/styles/vendor.generated.d.ts.map +1 -0
- package/dist/types.d.ts +107 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GoldenDictTheme, LookupResponse, ScriptPolicy } from "../types";
|
|
2
|
+
export interface ArticleDocumentOptions {
|
|
3
|
+
apiBaseUrl: string;
|
|
4
|
+
instanceId: string;
|
|
5
|
+
scriptPolicy: ScriptPolicy;
|
|
6
|
+
theme?: GoldenDictTheme;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildArticleDocument(response: LookupResponse, options: ArticleDocumentOptions): string;
|
|
9
|
+
//# sourceMappingURL=article-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article-document.d.ts","sourceRoot":"","sources":["../../src/renderer/article-document.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAoOD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CA6BR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LookupArticle, ScriptPolicy } from "../types";
|
|
2
|
+
import { type ResourceContext } from "./link-router";
|
|
3
|
+
export declare function rewriteCssResourceUrls(css: string, context: ResourceContext): string;
|
|
4
|
+
export declare function prepareArticleHtml(article: LookupArticle, apiBaseUrl: string, scriptPolicy: ScriptPolicy): string;
|
|
5
|
+
//# sourceMappingURL=article-html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article-html.d.ts","sourceRoot":"","sources":["../../src/renderer/article-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAiGvB,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,eAAe,GACvB,MAAM,CAoBR;AA6BD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,GACzB,MAAM,CA8ER"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ResourceContext {
|
|
2
|
+
apiBaseUrl: string;
|
|
3
|
+
dictionaryId: string;
|
|
4
|
+
iconUrl?: string;
|
|
5
|
+
resourceBaseUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export type ArticleLinkAction = {
|
|
8
|
+
kind: "anchor";
|
|
9
|
+
anchor: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "lookup";
|
|
12
|
+
word: string;
|
|
13
|
+
anchor?: string;
|
|
14
|
+
dictionaryIds?: string[];
|
|
15
|
+
} | {
|
|
16
|
+
kind: "audio" | "video" | "resource";
|
|
17
|
+
url: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: "external";
|
|
20
|
+
url: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "unsafe";
|
|
23
|
+
};
|
|
24
|
+
export declare const GOLDENDICT_SCHEME_SUPPORT: {
|
|
25
|
+
readonly gdlookup: "lookup";
|
|
26
|
+
readonly bword: "lookup";
|
|
27
|
+
readonly entry: "lookup";
|
|
28
|
+
readonly bres: "resource";
|
|
29
|
+
readonly qrcx: "resource";
|
|
30
|
+
readonly gico: "resource";
|
|
31
|
+
readonly gdau: "audio";
|
|
32
|
+
readonly gdvideo: "video";
|
|
33
|
+
readonly qrc: "asset";
|
|
34
|
+
readonly gdprg: "unsupported";
|
|
35
|
+
readonly gdtts: "unsupported";
|
|
36
|
+
readonly gdinternal: "unsupported";
|
|
37
|
+
readonly ankicard: "unsupported";
|
|
38
|
+
readonly ankisearch: "unsupported";
|
|
39
|
+
};
|
|
40
|
+
export declare function resolveResourceUrl(rawUrl: string, context: ResourceContext): string;
|
|
41
|
+
export declare function classifyArticleLink(rawUrl: string, context: ResourceContext): ArticleLinkAction;
|
|
42
|
+
//# sourceMappingURL=link-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-router.d.ts","sourceRoot":"","sources":["../../src/renderer/link-router.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAUvB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;CAe5B,CAAC;AAqDX,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,GACvB,MAAM,CAqCR;AA6CD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,GACvB,iBAAiB,CAoDnB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GoldenDictTheme, GoldenDictThemeTokens, ThemeMode } from "../types";
|
|
2
|
+
export declare const LIGHT_THEME_TOKENS: Readonly<GoldenDictThemeTokens>;
|
|
3
|
+
export declare const DARK_THEME_TOKENS: Readonly<GoldenDictThemeTokens>;
|
|
4
|
+
export declare function resolveThemeMode(mode?: ThemeMode): "light" | "dark";
|
|
5
|
+
export declare function escapeStyleText(css: string): string;
|
|
6
|
+
export declare function themeToCss(theme?: GoldenDictTheme): string;
|
|
7
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/renderer/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,qBAAqB,CAe9D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,qBAAqB,CAc7D,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,SAAmB,GAAG,OAAO,GAAG,MAAM,CAO5E;AAMD,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,UAAU,CAAC,KAAK,GAAE,eAAoB,GAAG,MAAM,CAuD9D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GoldenDictPreset } from "../types";
|
|
2
|
+
export declare const GOLDENDICT_BASE_CSS: string;
|
|
3
|
+
export declare const GOLDENDICT_PRINT_CSS: string;
|
|
4
|
+
export declare function getGoldenDictPresetCss(preset?: GoldenDictPreset): string;
|
|
5
|
+
//# sourceMappingURL=fidelity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fidelity.d.ts","sourceRoot":"","sources":["../../src/styles/fidelity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAuBjD,eAAO,MAAM,mBAAmB,QAAmC,CAAC;AACpE,eAAO,MAAM,oBAAoB,QAAoC,CAAC;AAEtE,wBAAgB,sBAAsB,CACpC,MAAM,GAAE,gBAA4B,GACnC,MAAM,CAER"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type GoldenDictVendorStylesheet = "article-style.css" | "article-style-print.css" | "article-style-st-babylon.css" | "article-style-st-classic.css" | "article-style-st-lingoes-blue.css" | "article-style-st-lingoes.css" | "article-style-st-lingvo.css" | "article-style-st-modern.css";
|
|
2
|
+
export declare const GOLDENDICT_VENDOR_CSS: Readonly<Record<GoldenDictVendorStylesheet, string>>;
|
|
3
|
+
//# sourceMappingURL=vendor.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor.generated.d.ts","sourceRoot":"","sources":["../../src/styles/vendor.generated.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG,yBAAyB,GAAG,8BAA8B,GAAG,8BAA8B,GAAG,mCAAmC,GAAG,8BAA8B,GAAG,6BAA6B,GAAG,6BAA6B,CAAC;AAClS,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAg/rI,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export type GoldenDictPreset = "default" | "classic" | "modern" | "lingvo" | "babylon" | "lingoes" | "lingoes-blue";
|
|
2
|
+
export type ThemeMode = "light" | "dark" | "auto";
|
|
3
|
+
export type ScriptPolicy = "none" | "sandboxed";
|
|
4
|
+
export type ViewState = "idle" | "loading" | "ready" | "not-found" | "error";
|
|
5
|
+
export interface DictionarySummary {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
format: string;
|
|
9
|
+
sourceLanguage?: string;
|
|
10
|
+
targetLanguage?: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
iconUrl?: string;
|
|
13
|
+
resourceBaseUrl?: string;
|
|
14
|
+
wordCount?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface LoadDictionaryRequest {
|
|
17
|
+
path: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface LoadDictionaryResponse {
|
|
21
|
+
dictionary: DictionarySummary;
|
|
22
|
+
loaded: boolean;
|
|
23
|
+
message?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface LookupArticle {
|
|
26
|
+
dictionaryId: string;
|
|
27
|
+
dictionaryName: string;
|
|
28
|
+
format: string;
|
|
29
|
+
html: string;
|
|
30
|
+
sourceLanguage?: string;
|
|
31
|
+
targetLanguage?: string;
|
|
32
|
+
iconUrl?: string;
|
|
33
|
+
resourceBaseUrl?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface LookupResponse {
|
|
36
|
+
word: string;
|
|
37
|
+
articles: LookupArticle[];
|
|
38
|
+
suggestions: string[];
|
|
39
|
+
lookupTimeMs: number;
|
|
40
|
+
}
|
|
41
|
+
export interface LookupOptions {
|
|
42
|
+
dictionaryIds?: readonly string[];
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
}
|
|
45
|
+
export interface DictionaryClientOptions {
|
|
46
|
+
baseUrl?: string;
|
|
47
|
+
fetch?: typeof globalThis.fetch;
|
|
48
|
+
headers?: Readonly<Record<string, string>>;
|
|
49
|
+
credentials?: RequestCredentials;
|
|
50
|
+
}
|
|
51
|
+
export interface GoldenDictThemeTokens {
|
|
52
|
+
fontFamily: string;
|
|
53
|
+
textColor: string;
|
|
54
|
+
mutedTextColor: string;
|
|
55
|
+
linkColor: string;
|
|
56
|
+
backgroundColor: string;
|
|
57
|
+
surfaceColor: string;
|
|
58
|
+
headerColor: string;
|
|
59
|
+
borderColor: string;
|
|
60
|
+
accentColor: string;
|
|
61
|
+
selectionColor: string;
|
|
62
|
+
selectionTextColor: string;
|
|
63
|
+
radius: string;
|
|
64
|
+
spacing: string;
|
|
65
|
+
}
|
|
66
|
+
export interface GoldenDictTheme {
|
|
67
|
+
preset?: GoldenDictPreset;
|
|
68
|
+
mode?: ThemeMode;
|
|
69
|
+
tokens?: Partial<GoldenDictThemeTokens>;
|
|
70
|
+
cssText?: string;
|
|
71
|
+
brandName?: string;
|
|
72
|
+
logoUrl?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface LookupEventDetail {
|
|
75
|
+
word: string;
|
|
76
|
+
anchor?: string;
|
|
77
|
+
dictionaryIds?: string[];
|
|
78
|
+
}
|
|
79
|
+
export interface ActiveArticleEventDetail {
|
|
80
|
+
dictionaryId: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ArticleToggleEventDetail {
|
|
83
|
+
dictionaryId: string;
|
|
84
|
+
collapsed: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface MediaRequestEventDetail {
|
|
87
|
+
kind: "audio" | "video" | "resource";
|
|
88
|
+
url: string;
|
|
89
|
+
dictionaryId?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ExternalLinkEventDetail {
|
|
92
|
+
url: string;
|
|
93
|
+
}
|
|
94
|
+
export interface ViewStateEventDetail {
|
|
95
|
+
state: ViewState;
|
|
96
|
+
word?: string;
|
|
97
|
+
error?: Error;
|
|
98
|
+
}
|
|
99
|
+
export declare const GOLDENDICT_EVENTS: {
|
|
100
|
+
readonly lookup: "goldendict-lookup";
|
|
101
|
+
readonly activeArticleChange: "goldendict-active-article-change";
|
|
102
|
+
readonly articleToggle: "goldendict-article-toggle";
|
|
103
|
+
readonly mediaRequest: "goldendict-media-request";
|
|
104
|
+
readonly externalLink: "goldendict-external-link";
|
|
105
|
+
readonly stateChange: "goldendict-state-change";
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,CAAC;AAEhD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,SAAS,GACT,OAAO,GACP,WAAW,GACX,OAAO,CAAC;AAEZ,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAA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AE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@panda-lingo/goldendict",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-independent GoldenDict article client and renderer",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "GPL-3.0-or-later",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/panda-lingo/goldendict.git",
|
|
10
|
+
"directory": "packages/frontend"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"registry": "https://registry.npmjs.org",
|
|
15
|
+
"provenance": true
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": true,
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"README.md",
|
|
22
|
+
"THIRD_PARTY_NOTICES.md",
|
|
23
|
+
"UPGRADING_GOLDENDICT.md"
|
|
24
|
+
],
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "npm run check:goldendict && vite build && tsc -p tsconfig.build.json",
|
|
36
|
+
"test": "npm run check:goldendict && vitest run",
|
|
37
|
+
"test:watch": "vitest",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"sync:goldendict": "node ./scripts/sync-goldendict.mjs",
|
|
40
|
+
"check:goldendict": "node ./scripts/sync-goldendict.mjs --check"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/node": "^24.3.0",
|
|
44
|
+
"jsdom": "^26.1.0",
|
|
45
|
+
"typescript": "^5.8.3",
|
|
46
|
+
"vite": "^7.1.3",
|
|
47
|
+
"vitest": "^3.2.4"
|
|
48
|
+
}
|
|
49
|
+
}
|