hudini 0.19.0 → 0.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 (227) hide show
  1. package/README.md +1 -27
  2. package/dist/components/alert/alert.d.ts +161 -0
  3. package/dist/components/alert/alert.d.ts.map +1 -0
  4. package/dist/components/alert/alert.js +304 -0
  5. package/dist/components/alert/alert.js.map +1 -0
  6. package/dist/components/alert/alert.spec.d.ts +2 -0
  7. package/dist/components/alert/alert.spec.d.ts.map +1 -0
  8. package/dist/components/alert/alert.spec.js +235 -0
  9. package/dist/components/alert/alert.spec.js.map +1 -0
  10. package/dist/components/alert/index.d.ts +2 -0
  11. package/dist/components/alert/index.d.ts.map +1 -0
  12. package/dist/components/alert/index.js +2 -0
  13. package/dist/components/alert/index.js.map +1 -0
  14. package/dist/components/badge/badge.d.ts +94 -0
  15. package/dist/components/badge/badge.d.ts.map +1 -0
  16. package/dist/components/badge/badge.js +180 -0
  17. package/dist/components/badge/badge.js.map +1 -0
  18. package/dist/components/badge/badge.spec.d.ts +2 -0
  19. package/dist/components/badge/badge.spec.d.ts.map +1 -0
  20. package/dist/components/badge/badge.spec.js +197 -0
  21. package/dist/components/badge/badge.spec.js.map +1 -0
  22. package/dist/components/badge/index.d.ts +2 -0
  23. package/dist/components/badge/index.d.ts.map +1 -0
  24. package/dist/components/badge/index.js +2 -0
  25. package/dist/components/badge/index.js.map +1 -0
  26. package/dist/components/card/card.d.ts +11 -15
  27. package/dist/components/card/card.d.ts.map +1 -1
  28. package/dist/components/card/card.js +37 -59
  29. package/dist/components/card/card.js.map +1 -1
  30. package/dist/components/checkbox/checkbox.d.ts +153 -0
  31. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  32. package/dist/components/checkbox/checkbox.js +329 -0
  33. package/dist/components/checkbox/checkbox.js.map +1 -0
  34. package/dist/components/checkbox/checkbox.spec.d.ts +2 -0
  35. package/dist/components/checkbox/checkbox.spec.d.ts.map +1 -0
  36. package/dist/components/checkbox/checkbox.spec.js +346 -0
  37. package/dist/components/checkbox/checkbox.spec.js.map +1 -0
  38. package/dist/components/checkbox/index.d.ts +2 -0
  39. package/dist/components/checkbox/index.d.ts.map +1 -0
  40. package/dist/components/checkbox/index.js +2 -0
  41. package/dist/components/checkbox/index.js.map +1 -0
  42. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  43. package/dist/components/circular-progress/circular-progress.js +2 -1
  44. package/dist/components/circular-progress/circular-progress.js.map +1 -1
  45. package/dist/components/circular-progress/circular-progress.spec.js +2 -0
  46. package/dist/components/circular-progress/circular-progress.spec.js.map +1 -1
  47. package/dist/components/dock/dock.d.ts +115 -0
  48. package/dist/components/dock/dock.d.ts.map +1 -0
  49. package/dist/components/dock/dock.js +168 -0
  50. package/dist/components/dock/dock.js.map +1 -0
  51. package/dist/components/dock/dock.spec.d.ts +2 -0
  52. package/dist/components/dock/dock.spec.d.ts.map +1 -0
  53. package/dist/components/dock/dock.spec.js +178 -0
  54. package/dist/components/dock/dock.spec.js.map +1 -0
  55. package/dist/components/dock/index.d.ts +2 -0
  56. package/dist/components/dock/index.d.ts.map +1 -0
  57. package/dist/components/dock/index.js +2 -0
  58. package/dist/components/dock/index.js.map +1 -0
  59. package/dist/components/icon-button/icon-button.d.ts +18 -9
  60. package/dist/components/icon-button/icon-button.d.ts.map +1 -1
  61. package/dist/components/icon-button/icon-button.js +57 -101
  62. package/dist/components/icon-button/icon-button.js.map +1 -1
  63. package/dist/components/index.d.ts +10 -5
  64. package/dist/components/index.d.ts.map +1 -1
  65. package/dist/components/index.js +10 -5
  66. package/dist/components/index.js.map +1 -1
  67. package/dist/components/linear-progress/linear-progress.d.ts.map +1 -1
  68. package/dist/components/linear-progress/linear-progress.js +4 -4
  69. package/dist/components/linear-progress/linear-progress.js.map +1 -1
  70. package/dist/components/linear-progress/linear-progress.spec.js +2 -0
  71. package/dist/components/linear-progress/linear-progress.spec.js.map +1 -1
  72. package/dist/components/modal/index.d.ts +2 -0
  73. package/dist/components/modal/index.d.ts.map +1 -0
  74. package/dist/components/modal/index.js +2 -0
  75. package/dist/components/modal/index.js.map +1 -0
  76. package/dist/components/modal/modal.d.ts +193 -0
  77. package/dist/components/modal/modal.d.ts.map +1 -0
  78. package/dist/components/modal/modal.js +382 -0
  79. package/dist/components/modal/modal.js.map +1 -0
  80. package/dist/components/modal/modal.spec.d.ts +2 -0
  81. package/dist/components/modal/modal.spec.d.ts.map +1 -0
  82. package/dist/components/modal/modal.spec.js +360 -0
  83. package/dist/components/modal/modal.spec.js.map +1 -0
  84. package/dist/components/overlay/index.d.ts +2 -0
  85. package/dist/components/overlay/index.d.ts.map +1 -0
  86. package/dist/components/overlay/index.js +2 -0
  87. package/dist/components/overlay/index.js.map +1 -0
  88. package/dist/components/overlay/overlay.d.ts +75 -0
  89. package/dist/components/overlay/overlay.d.ts.map +1 -0
  90. package/dist/components/overlay/overlay.js +106 -0
  91. package/dist/components/overlay/overlay.js.map +1 -0
  92. package/dist/components/overlay/overlay.spec.d.ts +2 -0
  93. package/dist/components/overlay/overlay.spec.d.ts.map +1 -0
  94. package/dist/components/overlay/overlay.spec.js +135 -0
  95. package/dist/components/overlay/overlay.spec.js.map +1 -0
  96. package/dist/components/radial-progress/radial-progress.d.ts.map +1 -1
  97. package/dist/components/radial-progress/radial-progress.js +3 -2
  98. package/dist/components/radial-progress/radial-progress.js.map +1 -1
  99. package/dist/components/radio/index.d.ts +2 -0
  100. package/dist/components/radio/index.d.ts.map +1 -0
  101. package/dist/components/radio/index.js +2 -0
  102. package/dist/components/radio/index.js.map +1 -0
  103. package/dist/components/radio/radio.d.ts +157 -0
  104. package/dist/components/radio/radio.d.ts.map +1 -0
  105. package/dist/components/radio/radio.js +312 -0
  106. package/dist/components/radio/radio.js.map +1 -0
  107. package/dist/components/radio/radio.spec.d.ts +2 -0
  108. package/dist/components/radio/radio.spec.d.ts.map +1 -0
  109. package/dist/components/radio/radio.spec.js +353 -0
  110. package/dist/components/radio/radio.spec.js.map +1 -0
  111. package/dist/components/radio-group/index.d.ts +2 -0
  112. package/dist/components/radio-group/index.d.ts.map +1 -0
  113. package/dist/components/radio-group/index.js +2 -0
  114. package/dist/components/radio-group/index.js.map +1 -0
  115. package/dist/components/radio-group/radio-group.d.ts +122 -0
  116. package/dist/components/radio-group/radio-group.d.ts.map +1 -0
  117. package/dist/components/radio-group/radio-group.js +165 -0
  118. package/dist/components/radio-group/radio-group.js.map +1 -0
  119. package/dist/components/radio-group/radio-group.spec.d.ts +2 -0
  120. package/dist/components/radio-group/radio-group.spec.d.ts.map +1 -0
  121. package/dist/components/radio-group/radio-group.spec.js +205 -0
  122. package/dist/components/radio-group/radio-group.spec.js.map +1 -0
  123. package/dist/components/stack/index.d.ts +2 -0
  124. package/dist/components/stack/index.d.ts.map +1 -0
  125. package/dist/components/stack/index.js +2 -0
  126. package/dist/components/stack/index.js.map +1 -0
  127. package/dist/components/stack/stack.d.ts +118 -0
  128. package/dist/components/stack/stack.d.ts.map +1 -0
  129. package/dist/components/stack/stack.js +137 -0
  130. package/dist/components/stack/stack.js.map +1 -0
  131. package/dist/components/stack/stack.spec.d.ts +2 -0
  132. package/dist/components/stack/stack.spec.d.ts.map +1 -0
  133. package/dist/components/stack/stack.spec.js +116 -0
  134. package/dist/components/stack/stack.spec.js.map +1 -0
  135. package/dist/components/text/text.d.ts +21 -4
  136. package/dist/components/text/text.d.ts.map +1 -1
  137. package/dist/components/text/text.js +14 -14
  138. package/dist/components/text/text.js.map +1 -1
  139. package/dist/components/text-button/text-button.d.ts +77 -24
  140. package/dist/components/text-button/text-button.d.ts.map +1 -1
  141. package/dist/components/text-button/text-button.js +203 -104
  142. package/dist/components/text-button/text-button.js.map +1 -1
  143. package/dist/components/text-button/text-button.spec.js +97 -9
  144. package/dist/components/text-button/text-button.spec.js.map +1 -1
  145. package/dist/components/toggle/index.d.ts +2 -0
  146. package/dist/components/toggle/index.d.ts.map +1 -0
  147. package/dist/components/toggle/index.js +2 -0
  148. package/dist/components/toggle/index.js.map +1 -0
  149. package/dist/components/toggle/toggle.d.ts +149 -0
  150. package/dist/components/toggle/toggle.d.ts.map +1 -0
  151. package/dist/components/toggle/toggle.js +378 -0
  152. package/dist/components/toggle/toggle.js.map +1 -0
  153. package/dist/components/toggle/toggle.spec.d.ts +2 -0
  154. package/dist/components/toggle/toggle.spec.d.ts.map +1 -0
  155. package/dist/components/toggle/toggle.spec.js +353 -0
  156. package/dist/components/toggle/toggle.spec.js.map +1 -0
  157. package/dist/hudini.js +6523 -4980
  158. package/dist/hudini.min.js +1 -1
  159. package/dist/loaders/load-fonts.d.ts +29 -0
  160. package/dist/loaders/load-fonts.d.ts.map +1 -1
  161. package/dist/loaders/load-fonts.js +20 -1
  162. package/dist/loaders/load-fonts.js.map +1 -1
  163. package/dist/utils/button-style.d.ts +27 -0
  164. package/dist/utils/button-style.d.ts.map +1 -0
  165. package/dist/utils/button-style.js +37 -0
  166. package/dist/utils/button-style.js.map +1 -0
  167. package/dist/utils/index.d.ts +2 -0
  168. package/dist/utils/index.d.ts.map +1 -1
  169. package/dist/utils/index.js +2 -0
  170. package/dist/utils/index.js.map +1 -1
  171. package/dist/utils/number-to-rgb.d.ts +16 -0
  172. package/dist/utils/number-to-rgb.d.ts.map +1 -0
  173. package/dist/utils/number-to-rgb.js +20 -0
  174. package/dist/utils/number-to-rgb.js.map +1 -0
  175. package/package.json +2 -2
  176. package/dist/components/flat-icon-button/flat-icon-button.d.ts +0 -60
  177. package/dist/components/flat-icon-button/flat-icon-button.d.ts.map +0 -1
  178. package/dist/components/flat-icon-button/flat-icon-button.js +0 -279
  179. package/dist/components/flat-icon-button/flat-icon-button.js.map +0 -1
  180. package/dist/components/flat-icon-button/index.d.ts +0 -2
  181. package/dist/components/flat-icon-button/index.d.ts.map +0 -1
  182. package/dist/components/flat-icon-button/index.js +0 -2
  183. package/dist/components/flat-icon-button/index.js.map +0 -1
  184. package/dist/components/flat-section-header/flat-section-header.d.ts +0 -143
  185. package/dist/components/flat-section-header/flat-section-header.d.ts.map +0 -1
  186. package/dist/components/flat-section-header/flat-section-header.js +0 -275
  187. package/dist/components/flat-section-header/flat-section-header.js.map +0 -1
  188. package/dist/components/flat-section-header/flat-section-header.spec.d.ts +0 -2
  189. package/dist/components/flat-section-header/flat-section-header.spec.d.ts.map +0 -1
  190. package/dist/components/flat-section-header/flat-section-header.spec.js +0 -255
  191. package/dist/components/flat-section-header/flat-section-header.spec.js.map +0 -1
  192. package/dist/components/flat-section-header/index.d.ts +0 -2
  193. package/dist/components/flat-section-header/index.d.ts.map +0 -1
  194. package/dist/components/flat-section-header/index.js +0 -2
  195. package/dist/components/flat-section-header/index.js.map +0 -1
  196. package/dist/components/flat-text-button/flat-text-button.d.ts +0 -165
  197. package/dist/components/flat-text-button/flat-text-button.d.ts.map +0 -1
  198. package/dist/components/flat-text-button/flat-text-button.js +0 -325
  199. package/dist/components/flat-text-button/flat-text-button.js.map +0 -1
  200. package/dist/components/flat-text-button/flat-text-button.spec.d.ts +0 -2
  201. package/dist/components/flat-text-button/flat-text-button.spec.d.ts.map +0 -1
  202. package/dist/components/flat-text-button/flat-text-button.spec.js +0 -243
  203. package/dist/components/flat-text-button/flat-text-button.spec.js.map +0 -1
  204. package/dist/components/flat-text-button/index.d.ts +0 -2
  205. package/dist/components/flat-text-button/index.d.ts.map +0 -1
  206. package/dist/components/flat-text-button/index.js +0 -2
  207. package/dist/components/flat-text-button/index.js.map +0 -1
  208. package/dist/components/panel/index.d.ts +0 -2
  209. package/dist/components/panel/index.d.ts.map +0 -1
  210. package/dist/components/panel/index.js +0 -2
  211. package/dist/components/panel/index.js.map +0 -1
  212. package/dist/components/panel/panel.d.ts +0 -78
  213. package/dist/components/panel/panel.d.ts.map +0 -1
  214. package/dist/components/panel/panel.js +0 -192
  215. package/dist/components/panel/panel.js.map +0 -1
  216. package/dist/components/section-header/index.d.ts +0 -2
  217. package/dist/components/section-header/index.d.ts.map +0 -1
  218. package/dist/components/section-header/index.js +0 -2
  219. package/dist/components/section-header/index.js.map +0 -1
  220. package/dist/components/section-header/section-header.d.ts +0 -149
  221. package/dist/components/section-header/section-header.d.ts.map +0 -1
  222. package/dist/components/section-header/section-header.js +0 -292
  223. package/dist/components/section-header/section-header.js.map +0 -1
  224. package/dist/components/section-header/section-header.spec.d.ts +0 -2
  225. package/dist/components/section-header/section-header.spec.d.ts.map +0 -1
  226. package/dist/components/section-header/section-header.spec.js +0 -264
  227. package/dist/components/section-header/section-header.spec.js.map +0 -1
