hudini 0.19.0 → 0.20.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 (98) hide show
  1. package/README.md +1 -27
  2. package/dist/components/badge/badge.d.ts +94 -0
  3. package/dist/components/badge/badge.d.ts.map +1 -0
  4. package/dist/components/badge/badge.js +180 -0
  5. package/dist/components/badge/badge.js.map +1 -0
  6. package/dist/components/badge/badge.spec.d.ts +2 -0
  7. package/dist/components/badge/badge.spec.d.ts.map +1 -0
  8. package/dist/components/badge/badge.spec.js +195 -0
  9. package/dist/components/badge/badge.spec.js.map +1 -0
  10. package/dist/components/badge/index.d.ts +2 -0
  11. package/dist/components/badge/index.d.ts.map +1 -0
  12. package/dist/components/badge/index.js +2 -0
  13. package/dist/components/badge/index.js.map +1 -0
  14. package/dist/components/icon-button/icon-button.d.ts +2 -8
  15. package/dist/components/icon-button/icon-button.d.ts.map +1 -1
  16. package/dist/components/icon-button/icon-button.js +10 -86
  17. package/dist/components/icon-button/icon-button.js.map +1 -1
  18. package/dist/components/index.d.ts +1 -4
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/components/index.js +1 -4
  21. package/dist/components/index.js.map +1 -1
  22. package/dist/components/panel/panel.d.ts +8 -8
  23. package/dist/components/panel/panel.d.ts.map +1 -1
  24. package/dist/components/panel/panel.js +29 -30
  25. package/dist/components/panel/panel.js.map +1 -1
  26. package/dist/components/text/text.d.ts +21 -4
  27. package/dist/components/text/text.d.ts.map +1 -1
  28. package/dist/components/text/text.js +14 -14
  29. package/dist/components/text/text.js.map +1 -1
  30. package/dist/components/text-button/text-button.d.ts +9 -18
  31. package/dist/components/text-button/text-button.d.ts.map +1 -1
  32. package/dist/components/text-button/text-button.js +38 -81
  33. package/dist/components/text-button/text-button.js.map +1 -1
  34. package/dist/components/text-button/text-button.spec.js +55 -9
  35. package/dist/components/text-button/text-button.spec.js.map +1 -1
  36. package/dist/hudini.js +2842 -4529
  37. package/dist/hudini.min.js +1 -1
  38. package/dist/loaders/load-fonts.d.ts +29 -0
  39. package/dist/loaders/load-fonts.d.ts.map +1 -1
  40. package/dist/loaders/load-fonts.js +20 -1
  41. package/dist/loaders/load-fonts.js.map +1 -1
  42. package/dist/utils/button-style.d.ts +16 -0
  43. package/dist/utils/button-style.d.ts.map +1 -0
  44. package/dist/utils/button-style.js +35 -0
  45. package/dist/utils/button-style.js.map +1 -0
  46. package/dist/utils/index.d.ts +2 -0
  47. package/dist/utils/index.d.ts.map +1 -1
  48. package/dist/utils/index.js +2 -0
  49. package/dist/utils/index.js.map +1 -1
  50. package/dist/utils/number-to-rgb.d.ts +16 -0
  51. package/dist/utils/number-to-rgb.d.ts.map +1 -0
  52. package/dist/utils/number-to-rgb.js +20 -0
  53. package/dist/utils/number-to-rgb.js.map +1 -0
  54. package/package.json +2 -2
  55. package/dist/components/flat-icon-button/flat-icon-button.d.ts +0 -60
  56. package/dist/components/flat-icon-button/flat-icon-button.d.ts.map +0 -1
  57. package/dist/components/flat-icon-button/flat-icon-button.js +0 -279
  58. package/dist/components/flat-icon-button/flat-icon-button.js.map +0 -1
  59. package/dist/components/flat-icon-button/index.d.ts +0 -2
  60. package/dist/components/flat-icon-button/index.d.ts.map +0 -1
  61. package/dist/components/flat-icon-button/index.js +0 -2
  62. package/dist/components/flat-icon-button/index.js.map +0 -1
  63. package/dist/components/flat-section-header/flat-section-header.d.ts +0 -143
  64. package/dist/components/flat-section-header/flat-section-header.d.ts.map +0 -1
  65. package/dist/components/flat-section-header/flat-section-header.js +0 -275
  66. package/dist/components/flat-section-header/flat-section-header.js.map +0 -1
  67. package/dist/components/flat-section-header/flat-section-header.spec.d.ts +0 -2
  68. package/dist/components/flat-section-header/flat-section-header.spec.d.ts.map +0 -1
  69. package/dist/components/flat-section-header/flat-section-header.spec.js +0 -255
  70. package/dist/components/flat-section-header/flat-section-header.spec.js.map +0 -1
  71. package/dist/components/flat-section-header/index.d.ts +0 -2
  72. package/dist/components/flat-section-header/index.d.ts.map +0 -1
  73. package/dist/components/flat-section-header/index.js +0 -2
  74. package/dist/components/flat-section-header/index.js.map +0 -1
  75. package/dist/components/flat-text-button/flat-text-button.d.ts +0 -165
  76. package/dist/components/flat-text-button/flat-text-button.d.ts.map +0 -1
  77. package/dist/components/flat-text-button/flat-text-button.js +0 -325
  78. package/dist/components/flat-text-button/flat-text-button.js.map +0 -1
  79. package/dist/components/flat-text-button/flat-text-button.spec.d.ts +0 -2
  80. package/dist/components/flat-text-button/flat-text-button.spec.d.ts.map +0 -1
  81. package/dist/components/flat-text-button/flat-text-button.spec.js +0 -243
  82. package/dist/components/flat-text-button/flat-text-button.spec.js.map +0 -1
  83. package/dist/components/flat-text-button/index.d.ts +0 -2
  84. package/dist/components/flat-text-button/index.d.ts.map +0 -1
  85. package/dist/components/flat-text-button/index.js +0 -2
  86. package/dist/components/flat-text-button/index.js.map +0 -1
  87. package/dist/components/section-header/index.d.ts +0 -2
  88. package/dist/components/section-header/index.d.ts.map +0 -1
  89. package/dist/components/section-header/index.js +0 -2
  90. package/dist/components/section-header/index.js.map +0 -1
  91. package/dist/components/section-header/section-header.d.ts +0 -149
  92. package/dist/components/section-header/section-header.d.ts.map +0 -1
  93. package/dist/components/section-header/section-header.js +0 -292
  94. package/dist/components/section-header/section-header.js.map +0 -1
  95. package/dist/components/section-header/section-header.spec.d.ts +0 -2
  96. package/dist/components/section-header/section-header.spec.d.ts.map +0 -1
  97. package/dist/components/section-header/section-header.spec.js +0 -264
  98. package/dist/components/section-header/section-header.spec.js.map +0 -1
