@jjlmoya/utils-creative 1.19.0 → 1.21.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.
Files changed (146) hide show
  1. package/package.json +1 -1
  2. package/src/data.ts +2 -1
  3. package/src/entries.ts +3 -1
  4. package/src/index.ts +3 -0
  5. package/src/pages/[locale]/[slug].astro +28 -12
  6. package/src/tests/locale_completeness.test.ts +2 -14
  7. package/src/tests/shared-test-helpers.ts +56 -0
  8. package/src/tests/tool_exports.test.ts +34 -0
  9. package/src/tests/tool_validation.test.ts +2 -2
  10. package/src/tool/bead-pattern-generator/bibliography.astro +2 -12
  11. package/src/tool/bead-pattern-generator/bibliography.ts +5 -0
  12. package/src/tool/bead-pattern-generator/entry.ts +0 -1
  13. package/src/tool/bead-pattern-generator/i18n/de.ts +2 -6
  14. package/src/tool/bead-pattern-generator/i18n/en.ts +2 -6
  15. package/src/tool/bead-pattern-generator/i18n/es.ts +2 -6
  16. package/src/tool/bead-pattern-generator/i18n/fr.ts +2 -6
  17. package/src/tool/bead-pattern-generator/i18n/id.ts +2 -6
  18. package/src/tool/bead-pattern-generator/i18n/it.ts +2 -6
  19. package/src/tool/bead-pattern-generator/i18n/ja.ts +2 -6
  20. package/src/tool/bead-pattern-generator/i18n/ko.ts +2 -6
  21. package/src/tool/bead-pattern-generator/i18n/nl.ts +2 -6
  22. package/src/tool/bead-pattern-generator/i18n/pl.ts +2 -6
  23. package/src/tool/bead-pattern-generator/i18n/pt.ts +2 -6
  24. package/src/tool/bead-pattern-generator/i18n/ru.ts +2 -6
  25. package/src/tool/bead-pattern-generator/i18n/sv.ts +2 -6
  26. package/src/tool/bead-pattern-generator/i18n/tr.ts +2 -6
  27. package/src/tool/bead-pattern-generator/i18n/zh.ts +2 -6
  28. package/src/tool/bead-pattern-generator/seo.astro +10 -5
  29. package/src/tool/dice-roller/bibliography.astro +3 -12
  30. package/src/tool/dice-roller/bibliography.ts +5 -0
  31. package/src/tool/dice-roller/entry.ts +0 -1
  32. package/src/tool/dice-roller/i18n/de.ts +2 -6
  33. package/src/tool/dice-roller/i18n/en.ts +2 -6
  34. package/src/tool/dice-roller/i18n/es.ts +2 -6
  35. package/src/tool/dice-roller/i18n/fr.ts +2 -6
  36. package/src/tool/dice-roller/i18n/id.ts +2 -6
  37. package/src/tool/dice-roller/i18n/it.ts +2 -6
  38. package/src/tool/dice-roller/i18n/ja.ts +2 -6
  39. package/src/tool/dice-roller/i18n/ko.ts +2 -6
  40. package/src/tool/dice-roller/i18n/nl.ts +2 -6
  41. package/src/tool/dice-roller/i18n/pl.ts +2 -6
  42. package/src/tool/dice-roller/i18n/pt.ts +2 -6
  43. package/src/tool/dice-roller/i18n/ru.ts +2 -6
  44. package/src/tool/dice-roller/i18n/sv.ts +2 -6
  45. package/src/tool/dice-roller/i18n/tr.ts +2 -6
  46. package/src/tool/dice-roller/i18n/zh.ts +2 -6
  47. package/src/tool/dice-roller/seo.astro +2 -1
  48. package/src/tool/excuse-generator/bibliography.astro +2 -12
  49. package/src/tool/excuse-generator/bibliography.ts +3 -0
  50. package/src/tool/excuse-generator/entry.ts +0 -1
  51. package/src/tool/excuse-generator/i18n/de.ts +2 -4
  52. package/src/tool/excuse-generator/i18n/en.ts +2 -4
  53. package/src/tool/excuse-generator/i18n/es.ts +2 -4
  54. package/src/tool/excuse-generator/i18n/fr.ts +2 -4
  55. package/src/tool/excuse-generator/i18n/id.ts +2 -4
  56. package/src/tool/excuse-generator/i18n/it.ts +2 -4
  57. package/src/tool/excuse-generator/i18n/ja.ts +2 -4
  58. package/src/tool/excuse-generator/i18n/ko.ts +2 -4
  59. package/src/tool/excuse-generator/i18n/nl.ts +2 -4
  60. package/src/tool/excuse-generator/i18n/pl.ts +2 -4
  61. package/src/tool/excuse-generator/i18n/pt.ts +2 -4
  62. package/src/tool/excuse-generator/i18n/ru.ts +2 -4
  63. package/src/tool/excuse-generator/i18n/sv.ts +2 -4
  64. package/src/tool/excuse-generator/i18n/tr.ts +2 -4
  65. package/src/tool/excuse-generator/i18n/zh.ts +2 -4
  66. package/src/tool/excuse-generator/seo.astro +2 -1
  67. package/src/tool/fortune-cookie/bibliography.astro +2 -12
  68. package/src/tool/fortune-cookie/bibliography.ts +3 -0
  69. package/src/tool/fortune-cookie/entry.ts +0 -1
  70. package/src/tool/fortune-cookie/i18n/de.ts +2 -5
  71. package/src/tool/fortune-cookie/i18n/en.ts +2 -5
  72. package/src/tool/fortune-cookie/i18n/es.ts +2 -4
  73. package/src/tool/fortune-cookie/i18n/fr.ts +2 -5
  74. package/src/tool/fortune-cookie/i18n/id.ts +2 -5
  75. package/src/tool/fortune-cookie/i18n/it.ts +2 -5
  76. package/src/tool/fortune-cookie/i18n/ja.ts +2 -5
  77. package/src/tool/fortune-cookie/i18n/ko.ts +2 -5
  78. package/src/tool/fortune-cookie/i18n/nl.ts +2 -5
  79. package/src/tool/fortune-cookie/i18n/pl.ts +2 -5
  80. package/src/tool/fortune-cookie/i18n/pt.ts +2 -5
  81. package/src/tool/fortune-cookie/i18n/ru.ts +2 -5
  82. package/src/tool/fortune-cookie/i18n/sv.ts +2 -5
  83. package/src/tool/fortune-cookie/i18n/tr.ts +2 -5
  84. package/src/tool/fortune-cookie/i18n/zh.ts +2 -5
  85. package/src/tool/fortune-cookie/seo.astro +2 -1
  86. package/src/tool/glitch-image-distorter/bibliography.astro +8 -0
  87. package/src/tool/glitch-image-distorter/bibliography.ts +4 -0
  88. package/src/tool/glitch-image-distorter/component.astro +393 -0
  89. package/src/tool/glitch-image-distorter/entry.ts +48 -0
  90. package/src/tool/glitch-image-distorter/glitch-image-distorter.css +233 -0
  91. package/src/tool/glitch-image-distorter/i18n/de.ts +131 -0
  92. package/src/tool/glitch-image-distorter/i18n/en.ts +131 -0
  93. package/src/tool/glitch-image-distorter/i18n/es.ts +131 -0
  94. package/src/tool/glitch-image-distorter/i18n/fr.ts +131 -0
  95. package/src/tool/glitch-image-distorter/i18n/id.ts +131 -0
  96. package/src/tool/glitch-image-distorter/i18n/it.ts +131 -0
  97. package/src/tool/glitch-image-distorter/i18n/ja.ts +131 -0
  98. package/src/tool/glitch-image-distorter/i18n/ko.ts +131 -0
  99. package/src/tool/glitch-image-distorter/i18n/nl.ts +131 -0
  100. package/src/tool/glitch-image-distorter/i18n/pl.ts +131 -0
  101. package/src/tool/glitch-image-distorter/i18n/pt.ts +131 -0
  102. package/src/tool/glitch-image-distorter/i18n/ru.ts +131 -0
  103. package/src/tool/glitch-image-distorter/i18n/sv.ts +131 -0
  104. package/src/tool/glitch-image-distorter/i18n/tr.ts +131 -0
  105. package/src/tool/glitch-image-distorter/i18n/zh.ts +131 -0
  106. package/src/tool/glitch-image-distorter/index.ts +9 -0
  107. package/src/tool/glitch-image-distorter/seo.astro +15 -0
  108. package/src/tool/synesthesia-painter/bibliography.astro +3 -12
  109. package/src/tool/synesthesia-painter/bibliography.ts +5 -0
  110. package/src/tool/synesthesia-painter/entry.ts +0 -1
  111. package/src/tool/synesthesia-painter/i18n/de.ts +2 -6
  112. package/src/tool/synesthesia-painter/i18n/en.ts +2 -6
  113. package/src/tool/synesthesia-painter/i18n/es.ts +2 -6
  114. package/src/tool/synesthesia-painter/i18n/fr.ts +2 -6
  115. package/src/tool/synesthesia-painter/i18n/id.ts +2 -6
  116. package/src/tool/synesthesia-painter/i18n/it.ts +2 -6
  117. package/src/tool/synesthesia-painter/i18n/ja.ts +2 -6
  118. package/src/tool/synesthesia-painter/i18n/ko.ts +2 -6
  119. package/src/tool/synesthesia-painter/i18n/nl.ts +2 -6
  120. package/src/tool/synesthesia-painter/i18n/pl.ts +2 -6
  121. package/src/tool/synesthesia-painter/i18n/pt.ts +2 -6
  122. package/src/tool/synesthesia-painter/i18n/ru.ts +2 -6
  123. package/src/tool/synesthesia-painter/i18n/sv.ts +2 -6
  124. package/src/tool/synesthesia-painter/i18n/tr.ts +2 -6
  125. package/src/tool/synesthesia-painter/i18n/zh.ts +2 -6
  126. package/src/tool/synesthesia-painter/seo.astro +2 -1
  127. package/src/tool/zalgo-generator/bibliography.astro +2 -12
  128. package/src/tool/zalgo-generator/bibliography.ts +5 -0
  129. package/src/tool/zalgo-generator/entry.ts +0 -1
  130. package/src/tool/zalgo-generator/i18n/de.ts +2 -6
  131. package/src/tool/zalgo-generator/i18n/en.ts +2 -6
  132. package/src/tool/zalgo-generator/i18n/es.ts +2 -6
  133. package/src/tool/zalgo-generator/i18n/fr.ts +2 -6
  134. package/src/tool/zalgo-generator/i18n/id.ts +2 -6
  135. package/src/tool/zalgo-generator/i18n/it.ts +2 -6
  136. package/src/tool/zalgo-generator/i18n/ja.ts +2 -6
  137. package/src/tool/zalgo-generator/i18n/ko.ts +2 -6
  138. package/src/tool/zalgo-generator/i18n/nl.ts +2 -6
  139. package/src/tool/zalgo-generator/i18n/pl.ts +2 -6
  140. package/src/tool/zalgo-generator/i18n/pt.ts +2 -6
  141. package/src/tool/zalgo-generator/i18n/ru.ts +2 -6
  142. package/src/tool/zalgo-generator/i18n/sv.ts +2 -6
  143. package/src/tool/zalgo-generator/i18n/tr.ts +2 -6
  144. package/src/tool/zalgo-generator/i18n/zh.ts +2 -6
  145. package/src/tool/zalgo-generator/seo.astro +2 -1
  146. package/src/tools.ts +2 -0
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { BeadPatternGeneratorLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'monstergenerator-for-parlor';
@@ -57,7 +58,6 @@ export const content: BeadPatternGeneratorLocaleContent = {
57
58
  title,
58
59
  description,
59
60
  faqTitle: 'Vanliga frågor',
60
- bibliographyTitle: 'Hantverksbibliografi',
61
61
  ui: {
62
62
  title: 'Mönsterlaboratorium',
63
63
  subtitle: 'Färgteknik för dina händer',
@@ -105,11 +105,7 @@ export const content: BeadPatternGeneratorLocaleContent = {
105
105
  { type: 'paragraph', html: 'I en tid av flyktiga skärmar är skapandet av något fysiskt en revolutionerande handling. Detta verktyg söker inte efter att automatisera konst, utan att <strong>ge genkraft åt hantverkaren</strong>. Vi ger dig beräkningsprecision så att dina händer kan bygga varaktiga arv.' },
106
106
  ],
107
107
  faq,
108
- bibliography: [
109
- { name: 'Scikit-Image: Color Quantization using K-Means', url: 'https://scikit-learn.org/0.23/auto_examples/cluster/plot_color_quantization.html' },
110
- { name: 'Miyuki Delica Beads Specification', url: 'https://www.miyuki-beads.co.jp/english/seedbeads/delica.html' },
111
- { name: 'Visgraf Lab: Dithering Algorithms', url: 'https://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html' },
112
- ],
108
+ bibliography,
113
109
  howTo,
114
110
  schemas: [faqSchema as any, howToSchema as any, appSchema],
115
111
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { BeadPatternGeneratorLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'boncuk-desen-olusturucu';
@@ -57,7 +58,6 @@ export const content: BeadPatternGeneratorLocaleContent = {
57
58
  title,
58
59
  description,
59
60
  faqTitle: 'Sıkça Sorulan Sorular',
60
- bibliographyTitle: 'Zanaatkar Kaynakçası',
61
61
  ui: {
62
62
  title: 'Desen Laboratuvarı',
63
63
  subtitle: 'Elleriniz için renk mühendisliği',
@@ -105,11 +105,7 @@ export const content: BeadPatternGeneratorLocaleContent = {
105
105
  { type: 'paragraph', html: 'Uçucu ekranlar çağında, fiziksel bir şey yaratmak devrimci bir eylemdir. Bu araç sanatı otomatikleştirmeyi değil, <strong>zanaatkarı güçlendirmeyi</strong> amaçlar. Ellerinizin kalıcı miraslar inşa edebilmesi için size hesaplamalı hassasiyet sağlıyoruz.' },
106
106
  ],
107
107
  faq,
108
- bibliography: [
109
- { name: 'Scikit-Image: Color Quantization using K-Means', url: 'https://scikit-learn.org/0.23/auto_examples/cluster/plot_color_quantization.html' },
110
- { name: 'Miyuki Delica Beads Specification', url: 'https://www.miyuki-beads.co.jp/english/seedbeads/delica.html' },
111
- { name: 'Visgraf Lab: Dithering Algorithms', url: 'https://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html' },
112
- ],
108
+ bibliography,
113
109
  howTo,
114
110
  schemas: [faqSchema as any, howToSchema as any, appSchema],
115
111
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { BeadPatternGeneratorLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'bead-pattern-generator';
@@ -57,7 +58,6 @@ export const content: BeadPatternGeneratorLocaleContent = {
57
58
  title,
58
59
  description,
59
60
  faqTitle: '常见问题解答',
60
- bibliographyTitle: '工匠参考文献',
61
61
  ui: {
62
62
  title: '图案实验室',
63
63
  subtitle: '指尖上的色彩工程',
@@ -105,11 +105,7 @@ export const content: BeadPatternGeneratorLocaleContent = {
105
105
  { type: 'paragraph', html: '在转瞬即逝的屏幕时代,亲手创造实体作品是一种革命性的行为。本工具不致力于取代艺术,而是旨在<strong>赋能工匠</strong>。我们为您提供计算精度,助您的双手打造持久的传承。' },
106
106
  ],
107
107
  faq,
108
- bibliography: [
109
- { name: 'Scikit-Image: Color Quantization using K-Means', url: 'https://scikit-learn.org/0.23/auto_examples/cluster/plot_color_quantization.html' },
110
- { name: 'Miyuki Delica Beads Specification', url: 'https://www.miyuki-beads.co.jp/english/seedbeads/delica.html' },
111
- { name: 'Visgraf Lab: Dithering Algorithms', url: 'https://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html' },
112
- ],
108
+ bibliography,
113
109
  howTo,
114
110
  schemas: [faqSchema as any, howToSchema as any, appSchema],
115
111
  };
@@ -1,14 +1,19 @@
1
1
  ---
2
- import { SEORenderer } from '@jjlmoya/utils-shared';
3
- import { beadPatternGenerator } from './index';
4
- import type { KnownLocale } from '../../types';
2
+ import { SEORenderer } from "@jjlmoya/utils-shared";
3
+ import { beadPatternGenerator } from "./index";
4
+ import type { KnownLocale } from "../../types";
5
5
 
6
6
  interface Props {
7
7
  locale?: KnownLocale;
8
8
  }
9
9
 
10
- const { locale = 'es' } = Astro.props;
10
+ const { locale = "es" } = Astro.props;
11
11
  const content = await beadPatternGenerator.i18n[locale]?.();
12
+ if (!content) return null;
12
13
  ---
13
14
 
14
- {content && <SEORenderer content={{ locale, sections: content.seo }} />}
15
+ {
16
+ content.seo?.length > 0 && (
17
+ <SEORenderer content={{ locale, sections: content.seo }} />
18
+ )
19
+ }
@@ -1,17 +1,8 @@
1
1
  ---
2
2
  import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
- import { diceRoller } from './index';
4
- import type { KnownLocale } from '../../types';
3
+ import { bibliography } from './bibliography';
5
4
 
6
- interface Props {
7
- locale?: KnownLocale;
8
- }
9
-
10
- const { locale = 'es' } = Astro.props;
11
- const content = await diceRoller.i18n[locale]?.();
12
- if (!content || !content.bibliography || content.bibliography.length === 0) return null;
13
-
14
- const { bibliography, bibliographyTitle = 'Bibliografía' } = content;
5
+ if (!bibliography || bibliography.length === 0) return null;
15
6
  ---
16
7
 
17
- <SharedBibliography title={bibliographyTitle} links={bibliography} />
8
+ <SharedBibliography links={bibliography} />
@@ -0,0 +1,5 @@
1
+ export const bibliography = [
2
+ { name: 'D&D Beyond – Dice mechanics rules', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
3
+ { name: 'Roll20 – Virtual tabletop and dice systems', url: 'https://roll20.net/' },
4
+ { name: 'Pathfinder – d20 System Reference', url: 'https://paizo.com/pathfinder' },
5
+ ];
@@ -9,7 +9,6 @@ export interface DiceRollerUI {
9
9
  historyLabel: string;
10
10
  clearHistoryBtn: string;
11
11
  faqTitle: string;
12
- bibliographyTitle: string;
13
12
  addDiceLabel: string;
14
13
  bagLabel: string;
15
14
  emptyBagBtn: string;
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'wuerfel-simulator';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Häufig gestellte Fragen',
76
- bibliographyTitle: 'Zufalls-Bibliographie',
77
77
  ui: {
78
78
  title: 'Würfel Simulator',
79
79
  description: 'Möge das Glück mit dir sein.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Regeln zur Würfelmechanik', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Virtueller Spieltisch und Würfelsysteme', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 System Reference', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'dice-roller';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Frequently Asked Questions',
76
- bibliographyTitle: 'Chance Bibliography',
77
77
  ui: {
78
78
  title: 'Dice Roller',
79
79
  description: 'May luck be with you.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Dice mechanics rules', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Virtual tabletop and dice systems', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 System Reference', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'lanzador-dados';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Preguntas Frecuentes',
76
- bibliographyTitle: 'Bibliografía del Azar',
77
77
  ui: {
78
78
  title: 'Tirador de Dados',
79
79
  description: 'Que la suerte te acompañe.',
@@ -130,11 +130,7 @@ export const content: DiceRollerLocaleContent = {
130
130
  ]},
131
131
  ],
132
132
  faq,
133
- bibliography: [
134
- { name: 'D&D Beyond – Reglas de mecánicas de dados', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
135
- { name: 'Roll20 – Virtual tabletop y sistemas de dados', url: 'https://roll20.net/' },
136
- { name: 'Pathfinder – Sistema d20 de referencia', url: 'https://paizo.com/pathfinder' },
137
- ],
133
+ bibliography,
138
134
  howTo,
139
135
  schemas: [faqSchema as any, howToSchema as any, appSchema],
140
136
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'lanceur-de-des';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Questions Fréquemment Posées',
76
- bibliographyTitle: 'Bibliographie du Hasard',
77
77
  ui: {
78
78
  title: 'Lanceur de Dés',
79
79
  description: 'Que la chance soit avec vous.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Règles des mécaniques de dés', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Table de jeu virtuelle et systèmes de dés', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – Référence du système d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug: string = 'pengocok-dadu';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Pertanyaan yang Sering Diajukan',
76
- bibliographyTitle: 'Bibliografi Peluang',
77
77
  ui: {
78
78
  title: 'Pengocok Dadu',
79
79
  description: 'Semoga keberuntungan menyertai Anda.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Aturan mekanik dadu', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Meja virtual dan sistem dadu', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – Referensi Sistem d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'lanciatore-di-dadi';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Domande Frequenti',
76
- bibliographyTitle: 'Bibliografia della Sorte',
77
77
  ui: {
78
78
  title: 'Lanciatore di Dadi',
79
79
  description: 'Che la fortuna sia con te.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Regole sulle meccaniche dei dadi', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Tavolo virtuale e sistemi di dadi', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – Riferimento Sistema d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'dice-roller';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'よくある質問',
76
- bibliographyTitle: '確率の参考文献',
77
77
  ui: {
78
78
  title: 'ダイスローラー',
79
79
  description: '幸運があなたと共にありますように。',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – ダイスメカニクスの基本ルール', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – バーチャルテーブルトップとダイスシステム', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20システムリファレンス', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'dice-roller';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: '자주 묻는 질문',
76
- bibliographyTitle: '확률 참고 자료',
77
77
  ui: {
78
78
  title: '주사위 굴리기',
79
79
  description: '행운이 당신과 함께하기를.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – 주사위 메커니즘 규칙', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – 가상 테이블탑 및 주사위 시스템', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 시스템 참조', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'dobbelsteen-roller';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Veelgestelde Vragen',
76
- bibliographyTitle: 'Waarschijnlijkheidsbibliografie',
77
77
  ui: {
78
78
  title: 'Dobbelsteen Roller',
79
79
  description: 'Moge het geluk aan jouw zijde staan.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Dobbelsteenmechanica regels', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Virtuele tafel en dobbelsteensystemen', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 System Reference', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'kostka-do-gry';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Najczęściej Zadawane Pytania',
76
- bibliographyTitle: 'Bibliografia Losowości',
77
77
  ui: {
78
78
  title: 'Kostka do Gry',
79
79
  description: 'Niech szczęście ci sprzyja.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Zasady mechaniki kości', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Wirtualny stół i systemy kości', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – Referencja systemu d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'lancador-de-dados';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Perguntas Frequentes',
76
- bibliographyTitle: 'Bibliografia da Sorte',
77
77
  ui: {
78
78
  title: 'Lançador de Dados',
79
79
  description: 'Que a sorte esteja contigo.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Regras de mecânicas de dados', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Mesa virtual e sistemas de dados', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – Referência de Sistema d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'simulator-kostey';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Часто задаваемые вопросы',
76
- bibliographyTitle: 'Библиография случая',
77
77
  ui: {
78
78
  title: 'Симулятор костей',
79
79
  description: 'Пусть удача сопутствует вам.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – правила механики костей', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – виртуальный стол и системы костей', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – справочник системы d20', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'tarningsgenerator';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Vanliga frågor',
76
- bibliographyTitle: 'Slumpbibliografi',
77
77
  ui: {
78
78
  title: 'Tärningsgenerator',
79
79
  description: 'Må lyckan vara med dig.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Tärningsmekanikens regler', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Virtuellt spelbord och tärningssystem', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 System Reference', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'zar-atma';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: 'Sıkça Sorulan Sorular',
76
- bibliographyTitle: 'Şans Kaynakçası',
77
77
  ui: {
78
78
  title: 'Zar Atma',
79
79
  description: 'Şansınız bol olsun.',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – Zar mekaniği kuralları', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – Sanal masaüstü ve zar sistemleri', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 Sistem Referansı', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { DiceRollerLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'dice-roller';
@@ -73,7 +74,6 @@ export const content: DiceRollerLocaleContent = {
73
74
  title,
74
75
  description,
75
76
  faqTitle: '常见问题解答',
76
- bibliographyTitle: '概率文献',
77
77
  ui: {
78
78
  title: '在线掷骰子',
79
79
  description: '愿运气与你同在。',
@@ -128,11 +128,7 @@ export const content: DiceRollerLocaleContent = {
128
128
  ]},
129
129
  ],
130
130
  faq,
131
- bibliography: [
132
- { name: 'D&D Beyond – 掷骰机制规则', url: 'https://www.dndbeyond.com/sources/basic-rules/using-ability-scores' },
133
- { name: 'Roll20 – 虚拟桌面与骰子系统', url: 'https://roll20.net/' },
134
- { name: 'Pathfinder – d20 系统参考', url: 'https://paizo.com/pathfinder' },
135
- ],
131
+ bibliography,
136
132
  howTo,
137
133
  schemas: [faqSchema as any, howToSchema as any, appSchema],
138
134
  };
@@ -9,6 +9,7 @@ interface Props {
9
9
 
10
10
  const { locale = 'es' } = Astro.props;
11
11
  const content = await diceRoller.i18n[locale]?.();
12
+ if (!content) return null;
12
13
  ---
13
14
 
14
- {content && <SEORenderer content={{ locale, sections: content.seo }} />}
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -1,18 +1,8 @@
1
1
  ---
2
2
  import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
- import { excuseGenerator, type ExcuseGeneratorLocaleContent } from './index';
4
- import type { KnownLocale } from '../../types';
3
+ import { bibliography } from './bibliography';
5
4
 
6
- interface Props {
7
- locale?: KnownLocale;
8
- }
9
-
10
- const { locale = 'es' } = Astro.props;
11
- const localeContentLoader = (excuseGenerator.i18n as Record<string, () => Promise<ExcuseGeneratorLocaleContent>>)[locale];
12
- const content = localeContentLoader ? await localeContentLoader() : null;
13
- if (!content) return null;
14
-
15
- const { bibliography } = content;
5
+ if (!bibliography || bibliography.length === 0) return null;
16
6
  ---
17
7
 
18
8
  <SharedBibliography links={bibliography} />
@@ -0,0 +1,3 @@
1
+ export const bibliography = [
2
+ { name: 'Procrastinator\'s Manifesto', url: 'https://example.com/manifesto' }
3
+ ];
@@ -14,7 +14,6 @@ export interface ExcuseGeneratorUI {
14
14
  middles: string;
15
15
  ends: string;
16
16
  faqTitle: string;
17
- bibliographyTitle: string;
18
17
  }
19
18
 
20
19
  export type ExcuseGeneratorLocaleContent = ToolLocaleContent<ExcuseGeneratorUI>;
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { ExcuseGeneratorLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'ausredengenerator';
@@ -59,7 +60,6 @@ export const content: ExcuseGeneratorLocaleContent = {
59
60
  title,
60
61
  description,
61
62
  faqTitle: 'Häufig gestellte Fragen',
62
- bibliographyTitle: 'Freizeit-Bibliographie',
63
63
  ui: {
64
64
  title: 'Surrealer Ausredengenerator',
65
65
  description: 'Alibi-Rechner der nächsten Generation.',
@@ -114,9 +114,7 @@ export const content: ExcuseGeneratorLocaleContent = {
114
114
  ]},
115
115
  ],
116
116
  faq,
117
- bibliography: [
118
- { name: 'Manifest des Prokrastinierers', url: 'https://example.com/manifesto' }
119
- ],
117
+ bibliography,
120
118
  howTo,
121
119
  schemas: [faqSchema as any, howToSchema as any, appSchema],
122
120
  };
@@ -1,4 +1,5 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
2
3
  import type { ExcuseGeneratorLocaleContent } from '../index';
3
4
 
4
5
  const slug = 'excuse-generator';
@@ -59,7 +60,6 @@ export const content: ExcuseGeneratorLocaleContent = {
59
60
  title,
60
61
  description,
61
62
  faqTitle: 'Frequently Asked Questions',
62
- bibliographyTitle: 'Leisure Bibliography',
63
63
  ui: {
64
64
  title: 'Surreal Excuse Generator',
65
65
  description: 'Next-generation alibi calculator.',
@@ -114,9 +114,7 @@ export const content: ExcuseGeneratorLocaleContent = {
114
114
  ]},
115
115
  ],
116
116
  faq,
117
- bibliography: [
118
- { name: 'Procrastinator\'s Manifesto', url: 'https://example.com/manifesto' }
119
- ],
117
+ bibliography,
120
118
  howTo,
121
119
  schemas: [faqSchema as any, howToSchema as any, appSchema],
122
120
  };