@jjlmoya/utils-games-development 1.65.0 → 1.67.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 (77) hide show
  1. package/package.json +67 -67
  2. package/scripts/postinstall.mjs +27 -27
  3. package/src/category/GamesCategorySEO.astro +19 -19
  4. package/src/category/i18n/de.ts +15 -15
  5. package/src/category/i18n/en.ts +15 -15
  6. package/src/category/i18n/es.ts +15 -15
  7. package/src/category/i18n/fr.ts +15 -15
  8. package/src/category/i18n/id.ts +10 -10
  9. package/src/category/i18n/it.ts +10 -10
  10. package/src/category/i18n/ja.ts +10 -10
  11. package/src/category/i18n/ko.ts +10 -10
  12. package/src/category/i18n/nl.ts +10 -10
  13. package/src/category/i18n/pl.ts +10 -10
  14. package/src/category/i18n/pt.ts +10 -10
  15. package/src/category/i18n/ru.ts +10 -10
  16. package/src/category/i18n/sv.ts +10 -10
  17. package/src/category/i18n/tr.ts +10 -10
  18. package/src/category/i18n/zh.ts +10 -10
  19. package/src/category/seo.astro +15 -15
  20. package/src/components/PreviewNavSidebar.astro +116 -116
  21. package/src/components/PreviewToolbar.astro +143 -143
  22. package/src/data.ts +11 -11
  23. package/src/env.d.ts +5 -5
  24. package/src/index.ts +20 -20
  25. package/src/layouts/PreviewLayout.astro +122 -122
  26. package/src/pages/[locale]/[slug].astro +165 -165
  27. package/src/pages/[locale].astro +250 -250
  28. package/src/pages/index.astro +4 -4
  29. package/src/tests/bibliography_wellformed_export.test.ts +46 -0
  30. package/src/tests/category_seo_quality.test.ts +74 -0
  31. package/src/tests/diacritics_density.test.ts +118 -118
  32. package/src/tests/faq_count.test.ts +19 -19
  33. package/src/tests/i18n_coverage.test.ts +36 -36
  34. package/src/tests/inverted_punctuation.test.ts +84 -84
  35. package/src/tests/mocks/astro_mock.js +2 -2
  36. package/src/tests/no_en_dash.test.ts +70 -70
  37. package/src/tests/no_h1_in_components.test.ts +48 -48
  38. package/src/tests/pagespeed_best_practices.test.ts +198 -198
  39. package/src/tests/qa-test-helpers.ts +32 -32
  40. package/src/tests/qa_bibliography_links.test.ts +41 -41
  41. package/src/tests/qa_claim_evidence.test.ts +69 -69
  42. package/src/tests/qa_logic_reference_coverage.test.ts +46 -46
  43. package/src/tests/qa_runtime_i18n.test.ts +100 -100
  44. package/src/tests/schemas_fulfillment.test.ts +23 -23
  45. package/src/tests/script_density.test.ts +94 -94
  46. package/src/tests/seo_length.test.ts +23 -23
  47. package/src/tests/seo_wellformed_export.test.ts +65 -0
  48. package/src/tests/slug_language_code_format.test.ts +23 -23
  49. package/src/tests/slug_uniqueness.test.ts +80 -80
  50. package/src/tests/title_quality.test.ts +56 -56
  51. package/src/tool/audioLoopPointFinder/audio-loop-point-finder.css +322 -322
  52. package/src/tool/audioLoopPointFinder/client.ts +262 -262
  53. package/src/tool/damageFormulaLab/bibliography.astro +3 -21
  54. package/src/tool/damageFormulaLab/seo.astro +7 -5
  55. package/src/tool/gameDeltaTimeFixedTimestepLab/bibliography.astro +3 -19
  56. package/src/tool/hitboxHurtboxAnimator/hitbox-hurtbox-animator.css +614 -614
  57. package/src/tool/hitboxHurtboxAnimator/seo.astro +7 -5
  58. package/src/tool/saveFileEditor/component.astro +351 -351
  59. package/src/tool/saveFileEditor/game-save-file-editor.css +250 -250
  60. package/src/tool/spriteSheetPacker/app-client.ts +248 -248
  61. package/src/tool/spriteSheetPacker/bibliography.ts +12 -12
  62. package/src/tool/spriteSheetPacker/component.astro +229 -229
  63. package/src/tool/spriteSheetPacker/dropzone-client.ts +55 -55
  64. package/src/tool/spriteSheetPacker/entry.ts +28 -28
  65. package/src/tool/spriteSheetPacker/exporter.ts +116 -116
  66. package/src/tool/spriteSheetPacker/extractor-client.ts +127 -127
  67. package/src/tool/spriteSheetPacker/flipbook-client.ts +60 -60
  68. package/src/tool/spriteSheetPacker/logic.test.ts +155 -155
  69. package/src/tool/spriteSheetPacker/logic.ts +32 -32
  70. package/src/tool/spriteSheetPacker/packer-core.ts +121 -121
  71. package/src/tool/spriteSheetPacker/packer-ui.ts +86 -86
  72. package/src/tool/spriteSheetPacker/sprite-sheet-packer.css +578 -578
  73. package/src/tool/spriteSheetPacker/types.ts +89 -89
  74. package/src/tool/spriteSheetPacker/ui.ts +42 -42
  75. package/src/tool/steamCapsuleGenerator/index.ts +9 -9
  76. package/src/tool/steamCapsuleGenerator/validation.ts +14 -14
  77. package/src/types.ts +72 -72
