@jjlmoya/utils-alcohol 1.20.0 → 1.22.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 +1 -1
- package/src/index.ts +1 -1
- package/src/pages/[locale]/[slug].astro +3 -4
- package/src/tool/alcoholClearance/index.ts +3 -7
- package/src/tool/beerCooler/index.ts +3 -7
- package/src/tool/carbonationCalculator/index.ts +3 -7
- package/src/tool/cocktailBalancer/index.ts +3 -7
- package/src/tool/partyKeg/index.ts +3 -7
package/package.json
CHANGED
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
|
|
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:
|
|
64
|
+
Component: unknown;
|
|
66
65
|
locale: KnownLocale;
|
|
67
66
|
content: ToolLocaleContent;
|
|
68
67
|
localeUrls: Partial<Record<KnownLocale, string>>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
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
2
|
|
|
6
3
|
export interface AlcoholClearanceUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -56,11 +53,10 @@ export const alcoholClearance: AlcoholToolEntry<AlcoholClearanceUI> = {
|
|
|
56
53
|
},
|
|
57
54
|
};
|
|
58
55
|
|
|
59
|
-
export { AlcoholClearanceCalculator };
|
|
60
56
|
|
|
61
57
|
export const ALCOHOL_CLEARANCE_TOOL: ToolDefinition = {
|
|
62
58
|
entry: alcoholClearance as AlcoholToolEntry<Record<string, string>>,
|
|
63
|
-
Component:
|
|
64
|
-
SEOComponent:
|
|
65
|
-
BibliographyComponent:
|
|
59
|
+
Component: () => import('./component.astro'),
|
|
60
|
+
SEOComponent: () => import('./seo.astro'),
|
|
61
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
66
62
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
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
2
|
|
|
6
3
|
export interface BeerCoolerUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -55,11 +52,10 @@ export const beerCooler: AlcoholToolEntry<BeerCoolerUI> = {
|
|
|
55
52
|
},
|
|
56
53
|
};
|
|
57
54
|
|
|
58
|
-
export { BeerCoolerCalculator };
|
|
59
55
|
|
|
60
56
|
export const BEER_COOLER_TOOL: ToolDefinition = {
|
|
61
57
|
entry: beerCooler as AlcoholToolEntry<Record<string, string>>,
|
|
62
|
-
Component:
|
|
63
|
-
SEOComponent:
|
|
64
|
-
BibliographyComponent:
|
|
58
|
+
Component: () => import('./component.astro'),
|
|
59
|
+
SEOComponent: () => import('./seo.astro'),
|
|
60
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
65
61
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
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
2
|
|
|
6
3
|
export interface CarbonationUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -54,11 +51,10 @@ export const carbonationCalculator: AlcoholToolEntry<CarbonationUI> = {
|
|
|
54
51
|
},
|
|
55
52
|
};
|
|
56
53
|
|
|
57
|
-
export { CarbonationCalculator };
|
|
58
54
|
|
|
59
55
|
export const CARBONATION_TOOL: ToolDefinition = {
|
|
60
56
|
entry: carbonationCalculator as AlcoholToolEntry<Record<string, string>>,
|
|
61
|
-
Component:
|
|
62
|
-
SEOComponent:
|
|
63
|
-
BibliographyComponent:
|
|
57
|
+
Component: () => import('./component.astro'),
|
|
58
|
+
SEOComponent: () => import('./seo.astro'),
|
|
59
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
64
60
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
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
2
|
|
|
6
3
|
export interface CocktailBalancerUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -70,11 +67,10 @@ export const cocktailBalancer: AlcoholToolEntry<CocktailBalancerUI> = {
|
|
|
70
67
|
},
|
|
71
68
|
};
|
|
72
69
|
|
|
73
|
-
export { CocktailBalancerCalculator, CocktailBalancerSEO, CocktailBalancerBibliography };
|
|
74
70
|
|
|
75
71
|
export const COCKTAIL_BALANCER_TOOL: ToolDefinition = {
|
|
76
72
|
entry: cocktailBalancer as AlcoholToolEntry<Record<string, string>>,
|
|
77
|
-
Component:
|
|
78
|
-
SEOComponent:
|
|
79
|
-
BibliographyComponent:
|
|
73
|
+
Component: () => import('./component.astro'),
|
|
74
|
+
SEOComponent: () => import('./seo.astro'),
|
|
75
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
80
76
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
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
2
|
|
|
6
3
|
export interface PartyKegUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -52,11 +49,10 @@ export const partyKeg: AlcoholToolEntry<PartyKegUI> = {
|
|
|
52
49
|
},
|
|
53
50
|
};
|
|
54
51
|
|
|
55
|
-
export { PartyKegCalculator };
|
|
56
52
|
|
|
57
53
|
export const PARTY_KEG_TOOL: ToolDefinition = {
|
|
58
54
|
entry: partyKeg as AlcoholToolEntry<Record<string, string>>,
|
|
59
|
-
Component:
|
|
60
|
-
SEOComponent:
|
|
61
|
-
BibliographyComponent:
|
|
55
|
+
Component: () => import('./component.astro'),
|
|
56
|
+
SEOComponent: () => import('./seo.astro'),
|
|
57
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
62
58
|
};
|