@@ -1,8 +1,37 @@
1
+ /**
2
+ * Options for {@link loadFonts}.
3
+ *
4
+ * @property fontAwesomeUrl - Optional override for the Font Awesome stylesheet URL.
5
+ * When omitted, `font-awesome-for-phaser` uses its own default.
6
+ * @property baseFont - Stylesheet URL for the base HUD font. Defaults to
7
+ * Google Fonts' Fredoka (variable, weights 300..700).
8
+ * @property baseFontFamily - Font-family name matching the stylesheet above.
9
+ * Must be the exact name the browser knows the font by. Defaults to `'Fredoka'`.
10
+ */
1
11
  type LoadFontsOptions = {
2
12
  fontAwesomeUrl?: string;
3
13
  baseFont?: string;
4
14
  baseFontFamily?: string;
5
15
  };
16
+ /**
17
+ * Loads the fonts Hudini needs at runtime: Font Awesome (for the icon
18
+ * components) and a base HUD font (used by text-based components).
19
+ *
20
+ * By default it pulls Fredoka from Google Fonts. Pass `baseFont` + `baseFontFamily`
21
+ * to swap it for any other web font — just make sure both point to the same
22
+ * font-family name the browser will see.
23
+ *
24
+ * @example
25
+ * // Use the defaults (Font Awesome + Fredoka)
26
+ * await loadFonts();
27
+ *
28
+ * @example
29
+ * // Use a custom base font
30
+ * await loadFonts({
31
+ * baseFont: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap',
32
+ * baseFontFamily: 'Inter',
33
+ * });
34
+ */
6
35
  export declare const loadFonts: (options?: LoadFontsOptions) => Promise<void>;
7
36
  export {};
8
37
  //# sourceMappingURL=load-fonts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-fonts.d.ts","sourceRoot":"","sources":["../../src/loaders/load-fonts.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAiCF,eAAO,MAAM,SAAS,GAAU,UAAU,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAexE,CAAC"}
