@mirasen/chessboard 0.1.0 → 0.1.1

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 (226) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/animation/planner.d.ts +3 -3
  3. package/dist/animation/planner.js +4 -4
  4. package/dist/animation/render/fade.d.ts +4 -4
  5. package/dist/animation/render/fade.js +1 -1
  6. package/dist/animation/render/move.d.ts +4 -4
  7. package/dist/animation/render/move.js +1 -1
  8. package/dist/animation/render/plan.d.ts +4 -4
  9. package/dist/animation/render/plan.js +3 -3
  10. package/dist/animation/render/static.d.ts +4 -4
  11. package/dist/animation/render/static.js +1 -1
  12. package/dist/animation/render/types.d.ts +1 -1
  13. package/dist/animation/types.d.ts +1 -1
  14. package/dist/extensions/animation/factory.d.ts +1 -1
  15. package/dist/extensions/animation/factory.js +1 -1
  16. package/dist/extensions/animation/types.d.ts +1 -1
  17. package/dist/extensions/factory/main.d.ts +1 -1
  18. package/dist/extensions/factory/main.js +4 -4
  19. package/dist/extensions/factory/runtime.d.ts +4 -4
  20. package/dist/extensions/first-party/active-target/factory.d.ts +1 -1
  21. package/dist/extensions/first-party/active-target/factory.js +4 -4
  22. package/dist/extensions/first-party/active-target/types.d.ts +2 -2
  23. package/dist/extensions/first-party/board-events/factory.d.ts +1 -1
  24. package/dist/extensions/first-party/board-events/factory.js +6 -4
  25. package/dist/extensions/first-party/board-events/types.d.ts +6 -6
  26. package/dist/extensions/first-party/common/helpers.d.ts +2 -2
  27. package/dist/extensions/first-party/common/helpers.js +1 -1
  28. package/dist/extensions/first-party/common/types.d.ts +1 -1
  29. package/dist/extensions/first-party/last-move/factory.d.ts +1 -1
  30. package/dist/extensions/first-party/last-move/factory.js +4 -4
  31. package/dist/extensions/first-party/last-move/types.d.ts +2 -2
  32. package/dist/extensions/first-party/legal-moves/factory.d.ts +1 -1
  33. package/dist/extensions/first-party/legal-moves/factory.js +6 -6
  34. package/dist/extensions/first-party/legal-moves/types.d.ts +2 -2
  35. package/dist/extensions/first-party/main-renderer/animation/factory.d.ts +3 -3
  36. package/dist/extensions/first-party/main-renderer/animation/factory.js +3 -3
  37. package/dist/extensions/first-party/main-renderer/animation/render.d.ts +3 -3
  38. package/dist/extensions/first-party/main-renderer/animation/render.js +2 -2
  39. package/dist/extensions/first-party/main-renderer/animation/types.d.ts +7 -7
  40. package/dist/extensions/first-party/main-renderer/animation/update.d.ts +2 -2
  41. package/dist/extensions/first-party/main-renderer/animation/update.js +3 -3
  42. package/dist/extensions/first-party/main-renderer/board/factory.d.ts +2 -2
  43. package/dist/extensions/first-party/main-renderer/board/factory.js +2 -2
  44. package/dist/extensions/first-party/main-renderer/board/render.d.ts +2 -2
  45. package/dist/extensions/first-party/main-renderer/board/render.js +3 -3
  46. package/dist/extensions/first-party/main-renderer/board/types.d.ts +3 -3
  47. package/dist/extensions/first-party/main-renderer/board/update.d.ts +2 -2
  48. package/dist/extensions/first-party/main-renderer/board/update.js +3 -3
  49. package/dist/extensions/first-party/main-renderer/coordinates/factory.d.ts +2 -2
  50. package/dist/extensions/first-party/main-renderer/coordinates/factory.js +1 -1
  51. package/dist/extensions/first-party/main-renderer/coordinates/render.d.ts +2 -2
  52. package/dist/extensions/first-party/main-renderer/coordinates/render.js +3 -3
  53. package/dist/extensions/first-party/main-renderer/coordinates/types.d.ts +2 -2
  54. package/dist/extensions/first-party/main-renderer/drag/factory.d.ts +3 -3
  55. package/dist/extensions/first-party/main-renderer/drag/factory.js +2 -2
  56. package/dist/extensions/first-party/main-renderer/drag/render.d.ts +2 -2
  57. package/dist/extensions/first-party/main-renderer/drag/render.js +1 -1
  58. package/dist/extensions/first-party/main-renderer/drag/types.d.ts +4 -4
  59. package/dist/extensions/first-party/main-renderer/drag/update.d.ts +2 -2
  60. package/dist/extensions/first-party/main-renderer/drag/update.js +1 -1
  61. package/dist/extensions/first-party/main-renderer/factory.d.ts +1 -1
  62. package/dist/extensions/first-party/main-renderer/factory.js +9 -9
  63. package/dist/extensions/first-party/main-renderer/normalize.d.ts +2 -2
  64. package/dist/extensions/first-party/main-renderer/normalize.js +3 -3
  65. package/dist/extensions/first-party/main-renderer/pieces/factory.d.ts +2 -2
  66. package/dist/extensions/first-party/main-renderer/pieces/factory.js +2 -2
  67. package/dist/extensions/first-party/main-renderer/pieces/render.d.ts +2 -2
  68. package/dist/extensions/first-party/main-renderer/pieces/render.js +4 -4
  69. package/dist/extensions/first-party/main-renderer/pieces/suppress.d.ts +4 -4
  70. package/dist/extensions/first-party/main-renderer/pieces/types.d.ts +5 -5
  71. package/dist/extensions/first-party/main-renderer/pieces/update.d.ts +4 -4
  72. package/dist/extensions/first-party/main-renderer/pieces/update.js +5 -5
  73. package/dist/extensions/first-party/main-renderer/types/extension.d.ts +2 -2
  74. package/dist/extensions/first-party/main-renderer/types/input.d.ts +2 -2
  75. package/dist/extensions/first-party/main-renderer/types/instance.d.ts +8 -8
  76. package/dist/extensions/first-party/main-renderer/types/internal.d.ts +2 -2
  77. package/dist/extensions/first-party/main-renderer/types/template.d.ts +1 -1
  78. package/dist/extensions/first-party/selected-square/factory.d.ts +1 -1
  79. package/dist/extensions/first-party/selected-square/factory.js +4 -4
  80. package/dist/extensions/first-party/selected-square/types.d.ts +2 -2
  81. package/dist/extensions/index.d.ts +8 -8
  82. package/dist/extensions/index.js +6 -6
  83. package/dist/extensions/invalidation/factory.d.ts +1 -1
  84. package/dist/extensions/types/basic/events.d.ts +2 -2
  85. package/dist/extensions/types/basic/render.d.ts +2 -2
  86. package/dist/extensions/types/basic/transient-visuals.d.ts +1 -1
  87. package/dist/extensions/types/basic/update.d.ts +3 -3
  88. package/dist/extensions/types/context/animation.d.ts +3 -3
  89. package/dist/extensions/types/context/render.d.ts +2 -2
  90. package/dist/extensions/types/context/transient-visuals.d.ts +2 -2
  91. package/dist/extensions/types/context/ui-move.d.ts +2 -2
  92. package/dist/extensions/types/context/update.d.ts +4 -4
  93. package/dist/extensions/types/context/update.js +1 -1
  94. package/dist/extensions/types/extension.d.ts +8 -8
  95. package/dist/extensions/types/main.d.ts +8 -8
  96. package/dist/extensions/types/surface/commands.d.ts +5 -5
  97. package/dist/extensions/types/surface/events.d.ts +1 -1
  98. package/dist/extensions/types/surface/main.d.ts +4 -4
  99. package/dist/extensions/types/wrapper.d.ts +6 -6
  100. package/dist/extensions/update.d.ts +2 -2
  101. package/dist/extensions/update.js +1 -1
  102. package/dist/index.d.ts +4 -4
  103. package/dist/index.js +1 -1
  104. package/dist/layout/factory.d.ts +1 -1
  105. package/dist/layout/factory.js +1 -1
  106. package/dist/layout/geometry/factory.d.ts +2 -2
  107. package/dist/layout/geometry/factory.js +1 -1
  108. package/dist/layout/geometry/types.d.ts +1 -1
  109. package/dist/layout/mutation.d.ts +1 -1
  110. package/dist/layout/reducers.d.ts +1 -1
  111. package/dist/layout/reducers.js +2 -2
  112. package/dist/layout/types.d.ts +3 -3
  113. package/dist/mutation/pipeline.d.ts +1 -1
  114. package/dist/mutation/pipeline.js +1 -1
  115. package/dist/mutation/session.d.ts +1 -1
  116. package/dist/render/factory.d.ts +1 -1
  117. package/dist/render/factory.js +7 -7
  118. package/dist/render/mount.d.ts +1 -1
  119. package/dist/render/mount.js +2 -2
  120. package/dist/render/rendering/animation.d.ts +1 -1
  121. package/dist/render/rendering/animation.js +1 -1
  122. package/dist/render/rendering/helpers.d.ts +1 -1
  123. package/dist/render/rendering/state.d.ts +2 -2
  124. package/dist/render/rendering/state.js +2 -2
  125. package/dist/render/rendering/visuals.d.ts +2 -2
  126. package/dist/render/rendering/visuals.js +1 -1
  127. package/dist/render/scheduler/scheduler.d.ts +1 -1
  128. package/dist/render/svg/factory.d.ts +2 -2
  129. package/dist/render/svg/factory.js +1 -1
  130. package/dist/render/svg/helpers.d.ts +1 -1
  131. package/dist/render/svg/helpers.js +1 -1
  132. package/dist/render/types.d.ts +5 -5
  133. package/dist/runtime/factory/helpers.d.ts +2 -2
  134. package/dist/runtime/factory/helpers.js +3 -3
  135. package/dist/runtime/factory/input.d.ts +2 -2
  136. package/dist/runtime/factory/input.js +3 -3
  137. package/dist/runtime/factory/main.d.ts +1 -1
  138. package/dist/runtime/factory/main.js +12 -12
  139. package/dist/runtime/factory/ui-move.d.ts +3 -3
  140. package/dist/runtime/input/adapter/factory.d.ts +1 -1
  141. package/dist/runtime/input/adapter/factory.js +1 -1
  142. package/dist/runtime/input/adapter/helpers.d.ts +3 -3
  143. package/dist/runtime/input/adapter/pointer.d.ts +2 -2
  144. package/dist/runtime/input/adapter/pointer.js +2 -2
  145. package/dist/runtime/input/adapter/types.d.ts +2 -2
  146. package/dist/runtime/input/controller/factory.d.ts +1 -1
  147. package/dist/runtime/input/controller/factory.js +2 -2
  148. package/dist/runtime/input/controller/helpers.d.ts +2 -2
  149. package/dist/runtime/input/controller/pointer.d.ts +2 -2
  150. package/dist/runtime/input/controller/pointer.js +3 -3
  151. package/dist/runtime/input/controller/transient-visuals.d.ts +2 -2
  152. package/dist/runtime/input/controller/types.d.ts +4 -4
  153. package/dist/runtime/layout.d.ts +1 -1
  154. package/dist/runtime/layout.js +2 -2
  155. package/dist/runtime/lifecycle.d.ts +2 -2
  156. package/dist/runtime/lifecycle.js +2 -2
  157. package/dist/runtime/mutation/extension-update.d.ts +1 -1
  158. package/dist/runtime/mutation/factory.d.ts +1 -1
  159. package/dist/runtime/mutation/factory.js +6 -6
  160. package/dist/runtime/mutation/interaction.d.ts +1 -1
  161. package/dist/runtime/mutation/interaction.js +2 -2
  162. package/dist/runtime/mutation/invalidation.d.ts +1 -0
  163. package/dist/runtime/mutation/invalidation.js +1 -1
  164. package/dist/runtime/mutation/last-move.d.ts +1 -1
  165. package/dist/runtime/mutation/layout.d.ts +1 -1
  166. package/dist/runtime/mutation/pipeline.d.ts +6 -6
  167. package/dist/runtime/mutation/request-render.d.ts +1 -1
  168. package/dist/runtime/mutation/request-render.js +1 -1
  169. package/dist/runtime/mutation/run.d.ts +1 -1
  170. package/dist/runtime/mutation/types.d.ts +6 -6
  171. package/dist/runtime/types/main.d.ts +6 -6
  172. package/dist/runtime/types/ui-move.d.ts +3 -3
  173. package/dist/state/board/check.d.ts +3 -3
  174. package/dist/state/board/check.js +1 -1
  175. package/dist/state/board/coords.d.ts +1 -1
  176. package/dist/state/board/denormalize.d.ts +3 -3
  177. package/dist/state/board/denormalize.js +4 -4
  178. package/dist/state/board/factory.d.ts +2 -2
  179. package/dist/state/board/factory.js +4 -4
  180. package/dist/state/board/mutation.d.ts +2 -2
  181. package/dist/state/board/normalize.d.ts +2 -2
  182. package/dist/state/board/normalize.js +2 -2
  183. package/dist/state/board/piece.d.ts +1 -1
  184. package/dist/state/board/position.d.ts +2 -2
  185. package/dist/state/board/position.js +2 -2
  186. package/dist/state/board/reducers.d.ts +2 -2
  187. package/dist/state/board/reducers.js +3 -3
  188. package/dist/state/board/types/input.d.ts +1 -1
  189. package/dist/state/board/types/internal.d.ts +1 -1
  190. package/dist/state/board/types/main.d.ts +3 -3
  191. package/dist/state/board/types/output.d.ts +2 -2
  192. package/dist/state/change/factory.d.ts +1 -1
  193. package/dist/state/change/factory.js +1 -1
  194. package/dist/state/change/helpers.d.ts +3 -3
  195. package/dist/state/change/helpers.js +1 -1
  196. package/dist/state/change/mutation.d.ts +1 -1
  197. package/dist/state/change/reducers.d.ts +3 -3
  198. package/dist/state/change/reducers.js +1 -1
  199. package/dist/state/change/types.d.ts +3 -3
  200. package/dist/state/factory.d.ts +1 -1
  201. package/dist/state/factory.js +4 -4
  202. package/dist/state/interaction/factory.d.ts +1 -1
  203. package/dist/state/interaction/factory.js +3 -3
  204. package/dist/state/interaction/helpers.d.ts +2 -2
  205. package/dist/state/interaction/helpers.js +2 -2
  206. package/dist/state/interaction/movability.d.ts +3 -3
  207. package/dist/state/interaction/movability.js +2 -2
  208. package/dist/state/interaction/mutation.d.ts +1 -1
  209. package/dist/state/interaction/normalize.d.ts +2 -2
  210. package/dist/state/interaction/normalize.js +2 -2
  211. package/dist/state/interaction/reducers.d.ts +3 -3
  212. package/dist/state/interaction/reducers.js +3 -3
  213. package/dist/state/interaction/types/input.d.ts +1 -1
  214. package/dist/state/interaction/types/internal.d.ts +1 -1
  215. package/dist/state/interaction/types/main.d.ts +4 -4
  216. package/dist/state/types.d.ts +6 -6
  217. package/dist/state/view/factory.d.ts +1 -1
  218. package/dist/state/view/factory.js +2 -2
  219. package/dist/state/view/mutation.d.ts +1 -1
  220. package/dist/state/view/reducers.d.ts +2 -2
  221. package/dist/state/view/types/internal.d.ts +1 -1
  222. package/dist/state/view/types/main.d.ts +4 -4
  223. package/dist/wrapper/factory.d.ts +2 -2
  224. package/dist/wrapper/factory.js +8 -8
  225. package/dist/wrapper/types.d.ts +4 -4
  226. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { ReadonlyDeep } from 'type-fest';
