@doodle-engine/react 0.0.7 → 0.0.9

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/react.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Engine as ie } from "@doodle-engine/core";
2
- import { VERSION as De } from "@doodle-engine/core";
3
- import ue, { createContext as de, useState as C, useCallback as N, useContext as me, useRef as q, useEffect as D } from "react";
1
+ import { enableDevTools as ie, Engine as ue } from "@doodle-engine/core";
2
+ import { VERSION as Fe } from "@doodle-engine/core";
3
+ import de, { createContext as me, useState as T, useEffect as L, useCallback as j, useContext as he, useRef as U } from "react";
4
4
  var Z = { exports: {} }, z = {};
5
5
  /**
6
6
  * @license React
@@ -11,27 +11,27 @@ var Z = { exports: {} }, z = {};
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var ne;
15
- function he() {
16
- if (ne) return z;
17
- ne = 1;
18
- var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
19
- function r(a, l, o) {
20
- var m = null;
21
- if (o !== void 0 && (m = "" + o), l.key !== void 0 && (m = "" + l.key), "key" in l) {
22
- o = {};
23
- for (var h in l)
24
- h !== "key" && (o[h] = l[h]);
25
- } else o = l;
26
- return l = o.ref, {
27
- $$typeof: t,
14
+ var se;
15
+ function ve() {
16
+ if (se) return z;
17
+ se = 1;
18
+ var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
19
+ function r(a, o, c) {
20
+ var d = null;
21
+ if (c !== void 0 && (d = "" + c), o.key !== void 0 && (d = "" + o.key), "key" in o) {
22
+ c = {};
23
+ for (var m in o)
24
+ m !== "key" && (c[m] = o[m]);
25
+ } else c = o;
26
+ return o = c.ref, {
27
+ $$typeof: n,
28
28
  type: a,
29
- key: m,
30
- ref: l !== void 0 ? l : null,
31
- props: o
29
+ key: d,
30
+ ref: o !== void 0 ? o : null,
31
+ props: c
32
32
  };
33
33
  }
34
- return z.Fragment = s, z.jsx = r, z.jsxs = r, z;
34
+ return z.Fragment = t, z.jsx = r, z.jsxs = r, z;
35
35
  }
36
36
  var B = {};
37
37
  /**
@@ -43,470 +43,477 @@ var B = {};
43
43
  * This source code is licensed under the MIT license found in the
44
44
  * LICENSE file in the root directory of this source tree.
45
45
  */
