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