@rpgjs/client 5.0.0-alpha.22 → 5.0.0-alpha.24
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/Game/Object.d.ts +2 -0
- package/dist/RpgClientEngine.d.ts +115 -9
- package/dist/components/gui/mobile/index.d.ts +8 -0
- package/dist/components/prebuilt/index.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.js +6 -5
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +2 -2
- package/dist/index13.js +102 -10
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +67 -9
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +10 -263
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +9 -97
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +300 -89
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +63 -80
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +96 -348
- package/dist/index19.js.map +1 -1
- package/dist/index2.js +176 -24
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +360 -17
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +19 -50
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +212 -5
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +6 -395
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +4 -39
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +19 -20
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +43 -2624
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +5 -110
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +394 -65
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +40 -15
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +3 -3
- package/dist/index30.js +21 -23
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +2624 -86
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +107 -34
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +69 -22
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +19 -3
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +21 -329
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +91 -30
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +37 -7
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +22 -9
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +139 -10
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +3 -3
- package/dist/index40.js +16 -6
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +1 -325
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +530 -3680
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +24 -67
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +9 -184
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +6 -503
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +325 -2
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +3687 -17
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +69 -202
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +182 -7
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +497 -106
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +48 -130
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +17 -134
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +3 -109
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +9 -138
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +111 -7
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +130 -48
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +137 -0
- package/dist/index57.js.map +1 -0
- package/dist/index58.js +112 -0
- package/dist/index58.js.map +1 -0
- package/dist/index59.js +9 -0
- package/dist/index59.js.map +1 -0
- package/dist/index6.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index8.js +17 -2
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +10 -27
- package/dist/index9.js.map +1 -1
- package/dist/services/keyboardControls.d.ts +1 -2
- package/dist/services/mmorpg.d.ts +1 -1
- package/dist/services/standalone.d.ts +1 -1
- package/package.json +9 -9
- package/src/Game/Object.ts +8 -0
- package/src/Gui/Gui.ts +4 -31
- package/src/RpgClientEngine.ts +193 -20
- package/src/components/character.ce +146 -9
- package/src/components/gui/mobile/index.ts +24 -0
- package/src/components/gui/mobile/mobile.ce +80 -0
- package/src/components/prebuilt/index.ts +1 -0
- package/src/components/prebuilt/light-halo.ce +148 -0
- package/src/components/scenes/canvas.ce +2 -2
- package/src/components/scenes/event-layer.ce +1 -0
- package/src/components/scenes/transition.ce +60 -0
- package/src/index.ts +6 -1
- package/src/module.ts +15 -0
- package/src/services/keyboardControls.ts +1 -1
package/dist/index48.js
CHANGED
|
@@ -1,210 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { map, filter, switchMap, from } from 'rxjs';
|
|
4
|
-
import { inject } from './index6.js';
|
|
1
|
+
import { useProps, useDefineProps, mount, signal, h, Container, loop, Howl, computed } from 'canvasengine';
|
|
2
|
+
import component$1 from './index52.js';
|
|
5
3
|
import { RpgClientEngine } from './index2.js';
|
|
6
|
-
import
|
|
4
|
+
import { inject } from './index6.js';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.hooks.callHooks("client-sprite-onInit", this).subscribe();
|
|
25
|
-
this._frames.observable.subscribe(({ items }) => {
|
|
26
|
-
if (!this.id) return;
|
|
27
|
-
this.frames = [...this.frames, ...items];
|
|
28
|
-
});
|
|
29
|
-
this.graphics.observable.pipe(
|
|
30
|
-
map(({ items }) => items),
|
|
31
|
-
filter((graphics) => graphics.length > 0),
|
|
32
|
-
switchMap((graphics) => from(Promise.all(graphics.map((graphic) => this.engine.getSpriteSheet(graphic)))))
|
|
33
|
-
).subscribe((sheets) => {
|
|
34
|
-
this.graphicsSignals.set(sheets);
|
|
35
|
-
});
|
|
36
|
-
this.componentsTop.observable.pipe(
|
|
37
|
-
filter((value) => value !== null && value !== void 0),
|
|
38
|
-
map((value) => typeof value === "string" ? JSON.parse(value) : value)
|
|
39
|
-
).subscribe(({ components }) => {
|
|
40
|
-
for (const component of components) {
|
|
41
|
-
for (const [key, value] of Object.entries(component)) {
|
|
42
|
-
this._component = value;
|
|
43
|
-
console.log(value);
|
|
44
|
-
const type = value.type;
|
|
45
|
-
if (DYNAMIC_COMPONENTS[type]) {
|
|
46
|
-
this.engine.addSpriteComponentInFront(DYNAMIC_COMPONENTS[type]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
6
|
+
function component($$props) {
|
|
7
|
+
useProps($$props);
|
|
8
|
+
const defineProps = useDefineProps($$props);
|
|
9
|
+
var _a, _b, _c, _d, _e, _f;
|
|
10
|
+
var _g = defineProps(), items = _g.items, wrapAround = _g.wrapAround, onSelect = _g.onSelect, selectedIndex = _g.selectedIndex;
|
|
11
|
+
var client = inject(RpgClientEngine);
|
|
12
|
+
var keyboardControls = client.globalConfig.keyboardControls;
|
|
13
|
+
var sounds = client.sounds;
|
|
14
|
+
var dialogBoxCursorSound = (_c = (_b = (_a = client.globalConfig) === null || _a === void 0 ? void 0 : _a.box) === null || _b === void 0 ? void 0 : _b.sounds) === null || _c === void 0 ? void 0 : _c.cursorMove;
|
|
15
|
+
var dialogBoxCursorSelectSound = (_f = (_e = (_d = client.globalConfig) === null || _d === void 0 ? void 0 : _d.box) === null || _e === void 0 ? void 0 : _e.sounds) === null || _f === void 0 ? void 0 : _f.cursorSelect;
|
|
16
|
+
var playDialogBoxSound = function (soundId) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (!soundId)
|
|
19
|
+
return;
|
|
20
|
+
var sound = new Howl.Howl({
|
|
21
|
+
src: [(_a = sounds.get(soundId)) === null || _a === void 0 ? void 0 : _a.src]
|
|
50
22
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.id,
|
|
57
|
-
frame.x,
|
|
58
|
-
frame.y,
|
|
59
|
-
"top-left"
|
|
60
|
-
);
|
|
61
|
-
}
|
|
23
|
+
sound.play();
|
|
24
|
+
};
|
|
25
|
+
var selected = function (index) {
|
|
26
|
+
return computed(function () {
|
|
27
|
+
return index === selectedIndex();
|
|
62
28
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
get engine() {
|
|
68
|
-
return inject(RpgClientEngine);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Trigger a flash animation on this sprite
|
|
72
|
-
*
|
|
73
|
-
* This method triggers a flash effect using CanvasEngine's flash directive.
|
|
74
|
-
* The flash can be configured with various options including type (alpha, tint, or both),
|
|
75
|
-
* duration, cycles, and color.
|
|
76
|
-
*
|
|
77
|
-
* ## Design
|
|
78
|
-
*
|
|
79
|
-
* The flash uses a trigger system that is connected to the flash directive in the
|
|
80
|
-
* character component. This allows for flexible configuration and can be triggered
|
|
81
|
-
* from both server events and client-side code.
|
|
82
|
-
*
|
|
83
|
-
* @param options - Flash configuration options
|
|
84
|
-
* @param options.type - Type of flash effect: 'alpha' (opacity), 'tint' (color), or 'both' (default: 'alpha')
|
|
85
|
-
* @param options.duration - Duration of the flash animation in milliseconds (default: 300)
|
|
86
|
-
* @param options.cycles - Number of flash cycles (flash on/off) (default: 1)
|
|
87
|
-
* @param options.alpha - Alpha value when flashing, from 0 to 1 (default: 0.3)
|
|
88
|
-
* @param options.tint - Tint color when flashing as hex value or color name (default: 0xffffff - white)
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```ts
|
|
92
|
-
* // Simple flash with default settings (alpha flash)
|
|
93
|
-
* player.flash();
|
|
94
|
-
*
|
|
95
|
-
* // Flash with red tint
|
|
96
|
-
* player.flash({ type: 'tint', tint: 0xff0000 });
|
|
97
|
-
*
|
|
98
|
-
* // Flash with both alpha and tint
|
|
99
|
-
* player.flash({
|
|
100
|
-
* type: 'both',
|
|
101
|
-
* alpha: 0.5,
|
|
102
|
-
* tint: 0xff0000,
|
|
103
|
-
* duration: 200,
|
|
104
|
-
* cycles: 2
|
|
105
|
-
* });
|
|
106
|
-
*
|
|
107
|
-
* // Quick damage flash
|
|
108
|
-
* player.flash({
|
|
109
|
-
* type: 'tint',
|
|
110
|
-
* tint: 0xff0000,
|
|
111
|
-
* duration: 150,
|
|
112
|
-
* cycles: 1
|
|
113
|
-
* });
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
flash(options) {
|
|
117
|
-
const flashOptions = {
|
|
118
|
-
type: options?.type || "alpha",
|
|
119
|
-
duration: options?.duration ?? 300,
|
|
120
|
-
cycles: options?.cycles ?? 1,
|
|
121
|
-
alpha: options?.alpha ?? 0.3,
|
|
122
|
-
tint: options?.tint ?? 16777215
|
|
29
|
+
};
|
|
30
|
+
mount(function (element) {
|
|
31
|
+
return function () {
|
|
32
|
+
element.directives.controls.onDestroy();
|
|
123
33
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
* Set a custom animation for a specific number of times
|
|
165
|
-
*
|
|
166
|
-
* Plays a custom animation for the specified number of repetitions.
|
|
167
|
-
* The animation system prevents overlapping animations and automatically
|
|
168
|
-
* returns to the previous animation when complete.
|
|
169
|
-
*
|
|
170
|
-
* @param animationName - Name of the animation to play
|
|
171
|
-
* @param nbTimes - Number of times to repeat the animation (default: Infinity for continuous)
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```ts
|
|
175
|
-
* // Play attack animation 3 times
|
|
176
|
-
* player.setAnimation('attack', 3);
|
|
177
|
-
*
|
|
178
|
-
* // Play continuous spell animation
|
|
179
|
-
* player.setAnimation('spell');
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
setAnimation(animationName, nbTimes = Infinity) {
|
|
183
|
-
if (this.animationIsPlaying()) return;
|
|
184
|
-
this.animationIsPlaying.set(true);
|
|
185
|
-
const previousAnimationName = this.animationName();
|
|
186
|
-
this.animationCurrentIndex.set(0);
|
|
187
|
-
if (this.animationSubscription) {
|
|
188
|
-
this.animationSubscription.unsubscribe();
|
|
189
|
-
}
|
|
190
|
-
this.animationSubscription = this.animationCurrentIndex.observable.subscribe((index) => {
|
|
191
|
-
if (index >= nbTimes) {
|
|
192
|
-
this.animationCurrentIndex.set(0);
|
|
193
|
-
this.animationName.set(previousAnimationName);
|
|
194
|
-
this.animationIsPlaying.set(false);
|
|
195
|
-
if (this.animationSubscription) {
|
|
196
|
-
this.animationSubscription.unsubscribe();
|
|
197
|
-
this.animationSubscription = void 0;
|
|
198
|
-
}
|
|
34
|
+
});
|
|
35
|
+
var controls = signal({
|
|
36
|
+
down: {
|
|
37
|
+
bind: keyboardControls.down,
|
|
38
|
+
keyDown: function () {
|
|
39
|
+
playDialogBoxSound(dialogBoxCursorSound);
|
|
40
|
+
selectedIndex.update(function (currentIndex) {
|
|
41
|
+
if (wrapAround) {
|
|
42
|
+
return (currentIndex + 1) % items().length;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return Math.min(currentIndex + 1, items().length - 1);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
up: {
|
|
51
|
+
bind: keyboardControls.up,
|
|
52
|
+
keyDown: function () {
|
|
53
|
+
playDialogBoxSound(dialogBoxCursorSound);
|
|
54
|
+
selectedIndex.update(function (currentIndex) {
|
|
55
|
+
if (wrapAround) {
|
|
56
|
+
return (currentIndex - 1 + items().length) % items().length;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return Math.max(currentIndex - 1, 0);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
enter: {
|
|
65
|
+
bind: keyboardControls.action,
|
|
66
|
+
keyDown: function () {
|
|
67
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(selectedIndex());
|
|
68
|
+
playDialogBoxSound(dialogBoxCursorSelectSound);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
let $this = h(Container, { controls, flexDirection: 'column', margin: [0, 0, 0, 50] }, loop(items, (item, index) => h(component$1, { text: item.text, isSelected: selected(index) })));
|
|
73
|
+
return $this
|
|
199
74
|
}
|
|
200
|
-
});
|
|
201
|
-
this.animationName.set(animationName);
|
|
202
|
-
}
|
|
203
|
-
showComponentAnimation(id, params) {
|
|
204
|
-
const engine = inject(RpgClientEngine);
|
|
205
|
-
engine.getComponentAnimation(id).displayEffect(params, this);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
75
|
|
|
209
|
-
export {
|
|
76
|
+
export { component as default };
|
|
210
77
|
//# sourceMappingURL=index48.js.map
|
package/dist/index48.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index48.js","sources":["../src/Game/Object.ts"],"sourcesContent":["import { Hooks, ModulesToken, RpgCommonPlayer } from \"@rpgjs/common\";\nimport { trigger, signal } from \"canvasengine\";\nimport { filter, from, map, Subscription, switchMap } from \"rxjs\";\nimport { inject } from \"../core/inject\";\nimport { RpgClientEngine } from \"../RpgClientEngine\";\nimport TextComponent from \"../components/dynamics/text.ce\";\n\nconst DYNAMIC_COMPONENTS = {\n text: TextComponent,\n}\n\nexport abstract class RpgClientObject extends RpgCommonPlayer {\n abstract type: string;\n emitParticleTrigger = trigger();\n particleName = signal(\"\");\n animationCurrentIndex = signal(0);\n animationIsPlaying = signal(false);\n _param = signal({});\n frames: { x: number; y: number; ts: number }[] = [];\n graphicsSignals = signal<any[]>([]);\n _component = {} // temporary component memory\n flashTrigger = trigger();\n\n constructor() {\n super();\n this.hooks.callHooks(\"client-sprite-onInit\", this).subscribe();\n\n this._frames.observable.subscribe(({ items }) => {\n if (!this.id) return;\n //if (this.id == this.engine.playerIdSignal()!) return;\n this.frames = [...this.frames, ...items];\n });\n\n this.graphics.observable\n .pipe(\n map(({ items }) => items),\n filter(graphics => graphics.length > 0),\n switchMap(graphics => from(Promise.all(graphics.map(graphic => this.engine.getSpriteSheet(graphic)))))\n )\n .subscribe((sheets) => { \n this.graphicsSignals.set(sheets);\n });\n\n this.componentsTop.observable\n .pipe(\n filter(value => value !== null && value !== undefined),\n map((value) => typeof value === 'string' ? JSON.parse(value) : value),\n )\n .subscribe(({components}) => {\n for (const component of components) {\n for (const [key, value] of Object.entries(component)) {\n this._component = value as any; // temporary component memory\n console.log(value)\n const type = (value as any).type as keyof typeof DYNAMIC_COMPONENTS;\n if (DYNAMIC_COMPONENTS[type]) {\n this.engine.addSpriteComponentInFront(DYNAMIC_COMPONENTS[type]);\n }\n }\n }\n });\n\n this.engine.tick\n .pipe\n //throttleTime(10)\n ()\n .subscribe(() => {\n const frame = this.frames.shift();\n if (frame) {\n if (!frame.x || !frame.y) return;\n this.engine.scene.setBodyPosition(\n this.id,\n frame.x,\n frame.y,\n \"top-left\"\n );\n }\n });\n }\n\n get hooks() {\n return inject<Hooks>(ModulesToken);\n }\n\n get engine() {\n return inject(RpgClientEngine);\n }\n\n private animationSubscription?: Subscription;\n\n /**\n * Trigger a flash animation on this sprite\n * \n * This method triggers a flash effect using CanvasEngine's flash directive.\n * The flash can be configured with various options including type (alpha, tint, or both),\n * duration, cycles, and color.\n * \n * ## Design\n * \n * The flash uses a trigger system that is connected to the flash directive in the\n * character component. This allows for flexible configuration and can be triggered\n * from both server events and client-side code.\n * \n * @param options - Flash configuration options\n * @param options.type - Type of flash effect: 'alpha' (opacity), 'tint' (color), or 'both' (default: 'alpha')\n * @param options.duration - Duration of the flash animation in milliseconds (default: 300)\n * @param options.cycles - Number of flash cycles (flash on/off) (default: 1)\n * @param options.alpha - Alpha value when flashing, from 0 to 1 (default: 0.3)\n * @param options.tint - Tint color when flashing as hex value or color name (default: 0xffffff - white)\n * \n * @example\n * ```ts\n * // Simple flash with default settings (alpha flash)\n * player.flash();\n * \n * // Flash with red tint\n * player.flash({ type: 'tint', tint: 0xff0000 });\n * \n * // Flash with both alpha and tint\n * player.flash({ \n * type: 'both', \n * alpha: 0.5, \n * tint: 0xff0000,\n * duration: 200,\n * cycles: 2\n * });\n * \n * // Quick damage flash\n * player.flash({ \n * type: 'tint', \n * tint: 0xff0000, \n * duration: 150,\n * cycles: 1\n * });\n * ```\n */\n flash(options?: {\n type?: 'alpha' | 'tint' | 'both';\n duration?: number;\n cycles?: number;\n alpha?: number;\n tint?: number | string;\n }): void {\n const flashOptions = {\n type: options?.type || 'alpha',\n duration: options?.duration ?? 300,\n cycles: options?.cycles ?? 1,\n alpha: options?.alpha ?? 0.3,\n tint: options?.tint ?? 0xffffff,\n };\n \n // Convert color name to hex if needed\n let tintValue = flashOptions.tint;\n if (typeof tintValue === 'string') {\n // Common color name to hex mapping\n const colorMap: Record<string, number> = {\n 'white': 0xffffff,\n 'red': 0xff0000,\n 'green': 0x00ff00,\n 'blue': 0x0000ff,\n 'yellow': 0xffff00,\n 'cyan': 0x00ffff,\n 'magenta': 0xff00ff,\n 'black': 0x000000,\n };\n tintValue = colorMap[tintValue.toLowerCase()] ?? 0xffffff;\n }\n \n this.flashTrigger.start({\n ...flashOptions,\n tint: tintValue,\n });\n }\n\n /**\n * Reset animation state when animation changes externally\n *\n * This method should be called when the animation changes due to movement\n * or other external factors to ensure the animation system doesn't get stuck\n *\n * @example\n * ```ts\n * // Reset when player starts moving\n * player.resetAnimationState();\n * ```\n */\n resetAnimationState() {\n this.animationIsPlaying.set(false);\n this.animationCurrentIndex.set(0);\n if (this.animationSubscription) {\n this.animationSubscription.unsubscribe();\n this.animationSubscription = undefined;\n }\n }\n\n /**\n * Set a custom animation for a specific number of times\n *\n * Plays a custom animation for the specified number of repetitions.\n * The animation system prevents overlapping animations and automatically\n * returns to the previous animation when complete.\n *\n * @param animationName - Name of the animation to play\n * @param nbTimes - Number of times to repeat the animation (default: Infinity for continuous)\n *\n * @example\n * ```ts\n * // Play attack animation 3 times\n * player.setAnimation('attack', 3);\n *\n * // Play continuous spell animation\n * player.setAnimation('spell');\n * ```\n */\n setAnimation(animationName: string, nbTimes: number = Infinity) {\n if (this.animationIsPlaying()) return;\n this.animationIsPlaying.set(true);\n const previousAnimationName = this.animationName();\n this.animationCurrentIndex.set(0);\n\n // Clean up any existing subscription\n if (this.animationSubscription) {\n this.animationSubscription.unsubscribe();\n }\n\n this.animationSubscription =\n this.animationCurrentIndex.observable.subscribe((index) => {\n if (index >= nbTimes) {\n this.animationCurrentIndex.set(0);\n this.animationName.set(previousAnimationName);\n this.animationIsPlaying.set(false);\n if (this.animationSubscription) {\n this.animationSubscription.unsubscribe();\n this.animationSubscription = undefined;\n }\n }\n });\n this.animationName.set(animationName);\n }\n\n showComponentAnimation(id: string, params: any) {\n const engine = inject(RpgClientEngine);\n engine.getComponentAnimation(id).displayEffect(params, this);\n }\n}\n"],"names":["TextComponent"],"mappings":";;;;;;;AAOA,MAAM,kBAAA,GAA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CAAK,qBAAA,CAAsB,IAAI,CAAC,CAAA;AAChC,QAAA,IAAA,CAAK,aAAA,CAAc,IAAI,qBAAqB,CAAA;AAC5C,QAAA,IAAA,CAAK,kBAAA,CAAmB,IAAI,KAAK,CAAA;AACjC,QAAA,IAAI,KAAK,qBAAA,EAAuB;AAC9B,UAAA,IAAA,CAAK,sBAAsB,WAAA,EAAY;AACvC,UAAA,IAAA,CAAK,qBAAA,GAAwB,MAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC,CAAA;AACH,IAAA,IAAA,CAAK,aAAA,CAAc,IAAI,aAAa,CAAA;AAAA,EACtC;AAAA,EAEA,sBAAA,CAAuB,IAAY,MAAA,EAAa;AAC9C,IAAA,MAAM,MAAA,GAAS,OAAO,eAAe,CAAA;AACrC,IAAA,MAAA,CAAO,qBAAA,CAAsB,EAAE,CAAA,CAAE,aAAA,CAAc,QAAQ,IAAI,CAAA;AAAA,EAC7D;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index48.js","sources":["../src/components/gui/dialogbox/selection.ce"],"sourcesContent":["<Container controls flexDirection=\"column\" margin={[0, 0, 0, 50]}>\n @for ((item,index) of items) { \n <ItemMenu text={@item.@text} isSelected={@selected(@index)} /> \n }\n</Container>\n\n<script>\n import { signal, computed, mount, Howl } from \"canvasengine\";\n import ItemMenu from \"./itemMenu.ce\";\n import { RpgClientEngine } from \"../../../RpgClientEngine\";\n import { inject } from \"../../../core/inject\";\n\n const {\n items,\n wrapAround,\n onSelect,\n selectedIndex,\n } = defineProps();\n\n const client = inject(RpgClientEngine);\n const keyboardControls = client.globalConfig.keyboardControls;\n const sounds = client.sounds;\n const dialogBoxCursorSound = client.globalConfig?.box?.sounds?.cursorMove\n const dialogBoxCursorSelectSound = client.globalConfig?.box?.sounds?.cursorSelect\n\n\n const playDialogBoxSound = (soundId) => {\n if (!soundId) return;\n const sound = new Howl.Howl({\n src: [sounds.get(soundId)?.src]\n })\n sound.play()\n }\n\n const selected = (index) => {\n return computed(() => {\n return index === selectedIndex();\n })\n }\n\n mount((element) => {\n return () => {\n element.directives.controls.onDestroy()\n }\n })\n\n const controls = signal({\n down: {\n bind: keyboardControls.down,\n keyDown() {\n playDialogBoxSound(dialogBoxCursorSound);\n selectedIndex.update((currentIndex) => {\n if (wrapAround) {\n return (currentIndex + 1) % items().length;\n } else {\n return Math.min(currentIndex + 1, items().length - 1);\n }\n });\n },\n },\n up: {\n bind: keyboardControls.up,\n keyDown() {\n playDialogBoxSound(dialogBoxCursorSound);\n selectedIndex.update((currentIndex) => {\n if (wrapAround) {\n return (currentIndex - 1 + items().length) % items().length;\n } else {\n return Math.max(currentIndex - 1, 0);\n }\n });\n },\n },\n enter: {\n bind: keyboardControls.action,\n keyDown() {\n onSelect?.(selectedIndex());\n playDialogBoxSound(dialogBoxCursorSelectSound);\n },\n },\n });\n</script>\n"],"names":["ItemMenu"],"mappings":";;;;;AASqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AAClC,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa;AAC9H,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AACpC,IAAI,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB;AAC3D,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM;AAC1B,IAAI,oBAAoB,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,MAAM,IAAI,IAAI,EAAE,KAAK,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AAE,CAAC;AACzF,YAAY,kBAAkB,CAAC,0BAA0B,CAAC;AAC1D,QAAQ,CAAC;AACT,KAAK;AACL,CAAC,CAAC;AACF,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,CAAC,CAACA,WAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC1L,QAAQ,OAAO;AACf,MAAM;;;;"}
|
package/dist/index49.js
CHANGED
|
@@ -1,12 +1,187 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReconnectingWebSocket } from './index50.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
// src/index.ts
|
|
4
|
+
var valueIsNotNil = (keyValuePair) =>
|
|
5
|
+
keyValuePair[1] !== null && keyValuePair[1] !== void 0;
|
|
6
|
+
function generateUUID() {
|
|
7
|
+
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
8
|
+
return crypto.randomUUID();
|
|
9
|
+
}
|
|
10
|
+
let d = /* @__PURE__ */ new Date().getTime();
|
|
11
|
+
let d2 =
|
|
12
|
+
(typeof performance !== "undefined" &&
|
|
13
|
+
performance.now &&
|
|
14
|
+
performance.now() * 1e3) ||
|
|
15
|
+
0;
|
|
16
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
17
|
+
let r = Math.random() * 16;
|
|
18
|
+
if (d > 0) {
|
|
19
|
+
r = (d + r) % 16 | 0;
|
|
20
|
+
d = Math.floor(d / 16);
|
|
21
|
+
} else {
|
|
22
|
+
r = (d2 + r) % 16 | 0;
|
|
23
|
+
d2 = Math.floor(d2 / 16);
|
|
24
|
+
}
|
|
25
|
+
return (c === "x" ? r : (r & 3) | 8).toString(16);
|
|
26
|
+
});
|
|
6
27
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
28
|
+
function getPartyInfo(partySocketOptions, defaultProtocol, defaultParams = {}) {
|
|
29
|
+
const {
|
|
30
|
+
host: rawHost,
|
|
31
|
+
path: rawPath,
|
|
32
|
+
protocol: rawProtocol,
|
|
33
|
+
room,
|
|
34
|
+
party,
|
|
35
|
+
basePath,
|
|
36
|
+
prefix,
|
|
37
|
+
query
|
|
38
|
+
} = partySocketOptions;
|
|
39
|
+
let host = rawHost.replace(/^(http|https|ws|wss):\/\//, "");
|
|
40
|
+
if (host.endsWith("/")) {
|
|
41
|
+
host = host.slice(0, -1);
|
|
42
|
+
}
|
|
43
|
+
if (rawPath == null ? void 0 : rawPath.startsWith("/")) {
|
|
44
|
+
throw new Error("path must not start with a slash");
|
|
45
|
+
}
|
|
46
|
+
const name = party ?? "main";
|
|
47
|
+
const path = rawPath ? `/${rawPath}` : "";
|
|
48
|
+
const protocol =
|
|
49
|
+
rawProtocol ||
|
|
50
|
+
(host.startsWith("localhost:") ||
|
|
51
|
+
host.startsWith("127.0.0.1:") ||
|
|
52
|
+
host.startsWith("192.168.") ||
|
|
53
|
+
host.startsWith("10.") ||
|
|
54
|
+
(host.startsWith("172.") &&
|
|
55
|
+
host.split(".")[1] >= "16" &&
|
|
56
|
+
host.split(".")[1] <= "31") ||
|
|
57
|
+
host.startsWith("[::ffff:7f00:1]:")
|
|
58
|
+
? // http / ws
|
|
59
|
+
defaultProtocol
|
|
60
|
+
: // https / wss
|
|
61
|
+
`${defaultProtocol}s`);
|
|
62
|
+
const baseUrl = `${protocol}://${host}/${basePath || `${prefix || "parties"}/${name}/${room}`}${path}`;
|
|
63
|
+
const makeUrl = (query2 = {}) =>
|
|
64
|
+
`${baseUrl}?${new URLSearchParams([
|
|
65
|
+
...Object.entries(defaultParams),
|
|
66
|
+
...Object.entries(query2).filter(valueIsNotNil)
|
|
67
|
+
])}`;
|
|
68
|
+
const urlProvider =
|
|
69
|
+
typeof query === "function"
|
|
70
|
+
? async () => makeUrl(await query())
|
|
71
|
+
: makeUrl(query);
|
|
72
|
+
return {
|
|
73
|
+
host,
|
|
74
|
+
path,
|
|
75
|
+
room,
|
|
76
|
+
name,
|
|
77
|
+
protocol,
|
|
78
|
+
partyUrl: baseUrl,
|
|
79
|
+
urlProvider
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
var PartySocket = class extends ReconnectingWebSocket {
|
|
83
|
+
constructor(partySocketOptions) {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
const wsOptions = getWSOptions(partySocketOptions);
|
|
86
|
+
super(wsOptions.urlProvider, wsOptions.protocols, wsOptions.socketOptions);
|
|
87
|
+
this.partySocketOptions = partySocketOptions;
|
|
88
|
+
this.setWSProperties(wsOptions);
|
|
89
|
+
if (!partySocketOptions.disableNameValidation) {
|
|
90
|
+
if ((_a = partySocketOptions.party) == null ? void 0 : _a.includes("/")) {
|
|
91
|
+
console.warn(
|
|
92
|
+
`PartySocket: party name "${partySocketOptions.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
if ((_b = partySocketOptions.room) == null ? void 0 : _b.includes("/")) {
|
|
96
|
+
console.warn(
|
|
97
|
+
`PartySocket: room name "${partySocketOptions.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_pk;
|
|
103
|
+
_pkurl;
|
|
104
|
+
name;
|
|
105
|
+
room;
|
|
106
|
+
host;
|
|
107
|
+
path;
|
|
108
|
+
updateProperties(partySocketOptions) {
|
|
109
|
+
const wsOptions = getWSOptions({
|
|
110
|
+
...this.partySocketOptions,
|
|
111
|
+
...partySocketOptions,
|
|
112
|
+
host: partySocketOptions.host ?? this.host,
|
|
113
|
+
room: partySocketOptions.room ?? this.room,
|
|
114
|
+
path: partySocketOptions.path ?? this.path
|
|
115
|
+
});
|
|
116
|
+
this._url = wsOptions.urlProvider;
|
|
117
|
+
this._protocols = wsOptions.protocols;
|
|
118
|
+
this._options = wsOptions.socketOptions;
|
|
119
|
+
this.setWSProperties(wsOptions);
|
|
120
|
+
}
|
|
121
|
+
setWSProperties(wsOptions) {
|
|
122
|
+
const { _pk, _pkurl, name, room, host, path } = wsOptions;
|
|
123
|
+
this._pk = _pk;
|
|
124
|
+
this._pkurl = _pkurl;
|
|
125
|
+
this.name = name;
|
|
126
|
+
this.room = room;
|
|
127
|
+
this.host = host;
|
|
128
|
+
this.path = path;
|
|
129
|
+
}
|
|
130
|
+
reconnect(code, reason) {
|
|
131
|
+
if (!this.room || !this.host) {
|
|
132
|
+
throw new Error(
|
|
133
|
+
"The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor."
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
super.reconnect(code, reason);
|
|
137
|
+
}
|
|
138
|
+
get id() {
|
|
139
|
+
return this._pk;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Exposes the static PartyKit room URL without applying query parameters.
|
|
143
|
+
* To access the currently connected WebSocket url, use PartySocket#url.
|
|
144
|
+
*/
|
|
145
|
+
get roomUrl() {
|
|
146
|
+
return this._pkurl;
|
|
147
|
+
}
|
|
148
|
+
// a `fetch` method that uses (almost) the same options as `PartySocket`
|
|
149
|
+
static async fetch(options, init) {
|
|
150
|
+
const party = getPartyInfo(options, "http");
|
|
151
|
+
const url =
|
|
152
|
+
typeof party.urlProvider === "string"
|
|
153
|
+
? party.urlProvider
|
|
154
|
+
: await party.urlProvider();
|
|
155
|
+
const doFetch = options.fetch ?? fetch;
|
|
156
|
+
return doFetch(url, init);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
function getWSOptions(partySocketOptions) {
|
|
160
|
+
const {
|
|
161
|
+
id,
|
|
162
|
+
host: _host,
|
|
163
|
+
path: _path,
|
|
164
|
+
party: _party,
|
|
165
|
+
room: _room,
|
|
166
|
+
protocol: _protocol,
|
|
167
|
+
query: _query,
|
|
168
|
+
protocols,
|
|
169
|
+
...socketOptions
|
|
170
|
+
} = partySocketOptions;
|
|
171
|
+
const _pk = id || generateUUID();
|
|
172
|
+
const party = getPartyInfo(partySocketOptions, "ws", { _pk });
|
|
173
|
+
return {
|
|
174
|
+
_pk,
|
|
175
|
+
_pkurl: party.partyUrl,
|
|
176
|
+
name: party.name,
|
|
177
|
+
room: party.room,
|
|
178
|
+
host: party.host,
|
|
179
|
+
path: party.path,
|
|
180
|
+
protocols,
|
|
181
|
+
socketOptions,
|
|
182
|
+
urlProvider: party.urlProvider
|
|
183
|
+
};
|
|
9
184
|
}
|
|
10
185
|
|
|
11
|
-
export {
|
|
186
|
+
export { PartySocket };
|
|
12
187
|
//# sourceMappingURL=index49.js.map
|
package/dist/index49.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index49.js","sources":["../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js"],"sourcesContent":["import defaultErrorMap from \"./locales/en.js\";\nlet overrideErrorMap = defaultErrorMap;\nexport { defaultErrorMap };\nexport function setErrorMap(map) {\n overrideErrorMap = map;\n}\nexport function getErrorMap() {\n return overrideErrorMap;\n}\n"],"names":["defaultErrorMap"],"mappings":";;AACA,IAAI,gBAAgB,GAAGA,QAAe;AAE/B,SAAS,WAAW,CAAC,GAAG,EAAE;AACjC,IAAI,gBAAgB,GAAG,GAAG;AAC1B;AACO,SAAS,WAAW,GAAG;AAC9B,IAAI,OAAO,gBAAgB;AAC3B;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index49.js","sources":["../../../node_modules/.pnpm/partysocket@1.1.5/node_modules/partysocket/dist/chunk-NLWAO4PP.mjs"],"sourcesContent":["import { ReconnectingWebSocket } from \"./chunk-ZCZZNAX5.mjs\";\n\n// src/index.ts\nvar valueIsNotNil = (keyValuePair) =>\n keyValuePair[1] !== null && keyValuePair[1] !== void 0;\nfunction generateUUID() {\n if (typeof crypto !== \"undefined\" && crypto.randomUUID) {\n return crypto.randomUUID();\n }\n let d = /* @__PURE__ */ new Date().getTime();\n let d2 =\n (typeof performance !== \"undefined\" &&\n performance.now &&\n performance.now() * 1e3) ||\n 0;\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n let r = Math.random() * 16;\n if (d > 0) {\n r = (d + r) % 16 | 0;\n d = Math.floor(d / 16);\n } else {\n r = (d2 + r) % 16 | 0;\n d2 = Math.floor(d2 / 16);\n }\n return (c === \"x\" ? r : (r & 3) | 8).toString(16);\n });\n}\nfunction getPartyInfo(partySocketOptions, defaultProtocol, defaultParams = {}) {\n const {\n host: rawHost,\n path: rawPath,\n protocol: rawProtocol,\n room,\n party,\n basePath,\n prefix,\n query\n } = partySocketOptions;\n let host = rawHost.replace(/^(http|https|ws|wss):\\/\\//, \"\");\n if (host.endsWith(\"/\")) {\n host = host.slice(0, -1);\n }\n if (rawPath == null ? void 0 : rawPath.startsWith(\"/\")) {\n throw new Error(\"path must not start with a slash\");\n }\n const name = party ?? \"main\";\n const path = rawPath ? `/${rawPath}` : \"\";\n const protocol =\n rawProtocol ||\n (host.startsWith(\"localhost:\") ||\n host.startsWith(\"127.0.0.1:\") ||\n host.startsWith(\"192.168.\") ||\n host.startsWith(\"10.\") ||\n (host.startsWith(\"172.\") &&\n host.split(\".\")[1] >= \"16\" &&\n host.split(\".\")[1] <= \"31\") ||\n host.startsWith(\"[::ffff:7f00:1]:\")\n ? // http / ws\n defaultProtocol\n : // https / wss\n `${defaultProtocol}s`);\n const baseUrl = `${protocol}://${host}/${basePath || `${prefix || \"parties\"}/${name}/${room}`}${path}`;\n const makeUrl = (query2 = {}) =>\n `${baseUrl}?${new URLSearchParams([\n ...Object.entries(defaultParams),\n ...Object.entries(query2).filter(valueIsNotNil)\n ])}`;\n const urlProvider =\n typeof query === \"function\"\n ? async () => makeUrl(await query())\n : makeUrl(query);\n return {\n host,\n path,\n room,\n name,\n protocol,\n partyUrl: baseUrl,\n urlProvider\n };\n}\nvar PartySocket = class extends ReconnectingWebSocket {\n constructor(partySocketOptions) {\n var _a, _b;\n const wsOptions = getWSOptions(partySocketOptions);\n super(wsOptions.urlProvider, wsOptions.protocols, wsOptions.socketOptions);\n this.partySocketOptions = partySocketOptions;\n this.setWSProperties(wsOptions);\n if (!partySocketOptions.disableNameValidation) {\n if ((_a = partySocketOptions.party) == null ? void 0 : _a.includes(\"/\")) {\n console.warn(\n `PartySocket: party name \"${partySocketOptions.party}\" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`\n );\n }\n if ((_b = partySocketOptions.room) == null ? void 0 : _b.includes(\"/\")) {\n console.warn(\n `PartySocket: room name \"${partySocketOptions.room}\" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`\n );\n }\n }\n }\n _pk;\n _pkurl;\n name;\n room;\n host;\n path;\n updateProperties(partySocketOptions) {\n const wsOptions = getWSOptions({\n ...this.partySocketOptions,\n ...partySocketOptions,\n host: partySocketOptions.host ?? this.host,\n room: partySocketOptions.room ?? this.room,\n path: partySocketOptions.path ?? this.path\n });\n this._url = wsOptions.urlProvider;\n this._protocols = wsOptions.protocols;\n this._options = wsOptions.socketOptions;\n this.setWSProperties(wsOptions);\n }\n setWSProperties(wsOptions) {\n const { _pk, _pkurl, name, room, host, path } = wsOptions;\n this._pk = _pk;\n this._pkurl = _pkurl;\n this.name = name;\n this.room = room;\n this.host = host;\n this.path = path;\n }\n reconnect(code, reason) {\n if (!this.room || !this.host) {\n throw new Error(\n \"The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.\"\n );\n }\n super.reconnect(code, reason);\n }\n get id() {\n return this._pk;\n }\n /**\n * Exposes the static PartyKit room URL without applying query parameters.\n * To access the currently connected WebSocket url, use PartySocket#url.\n */\n get roomUrl() {\n return this._pkurl;\n }\n // a `fetch` method that uses (almost) the same options as `PartySocket`\n static async fetch(options, init) {\n const party = getPartyInfo(options, \"http\");\n const url =\n typeof party.urlProvider === \"string\"\n ? party.urlProvider\n : await party.urlProvider();\n const doFetch = options.fetch ?? fetch;\n return doFetch(url, init);\n }\n};\nfunction getWSOptions(partySocketOptions) {\n const {\n id,\n host: _host,\n path: _path,\n party: _party,\n room: _room,\n protocol: _protocol,\n query: _query,\n protocols,\n ...socketOptions\n } = partySocketOptions;\n const _pk = id || generateUUID();\n const party = getPartyInfo(partySocketOptions, \"ws\", { _pk });\n return {\n _pk,\n _pkurl: party.partyUrl,\n name: party.name,\n room: party.room,\n host: party.host,\n path: party.path,\n protocols,\n socketOptions,\n urlProvider: party.urlProvider\n };\n}\n\nexport { PartySocket };\n//# sourceMappingURL=chunk-NLWAO4PP.mjs.map\n"],"names":[],"mappings":";;AAEA;AACA,IAAI,aAAa,GAAG,CAAC,YAAY;AACjC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,MAAM;AACxD,SAAS,YAAY,GAAG;AACxB,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,UAAU,EAAE;AAC1D,IAAI,OAAO,MAAM,CAAC,UAAU,EAAE;AAC9B,EAAE;AACF,EAAE,IAAI,CAAC,mBAAmB,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;AAC9C,EAAE,IAAI,EAAE;AACR,IAAI,CAAC,OAAO,WAAW,KAAK,WAAW;AACvC,MAAM,WAAW,CAAC,GAAG;AACrB,MAAM,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG;AAC7B,IAAI,CAAC;AACL,EAAE,OAAO,sCAAsC,C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