@jjlmoya/utils-creative 1.12.0 → 1.14.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/bead-pattern-generator/index.ts +3 -7
- package/src/tool/dice-roller/index.ts +3 -7
- package/src/tool/excuse-generator/index.ts +3 -7
- package/src/tool/fortune-cookie/index.ts +3 -7
- package/src/tool/synesthesia-painter/index.ts +3 -7
- package/src/tool/zalgo-generator/index.ts +3 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export * from './tool/synesthesia-painter';
|
|
|
9
9
|
export * from './tool/zalgo-generator';
|
|
10
10
|
export * from './tool/bead-pattern-generator';
|
|
11
11
|
export * from './tool/dice-roller';
|
|
12
|
-
export
|
|
12
|
+
export const creativeCategorySEO = () => import('./category/seo.astro').then((m) => m.default);
|
|
13
13
|
|
|
14
14
|
export type {
|
|
15
15
|
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 { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import BeadPatternGeneratorComponent from './component.astro';
|
|
3
|
-
import BeadPatternGeneratorSEO from './seo.astro';
|
|
4
|
-
import BeadPatternGeneratorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface BeadPatternGeneratorUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -51,11 +48,10 @@ export const beadPatternGenerator: CreativeToolEntry<BeadPatternGeneratorUI> = {
|
|
|
51
48
|
},
|
|
52
49
|
};
|
|
53
50
|
|
|
54
|
-
export { BeadPatternGeneratorComponent, BeadPatternGeneratorSEO, BeadPatternGeneratorBibliography };
|
|
55
51
|
|
|
56
52
|
export const BEAD_PATTERN_GENERATOR_TOOL: ToolDefinition = {
|
|
57
53
|
entry: beadPatternGenerator,
|
|
58
|
-
Component:
|
|
59
|
-
SEOComponent:
|
|
60
|
-
BibliographyComponent:
|
|
54
|
+
Component: () => import('./component.astro'),
|
|
55
|
+
SEOComponent: () => import('./seo.astro'),
|
|
56
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
61
57
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import DiceRollerComponent from './component.astro';
|
|
3
|
-
import DiceRollerSEO from './seo.astro';
|
|
4
|
-
import DiceRollerBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface DiceRollerUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -48,11 +45,10 @@ export const diceRoller: CreativeToolEntry<DiceRollerUI> = {
|
|
|
48
45
|
},
|
|
49
46
|
};
|
|
50
47
|
|
|
51
|
-
export { DiceRollerComponent, DiceRollerSEO, DiceRollerBibliography };
|
|
52
48
|
|
|
53
49
|
export const DICE_ROLLER_TOOL: ToolDefinition = {
|
|
54
50
|
entry: diceRoller,
|
|
55
|
-
Component:
|
|
56
|
-
SEOComponent:
|
|
57
|
-
BibliographyComponent:
|
|
51
|
+
Component: () => import('./component.astro'),
|
|
52
|
+
SEOComponent: () => import('./seo.astro'),
|
|
53
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
58
54
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import ExcuseGeneratorComponent from './component.astro';
|
|
3
|
-
import ExcuseGeneratorSEO from './seo.astro';
|
|
4
|
-
import ExcuseGeneratorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface ExcuseGeneratorUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -44,11 +41,10 @@ export const excuseGenerator: CreativeToolEntry<ExcuseGeneratorUI> = {
|
|
|
44
41
|
},
|
|
45
42
|
};
|
|
46
43
|
|
|
47
|
-
export { ExcuseGeneratorComponent, ExcuseGeneratorSEO, ExcuseGeneratorBibliography };
|
|
48
44
|
|
|
49
45
|
export const EXCUSE_GENERATOR_TOOL: ToolDefinition = {
|
|
50
46
|
entry: excuseGenerator,
|
|
51
|
-
Component:
|
|
52
|
-
SEOComponent:
|
|
53
|
-
BibliographyComponent:
|
|
47
|
+
Component: () => import('./component.astro'),
|
|
48
|
+
SEOComponent: () => import('./seo.astro'),
|
|
49
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
54
50
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import FortuneCookieComponent from './component.astro';
|
|
3
|
-
import FortuneCookieSEO from './seo.astro';
|
|
4
|
-
import FortuneCookieBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface FortuneCookieUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -42,11 +39,10 @@ export const fortuneCookie: CreativeToolEntry<FortuneCookieUI> = {
|
|
|
42
39
|
},
|
|
43
40
|
};
|
|
44
41
|
|
|
45
|
-
export { FortuneCookieComponent, FortuneCookieSEO, FortuneCookieBibliography };
|
|
46
42
|
|
|
47
43
|
export const FORTUNE_COOKIE_TOOL: ToolDefinition = {
|
|
48
44
|
entry: fortuneCookie,
|
|
49
|
-
Component:
|
|
50
|
-
SEOComponent:
|
|
51
|
-
BibliographyComponent:
|
|
45
|
+
Component: () => import('./component.astro'),
|
|
46
|
+
SEOComponent: () => import('./seo.astro'),
|
|
47
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
52
48
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import SynesthesiaPainterComponent from './component.astro';
|
|
3
|
-
import SynesthesiaPainterSEO from './seo.astro';
|
|
4
|
-
import SynesthesiaPainterBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface SynesthesiaPainterUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -41,11 +38,10 @@ export const synesthesiaPainter: CreativeToolEntry<SynesthesiaPainterUI> = {
|
|
|
41
38
|
},
|
|
42
39
|
};
|
|
43
40
|
|
|
44
|
-
export { SynesthesiaPainterComponent, SynesthesiaPainterSEO, SynesthesiaPainterBibliography };
|
|
45
41
|
|
|
46
42
|
export const SYNESTHESIA_PAINTER_TOOL: ToolDefinition = {
|
|
47
43
|
entry: synesthesiaPainter,
|
|
48
|
-
Component:
|
|
49
|
-
SEOComponent:
|
|
50
|
-
BibliographyComponent:
|
|
44
|
+
Component: () => import('./component.astro'),
|
|
45
|
+
SEOComponent: () => import('./seo.astro'),
|
|
46
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
51
47
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CreativeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import ZalgoGeneratorComponent from './component.astro';
|
|
3
|
-
import ZalgoGeneratorSEO from './seo.astro';
|
|
4
|
-
import ZalgoGeneratorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface ZalgoGeneratorUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -51,11 +48,10 @@ export const zalgoGenerator: CreativeToolEntry<ZalgoGeneratorUI> = {
|
|
|
51
48
|
},
|
|
52
49
|
};
|
|
53
50
|
|
|
54
|
-
export { ZalgoGeneratorComponent, ZalgoGeneratorSEO, ZalgoGeneratorBibliography };
|
|
55
51
|
|
|
56
52
|
export const ZALGO_GENERATOR_TOOL: ToolDefinition = {
|
|
57
53
|
entry: zalgoGenerator,
|
|
58
|
-
Component:
|
|
59
|
-
SEOComponent:
|
|
60
|
-
BibliographyComponent:
|
|
54
|
+
Component: () => import('./component.astro'),
|
|
55
|
+
SEOComponent: () => import('./seo.astro'),
|
|
56
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
61
57
|
};
|