hudini 0.18.1 → 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 (110) hide show
  1. package/README.md +58 -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 +2375 -3881
  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/scene/index.d.ts +1 -0
  43. package/dist/scene/index.d.ts.map +1 -1
  44. package/dist/scene/index.js +1 -0
  45. package/dist/scene/index.js.map +1 -1
  46. package/dist/scene/scene-with-hudini.d.ts +24 -1
  47. package/dist/scene/scene-with-hudini.d.ts.map +1 -1
  48. package/dist/scene/scene-with-hudini.js +24 -1
  49. package/dist/scene/scene-with-hudini.js.map +1 -1
  50. package/dist/scene/with-hudini.d.ts +35 -0
  51. package/dist/scene/with-hudini.d.ts.map +1 -0
  52. package/dist/scene/with-hudini.js +33 -0
  53. package/dist/scene/with-hudini.js.map +1 -0
  54. package/dist/utils/button-style.d.ts +16 -0
  55. package/dist/utils/button-style.d.ts.map +1 -0
  56. package/dist/utils/button-style.js +35 -0
  57. package/dist/utils/button-style.js.map +1 -0
  58. package/dist/utils/index.d.ts +2 -0
  59. package/dist/utils/index.d.ts.map +1 -1
  60. package/dist/utils/index.js +2 -0
  61. package/dist/utils/index.js.map +1 -1
  62. package/dist/utils/number-to-rgb.d.ts +16 -0
  63. package/dist/utils/number-to-rgb.d.ts.map +1 -0
  64. package/dist/utils/number-to-rgb.js +20 -0
  65. package/dist/utils/number-to-rgb.js.map +1 -0
  66. package/package.json +2 -2
  67. package/dist/components/flat-icon-button/flat-icon-button.d.ts +0 -60
  68. package/dist/components/flat-icon-button/flat-icon-button.d.ts.map +0 -1
  69. package/dist/components/flat-icon-button/flat-icon-button.js +0 -279
  70. package/dist/components/flat-icon-button/flat-icon-button.js.map +0 -1
  71. package/dist/components/flat-icon-button/index.d.ts +0 -2
  72. package/dist/components/flat-icon-button/index.d.ts.map +0 -1
  73. package/dist/components/flat-icon-button/index.js +0 -2
  74. package/dist/components/flat-icon-button/index.js.map +0 -1
  75. package/dist/components/flat-section-header/flat-section-header.d.ts +0 -143
  76. package/dist/components/flat-section-header/flat-section-header.d.ts.map +0 -1
  77. package/dist/components/flat-section-header/flat-section-header.js +0 -275
  78. package/dist/components/flat-section-header/flat-section-header.js.map +0 -1
  79. package/dist/components/flat-section-header/flat-section-header.spec.d.ts +0 -2
  80. package/dist/components/flat-section-header/flat-section-header.spec.d.ts.map +0 -1
  81. package/dist/components/flat-section-header/flat-section-header.spec.js +0 -255
  82. package/dist/components/flat-section-header/flat-section-header.spec.js.map +0 -1
  83. package/dist/components/flat-section-header/index.d.ts +0 -2
  84. package/dist/components/flat-section-header/index.d.ts.map +0 -1
  85. package/dist/components/flat-section-header/index.js +0 -2
  86. package/dist/components/flat-section-header/index.js.map +0 -1
  87. package/dist/components/flat-text-button/flat-text-button.d.ts +0 -165
  88. package/dist/components/flat-text-button/flat-text-button.d.ts.map +0 -1
  89. package/dist/components/flat-text-button/flat-text-button.js +0 -325
  90. package/dist/components/flat-text-button/flat-text-button.js.map +0 -1
  91. package/dist/components/flat-text-button/flat-text-button.spec.d.ts +0 -2
  92. package/dist/components/flat-text-button/flat-text-button.spec.d.ts.map +0 -1
  93. package/dist/components/flat-text-button/flat-text-button.spec.js +0 -243
  94. package/dist/components/flat-text-button/flat-text-button.spec.js.map +0 -1
  95. package/dist/components/flat-text-button/index.d.ts +0 -2
  96. package/dist/components/flat-text-button/index.d.ts.map +0 -1
  97. package/dist/components/flat-text-button/index.js +0 -2
  98. package/dist/components/flat-text-button/index.js.map +0 -1
  99. package/dist/components/section-header/index.d.ts +0 -2
  100. package/dist/components/section-header/index.d.ts.map +0 -1
  101. package/dist/components/section-header/index.js +0 -2
  102. package/dist/components/section-header/index.js.map +0 -1
  103. package/dist/components/section-header/section-header.d.ts +0 -149
  104. package/dist/components/section-header/section-header.d.ts.map +0 -1
  105. package/dist/components/section-header/section-header.js +0 -292
  106. package/dist/components/section-header/section-header.js.map +0 -1
  107. package/dist/components/section-header/section-header.spec.d.ts +0 -2
  108. package/dist/components/section-header/section-header.spec.d.ts.map +0 -1
  109. package/dist/components/section-header/section-header.spec.js +0 -264
  110. package/dist/components/section-header/section-header.spec.js.map +0 -1
