@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
- import { ExtensionRenderTransientVisualsContext } from '../../../types/context/transient-visuals';
2
- import { ExtensionUpdateContext } from '../../../types/context/update';
3
- import { ExtensionRuntimeSurface } from '../../../types/surface/main';
4
- import { PieceUrls } from '../types/internal';
1
+ import { ExtensionRenderTransientVisualsContext } from '../../../types/context/transient-visuals.js';
2
+ import { ExtensionUpdateContext } from '../../../types/context/update.js';
3
+ import { ExtensionRuntimeSurface } from '../../../types/surface/main.js';
4
+ import { PieceUrls } from '../types/internal.js';
5
5
  export interface MainRendererDragInternal {
6
6
  readonly config: PieceUrls;
7
7
  readonly runtimeSurface: ExtensionRuntimeSurface;
@@ -1,3 +1,3 @@
1
- import { ExtensionUpdateContext } from '../../../types/context/update';
2
- import { MainRendererDragInternal } from './types';
1
+ import { ExtensionUpdateContext } from '../../../types/context/update.js';
2
+ import { MainRendererDragInternal } from './types.js';
3
3
  export declare function rendererDragOnUpdate(state: MainRendererDragInternal, context: ExtensionUpdateContext): void;
@@ -1,5 +1,5 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { isNonEmptyPieceCode } from '../../../../state/board/check';
2
+ import { isNonEmptyPieceCode } from '../../../../state/board/check.js';
3
3
  export function rendererDragOnUpdate(state, context) {
4
4
  const isLiftedDragActive = context.currentFrame.state.interaction.dragSession?.type === 'lifted-piece-drag';
5
5
  if (isLiftedDragActive) {
@@ -1,2 +1,2 @@
1
- import { MainRendererDefinition, MainRendererInitOptions } from './types/extension';
1
+ import { MainRendererDefinition, MainRendererInitOptions } from './types/extension.js';
2
2
  export declare function createMainRenderer(options?: MainRendererInitOptions): MainRendererDefinition;
@@ -1,13 +1,13 @@
1
1
  import { toMerged } from 'es-toolkit';
2
- import { extensionCreateInternalBase, extensionDestroy, extensionMount, extensionUnmount } from '../common/helpers';
3
- import { createMainRendererAnimation } from './animation/factory';
4
- import { createMainRendererBoard } from './board/factory';
5
- import { createMainRendererCoordinates } from './coordinates/factory';
6
- import { createMainRendererDrag } from './drag/factory';
7
- import { normalizeMainRendererConfig } from './normalize';
8
- import { createMainRendererPieces } from './pieces/factory';
9
- import { EXTENSION_ID, EXTENSION_SLOTS } from './types/extension';
10
- import { DEFAULT_MAIN_RENDERER_CONFIG } from './types/internal';
2
+ import { extensionCreateInternalBase, extensionDestroy, extensionMount, extensionUnmount } from '../common/helpers.js';
3
+ import { createMainRendererAnimation } from './animation/factory.js';
4
+ import { createMainRendererBoard } from './board/factory.js';
5
+ import { createMainRendererCoordinates } from './coordinates/factory.js';
6
+ import { createMainRendererDrag } from './drag/factory.js';
7
+ import { normalizeMainRendererConfig } from './normalize.js';
8
+ import { createMainRendererPieces } from './pieces/factory.js';
9
+ import { EXTENSION_ID, EXTENSION_SLOTS } from './types/extension.js';
10
+ import { DEFAULT_MAIN_RENDERER_CONFIG } from './types/internal.js';
11
11
  export function createMainRenderer(options = {}) {
12
12
  const config = toMerged(DEFAULT_MAIN_RENDERER_CONFIG, normalizeMainRendererConfig(options));
13
13
  return {
@@ -1,4 +1,4 @@
1
- import { MainRendererConfigInput, PieceUrlsInput } from './types/input';
2
- import { MainRendererConfig, PieceUrls } from './types/internal';
1
+ import { MainRendererConfigInput, PieceUrlsInput } from './types/input.js';
2
+ import { MainRendererConfig, PieceUrls } from './types/internal.js';
3
3
  export declare function normalizePieceUrls(input: PieceUrlsInput): PieceUrls;
4
4
  export declare function normalizeMainRendererConfig(input: Partial<MainRendererConfigInput>): MainRendererConfig;
@@ -1,7 +1,7 @@
1
1
  import assert from '@ktarmyshov/assert';
2
- import { normalizePiece } from '../../../state/board/normalize';
3
- import { ALL_NON_EMPTY_PIECE_CODES } from '../../../state/board/types/internal';
4
- import { DEFAULT_MAIN_RENDERER_CONFIG } from './types/internal';
2
+ import { normalizePiece } from '../../../state/board/normalize.js';
3
+ import { ALL_NON_EMPTY_PIECE_CODES } from '../../../state/board/types/internal.js';
4
+ import { DEFAULT_MAIN_RENDERER_CONFIG } from './types/internal.js';
5
5
  function assertPieceUrlsComplete(pieceUrls) {
6
6
  for (const pieceCode of ALL_NON_EMPTY_PIECE_CODES) {
7
7
  assert(pieceCode in pieceUrls, `Missing URL for piece code: ${pieceCode}`);
@@ -1,3 +1,3 @@
1
- import { PieceUrls } from '../types/internal';
2
- import { MainRendererPieces } from './types';
1
+ import { PieceUrls } from '../types/internal.js';
2
+ import { MainRendererPieces } from './types.js';
3
3
  export declare function createMainRendererPieces(config: PieceUrls): MainRendererPieces;
@@ -1,5 +1,5 @@
1
- import { rendererPiecesRender } from './render';
2
- import { rendererPiecesOnUpdate, rendererPiecesRefreshSuppressedSquares } from './update';
1
+ import { rendererPiecesRender } from './render.js';
2
+ import { rendererPiecesOnUpdate, rendererPiecesRefreshSuppressedSquares } from './update.js';
3
3
  export function createMainRendererPieces(config) {
4
4
  const state = {
5
5
  config,
@@ -1,3 +1,3 @@
1
- import { ExtensionRenderContext } from '../../../types/context/render';
2
- import { MainRendererPiecesInternal } from './types';
1
+ import { ExtensionRenderContext } from '../../../types/context/render.js';
2
+ import { MainRendererPiecesInternal } from './types.js';
3
3
  export declare function rendererPiecesRender(state: MainRendererPiecesInternal, context: ExtensionRenderContext, layer: SVGElement): void;
@@ -1,7 +1,7 @@
1
- import { createSvgElement, updateElementAttributes } from '../../../../render/svg/helpers';
2
- import { isNonEmptyPieceCode } from '../../../../state/board/check';
3
- import { SQUARE_COUNT } from '../../../../state/board/types/internal';
4
- import { DirtyLayer } from '../types/extension';
1
+ import { createSvgElement, updateElementAttributes } from '../../../../render/svg/helpers.js';
2
+ import { isNonEmptyPieceCode } from '../../../../state/board/check.js';
3
+ import { SQUARE_COUNT } from '../../../../state/board/types/internal.js';
4
+ import { DirtyLayer } from '../types/extension.js';
5
5
  export function rendererPiecesRender(state, context, layer) {
6
6
  if ((context.invalidation.dirtyLayers & DirtyLayer.Pieces) === 0) {
7
7
  return;
@@ -1,5 +1,5 @@
1
- import { Square } from '../../../../state/board/types/internal';
2
- import { ExtensionCleanAnimationContext } from '../../../types/context/animation';
3
- import { ExtensionUpdateContext } from '../../../types/context/update';
4
- import { MainRendererPiecesInternal } from './types';
1
+ import { Square } from '../../../../state/board/types/internal.js';
2
+ import { ExtensionCleanAnimationContext } from '../../../types/context/animation.js';
3
+ import { ExtensionUpdateContext } from '../../../types/context/update.js';
4
+ import { MainRendererPiecesInternal } from './types.js';
5
5
  export declare function calculateSuppressedSquares(_state: MainRendererPiecesInternal, context: ExtensionUpdateContext | ExtensionCleanAnimationContext, animationSuppressedSquares: ReadonlySet<Square>): ReadonlySet<Square>;
@@ -1,8 +1,8 @@
1
- import { Square } from '../../../../state/board/types/internal';
2
- import { ExtensionCleanAnimationContext } from '../../../types/context/animation';
3
- import { ExtensionRenderContext } from '../../../types/context/render';
4
- import { ExtensionUpdateContext } from '../../../types/context/update';
5
- import { PieceUrls } from '../types/internal';
1
+ import { Square } from '../../../../state/board/types/internal.js';
2
+ import { ExtensionCleanAnimationContext } from '../../../types/context/animation.js';
3
+ import { ExtensionRenderContext } from '../../../types/context/render.js';
4
+ import { ExtensionUpdateContext } from '../../../types/context/update.js';
5
+ import { PieceUrls } from '../types/internal.js';
6
6
  type PieceNodeRecord = {
7
7
  root: SVGImageElement;
8
8
  };
@@ -1,6 +1,6 @@
1
- import { Square } from '../../../../state/board/types/internal';
2
- import { ExtensionCleanAnimationContext } from '../../../types/context/animation';
3
- import { ExtensionUpdateContext } from '../../../types/context/update';
4
- import { MainRendererPiecesInternal } from './types';
1
+ import { Square } from '../../../../state/board/types/internal.js';
2
+ import { ExtensionCleanAnimationContext } from '../../../types/context/animation.js';
3
+ import { ExtensionUpdateContext } from '../../../types/context/update.js';
4
+ import { MainRendererPiecesInternal } from './types.js';
5
5
  export declare function rendererPiecesOnUpdate(state: MainRendererPiecesInternal, context: ExtensionUpdateContext, animationSuppressedSquares: ReadonlySet<Square>): void;
6
6
  export declare function rendererPiecesRefreshSuppressedSquares(state: MainRendererPiecesInternal, context: ExtensionCleanAnimationContext, animationSuppressedSquares: ReadonlySet<Square>): void;
@@ -1,8 +1,8 @@
1
- import { setsEqual } from '../../../../helpers/util';
2
- import { piecePositionsEqual } from '../../../../state/board/check';
3
- import { isUpdateContextRenderable } from '../../../types/context/update';
4
- import { DirtyLayer } from '../types/extension';
5
- import { calculateSuppressedSquares } from './suppress';
1
+ import { setsEqual } from '../../../../helpers/util.js';
2
+ import { piecePositionsEqual } from '../../../../state/board/check.js';
3
+ import { isUpdateContextRenderable } from '../../../types/context/update.js';
4
+ import { DirtyLayer } from '../types/extension.js';
5
+ import { calculateSuppressedSquares } from './suppress.js';
6
6
  export function rendererPiecesOnUpdate(state, context, animationSuppressedSquares) {
7
7
  if (!isUpdateContextRenderable(context) ||
8
8
  !context.mutation.hasMutation({
@@ -1,5 +1,5 @@
1
- import { ExtensionDefinition, ExtensionInstance } from '../../../types/extension';
2
- import { MainRendererConfigInput } from './input';
1
+ import { ExtensionDefinition, ExtensionInstance } from '../../../types/extension.js';
2
+ import { MainRendererConfigInput } from './input.js';
3
3
  export type MainRendererInitOptions = Partial<MainRendererConfigInput>;
4
4
  export declare const EXTENSION_SLOTS: readonly ["board", "coordinates", "pieces", "animation", "drag"];
5
5
  export type ExtensionSlotsType = typeof EXTENSION_SLOTS;
@@ -1,4 +1,4 @@
1
- import { PieceString } from '../../../../state/board/types/input';
2
- import { TMainRendererConfig } from './template';
1
+ import { PieceString } from '../../../../state/board/types/input.js';
2
+ import { TMainRendererConfig } from './template.js';
3
3
  export type PieceUrlsInput = Record<PieceString, string>;
4
4
  export type MainRendererConfigInput = TMainRendererConfig<PieceUrlsInput>;
@@ -1,11 +1,11 @@
1
- import { ExtensionRuntimeSurface } from '../../../types/surface/main';
2
- import { ExtensionInternal } from '../../common/types';
3
- import { MainRendererAnimation } from '../animation/types';
4
- import { MainRendererBoard } from '../board/types';
5
- import { MainRendererCoordinates } from '../coordinates/types';
6
- import { MainRendererDrag } from '../drag/types';
7
- import { MainRendererPieces } from '../pieces/types';
8
- import { ExtensionSlotsType } from './extension';
1
+ import { ExtensionRuntimeSurface } from '../../../types/surface/main.js';
2
+ import { ExtensionInternal } from '../../common/types.js';
3
+ import { MainRendererAnimation } from '../animation/types.js';
4
+ import { MainRendererBoard } from '../board/types.js';
5
+ import { MainRendererCoordinates } from '../coordinates/types.js';
6
+ import { MainRendererDrag } from '../drag/types.js';
7
+ import { MainRendererPieces } from '../pieces/types.js';
8
+ import { ExtensionSlotsType } from './extension.js';
9
9
  export interface MainRendererInstanceInternal extends ExtensionInternal<ExtensionSlotsType> {
10
10
  readonly board: MainRendererBoard;
11
11
  readonly coordinates: MainRendererCoordinates;
@@ -1,5 +1,5 @@
1
- import { NonEmptyPieceCode } from '../../../../state/board/types/internal';
2
- import { TMainRendererConfig } from './template';
1
+ import { NonEmptyPieceCode } from '../../../../state/board/types/internal.js';
2
+ import { TMainRendererConfig } from './template.js';
3
3
  export interface ConfigColorPair {
4
4
  light: string;
5
5
  dark: string;
@@ -1,4 +1,4 @@
1
- import { ConfigColors } from './internal';
1
+ import { ConfigColors } from './internal.js';
2
2
  export interface TMainRendererConfig<TPieceUrls> {
3
3
  colors: ConfigColors;
4
4
  pieceUrls: TPieceUrls;
@@ -1,2 +1,2 @@
1
- import { SelectedSquareDefinition, SelectedSquareInitConfig } from './types';
1
+ import { SelectedSquareDefinition, SelectedSquareInitConfig } from './types.js';
2
2
  export declare function createSelectedSquare(config?: SelectedSquareInitConfig): SelectedSquareDefinition;
@@ -1,9 +1,9 @@
1
1
  import assert from '@ktarmyshov/assert';
2
2
  import { toMerged } from 'es-toolkit';
3
- import { createSvgElement, updateElementAttributes } from '../../../render/svg/helpers';
4
- import { isUpdateContextRenderable } from '../../types/context/update';
5
- import { extensionCreateInternalBase, extensionDestroy, extensionMount, extensionUnmount } from '../common/helpers';
6
- import { DEFAULT_CONFIG, EXTENSION_ID, EXTENSION_SLOTS } from './types';
3
+ import { createSvgElement, updateElementAttributes } from '../../../render/svg/helpers.js';
4
+ import { isUpdateContextRenderable } from '../../types/context/update.js';
5
+ import { extensionCreateInternalBase, extensionDestroy, extensionMount, extensionUnmount } from '../common/helpers.js';
6
+ import { DEFAULT_CONFIG, EXTENSION_ID, EXTENSION_SLOTS } from './types.js';
7
7
  export function createSelectedSquare(config = {}) {
8
8
  const mergedConfig = toMerged(DEFAULT_CONFIG, config);
9
9
  return {
@@ -1,6 +1,6 @@
1
1
  import { PartialDeep } from 'type-fest';
2
- import { ExtensionDefinition, ExtensionInstance } from '../../types/extension';
3
- import { ExtensionInternal, OpaqueColor } from '../common/types';
2
+ import { ExtensionDefinition, ExtensionInstance } from '../../types/extension.js';
3
+ import { ExtensionInternal, OpaqueColor } from '../common/types.js';
4
4
  export declare const EXTENSION_SLOTS: readonly ["underPieces"];
5
5
  export type ExtensionSlotsType = typeof EXTENSION_SLOTS;
6
6
  export declare const EXTENSION_ID: "selectedSquare";
@@ -1,8 +1,8 @@
1
- export { createActiveTarget } from './first-party/active-target/factory';
2
- export { createBoardEvents } from './first-party/board-events/factory';
3
- export { createLastMove } from './first-party/last-move/factory';
4
- export { createLegalMoves } from './first-party/legal-moves/factory';
5
- export { createMainRenderer } from './first-party/main-renderer/factory';
6
- export { createSelectedSquare } from './first-party/selected-square/factory';
7
- export type { AnyExtensionDefinition, ExtensionDefinitionId, ExtensionDefinitionPublicApi } from './types/extension';
8
- export type { BuiltInExtensionId, DefaultBuiltinChessboardExtensions } from './types/wrapper';
1
+ export { createActiveTarget } from './first-party/active-target/factory.js';
2
+ export { createBoardEvents } from './first-party/board-events/factory.js';
3
+ export { createLastMove } from './first-party/last-move/factory.js';
4
+ export { createLegalMoves } from './first-party/legal-moves/factory.js';
5
+ export { createMainRenderer } from './first-party/main-renderer/factory.js';
6
+ export { createSelectedSquare } from './first-party/selected-square/factory.js';
7
+ export type { AnyExtensionDefinition, ExtensionDefinitionId, ExtensionDefinitionPublicApi } from './types/extension.js';
8
+ export type { BuiltInExtensionId, DefaultBuiltinChessboardExtensions } from './types/wrapper.js';
@@ -1,6 +1,6 @@
1
- export { createActiveTarget } from './first-party/active-target/factory';
2
- export { createBoardEvents } from './first-party/board-events/factory';
3
- export { createLastMove } from './first-party/last-move/factory';
4
- export { createLegalMoves } from './first-party/legal-moves/factory';
5
- export { createMainRenderer } from './first-party/main-renderer/factory';
6
- export { createSelectedSquare } from './first-party/selected-square/factory';
1
+ export { createActiveTarget } from './first-party/active-target/factory.js';
2
+ export { createBoardEvents } from './first-party/board-events/factory.js';
3
+ export { createLastMove } from './first-party/last-move/factory.js';
4
+ export { createLegalMoves } from './first-party/legal-moves/factory.js';
5
+ export { createMainRenderer } from './first-party/main-renderer/factory.js';
6
+ export { createSelectedSquare } from './first-party/selected-square/factory.js';
@@ -1,2 +1,2 @@
1
- import type { ExtensionInvalidationState } from './types';
1
+ import type { ExtensionInvalidationState } from './types.js';
2
2
  export declare function createExtensionInvalidationState(): ExtensionInvalidationState;
@@ -1,5 +1,5 @@
1
- import { Square } from '../../../state/board/types/internal';
2
- import { ScenePoint } from '../basic/transient-visuals';
1
+ import { Square } from '../../../state/board/types/internal.js';
2
+ import { ScenePoint } from '../basic/transient-visuals.js';
3
3
  interface SceneEventBase {
4
4
  readonly defaultPrevented: boolean;
5
5
  preventDefault(): void;
@@ -1,5 +1,5 @@
1
- import { LayoutSnapshot } from '../../../layout/types';
2
- import { RuntimeStateSnapshot } from '../../../state/types';
1
+ import { LayoutSnapshot } from '../../../layout/types.js';
2
+ import { RuntimeStateSnapshot } from '../../../state/types.js';
3
3
  export interface RenderLayoutSnapshot extends LayoutSnapshot {
4
4
  readonly geometry: NonNullable<LayoutSnapshot['geometry']>;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { Square } from '../../../state/board/types/internal';
1
+ import { Square } from '../../../state/board/types/internal.js';
2
2
  export interface ScenePoint {
3
3
  readonly x: number;
4
4
  readonly y: number;
@@ -1,6 +1,6 @@
1
- import { LayoutSnapshot } from '../../../layout/types';
2
- import { RuntimeStateSnapshot } from '../../../state/types';
3
- import { RenderFrameSnapshot } from './render';
1
+ import { LayoutSnapshot } from '../../../layout/types.js';
2
+ import { RuntimeStateSnapshot } from '../../../state/types.js';
3
+ import { RenderFrameSnapshot } from './render.js';
4
4
  export interface UpdateFrameSnapshotUnmounted {
5
5
  readonly isMounted: false;
6
6
  readonly state: RuntimeStateSnapshot;
@@ -1,6 +1,6 @@
1
- import { ExtensionInvalidationState } from '../../invalidation/types';
2
- import { ExtensionAnimationSession } from '../basic/animation';
3
- import { ExtensionRenderContext } from './render';
1
+ import { ExtensionInvalidationState } from '../../invalidation/types.js';
2
+ import { ExtensionAnimationSession } from '../basic/animation.js';
3
+ import { ExtensionRenderContext } from './render.js';
4
4
  export interface ExtensionSubmittedAnimationSession extends ExtensionAnimationSession {
5
5
  readonly status: 'submitted';
6
6
  }
@@ -1,5 +1,5 @@
1
- import { ExtensionReadonlyInvalidationState } from '../../invalidation/types';
2
- import { RenderFrameSnapshot } from '../basic/render';
1
+ import { ExtensionReadonlyInvalidationState } from '../../invalidation/types.js';
2
+ import { RenderFrameSnapshot } from '../basic/render.js';
3
3
  export interface ExtensionRenderContext {
4
4
  readonly currentFrame: RenderFrameSnapshot;
5
5
  readonly invalidation: ExtensionReadonlyInvalidationState;
@@ -1,6 +1,6 @@
1
1
  import { ReadonlyDeep } from 'type-fest';
2
- import { RenderFrameSnapshot } from '../basic/render';
3
- import { TransientInput } from '../basic/transient-visuals';
2
+ import { RenderFrameSnapshot } from '../basic/render.js';
3
+ import { TransientInput } from '../basic/transient-visuals.js';
4
4
  export interface ExtensionRenderTransientVisualsContext {
5
5
  readonly currentFrame: RenderFrameSnapshot;
6
6
  readonly transientInput: ReadonlyDeep<TransientInput>;
@@ -1,5 +1,5 @@
1
- import { MoveRequest, Square } from '../../../state/board/types/internal';
2
- import { MoveDestinationSnapshot } from '../../../state/interaction/types/internal';
1
+ import { MoveRequest, Square } from '../../../state/board/types/internal.js';
2
+ import { MoveDestinationSnapshot } from '../../../state/interaction/types/internal.js';
3
3
  export type ExtensionUIMoveRequestStatus = 'unresolved' | 'deferred' | 'resolved';
4
4
  export interface ExtensionUIMoveRequestContextSnapshot {
5
5
  readonly status: ExtensionUIMoveRequestStatus;
@@ -1,7 +1,7 @@
1
- import { RuntimeReadonlyMutationSession } from '../../../runtime/mutation/types';
2
- import { ExtensionInvalidationState } from '../../invalidation/types';
3
- import { RenderFrameSnapshot } from '../basic/render';
4
- import { UpdateFrameSnapshot, UpdateFrameSnapshotMounted, UpdateFrameSnapshotUnmounted } from '../basic/update';
1
+ import { RuntimeReadonlyMutationSession } from '../../../runtime/mutation/types.js';
2
+ import { ExtensionInvalidationState } from '../../invalidation/types.js';
3
+ import { RenderFrameSnapshot } from '../basic/render.js';
4
+ import { UpdateFrameSnapshot, UpdateFrameSnapshotMounted, UpdateFrameSnapshotUnmounted } from '../basic/update.js';
5
5
  export interface ExtensionUpdateContextCommon {
6
6
  readonly previousFrame: UpdateFrameSnapshot | null;
7
7
  readonly mutation: RuntimeReadonlyMutationSession;
@@ -1,4 +1,4 @@
1
- import { isFrameMounted, isFrameRenderable } from '../basic/update';
1
+ import { isFrameMounted, isFrameRenderable } from '../basic/update.js';
2
2
  export function isUpdateContextCommonMounted(context) {
3
3
  return isFrameMounted(context.currentFrame);
4
4
  }
@@ -1,11 +1,11 @@
1
- import { SceneEvent } from './basic/events';
2
- import { ExtensionInstanceMountOptions, ExtensionSlotName } from './basic/mount';
3
- import { ExtensionAnimationFinishedContext, ExtensionCleanAnimationContext, ExtensionPrepareAnimationContext, ExtensionRenderAnimationContext } from './context/animation';
4
- import { ExtensionRenderContext } from './context/render';
5
- import { ExtensionRenderTransientVisualsContext } from './context/transient-visuals';
6
- import { ExtensionUIMoveRequestContext } from './context/ui-move';
7
- import { ExtensionUpdateContext } from './context/update';
8
- import { ExtensionRuntimeSurface } from './surface/main';
1
+ import { SceneEvent } from './basic/events.js';
2
+ import { ExtensionInstanceMountOptions, ExtensionSlotName } from './basic/mount.js';
3
+ import { ExtensionAnimationFinishedContext, ExtensionCleanAnimationContext, ExtensionPrepareAnimationContext, ExtensionRenderAnimationContext } from './context/animation.js';
4
+ import { ExtensionRenderContext } from './context/render.js';
5
+ import { ExtensionRenderTransientVisualsContext } from './context/transient-visuals.js';
6
+ import { ExtensionUIMoveRequestContext } from './context/ui-move.js';
7
+ import { ExtensionUpdateContext } from './context/update.js';
8
+ import { ExtensionRuntimeSurface } from './surface/main.js';
9
9
  interface ExtensionInstanceBase<TId extends string, TSlots extends readonly ExtensionSlotName[]> {
10
10
  readonly id: TId;
11
11
  mount(env: ExtensionInstanceMountOptions<TSlots>): void;
@@ -1,11 +1,11 @@
1
- import { RuntimeReadonlyMutationSession } from '../../runtime/mutation/types';
2
- import { ExtensionInvalidationState } from '../invalidation/types';
3
- import { ExtensionAnimationControllerInternalSurface } from './basic/animation';
4
- import { SceneEventType } from './basic/events';
5
- import { UpdateFrameSnapshot } from './basic/update';
6
- import { ExtensionUIMoveRequestContext } from './context/ui-move';
7
- import { AnyExtensionDefinition, AnyExtensionInstance } from './extension';
8
- import { ExtensionRuntimeSurfaceCommands } from './surface/commands';
1
+ import { RuntimeReadonlyMutationSession } from '../../runtime/mutation/types.js';
2
+ import { ExtensionInvalidationState } from '../invalidation/types.js';
3
+ import { ExtensionAnimationControllerInternalSurface } from './basic/animation.js';
4
+ import { SceneEventType } from './basic/events.js';
5
+ import { UpdateFrameSnapshot } from './basic/update.js';
6
+ import { ExtensionUIMoveRequestContext } from './context/ui-move.js';
7
+ import { AnyExtensionDefinition, AnyExtensionInstance } from './extension.js';
8
+ import { ExtensionRuntimeSurfaceCommands } from './surface/commands.js';
9
9
  export interface ExtensionSystemExtensionRecord {
10
10
  readonly id: string;
11
11
  readonly definition: AnyExtensionDefinition;
@@ -1,8 +1,8 @@
1
- import { LayoutSnapshot } from '../../../layout/types';
2
- import { ColorInput, MoveRequestInput, PiecePositionInput, PositionInput, SquareString } from '../../../state/board/types/input';
3
- import { Move } from '../../../state/board/types/internal';
4
- import { MovabilityInput } from '../../../state/interaction/types/input';
5
- import { RuntimeStateSnapshot } from '../../../state/types';
1
+ import { LayoutSnapshot } from '../../../layout/types.js';
2
+ import { ColorInput, MoveRequestInput, PiecePositionInput, PositionInput, SquareString } from '../../../state/board/types/input.js';
3
+ import { Move } from '../../../state/board/types/internal.js';
4
+ import { MovabilityInput } from '../../../state/interaction/types/input.js';
5
+ import { RuntimeStateSnapshot } from '../../../state/types.js';
6
6
  export interface ExtensionRuntimeSurfaceCommandsSnapshot {
7
7
  readonly state: RuntimeStateSnapshot;
8
8
  readonly layout: LayoutSnapshot;
@@ -1,4 +1,4 @@
1
- import { SceneEventType } from '../basic/events';
1
+ import { SceneEventType } from '../basic/events.js';
2
2
  export interface ExtensionRuntimeSurfaceEvents {
3
3
  subscribe(events: Iterable<SceneEventType>): void;
4
4
  unsubscribe(events?: Iterable<SceneEventType>): void;
@@ -1,7 +1,7 @@
1
- import { ExtensionAnimationController } from '../basic/animation';
2
- import { ExtensionRuntimeSurfaceCommands } from './commands';
3
- import { ExtensionRuntimeSurfaceEvents } from './events';
4
- import { ExtensionRuntimeSurfaceTransientVisuals } from './transient-visuals';
1
+ import { ExtensionAnimationController } from '../basic/animation.js';
2
+ import { ExtensionRuntimeSurfaceCommands } from './commands.js';
3
+ import { ExtensionRuntimeSurfaceEvents } from './events.js';
4
+ import { ExtensionRuntimeSurfaceTransientVisuals } from './transient-visuals.js';
5
5
  export interface ExtensionRuntimeSurface {
6
6
  readonly commands: ExtensionRuntimeSurfaceCommands;
7
7
  readonly animation: ExtensionAnimationController;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Public built-in extension ids accepted by createBoard({ extensions })
3
3
  */
4
- import { ActiveTargetDefinition } from '../first-party/active-target/types';
5
- import { BoardEventsDefinition } from '../first-party/board-events/types';
6
- import { LastMoveDefinition } from '../first-party/last-move/types';
7
- import { LegalMovesDefinition } from '../first-party/legal-moves/types';
8
- import { MainRendererDefinition } from '../first-party/main-renderer/types/extension';
9
- import { SelectedSquareDefinition } from '../first-party/selected-square/types';
4
+ import { ActiveTargetDefinition } from '../first-party/active-target/types.js';
5
+ import { BoardEventsDefinition } from '../first-party/board-events/types.js';
6
+ import { LastMoveDefinition } from '../first-party/last-move/types.js';
7
+ import { LegalMovesDefinition } from '../first-party/legal-moves/types.js';
8
+ import { MainRendererDefinition } from '../first-party/main-renderer/types/extension.js';
9
+ import { SelectedSquareDefinition } from '../first-party/selected-square/types.js';
10
10
  export declare const DefaultBuiltinChessboardExtensions: readonly ["mainRenderer", "events", "selectedSquare", "activeTarget", "legalMoves", "lastMove"];
11
11
  export type BuiltInExtensionId = (typeof DefaultBuiltinChessboardExtensions)[number];
12
12
  /**
@@ -1,4 +1,4 @@
1
- import { ExtensionUIMoveRequestContext } from './types/context/ui-move';
2
- import { ExtensionSystemInternal, ExtensionSystemUpdateRequest } from './types/main';
1
+ import { ExtensionUIMoveRequestContext } from './types/context/ui-move.js';
2
+ import { ExtensionSystemInternal, ExtensionSystemUpdateRequest } from './types/main.js';
3
3
  export declare function extensionSystemUpdateState(state: ExtensionSystemInternal, request: ExtensionSystemUpdateRequest): void;
4
4
  export declare function extensionSystemUpdateUIMoveRequest(state: ExtensionSystemInternal, context: ExtensionUIMoveRequestContext): void;
@@ -1,4 +1,4 @@
1
- import { isUpdateContextCommonMounted } from './types/context/update';
1
+ import { isUpdateContextCommonMounted } from './types/context/update.js';
2
2
  export function extensionSystemUpdateState(state, request) {
3
3
  // Prepare base context
4
4
  const contextCommon = {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { createBoard } from './wrapper/factory';
2
- export type { Chessboard, ChessboardExtensionInput, ChessboardInitOptions, ChessboardRuntimeSurface } from './wrapper/types';
3
- export type { MoveRequestInput, PiecePositionRecordString } from './state/board/types/input';
4
- export type { RuntimeStateInitOptions } from './state/types';
1
+ export { createBoard } from './wrapper/factory.js';
2
+ export type { Chessboard, ChessboardExtensionInput, ChessboardInitOptions, ChessboardRuntimeSurface } from './wrapper/types.js';
3
+ export type { MoveRequestInput, PiecePositionRecordString } from './state/board/types/input.js';
4
+ export type { RuntimeStateInitOptions } from './state/types.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { createBoard } from './wrapper/factory';
1
+ export { createBoard } from './wrapper/factory.js';
@@ -1,2 +1,2 @@
1
- import { Layout } from './types';
1
+ import { Layout } from './types.js';
2
2
  export declare function createLayout(): Layout;
@@ -1,5 +1,5 @@
1
1
  import { cloneDeep } from 'es-toolkit/object';
2
- import { layoutRefreshGeometry } from './reducers';
2
+ import { layoutRefreshGeometry } from './reducers.js';
3
3
  function createLayoutInternal() {
4
4
  return {
5
5
  boardSize: 0,
@@ -1,5 +1,5 @@
1
- import { ColorCode } from '../../state/board/types/internal';
2
- import { RenderGeometry } from './types';
1
+ import { ColorCode } from '../../state/board/types/internal.js';
2
+ import { RenderGeometry } from './types.js';
3
3
  /**
4
4
  * Create RenderGeometry for a given board size (in px) and orientation.
5
5
  * - Geometry uses an SVG-local coordinate system with origin at top-left.
@@ -1,4 +1,4 @@
1
- import { fileOf, rankOf } from '../../state/board/coords';
1
+ import { fileOf, rankOf } from '../../state/board/coords.js';
2
2
  /**
3
3
  * Create RenderGeometry for a given board size (in px) and orientation.
4
4
  * - Geometry uses an SVG-local coordinate system with origin at top-left.
@@ -1,5 +1,5 @@
1
1
  import { ReadonlyDeep } from 'type-fest';
2
- import { ColorCode, Square } from '../../state/board/types/internal';
2
+ import { ColorCode, Square } from '../../state/board/types/internal.js';
3
3
  export interface SquareRect {
4
4
  x: number;
5
5
  y: number;
@@ -1,4 +1,4 @@
1
- import type { MutationSession } from '../mutation/types';
1
+ import type { MutationSession } from '../mutation/types.js';
2
2
  export type LayoutMutationPayloadByCause = {
3
3
  'layout.refreshGeometry': undefined;
4
4
  };
@@ -1,2 +1,2 @@
1
- import { LayoutInternal, LayoutRefreshOptions } from './types';
1
+ import { LayoutInternal, LayoutRefreshOptions } from './types.js';
2
2
  export declare function layoutRefreshGeometry(state: LayoutInternal, options: LayoutRefreshOptions): boolean;
@@ -1,5 +1,5 @@
1
- import { createRenderGeometry } from './geometry/factory';
2
- import { measureBoardSize } from './helpers';
1
+ import { createRenderGeometry } from './geometry/factory.js';
2
+ import { measureBoardSize } from './helpers.js';
3
3
  export function layoutRefreshGeometry(state, options) {
4
4
  const orientation = options.orientation ?? state.orientation;
5
5
  if (orientation === null) {