@kuncat/avoidant 0.2.3 → 0.2.4

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.
Files changed (87) hide show
  1. package/dist/components/AvoidantGame.svelte +1 -2
  2. package/dist/components/MapControls.svelte +1 -1
  3. package/dist/components/board.svelte +7 -34
  4. package/dist/components/label-connectors.d.ts +5 -2
  5. package/dist/components/label-connectors.js +47 -37
  6. package/dist/components/map-camera.js +1 -1
  7. package/dist/paraglide/messages/_index.d.ts +8 -8
  8. package/dist/paraglide/messages/_index.js +9 -9
  9. package/dist/paraglide/messages/action_back.js +2 -2
  10. package/dist/paraglide/messages/action_copy.js +2 -2
  11. package/dist/paraglide/messages/action_exit.js +2 -2
  12. package/dist/paraglide/messages/action_invite.js +2 -2
  13. package/dist/paraglide/messages/action_join.js +2 -2
  14. package/dist/paraglide/messages/action_join_game.js +2 -2
  15. package/dist/paraglide/messages/action_new_game.js +2 -2
  16. package/dist/paraglide/messages/action_random.js +2 -2
  17. package/dist/paraglide/messages/action_start.js +2 -2
  18. package/dist/paraglide/messages/aria_close_invitation.js +2 -2
  19. package/dist/paraglide/messages/aria_score_summary.js +2 -2
  20. package/dist/paraglide/messages/cells_count.js +2 -2
  21. package/dist/paraglide/messages/cells_per_face.js +2 -2
  22. package/dist/paraglide/messages/default_player_name.js +2 -2
  23. package/dist/paraglide/messages/error_join_connect_failed.js +2 -2
  24. package/dist/paraglide/messages/error_join_failed.js +2 -2
  25. package/dist/paraglide/messages/error_join_ticket_invalid.js +2 -2
  26. package/dist/paraglide/messages/error_join_ticket_required.js +2 -2
  27. package/dist/paraglide/messages/faces_count.js +2 -2
  28. package/dist/paraglide/messages/field_cell_density.js +2 -2
  29. package/dist/paraglide/messages/field_invitation_url.js +2 -2
  30. package/dist/paraglide/messages/field_map_shape.js +2 -2
  31. package/dist/paraglide/messages/field_map_size.js +2 -2
  32. package/dist/paraglide/messages/field_player_name.js +2 -2
  33. package/dist/paraglide/messages/field_radius.js +2 -2
  34. package/dist/paraglide/messages/field_radius_x.js +2 -2
  35. package/dist/paraglide/messages/field_radius_y.js +2 -2
  36. package/dist/paraglide/messages/field_radius_z.js +2 -2
  37. package/dist/paraglide/messages/field_relay_servers.js +2 -2
  38. package/dist/paraglide/messages/field_seed.js +2 -2
  39. package/dist/paraglide/messages/field_size.js +2 -2
  40. package/dist/paraglide/messages/field_spikiness.js +2 -2
  41. package/dist/paraglide/messages/field_subdivisions.js +2 -2
  42. package/dist/paraglide/messages/field_surface_detail.js +2 -2
  43. package/dist/paraglide/messages/field_ticket_or_invitation_url.js +2 -2
  44. package/dist/paraglide/messages/field_tutorial_mode.js +2 -2
  45. package/dist/paraglide/messages/field_void_fraction.js +2 -2
  46. package/dist/paraglide/messages/label_advanced_settings.js +2 -2
  47. package/dist/paraglide/messages/label_players.js +2 -2
  48. package/dist/paraglide/messages/label_safe_cells_explored.js +2 -2
  49. package/dist/paraglide/messages/label_safe_cells_remaining.js +2 -2
  50. package/dist/paraglide/messages/label_score.js +2 -2
  51. package/dist/paraglide/messages/label_streak.js +2 -2
  52. package/dist/paraglide/messages/label_voids_discovered.js +2 -2
  53. package/dist/paraglide/messages/package.json +4 -0
  54. package/dist/paraglide/messages/preset_custom.js +2 -2
  55. package/dist/paraglide/messages/preset_large.js +2 -2
  56. package/dist/paraglide/messages/preset_medium.js +2 -2
  57. package/dist/paraglide/messages/preset_small.js +2 -2
  58. package/dist/paraglide/messages/shape_label.js +2 -2
  59. package/dist/paraglide/messages/status_generating_map.js +2 -2
  60. package/dist/paraglide/messages/status_initialization_failed.js +2 -2
  61. package/dist/paraglide/messages/status_joining_game.js +2 -2
  62. package/dist/paraglide/messages/status_loading.js +2 -2
  63. package/dist/paraglide/messages/status_preparing.js +2 -2
  64. package/dist/paraglide/messages/text_avoided.js +2 -2
  65. package/dist/paraglide/messages/text_density_summary.js +2 -2
  66. package/dist/paraglide/messages/text_invite_after_opening.js +2 -2
  67. package/dist/paraglide/messages/text_relay_servers_hint.js +2 -2
  68. package/dist/paraglide/messages/tutorial_action_dismiss.js +2 -2
  69. package/dist/paraglide/messages/tutorial_action_next.js +2 -2
  70. package/dist/paraglide/messages/tutorial_after_safe_deducible.js +2 -2
  71. package/dist/paraglide/messages/tutorial_after_safe_guess.js +2 -2
  72. package/dist/paraglide/messages/tutorial_after_void.js +2 -2
  73. package/dist/paraglide/messages/tutorial_awaiting_first_click.js +2 -2
  74. package/dist/paraglide/messages/tutorial_intro.d.ts +1 -1
  75. package/dist/paraglide/messages/tutorial_intro.js +5 -5
  76. package/dist/paraglide/messages/tutorial_won.js +2 -2
  77. package/dist/paraglide/registry.d.ts +13 -0
  78. package/dist/paraglide/registry.js +15 -0
  79. package/dist/paraglide/runtime.d.ts +90 -26
  80. package/dist/paraglide/runtime.js +597 -109
  81. package/dist/paraglide/server.d.ts +1 -1
  82. package/dist/paraglide/server.js +27 -10
  83. package/dist/wasm/avoidant_wasm.d.ts +46 -1
  84. package/dist/wasm/avoidant_wasm.js +164 -28
  85. package/dist/wasm/avoidant_wasm_bg.wasm +0 -0
  86. package/dist/wasm/avoidant_wasm_bg.wasm.d.ts +15 -1
  87. package/package.json +29 -29
