@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.
- package/CHANGELOG.md +6 -0
- package/dist/animation/planner.d.ts +3 -3
- package/dist/animation/planner.js +4 -4
- package/dist/animation/render/fade.d.ts +4 -4
- package/dist/animation/render/fade.js +1 -1
- package/dist/animation/render/move.d.ts +4 -4
- package/dist/animation/render/move.js +1 -1
- package/dist/animation/render/plan.d.ts +4 -4
- package/dist/animation/render/plan.js +3 -3
- package/dist/animation/render/static.d.ts +4 -4
- package/dist/animation/render/static.js +1 -1
- package/dist/animation/render/types.d.ts +1 -1
- package/dist/animation/types.d.ts +1 -1
- package/dist/extensions/animation/factory.d.ts +1 -1
- package/dist/extensions/animation/factory.js +1 -1
- package/dist/extensions/animation/types.d.ts +1 -1
- package/dist/extensions/factory/main.d.ts +1 -1
- package/dist/extensions/factory/main.js +4 -4
- package/dist/extensions/factory/runtime.d.ts +4 -4
- package/dist/extensions/first-party/active-target/factory.d.ts +1 -1
- package/dist/extensions/first-party/active-target/factory.js +4 -4
- package/dist/extensions/first-party/active-target/types.d.ts +2 -2
- package/dist/extensions/first-party/board-events/factory.d.ts +1 -1
- package/dist/extensions/first-party/board-events/factory.js +6 -4
- package/dist/extensions/first-party/board-events/types.d.ts +6 -6
- package/dist/extensions/first-party/common/helpers.d.ts +2 -2
- package/dist/extensions/first-party/common/helpers.js +1 -1
- package/dist/extensions/first-party/common/types.d.ts +1 -1
- package/dist/extensions/first-party/last-move/factory.d.ts +1 -1
- package/dist/extensions/first-party/last-move/factory.js +4 -4
- package/dist/extensions/first-party/last-move/types.d.ts +2 -2
- package/dist/extensions/first-party/legal-moves/factory.d.ts +1 -1
- package/dist/extensions/first-party/legal-moves/factory.js +6 -6
- package/dist/extensions/first-party/legal-moves/types.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/animation/factory.d.ts +3 -3
- package/dist/extensions/first-party/main-renderer/animation/factory.js +3 -3
- package/dist/extensions/first-party/main-renderer/animation/render.d.ts +3 -3
- package/dist/extensions/first-party/main-renderer/animation/render.js +2 -2
- package/dist/extensions/first-party/main-renderer/animation/types.d.ts +7 -7
- package/dist/extensions/first-party/main-renderer/animation/update.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/animation/update.js +3 -3
- package/dist/extensions/first-party/main-renderer/board/factory.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/board/factory.js +2 -2
- package/dist/extensions/first-party/main-renderer/board/render.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/board/render.js +3 -3
- package/dist/extensions/first-party/main-renderer/board/types.d.ts +3 -3
- package/dist/extensions/first-party/main-renderer/board/update.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/board/update.js +3 -3
- package/dist/extensions/first-party/main-renderer/coordinates/factory.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/coordinates/factory.js +1 -1
- package/dist/extensions/first-party/main-renderer/coordinates/render.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/coordinates/render.js +3 -3
- package/dist/extensions/first-party/main-renderer/coordinates/types.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/drag/factory.d.ts +3 -3
- package/dist/extensions/first-party/main-renderer/drag/factory.js +2 -2
- package/dist/extensions/first-party/main-renderer/drag/render.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/drag/render.js +1 -1
- package/dist/extensions/first-party/main-renderer/drag/types.d.ts +4 -4
- package/dist/extensions/first-party/main-renderer/drag/update.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/drag/update.js +1 -1
- package/dist/extensions/first-party/main-renderer/factory.d.ts +1 -1
- package/dist/extensions/first-party/main-renderer/factory.js +9 -9
- package/dist/extensions/first-party/main-renderer/normalize.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/normalize.js +3 -3
- package/dist/extensions/first-party/main-renderer/pieces/factory.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/pieces/factory.js +2 -2
- package/dist/extensions/first-party/main-renderer/pieces/render.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/pieces/render.js +4 -4
- package/dist/extensions/first-party/main-renderer/pieces/suppress.d.ts +4 -4
- package/dist/extensions/first-party/main-renderer/pieces/types.d.ts +5 -5
- package/dist/extensions/first-party/main-renderer/pieces/update.d.ts +4 -4
- package/dist/extensions/first-party/main-renderer/pieces/update.js +5 -5
- package/dist/extensions/first-party/main-renderer/types/extension.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/types/input.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/types/instance.d.ts +8 -8
- package/dist/extensions/first-party/main-renderer/types/internal.d.ts +2 -2
- package/dist/extensions/first-party/main-renderer/types/template.d.ts +1 -1
- package/dist/extensions/first-party/selected-square/factory.d.ts +1 -1
- package/dist/extensions/first-party/selected-square/factory.js +4 -4
- package/dist/extensions/first-party/selected-square/types.d.ts +2 -2
- package/dist/extensions/index.d.ts +8 -8
- package/dist/extensions/index.js +6 -6
- package/dist/extensions/invalidation/factory.d.ts +1 -1
- package/dist/extensions/types/basic/events.d.ts +2 -2
- package/dist/extensions/types/basic/render.d.ts +2 -2
- package/dist/extensions/types/basic/transient-visuals.d.ts +1 -1
- package/dist/extensions/types/basic/update.d.ts +3 -3
- package/dist/extensions/types/context/animation.d.ts +3 -3
- package/dist/extensions/types/context/render.d.ts +2 -2
- package/dist/extensions/types/context/transient-visuals.d.ts +2 -2
- package/dist/extensions/types/context/ui-move.d.ts +2 -2
- package/dist/extensions/types/context/update.d.ts +4 -4
- package/dist/extensions/types/context/update.js +1 -1
- package/dist/extensions/types/extension.d.ts +8 -8
- package/dist/extensions/types/main.d.ts +8 -8
- package/dist/extensions/types/surface/commands.d.ts +5 -5
- package/dist/extensions/types/surface/events.d.ts +1 -1
- package/dist/extensions/types/surface/main.d.ts +4 -4
- package/dist/extensions/types/wrapper.d.ts +6 -6
- package/dist/extensions/update.d.ts +2 -2
- package/dist/extensions/update.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/layout/factory.d.ts +1 -1
- package/dist/layout/factory.js +1 -1
- package/dist/layout/geometry/factory.d.ts +2 -2
- package/dist/layout/geometry/factory.js +1 -1
- package/dist/layout/geometry/types.d.ts +1 -1
- package/dist/layout/mutation.d.ts +1 -1
- package/dist/layout/reducers.d.ts +1 -1
- package/dist/layout/reducers.js +2 -2
- package/dist/layout/types.d.ts +3 -3
- package/dist/mutation/pipeline.d.ts +1 -1
- package/dist/mutation/pipeline.js +1 -1
- package/dist/mutation/session.d.ts +1 -1
- package/dist/render/factory.d.ts +1 -1
- package/dist/render/factory.js +7 -7
- package/dist/render/mount.d.ts +1 -1
- package/dist/render/mount.js +2 -2
- package/dist/render/rendering/animation.d.ts +1 -1
- package/dist/render/rendering/animation.js +1 -1
- package/dist/render/rendering/helpers.d.ts +1 -1
- package/dist/render/rendering/state.d.ts +2 -2
- package/dist/render/rendering/state.js +2 -2
- package/dist/render/rendering/visuals.d.ts +2 -2
- package/dist/render/rendering/visuals.js +1 -1
- package/dist/render/scheduler/scheduler.d.ts +1 -1
- package/dist/render/svg/factory.d.ts +2 -2
- package/dist/render/svg/factory.js +1 -1
- package/dist/render/svg/helpers.d.ts +1 -1
- package/dist/render/svg/helpers.js +1 -1
- package/dist/render/types.d.ts +5 -5
- package/dist/runtime/factory/helpers.d.ts +2 -2
- package/dist/runtime/factory/helpers.js +3 -3
- package/dist/runtime/factory/input.d.ts +2 -2
- package/dist/runtime/factory/input.js +3 -3
- package/dist/runtime/factory/main.d.ts +1 -1
- package/dist/runtime/factory/main.js +12 -12
- package/dist/runtime/factory/ui-move.d.ts +3 -3
- package/dist/runtime/input/adapter/factory.d.ts +1 -1
- package/dist/runtime/input/adapter/factory.js +1 -1
- package/dist/runtime/input/adapter/helpers.d.ts +3 -3
- package/dist/runtime/input/adapter/pointer.d.ts +2 -2
- package/dist/runtime/input/adapter/pointer.js +2 -2
- package/dist/runtime/input/adapter/types.d.ts +2 -2
- package/dist/runtime/input/controller/factory.d.ts +1 -1
- package/dist/runtime/input/controller/factory.js +2 -2
- package/dist/runtime/input/controller/helpers.d.ts +2 -2
- package/dist/runtime/input/controller/pointer.d.ts +2 -2
- package/dist/runtime/input/controller/pointer.js +3 -3
- package/dist/runtime/input/controller/transient-visuals.d.ts +2 -2
- package/dist/runtime/input/controller/types.d.ts +4 -4
- package/dist/runtime/layout.d.ts +1 -1
- package/dist/runtime/layout.js +2 -2
- package/dist/runtime/lifecycle.d.ts +2 -2
- package/dist/runtime/lifecycle.js +2 -2
- package/dist/runtime/mutation/extension-update.d.ts +1 -1
- package/dist/runtime/mutation/factory.d.ts +1 -1
- package/dist/runtime/mutation/factory.js +6 -6
- package/dist/runtime/mutation/interaction.d.ts +1 -1
- package/dist/runtime/mutation/interaction.js +2 -2
- package/dist/runtime/mutation/invalidation.d.ts +1 -0
- package/dist/runtime/mutation/invalidation.js +1 -1
- package/dist/runtime/mutation/last-move.d.ts +1 -1
- package/dist/runtime/mutation/layout.d.ts +1 -1
- package/dist/runtime/mutation/pipeline.d.ts +6 -6
- package/dist/runtime/mutation/request-render.d.ts +1 -1
- package/dist/runtime/mutation/request-render.js +1 -1
- package/dist/runtime/mutation/run.d.ts +1 -1
- package/dist/runtime/mutation/types.d.ts +6 -6
- package/dist/runtime/types/main.d.ts +6 -6
- package/dist/runtime/types/ui-move.d.ts +3 -3
- package/dist/state/board/check.d.ts +3 -3
- package/dist/state/board/check.js +1 -1
- package/dist/state/board/coords.d.ts +1 -1
- package/dist/state/board/denormalize.d.ts +3 -3
- package/dist/state/board/denormalize.js +4 -4
- package/dist/state/board/factory.d.ts +2 -2
- package/dist/state/board/factory.js +4 -4
- package/dist/state/board/mutation.d.ts +2 -2
- package/dist/state/board/normalize.d.ts +2 -2
- package/dist/state/board/normalize.js +2 -2
- package/dist/state/board/piece.d.ts +1 -1
- package/dist/state/board/position.d.ts +2 -2
- package/dist/state/board/position.js +2 -2
- package/dist/state/board/reducers.d.ts +2 -2
- package/dist/state/board/reducers.js +3 -3
- package/dist/state/board/types/input.d.ts +1 -1
- package/dist/state/board/types/internal.d.ts +1 -1
- package/dist/state/board/types/main.d.ts +3 -3
- package/dist/state/board/types/output.d.ts +2 -2
- package/dist/state/change/factory.d.ts +1 -1
- package/dist/state/change/factory.js +1 -1
- package/dist/state/change/helpers.d.ts +3 -3
- package/dist/state/change/helpers.js +1 -1
- package/dist/state/change/mutation.d.ts +1 -1
- package/dist/state/change/reducers.d.ts +3 -3
- package/dist/state/change/reducers.js +1 -1
- package/dist/state/change/types.d.ts +3 -3
- package/dist/state/factory.d.ts +1 -1
- package/dist/state/factory.js +4 -4
- package/dist/state/interaction/factory.d.ts +1 -1
- package/dist/state/interaction/factory.js +3 -3
- package/dist/state/interaction/helpers.d.ts +2 -2
- package/dist/state/interaction/helpers.js +2 -2
- package/dist/state/interaction/movability.d.ts +3 -3
- package/dist/state/interaction/movability.js +2 -2
- package/dist/state/interaction/mutation.d.ts +1 -1
- package/dist/state/interaction/normalize.d.ts +2 -2
- package/dist/state/interaction/normalize.js +2 -2
- package/dist/state/interaction/reducers.d.ts +3 -3
- package/dist/state/interaction/reducers.js +3 -3
- package/dist/state/interaction/types/input.d.ts +1 -1
- package/dist/state/interaction/types/internal.d.ts +1 -1
- package/dist/state/interaction/types/main.d.ts +4 -4
- package/dist/state/types.d.ts +6 -6
- package/dist/state/view/factory.d.ts +1 -1
- package/dist/state/view/factory.js +2 -2
- package/dist/state/view/mutation.d.ts +1 -1
- package/dist/state/view/reducers.d.ts +2 -2
- package/dist/state/view/types/internal.d.ts +1 -1
- package/dist/state/view/types/main.d.ts +4 -4
- package/dist/wrapper/factory.d.ts +2 -2
- package/dist/wrapper/factory.js +8 -8
- package/dist/wrapper/types.d.ts +4 -4
- package/package.json +1 -1
package/dist/layout/types.d.ts
CHANGED
|
@@ -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,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>;
|
package/dist/render/factory.d.ts
CHANGED
|
@@ -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;
|
package/dist/render/factory.js
CHANGED
|
@@ -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({
|
package/dist/render/mount.d.ts
CHANGED
package/dist/render/mount.js
CHANGED
|
@@ -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 { 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,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,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;
|
package/dist/render/types.d.ts
CHANGED
|
@@ -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;
|
package/dist/runtime/layout.d.ts
CHANGED
|
@@ -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;
|
package/dist/runtime/layout.js
CHANGED
|
@@ -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
|
-
|
|
1
|
+
export {};
|
|
2
2
|
// TODO: Mark dirty layers based on upstream changes.
|
|
@@ -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 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;
|