@maas/vue-equipment 0.27.0 → 0.27.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/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +1 -1
- package/dist/plugins/MagicDraggable/index.d.ts +2 -0
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +9 -0
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +1 -1
- package/package.json +1 -1
package/dist/nuxt/module.json
CHANGED
package/dist/nuxt/module.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
2
|
import MagicDraggable from './src/components/MagicDraggable.vue.js';
|
|
3
3
|
import { useDraggableApi } from './src/composables/useDraggableApi.js';
|
|
4
|
+
import type { DraggableOptions } from './src/types.js';
|
|
4
5
|
declare const MagicDraggablePlugin: Plugin;
|
|
5
6
|
export { MagicDraggablePlugin, MagicDraggable, useDraggableApi };
|
|
7
|
+
export type { DraggableOptions };
|
|
@@ -292,6 +292,15 @@ export function useDraggableDrag(args) {
|
|
|
292
292
|
}
|
|
293
293
|
}, 100)();
|
|
294
294
|
});
|
|
295
|
+
useResizeObserver(elRef, async () => {
|
|
296
|
+
useThrottleFn(async () => {
|
|
297
|
+
await getSizes();
|
|
298
|
+
if (activeSnapPoint.value) {
|
|
299
|
+
await snapTo({ snapPoint: activeSnapPoint.value, interpolate: false });
|
|
300
|
+
snapPointsMap.trigger();
|
|
301
|
+
}
|
|
302
|
+
}, 100)();
|
|
303
|
+
});
|
|
295
304
|
const { idle } = useIdle(toValue(threshold).idle);
|
|
296
305
|
watch(idle, (value) => {
|
|
297
306
|
if (value && dragging.value) {
|
|
@@ -22,7 +22,7 @@ type SnapToArgs = {
|
|
|
22
22
|
};
|
|
23
23
|
export declare function useDraggableSnap(args: UseDraggableSnapArgs): {
|
|
24
24
|
mappedSnapPoints: import("@vueuse/core").ComputedRefWithControl<Coordinates[]>;
|
|
25
|
-
activeSnapPoint: Ref<("center" | "top-
|
|
25
|
+
activeSnapPoint: Ref<("center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right") | ["center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right", offset?: {
|
|
26
26
|
x?: number | undefined;
|
|
27
27
|
y?: number | undefined;
|
|
28
28
|
} | undefined] | undefined>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.27.
|
|
4
|
+
"version": "0.27.1",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@antfu/ni": "^0.21.12",
|