@@ -848,8 +848,7 @@
848
848
  id="relay-servers"
849
849
  bind:value={relayServersInput}
850
850
  rows="4"
851
- spellcheck="false"
852
- ></textarea>
851
+ spellcheck="false"></textarea>
853
852
  <p class="field-help">{m.text_relay_servers_hint()}</p>
854
853
  <div class="mt-6 w-full">
855
854
  <label class="field-label" for="rng-seed-input">{m.field_seed()}</label>
@@ -107,7 +107,7 @@
107
107
  const dx = event.clientX - previous.x;
108
108
  const dy = event.clientY - previous.y;
109
109
  if (previous.button === 1) zoom(event.clientX, event.clientY, dy * 0.01);
110
- else if (event.shiftKey) rotate(dx, dy);
110
+ else if (previous.button === 2 || event.shiftKey) rotate(dx, dy);
111
111
  else pan(previous.x, previous.y, event.clientX, event.clientY);
112
112
  }
113
113
  }
@@ -49,7 +49,7 @@
49
49
  </script>
50
50
 
51
51
  <script lang="ts">
52
- import { labelSurfacePoints } from "./label-connectors";
52
+ import { cellLabelPlacements } from "./label-connectors";
53
53
  import IdleBillboard from "./IdleBillboard.svelte";
54
54
  import { TerrainDepthSort } from "./terrain-depth-sort";
55
55
  import { SvelteMap, SvelteSet } from "svelte/reactivity";
@@ -462,41 +462,14 @@
462
462
  });
463
463
 
464
464
  const LABEL_LIFT_FACTOR = 0.4;