46
- var te;
47
- function ve() {
48
- return te || (te = 1, process.env.NODE_ENV !== "production" && (function() {
49
- function t(n) {
50
- if (n == null) return null;
51
- if (typeof n == "function")
52
- return n.$$typeof === y ? null : n.displayName || n.name || null;
53
- if (typeof n == "string") return n;
54
- switch (n) {
46
+ var ne;
47
+ function pe() {
48
+ return ne || (ne = 1, process.env.NODE_ENV !== "production" && (function() {
49
+ function n(s) {
50
+ if (s == null) return null;
51
+ if (typeof s == "function")
52
+ return s.$$typeof === N ? null : s.displayName || s.name || null;
53
+ if (typeof s == "string") return s;
54
+ switch (s) {
55
55
  case u:
56
56
  return "Fragment";
57
- case G:
57
+ case $:
58
58
  return "Profiler";
59
- case _:
59
+ case h:
60
60
  return "StrictMode";
61
- case A:
61
+ case W:
62
62
  return "Suspense";
63
- case F:
63
+ case R:
64
64
  return "SuspenseList";
65
- case v:
65
+ case p:
66
66
  return "Activity";
67
67
  }
68
- if (typeof n == "object")
69
- switch (typeof n.tag == "number" && console.error(
68
+ if (typeof s == "object")
69
+ switch (typeof s.tag == "number" && console.error(
70
70
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
71
- ), n.$$typeof) {
72
- case i:
71
+ ), s.$$typeof) {
72
+ case S:
73
73
  return "Portal";
74
- case W:
75
- return n.displayName || "Context";
76
- case L:
77
- return (n._context.displayName || "Context") + ".Consumer";
78
- case J:
79
- var c = n.render;
80
- return n = n.displayName, n || (n = c.displayName || c.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
81
- case p:
82
- return c = n.displayName || null, c !== null ? c : t(n.type) || "Memo";
83
- case d:
84
- c = n._payload, n = n._init;
74
+ case q:
75
+ return s.displayName || "Context";
76
+ case M:
77
+ return (s._context.displayName || "Context") + ".Consumer";
78
+ case Y:
79
+ var i = s.render;
80
+ return s = s.displayName, s || (s = i.displayName || i.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
81
+ case I:
82
+ return i = s.displayName || null, i !== null ? i : n(s.type) || "Memo";
83
+ case l:
84
+ i = s._payload, s = s._init;
85
85
  try {
86
- return t(n(c));
86
+ return n(s(i));
87
87
  } catch {
88
88
  }
89
89
  }
90
90
  return null;
91
91
  }
92
- function s(n) {
93
- return "" + n;
92
+ function t(s) {
93
+ return "" + s;
94
94
  }
95
- function r(n) {
95
+ function r(s) {
96
96
  try {
97
- s(n);
98
- var c = !1;
97
+ t(s);
98
+ var i = !1;
99
99
  } catch {
100
- c = !0;
100
+ i = !0;
101
101
  }
102
- if (c) {
103
- c = console;
104
- var j = c.error, S = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
105
- return j.call(
106
- c,
102
+ if (i) {
103
+ i = console;
104
+ var f = i.error, k = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
105
+ return f.call(
106
+ i,
107
107
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
- S
109
- ), s(n);
108
+ k
109
+ ), t(s);
110
110
  }
111
111
  }
112
- function a(n) {
113
- if (n === u) return "<>";
114
- if (typeof n == "object" && n !== null && n.$$typeof === d)
112
+ function a(s) {
113
+ if (s === u) return "<>";
114
+ if (typeof s == "object" && s !== null && s.$$typeof === l)
115
115
  return "<...>";
116
116
  try {
117
- var c = t(n);
118
- return c ? "<" + c + ">" : "<...>";
117
+ var i = n(s);
118
+ return i ? "<" + i + ">" : "<...>";
119
119
  } catch {
120
120
  return "<...>";
121
121
  }
122
122
  }
123
- function l() {
124
- var n = O.A;
125
- return n === null ? null : n.getOwner();
126
- }
127
123
  function o() {
124
+ var s = A.A;
125
+ return s === null ? null : s.getOwner();
126
+ }
127
+ function c() {
128
128
  return Error("react-stack-top-frame");
129
129
  }
130
- function m(n) {
131
- if (M.call(n, "key")) {
132
- var c = Object.getOwnPropertyDescriptor(n, "key").get;
133
- if (c && c.isReactWarning) return !1;
130
+ function d(s) {
131
+ if (V.call(s, "key")) {
132
+ var i = Object.getOwnPropertyDescriptor(s, "key").get;
133
+ if (i && i.isReactWarning) return !1;
134
134
  }
135
- return n.key !== void 0;
135
+ return s.key !== void 0;
136
136
  }
137
- function h(n, c) {
138
- function j() {
137
+ function m(s, i) {
138
+ function f() {
139
139
  P || (P = !0, console.error(
140
140
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
141
- c
141
+ i
142
142
  ));
143
143
  }
144
- j.isReactWarning = !0, Object.defineProperty(n, "key", {
145
- get: j,
144
+ f.isReactWarning = !0, Object.defineProperty(s, "key", {
145
+ get: f,
146
146
  configurable: !0
147
147
  });
148
148
  }
149
- function f() {
150
- var n = t(this.type);
151
- return I[n] || (I[n] = !0, console.error(
149
+ function v() {
150
+ var s = n(this.type);
151
+ return D[s] || (D[s] = !0, console.error(
152
152
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
153
- )), n = this.props.ref, n !== void 0 ? n : null;
153
+ )), s = this.props.ref, s !== void 0 ? s : null;
154
154
  }
155
- function b(n, c, j, S, H, K) {
156
- var k = j.ref;
157
- return n = {
155
+ function b(s, i, f, k, H, K) {
156
+ var y = f.ref;
157
+ return s = {
158
158
  $$typeof: w,
159
- type: n,
160
- key: c,
161
- props: j,
162
- _owner: S
163
- }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(n, "ref", {
159
+ type: s,
160
+ key: i,
161
+ props: f,
162
+ _owner: k
163
+ }, (y !== void 0 ? y : null) !== null ? Object.defineProperty(s, "ref", {
164
164
  enumerable: !1,
165
- get: f
166
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
165
+ get: v
166
+ }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
170
  value: 0
171
- }), Object.defineProperty(n, "_debugInfo", {
171
+ }), Object.defineProperty(s, "_debugInfo", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
175
  value: null
176
- }), Object.defineProperty(n, "_debugStack", {
176
+ }), Object.defineProperty(s, "_debugStack", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
180
  value: H
181
- }), Object.defineProperty(n, "_debugTask", {
181
+ }), Object.defineProperty(s, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
185
  value: K
186
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
186
+ }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
187
187
  }
188
- function x(n, c, j, S, H, K) {
189
- var k = c.children;
190
- if (k !== void 0)
191
- if (S)
192
- if (Y(k)) {
193
- for (S = 0; S < k.length; S++)
194
- R(k[S]);
195
- Object.freeze && Object.freeze(k);
188
+ function x(s, i, f, k, H, K) {
189
+ var y = i.children;
190
+ if (y !== void 0)
191
+ if (k)
192
+ if (G(y)) {
193
+ for (k = 0; k < y.length; k++)
194
+ _(y[k]);
195
+ Object.freeze && Object.freeze(y);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else R(k);
201
- if (M.call(c, "key")) {
202
- k = t(n);
203
- var U = Object.keys(c).filter(function(ce) {
200
+ else _(y);
201
+ if (V.call(i, "key")) {
202
+ y = n(s);
203
+ var J = Object.keys(i).filter(function(ce) {
204
204
  return ce !== "key";
205
205
  });
206
- S = 0 < U.length ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}", V[k + S] || (U = 0 < U.length ? "{" + U.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ k = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", g[y + k] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- S,
214
213
  k,
215
- U,
216
- k
217
- ), V[k + S] = !0);
214
+ y,
215
+ J,
216
+ y
217
+ ), g[y + k] = !0);
218
218
  }
219
- if (k = null, j !== void 0 && (r(j), k = "" + j), m(c) && (r(c.key), k = "" + c.key), "key" in c) {
220
- j = {};
221
- for (var ee in c)
222
- ee !== "key" && (j[ee] = c[ee]);
223
- } else j = c;
224
- return k && h(
225
- j,
226
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
219
+ if (y = null, f !== void 0 && (r(f), y = "" + f), d(i) && (r(i.key), y = "" + i.key), "key" in i) {
220
+ f = {};
221
+ for (var ee in i)
222
+ ee !== "key" && (f[ee] = i[ee]);
223
+ } else f = i;
224
+ return y && m(
225
+ f,
226
+ typeof s == "function" ? s.displayName || s.name || "Unknown" : s
227
227
  ), b(
228
- n,
229
- k,
230
- j,
231
- l(),
228
+ s,
229
+ y,
230
+ f,
231
+ o(),
232
232
  H,
233
233
  K
234
234
  );
235
235
  }
236
- function R(n) {
237
- T(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === d && (n._payload.status === "fulfilled" ? T(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
+ function _(s) {
237
+ C(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === l && (s._payload.status === "fulfilled" ? C(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
238
238
  }
239
- function T(n) {
240
- return typeof n == "object" && n !== null && n.$$typeof === w;
239
+ function C(s) {
240
+ return typeof s == "object" && s !== null && s.$$typeof === w;
241
241
  }
242
- var E = ue, w = Symbol.for("react.transitional.element"), i = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), L = Symbol.for("react.consumer"), W = Symbol.for("react.context"), J = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), y = Symbol.for("react.client.reference"), O = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, Y = Array.isArray, $ = console.createTask ? console.createTask : function() {
242
+ var E = de, w = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), q = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), p = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), A = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, G = Array.isArray, O = console.createTask ? console.createTask : function() {
243
243
  return null;
244
244
  };
245
245
  E = {
246
- react_stack_bottom_frame: function(n) {
247
- return n();
246
+ react_stack_bottom_frame: function(s) {
247
+ return s();
248
248
  }
249
249
  };
250
- var P, I = {}, X = E.react_stack_bottom_frame.bind(
250
+ var P, D = {}, F = E.react_stack_bottom_frame.bind(
251
251
  E,
252
- o
253
- )(), g = $(a(o)), V = {};
254
- B.Fragment = u, B.jsx = function(n, c, j) {
255
- var S = 1e4 > O.recentlyCreatedOwnerStacks++;
252
+ c
253
+ )(), X = O(a(c)), g = {};
254
+ B.Fragment = u, B.jsx = function(s, i, f) {
255
+ var k = 1e4 > A.recentlyCreatedOwnerStacks++;
256
256
  return x(
257
- n,
258
- c,
259
- j,
257
+ s,
258
+ i,
259
+ f,
260
260
  !1,
261
- S ? Error("react-stack-top-frame") : X,
262
- S ? $(a(n)) : g
261
+ k ? Error("react-stack-top-frame") : F,
262
+ k ? O(a(s)) : X
263
263
  );
264
- }, B.jsxs = function(n, c, j) {
265
- var S = 1e4 > O.recentlyCreatedOwnerStacks++;
264
+ }, B.jsxs = function(s, i, f) {
265
+ var k = 1e4 > A.recentlyCreatedOwnerStacks++;
266
266
  return x(
267
- n,
268
- c,
269
- j,
267
+ s,
268
+ i,
269
+ f,
270
270
  !0,
271
- S ? Error("react-stack-top-frame") : X,
272
- S ? $(a(n)) : g
271
+ k ? Error("react-stack-top-frame") : F,
272
+ k ? O(a(s)) : X
273
273
  );
274
274
  };
275
275
  })()), B;
276
276
  }
277
- var se;
278
- function pe() {
279
- return se || (se = 1, process.env.NODE_ENV === "production" ? Z.exports = he() : Z.exports = ve()), Z.exports;
277
+ var te;
278
+ function fe() {
279
+ return te || (te = 1, process.env.NODE_ENV === "production" ? Z.exports = ve() : Z.exports = pe()), Z.exports;
280
280
  }
281
- var e = pe();
282
- const ae = de(null);
283
- function fe({ engine: t, initialSnapshot: s, children: r }) {
284
- const [a, l] = C(s), o = N(
285
- (i) => {
286
- const u = t.selectChoice(i);
287
- l(u);
281
+ var e = fe();
282
+ const ae = me(null);
283
+ function xe({ engine: n, initialSnapshot: t, children: r, devTools: a = !1 }) {
284
+ const [o, c] = T(t);
285
+ L(() => {
286
+ if (a)
287
+ return ie(n, () => c(n.getSnapshot())), () => {
288
+ delete window.doodle;
289
+ };
290
+ }, [n, a]);
291
+ const d = j(
292
+ (u) => {
293
+ const h = n.selectChoice(u);
294
+ c(h);
288
295
  },
289
- [t]
290
- ), m = N(
291
- (i) => {
292
- const u = t.talkTo(i);
293
- l(u);
296
+ [n]
297
+ ), m = j(
298
+ (u) => {
299
+ const h = n.talkTo(u);
300
+ c(h);
294
301
  },
295
- [t]
296
- ), h = N(
297
- (i) => {
298
- const u = t.takeItem(i);
299
- l(u);
302
+ [n]
303
+ ), v = j(
304
+ (u) => {
305
+ const h = n.takeItem(u);
306
+ c(h);
300
307
  },
301
- [t]
302
- ), f = N(
303
- (i) => {
304
- const u = t.travelTo(i);
305
- l(u);
308
+ [n]
309
+ ), b = j(
310
+ (u) => {
311
+ const h = n.travelTo(u);
312
+ c(h);
306
313
  },
307
- [t]
308
- ), b = N(
309
- (i, u) => {
310
- const _ = t.writeNote(i, u);
311
- l(_);
314
+ [n]
315
+ ), x = j(
316
+ (u, h) => {
317
+ const $ = n.writeNote(u, h);
318
+ c($);
312
319
  },
313
- [t]
314
- ), x = N(
315
- (i) => {
316
- const u = t.deleteNote(i);
317
- l(u);
320
+ [n]
321
+ ), _ = j(
322
+ (u) => {
323
+ const h = n.deleteNote(u);
324
+ c(h);
318
325
  },
319
- [t]
320
- ), R = N(
321
- (i) => {
322
- const u = t.setLocale(i);
323
- l(u);
326
+ [n]
327
+ ), C = j(
328
+ (u) => {
329
+ const h = n.setLocale(u);
330
+ c(h);
324
331
  },
325
- [t]
326
- ), T = N(() => t.saveGame(), [t]), E = N(
327
- (i) => {
328
- const u = t.loadGame(i);
329
- l(u);
332
+ [n]
333
+ ), E = j(() => n.saveGame(), [n]), w = j(
334
+ (u) => {
335
+ const h = n.loadGame(u);
336
+ c(h);
330
337
  },
331
- [t]
332
- ), w = {
333
- snapshot: a,
338
+ [n]
339
+ ), S = {
340
+ snapshot: o,
334
341
  actions: {
335
- selectChoice: o,
342
+ selectChoice: d,
336
343
  talkTo: m,
337
- takeItem: h,
338
- travelTo: f,
339
- writeNote: b,
340
- deleteNote: x,
341
- setLocale: R,
342
- saveGame: T,
343
- loadGame: E
344
+ takeItem: v,
345
+ travelTo: b,
346
+ writeNote: x,
347
+ deleteNote: _,
348
+ setLocale: C,
349
+ saveGame: E,
350
+ loadGame: w
344
351
  }
345
352
  };
346
- return /* @__PURE__ */ e.jsx(ae.Provider, { value: w, children: r });
353
+ return /* @__PURE__ */ e.jsx(ae.Provider, { value: S, children: r });
347
354
  }
348
355
  function re() {
349
- const t = me(ae);
350
- if (!t)
356
+ const n = he(ae);
357
+ if (!n)
351
358
  throw new Error("useGame must be used within a GameProvider");
352
- return t;
359
+ return n;
353
360
  }
354
- function le(t, s = {}) {
355
- var p;
361
+ function le(n, t = {}) {
362
+ var I;
356
363
  const {
357
364
  audioBasePath: r = "/audio",
358
365
  masterVolume: a = 1,
359
- musicVolume: l = 0.7,
360
- soundVolume: o = 0.8,
361
- voiceVolume: m = 1,
362
- crossfadeDuration: h = 1e3
363
- } = s, [f, b] = C(a), [x, R] = C(l), [T, E] = C(o), [w, i] = C(m), u = q(null), _ = q(null), G = q(null), L = q(null);
364
- D(() => {
365
- const d = new Audio();
366
- d.loop = !0, u.current = d;
367
- const v = new Audio();
368
- return _.current = v, () => {
369
- L.current && clearInterval(L.current), d.pause(), v.pause(), d.src = "", v.src = "";
366
+ musicVolume: o = 0.7,
367
+ soundVolume: c = 0.8,
368
+ voiceVolume: d = 1,
369
+ crossfadeDuration: m = 1e3
370
+ } = t, [v, b] = T(a), [x, _] = T(o), [C, E] = T(c), [w, S] = T(d), u = U(null), h = U(null), $ = U(null), M = U(null);
371
+ L(() => {
372
+ const l = new Audio();
373
+ l.loop = !0, u.current = l;
374
+ const p = new Audio();
375
+ return h.current = p, () => {
376
+ M.current && clearInterval(M.current), l.pause(), p.pause(), l.src = "", p.src = "";
370
377
  };
371
- }, []), D(() => {
372
- const d = u.current;
373
- if (!d) return;
374
- const v = t.music;
375
- if (v !== G.current)
376
- if (G.current = v, !v)
377
- J(d, h);
378
+ }, []), L(() => {
379
+ const l = u.current;
380
+ if (!l) return;
381
+ const p = n.music;
382
+ if (p !== $.current)
383
+ if ($.current = p, !p)
384
+ Y(l, m);
378
385
  else {
379
- const y = `${r}/music/${v}`;
380
- W(d, y, h);
386
+ const N = `${r}/music/${p}`;
387
+ q(l, N, m);
381
388
  }
382
- d.volume = f * x;
383
- }, [t.music, f, x, r, h]), D(() => {
384
- var y;
385
- const d = _.current;
386
- if (!d) return;
387
- const v = (y = t.dialogue) == null ? void 0 : y.voice;
388
- v && (d.pause(), d.currentTime = 0, d.src = `${r}/voice/${v}`, d.volume = f * w, d.play().catch((O) => {
389
- console.warn("Voice playback failed:", O);
389
+ l.volume = v * x;
390
+ }, [n.music, v, x, r, m]), L(() => {
391
+ var N;
392
+ const l = h.current;
393
+ if (!l) return;
394
+ const p = (N = n.dialogue) == null ? void 0 : N.voice;
395
+ p && (l.pause(), l.currentTime = 0, l.src = `${r}/voice/${p}`, l.volume = v * w, l.play().catch((A) => {
396
+ console.warn("Voice playback failed:", A);
390
397
  }));
391
- }, [(p = t.dialogue) == null ? void 0 : p.voice, f, w, r]), D(() => {
392
- t.pendingSounds.length !== 0 && t.pendingSounds.forEach((d) => {
393
- const v = new Audio(`${r}/sfx/${d}`);
394
- v.volume = f * T, v.play().catch((y) => {
395
- console.warn("Sound playback failed:", y);
398
+ }, [(I = n.dialogue) == null ? void 0 : I.voice, v, w, r]), L(() => {
399
+ n.pendingSounds.length !== 0 && n.pendingSounds.forEach((l) => {
400
+ const p = new Audio(`${r}/sfx/${l}`);
401
+ p.volume = v * C, p.play().catch((N) => {
402
+ console.warn("Sound playback failed:", N);
396
403
  });
397
404
  });
398
- }, [t.pendingSounds, f, T, r]);
399
- const W = (d, v, y) => {
400
- J(d, y / 2).then(() => {
401
- d.src = v, d.load(), d.volume = 0, d.play().then(() => {
402
- A(d, y / 2, f * x);
403
- }).catch((O) => {
404
- console.warn("Music playback failed:", O);
405
+ }, [n.pendingSounds, v, C, r]);
406
+ const q = (l, p, N) => {
407
+ Y(l, N / 2).then(() => {
408
+ l.src = p, l.load(), l.volume = 0, l.play().then(() => {
409
+ W(l, N / 2, v * x);
410
+ }).catch((A) => {
411
+ console.warn("Music playback failed:", A);
405
412
  });
406
413
  });
407
- }, J = (d, v) => new Promise((y) => {
408
- const O = d.volume, M = 20, Y = v / M, $ = O / M;
414
+ }, Y = (l, p) => new Promise((N) => {
415
+ const A = l.volume, V = 20, G = p / V, O = A / V;
409
416
  let P = 0;
410
- const I = setInterval(() => {
411
- P++, d.volume = Math.max(0, O - $ * P), P >= M && (clearInterval(I), d.pause(), d.currentTime = 0, y());
412
- }, Y);
413
- L.current = I;
414
- }), A = (d, v, y) => {
415
- const M = v / 20, Y = y / 20;
416
- let $ = 0;
417
+ const D = setInterval(() => {
418
+ P++, l.volume = Math.max(0, A - O * P), P >= V && (clearInterval(D), l.pause(), l.currentTime = 0, N());
419
+ }, G);
420
+ M.current = D;
421
+ }), W = (l, p, N) => {
422
+ const V = p / 20, G = N / 20;
423
+ let O = 0;
417
424
  const P = setInterval(() => {
418
- $++, d.volume = Math.min(y, Y * $), $ >= 20 && clearInterval(P);
419
- }, M);
420
- L.current = P;
425
+ O++, l.volume = Math.min(N, G * O), O >= 20 && clearInterval(P);
426
+ }, V);
427
+ M.current = P;
421
428
  };
422
429
  return {
423
430
  setMasterVolume: b,
424
- setMusicVolume: R,
431
+ setMusicVolume: _,
425
432
  setSoundVolume: E,
426
- setVoiceVolume: i,
433
+ setVoiceVolume: S,
427
434
  stopAll: () => {
428
- u.current && (u.current.pause(), u.current.currentTime = 0), _.current && (_.current.pause(), _.current.currentTime = 0);
435
+ u.current && (u.current.pause(), u.current.currentTime = 0), h.current && (h.current.pause(), h.current.currentTime = 0);
429
436
  }
430
437
  };
431
438
  }
432
- const xe = {
439
+ const je = {
433
440
  click: "click.ogg",
434
441
  menuOpen: "menu_open.ogg",
435
442
  menuClose: "menu_close.ogg"
436
443
  };
437
- function je(t = {}) {
444
+ function Ne(n = {}) {
438
445
  const {
439
- enabled: s = !0,
446
+ enabled: t = !0,
440
447
  basePath: r = "/audio/ui",
441
448
  volume: a = 0.5,
442
- sounds: l = {}
443
- } = t, [o, m] = C(s), [h, f] = C(a), b = q({ ...xe, ...l }), x = N(
444
- (i) => {
445
- if (!o || !i) return;
446
- const u = new Audio(`${r}/${i}`);
447
- u.volume = h, u.play().catch(() => {
449
+ sounds: o = {}
450
+ } = n, [c, d] = T(t), [m, v] = T(a), b = U({ ...je, ...o }), x = j(
451
+ (S) => {
452
+ if (!c || !S) return;
453
+ const u = new Audio(`${r}/${S}`);
454
+ u.volume = m, u.play().catch(() => {
448
455
  });
449
456
  },
450
- [o, h, r]
451
- ), R = N(
452
- (i) => {
453
- const u = b.current[i];
457
+ [c, m, r]
458
+ ), _ = j(
459
+ (S) => {
460
+ const u = b.current[S];
454
461
  u && x(u);
455
462
  },
456
463
  [x]
457
- ), T = N(() => x(b.current.click), [x]), E = N(() => x(b.current.menuOpen), [x]), w = N(() => x(b.current.menuClose), [x]);
464
+ ), C = j(() => x(b.current.click), [x]), E = j(() => x(b.current.menuOpen), [x]), w = j(() => x(b.current.menuClose), [x]);
458
465
  return {
459
- playClick: T,
466
+ playClick: C,
460
467
  playMenuOpen: E,
461
468
  playMenuClose: w,
462
- playSound: R,
463
- setEnabled: m,
464
- setVolume: f,
465
- enabled: o,
466
- volume: h
469
+ playSound: _,
470
+ setEnabled: d,
471
+ setVolume: v,
472
+ enabled: c,
473
+ volume: m
467
474
  };
468
475
  }
469
- function Ne({ dialogue: t, className: s = "" }) {
470
- return /* @__PURE__ */ e.jsxs("div", { className: `dialogue-box ${s}`, children: [
471
- t.portrait && /* @__PURE__ */ e.jsx("div", { className: "dialogue-portrait", children: /* @__PURE__ */ e.jsx("img", { src: t.portrait, alt: t.speakerName }) }),
476
+ function ge({ dialogue: n, className: t = "" }) {
477
+ return /* @__PURE__ */ e.jsxs("div", { className: `dialogue-box ${t}`, children: [
478
+ n.portrait && /* @__PURE__ */ e.jsx("div", { className: "dialogue-portrait", children: /* @__PURE__ */ e.jsx("img", { src: n.portrait, alt: n.speakerName }) }),
472
479
  /* @__PURE__ */ e.jsxs("div", { className: "dialogue-content", children: [
473
- /* @__PURE__ */ e.jsx("div", { className: "dialogue-speaker", children: t.speakerName }),
474
- /* @__PURE__ */ e.jsx("div", { className: "dialogue-text", children: t.text })
480
+ /* @__PURE__ */ e.jsx("div", { className: "dialogue-speaker", children: n.speakerName }),
481
+ /* @__PURE__ */ e.jsx("div", { className: "dialogue-text", children: n.text })
475
482
  ] })
476
483
  ] });
477
484
  }
478
- function ge({ choices: t, onSelectChoice: s, className: r = "" }) {
479
- return t.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `choice-list ${r}`, children: t.map((a) => /* @__PURE__ */ e.jsx(
485
+ function be({ choices: n, onSelectChoice: t, className: r = "" }) {
486
+ return n.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `choice-list ${r}`, children: n.map((a) => /* @__PURE__ */ e.jsx(
480
487
  "button",
481
488
  {
482
489
  className: "choice-button",
483
- onClick: () => s(a.id),
490
+ onClick: () => t(a.id),
484
491
  children: a.text
485
492
  },
486
493
  a.id
487
494
  )) });
488
495
  }
489
- function be({ location: t, className: s = "" }) {
490
- return /* @__PURE__ */ e.jsxs("div", { className: `location-view ${s}`, children: [
491
- t.banner && /* @__PURE__ */ e.jsx("div", { className: "location-banner", children: /* @__PURE__ */ e.jsx("img", { src: t.banner, alt: t.name }) }),
496
+ function Se({ location: n, className: t = "" }) {
497
+ return /* @__PURE__ */ e.jsxs("div", { className: `location-view ${t}`, children: [
498
+ n.banner && /* @__PURE__ */ e.jsx("div", { className: "location-banner", children: /* @__PURE__ */ e.jsx("img", { src: n.banner, alt: n.name }) }),
492
499
  /* @__PURE__ */ e.jsxs("div", { className: "location-content", children: [
493
- /* @__PURE__ */ e.jsx("h1", { className: "location-name", children: t.name }),
494
- /* @__PURE__ */ e.jsx("p", { className: "location-description", children: t.description })
500
+ /* @__PURE__ */ e.jsx("h1", { className: "location-name", children: n.name }),
501
+ /* @__PURE__ */ e.jsx("p", { className: "location-description", children: n.description })
495
502
  ] })
496
503
  ] });
497
504
  }
498
- function Se({
499
- characters: t,
500
- onTalkTo: s,
505
+ function ke({
506
+ characters: n,
507
+ onTalkTo: t,
501
508
  className: r = ""
502
509
  }) {
503
- return t.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: `character-list ${r}`, children: [
510
+ return n.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: `character-list ${r}`, children: [
504
511
  /* @__PURE__ */ e.jsx("h2", { children: "Characters" }),
505
- /* @__PURE__ */ e.jsx("div", { className: "character-grid", children: t.map((a) => /* @__PURE__ */ e.jsxs(
512
+ /* @__PURE__ */ e.jsx("div", { className: "character-grid", children: n.map((a) => /* @__PURE__ */ e.jsxs(
506
513
  "button",
507
514
  {
508
515
  className: "character-card",
509
- onClick: () => s(a.id),
516
+ onClick: () => t(a.id),
510
517
  children: [
511
518
  a.portrait && /* @__PURE__ */ e.jsx(
512
519
  "img",
@@ -523,23 +530,23 @@ function Se({
523
530
  )) })
524
531
  ] });
525
532
  }
526
- function ke({ items: t, className: s = "" }) {
527
- const [r, a] = C(null);
528
- return /* @__PURE__ */ e.jsxs("div", { className: `inventory ${s}`, children: [
533
+ function ye({ items: n, className: t = "" }) {
534
+ const [r, a] = T(null);
535
+ return /* @__PURE__ */ e.jsxs("div", { className: `inventory ${t}`, children: [
529
536
  /* @__PURE__ */ e.jsx("h2", { children: "Inventory" }),
530
- t.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "inventory-empty", children: "No items" }) : /* @__PURE__ */ e.jsx("div", { className: "inventory-grid", children: t.map((l) => /* @__PURE__ */ e.jsxs(
537
+ n.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "inventory-empty", children: "No items" }) : /* @__PURE__ */ e.jsx("div", { className: "inventory-grid", children: n.map((o) => /* @__PURE__ */ e.jsxs(
531
538
  "div",
532
539
  {
533
540
  className: "inventory-item",
534
- onClick: () => a(l),
541
+ onClick: () => a(o),
535
542
  children: [
536
- l.icon && /* @__PURE__ */ e.jsx("img", { src: l.icon, alt: l.name, className: "item-icon" }),
537
- /* @__PURE__ */ e.jsx("div", { className: "item-name", children: l.name })
543
+ o.icon && /* @__PURE__ */ e.jsx("img", { src: o.icon, alt: o.name, className: "item-icon" }),
544
+ /* @__PURE__ */ e.jsx("div", { className: "item-name", children: o.name })
538
545
  ]
539
546
  },
540
- l.id
547
+ o.id
541
548
  )) }),
542
- r && /* @__PURE__ */ e.jsx("div", { className: "item-modal-overlay", onClick: () => a(null), children: /* @__PURE__ */ e.jsxs("div", { className: "item-modal", onClick: (l) => l.stopPropagation(), children: [
549
+ r && /* @__PURE__ */ e.jsx("div", { className: "item-modal-overlay", onClick: () => a(null), children: /* @__PURE__ */ e.jsxs("div", { className: "item-modal", onClick: (o) => o.stopPropagation(), children: [
543
550
  r.image && /* @__PURE__ */ e.jsx("img", { src: r.image, alt: r.name, className: "item-modal-image" }),
544
551
  /* @__PURE__ */ e.jsx("h3", { className: "item-modal-name", children: r.name }),
545
552
  /* @__PURE__ */ e.jsx("p", { className: "item-modal-description", children: r.description }),
@@ -547,33 +554,33 @@ function ke({ items: t, className: s = "" }) {
547
554
  ] }) })
548
555
  ] });
549
556
  }
550
- function ye({ quests: t, entries: s, className: r = "" }) {
557
+ function Ee({ quests: n, entries: t, className: r = "" }) {
551
558
  return /* @__PURE__ */ e.jsxs("div", { className: `journal ${r}`, children: [
552
559
  /* @__PURE__ */ e.jsx("h2", { children: "Journal" }),
553
- t.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-quests", children: [
560
+ n.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-quests", children: [
554
561
  /* @__PURE__ */ e.jsx("h3", { children: "Active Quests" }),
555
- t.map((a) => /* @__PURE__ */ e.jsxs("div", { className: "quest-entry", children: [
562
+ n.map((a) => /* @__PURE__ */ e.jsxs("div", { className: "quest-entry", children: [
556
563
  /* @__PURE__ */ e.jsx("div", { className: "quest-name", children: a.name }),
557
564
  /* @__PURE__ */ e.jsx("div", { className: "quest-description", children: a.description }),
558
565
  /* @__PURE__ */ e.jsx("div", { className: "quest-stage", children: a.currentStageDescription })
559
566
  ] }, a.id))
560
567
  ] }),
561
- s.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-entries", children: [
568
+ t.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "journal-entries", children: [
562
569
  /* @__PURE__ */ e.jsx("h3", { children: "Entries" }),
563
- s.map((a) => /* @__PURE__ */ e.jsxs("div", { className: `journal-entry journal-category-${a.category}`, children: [
570
+ t.map((a) => /* @__PURE__ */ e.jsxs("div", { className: `journal-entry journal-category-${a.category}`, children: [
564
571
  /* @__PURE__ */ e.jsx("div", { className: "entry-title", children: a.title }),
565
572
  /* @__PURE__ */ e.jsx("div", { className: "entry-text", children: a.text })
566
573
  ] }, a.id))
567
574
  ] }),
568
- t.length === 0 && s.length === 0 && /* @__PURE__ */ e.jsx("p", { className: "journal-empty", children: "No entries yet" })
575
+ n.length === 0 && t.length === 0 && /* @__PURE__ */ e.jsx("p", { className: "journal-empty", children: "No entries yet" })
569
576
  ] });
570
577
  }
571
- function Ee({ map: t, onTravelTo: s, className: r = "" }) {
572
- return t ? /* @__PURE__ */ e.jsxs("div", { className: `map-view ${r}`, children: [
573
- /* @__PURE__ */ e.jsx("h2", { children: t.name }),
578
+ function we({ map: n, onTravelTo: t, className: r = "" }) {
579
+ return n ? /* @__PURE__ */ e.jsxs("div", { className: `map-view ${r}`, children: [
580
+ /* @__PURE__ */ e.jsx("h2", { children: n.name }),
574
581
  /* @__PURE__ */ e.jsxs("div", { className: "map-container", style: { position: "relative" }, children: [
575
- t.image && /* @__PURE__ */ e.jsx("img", { src: t.image, alt: t.name, className: "map-image" }),
576
- t.locations.map((a) => /* @__PURE__ */ e.jsx(
582
+ n.image && /* @__PURE__ */ e.jsx("img", { src: n.image, alt: n.name, className: "map-image" }),
583
+ n.locations.map((a) => /* @__PURE__ */ e.jsx(
577
584
  "button",
578
585
  {
579
586
  className: `map-marker ${a.isCurrent ? "current" : ""}`,
@@ -582,7 +589,7 @@ function Ee({ map: t, onTravelTo: s, className: r = "" }) {
582
589
  left: `${a.x}px`,
583
590
  top: `${a.y}px`
584
591
  },
585
- onClick: () => !a.isCurrent && s(a.id),
592
+ onClick: () => !a.isCurrent && t(a.id),
586
593
  disabled: a.isCurrent,
587
594
  title: a.name,
588
595
  children: a.name
@@ -593,140 +600,140 @@ function Ee({ map: t, onTravelTo: s, className: r = "" }) {
593
600
  ] }) : null;
594
601
  }
595
602
  function Te({
596
- notifications: t,
597
- className: s = ""
603
+ notifications: n,
604
+ className: t = ""
598
605
  }) {
599
- return t.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `notification-area ${s}`, children: t.map((r, a) => /* @__PURE__ */ e.jsx("div", { className: "notification", children: r }, a)) });
606
+ return n.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: `notification-area ${t}`, children: n.map((r, a) => /* @__PURE__ */ e.jsx("div", { className: "notification", children: r }, a)) });
600
607
  }
601
- function we({
602
- onSave: t,
603
- onLoad: s,
608
+ function _e({
609
+ onSave: n,
610
+ onLoad: t,
604
611
  storageKey: r = "doodle-engine-save",
605
612
  className: a = ""
606
613
  }) {
607
- const [l, o] = C(""), m = () => {
608
- const b = t();
609
- localStorage.setItem(r, JSON.stringify(b)), o("Saved!"), setTimeout(() => o(""), 2e3);
610
- }, h = () => {
614
+ const [o, c] = T(""), d = () => {
615
+ const b = n();
616
+ localStorage.setItem(r, JSON.stringify(b)), c("Saved!"), setTimeout(() => c(""), 2e3);
617
+ }, m = () => {
611
618
  const b = localStorage.getItem(r);
612
619
  if (!b) {
613
- o("No save found"), setTimeout(() => o(""), 2e3);
620
+ c("No save found"), setTimeout(() => c(""), 2e3);
614
621
  return;
615
622
  }
616
623
  const x = JSON.parse(b);
617
- s(x), o("Loaded!"), setTimeout(() => o(""), 2e3);
618
- }, f = localStorage.getItem(r) !== null;
624
+ t(x), c("Loaded!"), setTimeout(() => c(""), 2e3);
625
+ }, v = localStorage.getItem(r) !== null;
619
626
  return /* @__PURE__ */ e.jsxs("div", { className: `save-load-panel ${a}`, children: [
620
- /* @__PURE__ */ e.jsx("button", { className: "save-button", onClick: m, children: "Save" }),
621
- /* @__PURE__ */ e.jsx("button", { className: "load-button", onClick: h, disabled: !f, children: "Load" }),
622
- l && /* @__PURE__ */ e.jsx("span", { className: "save-load-message", children: l })
627
+ /* @__PURE__ */ e.jsx("button", { className: "save-button", onClick: d, children: "Save" }),
628
+ /* @__PURE__ */ e.jsx("button", { className: "load-button", onClick: m, disabled: !v, children: "Load" }),
629
+ o && /* @__PURE__ */ e.jsx("span", { className: "save-load-message", children: o })
623
630
  ] });
624
631
  }
625
- function _e({ className: t = "" }) {
626
- const { snapshot: s, actions: r } = re();
627
- le(s);
628
- const a = Object.entries(s.variables).filter(([l]) => !l.startsWith("_"));
629
- return /* @__PURE__ */ e.jsxs("div", { className: `game-renderer ${t}`, children: [
630
- /* @__PURE__ */ e.jsx(Te, { notifications: s.notifications }),
632
+ function Ce({ className: n = "" }) {
633
+ const { snapshot: t, actions: r } = re();
634
+ le(t);
635
+ const a = Object.entries(t.variables).filter(([o]) => !o.startsWith("_"));
636
+ return /* @__PURE__ */ e.jsxs("div", { className: `game-renderer ${n}`, children: [
637
+ /* @__PURE__ */ e.jsx(Te, { notifications: t.notifications }),
631
638
  /* @__PURE__ */ e.jsxs("div", { className: "game-main", children: [
632
- /* @__PURE__ */ e.jsx(be, { location: s.location }),
633
- s.dialogue && /* @__PURE__ */ e.jsxs("div", { className: "dialogue-container", children: [
634
- /* @__PURE__ */ e.jsx(Ne, { dialogue: s.dialogue }),
635
- /* @__PURE__ */ e.jsx(ge, { choices: s.choices, onSelectChoice: r.selectChoice })
639
+ /* @__PURE__ */ e.jsx(Se, { location: t.location }),
640
+ t.dialogue && /* @__PURE__ */ e.jsxs("div", { className: "dialogue-container", children: [
641
+ /* @__PURE__ */ e.jsx(ge, { dialogue: t.dialogue }),
642
+ /* @__PURE__ */ e.jsx(be, { choices: t.choices, onSelectChoice: r.selectChoice })
636
643
  ] }),
637
- !s.dialogue && /* @__PURE__ */ e.jsx(
638
- Se,
644
+ !t.dialogue && /* @__PURE__ */ e.jsx(
645
+ ke,
639
646
  {
640
- characters: s.charactersHere,
647
+ characters: t.charactersHere,
641
648
  onTalkTo: r.talkTo
642
649
  }
643
650
  )
644
651
  ] }),
645
652
  /* @__PURE__ */ e.jsxs("div", { className: "game-sidebar", children: [
646
- /* @__PURE__ */ e.jsx(we, { onSave: r.saveGame, onLoad: r.loadGame }),
653
+ /* @__PURE__ */ e.jsx(_e, { onSave: r.saveGame, onLoad: r.loadGame }),
647
654
  a.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "resources", children: [
648
655
  /* @__PURE__ */ e.jsx("h2", { children: "Resources" }),
649
- /* @__PURE__ */ e.jsx("ul", { className: "resources-list", children: a.map(([l, o]) => /* @__PURE__ */ e.jsxs("li", { className: "resource-entry", children: [
650
- /* @__PURE__ */ e.jsx("span", { className: "resource-name", children: l }),
651
- /* @__PURE__ */ e.jsx("span", { className: "resource-value", children: o })
652
- ] }, l)) })
656
+ /* @__PURE__ */ e.jsx("ul", { className: "resources-list", children: a.map(([o, c]) => /* @__PURE__ */ e.jsxs("li", { className: "resource-entry", children: [
657
+ /* @__PURE__ */ e.jsx("span", { className: "resource-name", children: o }),
658
+ /* @__PURE__ */ e.jsx("span", { className: "resource-value", children: c })
659
+ ] }, o)) })
653
660
  ] }),
654
- s.party.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "party", children: [
661
+ t.party.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "party", children: [
655
662
  /* @__PURE__ */ e.jsx("h2", { children: "Party" }),
656
- /* @__PURE__ */ e.jsx("ul", { className: "party-list", children: s.party.map((l) => /* @__PURE__ */ e.jsx("li", { className: "party-member", children: /* @__PURE__ */ e.jsx("span", { className: "party-member-name", children: l.name }) }, l.id)) })
663
+ /* @__PURE__ */ e.jsx("ul", { className: "party-list", children: t.party.map((o) => /* @__PURE__ */ e.jsx("li", { className: "party-member", children: /* @__PURE__ */ e.jsx("span", { className: "party-member-name", children: o.name }) }, o.id)) })
657
664
  ] }),
658
- /* @__PURE__ */ e.jsx(ke, { items: s.inventory }),
659
- /* @__PURE__ */ e.jsx(ye, { quests: s.quests, entries: s.journal }),
660
- s.map && /* @__PURE__ */ e.jsx(Ee, { map: s.map, onTravelTo: r.travelTo })
665
+ /* @__PURE__ */ e.jsx(ye, { items: t.inventory }),
666
+ /* @__PURE__ */ e.jsx(Ee, { quests: t.quests, entries: t.journal }),
667
+ t.map && /* @__PURE__ */ e.jsx(we, { map: t.map, onTravelTo: r.travelTo })
661
668
  ] })
662
669
  ] });
663
670
  }
664
- function Ce({
665
- logoSrc: t,
666
- title: s,
671
+ function Re({
672
+ logoSrc: n,
673
+ title: t,
667
674
  onComplete: r,
668
675
  duration: a = 2e3,
669
- className: l = ""
676
+ className: o = ""
670
677
  }) {
671
- return D(() => {
672
- const o = setTimeout(r, a);
673
- return () => clearTimeout(o);
674
- }, [r, a]), /* @__PURE__ */ e.jsxs("div", { className: `splash-screen ${l}`, onClick: r, children: [
675
- t && /* @__PURE__ */ e.jsx("img", { src: t, alt: s || "", className: "splash-logo" }),
676
- s && /* @__PURE__ */ e.jsx("h1", { className: "splash-title", children: s }),
678
+ return L(() => {
679
+ const c = setTimeout(r, a);
680
+ return () => clearTimeout(c);
681
+ }, [r, a]), /* @__PURE__ */ e.jsxs("div", { className: `splash-screen ${o}`, onClick: r, children: [
682
+ n && /* @__PURE__ */ e.jsx("img", { src: n, alt: t || "", className: "splash-logo" }),
683
+ t && /* @__PURE__ */ e.jsx("h1", { className: "splash-title", children: t }),
677
684
  /* @__PURE__ */ e.jsx("div", { className: "splash-loading", children: "Loading..." })
678
685
  ] });
679
686
  }
680
- function Re({
681
- title: t = "Doodle Engine",
682
- subtitle: s,
687
+ function Ae({
688
+ title: n = "Doodle Engine",
689
+ subtitle: t,
683
690
  logoSrc: r,
684
691
  hasSaveData: a,
685
- onNewGame: l,
686
- onContinue: o,
687
- onSettings: m,
688
- className: h = ""
692
+ onNewGame: o,
693
+ onContinue: c,
694
+ onSettings: d,
695
+ className: m = ""
689
696
  }) {
690
- return /* @__PURE__ */ e.jsxs("div", { className: `title-screen ${h}`, children: [
691
- r && /* @__PURE__ */ e.jsx("img", { src: r, alt: t, className: "title-logo" }),
692
- /* @__PURE__ */ e.jsx("h1", { className: "title-heading", children: t }),
693
- s && /* @__PURE__ */ e.jsx("p", { className: "title-subtitle", children: s }),
697
+ return /* @__PURE__ */ e.jsxs("div", { className: `title-screen ${m}`, children: [
698
+ r && /* @__PURE__ */ e.jsx("img", { src: r, alt: n, className: "title-logo" }),
699
+ /* @__PURE__ */ e.jsx("h1", { className: "title-heading", children: n }),
700
+ t && /* @__PURE__ */ e.jsx("p", { className: "title-subtitle", children: t }),
694
701
  /* @__PURE__ */ e.jsxs("div", { className: "title-menu", children: [
695
- /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: l, children: "New Game" }),
696
- a && /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: o, children: "Continue" }),
697
- /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: m, children: "Settings" })
702
+ /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: o, children: "New Game" }),
703
+ a && /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: c, children: "Continue" }),
704
+ /* @__PURE__ */ e.jsx("button", { className: "title-button", onClick: d, children: "Settings" })
698
705
  ] })
699
706
  ] });
700
707
  }
701
- function Ae({
702
- onResume: t,
703
- onSave: s,
708
+ function Oe({
709
+ onResume: n,
710
+ onSave: t,
704
711
  onLoad: r,
705
712
  onSettings: a,
706
- onQuitToTitle: l,
707
- className: o = ""
713
+ onQuitToTitle: o,
714
+ className: c = ""
708
715
  }) {
709
- return /* @__PURE__ */ e.jsx("div", { className: `pause-menu-overlay ${o}`, children: /* @__PURE__ */ e.jsxs("div", { className: "pause-menu", children: [
716
+ return /* @__PURE__ */ e.jsx("div", { className: `pause-menu-overlay ${c}`, children: /* @__PURE__ */ e.jsxs("div", { className: "pause-menu", children: [
710
717
  /* @__PURE__ */ e.jsx("h2", { className: "pause-title", children: "Paused" }),
711
718
  /* @__PURE__ */ e.jsxs("div", { className: "pause-buttons", children: [
712
- /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: t, children: "Resume" }),
713
- /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: s, children: "Save" }),
719
+ /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: n, children: "Resume" }),
720
+ /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: t, children: "Save" }),
714
721
  /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: r, children: "Load" }),
715
722
  /* @__PURE__ */ e.jsx("button", { className: "pause-button", onClick: a, children: "Settings" }),
716
- /* @__PURE__ */ e.jsx("button", { className: "pause-button pause-button-quit", onClick: l, children: "Quit to Title" })
723
+ /* @__PURE__ */ e.jsx("button", { className: "pause-button pause-button-quit", onClick: o, children: "Quit to Title" })
717
724
  ] })
718
725
  ] }) });
719
726
  }
720
727
  function oe({
721
- audioControls: t,
722
- uiSoundControls: s,
728
+ audioControls: n,
729
+ uiSoundControls: t,
723
730
  availableLocales: r,
724
731
  currentLocale: a,
725
- onLocaleChange: l,
726
- onBack: o,
727
- className: m = ""
732
+ onLocaleChange: o,
733
+ onBack: c,
734
+ className: d = ""
728
735
  }) {
729
- return /* @__PURE__ */ e.jsxs("div", { className: `settings-panel ${m}`, children: [
736
+ return /* @__PURE__ */ e.jsxs("div", { className: `settings-panel ${d}`, children: [
730
737
  /* @__PURE__ */ e.jsx("h2", { className: "settings-title", children: "Settings" }),
731
738
  /* @__PURE__ */ e.jsxs("div", { className: "settings-section", children: [
732
739
  /* @__PURE__ */ e.jsx("h3", { children: "Audio" }),
@@ -735,7 +742,7 @@ function oe({
735
742
  {
736
743
  label: "Master",
737
744
  value: 1,
738
- onChange: t.setMasterVolume
745
+ onChange: n.setMasterVolume
739
746
  }
740
747
  ),
741
748
  /* @__PURE__ */ e.jsx(
@@ -743,7 +750,7 @@ function oe({
743
750
  {
744
751
  label: "Music",
745
752
  value: 0.7,
746
- onChange: t.setMusicVolume
753
+ onChange: n.setMusicVolume
747
754
  }
748
755
  ),
749
756
  /* @__PURE__ */ e.jsx(
@@ -751,7 +758,7 @@ function oe({
751
758
  {
752
759
  label: "Sound Effects",
753
760
  value: 0.8,
754
- onChange: t.setSoundVolume
761
+ onChange: n.setSoundVolume
755
762
  }
756
763
  ),
757
764
  /* @__PURE__ */ e.jsx(
@@ -759,40 +766,40 @@ function oe({
759
766
  {
760
767
  label: "Voice",
761
768
  value: 1,
762
- onChange: t.setVoiceVolume
769
+ onChange: n.setVoiceVolume
763
770
  }
764
771
  ),
765
- s && /* @__PURE__ */ e.jsx(
772
+ t && /* @__PURE__ */ e.jsx(
766
773
  Q,
767
774
  {
768
775
  label: "UI Sounds",
769
- value: s.volume,
770
- onChange: s.setVolume
776
+ value: t.volume,
777
+ onChange: t.setVolume
771
778
  }
772
779
  )
773
780
  ] }),
774
- r && r.length > 1 && l && /* @__PURE__ */ e.jsxs("div", { className: "settings-section", children: [
781
+ r && r.length > 1 && o && /* @__PURE__ */ e.jsxs("div", { className: "settings-section", children: [
775
782
  /* @__PURE__ */ e.jsx("h3", { children: "Language" }),
776
783
  /* @__PURE__ */ e.jsx(
777
784
  "select",
778
785
  {
779
786
  className: "settings-locale-select",
780
787
  value: a,
781
- onChange: (h) => l(h.target.value),
782
- children: r.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.code, children: h.label }, h.code))
788
+ onChange: (m) => o(m.target.value),
789
+ children: r.map((m) => /* @__PURE__ */ e.jsx("option", { value: m.code, children: m.label }, m.code))
783
790
  }
784
791
  )
785
792
  ] }),
786
- /* @__PURE__ */ e.jsx("button", { className: "settings-back-button", onClick: o, children: "Back" })
793
+ /* @__PURE__ */ e.jsx("button", { className: "settings-back-button", onClick: c, children: "Back" })
787
794
  ] });
788
795
  }
789
796
  function Q({
790
- label: t,
791
- value: s,
797
+ label: n,
798
+ value: t,
792
799
  onChange: r
793
800
  }) {
794
801
  return /* @__PURE__ */ e.jsxs("div", { className: "volume-slider", children: [
795
- /* @__PURE__ */ e.jsx("label", { className: "volume-label", children: t }),
802
+ /* @__PURE__ */ e.jsx("label", { className: "volume-label", children: n }),
796
803
  /* @__PURE__ */ e.jsx(
797
804
  "input",
798
805
  {
@@ -800,31 +807,31 @@ function Q({
800
807
  min: "0",
801
808
  max: "1",
802
809
  step: "0.05",
803
- defaultValue: s,
810
+ defaultValue: t,
804
811
  onChange: (a) => r(parseFloat(a.target.value)),
805
812
  className: "volume-input"
806
813
  }
807
814
  )
808
815
  ] });
809
816
  }
810
- function Oe({
811
- src: t,
812
- basePath: s = "/video",
817
+ function Pe({
818
+ src: n,
819
+ basePath: t = "/video",
813
820
  onComplete: r,
814
821
  className: a = ""
815
822
  }) {
816
- const l = q(null);
817
- return D(() => {
818
- const o = (m) => {
819
- (m.key === "Escape" || m.key === " " || m.key === "Enter") && (m.preventDefault(), r());
823
+ const o = U(null);
824
+ return L(() => {
825
+ const c = (d) => {
826
+ (d.key === "Escape" || d.key === " " || d.key === "Enter") && (d.preventDefault(), r());
820
827
  };
821
- return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
828
+ return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
822
829
  }, [r]), /* @__PURE__ */ e.jsxs("div", { className: `video-player-overlay ${a}`, children: [
823
830
  /* @__PURE__ */ e.jsx(
824
831
  "video",
825
832
  {
826
- ref: l,
827
- src: `${s}/${t}`,
833
+ ref: o,
834
+ src: `${t}/${n}`,
828
835
  autoPlay: !0,
829
836
  onEnded: r,
830
837
  className: "video-player-video"
@@ -840,29 +847,30 @@ function Oe({
840
847
  )
841
848
  ] });
842
849
  }
843
- function Me({
844
- registry: t,
845
- config: s,
850
+ function Ie({
851
+ registry: n,
852
+ config: t,
846
853
  title: r = "Doodle Engine",
847
854
  subtitle: a,
848
- logoSrc: l,
849
- splashDuration: o = 2e3,
850
- uiSounds: m,
851
- audioOptions: h,
852
- storageKey: f = "doodle-engine-save",
855
+ logoSrc: o,
856
+ splashDuration: c = 2e3,
857
+ uiSounds: d,
858
+ audioOptions: m,
859
+ storageKey: v = "doodle-engine-save",
853
860
  availableLocales: b,
854
861
  videoBasePath: x = "/video",
855
- className: R = ""
862
+ className: _ = "",
863
+ devTools: C = !1
856
864
  }) {
857
- const [T, E] = C(o > 0 ? "splash" : "title"), [w, i] = C(!1), [u, _] = C(!1), [G, L] = C("title"), [W, J] = C(null), [A, F] = C(null), p = je(
858
- m === !1 ? { enabled: !1 } : m
859
- ), d = localStorage.getItem(f) !== null, v = N(() => {
865
+ const [E, w] = T(c > 0 ? "splash" : "title"), [S, u] = T(!1), [h, $] = T(!1), [M, q] = T("title"), [Y, W] = T(null), [R, I] = T(null), l = Ne(
866
+ d === !1 ? { enabled: !1 } : d
867
+ ), p = localStorage.getItem(v) !== null, N = j(() => {
860
868
  const g = {
861
- currentLocation: s.startLocation,
862
- currentTime: { ...s.startTime },
863
- flags: { ...s.startFlags },
864
- variables: { ...s.startVariables },
865
- inventory: [...s.startInventory],
869
+ currentLocation: t.startLocation,
870
+ currentTime: { ...t.startTime },
871
+ flags: { ...t.startFlags },
872
+ variables: { ...t.startVariables },
873
+ inventory: [...t.startInventory],
866
874
  questProgress: {},
867
875
  unlockedJournalEntries: [],
868
876
  playerNotes: [],
@@ -875,42 +883,42 @@ function Me({
875
883
  pendingVideo: null,
876
884
  currentLocale: "en"
877
885
  };
878
- return new ie(t, g);
879
- }, [t, s]), y = N(() => {
880
- p.playClick();
881
- const g = v(), V = g.newGame(s);
882
- F({ engine: g, snapshot: V }), E("playing");
883
- }, [v, s, p]), O = N(() => {
884
- p.playClick();
885
- const g = localStorage.getItem(f);
886
+ return new ue(n, g);
887
+ }, [n, t]), A = j(() => {
888
+ l.playClick();
889
+ const g = N(), s = g.newGame(t);
890
+ I({ engine: g, snapshot: s }), w("playing");
891
+ }, [N, t, l]), V = j(() => {
892
+ l.playClick();
893
+ const g = localStorage.getItem(v);
886
894
  if (!g) return;
887
- const V = JSON.parse(g), n = v(), c = n.loadGame(V);
888
- F({ engine: n, snapshot: c }), E("playing");
889
- }, [v, f, p]), M = N(() => {
890
- if (!A) return;
891
- p.playClick();
892
- const g = A.engine.saveGame();
893
- localStorage.setItem(f, JSON.stringify(g)), i(!1);
894
- }, [A, f, p]), Y = N(() => {
895
- const g = localStorage.getItem(f);
896
- if (!g || !A) return;
897
- p.playClick();
898
- const V = JSON.parse(g), n = A.engine.loadGame(V);
899
- F({ engine: A.engine, snapshot: n }), i(!1);
900
- }, [A, f, p]), $ = N(() => {
901
- p.playClick(), i(!1), _(!1), F(null), E("title");
902
- }, [p]), P = N((g) => {
903
- p.playMenuOpen(), L(g), _(!0), g === "pause" && i(!1);
904
- }, [p]), I = N(() => {
905
- p.playMenuClose(), _(!1), G === "pause" && i(!0);
906
- }, [G, p]);
907
- D(() => {
908
- if (T !== "playing") return;
909
- const g = (V) => {
910
- V.key === "Escape" && (V.preventDefault(), u ? I() : (w ? p.playMenuClose() : p.playMenuOpen(), i((n) => !n)));
895
+ const s = JSON.parse(g), i = N(), f = i.loadGame(s);
896
+ I({ engine: i, snapshot: f }), w("playing");
897
+ }, [N, v, l]), G = j(() => {
898
+ if (!R) return;
899
+ l.playClick();
900
+ const g = R.engine.saveGame();
901
+ localStorage.setItem(v, JSON.stringify(g)), u(!1);
902
+ }, [R, v, l]), O = j(() => {
903
+ const g = localStorage.getItem(v);
904
+ if (!g || !R) return;
905
+ l.playClick();
906
+ const s = JSON.parse(g), i = R.engine.loadGame(s);
907
+ I({ engine: R.engine, snapshot: i }), u(!1);
908
+ }, [R, v, l]), P = j(() => {
909
+ l.playClick(), u(!1), $(!1), I(null), w("title");
910
+ }, [l]), D = j((g) => {
911
+ l.playMenuOpen(), q(g), $(!0), g === "pause" && u(!1);
912
+ }, [l]), F = j(() => {
913
+ l.playMenuClose(), $(!1), M === "pause" && u(!0);
914
+ }, [M, l]);
915
+ L(() => {
916
+ if (E !== "playing") return;
917
+ const g = (s) => {
918
+ s.key === "Escape" && (s.preventDefault(), h ? F() : (S ? l.playMenuClose() : l.playMenuOpen(), u((i) => !i)));
911
919
  };
912
920
  return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
913
- }, [T, w, u, I, p]);
921
+ }, [E, S, h, F, l]);
914
922
  const X = {
915
923
  setMasterVolume: () => {
916
924
  },
@@ -923,141 +931,148 @@ function Me({
923
931
  stopAll: () => {
924
932
  }
925
933
  };
926
- return T === "splash" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${R}`, children: /* @__PURE__ */ e.jsx(
927
- Ce,
934
+ return E === "splash" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: /* @__PURE__ */ e.jsx(
935
+ Re,
928
936
  {
929
- logoSrc: l,
937
+ logoSrc: o,
930
938
  title: r,
931
- onComplete: () => E("title"),
932
- duration: o
939
+ onComplete: () => w("title"),
940
+ duration: c
933
941
  }
934
- ) }) : T === "title" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${R}`, children: u ? /* @__PURE__ */ e.jsx(
942
+ ) }) : E === "title" ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: h ? /* @__PURE__ */ e.jsx(
935
943
  oe,
936
944
  {
937
945
  audioControls: X,
938
- uiSoundControls: m !== !1 ? p : void 0,
946
+ uiSoundControls: d !== !1 ? l : void 0,
939
947
  availableLocales: b,
940
- onBack: I
948
+ onBack: F
941
949
  }
942
950
  ) : /* @__PURE__ */ e.jsx(
943
- Re,
951
+ Ae,
944
952
  {
945
953
  title: r,
946
954
  subtitle: a,
947
- logoSrc: l,
948
- hasSaveData: d,
949
- onNewGame: y,
950
- onContinue: O,
951
- onSettings: () => P("title")
955
+ logoSrc: o,
956
+ hasSaveData: p,
957
+ onNewGame: A,
958
+ onContinue: V,
959
+ onSettings: () => D("title")
952
960
  }
953
- ) }) : A ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${R}`, children: /* @__PURE__ */ e.jsx(fe, { engine: A.engine, initialSnapshot: A.snapshot, children: /* @__PURE__ */ e.jsx(
954
- Pe,
961
+ ) }) : R ? /* @__PURE__ */ e.jsx("div", { className: `game-shell ${_}`, children: /* @__PURE__ */ e.jsx(xe, { engine: R.engine, initialSnapshot: R.snapshot, devTools: C, children: /* @__PURE__ */ e.jsx(
962
+ $e,
955
963
  {
956
- audioOptions: h,
957
- uiSoundControls: m !== !1 ? p : void 0,
958
- showPauseMenu: w,
959
- showSettings: u,
964
+ audioOptions: m,
965
+ uiSoundControls: d !== !1 ? l : void 0,
966
+ showPauseMenu: S,
967
+ showSettings: h,
960
968
  availableLocales: b,
961
969
  videoBasePath: x,
962
- pendingVideo: W,
963
- setPendingVideo: J,
970
+ pendingVideo: Y,
971
+ setPendingVideo: W,
964
972
  onPause: () => {
965
- p.playMenuOpen(), i(!0);
973
+ l.playMenuOpen(), u(!0);
966
974
  },
967
975
  onResume: () => {
968
- p.playMenuClose(), i(!1);
976
+ l.playMenuClose(), u(!1);
969
977
  },
970
- onSave: M,
971
- onLoad: Y,
972
- onSettings: () => P("pause"),
973
- onQuitToTitle: $,
974
- onCloseSettings: I
978
+ onSave: G,
979
+ onLoad: O,
980
+ onSettings: () => D("pause"),
981
+ onQuitToTitle: P,
982
+ onCloseSettings: F
975
983
  }
976
984
  ) }) }) : null;
977
985
  }
978
- function Pe({
979
- audioOptions: t,
980
- uiSoundControls: s,
986
+ function $e({
987
+ audioOptions: n,
988
+ uiSoundControls: t,
981
989
  showPauseMenu: r,
982
990
  showSettings: a,
983
- availableLocales: l,
984
- videoBasePath: o,
985
- pendingVideo: m,
986
- setPendingVideo: h,
987
- onPause: f,
991
+ availableLocales: o,
992
+ videoBasePath: c,
993
+ pendingVideo: d,
994
+ setPendingVideo: m,
995
+ onPause: v,
988
996
  onResume: b,
989
997
  onSave: x,
990
- onLoad: R,
991
- onSettings: T,
998
+ onLoad: _,
999
+ onSettings: C,
992
1000
  onQuitToTitle: E,
993
1001
  onCloseSettings: w
994
1002
  }) {
995
- const { snapshot: i, actions: u } = re(), _ = le(i, t);
996
- return D(() => {
997
- i.pendingVideo && h(i.pendingVideo);
998
- }, [i.pendingVideo, h]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
999
- m && /* @__PURE__ */ e.jsx(
1000
- Oe,
1003
+ const { snapshot: S, actions: u } = re(), h = le(S, n);
1004
+ return L(() => {
1005
+ S.pendingVideo && m(S.pendingVideo);
1006
+ }, [S.pendingVideo, m]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1007
+ d && /* @__PURE__ */ e.jsx(
1008
+ Pe,
1001
1009
  {
1002
- src: m,
1003
- basePath: o,
1004
- onComplete: () => h(null)
1010
+ src: d,
1011
+ basePath: c,
1012
+ onComplete: () => m(null)
1005
1013
  }
1006
1014
  ),
1007
- /* @__PURE__ */ e.jsx(_e, {}),
1008
- !r && !a && !m && /* @__PURE__ */ e.jsx(
1015
+ /* @__PURE__ */ e.jsx(Ce, {}),
1016
+ !r && !a && !d && /* @__PURE__ */ e.jsx(
1009
1017
  "button",
1010
1018
  {
1011
1019
  className: "game-shell-menu-button",
1012
- onClick: f,
1020
+ onClick: v,
1013
1021
  "aria-label": "Menu",
1014
1022
  children: "Menu"
1015
1023
  }
1016
1024
  ),
1017
1025
  r && /* @__PURE__ */ e.jsx(
1018
- Ae,
1026
+ Oe,
1019
1027
  {
1020
1028
  onResume: b,
1021
1029
  onSave: x,
1022
- onLoad: R,
1023
- onSettings: T,
1030
+ onLoad: _,
1031
+ onSettings: C,
1024
1032
  onQuitToTitle: E
1025
1033
  }
1026
1034
  ),
1027
1035
  a && /* @__PURE__ */ e.jsx(
1028
1036
  oe,
1029
1037
  {
1030
- audioControls: _,
1031
- uiSoundControls: s,
1032
- availableLocales: l,
1033
- currentLocale: (i.time, void 0),
1038
+ audioControls: h,
1039
+ uiSoundControls: t,
1040
+ availableLocales: o,
1041
+ currentLocale: (S.time, void 0),
1034
1042
  onLocaleChange: u.setLocale,
1035
1043
  onBack: w
1036
1044
  }
1037
1045
  )
1038
1046
  ] });
1039
1047
  }
1048
+ function Le({ message: n = "Loading...", className: t = "" }) {
1049
+ return /* @__PURE__ */ e.jsx("div", { className: `loading-screen ${t}`, children: /* @__PURE__ */ e.jsxs("div", { className: "loading-screen-content", children: [
1050
+ /* @__PURE__ */ e.jsx("div", { className: "loading-screen-spinner" }),
1051
+ /* @__PURE__ */ e.jsx("p", { className: "loading-screen-message", children: n })
1052
+ ] }) });
1053
+ }
1040
1054
  export {
1041
- Se as CharacterList,
1042
- ge as ChoiceList,
1043
- Ne as DialogueBox,
1055
+ ke as CharacterList,
1056
+ be as ChoiceList,
1057
+ ge as DialogueBox,
1044
1058
  ae as GameContext,
1045
- fe as GameProvider,
1046
- _e as GameRenderer,
1047
- Me as GameShell,
1048
- ke as Inventory,
1049
- ye as Journal,
1050
- be as LocationView,
1051
- Ee as MapView,
1059
+ xe as GameProvider,
1060
+ Ce as GameRenderer,
1061
+ Ie as GameShell,
1062
+ ye as Inventory,
1063
+ Ee as Journal,
1064
+ Le as LoadingScreen,
1065
+ Se as LocationView,
1066
+ we as MapView,
1052
1067
  Te as NotificationArea,
1053
- Ae as PauseMenu,
1054
- we as SaveLoadPanel,
1068
+ Oe as PauseMenu,
1069
+ _e as SaveLoadPanel,
1055
1070
  oe as SettingsPanel,
1056
- Ce as SplashScreen,
1057
- Re as TitleScreen,
1058
- De as VERSION,
1059
- Oe as VideoPlayer,
1071
+ Re as SplashScreen,
1072
+ Ae as TitleScreen,
1073
+ Fe as VERSION,
1074
+ Pe as VideoPlayer,
1060
1075
  le as useAudioManager,
1061
1076
  re as useGame,
1062
- je as useUISounds
1077
+ Ne as useUISounds
1063
1078
  };