@types/flickity 2.2.12 → 3.0.0
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.
- flickity/README.md +1 -1
- flickity/index.d.ts +86 -8
- flickity/package.json +3 -3
flickity/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for flickity (https://flickity.metafizzy.
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flickity.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 28 Nov 2026 07:02:50 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
flickity/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare namespace Flickity {
|
|
|
84
84
|
*
|
|
85
85
|
* default: true
|
|
86
86
|
*/
|
|
87
|
-
draggable?: boolean | undefined;
|
|
87
|
+
draggable?: boolean | ">1" | undefined;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Enables content to be freely scrolled and flicked without aligning cells to an end position.
|
|
@@ -99,7 +99,7 @@ declare namespace Flickity {
|
|
|
99
99
|
*
|
|
100
100
|
* default: false
|
|
101
101
|
*/
|
|
102
|
-
wrapAround?: boolean | undefined;
|
|
102
|
+
wrapAround?: boolean | "fill" | undefined;
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Groups cells together in slides. Flicking, page dots, and previous/next buttons are mapped to group slides, not individual cells.
|
|
@@ -219,9 +219,47 @@ declare namespace Flickity {
|
|
|
219
219
|
* Bind events within Flickity's options by setting on to an Object. The object's keys should match the event names. on is useful for capturing events as Flickity is initialized, like ready
|
|
220
220
|
*/
|
|
221
221
|
on?: EventBindings | undefined;
|
|
222
|
+
|
|
223
|
+
/** Whether jQuery-triggered events are prefixed with `flickity`. */
|
|
224
|
+
namespaceJQueryEvents?: boolean | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** A measured carousel cell. */
|
|
228
|
+
interface Cell {
|
|
229
|
+
element: HTMLElement;
|
|
230
|
+
x: number;
|
|
231
|
+
size: { width: number; height: number; outerWidth: number; outerHeight: number };
|
|
232
|
+
getSize(): void;
|
|
233
|
+
select(): void;
|
|
234
|
+
unselect(): void;
|
|
235
|
+
remove(): void;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** A slide containing one or more cells (depending on groupCells). */
|
|
239
|
+
interface Slide {
|
|
240
|
+
cells: Cell[];
|
|
241
|
+
outerWidth: number;
|
|
242
|
+
height: number;
|
|
243
|
+
target: number;
|
|
244
|
+
getCellElements(): HTMLElement[];
|
|
222
245
|
}
|
|
223
246
|
|
|
224
247
|
interface EventBindings {
|
|
248
|
+
/** Triggered when cell positions or dimensions change. */
|
|
249
|
+
cellChange?: ((changedCellIndex: number) => void) | undefined;
|
|
250
|
+
|
|
251
|
+
/** Triggered when the carousel is activated. */
|
|
252
|
+
activate?: (() => void) | undefined;
|
|
253
|
+
|
|
254
|
+
/** Triggered when the carousel is deactivated. */
|
|
255
|
+
deactivate?: (() => void) | undefined;
|
|
256
|
+
|
|
257
|
+
/** Triggered when the UI is interacted with. */
|
|
258
|
+
uiChange?: (() => void) | undefined;
|
|
259
|
+
|
|
260
|
+
/** Triggered after the carousel is resized. */
|
|
261
|
+
resize?: (() => void) | undefined;
|
|
262
|
+
|
|
225
263
|
/**
|
|
226
264
|
* Triggered after Flickity has been activated.
|
|
227
265
|
*/
|
|
@@ -378,23 +416,32 @@ declare class Flickity {
|
|
|
378
416
|
/**
|
|
379
417
|
* The selected cell element.
|
|
380
418
|
*/
|
|
381
|
-
selectedElement:
|
|
419
|
+
selectedElement: HTMLElement;
|
|
382
420
|
|
|
383
421
|
/**
|
|
384
422
|
* The array of cells. Use cells.length for the total number of cells.
|
|
385
423
|
*/
|
|
386
|
-
cells:
|
|
424
|
+
cells: Flickity.Cell[];
|
|
387
425
|
|
|
388
426
|
/**
|
|
389
427
|
* The array of slides. Useful for groupCells. A slide contains multiple cells.
|
|
390
428
|
* If groupCells is disabled, then each slide is a cell, so they are one in the same.
|
|
391
429
|
*/
|
|
392
|
-
slides:
|
|
430
|
+
slides: Flickity.Slide[];
|
|
393
431
|
|
|
394
432
|
/**
|
|
395
433
|
* An array of elements in the selected slide. Useful for groupCells.
|
|
396
434
|
*/
|
|
397
|
-
selectedElements:
|
|
435
|
+
selectedElements: HTMLElement[];
|
|
436
|
+
|
|
437
|
+
/** The selected slide and its cells. Available after selection. */
|
|
438
|
+
selectedSlide: Flickity.Slide;
|
|
439
|
+
selectedCells: Flickity.Cell[];
|
|
440
|
+
selectedCell: Flickity.Cell;
|
|
441
|
+
|
|
442
|
+
/** The carousel's container and viewport elements. */
|
|
443
|
+
element: HTMLElement;
|
|
444
|
+
viewport: HTMLElement;
|
|
398
445
|
|
|
399
446
|
/**
|
|
400
447
|
* The slider element
|
|
@@ -441,7 +488,7 @@ declare class Flickity {
|
|
|
441
488
|
* @param isWrapped If true, the last slide will be selected if at the first slide.
|
|
442
489
|
* @param isInstant If true, immediately view the selected slide without animation.
|
|
443
490
|
*/
|
|
444
|
-
selectCell(index: number | string, isWrapped?: boolean, isInstant?: boolean): void;
|
|
491
|
+
selectCell(index: number | string | Element, isWrapped?: boolean, isInstant?: boolean): void;
|
|
445
492
|
|
|
446
493
|
/**
|
|
447
494
|
* Resize the gallery and re-position cells.
|
|
@@ -517,7 +564,38 @@ declare class Flickity {
|
|
|
517
564
|
* Get the elements of the cells.
|
|
518
565
|
* @returns Element[]
|
|
519
566
|
*/
|
|
520
|
-
getCellElements():
|
|
567
|
+
getCellElements(): HTMLElement[];
|
|
568
|
+
|
|
569
|
+
/** Return the index of the slide containing the cell. */
|
|
570
|
+
getCellSlideIndex(cell: Flickity.Cell): number;
|
|
571
|
+
|
|
572
|
+
/** Find the cell corresponding to a cell element. */
|
|
573
|
+
getCell(element: Element): Flickity.Cell | undefined;
|
|
574
|
+
|
|
575
|
+
/** Find the cell containing an element, including nested descendants. */
|
|
576
|
+
getParentCell(element: Element): Flickity.Cell | undefined;
|
|
577
|
+
|
|
578
|
+
/** Find the cells corresponding to a collection of elements. */
|
|
579
|
+
getCells(elements: Element | ArrayLike<Element>): Flickity.Cell[];
|
|
580
|
+
|
|
581
|
+
/** Find a cell by index, selector, or element. */
|
|
582
|
+
queryCell(value: number | string | Element): Flickity.Cell | undefined;
|
|
583
|
+
|
|
584
|
+
/** Recalculate layout after a cell's dimensions change. */
|
|
585
|
+
cellSizeChange(element: Element): void;
|
|
586
|
+
|
|
587
|
+
/** Recalculate layout after a cell was added, removed, or resized. */
|
|
588
|
+
cellChange(changedCellIndex?: number): void;
|
|
589
|
+
|
|
590
|
+
/** Immediately position the slider at the currently selected slide. */
|
|
591
|
+
positionSliderAtSelected(): void;
|
|
592
|
+
|
|
593
|
+
/** Return the last cell or slide, if present. */
|
|
594
|
+
getLastCell(): Flickity.Cell | undefined;
|
|
595
|
+
getLastSlide(): Flickity.Slide | undefined;
|
|
596
|
+
|
|
597
|
+
/** Return elements belonging to slides adjacent to the selected slide. */
|
|
598
|
+
getAdjacentCellElements(adjacentCount: number, index?: number): HTMLElement[];
|
|
521
599
|
|
|
522
600
|
// event listeners
|
|
523
601
|
|
flickity/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/flickity",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "TypeScript definitions for flickity",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flickity",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"scripts": {},
|
|
42
42
|
"dependencies": {},
|
|
43
43
|
"peerDependencies": {},
|
|
44
|
-
"typesPublisherContentHash": "
|
|
45
|
-
"typeScriptVersion": "5.
|
|
44
|
+
"typesPublisherContentHash": "68c33461d1b56ea664c07d588a4e2e8128660032329263c55fd73ab8873e771e",
|
|
45
|
+
"typeScriptVersion": "5.6"
|
|
46
46
|
}
|