@pieai/swimmer-ui-kit 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/NOTICE +38 -0
- package/README.md +2 -1
- package/bin/swimmer-ui-check.mjs +87 -1
- package/dist/index.d.ts +69 -1
- package/dist/index.js +1340 -651
- package/dist/preview.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -81,8 +81,650 @@ function b({ children: e, className: n, onClick: r, sound: i = !1, static: a = !
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
|
+
//#region src/liquidMetalBudget.ts
|
|
85
|
+
var x = 2, S = 2, C = 0;
|
|
86
|
+
function ee() {
|
|
87
|
+
return {
|
|
88
|
+
limit: S,
|
|
89
|
+
used: C
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function w(e) {
|
|
93
|
+
S = Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0;
|
|
94
|
+
}
|
|
95
|
+
function T() {
|
|
96
|
+
return C >= S ? !1 : (C += 1, !0);
|
|
97
|
+
}
|
|
98
|
+
function te() {
|
|
99
|
+
C > 0 && --C;
|
|
100
|
+
}
|
|
101
|
+
function E(e) {
|
|
102
|
+
return !(e.renderer === "css" || !e.hasWebGL2 || e.prefersReducedMotion || !e.isInViewport);
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/liquidMetalWebGL.ts
|
|
106
|
+
var ne = "#version 300 es\nin vec2 position; void main(){ gl_Position = vec4(position,0.,1.); }", D = "#version 300 es\nprecision highp float;\nout vec4 o;\n\nuniform vec2 uC; // pill centre, device px\nuniform vec2 uHalf; // pill half-extent, device px\nuniform float uT; // seconds\nuniform float uHover; // 0..1\nuniform float uPress; // 0..1, eased\nuniform vec4 uRip[3]; // xy centre (button heights, +y down), z start, w live\nuniform vec4 uRipK; // speed, ring width, decay, amplitude\nuniform vec4 uRipK2; // facet depth, facet count, crest sharpness, emission\nuniform vec4 uPtr; // xy trailing cursor, z strength, w normalised speed\nuniform vec4 uPtrK; // radius, base amplitude, speed amplitude, rim lift\nuniform vec3 uAccent; // brand tint from computed --game-ui-liquid-metal-accent\n\n#define PI 3.14159265\n\nfloat sdPill(vec2 p, vec2 b, float r){\n vec2 q = abs(p) - b + r;\n return min(max(q.x,q.y),0.) + length(max(q,0.)) - r;\n}\n\n/* Expanding ring from each press, in button-height units. Three slots so a\n quick double-tap overlaps instead of cutting the first one off.\n\n Two things keep it from reading as a water ripple: the wavefront is\n faceted rather than circular — its radius is modulated by angle, and the\n facets rotate as it travels — and the crest profile is a cusp rather than\n a gaussian, so it lands as a crease in sheet metal instead of a soft swell. */\nfloat ripple(vec2 p, float t){\n float sum = 0.;\n for(int i = 0; i < 3; i++){\n if(uRip[i].w < 0.5) continue;\n float age = t - uRip[i].z;\n if(age < 0. || age > 4.) continue;\n vec2 rp = p - uRip[i].xy;\n float facet = 1. + uRipK2.x * cos(uRipK2.y * atan(rp.y, rp.x) + age * 2.1 + float(i) * 2.4);\n float x = (length(rp) - age * uRipK.x * facet) / uRipK.y;\n sum += exp(-pow(abs(x) + 1e-4, uRipK2.z)) * exp(-age * uRipK.z);\n }\n return sum;\n}\n\n/* A soft well under the cursor. It lags behind the real pointer and swells\n with speed, so moving across the button drags the metal rather than sliding\n a static blob over it. */\nfloat pointerW(vec2 p){\n if(uPtr.z < 0.001) return 0.;\n float d = length(p - uPtr.xy) / uPtrK.x;\n return exp(-d*d) * uPtr.z;\n}\n/* Displacing the sample point, not the field value, is what makes this read as\n liquid: the bands bulge and stretch around the cursor like a lens instead of\n just getting brighter under it. */\nvec2 pointerWarp(vec2 p){\n float w = pointerW(p);\n if(w <= 0.) return vec2(0.);\n return normalize(p - uPtr.xy + vec2(1e-5)) * w * (uPtrK.y + uPtrK.z * uPtr.w);\n}\n", re = `${D}
|
|
107
|
+
uniform float uBw; // stroke half-width, device px
|
|
108
|
+
uniform float uE[8]; // base, hot, chroma-across, chroma-along, speed,
|
|
109
|
+
// topBias, press lift, ripple lift
|
|
110
|
+
|
|
111
|
+
/* Arc-length position around the pill, 0..1, starting at the right-hand
|
|
112
|
+
extreme and running counter-clockwise. Straight runs and caps are measured
|
|
113
|
+
in real length so a highlight travels at a constant speed all the way
|
|
114
|
+
round instead of stalling on the caps. */
|
|
115
|
+
float perim(vec2 d, float a, float r){
|
|
116
|
+
float P = 4.*a + 2.*PI*r;
|
|
117
|
+
float s;
|
|
118
|
+
if(d.x >= a){ // right cap
|
|
119
|
+
float th = atan(d.y, d.x - a); if(th < 0.) th += 2.*PI;
|
|
120
|
+
s = (th <= PI*0.5) ? r*th : P - r*(2.*PI - th);
|
|
121
|
+
} else if(d.x <= -a){ // left cap
|
|
122
|
+
float th = atan(d.y, d.x + a); if(th < 0.) th += 2.*PI;
|
|
123
|
+
s = r*PI*0.5 + 2.*a + r*(th - PI*0.5);
|
|
124
|
+
} else if(d.y >= 0.){ // top run
|
|
125
|
+
s = r*PI*0.5 + (a - d.x);
|
|
126
|
+
} else { // bottom run
|
|
127
|
+
s = r*PI*1.5 + 2.*a + (d.x + a);
|
|
128
|
+
}
|
|
129
|
+
return s / P;
|
|
130
|
+
}
|
|
131
|
+
// periodic bump, so a highlight wraps cleanly at s = 0
|
|
132
|
+
float pb(float u, float w){ u = fract(u); float x = min(u, 1.-u); return exp(-(x*x)/(w*w)); }
|
|
133
|
+
|
|
134
|
+
// travelling brightness around the rim — three lobes at different speeds and
|
|
135
|
+
// widths, which never quite re-align, so the light keeps re-pooling
|
|
136
|
+
float rimHot(float s, float t){
|
|
137
|
+
float v = uE[0];
|
|
138
|
+
v += 0.62 * pb(s - t*uE[4], 0.075);
|
|
139
|
+
v += 0.44 * pb(s + t*uE[4]*0.63 + 0.41, 0.135);
|
|
140
|
+
v += 0.30 * pb(s - t*uE[4]*0.34 + 0.73, 0.200);
|
|
141
|
+
return v;
|
|
142
|
+
}
|
|
143
|
+
// soft band riding the pill edge, offset per channel to fringe across the stroke
|
|
144
|
+
float rimBand(float sd, float off){ return 1. - smoothstep(0., uBw*1.05, abs(sd + uBw*0.55 + off)); }
|
|
145
|
+
|
|
146
|
+
void main(){
|
|
147
|
+
vec2 d = gl_FragCoord.xy - uC;
|
|
148
|
+
float sd = sdPill(d, uHalf, uHalf.y);
|
|
149
|
+
if(sd > uBw*2.5 || sd < -uBw*3.5){ o = vec4(0.); return; }
|
|
150
|
+
|
|
151
|
+
/* Each channel is offset both *across* the stroke and *along* it, so the rim
|
|
152
|
+
fringes red-outside / cyan-inside and its hue also drifts as a highlight
|
|
153
|
+
slides past — the two together are what read as metal rather than as a
|
|
154
|
+
moving white dot. */
|
|
155
|
+
float a = max(uHalf.x - uHalf.y, 0.);
|
|
156
|
+
float s = perim(d, a, uHalf.y);
|
|
157
|
+
float top = mix(1., 0.5 + 0.5 * (d.y / uHalf.y), uE[5]);
|
|
158
|
+
|
|
159
|
+
// pressing lifts the whole outline, and each ripple flares it again as the
|
|
160
|
+
// ring sweeps past — so the rim reports the press twice, once as a step and
|
|
161
|
+
// once as a wave running round the edge
|
|
162
|
+
// …and the stretch of outline nearest the cursor picks up a little too
|
|
163
|
+
vec2 p = vec2(d.x, -d.y) / (uHalf.y * 2.);
|
|
164
|
+
float lift = 1. + uPress * uE[6] + ripple(p, uT) * uE[7]
|
|
165
|
+
+ pointerW(p) * uPtrK.w;
|
|
166
|
+
|
|
167
|
+
o = vec4(vec3(
|
|
168
|
+
rimBand(sd, uE[2]) * rimHot(s + uE[3], uT),
|
|
169
|
+
rimBand(sd, 0. ) * rimHot(s, uT),
|
|
170
|
+
rimBand(sd, -uE[2]) * rimHot(s - uE[3], uT)
|
|
171
|
+
) * uE[1] * top * lift, 1.);
|
|
172
|
+
// Brand tint lives here, not in the spectral offsets: those offsets are
|
|
173
|
+
// what make it metal, and replacing them with a flat accent would turn
|
|
174
|
+
// the rim into a neon sticker.
|
|
175
|
+
o.rgb *= mix(vec3(1.0), uAccent, 0.40);
|
|
176
|
+
}`, ie = `${D}
|
|
177
|
+
uniform float uP[21]; // tunables
|
|
178
|
+
|
|
179
|
+
float h21(vec2 p){
|
|
180
|
+
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
|
|
181
|
+
p3 += dot(p3, p3.yzx + 33.33);
|
|
182
|
+
return fract((p3.x + p3.y) * p3.z);
|
|
183
|
+
}
|
|
184
|
+
float vn(vec2 p){
|
|
185
|
+
vec2 i = floor(p), f = fract(p);
|
|
186
|
+
f = f*f*(3.-2.*f);
|
|
187
|
+
float a = h21(i), b = h21(i+vec2(1,0)), c = h21(i+vec2(0,1)), d = h21(i+vec2(1,1));
|
|
188
|
+
return mix(mix(a,b,f.x), mix(c,d,f.x), f.y) * 2. - 1.;
|
|
189
|
+
}
|
|
190
|
+
// normalised to roughly -1..1; low gain keeps the first octave dominant, which
|
|
191
|
+
// is what keeps the ribbons big and smooth instead of turbulent
|
|
192
|
+
float fbm(vec2 p, float g){
|
|
193
|
+
float s = 0., a = 1., n = 0.;
|
|
194
|
+
for(int i=0;i<4;i++){ s += a*vn(p); n += a; p = p*2.03 + 11.7; a *= g; }
|
|
195
|
+
return s / n;
|
|
196
|
+
}
|
|
197
|
+
float fbm(vec2 p){ return fbm(p, 0.5); }
|
|
198
|
+
|
|
199
|
+
/* p is in button-height units, +y down, origin at the pill centre.
|
|
200
|
+
|
|
201
|
+
The bands in the reference are a *family of parallel curves*: one swooping
|
|
202
|
+
valley repeated up the button, dense where the light is pinched and pulled
|
|
203
|
+
wide open where it is not. So the field is built that way explicitly —
|
|
204
|
+
|
|
205
|
+
V = (y - valley(x)) * density(x)
|
|
206
|
+
|
|
207
|
+
— rather than hoping 2-D noise happens to produce it. Level sets of V are
|
|
208
|
+
all vertical translates of the same valley curve, which is what makes the
|
|
209
|
+
ribbons laminar and near-parallel; a density that varies along x is what makes
|
|
210
|
+
them crowd into razor fringes at one end and open into a broad wash at the
|
|
211
|
+
other. A soft plateau over V then paints them, sampled once per
|
|
212
|
+
wavelength at slightly offset heights, so every edge opens into a prism of
|
|
213
|
+
width dispersion / |grad V|. */
|
|
214
|
+
|
|
215
|
+
// smooth 1-D wiggle that drifts slowly with time
|
|
216
|
+
float wig(float x, float t, float seed){
|
|
217
|
+
return vn(vec2(x, t*0.150 + seed)) * 0.60
|
|
218
|
+
+ vn(vec2(x*2.07 + 4., t*0.105 + seed)) * 0.27
|
|
219
|
+
+ vn(vec2(x*4.30 - 7., t*0.080 + seed)) * 0.13;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
float valleyAt(vec2 p, float t){ return wig(p.x*uP[0], t, 0.0) * uP[1]; }
|
|
223
|
+
float densAt (vec2 p, float t){ return uP[2] * exp(uP[3] * wig(p.x*uP[4] + 9.0, t, 2.7)); }
|
|
224
|
+
|
|
225
|
+
float surface(vec2 p, float t){
|
|
226
|
+
float V = (p.y - valleyAt(p,t)) * densAt(p,t);
|
|
227
|
+
V += uP[5] * fbm(p*vec2(0.8, 1.7)*uP[6] + vec2(t*0.05, -t*0.03), uP[17]);
|
|
228
|
+
return V - uP[7];
|
|
229
|
+
}
|
|
230
|
+
// One plateau per unit of V — so the density is literally bands per button height.
|
|
231
|
+
// A plateau rather than a step is what puts warm on the low edge and cool on
|
|
232
|
+
// the high edge of every ribbon.
|
|
233
|
+
float tone(float v){
|
|
234
|
+
float u = fract(v);
|
|
235
|
+
float e = uP[9], W = uP[10] * 0.5;
|
|
236
|
+
return smoothstep(0.5-W-e, 0.5-W, u) * (1. - smoothstep(0.5+W, 0.5+W+e, u));
|
|
237
|
+
}
|
|
238
|
+
vec3 spec(float t){ return clamp(vec3(1.5) - abs(4.*t - vec3(3.,2.,1.)), 0., 1.); }
|
|
239
|
+
|
|
240
|
+
void main(){
|
|
241
|
+
vec2 d = gl_FragCoord.xy - uC;
|
|
242
|
+
float sd = sdPill(d, uHalf, uHalf.y);
|
|
243
|
+
float pill = 1. - smoothstep(-1., 1., sd);
|
|
244
|
+
float S = uHalf.y * 2.; // button height, device px
|
|
245
|
+
float t = uT;
|
|
246
|
+
|
|
247
|
+
// rgb is premultiplied by the mask and alpha carries it, so the blur that
|
|
248
|
+
// follows can normalise and keep a clean edge instead of a dark vignette
|
|
249
|
+
if(uHover <= 0.0015 || pill <= 0.0015){ o = vec4(0., 0., 0., pill); return; }
|
|
250
|
+
|
|
251
|
+
vec2 p = vec2(d.x, -d.y) / S; // gl_FragCoord is y-up
|
|
252
|
+
vec2 q = p + pointerWarp(p); // the cursor drags the sheet
|
|
253
|
+
|
|
254
|
+
// self-refraction: bend the lookup along the field's own slope, which piles
|
|
255
|
+
// iso-lines up into folds instead of leaving them evenly spaced
|
|
256
|
+
float h0 = surface(q, t);
|
|
257
|
+
vec2 gp = vec2(dFdx(h0), -dFdy(h0)) * S; // grad in p-units
|
|
258
|
+
float V = surface(q - gp * uP[8] / max(uP[2], .001), t);
|
|
259
|
+
|
|
260
|
+
// gradient-aligned filaments: fast variation across the iso-lines, slow
|
|
261
|
+
// along them, so the fine detail reads as drawn-out fibres of light
|
|
262
|
+
vec2 gd = normalize(gp + vec2(1e-5));
|
|
263
|
+
V += uP[13] * fbm(vec2(dot(q,gd)*uP[14], dot(q, vec2(-gd.y,gd.x))*uP[14]*0.04) + vec2(0., t*0.06));
|
|
264
|
+
|
|
265
|
+
// press ripple: displacing the field rather than adding light means the
|
|
266
|
+
// bands themselves bow outwards as the ring passes, which is what sells it
|
|
267
|
+
// as a disturbance *in* the metal instead of a decal over it
|
|
268
|
+
float rip = ripple(p, t);
|
|
269
|
+
float well = pointerW(p);
|
|
270
|
+
V += rip * uRipK.w;
|
|
271
|
+
|
|
272
|
+
// Real dispersion is not linear in wavelength — the blue end bends far more
|
|
273
|
+
// than the red (Cauchy). Skewing the sample offsets the same way is what
|
|
274
|
+
// gives the reference its broad cool wash against a tight warm edge.
|
|
275
|
+
const int N = 21;
|
|
276
|
+
float mid = 1. - pow(0.5, uP[12]);
|
|
277
|
+
vec3 col = vec3(0.), wsum = vec3(0.);
|
|
278
|
+
for(int i=0;i<N;i++){
|
|
279
|
+
float k = float(i)/float(N-1);
|
|
280
|
+
vec3 w = spec(k);
|
|
281
|
+
col += w * tone(V + ((1. - pow(1. - k, uP[12])) - mid) * uP[11]);
|
|
282
|
+
wsum += w;
|
|
283
|
+
}
|
|
284
|
+
col /= wsum;
|
|
285
|
+
col = pow(col, vec3(uP[15]));
|
|
286
|
+
|
|
287
|
+
// light envelope — the ribbons only exist where the sheet is lit, and the
|
|
288
|
+
// dark upper region is bounded by the same valley curve the bands follow
|
|
289
|
+
float lit = smoothstep(uP[18], uP[19], q.y - valleyAt(q, t));
|
|
290
|
+
lit *= mix(1., lit, 0.55); // deepen the unlit crescent
|
|
291
|
+
col *= uP[16] * lit;
|
|
292
|
+
|
|
293
|
+
// the crest runs hotter, and carries a little light of its own so it stays
|
|
294
|
+
// legible through the softening blur and across the unlit part of the pill
|
|
295
|
+
col = col * (1. + rip * 1.15 + well * 0.60);
|
|
296
|
+
|
|
297
|
+
o = vec4(col * pill * uHover, pill);
|
|
298
|
+
}`, ae = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex, uTex2;\nuniform vec2 uDstTexel; // 1 / destination size (maps dest fragCoord -> uv)\nuniform vec2 uSrcTexel; // 1 / source size (tap spacing)\nuniform float uAdd; // 1 to include uTex2\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uDstTexel;\n // Taps sit a quarter of a *destination* texel out, so for a 2x reduction\n // they land exactly on the four source texel centres. Spacing them by a\n // whole source texel instead — as this did originally — skips every other\n // pixel, and any fine detail in the field folds down into low-frequency\n // moiré that no amount of subsequent blurring can remove.\n vec2 e = uDstTexel * 0.25;\n vec4 s = texture(uTex, uv + vec2(-e.x,-e.y)) + texture(uTex, uv + vec2( e.x,-e.y))\n + texture(uTex, uv + vec2(-e.x, e.y)) + texture(uTex, uv + vec2( e.x, e.y));\n s *= 0.25;\n if(uAdd > 0.5){\n vec4 r = texture(uTex2, uv + vec2(-e.x,-e.y)) + texture(uTex2, uv + vec2( e.x,-e.y))\n + texture(uTex2, uv + vec2(-e.x, e.y)) + texture(uTex2, uv + vec2( e.x, e.y));\n s.rgb += r.rgb * 0.25;\n }\n o = s;\n}", oe = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex; uniform vec2 uTexel; uniform vec2 uDir; uniform float uR;\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uTexel;\n vec2 st = uTexel * uDir * uR;\n vec4 s = texture(uTex, uv) * 0.1964;\n s += (texture(uTex, uv + st*1.4118) + texture(uTex, uv - st*1.4118)) * 0.2969;\n s += (texture(uTex, uv + st*3.2941) + texture(uTex, uv - st*3.2941)) * 0.0944;\n s += (texture(uTex, uv + st*5.1765) + texture(uTex, uv - st*5.1765)) * 0.0104;\n o = s;\n}", O = `${D}
|
|
299
|
+
uniform sampler2D uSoft, uRim, uGlow;
|
|
300
|
+
uniform vec2 uRes;
|
|
301
|
+
uniform float uGlowGain, uGlowIn, uOccl, uDim, uPunch;
|
|
302
|
+
|
|
303
|
+
void main(){
|
|
304
|
+
vec2 uv = gl_FragCoord.xy / uRes;
|
|
305
|
+
vec3 glow = texture(uGlow, uv).rgb;
|
|
306
|
+
vec2 d = gl_FragCoord.xy - uC;
|
|
307
|
+
float sd = sdPill(d, uHalf, uHalf.y);
|
|
308
|
+
float pill = 1. - smoothstep(-1., 1., sd);
|
|
309
|
+
|
|
310
|
+
// normalised blur: dividing by the blurred coverage keeps the softened metal
|
|
311
|
+
// full strength right up to the edge instead of fading into the mask
|
|
312
|
+
vec4 m = texture(uSoft, uv);
|
|
313
|
+
|
|
314
|
+
// Scrim, applied *after* the blur: knock the metal back through the middle
|
|
315
|
+
// where the label sits, leaving the top and bottom at full brightness. Doing
|
|
316
|
+
// this before the blur would smear the protection away at high blur values.
|
|
317
|
+
float veil = 1. - smoothstep(0.46, 0.88, abs(d.y) / uHalf.y);
|
|
318
|
+
|
|
319
|
+
// Blurring flattens the tonal range into a wash; putting the contrast back
|
|
320
|
+
// with a power curve — after the blur, so it costs no smoothness — is what
|
|
321
|
+
// makes it read as poured metal rather than a soft glow. Highlights keep
|
|
322
|
+
// their level while the mid-tones drop away.
|
|
323
|
+
vec3 metal = pow(max(m.rgb / max(m.a, 1e-3), 0.), vec3(uPunch));
|
|
324
|
+
|
|
325
|
+
vec3 core = metal * pill * mix(1., uDim, veil) + texture(uRim, uv).rgb;
|
|
326
|
+
|
|
327
|
+
// The ripple's own light is added here, after the blur, so the crease stays
|
|
328
|
+
// a hard line. Its displacement of the field still rides inside the
|
|
329
|
+
// softened metal — the sheet bows, and the crest glints along the fold.
|
|
330
|
+
float rip = ripple(vec2(d.x, -d.y) / (uHalf.y * 2.), uT);
|
|
331
|
+
core += vec3(rip * rip) * uRipK2.w * pill * mix(1., 0.42, veil);
|
|
332
|
+
|
|
333
|
+
// The button occludes its own bloom over the patch where its shadow falls,
|
|
334
|
+
// so the drop shadow keeps its contrast even when the face is blown out.
|
|
335
|
+
float sdSh = sdPill(d + vec2(0., uHalf.y * 0.62), uHalf * 0.94, uHalf.y * 0.94);
|
|
336
|
+
float occl = uOccl * exp(-max(sdSh, 0.) / (uHalf.y * 0.75));
|
|
337
|
+
|
|
338
|
+
// Bloom spills mostly outward; a little of it is allowed back inside so the
|
|
339
|
+
// hot rim bleeds onto the face, as it does on the reference component.
|
|
340
|
+
vec3 rgb = core + glow * uGlowGain * mix(1., uGlowIn, pill) * (1. - occl * (1. - pill));
|
|
341
|
+
rgb *= mix(vec3(1.0), uAccent, 0.18);
|
|
342
|
+
|
|
343
|
+
// premultiplied — the page's ambient pool and the button's drop shadow are
|
|
344
|
+
// CSS underneath, and this layer adds light on top of them
|
|
345
|
+
float a = clamp(max(rgb.r, max(rgb.g, rgb.b)), 0., 1.);
|
|
346
|
+
o = vec4(min(rgb, vec3(1.)), a);
|
|
347
|
+
}`, se = {
|
|
348
|
+
valFreq: .5,
|
|
349
|
+
valAmp: .55,
|
|
350
|
+
dens: 2.4,
|
|
351
|
+
densVar: 2.2,
|
|
352
|
+
densFreq: .32,
|
|
353
|
+
wobAmp: .12,
|
|
354
|
+
wobFreq: 1.6,
|
|
355
|
+
lift: .05,
|
|
356
|
+
refract: .18,
|
|
357
|
+
edge: .04,
|
|
358
|
+
width: .46,
|
|
359
|
+
disp: .3,
|
|
360
|
+
skew: 1.5,
|
|
361
|
+
fineAmp: 0,
|
|
362
|
+
fineFreq: 9,
|
|
363
|
+
gamma: 1,
|
|
364
|
+
gain: 1.9,
|
|
365
|
+
octGain: .32,
|
|
366
|
+
litLo: -.26,
|
|
367
|
+
litHi: .1,
|
|
368
|
+
dim: .44
|
|
369
|
+
}, ce = Object.keys(se), le = {
|
|
370
|
+
base: .2,
|
|
371
|
+
hot: .82,
|
|
372
|
+
chromA: .42,
|
|
373
|
+
chromS: .03,
|
|
374
|
+
speed: .07,
|
|
375
|
+
top: .35,
|
|
376
|
+
press: .85,
|
|
377
|
+
ripple: 1.6
|
|
378
|
+
}, ue = Object.keys(le), k = {
|
|
379
|
+
glow: 1.95,
|
|
380
|
+
glowR: 1.3,
|
|
381
|
+
glowIn: .3,
|
|
382
|
+
occl: .62,
|
|
383
|
+
soften: .24,
|
|
384
|
+
punch: 1.5
|
|
385
|
+
}, A = {
|
|
386
|
+
speed: 1.85,
|
|
387
|
+
width: .2,
|
|
388
|
+
decay: 1.35,
|
|
389
|
+
amp: 1.35,
|
|
390
|
+
facet: .18,
|
|
391
|
+
lobes: 6,
|
|
392
|
+
sharp: 1.15,
|
|
393
|
+
emit: .45,
|
|
394
|
+
ptrRad: .55,
|
|
395
|
+
ptrAmp: .32,
|
|
396
|
+
ptrFast: .4,
|
|
397
|
+
ptrRim: .8,
|
|
398
|
+
ptrLag: .0016,
|
|
399
|
+
ptrVref: 4.5
|
|
400
|
+
};
|
|
401
|
+
function de(e) {
|
|
402
|
+
let t = e.trim(), n = /^#([0-9a-f]{3,8})$/i.exec(t);
|
|
403
|
+
if (n?.[1]) {
|
|
404
|
+
let e = n[1];
|
|
405
|
+
return (e.length === 3 || e.length === 4) && (e = [...e].map((e) => `${e}${e}`).join("")), [
|
|
406
|
+
Number.parseInt(e.slice(0, 2), 16) / 255,
|
|
407
|
+
Number.parseInt(e.slice(2, 4), 16) / 255,
|
|
408
|
+
Number.parseInt(e.slice(4, 6), 16) / 255
|
|
409
|
+
];
|
|
410
|
+
}
|
|
411
|
+
let r = /^rgba?\(\s*([\d.]+)\s*[, ]\s*([\d.]+)\s*[, ]\s*([\d.]+)/i.exec(t);
|
|
412
|
+
if (r?.[1] && r[2] && r[3]) {
|
|
413
|
+
let e = Number(r[1]), t = Number(r[2]), n = Number(r[3]), i = e > 1 || t > 1 || n > 1 ? 255 : 1;
|
|
414
|
+
return [
|
|
415
|
+
e / i,
|
|
416
|
+
t / i,
|
|
417
|
+
n / i
|
|
418
|
+
];
|
|
419
|
+
}
|
|
420
|
+
return [
|
|
421
|
+
1,
|
|
422
|
+
1,
|
|
423
|
+
1
|
|
424
|
+
];
|
|
425
|
+
}
|
|
426
|
+
function fe(e, t, n) {
|
|
427
|
+
let r = Number.parseFloat(e.getPropertyValue(t).trim());
|
|
428
|
+
return Number.isFinite(r) ? r : n;
|
|
429
|
+
}
|
|
430
|
+
function pe(e, t) {
|
|
431
|
+
let n = (e) => t[e] ?? null;
|
|
432
|
+
return {
|
|
433
|
+
f1: (t, r) => e.uniform1f(n(t), r),
|
|
434
|
+
f2: (t, r, i) => e.uniform2f(n(t), r, i),
|
|
435
|
+
f3: (t, r, i, a) => e.uniform3f(n(t), r, i, a),
|
|
436
|
+
f4: (t, r, i, a, o) => e.uniform4f(n(t), r, i, a, o),
|
|
437
|
+
fv1: (t, r) => e.uniform1fv(n(t), r),
|
|
438
|
+
fv4: (t, r) => e.uniform4fv(n(t), r),
|
|
439
|
+
i1: (t, r) => e.uniform1i(n(t), r)
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
function me(e, t, n) {
|
|
443
|
+
if (typeof e.getContext != "function") return null;
|
|
444
|
+
let r = null;
|
|
445
|
+
try {
|
|
446
|
+
r = e.getContext("webgl2", {
|
|
447
|
+
alpha: !0,
|
|
448
|
+
antialias: !1,
|
|
449
|
+
premultipliedAlpha: !0,
|
|
450
|
+
powerPreference: "high-performance"
|
|
451
|
+
});
|
|
452
|
+
} catch {
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
if (!r) return null;
|
|
456
|
+
let i = r;
|
|
457
|
+
try {
|
|
458
|
+
return M(i, e, t, n);
|
|
459
|
+
} catch {
|
|
460
|
+
return i.getExtension("WEBGL_lose_context")?.loseContext(), null;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function he(e, t, n) {
|
|
464
|
+
let r = e.createShader(t);
|
|
465
|
+
if (!r) throw Error("liquid-metal: createShader returned null");
|
|
466
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) throw Error(e.getShaderInfoLog(r) ?? "liquid-metal: shader compile failed");
|
|
467
|
+
return r;
|
|
468
|
+
}
|
|
469
|
+
function j(e, t) {
|
|
470
|
+
let n = e.createProgram();
|
|
471
|
+
if (!n) throw Error("liquid-metal: createProgram returned null");
|
|
472
|
+
if (e.attachShader(n, he(e, e.VERTEX_SHADER, ne)), e.attachShader(n, he(e, e.FRAGMENT_SHADER, t)), e.bindAttribLocation(n, 0, "position"), e.linkProgram(n), !e.getProgramParameter(n, e.LINK_STATUS)) throw Error(e.getProgramInfoLog(n) ?? "liquid-metal: program link failed");
|
|
473
|
+
let r = {}, i = e.getProgramParameter(n, e.ACTIVE_UNIFORMS);
|
|
474
|
+
for (let t = 0; t < i; t += 1) {
|
|
475
|
+
let i = e.getActiveUniform(n, t);
|
|
476
|
+
i && (r[i.name.replace("[0]", "")] = e.getUniformLocation(n, i.name));
|
|
477
|
+
}
|
|
478
|
+
return {
|
|
479
|
+
p: n,
|
|
480
|
+
u: r
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
function M(e, t, n, r) {
|
|
484
|
+
let i = j(e, ie), a = j(e, re), o = j(e, ae), s = j(e, oe), c = j(e, O), l = e.createVertexArray(), u = e.createBuffer();
|
|
485
|
+
if (!l || !u) throw Error("liquid-metal: VAO/VBO unavailable");
|
|
486
|
+
e.bindVertexArray(l), e.bindBuffer(e.ARRAY_BUFFER, u), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
487
|
+
-1,
|
|
488
|
+
-1,
|
|
489
|
+
3,
|
|
490
|
+
-1,
|
|
491
|
+
-1,
|
|
492
|
+
3
|
|
493
|
+
]), e.STATIC_DRAW), e.enableVertexAttribArray(0), e.vertexAttribPointer(0, 2, e.FLOAT, !1, 0, 0);
|
|
494
|
+
let d = !!e.getExtension("EXT_color_buffer_float");
|
|
495
|
+
function f() {
|
|
496
|
+
let t = e.createTexture(), n = e.createFramebuffer();
|
|
497
|
+
if (!t || !n) throw Error("liquid-metal: FBO unavailable");
|
|
498
|
+
return e.bindTexture(e.TEXTURE_2D, t), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.bindFramebuffer(e.FRAMEBUFFER, n), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, t, 0), {
|
|
499
|
+
tex: t,
|
|
500
|
+
fbo: n,
|
|
501
|
+
w: 0,
|
|
502
|
+
h: 0
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function p(t, n, r) {
|
|
506
|
+
t.w === n && t.h === r || (t.w = n, t.h = r, e.bindTexture(e.TEXTURE_2D, t.tex), d ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA16F, n, r, 0, e.RGBA, e.HALF_FLOAT, null) : e.texImage2D(e.TEXTURE_2D, 0, e.RGBA8, n, r, 0, e.RGBA, e.UNSIGNED_BYTE, null), e.bindFramebuffer(e.FRAMEBUFFER, t.fbo), e.checkFramebufferStatus(e.FRAMEBUFFER) !== e.FRAMEBUFFER_COMPLETE && (e.bindTexture(e.TEXTURE_2D, t.tex), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA8, n, r, 0, e.RGBA, e.UNSIGNED_BYTE, null)));
|
|
507
|
+
}
|
|
508
|
+
let m = f(), h = f(), g = f(), _ = f(), v = f(), y = f(), b = 0, x = 0, S = 0, C = 0, ee = 0, w = 0, T = 4, te = !0, E = document.createElement("span");
|
|
509
|
+
E.setAttribute("aria-hidden", "true"), E.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;color:var(--game-ui-liquid-metal-accent)", r.appendChild(E);
|
|
510
|
+
function ne() {
|
|
511
|
+
let e = n.getBoundingClientRect(), r = Math.min(window.devicePixelRatio || 1, 2), i = 900 / 516 * Math.max(e.height, 1), a = e.width + i * 2, o = e.height + i * 2;
|
|
512
|
+
t.style.width = `${a}px`, t.style.height = `${o}px`;
|
|
513
|
+
let s = Math.max(2, Math.round(a * r)), c = Math.max(2, Math.round(o * r));
|
|
514
|
+
(s !== b || c !== x) && (b = s, x = c, t.width = b, t.height = x), S = e.width * r, C = e.height * r, ee = b / 2, w = x / 2, p(m, b, x), p(h, b, x);
|
|
515
|
+
let l = Math.max(2, Math.ceil(b / 2)), u = Math.max(2, Math.ceil(x / 2));
|
|
516
|
+
p(g, l, u), p(_, l, u), T = Math.max(1, Math.min(4, Math.round(Math.max(C, 110) / 129)));
|
|
517
|
+
let d = Math.max(2, Math.ceil(b / T)), f = Math.max(2, Math.ceil(x / T));
|
|
518
|
+
p(v, d, f), p(y, d, f), te = !1;
|
|
519
|
+
}
|
|
520
|
+
function D(t) {
|
|
521
|
+
e.bindFramebuffer(e.FRAMEBUFFER, t ? t.fbo : null), e.viewport(0, 0, t ? t.w : b, t ? t.h : x), e.drawArrays(e.TRIANGLES, 0, 3);
|
|
522
|
+
}
|
|
523
|
+
let me = new Float32Array(ce.length), he = new Float32Array(ue.length), M = 0, N = 0, ge = 0, _e = performance.now(), ve = [
|
|
524
|
+
0,
|
|
525
|
+
1,
|
|
526
|
+
2
|
|
527
|
+
].map(() => ({
|
|
528
|
+
x: 0,
|
|
529
|
+
y: 0,
|
|
530
|
+
t: -99,
|
|
531
|
+
on: 0
|
|
532
|
+
})), P = /* @__PURE__ */ new Float32Array(12), F = 0, I = 0, ye = 0, L = {
|
|
533
|
+
x: 0,
|
|
534
|
+
y: 0
|
|
535
|
+
}, R = {
|
|
536
|
+
x: 0,
|
|
537
|
+
y: 0
|
|
538
|
+
}, z = 0, B = 0, V = {
|
|
539
|
+
over: !1,
|
|
540
|
+
press: !1,
|
|
541
|
+
focus: !1
|
|
542
|
+
};
|
|
543
|
+
function H(e, t) {
|
|
544
|
+
let n = ve[F];
|
|
545
|
+
n && (F = (F + 1) % ve.length, n.x = e, n.y = t, n.t = ge, n.on = 1);
|
|
546
|
+
}
|
|
547
|
+
function U(e) {
|
|
548
|
+
let t = n.getBoundingClientRect(), r = t.height || 1;
|
|
549
|
+
return [(e.clientX - (t.left + t.width / 2)) / r, (e.clientY - (t.top + t.height / 2)) / r];
|
|
550
|
+
}
|
|
551
|
+
function W() {
|
|
552
|
+
N = V.over || V.press || V.focus ? 1 : 0, ye = +!!V.press;
|
|
553
|
+
}
|
|
554
|
+
let be = window.matchMedia("(prefers-reduced-motion: reduce)"), xe = null, G = 0, K = !1, Se = !1;
|
|
555
|
+
function Ce() {
|
|
556
|
+
let e = getComputedStyle(n);
|
|
557
|
+
return le.base = fe(e, "--game-ui-liquid-metal-rest", le.base), le.speed = fe(e, "--game-ui-liquid-metal-sweep-speed", le.speed), se.disp = fe(e, "--game-ui-liquid-metal-dispersion", se.disp), k.glow = fe(e, "--game-ui-liquid-metal-bloom", k.glow), { accent: de(getComputedStyle(E).color) };
|
|
558
|
+
}
|
|
559
|
+
function we(t) {
|
|
560
|
+
if (G = 0, K || Se) return;
|
|
561
|
+
let r = (t - _e) / 1e3;
|
|
562
|
+
_e = t;
|
|
563
|
+
let l = Math.min(r, 1 / 20);
|
|
564
|
+
be.matches || (ge += l);
|
|
565
|
+
let u = N > M ? 1 - .0012 ** l : 1 - 12e-5 ** l;
|
|
566
|
+
M += (N - M) * u, Math.abs(N - M) < 8e-4 && (M = N);
|
|
567
|
+
let d = ye > I ? 1 - 1e-9 ** l : 1 - .004 ** l;
|
|
568
|
+
I += (ye - I) * d, Math.abs(ye - I) < .002 && (I = ye);
|
|
569
|
+
let f = !1;
|
|
570
|
+
for (let e = 0; e < ve.length; e += 1) {
|
|
571
|
+
let t = ve[e];
|
|
572
|
+
t && (t.on && ge - t.t > 4 && (t.on = 0), t.on && (f = !0), P[e * 4] = t.x, P[e * 4 + 1] = t.y, P[e * 4 + 2] = t.t, P[e * 4 + 3] = t.on);
|
|
573
|
+
}
|
|
574
|
+
let p = 1 - A.ptrLag ** +l, E = (L.x - R.x) * p, re = (L.y - R.y) * p;
|
|
575
|
+
R.x += E, R.y += re;
|
|
576
|
+
let ie = Math.min(Math.hypot(E, re) / Math.max(l, .001) / A.ptrVref, 1);
|
|
577
|
+
B += (ie - B) * (1 - (ie > B ? .001 : .02) ** l);
|
|
578
|
+
let ae = V.over || V.press ? 1 : 0;
|
|
579
|
+
z += (ae - z) * (1 - .004 ** l), Math.abs(ae - z) < .002 && (z = ae), V.over = n.matches(":hover"), V.focus = n.matches(":focus-visible"), W(), te && ne();
|
|
580
|
+
let oe = be.matches && !f && z < .002 ? `${M}|${I}|${b}|${x}` : null;
|
|
581
|
+
if (oe !== null && oe === xe) {
|
|
582
|
+
G = requestAnimationFrame(we);
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
xe = oe;
|
|
586
|
+
let { accent: O } = Ce();
|
|
587
|
+
for (let e = 0; e < me.length; e += 1) {
|
|
588
|
+
let t = ce[e];
|
|
589
|
+
t && (me[e] = se[t]);
|
|
590
|
+
}
|
|
591
|
+
for (let e = 0; e < he.length; e += 1) {
|
|
592
|
+
let t = ue[e];
|
|
593
|
+
t && (he[e] = le[t]);
|
|
594
|
+
}
|
|
595
|
+
let de = Math.max(C, 110), fe = Math.max(2.4, de / 516 * 3.2), j = pe(e, i.u), F = pe(e, a.u), H = pe(e, o.u), U = pe(e, s.u), q = pe(e, c.u);
|
|
596
|
+
e.useProgram(i.p), j.f2("uC", ee, w), j.f2("uHalf", S / 2, C / 2), j.f1("uT", ge), j.f1("uHover", M), j.f1("uPress", I), j.fv4("uRip", P), j.f4("uRipK", A.speed, A.width, A.decay, A.amp), j.f4("uRipK2", A.facet, A.lobes, A.sharp, A.emit), j.f4("uPtr", R.x, R.y, z, B), j.f4("uPtrK", A.ptrRad, A.ptrAmp, A.ptrFast, A.ptrRim), j.f3("uAccent", O[0], O[1], O[2]), j.fv1("uP", me), D(m), e.useProgram(a.p), F.f2("uC", ee, w), F.f2("uHalf", S / 2, C / 2), F.f1("uT", ge), F.f1("uBw", fe), F.f1("uPress", I), F.fv4("uRip", P), F.f4("uRipK", A.speed, A.width, A.decay, A.amp), F.f4("uRipK2", A.facet, A.lobes, A.sharp, A.emit), F.f4("uPtr", R.x, R.y, z, B), F.f4("uPtrK", A.ptrRad, A.ptrAmp, A.ptrFast, A.ptrRim), F.f3("uAccent", O[0], O[1], O[2]), F.fv1("uE", he), D(h), e.useProgram(o.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, m.tex), H.i1("uTex", 0), H.f1("uAdd", 0), H.f2("uDstTexel", 1 / g.w, 1 / g.h), H.f2("uSrcTexel", 1 / b, 1 / x), D(g), e.useProgram(s.p), U.i1("uTex", 0), U.f2("uTexel", 1 / g.w, 1 / g.h);
|
|
597
|
+
let J = k.soften * (de * .5) * .95;
|
|
598
|
+
if (J > .1) {
|
|
599
|
+
let t = Math.min(4, Math.max(1, Math.ceil(J / 3)));
|
|
600
|
+
U.f1("uR", J / Math.sqrt(t) / 1.95);
|
|
601
|
+
for (let n = 0; n < t; n += 1) e.bindTexture(e.TEXTURE_2D, g.tex), U.f2("uDir", 1, 0), D(_), e.bindTexture(e.TEXTURE_2D, _.tex), U.f2("uDir", 0, 1), D(g);
|
|
602
|
+
}
|
|
603
|
+
e.useProgram(o.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex), H.i1("uTex", 0), H.i1("uTex2", 1), H.f1("uAdd", 1), H.f2("uDstTexel", 1 / v.w, 1 / v.h), H.f2("uSrcTexel", 1 / g.w, 1 / g.h), D(v), e.useProgram(s.p), e.activeTexture(e.TEXTURE0), U.i1("uTex", 0), U.f2("uTexel", 1 / v.w, 1 / v.h);
|
|
604
|
+
let Te = k.glowR * (de / T) / 129;
|
|
605
|
+
for (let t of [
|
|
606
|
+
1,
|
|
607
|
+
2.3,
|
|
608
|
+
5.2,
|
|
609
|
+
9
|
|
610
|
+
].map((e) => e * Te)) U.f1("uR", t), e.bindTexture(e.TEXTURE_2D, v.tex), U.f2("uDir", 1, 0), D(y), e.bindTexture(e.TEXTURE_2D, y.tex), U.f2("uDir", 0, 1), D(v);
|
|
611
|
+
e.useProgram(c.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), q.i1("uSoft", 0), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex), q.i1("uRim", 1), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D, v.tex), q.i1("uGlow", 2), q.f2("uRes", b, x), q.f2("uC", ee, w), q.f2("uHalf", S / 2, C / 2), q.f1("uT", ge), q.fv4("uRip", P), q.f4("uRipK", A.speed, A.width, A.decay, A.amp), q.f4("uRipK2", A.facet, A.lobes, A.sharp, A.emit), q.f3("uAccent", O[0], O[1], O[2]), q.f1("uGlowGain", k.glow), q.f1("uGlowIn", k.glowIn), q.f1("uOccl", k.occl), q.f1("uDim", se.dim), q.f1("uPunch", k.punch), D(null), G = requestAnimationFrame(we);
|
|
612
|
+
}
|
|
613
|
+
let q = (e) => {
|
|
614
|
+
if (e.pointerType !== "mouse") return;
|
|
615
|
+
let [t, n] = U(e);
|
|
616
|
+
L.x = t, L.y = n, R.x = t, R.y = n, B = 0, V.over = !0, W();
|
|
617
|
+
}, J = (e) => {
|
|
618
|
+
e.pointerType === "mouse" && (V.over = !1, W());
|
|
619
|
+
}, Te = (e) => {
|
|
620
|
+
if (!V.over && !V.press) return;
|
|
621
|
+
let [t, n] = U(e);
|
|
622
|
+
L.x = t, L.y = n;
|
|
623
|
+
}, Ee = (e) => {
|
|
624
|
+
let [t, n] = U(e);
|
|
625
|
+
L.x = t, L.y = n, V.press = !0, W(), H(t, n);
|
|
626
|
+
}, De = () => {
|
|
627
|
+
V.press = !1, W();
|
|
628
|
+
}, Oe = () => {
|
|
629
|
+
V.focus = n.matches(":focus-visible"), W();
|
|
630
|
+
}, Y = () => {
|
|
631
|
+
V.focus = !1, W();
|
|
632
|
+
}, ke = (e) => {
|
|
633
|
+
e.key !== "Enter" && e.key !== " " || e.repeat || (V.press = !0, W(), H(0, 0));
|
|
634
|
+
}, Ae = (e) => {
|
|
635
|
+
e.key !== "Enter" && e.key !== " " || (V.press = !1, W());
|
|
636
|
+
};
|
|
637
|
+
n.addEventListener("pointerenter", q), n.addEventListener("pointerleave", J), window.addEventListener("pointermove", Te, { passive: !0 }), n.addEventListener("pointerdown", Ee), window.addEventListener("pointerup", De), window.addEventListener("pointercancel", De), n.addEventListener("focus", Oe), n.addEventListener("blur", Y), n.addEventListener("keydown", ke), n.addEventListener("keyup", Ae);
|
|
638
|
+
let je = new ResizeObserver(() => {
|
|
639
|
+
te = !0;
|
|
640
|
+
});
|
|
641
|
+
return je.observe(r), je.observe(n), ne(), G = requestAnimationFrame(we), {
|
|
642
|
+
pause: () => {
|
|
643
|
+
K = !0, G && cancelAnimationFrame(G), G = 0;
|
|
644
|
+
},
|
|
645
|
+
resume: () => {
|
|
646
|
+
Se || (K = !1, _e = performance.now(), xe = null, G ||= requestAnimationFrame(we));
|
|
647
|
+
},
|
|
648
|
+
dispose: () => {
|
|
649
|
+
Se || (Se = !0, K = !0, G && cancelAnimationFrame(G), G = 0, je.disconnect(), n.removeEventListener("pointerenter", q), n.removeEventListener("pointerleave", J), window.removeEventListener("pointermove", Te), n.removeEventListener("pointerdown", Ee), window.removeEventListener("pointerup", De), window.removeEventListener("pointercancel", De), n.removeEventListener("focus", Oe), n.removeEventListener("blur", Y), n.removeEventListener("keydown", ke), n.removeEventListener("keyup", Ae), E.remove(), e.getExtension("WEBGL_lose_context")?.loseContext());
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region src/LiquidMetalButton.tsx
|
|
655
|
+
function N({ children: e, className: r, onClick: i, sound: a = !1, type: o = "button", renderer: s = "auto", ...l }) {
|
|
656
|
+
let f = u(null), p = u(null), m = u(null), [h, g] = d("css");
|
|
657
|
+
c(() => {
|
|
658
|
+
let e = f.current, t = p.current, n = m.current;
|
|
659
|
+
if (!e || !t || !n) return;
|
|
660
|
+
let r = window.matchMedia("(prefers-reduced-motion: reduce)"), i = !1, a = !1, o = null, c = !1, l = () => {
|
|
661
|
+
o?.dispose(), o = null, a &&= (te(), !1), c || g("css");
|
|
662
|
+
}, u = () => {
|
|
663
|
+
if (!(c || o) && E({
|
|
664
|
+
renderer: s,
|
|
665
|
+
hasWebGL2: typeof WebGL2RenderingContext < "u",
|
|
666
|
+
prefersReducedMotion: r.matches,
|
|
667
|
+
isInViewport: i
|
|
668
|
+
}) && T()) {
|
|
669
|
+
if (a = !0, o = me(n, t, e), !o) {
|
|
670
|
+
te(), a = !1;
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
g("webgl");
|
|
674
|
+
}
|
|
675
|
+
}, d = new IntersectionObserver((e) => {
|
|
676
|
+
i = !!e[0]?.isIntersecting, o ? i && document.visibilityState !== "hidden" ? o.resume() : o.pause() : u();
|
|
677
|
+
}, { rootMargin: "80px" });
|
|
678
|
+
d.observe(e);
|
|
679
|
+
let h = () => {
|
|
680
|
+
o && (document.visibilityState === "hidden" || !i ? o.pause() : o.resume());
|
|
681
|
+
};
|
|
682
|
+
document.addEventListener("visibilitychange", h);
|
|
683
|
+
let _ = () => {
|
|
684
|
+
if (r.matches) {
|
|
685
|
+
l();
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
u();
|
|
689
|
+
};
|
|
690
|
+
return r.addEventListener("change", _), u(), () => {
|
|
691
|
+
c = !0, d.disconnect(), document.removeEventListener("visibilitychange", h), r.removeEventListener("change", _), l();
|
|
692
|
+
};
|
|
693
|
+
}, [s]);
|
|
694
|
+
let _ = (e) => {
|
|
695
|
+
a && y(a), i?.(e);
|
|
696
|
+
}, v = ["game-ui-liquid-metal", r].filter(Boolean).join(" ");
|
|
697
|
+
return /* @__PURE__ */ n("span", {
|
|
698
|
+
ref: f,
|
|
699
|
+
className: "game-ui-liquid-metal-host",
|
|
700
|
+
"data-renderer": h,
|
|
701
|
+
children: [
|
|
702
|
+
/* @__PURE__ */ t("span", {
|
|
703
|
+
"aria-hidden": "true",
|
|
704
|
+
className: "game-ui-liquid-metal-plate"
|
|
705
|
+
}),
|
|
706
|
+
/* @__PURE__ */ t("canvas", {
|
|
707
|
+
ref: m,
|
|
708
|
+
"aria-hidden": "true",
|
|
709
|
+
className: "game-ui-liquid-metal-canvas"
|
|
710
|
+
}),
|
|
711
|
+
/* @__PURE__ */ t("button", {
|
|
712
|
+
className: v,
|
|
713
|
+
onClick: _,
|
|
714
|
+
ref: p,
|
|
715
|
+
type: o,
|
|
716
|
+
...l,
|
|
717
|
+
children: /* @__PURE__ */ t("span", {
|
|
718
|
+
className: "game-ui-liquid-metal-label",
|
|
719
|
+
children: e
|
|
720
|
+
})
|
|
721
|
+
})
|
|
722
|
+
]
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
//#endregion
|
|
84
726
|
//#region src/GameCallout.tsx
|
|
85
|
-
function
|
|
727
|
+
function ge({ heading: e, children: r, tone: i = "info", className: a, ...o }) {
|
|
86
728
|
return /* @__PURE__ */ n("div", {
|
|
87
729
|
className: [
|
|
88
730
|
"game-ui-callout",
|
|
@@ -103,7 +745,7 @@ function x({ heading: e, children: r, tone: i = "info", className: a, ...o }) {
|
|
|
103
745
|
}
|
|
104
746
|
//#endregion
|
|
105
747
|
//#region src/GameDialog.tsx
|
|
106
|
-
function
|
|
748
|
+
function _e({ children: e, className: r, title: i }) {
|
|
107
749
|
let a = l();
|
|
108
750
|
return /* @__PURE__ */ n("section", {
|
|
109
751
|
"aria-labelledby": a,
|
|
@@ -121,7 +763,7 @@ function S({ children: e, className: r, title: i }) {
|
|
|
121
763
|
}
|
|
122
764
|
//#endregion
|
|
123
765
|
//#region src/GameHistoryPanel.tsx
|
|
124
|
-
function
|
|
766
|
+
function ve({ entries: e, label: r }) {
|
|
125
767
|
return /* @__PURE__ */ t("section", {
|
|
126
768
|
"aria-label": r,
|
|
127
769
|
className: "game-ui-history",
|
|
@@ -137,7 +779,7 @@ function C({ entries: e, label: r }) {
|
|
|
137
779
|
}
|
|
138
780
|
//#endregion
|
|
139
781
|
//#region src/GameHudActions.tsx
|
|
140
|
-
function
|
|
782
|
+
function P({ children: e, className: n, label: r, ...i }) {
|
|
141
783
|
return /* @__PURE__ */ t("nav", {
|
|
142
784
|
"aria-label": r,
|
|
143
785
|
className: ["game-ui-hud-actions", n].filter(Boolean).join(" "),
|
|
@@ -148,7 +790,7 @@ function w({ children: e, className: n, label: r, ...i }) {
|
|
|
148
790
|
}
|
|
149
791
|
//#endregion
|
|
150
792
|
//#region src/GameSurfaces.tsx
|
|
151
|
-
function
|
|
793
|
+
function F({ children: e, className: r, title: i, tone: a = "default", ...o }) {
|
|
152
794
|
let s = ["game-ui-panel", r].filter(Boolean).join(" ");
|
|
153
795
|
return /* @__PURE__ */ n("section", {
|
|
154
796
|
...o,
|
|
@@ -157,7 +799,7 @@ function T({ children: e, className: r, title: i, tone: a = "default", ...o }) {
|
|
|
157
799
|
children: [i ? /* @__PURE__ */ t("h3", { children: i }) : null, e]
|
|
158
800
|
});
|
|
159
801
|
}
|
|
160
|
-
function
|
|
802
|
+
function I({ children: e, className: n, label: r, type: i = "button", ...a }) {
|
|
161
803
|
return /* @__PURE__ */ t("button", {
|
|
162
804
|
"aria-label": r,
|
|
163
805
|
className: ["game-ui-icon-button", n].filter(Boolean).join(" "),
|
|
@@ -166,7 +808,7 @@ function E({ children: e, className: n, label: r, type: i = "button", ...a }) {
|
|
|
166
808
|
children: e
|
|
167
809
|
});
|
|
168
810
|
}
|
|
169
|
-
function
|
|
811
|
+
function ye({ children: e, label: i }) {
|
|
170
812
|
let a = l();
|
|
171
813
|
return /* @__PURE__ */ n("span", {
|
|
172
814
|
className: "game-ui-tooltip",
|
|
@@ -177,7 +819,7 @@ function ee({ children: e, label: i }) {
|
|
|
177
819
|
})]
|
|
178
820
|
});
|
|
179
821
|
}
|
|
180
|
-
function
|
|
822
|
+
function L({ activeId: e, id: n, onSelect: r, tabs: i }) {
|
|
181
823
|
let a = l(), o = n ?? a;
|
|
182
824
|
return /* @__PURE__ */ t("div", {
|
|
183
825
|
className: "game-ui-tabs",
|
|
@@ -217,7 +859,7 @@ function te({ activeId: e, id: n, onSelect: r, tabs: i }) {
|
|
|
217
859
|
}, n.id))
|
|
218
860
|
});
|
|
219
861
|
}
|
|
220
|
-
function
|
|
862
|
+
function R({ activeId: e, label: n, onSelect: r, options: i }) {
|
|
221
863
|
return /* @__PURE__ */ t("div", {
|
|
222
864
|
"aria-label": n,
|
|
223
865
|
className: "game-ui-segmented",
|
|
@@ -231,7 +873,7 @@ function ne({ activeId: e, label: n, onSelect: r, options: i }) {
|
|
|
231
873
|
}, n.id))
|
|
232
874
|
});
|
|
233
875
|
}
|
|
234
|
-
function
|
|
876
|
+
function z({ label: e, max: r, min: i, onChange: a, value: o }) {
|
|
235
877
|
return /* @__PURE__ */ n("label", {
|
|
236
878
|
className: "game-ui-slider",
|
|
237
879
|
children: [/* @__PURE__ */ t("span", { children: e }), /* @__PURE__ */ t("input", {
|
|
@@ -245,7 +887,7 @@ function re({ label: e, max: r, min: i, onChange: a, value: o }) {
|
|
|
245
887
|
})]
|
|
246
888
|
});
|
|
247
889
|
}
|
|
248
|
-
function
|
|
890
|
+
function B({ checked: e, disabled: r, label: i, onClick: a }) {
|
|
249
891
|
return /* @__PURE__ */ n("button", {
|
|
250
892
|
"aria-checked": e,
|
|
251
893
|
className: "game-ui-toggle",
|
|
@@ -259,7 +901,7 @@ function ie({ checked: e, disabled: r, label: i, onClick: a }) {
|
|
|
259
901
|
})]
|
|
260
902
|
});
|
|
261
903
|
}
|
|
262
|
-
function
|
|
904
|
+
function V({ items: e, label: n, onSelect: r }) {
|
|
263
905
|
return /* @__PURE__ */ t("div", {
|
|
264
906
|
"aria-label": n,
|
|
265
907
|
className: "game-ui-radial-menu",
|
|
@@ -274,7 +916,7 @@ function ae({ items: e, label: n, onSelect: r }) {
|
|
|
274
916
|
}, e.id))
|
|
275
917
|
});
|
|
276
918
|
}
|
|
277
|
-
function
|
|
919
|
+
function H({ children: e, tone: n = "info" }) {
|
|
278
920
|
return /* @__PURE__ */ t("div", {
|
|
279
921
|
className: "game-ui-toast",
|
|
280
922
|
"data-toast-tone": n,
|
|
@@ -282,7 +924,7 @@ function oe({ children: e, tone: n = "info" }) {
|
|
|
282
924
|
children: e
|
|
283
925
|
});
|
|
284
926
|
}
|
|
285
|
-
function
|
|
927
|
+
function U({ actionLabel: e, children: r, title: i }) {
|
|
286
928
|
return /* @__PURE__ */ n("section", {
|
|
287
929
|
"aria-label": i,
|
|
288
930
|
className: "game-ui-prompt",
|
|
@@ -294,7 +936,7 @@ function se({ actionLabel: e, children: r, title: i }) {
|
|
|
294
936
|
}
|
|
295
937
|
//#endregion
|
|
296
938
|
//#region src/clay/tokens.ts
|
|
297
|
-
var
|
|
939
|
+
var W = {
|
|
298
940
|
ink: "#3b2d23",
|
|
299
941
|
inkMuted: "#786250",
|
|
300
942
|
parchment: "#fff8ec",
|
|
@@ -314,8 +956,18 @@ var D = {
|
|
|
314
956
|
glass: "rgba(255, 248, 236, 0.82)",
|
|
315
957
|
nightGlass: "rgba(31, 24, 18, 0.76)",
|
|
316
958
|
overlayGlass: "rgba(12, 14, 20, 0.72)",
|
|
317
|
-
overlayGlassText: "#fff6ee"
|
|
318
|
-
|
|
959
|
+
overlayGlassText: "#fff6ee",
|
|
960
|
+
liquidMetalFace: "#3a2518",
|
|
961
|
+
liquidMetalInk: "#fff8ec"
|
|
962
|
+
}, be = {
|
|
963
|
+
face: "var(--game-ui-liquid-metal-face)",
|
|
964
|
+
ink: "var(--game-ui-liquid-metal-ink)",
|
|
965
|
+
accent: "var(--game-ui-liquid-metal-accent)",
|
|
966
|
+
dispersion: "var(--game-ui-liquid-metal-dispersion)",
|
|
967
|
+
sweepSpeed: "var(--game-ui-liquid-metal-sweep-speed)",
|
|
968
|
+
rest: "var(--game-ui-liquid-metal-rest)",
|
|
969
|
+
bloom: "var(--game-ui-liquid-metal-bloom)"
|
|
970
|
+
}, xe = {
|
|
319
971
|
bg: "var(--game-ui-overlay-glass-bg)",
|
|
320
972
|
bgHover: "var(--game-ui-overlay-glass-bg-hover)",
|
|
321
973
|
bgStrong: "var(--game-ui-overlay-glass-bg-strong)",
|
|
@@ -327,7 +979,7 @@ var D = {
|
|
|
327
979
|
blur: "var(--game-ui-overlay-glass-blur)",
|
|
328
980
|
focusRing: "var(--game-ui-overlay-glass-focus-ring)",
|
|
329
981
|
primaryFill: "var(--game-ui-overlay-glass-primary-fill)"
|
|
330
|
-
},
|
|
982
|
+
}, G = {
|
|
331
983
|
background: "var(--game-ui-bg)",
|
|
332
984
|
playfieldScrim: "var(--game-ui-playfield-scrim)",
|
|
333
985
|
surface: "var(--game-ui-surface)",
|
|
@@ -346,7 +998,7 @@ var D = {
|
|
|
346
998
|
borderSubtle: "var(--game-ui-border-subtle)",
|
|
347
999
|
borderStrong: "var(--game-ui-border-strong)",
|
|
348
1000
|
disabled: "var(--game-ui-disabled)"
|
|
349
|
-
},
|
|
1001
|
+
}, K = {
|
|
350
1002
|
familyDisplay: "var(--game-ui-font-display)",
|
|
351
1003
|
familyBody: "var(--game-ui-font-body)",
|
|
352
1004
|
familyMono: "var(--game-ui-font-mono)",
|
|
@@ -364,7 +1016,7 @@ var D = {
|
|
|
364
1016
|
weightBody: "var(--game-ui-weight-body)",
|
|
365
1017
|
weightStrong: "var(--game-ui-weight-strong)",
|
|
366
1018
|
weightTitle: "var(--game-ui-weight-title)"
|
|
367
|
-
},
|
|
1019
|
+
}, Se = {
|
|
368
1020
|
px2: "var(--game-ui-space-2)",
|
|
369
1021
|
px4: "var(--game-ui-space-4)",
|
|
370
1022
|
px6: "var(--game-ui-space-6)",
|
|
@@ -379,33 +1031,33 @@ var D = {
|
|
|
379
1031
|
safeRight: "var(--game-ui-safe-right)",
|
|
380
1032
|
safeBottom: "var(--game-ui-safe-bottom)",
|
|
381
1033
|
safeLeft: "var(--game-ui-safe-left)"
|
|
382
|
-
},
|
|
1034
|
+
}, Ce = {
|
|
383
1035
|
bead: "var(--game-ui-radius-bead)",
|
|
384
1036
|
control: "var(--game-ui-radius-control)",
|
|
385
1037
|
card: "var(--game-ui-radius-card)",
|
|
386
1038
|
panel: "var(--game-ui-radius-panel)",
|
|
387
1039
|
modal: "var(--game-ui-radius-modal)"
|
|
388
|
-
},
|
|
1040
|
+
}, we = {
|
|
389
1041
|
button: "var(--game-ui-shadow-button)",
|
|
390
1042
|
panel: "var(--game-ui-shadow-panel)",
|
|
391
1043
|
modal: "var(--game-ui-shadow-modal)",
|
|
392
1044
|
inset: "var(--game-ui-shadow-inset)",
|
|
393
1045
|
stroke: "var(--game-ui-stroke)"
|
|
394
|
-
},
|
|
1046
|
+
}, q = {
|
|
395
1047
|
fast: "var(--game-ui-motion-fast)",
|
|
396
1048
|
base: "var(--game-ui-motion-base)",
|
|
397
1049
|
slow: "var(--game-ui-motion-slow)",
|
|
398
1050
|
easingPop: "var(--game-ui-ease-pop)",
|
|
399
1051
|
easingSoft: "var(--game-ui-ease-soft)",
|
|
400
1052
|
reducedMotion: "var(--game-ui-reduced-motion-policy)"
|
|
401
|
-
},
|
|
1053
|
+
}, J = {
|
|
402
1054
|
playfield: "var(--game-ui-z-playfield)",
|
|
403
1055
|
hud: "var(--game-ui-z-hud)",
|
|
404
1056
|
sidebar: "var(--game-ui-z-sidebar)",
|
|
405
1057
|
overlay: "var(--game-ui-z-overlay)",
|
|
406
1058
|
modal: "var(--game-ui-z-modal)",
|
|
407
1059
|
toast: "var(--game-ui-z-toast)"
|
|
408
|
-
},
|
|
1060
|
+
}, Te = {
|
|
409
1061
|
touchMinimumPx: 44,
|
|
410
1062
|
touchPrimaryPx: 52,
|
|
411
1063
|
touchIconPx: 48,
|
|
@@ -416,7 +1068,7 @@ var D = {
|
|
|
416
1068
|
desktopProofHeightPx: 900,
|
|
417
1069
|
mobileLandscapeProofWidthPx: 844,
|
|
418
1070
|
mobileLandscapeProofHeightPx: 390
|
|
419
|
-
},
|
|
1071
|
+
}, Ee = {
|
|
420
1072
|
iconSm: "var(--game-ui-asset-icon-sm)",
|
|
421
1073
|
iconMd: "var(--game-ui-asset-icon-md)",
|
|
422
1074
|
iconLg: "var(--game-ui-asset-icon-lg)",
|
|
@@ -428,178 +1080,179 @@ var D = {
|
|
|
428
1080
|
terrainToolHitSize: "var(--game-ui-terrain-tool-hit-size)",
|
|
429
1081
|
buildRailCardSize: "var(--game-ui-build-rail-card-size)",
|
|
430
1082
|
brushNumberWidth: "var(--game-ui-brush-number-width)"
|
|
431
|
-
},
|
|
432
|
-
colors:
|
|
433
|
-
semantic:
|
|
434
|
-
typography:
|
|
435
|
-
spacing:
|
|
436
|
-
radius:
|
|
437
|
-
elevation:
|
|
438
|
-
motion:
|
|
439
|
-
layers:
|
|
440
|
-
targets:
|
|
441
|
-
assetSizing:
|
|
442
|
-
overlayGlass:
|
|
443
|
-
|
|
444
|
-
|
|
1083
|
+
}, De = {
|
|
1084
|
+
colors: W,
|
|
1085
|
+
semantic: G,
|
|
1086
|
+
typography: K,
|
|
1087
|
+
spacing: Se,
|
|
1088
|
+
radius: Ce,
|
|
1089
|
+
elevation: we,
|
|
1090
|
+
motion: q,
|
|
1091
|
+
layers: J,
|
|
1092
|
+
targets: Te,
|
|
1093
|
+
assetSizing: Ee,
|
|
1094
|
+
overlayGlass: xe,
|
|
1095
|
+
liquidMetal: be
|
|
1096
|
+
}, Oe = "/assets/game/ui/clay/phase03-clay-kit", Y = (e) => `${Oe}/${e}`, ke = {
|
|
1097
|
+
ai: { line: Y("icons/function/brain-v1.png") },
|
|
445
1098
|
alert: {
|
|
446
|
-
game:
|
|
447
|
-
line:
|
|
1099
|
+
game: Y("components/common/alert-v1.png"),
|
|
1100
|
+
line: Y("icons/function/warning-v1.png")
|
|
448
1101
|
},
|
|
449
|
-
card: { line:
|
|
450
|
-
chat: { line:
|
|
451
|
-
check: { line:
|
|
1102
|
+
card: { line: Y("icons/function/card-v1.png") },
|
|
1103
|
+
chat: { line: Y("icons/function/chat-v1.png") },
|
|
1104
|
+
check: { line: Y("icons/function/check-v1.png") },
|
|
452
1105
|
close: {
|
|
453
|
-
game:
|
|
454
|
-
line:
|
|
1106
|
+
game: Y("components/language/button-close-v1.png"),
|
|
1107
|
+
line: Y("icons/function/cancel-v1.png")
|
|
455
1108
|
},
|
|
456
1109
|
coin: {
|
|
457
|
-
game:
|
|
458
|
-
line:
|
|
1110
|
+
game: Y("icons/common/gold-v1.png"),
|
|
1111
|
+
line: Y("icons/function/gold-v1.png")
|
|
459
1112
|
},
|
|
460
|
-
compass: { line:
|
|
461
|
-
copy: { line:
|
|
1113
|
+
compass: { line: Y("icons/function/compass-v1.png") },
|
|
1114
|
+
copy: { line: Y("icons/function/copy-v1.png") },
|
|
462
1115
|
crown: {
|
|
463
|
-
game:
|
|
464
|
-
line:
|
|
1116
|
+
game: Y("icons/common/crown-v1.png"),
|
|
1117
|
+
line: Y("icons/function/crown-v1.png")
|
|
465
1118
|
},
|
|
466
1119
|
energy: {
|
|
467
|
-
game:
|
|
468
|
-
line:
|
|
1120
|
+
game: Y("icons/common/energy-v1.png"),
|
|
1121
|
+
line: Y("icons/function/energy-v1.png")
|
|
469
1122
|
},
|
|
470
1123
|
gem: {
|
|
471
|
-
game:
|
|
472
|
-
line:
|
|
1124
|
+
game: Y("icons/common/gem-v1.png"),
|
|
1125
|
+
line: Y("icons/function/gem-v1.png")
|
|
473
1126
|
},
|
|
474
1127
|
gift: {
|
|
475
|
-
game:
|
|
476
|
-
line:
|
|
1128
|
+
game: Y("icons/common/gift-red-v1.png"),
|
|
1129
|
+
line: Y("icons/function/gift-v1.png")
|
|
477
1130
|
},
|
|
478
|
-
globe: { line:
|
|
479
|
-
history: { line:
|
|
480
|
-
home: { line:
|
|
1131
|
+
globe: { line: Y("icons/function/globe-v1.png") },
|
|
1132
|
+
history: { line: Y("icons/function/list-v1.png") },
|
|
1133
|
+
home: { line: Y("icons/function/home-v1.png") },
|
|
481
1134
|
hourglass: {
|
|
482
|
-
game:
|
|
483
|
-
line:
|
|
1135
|
+
game: Y("icons/common/sandglass-v1.png"),
|
|
1136
|
+
line: Y("icons/function/sandglass-v1.png")
|
|
484
1137
|
},
|
|
485
|
-
laurel: { game:
|
|
1138
|
+
laurel: { game: Y("icons/common/laurel-v1.png") },
|
|
486
1139
|
lock: {
|
|
487
|
-
game:
|
|
488
|
-
line:
|
|
1140
|
+
game: Y("icons/common/lock-v1.png"),
|
|
1141
|
+
line: Y("icons/function/lock-v1.png")
|
|
489
1142
|
},
|
|
490
|
-
lucky: { game:
|
|
1143
|
+
lucky: { game: Y("icons/common/lucky-v1.png") },
|
|
491
1144
|
mail: {
|
|
492
|
-
game:
|
|
493
|
-
line:
|
|
1145
|
+
game: Y("icons/common/envelope-v1.png"),
|
|
1146
|
+
line: Y("icons/function/mail-unread-v1.png")
|
|
494
1147
|
},
|
|
495
1148
|
medal: {
|
|
496
|
-
game:
|
|
497
|
-
line:
|
|
1149
|
+
game: Y("icons/common/medal-gold-v1.png"),
|
|
1150
|
+
line: Y("icons/function/medal-v1.png")
|
|
498
1151
|
},
|
|
499
|
-
mission: { game:
|
|
500
|
-
mobile: { line:
|
|
1152
|
+
mission: { game: Y("icons/common/mission-v1.png") },
|
|
1153
|
+
mobile: { line: Y("icons/function/mobile-v1.png") },
|
|
501
1154
|
portal: {
|
|
502
|
-
game:
|
|
503
|
-
line:
|
|
1155
|
+
game: Y("icons/common/key-v1.png"),
|
|
1156
|
+
line: Y("icons/function/compass-v1.png")
|
|
504
1157
|
},
|
|
505
1158
|
scroll: {
|
|
506
|
-
game:
|
|
507
|
-
line:
|
|
1159
|
+
game: Y("icons/common/scroll-v1.png"),
|
|
1160
|
+
line: Y("icons/function/list-v1.png")
|
|
508
1161
|
},
|
|
509
1162
|
settings: {
|
|
510
|
-
game:
|
|
511
|
-
line:
|
|
1163
|
+
game: Y("icons/common/setting-v1.png"),
|
|
1164
|
+
line: Y("icons/function/setting-1-v1.png")
|
|
512
1165
|
},
|
|
513
|
-
shirt: { line:
|
|
1166
|
+
shirt: { line: Y("icons/function/user-v1.png") },
|
|
514
1167
|
shop: {
|
|
515
|
-
game:
|
|
516
|
-
line:
|
|
1168
|
+
game: Y("icons/common/shop-v1.png"),
|
|
1169
|
+
line: Y("icons/function/shop-v1.png")
|
|
517
1170
|
},
|
|
518
|
-
smile: { line:
|
|
1171
|
+
smile: { line: Y("icons/function/emoji-good-v1.png") },
|
|
519
1172
|
timer: {
|
|
520
|
-
game:
|
|
521
|
-
line:
|
|
1173
|
+
game: Y("icons/common/timer-v1.png"),
|
|
1174
|
+
line: Y("icons/function/stopwatch-v1.png")
|
|
522
1175
|
},
|
|
523
1176
|
trophy: {
|
|
524
|
-
game:
|
|
525
|
-
line:
|
|
1177
|
+
game: Y("icons/common/trophy-v1.png"),
|
|
1178
|
+
line: Y("icons/function/trophy-v1.png")
|
|
526
1179
|
},
|
|
527
|
-
undo: { line:
|
|
528
|
-
redo: { line:
|
|
1180
|
+
undo: { line: Y("icons/function/back-v1.png") },
|
|
1181
|
+
redo: { line: Y("icons/function/refresh-v1.png") },
|
|
529
1182
|
vote: {
|
|
530
|
-
game:
|
|
531
|
-
line:
|
|
1183
|
+
game: Y("icons/common/target-v1.png"),
|
|
1184
|
+
line: Y("icons/function/target-v1.png")
|
|
532
1185
|
}
|
|
533
|
-
},
|
|
534
|
-
function
|
|
535
|
-
let t =
|
|
1186
|
+
}, Ae = Object.keys(ke), je = Oe;
|
|
1187
|
+
function Me(e) {
|
|
1188
|
+
let t = je;
|
|
536
1189
|
return !e || t === "/assets/game/ui/clay/phase03-clay-kit" ? e : e.startsWith("/assets/game/ui/clay/phase03-clay-kit") ? `${t}${e.slice(37)}` : e;
|
|
537
1190
|
}
|
|
538
|
-
function
|
|
539
|
-
let n =
|
|
540
|
-
return
|
|
1191
|
+
function Ne(e, t) {
|
|
1192
|
+
let n = ke[e];
|
|
1193
|
+
return Me(t === "line" ? n.line ?? n.game ?? "" : n.game ?? n.line ?? "");
|
|
541
1194
|
}
|
|
542
|
-
function
|
|
543
|
-
let t =
|
|
1195
|
+
function Pe(e) {
|
|
1196
|
+
let t = ke[e], n = [];
|
|
544
1197
|
return t.game && n.push("game"), t.line && n.push("line"), n;
|
|
545
1198
|
}
|
|
546
|
-
var
|
|
547
|
-
anvil:
|
|
548
|
-
arrow:
|
|
549
|
-
bomb:
|
|
550
|
-
candle:
|
|
551
|
-
chicken:
|
|
552
|
-
giftBlue:
|
|
553
|
-
hammer:
|
|
554
|
-
horn:
|
|
555
|
-
horseshoe:
|
|
556
|
-
letter:
|
|
557
|
-
medalBronze:
|
|
558
|
-
medalSilver:
|
|
559
|
-
pickaxe:
|
|
560
|
-
potionPurple:
|
|
561
|
-
potionRed:
|
|
562
|
-
purpleGem:
|
|
563
|
-
shieldA:
|
|
564
|
-
shieldB:
|
|
565
|
-
shieldC:
|
|
566
|
-
shieldD:
|
|
567
|
-
skull:
|
|
568
|
-
soulGem:
|
|
569
|
-
swordA:
|
|
570
|
-
swordB:
|
|
571
|
-
talaria:
|
|
572
|
-
treasure:
|
|
573
|
-
},
|
|
1199
|
+
var Fe = {
|
|
1200
|
+
anvil: Y("icons/common/anvil-v1.png"),
|
|
1201
|
+
arrow: Y("icons/common/arrow-v1.png"),
|
|
1202
|
+
bomb: Y("icons/common/bomb-v1.png"),
|
|
1203
|
+
candle: Y("icons/common/candle-v1.png"),
|
|
1204
|
+
chicken: Y("icons/common/chicken-v1.png"),
|
|
1205
|
+
giftBlue: Y("icons/common/gift-blue-v1.png"),
|
|
1206
|
+
hammer: Y("icons/common/hammer-v1.png"),
|
|
1207
|
+
horn: Y("icons/common/horner-v1.png"),
|
|
1208
|
+
horseshoe: Y("icons/common/horseshoes-v1.png"),
|
|
1209
|
+
letter: Y("icons/common/letter-v1.png"),
|
|
1210
|
+
medalBronze: Y("icons/common/medal-bronze-v1.png"),
|
|
1211
|
+
medalSilver: Y("icons/common/medal-silver-v1.png"),
|
|
1212
|
+
pickaxe: Y("icons/common/pickax-v1.png"),
|
|
1213
|
+
potionPurple: Y("icons/common/poiton-purple-v1.png"),
|
|
1214
|
+
potionRed: Y("icons/common/poition-red-v1.png"),
|
|
1215
|
+
purpleGem: Y("icons/common/purplegem-v1.png"),
|
|
1216
|
+
shieldA: Y("icons/common/shield-a-v1.png"),
|
|
1217
|
+
shieldB: Y("icons/common/shield-b-v1.png"),
|
|
1218
|
+
shieldC: Y("icons/common/shield-c-v1.png"),
|
|
1219
|
+
shieldD: Y("icons/common/shield-d-v1.png"),
|
|
1220
|
+
skull: Y("icons/common/skull-v1.png"),
|
|
1221
|
+
soulGem: Y("icons/common/soulgem-v1.png"),
|
|
1222
|
+
swordA: Y("icons/common/sword-a-v1.png"),
|
|
1223
|
+
swordB: Y("icons/common/sword-b-v1.png"),
|
|
1224
|
+
talaria: Y("icons/common/talaria-v1.png"),
|
|
1225
|
+
treasure: Y("icons/common/treasure-v1.png")
|
|
1226
|
+
}, Ie = Object.keys(Fe), Le = {
|
|
574
1227
|
buttons: {
|
|
575
|
-
primary:
|
|
576
|
-
blue:
|
|
577
|
-
brown:
|
|
578
|
-
green:
|
|
579
|
-
purple:
|
|
580
|
-
red:
|
|
1228
|
+
primary: Y("buttons/button-brown-large-v2.png"),
|
|
1229
|
+
blue: Y("buttons/button-blue-large-v2.png"),
|
|
1230
|
+
brown: Y("buttons/button-brown-large-v2.png"),
|
|
1231
|
+
green: Y("buttons/button-green-large-v2.png"),
|
|
1232
|
+
purple: Y("buttons/button-purple-large-v2.png"),
|
|
1233
|
+
red: Y("buttons/button-red-large-v2.png")
|
|
581
1234
|
},
|
|
582
1235
|
panels: {
|
|
583
|
-
popup:
|
|
584
|
-
commonTitle:
|
|
585
|
-
language:
|
|
1236
|
+
popup: Y("components/popup/popup-v1.png"),
|
|
1237
|
+
commonTitle: Y("components/settings/common-popup-title-v1.png"),
|
|
1238
|
+
language: Y("components/language/language-v1.png")
|
|
586
1239
|
},
|
|
587
1240
|
controls: {
|
|
588
|
-
switchOn:
|
|
589
|
-
switchOff:
|
|
590
|
-
slider:
|
|
591
|
-
tabSelected:
|
|
592
|
-
tabNormal:
|
|
1241
|
+
switchOn: Y("components/common/switch-on-v1.png"),
|
|
1242
|
+
switchOff: Y("components/common/switch-off-v1.png"),
|
|
1243
|
+
slider: Y("components/settings/slidebar-v1.png"),
|
|
1244
|
+
tabSelected: Y("components/common/tab-s-v1.png"),
|
|
1245
|
+
tabNormal: Y("components/common/tab-n-v1.png")
|
|
593
1246
|
},
|
|
594
|
-
icons: Object.fromEntries(
|
|
1247
|
+
icons: Object.fromEntries(Ae.map((e) => [e, Ne(e)])),
|
|
595
1248
|
catalog: {
|
|
596
1249
|
manifest: "/assets/game/ui/clay/asset-manifest.json",
|
|
597
|
-
sourceCatalog:
|
|
598
|
-
contactSheetCommon:
|
|
599
|
-
contactSheetComponents:
|
|
600
|
-
contactSheetFunction:
|
|
1250
|
+
sourceCatalog: Y("catalog/phase03-clay-ui-catalog.json"),
|
|
1251
|
+
contactSheetCommon: Y("catalog/common-icons-contact-sheet-v1.png"),
|
|
1252
|
+
contactSheetComponents: Y("catalog/component-candidates-contact-sheet-v1.png"),
|
|
1253
|
+
contactSheetFunction: Y("catalog/function-icons-contact-sheet-v1.png")
|
|
601
1254
|
}
|
|
602
|
-
},
|
|
1255
|
+
}, Re = {
|
|
603
1256
|
ai: "AI",
|
|
604
1257
|
alert: "!",
|
|
605
1258
|
card: "▣",
|
|
@@ -635,84 +1288,84 @@ var ge = {
|
|
|
635
1288
|
timer: "◷",
|
|
636
1289
|
trophy: "★",
|
|
637
1290
|
vote: "⌾"
|
|
638
|
-
},
|
|
639
|
-
ai:
|
|
640
|
-
alert:
|
|
641
|
-
card:
|
|
642
|
-
chat:
|
|
643
|
-
check:
|
|
644
|
-
close:
|
|
645
|
-
coin:
|
|
646
|
-
compass:
|
|
647
|
-
copy:
|
|
648
|
-
crown:
|
|
649
|
-
energy:
|
|
650
|
-
gem:
|
|
651
|
-
gift:
|
|
652
|
-
globe:
|
|
653
|
-
history:
|
|
654
|
-
redo:
|
|
655
|
-
undo:
|
|
656
|
-
home:
|
|
657
|
-
hourglass:
|
|
658
|
-
laurel:
|
|
659
|
-
lock:
|
|
660
|
-
lucky:
|
|
661
|
-
mail:
|
|
662
|
-
medal:
|
|
663
|
-
mission:
|
|
664
|
-
mobile:
|
|
665
|
-
portal:
|
|
666
|
-
scroll:
|
|
667
|
-
settings:
|
|
668
|
-
shirt:
|
|
669
|
-
shop:
|
|
670
|
-
smile:
|
|
671
|
-
timer:
|
|
672
|
-
trophy:
|
|
673
|
-
vote:
|
|
1291
|
+
}, ze = {
|
|
1292
|
+
ai: W.berry,
|
|
1293
|
+
alert: W.red,
|
|
1294
|
+
card: W.honey,
|
|
1295
|
+
chat: W.sky,
|
|
1296
|
+
check: W.green,
|
|
1297
|
+
close: W.red,
|
|
1298
|
+
coin: W.honey,
|
|
1299
|
+
compass: W.teal,
|
|
1300
|
+
copy: W.wood,
|
|
1301
|
+
crown: W.honey,
|
|
1302
|
+
energy: W.orange,
|
|
1303
|
+
gem: W.sky,
|
|
1304
|
+
gift: W.red,
|
|
1305
|
+
globe: W.teal,
|
|
1306
|
+
history: W.inkMuted,
|
|
1307
|
+
redo: W.wood,
|
|
1308
|
+
undo: W.wood,
|
|
1309
|
+
home: W.wood,
|
|
1310
|
+
hourglass: W.orange,
|
|
1311
|
+
laurel: W.green,
|
|
1312
|
+
lock: W.ink,
|
|
1313
|
+
lucky: W.green,
|
|
1314
|
+
mail: W.sky,
|
|
1315
|
+
medal: W.honey,
|
|
1316
|
+
mission: W.berry,
|
|
1317
|
+
mobile: W.sky,
|
|
1318
|
+
portal: W.teal,
|
|
1319
|
+
scroll: W.berry,
|
|
1320
|
+
settings: W.inkMuted,
|
|
1321
|
+
shirt: W.sky,
|
|
1322
|
+
shop: W.inkMuted,
|
|
1323
|
+
smile: W.honey,
|
|
1324
|
+
timer: W.orange,
|
|
1325
|
+
trophy: W.honey,
|
|
1326
|
+
vote: W.red
|
|
674
1327
|
};
|
|
675
|
-
function
|
|
676
|
-
let t =
|
|
1328
|
+
function Be(e) {
|
|
1329
|
+
let t = Re[e], n = ze[e], r = W.parchment, i = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><defs><filter id="s" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="5" stdDeviation="4" flood-color="#4c341c" flood-opacity=".22"/></filter></defs><rect x="10" y="8" width="76" height="76" rx="25" fill="${r}" filter="url(#s)"/><circle cx="48" cy="46" r="28" fill="${n}" opacity=".88"/><path d="M23 28c10-12 36-16 52 0" stroke="#fff" stroke-width="6" stroke-linecap="round" opacity=".38"/><text x="48" y="58" text-anchor="middle" font-family="system-ui,sans-serif" font-size="28" font-weight="900" fill="${r}">${t}</text></svg>`;
|
|
677
1330
|
return `data:image/svg+xml,${encodeURIComponent(i)}`;
|
|
678
1331
|
}
|
|
679
|
-
var
|
|
680
|
-
function
|
|
681
|
-
|
|
1332
|
+
var Ve = "inline";
|
|
1333
|
+
function He(e) {
|
|
1334
|
+
Ve = e;
|
|
682
1335
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
1336
|
+
function Ue() {
|
|
1337
|
+
return Ve;
|
|
685
1338
|
}
|
|
686
|
-
function
|
|
687
|
-
|
|
1339
|
+
function We(e) {
|
|
1340
|
+
je = e.replace(/\/+$/, "");
|
|
688
1341
|
}
|
|
689
|
-
function
|
|
690
|
-
return
|
|
1342
|
+
function Ge() {
|
|
1343
|
+
return je;
|
|
691
1344
|
}
|
|
692
|
-
var
|
|
693
|
-
function
|
|
694
|
-
|
|
1345
|
+
var Ke = !1;
|
|
1346
|
+
function qe() {
|
|
1347
|
+
Ke || (Ke = !0, !(typeof console > "u") && console.warn("[SwimmerUIKit] Clay icons are rendering placeholders, not the icon set. The sculpted PNGs ship inside this package but must be served by your app:\n npx swimmer-ui-assets public\n setClayAssetMode('source') // once, at your entry\nCall setClayAssetMode('inline') explicitly to keep placeholders and silence this."));
|
|
695
1348
|
}
|
|
696
|
-
function
|
|
697
|
-
|
|
1349
|
+
function Je() {
|
|
1350
|
+
Ke = !0;
|
|
698
1351
|
}
|
|
699
|
-
function
|
|
700
|
-
return t.inline ??
|
|
1352
|
+
function Ye(e, t = {}) {
|
|
1353
|
+
return t.inline ?? Ve === "inline" ? (qe(), Be(e)) : Ne(e, t.style);
|
|
701
1354
|
}
|
|
702
|
-
function
|
|
703
|
-
return
|
|
1355
|
+
function Xe(e, t) {
|
|
1356
|
+
return Ne(e, t);
|
|
704
1357
|
}
|
|
705
1358
|
//#endregion
|
|
706
1359
|
//#region src/ClayComponents.tsx
|
|
707
|
-
function
|
|
1360
|
+
function X({ children: e, className: n, tone: r = "neutral" }) {
|
|
708
1361
|
return /* @__PURE__ */ t("span", {
|
|
709
1362
|
className: ["game-ui-badge", n].filter(Boolean).join(" "),
|
|
710
1363
|
"data-badge-tone": r,
|
|
711
1364
|
children: e
|
|
712
1365
|
});
|
|
713
1366
|
}
|
|
714
|
-
function
|
|
715
|
-
let s = ["game-ui-asset-icon", e].filter(Boolean).join(" "), c = r ? { "aria-label": r } : { "aria-hidden": !0 }, l =
|
|
1367
|
+
function Z({ className: e, icon: n, label: r, size: i = "md", style: a, useSourceAsset: o = !1 }) {
|
|
1368
|
+
let s = ["game-ui-asset-icon", e].filter(Boolean).join(" "), c = r ? { "aria-label": r } : { "aria-hidden": !0 }, l = Ye(n, {
|
|
716
1369
|
...a ? { style: a } : {},
|
|
717
1370
|
...o ? { inline: !1 } : {}
|
|
718
1371
|
});
|
|
@@ -727,7 +1380,7 @@ function V({ className: e, icon: n, label: r, size: i = "md", style: a, useSourc
|
|
|
727
1380
|
})
|
|
728
1381
|
});
|
|
729
1382
|
}
|
|
730
|
-
function
|
|
1383
|
+
function Ze({ actions: e, className: r, items: i, label: a }) {
|
|
731
1384
|
return /* @__PURE__ */ n("section", {
|
|
732
1385
|
"aria-label": a,
|
|
733
1386
|
className: ["game-ui-hud", r].filter(Boolean).join(" "),
|
|
@@ -735,7 +1388,7 @@ function H({ actions: e, className: r, items: i, label: a }) {
|
|
|
735
1388
|
className: "game-ui-hud-cluster",
|
|
736
1389
|
children: i.map((e) => /* @__PURE__ */ n("article", {
|
|
737
1390
|
className: "game-ui-hud-chip",
|
|
738
|
-
children: [e.icon ? /* @__PURE__ */ t(
|
|
1391
|
+
children: [e.icon ? /* @__PURE__ */ t(Z, {
|
|
739
1392
|
icon: e.icon,
|
|
740
1393
|
size: "md"
|
|
741
1394
|
}) : null, /* @__PURE__ */ n("span", { children: [
|
|
@@ -750,7 +1403,7 @@ function H({ actions: e, className: r, items: i, label: a }) {
|
|
|
750
1403
|
}) : null]
|
|
751
1404
|
});
|
|
752
1405
|
}
|
|
753
|
-
function
|
|
1406
|
+
function Qe({ cards: e, className: r, label: i }) {
|
|
754
1407
|
let a = ["game-ui-card-fan", r].filter(Boolean).join(" "), o = (e.length - 1) / 2;
|
|
755
1408
|
return /* @__PURE__ */ t("div", {
|
|
756
1409
|
"aria-label": i,
|
|
@@ -763,7 +1416,7 @@ function je({ cards: e, className: r, label: i }) {
|
|
|
763
1416
|
"--game-ui-card-offset": r - o
|
|
764
1417
|
},
|
|
765
1418
|
children: [
|
|
766
|
-
e.icon ? /* @__PURE__ */ t(
|
|
1419
|
+
e.icon ? /* @__PURE__ */ t(Z, {
|
|
767
1420
|
icon: e.icon,
|
|
768
1421
|
size: "lg"
|
|
769
1422
|
}) : null,
|
|
@@ -773,7 +1426,7 @@ function je({ cards: e, className: r, label: i }) {
|
|
|
773
1426
|
}, e.id))
|
|
774
1427
|
});
|
|
775
1428
|
}
|
|
776
|
-
function
|
|
1429
|
+
function $e({ badge: e, className: r, icon: i, kicker: a, selected: o = !1, summary: s, title: c, tone: l = "daily", type: u = "button", ...d }) {
|
|
777
1430
|
return /* @__PURE__ */ n("button", {
|
|
778
1431
|
"aria-pressed": o,
|
|
779
1432
|
className: ["game-ui-stage-tile", r].filter(Boolean).join(" "),
|
|
@@ -781,7 +1434,7 @@ function U({ badge: e, className: r, icon: i, kicker: a, selected: o = !1, summa
|
|
|
781
1434
|
type: u,
|
|
782
1435
|
...d,
|
|
783
1436
|
children: [
|
|
784
|
-
i ? /* @__PURE__ */ t(
|
|
1437
|
+
i ? /* @__PURE__ */ t(Z, {
|
|
785
1438
|
icon: i,
|
|
786
1439
|
size: "xl"
|
|
787
1440
|
}) : null,
|
|
@@ -793,22 +1446,22 @@ function U({ badge: e, className: r, icon: i, kicker: a, selected: o = !1, summa
|
|
|
793
1446
|
/* @__PURE__ */ t("span", { children: s })
|
|
794
1447
|
]
|
|
795
1448
|
}),
|
|
796
|
-
e ? /* @__PURE__ */ t(
|
|
1449
|
+
e ? /* @__PURE__ */ t(X, {
|
|
797
1450
|
tone: o ? "success" : "neutral",
|
|
798
1451
|
children: e
|
|
799
1452
|
}) : null
|
|
800
1453
|
]
|
|
801
1454
|
});
|
|
802
1455
|
}
|
|
803
|
-
function
|
|
1456
|
+
function et() {
|
|
804
1457
|
return typeof window > "u" ? !1 : (window.matchMedia?.("(pointer: coarse), (max-width: 899px)").matches ?? window.innerWidth < 900) && window.innerHeight > window.innerWidth;
|
|
805
1458
|
}
|
|
806
|
-
function
|
|
807
|
-
let [l, u] = d(o ||
|
|
1459
|
+
function tt({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a = "Rotate manually if this browser blocks automatic landscape lock.", preview: o = !1, title: s }) {
|
|
1460
|
+
let [l, u] = d(o || et), [f, p] = d("");
|
|
808
1461
|
if (c(() => {
|
|
809
1462
|
if (o) return;
|
|
810
1463
|
let e = () => {
|
|
811
|
-
let e =
|
|
1464
|
+
let e = et();
|
|
812
1465
|
u(e), e || p("");
|
|
813
1466
|
};
|
|
814
1467
|
return e(), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
|
|
@@ -818,7 +1471,7 @@ function Ne({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a =
|
|
|
818
1471
|
let m = async () => {
|
|
819
1472
|
if (p(""), !o) try {
|
|
820
1473
|
let e = document.documentElement;
|
|
821
|
-
!document.fullscreenElement && e.requestFullscreen && await e.requestFullscreen(), await screen.orientation.lock?.("landscape-primary"), u(
|
|
1474
|
+
!document.fullscreenElement && e.requestFullscreen && await e.requestFullscreen(), await screen.orientation.lock?.("landscape-primary"), u(et());
|
|
822
1475
|
} catch {
|
|
823
1476
|
p(a);
|
|
824
1477
|
}
|
|
@@ -829,11 +1482,11 @@ function Ne({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a =
|
|
|
829
1482
|
children: /* @__PURE__ */ n("div", {
|
|
830
1483
|
className: "game-ui-orientation-card",
|
|
831
1484
|
children: [
|
|
832
|
-
/* @__PURE__ */ t(
|
|
1485
|
+
/* @__PURE__ */ t(Z, {
|
|
833
1486
|
icon: "mobile",
|
|
834
1487
|
size: "xl"
|
|
835
1488
|
}),
|
|
836
|
-
/* @__PURE__ */ t(
|
|
1489
|
+
/* @__PURE__ */ t(X, {
|
|
837
1490
|
tone: "warning",
|
|
838
1491
|
children: i
|
|
839
1492
|
}),
|
|
@@ -849,7 +1502,7 @@ function Ne({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a =
|
|
|
849
1502
|
})
|
|
850
1503
|
});
|
|
851
1504
|
}
|
|
852
|
-
function
|
|
1505
|
+
function nt({ className: e, currentLabel: r, label: i, options: a, value: o, defaultValue: s, onSelect: c }) {
|
|
853
1506
|
let [u, f] = d(!1), [p, m] = d(s ?? a[0]?.id ?? ""), h = l(), g = ["game-ui-language-menu", e].filter(Boolean).join(" "), _ = o ?? p, v = a.find((e) => e.id === _), y = r ?? v?.label ?? a[0]?.label ?? "", b = (e) => {
|
|
854
1507
|
o === void 0 && m(e), c?.(e), f(!1);
|
|
855
1508
|
};
|
|
@@ -861,7 +1514,7 @@ function Pe({ className: e, currentLabel: r, label: i, options: a, value: o, def
|
|
|
861
1514
|
className: "game-ui-language-trigger",
|
|
862
1515
|
onClick: () => f((e) => !e),
|
|
863
1516
|
type: "button",
|
|
864
|
-
children: [/* @__PURE__ */ t(
|
|
1517
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
865
1518
|
icon: "globe",
|
|
866
1519
|
size: "sm"
|
|
867
1520
|
}), /* @__PURE__ */ t("span", { children: y })]
|
|
@@ -881,34 +1534,34 @@ function Pe({ className: e, currentLabel: r, label: i, options: a, value: o, def
|
|
|
881
1534
|
}) : null]
|
|
882
1535
|
});
|
|
883
1536
|
}
|
|
884
|
-
function
|
|
1537
|
+
function rt({ label: e, tone: r = "loading" }) {
|
|
885
1538
|
return /* @__PURE__ */ n("div", {
|
|
886
1539
|
className: "game-ui-loading-state",
|
|
887
1540
|
"data-loading-tone": r,
|
|
888
1541
|
role: r === "error" ? "alert" : "status",
|
|
889
1542
|
children: [/* @__PURE__ */ t("img", {
|
|
890
1543
|
alt: "",
|
|
891
|
-
src:
|
|
1544
|
+
src: Ye(r === "error" ? "alert" : "timer")
|
|
892
1545
|
}), /* @__PURE__ */ t("span", { children: e })]
|
|
893
1546
|
});
|
|
894
1547
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
1548
|
+
function it() {
|
|
1549
|
+
return Le.catalog;
|
|
897
1550
|
}
|
|
898
1551
|
//#endregion
|
|
899
1552
|
//#region src/FirstSessionGameShell.tsx
|
|
900
|
-
function
|
|
901
|
-
return n ?? /* @__PURE__ */ t(
|
|
1553
|
+
function at({ fallback: e, slot: n }) {
|
|
1554
|
+
return n ?? /* @__PURE__ */ t(Z, {
|
|
902
1555
|
icon: e,
|
|
903
1556
|
size: "sm"
|
|
904
1557
|
});
|
|
905
1558
|
}
|
|
906
|
-
function
|
|
1559
|
+
function ot({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, iconSlots: o, labels: s, onHistory: c, onSettings: l, onWardrobe: u, playerName: d }) {
|
|
907
1560
|
let f = ["swimmer-first-session-shell", i].filter(Boolean).join(" "), p = e ? `${r} 🔋` : s.guest ?? "guest";
|
|
908
1561
|
return /* @__PURE__ */ n("section", {
|
|
909
1562
|
"aria-label": s.shell,
|
|
910
1563
|
className: f,
|
|
911
|
-
children: [/* @__PURE__ */ t(
|
|
1564
|
+
children: [/* @__PURE__ */ t(Ze, {
|
|
912
1565
|
className: "swimmer-first-session-hud",
|
|
913
1566
|
items: [
|
|
914
1567
|
{
|
|
@@ -940,7 +1593,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
940
1593
|
}
|
|
941
1594
|
],
|
|
942
1595
|
label: s.hud,
|
|
943
|
-
actions: /* @__PURE__ */ n(
|
|
1596
|
+
actions: /* @__PURE__ */ n(P, {
|
|
944
1597
|
className: "swimmer-first-session-hud-actions",
|
|
945
1598
|
label: s.tools,
|
|
946
1599
|
children: [
|
|
@@ -948,7 +1601,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
948
1601
|
"aria-label": s.wardrobe,
|
|
949
1602
|
onClick: u,
|
|
950
1603
|
variant: "secondary",
|
|
951
|
-
children: [/* @__PURE__ */ t(
|
|
1604
|
+
children: [/* @__PURE__ */ t(at, {
|
|
952
1605
|
fallback: "shirt",
|
|
953
1606
|
slot: o?.wardrobe
|
|
954
1607
|
}), s.wardrobe]
|
|
@@ -957,7 +1610,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
957
1610
|
"aria-label": s.settings,
|
|
958
1611
|
onClick: l,
|
|
959
1612
|
variant: "secondary",
|
|
960
|
-
children: [/* @__PURE__ */ t(
|
|
1613
|
+
children: [/* @__PURE__ */ t(at, {
|
|
961
1614
|
fallback: "settings",
|
|
962
1615
|
slot: o?.settings
|
|
963
1616
|
}), s.settings]
|
|
@@ -966,7 +1619,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
966
1619
|
"aria-label": s.history,
|
|
967
1620
|
onClick: c,
|
|
968
1621
|
variant: "secondary",
|
|
969
|
-
children: [/* @__PURE__ */ t(
|
|
1622
|
+
children: [/* @__PURE__ */ t(at, {
|
|
970
1623
|
fallback: "history",
|
|
971
1624
|
slot: o?.history
|
|
972
1625
|
}), s.history]
|
|
@@ -984,14 +1637,14 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
984
1637
|
}),
|
|
985
1638
|
/* @__PURE__ */ n("div", {
|
|
986
1639
|
className: "swimmer-first-session-control-copy",
|
|
987
|
-
children: [/* @__PURE__ */ t(
|
|
1640
|
+
children: [/* @__PURE__ */ t(X, {
|
|
988
1641
|
tone: "ai",
|
|
989
1642
|
children: s.moveBadge
|
|
990
1643
|
}), /* @__PURE__ */ t("strong", { children: s.move })]
|
|
991
1644
|
}),
|
|
992
1645
|
/* @__PURE__ */ n("label", {
|
|
993
1646
|
className: "swimmer-first-session-input",
|
|
994
|
-
children: [/* @__PURE__ */ t(
|
|
1647
|
+
children: [/* @__PURE__ */ t(at, {
|
|
995
1648
|
fallback: "chat",
|
|
996
1649
|
slot: o?.input
|
|
997
1650
|
}), /* @__PURE__ */ t("span", { children: s.input })]
|
|
@@ -999,7 +1652,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
999
1652
|
/* @__PURE__ */ n("button", {
|
|
1000
1653
|
className: "swimmer-first-session-emote",
|
|
1001
1654
|
type: "button",
|
|
1002
|
-
children: [/* @__PURE__ */ t(
|
|
1655
|
+
children: [/* @__PURE__ */ t(at, {
|
|
1003
1656
|
fallback: "smile",
|
|
1004
1657
|
slot: o?.emote
|
|
1005
1658
|
}), s.emote]
|
|
@@ -1008,7 +1661,7 @@ function Le({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
1008
1661
|
})]
|
|
1009
1662
|
});
|
|
1010
1663
|
}
|
|
1011
|
-
function
|
|
1664
|
+
function st({ labels: e, onDismiss: r, open: i }) {
|
|
1012
1665
|
return i ? /* @__PURE__ */ n("aside", {
|
|
1013
1666
|
"aria-labelledby": "swimmer-first-session-onboarding-title",
|
|
1014
1667
|
"aria-modal": "true",
|
|
@@ -1017,11 +1670,11 @@ function Re({ labels: e, onDismiss: r, open: i }) {
|
|
|
1017
1670
|
children: [/* @__PURE__ */ t("div", { className: "swimmer-first-session-onboarding-scrim" }), /* @__PURE__ */ n("div", {
|
|
1018
1671
|
className: "swimmer-first-session-onboarding-card",
|
|
1019
1672
|
children: [
|
|
1020
|
-
/* @__PURE__ */ t(
|
|
1673
|
+
/* @__PURE__ */ t(Z, {
|
|
1021
1674
|
icon: "trophy",
|
|
1022
1675
|
size: "xl"
|
|
1023
1676
|
}),
|
|
1024
|
-
/* @__PURE__ */ t(
|
|
1677
|
+
/* @__PURE__ */ t(X, {
|
|
1025
1678
|
tone: "warning",
|
|
1026
1679
|
children: e.badge
|
|
1027
1680
|
}),
|
|
@@ -1056,7 +1709,7 @@ function Re({ labels: e, onDismiss: r, open: i }) {
|
|
|
1056
1709
|
}
|
|
1057
1710
|
//#endregion
|
|
1058
1711
|
//#region src/GameForms.tsx
|
|
1059
|
-
var
|
|
1712
|
+
var ct = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
1060
1713
|
return /* @__PURE__ */ t("input", {
|
|
1061
1714
|
className: ["game-ui-input", e].filter(Boolean).join(" "),
|
|
1062
1715
|
"data-invalid": n ? "true" : void 0,
|
|
@@ -1064,7 +1717,7 @@ var ze = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
|
1064
1717
|
type: r,
|
|
1065
1718
|
...i
|
|
1066
1719
|
});
|
|
1067
|
-
}),
|
|
1720
|
+
}), lt = a(function({ className: e, invalid: n, rows: r = 3, ...i }, a) {
|
|
1068
1721
|
return /* @__PURE__ */ t("textarea", {
|
|
1069
1722
|
className: [
|
|
1070
1723
|
"game-ui-input",
|
|
@@ -1077,7 +1730,7 @@ var ze = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
|
1077
1730
|
...i
|
|
1078
1731
|
});
|
|
1079
1732
|
});
|
|
1080
|
-
function
|
|
1733
|
+
function ut({ children: e, className: r, error: i, hint: a, label: o, required: s }) {
|
|
1081
1734
|
return /* @__PURE__ */ n("label", {
|
|
1082
1735
|
className: ["game-ui-field", r].filter(Boolean).join(" "),
|
|
1083
1736
|
"data-invalid": i ? "true" : void 0,
|
|
@@ -1103,7 +1756,7 @@ function G({ children: e, className: r, error: i, hint: a, label: o, required: s
|
|
|
1103
1756
|
]
|
|
1104
1757
|
});
|
|
1105
1758
|
}
|
|
1106
|
-
function
|
|
1759
|
+
function dt({ className: e, label: r, ...i }) {
|
|
1107
1760
|
return /* @__PURE__ */ n("label", {
|
|
1108
1761
|
className: ["game-ui-checkbox", e].filter(Boolean).join(" "),
|
|
1109
1762
|
children: [
|
|
@@ -1125,11 +1778,11 @@ function Ve({ className: e, label: r, ...i }) {
|
|
|
1125
1778
|
}
|
|
1126
1779
|
//#endregion
|
|
1127
1780
|
//#region src/GameDisplay.tsx
|
|
1128
|
-
function
|
|
1781
|
+
function ft(e) {
|
|
1129
1782
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
1130
1783
|
return t.length === 0 ? "?" : t.slice(0, 2).map((e) => e[0] ?? "").join("").toUpperCase();
|
|
1131
1784
|
}
|
|
1132
|
-
function
|
|
1785
|
+
function pt({ className: r, name: i, size: a = "md", src: o, status: s = "none" }) {
|
|
1133
1786
|
return /* @__PURE__ */ n("span", {
|
|
1134
1787
|
className: ["game-ui-avatar", r].filter(Boolean).join(" "),
|
|
1135
1788
|
"data-avatar-size": a,
|
|
@@ -1140,7 +1793,7 @@ function K({ className: r, name: i, size: a = "md", src: o, status: s = "none" }
|
|
|
1140
1793
|
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
1141
1794
|
"aria-hidden": "true",
|
|
1142
1795
|
className: "game-ui-avatar-initials",
|
|
1143
|
-
children:
|
|
1796
|
+
children: ft(i)
|
|
1144
1797
|
}), /* @__PURE__ */ t("span", {
|
|
1145
1798
|
className: "game-ui-sr-only",
|
|
1146
1799
|
children: i
|
|
@@ -1150,7 +1803,7 @@ function K({ className: r, name: i, size: a = "md", src: o, status: s = "none" }
|
|
|
1150
1803
|
})]
|
|
1151
1804
|
});
|
|
1152
1805
|
}
|
|
1153
|
-
function
|
|
1806
|
+
function mt({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o = "accent", value: s, valueLabel: c }) {
|
|
1154
1807
|
let l = i <= 0 ? 100 : i, u = Math.max(0, Math.min(100, s / l * 100)), d = ["game-ui-progress", e].filter(Boolean).join(" "), f = !!c;
|
|
1155
1808
|
return /* @__PURE__ */ n("div", {
|
|
1156
1809
|
className: d,
|
|
@@ -1176,11 +1829,11 @@ function q({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o =
|
|
|
1176
1829
|
}) : null]
|
|
1177
1830
|
});
|
|
1178
1831
|
}
|
|
1179
|
-
function
|
|
1832
|
+
function ht({ action: e, className: r, description: i, icon: a, title: o }) {
|
|
1180
1833
|
return /* @__PURE__ */ n("div", {
|
|
1181
1834
|
className: ["game-ui-empty-state", r].filter(Boolean).join(" "),
|
|
1182
1835
|
children: [
|
|
1183
|
-
a ? /* @__PURE__ */ t(
|
|
1836
|
+
a ? /* @__PURE__ */ t(Z, {
|
|
1184
1837
|
icon: a,
|
|
1185
1838
|
size: "xl"
|
|
1186
1839
|
}) : null,
|
|
@@ -1201,7 +1854,7 @@ function J({ action: e, className: r, description: i, icon: a, title: o }) {
|
|
|
1201
1854
|
}
|
|
1202
1855
|
//#endregion
|
|
1203
1856
|
//#region src/GameSurfacePack.tsx
|
|
1204
|
-
function
|
|
1857
|
+
function gt({ assetLibrary: e, bottomBar: r, children: i, className: a, density: o = "comfortable", hud: s, layout: c = "auto", movementPad: l, overlay: u, sidePanel: d, title: f }) {
|
|
1205
1858
|
return /* @__PURE__ */ n("section", {
|
|
1206
1859
|
"aria-label": f,
|
|
1207
1860
|
className: ["game-ui-shell", a].filter(Boolean).join(" "),
|
|
@@ -1239,8 +1892,8 @@ function Ue({ assetLibrary: e, bottomBar: r, children: i, className: a, density:
|
|
|
1239
1892
|
]
|
|
1240
1893
|
});
|
|
1241
1894
|
}
|
|
1242
|
-
var
|
|
1243
|
-
function
|
|
1895
|
+
var _t = gt;
|
|
1896
|
+
function vt({ className: e, density: r = "comfortable", facts: i, label: a, variant: o = "facts" }) {
|
|
1244
1897
|
return /* @__PURE__ */ t("section", {
|
|
1245
1898
|
"aria-label": a,
|
|
1246
1899
|
className: ["game-ui-fact-list", e].filter(Boolean).join(" "),
|
|
@@ -1249,7 +1902,7 @@ function Y({ className: e, density: r = "comfortable", facts: i, label: a, varia
|
|
|
1249
1902
|
children: i.map((e) => /* @__PURE__ */ n("article", {
|
|
1250
1903
|
className: "game-ui-fact",
|
|
1251
1904
|
children: [
|
|
1252
|
-
e.icon ? /* @__PURE__ */ t(
|
|
1905
|
+
e.icon ? /* @__PURE__ */ t(Z, {
|
|
1253
1906
|
icon: e.icon,
|
|
1254
1907
|
size: r === "dense" ? "sm" : "md"
|
|
1255
1908
|
}) : null,
|
|
@@ -1261,7 +1914,7 @@ function Y({ className: e, density: r = "comfortable", facts: i, label: a, varia
|
|
|
1261
1914
|
e.meta ? /* @__PURE__ */ t("em", { children: e.meta }) : null
|
|
1262
1915
|
]
|
|
1263
1916
|
}),
|
|
1264
|
-
e.tone ? /* @__PURE__ */ t(
|
|
1917
|
+
e.tone ? /* @__PURE__ */ t(X, {
|
|
1265
1918
|
tone: e.tone,
|
|
1266
1919
|
children: o === "stats" ? e.label : e.value
|
|
1267
1920
|
}) : null
|
|
@@ -1269,9 +1922,9 @@ function Y({ className: e, density: r = "comfortable", facts: i, label: a, varia
|
|
|
1269
1922
|
}, e.id))
|
|
1270
1923
|
});
|
|
1271
1924
|
}
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
return /* @__PURE__ */ n(
|
|
1925
|
+
var yt = vt;
|
|
1926
|
+
function bt({ actions: r, className: i, density: a = "comfortable", iconLabelMode: o = "hidden", label: s, style: c = "button" }) {
|
|
1927
|
+
return /* @__PURE__ */ n(P, {
|
|
1275
1928
|
className: ["game-ui-action-grid", i].filter(Boolean).join(" "),
|
|
1276
1929
|
"data-icon-label-mode": c === "icon" ? o : void 0,
|
|
1277
1930
|
label: s,
|
|
@@ -1280,7 +1933,7 @@ function X({ actions: r, className: i, density: a = "comfortable", iconLabelMode
|
|
|
1280
1933
|
children: s
|
|
1281
1934
|
}), r.map((r) => {
|
|
1282
1935
|
let i = r.compactLabel ?? r.label, s = /* @__PURE__ */ n(e, { children: [
|
|
1283
|
-
r.icon ? /* @__PURE__ */ t(
|
|
1936
|
+
r.icon ? /* @__PURE__ */ t(Z, {
|
|
1284
1937
|
icon: r.icon,
|
|
1285
1938
|
size: a === "dense" ? "sm" : "md",
|
|
1286
1939
|
...c === "icon" ? { style: "line" } : {}
|
|
@@ -1290,13 +1943,13 @@ function X({ actions: r, className: i, density: a = "comfortable", iconLabelMode
|
|
|
1290
1943
|
className: "game-ui-action-grid-caption",
|
|
1291
1944
|
children: i
|
|
1292
1945
|
}) : null,
|
|
1293
|
-
r.badge ? /* @__PURE__ */ t(
|
|
1946
|
+
r.badge ? /* @__PURE__ */ t(X, {
|
|
1294
1947
|
tone: r.selected ? "success" : "neutral",
|
|
1295
1948
|
children: r.badge
|
|
1296
1949
|
}) : null,
|
|
1297
1950
|
r.shortcut ? /* @__PURE__ */ t("kbd", { children: r.shortcut }) : null
|
|
1298
1951
|
] }), l = () => r.onAction?.(r.id);
|
|
1299
|
-
return c === "icon" ? /* @__PURE__ */ t(
|
|
1952
|
+
return c === "icon" ? /* @__PURE__ */ t(I, {
|
|
1300
1953
|
"aria-pressed": r.selected,
|
|
1301
1954
|
className: "game-ui-action-grid-button",
|
|
1302
1955
|
disabled: r.disabled,
|
|
@@ -1314,7 +1967,7 @@ function X({ actions: r, className: i, density: a = "comfortable", iconLabelMode
|
|
|
1314
1967
|
})]
|
|
1315
1968
|
});
|
|
1316
1969
|
}
|
|
1317
|
-
var
|
|
1970
|
+
var xt = [
|
|
1318
1971
|
{
|
|
1319
1972
|
direction: "forward",
|
|
1320
1973
|
label: "Move forward",
|
|
@@ -1339,7 +1992,7 @@ var Ke = [
|
|
|
1339
1992
|
shortcut: "S / ↓",
|
|
1340
1993
|
symbol: "↓"
|
|
1341
1994
|
}
|
|
1342
|
-
],
|
|
1995
|
+
], St = {
|
|
1343
1996
|
ArrowUp: "forward",
|
|
1344
1997
|
w: "forward",
|
|
1345
1998
|
W: "forward",
|
|
@@ -1354,7 +2007,7 @@ var Ke = [
|
|
|
1354
2007
|
S: "backward",
|
|
1355
2008
|
" ": "reset"
|
|
1356
2009
|
};
|
|
1357
|
-
function
|
|
2010
|
+
function Ct({ actions: e = xt, className: r, density: i = "comfortable", disabled: a = !1, helpText: o, label: s, layout: c = "dpad", onMove: l }) {
|
|
1358
2011
|
let u = ["game-ui-movement-pad", r].filter(Boolean).join(" "), d = (e) => {
|
|
1359
2012
|
a || l?.(e);
|
|
1360
2013
|
};
|
|
@@ -1364,7 +2017,7 @@ function Je({ actions: e = Ke, className: r, density: i = "comfortable", disable
|
|
|
1364
2017
|
"data-density": i,
|
|
1365
2018
|
"data-layout": c,
|
|
1366
2019
|
onKeyDown: (t) => {
|
|
1367
|
-
let n =
|
|
2020
|
+
let n = St[t.key];
|
|
1368
2021
|
if (!n) return;
|
|
1369
2022
|
let r = e.find((e) => e.direction === n);
|
|
1370
2023
|
!r || r.disabled || a || (t.preventDefault(), d(n));
|
|
@@ -1372,13 +2025,13 @@ function Je({ actions: e = Ke, className: r, density: i = "comfortable", disable
|
|
|
1372
2025
|
tabIndex: 0,
|
|
1373
2026
|
children: [/* @__PURE__ */ t("div", {
|
|
1374
2027
|
className: "game-ui-movement-pad-grid",
|
|
1375
|
-
children: e.map((e) => /* @__PURE__ */ n(
|
|
2028
|
+
children: e.map((e) => /* @__PURE__ */ n(I, {
|
|
1376
2029
|
className: "game-ui-movement-button",
|
|
1377
2030
|
"data-direction": e.direction,
|
|
1378
2031
|
disabled: a || e.disabled,
|
|
1379
2032
|
label: e.label,
|
|
1380
2033
|
onClick: () => d(e.direction),
|
|
1381
|
-
children: [e.icon ? /* @__PURE__ */ t(
|
|
2034
|
+
children: [e.icon ? /* @__PURE__ */ t(Z, {
|
|
1382
2035
|
icon: e.icon,
|
|
1383
2036
|
size: i === "dense" ? "sm" : "md",
|
|
1384
2037
|
style: "line"
|
|
@@ -1390,15 +2043,15 @@ function Je({ actions: e = Ke, className: r, density: i = "comfortable", disable
|
|
|
1390
2043
|
}), o ? /* @__PURE__ */ t("p", { children: o }) : null]
|
|
1391
2044
|
});
|
|
1392
2045
|
}
|
|
1393
|
-
var
|
|
2046
|
+
var wt = {
|
|
1394
2047
|
generated: "Generated",
|
|
1395
2048
|
imported: "Imported",
|
|
1396
2049
|
starter: "Starter"
|
|
1397
|
-
},
|
|
2050
|
+
}, Tt = {
|
|
1398
2051
|
generated: "ai",
|
|
1399
2052
|
imported: "warning",
|
|
1400
2053
|
starter: "neutral"
|
|
1401
|
-
},
|
|
2054
|
+
}, Et = {
|
|
1402
2055
|
error: "danger",
|
|
1403
2056
|
generating: "ai",
|
|
1404
2057
|
missing: "danger",
|
|
@@ -1406,12 +2059,12 @@ var Ye = {
|
|
|
1406
2059
|
ready: "neutral",
|
|
1407
2060
|
selected: "success"
|
|
1408
2061
|
};
|
|
1409
|
-
function
|
|
1410
|
-
let { "aria-label": S, ...C } = x,
|
|
2062
|
+
function Dt({ assetId: e, badges: r = [], cardLayout: i = "list", className: a, description: o, disabled: s, facts: c = [], icon: l = "gem", onClick: u, onSelect: d, selected: f = !1, source: p, sourceLabel: m, status: h = "ready", statusLabel: g, thumbnailAlt: _ = "", thumbnailSrc: v, title: y, type: b = "button", ...x }) {
|
|
2063
|
+
let { "aria-label": S, ...C } = x, ee = ["game-ui-asset-card", a].filter(Boolean).join(" "), w = m ?? wt[p], T = g ?? h;
|
|
1411
2064
|
return /* @__PURE__ */ n("button", {
|
|
1412
2065
|
"aria-label": S ?? y,
|
|
1413
2066
|
"aria-pressed": f,
|
|
1414
|
-
className:
|
|
2067
|
+
className: ee,
|
|
1415
2068
|
"data-asset-card-layout": i,
|
|
1416
2069
|
"data-asset-source": p,
|
|
1417
2070
|
"data-asset-status": h,
|
|
@@ -1426,7 +2079,7 @@ function Qe({ assetId: e, badges: r = [], cardLayout: i = "list", className: a,
|
|
|
1426
2079
|
children: v ? /* @__PURE__ */ t("img", {
|
|
1427
2080
|
alt: _,
|
|
1428
2081
|
src: v
|
|
1429
|
-
}) : /* @__PURE__ */ t(
|
|
2082
|
+
}) : /* @__PURE__ */ t(Z, {
|
|
1430
2083
|
className: "game-ui-asset-card-icon",
|
|
1431
2084
|
icon: l,
|
|
1432
2085
|
size: "xl"
|
|
@@ -1437,15 +2090,15 @@ function Qe({ assetId: e, badges: r = [], cardLayout: i = "list", className: a,
|
|
|
1437
2090
|
/* @__PURE__ */ n("span", {
|
|
1438
2091
|
className: "game-ui-asset-card-badges",
|
|
1439
2092
|
children: [
|
|
1440
|
-
/* @__PURE__ */ t(
|
|
1441
|
-
tone:
|
|
1442
|
-
children:
|
|
2093
|
+
/* @__PURE__ */ t(X, {
|
|
2094
|
+
tone: Tt[p],
|
|
2095
|
+
children: w
|
|
1443
2096
|
}),
|
|
1444
|
-
/* @__PURE__ */ t(
|
|
1445
|
-
tone:
|
|
1446
|
-
children:
|
|
2097
|
+
/* @__PURE__ */ t(X, {
|
|
2098
|
+
tone: Et[h],
|
|
2099
|
+
children: T
|
|
1447
2100
|
}),
|
|
1448
|
-
r.map((e) => /* @__PURE__ */ t(
|
|
2101
|
+
r.map((e) => /* @__PURE__ */ t(X, {
|
|
1449
2102
|
tone: e.tone ?? "neutral",
|
|
1450
2103
|
children: e.label
|
|
1451
2104
|
}, e.label))
|
|
@@ -1461,7 +2114,7 @@ function Qe({ assetId: e, badges: r = [], cardLayout: i = "list", className: a,
|
|
|
1461
2114
|
})]
|
|
1462
2115
|
});
|
|
1463
2116
|
}
|
|
1464
|
-
function
|
|
2117
|
+
function Ot({ cardLayout: e = "auto", className: r, density: i = "comfortable", emptyAction: a, emptyDescription: o = "Assets will appear here when they are ready to place.", emptyTitle: s = "No assets ready", groups: c, label: l, onSelectAsset: u, selectedAssetId: d, subtitle: f, title: p }) {
|
|
1465
2118
|
let m = ["game-ui-asset-library", r].filter(Boolean).join(" "), h = c.reduce((e, t) => e + t.assets.length, 0), g = c.reduce((e, t) => (t.assets.forEach((t) => {
|
|
1466
2119
|
e[t.source] += 1;
|
|
1467
2120
|
}), e), {
|
|
@@ -1469,7 +2122,7 @@ function $e({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
1469
2122
|
imported: 0,
|
|
1470
2123
|
starter: 0
|
|
1471
2124
|
});
|
|
1472
|
-
return /* @__PURE__ */ t(
|
|
2125
|
+
return /* @__PURE__ */ t(F, {
|
|
1473
2126
|
className: m,
|
|
1474
2127
|
"data-card-layout": e,
|
|
1475
2128
|
title: p,
|
|
@@ -1485,16 +2138,16 @@ function $e({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
1485
2138
|
/* @__PURE__ */ t("div", {
|
|
1486
2139
|
"aria-label": "Asset source counts",
|
|
1487
2140
|
className: "game-ui-asset-library-counts",
|
|
1488
|
-
children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ n(
|
|
1489
|
-
tone:
|
|
2141
|
+
children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ n(X, {
|
|
2142
|
+
tone: Tt[e],
|
|
1490
2143
|
children: [
|
|
1491
|
-
|
|
2144
|
+
wt[e],
|
|
1492
2145
|
" ",
|
|
1493
2146
|
t
|
|
1494
2147
|
]
|
|
1495
2148
|
}, e))
|
|
1496
2149
|
}),
|
|
1497
|
-
h === 0 ? /* @__PURE__ */ t(
|
|
2150
|
+
h === 0 ? /* @__PURE__ */ t(ht, {
|
|
1498
2151
|
action: a,
|
|
1499
2152
|
description: o,
|
|
1500
2153
|
icon: "gem",
|
|
@@ -1505,14 +2158,14 @@ function $e({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
1505
2158
|
"aria-label": r.label,
|
|
1506
2159
|
className: "game-ui-asset-library-group",
|
|
1507
2160
|
"data-asset-source": r.source,
|
|
1508
|
-
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t("strong", { children: r.label }), r.source ? /* @__PURE__ */ t(
|
|
1509
|
-
tone:
|
|
1510
|
-
children:
|
|
2161
|
+
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t("strong", { children: r.label }), r.source ? /* @__PURE__ */ t(X, {
|
|
2162
|
+
tone: Tt[r.source],
|
|
2163
|
+
children: wt[r.source]
|
|
1511
2164
|
}) : null] }), /* @__PURE__ */ t("div", {
|
|
1512
2165
|
className: "game-ui-asset-library-grid",
|
|
1513
2166
|
children: r.assets.map((n) => {
|
|
1514
2167
|
let r = e === "auto" ? n.cardLayout : e;
|
|
1515
|
-
return /* @__PURE__ */ t(
|
|
2168
|
+
return /* @__PURE__ */ t(Dt, {
|
|
1516
2169
|
...n,
|
|
1517
2170
|
...r ? { cardLayout: r } : {},
|
|
1518
2171
|
...u ? { onSelect: u } : {},
|
|
@@ -1526,16 +2179,16 @@ function $e({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
1526
2179
|
})
|
|
1527
2180
|
});
|
|
1528
2181
|
}
|
|
1529
|
-
function
|
|
2182
|
+
function kt({ actions: e = [], capacityLabel: r = "Objects", className: i, density: a = "comfortable", maxObjects: o, objectActions: s = [], placedObjects: c, selectedLabel: l = "Selected", selectedTitle: u, statusLabel: d = "Status", statusTone: f = "neutral", statusValue: p = "Idle", title: m }) {
|
|
1530
2183
|
let h = ["game-ui-placement-toolbar", i].filter(Boolean).join(" "), g = typeof c == "number" && typeof o == "number", _ = g && o > 0 ? Math.min(o, c) : 0;
|
|
1531
|
-
return /* @__PURE__ */ t(
|
|
2184
|
+
return /* @__PURE__ */ t(F, {
|
|
1532
2185
|
className: h,
|
|
1533
2186
|
title: m,
|
|
1534
2187
|
tone: "strong",
|
|
1535
2188
|
children: /* @__PURE__ */ n("div", {
|
|
1536
2189
|
"data-density": a,
|
|
1537
2190
|
children: [
|
|
1538
|
-
/* @__PURE__ */ t(
|
|
2191
|
+
/* @__PURE__ */ t(vt, {
|
|
1539
2192
|
density: a,
|
|
1540
2193
|
facts: [{
|
|
1541
2194
|
icon: "gem",
|
|
@@ -1551,19 +2204,19 @@ function et({ actions: e = [], capacityLabel: r = "Objects", className: i, densi
|
|
|
1551
2204
|
}],
|
|
1552
2205
|
label: `${m} facts`
|
|
1553
2206
|
}),
|
|
1554
|
-
g ? /* @__PURE__ */ t(
|
|
2207
|
+
g ? /* @__PURE__ */ t(mt, {
|
|
1555
2208
|
label: r,
|
|
1556
2209
|
max: o,
|
|
1557
2210
|
showValue: !0,
|
|
1558
2211
|
tone: _ >= o ? "warning" : "success",
|
|
1559
2212
|
value: _
|
|
1560
2213
|
}) : null,
|
|
1561
|
-
e.length > 0 ? /* @__PURE__ */ t(
|
|
2214
|
+
e.length > 0 ? /* @__PURE__ */ t(bt, {
|
|
1562
2215
|
actions: e,
|
|
1563
2216
|
density: a,
|
|
1564
2217
|
label: `${m} actions`
|
|
1565
2218
|
}) : null,
|
|
1566
|
-
s.length > 0 ? /* @__PURE__ */ t(
|
|
2219
|
+
s.length > 0 ? /* @__PURE__ */ t(bt, {
|
|
1567
2220
|
actions: s,
|
|
1568
2221
|
density: a,
|
|
1569
2222
|
label: `${m} object actions`,
|
|
@@ -1573,7 +2226,7 @@ function et({ actions: e = [], capacityLabel: r = "Objects", className: i, densi
|
|
|
1573
2226
|
})
|
|
1574
2227
|
});
|
|
1575
2228
|
}
|
|
1576
|
-
var
|
|
2229
|
+
var At = kt, jt = {
|
|
1577
2230
|
build: "home",
|
|
1578
2231
|
flatten: "card",
|
|
1579
2232
|
inspect: "compass",
|
|
@@ -1583,7 +2236,7 @@ var tt = et, nt = {
|
|
|
1583
2236
|
raise: "energy",
|
|
1584
2237
|
smooth: "lucky",
|
|
1585
2238
|
terrain: "portal"
|
|
1586
|
-
},
|
|
2239
|
+
}, Mt = {
|
|
1587
2240
|
error: "danger",
|
|
1588
2241
|
locked: "warning",
|
|
1589
2242
|
missing: "danger",
|
|
@@ -1591,10 +2244,10 @@ var tt = et, nt = {
|
|
|
1591
2244
|
ready: "neutral",
|
|
1592
2245
|
selected: "success"
|
|
1593
2246
|
};
|
|
1594
|
-
function
|
|
2247
|
+
function Nt(e, t, n, r) {
|
|
1595
2248
|
let i = {
|
|
1596
2249
|
disabled: !!(r || e.disabled),
|
|
1597
|
-
icon: e.icon ??
|
|
2250
|
+
icon: e.icon ?? jt[e.id] ?? "gem",
|
|
1598
2251
|
id: e.id,
|
|
1599
2252
|
label: e.label,
|
|
1600
2253
|
selected: e.id === t,
|
|
@@ -1602,21 +2255,21 @@ function it(e, t, n, r) {
|
|
|
1602
2255
|
};
|
|
1603
2256
|
return e.ariaLabel && (i.ariaLabel = e.ariaLabel), e.compactLabel && (i.compactLabel = e.compactLabel), e.meta && (i.meta = e.meta), e.shortcut && (i.shortcut = e.shortcut), n && (i.onAction = n), i;
|
|
1604
2257
|
}
|
|
1605
|
-
function
|
|
2258
|
+
function Pt(e, t, n) {
|
|
1606
2259
|
return Number.isNaN(e) ? t : Math.min(n, Math.max(t, e));
|
|
1607
2260
|
}
|
|
1608
|
-
function
|
|
2261
|
+
function Ft(e) {
|
|
1609
2262
|
return e;
|
|
1610
2263
|
}
|
|
1611
|
-
function
|
|
2264
|
+
function It(e, t) {
|
|
1612
2265
|
return e === "auto" ? t === "mobile" || t === "small-mobile" ? "caption" : "hidden" : e;
|
|
1613
2266
|
}
|
|
1614
|
-
function
|
|
2267
|
+
function Lt({ activeModeId: e, className: r, disabled: i = !1, label: a, modes: o, onModeChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
1615
2268
|
return /* @__PURE__ */ n("section", {
|
|
1616
2269
|
"aria-label": a,
|
|
1617
2270
|
className: ["game-ui-terrain-mode-control", r].filter(Boolean).join(" "),
|
|
1618
2271
|
"data-ui-hook": "terrain-mode-control",
|
|
1619
|
-
"data-variant":
|
|
2272
|
+
"data-variant": Ft(c),
|
|
1620
2273
|
"data-testid": l,
|
|
1621
2274
|
children: [/* @__PURE__ */ t("span", {
|
|
1622
2275
|
className: "game-ui-sr-only",
|
|
@@ -1637,8 +2290,8 @@ function st({ activeModeId: e, className: r, disabled: i = !1, label: a, modes:
|
|
|
1637
2290
|
onClick: s && !o ? () => s(r.id) : void 0,
|
|
1638
2291
|
type: "button",
|
|
1639
2292
|
children: [
|
|
1640
|
-
/* @__PURE__ */ t(
|
|
1641
|
-
icon: r.icon ??
|
|
2293
|
+
/* @__PURE__ */ t(Z, {
|
|
2294
|
+
icon: r.icon ?? jt[r.id] ?? "portal",
|
|
1642
2295
|
size: c === "small-mobile" ? "sm" : "md",
|
|
1643
2296
|
style: "line"
|
|
1644
2297
|
}),
|
|
@@ -1653,8 +2306,8 @@ function st({ activeModeId: e, className: r, disabled: i = !1, label: a, modes:
|
|
|
1653
2306
|
})]
|
|
1654
2307
|
});
|
|
1655
2308
|
}
|
|
1656
|
-
function
|
|
1657
|
-
let d = ["game-ui-terrain-tool-strip", n].filter(Boolean).join(" "), f =
|
|
2309
|
+
function Rt({ activeToolId: e, className: n, compactLabelMode: r = "auto", density: i = "comfortable", disabled: a = !1, label: o, onToolChange: s, tools: c, variant: l = "desktop", "data-testid": u }) {
|
|
2310
|
+
let d = ["game-ui-terrain-tool-strip", n].filter(Boolean).join(" "), f = It(r, l);
|
|
1658
2311
|
return /* @__PURE__ */ t("section", {
|
|
1659
2312
|
"aria-label": o,
|
|
1660
2313
|
className: d,
|
|
@@ -1663,8 +2316,8 @@ function ct({ activeToolId: e, className: n, compactLabelMode: r = "auto", densi
|
|
|
1663
2316
|
"data-ui-hook": "terrain-tool-strip",
|
|
1664
2317
|
"data-variant": l,
|
|
1665
2318
|
"data-testid": u,
|
|
1666
|
-
children: /* @__PURE__ */ t(
|
|
1667
|
-
actions: c.map((t) =>
|
|
2319
|
+
children: /* @__PURE__ */ t(bt, {
|
|
2320
|
+
actions: c.map((t) => Nt(t, e, s, a)),
|
|
1668
2321
|
density: i,
|
|
1669
2322
|
iconLabelMode: f,
|
|
1670
2323
|
label: o,
|
|
@@ -1672,18 +2325,18 @@ function ct({ activeToolId: e, className: n, compactLabelMode: r = "auto", densi
|
|
|
1672
2325
|
})
|
|
1673
2326
|
});
|
|
1674
2327
|
}
|
|
1675
|
-
function
|
|
1676
|
-
let l = ["game-ui-brush-controls", e].filter(Boolean).join(" "), u = o.minRadius ?? 1, d = o.maxRadius ?? 8, f = o.radiusStep ?? .25, p = o.minStrength ?? 0, m = o.maxStrength ?? 1, h = o.strengthStep ?? .05, g =
|
|
1677
|
-
i?.(
|
|
2328
|
+
function zt({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange: a, state: o, variant: s = "desktop", "data-testid": c }) {
|
|
2329
|
+
let l = ["game-ui-brush-controls", e].filter(Boolean).join(" "), u = o.minRadius ?? 1, d = o.maxRadius ?? 8, f = o.radiusStep ?? .25, p = o.minStrength ?? 0, m = o.maxStrength ?? 1, h = o.strengthStep ?? .05, g = Pt(o.radius, u, d), _ = Pt(o.strength, p, m), v = !!o.disabled, y = (e) => {
|
|
2330
|
+
i?.(Pt(Number(e.currentTarget.value), u, d));
|
|
1678
2331
|
}, b = (e) => {
|
|
1679
|
-
a?.(
|
|
2332
|
+
a?.(Pt(Number(e.currentTarget.value), p, m));
|
|
1680
2333
|
};
|
|
1681
2334
|
return /* @__PURE__ */ n("section", {
|
|
1682
2335
|
className: l,
|
|
1683
2336
|
"data-ui-hook": "brush-controls",
|
|
1684
2337
|
"data-variant": s,
|
|
1685
2338
|
"data-testid": c,
|
|
1686
|
-
children: [/* @__PURE__ */ t(
|
|
2339
|
+
children: [/* @__PURE__ */ t(ut, {
|
|
1687
2340
|
...r.radiusHint ? { hint: r.radiusHint } : {},
|
|
1688
2341
|
label: r.radius ?? "Brush radius",
|
|
1689
2342
|
children: /* @__PURE__ */ n("div", {
|
|
@@ -1713,7 +2366,7 @@ function lt({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange:
|
|
|
1713
2366
|
value: g
|
|
1714
2367
|
})]
|
|
1715
2368
|
})
|
|
1716
|
-
}), /* @__PURE__ */ t(
|
|
2369
|
+
}), /* @__PURE__ */ t(ut, {
|
|
1717
2370
|
...r.strengthHint ? { hint: r.strengthHint } : {},
|
|
1718
2371
|
label: r.strength ?? "Brush strength",
|
|
1719
2372
|
children: /* @__PURE__ */ n("div", {
|
|
@@ -1746,7 +2399,7 @@ function lt({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange:
|
|
|
1746
2399
|
})]
|
|
1747
2400
|
});
|
|
1748
2401
|
}
|
|
1749
|
-
function
|
|
2402
|
+
function Bt({ activeMaterialId: e, className: r, disabled: i = !1, label: a, materials: o, onMaterialChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
1750
2403
|
return /* @__PURE__ */ t("section", {
|
|
1751
2404
|
"aria-label": a,
|
|
1752
2405
|
className: ["game-ui-material-swatches", r].filter(Boolean).join(" "),
|
|
@@ -1789,14 +2442,14 @@ function ut({ activeMaterialId: e, className: r, disabled: i = !1, label: a, mat
|
|
|
1789
2442
|
})
|
|
1790
2443
|
});
|
|
1791
2444
|
}
|
|
1792
|
-
function
|
|
2445
|
+
function Vt({ canRedo: e = !1, canUndo: n = !1, className: r, disabled: i = !1, label: a, onRedo: o, onUndo: s, redoLabel: c = "Redo", undoLabel: l = "Undo", variant: u = "desktop", "data-testid": d }) {
|
|
1793
2446
|
return /* @__PURE__ */ t("section", {
|
|
1794
2447
|
"aria-label": a,
|
|
1795
2448
|
className: ["game-ui-undo-redo-actions", r].filter(Boolean).join(" "),
|
|
1796
2449
|
"data-ui-hook": "undo-redo-actions",
|
|
1797
2450
|
"data-variant": u,
|
|
1798
2451
|
"data-testid": d,
|
|
1799
|
-
children: /* @__PURE__ */ t(
|
|
2452
|
+
children: /* @__PURE__ */ t(bt, {
|
|
1800
2453
|
actions: [{
|
|
1801
2454
|
disabled: i || !n,
|
|
1802
2455
|
icon: "undo",
|
|
@@ -1822,9 +2475,9 @@ function dt({ canRedo: e = !1, canUndo: n = !1, className: r, disabled: i = !1,
|
|
|
1822
2475
|
})
|
|
1823
2476
|
});
|
|
1824
2477
|
}
|
|
1825
|
-
function
|
|
2478
|
+
function Ht({ activeCategoryId: e, categories: r, className: i, density: a = "comfortable", emptyDescription: o = "Building pieces will appear here when a category is available.", emptyTitle: s = "No build pieces ready", label: c, onCategoryChange: l, onSelectItem: u, selectedItemId: d, title: f, variant: p = "desktop", "data-testid": m }) {
|
|
1826
2479
|
let h = ["game-ui-build-library", i].filter(Boolean).join(" "), g = r.filter((e) => !e.disabled), _ = r.find((t) => t.id === e) ?? g[0] ?? r[0], v = _?.items ?? [], y = p === "small-mobile";
|
|
1827
|
-
return /* @__PURE__ */ t(
|
|
2480
|
+
return /* @__PURE__ */ t(F, {
|
|
1828
2481
|
className: h,
|
|
1829
2482
|
"data-ui-hook": "build-library",
|
|
1830
2483
|
"data-variant": p,
|
|
@@ -1851,8 +2504,8 @@ function ft({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
1851
2504
|
role: "tab",
|
|
1852
2505
|
type: "button",
|
|
1853
2506
|
children: [
|
|
1854
|
-
/* @__PURE__ */ t(
|
|
1855
|
-
icon: e.icon ??
|
|
2507
|
+
/* @__PURE__ */ t(Z, {
|
|
2508
|
+
icon: e.icon ?? jt[e.id] ?? "home",
|
|
1856
2509
|
size: "sm",
|
|
1857
2510
|
style: "line"
|
|
1858
2511
|
}),
|
|
@@ -1861,7 +2514,7 @@ function ft({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
1861
2514
|
]
|
|
1862
2515
|
}, e.id);
|
|
1863
2516
|
})
|
|
1864
|
-
}), v.length === 0 || !_ ? /* @__PURE__ */ t(
|
|
2517
|
+
}), v.length === 0 || !_ ? /* @__PURE__ */ t(ht, {
|
|
1865
2518
|
description: o,
|
|
1866
2519
|
icon: "home",
|
|
1867
2520
|
title: s
|
|
@@ -1889,7 +2542,7 @@ function ft({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
1889
2542
|
alt: e.previewAlt ?? "",
|
|
1890
2543
|
className: "game-ui-build-item-preview",
|
|
1891
2544
|
src: e.previewSrc
|
|
1892
|
-
}) : /* @__PURE__ */ t(
|
|
2545
|
+
}) : /* @__PURE__ */ t(Z, {
|
|
1893
2546
|
icon: e.icon ?? _.icon ?? "home",
|
|
1894
2547
|
size: y ? "sm" : "md"
|
|
1895
2548
|
})
|
|
@@ -1898,10 +2551,10 @@ function ft({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
1898
2551
|
children: [
|
|
1899
2552
|
/* @__PURE__ */ n("span", {
|
|
1900
2553
|
className: "game-ui-build-item-badges",
|
|
1901
|
-
children: [/* @__PURE__ */ t(
|
|
1902
|
-
tone:
|
|
2554
|
+
children: [/* @__PURE__ */ t(X, {
|
|
2555
|
+
tone: Mt[i],
|
|
1903
2556
|
children: i
|
|
1904
|
-
}), e.badges?.map((e) => /* @__PURE__ */ t(
|
|
2557
|
+
}), e.badges?.map((e) => /* @__PURE__ */ t(X, {
|
|
1905
2558
|
tone: e.tone ?? "neutral",
|
|
1906
2559
|
children: e.label
|
|
1907
2560
|
}, e.label))]
|
|
@@ -1917,7 +2570,7 @@ function ft({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
1917
2570
|
})
|
|
1918
2571
|
});
|
|
1919
2572
|
}
|
|
1920
|
-
function
|
|
2573
|
+
function Ut({ children: e, className: r, closeIcon: i = "close", closeLabel: a = "Close tools", disabled: o = !1, label: s, onOpenChange: c, open: l, panelId: u, title: d, triggerIcon: f = "settings", triggerLabel: p = "Tools", variant: m = "mobile", "data-testid": h }) {
|
|
1921
2574
|
let g = ["game-ui-compact-game-drawer", r].filter(Boolean).join(" "), _ = u ?? `${d.toLowerCase().replace(/[^a-z0-9]+/g, "-") || "tools"}-drawer-panel`;
|
|
1922
2575
|
return /* @__PURE__ */ n("aside", {
|
|
1923
2576
|
"aria-label": s,
|
|
@@ -1934,7 +2587,7 @@ function pt({ children: e, className: r, closeIcon: i = "close", closeLabel: a =
|
|
|
1934
2587
|
onClick: c ? () => c(!l) : void 0,
|
|
1935
2588
|
type: "button",
|
|
1936
2589
|
variant: "secondary",
|
|
1937
|
-
children: [/* @__PURE__ */ t(
|
|
2590
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
1938
2591
|
icon: l ? i : f,
|
|
1939
2592
|
size: "sm",
|
|
1940
2593
|
style: "line"
|
|
@@ -1944,7 +2597,7 @@ function pt({ children: e, className: r, closeIcon: i = "close", closeLabel: a =
|
|
|
1944
2597
|
className: "game-ui-compact-game-drawer-panel",
|
|
1945
2598
|
"data-drawer-panel": "true",
|
|
1946
2599
|
id: _,
|
|
1947
|
-
children: /* @__PURE__ */ t(
|
|
2600
|
+
children: /* @__PURE__ */ t(F, {
|
|
1948
2601
|
title: d,
|
|
1949
2602
|
tone: "strong",
|
|
1950
2603
|
children: e
|
|
@@ -1952,7 +2605,7 @@ function pt({ children: e, className: r, closeIcon: i = "close", closeLabel: a =
|
|
|
1952
2605
|
})]
|
|
1953
2606
|
});
|
|
1954
2607
|
}
|
|
1955
|
-
function
|
|
2608
|
+
function Wt({ status: e }) {
|
|
1956
2609
|
if (!e) return null;
|
|
1957
2610
|
let r = typeof e.progressValue == "number" && typeof e.progressMax == "number", i = e.tone === "danger" ? "danger" : e.tone === "warning" ? "warning" : "success", a = e.progressMax ?? 100, o = e.progressValue ?? 0;
|
|
1958
2611
|
return /* @__PURE__ */ n("div", {
|
|
@@ -1960,12 +2613,12 @@ function mt({ status: e }) {
|
|
|
1960
2613
|
"data-status-tone": e.tone ?? "neutral",
|
|
1961
2614
|
"data-ui-hook": "terrain-status",
|
|
1962
2615
|
children: [
|
|
1963
|
-
/* @__PURE__ */ t(
|
|
2616
|
+
/* @__PURE__ */ t(X, {
|
|
1964
2617
|
tone: e.tone ?? "neutral",
|
|
1965
2618
|
children: e.label
|
|
1966
2619
|
}),
|
|
1967
2620
|
e.description ? /* @__PURE__ */ t("p", { children: e.description }) : null,
|
|
1968
|
-
r ? /* @__PURE__ */ t(
|
|
2621
|
+
r ? /* @__PURE__ */ t(mt, {
|
|
1969
2622
|
label: e.progressLabel ?? e.label,
|
|
1970
2623
|
max: a,
|
|
1971
2624
|
showValue: !0,
|
|
@@ -1975,66 +2628,66 @@ function mt({ status: e }) {
|
|
|
1975
2628
|
]
|
|
1976
2629
|
});
|
|
1977
2630
|
}
|
|
1978
|
-
function
|
|
2631
|
+
function Gt({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, activeToolId: a, brush: o, buildCategories: s = [], density: c = "comfortable", disabled: l = !1, materials: u = [], modes: d, onBrushRadiusChange: f, onBrushStrengthChange: p, onBuildCategoryChange: m, onMaterialChange: h, onModeChange: g, onRedo: _, onSelectBuildItem: v, onToolChange: y, onUndo: b, selectedBuildItemId: x, status: S, toolCompactLabelMode: C = "auto", tools: ee, undoRedo: w, variant: T = "desktop" }) {
|
|
1979
2632
|
return /* @__PURE__ */ n("div", {
|
|
1980
2633
|
className: "game-ui-terrain-build-toolbox-body",
|
|
1981
2634
|
"data-active-mode": i,
|
|
1982
2635
|
"data-active-tool": a,
|
|
1983
|
-
"data-variant":
|
|
2636
|
+
"data-variant": T,
|
|
1984
2637
|
children: [
|
|
1985
|
-
/* @__PURE__ */ t(
|
|
1986
|
-
/* @__PURE__ */ t(
|
|
2638
|
+
/* @__PURE__ */ t(Wt, { status: S }),
|
|
2639
|
+
/* @__PURE__ */ t(Lt, {
|
|
1987
2640
|
activeModeId: i,
|
|
1988
2641
|
disabled: l,
|
|
1989
2642
|
label: "Tool mode",
|
|
1990
2643
|
modes: d,
|
|
1991
2644
|
onModeChange: g,
|
|
1992
|
-
variant:
|
|
2645
|
+
variant: T
|
|
1993
2646
|
}),
|
|
1994
2647
|
/* @__PURE__ */ n("div", {
|
|
1995
2648
|
className: "game-ui-terrain-build-main-grid",
|
|
1996
2649
|
children: [
|
|
1997
|
-
/* @__PURE__ */ t(
|
|
2650
|
+
/* @__PURE__ */ t(Rt, {
|
|
1998
2651
|
activeToolId: a,
|
|
1999
2652
|
compactLabelMode: C,
|
|
2000
2653
|
density: c,
|
|
2001
2654
|
disabled: l,
|
|
2002
2655
|
label: "Terrain tools",
|
|
2003
2656
|
onToolChange: y,
|
|
2004
|
-
tools:
|
|
2005
|
-
variant:
|
|
2657
|
+
tools: ee,
|
|
2658
|
+
variant: T
|
|
2006
2659
|
}),
|
|
2007
|
-
/* @__PURE__ */ t(
|
|
2008
|
-
canRedo:
|
|
2009
|
-
canUndo:
|
|
2660
|
+
/* @__PURE__ */ t(Vt, {
|
|
2661
|
+
canRedo: w?.canRedo,
|
|
2662
|
+
canUndo: w?.canUndo,
|
|
2010
2663
|
disabled: l,
|
|
2011
2664
|
label: "Terrain history",
|
|
2012
2665
|
onRedo: _,
|
|
2013
2666
|
onUndo: b,
|
|
2014
|
-
redoLabel:
|
|
2015
|
-
undoLabel:
|
|
2016
|
-
variant:
|
|
2667
|
+
redoLabel: w?.redoLabel,
|
|
2668
|
+
undoLabel: w?.undoLabel,
|
|
2669
|
+
variant: T
|
|
2017
2670
|
}),
|
|
2018
|
-
/* @__PURE__ */ t(
|
|
2671
|
+
/* @__PURE__ */ t(zt, {
|
|
2019
2672
|
onRadiusChange: f,
|
|
2020
2673
|
onStrengthChange: p,
|
|
2021
2674
|
state: {
|
|
2022
2675
|
...o,
|
|
2023
2676
|
disabled: !!(l || o.disabled)
|
|
2024
2677
|
},
|
|
2025
|
-
variant:
|
|
2678
|
+
variant: T
|
|
2026
2679
|
}),
|
|
2027
|
-
u.length > 0 ? /* @__PURE__ */ t(
|
|
2680
|
+
u.length > 0 ? /* @__PURE__ */ t(Bt, {
|
|
2028
2681
|
activeMaterialId: r,
|
|
2029
2682
|
disabled: l,
|
|
2030
2683
|
label: "Terrain materials",
|
|
2031
2684
|
materials: u,
|
|
2032
2685
|
onMaterialChange: h,
|
|
2033
|
-
variant:
|
|
2686
|
+
variant: T
|
|
2034
2687
|
}) : null
|
|
2035
2688
|
]
|
|
2036
2689
|
}),
|
|
2037
|
-
s.length > 0 ? /* @__PURE__ */ t(
|
|
2690
|
+
s.length > 0 ? /* @__PURE__ */ t(Ht, {
|
|
2038
2691
|
activeCategoryId: e,
|
|
2039
2692
|
categories: s,
|
|
2040
2693
|
density: c,
|
|
@@ -2043,17 +2696,17 @@ function ht({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
2043
2696
|
onSelectItem: v,
|
|
2044
2697
|
selectedItemId: x,
|
|
2045
2698
|
title: "Build pieces",
|
|
2046
|
-
variant:
|
|
2699
|
+
variant: T
|
|
2047
2700
|
}) : null
|
|
2048
2701
|
]
|
|
2049
2702
|
});
|
|
2050
2703
|
}
|
|
2051
|
-
function
|
|
2052
|
-
let u = ["game-ui-terrain-build-toolbox", e].filter(Boolean).join(" "), d = /* @__PURE__ */ t(
|
|
2704
|
+
function Kt({ className: e, drawerOpen: n = !1, drawerTitle: r = "Terrain and build tools", label: i, onDrawerOpenChange: a, title: o, variant: s = "desktop", "data-testid": c, ...l }) {
|
|
2705
|
+
let u = ["game-ui-terrain-build-toolbox", e].filter(Boolean).join(" "), d = /* @__PURE__ */ t(Gt, {
|
|
2053
2706
|
...l,
|
|
2054
2707
|
variant: s
|
|
2055
2708
|
});
|
|
2056
|
-
return s === "mobile" || s === "small-mobile" ? /* @__PURE__ */ t(
|
|
2709
|
+
return s === "mobile" || s === "small-mobile" ? /* @__PURE__ */ t(Ut, {
|
|
2057
2710
|
className: u,
|
|
2058
2711
|
label: i,
|
|
2059
2712
|
onOpenChange: a,
|
|
@@ -2063,7 +2716,7 @@ function gt({ className: e, drawerOpen: n = !1, drawerTitle: r = "Terrain and bu
|
|
|
2063
2716
|
variant: s,
|
|
2064
2717
|
"data-testid": c,
|
|
2065
2718
|
children: d
|
|
2066
|
-
}) : /* @__PURE__ */ t(
|
|
2719
|
+
}) : /* @__PURE__ */ t(F, {
|
|
2067
2720
|
className: u,
|
|
2068
2721
|
"data-ui-hook": "terrain-build-toolbox",
|
|
2069
2722
|
"data-variant": s,
|
|
@@ -2078,7 +2731,7 @@ function gt({ className: e, drawerOpen: n = !1, drawerTitle: r = "Terrain and bu
|
|
|
2078
2731
|
}
|
|
2079
2732
|
//#endregion
|
|
2080
2733
|
//#region src/GameContractorTools.tsx
|
|
2081
|
-
var
|
|
2734
|
+
var qt = {
|
|
2082
2735
|
accepted: "success",
|
|
2083
2736
|
blocked: "danger",
|
|
2084
2737
|
cancelled: "neutral",
|
|
@@ -2087,7 +2740,7 @@ var _t = {
|
|
|
2087
2740
|
queued: "warning",
|
|
2088
2741
|
readyForReview: "success",
|
|
2089
2742
|
working: "ai"
|
|
2090
|
-
},
|
|
2743
|
+
}, Jt = {
|
|
2091
2744
|
accepted: "check",
|
|
2092
2745
|
blocked: "alert",
|
|
2093
2746
|
cancelled: "close",
|
|
@@ -2096,26 +2749,26 @@ var _t = {
|
|
|
2096
2749
|
queued: "hourglass",
|
|
2097
2750
|
readyForReview: "vote",
|
|
2098
2751
|
working: "energy"
|
|
2099
|
-
},
|
|
2752
|
+
}, Yt = {
|
|
2100
2753
|
active: "ai",
|
|
2101
2754
|
blocked: "danger",
|
|
2102
2755
|
complete: "success",
|
|
2103
2756
|
pending: "neutral"
|
|
2104
|
-
},
|
|
2757
|
+
}, Xt = {
|
|
2105
2758
|
blocked: "danger",
|
|
2106
2759
|
done: "success",
|
|
2107
2760
|
idle: "neutral",
|
|
2108
2761
|
queued: "warning",
|
|
2109
2762
|
working: "ai"
|
|
2110
|
-
},
|
|
2763
|
+
}, Zt = {
|
|
2111
2764
|
"local-only": "Local only",
|
|
2112
2765
|
mock: "Mock run",
|
|
2113
2766
|
"paid-disabled": "Paid provider off"
|
|
2114
|
-
},
|
|
2767
|
+
}, Qt = {
|
|
2115
2768
|
"local-only": "success",
|
|
2116
2769
|
mock: "ai",
|
|
2117
2770
|
"paid-disabled": "warning"
|
|
2118
|
-
},
|
|
2771
|
+
}, $t = {
|
|
2119
2772
|
accepted: [{
|
|
2120
2773
|
id: "revert",
|
|
2121
2774
|
label: "Revert",
|
|
@@ -2221,17 +2874,17 @@ var _t = {
|
|
|
2221
2874
|
tone: "danger"
|
|
2222
2875
|
}]
|
|
2223
2876
|
};
|
|
2224
|
-
function
|
|
2877
|
+
function en(e, t) {
|
|
2225
2878
|
if (t) return t;
|
|
2226
2879
|
switch (e) {
|
|
2227
2880
|
case "readyForReview": return "Ready for review";
|
|
2228
2881
|
default: return e.replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase());
|
|
2229
2882
|
}
|
|
2230
2883
|
}
|
|
2231
|
-
function
|
|
2884
|
+
function tn(e) {
|
|
2232
2885
|
return e === "blocked" || e === "cancelled" ? "danger" : e === "accepted" || e === "readyForReview" ? "success" : e === "queued" || e === "draft" || e === "preview" ? "warning" : "accent";
|
|
2233
2886
|
}
|
|
2234
|
-
function
|
|
2887
|
+
function nn(e) {
|
|
2235
2888
|
switch (e) {
|
|
2236
2889
|
case "accepted": return 100;
|
|
2237
2890
|
case "blocked": return 42;
|
|
@@ -2243,7 +2896,7 @@ function Et(e) {
|
|
|
2243
2896
|
case "working": return 64;
|
|
2244
2897
|
}
|
|
2245
2898
|
}
|
|
2246
|
-
function
|
|
2899
|
+
function rn(e, t, n) {
|
|
2247
2900
|
let r = {
|
|
2248
2901
|
disabled: !!(n || e.disabled),
|
|
2249
2902
|
id: e.id,
|
|
@@ -2252,14 +2905,14 @@ function Dt(e, t, n) {
|
|
|
2252
2905
|
};
|
|
2253
2906
|
return e.icon && (r.icon = e.icon), e.ariaLabel && (r.ariaLabel = e.ariaLabel), e.meta && (r.meta = e.meta), t && (r.onAction = t), r;
|
|
2254
2907
|
}
|
|
2255
|
-
function
|
|
2908
|
+
function an(e) {
|
|
2256
2909
|
return e === "danger" || e === "warning" ? "alert" : "status";
|
|
2257
2910
|
}
|
|
2258
|
-
function
|
|
2911
|
+
function on(e) {
|
|
2259
2912
|
return !!(e.before && e.after);
|
|
2260
2913
|
}
|
|
2261
|
-
function
|
|
2262
|
-
let m = ["game-ui-construction-progress", e].filter(Boolean).join(" "), h = d ??
|
|
2914
|
+
function sn({ className: e, label: r, max: i = 100, progressLabel: a = "Construction progress", showStatusBadge: o = !0, status: s, statusLabel: c, steps: l = [], validationWarnings: u = [], value: d, variant: f = "desktop", "data-testid": p }) {
|
|
2915
|
+
let m = ["game-ui-construction-progress", e].filter(Boolean).join(" "), h = d ?? nn(s), g = en(s, c);
|
|
2263
2916
|
return /* @__PURE__ */ n("section", {
|
|
2264
2917
|
"aria-label": r,
|
|
2265
2918
|
className: m,
|
|
@@ -2270,19 +2923,19 @@ function At({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
2270
2923
|
children: [
|
|
2271
2924
|
/* @__PURE__ */ n("header", {
|
|
2272
2925
|
className: "game-ui-construction-progress-header",
|
|
2273
|
-
children: [/* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t(
|
|
2274
|
-
icon:
|
|
2926
|
+
children: [/* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t(Z, {
|
|
2927
|
+
icon: Jt[s],
|
|
2275
2928
|
size: "sm"
|
|
2276
|
-
}), /* @__PURE__ */ t("strong", { children: a })] }), o ? /* @__PURE__ */ t(
|
|
2277
|
-
tone:
|
|
2929
|
+
}), /* @__PURE__ */ t("strong", { children: a })] }), o ? /* @__PURE__ */ t(X, {
|
|
2930
|
+
tone: qt[s],
|
|
2278
2931
|
children: g
|
|
2279
2932
|
}) : null]
|
|
2280
2933
|
}),
|
|
2281
|
-
/* @__PURE__ */ t(
|
|
2934
|
+
/* @__PURE__ */ t(mt, {
|
|
2282
2935
|
label: a,
|
|
2283
2936
|
max: i,
|
|
2284
2937
|
showValue: !0,
|
|
2285
|
-
tone:
|
|
2938
|
+
tone: tn(s),
|
|
2286
2939
|
value: h
|
|
2287
2940
|
}),
|
|
2288
2941
|
l.length > 0 ? /* @__PURE__ */ t("ol", {
|
|
@@ -2296,8 +2949,8 @@ function At({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
2296
2949
|
className: "game-ui-construction-step-dot"
|
|
2297
2950
|
}),
|
|
2298
2951
|
/* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("strong", { children: e.label }), e.caption ? /* @__PURE__ */ t("small", { children: e.caption }) : null] }),
|
|
2299
|
-
/* @__PURE__ */ t(
|
|
2300
|
-
tone:
|
|
2952
|
+
/* @__PURE__ */ t(X, {
|
|
2953
|
+
tone: Yt[e.status],
|
|
2301
2954
|
children: e.status
|
|
2302
2955
|
})
|
|
2303
2956
|
]
|
|
@@ -2309,8 +2962,8 @@ function At({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
2309
2962
|
children: u.map((e) => /* @__PURE__ */ n("div", {
|
|
2310
2963
|
className: "game-ui-construction-warning",
|
|
2311
2964
|
"data-warning-tone": e.tone ?? "warning",
|
|
2312
|
-
role:
|
|
2313
|
-
children: [/* @__PURE__ */ t(
|
|
2965
|
+
role: an(e.tone),
|
|
2966
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
2314
2967
|
icon: e.tone === "danger" || e.tone === "warning" ? "alert" : "check",
|
|
2315
2968
|
size: "sm"
|
|
2316
2969
|
}), /* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("strong", { children: e.label }), e.description ? /* @__PURE__ */ t("small", { children: e.description }) : null] })]
|
|
@@ -2319,8 +2972,8 @@ function At({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
2319
2972
|
]
|
|
2320
2973
|
});
|
|
2321
2974
|
}
|
|
2322
|
-
function
|
|
2323
|
-
let p = ["game-ui-construction-approval-bar", r].filter(Boolean).join(" "), m = e ??
|
|
2975
|
+
function cn({ actions: e, className: r, disabled: i = !1, label: a, localOnlyLabel: o = "Local-only construction", onAction: s, providerMode: c, status: l, validationWarnings: u = [], variant: d = "desktop", "data-testid": f }) {
|
|
2976
|
+
let p = ["game-ui-construction-approval-bar", r].filter(Boolean).join(" "), m = e ?? $t[l], h = u.filter((e) => e.tone !== "success").length, g = m.map((e) => rn(e, s, i));
|
|
2324
2977
|
return /* @__PURE__ */ n("section", {
|
|
2325
2978
|
"aria-label": a,
|
|
2326
2979
|
className: p,
|
|
@@ -2330,38 +2983,38 @@ function jt({ actions: e, className: r, disabled: i = !1, label: a, localOnlyLab
|
|
|
2330
2983
|
"data-testid": f,
|
|
2331
2984
|
children: [/* @__PURE__ */ n("div", {
|
|
2332
2985
|
className: "game-ui-construction-approval-meta",
|
|
2333
|
-
children: [c ? /* @__PURE__ */ t(
|
|
2334
|
-
tone:
|
|
2335
|
-
children:
|
|
2336
|
-
}) : /* @__PURE__ */ t(
|
|
2986
|
+
children: [c ? /* @__PURE__ */ t(X, {
|
|
2987
|
+
tone: Qt[c],
|
|
2988
|
+
children: Zt[c]
|
|
2989
|
+
}) : /* @__PURE__ */ t(X, {
|
|
2337
2990
|
tone: "success",
|
|
2338
2991
|
children: o
|
|
2339
|
-
}), h > 0 ? /* @__PURE__ */ n(
|
|
2992
|
+
}), h > 0 ? /* @__PURE__ */ n(X, {
|
|
2340
2993
|
tone: "warning",
|
|
2341
2994
|
children: [
|
|
2342
2995
|
h,
|
|
2343
2996
|
" validation warning",
|
|
2344
2997
|
h === 1 ? "" : "s"
|
|
2345
2998
|
]
|
|
2346
|
-
}) : /* @__PURE__ */ t(
|
|
2999
|
+
}) : /* @__PURE__ */ t(X, {
|
|
2347
3000
|
tone: "success",
|
|
2348
3001
|
children: "Validation clear"
|
|
2349
3002
|
})]
|
|
2350
|
-
}), g.length > 0 ? /* @__PURE__ */ t(
|
|
3003
|
+
}), g.length > 0 ? /* @__PURE__ */ t(bt, {
|
|
2351
3004
|
actions: g,
|
|
2352
3005
|
density: d === "small-mobile" ? "dense" : "comfortable",
|
|
2353
3006
|
label: `${a} actions`
|
|
2354
3007
|
}) : null]
|
|
2355
3008
|
});
|
|
2356
3009
|
}
|
|
2357
|
-
function
|
|
3010
|
+
function ln({ className: e, crew: r, emptyDescription: i = "Robot crew members appear here when a construction job starts.", emptyTitle: a = "No robot crew assigned", label: o, title: s, variant: c = "desktop", "data-testid": l }) {
|
|
2358
3011
|
return /* @__PURE__ */ n("section", {
|
|
2359
3012
|
"aria-label": o,
|
|
2360
3013
|
className: ["game-ui-robot-crew-status", e].filter(Boolean).join(" "),
|
|
2361
3014
|
"data-ui-hook": "robot-crew-status",
|
|
2362
3015
|
"data-variant": c,
|
|
2363
3016
|
"data-testid": l,
|
|
2364
|
-
children: [s ? /* @__PURE__ */ t("header", { children: /* @__PURE__ */ t("strong", { children: s }) }) : null, r.length === 0 ? /* @__PURE__ */ t(
|
|
3017
|
+
children: [s ? /* @__PURE__ */ t("header", { children: /* @__PURE__ */ t("strong", { children: s }) }) : null, r.length === 0 ? /* @__PURE__ */ t(ht, {
|
|
2365
3018
|
description: i,
|
|
2366
3019
|
icon: "ai",
|
|
2367
3020
|
title: a
|
|
@@ -2371,7 +3024,7 @@ function Mt({ className: e, crew: r, emptyDescription: i = "Robot crew members a
|
|
|
2371
3024
|
className: "game-ui-robot-crew-member",
|
|
2372
3025
|
"data-crew-status": e.status,
|
|
2373
3026
|
children: [
|
|
2374
|
-
/* @__PURE__ */ t(
|
|
3027
|
+
/* @__PURE__ */ t(Z, {
|
|
2375
3028
|
icon: e.icon ?? "ai",
|
|
2376
3029
|
size: c === "small-mobile" ? "sm" : "md"
|
|
2377
3030
|
}),
|
|
@@ -2383,8 +3036,8 @@ function Mt({ className: e, crew: r, emptyDescription: i = "Robot crew members a
|
|
|
2383
3036
|
e.task ? /* @__PURE__ */ t("em", { children: e.task }) : null
|
|
2384
3037
|
]
|
|
2385
3038
|
}),
|
|
2386
|
-
/* @__PURE__ */ t(
|
|
2387
|
-
tone:
|
|
3039
|
+
/* @__PURE__ */ t(X, {
|
|
3040
|
+
tone: Xt[e.status],
|
|
2388
3041
|
children: e.status
|
|
2389
3042
|
})
|
|
2390
3043
|
]
|
|
@@ -2392,7 +3045,7 @@ function Mt({ className: e, crew: r, emptyDescription: i = "Robot crew members a
|
|
|
2392
3045
|
})]
|
|
2393
3046
|
});
|
|
2394
3047
|
}
|
|
2395
|
-
function
|
|
3048
|
+
function un({ activeView: e, after: r, before: i, className: a, label: o, onViewChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
2396
3049
|
let u = ["game-ui-before-after-toggle", a].filter(Boolean).join(" "), d = e === "before" ? i : r;
|
|
2397
3050
|
return /* @__PURE__ */ n("section", {
|
|
2398
3051
|
"aria-label": o,
|
|
@@ -2401,7 +3054,7 @@ function Nt({ activeView: e, after: r, before: i, className: a, label: o, onView
|
|
|
2401
3054
|
"data-ui-hook": "before-after-toggle",
|
|
2402
3055
|
"data-variant": c,
|
|
2403
3056
|
"data-testid": l,
|
|
2404
|
-
children: [/* @__PURE__ */ t(
|
|
3057
|
+
children: [/* @__PURE__ */ t(R, {
|
|
2405
3058
|
activeId: e,
|
|
2406
3059
|
label: `${o} view`,
|
|
2407
3060
|
...s ? { onSelect: (e) => s(e) } : {},
|
|
@@ -2420,7 +3073,7 @@ function Nt({ activeView: e, after: r, before: i, className: a, label: o, onView
|
|
|
2420
3073
|
}) : /* @__PURE__ */ t("div", {
|
|
2421
3074
|
"aria-hidden": "true",
|
|
2422
3075
|
className: "game-ui-before-after-placeholder",
|
|
2423
|
-
children: /* @__PURE__ */ t(
|
|
3076
|
+
children: /* @__PURE__ */ t(Z, {
|
|
2424
3077
|
icon: e === "before" ? "home" : "check",
|
|
2425
3078
|
size: "xl"
|
|
2426
3079
|
})
|
|
@@ -2428,8 +3081,8 @@ function Nt({ activeView: e, after: r, before: i, className: a, label: o, onView
|
|
|
2428
3081
|
})]
|
|
2429
3082
|
});
|
|
2430
3083
|
}
|
|
2431
|
-
function
|
|
2432
|
-
let f = ["game-ui-construction-job-card", e].filter(Boolean).join(" "), p =
|
|
3084
|
+
function dn({ className: e, density: r = "comfortable", job: i, onAction: a, onSelect: o, selected: s = !1, showApprovalBar: c = !0, showBeforeAfter: l = !1, variant: u = "desktop", "data-testid": d }) {
|
|
3085
|
+
let f = ["game-ui-construction-job-card", e].filter(Boolean).join(" "), p = en(i.status, i.statusLabel), m = u === "mobile" || u === "small-mobile", h = i.facts ?? [];
|
|
2433
3086
|
return /* @__PURE__ */ n("article", {
|
|
2434
3087
|
className: f,
|
|
2435
3088
|
"data-density": r,
|
|
@@ -2448,22 +3101,22 @@ function Pt({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
2448
3101
|
disabled: !o,
|
|
2449
3102
|
onClick: () => o?.(i.id),
|
|
2450
3103
|
type: "button",
|
|
2451
|
-
children: [/* @__PURE__ */ t(
|
|
2452
|
-
icon:
|
|
3104
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
3105
|
+
icon: Jt[i.status],
|
|
2453
3106
|
size: m ? "sm" : "md"
|
|
2454
3107
|
}), /* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("strong", { children: i.title }), i.description ? /* @__PURE__ */ t("small", { children: i.description }) : null] })]
|
|
2455
3108
|
}), /* @__PURE__ */ n("span", {
|
|
2456
3109
|
className: "game-ui-construction-job-badges",
|
|
2457
3110
|
children: [
|
|
2458
|
-
/* @__PURE__ */ t(
|
|
2459
|
-
tone:
|
|
3111
|
+
/* @__PURE__ */ t(X, {
|
|
3112
|
+
tone: qt[i.status],
|
|
2460
3113
|
children: p
|
|
2461
3114
|
}),
|
|
2462
|
-
i.providerMode ? /* @__PURE__ */ t(
|
|
2463
|
-
tone:
|
|
2464
|
-
children:
|
|
3115
|
+
i.providerMode ? /* @__PURE__ */ t(X, {
|
|
3116
|
+
tone: Qt[i.providerMode],
|
|
3117
|
+
children: Zt[i.providerMode]
|
|
2465
3118
|
}) : null,
|
|
2466
|
-
i.badges?.map((e) => /* @__PURE__ */ t(
|
|
3119
|
+
i.badges?.map((e) => /* @__PURE__ */ t(X, {
|
|
2467
3120
|
tone: e.tone ?? "neutral",
|
|
2468
3121
|
children: e.label
|
|
2469
3122
|
}, e.label))
|
|
@@ -2479,7 +3132,7 @@ function Pt({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
2479
3132
|
h.map((e) => /* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("small", { children: e.label }), /* @__PURE__ */ t("b", { children: e.value })] }, e.id))
|
|
2480
3133
|
]
|
|
2481
3134
|
}),
|
|
2482
|
-
/* @__PURE__ */ t(
|
|
3135
|
+
/* @__PURE__ */ t(sn, {
|
|
2483
3136
|
label: `${i.title} progress`,
|
|
2484
3137
|
progressLabel: i.progressLabel,
|
|
2485
3138
|
status: i.status,
|
|
@@ -2490,19 +3143,19 @@ function Pt({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
2490
3143
|
max: i.progressMax,
|
|
2491
3144
|
variant: u
|
|
2492
3145
|
}),
|
|
2493
|
-
l &&
|
|
3146
|
+
l && on(i) ? /* @__PURE__ */ t(un, {
|
|
2494
3147
|
activeView: "after",
|
|
2495
3148
|
after: i.after,
|
|
2496
3149
|
before: i.before,
|
|
2497
3150
|
label: `${i.title} preview`,
|
|
2498
3151
|
variant: u
|
|
2499
3152
|
}) : null,
|
|
2500
|
-
i.crew && i.crew.length > 0 ? /* @__PURE__ */ t(
|
|
3153
|
+
i.crew && i.crew.length > 0 ? /* @__PURE__ */ t(ln, {
|
|
2501
3154
|
crew: i.crew,
|
|
2502
3155
|
label: `${i.title} robot crew`,
|
|
2503
3156
|
variant: u
|
|
2504
3157
|
}) : null,
|
|
2505
|
-
c ? /* @__PURE__ */ t(
|
|
3158
|
+
c ? /* @__PURE__ */ t(cn, {
|
|
2506
3159
|
actions: i.actions,
|
|
2507
3160
|
label: `${i.title} approval`,
|
|
2508
3161
|
onAction: (e) => a?.(e, i.id),
|
|
@@ -2514,8 +3167,8 @@ function Pt({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
2514
3167
|
]
|
|
2515
3168
|
});
|
|
2516
3169
|
}
|
|
2517
|
-
function
|
|
2518
|
-
return /* @__PURE__ */ t(
|
|
3170
|
+
function fn({ children: e, className: n, closeLabel: r = "Close jobs", disabled: i = !1, jobs: a = [], label: o, onAction: s, onOpenChange: c, onSelectJob: l, open: u, panelId: d = "game-compact-job-drawer-panel", selectedJobId: f, title: p, triggerLabel: m = "Construction jobs", variant: h = "mobile", "data-testid": g }) {
|
|
3171
|
+
return /* @__PURE__ */ t(Ut, {
|
|
2519
3172
|
className: ["game-ui-compact-job-drawer", n].filter(Boolean).join(" "),
|
|
2520
3173
|
closeLabel: r,
|
|
2521
3174
|
disabled: i,
|
|
@@ -2531,7 +3184,7 @@ function Ft({ children: e, className: n, closeLabel: r = "Close jobs", disabled:
|
|
|
2531
3184
|
children: e ?? /* @__PURE__ */ t("div", {
|
|
2532
3185
|
className: "game-ui-compact-job-drawer-list",
|
|
2533
3186
|
tabIndex: 0,
|
|
2534
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
3187
|
+
children: a.map((e) => /* @__PURE__ */ t(dn, {
|
|
2535
3188
|
density: "dense",
|
|
2536
3189
|
job: e,
|
|
2537
3190
|
onAction: s,
|
|
@@ -2543,7 +3196,7 @@ function Ft({ children: e, className: n, closeLabel: r = "Close jobs", disabled:
|
|
|
2543
3196
|
})
|
|
2544
3197
|
});
|
|
2545
3198
|
}
|
|
2546
|
-
function
|
|
3199
|
+
function pn({ activePreviewView: e = "after", className: r, density: i = "comfortable", drawerOpen: a = !1, emptyDescription: o = "Draft construction jobs will appear here before any provider call is allowed.", emptyTitle: s = "No construction jobs", jobs: c, label: l, onAction: u, onDrawerOpenChange: d, onPreviewViewChange: f, onSelectJob: p, selectedJobId: m, subtitle: h, title: g, variant: _ = "desktop", "data-testid": v }) {
|
|
2547
3200
|
let y = ["game-ui-contractor-panel", r].filter(Boolean).join(" "), b = c.find((e) => e.id === m) ?? c[0];
|
|
2548
3201
|
return _ === "mobile" || _ === "small-mobile" ? /* @__PURE__ */ n("section", {
|
|
2549
3202
|
"aria-label": l,
|
|
@@ -2552,7 +3205,7 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2552
3205
|
"data-variant": _,
|
|
2553
3206
|
"data-testid": v,
|
|
2554
3207
|
children: [
|
|
2555
|
-
/* @__PURE__ */ t(
|
|
3208
|
+
/* @__PURE__ */ t(fn, {
|
|
2556
3209
|
jobs: c,
|
|
2557
3210
|
label: `${l} drawer`,
|
|
2558
3211
|
onAction: u,
|
|
@@ -2564,22 +3217,22 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2564
3217
|
triggerLabel: "Contractor",
|
|
2565
3218
|
variant: _
|
|
2566
3219
|
}),
|
|
2567
|
-
b && !a ? /* @__PURE__ */ t(
|
|
3220
|
+
b && !a ? /* @__PURE__ */ t(dn, {
|
|
2568
3221
|
density: "dense",
|
|
2569
3222
|
job: b,
|
|
2570
3223
|
onAction: u,
|
|
2571
3224
|
onSelect: p,
|
|
2572
3225
|
selected: !0,
|
|
2573
|
-
showBeforeAfter:
|
|
3226
|
+
showBeforeAfter: on(b),
|
|
2574
3227
|
variant: _
|
|
2575
3228
|
}) : null,
|
|
2576
|
-
b ? null : /* @__PURE__ */ t(
|
|
3229
|
+
b ? null : /* @__PURE__ */ t(ht, {
|
|
2577
3230
|
description: o,
|
|
2578
3231
|
icon: "energy",
|
|
2579
3232
|
title: s
|
|
2580
3233
|
})
|
|
2581
3234
|
]
|
|
2582
|
-
}) : /* @__PURE__ */ t(
|
|
3235
|
+
}) : /* @__PURE__ */ t(F, {
|
|
2583
3236
|
className: y,
|
|
2584
3237
|
"data-ui-hook": "contractor-panel",
|
|
2585
3238
|
"data-variant": _,
|
|
@@ -2594,7 +3247,7 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2594
3247
|
className: "game-ui-contractor-panel-subtitle",
|
|
2595
3248
|
children: h
|
|
2596
3249
|
}) : null,
|
|
2597
|
-
c.length === 0 ? /* @__PURE__ */ t(
|
|
3250
|
+
c.length === 0 ? /* @__PURE__ */ t(ht, {
|
|
2598
3251
|
description: o,
|
|
2599
3252
|
icon: "energy",
|
|
2600
3253
|
title: s
|
|
@@ -2605,7 +3258,7 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2605
3258
|
"aria-label": "Construction job queue",
|
|
2606
3259
|
className: "game-ui-contractor-job-list",
|
|
2607
3260
|
tabIndex: 0,
|
|
2608
|
-
children: c.map((e) => /* @__PURE__ */ t(
|
|
3261
|
+
children: c.map((e) => /* @__PURE__ */ t(dn, {
|
|
2609
3262
|
density: i,
|
|
2610
3263
|
job: e,
|
|
2611
3264
|
onAction: u,
|
|
@@ -2618,7 +3271,7 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2618
3271
|
className: "game-ui-contractor-detail",
|
|
2619
3272
|
"aria-label": `${b.title} detail`,
|
|
2620
3273
|
children: [
|
|
2621
|
-
/* @__PURE__ */ t(
|
|
3274
|
+
/* @__PURE__ */ t(sn, {
|
|
2622
3275
|
label: `${b.title} progress detail`,
|
|
2623
3276
|
progressLabel: b.progressLabel,
|
|
2624
3277
|
status: b.status,
|
|
@@ -2629,7 +3282,7 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2629
3282
|
max: b.progressMax,
|
|
2630
3283
|
variant: _
|
|
2631
3284
|
}),
|
|
2632
|
-
|
|
3285
|
+
on(b) ? /* @__PURE__ */ t(un, {
|
|
2633
3286
|
activeView: e,
|
|
2634
3287
|
after: b.after,
|
|
2635
3288
|
before: b.before,
|
|
@@ -2637,13 +3290,13 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2637
3290
|
onViewChange: f,
|
|
2638
3291
|
variant: _
|
|
2639
3292
|
}) : null,
|
|
2640
|
-
/* @__PURE__ */ t(
|
|
3293
|
+
/* @__PURE__ */ t(ln, {
|
|
2641
3294
|
crew: b.crew ?? [],
|
|
2642
3295
|
label: `${b.title} robot crew`,
|
|
2643
3296
|
title: "Robot crew",
|
|
2644
3297
|
variant: _
|
|
2645
3298
|
}),
|
|
2646
|
-
/* @__PURE__ */ t(
|
|
3299
|
+
/* @__PURE__ */ t(cn, {
|
|
2647
3300
|
actions: b.actions,
|
|
2648
3301
|
label: `${b.title} approval`,
|
|
2649
3302
|
onAction: u ? (e) => u(e, b.id) : void 0,
|
|
@@ -2661,16 +3314,16 @@ function It({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
2661
3314
|
}
|
|
2662
3315
|
//#endregion
|
|
2663
3316
|
//#region src/GamePanelSystem.tsx
|
|
2664
|
-
function
|
|
3317
|
+
function mn(...e) {
|
|
2665
3318
|
return e.filter(Boolean).join(" ");
|
|
2666
3319
|
}
|
|
2667
|
-
var
|
|
3320
|
+
var hn = {
|
|
2668
3321
|
collapse: "Collapse",
|
|
2669
3322
|
expand: "Expand"
|
|
2670
3323
|
};
|
|
2671
|
-
function
|
|
3324
|
+
function gn({ actions: e, children: r, className: i, defaultOpen: a = !0, labels: o, onOpenChange: s, open: c, title: u, tone: f = "default", ...p }) {
|
|
2672
3325
|
let m = l(), [h, g] = d(a), _ = c ?? h, v = {
|
|
2673
|
-
...
|
|
3326
|
+
...hn,
|
|
2674
3327
|
...o
|
|
2675
3328
|
}, y = () => {
|
|
2676
3329
|
let e = !_;
|
|
@@ -2678,7 +3331,7 @@ function zt({ actions: e, children: r, className: i, defaultOpen: a = !0, labels
|
|
|
2678
3331
|
};
|
|
2679
3332
|
return /* @__PURE__ */ n("section", {
|
|
2680
3333
|
...p,
|
|
2681
|
-
className:
|
|
3334
|
+
className: mn("game-ui-collapsible", i),
|
|
2682
3335
|
"data-open": _,
|
|
2683
3336
|
"data-panel-tone": f,
|
|
2684
3337
|
children: [/* @__PURE__ */ n("header", {
|
|
@@ -2717,13 +3370,13 @@ function zt({ actions: e, children: r, className: i, defaultOpen: a = !0, labels
|
|
|
2717
3370
|
})]
|
|
2718
3371
|
});
|
|
2719
3372
|
}
|
|
2720
|
-
var
|
|
3373
|
+
var _n = {
|
|
2721
3374
|
close: "Close",
|
|
2722
3375
|
maximize: "Maximize",
|
|
2723
3376
|
minimize: "Minimize",
|
|
2724
3377
|
restore: "Restore"
|
|
2725
3378
|
};
|
|
2726
|
-
function
|
|
3379
|
+
function vn({ kind: e }) {
|
|
2727
3380
|
return /* @__PURE__ */ t("svg", {
|
|
2728
3381
|
"aria-hidden": "true",
|
|
2729
3382
|
fill: "none",
|
|
@@ -2743,9 +3396,9 @@ function Vt({ kind: e }) {
|
|
|
2743
3396
|
})
|
|
2744
3397
|
});
|
|
2745
3398
|
}
|
|
2746
|
-
function
|
|
3399
|
+
function yn({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, className: a, defaultState: o = "normal", footer: s, icon: c, labels: l, onClose: u, onStateChange: f, state: p, title: m, ...h }) {
|
|
2747
3400
|
let [g, _] = d(o), v = p ?? g, y = {
|
|
2748
|
-
...
|
|
3401
|
+
..._n,
|
|
2749
3402
|
...l
|
|
2750
3403
|
}, b = (e) => {
|
|
2751
3404
|
p === void 0 && _(e), f?.(e);
|
|
@@ -2753,7 +3406,7 @@ function Ht({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
2753
3406
|
return /* @__PURE__ */ n("section", {
|
|
2754
3407
|
...h,
|
|
2755
3408
|
"aria-label": m,
|
|
2756
|
-
className:
|
|
3409
|
+
className: mn("game-ui-window", a),
|
|
2757
3410
|
"data-window-state": v,
|
|
2758
3411
|
role: "group",
|
|
2759
3412
|
children: [/* @__PURE__ */ n("header", {
|
|
@@ -2776,21 +3429,21 @@ function Ht({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
2776
3429
|
className: "game-ui-icon-button game-ui-window-button",
|
|
2777
3430
|
onClick: () => b(x ? "normal" : "minimized"),
|
|
2778
3431
|
type: "button",
|
|
2779
|
-
children: /* @__PURE__ */ t(
|
|
3432
|
+
children: /* @__PURE__ */ t(vn, { kind: x ? "restore" : "minimize" })
|
|
2780
3433
|
}) : null,
|
|
2781
3434
|
e ? /* @__PURE__ */ t("button", {
|
|
2782
3435
|
"aria-label": S ? y.restore : y.maximize,
|
|
2783
3436
|
className: "game-ui-icon-button game-ui-window-button",
|
|
2784
3437
|
onClick: () => b(S ? "normal" : "maximized"),
|
|
2785
3438
|
type: "button",
|
|
2786
|
-
children: /* @__PURE__ */ t(
|
|
3439
|
+
children: /* @__PURE__ */ t(vn, { kind: S ? "restore" : "maximize" })
|
|
2787
3440
|
}) : null,
|
|
2788
3441
|
u ? /* @__PURE__ */ t("button", {
|
|
2789
3442
|
"aria-label": y.close,
|
|
2790
3443
|
className: "game-ui-icon-button game-ui-window-button",
|
|
2791
3444
|
onClick: u,
|
|
2792
3445
|
type: "button",
|
|
2793
|
-
children: /* @__PURE__ */ t(
|
|
3446
|
+
children: /* @__PURE__ */ t(vn, { kind: "close" })
|
|
2794
3447
|
}) : null
|
|
2795
3448
|
]
|
|
2796
3449
|
})
|
|
@@ -2810,14 +3463,14 @@ function Ht({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
2810
3463
|
})]
|
|
2811
3464
|
});
|
|
2812
3465
|
}
|
|
2813
|
-
function
|
|
3466
|
+
function bn({ children: e, className: r, closeLabel: i = "Close", closeOnBackdrop: a = !0, footer: o, onClose: s, open: d, position: f = "center", size: p = "md", title: m }) {
|
|
2814
3467
|
let h = u(null), g = l();
|
|
2815
3468
|
return c(() => {
|
|
2816
3469
|
let e = h.current;
|
|
2817
3470
|
e && (d && !e.open && e.showModal(), !d && e.open && e.close());
|
|
2818
3471
|
}, [d]), /* @__PURE__ */ t("dialog", {
|
|
2819
3472
|
"aria-labelledby": g,
|
|
2820
|
-
className:
|
|
3473
|
+
className: mn("game-ui-modal", r),
|
|
2821
3474
|
"data-position": f,
|
|
2822
3475
|
"data-size": p,
|
|
2823
3476
|
onCancel: (e) => {
|
|
@@ -2841,7 +3494,7 @@ function Ut({ children: e, className: r, closeLabel: i = "Close", closeOnBackdro
|
|
|
2841
3494
|
className: "game-ui-icon-button game-ui-window-button",
|
|
2842
3495
|
onClick: s,
|
|
2843
3496
|
type: "button",
|
|
2844
|
-
children: /* @__PURE__ */ t(
|
|
3497
|
+
children: /* @__PURE__ */ t(vn, { kind: "close" })
|
|
2845
3498
|
})]
|
|
2846
3499
|
}),
|
|
2847
3500
|
/* @__PURE__ */ t("div", {
|
|
@@ -2858,7 +3511,7 @@ function Ut({ children: e, className: r, closeLabel: i = "Close", closeOnBackdro
|
|
|
2858
3511
|
}
|
|
2859
3512
|
//#endregion
|
|
2860
3513
|
//#region src/previewStates.ts
|
|
2861
|
-
var
|
|
3514
|
+
var xn = [
|
|
2862
3515
|
{
|
|
2863
3516
|
id: "history-human-long",
|
|
2864
3517
|
kind: "human",
|
|
@@ -2880,48 +3533,22 @@ var Wt = [
|
|
|
2880
3533
|
speaker: "Table",
|
|
2881
3534
|
text: "Three votes are locked. One more read can still change the pact."
|
|
2882
3535
|
}
|
|
2883
|
-
],
|
|
2884
|
-
...
|
|
2885
|
-
...
|
|
2886
|
-
...
|
|
2887
|
-
...
|
|
2888
|
-
...
|
|
2889
|
-
...
|
|
2890
|
-
...
|
|
2891
|
-
...
|
|
3536
|
+
], Sn = {
|
|
3537
|
+
...G,
|
|
3538
|
+
...K,
|
|
3539
|
+
...Se,
|
|
3540
|
+
...Ce,
|
|
3541
|
+
...we,
|
|
3542
|
+
...q,
|
|
3543
|
+
...J,
|
|
3544
|
+
...Ee
|
|
2892
3545
|
}, Q = {
|
|
2893
3546
|
toneAttr: "data-game-ui-tone",
|
|
2894
3547
|
toneGlass: "glass",
|
|
2895
3548
|
densityAttr: "data-game-ui-density",
|
|
2896
3549
|
densityCompact: "compact",
|
|
2897
3550
|
scopeClass: "game-ui-overlay-scope"
|
|
2898
|
-
},
|
|
2899
|
-
"--game-ui-bg",
|
|
2900
|
-
"--game-ui-surface",
|
|
2901
|
-
"--game-ui-surface-raised",
|
|
2902
|
-
"--game-ui-panel",
|
|
2903
|
-
"--game-ui-panel-strong",
|
|
2904
|
-
"--game-ui-panel-deep",
|
|
2905
|
-
"--game-ui-text",
|
|
2906
|
-
"--game-ui-text-muted",
|
|
2907
|
-
"--game-ui-accent",
|
|
2908
|
-
"--game-ui-accent-bright",
|
|
2909
|
-
"--game-ui-secondary",
|
|
2910
|
-
"--game-ui-success",
|
|
2911
|
-
"--game-ui-success-bright",
|
|
2912
|
-
"--game-ui-danger",
|
|
2913
|
-
"--game-ui-danger-bright",
|
|
2914
|
-
"--game-ui-warning",
|
|
2915
|
-
"--game-ui-focus-ring",
|
|
2916
|
-
"--game-ui-border-subtle",
|
|
2917
|
-
"--game-ui-border-strong",
|
|
2918
|
-
"--game-ui-disabled",
|
|
2919
|
-
"--game-ui-ink-deep",
|
|
2920
|
-
"--game-ui-border-ink",
|
|
2921
|
-
"--game-ui-wood",
|
|
2922
|
-
"--game-ui-ink-title",
|
|
2923
|
-
"--game-ui-ink-heading"
|
|
2924
|
-
], Jt = {
|
|
3551
|
+
}, Cn = Te, wn = /* @__PURE__ */ "--game-ui-bg.--game-ui-surface.--game-ui-surface-raised.--game-ui-panel.--game-ui-panel-strong.--game-ui-panel-deep.--game-ui-text.--game-ui-text-muted.--game-ui-accent.--game-ui-accent-bright.--game-ui-secondary.--game-ui-success.--game-ui-success-bright.--game-ui-danger.--game-ui-danger-bright.--game-ui-warning.--game-ui-focus-ring.--game-ui-border-subtle.--game-ui-border-strong.--game-ui-disabled.--game-ui-ink-deep.--game-ui-border-ink.--game-ui-wood.--game-ui-ink-title.--game-ui-ink-heading.--game-ui-liquid-metal-face.--game-ui-liquid-metal-ink".split("."), Tn = {
|
|
2925
3552
|
en: {
|
|
2926
3553
|
triggerLabel: "EN",
|
|
2927
3554
|
langMenuLabel: "Preview language",
|
|
@@ -2934,6 +3561,7 @@ var Wt = [
|
|
|
2934
3561
|
components: "Component surface",
|
|
2935
3562
|
forms: "Forms, inputs and status",
|
|
2936
3563
|
overlayGlass: "Overlay glass HUD",
|
|
3564
|
+
liquidMetal: "Liquid metal CTA",
|
|
2937
3565
|
firstSession: "First-session shell",
|
|
2938
3566
|
orientation: "Orientation gate preview",
|
|
2939
3567
|
responsive: "Responsive proof targets"
|
|
@@ -2947,6 +3575,7 @@ var Wt = [
|
|
|
2947
3575
|
elevation: "elevation",
|
|
2948
3576
|
motion: "motion",
|
|
2949
3577
|
overlayGlass: "overlay glass",
|
|
3578
|
+
liquidMetal: "liquid metal",
|
|
2950
3579
|
layers: "layers",
|
|
2951
3580
|
targets: "targets",
|
|
2952
3581
|
assetSizing: "asset sizing"
|
|
@@ -3032,6 +3661,12 @@ var Wt = [
|
|
|
3032
3661
|
sliderLabel: "Effects volume",
|
|
3033
3662
|
toggleLabel: "Sound on"
|
|
3034
3663
|
},
|
|
3664
|
+
liquidMetal: {
|
|
3665
|
+
body: "For the few screens that take money or a yes: checkout, sign-up, badge unlock, landing CTA. Not for reading, queues, or the map — a moving rim is a tax you pay every glance, and the aesthetic-usability effect is strongest in the first seconds. More than two of these on a page means the page is the wrong place.",
|
|
3666
|
+
cssTitle: "CSS renderer · zero WebGL context",
|
|
3667
|
+
webglTitle: "WebGL renderer · when the budget allows",
|
|
3668
|
+
cta: "Become a member"
|
|
3669
|
+
},
|
|
3035
3670
|
hud: {
|
|
3036
3671
|
label: "Persistent HUD cluster",
|
|
3037
3672
|
youAre: "You are",
|
|
@@ -3114,7 +3749,7 @@ var Wt = [
|
|
|
3114
3749
|
hint: "Rotate manually if this browser blocks automatic landscape lock."
|
|
3115
3750
|
},
|
|
3116
3751
|
historyLabel: "Round history",
|
|
3117
|
-
history:
|
|
3752
|
+
history: xn
|
|
3118
3753
|
},
|
|
3119
3754
|
"zh-CN": {
|
|
3120
3755
|
triggerLabel: "中",
|
|
@@ -3128,6 +3763,7 @@ var Wt = [
|
|
|
3128
3763
|
components: "组件总览",
|
|
3129
3764
|
forms: "表单、输入与状态",
|
|
3130
3765
|
overlayGlass: "叠加玻璃 HUD",
|
|
3766
|
+
liquidMetal: "液态金属 CTA",
|
|
3131
3767
|
firstSession: "首次会话外壳",
|
|
3132
3768
|
orientation: "横屏门预览",
|
|
3133
3769
|
responsive: "响应式验证目标"
|
|
@@ -3141,6 +3777,7 @@ var Wt = [
|
|
|
3141
3777
|
elevation: "阴影",
|
|
3142
3778
|
motion: "动效",
|
|
3143
3779
|
overlayGlass: "叠加玻璃",
|
|
3780
|
+
liquidMetal: "液态金属",
|
|
3144
3781
|
layers: "层级",
|
|
3145
3782
|
targets: "触控目标",
|
|
3146
3783
|
assetSizing: "资源尺寸"
|
|
@@ -3226,6 +3863,12 @@ var Wt = [
|
|
|
3226
3863
|
sliderLabel: "音效音量",
|
|
3227
3864
|
toggleLabel: "声音开"
|
|
3228
3865
|
},
|
|
3866
|
+
liquidMetal: {
|
|
3867
|
+
body: "只用在掏钱或拍板的那几屏:付款、注册、徽章解锁、落地页主按钮。阅读、复习队列、3D 地图一个都不要加——会流动的边框在干活面上是每一次都要付的税。美观可用性效应在第一印象最强、随使用次数衰减。一页出现两个以上,就是用错了地方。",
|
|
3868
|
+
cssTitle: "CSS 渲染器 · 零 WebGL 上下文",
|
|
3869
|
+
webglTitle: "WebGL 渲染器 · 预算允许时",
|
|
3870
|
+
cta: "成为会员"
|
|
3871
|
+
},
|
|
3229
3872
|
hud: {
|
|
3230
3873
|
label: "常驻 HUD 集群",
|
|
3231
3874
|
youAre: "你的身份",
|
|
@@ -3332,53 +3975,57 @@ var Wt = [
|
|
|
3332
3975
|
}
|
|
3333
3976
|
]
|
|
3334
3977
|
}
|
|
3335
|
-
},
|
|
3978
|
+
}, En = i(Tn.en), $ = () => s(En), Dn = [
|
|
3336
3979
|
{
|
|
3337
3980
|
id: "colors",
|
|
3338
|
-
tokens:
|
|
3981
|
+
tokens: W
|
|
3339
3982
|
},
|
|
3340
3983
|
{
|
|
3341
3984
|
id: "semantic",
|
|
3342
|
-
tokens:
|
|
3985
|
+
tokens: G
|
|
3343
3986
|
},
|
|
3344
3987
|
{
|
|
3345
3988
|
id: "typography",
|
|
3346
|
-
tokens:
|
|
3989
|
+
tokens: K
|
|
3347
3990
|
},
|
|
3348
3991
|
{
|
|
3349
3992
|
id: "spacing",
|
|
3350
|
-
tokens:
|
|
3993
|
+
tokens: Se
|
|
3351
3994
|
},
|
|
3352
3995
|
{
|
|
3353
3996
|
id: "radius",
|
|
3354
|
-
tokens:
|
|
3997
|
+
tokens: Ce
|
|
3355
3998
|
},
|
|
3356
3999
|
{
|
|
3357
4000
|
id: "elevation",
|
|
3358
|
-
tokens:
|
|
4001
|
+
tokens: we
|
|
3359
4002
|
},
|
|
3360
4003
|
{
|
|
3361
4004
|
id: "motion",
|
|
3362
|
-
tokens:
|
|
4005
|
+
tokens: q
|
|
3363
4006
|
},
|
|
3364
4007
|
{
|
|
3365
4008
|
id: "overlayGlass",
|
|
3366
|
-
tokens:
|
|
4009
|
+
tokens: xe
|
|
4010
|
+
},
|
|
4011
|
+
{
|
|
4012
|
+
id: "liquidMetal",
|
|
4013
|
+
tokens: be
|
|
3367
4014
|
},
|
|
3368
4015
|
{
|
|
3369
4016
|
id: "layers",
|
|
3370
|
-
tokens:
|
|
4017
|
+
tokens: J
|
|
3371
4018
|
},
|
|
3372
4019
|
{
|
|
3373
4020
|
id: "targets",
|
|
3374
|
-
tokens:
|
|
4021
|
+
tokens: Te
|
|
3375
4022
|
},
|
|
3376
4023
|
{
|
|
3377
4024
|
id: "assetSizing",
|
|
3378
|
-
tokens:
|
|
4025
|
+
tokens: Ee
|
|
3379
4026
|
}
|
|
3380
4027
|
];
|
|
3381
|
-
function
|
|
4028
|
+
function On({ id: e, label: r, tokens: i }) {
|
|
3382
4029
|
return /* @__PURE__ */ n("article", {
|
|
3383
4030
|
className: "game-ui-token-card",
|
|
3384
4031
|
children: [/* @__PURE__ */ t("h3", { children: r }), /* @__PURE__ */ t("div", {
|
|
@@ -3390,17 +4037,17 @@ function Zt({ id: e, label: r, tokens: i }) {
|
|
|
3390
4037
|
})]
|
|
3391
4038
|
});
|
|
3392
4039
|
}
|
|
3393
|
-
function
|
|
4040
|
+
function kn() {
|
|
3394
4041
|
return /* @__PURE__ */ t("div", {
|
|
3395
4042
|
"aria-label": "Clay color swatches",
|
|
3396
4043
|
className: "game-ui-swatch-grid",
|
|
3397
|
-
children: Object.entries(
|
|
4044
|
+
children: Object.entries(W).map(([e, r]) => /* @__PURE__ */ n("figure", {
|
|
3398
4045
|
className: "game-ui-swatch",
|
|
3399
4046
|
children: [/* @__PURE__ */ t("span", { style: { background: r } }), /* @__PURE__ */ n("figcaption", { children: [/* @__PURE__ */ t("strong", { children: e }), /* @__PURE__ */ t("code", { children: r })] })]
|
|
3400
4047
|
}, e))
|
|
3401
4048
|
});
|
|
3402
4049
|
}
|
|
3403
|
-
function
|
|
4050
|
+
function An() {
|
|
3404
4051
|
let { type: e } = $();
|
|
3405
4052
|
return /* @__PURE__ */ n("div", {
|
|
3406
4053
|
className: "game-ui-type-scale",
|
|
@@ -3416,9 +4063,9 @@ function $t() {
|
|
|
3416
4063
|
]
|
|
3417
4064
|
});
|
|
3418
4065
|
}
|
|
3419
|
-
function
|
|
4066
|
+
function jn() {
|
|
3420
4067
|
let { buttons: e } = $();
|
|
3421
|
-
return /* @__PURE__ */ n(
|
|
4068
|
+
return /* @__PURE__ */ n(F, {
|
|
3422
4069
|
title: e.panelTitle,
|
|
3423
4070
|
tone: "strong",
|
|
3424
4071
|
children: [
|
|
@@ -3455,38 +4102,38 @@ function en() {
|
|
|
3455
4102
|
/* @__PURE__ */ n("div", {
|
|
3456
4103
|
className: "game-ui-component-row",
|
|
3457
4104
|
children: [
|
|
3458
|
-
/* @__PURE__ */ t(
|
|
4105
|
+
/* @__PURE__ */ t(ye, {
|
|
3459
4106
|
label: e.settingsTip,
|
|
3460
|
-
children: /* @__PURE__ */ t(
|
|
4107
|
+
children: /* @__PURE__ */ t(I, {
|
|
3461
4108
|
label: e.settingsTip,
|
|
3462
|
-
children: /* @__PURE__ */ t(
|
|
4109
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3463
4110
|
icon: "settings",
|
|
3464
4111
|
size: "sm"
|
|
3465
4112
|
})
|
|
3466
4113
|
})
|
|
3467
4114
|
}),
|
|
3468
|
-
/* @__PURE__ */ t(
|
|
4115
|
+
/* @__PURE__ */ t(I, {
|
|
3469
4116
|
label: e.copyInvite,
|
|
3470
|
-
children: /* @__PURE__ */ t(
|
|
4117
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3471
4118
|
icon: "copy",
|
|
3472
4119
|
size: "sm"
|
|
3473
4120
|
})
|
|
3474
4121
|
}),
|
|
3475
|
-
/* @__PURE__ */ t(
|
|
4122
|
+
/* @__PURE__ */ t(X, {
|
|
3476
4123
|
tone: "ai",
|
|
3477
4124
|
children: e.aiBadge
|
|
3478
4125
|
}),
|
|
3479
|
-
/* @__PURE__ */ t(
|
|
4126
|
+
/* @__PURE__ */ t(X, {
|
|
3480
4127
|
tone: "success",
|
|
3481
4128
|
children: e.readyBadge
|
|
3482
4129
|
}),
|
|
3483
|
-
/* @__PURE__ */ t(
|
|
4130
|
+
/* @__PURE__ */ t(X, {
|
|
3484
4131
|
tone: "warning",
|
|
3485
4132
|
children: e.hostGateBadge
|
|
3486
4133
|
})
|
|
3487
4134
|
]
|
|
3488
4135
|
}),
|
|
3489
|
-
/* @__PURE__ */ t(
|
|
4136
|
+
/* @__PURE__ */ t(R, {
|
|
3490
4137
|
activeId: "live",
|
|
3491
4138
|
label: e.segmentedLabel,
|
|
3492
4139
|
options: [
|
|
@@ -3504,7 +4151,7 @@ function en() {
|
|
|
3504
4151
|
}
|
|
3505
4152
|
]
|
|
3506
4153
|
}),
|
|
3507
|
-
/* @__PURE__ */ t(
|
|
4154
|
+
/* @__PURE__ */ t(L, {
|
|
3508
4155
|
activeId: "portal",
|
|
3509
4156
|
tabs: [
|
|
3510
4157
|
{
|
|
@@ -3521,7 +4168,7 @@ function en() {
|
|
|
3521
4168
|
}
|
|
3522
4169
|
]
|
|
3523
4170
|
}),
|
|
3524
|
-
/* @__PURE__ */ t(
|
|
4171
|
+
/* @__PURE__ */ t(V, {
|
|
3525
4172
|
items: [
|
|
3526
4173
|
{
|
|
3527
4174
|
id: "wave",
|
|
@@ -3538,20 +4185,20 @@ function en() {
|
|
|
3538
4185
|
],
|
|
3539
4186
|
label: e.radialLabel
|
|
3540
4187
|
}),
|
|
3541
|
-
/* @__PURE__ */ t(
|
|
4188
|
+
/* @__PURE__ */ t(z, {
|
|
3542
4189
|
label: e.sliderLabel,
|
|
3543
4190
|
max: 100,
|
|
3544
4191
|
min: 0,
|
|
3545
4192
|
value: 68
|
|
3546
4193
|
}),
|
|
3547
|
-
/* @__PURE__ */ t(
|
|
4194
|
+
/* @__PURE__ */ t(B, {
|
|
3548
4195
|
checked: !0,
|
|
3549
4196
|
label: e.toggleLabel
|
|
3550
4197
|
})
|
|
3551
4198
|
]
|
|
3552
4199
|
});
|
|
3553
4200
|
}
|
|
3554
|
-
function
|
|
4201
|
+
function Mn() {
|
|
3555
4202
|
let { hud: e, tiles: r } = $();
|
|
3556
4203
|
return /* @__PURE__ */ n("div", {
|
|
3557
4204
|
className: "game-ui-stage-demo",
|
|
@@ -3559,7 +4206,7 @@ function tn() {
|
|
|
3559
4206
|
"aria-label": "Clay world HUD preview",
|
|
3560
4207
|
className: "game-ui-stage-world",
|
|
3561
4208
|
children: [
|
|
3562
|
-
/* @__PURE__ */ t(
|
|
4209
|
+
/* @__PURE__ */ t(Ze, {
|
|
3563
4210
|
label: e.label,
|
|
3564
4211
|
items: [
|
|
3565
4212
|
{
|
|
@@ -3582,17 +4229,17 @@ function tn() {
|
|
|
3582
4229
|
value: "02:46"
|
|
3583
4230
|
}
|
|
3584
4231
|
],
|
|
3585
|
-
actions: /* @__PURE__ */ n(
|
|
4232
|
+
actions: /* @__PURE__ */ n(P, {
|
|
3586
4233
|
label: e.tools,
|
|
3587
|
-
children: [/* @__PURE__ */ t(
|
|
4234
|
+
children: [/* @__PURE__ */ t(I, {
|
|
3588
4235
|
label: e.history,
|
|
3589
|
-
children: /* @__PURE__ */ t(
|
|
4236
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3590
4237
|
icon: "scroll",
|
|
3591
4238
|
size: "sm"
|
|
3592
4239
|
})
|
|
3593
|
-
}), /* @__PURE__ */ t(
|
|
4240
|
+
}), /* @__PURE__ */ t(I, {
|
|
3594
4241
|
label: e.settings,
|
|
3595
|
-
children: /* @__PURE__ */ t(
|
|
4242
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3596
4243
|
icon: "settings",
|
|
3597
4244
|
size: "sm"
|
|
3598
4245
|
})
|
|
@@ -3630,7 +4277,7 @@ function tn() {
|
|
|
3630
4277
|
}), /* @__PURE__ */ n("div", {
|
|
3631
4278
|
className: "game-ui-stage-sidecar",
|
|
3632
4279
|
children: [
|
|
3633
|
-
/* @__PURE__ */ t(
|
|
4280
|
+
/* @__PURE__ */ t($e, {
|
|
3634
4281
|
badge: r.daily.badge,
|
|
3635
4282
|
icon: "scroll",
|
|
3636
4283
|
kicker: r.daily.kicker,
|
|
@@ -3639,7 +4286,7 @@ function tn() {
|
|
|
3639
4286
|
title: r.daily.title,
|
|
3640
4287
|
tone: "daily"
|
|
3641
4288
|
}),
|
|
3642
|
-
/* @__PURE__ */ t(
|
|
4289
|
+
/* @__PURE__ */ t($e, {
|
|
3643
4290
|
badge: r.portal.badge,
|
|
3644
4291
|
icon: "portal",
|
|
3645
4292
|
kicker: r.portal.kicker,
|
|
@@ -3647,7 +4294,7 @@ function tn() {
|
|
|
3647
4294
|
title: r.portal.title,
|
|
3648
4295
|
tone: "portal"
|
|
3649
4296
|
}),
|
|
3650
|
-
/* @__PURE__ */ t(
|
|
4297
|
+
/* @__PURE__ */ t($e, {
|
|
3651
4298
|
icon: "energy",
|
|
3652
4299
|
kicker: r.host.kicker,
|
|
3653
4300
|
summary: r.host.summary,
|
|
@@ -3658,7 +4305,7 @@ function tn() {
|
|
|
3658
4305
|
})]
|
|
3659
4306
|
});
|
|
3660
4307
|
}
|
|
3661
|
-
function
|
|
4308
|
+
function Nn() {
|
|
3662
4309
|
let { hud: e, buttons: r } = $(), i = (i) => {
|
|
3663
4310
|
let a = i === "glass";
|
|
3664
4311
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3672,7 +4319,7 @@ function nn() {
|
|
|
3672
4319
|
[Q.toneAttr]: Q.toneGlass,
|
|
3673
4320
|
[Q.densityAttr]: Q.densityCompact
|
|
3674
4321
|
} : {},
|
|
3675
|
-
children: [/* @__PURE__ */ t(
|
|
4322
|
+
children: [/* @__PURE__ */ t(Ze, {
|
|
3676
4323
|
label: e.label,
|
|
3677
4324
|
items: [
|
|
3678
4325
|
{
|
|
@@ -3695,36 +4342,36 @@ function nn() {
|
|
|
3695
4342
|
value: "02:46"
|
|
3696
4343
|
}
|
|
3697
4344
|
],
|
|
3698
|
-
actions: /* @__PURE__ */ n(
|
|
4345
|
+
actions: /* @__PURE__ */ n(P, {
|
|
3699
4346
|
label: e.tools,
|
|
3700
|
-
children: [/* @__PURE__ */ t(
|
|
4347
|
+
children: [/* @__PURE__ */ t(I, {
|
|
3701
4348
|
label: e.history,
|
|
3702
|
-
children: /* @__PURE__ */ t(
|
|
4349
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3703
4350
|
icon: "scroll",
|
|
3704
4351
|
size: "sm"
|
|
3705
4352
|
})
|
|
3706
|
-
}), /* @__PURE__ */ t(
|
|
4353
|
+
}), /* @__PURE__ */ t(I, {
|
|
3707
4354
|
label: e.settings,
|
|
3708
|
-
children: /* @__PURE__ */ t(
|
|
4355
|
+
children: /* @__PURE__ */ t(Z, {
|
|
3709
4356
|
icon: "settings",
|
|
3710
4357
|
size: "sm"
|
|
3711
4358
|
})
|
|
3712
4359
|
})]
|
|
3713
4360
|
})
|
|
3714
|
-
}), /* @__PURE__ */ n(
|
|
4361
|
+
}), /* @__PURE__ */ n(F, {
|
|
3715
4362
|
title: r.panelTitle,
|
|
3716
4363
|
children: [/* @__PURE__ */ n("div", {
|
|
3717
4364
|
className: "game-ui-hud-cluster",
|
|
3718
4365
|
children: [
|
|
3719
|
-
/* @__PURE__ */ t(
|
|
4366
|
+
/* @__PURE__ */ t(X, {
|
|
3720
4367
|
tone: "ai",
|
|
3721
4368
|
children: r.aiBadge
|
|
3722
4369
|
}),
|
|
3723
|
-
/* @__PURE__ */ t(
|
|
4370
|
+
/* @__PURE__ */ t(X, {
|
|
3724
4371
|
tone: "success",
|
|
3725
4372
|
children: r.readyBadge
|
|
3726
4373
|
}),
|
|
3727
|
-
/* @__PURE__ */ t(
|
|
4374
|
+
/* @__PURE__ */ t(mt, {
|
|
3728
4375
|
label: e.reveal,
|
|
3729
4376
|
value: 68
|
|
3730
4377
|
})
|
|
@@ -3776,13 +4423,40 @@ function nn() {
|
|
|
3776
4423
|
})]
|
|
3777
4424
|
});
|
|
3778
4425
|
}
|
|
3779
|
-
function
|
|
4426
|
+
function Pn() {
|
|
4427
|
+
let { liquidMetal: e } = $();
|
|
4428
|
+
return /* @__PURE__ */ n("div", {
|
|
4429
|
+
className: "game-ui-liquid-metal-compare",
|
|
4430
|
+
children: [/* @__PURE__ */ t(F, {
|
|
4431
|
+
title: e.cssTitle,
|
|
4432
|
+
tone: "strong",
|
|
4433
|
+
children: /* @__PURE__ */ t("div", {
|
|
4434
|
+
className: "game-ui-liquid-metal-stage",
|
|
4435
|
+
children: /* @__PURE__ */ t(N, {
|
|
4436
|
+
renderer: "css",
|
|
4437
|
+
children: e.cta
|
|
4438
|
+
})
|
|
4439
|
+
})
|
|
4440
|
+
}), /* @__PURE__ */ t(F, {
|
|
4441
|
+
title: e.webglTitle,
|
|
4442
|
+
tone: "strong",
|
|
4443
|
+
children: /* @__PURE__ */ t("div", {
|
|
4444
|
+
className: "game-ui-liquid-metal-stage",
|
|
4445
|
+
children: /* @__PURE__ */ t(N, {
|
|
4446
|
+
renderer: "webgl",
|
|
4447
|
+
children: e.cta
|
|
4448
|
+
})
|
|
4449
|
+
})
|
|
4450
|
+
})]
|
|
4451
|
+
});
|
|
4452
|
+
}
|
|
4453
|
+
function Fn() {
|
|
3780
4454
|
let { modals: e } = $();
|
|
3781
4455
|
return /* @__PURE__ */ n("div", {
|
|
3782
4456
|
className: "game-ui-preview-two-up",
|
|
3783
|
-
children: [/* @__PURE__ */ n(
|
|
4457
|
+
children: [/* @__PURE__ */ n(_e, {
|
|
3784
4458
|
title: e.dialogTitle,
|
|
3785
|
-
children: [/* @__PURE__ */ t("p", { children: e.dialogBody }), /* @__PURE__ */ n(
|
|
4459
|
+
children: [/* @__PURE__ */ t("p", { children: e.dialogBody }), /* @__PURE__ */ n(P, {
|
|
3786
4460
|
label: e.actionsLabel,
|
|
3787
4461
|
children: [/* @__PURE__ */ t(b, {
|
|
3788
4462
|
variant: "primary",
|
|
@@ -3792,20 +4466,20 @@ function rn() {
|
|
|
3792
4466
|
children: e.back
|
|
3793
4467
|
})]
|
|
3794
4468
|
})]
|
|
3795
|
-
}), /* @__PURE__ */ n(
|
|
4469
|
+
}), /* @__PURE__ */ n(F, {
|
|
3796
4470
|
title: e.panelTitle,
|
|
3797
4471
|
tone: "strong",
|
|
3798
4472
|
children: [
|
|
3799
|
-
/* @__PURE__ */ t(
|
|
4473
|
+
/* @__PURE__ */ t(H, {
|
|
3800
4474
|
tone: "success",
|
|
3801
4475
|
children: e.toastOk
|
|
3802
4476
|
}),
|
|
3803
|
-
/* @__PURE__ */ t(
|
|
4477
|
+
/* @__PURE__ */ t(H, {
|
|
3804
4478
|
tone: "danger",
|
|
3805
4479
|
children: e.toastErr
|
|
3806
4480
|
}),
|
|
3807
|
-
/* @__PURE__ */ t(
|
|
3808
|
-
/* @__PURE__ */ t(
|
|
4481
|
+
/* @__PURE__ */ t(rt, { label: e.loading }),
|
|
4482
|
+
/* @__PURE__ */ t(rt, {
|
|
3809
4483
|
label: e.loadingErr,
|
|
3810
4484
|
tone: "error"
|
|
3811
4485
|
})
|
|
@@ -3813,14 +4487,14 @@ function rn() {
|
|
|
3813
4487
|
})]
|
|
3814
4488
|
});
|
|
3815
4489
|
}
|
|
3816
|
-
function
|
|
4490
|
+
function In() {
|
|
3817
4491
|
let { cards: e } = $();
|
|
3818
4492
|
return /* @__PURE__ */ n("div", {
|
|
3819
4493
|
className: "game-ui-preview-two-up",
|
|
3820
|
-
children: [/* @__PURE__ */ t(
|
|
4494
|
+
children: [/* @__PURE__ */ t(F, {
|
|
3821
4495
|
title: e.fanTitle,
|
|
3822
4496
|
tone: "strong",
|
|
3823
|
-
children: /* @__PURE__ */ t(
|
|
4497
|
+
children: /* @__PURE__ */ t(Qe, {
|
|
3824
4498
|
label: e.fanLabel,
|
|
3825
4499
|
cards: [
|
|
3826
4500
|
{
|
|
@@ -3843,7 +4517,7 @@ function an() {
|
|
|
3843
4517
|
}
|
|
3844
4518
|
]
|
|
3845
4519
|
})
|
|
3846
|
-
}), /* @__PURE__ */ n(
|
|
4520
|
+
}), /* @__PURE__ */ n(F, {
|
|
3847
4521
|
title: e.assetTitle,
|
|
3848
4522
|
tone: "strong",
|
|
3849
4523
|
children: [/* @__PURE__ */ t("p", {
|
|
@@ -3852,16 +4526,16 @@ function an() {
|
|
|
3852
4526
|
}), /* @__PURE__ */ n("div", {
|
|
3853
4527
|
className: "game-ui-asset-path-grid",
|
|
3854
4528
|
children: [
|
|
3855
|
-
/* @__PURE__ */ t("code", { children:
|
|
3856
|
-
/* @__PURE__ */ t("code", { children:
|
|
3857
|
-
/* @__PURE__ */ t("code", { children:
|
|
3858
|
-
/* @__PURE__ */ t("code", { children:
|
|
4529
|
+
/* @__PURE__ */ t("code", { children: Le.catalog.manifest }),
|
|
4530
|
+
/* @__PURE__ */ t("code", { children: Le.catalog.sourceCatalog }),
|
|
4531
|
+
/* @__PURE__ */ t("code", { children: Le.buttons.primary }),
|
|
4532
|
+
/* @__PURE__ */ t("code", { children: Le.icons.trophy })
|
|
3859
4533
|
]
|
|
3860
4534
|
})]
|
|
3861
4535
|
})]
|
|
3862
4536
|
});
|
|
3863
4537
|
}
|
|
3864
|
-
var
|
|
4538
|
+
var Ln = [
|
|
3865
4539
|
{
|
|
3866
4540
|
id: "terrain",
|
|
3867
4541
|
label: "Terrain",
|
|
@@ -3877,7 +4551,7 @@ var on = [
|
|
|
3877
4551
|
label: "Place",
|
|
3878
4552
|
icon: "gem"
|
|
3879
4553
|
}
|
|
3880
|
-
],
|
|
4554
|
+
], Rn = [
|
|
3881
4555
|
{
|
|
3882
4556
|
id: "raise",
|
|
3883
4557
|
label: "Raise",
|
|
@@ -3903,7 +4577,7 @@ var on = [
|
|
|
3903
4577
|
label: "Paint",
|
|
3904
4578
|
shortcut: "5"
|
|
3905
4579
|
}
|
|
3906
|
-
],
|
|
4580
|
+
], zn = [
|
|
3907
4581
|
{
|
|
3908
4582
|
id: "grass",
|
|
3909
4583
|
label: "Grass",
|
|
@@ -3919,7 +4593,7 @@ var on = [
|
|
|
3919
4593
|
label: "Path",
|
|
3920
4594
|
color: "#b98d5d"
|
|
3921
4595
|
}
|
|
3922
|
-
],
|
|
4596
|
+
], Bn = [{
|
|
3923
4597
|
id: "foundation",
|
|
3924
4598
|
label: "Foundation",
|
|
3925
4599
|
icon: "home",
|
|
@@ -3938,10 +4612,10 @@ var on = [
|
|
|
3938
4612
|
status: "ready"
|
|
3939
4613
|
}]
|
|
3940
4614
|
}];
|
|
3941
|
-
function
|
|
4615
|
+
function Vn() {
|
|
3942
4616
|
return /* @__PURE__ */ n("div", {
|
|
3943
4617
|
className: "game-ui-preview-two-up",
|
|
3944
|
-
children: [/* @__PURE__ */ t(
|
|
4618
|
+
children: [/* @__PURE__ */ t(Kt, {
|
|
3945
4619
|
activeBuildCategoryId: "foundation",
|
|
3946
4620
|
activeMaterialId: "grass",
|
|
3947
4621
|
activeModeId: "terrain",
|
|
@@ -3950,10 +4624,10 @@ function un() {
|
|
|
3950
4624
|
radius: 2.75,
|
|
3951
4625
|
strength: .45
|
|
3952
4626
|
},
|
|
3953
|
-
buildCategories:
|
|
4627
|
+
buildCategories: Bn,
|
|
3954
4628
|
label: "Desktop terrain and build tools",
|
|
3955
|
-
materials:
|
|
3956
|
-
modes:
|
|
4629
|
+
materials: zn,
|
|
4630
|
+
modes: Ln,
|
|
3957
4631
|
selectedBuildItemId: "floor-2x2",
|
|
3958
4632
|
status: {
|
|
3959
4633
|
label: "Ready",
|
|
@@ -3964,12 +4638,12 @@ function un() {
|
|
|
3964
4638
|
progressValue: 68
|
|
3965
4639
|
},
|
|
3966
4640
|
title: "Island tools",
|
|
3967
|
-
tools:
|
|
4641
|
+
tools: Rn,
|
|
3968
4642
|
undoRedo: {
|
|
3969
4643
|
canRedo: !1,
|
|
3970
4644
|
canUndo: !0
|
|
3971
4645
|
}
|
|
3972
|
-
}), /* @__PURE__ */ t(
|
|
4646
|
+
}), /* @__PURE__ */ t(Kt, {
|
|
3973
4647
|
activeBuildCategoryId: "foundation",
|
|
3974
4648
|
activeMaterialId: "path",
|
|
3975
4649
|
activeModeId: "terrain",
|
|
@@ -3978,11 +4652,11 @@ function un() {
|
|
|
3978
4652
|
radius: 1.5,
|
|
3979
4653
|
strength: .3
|
|
3980
4654
|
},
|
|
3981
|
-
buildCategories:
|
|
4655
|
+
buildCategories: Bn,
|
|
3982
4656
|
drawerOpen: !0,
|
|
3983
4657
|
label: "Small mobile terrain drawer",
|
|
3984
|
-
materials:
|
|
3985
|
-
modes:
|
|
4658
|
+
materials: zn,
|
|
4659
|
+
modes: Ln,
|
|
3986
4660
|
selectedBuildItemId: "floor-2x2",
|
|
3987
4661
|
status: {
|
|
3988
4662
|
label: "Blocked",
|
|
@@ -3990,7 +4664,7 @@ function un() {
|
|
|
3990
4664
|
description: "This edit would bury a placed object."
|
|
3991
4665
|
},
|
|
3992
4666
|
title: "Tools",
|
|
3993
|
-
tools:
|
|
4667
|
+
tools: Rn,
|
|
3994
4668
|
undoRedo: {
|
|
3995
4669
|
canRedo: !0,
|
|
3996
4670
|
canUndo: !0
|
|
@@ -3999,12 +4673,12 @@ function un() {
|
|
|
3999
4673
|
})]
|
|
4000
4674
|
});
|
|
4001
4675
|
}
|
|
4002
|
-
function
|
|
4676
|
+
function Hn({ label: e, mode: r }) {
|
|
4003
4677
|
return /* @__PURE__ */ n("div", {
|
|
4004
4678
|
className: "game-ui-construction-preview-card",
|
|
4005
4679
|
"data-preview": r,
|
|
4006
4680
|
children: [
|
|
4007
|
-
/* @__PURE__ */ t(
|
|
4681
|
+
/* @__PURE__ */ t(Z, {
|
|
4008
4682
|
icon: r === "before" ? "home" : "check",
|
|
4009
4683
|
size: "xl"
|
|
4010
4684
|
}),
|
|
@@ -4013,7 +4687,7 @@ function dn({ label: e, mode: r }) {
|
|
|
4013
4687
|
]
|
|
4014
4688
|
});
|
|
4015
4689
|
}
|
|
4016
|
-
var
|
|
4690
|
+
var Un = [
|
|
4017
4691
|
{
|
|
4018
4692
|
id: "preview-deck",
|
|
4019
4693
|
title: "Deck robot crew",
|
|
@@ -4074,7 +4748,7 @@ var fn = [
|
|
|
4074
4748
|
before: {
|
|
4075
4749
|
label: "Before",
|
|
4076
4750
|
caption: "Uneven terrain pad.",
|
|
4077
|
-
content: /* @__PURE__ */ t(
|
|
4751
|
+
content: /* @__PURE__ */ t(Hn, {
|
|
4078
4752
|
label: "Rough pad",
|
|
4079
4753
|
mode: "before"
|
|
4080
4754
|
})
|
|
@@ -4082,7 +4756,7 @@ var fn = [
|
|
|
4082
4756
|
after: {
|
|
4083
4757
|
label: "After",
|
|
4084
4758
|
caption: "Flattened foundation pad with safe clearance.",
|
|
4085
|
-
content: /* @__PURE__ */ t(
|
|
4759
|
+
content: /* @__PURE__ */ t(Hn, {
|
|
4086
4760
|
label: "Foundation ready",
|
|
4087
4761
|
mode: "after"
|
|
4088
4762
|
})
|
|
@@ -4111,19 +4785,19 @@ var fn = [
|
|
|
4111
4785
|
}]
|
|
4112
4786
|
}
|
|
4113
4787
|
];
|
|
4114
|
-
function
|
|
4788
|
+
function Wn() {
|
|
4115
4789
|
return /* @__PURE__ */ n("div", {
|
|
4116
4790
|
className: "game-ui-preview-two-up",
|
|
4117
|
-
children: [/* @__PURE__ */ t(
|
|
4118
|
-
jobs:
|
|
4791
|
+
children: [/* @__PURE__ */ t(pn, {
|
|
4792
|
+
jobs: Un,
|
|
4119
4793
|
label: "AI contractor jobs",
|
|
4120
4794
|
selectedJobId: "review-house-pad",
|
|
4121
4795
|
subtitle: "Official contractor UI covers drafts, previews, robot work, validation, review, and local-only provider boundaries.",
|
|
4122
4796
|
title: "AI contractor",
|
|
4123
4797
|
variant: "desktop"
|
|
4124
|
-
}), /* @__PURE__ */ t(
|
|
4798
|
+
}), /* @__PURE__ */ t(pn, {
|
|
4125
4799
|
drawerOpen: !0,
|
|
4126
|
-
jobs:
|
|
4800
|
+
jobs: Un,
|
|
4127
4801
|
label: "Small mobile contractor jobs",
|
|
4128
4802
|
selectedJobId: "blocked-fence",
|
|
4129
4803
|
title: "Contractor",
|
|
@@ -4131,10 +4805,10 @@ function pn() {
|
|
|
4131
4805
|
})]
|
|
4132
4806
|
});
|
|
4133
4807
|
}
|
|
4134
|
-
function
|
|
4135
|
-
return /* @__PURE__ */ t(
|
|
4808
|
+
function Gn() {
|
|
4809
|
+
return /* @__PURE__ */ t(gt, {
|
|
4136
4810
|
title: "OwnMySpace island editor preview",
|
|
4137
|
-
hud: /* @__PURE__ */ t(
|
|
4811
|
+
hud: /* @__PURE__ */ t(vt, {
|
|
4138
4812
|
label: "Island facts",
|
|
4139
4813
|
facts: [
|
|
4140
4814
|
{
|
|
@@ -4158,11 +4832,11 @@ function mn() {
|
|
|
4158
4832
|
}
|
|
4159
4833
|
]
|
|
4160
4834
|
}),
|
|
4161
|
-
movementPad: /* @__PURE__ */ t(
|
|
4835
|
+
movementPad: /* @__PURE__ */ t(Ct, {
|
|
4162
4836
|
helpText: "WASD or arrows",
|
|
4163
4837
|
label: "Move avatar"
|
|
4164
4838
|
}),
|
|
4165
|
-
assetLibrary: /* @__PURE__ */ t(
|
|
4839
|
+
assetLibrary: /* @__PURE__ */ t(Ot, {
|
|
4166
4840
|
label: "Placeable assets",
|
|
4167
4841
|
title: "Assets",
|
|
4168
4842
|
subtitle: "Starter, generated, and imported assets stay visibly distinct but share one placement path.",
|
|
@@ -4209,7 +4883,7 @@ function mn() {
|
|
|
4209
4883
|
}
|
|
4210
4884
|
]
|
|
4211
4885
|
}),
|
|
4212
|
-
bottomBar: /* @__PURE__ */ t(
|
|
4886
|
+
bottomBar: /* @__PURE__ */ t(kt, {
|
|
4213
4887
|
title: "Placement",
|
|
4214
4888
|
selectedTitle: "Manual chair",
|
|
4215
4889
|
placedObjects: 3,
|
|
@@ -4245,7 +4919,7 @@ function mn() {
|
|
|
4245
4919
|
})
|
|
4246
4920
|
});
|
|
4247
4921
|
}
|
|
4248
|
-
var
|
|
4922
|
+
var Kn = [{
|
|
4249
4923
|
id: "starter",
|
|
4250
4924
|
label: "Starter pieces",
|
|
4251
4925
|
source: "starter",
|
|
@@ -4276,7 +4950,7 @@ var hn = [{
|
|
|
4276
4950
|
}
|
|
4277
4951
|
]
|
|
4278
4952
|
}];
|
|
4279
|
-
function
|
|
4953
|
+
function qn() {
|
|
4280
4954
|
return /* @__PURE__ */ t("div", {
|
|
4281
4955
|
className: "game-ui-asset-compression-repro",
|
|
4282
4956
|
"aria-label": "Asset card compression repro",
|
|
@@ -4300,9 +4974,9 @@ function gn() {
|
|
|
4300
4974
|
className: "game-ui-asset-compression-repro-surface",
|
|
4301
4975
|
"data-repro-surface": e.id,
|
|
4302
4976
|
style: { "--repro-width": e.width },
|
|
4303
|
-
children: [/* @__PURE__ */ t(
|
|
4977
|
+
children: [/* @__PURE__ */ t(X, { children: e.label }), /* @__PURE__ */ t(Ot, {
|
|
4304
4978
|
density: "dense",
|
|
4305
|
-
groups:
|
|
4979
|
+
groups: Kn,
|
|
4306
4980
|
label: `${e.label} assets`,
|
|
4307
4981
|
selectedAssetId: "asset-repro-chair",
|
|
4308
4982
|
title: "Build"
|
|
@@ -4310,13 +4984,13 @@ function gn() {
|
|
|
4310
4984
|
}, e.id))
|
|
4311
4985
|
});
|
|
4312
4986
|
}
|
|
4313
|
-
function
|
|
4987
|
+
function Jn() {
|
|
4314
4988
|
let { firstSession: e } = $();
|
|
4315
4989
|
return /* @__PURE__ */ n("div", {
|
|
4316
4990
|
className: "game-ui-first-session-preview",
|
|
4317
4991
|
children: [/* @__PURE__ */ t("div", {
|
|
4318
4992
|
className: "game-ui-first-session-world",
|
|
4319
|
-
children: /* @__PURE__ */ t(
|
|
4993
|
+
children: /* @__PURE__ */ t(ot, {
|
|
4320
4994
|
authenticated: !0,
|
|
4321
4995
|
batteryCount: 5,
|
|
4322
4996
|
dailyStreak: 3,
|
|
@@ -4350,7 +5024,7 @@ function _n() {
|
|
|
4350
5024
|
})
|
|
4351
5025
|
}), /* @__PURE__ */ t("div", {
|
|
4352
5026
|
className: "game-ui-first-session-modal-slot",
|
|
4353
|
-
children: /* @__PURE__ */ t(
|
|
5027
|
+
children: /* @__PURE__ */ t(st, {
|
|
4354
5028
|
open: !0,
|
|
4355
5029
|
onDismiss: () => void 0,
|
|
4356
5030
|
labels: {
|
|
@@ -4378,89 +5052,89 @@ function _n() {
|
|
|
4378
5052
|
})]
|
|
4379
5053
|
});
|
|
4380
5054
|
}
|
|
4381
|
-
function
|
|
5055
|
+
function Yn() {
|
|
4382
5056
|
let { responsive: e } = $();
|
|
4383
5057
|
return /* @__PURE__ */ n("div", {
|
|
4384
5058
|
className: "game-ui-proof-frames",
|
|
4385
5059
|
children: [/* @__PURE__ */ n("article", {
|
|
4386
5060
|
className: "game-ui-proof-frame is-desktop",
|
|
4387
|
-
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(
|
|
5061
|
+
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(X, { children: e.desktop }), /* @__PURE__ */ t("strong", { children: "1440×900" })] }), /* @__PURE__ */ t(Mn, {})]
|
|
4388
5062
|
}), /* @__PURE__ */ n("article", {
|
|
4389
5063
|
className: "game-ui-proof-frame is-mobile-landscape",
|
|
4390
|
-
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(
|
|
5064
|
+
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(X, { children: e.mobileLandscape }), /* @__PURE__ */ t("strong", { children: "844×390" })] }), /* @__PURE__ */ t(Mn, {})]
|
|
4391
5065
|
})]
|
|
4392
5066
|
});
|
|
4393
5067
|
}
|
|
4394
|
-
function
|
|
5068
|
+
function Xn() {
|
|
4395
5069
|
let { forms: e } = $();
|
|
4396
5070
|
return /* @__PURE__ */ n("div", {
|
|
4397
5071
|
className: "game-ui-preview-two-up",
|
|
4398
|
-
children: [/* @__PURE__ */ n(
|
|
5072
|
+
children: [/* @__PURE__ */ n(F, {
|
|
4399
5073
|
title: e.formsTitle,
|
|
4400
5074
|
tone: "strong",
|
|
4401
5075
|
children: [
|
|
4402
|
-
/* @__PURE__ */ t(
|
|
5076
|
+
/* @__PURE__ */ t(ut, {
|
|
4403
5077
|
hint: e.roomCodeHint,
|
|
4404
5078
|
label: e.roomCodeLabel,
|
|
4405
|
-
children: /* @__PURE__ */ t(
|
|
5079
|
+
children: /* @__PURE__ */ t(ct, { placeholder: e.roomCodePlaceholder })
|
|
4406
5080
|
}),
|
|
4407
|
-
/* @__PURE__ */ t(
|
|
5081
|
+
/* @__PURE__ */ t(ut, {
|
|
4408
5082
|
label: e.nameLabel,
|
|
4409
5083
|
required: !0,
|
|
4410
|
-
children: /* @__PURE__ */ t(
|
|
5084
|
+
children: /* @__PURE__ */ t(ct, { placeholder: e.namePlaceholder })
|
|
4411
5085
|
}),
|
|
4412
|
-
/* @__PURE__ */ t(
|
|
5086
|
+
/* @__PURE__ */ t(ut, {
|
|
4413
5087
|
error: e.readError,
|
|
4414
5088
|
label: e.readLabel,
|
|
4415
|
-
children: /* @__PURE__ */ t(
|
|
5089
|
+
children: /* @__PURE__ */ t(lt, {
|
|
4416
5090
|
invalid: !0,
|
|
4417
5091
|
placeholder: e.readPlaceholder
|
|
4418
5092
|
})
|
|
4419
5093
|
}),
|
|
4420
|
-
/* @__PURE__ */ t(
|
|
5094
|
+
/* @__PURE__ */ t(dt, {
|
|
4421
5095
|
defaultChecked: !0,
|
|
4422
5096
|
label: e.rememberLabel
|
|
4423
5097
|
})
|
|
4424
5098
|
]
|
|
4425
|
-
}), /* @__PURE__ */ n(
|
|
5099
|
+
}), /* @__PURE__ */ n(F, {
|
|
4426
5100
|
title: e.displayTitle,
|
|
4427
5101
|
tone: "strong",
|
|
4428
5102
|
children: [
|
|
4429
5103
|
/* @__PURE__ */ n("div", {
|
|
4430
5104
|
className: "game-ui-component-row",
|
|
4431
5105
|
children: [
|
|
4432
|
-
/* @__PURE__ */ t(
|
|
5106
|
+
/* @__PURE__ */ t(pt, {
|
|
4433
5107
|
name: "Mika Ono",
|
|
4434
5108
|
status: "online"
|
|
4435
5109
|
}),
|
|
4436
|
-
/* @__PURE__ */ t(
|
|
5110
|
+
/* @__PURE__ */ t(pt, {
|
|
4437
5111
|
name: "River",
|
|
4438
5112
|
size: "lg",
|
|
4439
5113
|
status: "busy"
|
|
4440
5114
|
}),
|
|
4441
|
-
/* @__PURE__ */ t(
|
|
5115
|
+
/* @__PURE__ */ t(pt, {
|
|
4442
5116
|
name: "Noa",
|
|
4443
5117
|
status: "away"
|
|
4444
5118
|
}),
|
|
4445
|
-
/* @__PURE__ */ t(
|
|
5119
|
+
/* @__PURE__ */ t(pt, {
|
|
4446
5120
|
name: e.guestName,
|
|
4447
5121
|
size: "sm"
|
|
4448
5122
|
})
|
|
4449
5123
|
]
|
|
4450
5124
|
}),
|
|
4451
|
-
/* @__PURE__ */ t(
|
|
5125
|
+
/* @__PURE__ */ t(mt, {
|
|
4452
5126
|
label: e.revealLabel,
|
|
4453
5127
|
showValue: !0,
|
|
4454
5128
|
value: 64
|
|
4455
5129
|
}),
|
|
4456
|
-
/* @__PURE__ */ t(
|
|
5130
|
+
/* @__PURE__ */ t(mt, {
|
|
4457
5131
|
label: e.batteryLabel,
|
|
4458
5132
|
max: 20,
|
|
4459
5133
|
showValue: !0,
|
|
4460
5134
|
tone: "success",
|
|
4461
5135
|
value: 14
|
|
4462
5136
|
}),
|
|
4463
|
-
/* @__PURE__ */ t(
|
|
5137
|
+
/* @__PURE__ */ t(ht, {
|
|
4464
5138
|
action: /* @__PURE__ */ t(b, {
|
|
4465
5139
|
variant: "primary",
|
|
4466
5140
|
children: e.emptyCta
|
|
@@ -4473,13 +5147,13 @@ function yn() {
|
|
|
4473
5147
|
})]
|
|
4474
5148
|
});
|
|
4475
5149
|
}
|
|
4476
|
-
var
|
|
4477
|
-
function
|
|
5150
|
+
var Zn = Ae.filter((e) => Pe(e).includes("game")), Qn = Ae.filter((e) => Pe(e).includes("line"));
|
|
5151
|
+
function $n({ names: e, style: r }) {
|
|
4478
5152
|
return /* @__PURE__ */ t("div", {
|
|
4479
5153
|
className: "game-ui-icon-grid",
|
|
4480
5154
|
children: e.map((e) => /* @__PURE__ */ n("figure", {
|
|
4481
5155
|
className: "game-ui-icon-cell",
|
|
4482
|
-
children: [/* @__PURE__ */ t(
|
|
5156
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
4483
5157
|
icon: e,
|
|
4484
5158
|
size: "lg",
|
|
4485
5159
|
style: r
|
|
@@ -4487,10 +5161,10 @@ function Sn({ names: e, style: r }) {
|
|
|
4487
5161
|
}, `${r}-${e}`))
|
|
4488
5162
|
});
|
|
4489
5163
|
}
|
|
4490
|
-
function
|
|
5164
|
+
function er() {
|
|
4491
5165
|
return /* @__PURE__ */ t("div", {
|
|
4492
5166
|
className: "game-ui-icon-grid",
|
|
4493
|
-
children:
|
|
5167
|
+
children: Ie.map((e) => /* @__PURE__ */ n("figure", {
|
|
4494
5168
|
className: "game-ui-icon-cell",
|
|
4495
5169
|
children: [/* @__PURE__ */ t("span", {
|
|
4496
5170
|
className: "game-ui-asset-icon",
|
|
@@ -4499,13 +5173,13 @@ function Cn() {
|
|
|
4499
5173
|
"aria-hidden": !0,
|
|
4500
5174
|
children: /* @__PURE__ */ t("img", {
|
|
4501
5175
|
alt: "",
|
|
4502
|
-
src:
|
|
5176
|
+
src: Fe[e]
|
|
4503
5177
|
})
|
|
4504
5178
|
}), /* @__PURE__ */ t("figcaption", { children: e })]
|
|
4505
5179
|
}, `sprite-${e}`))
|
|
4506
5180
|
});
|
|
4507
5181
|
}
|
|
4508
|
-
function
|
|
5182
|
+
function tr() {
|
|
4509
5183
|
let { gallery: e } = $();
|
|
4510
5184
|
return /* @__PURE__ */ n("div", {
|
|
4511
5185
|
className: "game-ui-icon-gallery",
|
|
@@ -4514,15 +5188,15 @@ function wn() {
|
|
|
4514
5188
|
className: "game-ui-icon-family",
|
|
4515
5189
|
children: [/* @__PURE__ */ n("header", {
|
|
4516
5190
|
className: "game-ui-icon-family-head",
|
|
4517
|
-
children: [/* @__PURE__ */ t(
|
|
5191
|
+
children: [/* @__PURE__ */ t(X, {
|
|
4518
5192
|
tone: "success",
|
|
4519
5193
|
children: e.gameLabel
|
|
4520
5194
|
}), /* @__PURE__ */ t("p", {
|
|
4521
5195
|
className: "game-ui-small-copy",
|
|
4522
5196
|
children: e.gameHint
|
|
4523
5197
|
})]
|
|
4524
|
-
}), /* @__PURE__ */ t(
|
|
4525
|
-
names:
|
|
5198
|
+
}), /* @__PURE__ */ t($n, {
|
|
5199
|
+
names: Zn,
|
|
4526
5200
|
style: "game"
|
|
4527
5201
|
})]
|
|
4528
5202
|
}),
|
|
@@ -4530,12 +5204,12 @@ function wn() {
|
|
|
4530
5204
|
className: "game-ui-icon-family",
|
|
4531
5205
|
children: [/* @__PURE__ */ n("header", {
|
|
4532
5206
|
className: "game-ui-icon-family-head",
|
|
4533
|
-
children: [/* @__PURE__ */ t(
|
|
5207
|
+
children: [/* @__PURE__ */ t(X, { children: e.lineLabel }), /* @__PURE__ */ t("p", {
|
|
4534
5208
|
className: "game-ui-small-copy",
|
|
4535
5209
|
children: e.lineHint
|
|
4536
5210
|
})]
|
|
4537
|
-
}), /* @__PURE__ */ t(
|
|
4538
|
-
names:
|
|
5211
|
+
}), /* @__PURE__ */ t($n, {
|
|
5212
|
+
names: Qn,
|
|
4539
5213
|
style: "line"
|
|
4540
5214
|
})]
|
|
4541
5215
|
}),
|
|
@@ -4543,23 +5217,23 @@ function wn() {
|
|
|
4543
5217
|
className: "game-ui-icon-family",
|
|
4544
5218
|
children: [/* @__PURE__ */ n("header", {
|
|
4545
5219
|
className: "game-ui-icon-family-head",
|
|
4546
|
-
children: [/* @__PURE__ */ t(
|
|
5220
|
+
children: [/* @__PURE__ */ t(X, {
|
|
4547
5221
|
tone: "warning",
|
|
4548
5222
|
children: e.spriteLabel
|
|
4549
5223
|
}), /* @__PURE__ */ t("p", {
|
|
4550
5224
|
className: "game-ui-small-copy",
|
|
4551
5225
|
children: e.spriteHint
|
|
4552
5226
|
})]
|
|
4553
|
-
}), /* @__PURE__ */ t(
|
|
5227
|
+
}), /* @__PURE__ */ t(er, {})]
|
|
4554
5228
|
})
|
|
4555
5229
|
]
|
|
4556
5230
|
});
|
|
4557
5231
|
}
|
|
4558
|
-
function
|
|
4559
|
-
let [i, a] = d("en"), o =
|
|
5232
|
+
function nr({ title: e, body: r }) {
|
|
5233
|
+
let [i, a] = d("en"), o = Tn[i], s = e && i === "en" ? e : o.heroTitle, l = r && i === "en" ? r : o.heroBody;
|
|
4560
5234
|
return c(() => (document.documentElement.dataset.gameUiPreview = "clay", () => {
|
|
4561
5235
|
delete document.documentElement.dataset.gameUiPreview;
|
|
4562
|
-
}), []), /* @__PURE__ */ t(
|
|
5236
|
+
}), []), /* @__PURE__ */ t(En.Provider, {
|
|
4563
5237
|
value: o,
|
|
4564
5238
|
children: /* @__PURE__ */ n("main", {
|
|
4565
5239
|
"aria-label": "Swimmer UI Kit clay preview",
|
|
@@ -4568,11 +5242,11 @@ function Tn({ title: e, body: r }) {
|
|
|
4568
5242
|
/* @__PURE__ */ n("header", {
|
|
4569
5243
|
className: "game-ui-preview-hero",
|
|
4570
5244
|
children: [
|
|
4571
|
-
/* @__PURE__ */ t(
|
|
5245
|
+
/* @__PURE__ */ t(X, {
|
|
4572
5246
|
tone: "ai",
|
|
4573
5247
|
children: "@pieai/swimmer-ui-kit"
|
|
4574
5248
|
}),
|
|
4575
|
-
/* @__PURE__ */ t(
|
|
5249
|
+
/* @__PURE__ */ t(nt, {
|
|
4576
5250
|
currentLabel: o.triggerLabel,
|
|
4577
5251
|
label: o.langMenuLabel,
|
|
4578
5252
|
onSelect: (e) => a(e),
|
|
@@ -4599,10 +5273,10 @@ function Tn({ title: e, body: r }) {
|
|
|
4599
5273
|
id: "game-ui-preview-token-title",
|
|
4600
5274
|
children: o.sections.tokens
|
|
4601
5275
|
}),
|
|
4602
|
-
/* @__PURE__ */ t(
|
|
5276
|
+
/* @__PURE__ */ t(kn, {}),
|
|
4603
5277
|
/* @__PURE__ */ t("div", {
|
|
4604
5278
|
className: "game-ui-token-ledger",
|
|
4605
|
-
children:
|
|
5279
|
+
children: Dn.map((e) => /* @__PURE__ */ t(On, {
|
|
4606
5280
|
id: e.id,
|
|
4607
5281
|
label: o.tokenGroups[e.id] ?? e.id,
|
|
4608
5282
|
tokens: e.tokens
|
|
@@ -4622,7 +5296,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4622
5296
|
className: "game-ui-small-copy",
|
|
4623
5297
|
children: o.iconsIntro
|
|
4624
5298
|
}),
|
|
4625
|
-
/* @__PURE__ */ t(
|
|
5299
|
+
/* @__PURE__ */ t(tr, {})
|
|
4626
5300
|
]
|
|
4627
5301
|
}),
|
|
4628
5302
|
/* @__PURE__ */ n("section", {
|
|
@@ -4631,7 +5305,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4631
5305
|
children: [/* @__PURE__ */ t("h2", {
|
|
4632
5306
|
id: "game-ui-preview-type-title",
|
|
4633
5307
|
children: o.sections.typography
|
|
4634
|
-
}), /* @__PURE__ */ t(
|
|
5308
|
+
}), /* @__PURE__ */ t(An, {})]
|
|
4635
5309
|
}),
|
|
4636
5310
|
/* @__PURE__ */ n("section", {
|
|
4637
5311
|
"aria-labelledby": "game-ui-preview-components-title",
|
|
@@ -4641,11 +5315,11 @@ function Tn({ title: e, body: r }) {
|
|
|
4641
5315
|
id: "game-ui-preview-components-title",
|
|
4642
5316
|
children: o.sections.components
|
|
4643
5317
|
}),
|
|
4644
|
-
/* @__PURE__ */ t(
|
|
4645
|
-
/* @__PURE__ */ t(
|
|
4646
|
-
/* @__PURE__ */ t(
|
|
4647
|
-
/* @__PURE__ */ t(
|
|
4648
|
-
/* @__PURE__ */ t(
|
|
5318
|
+
/* @__PURE__ */ t(jn, {}),
|
|
5319
|
+
/* @__PURE__ */ t(Mn, {}),
|
|
5320
|
+
/* @__PURE__ */ t(Fn, {}),
|
|
5321
|
+
/* @__PURE__ */ t(In, {}),
|
|
5322
|
+
/* @__PURE__ */ t(ve, {
|
|
4649
5323
|
entries: o.history,
|
|
4650
5324
|
label: o.historyLabel
|
|
4651
5325
|
})
|
|
@@ -4657,7 +5331,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4657
5331
|
children: [/* @__PURE__ */ t("h2", {
|
|
4658
5332
|
id: "game-ui-preview-forms-title",
|
|
4659
5333
|
children: o.sections.forms
|
|
4660
|
-
}), /* @__PURE__ */ t(
|
|
5334
|
+
}), /* @__PURE__ */ t(Xn, {})]
|
|
4661
5335
|
}),
|
|
4662
5336
|
/* @__PURE__ */ n("section", {
|
|
4663
5337
|
"aria-labelledby": "game-ui-preview-overlay-glass-title",
|
|
@@ -4671,7 +5345,22 @@ function Tn({ title: e, body: r }) {
|
|
|
4671
5345
|
className: "game-ui-small-copy",
|
|
4672
5346
|
children: "Official HUD-on-scene tone: dark translucent glass, thin light border, no clay cast shadow, compact density. Use on any container that wraps scene-overlay chrome (3D tavern, cinematic stage). Nest inside light or night theme."
|
|
4673
5347
|
}),
|
|
4674
|
-
/* @__PURE__ */ t(
|
|
5348
|
+
/* @__PURE__ */ t(Nn, {})
|
|
5349
|
+
]
|
|
5350
|
+
}),
|
|
5351
|
+
/* @__PURE__ */ n("section", {
|
|
5352
|
+
"aria-labelledby": "game-ui-preview-liquid-metal-title",
|
|
5353
|
+
className: "game-ui-preview-section",
|
|
5354
|
+
children: [
|
|
5355
|
+
/* @__PURE__ */ t("h2", {
|
|
5356
|
+
id: "game-ui-preview-liquid-metal-title",
|
|
5357
|
+
children: o.sections.liquidMetal
|
|
5358
|
+
}),
|
|
5359
|
+
/* @__PURE__ */ t("p", {
|
|
5360
|
+
className: "game-ui-small-copy",
|
|
5361
|
+
children: o.liquidMetal.body
|
|
5362
|
+
}),
|
|
5363
|
+
/* @__PURE__ */ t(Pn, {})
|
|
4675
5364
|
]
|
|
4676
5365
|
}),
|
|
4677
5366
|
/* @__PURE__ */ n("section", {
|
|
@@ -4680,7 +5369,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4680
5369
|
children: [/* @__PURE__ */ t("h2", {
|
|
4681
5370
|
id: "game-ui-preview-ownmyspace-title",
|
|
4682
5371
|
children: "OwnMySpace game surface pack"
|
|
4683
|
-
}), /* @__PURE__ */ t(
|
|
5372
|
+
}), /* @__PURE__ */ t(Gn, {})]
|
|
4684
5373
|
}),
|
|
4685
5374
|
/* @__PURE__ */ n("section", {
|
|
4686
5375
|
"aria-labelledby": "game-ui-preview-terrain-build-title",
|
|
@@ -4694,7 +5383,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4694
5383
|
className: "game-ui-small-copy",
|
|
4695
5384
|
children: "Official terrain controls cover mode, brush, material, undo/redo, build library, status, progress, and compact mobile drawer surfaces."
|
|
4696
5385
|
}),
|
|
4697
|
-
/* @__PURE__ */ t(
|
|
5386
|
+
/* @__PURE__ */ t(Vn, {})
|
|
4698
5387
|
]
|
|
4699
5388
|
}),
|
|
4700
5389
|
/* @__PURE__ */ n("section", {
|
|
@@ -4709,7 +5398,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4709
5398
|
className: "game-ui-small-copy",
|
|
4710
5399
|
children: "Official construction surfaces cover job queue states, before/after review, robot crew status, validation warnings, approval actions, and local-only provider badges."
|
|
4711
5400
|
}),
|
|
4712
|
-
/* @__PURE__ */ t(
|
|
5401
|
+
/* @__PURE__ */ t(Wn, {})
|
|
4713
5402
|
]
|
|
4714
5403
|
}),
|
|
4715
5404
|
/* @__PURE__ */ n("section", {
|
|
@@ -4724,7 +5413,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4724
5413
|
className: "game-ui-small-copy",
|
|
4725
5414
|
children: "Official asset cards must stay visually complete when a game shell uses dense, narrow, or rail-style inventory slots."
|
|
4726
5415
|
}),
|
|
4727
|
-
/* @__PURE__ */ t(
|
|
5416
|
+
/* @__PURE__ */ t(qn, {})
|
|
4728
5417
|
]
|
|
4729
5418
|
}),
|
|
4730
5419
|
/* @__PURE__ */ n("section", {
|
|
@@ -4733,7 +5422,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4733
5422
|
children: [/* @__PURE__ */ t("h2", {
|
|
4734
5423
|
id: "game-ui-preview-first-session-title",
|
|
4735
5424
|
children: o.sections.firstSession
|
|
4736
|
-
}), /* @__PURE__ */ t(
|
|
5425
|
+
}), /* @__PURE__ */ t(Jn, {})]
|
|
4737
5426
|
}),
|
|
4738
5427
|
/* @__PURE__ */ n("section", {
|
|
4739
5428
|
"aria-labelledby": "game-ui-preview-orientation-title",
|
|
@@ -4741,7 +5430,7 @@ function Tn({ title: e, body: r }) {
|
|
|
4741
5430
|
children: [/* @__PURE__ */ t("h2", {
|
|
4742
5431
|
id: "game-ui-preview-orientation-title",
|
|
4743
5432
|
children: o.sections.orientation
|
|
4744
|
-
}), /* @__PURE__ */ t(
|
|
5433
|
+
}), /* @__PURE__ */ t(tt, {
|
|
4745
5434
|
badgeLabel: o.orientation.badge,
|
|
4746
5435
|
body: o.orientation.body,
|
|
4747
5436
|
cta: o.orientation.cta,
|
|
@@ -4756,11 +5445,11 @@ function Tn({ title: e, body: r }) {
|
|
|
4756
5445
|
children: [/* @__PURE__ */ t("h2", {
|
|
4757
5446
|
id: "game-ui-preview-responsive-title",
|
|
4758
5447
|
children: o.sections.responsive
|
|
4759
|
-
}), /* @__PURE__ */ t(
|
|
5448
|
+
}), /* @__PURE__ */ t(Yn, {})]
|
|
4760
5449
|
})
|
|
4761
5450
|
]
|
|
4762
5451
|
})
|
|
4763
5452
|
});
|
|
4764
5453
|
}
|
|
4765
5454
|
//#endregion
|
|
4766
|
-
export {
|
|
5455
|
+
export { Le as CLAY_ASSETS, Oe as CLAY_ASSET_BASE_PATH, Ee as CLAY_ASSET_SIZE_TOKENS, W as CLAY_COLOR_TOKENS, we as CLAY_ELEVATION_TOKENS, Fe as CLAY_GAME_SPRITES, Ie as CLAY_GAME_SPRITE_NAMES, Ae as CLAY_ICON_NAMES, ke as CLAY_ICON_VARIANTS, J as CLAY_LAYER_TOKENS, be as CLAY_LIQUID_METAL_TOKENS, be as GAME_UI_LIQUID_METAL_TOKENS, q as CLAY_MOTION_TOKENS, xe as CLAY_OVERLAY_GLASS_TOKENS, xe as GAME_UI_OVERLAY_GLASS_TOKENS, Ce as CLAY_RADIUS_TOKENS, G as CLAY_SEMANTIC_TOKENS, Se as CLAY_SPACE_TOKENS, Te as CLAY_TARGET_TOKENS, K as CLAY_TYPE_TOKENS, De as CLAY_UI_TOKENS, x as DEFAULT_LIQUID_METAL_CONTEXT_BUDGET, ot as FirstSessionHud, st as FirstSessionOnboarding, Q as GAME_UI_OVERLAY, xn as GAME_UI_PREVIEW_MESSAGES, Cn as GAME_UI_TARGETS, wn as GAME_UI_THEME_CONTRACT, Sn as GAME_UI_TOKENS, bt as GameActionGrid, Dt as GameAssetCard, Z as GameAssetIcon, Ot as GameAssetLibrary, pt as GameAvatar, X as GameBadge, un as GameBeforeAfterToggle, zt as GameBrushControls, Ht as GameBuildLibrary, b as GameButton, ge as GameCallout, Qe as GameCardFan, dt as GameCheckbox, gn as GameCollapsiblePanel, Ut as GameCompactGameDrawer, fn as GameCompactJobDrawer, cn as GameConstructionApprovalBar, dn as GameConstructionJobCard, sn as GameConstructionProgress, pn as GameContractorPanel, _e as GameDialog, ht as GameEmptyState, vt as GameFactList, ut as GameField, ve as GameHistoryPanel, Ze as GameHud, P as GameHudActions, I as GameIconButton, ct as GameInput, nt as GameLanguageMenu, rt as GameLoadingState, Bt as GameMaterialSwatches, bn as GameModal, Ct as GameMovementPad, At as GameObjectToolbar, tt as GameOrientationGate, F as GamePanel, kt as GamePlacementToolbar, mt as GameProgress, U as GamePrompt, V as GameRadialMenu, ln as GameRobotCrewStatus, _t as GameSceneHudLayout, R as GameSegmentedControl, gt as GameShell, z as GameSlider, $e as GameStageTile, yt as GameStatList, L as GameTabs, Kt as GameTerrainBuildToolbox, Lt as GameTerrainModeControl, Rt as GameTerrainToolStrip, lt as GameTextArea, H as GameToast, B as GameToggle, ye as GameTooltip, nr as GameUiPreview, Vt as GameUndoRedoActions, yn as GameWindowPanel, N as LiquidMetalButton, Je as acknowledgeClayPlaceholders, Ge as getClayAssetBasePath, Ue as getClayAssetMode, it as getClayCatalogPaths, Ye as getClayIconPath, Pe as getClayIconStyles, Xe as getClaySourceAssetPath, ee as getLiquidMetalContextBudget, y as playGameInteractionSound, v as playGameInteractionSoundForContext, We as setClayAssetBasePath, He as setClayAssetMode, w as setLiquidMetalContextBudget };
|