@@ -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,kBAAkB,GAAG,IAAI,CAAC;AAEhC,mBAAmB;AACnB,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,kCAAkC,GAAG,CAAC,CAAC;AAC7C,MAAM,+BAA+B,GAAG,kCAAkC,GAAG,CAAC,CAAC,CAAC,iBAAiB;AACjG,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,iBAA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,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"}
@@ -1,143 +0,0 @@
1
- import { GameObjects, Scene } from 'phaser';
2
- import { type ColorKey, type FontKey, type FontSizeKey, type RadiusKey, type SpacingKey } from 'phaser-wind';
3
- export type FlatSectionHeaderParams = {
4
- /** The Phaser scene to add the header to */
5
- scene: Scene;
6
- /** X position of the header */
7
- x: number;
8
- /** Y position of the header */
9
- y: number;
10
- /** Text content of the header */
11
- text: string;
12
- /** Font size in px (number) or a Phaser Wind font size token (string). Defaults to 'lg'. */
13
- fontSize?: FontSizeKey | number;
14
- /** Font family. Defaults to 'display'. */
15
- font?: FontKey | string;
16
- /** Background color. Defaults to 'blue-600'. */
17
- backgroundColor?: ColorKey | string;
18
- /** Text color. Defaults to 'white'. */
19
- textColor?: ColorKey | string;
20
- /** Border radius in px (number) or a Phaser Wind radius token (string). Defaults to 'md'. */
21
- borderRadius?: RadiusKey | number;
22
- /** Margin/padding in px (number) or a Phaser Wind spacing token (string). Defaults to '4'. */
23
- margin?: SpacingKey | number;
24
- };
25
- /**
26
- * A flat section header component without gradient overlays, with text stroke and auto-sizing
27
- */
28
- export declare class FlatSectionHeader extends GameObjects.Container {
29
- /** The white border sprite of the header */
30
- whiteBorderSprite: GameObjects.Sprite;
31
- /** The background sprite of the header */
32
- backgroundSprite: GameObjects.Sprite;
33
- /** The text object of the header */
34
- headerText: GameObjects.Text;
35
- /** Reference to the PhaserWind plugin */
36
- private pw;
37
- /** Font size in pixels */
38
- private fontSizePx;
39
- /** Margin size in pixels */
40
- private marginPx;
41
- /** Border radius in pixels */
42
- private borderRadiusPx;
43
- /** Background color value */
44
- private colorButton;
45
- /** Text color value */
46
- private textColorValue;
47
- /** Font family value */
48
- private fontFamily;
49
- /** Text content value */
50
- private textValue;
51
- /**
52
- * Creates a new FlatSectionHeader
53
- * @param params Configuration parameters for the header
54
- */
55
- constructor({ scene, x, y, text, fontSize, font, backgroundColor, textColor, borderRadius, margin, }: FlatSectionHeaderParams);
56
- /**
57
- * Sets the text content of the header
58
- * @param text New text content
59
- * @returns this for chaining
60
- */
61
- setText(text: string): this;
62
- /**
63
- * Sets the font size of the header text
64
- * @param fontSize New font size (number in px or FontSizeKey)
65
- * @returns this for chaining
66
- */
67
- setFontSize(fontSize: FontSizeKey | number): this;
68
- /**
69
- * Sets the font family of the header text
70
- * @param font New font family (FontKey or string)
71
- * @returns this for chaining
72
- */
73
- setFont(font: FontKey | string): this;
74
- /**
75
- * Sets the background color of the header
76
- * @param color New background color (ColorKey or string)
77
- * @returns this for chaining
78
- */
79
- setBackgroundColor(color: ColorKey | string): this;
80
- /**
81
- * Sets the text color of the header
82
- * @param color New text color (ColorKey or string)
83
- * @returns this for chaining
84
- */
85
- setTextColor(color: ColorKey | string): this;
86
- /**
87
- * Sets the border radius of the header
88
- * @param borderRadius New border radius (number in px or RadiusKey)
89
- * @returns this for chaining
90
- */
91
- setBorderRadius(borderRadius: RadiusKey | number): this;
92
- /**
93
- * Sets the margin/padding of the header
94
- * @param margin New margin size (number in px or SpacingKey)
95
- * @returns this for chaining
96
- */
97
- setMargin(margin: SpacingKey | number): this;
98
- /**
99
- * Creates the header text game object
100
- * @param scene The scene to add the text to
101
- */
102
- private createHeaderText;
103
- /**
104
- * Creates the white border sprite for the header
105
- * @param scene The scene to add the sprite to
106
- */
107
- private createWhiteBorderSprite;
108
- /**
109
- * Creates the background sprite for the header
110
- * @param scene The scene to add the sprite to
111
- */
112
- private createBackgroundSprite;
113
- /**
114
- * Regenerates all graphics after a property change
115
- */
116
- private regenerateGraphics;
117
- /**
118
- * Creates a texture for the header's white border.
119
- * @param scene Phaser scene.
120
- * @returns The texture key.
121
- */
122
- private createWhiteBorderTexture;
123
- /**
124
- * Creates a texture for the header's background.
125
- * @param scene Phaser scene.
126
- * @returns The texture key.
127
- */
128
- private createBackgroundTexture;
129
- /**
130
- * Gets the dimensions of the header based on text content
131
- * @returns Object containing width and height
132
- */
133
- private getHeaderDimensions;
134
- /**
135
- * Sets up the container with all sprites in the correct order
136
- */
137
- private setupContainer;
138
- /**
139
- * Sets up interactivity for the header
140
- */
141
- private setupInteractivity;
142
- }
143
- //# sourceMappingURL=flat-section-header.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-section-header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