@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.
@@ -0,0 +1,471 @@
1
+ import * as _thangdevalone_meeting_grid_layout_core from '@thangdevalone/meeting-grid-layout-core';
2
+ import { GridDimensions, MeetGridOptions, MeetGridResult, SpringPreset, LayoutMode, ItemAspectRatio, PipBreakpoint } from '@thangdevalone/meeting-grid-layout-core';
3
+ export { ContentDimensions, GridDimensions, GridOptions, ItemAspectRatio, LayoutMode, MeetGridOptions, MeetGridResult, Position, SpringPreset, createGrid, createGridItemPositioner, createMeetGrid, getAspectRatio, getGridItemDimensions, getSpringConfig, springPresets } from '@thangdevalone/meeting-grid-layout-core';
4
+ import * as vue from 'vue';
5
+ import { Ref, ComputedRef, InjectionKey, PropType } from 'vue';
6
+
7
+ /**
8
+ * Vue composable to track element dimensions using ResizeObserver.
9
+ * @param elementRef A ref to the target element
10
+ * @returns Reactive dimensions object
11
+ */
12
+ declare function useGridDimensions(elementRef: Ref<HTMLElement | null | undefined>): ComputedRef<GridDimensions>;
13
+ /**
14
+ * Vue composable for creating a meet-style responsive grid.
15
+ * @param options Reactive or static grid options
16
+ * @returns Reactive grid result
17
+ */
18
+ declare function useMeetGrid(options: Ref<MeetGridOptions> | ComputedRef<MeetGridOptions> | (() => MeetGridOptions)): ComputedRef<MeetGridResult>;
19
+ /**
20
+ * Composable to get animation configuration for Motion
21
+ */
22
+ declare function useGridAnimation(preset?: SpringPreset): ComputedRef<{
23
+ stiffness: 400;
24
+ damping: 30;
25
+ type: "spring";
26
+ } | {
27
+ stiffness: 300;
28
+ damping: 30;
29
+ type: "spring";
30
+ } | {
31
+ stiffness: 200;
32
+ damping: 25;
33
+ type: "spring";
34
+ } | {
35
+ stiffness: 400;
36
+ damping: 15;
37
+ type: "spring";
38
+ }>;
39
+ /**
40
+ * Composable to get position for a specific grid item index
41
+ */
42
+ declare function useGridItemPosition(grid: ComputedRef<MeetGridResult>, index: Ref<number> | ComputedRef<number> | number): {
43
+ position: ComputedRef<_thangdevalone_meeting_grid_layout_core.Position>;
44
+ dimensions: ComputedRef<GridDimensions>;
45
+ isMain: ComputedRef<boolean>;
46
+ isHidden: ComputedRef<boolean>;
47
+ };
48
+
49
+ interface GridContextValue {
50
+ grid: ComputedRef<MeetGridResult>;
51
+ springPreset: SpringPreset;
52
+ dimensions: Ref<GridDimensions>;
53
+ }
54
+ declare const GridContextKey: InjectionKey<GridContextValue>;
55
+ declare const GridContainer: vue.DefineComponent<vue.ExtractPropTypes<{
56
+ /** Aspect ratio in format "width:height" */
57
+ aspectRatio: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ /** Gap between items in pixels */
62
+ gap: {
63
+ type: NumberConstructor;
64
+ default: number;
65
+ };
66
+ /** Number of items */
67
+ count: {
68
+ type: NumberConstructor;
69
+ required: true;
70
+ };
71
+ /** Layout mode */
72
+ layoutMode: {
73
+ type: PropType<LayoutMode>;
74
+ default: string;
75
+ };
76
+ /** Index of pinned/focused item (main participant for pin/spotlight modes) */
77
+ pinnedIndex: {
78
+ type: NumberConstructor;
79
+ default: undefined;
80
+ };
81
+ /**
82
+ * Position of "others" thumbnails when a participant is pinned.
83
+ * In portrait containers, this is forced to 'bottom'.
84
+ * @default 'right'
85
+ */
86
+ othersPosition: {
87
+ type: PropType<"left" | "right" | "top" | "bottom">;
88
+ default: string;
89
+ };
90
+ /** Spring animation preset */
91
+ springPreset: {
92
+ type: PropType<SpringPreset>;
93
+ default: string;
94
+ };
95
+ /** Maximum items per page for pagination (0 = no pagination) */
96
+ maxItemsPerPage: {
97
+ type: NumberConstructor;
98
+ default: number;
99
+ };
100
+ /** Current page index (0-based) for pagination */
101
+ currentPage: {
102
+ type: NumberConstructor;
103
+ default: number;
104
+ };
105
+ /** Maximum visible items (0 = show all). In gallery without pin: limits all items. With pin: limits "others". */
106
+ maxVisible: {
107
+ type: NumberConstructor;
108
+ default: number;
109
+ };
110
+ /** Current page for visible items (0-based), used when maxVisible > 0 */
111
+ currentVisiblePage: {
112
+ type: NumberConstructor;
113
+ default: number;
114
+ };
115
+ /**
116
+ * Per-item aspect ratio configurations.
117
+ * Use different ratios for mobile (9:16), desktop (16:9).
118
+ * @example ['16:9', '9:16', undefined]
119
+ */
120
+ itemAspectRatios: {
121
+ type: PropType<(ItemAspectRatio | undefined)[]>;
122
+ default: undefined;
123
+ };
124
+ /** Custom width for the floating PiP item in 2-person mode */
125
+ floatWidth: {
126
+ type: NumberConstructor;
127
+ default: undefined;
128
+ };
129
+ /** Custom height for the floating PiP item in 2-person mode */
130
+ floatHeight: {
131
+ type: NumberConstructor;
132
+ default: undefined;
133
+ };
134
+ /**
135
+ * Responsive breakpoints for the floating PiP in 2-person mode.
136
+ * When provided, PiP size auto-adjusts based on container width.
137
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
138
+ */
139
+ floatBreakpoints: {
140
+ type: PropType<PipBreakpoint[]>;
141
+ default: undefined;
142
+ };
143
+ /** HTML tag to render */
144
+ tag: {
145
+ type: StringConstructor;
146
+ default: string;
147
+ };
148
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
149
+ [key: string]: any;
150
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
151
+ /** Aspect ratio in format "width:height" */
152
+ aspectRatio: {
153
+ type: StringConstructor;
154
+ default: string;
155
+ };
156
+ /** Gap between items in pixels */
157
+ gap: {
158
+ type: NumberConstructor;
159
+ default: number;
160
+ };
161
+ /** Number of items */
162
+ count: {
163
+ type: NumberConstructor;
164
+ required: true;
165
+ };
166
+ /** Layout mode */
167
+ layoutMode: {
168
+ type: PropType<LayoutMode>;
169
+ default: string;
170
+ };
171
+ /** Index of pinned/focused item (main participant for pin/spotlight modes) */
172
+ pinnedIndex: {
173
+ type: NumberConstructor;
174
+ default: undefined;
175
+ };
176
+ /**
177
+ * Position of "others" thumbnails when a participant is pinned.
178
+ * In portrait containers, this is forced to 'bottom'.
179
+ * @default 'right'
180
+ */
181
+ othersPosition: {
182
+ type: PropType<"left" | "right" | "top" | "bottom">;
183
+ default: string;
184
+ };
185
+ /** Spring animation preset */
186
+ springPreset: {
187
+ type: PropType<SpringPreset>;
188
+ default: string;
189
+ };
190
+ /** Maximum items per page for pagination (0 = no pagination) */
191
+ maxItemsPerPage: {
192
+ type: NumberConstructor;
193
+ default: number;
194
+ };
195
+ /** Current page index (0-based) for pagination */
196
+ currentPage: {
197
+ type: NumberConstructor;
198
+ default: number;
199
+ };
200
+ /** Maximum visible items (0 = show all). In gallery without pin: limits all items. With pin: limits "others". */
201
+ maxVisible: {
202
+ type: NumberConstructor;
203
+ default: number;
204
+ };
205
+ /** Current page for visible items (0-based), used when maxVisible > 0 */
206
+ currentVisiblePage: {
207
+ type: NumberConstructor;
208
+ default: number;
209
+ };
210
+ /**
211
+ * Per-item aspect ratio configurations.
212
+ * Use different ratios for mobile (9:16), desktop (16:9).
213
+ * @example ['16:9', '9:16', undefined]
214
+ */
215
+ itemAspectRatios: {
216
+ type: PropType<(ItemAspectRatio | undefined)[]>;
217
+ default: undefined;
218
+ };
219
+ /** Custom width for the floating PiP item in 2-person mode */
220
+ floatWidth: {
221
+ type: NumberConstructor;
222
+ default: undefined;
223
+ };
224
+ /** Custom height for the floating PiP item in 2-person mode */
225
+ floatHeight: {
226
+ type: NumberConstructor;
227
+ default: undefined;
228
+ };
229
+ /**
230
+ * Responsive breakpoints for the floating PiP in 2-person mode.
231
+ * When provided, PiP size auto-adjusts based on container width.
232
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
233
+ */
234
+ floatBreakpoints: {
235
+ type: PropType<PipBreakpoint[]>;
236
+ default: undefined;
237
+ };
238
+ /** HTML tag to render */
239
+ tag: {
240
+ type: StringConstructor;
241
+ default: string;
242
+ };
243
+ }>> & Readonly<{}>, {
244
+ aspectRatio: string;
245
+ gap: number;
246
+ layoutMode: LayoutMode;
247
+ pinnedIndex: number;
248
+ othersPosition: "left" | "right" | "top" | "bottom";
249
+ springPreset: "snappy" | "smooth" | "gentle" | "bouncy";
250
+ maxItemsPerPage: number;
251
+ currentPage: number;
252
+ maxVisible: number;
253
+ currentVisiblePage: number;
254
+ itemAspectRatios: (string | undefined)[];
255
+ floatWidth: number;
256
+ floatHeight: number;
257
+ floatBreakpoints: PipBreakpoint[];
258
+ tag: string;
259
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
260
+ declare const GridItem: vue.DefineComponent<vue.ExtractPropTypes<{
261
+ /** Index of this item in the grid */
262
+ index: {
263
+ type: NumberConstructor;
264
+ required: true;
265
+ };
266
+ /** Whether to disable animations */
267
+ disableAnimation: {
268
+ type: BooleanConstructor;
269
+ default: boolean;
270
+ };
271
+ /** Optional item-specific aspect ratio (overrides itemAspectRatios from container) */
272
+ itemAspectRatio: {
273
+ type: PropType<ItemAspectRatio>;
274
+ default: undefined;
275
+ };
276
+ /** HTML tag to render */
277
+ tag: {
278
+ type: StringConstructor;
279
+ default: string;
280
+ };
281
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
282
+ [key: string]: any;
283
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
284
+ /** Index of this item in the grid */
285
+ index: {
286
+ type: NumberConstructor;
287
+ required: true;
288
+ };
289
+ /** Whether to disable animations */
290
+ disableAnimation: {
291
+ type: BooleanConstructor;
292
+ default: boolean;
293
+ };
294
+ /** Optional item-specific aspect ratio (overrides itemAspectRatios from container) */
295
+ itemAspectRatio: {
296
+ type: PropType<ItemAspectRatio>;
297
+ default: undefined;
298
+ };
299
+ /** HTML tag to render */
300
+ tag: {
301
+ type: StringConstructor;
302
+ default: string;
303
+ };
304
+ }>> & Readonly<{}>, {
305
+ tag: string;
306
+ disableAnimation: boolean;
307
+ itemAspectRatio: string;
308
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
309
+ declare const GridOverlay: vue.DefineComponent<vue.ExtractPropTypes<{
310
+ /** Whether to show the overlay */
311
+ visible: {
312
+ type: BooleanConstructor;
313
+ default: boolean;
314
+ };
315
+ /** Background color */
316
+ backgroundColor: {
317
+ type: StringConstructor;
318
+ default: string;
319
+ };
320
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
321
+ [key: string]: any;
322
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
323
+ /** Whether to show the overlay */
324
+ visible: {
325
+ type: BooleanConstructor;
326
+ default: boolean;
327
+ };
328
+ /** Background color */
329
+ backgroundColor: {
330
+ type: StringConstructor;
331
+ default: string;
332
+ };
333
+ }>> & Readonly<{}>, {
334
+ backgroundColor: string;
335
+ visible: boolean;
336
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
337
+ declare const FloatingGridItem: vue.DefineComponent<vue.ExtractPropTypes<{
338
+ /** Width of the floating item (px). Overridden by `breakpoints` when provided. */
339
+ width: {
340
+ type: NumberConstructor;
341
+ default: number;
342
+ };
343
+ /** Height of the floating item (px). Overridden by `breakpoints` when provided. */
344
+ height: {
345
+ type: NumberConstructor;
346
+ default: number;
347
+ };
348
+ /**
349
+ * Responsive breakpoints for PiP sizing.
350
+ * When provided, width/height auto-adjust based on container width.
351
+ * Overrides the fixed `width`/`height` props.
352
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
353
+ */
354
+ breakpoints: {
355
+ type: PropType<PipBreakpoint[]>;
356
+ default: undefined;
357
+ };
358
+ /** Initial position (x, y from container edges) */
359
+ initialPosition: {
360
+ type: PropType<{
361
+ x: number;
362
+ y: number;
363
+ }>;
364
+ default: () => {
365
+ x: number;
366
+ y: number;
367
+ };
368
+ };
369
+ /** Which corner to anchor */
370
+ anchor: {
371
+ type: PropType<"top-left" | "top-right" | "bottom-left" | "bottom-right">;
372
+ default: string;
373
+ };
374
+ /** Whether the item is visible */
375
+ visible: {
376
+ type: BooleanConstructor;
377
+ default: boolean;
378
+ };
379
+ /** Padding from container edges */
380
+ edgePadding: {
381
+ type: NumberConstructor;
382
+ default: number;
383
+ };
384
+ /** Border radius */
385
+ borderRadius: {
386
+ type: NumberConstructor;
387
+ default: number;
388
+ };
389
+ /** Box shadow */
390
+ boxShadow: {
391
+ type: StringConstructor;
392
+ default: string;
393
+ };
394
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
395
+ [key: string]: any;
396
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "anchorChange"[], "anchorChange", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
397
+ /** Width of the floating item (px). Overridden by `breakpoints` when provided. */
398
+ width: {
399
+ type: NumberConstructor;
400
+ default: number;
401
+ };
402
+ /** Height of the floating item (px). Overridden by `breakpoints` when provided. */
403
+ height: {
404
+ type: NumberConstructor;
405
+ default: number;
406
+ };
407
+ /**
408
+ * Responsive breakpoints for PiP sizing.
409
+ * When provided, width/height auto-adjust based on container width.
410
+ * Overrides the fixed `width`/`height` props.
411
+ * Use `DEFAULT_FLOAT_BREAKPOINTS` for a ready-made 5-level responsive config.
412
+ */
413
+ breakpoints: {
414
+ type: PropType<PipBreakpoint[]>;
415
+ default: undefined;
416
+ };
417
+ /** Initial position (x, y from container edges) */
418
+ initialPosition: {
419
+ type: PropType<{
420
+ x: number;
421
+ y: number;
422
+ }>;
423
+ default: () => {
424
+ x: number;
425
+ y: number;
426
+ };
427
+ };
428
+ /** Which corner to anchor */
429
+ anchor: {
430
+ type: PropType<"top-left" | "top-right" | "bottom-left" | "bottom-right">;
431
+ default: string;
432
+ };
433
+ /** Whether the item is visible */
434
+ visible: {
435
+ type: BooleanConstructor;
436
+ default: boolean;
437
+ };
438
+ /** Padding from container edges */
439
+ edgePadding: {
440
+ type: NumberConstructor;
441
+ default: number;
442
+ };
443
+ /** Border radius */
444
+ borderRadius: {
445
+ type: NumberConstructor;
446
+ default: number;
447
+ };
448
+ /** Box shadow */
449
+ boxShadow: {
450
+ type: StringConstructor;
451
+ default: string;
452
+ };
453
+ }>> & Readonly<{
454
+ onAnchorChange?: ((...args: any[]) => any) | undefined;
455
+ }>, {
456
+ borderRadius: number;
457
+ boxShadow: string;
458
+ height: number;
459
+ width: number;
460
+ anchor: "top-left" | "top-right" | "bottom-left" | "bottom-right";
461
+ visible: boolean;
462
+ breakpoints: PipBreakpoint[];
463
+ initialPosition: {
464
+ x: number;
465
+ y: number;
466
+ };
467
+ edgePadding: number;
468
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
469
+
470
+ export { FloatingGridItem, GridContainer, GridContextKey, GridItem, GridOverlay, useGridAnimation, useGridDimensions, useGridItemPosition, useMeetGrid };
471
+ export type { GridContextValue };