package/README.md CHANGED
@@ -293,35 +293,9 @@ Notes:
293
293
  - Hover scales the icon subtly, click animates press/release.
294
294
  - Colors and sizes integrate with `phaser-wind` theme tokens.
295
295
 
296
- ### FlatIconButton
297
-
298
- A flat-style icon button with customizable colors, opacity, and border radius.
299
-
300
- ```ts
301
- import { FlatIconButton } from 'hudini';
302
-
303
- const flatBtn = new FlatIconButton({
304
- scene: this,
305
- x: 200,
306
- y: 100,
307
- icon: 'solid/play',
308
- size: 'lg',
309
- backgroundColor: 'blue-600',
310
- iconColor: 'white',
311
- borderRadius: 'md',
312
- backgroundOpacity: 0.8,
313
- iconOpacity: 1,
314
- onClick: () => {
315
- // your click handler
316
- },
317
- });
318
-
319
- this.add.existing(flatBtn);
320
- ```
321
-
322
296
  ### Interactive API
323
297
 
324
- Both `IconButton` and `FlatIconButton` provide direct access to event methods for advanced event handling:
298
+ `IconButton` provides direct access to event methods for advanced event handling:
325
299
 
326
300
  ```ts
327
301
  const button = new IconButton({
@@ -0,0 +1,161 @@
1
+ import { IconText, type IconKey } from 'font-awesome-for-phaser';
2
+ import { GameObjects, Scene } from 'phaser';
3
+ import { type ColorKey, type FontKey, type FontSizeKey, type RadiusKey, type SpacingKey } from 'phaser-wind';
4
+ import { ContainerInteractive } from '../container-interactive';
5
+ import { Stack } from '../stack';
6
+ /**
7
+ * Semantic color intent for an Alert. Each variant defines a default fill
8
+ * color and (for the semantic ones) a default left icon — matching daisyUI's
9
+ * alert conventions.
10
+ */
11
+ export type AlertVariant = 'success' | 'error' | 'warning' | 'info' | 'neutral';
12
+ /** Parameters for creating an {@link Alert}. */
13
+ export type AlertParams = {
14
+ /** Phaser scene where the alert will be added. */
15
+ scene: Scene;
16
+ /** X position (center of the alert box). */
17
+ x: number;
18
+ /** Y position (center of the alert box). */
19
+ y: number;
20
+ /** Alert text. */
21
+ text: string;
22
+ /**
23
+ * Semantic variant. Drives the default `color` and default `leftIcon`.
24
+ * Defaults to `'info'`.
25
+ */
26
+ variant?: AlertVariant;
27
+ /**
28
+ * Background color. Overrides the variant's default. Accepts a palette
29
+ * family (`'blue'`), a full token (`'blue-500'`), a theme key, or a CSS
30
+ * string.
31
+ */
32
+ color?: ColorKey | string;
33
+ /** Text color. Defaults to `'white'`. */
34
+ textColor?: ColorKey | string;
35
+ /**
36
+ * Font Awesome icon shown to the LEFT of the text. When omitted, uses the
37
+ * variant's default (`circle-check` for success, `circle-xmark` for error,
38
+ * etc). Pass `null` to explicitly disable the default icon.
39
+ */
40
+ leftIcon?: IconKey | null;
41
+ /**
42
+ * Font Awesome icon shown to the RIGHT of the text. No default — omit for
43
+ * no right icon, or pass an icon key (commonly `'xmark'` for a "close"
44
+ * affordance).
45
+ */
46
+ rightIcon?: IconKey;
47
+ /**
48
+ * Font size in px (number) or a Phaser Wind font size token. Defaults to
49
+ * `'base'`.
50
+ */
51
+ fontSize?: FontSizeKey | number;
52
+ /** Font family. Defaults to `'Fredoka'`. */
53
+ font?: FontKey | string;
54
+ /**
55
+ * Border radius in px (number) or a Phaser Wind radius token. Defaults to
56
+ * `'md'`.
57
+ */
58
+ borderRadius?: RadiusKey | number;
59
+ /**
60
+ * Inner padding around the content in px (number) or a Phaser Wind spacing
61
+ * token. Defaults to `'4'`.
62
+ */
63
+ padding?: SpacingKey | number;
64
+ /**
65
+ * Gap between icons and text in pixels. Defaults to a value proportional
66
+ * to the font size.
67
+ */
68
+ iconGap?: number;
69
+ /**
70
+ * Optional click handler. When provided, the alert becomes interactive
71
+ * and the cursor turns into a pointer on hover. When omitted, the alert
72
+ * is a static banner.
73
+ */
74
+ onClick?: () => void;
75
+ };
76
+ /**
77
+ * Alert — a static (or optionally clickable) notification banner.
78
+ *
79
+ * Same visual language as a filled `TextButton` (colored fill + white
80
+ * outlined text + optional icons), but without hover/click tweens.
81
+ * Semantic variants (`success`/`error`/`warning`/`info`/`neutral`) come with
82
+ * sensible default colors and icons.
83
+ *
84
+ * Meant to be used inline (permanent banner, form error, achievement popup)
85
+ * or wrapped in a Toast for auto-dismiss behavior (separate component).
86
+ *
87
+ * @example
88
+ * new Alert({
89
+ * scene, x: 400, y: 100,
90
+ * variant: 'success',
91
+ * text: 'Player saved!',
92
+ * });
93
+ *
94
+ * @example
95
+ * // With a right icon acting as a "close" hint + a click handler
96
+ * new Alert({
97
+ * scene, x: 400, y: 100,
98
+ * variant: 'warning',
99
+ * text: 'Low health!',
100
+ * rightIcon: 'xmark',
101
+ * onClick: () => alert.destroy(),
102
+ * });
103
+ */
104
+ export declare class Alert extends ContainerInteractive<Phaser.GameObjects.Sprite> {
105
+ /** The background sprite of the alert. */
106
+ backgroundSprite: GameObjects.Sprite;
107
+ /** The text object. */
108
+ alertText: GameObjects.Text;
109
+ /** The horizontal Stack composing [leftIcon?, text, rightIcon?]. */
110
+ contentStack: Stack;
111
+ /** Left icon glyph, when set (either by variant default or explicit). */
112
+ leftIconText: IconText | undefined;
113
+ /** Right icon glyph, when explicitly set. */
114
+ rightIconText: IconText | undefined;
115
+ private pw;
116
+ private fontSizePx;
117
+ private paddingPx;
118
+ private borderRadiusPx;
119
+ private colorInput;
120
+ private colorAlert;
121
+ private textColorValue;
122
+ private fontFamily;
123
+ private textValue;
124
+ private variant;
125
+ private leftIconKey;
126
+ private rightIconKey;
127
+ private iconGap;
128
+ constructor({ scene, x, y, text, variant, color, textColor, leftIcon, rightIcon, fontSize, font, borderRadius, padding, iconGap, onClick, }: AlertParams);
129
+ /** Change the alert text. */
130
+ setText(text: string): this;
131
+ /** Change the background color (overrides the variant's default). */
132
+ setColor(color: ColorKey | string): this;
133
+ /** Change the text color. */
134
+ setTextColor(color: ColorKey | string): this;
135
+ /**
136
+ * Switch to another semantic variant. Applies the variant's default color
137
+ * and left icon unless the caller had previously overridden them (in which
138
+ * case the overrides stick — call `setColor` / `setLeftIcon` separately to
139
+ * clear them).
140
+ */
141
+ setVariant(variant: AlertVariant): this;
142
+ /** Set (or clear with `undefined`) the left icon. */
143
+ setLeftIcon(icon: IconKey | undefined): this;
144
+ /** Set (or clear with `undefined`) the right icon. */
145
+ setRightIcon(icon: IconKey | undefined): this;
146
+ /** Change the border radius. */
147
+ setBorderRadius(borderRadius: RadiusKey | number): this;
148
+ /** Change the inner padding. */
149
+ setPadding(padding: SpacingKey | number): this;
150
+ private createAlertContent;
151
+ private createIcon;
152
+ private rebuildContent;
153
+ private createBackgroundSprite;
154
+ private regenerateSprites;
155
+ private syncContainerSize;
156
+ private getAlertDimensions;
157
+ private createBackgroundTexture;
158
+ private setupContainer;
159
+ private setupClickHandler;
160
+ }
161
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,OAAO,GACP,SAAS,GACT,MAAM,GACN,SAAS,CAAC;AAEd,gDAAgD;AAChD,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ASrD,OAAO,CAAC,kBAAkB;IA8C1B,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,iBAAiB;CAI1B"}
@@ -0,0 +1,304 @@
1
+ /* eslint-disable max-lines-per-function */
2
+ /* eslint-disable complexity */
3
+ /* eslint-disable max-lines */
4
+ import { IconText } from 'font-awesome-for-phaser';
5
+ import { Color, } from 'phaser-wind';
6
+ import { BUTTON_STROKE_THICKNESS, getButtonStrokeColor, } from '../../utils/button-style';
7
+ import { getPWFromScene } from '../../utils/get-pw-from-scene';
8
+ import { ContainerInteractive } from '../container-interactive';
9
+ import { Stack } from '../stack';
10
+ import { Text } from '../text';
11
+ const VARIANT_CONFIGS = {
12
+ success: { color: 'green-500', leftIcon: 'circle-check' },
13
+ error: { color: 'red-500', leftIcon: 'circle-xmark' },
14
+ warning: { color: 'yellow-500', leftIcon: 'triangle-exclamation' },
15
+ info: { color: 'blue-500', leftIcon: 'circle-info' },
16
+ neutral: { color: 'slate-600', leftIcon: undefined },
17
+ };
18
+ /** See {@link TEXTURE_ANTIALIAS_MARGIN} in text-button. */
19
+ const TEXTURE_ANTIALIAS_MARGIN = 1;
20
+ const MIN_ICON_TEXT_GAP_PX = 4;
21
+ const ICON_TEXT_GAP_RATIO = 0.35;
22
+ /**
23
+ * Alert — a static (or optionally clickable) notification banner.
24
+ *
25
+ * Same visual language as a filled `TextButton` (colored fill + white
26
+ * outlined text + optional icons), but without hover/click tweens.
27
+ * Semantic variants (`success`/`error`/`warning`/`info`/`neutral`) come with
28
+ * sensible default colors and icons.
29
+ *
30
+ * Meant to be used inline (permanent banner, form error, achievement popup)
31
+ * or wrapped in a Toast for auto-dismiss behavior (separate component).
32
+ *
33
+ * @example
34
+ * new Alert({
35
+ * scene, x: 400, y: 100,
36
+ * variant: 'success',
37
+ * text: 'Player saved!',
38
+ * });
39
+ *
40
+ * @example
41
+ * // With a right icon acting as a "close" hint + a click handler
42
+ * new Alert({
43
+ * scene, x: 400, y: 100,
44
+ * variant: 'warning',
45
+ * text: 'Low health!',
46
+ * rightIcon: 'xmark',
47
+ * onClick: () => alert.destroy(),
48
+ * });
49
+ */
50
+ export class Alert extends ContainerInteractive {
51
+ /** The background sprite of the alert. */
52
+ backgroundSprite;
53
+ /** The text object. */
54
+ alertText;
55
+ /** The horizontal Stack composing [leftIcon?, text, rightIcon?]. */
56
+ contentStack;
57
+ /** Left icon glyph, when set (either by variant default or explicit). */
58
+ leftIconText;
59
+ /** Right icon glyph, when explicitly set. */
60
+ rightIconText;
61
+ pw;
62
+ fontSizePx;
63
+ paddingPx;
64
+ borderRadiusPx;
65
+ colorInput;
66
+ colorAlert;
67
+ textColorValue;
68
+ fontFamily;
69
+ textValue;
70
+ variant;
71
+ leftIconKey;
72
+ rightIconKey;
73
+ iconGap;
74
+ constructor({ scene, x, y, text, variant = 'info', color, textColor = 'white', leftIcon, rightIcon, fontSize = 'base', font, borderRadius = 'md', padding = '4', iconGap, onClick, }) {
75
+ super({ scene, x, y });
76
+ this.pw = getPWFromScene(scene);
77
+ // Resolve variant defaults.
78
+ const variantConfig = VARIANT_CONFIGS[variant];
79
+ const resolvedColor = color ?? variantConfig.color;
80
+ // `leftIcon === null` means "explicitly disable the default"; omitting
81
+ // it falls back to the variant's default; passing an IconKey overrides.
82
+ const resolvedLeftIcon = leftIcon === null
83
+ ? undefined
84
+ : leftIcon ?? variantConfig.leftIcon;
85
+ this.variant = variant;
86
+ this.textValue = text;
87
+ this.leftIconKey = resolvedLeftIcon;
88
+ this.rightIconKey = rightIcon;
89
+ this.iconGap = iconGap;
90
+ this.fontSizePx =
91
+ typeof fontSize === 'number'
92
+ ? fontSize
93
+ : this.pw.fontSize.px(fontSize ?? 'base');
94
+ this.paddingPx =
95
+ typeof padding === 'number'
96
+ ? padding
97
+ : this.pw.spacing.px(padding ?? '4');
98
+ this.borderRadiusPx =
99
+ typeof borderRadius === 'number'
100
+ ? borderRadius
101
+ : this.pw.radius.px(borderRadius ?? 'md');
102
+ this.colorInput = String(resolvedColor);
103
+ this.colorAlert = Color.rgb(resolvedColor);
104
+ this.textColorValue = Color.rgb(textColor);
105
+ this.fontFamily = font
106
+ ? typeof font === 'string'
107
+ ? font
108
+ : this.pw.font.family(font)
109
+ : 'Fredoka';
110
+ this.createAlertContent(scene);
111
+ this.createBackgroundSprite(scene);
112
+ this.setupContainer();
113
+ this.hitArea = this.backgroundSprite;
114
+ if (onClick) {
115
+ this.setupClickHandler(onClick);
116
+ }
117
+ this.syncContainerSize();
118
+ }
119
+ /** Change the alert text. */
120
+ setText(text) {
121
+ this.textValue = text;
122
+ this.alertText.setText(text);
123
+ this.contentStack.layout();
124
+ this.regenerateSprites();
125
+ return this;
126
+ }
127
+ /** Change the background color (overrides the variant's default). */
128
+ setColor(color) {
129
+ this.colorInput = String(color);
130
+ this.colorAlert = Color.rgb(color);
131
+ // Text stroke derives from colorInput — rebuild content.
132
+ this.rebuildContent();
133
+ this.regenerateSprites();
134
+ return this;
135
+ }
136
+ /** Change the text color. */
137
+ setTextColor(color) {
138
+ this.textColorValue = Color.rgb(color);
139
+ this.alertText.setColor(this.textColorValue);
140
+ this.leftIconText?.setColor(this.textColorValue);
141
+ this.rightIconText?.setColor(this.textColorValue);
142
+ return this;
143
+ }
144
+ /**
145
+ * Switch to another semantic variant. Applies the variant's default color
146
+ * and left icon unless the caller had previously overridden them (in which
147
+ * case the overrides stick — call `setColor` / `setLeftIcon` separately to
148
+ * clear them).
149
+ */
150
+ setVariant(variant) {
151
+ if (this.variant === variant)
152
+ return this;
153
+ this.variant = variant;
154
+ const cfg = VARIANT_CONFIGS[variant];
155
+ this.colorInput = String(cfg.color);
156
+ this.colorAlert = Color.rgb(cfg.color);
157
+ this.leftIconKey = cfg.leftIcon;
158
+ this.rebuildContent();
159
+ this.regenerateSprites();
160
+ return this;
161
+ }
162
+ /** Set (or clear with `undefined`) the left icon. */
163
+ setLeftIcon(icon) {
164
+ this.leftIconKey = icon;
165
+ this.rebuildContent();
166
+ this.regenerateSprites();
167
+ return this;
168
+ }
169
+ /** Set (or clear with `undefined`) the right icon. */
170
+ setRightIcon(icon) {
171
+ this.rightIconKey = icon;
172
+ this.rebuildContent();
173
+ this.regenerateSprites();
174
+ return this;
175
+ }
176
+ /** Change the border radius. */
177
+ setBorderRadius(borderRadius) {
178
+ this.borderRadiusPx =
179
+ typeof borderRadius === 'number'
180
+ ? borderRadius
181
+ : this.pw.radius.px(borderRadius ?? 'md');
182
+ this.regenerateSprites();
183
+ return this;
184
+ }
185
+ /** Change the inner padding. */
186
+ setPadding(padding) {
187
+ this.paddingPx =
188
+ typeof padding === 'number'
189
+ ? padding
190
+ : this.pw.spacing.px(padding ?? '4');
191
+ this.regenerateSprites();
192
+ return this;
193
+ }
194
+ createAlertContent(scene) {
195
+ const strokeThickness = BUTTON_STROKE_THICKNESS;
196
+ const strokeColor = getButtonStrokeColor(this.colorInput);
197
+ this.alertText = new Text({
198
+ scene,
199
+ x: 0,
200
+ y: 0,
201
+ text: this.textValue,
202
+ size: this.fontSizePx,
203
+ fontFamily: this.fontFamily,
204
+ strokeThickness,
205
+ strokeColor,
206
+ });
207
+ this.alertText.setColor(this.textColorValue);
208
+ this.alertText.setOrigin(0.5, 0.5);
209
+ this.leftIconText = this.leftIconKey
210
+ ? this.createIcon(scene, this.leftIconKey, strokeColor, strokeThickness)
211
+ : undefined;
212
+ this.rightIconText = this.rightIconKey
213
+ ? this.createIcon(scene, this.rightIconKey, strokeColor, strokeThickness)
214
+ : undefined;
215
+ const children = [];
216
+ if (this.leftIconText)
217
+ children.push(this.leftIconText);
218
+ children.push(this.alertText);
219
+ if (this.rightIconText)
220
+ children.push(this.rightIconText);
221
+ const gap = this.iconGap ??
222
+ Math.max(MIN_ICON_TEXT_GAP_PX, Math.round(this.fontSizePx * ICON_TEXT_GAP_RATIO));
223
+ this.contentStack = new Stack({
224
+ scene,
225
+ x: 0,
226
+ y: 0,
227
+ direction: 'row',
228
+ align: 'center',
229
+ gap,
230
+ children,
231
+ });
232
+ }
233
+ createIcon(scene, icon, strokeColor, strokeThickness) {
234
+ const iconText = new IconText({
235
+ scene,
236
+ x: 0,
237
+ y: 0,
238
+ icon,
239
+ size: this.fontSizePx,
240
+ style: {
241
+ color: this.textColorValue,
242
+ strokeThickness,
243
+ stroke: strokeColor,
244
+ },
245
+ });
246
+ iconText.setFontStyle('900');
247
+ iconText.setOrigin(0.5, 0.5);
248
+ scene.add.existing(iconText);
249
+ return iconText;
250
+ }
251
+ rebuildContent() {
252
+ this.remove(this.contentStack, true);
253
+ this.createAlertContent(this.scene);
254
+ this.add(this.contentStack);
255
+ }
256
+ createBackgroundSprite(scene) {
257
+ const backgroundTexture = this.createBackgroundTexture(scene);
258
+ this.backgroundSprite = scene.add.sprite(0, 0, backgroundTexture);
259
+ this.backgroundSprite.setOrigin(0.5, 0.5);
260
+ }
261
+ regenerateSprites() {
262
+ this.alertText.setText(this.textValue);
263
+ this.contentStack.layout();
264
+ const backgroundTexture = this.createBackgroundTexture(this.scene);
265
+ this.backgroundSprite.setTexture(backgroundTexture);
266
+ this.syncContainerSize();
267
+ }
268
+ syncContainerSize() {
269
+ const { width, height } = this.getAlertDimensions();
270
+ this.setSize(width, height);
271
+ }
272
+ getAlertDimensions() {
273
+ const contentWidth = this.contentStack.width;
274
+ const contentHeight = this.contentStack.height;
275
+ return {
276
+ width: contentWidth + this.paddingPx * 2,
277
+ height: contentHeight + this.paddingPx * 2,
278
+ };
279
+ }
280
+ createBackgroundTexture(scene) {
281
+ const { width, height } = this.getAlertDimensions();
282
+ const textureKey = `alert_bg_${this.colorAlert}_${this.borderRadiusPx}_${width}_${height}`;
283
+ const padding = TEXTURE_ANTIALIAS_MARGIN;
284
+ const textureWidth = width + padding * 2;
285
+ const textureHeight = height + padding * 2;
286
+ const graphics = scene.add.graphics();
287
+ const maxRadius = Math.floor(Math.min(width / 2, height / 2));
288
+ const effectiveRadius = Math.min(this.borderRadiusPx, maxRadius);
289
+ const finalRadius = Math.max(0, effectiveRadius);
290
+ graphics.fillStyle(Color.hex(this.colorAlert), 1);
291
+ graphics.fillRoundedRect(padding, padding, width, height, finalRadius);
292
+ graphics.generateTexture(textureKey, textureWidth, textureHeight);
293
+ graphics.destroy();
294
+ return textureKey;
295
+ }
296
+ setupContainer() {
297
+ this.add([this.backgroundSprite, this.contentStack]);
298
+ }
299
+ setupClickHandler(onClick) {
300
+ this.backgroundSprite.setInteractive({ useHandCursor: true });
301
+ this.backgroundSprite.on('pointerdown', onClick);
302
+ }
303
+ }
304
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/components/alert/alert.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,+BAA+B;AAC/B,8BAA8B;AAC9B,OAAO,EAAE,QAAQ,EAAgB,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACL,KAAK,GAON,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAoF/B,MAAM,eAAe,GAAwC;IAC3D,OAAO,EAAE,EAAE,KAAK,EAAE,WAAuB,EAAE,QAAQ,EAAE,cAAc,EAAE;IACrE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAqB,EAAE,QAAQ,EAAE,cAAc,EAAE;IACjE,OAAO,EAAE,EAAE,KAAK,EAAE,YAAwB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