vue-dnd-sortable 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/package.json +2 -4
- package/dist/activator.d.ts +0 -22
- package/dist/collision.d.ts +0 -13
- package/dist/components/index.d.ts +0 -1
- package/dist/components/provider.vue.d.ts +0 -26
- package/dist/composables.d.ts +0 -10
- package/dist/context.d.ts +0 -21
- package/dist/helpers.d.ts +0 -3
- package/dist/index.d.ts +0 -4
- package/dist/sortable.d.ts +0 -7
- package/dist/types.d.ts +0 -6
- package/dist/utilities/context.d.ts +0 -1
- package/dist/utilities/index.d.ts +0 -3
- package/dist/utilities/rects.d.ts +0 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vue-dnd-sortable",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.1",
|
4
4
|
"description": "Simple sortable for vue",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/vue-dnd.umd.js",
|
@@ -24,9 +24,7 @@
|
|
24
24
|
"vue-tsc": "^2.2.10"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
27
|
-
"typescript": "^5.8.3"
|
28
|
-
},
|
29
|
-
"dependencies": {
|
27
|
+
"typescript": "^5.8.3",
|
30
28
|
"vue": "^3.5.17"
|
31
29
|
},
|
32
30
|
"keywords": [
|
package/dist/activator.d.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import type { Coords } from './types';
|
2
|
-
interface ActivatorOptions {
|
3
|
-
element: HTMLElement;
|
4
|
-
onStart?: (coords: Coords) => void;
|
5
|
-
onMove?: (coords: Coords) => void;
|
6
|
-
onEnd?: (e: PointerEvent) => void;
|
7
|
-
}
|
8
|
-
export declare class Activator {
|
9
|
-
private document;
|
10
|
-
private listeners;
|
11
|
-
private documentListeners;
|
12
|
-
private options;
|
13
|
-
private windowListeners;
|
14
|
-
constructor(options: ActivatorOptions);
|
15
|
-
private deactivate;
|
16
|
-
private activate;
|
17
|
-
private handleStart;
|
18
|
-
private handleMove;
|
19
|
-
private handleEnd;
|
20
|
-
private clearSelection;
|
21
|
-
}
|
22
|
-
export {};
|
package/dist/collision.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { UniqueIdentifier } from './types';
|
2
|
-
import type { DomRectMap } from './utilities';
|
3
|
-
interface CollisionResult {
|
4
|
-
id: UniqueIdentifier;
|
5
|
-
value: number;
|
6
|
-
}
|
7
|
-
export type CollisionDetector = (options: {
|
8
|
-
rect: DOMRect;
|
9
|
-
rects: DomRectMap;
|
10
|
-
}) => CollisionResult[];
|
11
|
-
export declare const rectangleIntersection: CollisionDetector;
|
12
|
-
export declare const closestToCenter: CollisionDetector;
|
13
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as DndProvider } from './provider.vue';
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import type { CollisionDetector } from '../collision';
|
2
|
-
import type { DndEndEvent } from '../context';
|
3
|
-
import type { UniqueIdentifier } from '../types';
|
4
|
-
interface Props {
|
5
|
-
items: UniqueIdentifier[];
|
6
|
-
collision?: CollisionDetector;
|
7
|
-
axis?: 'x' | 'y';
|
8
|
-
}
|
9
|
-
declare var __VLS_1: {};
|
10
|
-
type __VLS_Slots = {} & {
|
11
|
-
default?: (props: typeof __VLS_1) => any;
|
12
|
-
};
|
13
|
-
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
14
|
-
end: (event: DndEndEvent) => any;
|
15
|
-
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
16
|
-
onEnd?: ((event: DndEndEvent) => any) | undefined;
|
17
|
-
}>, {
|
18
|
-
collision: CollisionDetector;
|
19
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
20
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
21
|
-
export default _default;
|
22
|
-
type __VLS_WithSlots<T, S> = T & {
|
23
|
-
new (): {
|
24
|
-
$slots: S;
|
25
|
-
};
|
26
|
-
};
|
package/dist/composables.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { MaybeRefOrGetter } from 'vue';
|
2
|
-
import type { UniqueIdentifier } from './types';
|
3
|
-
export interface SortableOptions {
|
4
|
-
id: UniqueIdentifier;
|
5
|
-
element: MaybeRefOrGetter<HTMLElement | null>;
|
6
|
-
handleElement?: MaybeRefOrGetter<HTMLElement | null>;
|
7
|
-
}
|
8
|
-
export declare function useSortable(options: SortableOptions): {
|
9
|
-
isDragging: import("vue").ComputedRef<boolean>;
|
10
|
-
};
|
package/dist/context.d.ts
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
2
|
-
import type { Coords, Nullable, UniqueIdentifier } from './types';
|
3
|
-
import type { DomRectMap } from './utilities/rects';
|
4
|
-
interface DndContext {
|
5
|
-
elements: Ref<Map<UniqueIdentifier, HTMLElement>>;
|
6
|
-
rects: Ref<DomRectMap>;
|
7
|
-
items: ComputedRef<UniqueIdentifier[]>;
|
8
|
-
translate: Ref<Coords | null>;
|
9
|
-
active: Ref<UniqueIdentifier | null>;
|
10
|
-
over: Ref<UniqueIdentifier | null>;
|
11
|
-
sortedRects: Ref<DOMRect[]>;
|
12
|
-
activeIndex: ComputedRef<number | null>;
|
13
|
-
overIndex: ComputedRef<number | null>;
|
14
|
-
activate: (id: UniqueIdentifier, handle: Nullable<HTMLElement>) => void;
|
15
|
-
}
|
16
|
-
export interface DndEndEvent {
|
17
|
-
active: UniqueIdentifier;
|
18
|
-
over: UniqueIdentifier | null;
|
19
|
-
}
|
20
|
-
export declare const injectDndContext: <T extends DndContext | null | undefined = DndContext>(fallback?: T | undefined) => T extends null ? DndContext | null : DndContext, provideDndContext: (contextValue: DndContext) => DndContext;
|
21
|
-
export {};
|
package/dist/helpers.d.ts
DELETED
package/dist/index.d.ts
DELETED
package/dist/sortable.d.ts
DELETED
package/dist/types.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function createContext<TContextValue>(componentName: string): readonly [<T extends TContextValue | null | undefined = TContextValue>(fallback?: T) => T extends null ? TContextValue | null : TContextValue, (contextValue: TContextValue) => TContextValue];
|