dev-dict 0.1.3 → 0.1.5

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.
Files changed (68) hide show
  1. package/README.md +19 -4
  2. package/dist/data/index.d.ts +5 -0
  3. package/dist/data/index.d.ts.map +1 -0
  4. package/dist/data/locales/index.d.ts +6 -0
  5. package/dist/data/locales/index.d.ts.map +1 -0
  6. package/dist/{term-tags → data/tags}/backend.d.ts +1 -1
  7. package/dist/data/tags/backend.d.ts.map +1 -0
  8. package/dist/{term-tags → data/tags}/frontend.d.ts +1 -1
  9. package/dist/data/tags/frontend.d.ts.map +1 -0
  10. package/dist/{term-tags → data/tags}/index.d.ts +4 -5
  11. package/dist/data/tags/index.d.ts.map +1 -0
  12. package/dist/{term-tags → data/tags}/open_source.d.ts +1 -1
  13. package/dist/data/tags/open_source.d.ts.map +1 -0
  14. package/dist/data/terms/index.d.ts +108 -0
  15. package/dist/data/terms/index.d.ts.map +1 -0
  16. package/dist/{terms → data/terms}/node_js.d.ts +5 -5
  17. package/dist/data/terms/node_js.d.ts.map +1 -0
  18. package/dist/{terms → data/terms}/react.d.ts +6 -6
  19. package/dist/data/terms/react.d.ts.map +1 -0
  20. package/dist/{terms → data/terms}/typescript.d.ts +7 -7
  21. package/dist/data/terms/typescript.d.ts.map +1 -0
  22. package/dist/{term-types → data/types}/cms.d.ts +1 -1
  23. package/dist/data/types/cms.d.ts.map +1 -0
  24. package/dist/{term-types → data/types}/index.d.ts +11 -12
  25. package/dist/data/types/index.d.ts.map +1 -0
  26. package/dist/{term-types → data/types}/language.d.ts +1 -1
  27. package/dist/data/types/language.d.ts.map +1 -0
  28. package/dist/{term-types → data/types}/library.d.ts +1 -1
  29. package/dist/data/types/library.d.ts.map +1 -0
  30. package/dist/{term-types → data/types}/runtime_environment.d.ts +1 -1
  31. package/dist/data/types/runtime_environment.d.ts.map +1 -0
  32. package/dist/dev-dict.min.js +1 -1
  33. package/dist/dev-dict.min.js.map +1 -1
  34. package/dist/examples/index.d.ts +2 -0
  35. package/dist/examples/index.d.ts.map +1 -0
  36. package/dist/index.js +37 -40
  37. package/dist/index.js.map +1 -1
  38. package/dist/src/common/index.d.ts +5 -0
  39. package/dist/src/common/index.d.ts.map +1 -0
  40. package/dist/src/index.d.ts +9 -0
  41. package/dist/src/index.d.ts.map +1 -0
  42. package/dist/{typings → src/types}/index.d.ts +13 -11
  43. package/dist/src/types/index.d.ts.map +1 -0
  44. package/dist/{utils → src/utils}/index.d.ts +1 -2
  45. package/dist/src/utils/index.d.ts.map +1 -0
  46. package/package.json +32 -16
  47. package/dist/common/index.d.ts +0 -5
  48. package/dist/common/index.d.ts.map +0 -1
  49. package/dist/index.d.ts +0 -11
  50. package/dist/index.d.ts.map +0 -1
  51. package/dist/locales/index.d.ts +0 -6
  52. package/dist/locales/index.d.ts.map +0 -1
  53. package/dist/term-tags/backend.d.ts.map +0 -1
  54. package/dist/term-tags/frontend.d.ts.map +0 -1
  55. package/dist/term-tags/index.d.ts.map +0 -1
  56. package/dist/term-tags/open_source.d.ts.map +0 -1
  57. package/dist/term-types/cms.d.ts.map +0 -1
  58. package/dist/term-types/index.d.ts.map +0 -1
  59. package/dist/term-types/language.d.ts.map +0 -1
  60. package/dist/term-types/library.d.ts.map +0 -1
  61. package/dist/term-types/runtime_environment.d.ts.map +0 -1
  62. package/dist/terms/index.d.ts +0 -5
  63. package/dist/terms/index.d.ts.map +0 -1
  64. package/dist/terms/node_js.d.ts.map +0 -1
  65. package/dist/terms/react.d.ts.map +0 -1
  66. package/dist/terms/typescript.d.ts.map +0 -1
  67. package/dist/typings/index.d.ts.map +0 -1
  68. package/dist/utils/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # dev-dict
2
2
 
3
- A dictionary of software related terms. Supports multiple languages.
3
+ A dictionary of software related terms.
4
+
5
+ This package aims to provide an exhaustive list of software industry related terms with simple explanations.
6
+
7
+ Currently supported languages:
8
+ - English (US)
9
+ - English (GB)
10
+ - German (DE)
4
11
 
5
12
  ## Installation
6
13
 
@@ -11,8 +18,16 @@ npm i dev-dict
11
18
  ## Usage
12
19
 
13
20
  ```typescript
14
- import { getDict } from 'dev-dict`
21
+ import { getTerm, getDict } from 'dev-dict'
22
+
23
+ // Get a single term
24
+ const reactEn = getTerm({ id: 'react', locale: 'en-US' })
25
+ const reactDe = getTerm({ id: 'react', locale: 'de-DE' })
26
+ console.log(reactEn.label) // "JavaScript Library"
27
+ console.log(reactDe.label) // "JavaScript-Bibliothek"
28
+
15
29
 
