@jjlmoya/utils-alcohol 1.20.0 → 1.23.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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-alcohol",
3
- "version": "1.20.0",
3
+ "version": "1.23.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
7
7
  "exports": {
8
8
  ".": "./src/index.ts",
9
- "./data": "./src/data.ts"
9
+ "./data": "./src/data.ts",
10
+ "./entries": "./src/entries.ts"
10
11
  },
11
12
  "files": [
12
13
  "src"
package/src/entries.ts ADDED
@@ -0,0 +1,17 @@
1
+ export { alcoholClearance } from './tool/alcoholClearance/entry';
2
+ export type { AlcoholClearanceUI, AlcoholClearanceLocaleContent } from './tool/alcoholClearance/entry';
3
+ export { beerCooler } from './tool/beerCooler/entry';
4
+ export type { BeerCoolerUI, BeerCoolerLocaleContent } from './tool/beerCooler/entry';
5
+ export { carbonationCalculator } from './tool/carbonationCalculator/entry';
6
+ export type { CarbonationUI, CarbonationLocaleContent } from './tool/carbonationCalculator/entry';
7
+ export { cocktailBalancer } from './tool/cocktailBalancer/entry';
8
+ export type { CocktailBalancerUI, CocktailBalancerLocaleContent } from './tool/cocktailBalancer/entry';
9
+ export { partyKeg } from './tool/partyKeg/entry';
10
+ export type { PartyKegUI, PartyKegLocaleContent } from './tool/partyKeg/entry';
11
+ export { alcoholCategory, toolsCategory } from './category';
12
+ import { alcoholClearance } from './tool/alcoholClearance/entry';
13
+ import { beerCooler } from './tool/beerCooler/entry';
14
+ import { carbonationCalculator } from './tool/carbonationCalculator/entry';
15
+ import { cocktailBalancer } from './tool/cocktailBalancer/entry';
16
+ import { partyKeg } from './tool/partyKeg/entry';
17
+ export const ALL_ENTRIES = [alcoholClearance, beerCooler, carbonationCalculator, cocktailBalancer, partyKeg];
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ export * from './tool/cocktailBalancer';
5
5
  export * from './tool/partyKeg';
6
6
 
7
7
  export { alcoholCategory } from './category';
8
- export { default as AlcoholCategorySEO } from './category/seo.astro';
8
+ export const AlcoholCategorySEO = () => import('./category/seo.astro').then((m) => m.default);
9
9
 
10
10
  export type {
11
11
  KnownLocale,
@@ -14,7 +14,8 @@ import type { UtilitySEOContent } from "@jjlmoya/utils-shared";
14
14
  export async function getStaticPaths() {
15
15
  const paths = [];
16
16
 
17
- for (const { entry, Component } of ALL_TOOLS) {
17
+ for (const { entry, Component: lazyComp } of ALL_TOOLS) {
18
+ const { default: Component } = await lazyComp();
18
19
  const localeEntries = Object.entries(entry.i18n) as [
19
20
  KnownLocale,
20
21
  () => Promise<ToolLocaleContent>,
@@ -52,8 +53,6 @@ export async function getStaticPaths() {
52
53
  return paths;
53
54
  }
54
55
 
55
- type ToolComponent = (props: { ui: Record<string, string> }) => unknown;
56
-
57
56
  interface NavItem {
58
57
  id: string;
59
58
  title: string;
@@ -62,7 +61,7 @@ interface NavItem {
62
61
  }
63
62
 
64
63
  interface Props {
65
- Component: ToolComponent;
64
+ Component: unknown;
66
65
  locale: KnownLocale;
67
66
  content: ToolLocaleContent;
68
67
  localeUrls: Partial<Record<KnownLocale, string>>;
@@ -0,0 +1,54 @@
1
+ import type { AlcoholToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface AlcoholClearanceUI {
4
+ [key: string]: string;
5
+ biologicalSexLabel: string;
6
+ weightLabel: string;
7
+ kgUnit: string;
8
+ addDrinkLabel: string;
9
+ beerLabel: string;
10
+ wineLabel: string;
11
+ spiritLabel: string;
12
+ shotLabel: string;
13
+ accumulatedLabel: string;
14
+ emptyListLabel: string;
15
+ emptySubLabel: string;
16
+ estimatedBacLabel: string;
17
+ bacUnit: string;
18
+ timeToZeroLabel: string;
19
+ waterAdviceLabel: string;
20
+ pillAdviceLabel: string;
21
+ noneAdvice: string;
22
+ hydrationAdvice: string;
23
+ electrolytesAdvice: string;
24
+ disclaimerText: string;
25
+ drinkUnit: string;
26
+ drinksUnit: string;
27
+ }
28
+
29
+ export type AlcoholClearanceLocaleContent = ToolLocaleContent<AlcoholClearanceUI>;
30
+
31
+ export const alcoholClearance: AlcoholToolEntry<AlcoholClearanceUI> = {
32
+ id: 'alcohol-clearance',
33
+ icons: {
34
+ bg: 'mdi:account-alert',
35
+ fg: 'mdi:glass-cocktail',
36
+ },
37
+ i18n: {
38
+ de: () => import('./i18n/de').then((m) => m.content),
39
+ en: () => import('./i18n/en').then((m) => m.content),
40
+ es: () => import('./i18n/es').then((m) => m.content),
41
+ fr: () => import('./i18n/fr').then((m) => m.content),
42
+ id: () => import('./i18n/id').then((m) => m.content),
43
+ it: () => import('./i18n/it').then((m) => m.content),
44
+ ja: () => import('./i18n/ja').then((m) => m.content),
45
+ ko: () => import('./i18n/ko').then((m) => m.content),
46
+ nl: () => import('./i18n/nl').then((m) => m.content),
47
+ pl: () => import('./i18n/pl').then((m) => m.content),
48
+ pt: () => import('./i18n/pt').then((m) => m.content),
49
+ ru: () => import('./i18n/ru').then((m) => m.content),
50
+ sv: () => import('./i18n/sv').then((m) => m.content),
51
+ tr: () => import('./i18n/tr').then((m) => m.content),
52
+ zh: () => import('./i18n/zh').then((m) => m.content),
53
+ },
54
+ };
@@ -1,66 +1,8 @@
1
- import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import AlcoholClearanceCalculator from './component.astro';
3
- import AlcoholClearanceSEO from './seo.astro';
4
- import AlcoholClearanceBibliography from './bibliography.astro';
5
-
6
- export interface AlcoholClearanceUI {
7
- [key: string]: string;
8
- biologicalSexLabel: string;
9
- weightLabel: string;
10
- kgUnit: string;
11
- addDrinkLabel: string;
12
- beerLabel: string;
13
- wineLabel: string;
14
- spiritLabel: string;
15
- shotLabel: string;
16
- accumulatedLabel: string;
17
- emptyListLabel: string;
18
- emptySubLabel: string;
19
- estimatedBacLabel: string;
20
- bacUnit: string;
21
- timeToZeroLabel: string;
22
- waterAdviceLabel: string;
23
- pillAdviceLabel: string;
24
- noneAdvice: string;
25
- hydrationAdvice: string;
26
- electrolytesAdvice: string;
27
- disclaimerText: string;
28
- drinkUnit: string;
29
- drinksUnit: string;
30
- }
31
-
32
- export type AlcoholClearanceLocaleContent = ToolLocaleContent<AlcoholClearanceUI>;
33
-
34
- export const alcoholClearance: AlcoholToolEntry<AlcoholClearanceUI> = {
35
- id: 'alcohol-clearance',
36
- icons: {
37
- bg: 'mdi:account-alert',
38
- fg: 'mdi:glass-cocktail',
39
- },
40
- i18n: {
41
- de: () => import('./i18n/de').then((m) => m.content),
42
- en: () => import('./i18n/en').then((m) => m.content),
43
- es: () => import('./i18n/es').then((m) => m.content),
44
- fr: () => import('./i18n/fr').then((m) => m.content),
45
- id: () => import('./i18n/id').then((m) => m.content),
46
- it: () => import('./i18n/it').then((m) => m.content),
47
- ja: () => import('./i18n/ja').then((m) => m.content),
48
- ko: () => import('./i18n/ko').then((m) => m.content),
49
- nl: () => import('./i18n/nl').then((m) => m.content),
50
- pl: () => import('./i18n/pl').then((m) => m.content),
51
- pt: () => import('./i18n/pt').then((m) => m.content),
52
- ru: () => import('./i18n/ru').then((m) => m.content),
53
- sv: () => import('./i18n/sv').then((m) => m.content),
54
- tr: () => import('./i18n/tr').then((m) => m.content),
55
- zh: () => import('./i18n/zh').then((m) => m.content),
56
- },
57
- };
58
-
59
- export { AlcoholClearanceCalculator };
60
-
1
+ import { alcoholClearance } from './entry';
2
+ export * from './entry';
61
3
  export const ALCOHOL_CLEARANCE_TOOL: ToolDefinition = {
62
4
  entry: alcoholClearance as AlcoholToolEntry<Record<string, string>>,
63
- Component: AlcoholClearanceCalculator,
64
- SEOComponent: AlcoholClearanceSEO,
65
- BibliographyComponent: AlcoholClearanceBibliography,
5
+ Component: () => import('./component.astro'),
6
+ SEOComponent: () => import('./seo.astro'),
7
+ BibliographyComponent: () => import('./bibliography.astro'),
66
8
  };
@@ -0,0 +1,53 @@
1
+ import type { AlcoholToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface BeerCoolerUI {
4
+ [key: string]: string;
5
+ step1Title: string;
6
+ canLabel: string;
7
+ aluminumLabel: string;
8
+ bottleLabel: string;
9
+ glassLabel: string;
10
+ step2Title: string;
11
+ fridgeLabel: string;
12
+ freezerLabel: string;
13
+ step3Title: string;
14
+ initialTempLabel: string;
15
+ targetTempLabel: string;
16
+ glacialLabel: string;
17
+ perfectLabel: string;
18
+ bodegaLabel: string;
19
+ readyTitle: string;
20
+ readyDescription: string;
21
+ estimatedTimeLabel: string;
22
+ methodLabel: string;
23
+ containerLabel: string;
24
+ alreadyColdLabel: string;
25
+ neverColdLabel: string;
26
+ }
27
+
28
+ export type BeerCoolerLocaleContent = ToolLocaleContent<BeerCoolerUI>;
29
+
30
+ export const beerCooler: AlcoholToolEntry<BeerCoolerUI> = {
31
+ id: 'beer-cooling',
32
+ icons: {
33
+ bg: 'mdi:snowflake-thermometer',
34
+ fg: 'mdi:beer',
35
+ },
36
+ i18n: {
37
+ de: () => import('./i18n/de').then((m) => m.content),
38
+ en: () => import('./i18n/en').then((m) => m.content),
39
+ es: () => import('./i18n/es').then((m) => m.content),
40
+ fr: () => import('./i18n/fr').then((m) => m.content),
41
+ id: () => import('./i18n/id').then((m) => m.content),
42
+ it: () => import('./i18n/it').then((m) => m.content),
43
+ ja: () => import('./i18n/ja').then((m) => m.content),
44
+ ko: () => import('./i18n/ko').then((m) => m.content),
45
+ nl: () => import('./i18n/nl').then((m) => m.content),
46
+ pl: () => import('./i18n/pl').then((m) => m.content),
47
+ pt: () => import('./i18n/pt').then((m) => m.content),
48
+ ru: () => import('./i18n/ru').then((m) => m.content),
49
+ sv: () => import('./i18n/sv').then((m) => m.content),
50
+ tr: () => import('./i18n/tr').then((m) => m.content),
51
+ zh: () => import('./i18n/zh').then((m) => m.content),
52
+ },
53
+ };
@@ -1,65 +1,8 @@
1
- import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import BeerCoolerCalculator from './component.astro';
3
- import BeerCoolerSEO from './seo.astro';
4
- import BeerCoolerBibliography from './bibliography.astro';
5
-
6
- export interface BeerCoolerUI {
7
- [key: string]: string;
8
- step1Title: string;
9
- canLabel: string;
10
- aluminumLabel: string;
11
- bottleLabel: string;
12
- glassLabel: string;
13
- step2Title: string;
14
- fridgeLabel: string;
15
- freezerLabel: string;
16
- step3Title: string;
17
- initialTempLabel: string;
18
- targetTempLabel: string;
19
- glacialLabel: string;
20
- perfectLabel: string;
21
- bodegaLabel: string;
22
- readyTitle: string;
23
- readyDescription: string;
24
- estimatedTimeLabel: string;
25
- methodLabel: string;
26
- containerLabel: string;
27
- alreadyColdLabel: string;
28
- neverColdLabel: string;
29
- }
30
-
31
- export type BeerCoolerLocaleContent = ToolLocaleContent<BeerCoolerUI>;
32
-
33
- export const beerCooler: AlcoholToolEntry<BeerCoolerUI> = {
34
- id: 'beer-cooling',
35
- icons: {
36
- bg: 'mdi:snowflake-thermometer',
37
- fg: 'mdi:beer',
38
- },
39
- i18n: {
40
- de: () => import('./i18n/de').then((m) => m.content),
41
- en: () => import('./i18n/en').then((m) => m.content),
42
- es: () => import('./i18n/es').then((m) => m.content),
43
- fr: () => import('./i18n/fr').then((m) => m.content),
44
- id: () => import('./i18n/id').then((m) => m.content),
45
- it: () => import('./i18n/it').then((m) => m.content),
46
- ja: () => import('./i18n/ja').then((m) => m.content),
47
- ko: () => import('./i18n/ko').then((m) => m.content),
48
- nl: () => import('./i18n/nl').then((m) => m.content),
49
- pl: () => import('./i18n/pl').then((m) => m.content),
50
- pt: () => import('./i18n/pt').then((m) => m.content),
51
- ru: () => import('./i18n/ru').then((m) => m.content),
52
- sv: () => import('./i18n/sv').then((m) => m.content),
53
- tr: () => import('./i18n/tr').then((m) => m.content),
54
- zh: () => import('./i18n/zh').then((m) => m.content),
55
- },
56
- };
57
-
58
- export { BeerCoolerCalculator };
59
-
1
+ import { beerCooler } from './entry';
2
+ export * from './entry';
60
3
  export const BEER_COOLER_TOOL: ToolDefinition = {
61
4
  entry: beerCooler as AlcoholToolEntry<Record<string, string>>,
62
- Component: BeerCoolerCalculator,
63
- SEOComponent: BeerCoolerSEO,
64
- BibliographyComponent: BeerCoolerBibliography,
5
+ Component: () => import('./component.astro'),
6
+ SEOComponent: () => import('./seo.astro'),
7
+ BibliographyComponent: () => import('./bibliography.astro'),
65
8
  };
@@ -0,0 +1,52 @@
1
+ import type { AlcoholToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface CarbonationUI {
4
+ [key: string]: string;
5
+ parametersTitle: string;
6
+ metricBtn: string;
7
+ imperialBtn: string;
8
+ volumeLabel: string;
9
+ maxTempLabel: string;
10
+ litersUnit: string;
11
+ celsiusUnit: string;
12
+ gallonsUnit: string;
13
+ fahrenheitUnit: string;
14
+ desiredCo2Label: string;
15
+ volUnit: string;
16
+ resultsTitle: string;
17
+ tableSugarLabel: string;
18
+ cornSugarLabel: string;
19
+ dmeLabel: string;
20
+ safetyTitle: string;
21
+ lowCarbonation: string;
22
+ optimalCarbonation: string;
23
+ highEffervescence: string;
24
+ bubblingVisualizationLabel: string;
25
+ }
26
+
27
+ export type CarbonationLocaleContent = ToolLocaleContent<CarbonationUI>;
28
+
29
+ export const carbonationCalculator: AlcoholToolEntry<CarbonationUI> = {
30
+ id: 'carbonation-calculator',
31
+ icons: {
32
+ bg: 'mdi:bottle-soda-classic',
33
+ fg: 'mdi:water-opacity',
34
+ },
35
+ i18n: {
36
+ de: () => import('./i18n/de').then((m) => m.content),
37
+ en: () => import('./i18n/en').then((m) => m.content),
38
+ es: () => import('./i18n/es').then((m) => m.content),
39
+ fr: () => import('./i18n/fr').then((m) => m.content),
40
+ id: () => import('./i18n/id').then((m) => m.content),
41
+ it: () => import('./i18n/it').then((m) => m.content),
42
+ ja: () => import('./i18n/ja').then((m) => m.content),
43
+ ko: () => import('./i18n/ko').then((m) => m.content),
44
+ nl: () => import('./i18n/nl').then((m) => m.content),
45
+ pl: () => import('./i18n/pl').then((m) => m.content),
46
+ pt: () => import('./i18n/pt').then((m) => m.content),
47
+ ru: () => import('./i18n/ru').then((m) => m.content),
48
+ sv: () => import('./i18n/sv').then((m) => m.content),
49
+ tr: () => import('./i18n/tr').then((m) => m.content),
50
+ zh: () => import('./i18n/zh').then((m) => m.content),
51
+ },
52
+ };
@@ -1,64 +1,8 @@
1
- import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import CarbonationCalculator from './component.astro';
3
- import CarbonationSEO from './seo.astro';
4
- import CarbonationBibliography from './bibliography.astro';
5
-
6
- export interface CarbonationUI {
7
- [key: string]: string;
8
- parametersTitle: string;
9
- metricBtn: string;
10
- imperialBtn: string;
11
- volumeLabel: string;
12
- maxTempLabel: string;
13
- litersUnit: string;
14
- celsiusUnit: string;
15
- gallonsUnit: string;
16
- fahrenheitUnit: string;
17
- desiredCo2Label: string;
18
- volUnit: string;
19
- resultsTitle: string;
20
- tableSugarLabel: string;
21
- cornSugarLabel: string;
22
- dmeLabel: string;
23
- safetyTitle: string;
24
- lowCarbonation: string;
25
- optimalCarbonation: string;
26
- highEffervescence: string;
27
- bubblingVisualizationLabel: string;
28
- }
29
-
30
- export type CarbonationLocaleContent = ToolLocaleContent<CarbonationUI>;
31
-
32
- export const carbonationCalculator: AlcoholToolEntry<CarbonationUI> = {
33
- id: 'carbonation-calculator',
34
- icons: {
35
- bg: 'mdi:bottle-soda-classic',
36
- fg: 'mdi:water-opacity',
37
- },
38
- i18n: {
39
- de: () => import('./i18n/de').then((m) => m.content),
40
- en: () => import('./i18n/en').then((m) => m.content),
41
- es: () => import('./i18n/es').then((m) => m.content),
42
- fr: () => import('./i18n/fr').then((m) => m.content),
43
- id: () => import('./i18n/id').then((m) => m.content),
44
- it: () => import('./i18n/it').then((m) => m.content),
45
- ja: () => import('./i18n/ja').then((m) => m.content),
46
- ko: () => import('./i18n/ko').then((m) => m.content),
47
- nl: () => import('./i18n/nl').then((m) => m.content),
48
- pl: () => import('./i18n/pl').then((m) => m.content),
49
- pt: () => import('./i18n/pt').then((m) => m.content),
50
- ru: () => import('./i18n/ru').then((m) => m.content),
51
- sv: () => import('./i18n/sv').then((m) => m.content),
52
- tr: () => import('./i18n/tr').then((m) => m.content),
53
- zh: () => import('./i18n/zh').then((m) => m.content),
54
- },
55
- };
56
-
57
- export { CarbonationCalculator };
58
-
1
+ import { carbonationCalculator } from './entry';
2
+ export * from './entry';
59
3
  export const CARBONATION_TOOL: ToolDefinition = {
60
4
  entry: carbonationCalculator as AlcoholToolEntry<Record<string, string>>,
61
- Component: CarbonationCalculator,
62
- SEOComponent: CarbonationSEO,
63
- BibliographyComponent: CarbonationBibliography,
5
+ Component: () => import('./component.astro'),
6
+ SEOComponent: () => import('./seo.astro'),
7
+ BibliographyComponent: () => import('./bibliography.astro'),
64
8
  };
@@ -0,0 +1,68 @@
1
+ import type { AlcoholToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface CocktailBalancerUI {
4
+ [key: string]: string;
5
+ title: string;
6
+ presetsBtn: string;
7
+ saveBtn: string;
8
+ resetBtn: string;
9
+ emptyStateTitle: string;
10
+ emptyStateDescription: string;
11
+ addBtn: string;
12
+ addMoreBtn: string;
13
+ flavorProfileTitle: string;
14
+ volLabel: string;
15
+ sugarLabel: string;
16
+ colorLabel: string;
17
+ sourLawTitle: string;
18
+ acidDryLabel: string;
19
+ balanceLabel: string;
20
+ sweetLabel: string;
21
+ aiSuggestionTitle: string;
22
+ addIngredientTitle: string;
23
+ searchPlaceholder: string;
24
+ presetsTitle: string;
25
+ savedSectionTitle: string;
26
+ classicsSectionTitle: string;
27
+ confirmDeleteTitle: string;
28
+ confirmDeleteText: string;
29
+ cancelBtn: string;
30
+ deleteBtn: string;
31
+ verdictSpiritSeco: string;
32
+ verdictSoloDulce: string;
33
+ verdictMuyAcido: string;
34
+ verdictAcido: string;
35
+ verdictEquilibrado: string;
36
+ verdictDulce: string;
37
+ verdictEmpalagoso: string;
38
+ fixAddBitters: string;
39
+ fixAddSugar: string;
40
+ fixAddAcid: string;
41
+ }
42
+
43
+ export type CocktailBalancerLocaleContent = ToolLocaleContent<CocktailBalancerUI>;
44
+
45
+ export const cocktailBalancer: AlcoholToolEntry<CocktailBalancerUI> = {
46
+ id: 'cocktail-balancer',
47
+ icons: {
48
+ bg: 'mdi:glass-cocktail',
49
+ fg: 'mdi:fruit-citrus',
50
+ },
51
+ i18n: {
52
+ de: () => import('./i18n/de').then((m) => m.content),
53
+ en: () => import('./i18n/en').then((m) => m.content),
54
+ es: () => import('./i18n/es').then((m) => m.content),
55
+ fr: () => import('./i18n/fr').then((m) => m.content),
56
+ id: () => import('./i18n/id').then((m) => m.content),
57
+ it: () => import('./i18n/it').then((m) => m.content),
58
+ ja: () => import('./i18n/ja').then((m) => m.content),
59
+ ko: () => import('./i18n/ko').then((m) => m.content),
60
+ nl: () => import('./i18n/nl').then((m) => m.content),
61
+ pl: () => import('./i18n/pl').then((m) => m.content),
62
+ pt: () => import('./i18n/pt').then((m) => m.content),
63
+ ru: () => import('./i18n/ru').then((m) => m.content),
64
+ sv: () => import('./i18n/sv').then((m) => m.content),
65
+ tr: () => import('./i18n/tr').then((m) => m.content),
66
+ zh: () => import('./i18n/zh').then((m) => m.content),
67
+ },
68
+ };
@@ -1,80 +1,8 @@
1
- import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import CocktailBalancerCalculator from './component.astro';
3
- import CocktailBalancerSEO from './seo.astro';
4
- import CocktailBalancerBibliography from './bibliography.astro';
5
-
6
- export interface CocktailBalancerUI {
7
- [key: string]: string;
8
- title: string;
9
- presetsBtn: string;
10
- saveBtn: string;
11
- resetBtn: string;
12
- emptyStateTitle: string;
13
- emptyStateDescription: string;
14
- addBtn: string;
15
- addMoreBtn: string;
16
- flavorProfileTitle: string;
17
- volLabel: string;
18
- sugarLabel: string;
19
- colorLabel: string;
20
- sourLawTitle: string;
21
- acidDryLabel: string;
22
- balanceLabel: string;
23
- sweetLabel: string;
24
- aiSuggestionTitle: string;
25
- addIngredientTitle: string;
26
- searchPlaceholder: string;
27
- presetsTitle: string;
28
- savedSectionTitle: string;
29
- classicsSectionTitle: string;
30
- confirmDeleteTitle: string;
31
- confirmDeleteText: string;
32
- cancelBtn: string;
33
- deleteBtn: string;
34
- verdictSpiritSeco: string;
35
- verdictSoloDulce: string;
36
- verdictMuyAcido: string;
37
- verdictAcido: string;
38
- verdictEquilibrado: string;
39
- verdictDulce: string;
40
- verdictEmpalagoso: string;
41
- fixAddBitters: string;
42
- fixAddSugar: string;
43
- fixAddAcid: string;
44
- }
45
-
46
- export type CocktailBalancerLocaleContent = ToolLocaleContent<CocktailBalancerUI>;
47
-
48
- export const cocktailBalancer: AlcoholToolEntry<CocktailBalancerUI> = {
49
- id: 'cocktail-balancer',
50
- icons: {
51
- bg: 'mdi:glass-cocktail',
52
- fg: 'mdi:fruit-citrus',
53
- },
54
- i18n: {
55
- de: () => import('./i18n/de').then((m) => m.content),
56
- en: () => import('./i18n/en').then((m) => m.content),
57
- es: () => import('./i18n/es').then((m) => m.content),
58
- fr: () => import('./i18n/fr').then((m) => m.content),
59
- id: () => import('./i18n/id').then((m) => m.content),
60
- it: () => import('./i18n/it').then((m) => m.content),
61
- ja: () => import('./i18n/ja').then((m) => m.content),
62
- ko: () => import('./i18n/ko').then((m) => m.content),
63
- nl: () => import('./i18n/nl').then((m) => m.content),
64
- pl: () => import('./i18n/pl').then((m) => m.content),
65
- pt: () => import('./i18n/pt').then((m) => m.content),
66
- ru: () => import('./i18n/ru').then((m) => m.content),
67
- sv: () => import('./i18n/sv').then((m) => m.content),
68
- tr: () => import('./i18n/tr').then((m) => m.content),
69
- zh: () => import('./i18n/zh').then((m) => m.content),
70
- },
71
- };
72
-
73
- export { CocktailBalancerCalculator, CocktailBalancerSEO, CocktailBalancerBibliography };
74
-
1
+ import { cocktailBalancer } from './entry';
2
+ export * from './entry';
75
3
  export const COCKTAIL_BALANCER_TOOL: ToolDefinition = {
76
4
  entry: cocktailBalancer as AlcoholToolEntry<Record<string, string>>,
77
- Component: CocktailBalancerCalculator,
78
- SEOComponent: CocktailBalancerSEO,
79
- BibliographyComponent: CocktailBalancerBibliography,
5
+ Component: () => import('./component.astro'),
6
+ SEOComponent: () => import('./seo.astro'),
7
+ BibliographyComponent: () => import('./bibliography.astro'),
80
8
  };
@@ -0,0 +1,50 @@
1
+ import type { AlcoholToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface PartyKegUI {
4
+ [key: string]: string;
5
+ calcStockTitle: string;
6
+ beerIceSub: string;
7
+ guestsLabel: string;
8
+ durationLabel: string;
9
+ hoursUnit: string;
10
+ intensityLabel: string;
11
+ chillLabel: string;
12
+ standardLabel: string;
13
+ partyLabel: string;
14
+ tempLabel: string;
15
+ estimatedVolLabel: string;
16
+ kegsLabel: string;
17
+ iceRequiredLabel: string;
18
+ bagsLabel: string;
19
+ visualizationTitle: string;
20
+ optimalMsg: string;
21
+ highMeltMsg: string;
22
+ highEfficiencyMsg: string;
23
+ }
24
+
25
+ export type PartyKegLocaleContent = ToolLocaleContent<PartyKegUI>;
26
+
27
+ export const partyKeg: AlcoholToolEntry<PartyKegUI> = {
28
+ id: 'party-keg',
29
+ icons: {
30
+ bg: 'mdi:party-popper',
31
+ fg: 'mdi:keg',
32
+ },
33
+ i18n: {
34
+ de: () => import('./i18n/de').then((m) => m.content),
35
+ en: () => import('./i18n/en').then((m) => m.content),
36
+ es: () => import('./i18n/es').then((m) => m.content),
37
+ fr: () => import('./i18n/fr').then((m) => m.content),
38
+ id: () => import('./i18n/id').then((m) => m.content),
39
+ it: () => import('./i18n/it').then((m) => m.content),
40
+ ja: () => import('./i18n/ja').then((m) => m.content),
41
+ ko: () => import('./i18n/ko').then((m) => m.content),
42
+ nl: () => import('./i18n/nl').then((m) => m.content),
43
+ pl: () => import('./i18n/pl').then((m) => m.content),
44
+ pt: () => import('./i18n/pt').then((m) => m.content),
45
+ ru: () => import('./i18n/ru').then((m) => m.content),
46
+ sv: () => import('./i18n/sv').then((m) => m.content),
47
+ tr: () => import('./i18n/tr').then((m) => m.content),
48
+ zh: () => import('./i18n/zh').then((m) => m.content),
49
+ },
50
+ };
@@ -1,62 +1,8 @@
1
- import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import PartyKegCalculator from './component.astro';
3
- import PartyKegSEO from './seo.astro';
4
- import PartyKegBibliography from './bibliography.astro';
5
-
6
- export interface PartyKegUI {
7
- [key: string]: string;
8
- calcStockTitle: string;
9
- beerIceSub: string;
10
- guestsLabel: string;
11
- durationLabel: string;
12
- hoursUnit: string;
13
- intensityLabel: string;
14
- chillLabel: string;
15
- standardLabel: string;
16
- partyLabel: string;
17
- tempLabel: string;
18
- estimatedVolLabel: string;
19
- kegsLabel: string;
20
- iceRequiredLabel: string;
21
- bagsLabel: string;
22
- visualizationTitle: string;
23
- optimalMsg: string;
24
- highMeltMsg: string;
25
- highEfficiencyMsg: string;
26
- }
27
-
28
- export type PartyKegLocaleContent = ToolLocaleContent<PartyKegUI>;
29
-
30
- export const partyKeg: AlcoholToolEntry<PartyKegUI> = {
31
- id: 'party-keg',
32
- icons: {
33
- bg: 'mdi:party-popper',
34
- fg: 'mdi:keg',
35
- },
36
- i18n: {
37
- de: () => import('./i18n/de').then((m) => m.content),
38
- en: () => import('./i18n/en').then((m) => m.content),
39
- es: () => import('./i18n/es').then((m) => m.content),
40
- fr: () => import('./i18n/fr').then((m) => m.content),
41
- id: () => import('./i18n/id').then((m) => m.content),
42
- it: () => import('./i18n/it').then((m) => m.content),
43
- ja: () => import('./i18n/ja').then((m) => m.content),
44
- ko: () => import('./i18n/ko').then((m) => m.content),
45
- nl: () => import('./i18n/nl').then((m) => m.content),
46
- pl: () => import('./i18n/pl').then((m) => m.content),
47
- pt: () => import('./i18n/pt').then((m) => m.content),
48
- ru: () => import('./i18n/ru').then((m) => m.content),
49
- sv: () => import('./i18n/sv').then((m) => m.content),
50
- tr: () => import('./i18n/tr').then((m) => m.content),
51
- zh: () => import('./i18n/zh').then((m) => m.content),
52
- },
53
- };
54
-
55
- export { PartyKegCalculator };
56
-
1
+ import { partyKeg } from './entry';
2
+ export * from './entry';
57
3
  export const PARTY_KEG_TOOL: ToolDefinition = {
58
4
  entry: partyKeg as AlcoholToolEntry<Record<string, string>>,
59
- Component: PartyKegCalculator,
60
- SEOComponent: PartyKegSEO,
61
- BibliographyComponent: PartyKegBibliography,
5
+ Component: () => import('./component.astro'),
6
+ SEOComponent: () => import('./seo.astro'),
7
+ BibliographyComponent: () => import('./bibliography.astro'),
62
8
  };
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import type { ToolDefinition } from './types';
2
3
  import { COCKTAIL_BALANCER_TOOL } from './tool/cocktailBalancer';
3
4
  import { BEER_COOLER_TOOL } from './tool/beerCooler';
@@ -13,4 +14,3 @@ export const ALL_TOOLS: ToolDefinition[] = [
13
14
  ALCOHOL_CLEARANCE_TOOL,
14
15
  ];
15
16
 
16
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);