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,325 +0,0 @@
1
- import { Color, } from 'phaser-wind';
2
- import { getPWFromScene } from '../../utils/get-pw-from-scene';
3
- import { ContainerInteractive } from '../container-interactive';
4
- import { Text } from '../text';
5
- const durations = {
6
- click: 60,
7
- hover: 100,
8
- };
9
- const HOVER_SCALE = 1.05;
10
- const POINTER_DOWN_SCALE = 0.95;
11
- // Border constants
12
- const BLACK_BORDER_THICKNESS = 2;
13
- const WHITE_BORDER_EXTRA_PIXELS_PER_SIDE = 3;
14
- const WHITE_BORDER_TOTAL_EXTRA_PIXELS = WHITE_BORDER_EXTRA_PIXELS_PER_SIDE * 2; // 6 pixels total
15
- const WHITE_BORDER_RADIUS_EXTRA = 2;
16
- /**
17
- * A customizable flat text button component for Phaser, supporting auto-sizing,
18
- * design tokens, and interactive effects.
19
- */
20
- export class FlatTextButton extends ContainerInteractive {
21
- /** The background sprite of the button. */
22
- backgroundSprite;
23
- /** The white border sprite of the button. */
24
- whiteBorderSprite;
25
- /** The text object of the button. */
26
- buttonText;
27
- pw;
28
- fontSizePx;
29
- paddingPx;
30
- borderRadiusPx;
31
- colorButton;
32
- textColorValue;
33
- fontFamily;
34
- textValue;
35
- /**
36
- * Creates a new FlatTextButton instance.
37
- * @param params FlatTextButtonParams
38
- */
39
- constructor({ scene, x, y, text, fontSize = 'lg', font, color = 'blue-500', textColor = 'white', borderRadius = 'md', padding = '4', onClick, }) {
40
- super({ scene, x, y });
41
- this.pw = getPWFromScene(scene);
42
- // Store values
43
- this.textValue = text;
44
- this.fontSizePx =
45
- typeof fontSize === 'number'
46
- ? fontSize
47
- : this.pw.fontSize.px(fontSize ?? 'md');
48
- this.paddingPx =
49
- typeof padding === 'number'
50
- ? padding
51
- : this.pw.spacing.px(padding ?? '4');
52
- this.borderRadiusPx =
53
- typeof borderRadius === 'number'
54
- ? borderRadius
55
- : this.pw.radius.px(borderRadius ?? 'md');
56
- this.colorButton = Color.rgb(color);
57
- this.textColorValue = Color.rgb(textColor);
58
- this.fontFamily = font ? (typeof font === 'string' ? font : this.pw.font.family(font)) : 'Bebas Neue';
59
- this.createButtonText(scene);
60
- this.createWhiteBorderSprite(scene);
61
- this.createBackgroundSprite(scene);
62
- this.setupContainer();
63
- this.setupInteractivity(onClick);
64
- this.hitArea = this.backgroundSprite;
65
- }
66
- // API Methods
67
- /**
68
- * Sets the button text.
69
- * @param text The new text.
70
- * @returns This FlatTextButton instance.
71
- */
72
- setText(text) {
73
- this.textValue = text;
74
- this.buttonText.setText(text);
75
- this.regenerateSprites();
76
- return this;
77
- }
78
- /**
79
- * Sets the font size.
80
- * @param fontSize Font size in px or token.
81
- * @returns This FlatTextButton instance.
82
- */
83
- setFontSize(fontSize) {
84
- this.fontSizePx =
85
- typeof fontSize === 'number'
86
- ? fontSize
87
- : this.pw.fontSize.px(fontSize ?? 'md');
88
- this.buttonText.setFontSize(this.fontSizePx);
89
- this.regenerateSprites();
90
- return this;
91
- }
92
- /**
93
- * Sets the font family.
94
- * @param font Font family as string or token.
95
- * @returns This FlatTextButton instance.
96
- */
97
- setFont(font) {
98
- this.fontFamily =
99
- typeof font === 'string'
100
- ? font
101
- : this.pw.font.family(font ?? 'primary');
102
- this.buttonText.setFontFamily(this.fontFamily);
103
- this.regenerateSprites();
104
- return this;
105
- }
106
- /**
107
- * Sets the background color.
108
- * @param color Color as token or CSS string.
109
- * @returns This FlatTextButton instance.
110
- */
111
- setColor(color) {
112
- this.colorButton = Color.rgb(color);
113
- this.regenerateSprites();
114
- return this;
115
- }
116
- /**
117
- * Sets the text color.
118
- * @param color Color as token or CSS string.
119
- * @returns This FlatTextButton instance.
120
- */
121
- setTextColor(color) {
122
- this.textColorValue = Color.rgb(color);
123
- this.buttonText.setColor(this.textColorValue);
124
- return this;
125
- }
126
- /**
127
- * Sets the border radius.
128
- * @param borderRadius Border radius in px or token.
129
- * @returns This FlatTextButton instance.
130
- */
131
- setBorderRadius(borderRadius) {
132
- this.borderRadiusPx =
133
- typeof borderRadius === 'number'
134
- ? borderRadius
135
- : this.pw.radius.px(borderRadius ?? 'md');
136
- this.regenerateSprites();
137
- return this;
138
- }
139
- /**
140
- * Sets the padding.
141
- * @param padding Padding in px or token.
142
- * @returns This FlatTextButton instance.
143
- */
144
- setPadding(padding) {
145
- this.paddingPx =
146
- typeof padding === 'number'
147
- ? padding
148
- : this.pw.spacing.px(padding ?? '4');
149
- this.regenerateSprites();
150
- return this;
151
- }
152
- /**
153
- * Creates the button text GameObject.
154
- * @param scene Phaser scene.
155
- */
156
- createButtonText(scene) {
157
- this.buttonText = new Text({
158
- scene,
159
- x: 0,
160
- y: 0,
161
- text: this.textValue,
162
- size: this.fontSizePx,
163
- fontFamily: this.fontFamily,
164
- });
165
- this.buttonText.setOrigin(0.5, 0.5);
166
- }
167
- /**
168
- * Creates the white border sprite for the button.
169
- * @param scene Phaser scene.
170
- */
171
- createWhiteBorderSprite(scene) {
172
- const whiteBorderTexture = this.createWhiteBorderTexture(scene);
173
- this.whiteBorderSprite = scene.add.sprite(0, 0, whiteBorderTexture);
174
- this.whiteBorderSprite.setOrigin(0.5, 0.5);
175
- }
176
- /**
177
- * Creates the background sprite for the button.
178
- * @param scene Phaser scene.
179
- */
180
- createBackgroundSprite(scene) {
181
- const backgroundTexture = this.createBackgroundTexture(scene);
182
- this.backgroundSprite = scene.add.sprite(0, 0, backgroundTexture);
183
- this.backgroundSprite.setOrigin(0.5, 0.5);
184
- }
185
- /**
186
- * Regenerates the background texture based on current state.
187
- */
188
- regenerateSprites() {
189
- // Update text bounds after text/font changes
190
- this.buttonText.setText(this.textValue);
191
- // Regenerate textures
192
- const whiteBorderTexture = this.createWhiteBorderTexture(this.scene);
193
- const backgroundTexture = this.createBackgroundTexture(this.scene);
194
- this.whiteBorderSprite.setTexture(whiteBorderTexture);
195
- this.backgroundSprite.setTexture(backgroundTexture);
196
- }
197
- /**
198
- * Calculates the button's width and height based on text and padding.
199
- * @returns Object with width and height.
200
- */
201
- getButtonDimensions() {
202
- const textBounds = this.buttonText.getBounds();
203
- const width = textBounds.width + this.paddingPx * 2;
204
- const height = textBounds.height + this.paddingPx * 2;
205
- return { width, height };
206
- }
207
- /**
208
- * Creates a texture for the button's white border.
209
- * @param scene Phaser scene.
210
- * @returns The texture key.
211
- */
212
- createWhiteBorderTexture(scene) {
213
- const { width, height } = this.getButtonDimensions();
214
- const textureKey = `flatTextButton_whiteBorder_${this.borderRadiusPx}_${width}_${height}`;
215
- // White border is larger on each side
216
- const borderWidth = width + WHITE_BORDER_TOTAL_EXTRA_PIXELS;
217
- const borderHeight = height + WHITE_BORDER_TOTAL_EXTRA_PIXELS;
218
- // Add some padding for texture
219
- const padding = 8;
220
- const textureWidth = borderWidth + padding * 2;
221
- const textureHeight = borderHeight + padding * 2;
222
- const graphics = scene.add.graphics();
223
- const maxRadius = Math.floor(Math.min(borderWidth / 2, borderHeight / 2));
224
- const effectiveRadius = Math.min(this.borderRadiusPx + WHITE_BORDER_RADIUS_EXTRA, maxRadius);
225
- const finalRadius = Math.max(0, effectiveRadius);
226
- // White border (outer)
227
- graphics.fillStyle(Color.hex('white'), 1);
228
- graphics.fillRoundedRect(padding, padding, borderWidth, borderHeight, finalRadius);
229
- graphics.generateTexture(textureKey, textureWidth, textureHeight);
230
- graphics.destroy();
231
- return textureKey;
232
- }
233
- /**
234
- * Creates a texture for the button's background.
235
- * @param scene Phaser scene.
236
- * @returns The texture key.
237
- */
238
- createBackgroundTexture(scene) {
239
- const { width, height } = this.getButtonDimensions();
240
- const textureKey = `flatTextButton_bg_${this.colorButton}_${this.borderRadiusPx}_${width}_${height}`;
241
- // Add some padding for texture
242
- const padding = 8;
243
- const textureWidth = width + padding * 2;
244
- const textureHeight = height + padding * 2;
245
- const graphics = scene.add.graphics();
246
- const maxRadius = Math.floor(Math.min(width / 2, height / 2));
247
- const effectiveRadius = Math.min(this.borderRadiusPx, maxRadius);
248
- const finalRadius = Math.max(0, effectiveRadius);
249
- // Main background (flat, no gradient overlays)
250
- graphics.fillStyle(Color.hex(this.colorButton), 1);
251
- graphics.fillRoundedRect(padding, padding, width, height, finalRadius);
252
- // Black stroke border
253
- graphics.lineStyle(BLACK_BORDER_THICKNESS, Color.hex('black'), 1);
254
- graphics.strokeRoundedRect(padding, padding, width, height, finalRadius);
255
- graphics.generateTexture(textureKey, textureWidth, textureHeight);
256
- graphics.destroy();
257
- return textureKey;
258
- }
259
- /**
260
- * Adds the button's visual elements to the container.
261
- */
262
- setupContainer() {
263
- this.add([this.whiteBorderSprite, this.backgroundSprite, this.buttonText]);
264
- }
265
- /**
266
- * Sets up interactivity for the button, including hover and click effects.
267
- * @param onClick Optional click callback.
268
- */
269
- setupInteractivity(onClick) {
270
- this.backgroundSprite.setInteractive({ useHandCursor: true });
271
- // Hover effects
272
- this.backgroundSprite.on('pointerover', () => {
273
- this.scene.tweens.add({
274
- targets: this,
275
- duration: durations.hover,
276
- scaleX: HOVER_SCALE,
277
- scaleY: HOVER_SCALE,
278
- ease: 'Back.easeOut',
279
- });
280
- });
281
- this.backgroundSprite.on('pointerout', () => {
282
- this.scene.tweens.add({
283
- targets: this,
284
- duration: durations.hover,
285
- scaleX: 1,
286
- scaleY: 1,
287
- ease: 'Back.easeOut',
288
- });
289
- });
290
- // Click effects
291
- this.backgroundSprite.on('pointerdown', () => {
292
- this.scene.tweens.add({
293
- targets: [this.whiteBorderSprite, this.backgroundSprite, this.buttonText],
294
- scaleX: POINTER_DOWN_SCALE,
295
- scaleY: POINTER_DOWN_SCALE,
296
- duration: durations.click,
297
- ease: 'Linear',
298
- });
299
- });
300
- this.backgroundSprite.on('pointerup', () => {
301
- this.scene.tweens.add({
302
- targets: [this.whiteBorderSprite, this.backgroundSprite, this.buttonText],
303
- scaleX: 1,
304
- scaleY: 1,
305
- duration: durations.click,
306
- ease: 'Linear',
307
- });
308
- onClick?.();
309
- });
310
- }
311
- /**
312
- * Gets the interactive sprite of the icon button
313
- * @returns The interactive sprite
314
- */
315
- get interactive() {
316
- const { on, off, setInteractive, once } = this.backgroundSprite;
317
- return {
318
- on: on.bind(this.backgroundSprite),
319
- off: off.bind(this.backgroundSprite),
320
- setInteractive: setInteractive.bind(this.backgroundSprite),
321
- once: once.bind(this.backgroundSprite),
322
- };
323
- }
324
- }
325
- //# sourceMappingURL=flat-text-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-text-button.js","sourceRoot":"","sources":["../../../src/components/flat-text-button/flat-text-button.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KA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,iBAAiB,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,UAAU,CAAC;gBACzE,MAAM,EAAE,kBAAkB;gBAC1B,MAAM,EAAE,kBAAkB;gBAC1B,QAAQ,EAAE,SAAS,CAAC,KAAK;gBACzB,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;YACzC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;gBACpB,OAAO,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,UAAU,CAAC;gBACzE,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;gBACT,QAAQ,EAAE,SAAS,CAAC,KAAK;gBACzB,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;YACH,OAAO,EAAE,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAGD;;;OAGG;IACH,IAAW,WAAW;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;CACF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=flat-text-button.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-text-button.spec.d.ts","sourceRoot":"","sources":["../../../src/components/flat-text-button/flat-text-button.spec.ts"],"names":[],"mappings":""}
@@ -1,243 +0,0 @@
1
- /* eslint-disable sonarjs/no-duplicate-string */
2
- /* eslint-disable max-lines-per-function */
3
- /* eslint-disable no-magic-numbers */
4
- import { Scene } from 'phaser';
5
- import { describe, expect, it, vi } from 'vitest';
6
- // Mock phaser-wind
7
- vi.mock('phaser-wind', () => ({
8
- Color: {
9
- rgb: vi.fn((color) => `rgb-${color}`),
10
- hex: vi.fn((color) => `hex-${color}`),
11
- },
12
- }));
13
- // Mock the getPWFromScene utility
14
- vi.mock('../../utils/get-pw-from-scene', () => ({
15
- getPWFromScene: vi.fn(() => ({
16
- fontSize: {
17
- px: vi.fn((size) => {
18
- const sizes = { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 };
19
- return sizes[size] || 16;
20
- }),
21
- },
22
- spacing: {
23
- px: vi.fn((spacing) => {
24
- const spacings = { xs: 4, sm: 8, md: 12, lg: 16, xl: 20 };
25
- return spacings[spacing] || 12;
26
- }),
27
- },
28
- radius: {
29
- px: vi.fn((radius) => {
30
- const radiuses = { none: 0, sm: 4, md: 8, lg: 12, xl: 16, full: 9999 };
31
- return radiuses[radius] || 8;
32
- }),
33
- },
34
- font: {
35
- family: vi.fn((font) => {
36
- const fonts = {
37
- sans: 'Arial, sans-serif',
38
- serif: 'Georgia, serif',
39
- mono: 'Courier, monospace',
40
- };
41
- return fonts[font] || 'Arial, sans-serif';
42
- }),
43
- },
44
- })),
45
- }));
46
- // Mock the Text component
47
- vi.mock('../text', () => {
48
- class MockText {
49
- text;
50
- style;
51
- constructor(params) {
52
- this.text = params.text;
53
- this.style = {
54
- fontSize: params.size ?? 22,
55
- fontFamily: params.fontFamily ?? 'Bebas Neue',
56
- };
57
- }
58
- setText(text) {
59
- this.text = text;
60
- return this;
61
- }
62
- setOrigin() {
63
- return this;
64
- }
65
- setFontSize(size) {
66
- this.style['fontSize'] = size;
67
- return this;
68
- }
69
- setFontFamily(family) {
70
- this.style['fontFamily'] = family;
71
- return this;
72
- }
73
- setColor(color) {
74
- this.style['color'] = color;
75
- return this;
76
- }
77
- getBounds() {
78
- return getTextBounds(this.text, this.style['fontSize'] ?? 16);
79
- }
80
- }
81
- return { Text: MockText };
82
- });
83
- // Helper function for getBounds
84
- const getTextBounds = (text, fontSize) => {
85
- const charWidth = 10;
86
- const lineHeight = parseInt(String(fontSize)) || 16;
87
- return {
88
- width: text.length * charWidth,
89
- height: lineHeight,
90
- };
91
- };
92
- // Mock Phaser
93
- vi.mock('phaser', () => {
94
- class MockText {
95
- text;
96
- style;
97
- constructor(_x, _y, text, style) {
98
- this.text = text;
99
- this.style = style;
100
- }
101
- setText(text) {
102
- this.text = text;
103
- return this;
104
- }
105
- setOrigin() {
106
- return this;
107
- }
108
- setFontSize(size) {
109
- this.style['fontSize'] = size;
110
- return this;
111
- }
112
- setFontFamily(family) {
113
- this.style['fontFamily'] = family;
114
- return this;
115
- }
116
- setColor(color) {
117
- this.style['color'] = color;
118
- return this;
119
- }
120
- getBounds() {
121
- return getTextBounds(this.text, this.style['fontSize'] ?? 16);
122
- }
123
- }
124
- class MockSprite {
125
- // eslint-disable-next-line no-unused-vars
126
- constructor(_x, _y, _texture) { }
127
- setOrigin() {
128
- return this;
129
- }
130
- setInteractive() {
131
- return this;
132
- }
133
- setTexture() {
134
- return this;
135
- }
136
- on() {
137
- return this;
138
- }
139
- }
140
- class MockGraphics {
141
- fillStyle() {
142
- return this;
143
- }
144
- fillRoundedRect() {
145
- return this;
146
- }
147
- lineStyle() {
148
- return this;
149
- }
150
- strokeRoundedRect() {
151
- return this;
152
- }
153
- generateTexture() {
154
- return this;
155
- }
156
- destroy() {
157
- return this;
158
- }
159
- }
160
- class MockContainer {
161
- // eslint-disable-next-line no-unused-vars
162
- constructor(_scene, _x, _y) {
163
- this.scene = _scene;
164
- }
165
- add() {
166
- return this;
167
- }
168
- scene;
169
- }
170
- class Scene {
171
- add = {
172
- text: vi.fn((x, y, text, style) => new MockText(x, y, text, style)),
173
- sprite: vi.fn((x, y, texture) => new MockSprite(x, y, texture)),
174
- graphics: vi.fn(() => new MockGraphics()),
175
- };
176
- tweens = { add: vi.fn() };
177
- }
178
- class BasePlugin {
179
- constructor() { }
180
- }
181
- const GameObjects = { Container: MockContainer };
182
- const Plugins = { BasePlugin };
183
- return { GameObjects, Scene, Plugins };
184
- });
185
- import { FlatTextButton } from './flat-text-button';
186
- describe('FlatTextButton', () => {
187
- it('should create a FlatTextButton instance', () => {
188
- const scene = new Scene();
189
- const textButton = new FlatTextButton({
190
- scene,
191
- x: 100,
192
- y: 100,
193
- text: 'Click Me',
194
- });
195
- expect(textButton).toBeInstanceOf(FlatTextButton);
196
- });
197
- it('should create with custom properties', () => {
198
- const scene = new Scene();
199
- const textButton = new FlatTextButton({
200
- scene,
201
- x: 100,
202
- y: 100,
203
- text: 'Custom Button',
204
- fontSize: 'lg',
205
- color: 'red',
206
- textColor: 'white',
207
- borderRadius: 'lg',
208
- padding: '4',
209
- });
210
- expect(textButton).toBeInstanceOf(FlatTextButton);
211
- });
212
- it('should support method chaining', () => {
213
- const scene = new Scene();
214
- const textButton = new FlatTextButton({
215
- scene,
216
- x: 100,
217
- y: 100,
218
- text: 'Test',
219
- });
220
- const result = textButton
221
- .setText('Chained')
222
- .setFontSize('lg')
223
- .setColor('green')
224
- .setBorderRadius('lg')
225
- .setPadding('4');
226
- expect(result).toBe(textButton);
227
- });
228
- it('should handle borderRadius full correctly', () => {
229
- const scene = new Scene();
230
- const textButton = new FlatTextButton({
231
- scene,
232
- x: 100,
233
- y: 100,
234
- text: 'Full Radius Test',
235
- borderRadius: 'full',
236
- });
237
- expect(textButton).toBeInstanceOf(FlatTextButton);
238
- // Test setBorderRadius with 'full'
239
- const result = textButton.setBorderRadius('full');
240
- expect(result).toBe(textButton);
241
- });
242
- });
243
- //# sourceMappingURL=flat-text-button.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flat-text-button.spec.js","sourceRoot":"","sources":["../../../src/components/flat-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AAE,GAAG;YACN,CAAC,EAAE,GAAG;YACN,IAAI,EAAE,kBAAkB;YACxB,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;QAElD,mCAAmC;QACnC,MAAM,MAAM,GAAG,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './flat-text-button';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/flat-text-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './flat-text-button';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/flat-text-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './section-header';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/section-header/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './section-header';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/section-header/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}