hudini 0.10.0 → 0.11.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.
- package/dist/components/panel/panel.d.ts +79 -0
- package/dist/components/panel/panel.d.ts.map +1 -0
- package/dist/components/panel/panel.js +192 -0
- package/dist/components/panel/panel.js.map +1 -0
- package/dist/utils/get-pw-from-scene.d.ts +3 -1
- package/dist/utils/get-pw-from-scene.d.ts.map +1 -1
- package/dist/utils/get-pw-from-scene.js +3 -0
- package/dist/utils/get-pw-from-scene.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { GameObjects, Scene } from 'phaser';
|
|
2
|
+
import { Card } from '../card';
|
|
3
|
+
import { FlatIconButton } from '../flat-icon-button';
|
|
4
|
+
import { SectionHeader } from '../section-header';
|
|
5
|
+
export type PanelParams = {
|
|
6
|
+
scene: Scene;
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
title?: string;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
borderRadius?: number;
|
|
12
|
+
margin?: number;
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
child: GameObjects.GameObject;
|
|
16
|
+
};
|
|
17
|
+
export declare class Panel extends GameObjects.Container {
|
|
18
|
+
private card;
|
|
19
|
+
private sectionHeader;
|
|
20
|
+
private closeButton;
|
|
21
|
+
private title;
|
|
22
|
+
private showCloseButton;
|
|
23
|
+
private onClose?;
|
|
24
|
+
private headerHeight;
|
|
25
|
+
constructor(params: PanelParams);
|
|
26
|
+
/**
|
|
27
|
+
* Creates the section header
|
|
28
|
+
*/
|
|
29
|
+
private createSectionHeader;
|
|
30
|
+
/**
|
|
31
|
+
* Creates the close button
|
|
32
|
+
*/
|
|
33
|
+
private createCloseButton;
|
|
34
|
+
/**
|
|
35
|
+
* Updates the layout after property changes
|
|
36
|
+
*/
|
|
37
|
+
private updateLayout;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the title of the panel
|
|
40
|
+
*/
|
|
41
|
+
setTitle(title: string): this;
|
|
42
|
+
/**
|
|
43
|
+
* Sets whether to show the close button
|
|
44
|
+
*/
|
|
45
|
+
setShowCloseButton(show: boolean): this;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the close callback
|
|
48
|
+
*/
|
|
49
|
+
setOnClose(callback: () => void): this;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the background color
|
|
52
|
+
*/
|
|
53
|
+
setBackgroundColor(color: string): this;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the border radius
|
|
56
|
+
*/
|
|
57
|
+
setBorderRadius(radius: number): this;
|
|
58
|
+
/**
|
|
59
|
+
* Sets the margin
|
|
60
|
+
*/
|
|
61
|
+
setMargin(margin: number): this;
|
|
62
|
+
/**
|
|
63
|
+
* Sets a new child component
|
|
64
|
+
*/
|
|
65
|
+
setChild(child: GameObjects.GameObject): this;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the card component
|
|
68
|
+
*/
|
|
69
|
+
getCard(): Card;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the section header component
|
|
72
|
+
*/
|
|
73
|
+
getSectionHeader(): SectionHeader | null;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the close button component
|
|
76
|
+
*/
|
|
77
|
+
getCloseButton(): FlatIconButton | null;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/panel/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUlD,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K,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI;IAM7C;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,gBAAgB,IAAI,aAAa,GAAG,IAAI;IAIxC;;OAEG;IACH,cAAc,IAAI,cAAc,GAAG,IAAI;CAG1C"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { GameObjects } from 'phaser';
|
|
2
|
+
import { Card } from '../card';
|
|
3
|
+
import { FlatIconButton } from '../flat-icon-button';
|
|
4
|
+
import { SectionHeader } from '../section-header';
|
|
5
|
+
// Constants for default values
|
|
6
|
+
const DEFAULT_BORDER_RADIUS = 8;
|
|
7
|
+
const DEFAULT_MARGIN = 16;
|
|
8
|
+
const DEFAULT_BACKGROUND_COLOR = 'white';
|
|
9
|
+
const DEFAULT_HEADER_HEIGHT = 60;
|
|
10
|
+
const CLOSE_BUTTON_SIZE = 32;
|
|
11
|
+
const CLOSE_BUTTON_MARGIN = 8;
|
|
12
|
+
export class Panel extends GameObjects.Container {
|
|
13
|
+
card;
|
|
14
|
+
sectionHeader = null;
|
|
15
|
+
closeButton = null;
|
|
16
|
+
title;
|
|
17
|
+
showCloseButton;
|
|
18
|
+
onClose;
|
|
19
|
+
headerHeight;
|
|
20
|
+
constructor(params) {
|
|
21
|
+
super(params.scene, params.x ?? 0, params.y ?? 0);
|
|
22
|
+
this.title = params.title ?? '';
|
|
23
|
+
this.showCloseButton = params.showCloseButton ?? false;
|
|
24
|
+
this.onClose = params.onClose;
|
|
25
|
+
this.headerHeight = DEFAULT_HEADER_HEIGHT;
|
|
26
|
+
// Create the card first
|
|
27
|
+
this.card = new Card({
|
|
28
|
+
scene: params.scene,
|
|
29
|
+
x: 0,
|
|
30
|
+
y: 0,
|
|
31
|
+
backgroundColor: params.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,
|
|
32
|
+
borderRadius: params.borderRadius ?? DEFAULT_BORDER_RADIUS,
|
|
33
|
+
margin: params.margin ?? DEFAULT_MARGIN,
|
|
34
|
+
child: params.child
|
|
35
|
+
});
|
|
36
|
+
// Add card to container
|
|
37
|
+
this.add(this.card);
|
|
38
|
+
// Create section header if title is provided
|
|
39
|
+
if (this.title) {
|
|
40
|
+
this.createSectionHeader();
|
|
41
|
+
}
|
|
42
|
+
// Create close button if requested
|
|
43
|
+
if (this.showCloseButton) {
|
|
44
|
+
this.createCloseButton();
|
|
45
|
+
}
|
|
46
|
+
// Update layout
|
|
47
|
+
this.updateLayout();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates the section header
|
|
51
|
+
*/
|
|
52
|
+
createSectionHeader() {
|
|
53
|
+
this.sectionHeader = new SectionHeader({
|
|
54
|
+
scene: this.scene,
|
|
55
|
+
x: 0,
|
|
56
|
+
y: 0,
|
|
57
|
+
text: this.title,
|
|
58
|
+
backgroundColor: 'transparent',
|
|
59
|
+
borderRadius: 0
|
|
60
|
+
});
|
|
61
|
+
// Add header to container
|
|
62
|
+
this.add(this.sectionHeader);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Creates the close button
|
|
66
|
+
*/
|
|
67
|
+
createCloseButton() {
|
|
68
|
+
this.closeButton = new FlatIconButton({
|
|
69
|
+
scene: this.scene,
|
|
70
|
+
x: 0,
|
|
71
|
+
y: 0,
|
|
72
|
+
icon: 'x',
|
|
73
|
+
size: CLOSE_BUTTON_SIZE,
|
|
74
|
+
onClick: () => {
|
|
75
|
+
if (this.onClose) {
|
|
76
|
+
this.onClose();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
// Add close button to container
|
|
81
|
+
this.add(this.closeButton);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Updates the layout after property changes
|
|
85
|
+
*/
|
|
86
|
+
updateLayout() {
|
|
87
|
+
// Get card bounds
|
|
88
|
+
const cardBounds = this.card.getBounds();
|
|
89
|
+
// Calculate header position (top of the card)
|
|
90
|
+
if (this.sectionHeader) {
|
|
91
|
+
const headerY = -cardBounds.height / 2 + this.headerHeight / 2;
|
|
92
|
+
this.sectionHeader.setPosition(0, headerY);
|
|
93
|
+
// Note: SectionHeader doesn't have setWidth, it auto-sizes to content
|
|
94
|
+
}
|
|
95
|
+
// Calculate close button position (top-right corner)
|
|
96
|
+
if (this.closeButton) {
|
|
97
|
+
const buttonX = cardBounds.width / 2 - CLOSE_BUTTON_SIZE / 2 - CLOSE_BUTTON_MARGIN;
|
|
98
|
+
const buttonY = -cardBounds.height / 2 + CLOSE_BUTTON_SIZE / 2 + CLOSE_BUTTON_MARGIN;
|
|
99
|
+
this.closeButton.setPosition(buttonX, buttonY);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Sets the title of the panel
|
|
104
|
+
*/
|
|
105
|
+
setTitle(title) {
|
|
106
|
+
this.title = title;
|
|
107
|
+
if (title && !this.sectionHeader) {
|
|
108
|
+
this.createSectionHeader();
|
|
109
|
+
}
|
|
110
|
+
else if (!title && this.sectionHeader) {
|
|
111
|
+
this.remove(this.sectionHeader);
|
|
112
|
+
this.sectionHeader = null;
|
|
113
|
+
}
|
|
114
|
+
else if (this.sectionHeader) {
|
|
115
|
+
this.sectionHeader.setText(title);
|
|
116
|
+
}
|
|
117
|
+
this.updateLayout();
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Sets whether to show the close button
|
|
122
|
+
*/
|
|
123
|
+
setShowCloseButton(show) {
|
|
124
|
+
this.showCloseButton = show;
|
|
125
|
+
if (show && !this.closeButton) {
|
|
126
|
+
this.createCloseButton();
|
|
127
|
+
}
|
|
128
|
+
else if (!show && this.closeButton) {
|
|
129
|
+
this.remove(this.closeButton);
|
|
130
|
+
this.closeButton = null;
|
|
131
|
+
}
|
|
132
|
+
this.updateLayout();
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Sets the close callback
|
|
137
|
+
*/
|
|
138
|
+
setOnClose(callback) {
|
|
139
|
+
this.onClose = callback;
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Sets the background color
|
|
144
|
+
*/
|
|
145
|
+
setBackgroundColor(color) {
|
|
146
|
+
this.card.setBackgroundColor(color);
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Sets the border radius
|
|
151
|
+
*/
|
|
152
|
+
setBorderRadius(radius) {
|
|
153
|
+
this.card.setBorderRadius(radius);
|
|
154
|
+
this.updateLayout();
|
|
155
|
+
return this;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Sets the margin
|
|
159
|
+
*/
|
|
160
|
+
setMargin(margin) {
|
|
161
|
+
this.card.setMargin(margin);
|
|
162
|
+
this.updateLayout();
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Sets a new child component
|
|
167
|
+
*/
|
|
168
|
+
setChild(child) {
|
|
169
|
+
this.card.setChild(child);
|
|
170
|
+
this.updateLayout();
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Gets the card component
|
|
175
|
+
*/
|
|
176
|
+
getCard() {
|
|
177
|
+
return this.card;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Gets the section header component
|
|
181
|
+
*/
|
|
182
|
+
getSectionHeader() {
|
|
183
|
+
return this.sectionHeader;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Gets the close button component
|
|
187
|
+
*/
|
|
188
|
+
getCloseButton() {
|
|
189
|
+
return this.closeButton;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../src/components/panel/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAS,MAAM,QAAQ,CAAC;AAE5C,O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O,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,OAAO;QACH,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,cAAc;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Scene } from 'phaser';
|
|
2
|
-
import { PhaserWindPlugin } from 'phaser-wind';
|
|
2
|
+
import { BaseThemeConfig, PhaserWindPlugin } from 'phaser-wind';
|
|
3
|
+
import { HudiniPlugin } from '../plugin/plugin';
|
|
3
4
|
export declare const getPWFromScene: (scene: Scene) => PhaserWindPlugin<{}>;
|
|
5
|
+
export declare const getHudini: <T extends BaseThemeConfig = BaseThemeConfig>(scene: Scene) => HudiniPlugin<T>;
|
|
4
6
|
//# sourceMappingURL=get-pw-from-scene.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-pw-from-scene.d.ts","sourceRoot":"","sources":["../../src/utils/get-pw-from-scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"get-pw-from-scene.d.ts","sourceRoot":"","sources":["../../src/utils/get-pw-from-scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,KAAG,gBAAgB,CAAC,EAAE,CAEhE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,eAAe,GAAG,eAAe,EACnE,OAAO,KAAK,KACX,YAAY,CAAC,CAAC,CAEhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-pw-from-scene.js","sourceRoot":"","sources":["../../src/utils/get-pw-from-scene.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-pw-from-scene.js","sourceRoot":"","sources":["../../src/utils/get-pw-from-scene.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAY,EAAwB,EAAE;IACnE,OAAQ,KAA4C,CAAC,EAAE,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,KAAY,EACK,EAAE;IACnB,OAAQ,KAAuC,CAAC,MAAM,CAAC;AACzD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hudini",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@eslint-recommended/eslint-config": "^28.0.0",
|
|
42
42
|
"@types/node": "^24.3.0",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
|
44
|
-
"@typescript-eslint/parser": "^8.
|
|
44
|
+
"@typescript-eslint/parser": "^8.41.0",
|
|
45
45
|
"eslint": "^8.55.0",
|
|
46
46
|
"eslint-config-prettier": "^10.1.8",
|
|
47
47
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
51
51
|
"eslint-plugin-promise": "^7.2.1",
|
|
52
52
|
"eslint-plugin-security": "^3.0.1",
|
|
53
|
-
"eslint-plugin-sonarjs": "^3.0.
|
|
53
|
+
"eslint-plugin-sonarjs": "^3.0.5",
|
|
54
54
|
"eslint-plugin-unicorn": "^50.0.1",
|
|
55
|
-
"tsx": "^4.20.
|
|
55
|
+
"tsx": "^4.20.5",
|
|
56
56
|
"typescript": "^5.3.0",
|
|
57
57
|
"vitest": "^3.2.4"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"
|
|
61
|
-
"phaser
|
|
60
|
+
"phaser-wind": "0.6.0",
|
|
61
|
+
"font-awesome-for-phaser": "0.5.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"phaser": "*"
|