1
+ {"version":3,"file":"load-fonts.d.ts","sourceRoot":"","sources":["../../src/loaders/load-fonts.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,KAAK,gBAAgB,GAAG;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAiCF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,SAAS,GAAU,UAAU,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAexE,CAAC"}
@@ -26,8 +26,27 @@ const ensureBaseFontReady = async (fontFamily) => {
26
26
  await Promise.all(loads);
27
27
  await document['fonts'].ready;
28
28
  };
29
+ /**
30
+ * Loads the fonts Hudini needs at runtime: Font Awesome (for the icon
31
+ * components) and a base HUD font (used by text-based components).
32
+ *
33
+ * By default it pulls Fredoka from Google Fonts. Pass `baseFont` + `baseFontFamily`
34
+ * to swap it for any other web font — just make sure both point to the same
35
+ * font-family name the browser will see.
36
+ *
37
+ * @example
38
+ * // Use the defaults (Font Awesome + Fredoka)
39
+ * await loadFonts();
40
+ *
41
+ * @example
42
+ * // Use a custom base font
43
+ * await loadFonts({
44
+ * baseFont: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap',
45
+ * baseFontFamily: 'Inter',
46
+ * });
47
+ */
29
48
  export const loadFonts = async (options) => {
30
- const { fontAwesomeUrl, baseFont = 'https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap', baseFontFamily = 'Bebas Neue', } = options ?? {};
49
+ const { fontAwesomeUrl, baseFont = 'https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&display=swap', baseFontFamily = 'Fredoka', } = options ?? {};
31
50
  try {
32
51
  await loadFontAwesomeForPhaser(fontAwesomeUrl);
33
52
  await loadStylesheet(baseFont);
@@ -1 +1 @@
1
- {"version":3,"file":"load-fonts.js","sourceRoot":"","sources":["../../src/loaders/load-fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAQ/E,MAAM,cAAc,GAAG,CAAC,GAAW,EAAiB,EAAE;IACpD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAQ,EAAE;QAC3C,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;QACnE,IAAI,Y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B,EAAE;IACtE,MAAM,KAAK,GAAG;QACZ,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,UAAU,GAAG,EAAE,GAAG,CAAC;QACpD,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,UAAU,GAAG,EAAE,GAAG,CAAC;KACrD,CAAC;IACF,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,MAAO,QAA2D,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;AACpF,CAAC,CAAC;AAGF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,OAA0B,EAAiB,EAAE;IAC3E,MAAM,EACJ,cAAc,EACd,QAAQ,GAAG,6EAA6E,EACxF,cAAc,GAAG,SAAS,GAC3B,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,IAAI,CAAC;QACH,MAAM,wBAAwB,CAAC,cAAc,CAAC,CAAC;QAC/C,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;QAC/B,MAAM,mBAAmB,CAAC,cAAc,CAAC,CAAC;QAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrG,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** Thickness of the outline stroke around a button's text or icon glyph. */
2
+ export declare const BUTTON_STROKE_THICKNESS = 3;
3
+ /**
4
+ * Compute the outline (stroke) color for the text or icon of a button, given
5
+ * the button's own color input.
6
+ *
7
+ * - Palette-based color (family like `'blue'` or a full token like
8
+ * `'blue-500'`): a darker shade in the same palette family via
9
+ * {@link Color.shift}.
10
+ * - Arbitrary CSS color (`'#3B82F6'`, `'rgb(...)'`): soft translucent black.
11
+ *
12
+ * Shared between {@link TextButton} and {@link IconButton} so both render
13
+ * with the same outline style.
14
+ */
15
+ export declare const getButtonStrokeColor: (colorInput: string) => string;
16
+ //# sourceMappingURL=button-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-style.d.ts","sourceRoot":"","sources":["../../src/utils/button-style.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAkBzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM,KAAG,MAMzD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Color, isColorKey, Opacity } from 'phaser-wind';
2
+ /** Thickness of the outline stroke around a button's text or icon glyph. */
3
+ export const BUTTON_STROKE_THICKNESS = 3;
4
+ /**
5
+ * Amount added to the palette shade to derive the button's stroke color.
6
+ * `blue-500` + 400 → `blue-900` — a darker outline that still lives in the
7
+ * same palette family, so it never clashes with the fill.
8
+ */
9
+ const STROKE_DARKER_SHIFT = 400;
10
+ /**
11
+ * Opacity token used for the fallback stroke when the button color isn't a
12
+ * palette reference. Solid black chapado is too harsh against many fills;
13
+ * ~60% translucent black keeps the outline readable while blending in.
14
+ */
15
+ const FALLBACK_STROKE_OPACITY_KEY = '60';
16
+ const blackWithAlpha = (alpha) => `rgba(0, 0, 0, ${alpha})`;
17
+ /**
18
+ * Compute the outline (stroke) color for the text or icon of a button, given
19
+ * the button's own color input.
20
+ *
21
+ * - Palette-based color (family like `'blue'` or a full token like
22
+ * `'blue-500'`): a darker shade in the same palette family via
23
+ * {@link Color.shift}.
24
+ * - Arbitrary CSS color (`'#3B82F6'`, `'rgb(...)'`): soft translucent black.
25
+ *
26
+ * Shared between {@link TextButton} and {@link IconButton} so both render
27
+ * with the same outline style.
28
+ */
29
+ export const getButtonStrokeColor = (colorInput) => {
30
+ const isPaletteColor = isColorKey(colorInput) || Color.isValidColorToken(colorInput);
31
+ return isPaletteColor
32
+ ? Color.rgb(Color.shift(colorInput, STROKE_DARKER_SHIFT))
33
+ : blackWithAlpha(Opacity.value(FALLBACK_STROKE_OPACITY_KEY));
34
+ };
35
+ //# sourceMappingURL=button-style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-style.js","sourceRoot":"","sources":["../../src/utils/button-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AAExE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;GAIG;AACH,MAAM,2BAA2B,GAAG,IAAa,CAAC;AAElD,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,iBAAiB,KAAK,GAAG,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACjE,MAAM,cAAc,GAClB,UAAU,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAChE,OAAO,cAAc;QACnB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,UAAsB,EAAE,mBAAmB,CAAC,CAAC;QACrE,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC"}
@@ -1,4 +1,6 @@
1
+ export * from './button-style';
1
2
  export * from './color-variants';
2
3
  export * from './get-hudini';
3
4
  export * from './get-pw-from-scene';
5
+ export * from './number-to-rgb';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
@@ -1,4 +1,6 @@
1
+ export * from './button-style';
1
2
  export * from './color-variants';
2
3
  export * from './get-hudini';
3
4
  export * from './get-pw-from-scene';
5
+ export * from './number-to-rgb';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Convert a `0xRRGGBB` color number into a CSS `rgb(r, g, b)` string.
3
+ *
4
+ * Handy when a numeric Phaser color (e.g. produced by `pw.color.hex(...)` or
5
+ * `getColorVariant(...)`) needs to feed a `Phaser.GameObjects.Text` style
6
+ * field like `color`, `stroke` or `shadow.color`, which expect strings.
7
+ *
8
+ * @param color - Color as a 24-bit integer (`0xRRGGBB`).
9
+ * @returns CSS `rgb(r, g, b)` string.
10
+ *
11
+ * @example
12
+ * const dark = getColorVariant('blue-500', 400, 0); // number
13
+ * text.setStroke(numberToRgb(dark), 3);
14
+ */
15
+ export declare const numberToRgb: (color: number) => string;
16
+ //# sourceMappingURL=number-to-rgb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-to-rgb.d.ts","sourceRoot":"","sources":["../../src/utils/number-to-rgb.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAG3C,CAAC"}
@@ -0,0 +1,20 @@
1
+ import Phaser from 'phaser';
2
+ /**
3
+ * Convert a `0xRRGGBB` color number into a CSS `rgb(r, g, b)` string.
4
+ *
5
+ * Handy when a numeric Phaser color (e.g. produced by `pw.color.hex(...)` or
6
+ * `getColorVariant(...)`) needs to feed a `Phaser.GameObjects.Text` style
7
+ * field like `color`, `stroke` or `shadow.color`, which expect strings.
8
+ *
9
+ * @param color - Color as a 24-bit integer (`0xRRGGBB`).
10
+ * @returns CSS `rgb(r, g, b)` string.
11
+ *
12
+ * @example
13
+ * const dark = getColorVariant('blue-500', 400, 0); // number
14
+ * text.setStroke(numberToRgb(dark), 3);
15
+ */
16
+ export const numberToRgb = (color) => {
17
+ const c = Phaser.Display.Color.ValueToColor(color);
18
+ return `rgb(${c.red}, ${c.green}, ${c.blue})`;
19
+ };
20
+ //# sourceMappingURL=number-to-rgb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-to-rgb.js","sourceRoot":"","sources":["../../src/utils/number-to-rgb.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE;IACnD,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC;AAChD,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hudini",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "🎩 Magical Phaser UI components - Reusable HUD elements for game development. Is magic, like a wizard",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -62,7 +62,7 @@
62
62
  "vitest": "^3.2.4"
63
63
  },
64
64
  "dependencies": {
65
- "phaser-wind": "0.10.0",
65
+ "phaser-wind": "0.11.0",
66
66
  "font-awesome-for-phaser": "0.10.0"
67
67
  },
68
68
  "peerDependencies": {
@@ -1,60 +0,0 @@
1
- import { IconText, type IconKey, type IconStyle } from 'font-awesome-for-phaser';
2
- import { GameObjects, Scene } from 'phaser';
3
- import { type ColorKey, type FontSizeKey } from 'phaser-wind';
4
- export type FlatIconButtonParams = {
5
- scene: Scene;
6
- x: number;
7
- y: number;
8
- icon: IconKey;
9
- iconStyle?: IconStyle;
10
- size?: FontSizeKey | number;
11
- backgroundColor?: ColorKey | string;
12
- iconColor?: ColorKey | string;
13
- onClick?: () => void;
14
- borderRadius?: string | number;
15
- backgroundOpacity?: number;
16
- iconOpacity?: number;
17
- };
18
- export declare class FlatIconButton extends GameObjects.Container {
19
- backgroundSprite: GameObjects.Sprite;
20
- whiteBorderSprite: GameObjects.Sprite;
21
- iconText: IconText;
22
- private pw;
23
- private baseSizePx;
24
- private borderRadiusPx;
25
- private backgroundColorValue;
26
- private iconColorValue;
27
- private backgroundOpacityValue;
28
- private iconOpacityValue;
29
- constructor({ scene, x, y, icon, iconStyle, size, backgroundColor, iconColor, onClick, borderRadius, backgroundOpacity, iconOpacity, }: FlatIconButtonParams);
30
- setBackgroundColor(color: ColorKey | string): this;
31
- setIconColor(color: ColorKey | string): this;
32
- setBackgroundOpacity(opacity: number): this;
33
- setIconOpacity(opacity: number): this;
34
- setBorderRadius(borderRadius: string | number): this;
35
- setIcon(icon: IconKey, opts?: {
36
- iconStyle?: IconStyle;
37
- }): this;
38
- setButtonSize(size: FontSizeKey | number): this;
39
- private updateSize;
40
- private createWhiteBorderSprite;
41
- private createBackgroundSprite;
42
- private regenerateBackgroundTexture;
43
- private createWhiteBorderTexture;
44
- private createBackgroundTexture;
45
- private createIconText;
46
- private setupContainer;
47
- private setupInteractivity;
48
- /**
49
- * Gets the interactive sprite of the icon button
50
- * @returns The interactive sprite
51
- */
52
- get interactive(): Pick<GameObjects.Sprite, 'on' | 'off' | 'setInteractive' | 'setInteractive' | 'once'>;
53
- /**
54
- * Gets the bounds of the flat icon button for layout calculations
55
- * @param output Optional rectangle to store the result
56
- * @returns Rectangle with the button bounds
57
- */
58
- getBounds(output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;
59
- }
60
- //# sourceMappingURL=flat-icon-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/flat-icon-button/flat-icon-button.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAEjB,MAAM,aAAa,CAAC;AAIrB,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC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AC,cAAc;IAiCtB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IA+C1B;;;OAGG;IACH,IAAW,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,GAAG,KAAK,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,MAAM,CAAC,CAQ9G;IAED;;;;OAIG;IACa,SAAS,CACvB,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,GAC7B,MAAM,CAAC,IAAI,CAAC,SAAS;CAoBzB"}
@@ -1,279 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { IconText, } from 'font-awesome-for-phaser';
3
- import { GameObjects } from 'phaser';
4
- import { Color, } from 'phaser-wind';
5
- import { getPWFromScene } from '../../utils/get-pw-from-scene';
6
- const durations = {
7
- click: 60,
8
- hover: 100,
9
- };
10
- const BUTTON_SCALE = 2.2;
11
- const CENTER_OFFSET = 1.1;
12
- const HOVER_SCALE = 1.05;
13
- const POINTER_DOWN_SCALE = 0.95;
14
- // Border constants
15
- const BLACK_BORDER_THICKNESS = 2;
16
- const WHITE_BORDER_EXTRA_PIXELS_PER_SIDE = 3;
17
- const WHITE_BORDER_TOTAL_EXTRA_PIXELS = WHITE_BORDER_EXTRA_PIXELS_PER_SIDE * 2; // 6 pixels total
18
- const WHITE_BORDER_RADIUS_EXTRA = 2;
19
- // Icon constants
20
- const ICON_STROKE_THICKNESS = 3;
21
- const ICON_SHADOW_OFFSET_X = 0;
22
- const ICON_SHADOW_OFFSET_Y = 3;
23
- const ICON_SHADOW_BLUR = 0;
24
- const ICON_OFFSET_Y = -1.5; // Half of shadow offset to keep visually centered
25
- // Origin constants
26
- const SPRITE_ORIGIN = 0.5;
27
- export class FlatIconButton extends GameObjects.Container {
28
- backgroundSprite;
29
- whiteBorderSprite;
30
- iconText;
31
- pw;
32
- baseSizePx;
33
- borderRadiusPx;
34
- backgroundColorValue; // rgb string
35
- iconColorValue; // rgb string
36
- backgroundOpacityValue = 1;
37
- iconOpacityValue = 1;
38
- constructor({ scene, x, y, icon, iconStyle = 'solid', size, backgroundColor = 'blue-500', iconColor = 'white', onClick, borderRadius = 'md', backgroundOpacity = 1, iconOpacity = 1, }) {
39
- super(scene, x, y);
40
- this.pw = getPWFromScene(scene);
41
- this.baseSizePx =
42
- typeof size === 'number'
43
- ? size
44
- : this.pw.fontSize.px(size ?? 'md');
45
- this.updateSize();
46
- this.borderRadiusPx =
47
- typeof borderRadius === 'number'
48
- ? borderRadius
49
- : this.pw.radius.px((borderRadius ?? 'md'));
50
- this.backgroundColorValue = Color.rgb(backgroundColor);
51
- this.iconColorValue = Color.rgb(iconColor);
52
- this.backgroundOpacityValue = backgroundOpacity;
53
- this.iconOpacityValue = iconOpacity;
54
- this.createWhiteBorderSprite(scene);
55
- this.createBackgroundSprite(scene);
56
- this.createIconText(scene, icon, iconStyle);
57
- this.setupContainer();
58
- this.setupInteractivity(onClick);
59
- }
60
- // API: colors
61
- setBackgroundColor(color) {
62
- this.backgroundColorValue = Color.rgb(color);
63
- this.regenerateBackgroundTexture();
64
- return this;
65
- }
66
- setIconColor(color) {
67
- this.iconColorValue = Color.rgb(color);
68
- this.iconText.setColor(this.iconColorValue);
69
- this.iconText.setAlpha(this.iconOpacityValue);
70
- return this;
71
- }
72
- // API: opacity
73
- setBackgroundOpacity(opacity) {
74
- this.backgroundOpacityValue = Math.max(0, Math.min(1, opacity));
75
- this.backgroundSprite.setAlpha(this.backgroundOpacityValue);
76
- return this;
77
- }
78
- setIconOpacity(opacity) {
79
- this.iconOpacityValue = Math.max(0, Math.min(1, opacity));
80
- this.iconText.setAlpha(this.iconOpacityValue);
81
- return this;
82
- }
83
- // API: radius
84
- setBorderRadius(borderRadius) {
85
- const newRadiusPx = typeof borderRadius === 'number'
86
- ? borderRadius
87
- : this.pw.radius.px(borderRadius);
88
- if (this.borderRadiusPx === newRadiusPx)
89
- return this;
90
- this.borderRadiusPx = newRadiusPx;
91
- // Regenerate textures for white border and background
92
- const whiteBorderTexture = this.createWhiteBorderTexture(this.scene);
93
- const backgroundTexture = this.createBackgroundTexture(this.scene);
94
- this.whiteBorderSprite.setTexture(whiteBorderTexture);
95
- this.backgroundSprite.setTexture(backgroundTexture);
96
- this.backgroundSprite.setAlpha(this.backgroundOpacityValue);
97
- return this;
98
- }
99
- // API: icon
100
- setIcon(icon, opts) {
101
- this.iconText.setIcon(icon, opts);
102
- return this;
103
- }
104
- setButtonSize(size) {
105
- this.baseSizePx =
106
- typeof size === 'number'
107
- ? size
108
- : this.pw.fontSize.px(size ?? 'md');
109
- this.iconText.setFontSize(`${this.baseSizePx}px`);
110
- this.updateSize();
111
- const whiteBorderTexture = this.createWhiteBorderTexture(this.scene);
112
- const backgroundTexture = this.createBackgroundTexture(this.scene);
113
- this.whiteBorderSprite.setTexture(whiteBorderTexture);
114
- this.backgroundSprite.setTexture(backgroundTexture);
115
- this.backgroundSprite.setAlpha(this.backgroundOpacityValue);
116
- return this;
117
- }
118
- updateSize() {
119
- this.width = this.baseSizePx * BUTTON_SCALE;
120
- this.height = this.baseSizePx * BUTTON_SCALE;
121
- }
122
- createWhiteBorderSprite(scene) {
123
- const whiteBorderTexture = this.createWhiteBorderTexture(scene);
124
- this.whiteBorderSprite = scene.add.sprite(0, 0, whiteBorderTexture);
125
- this.whiteBorderSprite.setOrigin(SPRITE_ORIGIN, SPRITE_ORIGIN);
126
- }
127
- createBackgroundSprite(scene) {
128
- const textureKey = this.createBackgroundTexture(scene);
129
- this.backgroundSprite = scene.add.sprite(0, 0, textureKey);
130
- this.backgroundSprite.setOrigin(SPRITE_ORIGIN, SPRITE_ORIGIN);
131
- this.backgroundSprite.setAlpha(this.backgroundOpacityValue);
132
- }
133
- regenerateBackgroundTexture() {
134
- const whiteBorderTexture = this.createWhiteBorderTexture(this.scene);
135
- const backgroundTexture = this.createBackgroundTexture(this.scene);
136
- this.whiteBorderSprite.setTexture(whiteBorderTexture);
137
- this.backgroundSprite.setTexture(backgroundTexture);
138
- this.backgroundSprite.setAlpha(this.backgroundOpacityValue);
139
- }
140
- createWhiteBorderTexture(scene) {
141
- const textureKey = `flatIconButton_whiteBorder_r${this.borderRadiusPx}_${this.baseSizePx}`;
142
- // White border is larger on each side
143
- const side = this.baseSizePx * 2 + WHITE_BORDER_TOTAL_EXTRA_PIXELS;
144
- // Increase texture size to accommodate the larger border
145
- const textureSize = this.baseSizePx * BUTTON_SCALE + WHITE_BORDER_TOTAL_EXTRA_PIXELS;
146
- const centerX = textureSize / 2;
147
- const centerY = textureSize / 2;
148
- const graphics = scene.add.graphics();
149
- const maxRadius = Math.floor(Math.min(side / 2, side / 2));
150
- const effectiveRadius = Math.min(this.borderRadiusPx + WHITE_BORDER_RADIUS_EXTRA, maxRadius);
151
- const finalRadius = Math.max(0, effectiveRadius);
152
- // White border (outer)
153
- graphics.fillStyle(Color.hex('white'), 1);
154
- graphics.fillRoundedRect(centerX - side / 2, centerY - side / 2, side, side, finalRadius);
155
- graphics.generateTexture(textureKey, textureSize, textureSize);
156
- graphics.destroy();
157
- return textureKey;
158
- }
159
- createBackgroundTexture(scene) {
160
- const size = this.baseSizePx;
161
- const textureKey = `flatIconButton_${this.backgroundColorValue}_${this.borderRadiusPx}_${size}`;
162
- const textureSize = size * BUTTON_SCALE; // match icon-button scale for consistency
163
- const centerX = size * CENTER_OFFSET;
164
- const centerY = size * CENTER_OFFSET;
165
- const graphics = scene.add.graphics();
166
- const side = size * 2;
167
- const maxRadius = Math.floor(Math.min(side / 2, side / 2));
168
- const effectiveRadius = Math.min(this.borderRadiusPx, maxRadius);
169
- const finalRadius = Math.max(0, effectiveRadius);
170
- // Main background (flat, no gradient overlays)
171
- graphics.fillStyle(Color.hex(this.backgroundColorValue), 1);
172
- graphics.fillRoundedRect(centerX - side / 2, centerY - side / 2, side, side, finalRadius);
173
- // Black stroke border
174
- graphics.lineStyle(BLACK_BORDER_THICKNESS, Color.hex('black'), 1);
175
- graphics.strokeRoundedRect(centerX - side / 2, centerY - side / 2, side, side, finalRadius);
176
- graphics.generateTexture(textureKey, textureSize, textureSize);
177
- graphics.destroy();
178
- return textureKey;
179
- }
180
- createIconText(scene, icon, iconStyle) {
181
- // Use black for stroke and shadow (same as IconButton behavior)
182
- const darkColorString = Color.rgb('black');
183
- this.iconText = new IconText({
184
- scene,
185
- x: 0,
186
- y: ICON_OFFSET_Y,
187
- icon,
188
- size: this.baseSizePx,
189
- style: {
190
- color: this.iconColorValue,
191
- strokeThickness: ICON_STROKE_THICKNESS,
192
- stroke: darkColorString,
193
- shadow: {
194
- offsetX: ICON_SHADOW_OFFSET_X,
195
- offsetY: ICON_SHADOW_OFFSET_Y,
196
- color: darkColorString,
197
- blur: ICON_SHADOW_BLUR,
198
- stroke: true,
199
- fill: true,
200
- },
201
- },
202
- iconStyle,
203
- });
204
- this.iconText.setAlpha(this.iconOpacityValue);
205
- this.iconText.setOrigin(SPRITE_ORIGIN, SPRITE_ORIGIN);
206
- }
207
- setupContainer() {
208
- this.add([this.whiteBorderSprite, this.backgroundSprite, this.iconText]);
209
- }
210
- setupInteractivity(onClick) {
211
- this.backgroundSprite.setInteractive({ useHandCursor: true });
212
- // Hover effects
213
- this.backgroundSprite.on('pointerover', () => {
214
- this.scene.tweens.add({
215
- targets: this,
216
- duration: durations.hover,
217
- scaleX: HOVER_SCALE,
218
- scaleY: HOVER_SCALE,
219
- ease: 'Back.easeOut',
220
- });
221
- });
222
- this.backgroundSprite.on('pointerout', () => {
223
- this.scene.tweens.add({
224
- targets: this,
225
- duration: durations.hover,
226
- scaleX: 1,
227
- scaleY: 1,
228
- ease: 'Back.easeOut',
229
- });
230
- });
231
- // Click effects
232
- this.backgroundSprite.on('pointerdown', () => {
233
- this.scene.tweens.add({
234
- targets: [this.whiteBorderSprite, this.backgroundSprite, this.iconText],
235
- scaleX: POINTER_DOWN_SCALE,
236
- scaleY: POINTER_DOWN_SCALE,
237
- duration: durations.click,
238
- ease: 'Linear',
239
- });
240
- });
241
- this.backgroundSprite.on('pointerup', () => {
242
- this.scene.tweens.add({
243
- targets: [this.whiteBorderSprite, this.backgroundSprite, this.iconText],
244
- scaleX: 1,
245
- scaleY: 1,
246
- duration: durations.click,
247
- ease: 'Linear',
248
- });
249
- onClick?.();
250
- });
251
- }
252
- /**
253
- * Gets the interactive sprite of the icon button
254
- * @returns The interactive sprite
255
- */
256
- get interactive() {
257
- const { on, off, setInteractive, once } = this.backgroundSprite;
258
- return {
259
- on: on.bind(this.backgroundSprite),
260
- off: off.bind(this.backgroundSprite),
261
- setInteractive: setInteractive.bind(this.backgroundSprite),
262
- once: once.bind(this.backgroundSprite),
263
- };
264
- }
265
- /**
266
- * Gets the bounds of the flat icon button for layout calculations
267
- * @param output Optional rectangle to store the result
268
- * @returns Rectangle with the button bounds
269
- */
270
- getBounds(output) {
271
- const width = this.baseSizePx * BUTTON_SCALE;
272
- const height = this.baseSizePx * BUTTON_SCALE;
273
- if (output) {
274
- return output.setTo(this.x - width / 2, this.y - height / 2, width, height);
275
- }
276
- return new Phaser.Geom.Rectangle(this.x - width / 2, this.y - height / 2, width, height);
277
- }
278
- }
279
- //# sourceMappingURL=flat-icon-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-icon-button.js","sourceRoot":"","sources":["../../../src/components/flat-icon-button/flat-icon-button.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EACL,QAAQ,GAGT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAS,MAAM,QAAQ,CAAC;AAC5C,OAAO,EACL,KAAK,GAKN,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAiB/D,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,kB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AAW;QACpB,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAChE,OAAO;YACL,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAClC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACpC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAC1D,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACvC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACa,SAAS,CACvB,MAA8B;QAE9B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAE9C,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC,KAAK,CACjB,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAClB,IAAI,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,EACnB,KAAK,EACL,MAAM,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAC9B,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAClB,IAAI,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,EACnB,KAAK,EACL,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
@@ -1,2 +0,0 @@
1
- export * from './flat-icon-button';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/flat-icon-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './flat-icon-button';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/flat-icon-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}