@@ -1,89 +1,89 @@
1
- export interface SpriteFrameInput {
2
- id: string;
3
- name: string;
4
- width: number;
5
- height: number;
6
- x?: number;
7
- y?: number;
8
- trimmedX?: number;
9
- trimmedY?: number;
10
- originalWidth?: number;
11
- originalHeight?: number;
12
- pivotX?: number;
13
- pivotY?: number;
14
- }
15
-
16
- export type ExportFormat =
17
- | 'generic-json-hash'
18
- | 'generic-json-array'
19
- | 'unity'
20
- | 'godot'
21
- | 'phaser'
22
- | 'css';
23
-
24
- export interface PackerOptions {
25
- padding: number;
26
- borderExtrusion: number;
27
- forcePowerOfTwo: boolean;
28
- maxTextureWidth: number;
29
- maxTextureHeight: number;
30
- allowRotation: boolean;
31
- trimTransparency: boolean;
32
- format: ExportFormat;
33
- }
34
-
35
- export interface PackedFrame {
36
- id: string;
37
- name: string;
38
- x: number;
39
- y: number;
40
- width: number;
41
- height: number;
42
- rotated: boolean;
43
- trimmed: boolean;
44
- spriteSourceSize: {
45
- x: number;
46
- y: number;
47
- w: number;
48
- h: number;
49
- };
50
- sourceSize: {
51
- w: number;
52
- h: number;
53
- };
54
- pivot: {
55
- x: number;
56
- y: number;
57
- };
58
- }
59
-
60
- export interface PackedResult {
61
- textureWidth: number;
62
- textureHeight: number;
63
- efficiency: number;
64
- totalFrames: number;
65
- frames: PackedFrame[];
66
- atlasJson: string;
67
- cssSnippet: string;
68
- codeSnippet: string;
69
- drawCallsBefore: number;
70
- drawCallsAfter: number;
71
- }
72
-
73
- export interface ExtractionGridConfig {
74
- imageWidth: number;
75
- imageHeight: number;
76
- frameWidth: number;
77
- frameHeight: number;
78
- margin: number;
79
- spacing: number;
80
- }
81
-
82
- export interface ExtractedFrameSlice {
83
- id: string;
84
- index: number;
85
- x: number;
86
- y: number;
87
- width: number;
88
- height: number;
89
- }
1
+ export interface SpriteFrameInput {
2
+ id: string;
3
+ name: string;
4
+ width: number;
5
+ height: number;
6
+ x?: number;
7
+ y?: number;
8
+ trimmedX?: number;
9
+ trimmedY?: number;
10
+ originalWidth?: number;
11
+ originalHeight?: number;
12
+ pivotX?: number;
13
+ pivotY?: number;
14
+ }
15
+
16
+ export type ExportFormat =
17
+ | 'generic-json-hash'
18
+ | 'generic-json-array'
19
+ | 'unity'
20
+ | 'godot'
21
+ | 'phaser'
22
+ | 'css';
23
+
24
+ export interface PackerOptions {
25
+ padding: number;
26
+ borderExtrusion: number;
27
+ forcePowerOfTwo: boolean;
28
+ maxTextureWidth: number;
29
+ maxTextureHeight: number;
30
+ allowRotation: boolean;
31
+ trimTransparency: boolean;
32
+ format: ExportFormat;
33
+ }
34
+
35
+ export interface PackedFrame {
36
+ id: string;
37
+ name: string;
38
+ x: number;
39
+ y: number;
40
+ width: number;
41
+ height: number;
42
+ rotated: boolean;
43
+ trimmed: boolean;
44
+ spriteSourceSize: {
45
+ x: number;
46
+ y: number;
47
+ w: number;
48
+ h: number;
49
+ };
50
+ sourceSize: {
51
+ w: number;
52
+ h: number;
53
+ };
54
+ pivot: {
55
+ x: number;
56
+ y: number;
57
+ };
58
+ }
59
+
60
+ export interface PackedResult {
61
+ textureWidth: number;
62
+ textureHeight: number;
63
+ efficiency: number;
64
+ totalFrames: number;
65
+ frames: PackedFrame[];
66
+ atlasJson: string;
67
+ cssSnippet: string;
68
+ codeSnippet: string;
69
+ drawCallsBefore: number;
70
+ drawCallsAfter: number;
71
+ }
72
+
73
+ export interface ExtractionGridConfig {
74
+ imageWidth: number;
75
+ imageHeight: number;
76
+ frameWidth: number;
77
+ frameHeight: number;
78
+ margin: number;
79
+ spacing: number;
80
+ }
81
+
82
+ export interface ExtractedFrameSlice {
83
+ id: string;
84
+ index: number;
85
+ x: number;
86
+ y: number;
87
+ width: number;
88
+ height: number;
89
+ }
@@ -1,42 +1,42 @@
1
- export interface SpriteSheetPackerUI extends Record<string, string> {
2
- packerTab: string;
3
- extractorTab: string;
4
- dropZoneTitle: string;
5
- dropZoneSubtitle: string;
6
- selectFilesButton: string;
7
- clearAllButton: string;
8
- downloadZipButton: string;
9
- copyJsonButton: string;
10
- downloadSheetPngButton: string;
11
- paddingLabel: string;
12
- borderExtrusionLabel: string;
13
- maxTextureSizeLabel: string;
14
- powerOfTwoLabel: string;
15
- exportFormatLabel: string;
16
- presetPixelArt: string;
17
- presetHdUi: string;
18
- presetMobile: string;
19
- formatGenericHash: string;
20
- formatGenericArray: string;
21
- formatUnity: string;
22
- formatGodot: string;
23
- formatPhaser: string;
24
- formatCss: string;
25
- previewTitle: string;
26
- efficiencyBadge: string;
27
- drawCallsBadge: string;
28
- totalFramesBadge: string;
29
- textureSizeBadge: string;
30
- flipbookTitle: string;
31
- flipbookFpsLabel: string;
32
- playAnimation: string;
33
- pauseAnimation: string;
34
- frameWidthLabel: string;
35
- frameHeightLabel: string;
36
- marginLabel: string;
37
- spacingLabel: string;
38
- extractedCountLabel: string;
39
- codeSnippetTitle: string;
40
- copySnippetButton: string;
41
- copiedToast: string;
42
- }
1
+ export interface SpriteSheetPackerUI extends Record<string, string> {
2
+ packerTab: string;
3
+ extractorTab: string;
4
+ dropZoneTitle: string;
5
+ dropZoneSubtitle: string;
6
+ selectFilesButton: string;
7
+ clearAllButton: string;
8
+ downloadZipButton: string;
9
+ copyJsonButton: string;
10
+ downloadSheetPngButton: string;
11
+ paddingLabel: string;
12
+ borderExtrusionLabel: string;
13
+ maxTextureSizeLabel: string;
14
+ powerOfTwoLabel: string;
15
+ exportFormatLabel: string;
16
+ presetPixelArt: string;
17
+ presetHdUi: string;
18
+ presetMobile: string;
19
+ formatGenericHash: string;
20
+ formatGenericArray: string;
21
+ formatUnity: string;
22
+ formatGodot: string;
23
+ formatPhaser: string;
24
+ formatCss: string;
25
+ previewTitle: string;
26
+ efficiencyBadge: string;
27
+ drawCallsBadge: string;
28
+ totalFramesBadge: string;
29
+ textureSizeBadge: string;
30
+ flipbookTitle: string;
31
+ flipbookFpsLabel: string;
32
+ playAnimation: string;
33
+ pauseAnimation: string;
34
+ frameWidthLabel: string;
35
+ frameHeightLabel: string;
36
+ marginLabel: string;
37
+ spacingLabel: string;
38
+ extractedCountLabel: string;
39
+ codeSnippetTitle: string;
40
+ copySnippetButton: string;
41
+ copiedToast: string;
42
+ }
@@ -1,9 +1,9 @@
1
- import type { ToolDefinition } from '../../types';
2
- import { steamCapsuleGenerator } from './entry';
3
- export * from './entry';
4
- export const STEAM_CAPSULE_GENERATOR_TOOL: ToolDefinition = {
5
- entry: steamCapsuleGenerator,
6
- Component: () => import('./component.astro'),
7
- SEOComponent: () => import('./seo.astro'),
8
- BibliographyComponent: () => import('./bibliography.astro'),
9
- };
1
+ import type { ToolDefinition } from '../../types';
2
+ import { steamCapsuleGenerator } from './entry';
3
+ export * from './entry';
4
+ export const STEAM_CAPSULE_GENERATOR_TOOL: ToolDefinition = {
5
+ entry: steamCapsuleGenerator,
6
+ Component: () => import('./component.astro'),
7
+ SEOComponent: () => import('./seo.astro'),
8
+ BibliographyComponent: () => import('./bibliography.astro'),
9
+ };
@@ -1,22 +1,22 @@
1
- export const validation = {
2
- reviewedAt: '2026-08-06',
1
+ export const validation = {
2
+ reviewedAt: '2026-08-06',
3
3
  methodology: 'The generator uses aspect-ratio crop math, clamps focal coordinates to the 0 to 1 range, renders six current Steam store and icon asset sizes with high quality canvas smoothing and packages PNG or JPEG blobs locally.',
4
- sources: [
5
- 'https://partner.steamgames.com/doc/store/assets',
6
- 'https://partner.steamgames.com/doc/store/assets/standard',
7
- 'https://partner.steamgames.com/doc/store/assets/rules',
8
- ],
9
- referenceCases: [
4
+ sources: [
5
+ 'https://partner.steamgames.com/doc/store/assets',
6
+ 'https://partner.steamgames.com/doc/store/assets/standard',
7
+ 'https://partner.steamgames.com/doc/store/assets/rules',
8
+ ],
9
+ referenceCases: [
10
10
  { name: 'Current header capsule', source: '920x430', output: '920x430' },
11
11
  { name: 'Current small capsule', source: '462x174', output: '462x174' },
12
12
  { name: 'Current main capsule', source: '1232x706', output: '1232x706' },
13
13
  { name: 'Current vertical capsule', source: '748x896', output: '748x896' },
14
14
  { name: 'Current app icon', source: '184x184', output: '184x184' },
15
15
  { name: 'Current shortcut icon', source: '256x256', output: '256x256' },
16
- ],
17
- limitations: [
18
- 'Safe zones are visual composition guides and do not guarantee the placement of every Steam interface overlay.',
16
+ ],
17
+ limitations: [
18
+ 'Safe zones are visual composition guides and do not guarantee the placement of every Steam interface overlay.',
19
19
  'Steam can update templates and presentation surfaces; compare the final files with the current Steamworks templates before publication.',
20
- 'Canvas export quality depends on the source image and the browser implementation.',
21
- ],
22
- } as const;
20
+ 'Canvas export quality depends on the source image and the browser implementation.',
21
+ ],
22
+ } as const;
package/src/types.ts CHANGED
@@ -1,72 +1,72 @@
1
- import type { SEOSection } from '@jjlmoya/utils-shared';
2
- import type { WithContext, Thing } from 'schema-dts';
3
-
4
- export type { SEOSection };
5
-
6
- export type KnownLocale =
7
- | 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
8
- | 'fr' | 'id' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
9
- | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
10
-
11
- export interface FAQItem {
12
- question: string;
13
- answer: string;
14
- }
15
-
16
- export interface BibliographyEntry {
17
- name: string;
18
- url: string;
19
- }
20
-
21
- export interface HowToStep {
22
- name: string;
23
- text: string;
24
- }
25
-
26
- export interface ToolLocaleContent<TUI extends Record<string, string> = Record<string, string>> {
27
- slug: string;
28
- title: string;
29
- description: string;
30
- ui: TUI;
31
- wordPool?: string[];
32
- seo: SEOSection[];
33
- faqTitle?: string;
34
- faq: FAQItem[];
35
- bibliographyTitle?: string;
36
- bibliography: BibliographyEntry[];
37
- howTo: HowToStep[];
38
- schemas: WithContext<Thing>[];
39
- }
40
-
41
- export interface CategoryLocaleContent {
42
- slug: string;
43
- title: string;
44
- description: string;
45
- seo: SEOSection[];
46
- }
47
-
48
- export type LocaleLoader<T> = () => Promise<T>;
49
-
50
- export type LocaleMap<T> = Partial<Record<KnownLocale, LocaleLoader<T>>>;
51
-
52
- export interface GamesToolEntry<TUI extends Record<string, string> = Record<string, string>> {
53
- id: string;
54
- icons: {
55
- bg: string;
56
- fg: string;
57
- };
58
- i18n: LocaleMap<ToolLocaleContent<TUI>>;
59
- }
60
-
61
- export interface GamesCategoryEntry {
62
- icon: string;
63
- tools: GamesToolEntry[];
64
- i18n: LocaleMap<CategoryLocaleContent>;
65
- }
66
-
67
- export interface ToolDefinition {
68
- entry: GamesToolEntry;
69
- Component: unknown;
70
- SEOComponent: unknown;
71
- BibliographyComponent: unknown;
72
- }
1
+ import type { SEOSection } from '@jjlmoya/utils-shared';
2
+ import type { WithContext, Thing } from 'schema-dts';
3
+
4
+ export type { SEOSection };
5
+
6
+ export type KnownLocale =
7
+ | 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
8
+ | 'fr' | 'id' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
9
+ | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
10
+
11
+ export interface FAQItem {
12
+ question: string;
13
+ answer: string;
14
+ }
15
+
16
+ export interface BibliographyEntry {
17
+ name: string;
18
+ url: string;
19
+ }
20
+
21
+ export interface HowToStep {
22
+ name: string;
23
+ text: string;
24
+ }
25
+
26
+ export interface ToolLocaleContent<TUI extends Record<string, string> = Record<string, string>> {
27
+ slug: string;
28
+ title: string;
29
+ description: string;
30
+ ui: TUI;
31
+ wordPool?: string[];
32
+ seo: SEOSection[];
33
+ faqTitle?: string;
34
+ faq: FAQItem[];
35
+ bibliographyTitle?: string;
36
+ bibliography: BibliographyEntry[];
37
+ howTo: HowToStep[];
38
+ schemas: WithContext<Thing>[];
39
+ }
40
+
41
+ export interface CategoryLocaleContent {
42
+ slug: string;
43
+ title: string;
44
+ description: string;
45
+ seo: SEOSection[];
46
+ }
47
+
48
+ export type LocaleLoader<T> = () => Promise<T>;
49
+
50
+ export type LocaleMap<T> = Partial<Record<KnownLocale, LocaleLoader<T>>>;
51
+
52
+ export interface GamesToolEntry<TUI extends Record<string, string> = Record<string, string>> {
53
+ id: string;
54
+ icons: {
55
+ bg: string;
56
+ fg: string;
57
+ };
58
+ i18n: LocaleMap<ToolLocaleContent<TUI>>;
59
+ }
60
+
61
+ export interface GamesCategoryEntry {
62
+ icon: string;
63
+ tools: GamesToolEntry[];
64
+ i18n: LocaleMap<CategoryLocaleContent>;
65
+ }
66
+
67
+ export interface ToolDefinition {
68
+ entry: GamesToolEntry;
69
+ Component: unknown;
70
+ SEOComponent: unknown;
71
+ BibliographyComponent: unknown;
72
+ }