465
- /// Maximum per-vertex elevation displacement (raw scalar from the noise field) seen inside each cell, used to lift labels above the noisiest part of the terrain.
466
- const terrainCellMaxHeights = $derived.by(() => {
467
- const result: number[] = new Array($cells.length).fill(0);
468
- if (!terrain) return result;
469
- const heights = terrain.heights;
470
- const cellIndices = terrain.cellIndices;
471
- for (let i = 0; i < cellIndices.length; i++) {
472
- const ci = cellIndices[i];
473
- const h = heights[i];
474
- if (h > result[ci]) result[ci] = h;
475
- }
476
- return result;
477
- });
478
- const cellLabelAnchors = $derived(
479
- $cells.map((cell, idx) => {
480
- const [cxv, cyv, czv] = cell.centroid;
481
- const [nx, ny, nz] = cell.normal;
482
- const lift = (terrainCellMaxHeights[idx] ?? 0) + cellRadius * LABEL_LIFT_FACTOR;
483
- return {
484
- x: cxv + nx * lift,
485
- y: cyv + ny * lift,
486
- z: czv + nz * lift,
487
- };
488
- }),
489
- );
490
-
491
- // Intersect the elevated, inset terrain rather than extending to the base
492
- // centroid below it. Compute these once per map, not on every cell reveal.
493
- const cellLabelSurfacePoints = $derived(
494
- labelSurfacePoints(
465
+ const labelPlacements = $derived(
466
+ cellLabelPlacements(
495
467
  terrainGeometry,
496
- cellLabelAnchors.map((anchor) => new Vector3(anchor.x, anchor.y, anchor.z)),
497
- $cells.map((cell) => new Vector3(...cell.centroid)),
468
+ $cells.map((cell) => new Vector3(...cell.normal)),
469
+ cellRadius * LABEL_LIFT_FACTOR,
498
470
  ),
499
471
  );
472
+ const cellLabelAnchors = $derived(labelPlacements.map((placement) => placement?.anchor));
500
473
 
501
474
  // Keep connectors in world space: only the text should turn to face the camera.
502
475
  // Batch all visible labels into one draw call, with depth testing so lines on
@@ -507,7 +480,7 @@
507
480
  for (let i = 0; i < $cellMetadata.length; i++) {
508
481
  const entry = $cellMetadata[i];
509
482
  const anchor = cellLabelAnchors[i];
510
- const surface = cellLabelSurfacePoints[i];
483
+ const surface = labelPlacements[i]?.surface;
511
484
  if (!entry.isExplored || entry.isVoid || entry.voidNeighborCount <= 0 || !anchor || !surface)
512
485
  continue;
513
486
  points.push(surface, new Vector3(anchor.x, anchor.y, anchor.z));
@@ -1,3 +1,6 @@
1
1
  import { BufferGeometry, Vector3 } from "three";
2
- /** Find actual terrain endpoints, keeping edge labels attached to their own cell. */
3
- export declare function labelSurfacePoints(geometry: BufferGeometry, anchors: Vector3[], centers: Vector3[]): (Vector3 | undefined)[];
2
+ /** Center each label on its cell's exposed mesh, aligned with the base face normal. */
3
+ export declare function cellLabelPlacements(geometry: BufferGeometry, normals: Vector3[], clearance: number): ({
4
+ surface: Vector3;
5
+ anchor: Vector3;
6
+ } | undefined)[];
@@ -1,6 +1,6 @@
1
1
  import { BufferGeometry, Ray, Triangle, Vector3 } from "three";
2
- /** Find actual terrain endpoints, keeping edge labels attached to their own cell. */
3
- export function labelSurfacePoints(geometry, anchors, centers) {
2
+ /** Center each label on its cell's exposed mesh, aligned with the base face normal. */
3
+ export function cellLabelPlacements(geometry, normals, clearance) {
4
4
  const positions = geometry.getAttribute("position");
5
5
  const cellIndices = geometry.getAttribute("aCellIndex");
6
6
  const triangles = new Map();
@@ -17,47 +17,57 @@ export function labelSurfacePoints(geometry, anchors, centers) {
17
17
  else
18
18
  triangles.set(cell, [triangle]);
19
19
  }
20
- return anchors.map((anchor, cell) => {
21
- const surface = triangles.get(cell);
22
- const center = centers[cell];
23
- if (!surface || !center)
20
+ return normals.map((faceNormal, cell) => {
21
+ const mesh = triangles.get(cell);
22
+ if (!mesh || !faceNormal.lengthSq())
24
23
  return undefined;
25
- const ray = new Ray(anchor, center.clone().sub(anchor).normalize());
24
+ const normal = faceNormal.clone().normalize();
25
+ const centroid = new Vector3();
26
+ const midpoint = new Vector3();
27
+ let area = 0;
28
+ let top = -Infinity;
29
+ for (const triangle of mesh) {
30
+ const weight = triangle.getArea();
31
+ centroid.addScaledVector(triangle.getMidpoint(midpoint), weight);
32
+ area += weight;
33
+ top = Math.max(top, triangle.a.dot(normal), triangle.b.dot(normal), triangle.c.dot(normal));
34
+ }
35
+ if (!area)
36
+ return undefined;
37
+ centroid.divideScalar(area);
38
+ // A curved mesh's area centroid may lie inside the terrain. Project outward
39
+ // along the face normal, then intersect back onto the exposed surface.
40
+ const gap = Math.max(clearance, 1e-6);
41
+ const anchor = centroid.clone().addScaledVector(normal, top + gap - centroid.dot(normal));
42
+ const ray = new Ray(anchor, normal.clone().negate());
26
43
  const hit = new Vector3();
27
- function firstHit() {
28
- let nearest;
29
- let distance = Infinity;
30
- for (const triangle of surface) {
31
- if (!ray.intersectTriangle(triangle.a, triangle.b, triangle.c, false, hit))
32
- continue;
33
- const candidateDistance = anchor.distanceToSquared(hit);
34
- if (candidateDistance < distance) {
35
- distance = candidateDistance;
36
- nearest = hit.clone();
37
- }
44
+ let surface;
45
+ let nearest = Infinity;
46
+ for (const triangle of mesh) {
47
+ if (!ray.intersectTriangle(triangle.a, triangle.b, triangle.c, false, hit))
48
+ continue;
49
+ const distance = anchor.distanceToSquared(hit);
50
+ if (distance < nearest) {
51
+ nearest = distance;
52
+ surface = hit.clone();
38
53
  }
39
- return nearest;
40
54
  }
41
- // A polyhedron edge's base centroid can lie above the inset triangles.
42
- // Do not stop the search at that centroid.
43
- const direct = firstHit();
44
- if (direct)
45
- return direct;
46
- // If the ray falls in an inset gap, attach to the nearest point on this
47
- // cell's surface instead of dropping the connector or hitting a neighbor.
48
- let closest;
49
- let distance = Infinity;
50
- for (const triangle of surface) {
51
- triangle.closestPointToPoint(center, hit);
52
- const candidateDistance = center.distanceToSquared(hit);
53
- if (candidateDistance < distance) {
54
- distance = candidateDistance;
55
- closest = hit.clone();
55
+ if (!surface) {
56
+ // For a non-convex cell or inset gap, use its nearest surface point and
57
+ // move the label with it so the connector never tilts away from the normal.
58
+ nearest = Infinity;
59
+ for (const triangle of mesh) {
60
+ triangle.closestPointToPoint(centroid, hit);
61
+ const distance = centroid.distanceToSquared(hit);
62
+ if (distance < nearest) {
63
+ nearest = distance;
64
+ surface = hit.clone();
65
+ }
56
66
  }
57
67
  }
58
- if (!closest)
68
+ if (!surface)
59
69
  return undefined;
60
- ray.direction.copy(closest).sub(anchor).normalize();
61
- return firstHit() ?? closest;
70
+ anchor.copy(surface).addScaledVector(normal, top + gap - surface.dot(normal));
71
+ return { surface, anchor };
62
72
  });
63
73
  }
@@ -55,7 +55,7 @@ export function orbitRadiansPerPixel(camera, radius, viewportHeight, flat = fals
55
55
  const surfaceDistance = Math.max(mapRadius * 0.01, camera.position.length() - (flat ? 0 : mapRadius));
56
56
  const visibleHeight = 2 * Math.tan((camera.getEffectiveFOV() * Math.PI) / 360) * surfaceDistance;
57
57
  // The vertical FOV includes the aspect-ratio adjustment on narrow screens.
58
- return 2 * Math.min(Math.PI * 2, visibleHeight / mapRadius) / Math.max(1, viewportHeight);
58
+ return (2 * Math.min(Math.PI * 2, visibleHeight / mapRadius)) / Math.max(1, viewportHeight);
59
59
  }
60
60
  /** Move the grabbed surface point with the pointer without changing the orbit center. */
61
61
  export function panMap(camera, from, to, anchor) {
@@ -5,15 +5,19 @@ export * from "./action_invite.js";
5
5
  export * from "./action_join.js";
6
6
  export * from "./action_join_game.js";
7
7
  export * from "./action_new_game.js";
8
+ export * from "./action_random.js";
8
9
  export * from "./action_start.js";
9
10
  export * from "./aria_close_invitation.js";
10
11
  export * from "./aria_score_summary.js";
11
12
  export * from "./cells_count.js";
13
+ export * from "./cells_per_face.js";
12
14
  export * from "./default_player_name.js";
13
15
  export * from "./error_join_connect_failed.js";
14
16
  export * from "./error_join_failed.js";
15
17
  export * from "./error_join_ticket_invalid.js";
16
18
  export * from "./error_join_ticket_required.js";
19
+ export * from "./faces_count.js";
20
+ export * from "./field_cell_density.js";
17
21
  export * from "./field_invitation_url.js";
18
22
  export * from "./field_map_shape.js";
19
23
  export * from "./field_map_size.js";
@@ -23,15 +27,14 @@ export * from "./field_radius_x.js";
23
27
  export * from "./field_radius_y.js";
24
28
  export * from "./field_radius_z.js";
25
29
  export * from "./field_relay_servers.js";
26
- export * from "./action_random.js";
27
30
  export * from "./field_seed.js";
28
31
  export * from "./field_size.js";
29
32
  export * from "./field_spikiness.js";
30
33
  export * from "./field_subdivisions.js";
34
+ export * from "./field_surface_detail.js";
31
35
  export * from "./field_ticket_or_invitation_url.js";
32
36
  export * from "./field_tutorial_mode.js";
33
37
  export * from "./field_void_fraction.js";
34
- export * from "./shape_label.js";
35
38
  export * from "./label_advanced_settings.js";
36
39
  export * from "./label_players.js";
37
40
  export * from "./label_safe_cells_explored.js";
@@ -43,12 +46,15 @@ export * from "./preset_custom.js";
43
46
  export * from "./preset_large.js";
44
47
  export * from "./preset_medium.js";
45
48
  export * from "./preset_small.js";
49
+ export * from "./shape_label.js";
46
50
  export * from "./status_generating_map.js";
47
51
  export * from "./status_initialization_failed.js";
48
52
  export * from "./status_joining_game.js";
49
53
  export * from "./status_loading.js";
50
54
  export * from "./status_preparing.js";
51
55
  export * from "./text_avoided.js";
56
+ export * from "./text_density_summary.js";
57
+ export * from "./text_invite_after_opening.js";
52
58
  export * from "./text_relay_servers_hint.js";
53
59
  export * from "./tutorial_action_dismiss.js";
54
60
  export * from "./tutorial_action_next.js";
@@ -58,10 +64,4 @@ export * from "./tutorial_after_void.js";
58
64
  export * from "./tutorial_awaiting_first_click.js";
59
65
  export * from "./tutorial_intro.js";
60
66
  export * from "./tutorial_won.js";
61
- export * from "./field_cell_density.js";
62
- export * from "./cells_per_face.js";
63
- export * from "./faces_count.js";
64
- export * from "./field_surface_detail.js";
65
- export * from "./text_density_summary.js";
66
- export * from "./text_invite_after_opening.js";
67
67
  export type LocalizedString = import("../runtime.js").LocalizedString;
@@ -7,15 +7,19 @@ export * from './action_invite.js'
7
7
  export * from './action_join.js'
8
8
  export * from './action_join_game.js'
9
9
  export * from './action_new_game.js'
10
+ export * from './action_random.js'
10
11
  export * from './action_start.js'
11
12
  export * from './aria_close_invitation.js'
12
13
  export * from './aria_score_summary.js'
13
14
  export * from './cells_count.js'
15
+ export * from './cells_per_face.js'
14
16
  export * from './default_player_name.js'
15
17
  export * from './error_join_connect_failed.js'
16
18
  export * from './error_join_failed.js'
17
19
  export * from './error_join_ticket_invalid.js'
18
20
  export * from './error_join_ticket_required.js'
21
+ export * from './faces_count.js'
22
+ export * from './field_cell_density.js'
19
23
  export * from './field_invitation_url.js'
20
24
  export * from './field_map_shape.js'
21
25
  export * from './field_map_size.js'
@@ -25,15 +29,14 @@ export * from './field_radius_x.js'
25
29
  export * from './field_radius_y.js'
26
30
  export * from './field_radius_z.js'
27
31
  export * from './field_relay_servers.js'
28
- export * from './action_random.js'
29
32
  export * from './field_seed.js'
30
33
  export * from './field_size.js'
31
34
  export * from './field_spikiness.js'
32
35
  export * from './field_subdivisions.js'
36
+ export * from './field_surface_detail.js'
33
37
  export * from './field_ticket_or_invitation_url.js'
34
38
  export * from './field_tutorial_mode.js'
35
39
  export * from './field_void_fraction.js'
36
- export * from './shape_label.js'
37
40
  export * from './label_advanced_settings.js'
38
41
  export * from './label_players.js'
39
42
  export * from './label_safe_cells_explored.js'
@@ -45,12 +48,15 @@ export * from './preset_custom.js'
45
48
  export * from './preset_large.js'
46
49
  export * from './preset_medium.js'
47
50
  export * from './preset_small.js'
51
+ export * from './shape_label.js'
48
52
  export * from './status_generating_map.js'
49
53
  export * from './status_initialization_failed.js'
50
54
  export * from './status_joining_game.js'
51
55
  export * from './status_loading.js'
52
56
  export * from './status_preparing.js'
53
57
  export * from './text_avoided.js'
58
+ export * from './text_density_summary.js'
59
+ export * from './text_invite_after_opening.js'
54
60
  export * from './text_relay_servers_hint.js'
55
61
  export * from './tutorial_action_dismiss.js'
56
62
  export * from './tutorial_action_next.js'
@@ -59,10 +65,4 @@ export * from './tutorial_after_safe_guess.js'
59
65
  export * from './tutorial_after_void.js'
60
66
  export * from './tutorial_awaiting_first_click.js'
61
67
  export * from './tutorial_intro.js'
62
- export * from './tutorial_won.js'
63
- export * from './field_cell_density.js'
64
- export * from './cells_per_face.js'
65
- export * from './faces_count.js'
66
- export * from './field_surface_detail.js'
67
- export * from './text_density_summary.js'
68
- export * from './text_invite_after_opening.js'
68
+ export * from './tutorial_won.js'
@@ -24,6 +24,6 @@ const bn_action_back = /** @type {(inputs: Action_BackInputs) => LocalizedString
24
24
  */
25
25
  export const action_back = /** @type {((inputs?: Action_BackInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_BackInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_back(inputs)
28
- return bn_action_back(inputs)
27
+ if (locale === "bn") return bn_action_back(inputs)
28
+ return en_action_back(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_copy = /** @type {(inputs: Action_CopyInputs) => LocalizedString
24
24
  */
25
25
  export const action_copy = /** @type {((inputs?: Action_CopyInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_CopyInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_copy(inputs)
28
- return bn_action_copy(inputs)
27
+ if (locale === "bn") return bn_action_copy(inputs)
28
+ return en_action_copy(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_exit = /** @type {(inputs: Action_ExitInputs) => LocalizedString
24
24
  */
25
25
  export const action_exit = /** @type {((inputs?: Action_ExitInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_ExitInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_exit(inputs)
28
- return bn_action_exit(inputs)
27
+ if (locale === "bn") return bn_action_exit(inputs)
28
+ return en_action_exit(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_invite = /** @type {(inputs: Action_InviteInputs) => LocalizedSt
24
24
  */
25
25
  export const action_invite = /** @type {((inputs?: Action_InviteInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_InviteInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_invite(inputs)
28
- return bn_action_invite(inputs)
27
+ if (locale === "bn") return bn_action_invite(inputs)
28
+ return en_action_invite(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_join = /** @type {(inputs: Action_JoinInputs) => LocalizedString
24
24
  */
25
25
  export const action_join = /** @type {((inputs?: Action_JoinInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_JoinInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_join(inputs)
28
- return bn_action_join(inputs)
27
+ if (locale === "bn") return bn_action_join(inputs)
28
+ return en_action_join(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_join_game = /** @type {(inputs: Action_Join_GameInputs) => Local
24
24
  */
25
25
  export const action_join_game = /** @type {((inputs?: Action_Join_GameInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_Join_GameInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_join_game(inputs)
28
- return bn_action_join_game(inputs)
27
+ if (locale === "bn") return bn_action_join_game(inputs)
28
+ return en_action_join_game(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_new_game = /** @type {(inputs: Action_New_GameInputs) => Localiz
24
24
  */
25
25
  export const action_new_game = /** @type {((inputs?: Action_New_GameInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_New_GameInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_new_game(inputs)
28
- return bn_action_new_game(inputs)
27
+ if (locale === "bn") return bn_action_new_game(inputs)
28
+ return en_action_new_game(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_random = /** @type {(inputs: Action_RandomInputs) => LocalizedSt
24
24
  */
25
25
  export const action_random = /** @type {((inputs?: Action_RandomInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_RandomInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_random(inputs)
28
- return bn_action_random(inputs)
27
+ if (locale === "bn") return bn_action_random(inputs)
28
+ return en_action_random(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_action_start = /** @type {(inputs: Action_StartInputs) => LocalizedStri
24
24
  */
25
25
  export const action_start = /** @type {((inputs?: Action_StartInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Action_StartInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_action_start(inputs)
28
- return bn_action_start(inputs)
27
+ if (locale === "bn") return bn_action_start(inputs)
28
+ return en_action_start(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_aria_close_invitation = /** @type {(inputs: Aria_Close_InvitationInputs
24
24
  */
25
25
  export const aria_close_invitation = /** @type {((inputs?: Aria_Close_InvitationInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Aria_Close_InvitationInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_aria_close_invitation(inputs)
28
- return bn_aria_close_invitation(inputs)
27
+ if (locale === "bn") return bn_aria_close_invitation(inputs)
28
+ return en_aria_close_invitation(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_aria_score_summary = /** @type {(inputs: Aria_Score_SummaryInputs) => L
24
24
  */
25
25
  export const aria_score_summary = /** @type {((inputs?: Aria_Score_SummaryInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Aria_Score_SummaryInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_aria_score_summary(inputs)
28
- return bn_aria_score_summary(inputs)
27
+ if (locale === "bn") return bn_aria_score_summary(inputs)
28
+ return en_aria_score_summary(inputs)
29
29
  });
@@ -28,6 +28,6 @@ const bn_cells_count = /** @type {(inputs: Cells_CountInputs) => LocalizedString
28
28
  */
29
29
  export const cells_count = /** @type {((inputs: Cells_CountInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Cells_CountInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs, options = {}) => {
30
30
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
31
- if (locale === "en") return en_cells_count(inputs)
32
- return bn_cells_count(inputs)
31
+ if (locale === "bn") return bn_cells_count(inputs)
32
+ return en_cells_count(inputs)
33
33
  });
@@ -24,6 +24,6 @@ const bn_cells_per_face = /** @type {(inputs: Cells_Per_FaceInputs) => Localized
24
24
  */
25
25
  export const cells_per_face = /** @type {((inputs: Cells_Per_FaceInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Cells_Per_FaceInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_cells_per_face(inputs)
28
- return bn_cells_per_face(inputs)
27
+ if (locale === "bn") return bn_cells_per_face(inputs)
28
+ return en_cells_per_face(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_default_player_name = /** @type {(inputs: Default_Player_NameInputs) =>
24
24
  */
25
25
  export const default_player_name = /** @type {((inputs?: Default_Player_NameInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Default_Player_NameInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_default_player_name(inputs)
28
- return bn_default_player_name(inputs)
27
+ if (locale === "bn") return bn_default_player_name(inputs)
28
+ return en_default_player_name(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_error_join_connect_failed = /** @type {(inputs: Error_Join_Connect_Fail
24
24
  */
25
25
  export const error_join_connect_failed = /** @type {((inputs?: Error_Join_Connect_FailedInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Error_Join_Connect_FailedInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_error_join_connect_failed(inputs)
28
- return bn_error_join_connect_failed(inputs)
27
+ if (locale === "bn") return bn_error_join_connect_failed(inputs)
28
+ return en_error_join_connect_failed(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_error_join_failed = /** @type {(inputs: Error_Join_FailedInputs) => Loc
24
24
  */
25
25
  export const error_join_failed = /** @type {((inputs?: Error_Join_FailedInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Error_Join_FailedInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_error_join_failed(inputs)
28
- return bn_error_join_failed(inputs)
27
+ if (locale === "bn") return bn_error_join_failed(inputs)
28
+ return en_error_join_failed(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_error_join_ticket_invalid = /** @type {(inputs: Error_Join_Ticket_Inval
24
24
  */
25
25
  export const error_join_ticket_invalid = /** @type {((inputs?: Error_Join_Ticket_InvalidInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Error_Join_Ticket_InvalidInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_error_join_ticket_invalid(inputs)
28
- return bn_error_join_ticket_invalid(inputs)
27
+ if (locale === "bn") return bn_error_join_ticket_invalid(inputs)
28
+ return en_error_join_ticket_invalid(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_error_join_ticket_required = /** @type {(inputs: Error_Join_Ticket_Requ
24
24
  */
25
25
  export const error_join_ticket_required = /** @type {((inputs?: Error_Join_Ticket_RequiredInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Error_Join_Ticket_RequiredInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_error_join_ticket_required(inputs)
28
- return bn_error_join_ticket_required(inputs)
27
+ if (locale === "bn") return bn_error_join_ticket_required(inputs)
28
+ return en_error_join_ticket_required(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_faces_count = /** @type {(inputs: Faces_CountInputs) => LocalizedString
24
24
  */
25
25
  export const faces_count = /** @type {((inputs: Faces_CountInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Faces_CountInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_faces_count(inputs)
28
- return bn_faces_count(inputs)
27
+ if (locale === "bn") return bn_faces_count(inputs)
28
+ return en_faces_count(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_cell_density = /** @type {(inputs: Field_Cell_DensityInputs) => L
24
24
  */
25
25
  export const field_cell_density = /** @type {((inputs?: Field_Cell_DensityInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Cell_DensityInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_cell_density(inputs)
28
- return bn_field_cell_density(inputs)
27
+ if (locale === "bn") return bn_field_cell_density(inputs)
28
+ return en_field_cell_density(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_invitation_url = /** @type {(inputs: Field_Invitation_UrlInputs)
24
24
  */
25
25
  export const field_invitation_url = /** @type {((inputs?: Field_Invitation_UrlInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Invitation_UrlInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_invitation_url(inputs)
28
- return bn_field_invitation_url(inputs)
27
+ if (locale === "bn") return bn_field_invitation_url(inputs)
28
+ return en_field_invitation_url(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_map_shape = /** @type {(inputs: Field_Map_ShapeInputs) => Localiz
24
24
  */
25
25
  export const field_map_shape = /** @type {((inputs?: Field_Map_ShapeInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Map_ShapeInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_map_shape(inputs)
28
- return bn_field_map_shape(inputs)
27
+ if (locale === "bn") return bn_field_map_shape(inputs)
28
+ return en_field_map_shape(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_map_size = /** @type {(inputs: Field_Map_SizeInputs) => Localized
24
24
  */
25
25
  export const field_map_size = /** @type {((inputs?: Field_Map_SizeInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Map_SizeInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_map_size(inputs)
28
- return bn_field_map_size(inputs)
27
+ if (locale === "bn") return bn_field_map_size(inputs)
28
+ return en_field_map_size(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_player_name = /** @type {(inputs: Field_Player_NameInputs) => Loc
24
24
  */
25
25
  export const field_player_name = /** @type {((inputs?: Field_Player_NameInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Player_NameInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_player_name(inputs)
28
- return bn_field_player_name(inputs)
27
+ if (locale === "bn") return bn_field_player_name(inputs)
28
+ return en_field_player_name(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_radius = /** @type {(inputs: Field_RadiusInputs) => LocalizedStri
24
24
  */
25
25
  export const field_radius = /** @type {((inputs?: Field_RadiusInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_RadiusInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_radius(inputs)
28
- return bn_field_radius(inputs)
27
+ if (locale === "bn") return bn_field_radius(inputs)
28
+ return en_field_radius(inputs)
29
29
  });
@@ -24,6 +24,6 @@ const bn_field_radius_x = /** @type {(inputs: Field_Radius_XInputs) => Localized
24
24
  */
25
25
  export const field_radius_x = /** @type {((inputs?: Field_Radius_XInputs, options?: { locale?: "en" | "bn" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Field_Radius_XInputs, { locale?: "en" | "bn" }, {}>} */ ((inputs = {}, options = {}) => {
26
26
  const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
- if (locale === "en") return en_field_radius_x(inputs)
28
- return bn_field_radius_x(inputs)
27
+ if (locale === "bn") return bn_field_radius_x(inputs)
28
+ return en_field_radius_x(inputs)
29
29
  });