2
- import { ColorCode } from '../state/board/types/internal';
3
- import { RenderGeometry } from './geometry/types';
4
- import { LayoutMutationSession } from './mutation';
2
+ import { ColorCode } from '../state/board/types/internal.js';
3
+ import { RenderGeometry } from './geometry/types.js';
4
+ import { LayoutMutationSession } from './mutation.js';
5
5
  export interface LayoutInternal {
6
6
  boardSize: number | null;
7
7
  orientation: ColorCode | null;
@@ -1,2 +1,2 @@
1
- import type { MutationPipe, MutationPipeline } from './types';
1
+ import type { MutationPipe, MutationPipeline } from './types.js';
2
2
  export declare function createMutationPipeline<PayloadByCause extends Record<string, unknown>, Context>(pipes: readonly MutationPipe<PayloadByCause, Context>[]): MutationPipeline<PayloadByCause, Context>;
@@ -1,4 +1,4 @@
1
- import { createMutationSession } from './session';
1
+ import { createMutationSession } from './session.js';
2
2
  export function createMutationPipeline(pipes) {
3
3
  const registeredPipes = [...pipes];
4
4
  const session = createMutationSession();
@@ -1,3 +1,3 @@
1
- import type { MutationCause, MutationSession, ReadonlyMutationSession } from './types';
1
+ import type { MutationCause, MutationSession, ReadonlyMutationSession } from './types.js';
2
2
  export declare function createReadonlyMutationSession<PayloadByCause extends Record<string, unknown>>(payloads: ReadonlyMap<MutationCause<PayloadByCause>, PayloadByCause[MutationCause<PayloadByCause>][] | undefined>, clone?: boolean): ReadonlyMutationSession<PayloadByCause>;
3
3
  export declare function createMutationSession<PayloadByCause extends Record<string, unknown>>(): MutationSession<PayloadByCause>;
@@ -1,2 +1,2 @@
1
- import { RenderSystem, RenderSystemInitOptions } from './types';
1
+ import { RenderSystem, RenderSystemInitOptions } from './types.js';
2
2
  export declare function createRenderSystem(options: RenderSystemInitOptions): RenderSystem;
@@ -1,10 +1,10 @@
1
- import { renderMount, renderUnmount } from './mount';
2
- import { performAnimationCleanup, performAnimationPass } from './rendering/animation';
3
- import { validateIsMounted } from './rendering/helpers';
4
- import { performRenderPass } from './rendering/state';
5
- import { performRenderTransientVisualsPass } from './rendering/visuals';
6
- import { createScheduler } from './scheduler/scheduler';
7
- import { allocateExtensionSlotRoots, createSvgRoots } from './svg/factory';
1
+ import { renderMount, renderUnmount } from './mount.js';
2
+ import { performAnimationCleanup, performAnimationPass } from './rendering/animation.js';
3
+ import { validateIsMounted } from './rendering/helpers.js';
4
+ import { performRenderPass } from './rendering/state.js';
5
+ import { performRenderTransientVisualsPass } from './rendering/visuals.js';
6
+ import { createScheduler } from './scheduler/scheduler.js';
7
+ import { allocateExtensionSlotRoots, createSvgRoots } from './svg/factory.js';
8
8
  function createRenderInternal(options) {
9
9
  const svgRoots = createSvgRoots(options);
10
10
  const scheduler = createScheduler({
@@ -1,3 +1,3 @@
1
- import { RenderSystemInternal } from './types';
1
+ import { RenderSystemInternal } from './types.js';
2
2
  export declare function renderMount(state: RenderSystemInternal, element: HTMLElement): void;
3
3
  export declare function renderUnmount(state: RenderSystemInternal): void;
@@ -1,5 +1,5 @@
1
- import { validateIsMounted, validateIsNotMounted } from './rendering/helpers';
2
- import { clearElementChildren } from './svg/helpers';
1
+ import { validateIsMounted, validateIsNotMounted } from './rendering/helpers.js';
2
+ import { clearElementChildren } from './svg/helpers.js';
3
3
  export function renderMount(state, element) {
4
4
  validateIsNotMounted(state);
5
5
  state.container = element;
@@ -1,4 +1,4 @@
1
- import { RenderSystemInternal } from '../types';
1
+ import { RenderSystemInternal } from '../types.js';
2
2
  export interface RenderAnimationResult {
3
3
  requestRenderAnimation: boolean;
4
4
  requestRender: boolean;
@@ -1,4 +1,4 @@
1
- import { validateIsMounted } from './helpers';
1
+ import { validateIsMounted } from './helpers.js';
2
2
  /**
3
3
  * Runs deferred physical cleanup for all sessions that were marked pendingCleanup
4
4
  * in a previous animation pass. Called at the end of performRenderPass (after stable
@@ -1,3 +1,3 @@
1
- import { RenderSystemInternal } from '../types';
1
+ import { RenderSystemInternal } from '../types.js';
2
2
  export declare function validateIsMounted(state: RenderSystemInternal): void;
3
3
  export declare function validateIsNotMounted(state: RenderSystemInternal): void;
@@ -1,4 +1,4 @@
1
- import { RenderFrameSnapshot } from '../../extensions/types/basic/render';
2
- import { RenderSystemInternal } from '../types';
1
+ import { RenderFrameSnapshot } from '../../extensions/types/basic/render.js';
2
+ import { RenderSystemInternal } from '../types.js';
3
3
  export declare function checkNeedsRender(state: RenderSystemInternal): boolean;
4
4
  export declare function performRenderPass(state: RenderSystemInternal, request: RenderFrameSnapshot | null): void;
@@ -1,5 +1,5 @@
1
- import { updateElementAttributes } from '../svg/helpers';
2
- import { validateIsMounted } from './helpers';
1
+ import { updateElementAttributes } from '../svg/helpers.js';
2
+ import { validateIsMounted } from './helpers.js';
3
3
  export function checkNeedsRender(state) {
4
4
  for (const extensionRec of state.extensions.values()) {
5
5
  if (extensionRec.extension.invalidation.dirtyLayers !== 0) {
@@ -1,3 +1,3 @@
1
- import { TransientInput } from '../../extensions/types/basic/transient-visuals';
2
- import { RenderSystemInternal } from '../types';
1
+ import { TransientInput } from '../../extensions/types/basic/transient-visuals.js';
2
+ import { RenderSystemInternal } from '../types.js';
3
3
  export declare function performRenderTransientVisualsPass(state: RenderSystemInternal, request: TransientInput): void;
@@ -1,4 +1,4 @@
1
- import { validateIsMounted } from './helpers';
1
+ import { validateIsMounted } from './helpers.js';
2
2
  export function performRenderTransientVisualsPass(state, request) {
3
3
  validateIsMounted(state);
4
4
  const currentFrame = state.currentFrame;
@@ -1,2 +1,2 @@
1
- import { Scheduler, SchedulerOptions } from './types';
1
+ import { Scheduler, SchedulerOptions } from './types.js';
2
2
  export declare function createScheduler(opts: SchedulerOptions): Scheduler;
@@ -1,4 +1,4 @@
1
- import { ExtensionAllocatedSlotsInternal, ExtensionSlotName } from '../../extensions/types/basic/mount';
2
- import { RenderSystemInitOptionsInternal, SvgRoots } from '../types';
1
+ import { ExtensionAllocatedSlotsInternal, ExtensionSlotName } from '../../extensions/types/basic/mount.js';
2
+ import { RenderSystemInitOptionsInternal, SvgRoots } from '../types.js';
3
3
  export declare function createSvgRoots(options: RenderSystemInitOptionsInternal): SvgRoots;
4
4
  export declare function allocateExtensionSlotRoots(svgRoots: SvgRoots, extensionId: string, slots: readonly ExtensionSlotName[]): ExtensionAllocatedSlotsInternal;
@@ -1,4 +1,4 @@
1
- import { createSvgElement } from './helpers';
1
+ import { createSvgElement } from './helpers.js';
2
2
  export function createSvgRoots(options) {
3
3
  const { doc } = options;
4
4
  const svgRoot = createSvgElement(doc, 'svg', { 'data-chessboard-id': 'svg-root' });
@@ -1,4 +1,4 @@
1
- import { Square } from '../../state/board/types/internal';
1
+ import { Square } from '../../state/board/types/internal.js';
2
2
  export declare const SVG_NS = "http://www.w3.org/2000/svg";
3
3
  /**
4
4
  * Helper to compute light/dark square parity.
@@ -1,4 +1,4 @@
1
- import { fileOf, rankOf } from '../../state/board/coords';
1
+ import { fileOf, rankOf } from '../../state/board/coords.js';
2
2
  export const SVG_NS = 'http://www.w3.org/2000/svg';
3
3
  /**
4
4
  * Helper to compute light/dark square parity.
@@ -1,8 +1,8 @@
1
- import { ALL_EXTENSION_SLOTS, ExtensionAllocatedSlotsInternal, ExtensionSlotSvgRoots } from '../extensions/types/basic/mount';
2
- import { RenderFrameSnapshot } from '../extensions/types/basic/render';
3
- import { TransientInput } from '../extensions/types/basic/transient-visuals';
4
- import { ExtensionSystemExtensionRecord, ExtensionSystemSharedDataForRenderSystem } from '../extensions/types/main';
5
- import { Scheduler } from './scheduler/types';
1
+ import { ALL_EXTENSION_SLOTS, ExtensionAllocatedSlotsInternal, ExtensionSlotSvgRoots } from '../extensions/types/basic/mount.js';
2
+ import { RenderFrameSnapshot } from '../extensions/types/basic/render.js';
3
+ import { TransientInput } from '../extensions/types/basic/transient-visuals.js';
4
+ import { ExtensionSystemExtensionRecord, ExtensionSystemSharedDataForRenderSystem } from '../extensions/types/main.js';
5
+ import { Scheduler } from './scheduler/types.js';
6
6
  export interface SvgRoots extends ExtensionSlotSvgRoots<typeof ALL_EXTENSION_SLOTS> {
7
7
  readonly svgRoot: SVGSVGElement;
8
8
  readonly defs: SVGDefsElement;
@@ -1,5 +1,5 @@
1
- import { Square } from '../../state/board/types/internal';
2
- import { RuntimeInternal } from '../types/main';
1
+ import { Square } from '../../state/board/types/internal.js';
2
+ import { RuntimeInternal } from '../types/main.js';
3
3
  /**
4
4
  * Helper functions for common flow for dropTo and releaseTo interactions
5
5
  */
@@ -1,7 +1,7 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { isEmptyPieceCode } from '../../state/board/check';
3
- import { canMoveTo } from '../input/controller/helpers';
4
- import { createUIMoveRequestContext } from './ui-move';
2
+ import { isEmptyPieceCode } from '../../state/board/check.js';
3
+ import { canMoveTo } from '../input/controller/helpers.js';
4
+ import { createUIMoveRequestContext } from './ui-move.js';
5
5
  function assertResolvedAfterAutoResolve(state) {
6
6
  if (state.status !== 'resolved') {
7
7
  throw new Error('UI move request must be resolved after autoresolve');
@@ -1,3 +1,3 @@
1
- import { RuntimeInteractionSurface } from '../input/controller/types';
2
- import { GetInternalState } from '../types/main';
1
+ import { RuntimeInteractionSurface } from '../input/controller/types.js';
2
+ import { GetInternalState } from '../types/main.js';
3
3
  export declare function createRuntimeInteractionSurface(state: GetInternalState): RuntimeInteractionSurface;
@@ -1,7 +1,7 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { isEmptyPieceCode } from '../../state/board/check';
3
- import { runtimeRunMutationPipeline } from '../mutation/run';
4
- import { uiMoveCompleteTo } from './helpers';
2
+ import { isEmptyPieceCode } from '../../state/board/check.js';
3
+ import { runtimeRunMutationPipeline } from '../mutation/run.js';
4
+ import { uiMoveCompleteTo } from './helpers.js';
5
5
  export function createRuntimeInteractionSurface(state) {
6
6
  return {
7
7
  getInteractionStateSnapshot() {
@@ -1,2 +1,2 @@
1
- import type { Runtime, RuntimeInitOptions } from '../types/main';
1
+ import type { Runtime, RuntimeInitOptions } from '../types/main.js';
2
2
  export declare function createRuntime(options: RuntimeInitOptions): Runtime;
@@ -1,16 +1,16 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { createExtensionSystem } from '../../extensions/factory/main';
3
- import { assertFrameRenderable } from '../../extensions/types/basic/update';
4
- import { createLayout } from '../../layout/factory';
5
- import { createRenderSystem } from '../../render/factory';
6
- import { isNonEmptyPieceCode } from '../../state/board/check';
7
- import { normalizeSquare } from '../../state/board/normalize';
8
- import { createRuntimeState } from '../../state/factory';
9
- import { createInteractionController } from '../input/controller/factory';
10
- import { runtimeDestroy, runtimeMount, runtimeUnmount } from '../lifecycle';
11
- import { createRuntimeMutationPipeline } from '../mutation/factory';
12
- import { runtimeRunMutationPipeline } from '../mutation/run';
13
- import { createRuntimeInteractionSurface } from './input';
2
+ import { createExtensionSystem } from '../../extensions/factory/main.js';
3
+ import { assertFrameRenderable } from '../../extensions/types/basic/update.js';
4
+ import { createLayout } from '../../layout/factory.js';
5
+ import { createRenderSystem } from '../../render/factory.js';
6
+ import { isNonEmptyPieceCode } from '../../state/board/check.js';
7
+ import { normalizeSquare } from '../../state/board/normalize.js';
8
+ import { createRuntimeState } from '../../state/factory.js';
9
+ import { createInteractionController } from '../input/controller/factory.js';
10
+ import { runtimeDestroy, runtimeMount, runtimeUnmount } from '../lifecycle.js';
11
+ import { createRuntimeMutationPipeline } from '../mutation/factory.js';
12
+ import { runtimeRunMutationPipeline } from '../mutation/run.js';
13
+ import { createRuntimeInteractionSurface } from './input.js';
14
14
  function createRuntimeInternal(options) {
15
15
  const extensionSystem = createExtensionSystem(options);
16
16
  const render = createRenderSystem({
@@ -1,4 +1,4 @@
1
- import { ExtensionUIMoveRequestContext } from '../../extensions/types/context/ui-move';
2
- import { Square } from '../../state/board/types/internal';
3
- import { MoveDestinationSnapshot } from '../../state/interaction/types/internal';
1
+ import { ExtensionUIMoveRequestContext } from '../../extensions/types/context/ui-move.js';
2
+ import { Square } from '../../state/board/types/internal.js';
3
+ import { MoveDestinationSnapshot } from '../../state/interaction/types/internal.js';
4
4
  export declare function createUIMoveRequestContext(sourceSquare: Square, destination: MoveDestinationSnapshot): ExtensionUIMoveRequestContext;
@@ -1,2 +1,2 @@
1
- import { InputAdapter, InputAdapterInitOptions } from './types';
1
+ import { InputAdapter, InputAdapterInitOptions } from './types.js';
2
2
  export declare function createInputAdapter(options: InputAdapterInitOptions): InputAdapter;
@@ -1,4 +1,4 @@
1
- import { isPointerRelevantEvent, onPointerCancel, onPointerDown, onPointerLeave, onPointerMove, onPointerUp, releaseCapture } from './pointer';
1
+ import { isPointerRelevantEvent, onPointerCancel, onPointerDown, onPointerLeave, onPointerMove, onPointerUp, releaseCapture } from './pointer.js';
2
2
  function createInputAdapterInternal(options) {
3
3
  return {
4
4
  container: options.container,
@@ -1,5 +1,5 @@
1
- import { ScenePoint } from '../../../extensions/types/basic/transient-visuals';
2
- import { RenderGeometry } from '../../../layout/geometry/types';
3
- import { Square } from '../../../state/board/types/internal';
1
+ import { ScenePoint } from '../../../extensions/types/basic/transient-visuals.js';
2
+ import { RenderGeometry } from '../../../layout/geometry/types.js';
3
+ import { Square } from '../../../state/board/types/internal.js';
4
4
  export declare function mapBoardPointToSquare(x: number, y: number, geometry: RenderGeometry): Square | null;
5
5
  export declare function clampBoardPoint(point: ScenePoint, geometry: RenderGeometry): ScenePoint;
@@ -1,5 +1,5 @@
1
- import { ScenePointerEventType } from '../../../extensions/types/basic/events';
2
- import { InputAdapterInternal } from './types';
1
+ import { ScenePointerEventType } from '../../../extensions/types/basic/events.js';
2
+ import { InputAdapterInternal } from './types.js';
3
3
  export type PointerRelevantEvent = PointerEvent & {
4
4
  type: ScenePointerEventType;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { SCENE_POINTER_EVENT_TYPES } from '../../../extensions/types/basic/events';
3
- import { clampBoardPoint, mapBoardPointToSquare } from './helpers';
2
+ import { SCENE_POINTER_EVENT_TYPES } from '../../../extensions/types/basic/events.js';
3
+ import { clampBoardPoint, mapBoardPointToSquare } from './helpers.js';
4
4
  const validPointerEventTypes = new Set(SCENE_POINTER_EVENT_TYPES);
5
5
  export function isPointerRelevantEvent(e) {
6
6
  return e instanceof PointerEvent && validPointerEventTypes.has(e.type);
@@ -1,5 +1,5 @@
1
- import { RenderGeometry } from '../../../layout/geometry/types';
2
- import { InteractionController } from '../controller/types';
1
+ import { RenderGeometry } from '../../../layout/geometry/types.js';
2
+ import { InteractionController } from '../controller/types.js';
3
3
  export interface InputAdapterInitOptions {
4
4
  container: HTMLElement;
5
5
  getGeometry: () => RenderGeometry | null;
@@ -1,2 +1,2 @@
1
- import { InteractionController, InteractionControllerInitOptions } from './types';
1
+ import { InteractionController, InteractionControllerInitOptions } from './types.js';
2
2
  export declare function createInteractionController(options: InteractionControllerInitOptions): InteractionController;
@@ -1,5 +1,5 @@
1
- import { handlePointerCancel, handlePointerDown, handlePointerLeave, handlePointerMove, handlePointerUp } from './pointer';
2
- import { transmitTransientInput } from './transient-visuals';
1
+ import { handlePointerCancel, handlePointerDown, handlePointerLeave, handlePointerMove, handlePointerUp } from './pointer.js';
2
+ import { transmitTransientInput } from './transient-visuals.js';
3
3
  function createInteractionControllerInternal(options) {
4
4
  return {
5
5
  surface: options.surface
@@ -1,3 +1,3 @@
1
- import type { Square } from '../../../state/board/types/internal';
2
- import { InteractionStateSnapshot } from '../../../state/interaction/types/main';
1
+ import type { Square } from '../../../state/board/types/internal.js';
2
+ import { InteractionStateSnapshot } from '../../../state/interaction/types/main.js';
3
3
  export declare function canMoveTo(snapshot: InteractionStateSnapshot, target: Square): boolean;
@@ -1,5 +1,5 @@
1
- import { ScenePointerEvent } from '../../../extensions/types/basic/events';
2
- import { InteractionControllerInternal } from './types';
1
+ import { ScenePointerEvent } from '../../../extensions/types/basic/events.js';
2
+ import { InteractionControllerInternal } from './types.js';
3
3
  export declare function handlePointerDown(state: InteractionControllerInternal, event: ScenePointerEvent): void;
4
4
  export declare function handlePointerMove(state: InteractionControllerInternal, event: ScenePointerEvent): void;
5
5
  export declare function handlePointerUp(state: InteractionControllerInternal, event: ScenePointerEvent): void;
@@ -1,7 +1,7 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { isEmptyPieceCode, isNonEmptyPieceCode } from '../../../state/board/check';
3
- import { fromPieceCode } from '../../../state/board/piece';
4
- import { canMoveTo } from './helpers';
2
+ import { isEmptyPieceCode, isNonEmptyPieceCode } from '../../../state/board/check.js';
3
+ import { fromPieceCode } from '../../../state/board/piece.js';
4
+ import { canMoveTo } from './helpers.js';
5
5
  export function handlePointerDown(state, event) {
6
6
  assert(event.type === 'pointerdown', 'handlePointerDown should only be called for pointerdown events');
7
7
  if (event.button !== 0) {
@@ -1,3 +1,3 @@
1
- import { SceneEvent } from '../../../extensions/types/basic/events';
2
- import { InteractionControllerInternal } from './types';
1
+ import { SceneEvent } from '../../../extensions/types/basic/events.js';
2
+ import { InteractionControllerInternal } from './types.js';
3
3
  export declare function transmitTransientInput(state: InteractionControllerInternal, event: SceneEvent): void;
@@ -1,7 +1,7 @@
1
- import { SceneEvent } from '../../../extensions/types/basic/events';
2
- import { TransientInput } from '../../../extensions/types/basic/transient-visuals';
3
- import { PieceCode, Square } from '../../../state/board/types/internal';
4
- import { InteractionStateSnapshot } from '../../../state/interaction/types/main';
1
+ import { SceneEvent } from '../../../extensions/types/basic/events.js';
2
+ import { TransientInput } from '../../../extensions/types/basic/transient-visuals.js';
3
+ import { PieceCode, Square } from '../../../state/board/types/internal.js';
4
+ import { InteractionStateSnapshot } from '../../../state/interaction/types/main.js';
5
5
  export interface RuntimeInteractionSurface {
6
6
  getInteractionStateSnapshot(): InteractionStateSnapshot;
7
7
  getPieceCodeAt(square: Square): PieceCode;
@@ -1,2 +1,2 @@
1
- import { RuntimeInternal } from './types/main';
1
+ import { RuntimeInternal } from './types/main.js';
2
2
  export declare function runtimeRefreshGeometry(state: RuntimeInternal): void;
@@ -1,5 +1,5 @@
1
- import { runtimeValidateIsMounted } from './lifecycle';
2
- import { runtimeRunMutationPipeline } from './mutation/run';
1
+ import { runtimeValidateIsMounted } from './lifecycle.js';
2
+ import { runtimeRunMutationPipeline } from './mutation/run.js';
3
3
  export function runtimeRefreshGeometry(state) {
4
4
  runtimeValidateIsMounted(state);
5
5
  state.layout.refreshGeometry({
@@ -1,5 +1,5 @@
1
- import { RenderSystem } from '../render/types';
2
- import { RuntimeInternal } from './types/main';
1
+ import { RenderSystem } from '../render/types.js';
2
+ import { RuntimeInternal } from './types/main.js';
3
3
  export declare function runtimeIsMounted(state: RuntimeInternal): boolean;
4
4
  export declare function runtimeValidateIsMounted(state: RuntimeInternal): asserts state is RuntimeInternal & {
5
5
  readonly renderSystem: RuntimeInternal['renderSystem'] & {
@@ -1,6 +1,6 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { createInputAdapter } from './input/adapter/factory';
3
- import { runtimeRefreshGeometry } from './layout';
2
+ import { createInputAdapter } from './input/adapter/factory.js';
3
+ import { runtimeRefreshGeometry } from './layout.js';
4
4
  export function runtimeIsMounted(state) {
5
5
  return state.renderSystem.isMounted;
6
6
  }
@@ -1,2 +1,2 @@
1
- import { RuntimeMutationPipe } from './pipeline';
1
+ import { RuntimeMutationPipe } from './pipeline.js';
2
2
  export declare const extensionSystemUpdatePipe: RuntimeMutationPipe;
@@ -1,2 +1,2 @@
1
- import { RuntimeMutationPipeline } from './pipeline';
1
+ import { RuntimeMutationPipeline } from './pipeline.js';
2
2
  export declare function createRuntimeMutationPipeline(): RuntimeMutationPipeline;
@@ -1,9 +1,9 @@
1
- import { createMutationPipeline } from '../../mutation/pipeline';
2
- import { extensionSystemUpdatePipe } from './extension-update';
3
- import { reconcileInteractionSelectionAfterBoardStateChange } from './interaction';
4
- import { clearLastMoveOnBoardSetPosition, updateLastMoveOnBoardMove } from './last-move';
5
- import { layoutRefreshGeometryPipe } from './layout';
6
- import { requestRenderPipe } from './request-render';
1
+ import { createMutationPipeline } from '../../mutation/pipeline.js';
2
+ import { extensionSystemUpdatePipe } from './extension-update.js';
3
+ import { reconcileInteractionSelectionAfterBoardStateChange } from './interaction.js';
4
+ import { clearLastMoveOnBoardSetPosition, updateLastMoveOnBoardMove } from './last-move.js';
5
+ import { layoutRefreshGeometryPipe } from './layout.js';
6
+ import { requestRenderPipe } from './request-render.js';
7
7
  function buildPreviousContext(current) {
8
8
  return {
9
9
  state: current.state.getSnapshot(),
@@ -1,2 +1,2 @@
1
- import { RuntimeMutationPipe } from './pipeline';
1
+ import { RuntimeMutationPipe } from './pipeline.js';
2
2
  export declare const reconcileInteractionSelectionAfterBoardStateChange: RuntimeMutationPipe;
@@ -1,5 +1,5 @@
1
- import { isEmptyPieceCode } from '../../state/board/check';
2
- import { selectedEqual } from '../../state/interaction/helpers';
1
+ import { isEmptyPieceCode } from '../../state/board/check.js';
2
+ import { selectedEqual } from '../../state/interaction/helpers.js';
3
3
  export const reconcileInteractionSelectionAfterBoardStateChange = (context, mutationSession) => {
4
4
  const { current } = context;
5
5
  if (!mutationSession.hasMutation({ prefixes: ['state.board.'] }) ||
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- "use strict";
1
+ export {};
2
2
  // TODO: Mark dirty layers based on upstream changes.
@@ -1,3 +1,3 @@
1
- import { RuntimeMutationPipe } from './pipeline';
1
+ import { RuntimeMutationPipe } from './pipeline.js';
2
2
  export declare const updateLastMoveOnBoardMove: RuntimeMutationPipe;
3
3
  export declare const clearLastMoveOnBoardSetPosition: RuntimeMutationPipe;
@@ -1,2 +1,2 @@
1
- import { RuntimeMutationPipe } from './pipeline';
1
+ import { RuntimeMutationPipe } from './pipeline.js';
2
2
  export declare const layoutRefreshGeometryPipe: RuntimeMutationPipe;
@@ -1,9 +1,9 @@
1
- import { ExtensionSystem } from '../../extensions/types/main';
2
- import { Layout, LayoutSnapshot } from '../../layout/types';
3
- import { MutationPipe, MutationPipeline } from '../../mutation/types';
4
- import { RenderSystem } from '../../render/types';
5
- import { RuntimeState, RuntimeStateSnapshot } from '../../state/types';
6
- import { RuntimeMutationPayloadByCause } from './types';
1
+ import { ExtensionSystem } from '../../extensions/types/main.js';
2
+ import { Layout, LayoutSnapshot } from '../../layout/types.js';
3
+ import { MutationPipe, MutationPipeline } from '../../mutation/types.js';
4
+ import { RenderSystem } from '../../render/types.js';
5
+ import { RuntimeState, RuntimeStateSnapshot } from '../../state/types.js';
6
+ import { RuntimeMutationPayloadByCause } from './types.js';
7
7
  export interface RuntimeMutationPipelineContext {
8
8
  readonly state: RuntimeState;
9
9
  readonly layout: Layout;
@@ -1,2 +1,2 @@
1
- import { RuntimeMutationPipe } from './pipeline';
1
+ import { RuntimeMutationPipe } from './pipeline.js';
2
2
  export declare const requestRenderPipe: RuntimeMutationPipe;
@@ -1,4 +1,4 @@
1
- import { isFrameRenderable } from '../../extensions/types/basic/update';
1
+ import { isFrameRenderable } from '../../extensions/types/basic/update.js';
2
2
  export const requestRenderPipe = (context) => {
3
3
  const { current } = context;
4
4
  const currentFrame = current.extensionSystem.currentFrame;
@@ -1,2 +1,2 @@
1
- import { RuntimeInternal } from '../types/main';
1
+ import { RuntimeInternal } from '../types/main.js';
2
2
  export declare function runtimeRunMutationPipeline(state: RuntimeInternal): boolean;
@@ -1,9 +1,9 @@
1
- import { LayoutMutationPayloadByCause } from '../../layout/mutation';
2
- import { MutationSession, ReadonlyMutationSession } from '../../mutation/types';
3
- import { BoardStateMutationPayloadByCause } from '../../state/board/mutation';
4
- import { ChangeStateMutationPayloadByCause } from '../../state/change/mutation';
5
- import { InteractionStateMutationPayloadByCause } from '../../state/interaction/mutation';
6
- import { ViewStateMutationPayloadByCause } from '../../state/view/mutation';
1
+ import { LayoutMutationPayloadByCause } from '../../layout/mutation.js';
2
+ import { MutationSession, ReadonlyMutationSession } from '../../mutation/types.js';
3
+ import { BoardStateMutationPayloadByCause } from '../../state/board/mutation.js';
4
+ import { ChangeStateMutationPayloadByCause } from '../../state/change/mutation.js';
5
+ import { InteractionStateMutationPayloadByCause } from '../../state/interaction/mutation.js';
6
+ import { ViewStateMutationPayloadByCause } from '../../state/view/mutation.js';
7
7
  type RuntimeOwnMutationPayloadByCause = {
8
8
  'runtime.interaction.dropTo': undefined;
9
9
  'runtime.interaction.releaseTo': undefined;
@@ -1,9 +1,9 @@
1
- import { AnyExtensionDefinition } from '../../extensions/types/extension';
2
- import { ExtensionRuntimeSurfaceCommands } from '../../extensions/types/surface/commands';
3
- import { RuntimeStateInitOptions } from '../../state/types';
4
- import { InputAdapter } from '../input/adapter/types';
5
- import { InteractionController } from '../input/controller/types';
6
- import { RuntimeMutationPipeline, RuntimeMutationPipelineContext } from '../mutation/pipeline';
1
+ import { AnyExtensionDefinition } from '../../extensions/types/extension.js';
2
+ import { ExtensionRuntimeSurfaceCommands } from '../../extensions/types/surface/commands.js';
3
+ import { RuntimeStateInitOptions } from '../../state/types.js';
4
+ import { InputAdapter } from '../input/adapter/types.js';
5
+ import { InteractionController } from '../input/controller/types.js';
6
+ import { RuntimeMutationPipeline, RuntimeMutationPipelineContext } from '../mutation/pipeline.js';
7
7
  export type RuntimeStatus = 'constructing' | 'unmounted' | 'mounted' | 'destroyed';
8
8
  export interface RuntimeInternal extends RuntimeMutationPipelineContext {
9
9
  readonly mutation: RuntimeMutationPipeline;
@@ -1,6 +1,6 @@
1
- import { ExtensionUIMoveRequestStatus } from '../../extensions/types/context/ui-move';
2
- import { MoveRequest, Square } from '../../state/board/types/internal';
3
- import { MoveDestinationSnapshot } from '../../state/interaction/types/internal';
1
+ import { ExtensionUIMoveRequestStatus } from '../../extensions/types/context/ui-move.js';
2
+ import { MoveRequest, Square } from '../../state/board/types/internal.js';
3
+ import { MoveDestinationSnapshot } from '../../state/interaction/types/internal.js';
4
4
  export interface UIMoveRequestContextInternal {
5
5
  readonly sourceSquare: Square;
6
6
  readonly destination: MoveDestinationSnapshot;
@@ -1,6 +1,6 @@
1
- import { Color, ColorShort, MoveRequestInput, Piece, PiecePositionInput, PiecePositionRecord, PiecePositionRecordShort, PiecePositionRecordString, PieceShort, PieceString, Role, RoleShort, SquareString } from './types/input';
2
- import { EmptyPieceCode, MoveRequest, NonEmptyPieceCode, PieceCode, RolePromotionCode, Square, SquareFile, SquareRank } from './types/internal';
3
- import { BoardStateSnapshot } from './types/main';
1
+ import { Color, ColorShort, MoveRequestInput, Piece, PiecePositionInput, PiecePositionRecord, PiecePositionRecordShort, PiecePositionRecordString, PieceShort, PieceString, Role, RoleShort, SquareString } from './types/input.js';
2
+ import { EmptyPieceCode, MoveRequest, NonEmptyPieceCode, PieceCode, RolePromotionCode, Square, SquareFile, SquareRank } from './types/internal.js';
3
+ import { BoardStateSnapshot } from './types/main.js';
4
4
  export declare function isWhitePieceCode(code: NonEmptyPieceCode): boolean;
5
5
  export declare function isBlackPieceCode(code: NonEmptyPieceCode): boolean;
6
6
  export declare function isOccupied(board: BoardStateSnapshot, sq: Square): boolean;
@@ -1,4 +1,4 @@
1
- import { SQUARE_COUNT } from './types/internal';
1
+ import { SQUARE_COUNT } from './types/internal.js';
2
2
  export function isWhitePieceCode(code) {
3
3
  return code > 0 /* PieceCode.Empty */ && code < 8 /* ColorCode.Black */;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { Square, SquareFile, SquareRank } from './types/internal';
1
+ import type { Square, SquareFile, SquareRank } from './types/internal.js';
2
2
  export declare function fileOf(sq: Square): SquareFile;
3
3
  export declare function rankOf(sq: Square): SquareRank;
4
4
  export declare function squareOf(file: SquareFile, rank: SquareRank): Square;