16
- const dd = getDict()
17
- console.log(dd.react.name)
30
+ // Get entire dictionary
31
+ const dd = getDict({ locale: 'en-US' })
32
+ console.log(dd.react.name) // "React"
18
33
  ```
@@ -0,0 +1,5 @@
1
+ export * from './locales';
2
+ export * from './tags';
3
+ export * from './terms';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../data/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const LOCALE: {
2
+ readonly EN_US: "en-US";
3
+ readonly EN_GB: "en-GB";
4
+ readonly DE_DE: "de-DE";
5
+ };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../data/locales/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;CAIT,CAAA"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "backend";
3
3
  readonly name: {
4
- readonly "en-GB": "Backend";
4
+ readonly "en-US": "Backend";
5
5
  readonly "de-DE": "Backend";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../data/tags/backend.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO6B"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "frontend";
3
3
  readonly name: {
4
- readonly "en-GB": "Frontend";
4
+ readonly "en-US": "Frontend";
5
5
  readonly "de-DE": "Frontend";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../../data/tags/frontend.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO6B"}
@@ -1,25 +1,24 @@
1
- export declare const TERM_TAGS: {
1
+ export declare const TAG: {
2
2
  readonly backend: {
3
3
  readonly id: "backend";
4
4
  readonly name: {
5
- readonly "en-GB": "Backend";
5
+ readonly "en-US": "Backend";
6
6
  readonly "de-DE": "Backend";
7
7
  };
8
8
  };
9
9
  readonly frontend: {
10
10
  readonly id: "frontend";
11
11
  readonly name: {
12
- readonly "en-GB": "Frontend";
12
+ readonly "en-US": "Frontend";
13
13
  readonly "de-DE": "Frontend";
14
14
  };
15
15
  };
16
16
  readonly open_source: {
17
17
  readonly id: "open_source";
18
18
  readonly name: {
19
- readonly "en-GB": "Open Source";
19
+ readonly "en-US": "Open Source";
20
20
  readonly "de-DE": "Open Source";
21
21
  };
22
22
  };
23
23
  };
24
- export type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS];
25
24
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../data/tags/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;CAIN,CAAA"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "open_source";
3
3
  readonly name: {
4
- readonly "en-GB": "Open Source";
4
+ readonly "en-US": "Open Source";
5
5
  readonly "de-DE": "Open Source";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open_source.d.ts","sourceRoot":"","sources":["../../../data/tags/open_source.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO6B"}
@@ -0,0 +1,108 @@
1
+ export declare const TERM: {
2
+ readonly node_js: {
3
+ readonly id: "node_js";
4
+ readonly name: "Node.js";
5
+ readonly type: [{
6
+ readonly id: "runtime_environment";
7
+ readonly name: {
8
+ readonly "en-US": "Runtime Environment";
9
+ readonly "de-DE": "Laufzeitumgebung";
10
+ };
11
+ }];
12
+ readonly label: {
13
+ readonly "en-US": "JavaScript Runtime";
14
+ readonly "de-DE": "JavaScript-Laufzeit";
15
+ };
16
+ readonly definition: {
17
+ readonly "en-US": "Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.";
18
+ readonly "de-DE": "Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.";
19
+ };
20
+ readonly tags: [{
21
+ readonly id: "backend";
22
+ readonly name: {
23
+ readonly "en-US": "Backend";
24
+ readonly "de-DE": "Backend";
25
+ };
26
+ }];
27
+ readonly links: {
28
+ readonly website: "https://nodejs.org";
29
+ };
30
+ };
31
+ readonly react: {
32
+ readonly id: "react";
33
+ readonly name: "React";
34
+ readonly type: [{
35
+ readonly id: "library";
36
+ readonly name: {
37
+ readonly "en-US": "Library";
38
+ readonly "de-DE": "Bibliothek";
39
+ };
40
+ }];
41
+ readonly label: {
42
+ readonly "en-US": "JavaScript Library";
43
+ readonly "de-DE": "JavaScript-Bibliothek";
44
+ };
45
+ readonly definition: {
46
+ readonly "en-US": "A JavaScript library for building component-based user interfaces.";
47
+ readonly "de-DE": "Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.";
48
+ };
49
+ readonly tags: [{
50
+ readonly id: "frontend";
51
+ readonly name: {
52
+ readonly "en-US": "Frontend";
53
+ readonly "de-DE": "Frontend";
54
+ };
55
+ }, {
56
+ readonly id: "backend";
57
+ readonly name: {
58
+ readonly "en-US": "Backend";
59
+ readonly "de-DE": "Backend";
60
+ };
61
+ }];
62
+ readonly links: {
63
+ readonly website: "https://react.dev";
64
+ };
65
+ };
66
+ readonly typescript: {
67
+ readonly id: "typescript";
68
+ readonly name: "TypeScript";
69
+ readonly type: [{
70
+ readonly id: "language";
71
+ readonly name: {
72
+ readonly "en-US": "Language";
73
+ readonly "de-DE": "Sprache";
74
+ };
75
+ }];
76
+ readonly label: {
77
+ readonly "en-US": "High-Level Programming Language";
78
+ readonly "de-DE": "Hochsprache";
79
+ };
80
+ readonly definition: {
81
+ readonly "en-US": "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.";
82
+ readonly "de-DE": "TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.";
83
+ };
84
+ readonly tags: [{
85
+ readonly id: "frontend";
86
+ readonly name: {
87
+ readonly "en-US": "Frontend";
88
+ readonly "de-DE": "Frontend";
89
+ };
90
+ }, {
91
+ readonly id: "backend";
92
+ readonly name: {
93
+ readonly "en-US": "Backend";
94
+ readonly "de-DE": "Backend";
95
+ };
96
+ }, {
97
+ readonly id: "open_source";
98
+ readonly name: {
99
+ readonly "en-US": "Open Source";
100
+ readonly "de-DE": "Open Source";
101
+ };
102
+ }];
103
+ readonly links: {
104
+ readonly website: "https://www.typescriptlang.org";
105
+ };
106
+ };
107
+ };
108
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../data/terms/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIP,CAAA"}
@@ -1,25 +1,25 @@
1
1
  declare const _default: {
2
2
  readonly id: "node_js";
3
- readonly term: "Node.js";
3
+ readonly name: "Node.js";
4
4
  readonly type: [{
5
5
  readonly id: "runtime_environment";
6
6
  readonly name: {
7
- readonly "en-GB": "Runtime Environment";
7
+ readonly "en-US": "Runtime Environment";
8
8
  readonly "de-DE": "Laufzeitumgebung";
9
9
  };
10
10
  }];
11
11
  readonly label: {
12
- readonly "en-GB": "JavaScript Runtime";
12
+ readonly "en-US": "JavaScript Runtime";
13
13
  readonly "de-DE": "JavaScript-Laufzeit";
14
14
  };
15
15
  readonly definition: {
16
- readonly "en-GB": "Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.";
16
+ readonly "en-US": "Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.";
17
17
  readonly "de-DE": "Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.";
18
18
  };
19
19
  readonly tags: [{
20
20
  readonly id: "backend";
21
21
  readonly name: {
22
- readonly "en-GB": "Backend";
22
+ readonly "en-US": "Backend";
23
23
  readonly "de-DE": "Backend";
24
24
  };
25
25
  }];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node_js.d.ts","sourceRoot":"","sources":["../../../data/terms/node_js.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAsB0B"}
@@ -1,31 +1,31 @@
1
1
  declare const _default: {
2
2
  readonly id: "react";
3
- readonly term: "React";
3
+ readonly name: "React";
4
4
  readonly type: [{
5
5
  readonly id: "library";
6
6
  readonly name: {
7
- readonly "en-GB": "Library";
7
+ readonly "en-US": "Library";
8
8
  readonly "de-DE": "Bibliothek";
9
9
  };
10
10
  }];
11
11
  readonly label: {
12
- readonly "en-GB": "JavaScript Library";
12
+ readonly "en-US": "JavaScript Library";
13
13
  readonly "de-DE": "JavaScript-Bibliothek";
14
14
  };
15
15
  readonly definition: {
16
- readonly "en-GB": "A JavaScript library for building component-based user interfaces.";
16
+ readonly "en-US": "A JavaScript library for building component-based user interfaces.";
17
17
  readonly "de-DE": "Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.";
18
18
  };
19
19
  readonly tags: [{
20
20
  readonly id: "frontend";
21
21
  readonly name: {
22
- readonly "en-GB": "Frontend";
22
+ readonly "en-US": "Frontend";
23
23
  readonly "de-DE": "Frontend";
24
24
  };
25
25
  }, {
26
26
  readonly id: "backend";
27
27
  readonly name: {
28
- readonly "en-GB": "Backend";
28
+ readonly "en-US": "Backend";
29
29
  readonly "de-DE": "Backend";
30
30
  };
31
31
  }];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../data/terms/react.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAsB0B"}
@@ -1,37 +1,37 @@
1
1
  declare const _default: {
2
2
  readonly id: "typescript";
3
- readonly term: "TypeScript";
3
+ readonly name: "TypeScript";
4
4
  readonly type: [{
5
5
  readonly id: "language";
6
6
  readonly name: {
7
- readonly "en-GB": "Language";
7
+ readonly "en-US": "Language";
8
8
  readonly "de-DE": "Sprache";
9
9
  };
10
10
  }];
11
11
  readonly label: {
12
- readonly "en-GB": "High-Level Programming Language";
12
+ readonly "en-US": "High-Level Programming Language";
13
13
  readonly "de-DE": "Hochsprache";
14
14
  };
15
15
  readonly definition: {
16
- readonly "en-GB": "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.";
16
+ readonly "en-US": "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.";
17
17
  readonly "de-DE": "TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.";
18
18
  };
19
19
  readonly tags: [{
20
20
  readonly id: "frontend";
21
21
  readonly name: {
22
- readonly "en-GB": "Frontend";
22
+ readonly "en-US": "Frontend";
23
23
  readonly "de-DE": "Frontend";
24
24
  };
25
25
  }, {
26
26
  readonly id: "backend";
27
27
  readonly name: {
28
- readonly "en-GB": "Backend";
28
+ readonly "en-US": "Backend";
29
29
  readonly "de-DE": "Backend";
30
30
  };
31
31
  }, {
32
32
  readonly id: "open_source";
33
33
  readonly name: {
34
- readonly "en-GB": "Open Source";
34
+ readonly "en-US": "Open Source";
35
35
  readonly "de-DE": "Open Source";
36
36
  };
37
37
  }];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../data/terms/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAsB0B"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "cms";
3
3
  readonly name: {
4
- readonly "en-GB": "Content Management System";
4
+ readonly "en-US": "Content Management System";
5
5
  readonly "de-DE": "Content-Management-System";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../../../data/types/cms.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO8B"}
@@ -1,32 +1,31 @@
1
- export declare const TERM_TYPES: {
1
+ export declare const TYPE: {
2
2
  readonly cms: {
3
3
  readonly id: "cms";
4
4
  readonly name: {
5
- readonly "en-GB": "Content Management System";
5
+ readonly "en-US": "Content Management System";
6
6
  readonly "de-DE": "Content-Management-System";
7
7
  };
8
8
  };
9
+ readonly language: {
10
+ readonly id: "language";
11
+ readonly name: {
12
+ readonly "en-US": "Language";
13
+ readonly "de-DE": "Sprache";
14
+ };
15
+ };
9
16
  readonly library: {
10
17
  readonly id: "library";
11
18
  readonly name: {
12
- readonly "en-GB": "Library";
19
+ readonly "en-US": "Library";
13
20
  readonly "de-DE": "Bibliothek";
14
21
  };
15
22
  };
16
23
  readonly runtime_environment: {
17
24
  readonly id: "runtime_environment";
18
25
  readonly name: {
19
- readonly "en-GB": "Runtime Environment";
26
+ readonly "en-US": "Runtime Environment";
20
27
  readonly "de-DE": "Laufzeitumgebung";
21
28
  };
22
29
  };
23
- readonly language: {
24
- readonly id: "language";
25
- readonly name: {
26
- readonly "en-GB": "Language";
27
- readonly "de-DE": "Sprache";
28
- };
29
- };
30
30
  };
31
- export type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES];
32
31
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../data/types/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKP,CAAA"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "language";
3
3
  readonly name: {
4
- readonly "en-GB": "Language";
4
+ readonly "en-US": "Language";
5
5
  readonly "de-DE": "Sprache";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../data/types/language.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO8B"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "library";
3
3
  readonly name: {
4
- readonly "en-GB": "Library";
4
+ readonly "en-US": "Library";
5
5
  readonly "de-DE": "Bibliothek";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../data/types/library.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO8B"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  readonly id: "runtime_environment";
3
3
  readonly name: {
4
- readonly "en-GB": "Runtime Environment";
4
+ readonly "en-US": "Runtime Environment";
5
5
  readonly "de-DE": "Laufzeitumgebung";
6
6
  };
7
7
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime_environment.d.ts","sourceRoot":"","sources":["../../../data/types/runtime_environment.ts"],"names":[],"mappings":";;;;;;;AAIA,wBAO8B"}
@@ -1,2 +1,2 @@
1
- (function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a.devdict={}))})(this,(function(a){"use strict";const e={EN_GB:"en-GB",DE_DE:"de-DE"},i={DEFAULT_LOCALE:e.EN_GB},d={id:"backend",name:{[e.EN_GB]:"Backend",[e.DE_DE]:"Backend"}},E={id:"frontend",name:{[e.EN_GB]:"Frontend",[e.DE_DE]:"Frontend"}},p={id:"open_source",name:{[e.EN_GB]:"Open Source",[e.DE_DE]:"Open Source"}},o={[d.id]:d,[E.id]:E,[p.id]:p},l={id:"cms"},u={id:"language",name:{[e.EN_GB]:"Language",[e.DE_DE]:"Sprache"}},m={id:"library",name:{[e.EN_GB]:"Library",[e.DE_DE]:"Bibliothek"}},L={id:"runtime_environment",name:{[e.EN_GB]:"Runtime Environment",[e.DE_DE]:"Laufzeitumgebung"}},c={[l.id]:l,[m.id]:m,[L.id]:L,[u.id]:u},g={id:"node_js",term:"Node.js",type:[c.runtime_environment],label:{[e.EN_GB]:"JavaScript Runtime",[e.DE_DE]:"JavaScript-Laufzeit"},definition:{[e.EN_GB]:"Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.",[e.DE_DE]:"Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen."},tags:[o.backend],links:{website:"https://nodejs.org"}},_={id:"react",term:"React",type:[c.library],label:{[e.EN_GB]:"JavaScript Library",[e.DE_DE]:"JavaScript-Bibliothek"},definition:{[e.EN_GB]:"A JavaScript library for building component-based user interfaces.",[e.DE_DE]:"Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen."},tags:[o.frontend,o.backend],links:{website:"https://react.dev"}},b={id:"typescript",term:"TypeScript",type:[c.language],label:{[e.EN_GB]:"High-Level Programming Language",[e.DE_DE]:"Hochsprache"},definition:{[e.EN_GB]:"TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.",[e.DE_DE]:"TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet."},tags:[o.frontend,o.backend,o.open_source],links:{website:"https://www.typescriptlang.org"}},D={[_.id]:_,[g.id]:g,[b.id]:b},y=({label:n,locale:t=i.DEFAULT_LOCALE})=>n[t]||n[i.DEFAULT_LOCALE],A=({definition:n,locale:t=i.DEFAULT_LOCALE})=>n[t]||n[i.DEFAULT_LOCALE],S=({tag:n,locale:t=i.DEFAULT_LOCALE})=>({id:n.id,name:n.name[t]||n.name[i.DEFAULT_LOCALE]}),v=({term:n,locale:t=i.DEFAULT_LOCALE})=>({id:n.id,name:n.name[t]||n.name[i.DEFAULT_LOCALE]}),f=({id:n,locale:t=i.DEFAULT_LOCALE})=>{const r=D[n];return r?{...r,label:y({label:r.label,locale:t}),definition:A({definition:r.definition,locale:t}),type:r.type.map(s=>v({term:s,locale:t})),tags:r.tags.map(s=>S({tag:s,locale:t}))}:null},B=({locale:n=i.DEFAULT_LOCALE}={locale:i.DEFAULT_LOCALE})=>{const t={};for(const[r,s]of Object.entries(D)){const T=f({id:s.id,locale:n});T&&(t[r]=T)}return t};a.getDict=B,a.getTerm=f,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.devdict={}))})(this,(function(r){"use strict";const e={EN_US:"en-US",DE_DE:"de-DE"},d={id:"backend",name:{[e.EN_US]:"Backend",[e.DE_DE]:"Backend"}},E={id:"frontend",name:{[e.EN_US]:"Frontend",[e.DE_DE]:"Frontend"}},p={id:"open_source",name:{[e.EN_US]:"Open Source",[e.DE_DE]:"Open Source"}},o={[d.id]:d,[E.id]:E,[p.id]:p},l={id:"cms"},u={id:"language",name:{[e.EN_US]:"Language",[e.DE_DE]:"Sprache"}},m={id:"library",name:{[e.EN_US]:"Library",[e.DE_DE]:"Bibliothek"}},L={id:"runtime_environment",name:{[e.EN_US]:"Runtime Environment",[e.DE_DE]:"Laufzeitumgebung"}},c={[l.id]:l,[u.id]:u,[m.id]:m,[L.id]:L},g={id:"node_js",name:"Node.js",type:[c.runtime_environment],label:{[e.EN_US]:"JavaScript Runtime",[e.DE_DE]:"JavaScript-Laufzeit"},definition:{[e.EN_US]:"Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.",[e.DE_DE]:"Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen."},tags:[o.backend],links:{website:"https://nodejs.org"}},_={id:"react",name:"React",type:[c.library],label:{[e.EN_US]:"JavaScript Library",[e.DE_DE]:"JavaScript-Bibliothek"},definition:{[e.EN_US]:"A JavaScript library for building component-based user interfaces.",[e.DE_DE]:"Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen."},tags:[o.frontend,o.backend],links:{website:"https://react.dev"}},b={id:"typescript",name:"TypeScript",type:[c.language],label:{[e.EN_US]:"High-Level Programming Language",[e.DE_DE]:"Hochsprache"},definition:{[e.EN_US]:"TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.",[e.DE_DE]:"TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet."},tags:[o.frontend,o.backend,o.open_source],links:{website:"https://www.typescriptlang.org"}},D={[g.id]:g,[_.id]:_,[b.id]:b},i={DEFAULT_LOCALE:e.EN_US},y=({label:n,locale:t=i.DEFAULT_LOCALE})=>n[t]||n[i.DEFAULT_LOCALE],T=({definition:n,locale:t=i.DEFAULT_LOCALE})=>n[t]||n[i.DEFAULT_LOCALE],A=({tag:n,locale:t=i.DEFAULT_LOCALE})=>({id:n.id,name:n.name[t]||n.name[i.DEFAULT_LOCALE]}),U=({term:n,locale:t=i.DEFAULT_LOCALE})=>({id:n.id,name:n.name[t]||n.name[i.DEFAULT_LOCALE]}),f=({id:n,locale:t=i.DEFAULT_LOCALE})=>{const a=D[n];return{...a,label:y({label:a.label,locale:t}),definition:T({definition:a.definition,locale:t}),type:a.type.map(s=>U({term:s,locale:t})),tags:a.tags.map(s=>A({tag:s,locale:t}))}},v=({locale:n=i.DEFAULT_LOCALE}={locale:i.DEFAULT_LOCALE})=>{const t={};for(const[a,s]of Object.entries(D)){const S=f({id:s.id,locale:n});S&&(t[a]=S)}return t};r.getDict=v,r.getTerm=f,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=dev-dict.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dev-dict.min.js","sources":["../src/locales/index.ts","../src/common/index.ts","../src/term-tags/backend.ts","../src/term-tags/frontend.ts","../src/term-tags/open_source.ts","../src/term-tags/index.ts","../src/term-types/cms.ts","../src/term-types/language.ts","../src/term-types/library.ts","../src/term-types/runtime_environment.ts","../src/term-types/index.ts","../src/terms/node_js.ts","../src/terms/react.ts","../src/terms/typescript.ts","../src/terms/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n\nexport type TLocale = (typeof LOCALE)[keyof typeof LOCALE]\n","import { LOCALE } from '../locales'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_GB,\n} as const\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_GB]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_GB]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'open_source',\n\n name: {\n [LOCALE.EN_GB]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport open_source from './open_source'\n\nexport const TERM_TAGS = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [open_source.id]: open_source,\n} as const\n\nexport type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS]\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_GB]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'language',\n\n name: {\n [LOCALE.EN_GB]: `Language`,\n [LOCALE.DE_DE]: `Sprache`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_GB]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'runtime_environment',\n\n name: {\n [LOCALE.EN_GB]: `Runtime Environment`,\n [LOCALE.DE_DE]: `Laufzeitumgebung`,\n },\n} as const satisfies TTermType\n","import cms from './cms'\nimport language from './language'\nimport library from './library'\nimport runtime_environment from './runtime_environment'\n\nexport const TERM_TYPES = {\n [cms.id]: cms,\n [library.id]: library,\n [runtime_environment.id]: runtime_environment,\n [language.id]: language,\n} as const\n\nexport type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES]\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'node_js',\n\n term: 'Node.js',\n\n type: [TERM_TYPES.runtime_environment],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Runtime`,\n [LOCALE.DE_DE]: `JavaScript-Laufzeit`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.`,\n [LOCALE.DE_DE]: `Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.`,\n },\n\n tags: [TERM_TAGS.backend],\n\n links: {\n website: 'https://nodejs.org',\n },\n} as const satisfies TTerm\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'react',\n\n term: 'React',\n\n type: [TERM_TYPES.library],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'typescript',\n\n term: 'TypeScript',\n\n type: [TERM_TYPES.language],\n\n label: {\n [LOCALE.EN_GB]: `High-Level Programming Language`,\n [LOCALE.DE_DE]: `Hochsprache`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.`,\n [LOCALE.DE_DE]: `TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend, TERM_TAGS.open_source],\n\n links: {\n website: 'https://www.typescriptlang.org',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '../typings'\nimport node_js from './node_js'\nimport react from './react'\nimport typescript from './typescript'\n\nexport const TERMS: Record<string, TTerm> = {\n [react.id]: react,\n [node_js.id]: node_js,\n [typescript.id]: typescript,\n} as const\n\nexport type TTerms = (typeof TERMS)[keyof typeof TERMS]\nexport type TTermId = keyof typeof TERMS\n","import { CONFIG } from '../common'\nimport type { TLocale } from '../locales'\nimport type {\n TTermDefinition,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '../typings'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDefinitionLocalized = ({\n definition,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n definition: TTermDefinition\n locale?: TLocale\n}): string => {\n return definition[locale] || definition[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import { CONFIG } from './common'\nimport type { TLocale } from './locales'\nimport { TERMS } from './terms'\nimport type { TTermId } from './terms'\nimport type { TDevDict, TTermLocalized } from './typings'\nimport { getDefinitionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from './utils'\n\nexport const getTerm = ({\n id,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n id: TTermId\n locale?: TLocale\n}): TTermLocalized | null => {\n const term = TERMS[id]\n\n if (!term) {\n return null\n }\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n definition: getDefinitionLocalized({ definition: term.definition, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict: TDevDict = {}\n\n for (const [key, term] of Object.entries(TERMS)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","CONFIG","backend","frontend","open_source","TERM_TAGS","cms","language","library","runtime_environment","TERM_TYPES","node_js","react","typescript","TERMS","getLabelLocalized","label","locale","getDefinitionLocalized","definition","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"mappings":"gOAAO,MAAMA,EAAS,CACpB,MAAO,QACP,MAAO,OACT,ECCaC,EAAS,CACpB,eAAgBD,EAAO,KACzB,ECHAE,EAAe,CACb,GAAI,UAEJ,KAAM,CACJ,CAACF,EAAO,KAAK,EAAG,UAChB,CAACA,EAAO,KAAK,EAAG,SAAA,CAEpB,ECPAG,EAAe,CACb,GAAI,WAEJ,KAAM,CACJ,CAACH,EAAO,KAAK,EAAG,WAChB,CAACA,EAAO,KAAK,EAAG,UAAA,CAEpB,ECPAI,EAA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ACL,GAAGA,EACH,MAAOR,EAAkB,CAAE,MAAOQ,EAAK,MAAO,OAAAN,EAAQ,EACtD,WAAYC,EAAuB,CAAE,WAAYK,EAAK,WAAY,OAAAN,EAAQ,EAC1E,KAAMM,EAAK,KAAK,IAAKG,GAAUJ,EAAqB,CAAE,KAAMI,EAAO,OAAAT,CAAA,CAAQ,CAAC,EAC5E,KAAMM,EAAK,KAAK,IAAKG,GAAUN,EAAoB,CAAE,IAAKM,EAAO,OAAAT,EAAQ,CAAC,CAAA,EARnE,IAUX,EAEaU,EAAU,CACrB,CACE,OAAAV,EAAShB,EAAO,cAClB,EAEI,CAAE,OAAQA,EAAO,kBACR,CACb,MAAM2B,EAAiB,CAAA,EAEvB,SAAW,CAACC,EAAKN,CAAI,IAAK,OAAO,QAAQT,CAAK,EAAG,CAC/C,MAAMgB,EAAgBN,EAAQ,CAAE,GAAID,EAAK,GAAI,OAAAN,EAAQ,EACjDa,IACFF,EAAKC,CAAc,EAAIC,EAE3B,CAEA,OAAOF,CACT"}
1
+ {"version":3,"file":"dev-dict.min.js","sources":["../data/locales/index.ts","../data/tags/backend.ts","../data/tags/frontend.ts","../data/tags/open_source.ts","../data/tags/index.ts","../data/types/cms.ts","../data/types/language.ts","../data/types/library.ts","../data/types/runtime_environment.ts","../data/types/index.ts","../data/terms/node_js.ts","../data/terms/react.ts","../data/terms/typescript.ts","../data/terms/index.ts","../src/common/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_US: 'en-US',\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_US]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_US]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'open_source',\n\n name: {\n [LOCALE.EN_US]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport open_source from './open_source'\n\nexport const TAG = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [open_source.id]: open_source,\n} as const\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_US]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'language',\n\n name: {\n [LOCALE.EN_US]: `Language`,\n [LOCALE.DE_DE]: `Sprache`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_US]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'runtime_environment',\n\n name: {\n [LOCALE.EN_US]: `Runtime Environment`,\n [LOCALE.DE_DE]: `Laufzeitumgebung`,\n },\n} as const satisfies TTermType\n","import cms from './cms'\nimport language from './language'\nimport library from './library'\nimport runtime_environment from './runtime_environment'\n\nexport const TYPE = {\n [cms.id]: cms,\n [language.id]: language,\n [library.id]: library,\n [runtime_environment.id]: runtime_environment,\n} as const\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'node_js',\n\n name: 'Node.js',\n\n type: [TYPE.runtime_environment],\n\n label: {\n [LOCALE.EN_US]: `JavaScript Runtime`,\n [LOCALE.DE_DE]: `JavaScript-Laufzeit`,\n },\n\n definition: {\n [LOCALE.EN_US]: `Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.`,\n [LOCALE.DE_DE]: `Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.`,\n },\n\n tags: [TAG.backend],\n\n links: {\n website: 'https://nodejs.org',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'react',\n\n name: 'React',\n\n type: [TYPE.library],\n\n label: {\n [LOCALE.EN_US]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n definition: {\n [LOCALE.EN_US]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TAG.frontend, TAG.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'typescript',\n\n name: 'TypeScript',\n\n type: [TYPE.language],\n\n label: {\n [LOCALE.EN_US]: `High-Level Programming Language`,\n [LOCALE.DE_DE]: `Hochsprache`,\n },\n\n definition: {\n [LOCALE.EN_US]: `TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.`,\n [LOCALE.DE_DE]: `TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.`,\n },\n\n tags: [TAG.frontend, TAG.backend, TAG.open_source],\n\n links: {\n website: 'https://www.typescriptlang.org',\n },\n} as const satisfies TTerm\n","import node_js from './node_js'\nimport react from './react'\nimport typescript from './typescript'\n\nexport const TERM = {\n [node_js.id]: node_js,\n [react.id]: react,\n [typescript.id]: typescript,\n} as const\n","import { LOCALE } from '@data'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_US,\n} as const\n","import type {\n TLocale,\n TTermDefinition,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '@/types'\nimport { CONFIG } from '@/common'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDefinitionLocalized = ({\n definition,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n definition: TTermDefinition\n locale?: TLocale\n}): string => {\n return definition[locale] || definition[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import type { TDevDict, TLocale, TTermId, TTermLocalized } from '@/types'\nimport { CONFIG } from '@/common'\nimport { getDefinitionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from '@/utils'\nimport { TERM } from '@data'\n\nexport const getTerm = ({ id, locale = CONFIG.DEFAULT_LOCALE }: { id: TTermId; locale?: TLocale }): TTermLocalized => {\n // We do not need a null check here because TTermId only allows valid IDs\n const term = TERM[id]\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n definition: getDefinitionLocalized({ definition: term.definition, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict = {} as TDevDict\n\n for (const [key, term] of Object.entries(TERM)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","backend","frontend","open_source","TAG","cms","language","library","runtime_environment","TYPE","node_js","react","typescript","TERM","CONFIG","getLabelLocalized","label","locale","getDefinitionLocalized","definition","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"mappings":"gOAAO,MAAMA,EAAS,CACpB,MAAO,QAEP,MAAO,OACT,ECAAC,EAAe,CACb,GAAI,UAEJ,KAAM,CACJ,CAACD,EAAO,KAAK,EAAG,UAChB,CAACA,EAAO,KAAK,EAAG,SAAA,CAEpB,ECPAE,EAAe,CACb,GAAI,WAEJ,KAAM,CACJ,CAACF,EAAO,KAAK,EAAG,WAChB,CAACA,EAAO,KAAK,EAAG,UAAA,CAEpB,ECPAG,EAAe,CACb,GAAI,cAEJ,KAAM,CACJ,CAACH,EAAO,KAAK,EAAG,cAChB,CAACA,EAAO,KAAK,EAAG,aAAA,CAEpB,ECPaI,EAAM,CACjB,CAACH,EAAQ,EAAE,EAAGA,EACd,CAACC,EAAS,EAAE,EAAGA,EACf,CAACC,EAAY,EAAE,EAAGA,CACpB,ECJAE,EAAe,CACb,GAAI,KAMN,ECPAC,EAAe,CACb,GAAI,WAEJ,KAAM,CACJ,CAACN,EAAO,KAAK,EAAG,WAChB,CAACA,EAAO,KAAK,EAAG,SAAA,CAEpB,ECPAO,EAAe,CACb,GAAI,UAEJ,KAAM,CACJ,CAACP,E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AAO,kBACR,CACb,MAAMc,EAAO,CAAA,EAEb,SAAW,CAACC,EAAKN,CAAI,IAAK,OAAO,QAAQV,CAAI,EAAG,CAC9C,MAAMiB,EAAgBN,EAAQ,CAAE,GAAID,EAAK,GAAI,OAAAN,EAAQ,EACjDa,IACFF,EAAKC,CAAc,EAAIC,EAE3B,CAEA,OAAOF,CACT"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../examples/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,65 +1,63 @@
1
1
  const e = {
2
- EN_GB: "en-GB",
2
+ EN_US: "en-US",
3
3
  DE_DE: "de-DE"
4
- }, i = {
5
- DEFAULT_LOCALE: e.EN_GB
6
- }, E = {
4
+ }, d = {
7
5
  id: "backend",
8
6
  name: {
9
- [e.EN_GB]: "Backend",
7
+ [e.EN_US]: "Backend",
10
8
  [e.DE_DE]: "Backend"
11
9
  }
12
- }, d = {
10
+ }, E = {
13
11
  id: "frontend",
14
12
  name: {
15
- [e.EN_GB]: "Frontend",
13
+ [e.EN_US]: "Frontend",
16
14
  [e.DE_DE]: "Frontend"
17
15
  }
18
16
  }, p = {
19
17
  id: "open_source",
20
18
  name: {
21
- [e.EN_GB]: "Open Source",
19
+ [e.EN_US]: "Open Source",
22
20
  [e.DE_DE]: "Open Source"
23
21
  }
24
22
  }, a = {
25
- [E.id]: E,
26
23
  [d.id]: d,
24
+ [E.id]: E,
27
25
  [p.id]: p
28
26
  }, l = {
29
27
  id: "cms"
30
28
  }, m = {
31
29
  id: "language",
32
30
  name: {
33
- [e.EN_GB]: "Language",
31
+ [e.EN_US]: "Language",
34
32
  [e.DE_DE]: "Sprache"
35
33
  }
36
34
  }, L = {
37
35
  id: "library",
38
36
  name: {
39
- [e.EN_GB]: "Library",
37
+ [e.EN_US]: "Library",
40
38
  [e.DE_DE]: "Bibliothek"
41
39
  }
42
40
  }, u = {
43
41
  id: "runtime_environment",
44
42
  name: {
45
- [e.EN_GB]: "Runtime Environment",
43
+ [e.EN_US]: "Runtime Environment",
46
44
  [e.DE_DE]: "Laufzeitumgebung"
47
45
  }
48
46
  }, s = {
49
47
  [l.id]: l,
48
+ [m.id]: m,
50
49
  [L.id]: L,
51
- [u.id]: u,
52
- [m.id]: m
50
+ [u.id]: u
53
51
  }, _ = {
54
52
  id: "node_js",
55
- term: "Node.js",
53
+ name: "Node.js",
56
54
  type: [s.runtime_environment],
57
55
  label: {
58
- [e.EN_GB]: "JavaScript Runtime",
56
+ [e.EN_US]: "JavaScript Runtime",
59
57
  [e.DE_DE]: "JavaScript-Laufzeit"
60
58
  },
61
59
  definition: {
62
- [e.EN_GB]: "Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.",
60
+ [e.EN_US]: "Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.",
63
61
  [e.DE_DE]: "Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen."
64
62
  },
65
63
  tags: [a.backend],
@@ -68,14 +66,14 @@ const e = {
68
66
  }
69
67
  }, g = {
70
68
  id: "react",
71
- term: "React",
69
+ name: "React",
72
70
  type: [s.library],
73
71
  label: {
74
- [e.EN_GB]: "JavaScript Library",
72
+ [e.EN_US]: "JavaScript Library",
75
73
  [e.DE_DE]: "JavaScript-Bibliothek"
76
74
  },
77
75
  definition: {
78
- [e.EN_GB]: "A JavaScript library for building component-based user interfaces.",
76
+ [e.EN_US]: "A JavaScript library for building component-based user interfaces.",
79
77
  [e.DE_DE]: "Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen."
80
78
  },
81
79
  tags: [a.frontend, a.backend],
@@ -84,14 +82,14 @@ const e = {
84
82
  }
85
83
  }, D = {
86
84
  id: "typescript",
87
- term: "TypeScript",
85
+ name: "TypeScript",
88
86
  type: [s.language],
89
87
  label: {
90
- [e.EN_GB]: "High-Level Programming Language",
88
+ [e.EN_US]: "High-Level Programming Language",
91
89
  [e.DE_DE]: "Hochsprache"
92
90
  },
93
91
  definition: {
94
- [e.EN_GB]: "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.",
92
+ [e.EN_US]: "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.",
95
93
  [e.DE_DE]: "TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet."
96
94
  },
97
95
  tags: [a.frontend, a.backend, a.open_source],
@@ -99,51 +97,50 @@ const e = {
99
97
  website: "https://www.typescriptlang.org"
100
98
  }
101
99
  }, b = {
102
- [g.id]: g,
103
100
  [_.id]: _,
101
+ [g.id]: g,
104
102
  [D.id]: D
105
- }, f = ({
103
+ }, i = {
104
+ DEFAULT_LOCALE: e.EN_US
105
+ }, S = ({
106
106
  label: n,
107
107
  locale: t = i.DEFAULT_LOCALE
108
108
  }) => n[t] || n[i.DEFAULT_LOCALE], A = ({
109
109
  definition: n,
110
110
  locale: t = i.DEFAULT_LOCALE
111
- }) => n[t] || n[i.DEFAULT_LOCALE], T = ({
111
+ }) => n[t] || n[i.DEFAULT_LOCALE], U = ({
112
112
  tag: n,
113
113
  locale: t = i.DEFAULT_LOCALE
114
114
  }) => ({
115
115
  id: n.id,
116
116
  name: n.name[t] || n.name[i.DEFAULT_LOCALE]
117
- }), y = ({
117
+ }), f = ({
118
118
  term: n,
119
119
  locale: t = i.DEFAULT_LOCALE
120
120
  }) => ({
121
121
  id: n.id,
122
122
  name: n.name[t] || n.name[i.DEFAULT_LOCALE]
123
- }), B = ({
124
- id: n,
125
- locale: t = i.DEFAULT_LOCALE
126
- }) => {
123
+ }), y = ({ id: n, locale: t = i.DEFAULT_LOCALE }) => {
127
124
  const r = b[n];
128
- return r ? {
125
+ return {
129
126
  ...r,
130
- label: f({ label: r.label, locale: t }),
127
+ label: S({ label: r.label, locale: t }),
131
128
  definition: A({ definition: r.definition, locale: t }),
132
- type: r.type.map((o) => y({ term: o, locale: t })),
133
- tags: r.tags.map((o) => T({ tag: o, locale: t }))
134
- } : null;
135
- }, S = ({
129
+ type: r.type.map((o) => f({ term: o, locale: t })),
130
+ tags: r.tags.map((o) => U({ tag: o, locale: t }))
131
+ };
132
+ }, T = ({
136
133
  locale: n = i.DEFAULT_LOCALE
137
134
  } = { locale: i.DEFAULT_LOCALE }) => {
138
135
  const t = {};
139
136
  for (const [r, o] of Object.entries(b)) {
140
- const c = B({ id: o.id, locale: n });
137
+ const c = y({ id: o.id, locale: n });
141
138
  c && (t[r] = c);
142
139
  }
143
140
  return t;
144
141
  };
145
142
  export {
146
- S as getDict,
147
- B as getTerm
143
+ T as getDict,
144
+ y as getTerm
148
145
  };
149
146
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/locales/index.ts","../src/common/index.ts","../src/term-tags/backend.ts","../src/term-tags/frontend.ts","../src/term-tags/open_source.ts","../src/term-tags/index.ts","../src/term-types/cms.ts","../src/term-types/language.ts","../src/term-types/library.ts","../src/term-types/runtime_environment.ts","../src/term-types/index.ts","../src/terms/node_js.ts","../src/terms/react.ts","../src/terms/typescript.ts","../src/terms/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n\nexport type TLocale = (typeof LOCALE)[keyof typeof LOCALE]\n","import { LOCALE } from '../locales'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_GB,\n} as const\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_GB]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_GB]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'open_source',\n\n name: {\n [LOCALE.EN_GB]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport open_source from './open_source'\n\nexport const TERM_TAGS = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [open_source.id]: open_source,\n} as const\n\nexport type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS]\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_GB]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'language',\n\n name: {\n [LOCALE.EN_GB]: `Language`,\n [LOCALE.DE_DE]: `Sprache`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_GB]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'runtime_environment',\n\n name: {\n [LOCALE.EN_GB]: `Runtime Environment`,\n [LOCALE.DE_DE]: `Laufzeitumgebung`,\n },\n} as const satisfies TTermType\n","import cms from './cms'\nimport language from './language'\nimport library from './library'\nimport runtime_environment from './runtime_environment'\n\nexport const TERM_TYPES = {\n [cms.id]: cms,\n [library.id]: library,\n [runtime_environment.id]: runtime_environment,\n [language.id]: language,\n} as const\n\nexport type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES]\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'node_js',\n\n term: 'Node.js',\n\n type: [TERM_TYPES.runtime_environment],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Runtime`,\n [LOCALE.DE_DE]: `JavaScript-Laufzeit`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.`,\n [LOCALE.DE_DE]: `Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.`,\n },\n\n tags: [TERM_TAGS.backend],\n\n links: {\n website: 'https://nodejs.org',\n },\n} as const satisfies TTerm\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'react',\n\n term: 'React',\n\n type: [TERM_TYPES.library],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'typescript',\n\n term: 'TypeScript',\n\n type: [TERM_TYPES.language],\n\n label: {\n [LOCALE.EN_GB]: `High-Level Programming Language`,\n [LOCALE.DE_DE]: `Hochsprache`,\n },\n\n definition: {\n [LOCALE.EN_GB]: `TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.`,\n [LOCALE.DE_DE]: `TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend, TERM_TAGS.open_source],\n\n links: {\n website: 'https://www.typescriptlang.org',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '../typings'\nimport node_js from './node_js'\nimport react from './react'\nimport typescript from './typescript'\n\nexport const TERMS: Record<string, TTerm> = {\n [react.id]: react,\n [node_js.id]: node_js,\n [typescript.id]: typescript,\n} as const\n\nexport type TTerms = (typeof TERMS)[keyof typeof TERMS]\nexport type TTermId = keyof typeof TERMS\n","import { CONFIG } from '../common'\nimport type { TLocale } from '../locales'\nimport type {\n TTermDefinition,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '../typings'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDefinitionLocalized = ({\n definition,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n definition: TTermDefinition\n locale?: TLocale\n}): string => {\n return definition[locale] || definition[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import { CONFIG } from './common'\nimport type { TLocale } from './locales'\nimport { TERMS } from './terms'\nimport type { TTermId } from './terms'\nimport type { TDevDict, TTermLocalized } from './typings'\nimport { getDefinitionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from './utils'\n\nexport const getTerm = ({\n id,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n id: TTermId\n locale?: TLocale\n}): TTermLocalized | null => {\n const term = TERMS[id]\n\n if (!term) {\n return null\n }\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n definition: getDefinitionLocalized({ definition: term.definition, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict: TDevDict = {}\n\n for (const [key, term] of Object.entries(TERMS)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","CONFIG","backend","frontend","open_source","TERM_TAGS","cms","language","library","runtime_environment","TERM_TYPES","node_js","react","typescript","TERMS","getLabelLocalized","label","locale","getDefinitionLocalized","definition","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"mappings":"AAAO,MAAMA,IAAS;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AACT,GCCaC,IAAS;AAAA,EACpB,gBAAgBD,EAAO;AACzB,GCHAE,IAAe;AAAA,EACb,IAAI;AAAA,EAEJ,MAAM;AAAA,IACJ,CAACF,EAAO,KAAK,GAAG;AAAA,IAChB,CAACA,EAAO,KAAK,GAAG;AAAA,EAAA;AAEpB,GCPAG,IAAe;AAAA,EACb,IAAI;AAAA,EAE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EAAK,IAAI,QAAAN,GAAQ;AACrD,IAAIa,MACFF,EAAKC,CAAc,IAAIC;AAAA,EAE3B;AAEA,SAAOF;AACT;"}
1
+ {"version":3,"file":"index.js","sources":["../data/locales/index.ts","../data/tags/backend.ts","../data/tags/frontend.ts","../data/tags/open_source.ts","../data/tags/index.ts","../data/types/cms.ts","../data/types/language.ts","../data/types/library.ts","../data/types/runtime_environment.ts","../data/types/index.ts","../data/terms/node_js.ts","../data/terms/react.ts","../data/terms/typescript.ts","../data/terms/index.ts","../src/common/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_US: 'en-US',\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_US]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_US]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import type { TTermTag } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'open_source',\n\n name: {\n [LOCALE.EN_US]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport open_source from './open_source'\n\nexport const TAG = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [open_source.id]: open_source,\n} as const\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_US]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'language',\n\n name: {\n [LOCALE.EN_US]: `Language`,\n [LOCALE.DE_DE]: `Sprache`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_US]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import type { TTermType } from '@/types'\n\nimport { LOCALE } from '../locales'\n\nexport default {\n id: 'runtime_environment',\n\n name: {\n [LOCALE.EN_US]: `Runtime Environment`,\n [LOCALE.DE_DE]: `Laufzeitumgebung`,\n },\n} as const satisfies TTermType\n","import cms from './cms'\nimport language from './language'\nimport library from './library'\nimport runtime_environment from './runtime_environment'\n\nexport const TYPE = {\n [cms.id]: cms,\n [language.id]: language,\n [library.id]: library,\n [runtime_environment.id]: runtime_environment,\n} as const\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'node_js',\n\n name: 'Node.js',\n\n type: [TYPE.runtime_environment],\n\n label: {\n [LOCALE.EN_US]: `JavaScript Runtime`,\n [LOCALE.DE_DE]: `JavaScript-Laufzeit`,\n },\n\n definition: {\n [LOCALE.EN_US]: `Node.js is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.`,\n [LOCALE.DE_DE]: `Node.js ist eine kostenlose, Open-Source, plattformübergreifende JavaScript-Laufzeitumgebung, die es Entwicklern ermöglicht, Server, Webanwendungen, Befehlszeilentools und Skripte zu erstellen.`,\n },\n\n tags: [TAG.backend],\n\n links: {\n website: 'https://nodejs.org',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'react',\n\n name: 'React',\n\n type: [TYPE.library],\n\n label: {\n [LOCALE.EN_US]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n definition: {\n [LOCALE.EN_US]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TAG.frontend, TAG.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '@/types'\n\nimport { LOCALE } from '../locales'\nimport { TAG } from '../tags'\nimport { TYPE } from '../types'\n\nexport default {\n id: 'typescript',\n\n name: 'TypeScript',\n\n type: [TYPE.language],\n\n label: {\n [LOCALE.EN_US]: `High-Level Programming Language`,\n [LOCALE.DE_DE]: `Hochsprache`,\n },\n\n definition: {\n [LOCALE.EN_US]: `TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.`,\n [LOCALE.DE_DE]: `TypeScript ist eine stark typisierte Programmiersprache, die auf JavaScript aufbaut und Ihnen bei jeder Größenordnung bessere Werkzeuge bietet.`,\n },\n\n tags: [TAG.frontend, TAG.backend, TAG.open_source],\n\n links: {\n website: 'https://www.typescriptlang.org',\n },\n} as const satisfies TTerm\n","import node_js from './node_js'\nimport react from './react'\nimport typescript from './typescript'\n\nexport const TERM = {\n [node_js.id]: node_js,\n [react.id]: react,\n [typescript.id]: typescript,\n} as const\n","import { LOCALE } from '@data'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_US,\n} as const\n","import type {\n TLocale,\n TTermDefinition,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '@/types'\nimport { CONFIG } from '@/common'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDefinitionLocalized = ({\n definition,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n definition: TTermDefinition\n locale?: TLocale\n}): string => {\n return definition[locale] || definition[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import type { TDevDict, TLocale, TTermId, TTermLocalized } from '@/types'\nimport { CONFIG } from '@/common'\nimport { getDefinitionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from '@/utils'\nimport { TERM } from '@data'\n\nexport const getTerm = ({ id, locale = CONFIG.DEFAULT_LOCALE }: { id: TTermId; locale?: TLocale }): TTermLocalized => {\n // We do not need a null check here because TTermId only allows valid IDs\n const term = TERM[id]\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n definition: getDefinitionLocalized({ definition: term.definition, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict = {} as TDevDict\n\n for (const [key, term] of Object.entries(TERM)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","backend","frontend","open_source","TAG","cms","language","library","runtime_environment","TYPE","node_js","react","typescript","TERM","CONFIG","getLabelLocalized","label","locale","getDefinitionLocalized","definition","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"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C;AAAA,EAAA;AAE9E,GAEaU,IAAU,CACrB;AAAA,EACE,QAAAV,IAASH,EAAO;AAClB,IAEI,EAAE,QAAQA,EAAO,qBACR;AACb,QAAMc,IAAO,CAAA;AAEb,aAAW,CAACC,GAAKN,CAAI,KAAK,OAAO,QAAQV,CAAI,GAAG;AAC9C,UAAMiB,IAAgBN,EAAQ,EAAE,IAAID,EAAK,IAAI,QAAAN,GAAQ;AACrD,IAAIa,MACFF,EAAKC,CAAc,IAAIC;AAAA,EAE3B;AAEA,SAAOF;AACT;"}
@@ -0,0 +1,5 @@
1
+ export declare const MISC: {};
2
+ export declare const CONFIG: {
3
+ readonly DEFAULT_LOCALE: "en-US";
4
+ };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,IAAc,CAAA;AAE/B,eAAO,MAAM,MAAM;;CAET,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { TDevDict, TLocale, TTermId, TTermLocalized } from '@/types';
2
+ export declare const getTerm: ({ id, locale }: {
3
+ id: TTermId;
4
+ locale?: TLocale;
5
+ }) => TTermLocalized;
6
+ export declare const getDict: ({ locale, }?: {
7
+ locale?: TLocale;
8
+ }) => TDevDict;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKzE,eAAO,MAAM,OAAO,GAAI,gBAAwC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,KAAG,cAWnG,CAAA;AAED,eAAO,MAAM,OAAO,GAClB,cAEG;IACD,MAAM,CAAC,EAAE,OAAO,CAAA;CACmB,KACpC,QAWF,CAAA"}
@@ -1,36 +1,36 @@
1
- import { CONFIG } from '../common';
2
- import type { TLocale } from '../locales';
3
- import type { TTermTags } from '../term-tags';
4
- import type { TTermTypes } from '../term-types';
5
- import type { TTermId } from '../terms';
6
- export type LocaleRecord = {
1
+ import { CONFIG } from '@/common';
2
+ import { LOCALE, TAG, TERM, TYPE } from '@data';
3
+ export type TLocale = (typeof LOCALE)[keyof typeof LOCALE];
4
+ export type TLocaleRecord = {
7
5
  [CONFIG.DEFAULT_LOCALE]: string;
8
6
  } & Partial<Record<Exclude<TLocale, typeof CONFIG.DEFAULT_LOCALE>, string>>;
9
7
  export type TLinkType = 'website' | 'github' | 'npm';
10
8
  export type TTermLinks = {
11
9
  website: string;
12
10
  } & Partial<Record<Exclude<TLinkType, 'website'>, string>>;
13
- export type TTermLabel = Record<TLocale, string>;
14
- export type TTermDefinition = Record<TLocale, string>;
11
+ export type TTermLabel = TLocaleRecord;
12
+ export type TTermDefinition = TLocaleRecord;
15
13
  export type TTermType = {
16
14
  id: string;
17
- name: LocaleRecord;
15
+ name: TLocaleRecord;
18
16
  };
19
17
  export type TTermTypeLocalized = {
20
18
  id: string;
21
19
  name: string;
22
20
  };
21
+ export type TTermTypes = (typeof TYPE)[keyof typeof TYPE];
23
22
  export type TTermTag = {
24
23
  id: string;
25
- name: LocaleRecord;
24
+ name: TLocaleRecord;
26
25
  };
27
26
  export type TTermTagLocalized = {
28
27
  id: string;
29
28
  name: string;
30
29
  };
30
+ export type TTermTags = (typeof TAG)[keyof typeof TAG];
31
31
  export type TTerm = {
32
32
  id: string;
33
- term: string;
33
+ name: string;
34
34
  type: TTermTypes[];
35
35
  label: TTermLabel;
36
36
  definition: TTermDefinition;
@@ -43,5 +43,7 @@ export type TTermLocalized = Omit<TTerm, 'label' | 'definition' | 'type' | 'tags
43
43
  type: TTermTypeLocalized[];
44
44
  tags: TTermTagLocalized[];
45
45
  };
46
+ export type TTerms = (typeof TERM)[keyof typeof TERM];
47
+ export type TTermId = keyof typeof TERM;
46
48
  export type TDevDict = Record<TTermId, TTermLocalized>;
47
49
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE/C,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAA;AAE1D,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAChC,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEpD,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAE1D,MAAM,MAAM,UAAU,GAAG,aAAa,CAAA;AAEtC,MAAM,MAAM,eAAe,GAAG,aAAa,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,aAAa,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAA;AAEzD,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,aAAa,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,OAAO,GAAG,CAAC,CAAA;AAEtD,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,EAAE,CAAA;IAClB,KAAK,EAAE,UAAU,CAAA;IACjB,UAAU,EAAE,eAAe,CAAA;IAC3B,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,UAAU,CAAA;CAInB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG;IACnF,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,kBAAkB,EAAE,CAAA;IAC1B,IAAI,EAAE,iBAAiB,EAAE,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAA;AAErD,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,IAAI,CAAA;AAEvC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA"}
@@ -1,5 +1,4 @@
1
- import type { TLocale } from '../locales';
2
- import type { TTermDefinition, TTermLabel, TTermTag, TTermTagLocalized, TTermType, TTermTypeLocalized } from '../typings';
1
+ import type { TLocale, TTermDefinition, TTermLabel, TTermTag, TTermTagLocalized, TTermType, TTermTypeLocalized } from '@/types';
3
2
  export declare const getLabelLocalized: ({ label, locale, }: {
4
3
  label: TTermLabel;
5
4
  locale?: TLocale;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAGhB,eAAO,MAAM,iBAAiB,GAAI,oBAG/B;IACD,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,MAEH,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,yBAGpC;IACD,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,MAEH,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,kBAGjC;IACD,GAAG,EAAE,QAAQ,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,iBAKH,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,mBAGlC;IACD,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,kBAKH,CAAA"}
package/package.json CHANGED
@@ -1,25 +1,30 @@
1
1
  {
2
2
  "name": "dev-dict",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A dictionary of software related terms. Supports multiple languages.",
5
- "scripts": {
6
- "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
7
- "prepublishOnly": "npm run build",
8
- "test": "echo \"This project does not have any tests which can be run yet...\""
9
- },
5
+ "author": "Cornelius Weidmann <cornelius@kyco.io> (https://kyco.io)",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "dev-dict",
9
+ "developer",
10
+ "dictionary",
11
+ "dev dictionary",
12
+ "dev terms",
13
+ "dev encyclopedia",
14
+ "developer dictionary",
15
+ "developer terms",
16
+ "software terms",
17
+ "programming terms",
18
+ "tech terms"
19
+ ],
20
+ "homepage": "https://github.com/kyco/dev-dict#readme",
10
21
  "repository": {
11
22
  "type": "git",
12
23
  "url": "git+https://github.com/kyco/dev-dict.git"
13
24
  },
14
- "publishConfig": {
15
- "provenance": true
16
- },
17
- "author": "Cornelius Weidmann <cornelius@kyco.io> (https://kyco.io)",
18
- "license": "MIT",
19
25
  "bugs": {
20
26
  "url": "https://github.com/kyco/dev-dict/issues"
21
27
  },
22
- "homepage": "https://github.com/kyco/dev-dict#readme",
23
28
  "type": "module",
24
29
  "main": "./dist/index.js",
25
30
  "unpkg": "./dist/dev-dict.min.js",
@@ -33,6 +38,17 @@
33
38
  "files": [
34
39
  "dist"
35
40
  ],
41
+ "publishConfig": {
42
+ "provenance": true
43
+ },
44
+ "scripts": {
45
+ "dev": "vite",
46
+ "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
47
+ "prepublishOnly": "npm run build",
48
+ "test": "echo \"This project does not have any tests which can be run yet...\"",
49
+ "update-packages": "npx npm-check-updates -u"
50
+ },
51
+ "packageManager": "pnpm@10.23.0",
36
52
  "devDependencies": {
37
53
  "@eslint/js": "^9.39.1",
38
54
  "@eslint/json": "^0.14.0",
@@ -40,15 +56,15 @@
40
56
  "@semantic-release/changelog": "^6.0.3",
41
57
  "@semantic-release/git": "^10.0.1",
42
58
  "@semantic-release/github": "^12.0.2",
43
- "@semantic-release/npm": "^13.1.1",
44
- "@types/node": "^24.10.0",
59
+ "@semantic-release/npm": "^13.1.2",
60
+ "@types/node": "^24.10.1",
45
61
  "conventional-changelog-conventionalcommits": "^9.1.0",
46
62
  "eslint": "^9.39.1",
47
63
  "globals": "^16.5.0",
48
64
  "prettier": "^3.6.2",
49
65
  "semantic-release": "^25.0.2",
50
66
  "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.46.3",
52
- "vite": "^7.2.2"
67
+ "typescript-eslint": "^8.48.0",
68
+ "vite": "^7.2.4"
53
69
  }
54
70
  }
@@ -1,5 +0,0 @@
1
- export declare const MISC: {};
2
- export declare const CONFIG: {
3
- readonly DEFAULT_LOCALE: "en-GB";
4
- };
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,IAAc,CAAA;AAE/B,eAAO,MAAM,MAAM;;CAET,CAAA"}
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { TLocale } from './locales';
2
- import type { TTermId } from './terms';
3
- import type { TDevDict, TTermLocalized } from './typings';
4
- export declare const getTerm: ({ id, locale, }: {
5
- id: TTermId;
6
- locale?: TLocale;
7
- }) => TTermLocalized | null;
8
- export declare const getDict: ({ locale, }?: {
9
- locale?: TLocale;
10
- }) => TDevDict;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGzD,eAAO,MAAM,OAAO,GAAI,iBAGrB;IACD,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,cAAc,GAAG,IAcpB,CAAA;AAED,eAAO,MAAM,OAAO,GAClB,cAEG;IACD,MAAM,CAAC,EAAE,OAAO,CAAA;CACmB,KACpC,QAWF,CAAA"}
@@ -1,6 +0,0 @@
1
- export declare const LOCALE: {
2
- readonly EN_GB: "en-GB";
3
- readonly DE_DE: "de-DE";
4
- };
5
- export type TLocale = (typeof LOCALE)[keyof typeof LOCALE];
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGT,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/term-tags/backend.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../src/term-tags/frontend.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/term-tags/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAIZ,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"open_source.d.ts","sourceRoot":"","sources":["../../src/term-tags/open_source.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../../src/term-types/cms.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/term-types/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKb,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/term-types/language.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/term-types/library.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime_environment.d.ts","sourceRoot":"","sources":["../../src/term-types/runtime_environment.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -1,5 +0,0 @@
1
- import type { TTerm } from '../typings';
2
- export declare const TERMS: Record<string, TTerm>;
3
- export type TTerms = (typeof TERMS)[keyof typeof TERMS];
4
- export type TTermId = keyof typeof TERMS;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/terms/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAKvC,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAI9B,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAA;AACvD,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,KAAK,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"node_js.d.ts","sourceRoot":"","sources":["../../src/terms/node_js.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAsB0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/terms/react.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAsB0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/terms/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAsB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