diff --git a/apps/stories/stories/react/Sortable/MultipleLists/MultipleLists.tsx b/apps/stories/stories/react/Sortable/MultipleLists/MultipleLists.tsx index 32242096..e0ece877 100644 --- a/apps/stories/stories/react/Sortable/MultipleLists/MultipleLists.tsx +++ b/apps/stories/stories/react/Sortable/MultipleLists/MultipleLists.tsx @@ -15,9 +15,9 @@ import { Item, Handle, Remove, -} from '../../components/index.js'; -import {createRange} from '../../../utilities/createRange.js'; -import {cloneDeep} from '../../../utilities/cloneDeep.js'; +} from '../../components/index.ts'; +import {createRange} from '../../../utilities/createRange.ts'; +import {cloneDeep} from '../../../utilities/cloneDeep.ts'; interface Props { debug?: boolean; diff --git a/apps/stories/stories/react/Sortable/SortableExample.tsx b/apps/stories/stories/react/Sortable/SortableExample.tsx index 4cddde66..39e5e4d1 100644 --- a/apps/stories/stories/react/Sortable/SortableExample.tsx +++ b/apps/stories/stories/react/Sortable/SortableExample.tsx @@ -13,8 +13,8 @@ import {directionBiased} from '@dnd-kit/collision'; import {move} from '@dnd-kit/helpers'; import {Debug} from '@dnd-kit/dom/plugins/debug'; -import {Item, Handle} from '../components/index.js'; -import {createRange} from '../../utilities/createRange.js'; +import {Item, Handle} from '../components/index.ts'; +import {createRange} from '../../utilities/createRange.ts'; interface Props { debug?: boolean; diff --git a/config/typescript/base.json b/config/typescript/base.json index 12996cd1..f0e174ea 100644 --- a/config/typescript/base.json +++ b/config/typescript/base.json @@ -14,7 +14,9 @@ "noUnusedParameters": false, "preserveWatchOutput": true, "skipLibCheck": true, - "strict": true + "strict": true, + "allowImportingTsExtensions": true, + "emitDeclarationOnly": true }, "exclude": ["node_modules"] } diff --git a/packages/abstract/src/core/collision/index.ts b/packages/abstract/src/core/collision/index.ts index fcb5c8e3..49f16a2a 100644 --- a/packages/abstract/src/core/collision/index.ts +++ b/packages/abstract/src/core/collision/index.ts @@ -1,4 +1,4 @@ -export {CollisionObserver} from './observer.js'; -export {CollisionNotifier} from './notifier.js'; -export {sortCollisions} from './utilities.js'; -export * from './types.js'; +export {CollisionObserver} from './observer.ts'; +export {CollisionNotifier} from './notifier.ts'; +export {sortCollisions} from './utilities.ts'; +export * from './types.ts'; diff --git a/packages/abstract/src/core/collision/notifier.ts b/packages/abstract/src/core/collision/notifier.ts index e41479c6..64cba42f 100644 --- a/packages/abstract/src/core/collision/notifier.ts +++ b/packages/abstract/src/core/collision/notifier.ts @@ -1,8 +1,8 @@ import {effect, untracked} from '@dnd-kit/state'; -import {DragDropManager} from '../manager/index.js'; -import {CorePlugin} from '../plugins/index.js'; -import {defaultPreventable} from '../manager/events.js'; +import {DragDropManager} from '../manager/index.ts'; +import {CorePlugin} from '../plugins/index.ts'; +import {defaultPreventable} from '../manager/events.ts'; export class CollisionNotifier extends CorePlugin { constructor(manager: DragDropManager) { diff --git a/packages/abstract/src/core/collision/observer.ts b/packages/abstract/src/core/collision/observer.ts index 2270d2a4..b337a128 100644 --- a/packages/abstract/src/core/collision/observer.ts +++ b/packages/abstract/src/core/collision/observer.ts @@ -8,11 +8,11 @@ import { effect, } from '@dnd-kit/state'; -import type {DragDropManager} from '../manager/index.js'; -import type {Draggable, Droppable} from '../entities/index.js'; -import {Plugin} from '../plugins/index.js'; -import type {Collision, CollisionDetector, Collisions} from './types.js'; -import {sortCollisions} from './utilities.js'; +import type {DragDropManager} from '../manager/index.ts'; +import type {Draggable, Droppable} from '../entities/index.ts'; +import {Plugin} from '../plugins/index.ts'; +import type {Collision, CollisionDetector, Collisions} from './types.ts'; +import {sortCollisions} from './utilities.ts'; const DEFAULT_VALUE: Collisions = []; diff --git a/packages/abstract/src/core/collision/types.ts b/packages/abstract/src/core/collision/types.ts index e3a78134..349f306e 100644 --- a/packages/abstract/src/core/collision/types.ts +++ b/packages/abstract/src/core/collision/types.ts @@ -1,9 +1,9 @@ -import type {DragOperation} from '../manager/index.js'; +import type {DragOperation} from '../manager/index.ts'; import type { Draggable, Droppable, UniqueIdentifier, -} from '../entities/index.js'; +} from '../entities/index.ts'; export enum CollisionPriority { Lowest, diff --git a/packages/abstract/src/core/collision/utilities.ts b/packages/abstract/src/core/collision/utilities.ts index 538b6f01..0f202ff8 100644 --- a/packages/abstract/src/core/collision/utilities.ts +++ b/packages/abstract/src/core/collision/utilities.ts @@ -1,4 +1,4 @@ -import {Collision} from './types.js'; +import {Collision} from './types.ts'; /** * Sort collisions from greatest to smallest priority diff --git a/packages/abstract/src/core/entities/draggable/draggable.ts b/packages/abstract/src/core/entities/draggable/draggable.ts index da26fcbd..5e5feb68 100644 --- a/packages/abstract/src/core/entities/draggable/draggable.ts +++ b/packages/abstract/src/core/entities/draggable/draggable.ts @@ -1,11 +1,11 @@ import {derived, reactive} from '@dnd-kit/state'; -import {Entity} from '../entity/index.js'; -import type {EntityInput, Data, Type} from '../entity/index.js'; -import {Modifier} from '../../modifiers/index.js'; -import type {Modifiers} from '../../modifiers/index.js'; -import type {DragDropManager} from '../../manager/index.js'; -import {descriptor} from '../../plugins/index.js'; +import {Entity} from '../entity/index.ts'; +import type {EntityInput, Data, Type} from '../entity/index.ts'; +import {Modifier} from '../../modifiers/index.ts'; +import type {Modifiers} from '../../modifiers/index.ts'; +import type {DragDropManager} from '../../manager/index.ts'; +import {descriptor} from '../../plugins/index.ts'; export interface Input< T extends Data = Data, diff --git a/packages/abstract/src/core/entities/draggable/index.ts b/packages/abstract/src/core/entities/draggable/index.ts index 01a1ae40..78c38a35 100644 --- a/packages/abstract/src/core/entities/draggable/index.ts +++ b/packages/abstract/src/core/entities/draggable/index.ts @@ -1,2 +1,2 @@ -export {Draggable} from './draggable.js'; -export type {Input as DraggableInput} from './draggable.js'; +export {Draggable} from './draggable.ts'; +export type {Input as DraggableInput} from './draggable.ts'; diff --git a/packages/abstract/src/core/entities/droppable/droppable.ts b/packages/abstract/src/core/entities/droppable/droppable.ts index 6be17f46..c7445770 100644 --- a/packages/abstract/src/core/entities/droppable/droppable.ts +++ b/packages/abstract/src/core/entities/droppable/droppable.ts @@ -1,14 +1,14 @@ import {derived, effects, reactive, type Effect} from '@dnd-kit/state'; import type {Shape} from '@dnd-kit/geometry'; -import {Entity} from '../entity/index.js'; -import type {EntityInput, Data, Type} from '../entity/index.js'; +import {Entity} from '../entity/index.ts'; +import type {EntityInput, Data, Type} from '../entity/index.ts'; import { CollisionPriority, type CollisionDetector, -} from '../../collision/index.js'; -import type {DragDropManager} from '../../manager/index.js'; -import {Draggable} from '../draggable/draggable.js'; +} from '../../collision/index.ts'; +import type {DragDropManager} from '../../manager/index.ts'; +import {Draggable} from '../draggable/draggable.ts'; export interface Input< T extends Data = Data, diff --git a/packages/abstract/src/core/entities/droppable/index.ts b/packages/abstract/src/core/entities/droppable/index.ts index f133f52b..d561fa9f 100644 --- a/packages/abstract/src/core/entities/droppable/index.ts +++ b/packages/abstract/src/core/entities/droppable/index.ts @@ -1,2 +1,2 @@ -export {Droppable} from './droppable.js'; -export type {Input as DroppableInput} from './droppable.js'; +export {Droppable} from './droppable.ts'; +export type {Input as DroppableInput} from './droppable.ts'; diff --git a/packages/abstract/src/core/entities/entity/entity.ts b/packages/abstract/src/core/entities/entity/entity.ts index c961dbdb..e5e8553d 100644 --- a/packages/abstract/src/core/entities/entity/entity.ts +++ b/packages/abstract/src/core/entities/entity/entity.ts @@ -1,7 +1,7 @@ import {effects, reactive, type Effect} from '@dnd-kit/state'; -import type {DragDropManager} from '../../manager/index.js'; -import type {Data, UniqueIdentifier} from './types.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import type {Data, UniqueIdentifier} from './types.ts'; interface Options { /** diff --git a/packages/abstract/src/core/entities/entity/index.ts b/packages/abstract/src/core/entities/entity/index.ts index 637ad816..c934522a 100644 --- a/packages/abstract/src/core/entities/entity/index.ts +++ b/packages/abstract/src/core/entities/entity/index.ts @@ -1,6 +1,6 @@ -export {Entity} from './entity.js'; -export type {Input as EntityInput} from './entity.js'; +export {Entity} from './entity.ts'; +export type {Input as EntityInput} from './entity.ts'; -export type {Data, Type, UniqueIdentifier} from './types.js'; +export type {Data, Type, UniqueIdentifier} from './types.ts'; -export {EntityRegistry} from './registry.js'; +export {EntityRegistry} from './registry.ts'; diff --git a/packages/abstract/src/core/entities/entity/registry.ts b/packages/abstract/src/core/entities/entity/registry.ts index bb15ef98..c2e0941b 100644 --- a/packages/abstract/src/core/entities/entity/registry.ts +++ b/packages/abstract/src/core/entities/entity/registry.ts @@ -1,7 +1,7 @@ import {signal} from '@dnd-kit/state'; -import type {Entity} from './entity.js'; -import type {UniqueIdentifier} from './types.js'; +import type {Entity} from './entity.ts'; +import type {UniqueIdentifier} from './types.ts'; /** * Reactive class representing a registry for entities. diff --git a/packages/abstract/src/core/entities/index.ts b/packages/abstract/src/core/entities/index.ts index 805f853c..5b89c475 100644 --- a/packages/abstract/src/core/entities/index.ts +++ b/packages/abstract/src/core/entities/index.ts @@ -1,3 +1,3 @@ -export * from './entity/index.js'; -export * from './draggable/index.js'; -export * from './droppable/index.js'; +export * from './entity/index.ts'; +export * from './draggable/index.ts'; +export * from './droppable/index.ts'; diff --git a/packages/abstract/src/core/index.ts b/packages/abstract/src/core/index.ts index 409cd1b3..336a32ce 100644 --- a/packages/abstract/src/core/index.ts +++ b/packages/abstract/src/core/index.ts @@ -1,4 +1,4 @@ -export {DragDropManager, DragOperationStatus} from './manager/index.js'; +export {DragDropManager, DragOperationStatus} from './manager/index.ts'; export type { DragDropManagerInput, DragDropConfiguration, @@ -6,15 +6,15 @@ export type { DragDropEvents, DragOperation, Renderer, -} from './manager/index.js'; +} from './manager/index.ts'; -export {CollisionPriority, sortCollisions} from './collision/index.js'; -export type {Collision, CollisionDetector} from './collision/index.js'; +export {CollisionPriority, sortCollisions} from './collision/index.ts'; +export type {Collision, CollisionDetector} from './collision/index.ts'; -export {Modifier} from './modifiers/index.js'; -export type {Modifiers, ModifierConstructor} from './modifiers/index.js'; +export {Modifier} from './modifiers/index.ts'; +export type {Modifiers, ModifierConstructor} from './modifiers/index.ts'; -export {Draggable, Droppable} from './entities/index.js'; +export {Draggable, Droppable} from './entities/index.ts'; export type { Data, DraggableInput, @@ -22,7 +22,7 @@ export type { Entity, Type, UniqueIdentifier, -} from './entities/index.js'; +} from './entities/index.ts'; export { Plugin, @@ -31,18 +31,18 @@ export { configure, configurator, descriptor, -} from './plugins/index.js'; +} from './plugins/index.ts'; export type { Plugins, PluginConstructor, PluginDescriptor, PluginOptions, -} from './plugins/index.js'; +} from './plugins/index.ts'; -export {Sensor} from './sensors/index.js'; +export {Sensor} from './sensors/index.ts'; export type { Sensors, SensorConstructor, SensorDescriptor, SensorOptions, -} from './sensors/index.js'; +} from './sensors/index.ts'; diff --git a/packages/abstract/src/core/manager/dragOperation.ts b/packages/abstract/src/core/manager/dragOperation.ts index 531c2df2..9f03fb29 100644 --- a/packages/abstract/src/core/manager/dragOperation.ts +++ b/packages/abstract/src/core/manager/dragOperation.ts @@ -6,10 +6,10 @@ import type { Draggable, Droppable, UniqueIdentifier, -} from '../entities/index.js'; +} from '../entities/index.ts'; -import type {DragDropManager} from './manager.js'; -import {defaultPreventable} from './events.js'; +import type {DragDropManager} from './manager.ts'; +import {defaultPreventable} from './events.ts'; export enum Status { Idle = 'idle', diff --git a/packages/abstract/src/core/manager/events.ts b/packages/abstract/src/core/manager/events.ts index e6e41c5a..42975e5d 100644 --- a/packages/abstract/src/core/manager/events.ts +++ b/packages/abstract/src/core/manager/events.ts @@ -1,9 +1,9 @@ import type {Coordinates} from '@dnd-kit/geometry'; -import type {Draggable, Droppable} from '../entities/index.js'; -import type {Collisions} from '../collision/index.js'; -import type {DragDropManager} from './manager.js'; -import type {DragOperation} from './dragOperation.js'; +import type {Draggable, Droppable} from '../entities/index.ts'; +import type {Collisions} from '../collision/index.ts'; +import type {DragDropManager} from './manager.ts'; +import type {DragOperation} from './dragOperation.ts'; export type Events = Record void>; diff --git a/packages/abstract/src/core/manager/index.ts b/packages/abstract/src/core/manager/index.ts index 9b906e59..4f5295f4 100644 --- a/packages/abstract/src/core/manager/index.ts +++ b/packages/abstract/src/core/manager/index.ts @@ -1,8 +1,8 @@ -export {DragDropManager} from './manager.js'; -export type {DragDropManagerInput, DragDropConfiguration} from './manager.js'; -export type {DragDropEvents} from './events.js'; -export {Status as DragOperationStatus} from './dragOperation.js'; -export type {DragOperation, DragOperationManager} from './dragOperation.js'; -export type {DragDropRegistry} from './registry.js'; -export type {InferDraggable, InferDroppable} from './types.js'; -export type {Renderer} from './renderer.js'; +export {DragDropManager} from './manager.ts'; +export type {DragDropManagerInput, DragDropConfiguration} from './manager.ts'; +export type {DragDropEvents} from './events.ts'; +export {Status as DragOperationStatus} from './dragOperation.ts'; +export type {DragOperation, DragOperationManager} from './dragOperation.ts'; +export type {DragDropRegistry} from './registry.ts'; +export type {InferDraggable, InferDroppable} from './types.ts'; +export type {Renderer} from './renderer.ts'; diff --git a/packages/abstract/src/core/manager/manager.ts b/packages/abstract/src/core/manager/manager.ts index 25304e0b..4c9276f8 100644 --- a/packages/abstract/src/core/manager/manager.ts +++ b/packages/abstract/src/core/manager/manager.ts @@ -1,17 +1,17 @@ -import type {Draggable, Droppable} from '../entities/index.js'; -import {CollisionObserver, CollisionNotifier} from '../collision/index.js'; -import type {Plugins, Plugin} from '../plugins/index.js'; -import type {Sensor, Sensors} from '../sensors/index.js'; -import type {Modifier, Modifiers} from '../modifiers/index.js'; +import type {Draggable, Droppable} from '../entities/index.ts'; +import {CollisionObserver, CollisionNotifier} from '../collision/index.ts'; +import type {Plugins, Plugin} from '../plugins/index.ts'; +import type {Sensor, Sensors} from '../sensors/index.ts'; +import type {Modifier, Modifiers} from '../modifiers/index.ts'; -import {DragDropRegistry} from './registry.js'; +import {DragDropRegistry} from './registry.ts'; import { DragOperationManager, type DragOperation, type DragActions, -} from './dragOperation.js'; -import {DragDropMonitor} from './events.js'; -import {defaultRenderer, type Renderer} from './renderer.js'; +} from './dragOperation.ts'; +import {DragDropMonitor} from './events.ts'; +import {defaultRenderer, type Renderer} from './renderer.ts'; export interface DragDropConfiguration { core?: { diff --git a/packages/abstract/src/core/manager/registry.ts b/packages/abstract/src/core/manager/registry.ts index 118bf04b..c772c8d0 100644 --- a/packages/abstract/src/core/manager/registry.ts +++ b/packages/abstract/src/core/manager/registry.ts @@ -5,20 +5,20 @@ import { Droppable, Entity, EntityRegistry, -} from '../entities/index.js'; +} from '../entities/index.ts'; import { PluginRegistry, Plugin, type PluginConstructor, PluginOptions, -} from '../plugins/index.js'; +} from '../plugins/index.ts'; import { Sensor, SensorOptions, type SensorConstructor, -} from '../sensors/index.js'; -import {Modifier, type ModifierConstructor} from '../modifiers/index.js'; -import type {DragDropManager} from './manager.js'; +} from '../sensors/index.ts'; +import {Modifier, type ModifierConstructor} from '../modifiers/index.ts'; +import type {DragDropManager} from './manager.ts'; export class DragDropRegistry< T extends Draggable, diff --git a/packages/abstract/src/core/manager/types.ts b/packages/abstract/src/core/manager/types.ts index 568f9a9d..6d22850c 100644 --- a/packages/abstract/src/core/manager/types.ts +++ b/packages/abstract/src/core/manager/types.ts @@ -1,7 +1,6 @@ -import type {DragDropManager} from './manager.js'; +import type {DragDropManager} from './manager.ts'; export type InferDraggable

= P extends DragDropManager ? T : never; -export type InferDroppable

= P extends DragDropManager - ? T - : never; +export type InferDroppable

= + P extends DragDropManager ? T : never; diff --git a/packages/abstract/src/core/modifiers/index.ts b/packages/abstract/src/core/modifiers/index.ts index c812706f..f6af2fbb 100644 --- a/packages/abstract/src/core/modifiers/index.ts +++ b/packages/abstract/src/core/modifiers/index.ts @@ -1,8 +1,8 @@ -export {Modifier} from './modifier.js'; +export {Modifier} from './modifier.ts'; export type { Modifiers, ModifierConstructor, ModifierDescriptor, ModifierOptions, -} from './modifier.js'; +} from './modifier.ts'; diff --git a/packages/abstract/src/core/modifiers/modifier.ts b/packages/abstract/src/core/modifiers/modifier.ts index ae915704..ece70d22 100644 --- a/packages/abstract/src/core/modifiers/modifier.ts +++ b/packages/abstract/src/core/modifiers/modifier.ts @@ -5,8 +5,8 @@ import { type PluginOptions, type PluginConstructor, type PluginDescriptor, -} from '../plugins/index.js'; -import type {DragDropManager} from '../manager/index.js'; +} from '../plugins/index.ts'; +import type {DragDropManager} from '../manager/index.ts'; export type ModifierOptions = PluginOptions; diff --git a/packages/abstract/src/core/plugins/index.ts b/packages/abstract/src/core/plugins/index.ts index e0d68079..1f8db8f4 100644 --- a/packages/abstract/src/core/plugins/index.ts +++ b/packages/abstract/src/core/plugins/index.ts @@ -1,9 +1,9 @@ -export {Plugin, CorePlugin} from './plugin.js'; -export {PluginRegistry} from './registry.js'; +export {Plugin, CorePlugin} from './plugin.ts'; +export {PluginRegistry} from './registry.ts'; export type { Plugins, PluginConstructor, PluginDescriptor, PluginOptions, -} from './types.js'; -export {configure, configurator, descriptor} from './utilities.js'; +} from './types.ts'; +export {configure, configurator, descriptor} from './utilities.ts'; diff --git a/packages/abstract/src/core/plugins/plugin.ts b/packages/abstract/src/core/plugins/plugin.ts index 74a73031..08882fed 100644 --- a/packages/abstract/src/core/plugins/plugin.ts +++ b/packages/abstract/src/core/plugins/plugin.ts @@ -1,8 +1,8 @@ import {reactive, untracked} from '@dnd-kit/state'; -import type {DragDropManager} from '../manager/index.js'; -import type {PluginOptions} from './types.js'; -import {configure} from './utilities.js'; +import type {DragDropManager} from '../manager/index.ts'; +import type {PluginOptions} from './types.ts'; +import {configure} from './utilities.ts'; /** * An abstract plugin class that can be extended to implement custom diff --git a/packages/abstract/src/core/plugins/registry.ts b/packages/abstract/src/core/plugins/registry.ts index 1faddec2..b80c86bf 100644 --- a/packages/abstract/src/core/plugins/registry.ts +++ b/packages/abstract/src/core/plugins/registry.ts @@ -1,7 +1,7 @@ -import {DragDropManager} from '../manager/index.js'; -import {CorePlugin, type Plugin} from './plugin.js'; -import type {InferPluginOptions, PluginConstructor, Plugins} from './types.js'; -import {descriptor} from './utilities.js'; +import {DragDropManager} from '../manager/index.ts'; +import {CorePlugin, type Plugin} from './plugin.ts'; +import type {InferPluginOptions, PluginConstructor, Plugins} from './types.ts'; +import {descriptor} from './utilities.ts'; export class PluginRegistry< T extends DragDropManager, diff --git a/packages/abstract/src/core/plugins/types.ts b/packages/abstract/src/core/plugins/types.ts index 29049c82..0151fba3 100644 --- a/packages/abstract/src/core/plugins/types.ts +++ b/packages/abstract/src/core/plugins/types.ts @@ -1,5 +1,5 @@ -import type {DragDropManager} from '../manager/index.js'; -import type {Plugin} from './plugin.js'; +import type {DragDropManager} from '../manager/index.ts'; +import type {Plugin} from './plugin.ts'; export type PluginOptions = Record; @@ -24,18 +24,12 @@ export type Plugins< T extends DragDropManager = DragDropManager, > = (PluginConstructor | PluginDescriptor)[]; -export type InferPluginOptions

= P extends PluginConstructor< - any, - any, - infer T -> - ? T - : P extends Plugin - ? T - : never; +export type InferPluginOptions

= + P extends PluginConstructor + ? T + : P extends Plugin + ? T + : never; -export type InferManager

= P extends Plugin< - infer T extends DragDropManager -> - ? T - : never; +export type InferManager

= + P extends Plugin> ? T : never; diff --git a/packages/abstract/src/core/plugins/utilities.ts b/packages/abstract/src/core/plugins/utilities.ts index 6d60eab4..23671fac 100644 --- a/packages/abstract/src/core/plugins/utilities.ts +++ b/packages/abstract/src/core/plugins/utilities.ts @@ -3,7 +3,7 @@ import type { PluginOptions, PluginDescriptor, InferPluginOptions, -} from './types.js'; +} from './types.ts'; export function configure< T extends PluginConstructor, diff --git a/packages/abstract/src/core/sensors/index.ts b/packages/abstract/src/core/sensors/index.ts index 9d4077a2..83a36350 100644 --- a/packages/abstract/src/core/sensors/index.ts +++ b/packages/abstract/src/core/sensors/index.ts @@ -1,7 +1,7 @@ -export {Sensor} from './sensor.js'; +export {Sensor} from './sensor.ts'; export type { Sensors, SensorConstructor, SensorDescriptor, SensorOptions, -} from './sensor.js'; +} from './sensor.ts'; diff --git a/packages/abstract/src/core/sensors/sensor.ts b/packages/abstract/src/core/sensors/sensor.ts index 11044be2..5979638c 100644 --- a/packages/abstract/src/core/sensors/sensor.ts +++ b/packages/abstract/src/core/sensors/sensor.ts @@ -1,13 +1,13 @@ import {CleanupFunction} from '@dnd-kit/state'; -import type {DragDropManager} from '../manager/index.js'; -import type {Draggable} from '../entities/index.js'; +import type {DragDropManager} from '../manager/index.ts'; +import type {Draggable} from '../entities/index.ts'; import { Plugin, type PluginConstructor, type PluginDescriptor, type PluginOptions, -} from '../plugins/index.js'; +} from '../plugins/index.ts'; export type SensorOptions = PluginOptions; diff --git a/packages/abstract/src/modifiers/index.ts b/packages/abstract/src/modifiers/index.ts index 38d50d5b..de9e7c58 100644 --- a/packages/abstract/src/modifiers/index.ts +++ b/packages/abstract/src/modifiers/index.ts @@ -2,6 +2,6 @@ export { AxisModifier, RestrictToHorizontalAxis, RestrictToVerticalAxis, -} from './axis.js'; +} from './axis.ts'; -export {restrictShapeToBoundingRectangle} from './boundingRectangle.js'; +export {restrictShapeToBoundingRectangle} from './boundingRectangle.ts'; diff --git a/packages/collision/src/algorithms/closestCenter.ts b/packages/collision/src/algorithms/closestCenter.ts index 0800deb6..18b7c141 100644 --- a/packages/collision/src/algorithms/closestCenter.ts +++ b/packages/collision/src/algorithms/closestCenter.ts @@ -2,7 +2,7 @@ import {CollisionPriority} from '@dnd-kit/abstract'; import type {CollisionDetector} from '@dnd-kit/abstract'; import {Point} from '@dnd-kit/geometry'; -import {defaultCollisionDetection} from './default.js'; +import {defaultCollisionDetection} from './default.ts'; /** * Returns the distance between the droppable shape and the drag operation shape. diff --git a/packages/collision/src/algorithms/default.ts b/packages/collision/src/algorithms/default.ts index fc361fc6..7f41954f 100644 --- a/packages/collision/src/algorithms/default.ts +++ b/packages/collision/src/algorithms/default.ts @@ -1,7 +1,7 @@ import type {CollisionDetector} from '@dnd-kit/abstract'; -import {pointerIntersection} from './pointerIntersection.js'; -import {shapeIntersection} from './shapeIntersection.js'; +import {pointerIntersection} from './pointerIntersection.ts'; +import {shapeIntersection} from './shapeIntersection.ts'; /** * Returns the droppable that has the greatest intersection area with the diff --git a/packages/collision/src/algorithms/directionBiased.ts b/packages/collision/src/algorithms/directionBiased.ts index c2dd5f75..17a36e30 100644 --- a/packages/collision/src/algorithms/directionBiased.ts +++ b/packages/collision/src/algorithms/directionBiased.ts @@ -2,7 +2,7 @@ import {CollisionPriority} from '@dnd-kit/abstract'; import type {CollisionDetector} from '@dnd-kit/abstract'; import {Point} from '@dnd-kit/geometry'; -import {defaultCollisionDetection} from './default.js'; +import {defaultCollisionDetection} from './default.ts'; export const directionBiased: CollisionDetector = ({ dragOperation, diff --git a/packages/collision/src/algorithms/index.ts b/packages/collision/src/algorithms/index.ts index 5294ee08..ae6aca0a 100644 --- a/packages/collision/src/algorithms/index.ts +++ b/packages/collision/src/algorithms/index.ts @@ -1,6 +1,6 @@ -export {defaultCollisionDetection} from './default.js'; -export {closestCenter} from './closestCenter.js'; -export {pointerIntersection} from './pointerIntersection.js'; -export {shapeIntersection} from './shapeIntersection.js'; -export {directionBiased} from './directionBiased.js'; -export {pointerDistance} from './pointerDistance.js'; +export {defaultCollisionDetection} from './default.ts'; +export {closestCenter} from './closestCenter.ts'; +export {pointerIntersection} from './pointerIntersection.ts'; +export {shapeIntersection} from './shapeIntersection.ts'; +export {directionBiased} from './directionBiased.ts'; +export {pointerDistance} from './pointerDistance.ts'; diff --git a/packages/collision/src/index.ts b/packages/collision/src/index.ts index 6e989df1..d4cab728 100644 --- a/packages/collision/src/index.ts +++ b/packages/collision/src/index.ts @@ -6,4 +6,4 @@ export { pointerDistance, pointerIntersection, shapeIntersection, -} from './algorithms/index.js'; +} from './algorithms/index.ts'; diff --git a/packages/dom/src/core/entities/draggable/draggable.ts b/packages/dom/src/core/entities/draggable/draggable.ts index e614fdc1..1d8b20b8 100644 --- a/packages/dom/src/core/entities/draggable/draggable.ts +++ b/packages/dom/src/core/entities/draggable/draggable.ts @@ -10,7 +10,7 @@ import type { } from '@dnd-kit/abstract'; import {effect, reactive} from '@dnd-kit/state'; -import type {Sensors} from '../../sensors/index.js'; +import type {Sensors} from '../../sensors/index.ts'; export type FeedbackType = 'default' | 'move' | 'clone' | 'none'; diff --git a/packages/dom/src/core/entities/draggable/index.ts b/packages/dom/src/core/entities/draggable/index.ts index 597689cc..a73bcd02 100644 --- a/packages/dom/src/core/entities/draggable/index.ts +++ b/packages/dom/src/core/entities/draggable/index.ts @@ -1,2 +1,2 @@ -export {Draggable} from './draggable.js'; -export type {Input as DraggableInput, FeedbackType} from './draggable.js'; +export {Draggable} from './draggable.ts'; +export type {Input as DraggableInput, FeedbackType} from './draggable.ts'; diff --git a/packages/dom/src/core/entities/droppable/index.ts b/packages/dom/src/core/entities/droppable/index.ts index f133f52b..d561fa9f 100644 --- a/packages/dom/src/core/entities/droppable/index.ts +++ b/packages/dom/src/core/entities/droppable/index.ts @@ -1,2 +1,2 @@ -export {Droppable} from './droppable.js'; -export type {Input as DroppableInput} from './droppable.js'; +export {Droppable} from './droppable.ts'; +export type {Input as DroppableInput} from './droppable.ts'; diff --git a/packages/dom/src/core/entities/index.ts b/packages/dom/src/core/entities/index.ts index 5d692abc..be4f70b5 100644 --- a/packages/dom/src/core/entities/index.ts +++ b/packages/dom/src/core/entities/index.ts @@ -1,2 +1,2 @@ -export * from './draggable/index.js'; -export * from './droppable/index.js'; +export * from './draggable/index.ts'; +export * from './droppable/index.ts'; diff --git a/packages/dom/src/core/index.ts b/packages/dom/src/core/index.ts index 4f03d3a2..29a8f4e0 100644 --- a/packages/dom/src/core/index.ts +++ b/packages/dom/src/core/index.ts @@ -1,15 +1,15 @@ -export {DragDropManager, defaultPreset} from './manager/index.js'; -export type {DragDropManagerInput} from './manager/index.js'; +export {DragDropManager, defaultPreset} from './manager/index.ts'; +export type {DragDropManagerInput} from './manager/index.ts'; -export {Draggable, Droppable} from './entities/index.js'; +export {Draggable, Droppable} from './entities/index.ts'; export type { DraggableInput, FeedbackType, DroppableInput, -} from './entities/index.js'; +} from './entities/index.ts'; -export {PointerSensor, KeyboardSensor} from './sensors/index.js'; -export type {Sensors} from './sensors/index.js'; +export {PointerSensor, KeyboardSensor} from './sensors/index.ts'; +export type {Sensors} from './sensors/index.ts'; export { Accessibility, @@ -17,5 +17,5 @@ export { Feedback, Scroller, ScrollListener, -} from './plugins/index.js'; -export type {Transition} from './plugins/index.js'; +} from './plugins/index.ts'; +export type {Transition} from './plugins/index.ts'; diff --git a/packages/dom/src/core/manager/index.ts b/packages/dom/src/core/manager/index.ts index 9685a62d..c9fd7cec 100644 --- a/packages/dom/src/core/manager/index.ts +++ b/packages/dom/src/core/manager/index.ts @@ -1,2 +1,2 @@ -export {DragDropManager, defaultPreset} from './manager.js'; -export type {Input as DragDropManagerInput} from './manager.js'; +export {DragDropManager, defaultPreset} from './manager.ts'; +export type {Input as DragDropManagerInput} from './manager.ts'; diff --git a/packages/dom/src/core/manager/manager.ts b/packages/dom/src/core/manager/manager.ts index 39bdcfa7..6e257111 100644 --- a/packages/dom/src/core/manager/manager.ts +++ b/packages/dom/src/core/manager/manager.ts @@ -5,7 +5,7 @@ import { type Sensors, } from '@dnd-kit/abstract'; -import type {Draggable, Droppable} from '../entities/index.js'; +import type {Draggable, Droppable} from '../entities/index.ts'; import { Accessibility, AutoScroller, @@ -14,8 +14,8 @@ import { Scroller, ScrollListener, PreventSelection, -} from '../plugins/index.js'; -import {KeyboardSensor, PointerSensor} from '../sensors/index.js'; +} from '../plugins/index.ts'; +import {KeyboardSensor, PointerSensor} from '../sensors/index.ts'; export interface Input extends DragDropManagerInput {} diff --git a/packages/dom/src/core/plugins/accessibility/Accessibility.ts b/packages/dom/src/core/plugins/accessibility/Accessibility.ts index 50ddb74c..97ebbae5 100644 --- a/packages/dom/src/core/plugins/accessibility/Accessibility.ts +++ b/packages/dom/src/core/plugins/accessibility/Accessibility.ts @@ -1,18 +1,18 @@ import {effects} from '@dnd-kit/state'; import {Plugin} from '@dnd-kit/abstract'; -import type {DragDropManager} from '../../manager/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; import { defaultAnnouncements, defaultAttributes, defaultAnnouncementIdPrefix, defaultDescriptionIdPrefix, defaultScreenReaderInstructions, -} from './defaults.js'; -import type {Announcements, ScreenReaderInstructions} from './types.js'; -import {generateUniqueId, isFocusable} from './utilities.js'; -import {createHiddenText} from './HiddenText.js'; -import {createLiveRegion} from './LiveRegion.js'; +} from './defaults.ts'; +import type {Announcements, ScreenReaderInstructions} from './types.ts'; +import {generateUniqueId, isFocusable} from './utilities.ts'; +import {createHiddenText} from './HiddenText.ts'; +import {createLiveRegion} from './LiveRegion.ts'; interface Options { id?: string; diff --git a/packages/dom/src/core/plugins/accessibility/defaults.ts b/packages/dom/src/core/plugins/accessibility/defaults.ts index d50925ca..41520389 100644 --- a/packages/dom/src/core/plugins/accessibility/defaults.ts +++ b/packages/dom/src/core/plugins/accessibility/defaults.ts @@ -1,4 +1,4 @@ -import type {Announcements, ScreenReaderInstructions} from './types.js'; +import type {Announcements, ScreenReaderInstructions} from './types.ts'; export const defaultAttributes = { role: 'button', diff --git a/packages/dom/src/core/plugins/accessibility/index.ts b/packages/dom/src/core/plugins/accessibility/index.ts index 6f9174ca..47ed6a8c 100644 --- a/packages/dom/src/core/plugins/accessibility/index.ts +++ b/packages/dom/src/core/plugins/accessibility/index.ts @@ -1 +1 @@ -export {Accessibility} from './Accessibility.js'; +export {Accessibility} from './Accessibility.ts'; diff --git a/packages/dom/src/core/plugins/accessibility/types.ts b/packages/dom/src/core/plugins/accessibility/types.ts index fedb85ee..dadc46bd 100644 --- a/packages/dom/src/core/plugins/accessibility/types.ts +++ b/packages/dom/src/core/plugins/accessibility/types.ts @@ -1,6 +1,6 @@ import type {DragDropEvents} from '@dnd-kit/abstract'; -import type {DragDropManager} from '../../manager/index.js'; -import type {Draggable, Droppable} from '../../entities/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import type {Draggable, Droppable} from '../../entities/index.ts'; export type GetAnnouncementForEvent< Key extends keyof DragDropEvents, diff --git a/packages/dom/src/core/plugins/cursor/Cursor.ts b/packages/dom/src/core/plugins/cursor/Cursor.ts index 04b6a6aa..db65fa76 100644 --- a/packages/dom/src/core/plugins/cursor/Cursor.ts +++ b/packages/dom/src/core/plugins/cursor/Cursor.ts @@ -1,7 +1,7 @@ import {Plugin} from '@dnd-kit/abstract'; import {effect} from '@dnd-kit/state'; -import {DragDropManager} from '../../manager/index.js'; +import {DragDropManager} from '../../manager/index.ts'; interface CursorPluginOptions { /** diff --git a/packages/dom/src/core/plugins/cursor/index.ts b/packages/dom/src/core/plugins/cursor/index.ts index 87761c9f..3ee939e4 100644 --- a/packages/dom/src/core/plugins/cursor/index.ts +++ b/packages/dom/src/core/plugins/cursor/index.ts @@ -1 +1 @@ -export {Cursor} from './Cursor.js'; +export {Cursor} from './Cursor.ts'; diff --git a/packages/dom/src/core/plugins/feedback/Feedback.ts b/packages/dom/src/core/plugins/feedback/Feedback.ts index 57b9000f..ae7cabc6 100644 --- a/packages/dom/src/core/plugins/feedback/Feedback.ts +++ b/packages/dom/src/core/plugins/feedback/Feedback.ts @@ -14,7 +14,7 @@ import { } from '@dnd-kit/dom/utilities'; import {Coordinates} from '@dnd-kit/geometry'; -import {DragDropManager} from '../../manager/index.js'; +import {DragDropManager} from '../../manager/index.ts'; const ATTR_PREFIX = 'data-dnd-kit-'; const CSS_PREFIX = '--dnd-kit-feedback-'; diff --git a/packages/dom/src/core/plugins/feedback/index.ts b/packages/dom/src/core/plugins/feedback/index.ts index 80cda8d5..cc95050e 100644 --- a/packages/dom/src/core/plugins/feedback/index.ts +++ b/packages/dom/src/core/plugins/feedback/index.ts @@ -1,2 +1,2 @@ -export {Feedback} from './Feedback.js'; -export type {Transition} from './types.js'; +export {Feedback} from './Feedback.ts'; +export type {Transition} from './types.ts'; diff --git a/packages/dom/src/core/plugins/index.ts b/packages/dom/src/core/plugins/index.ts index 186ce5cf..73db8fee 100644 --- a/packages/dom/src/core/plugins/index.ts +++ b/packages/dom/src/core/plugins/index.ts @@ -1,10 +1,10 @@ -export {Accessibility} from './accessibility/index.js'; +export {Accessibility} from './accessibility/index.ts'; -export {Cursor} from './cursor/index.js'; +export {Cursor} from './cursor/index.ts'; -export {Feedback} from './feedback/index.js'; -export type {Transition} from './feedback/types.js'; +export {Feedback} from './feedback/index.ts'; +export type {Transition} from './feedback/types.ts'; -export {AutoScroller, Scroller, ScrollListener} from './scrolling/index.js'; +export {AutoScroller, Scroller, ScrollListener} from './scrolling/index.ts'; -export {PreventSelection} from './selection/PreventSelection.js'; +export {PreventSelection} from './selection/PreventSelection.ts'; diff --git a/packages/dom/src/core/plugins/scrolling/AutoScroller.ts b/packages/dom/src/core/plugins/scrolling/AutoScroller.ts index e59b288f..27d1140b 100644 --- a/packages/dom/src/core/plugins/scrolling/AutoScroller.ts +++ b/packages/dom/src/core/plugins/scrolling/AutoScroller.ts @@ -2,8 +2,8 @@ import {Plugin} from '@dnd-kit/abstract'; import {effect} from '@dnd-kit/state'; import type {CleanupFunction} from '@dnd-kit/state'; -import type {DragDropManager} from '../../manager/index.js'; -import {Scroller} from './Scroller.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import {Scroller} from './Scroller.ts'; interface Options {} diff --git a/packages/dom/src/core/plugins/scrolling/ScrollIntent.ts b/packages/dom/src/core/plugins/scrolling/ScrollIntent.ts index e9312b6b..f0715129 100644 --- a/packages/dom/src/core/plugins/scrolling/ScrollIntent.ts +++ b/packages/dom/src/core/plugins/scrolling/ScrollIntent.ts @@ -4,9 +4,9 @@ import {Axes} from '@dnd-kit/geometry'; import type {Coordinates} from '@dnd-kit/geometry'; import {ScrollDirection} from '@dnd-kit/dom/utilities'; -import type {DragDropManager} from '../../manager/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; -import {ScrollLock} from './ScrollLock.js'; +import {ScrollLock} from './ScrollLock.ts'; const DIRECTIONS = [ScrollDirection.Forward, ScrollDirection.Reverse]; diff --git a/packages/dom/src/core/plugins/scrolling/ScrollListener.ts b/packages/dom/src/core/plugins/scrolling/ScrollListener.ts index 9e5727c2..cafad99c 100644 --- a/packages/dom/src/core/plugins/scrolling/ScrollListener.ts +++ b/packages/dom/src/core/plugins/scrolling/ScrollListener.ts @@ -1,7 +1,7 @@ import {DragOperationStatus, CorePlugin} from '@dnd-kit/abstract'; import {effect} from '@dnd-kit/state'; -import type {DragDropManager} from '../../manager/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; const listenerOptions: AddEventListenerOptions = { capture: true, diff --git a/packages/dom/src/core/plugins/scrolling/Scroller.ts b/packages/dom/src/core/plugins/scrolling/Scroller.ts index b3d2e7b5..604303a5 100644 --- a/packages/dom/src/core/plugins/scrolling/Scroller.ts +++ b/packages/dom/src/core/plugins/scrolling/Scroller.ts @@ -10,9 +10,9 @@ import { } from '@dnd-kit/dom/utilities'; import {Axes, type Coordinates} from '@dnd-kit/geometry'; -import type {DragDropManager} from '../../manager/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; -import {ScrollIntentTracker} from './ScrollIntent.js'; +import {ScrollIntentTracker} from './ScrollIntent.ts'; export class Scroller extends CorePlugin { public getScrollableElements: () => Element[] | null; diff --git a/packages/dom/src/core/plugins/scrolling/index.ts b/packages/dom/src/core/plugins/scrolling/index.ts index e93d1384..5978ab20 100644 --- a/packages/dom/src/core/plugins/scrolling/index.ts +++ b/packages/dom/src/core/plugins/scrolling/index.ts @@ -1,3 +1,3 @@ -export {Scroller} from './Scroller.js'; -export {AutoScroller} from './AutoScroller.js'; -export {ScrollListener} from './ScrollListener.js'; +export {Scroller} from './Scroller.ts'; +export {AutoScroller} from './AutoScroller.ts'; +export {ScrollListener} from './ScrollListener.ts'; diff --git a/packages/dom/src/core/plugins/selection/PreventSelection.ts b/packages/dom/src/core/plugins/selection/PreventSelection.ts index 049817a2..8580da84 100644 --- a/packages/dom/src/core/plugins/selection/PreventSelection.ts +++ b/packages/dom/src/core/plugins/selection/PreventSelection.ts @@ -1,7 +1,7 @@ import {Plugin} from '@dnd-kit/abstract'; import {effect} from '@dnd-kit/state'; -import {DragDropManager} from '../../manager/index.js'; +import {DragDropManager} from '../../manager/index.ts'; export class PreventSelection extends Plugin { constructor(public manager: DragDropManager) { diff --git a/packages/dom/src/core/sensors/drag/DragSensor.ts b/packages/dom/src/core/sensors/drag/DragSensor.ts index 4fed263b..5f6581ad 100644 --- a/packages/dom/src/core/sensors/drag/DragSensor.ts +++ b/packages/dom/src/core/sensors/drag/DragSensor.ts @@ -3,10 +3,10 @@ import {effect} from '@dnd-kit/state'; import type {CleanupFunction} from '@dnd-kit/state'; import {Listeners} from '@dnd-kit/dom/utilities'; -import type {DragDropManager} from '../../manager/index.js'; -import type {Draggable} from '../../entities/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import type {Draggable} from '../../entities/index.ts'; -import {encode, decode} from './encoding.js'; +import {encode, decode} from './encoding.ts'; interface DragSensorOptions {} diff --git a/packages/dom/src/core/sensors/drag/index.ts b/packages/dom/src/core/sensors/drag/index.ts index 81a69f74..910e5048 100644 --- a/packages/dom/src/core/sensors/drag/index.ts +++ b/packages/dom/src/core/sensors/drag/index.ts @@ -1 +1 @@ -export {DragSensor} from './DragSensor.js'; +export {DragSensor} from './DragSensor.ts'; diff --git a/packages/dom/src/core/sensors/index.ts b/packages/dom/src/core/sensors/index.ts index eacd3aa9..116df3ea 100644 --- a/packages/dom/src/core/sensors/index.ts +++ b/packages/dom/src/core/sensors/index.ts @@ -1,5 +1,5 @@ -export {KeyboardSensor} from './keyboard/index.js'; +export {KeyboardSensor} from './keyboard/index.ts'; -export {PointerSensor} from './pointer/index.js'; +export {PointerSensor} from './pointer/index.ts'; -export type {Sensors} from './types.js'; +export type {Sensors} from './types.ts'; diff --git a/packages/dom/src/core/sensors/keyboard/KeyboardSensor.ts b/packages/dom/src/core/sensors/keyboard/KeyboardSensor.ts index 853c4028..43f368c9 100644 --- a/packages/dom/src/core/sensors/keyboard/KeyboardSensor.ts +++ b/packages/dom/src/core/sensors/keyboard/KeyboardSensor.ts @@ -9,9 +9,9 @@ import { Listeners, } from '@dnd-kit/dom/utilities'; -import type {DragDropManager} from '../../manager/index.js'; -import type {Draggable} from '../../entities/index.js'; -import {AutoScroller} from '../../plugins/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import type {Draggable} from '../../entities/index.ts'; +import {AutoScroller} from '../../plugins/index.ts'; export type KeyCode = KeyboardEvent['code']; diff --git a/packages/dom/src/core/sensors/keyboard/index.ts b/packages/dom/src/core/sensors/keyboard/index.ts index 2bd1137e..d2b9f25a 100644 --- a/packages/dom/src/core/sensors/keyboard/index.ts +++ b/packages/dom/src/core/sensors/keyboard/index.ts @@ -1 +1 @@ -export {KeyboardSensor} from './KeyboardSensor.js'; +export {KeyboardSensor} from './KeyboardSensor.ts'; diff --git a/packages/dom/src/core/sensors/pointer/PointerSensor.ts b/packages/dom/src/core/sensors/pointer/PointerSensor.ts index 37121722..70edf11a 100644 --- a/packages/dom/src/core/sensors/pointer/PointerSensor.ts +++ b/packages/dom/src/core/sensors/pointer/PointerSensor.ts @@ -8,8 +8,8 @@ import { } from '@dnd-kit/geometry'; import {getDocument, Listeners} from '@dnd-kit/dom/utilities'; -import type {DragDropManager} from '../../manager/index.js'; -import type {Draggable} from '../../entities/index.js'; +import type {DragDropManager} from '../../manager/index.ts'; +import type {Draggable} from '../../entities/index.ts'; export interface DelayConstraint { value: number; diff --git a/packages/dom/src/core/sensors/pointer/index.ts b/packages/dom/src/core/sensors/pointer/index.ts index b09bcff2..918d32a3 100644 --- a/packages/dom/src/core/sensors/pointer/index.ts +++ b/packages/dom/src/core/sensors/pointer/index.ts @@ -1 +1 @@ -export {PointerSensor} from './PointerSensor.js'; +export {PointerSensor} from './PointerSensor.ts'; diff --git a/packages/dom/src/core/sensors/types.ts b/packages/dom/src/core/sensors/types.ts index bdd425d4..adc027b1 100644 --- a/packages/dom/src/core/sensors/types.ts +++ b/packages/dom/src/core/sensors/types.ts @@ -1,5 +1,5 @@ import type {Sensors as AbstractSensors} from '@dnd-kit/abstract'; -import type {DragDropManager} from '../manager/index.js'; +import type {DragDropManager} from '../manager/index.ts'; export type Sensors = AbstractSensors; diff --git a/packages/dom/src/modifiers/index.ts b/packages/dom/src/modifiers/index.ts index adb020fe..aca5e8a1 100644 --- a/packages/dom/src/modifiers/index.ts +++ b/packages/dom/src/modifiers/index.ts @@ -1,2 +1,2 @@ -export {RestrictToWindow} from './RestrictToWindow.js'; -export {RestrictToElement} from './RestrictToElement.js'; +export {RestrictToWindow} from './RestrictToWindow.ts'; +export {RestrictToElement} from './RestrictToElement.ts'; diff --git a/packages/dom/src/plugins/debug/index.ts b/packages/dom/src/plugins/debug/index.ts index 9e458043..79f917ff 100644 --- a/packages/dom/src/plugins/debug/index.ts +++ b/packages/dom/src/plugins/debug/index.ts @@ -1 +1 @@ -export {Debug} from './debug.js'; +export {Debug} from './debug.ts'; diff --git a/packages/dom/src/sortable/OptimisticSortingPlugin.ts b/packages/dom/src/sortable/OptimisticSortingPlugin.ts index c9c62d36..8aba7526 100644 --- a/packages/dom/src/sortable/OptimisticSortingPlugin.ts +++ b/packages/dom/src/sortable/OptimisticSortingPlugin.ts @@ -2,8 +2,8 @@ import {Plugin, UniqueIdentifier} from '@dnd-kit/abstract'; import type {DragDropManager} from '@dnd-kit/dom'; import {arrayMove} from '@dnd-kit/helpers'; -import {isSortable} from './utilities.js'; -import {Sortable, SortableDroppable} from './sortable.js'; +import {isSortable} from './utilities.ts'; +import {Sortable, SortableDroppable} from './sortable.ts'; import {batch} from '@dnd-kit/state'; export class OptimisticSortingPlugin extends Plugin { diff --git a/packages/dom/src/sortable/SortableKeyboardPlugin.ts b/packages/dom/src/sortable/SortableKeyboardPlugin.ts index 73882845..12d1e112 100644 --- a/packages/dom/src/sortable/SortableKeyboardPlugin.ts +++ b/packages/dom/src/sortable/SortableKeyboardPlugin.ts @@ -11,7 +11,7 @@ import type {Coordinates} from '@dnd-kit/geometry'; import {Scroller} from '@dnd-kit/dom'; import type {DragDropManager, Droppable} from '@dnd-kit/dom'; -import {isSortable} from './utilities.js'; +import {isSortable} from './utilities.ts'; const TOLERANCE = 10; diff --git a/packages/dom/src/sortable/index.ts b/packages/dom/src/sortable/index.ts index 0eb6fc03..40cfd78f 100644 --- a/packages/dom/src/sortable/index.ts +++ b/packages/dom/src/sortable/index.ts @@ -1,2 +1,2 @@ -export {Sortable, defaultSortableTransition} from './sortable.js'; -export type {SortableInput, SortableTransition} from './sortable.js'; +export {Sortable, defaultSortableTransition} from './sortable.ts'; +export type {SortableInput, SortableTransition} from './sortable.ts'; diff --git a/packages/dom/src/sortable/sortable.ts b/packages/dom/src/sortable/sortable.ts index 729343a4..c0d8297d 100644 --- a/packages/dom/src/sortable/sortable.ts +++ b/packages/dom/src/sortable/sortable.ts @@ -21,8 +21,8 @@ import type { import {animateTransform, scheduler} from '@dnd-kit/dom/utilities'; import {Shape} from '@dnd-kit/geometry'; -import {SortableKeyboardPlugin} from './SortableKeyboardPlugin.js'; -import {OptimisticSortingPlugin} from './OptimisticSortingPlugin.js'; +import {SortableKeyboardPlugin} from './SortableKeyboardPlugin.ts'; +import {OptimisticSortingPlugin} from './OptimisticSortingPlugin.ts'; export interface SortableTransition { /** diff --git a/packages/dom/src/sortable/utilities.ts b/packages/dom/src/sortable/utilities.ts index 1dacc3cc..cf406594 100644 --- a/packages/dom/src/sortable/utilities.ts +++ b/packages/dom/src/sortable/utilities.ts @@ -1,6 +1,6 @@ import type {Droppable, Draggable} from '@dnd-kit/dom'; -import {SortableDroppable, SortableDraggable} from './sortable.js'; +import {SortableDroppable, SortableDraggable} from './sortable.ts'; export function isSortable( element: Draggable | Droppable | null diff --git a/packages/dom/src/utilities/bounding-rectangle/getViewportBoundingRectangle.ts b/packages/dom/src/utilities/bounding-rectangle/getViewportBoundingRectangle.ts index a5cec07e..4b3cdf21 100644 --- a/packages/dom/src/utilities/bounding-rectangle/getViewportBoundingRectangle.ts +++ b/packages/dom/src/utilities/bounding-rectangle/getViewportBoundingRectangle.ts @@ -1,6 +1,6 @@ import type {BoundingRectangle} from '@dnd-kit/geometry'; -import {getDocument} from '../execution-context/index.js'; +import {getDocument} from '../execution-context/index.ts'; export function getViewportBoundingRectangle( element: Element diff --git a/packages/dom/src/utilities/bounding-rectangle/index.ts b/packages/dom/src/utilities/bounding-rectangle/index.ts index da799e4d..c7e6c640 100644 --- a/packages/dom/src/utilities/bounding-rectangle/index.ts +++ b/packages/dom/src/utilities/bounding-rectangle/index.ts @@ -1,2 +1,2 @@ -export {getBoundingRectangle} from './getBoundingRectangle.js'; -export {getViewportBoundingRectangle} from './getViewportBoundingRectangle.js'; +export {getBoundingRectangle} from './getBoundingRectangle.ts'; +export {getViewportBoundingRectangle} from './getViewportBoundingRectangle.ts'; diff --git a/packages/dom/src/utilities/element/createPlaceholder.ts b/packages/dom/src/utilities/element/createPlaceholder.ts index a018214b..de4ff777 100644 --- a/packages/dom/src/utilities/element/createPlaceholder.ts +++ b/packages/dom/src/utilities/element/createPlaceholder.ts @@ -1,5 +1,5 @@ -import {cloneElement} from './cloneElement.js'; -import {supportsStyle} from '../type-guards/supportsStyle.js'; +import {cloneElement} from './cloneElement.ts'; +import {supportsStyle} from '../type-guards/supportsStyle.ts'; export function createPlaceholder( element: Element, diff --git a/packages/dom/src/utilities/element/index.ts b/packages/dom/src/utilities/element/index.ts index a30d16eb..05ff28c9 100644 --- a/packages/dom/src/utilities/element/index.ts +++ b/packages/dom/src/utilities/element/index.ts @@ -1,2 +1,2 @@ -export {cloneElement} from './cloneElement.js'; -export {createPlaceholder} from './createPlaceholder.js'; +export {cloneElement} from './cloneElement.ts'; +export {createPlaceholder} from './createPlaceholder.ts'; diff --git a/packages/dom/src/utilities/event-listeners/index.ts b/packages/dom/src/utilities/event-listeners/index.ts index 0da36335..d98e0b66 100644 --- a/packages/dom/src/utilities/event-listeners/index.ts +++ b/packages/dom/src/utilities/event-listeners/index.ts @@ -1 +1 @@ -export {Listeners} from './Listeners.js'; +export {Listeners} from './Listeners.ts'; diff --git a/packages/dom/src/utilities/execution-context/getDocument.ts b/packages/dom/src/utilities/execution-context/getDocument.ts index f818e81f..049de225 100644 --- a/packages/dom/src/utilities/execution-context/getDocument.ts +++ b/packages/dom/src/utilities/execution-context/getDocument.ts @@ -1,7 +1,7 @@ -import {isDocument} from '../type-guards/isDocument.js'; -import {isHTMLElement} from '../type-guards/isHTMLElement.js'; -import {isNode} from '../type-guards/isNode.js'; -import {isWindow} from '../type-guards/isWindow.js'; +import {isDocument} from '../type-guards/isDocument.ts'; +import {isHTMLElement} from '../type-guards/isHTMLElement.ts'; +import {isNode} from '../type-guards/isNode.ts'; +import {isWindow} from '../type-guards/isWindow.ts'; export function getDocument(target: Event['target']): Document { if (!target) { diff --git a/packages/dom/src/utilities/execution-context/getWindow.ts b/packages/dom/src/utilities/execution-context/getWindow.ts index 2ed46fff..612f0198 100644 --- a/packages/dom/src/utilities/execution-context/getWindow.ts +++ b/packages/dom/src/utilities/execution-context/getWindow.ts @@ -1,5 +1,5 @@ -import {isWindow} from '../type-guards/isWindow.js'; -import {isNode} from '../type-guards/isNode.js'; +import {isWindow} from '../type-guards/isWindow.ts'; +import {isNode} from '../type-guards/isNode.ts'; export function getWindow(target: Event['target']): typeof window { if (!target) { diff --git a/packages/dom/src/utilities/execution-context/index.ts b/packages/dom/src/utilities/execution-context/index.ts index ddb1aad3..f3a7ed8d 100644 --- a/packages/dom/src/utilities/execution-context/index.ts +++ b/packages/dom/src/utilities/execution-context/index.ts @@ -1,3 +1,3 @@ -export {canUseDOM} from './canUseDOM.js'; -export {getDocument} from './getDocument.js'; -export {getWindow} from './getWindow.js'; +export {canUseDOM} from './canUseDOM.ts'; +export {getDocument} from './getDocument.ts'; +export {getWindow} from './getWindow.ts'; diff --git a/packages/dom/src/utilities/index.ts b/packages/dom/src/utilities/index.ts index ce458a3f..5c261cc7 100644 --- a/packages/dom/src/utilities/index.ts +++ b/packages/dom/src/utilities/index.ts @@ -1,15 +1,15 @@ export { getBoundingRectangle, getViewportBoundingRectangle, -} from './bounding-rectangle/index.js'; +} from './bounding-rectangle/index.ts'; -export {canUseDOM, getDocument, getWindow} from './execution-context/index.js'; +export {canUseDOM, getDocument, getWindow} from './execution-context/index.ts'; -export {cloneElement, createPlaceholder} from './element/index.js'; +export {cloneElement, createPlaceholder} from './element/index.ts'; -export {Listeners} from './event-listeners/index.js'; +export {Listeners} from './event-listeners/index.ts'; -export {showPopover, supportsPopover} from './popover/index.js'; +export {showPopover, supportsPopover} from './popover/index.ts'; export { canScroll, @@ -19,24 +19,24 @@ export { isDocumentScrollingElement, ScrollDirection, scrollIntoViewIfNeeded, -} from './scroll/index.js'; +} from './scroll/index.ts'; -export {scheduler, Scheduler} from './scheduler/index.js'; +export {scheduler, Scheduler} from './scheduler/index.ts'; -export {DOMRectangle} from './shapes/index.js'; +export {DOMRectangle} from './shapes/index.ts'; -export {Styles} from './styles/index.js'; +export {Styles} from './styles/index.ts'; export { supportsViewTransition, supportsStyle, isKeyboardEvent, -} from './type-guards/index.js'; +} from './type-guards/index.ts'; export { animateTransform, inverseTransform, parseTransform, stringifyTransform, -} from './transform/index.js'; -export type {Transform} from './transform/index.js'; +} from './transform/index.ts'; +export type {Transform} from './transform/index.ts'; diff --git a/packages/dom/src/utilities/popover/index.ts b/packages/dom/src/utilities/popover/index.ts index 8464f221..22250463 100644 --- a/packages/dom/src/utilities/popover/index.ts +++ b/packages/dom/src/utilities/popover/index.ts @@ -1,2 +1,2 @@ -export {showPopover} from './showPopover.js'; -export {supportsPopover} from './supportsPopover.js'; +export {showPopover} from './showPopover.ts'; +export {supportsPopover} from './supportsPopover.ts'; diff --git a/packages/dom/src/utilities/popover/showPopover.ts b/packages/dom/src/utilities/popover/showPopover.ts index 7dbf96c3..37e443e5 100644 --- a/packages/dom/src/utilities/popover/showPopover.ts +++ b/packages/dom/src/utilities/popover/showPopover.ts @@ -1,4 +1,4 @@ -import {supportsPopover} from './supportsPopover.js'; +import {supportsPopover} from './supportsPopover.ts'; export function showPopover(element: Element) { if (supportsPopover(element) && element.isConnected) { diff --git a/packages/dom/src/utilities/scheduler/index.ts b/packages/dom/src/utilities/scheduler/index.ts index fc393c9a..91da6078 100644 --- a/packages/dom/src/utilities/scheduler/index.ts +++ b/packages/dom/src/utilities/scheduler/index.ts @@ -1 +1 @@ -export {Scheduler, scheduler} from './scheduler.js'; +export {Scheduler, scheduler} from './scheduler.ts'; diff --git a/packages/dom/src/utilities/scroll/canScroll.ts b/packages/dom/src/utilities/scroll/canScroll.ts index 8582cb61..72bb9d3e 100644 --- a/packages/dom/src/utilities/scroll/canScroll.ts +++ b/packages/dom/src/utilities/scroll/canScroll.ts @@ -1,6 +1,6 @@ import type {Coordinates} from '@dnd-kit/geometry'; -import {getScrollPosition} from './getScrollPosition.js'; +import {getScrollPosition} from './getScrollPosition.ts'; export function canScroll(scrollableElement: Element, by?: Coordinates) { const {isTop, isBottom, isLeft, isRight, position} = diff --git a/packages/dom/src/utilities/scroll/detectScrollIntent.ts b/packages/dom/src/utilities/scroll/detectScrollIntent.ts index b272de9d..27feb3ca 100644 --- a/packages/dom/src/utilities/scroll/detectScrollIntent.ts +++ b/packages/dom/src/utilities/scroll/detectScrollIntent.ts @@ -1,6 +1,6 @@ import type {Axis, Coordinates} from '@dnd-kit/geometry'; -import {getScrollPosition} from './getScrollPosition.js'; +import {getScrollPosition} from './getScrollPosition.ts'; export enum ScrollDirection { Idle = 0, diff --git a/packages/dom/src/utilities/scroll/documentScrollingElement.ts b/packages/dom/src/utilities/scroll/documentScrollingElement.ts index 4eceeb68..69563311 100644 --- a/packages/dom/src/utilities/scroll/documentScrollingElement.ts +++ b/packages/dom/src/utilities/scroll/documentScrollingElement.ts @@ -1,5 +1,5 @@ -import {canUseDOM} from '../execution-context/canUseDOM.js'; -import {getDocument} from '../execution-context/getDocument.js'; +import {canUseDOM} from '../execution-context/canUseDOM.ts'; +import {getDocument} from '../execution-context/getDocument.ts'; export function isDocumentScrollingElement(element: Element | null) { if (!canUseDOM || !element) { diff --git a/packages/dom/src/utilities/scroll/getScrollPosition.ts b/packages/dom/src/utilities/scroll/getScrollPosition.ts index 43ae1f5e..1a868012 100644 --- a/packages/dom/src/utilities/scroll/getScrollPosition.ts +++ b/packages/dom/src/utilities/scroll/getScrollPosition.ts @@ -1,6 +1,6 @@ -import {getBoundingRectangle} from '../bounding-rectangle/getBoundingRectangle.js'; -import {getViewportBoundingRectangle} from '../bounding-rectangle/getViewportBoundingRectangle.js'; -import {isDocumentScrollingElement} from './documentScrollingElement.js'; +import {getBoundingRectangle} from '../bounding-rectangle/getBoundingRectangle.ts'; +import {getViewportBoundingRectangle} from '../bounding-rectangle/getViewportBoundingRectangle.ts'; +import {isDocumentScrollingElement} from './documentScrollingElement.ts'; export function getScrollPosition(scrollableElement: Element) { const rect = isDocumentScrollingElement(scrollableElement) diff --git a/packages/dom/src/utilities/scroll/getScrollableAncestors.ts b/packages/dom/src/utilities/scroll/getScrollableAncestors.ts index d4d08f10..01dbb935 100644 --- a/packages/dom/src/utilities/scroll/getScrollableAncestors.ts +++ b/packages/dom/src/utilities/scroll/getScrollableAncestors.ts @@ -1,9 +1,9 @@ -import {getWindow} from '../execution-context/getWindow.js'; -import {isDocument} from '../type-guards/isDocument.js'; -import {isHTMLElement} from '../type-guards/isHTMLElement.js'; -import {isSVGElement} from '../type-guards/isSVGElement.js'; -import {isFixed} from './isFixed.js'; -import {isScrollable} from './isScrollable.js'; +import {getWindow} from '../execution-context/getWindow.ts'; +import {isDocument} from '../type-guards/isDocument.ts'; +import {isHTMLElement} from '../type-guards/isHTMLElement.ts'; +import {isSVGElement} from '../type-guards/isSVGElement.ts'; +import {isFixed} from './isFixed.ts'; +import {isScrollable} from './isScrollable.ts'; interface Options { limit?: number; diff --git a/packages/dom/src/utilities/scroll/getScrollableElement.ts b/packages/dom/src/utilities/scroll/getScrollableElement.ts index caa6da6e..2fa8829d 100644 --- a/packages/dom/src/utilities/scroll/getScrollableElement.ts +++ b/packages/dom/src/utilities/scroll/getScrollableElement.ts @@ -1,9 +1,9 @@ -import {canUseDOM} from '../execution-context/canUseDOM.js'; -import {getDocument} from '../execution-context/getDocument.js'; -import {isDocument} from '../type-guards/isDocument.js'; -import {isHTMLElement} from '../type-guards/isHTMLElement.js'; -import {isNode} from '../type-guards/isNode.js'; -import {isWindow} from '../type-guards/isWindow.js'; +import {canUseDOM} from '../execution-context/canUseDOM.ts'; +import {getDocument} from '../execution-context/getDocument.ts'; +import {isDocument} from '../type-guards/isDocument.ts'; +import {isHTMLElement} from '../type-guards/isHTMLElement.ts'; +import {isNode} from '../type-guards/isNode.ts'; +import {isWindow} from '../type-guards/isWindow.ts'; export function getScrollableElement(element: EventTarget | null) { if (!canUseDOM || !element) { diff --git a/packages/dom/src/utilities/scroll/index.ts b/packages/dom/src/utilities/scroll/index.ts index 435776ec..77399c05 100644 --- a/packages/dom/src/utilities/scroll/index.ts +++ b/packages/dom/src/utilities/scroll/index.ts @@ -1,12 +1,12 @@ -export {canScroll} from './canScroll.js'; +export {canScroll} from './canScroll.ts'; export { getFirstScrollableAncestor, getScrollableAncestors, -} from './getScrollableAncestors.js'; -export {getScrollableElement} from './getScrollableElement.js'; -export {detectScrollIntent, ScrollDirection} from './detectScrollIntent.js'; -export {getScrollPosition} from './getScrollPosition.js'; -export {isDocumentScrollingElement} from './documentScrollingElement.js'; -export {isScrollable} from './isScrollable.js'; -export {isFixed} from './isFixed.js'; -export {scrollIntoViewIfNeeded} from './scrollIntoViewIfNeeded.js'; +} from './getScrollableAncestors.ts'; +export {getScrollableElement} from './getScrollableElement.ts'; +export {detectScrollIntent, ScrollDirection} from './detectScrollIntent.ts'; +export {getScrollPosition} from './getScrollPosition.ts'; +export {isDocumentScrollingElement} from './documentScrollingElement.ts'; +export {isScrollable} from './isScrollable.ts'; +export {isFixed} from './isFixed.ts'; +export {scrollIntoViewIfNeeded} from './scrollIntoViewIfNeeded.ts'; diff --git a/packages/dom/src/utilities/scroll/isFixed.ts b/packages/dom/src/utilities/scroll/isFixed.ts index 37d61f0d..04a35b0c 100644 --- a/packages/dom/src/utilities/scroll/isFixed.ts +++ b/packages/dom/src/utilities/scroll/isFixed.ts @@ -1,4 +1,4 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; export function isFixed( node: Element, diff --git a/packages/dom/src/utilities/scroll/isScrollable.ts b/packages/dom/src/utilities/scroll/isScrollable.ts index 61d66b4a..ccde8868 100644 --- a/packages/dom/src/utilities/scroll/isScrollable.ts +++ b/packages/dom/src/utilities/scroll/isScrollable.ts @@ -1,4 +1,4 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; export function isScrollable( element: HTMLElement, diff --git a/packages/dom/src/utilities/scroll/scrollIntoViewIfNeeded.ts b/packages/dom/src/utilities/scroll/scrollIntoViewIfNeeded.ts index 6a5f76e2..f2f1552b 100644 --- a/packages/dom/src/utilities/scroll/scrollIntoViewIfNeeded.ts +++ b/packages/dom/src/utilities/scroll/scrollIntoViewIfNeeded.ts @@ -1,5 +1,5 @@ -import {getWindow} from '../execution-context/getWindow.js'; -import {getScrollableAncestors} from './getScrollableAncestors.js'; +import {getWindow} from '../execution-context/getWindow.ts'; +import {getScrollableAncestors} from './getScrollableAncestors.ts'; function supportsScrollIntoViewIfNeeded( element: Element diff --git a/packages/dom/src/utilities/shapes/DOMRectangle.ts b/packages/dom/src/utilities/shapes/DOMRectangle.ts index 1da3d2b1..e120f86c 100644 --- a/packages/dom/src/utilities/shapes/DOMRectangle.ts +++ b/packages/dom/src/utilities/shapes/DOMRectangle.ts @@ -1,9 +1,9 @@ import {Rectangle} from '@dnd-kit/geometry'; -import {inverseTransform} from '../transform/inverseTransform.js'; -import {getBoundingRectangle} from '../bounding-rectangle/getBoundingRectangle.js'; -import {getWindow} from '../execution-context/getWindow.js'; -import {parseTransform, parseTranslate} from '../transform/index.js'; +import {inverseTransform} from '../transform/inverseTransform.ts'; +import {getBoundingRectangle} from '../bounding-rectangle/getBoundingRectangle.ts'; +import {getWindow} from '../execution-context/getWindow.ts'; +import {parseTransform, parseTranslate} from '../transform/index.ts'; export class DOMRectangle extends Rectangle { constructor(element: Element, ignoreTransforms = false) { diff --git a/packages/dom/src/utilities/shapes/index.ts b/packages/dom/src/utilities/shapes/index.ts index c42d8ea4..af65299e 100644 --- a/packages/dom/src/utilities/shapes/index.ts +++ b/packages/dom/src/utilities/shapes/index.ts @@ -1 +1 @@ -export {DOMRectangle} from './DOMRectangle.js'; +export {DOMRectangle} from './DOMRectangle.ts'; diff --git a/packages/dom/src/utilities/styles/Styles.ts b/packages/dom/src/utilities/styles/Styles.ts index 718a4939..ca9e2d0d 100644 --- a/packages/dom/src/utilities/styles/Styles.ts +++ b/packages/dom/src/utilities/styles/Styles.ts @@ -1,4 +1,4 @@ -import {supportsStyle} from '../type-guards/supportsStyle.js'; +import {supportsStyle} from '../type-guards/supportsStyle.ts'; type ExtractStringProperties = { [K in keyof T]?: T[K] extends string ? string : never; diff --git a/packages/dom/src/utilities/styles/index.ts b/packages/dom/src/utilities/styles/index.ts index 84f7b00c..6ed03e14 100644 --- a/packages/dom/src/utilities/styles/index.ts +++ b/packages/dom/src/utilities/styles/index.ts @@ -1 +1 @@ -export {Styles} from './Styles.js'; +export {Styles} from './Styles.ts'; diff --git a/packages/dom/src/utilities/transform/animateTransform.ts b/packages/dom/src/utilities/transform/animateTransform.ts index 3e25f480..b179b91a 100644 --- a/packages/dom/src/utilities/transform/animateTransform.ts +++ b/packages/dom/src/utilities/transform/animateTransform.ts @@ -1,5 +1,5 @@ -import {Styles} from '../styles/index.js'; -import {getWindow} from '../execution-context/index.js'; +import {Styles} from '../styles/index.ts'; +import {getWindow} from '../execution-context/index.ts'; interface Arguments { element: Element; diff --git a/packages/dom/src/utilities/transform/index.ts b/packages/dom/src/utilities/transform/index.ts index 36813a87..2f7f4dae 100644 --- a/packages/dom/src/utilities/transform/index.ts +++ b/packages/dom/src/utilities/transform/index.ts @@ -1,6 +1,6 @@ -export {animateTransform} from './animateTransform.js'; -export {inverseTransform} from './inverseTransform.js'; -export {parseTransform} from './parseTransform.js'; -export {parseTranslate} from './parseTranslate.js'; -export type {Transform} from './parseTransform.js'; -export {stringifyTransform} from './stringifyTransform.js'; +export {animateTransform} from './animateTransform.ts'; +export {inverseTransform} from './inverseTransform.ts'; +export {parseTransform} from './parseTransform.ts'; +export {parseTranslate} from './parseTranslate.ts'; +export type {Transform} from './parseTransform.ts'; +export {stringifyTransform} from './stringifyTransform.ts'; diff --git a/packages/dom/src/utilities/transform/inverseTransform.ts b/packages/dom/src/utilities/transform/inverseTransform.ts index 6f9722ae..2f833616 100644 --- a/packages/dom/src/utilities/transform/inverseTransform.ts +++ b/packages/dom/src/utilities/transform/inverseTransform.ts @@ -1,6 +1,6 @@ import type {BoundingRectangle} from '@dnd-kit/geometry'; -import {type Transform} from './parseTransform.js'; +import {type Transform} from './parseTransform.ts'; export function inverseTransform( rect: BoundingRectangle, diff --git a/packages/dom/src/utilities/transform/parseTransform.ts b/packages/dom/src/utilities/transform/parseTransform.ts index 6bb55bc1..9033f399 100644 --- a/packages/dom/src/utilities/transform/parseTransform.ts +++ b/packages/dom/src/utilities/transform/parseTransform.ts @@ -1,7 +1,7 @@ import type {Coordinates} from '@dnd-kit/geometry'; -import {parseScale} from './parseScale.js'; -import {parseTranslate} from './parseTranslate.js'; +import {parseScale} from './parseScale.ts'; +import {parseTranslate} from './parseTranslate.ts'; export interface Transform extends Coordinates { z?: number; diff --git a/packages/dom/src/utilities/transform/stringifyTransform.ts b/packages/dom/src/utilities/transform/stringifyTransform.ts index e32a4baf..c3821959 100644 --- a/packages/dom/src/utilities/transform/stringifyTransform.ts +++ b/packages/dom/src/utilities/transform/stringifyTransform.ts @@ -1,4 +1,4 @@ -import type {Transform} from './parseTransform.js'; +import type {Transform} from './parseTransform.ts'; export function stringifyTransform({x, y, z, scaleX, scaleY}: Transform) { return `translate3d(${x}px, ${y}px, ${z ?? 0}) scale(${scaleX}, ${scaleY})`; diff --git a/packages/dom/src/utilities/type-guards/index.ts b/packages/dom/src/utilities/type-guards/index.ts index 04738d77..aa8e63f7 100644 --- a/packages/dom/src/utilities/type-guards/index.ts +++ b/packages/dom/src/utilities/type-guards/index.ts @@ -1,8 +1,8 @@ -export {isDocument} from './isDocument.js'; -export {isHTMLElement} from './isHTMLElement.js'; -export {isKeyboardEvent} from './isKeyboardEvent.js'; -export {isNode} from './isNode.js'; -export {isSVGElement} from './isSVGElement.js'; -export {isWindow} from './isWindow.js'; -export {supportsViewTransition} from './supportsViewTransition.js'; -export {supportsStyle} from './supportsStyle.js'; +export {isDocument} from './isDocument.ts'; +export {isHTMLElement} from './isHTMLElement.ts'; +export {isKeyboardEvent} from './isKeyboardEvent.ts'; +export {isNode} from './isNode.ts'; +export {isSVGElement} from './isSVGElement.ts'; +export {isWindow} from './isWindow.ts'; +export {supportsViewTransition} from './supportsViewTransition.ts'; +export {supportsStyle} from './supportsStyle.ts'; diff --git a/packages/dom/src/utilities/type-guards/isDocument.ts b/packages/dom/src/utilities/type-guards/isDocument.ts index e356c761..adc06a2e 100644 --- a/packages/dom/src/utilities/type-guards/isDocument.ts +++ b/packages/dom/src/utilities/type-guards/isDocument.ts @@ -1,4 +1,4 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; export function isDocument(node: Node): node is Document { const {Document} = getWindow(node); diff --git a/packages/dom/src/utilities/type-guards/isHTMLElement.ts b/packages/dom/src/utilities/type-guards/isHTMLElement.ts index 0936f3b1..5c0a5fab 100644 --- a/packages/dom/src/utilities/type-guards/isHTMLElement.ts +++ b/packages/dom/src/utilities/type-guards/isHTMLElement.ts @@ -1,6 +1,6 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; -import {isWindow} from './isWindow.js'; +import {isWindow} from './isWindow.ts'; export function isHTMLElement(node: Node | Window): node is HTMLElement { if (isWindow(node)) { diff --git a/packages/dom/src/utilities/type-guards/isSVGElement.ts b/packages/dom/src/utilities/type-guards/isSVGElement.ts index b3a3eca2..3cf4b02e 100644 --- a/packages/dom/src/utilities/type-guards/isSVGElement.ts +++ b/packages/dom/src/utilities/type-guards/isSVGElement.ts @@ -1,4 +1,4 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; export function isSVGElement(node: Node): node is SVGElement { return node instanceof getWindow(node).SVGElement; diff --git a/packages/dom/src/utilities/type-guards/supportsStyle.ts b/packages/dom/src/utilities/type-guards/supportsStyle.ts index 32ae1ca6..92cbed9d 100644 --- a/packages/dom/src/utilities/type-guards/supportsStyle.ts +++ b/packages/dom/src/utilities/type-guards/supportsStyle.ts @@ -1,4 +1,4 @@ -import {getWindow} from '../execution-context/getWindow.js'; +import {getWindow} from '../execution-context/getWindow.ts'; export function supportsStyle( element: Element diff --git a/packages/helpers/src/index.ts b/packages/helpers/src/index.ts index f302baba..b69d7569 100644 --- a/packages/helpers/src/index.ts +++ b/packages/helpers/src/index.ts @@ -1 +1 @@ -export {move, swap, arrayMove, arraySwap} from './move.js'; +export {move, swap, arrayMove, arraySwap} from './move.ts'; diff --git a/packages/react/src/core/context/DragDropProvider.tsx b/packages/react/src/core/context/DragDropProvider.tsx index 5c01d1bf..0ef8b0b3 100644 --- a/packages/react/src/core/context/DragDropProvider.tsx +++ b/packages/react/src/core/context/DragDropProvider.tsx @@ -10,8 +10,8 @@ import {DragDropManager, defaultPreset} from '@dnd-kit/dom'; import type {DragDropManagerInput, Draggable, Droppable} from '@dnd-kit/dom'; import {useConstant, useLatest, useOnValueChange} from '@dnd-kit/react/hooks'; -import {DragDropContext} from './context.js'; -import {useRenderer} from './renderer.js'; +import {DragDropContext} from './context.ts'; +import {useRenderer} from './renderer.ts'; type Events = DragDropEvents; diff --git a/packages/react/src/core/context/hooks.ts b/packages/react/src/core/context/hooks.ts index e6398b1a..ec3b3aec 100644 --- a/packages/react/src/core/context/hooks.ts +++ b/packages/react/src/core/context/hooks.ts @@ -1,7 +1,7 @@ import {useContext} from 'react'; -import {DragDropContext} from './context.js'; -import {useComputed} from '../../hooks/useComputed.js'; +import {DragDropContext} from './context.ts'; +import {useComputed} from '../../hooks/useComputed.ts'; export function useDragDropManager() { return useContext(DragDropContext); diff --git a/packages/react/src/core/context/index.ts b/packages/react/src/core/context/index.ts index 22a2058c..bea347dd 100644 --- a/packages/react/src/core/context/index.ts +++ b/packages/react/src/core/context/index.ts @@ -1 +1 @@ -export {DragDropProvider} from './DragDropProvider.js'; +export {DragDropProvider} from './DragDropProvider.ts'; diff --git a/packages/react/src/core/draggable/index.ts b/packages/react/src/core/draggable/index.ts index 8e86f18f..d931d7c3 100644 --- a/packages/react/src/core/draggable/index.ts +++ b/packages/react/src/core/draggable/index.ts @@ -1,2 +1,2 @@ -export {useDraggable} from './useDraggable.js'; -export type {UseDraggableInput} from './useDraggable.js'; +export {useDraggable} from './useDraggable.ts'; +export type {UseDraggableInput} from './useDraggable.ts'; diff --git a/packages/react/src/core/draggable/useDraggable.ts b/packages/react/src/core/draggable/useDraggable.ts index c5cc3c20..c37568a0 100644 --- a/packages/react/src/core/draggable/useDraggable.ts +++ b/packages/react/src/core/draggable/useDraggable.ts @@ -5,7 +5,7 @@ import type {DraggableInput} from '@dnd-kit/dom'; import {useComputed, useOnValueChange} from '@dnd-kit/react/hooks'; import {currentValue, type RefOrValue} from '@dnd-kit/react/utilities'; -import {useInstance} from '../hooks/useInstance.js'; +import {useInstance} from '../hooks/useInstance.ts'; export interface UseDraggableInput extends Omit, 'handle' | 'element'> { diff --git a/packages/react/src/core/droppable/index.ts b/packages/react/src/core/droppable/index.ts index 21538c61..79f95526 100644 --- a/packages/react/src/core/droppable/index.ts +++ b/packages/react/src/core/droppable/index.ts @@ -1,2 +1,2 @@ -export {useDroppable} from './useDroppable.js'; -export type {UseDroppableInput} from './useDroppable.js'; +export {useDroppable} from './useDroppable.ts'; +export type {UseDroppableInput} from './useDroppable.ts'; diff --git a/packages/react/src/core/droppable/useDroppable.ts b/packages/react/src/core/droppable/useDroppable.ts index 2db99576..0fbb3243 100644 --- a/packages/react/src/core/droppable/useDroppable.ts +++ b/packages/react/src/core/droppable/useDroppable.ts @@ -6,7 +6,7 @@ import type {DroppableInput} from '@dnd-kit/dom'; import {useComputed, useOnValueChange} from '@dnd-kit/react/hooks'; import {currentValue, type RefOrValue} from '@dnd-kit/react/utilities'; -import {useInstance} from '../hooks/useInstance.js'; +import {useInstance} from '../hooks/useInstance.ts'; export interface UseDroppableInput extends Omit, 'element'> { diff --git a/packages/react/src/core/hooks/useDragDropManager.ts b/packages/react/src/core/hooks/useDragDropManager.ts index e92934fa..86088172 100644 --- a/packages/react/src/core/hooks/useDragDropManager.ts +++ b/packages/react/src/core/hooks/useDragDropManager.ts @@ -1,6 +1,6 @@ import {useContext} from 'react'; -import {DragDropContext} from '../context/context.js'; +import {DragDropContext} from '../context/context.ts'; export function useDragDropManager() { return useContext(DragDropContext); diff --git a/packages/react/src/core/hooks/useDragOperation.ts b/packages/react/src/core/hooks/useDragOperation.ts index 1fb16cf1..04037e66 100644 --- a/packages/react/src/core/hooks/useDragOperation.ts +++ b/packages/react/src/core/hooks/useDragOperation.ts @@ -1,6 +1,6 @@ import {useComputed} from '@dnd-kit/react/hooks'; -import {useDragDropManager} from './useDragDropManager.js'; +import {useDragDropManager} from './useDragDropManager.ts'; export function useDragOperation() { const manager = useDragDropManager(); diff --git a/packages/react/src/core/hooks/useInstance.ts b/packages/react/src/core/hooks/useInstance.ts index 3b5a7e32..328c0232 100644 --- a/packages/react/src/core/hooks/useInstance.ts +++ b/packages/react/src/core/hooks/useInstance.ts @@ -2,7 +2,7 @@ import {useEffect, useState} from 'react'; import {Entity} from '@dnd-kit/abstract'; import type {DragDropManager} from '@dnd-kit/dom'; -import {useDragDropManager} from './useDragDropManager.js'; +import {useDragDropManager} from './useDragDropManager.ts'; export function useInstance( initializer: (manager: DragDropManager) => T diff --git a/packages/react/src/core/index.ts b/packages/react/src/core/index.ts index a6e8587c..2a2f9c88 100644 --- a/packages/react/src/core/index.ts +++ b/packages/react/src/core/index.ts @@ -1,9 +1,9 @@ -export {DragDropProvider} from './context/index.js'; +export {DragDropProvider} from './context/index.ts'; -export {useDraggable} from './draggable/index.js'; +export {useDraggable} from './draggable/index.ts'; -export {useDroppable} from './droppable/index.js'; +export {useDroppable} from './droppable/index.ts'; -export {useDragDropManager} from './hooks/useDragDropManager.js'; +export {useDragDropManager} from './hooks/useDragDropManager.ts'; -export {useDragOperation} from './hooks/useDragOperation.js'; +export {useDragOperation} from './hooks/useDragOperation.ts'; diff --git a/packages/react/src/hooks/index.ts b/packages/react/src/hooks/index.ts index 8f5d0b0f..b3a7bd9e 100644 --- a/packages/react/src/hooks/index.ts +++ b/packages/react/src/hooks/index.ts @@ -1,6 +1,6 @@ -export {useConstant} from './useConstant.js'; -export {useComputed} from './useComputed.js'; -export {useImmediateEffect} from './useImmediateEffect.js'; -export {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.js'; -export {useLatest} from './useLatest.js'; -export {useOnValueChange} from './useOnValueChange.js'; +export {useConstant} from './useConstant.ts'; +export {useComputed} from './useComputed.ts'; +export {useImmediateEffect} from './useImmediateEffect.ts'; +export {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.ts'; +export {useLatest} from './useLatest.ts'; +export {useOnValueChange} from './useOnValueChange.ts'; diff --git a/packages/react/src/hooks/useComputed.ts b/packages/react/src/hooks/useComputed.ts index d3015bb6..43f563fb 100644 --- a/packages/react/src/hooks/useComputed.ts +++ b/packages/react/src/hooks/useComputed.ts @@ -1,7 +1,7 @@ import {computed} from '@dnd-kit/state'; -import {useConstant} from './useConstant.js'; -import {useSignal} from './useSignal.js'; +import {useConstant} from './useConstant.ts'; +import {useSignal} from './useSignal.ts'; export function useComputed(compute: () => T, sync = false) { return useSignal( diff --git a/packages/react/src/hooks/useLatest.ts b/packages/react/src/hooks/useLatest.ts index 164e5d3d..fc7485e8 100644 --- a/packages/react/src/hooks/useLatest.ts +++ b/packages/react/src/hooks/useLatest.ts @@ -1,6 +1,6 @@ import {useRef} from 'react'; -import {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.js'; +import {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.ts'; export function useLatest(value: T) { const valueRef = useRef(value); diff --git a/packages/react/src/hooks/useSignal.ts b/packages/react/src/hooks/useSignal.ts index 07c082ac..16dc57ef 100644 --- a/packages/react/src/hooks/useSignal.ts +++ b/packages/react/src/hooks/useSignal.ts @@ -2,8 +2,8 @@ import {useState} from 'react'; import {flushSync} from 'react-dom'; import {effect, signal, Signal} from '@dnd-kit/state'; -import {useConstant} from './useConstant.js'; -import {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.js'; +import {useConstant} from './useConstant.ts'; +import {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect.ts'; /** Wrap the given value in a Signal if it isn't already one, and make changes trigger a re-render. */ export function useSignal(signalOrValue: T, sync = false) { diff --git a/packages/react/src/sortable/index.ts b/packages/react/src/sortable/index.ts index 49b1fef2..ec9ad23e 100644 --- a/packages/react/src/sortable/index.ts +++ b/packages/react/src/sortable/index.ts @@ -1,2 +1,2 @@ -export {useSortable} from './useSortable.js'; -export type {UseSortableInput} from './useSortable.js'; +export {useSortable} from './useSortable.ts'; +export type {UseSortableInput} from './useSortable.ts'; diff --git a/packages/react/src/utilities/index.ts b/packages/react/src/utilities/index.ts index 384036e2..cf437422 100644 --- a/packages/react/src/utilities/index.ts +++ b/packages/react/src/utilities/index.ts @@ -1 +1 @@ -export {currentValue, type RefOrValue} from './currentValue.js'; +export {currentValue, type RefOrValue} from './currentValue.ts';