@thangdevalone/meeting-grid-layout-vue 1.4.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/index.mjs ADDED
@@ -0,0 +1,688 @@
1
+ import { ref, onMounted, computed, defineComponent, provide, h, inject, watch } from 'vue';
2
+ import { useResizeObserver } from '@vueuse/core';
3
+ import { createMeetGrid, getSpringConfig, resolveFloatSize } from '@thangdevalone/meeting-grid-layout-core';
4
+ export { createGrid, createGridItemPositioner, createMeetGrid, getAspectRatio, getGridItemDimensions, getSpringConfig, springPresets } from '@thangdevalone/meeting-grid-layout-core';
5
+ import { useMotionValue, animate, motion } from 'motion-v';
6
+
7
+ function useGridDimensions(elementRef) {
8
+ const width = ref(0);
9
+ const height = ref(0);
10
+ useResizeObserver(elementRef, (entries) => {
11
+ const entry = entries[0];
12
+ if (entry) {
13
+ width.value = entry.contentRect.width;
14
+ height.value = entry.contentRect.height;
15
+ }
16
+ });
17
+ onMounted(() => {
18
+ if (elementRef.value) {
19
+ width.value = elementRef.value.clientWidth;
20
+ height.value = elementRef.value.clientHeight;
21
+ }
22
+ });
23
+ return computed(() => ({
24
+ width: width.value,
25
+ height: height.value
26
+ }));
27
+ }
28
+ function useMeetGrid(options) {
29
+ const getOptions = typeof options === "function" ? options : () => options.value;
30
+ return computed(() => {
31
+ const opts = getOptions();
32
+ return createMeetGrid(opts);
33
+ });
34
+ }
35
+ function useGridAnimation(preset = "smooth") {
36
+ return computed(() => getSpringConfig(preset));
37
+ }
38
+ function useGridItemPosition(grid, index) {
39
+ const getIndex = () => typeof index === "number" ? index : index.value;
40
+ const position = computed(() => grid.value.getPosition(getIndex()));
41
+ const dimensions = computed(() => grid.value.getItemDimensions(getIndex()));
42
+ const isMain = computed(() => grid.value.isMainItem(getIndex()));
43
+ const isHidden = computed(() => {
44
+ return grid.value.layoutMode === "spotlight" && !isMain.value;
45
+ });
46
+ return {
47
+ position,
48
+ dimensions,
49
+ isMain,
50
+ isHidden
51
+ };
52
+ }
53
+
54
+ const GridContextKey = Symbol("MeetGridContext");
55
+ const GridContainer = defineComponent({
56
+ name: "GridContainer",
57
+ props: {
58
+ /** Aspect ratio in format "width:height" */
59
+ aspectRatio: {
60
+ type: String,
61
+ default: "16:9"
62
+ },
63
+ /** Gap between items in pixels */
64
+ gap: {
65
+ type: Number,
66
+ default: 8
67
+ },
68
+ /** Number of items */
69
+ count: {
70
+ type: Number,
71
+ required: true
72
+ },
73
+ /** Layout mode */
74
+ layoutMode: {
75
+ type: String,
76
+ default: "gallery"
77
+ },
78
+ /** Index of pinned/focused item (main participant for pin/spotlight modes) */
79
+ pinnedIndex: {
80
+ type: Number,
81
+ default: void 0
82
+ },
83
+ /**
84
+ * Position of "others" thumbnails when a participant is pinned.
85
+ * In portrait containers, this is forced to 'bottom'.
86
+ * @default 'right'
87
+ */
88
+ othersPosition: {
89
+ type: String,
90
+ default: "right"
91
+ },
92
+ /** Spring animation preset */
93
+ springPreset: {
94
+ type: String,
95
+ default: "smooth"
96
+ },
97
+ /** Maximum items per page for pagination (0 = no pagination) */
98
+ maxItemsPerPage: {
99
+ type: Number,
100
+ default: 0
101
+ },
102
+ /** Current page index (0-based) for pagination */
103
+ currentPage: {
104
+ type: Number,
105
+ default: 0
106
+ },
107
+ /** Maximum visible items (0 = show all). In gallery without pin: limits all items. With pin: limits "others". */
108
+ maxVisible: {
109
+ type: Number,
110
+ default: 0
111
+ },
112
+ /** Current page for visible items (0-based), used when maxVisible > 0 */
113
+ currentVisiblePage: {
114
+ type: Number,
115
+ default: 0
116
+ },
117
+ /**
118
+ * Per-item aspect ratio configurations.
119
+ * Use different ratios for mobile (9:16), desktop (16:9).
120
+ * @example ['16:9', '9:16', undefined]
121
+ */
122
+ itemAspectRatios: {
123
+ type: Array,
124
+ default: void 0
125
+ },
126
+ /** Custom width for the floating PiP item in 2-person mode */
127
+ floatWidth: {
128
+ type: Number,
129
+ default: void 0
130
+ },
131
+ /** Custom height for the floating PiP item in 2-person mode */
132
+ floatHeight: {
133
+ type: Number,
134
+ default: void 0
135
+ },
136
+ /**
137
+ * Responsive breakpoints for the floating PiP in 2-person mode.
138
+ * When provided, PiP size auto-adjusts based on container width.
139
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
140
+ */
141
+ floatBreakpoints: {
142
+ type: Array,
143
+ default: void 0
144
+ },
145
+ /** HTML tag to render */
146
+ tag: {
147
+ type: String,
148
+ default: "div"
149
+ }
150
+ },
151
+ setup(props, { slots }) {
152
+ const containerRef = ref(null);
153
+ const dimensions = useGridDimensions(containerRef);
154
+ const gridOptions = computed(() => ({
155
+ dimensions: dimensions.value,
156
+ count: props.count,
157
+ aspectRatio: props.aspectRatio,
158
+ gap: props.gap,
159
+ layoutMode: props.layoutMode,
160
+ pinnedIndex: props.pinnedIndex,
161
+ othersPosition: props.othersPosition,
162
+ maxItemsPerPage: props.maxItemsPerPage,
163
+ currentPage: props.currentPage,
164
+ maxVisible: props.maxVisible,
165
+ currentVisiblePage: props.currentVisiblePage,
166
+ itemAspectRatios: props.itemAspectRatios,
167
+ floatWidth: props.floatWidth,
168
+ floatHeight: props.floatHeight,
169
+ floatBreakpoints: props.floatBreakpoints
170
+ }));
171
+ const grid = useMeetGrid(gridOptions);
172
+ provide(GridContextKey, {
173
+ grid,
174
+ springPreset: props.springPreset,
175
+ dimensions
176
+ });
177
+ return () => h(
178
+ props.tag,
179
+ {
180
+ ref: containerRef,
181
+ style: {
182
+ position: "relative",
183
+ width: "100%",
184
+ height: "100%",
185
+ overflow: "hidden"
186
+ }
187
+ },
188
+ slots.default?.()
189
+ );
190
+ }
191
+ });
192
+ const GridItem = defineComponent({
193
+ name: "GridItem",
194
+ props: {
195
+ /** Index of this item in the grid */
196
+ index: {
197
+ type: Number,
198
+ required: true
199
+ },
200
+ /** Whether to disable animations */
201
+ disableAnimation: {
202
+ type: Boolean,
203
+ default: false
204
+ },
205
+ /** Optional item-specific aspect ratio (overrides itemAspectRatios from container) */
206
+ itemAspectRatio: {
207
+ type: String,
208
+ default: void 0
209
+ },
210
+ /** HTML tag to render */
211
+ tag: {
212
+ type: String,
213
+ default: "div"
214
+ }
215
+ },
216
+ setup(props, { slots }) {
217
+ const context = inject(GridContextKey);
218
+ if (!context) {
219
+ console.warn("GridItem must be used inside a GridContainer");
220
+ return () => null;
221
+ }
222
+ const { grid, springPreset, dimensions: containerDimensions } = context;
223
+ const position = computed(() => grid.value.getPosition(props.index));
224
+ const dimensions = computed(() => grid.value.getItemDimensions(props.index));
225
+ const contentDimensions = computed(
226
+ () => grid.value.getItemContentDimensions(props.index, props.itemAspectRatio)
227
+ );
228
+ const isMain = computed(() => grid.value.isMainItem(props.index));
229
+ const isVisible = computed(() => grid.value.isItemVisible(props.index));
230
+ const isHidden = computed(() => {
231
+ if (grid.value.layoutMode === "spotlight" && !isMain.value)
232
+ return true;
233
+ if (!isVisible.value)
234
+ return true;
235
+ return false;
236
+ });
237
+ const isFloat = computed(() => grid.value.floatIndex === props.index);
238
+ const floatDims = computed(() => grid.value.floatDimensions ?? { width: 120, height: 160 });
239
+ const floatAnchor = ref(
240
+ "bottom-right"
241
+ );
242
+ const x = useMotionValue(0);
243
+ const y = useMotionValue(0);
244
+ const floatInitialized = ref(false);
245
+ const getFloatCornerPos = (corner) => {
246
+ const padding = 12;
247
+ const dims = containerDimensions.value;
248
+ const fw = floatDims.value.width;
249
+ const fh = floatDims.value.height;
250
+ switch (corner) {
251
+ case "top-left":
252
+ return { x: padding, y: padding };
253
+ case "top-right":
254
+ return { x: dims.width - fw - padding, y: padding };
255
+ case "bottom-left":
256
+ return { x: padding, y: dims.height - fh - padding };
257
+ case "bottom-right":
258
+ default:
259
+ return { x: dims.width - fw - padding, y: dims.height - fh - padding };
260
+ }
261
+ };
262
+ const findFloatNearestCorner = (posX, posY) => {
263
+ const fw = floatDims.value.width;
264
+ const fh = floatDims.value.height;
265
+ const centerX = posX + fw / 2;
266
+ const centerY = posY + fh / 2;
267
+ const dims = containerDimensions.value;
268
+ const isLeft = centerX < dims.width / 2;
269
+ const isTop = centerY < dims.height / 2;
270
+ if (isTop && isLeft)
271
+ return "top-left";
272
+ if (isTop && !isLeft)
273
+ return "top-right";
274
+ if (!isTop && isLeft)
275
+ return "bottom-left";
276
+ return "bottom-right";
277
+ };
278
+ watch(isFloat, (floating) => {
279
+ if (!floating) {
280
+ floatInitialized.value = false;
281
+ }
282
+ });
283
+ watch(
284
+ [isFloat, () => containerDimensions.value.width, () => containerDimensions.value.height],
285
+ ([floating, w, h2]) => {
286
+ if (floating && w > 0 && h2 > 0 && !floatInitialized.value) {
287
+ const pos = getFloatCornerPos(floatAnchor.value);
288
+ x.set(pos.x);
289
+ y.set(pos.y);
290
+ floatInitialized.value = true;
291
+ }
292
+ },
293
+ { immediate: true }
294
+ );
295
+ watch(
296
+ [floatAnchor, () => containerDimensions.value.width, () => containerDimensions.value.height],
297
+ ([, w, h2]) => {
298
+ if (isFloat.value && floatInitialized.value && w > 0 && h2 > 0) {
299
+ const pos = getFloatCornerPos(floatAnchor.value);
300
+ const springCfg = { type: "spring", stiffness: 400, damping: 30 };
301
+ animate(x, pos.x, springCfg);
302
+ animate(y, pos.y, springCfg);
303
+ }
304
+ }
305
+ );
306
+ const isLastVisibleOther = computed(() => {
307
+ const lastVisibleOthersIndex = grid.value.getLastVisibleOthersIndex();
308
+ return props.index === lastVisibleOthersIndex;
309
+ });
310
+ const hiddenCount = computed(() => grid.value.hiddenCount);
311
+ const springConfig = getSpringConfig(springPreset);
312
+ const gridX = useMotionValue(0);
313
+ const gridY = useMotionValue(0);
314
+ const gridAnimReady = ref(false);
315
+ watch(
316
+ [
317
+ () => position.value.top,
318
+ () => position.value.left,
319
+ isFloat,
320
+ isHidden
321
+ ],
322
+ ([, , floating, hidden]) => {
323
+ if (floating || hidden) {
324
+ gridAnimReady.value = false;
325
+ return;
326
+ }
327
+ const pos = position.value;
328
+ if (!gridAnimReady.value) {
329
+ gridX.set(pos.left);
330
+ gridY.set(pos.top);
331
+ gridAnimReady.value = true;
332
+ } else {
333
+ const cfg = {
334
+ type: "spring",
335
+ stiffness: springConfig.stiffness,
336
+ damping: springConfig.damping
337
+ };
338
+ animate(gridX, pos.left, cfg);
339
+ animate(gridY, pos.top, cfg);
340
+ }
341
+ },
342
+ { immediate: true }
343
+ );
344
+ const slotProps = computed(() => ({
345
+ contentDimensions: contentDimensions.value,
346
+ isLastVisibleOther: isLastVisibleOther.value,
347
+ hiddenCount: hiddenCount.value,
348
+ isFloat: isFloat.value
349
+ }));
350
+ return () => {
351
+ if (isHidden.value) {
352
+ return null;
353
+ }
354
+ if (isFloat.value) {
355
+ const dims = containerDimensions.value;
356
+ if (dims.width === 0 || dims.height === 0)
357
+ return null;
358
+ const dragConstraints = {
359
+ left: 12,
360
+ right: dims.width - floatDims.value.width - 12,
361
+ top: 12,
362
+ bottom: dims.height - floatDims.value.height - 12
363
+ };
364
+ const handleDragEnd = () => {
365
+ const currentX = x.get();
366
+ const currentY = y.get();
367
+ const nearestCorner = findFloatNearestCorner(currentX, currentY);
368
+ floatAnchor.value = nearestCorner;
369
+ const snapPos = getFloatCornerPos(nearestCorner);
370
+ const springCfg = { type: "spring", stiffness: 400, damping: 30 };
371
+ animate(x, snapPos.x, springCfg);
372
+ animate(y, snapPos.y, springCfg);
373
+ };
374
+ return h(
375
+ motion.div,
376
+ {
377
+ // Key forces Vue to recreate this element when switching float↔grid
378
+ key: `float-${props.index}`,
379
+ drag: true,
380
+ dragMomentum: false,
381
+ dragElastic: 0.1,
382
+ dragConstraints,
383
+ style: {
384
+ position: "absolute",
385
+ width: `${floatDims.value.width}px`,
386
+ height: `${floatDims.value.height}px`,
387
+ borderRadius: "12px",
388
+ boxShadow: "0 4px 20px rgba(0,0,0,0.3)",
389
+ overflow: "hidden",
390
+ cursor: "grab",
391
+ zIndex: 100,
392
+ touchAction: "none",
393
+ left: 0,
394
+ top: 0,
395
+ x,
396
+ y
397
+ },
398
+ whileDrag: { cursor: "grabbing", scale: 1.05, boxShadow: "0 8px 32px rgba(0,0,0,0.4)" },
399
+ transition: { type: "spring", stiffness: 400, damping: 30 },
400
+ "data-grid-index": props.index,
401
+ "data-grid-float": true,
402
+ onDragEnd: handleDragEnd
403
+ },
404
+ () => slots.default?.(slotProps.value)
405
+ );
406
+ }
407
+ const itemWidth = dimensions.value.width;
408
+ const itemHeight = dimensions.value.height;
409
+ if (props.disableAnimation) {
410
+ return h(
411
+ props.tag,
412
+ {
413
+ style: {
414
+ position: "absolute",
415
+ width: `${itemWidth}px`,
416
+ height: `${itemHeight}px`,
417
+ top: `${position.value.top}px`,
418
+ left: `${position.value.left}px`
419
+ },
420
+ "data-grid-index": props.index,
421
+ "data-grid-main": isMain.value
422
+ },
423
+ slots.default?.(slotProps.value)
424
+ );
425
+ }
426
+ return h(
427
+ motion.div,
428
+ {
429
+ key: `grid-${props.index}`,
430
+ style: {
431
+ position: "absolute",
432
+ top: 0,
433
+ left: 0,
434
+ x: gridX,
435
+ y: gridY,
436
+ width: `${itemWidth}px`,
437
+ height: `${itemHeight}px`
438
+ },
439
+ "data-grid-index": props.index,
440
+ "data-grid-main": isMain.value
441
+ },
442
+ () => slots.default?.(slotProps.value)
443
+ );
444
+ };
445
+ }
446
+ });
447
+ const GridOverlay = defineComponent({
448
+ name: "GridOverlay",
449
+ props: {
450
+ /** Whether to show the overlay */
451
+ visible: {
452
+ type: Boolean,
453
+ default: true
454
+ },
455
+ /** Background color */
456
+ backgroundColor: {
457
+ type: String,
458
+ default: "rgba(0,0,0,0.5)"
459
+ }
460
+ },
461
+ setup(props, { slots }) {
462
+ return () => {
463
+ if (!props.visible) {
464
+ return null;
465
+ }
466
+ return h(
467
+ "div",
468
+ {
469
+ style: {
470
+ position: "absolute",
471
+ inset: 0,
472
+ display: "flex",
473
+ alignItems: "center",
474
+ justifyContent: "center",
475
+ backgroundColor: props.backgroundColor
476
+ }
477
+ },
478
+ slots.default?.()
479
+ );
480
+ };
481
+ }
482
+ });
483
+ const FloatingGridItem = defineComponent({
484
+ name: "FloatingGridItem",
485
+ props: {
486
+ /** Width of the floating item (px). Overridden by `breakpoints` when provided. */
487
+ width: {
488
+ type: Number,
489
+ default: 120
490
+ },
491
+ /** Height of the floating item (px). Overridden by `breakpoints` when provided. */
492
+ height: {
493
+ type: Number,
494
+ default: 160
495
+ },
496
+ /**
497
+ * Responsive breakpoints for PiP sizing.
498
+ * When provided, width/height auto-adjust based on container width.
499
+ * Overrides the fixed `width`/`height` props.
500
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
501
+ */
502
+ breakpoints: {
503
+ type: Array,
504
+ default: void 0
505
+ },
506
+ /** Initial position (x, y from container edges) */
507
+ initialPosition: {
508
+ type: Object,
509
+ default: () => ({ x: 16, y: 16 })
510
+ },
511
+ /** Which corner to anchor */
512
+ anchor: {
513
+ type: String,
514
+ default: "bottom-right"
515
+ },
516
+ /** Whether the item is visible */
517
+ visible: {
518
+ type: Boolean,
519
+ default: true
520
+ },
521
+ /** Padding from container edges */
522
+ edgePadding: {
523
+ type: Number,
524
+ default: 12
525
+ },
526
+ /** Border radius */
527
+ borderRadius: {
528
+ type: Number,
529
+ default: 12
530
+ },
531
+ /** Box shadow */
532
+ boxShadow: {
533
+ type: String,
534
+ default: "0 4px 20px rgba(0,0,0,0.3)"
535
+ }
536
+ },
537
+ emits: ["anchorChange"],
538
+ setup(props, { slots, emit }) {
539
+ const context = inject(GridContextKey);
540
+ if (!context) {
541
+ console.warn("FloatingGridItem must be used inside a GridContainer");
542
+ return () => null;
543
+ }
544
+ const { dimensions } = context;
545
+ const currentAnchor = ref(props.anchor);
546
+ const effectiveSize = computed(() => {
547
+ if (props.breakpoints && props.breakpoints.length > 0 && dimensions.value.width > 0) {
548
+ return resolveFloatSize(dimensions.value.width, props.breakpoints);
549
+ }
550
+ return { width: props.width, height: props.height };
551
+ });
552
+ const x = useMotionValue(0);
553
+ const y = useMotionValue(0);
554
+ const isInitialized = ref(false);
555
+ const containerDimensions = computed(() => ({
556
+ width: dimensions.value.width,
557
+ height: dimensions.value.height
558
+ }));
559
+ const getCornerPosition = (corner) => {
560
+ const padding = props.edgePadding + props.initialPosition.x;
561
+ const dims = containerDimensions.value;
562
+ const ew = effectiveSize.value.width;
563
+ const eh = effectiveSize.value.height;
564
+ switch (corner) {
565
+ case "top-left":
566
+ return { x: padding, y: padding };
567
+ case "top-right":
568
+ return { x: dims.width - ew - padding, y: padding };
569
+ case "bottom-left":
570
+ return { x: padding, y: dims.height - eh - padding };
571
+ case "bottom-right":
572
+ default:
573
+ return { x: dims.width - ew - padding, y: dims.height - eh - padding };
574
+ }
575
+ };
576
+ const findNearestCorner = (posX, posY) => {
577
+ const centerX = posX + effectiveSize.value.width / 2;
578
+ const centerY = posY + effectiveSize.value.height / 2;
579
+ const dims = containerDimensions.value;
580
+ const containerCenterX = dims.width / 2;
581
+ const containerCenterY = dims.height / 2;
582
+ const isLeft = centerX < containerCenterX;
583
+ const isTop = centerY < containerCenterY;
584
+ if (isTop && isLeft)
585
+ return "top-left";
586
+ if (isTop && !isLeft)
587
+ return "top-right";
588
+ if (!isTop && isLeft)
589
+ return "bottom-left";
590
+ return "bottom-right";
591
+ };
592
+ watch(
593
+ [() => containerDimensions.value.width, () => containerDimensions.value.height],
594
+ ([w, h2]) => {
595
+ if (w > 0 && h2 > 0 && !isInitialized.value) {
596
+ const pos = getCornerPosition(currentAnchor.value);
597
+ x.set(pos.x);
598
+ y.set(pos.y);
599
+ isInitialized.value = true;
600
+ }
601
+ },
602
+ { immediate: true }
603
+ );
604
+ watch(
605
+ [
606
+ () => props.anchor,
607
+ () => containerDimensions.value.width,
608
+ () => containerDimensions.value.height
609
+ ],
610
+ ([newAnchor, w, h2]) => {
611
+ if (isInitialized.value && w > 0 && h2 > 0 && newAnchor !== currentAnchor.value) {
612
+ currentAnchor.value = newAnchor;
613
+ const pos = getCornerPosition(newAnchor);
614
+ const springCfg = { type: "spring", stiffness: 400, damping: 30 };
615
+ animate(x, pos.x, springCfg);
616
+ animate(y, pos.y, springCfg);
617
+ }
618
+ }
619
+ );
620
+ watch(
621
+ [() => effectiveSize.value.width, () => effectiveSize.value.height],
622
+ () => {
623
+ if (isInitialized.value && containerDimensions.value.width > 0 && containerDimensions.value.height > 0) {
624
+ const pos = getCornerPosition(currentAnchor.value);
625
+ const springCfg = { type: "spring", stiffness: 400, damping: 30 };
626
+ animate(x, pos.x, springCfg);
627
+ animate(y, pos.y, springCfg);
628
+ }
629
+ }
630
+ );
631
+ return () => {
632
+ const dims = containerDimensions.value;
633
+ if (!props.visible || dims.width === 0 || dims.height === 0) {
634
+ return null;
635
+ }
636
+ const ew = effectiveSize.value.width;
637
+ const eh = effectiveSize.value.height;
638
+ const padding = props.edgePadding + props.initialPosition.x;
639
+ const dragConstraints = {
640
+ left: padding,
641
+ right: dims.width - ew - padding,
642
+ top: padding,
643
+ bottom: dims.height - eh - padding
644
+ };
645
+ const handleDragEnd = () => {
646
+ const currentX = x.get();
647
+ const currentY = y.get();
648
+ const nearestCorner = findNearestCorner(currentX, currentY);
649
+ currentAnchor.value = nearestCorner;
650
+ emit("anchorChange", nearestCorner);
651
+ const snapPos = getCornerPosition(nearestCorner);
652
+ const springCfg = { type: "spring", stiffness: 400, damping: 30 };
653
+ animate(x, snapPos.x, springCfg);
654
+ animate(y, snapPos.y, springCfg);
655
+ };
656
+ return h(
657
+ motion.div,
658
+ {
659
+ drag: true,
660
+ dragMomentum: false,
661
+ dragElastic: 0.1,
662
+ dragConstraints,
663
+ style: {
664
+ position: "absolute",
665
+ width: `${ew}px`,
666
+ height: `${eh}px`,
667
+ borderRadius: `${props.borderRadius}px`,
668
+ boxShadow: props.boxShadow,
669
+ overflow: "hidden",
670
+ cursor: "grab",
671
+ zIndex: 100,
672
+ touchAction: "none",
673
+ left: 0,
674
+ top: 0,
675
+ x,
676
+ y
677
+ },
678
+ whileDrag: { cursor: "grabbing", scale: 1.05, boxShadow: "0 8px 32px rgba(0,0,0,0.4)" },
679
+ transition: { type: "spring", stiffness: 400, damping: 30 },
680
+ onDragEnd: handleDragEnd
681
+ },
682
+ slots.default?.()
683
+ );
684
+ };
685
+ }
686
+ });
687
+
688
+ export { FloatingGridItem, GridContainer, GridContextKey, GridItem, GridOverlay, useGridAnimation, useGridDimensions, useGridItemPosition, useMeetGrid };