@dodlhuat/basix 1.2.7 → 1.2.9

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.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/js/bottom-sheet.d.ts +37 -0
  3. package/js/calendar.d.ts +115 -0
  4. package/js/carousel.d.ts +34 -0
  5. package/js/chart.d.ts +73 -0
  6. package/js/code-viewer.d.ts +16 -0
  7. package/js/context-menu.d.ts +31 -0
  8. package/js/datepicker.d.ts +55 -0
  9. package/js/dropdown.d.ts +30 -0
  10. package/js/editor.d.ts +41 -0
  11. package/js/file-uploader.d.ts +48 -0
  12. package/js/flyout-menu.d.ts +37 -0
  13. package/js/gallery.d.ts +35 -0
  14. package/js/group-picker.d.ts +59 -0
  15. package/js/lightbox.d.ts +46 -0
  16. package/js/modal.d.ts +28 -0
  17. package/js/popover.d.ts +46 -0
  18. package/js/position.d.ts +31 -0
  19. package/js/push-menu.d.ts +31 -0
  20. package/js/range-slider.d.ts +9 -0
  21. package/js/scroll.d.ts +15 -0
  22. package/js/scrollbar.d.ts +48 -0
  23. package/js/select.d.ts +16 -0
  24. package/js/sidebar-nav.d.ts +22 -0
  25. package/js/stepper.d.ts +26 -0
  26. package/js/table.d.ts +98 -0
  27. package/js/tabs.d.ts +57 -0
  28. package/js/theme.d.ts +65 -0
  29. package/js/timepicker.d.ts +37 -0
  30. package/js/toast.d.ts +26 -0
  31. package/js/tooltip.d.ts +34 -0
  32. package/js/tree.d.ts +40 -0
  33. package/js/utils.d.ts +24 -0
  34. package/js/virtual-dropdown.d.ts +55 -0
  35. package/package.json +1 -1
  36. package/js/bottom-sheet.ts +0 -224
  37. package/js/calendar.ts +0 -774
  38. package/js/carousel.ts +0 -222
  39. package/js/chart.ts +0 -694
  40. package/js/code-viewer.ts +0 -188
  41. package/js/context-menu.ts +0 -252
  42. package/js/datepicker.ts +0 -640
  43. package/js/dropdown.ts +0 -180
  44. package/js/editor.ts +0 -492
  45. package/js/file-uploader.ts +0 -361
  46. package/js/flyout-menu.ts +0 -255
  47. package/js/gallery.ts +0 -237
  48. package/js/group-picker.ts +0 -451
  49. package/js/lightbox.ts +0 -333
  50. package/js/modal.ts +0 -171
  51. package/js/popover.ts +0 -221
  52. package/js/position.ts +0 -111
  53. package/js/push-menu.ts +0 -286
  54. package/js/range-slider.ts +0 -33
  55. package/js/scroll.ts +0 -47
  56. package/js/scrollbar.ts +0 -335
  57. package/js/select.ts +0 -235
  58. package/js/sidebar-nav.ts +0 -66
  59. package/js/stepper.ts +0 -109
  60. package/js/table.ts +0 -459
  61. package/js/tabs.ts +0 -280
  62. package/js/theme.ts +0 -235
  63. package/js/timepicker.ts +0 -202
  64. package/js/toast.ts +0 -134
  65. package/js/tooltip.ts +0 -196
  66. package/js/tree.ts +0 -244
  67. package/js/tsconfig.json +0 -18
  68. package/js/utils.ts +0 -119
  69. package/js/virtual-dropdown.ts +0 -396
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Basix 1.2.7
1
+ # Basix 1.2.9
2
2
 
3
3
  Basix is intended as a starter for the rapid development of a design. Each design element can be added individually to
4
4
  include only the data required. It is using plain javascript / typescript and therefore is not dependent on any plugin.
@@ -0,0 +1,37 @@
1
+ interface BottomSheetOptions {
2
+ content: string;
3
+ header?: string;
4
+ footer?: string;
5
+ closeable?: boolean;
6
+ snapHeight?: 'auto' | 'half' | 'full';
7
+ onClose?: () => void;
8
+ }
9
+ declare class BottomSheet {
10
+ private readonly content;
11
+ private readonly header?;
12
+ private readonly footer?;
13
+ private readonly closeable;
14
+ private snapHeight;
15
+ private readonly onClose?;
16
+ private wrapper;
17
+ private sheet;
18
+ private handle;
19
+ private body;
20
+ private dragStartY;
21
+ private currentDragY;
22
+ private isDragging;
23
+ constructor(options: BottomSheetOptions);
24
+ show(): void;
25
+ hide(): void;
26
+ snapTo(height: 'auto' | 'half' | 'full'): void;
27
+ private handleEscape;
28
+ private handleBackdropClick;
29
+ private handleTouchStart;
30
+ private handleTouchMove;
31
+ private handleTouchEnd;
32
+ private updateScrollMask;
33
+ private buildTemplate;
34
+ isVisible(): boolean;
35
+ destroy(): void;
36
+ }
37
+ export { BottomSheet, type BottomSheetOptions };
@@ -0,0 +1,115 @@
1
+ export interface CalendarEvent {
2
+ id: string;
3
+ title: string;
4
+ start: Date;
5
+ end: Date;
6
+ allDay?: boolean;
7
+ className?: string;
8
+ }
9
+ export type CalendarView = 'month' | 'week' | 'agenda';
10
+ export interface CalendarLocale {
11
+ monthNames: string[];
12
+ dayNamesShort: string[];
13
+ dayNamesFull: string[];
14
+ firstDayOfWeek: number;
15
+ today: string;
16
+ month: string;
17
+ week: string;
18
+ agenda: string;
19
+ allDay: string;
20
+ noEvents: string;
21
+ }
22
+ export interface CalendarOptions {
23
+ container: HTMLElement | string;
24
+ events?: CalendarEvent[];
25
+ view?: CalendarView;
26
+ locale?: Partial<CalendarLocale>;
27
+ showOutsideDays?: boolean;
28
+ onDayClick?: (date: Date) => void;
29
+ onEventClick?: (event: CalendarEvent) => void;
30
+ onChange?: (date: Date, view: CalendarView) => void;
31
+ className?: string;
32
+ iconBasePath?: string;
33
+ }
34
+ interface SpanLayout {
35
+ event: CalendarEvent;
36
+ colStart: number;
37
+ colEnd: number;
38
+ lane: number;
39
+ continuesBefore: boolean;
40
+ continuesAfter: boolean;
41
+ }
42
+ interface TimedEventLayout {
43
+ event: CalendarEvent;
44
+ top: number;
45
+ height: number;
46
+ col: number;
47
+ cols: number;
48
+ }
49
+ export declare const CalendarLogic: {
50
+ getMonthGrid(year: number, month: number, firstDayOfWeek: number): Date[];
51
+ getWeekDays(date: Date, firstDayOfWeek: number): Date[];
52
+ isSameDay(a: Date, b: Date): boolean;
53
+ isToday(date: Date): boolean;
54
+ isCurrentMonth(date: Date, year: number, month: number): boolean;
55
+ startOfDay(d: Date): Date;
56
+ isMultiDay(event: CalendarEvent): boolean;
57
+ getEventsForDay(events: CalendarEvent[], day: Date): CalendarEvent[];
58
+ getAllDayEvents(events: CalendarEvent[], day: Date): CalendarEvent[];
59
+ getTimedEvents(events: CalendarEvent[], day: Date): CalendarEvent[];
60
+ getEventPosition(event: CalendarEvent, day: Date): {
61
+ top: number;
62
+ height: number;
63
+ };
64
+ formatTime(date: Date): string;
65
+ /** Compute horizontal span layout for a set of events within a 7-day row. */
66
+ computeSpanLayout(weekDays: Date[], events: CalendarEvent[]): SpanLayout[];
67
+ /** Compute side-by-side column layout for overlapping timed events in a day column. */
68
+ computeTimedLayout(events: CalendarEvent[], day: Date): TimedEventLayout[];
69
+ nowLinePct(): number;
70
+ };
71
+ export declare class CalendarRenderer {
72
+ private locale;
73
+ constructor(locale: CalendarLocale);
74
+ renderWeekdayHeaders(): string;
75
+ renderEvent(event: CalendarEvent, compact?: boolean): string;
76
+ renderSpanBar(layout: SpanLayout): string;
77
+ renderMonthDay(date: Date, currentMonth: number, currentYear: number, events: CalendarEvent[], showOutsideDays: boolean): string;
78
+ renderWeekRow(weekDays: Date[], currentMonth: number, currentYear: number, events: CalendarEvent[], showOutsideDays: boolean): string;
79
+ renderMonthView(year: number, month: number, events: CalendarEvent[], showOutsideDays: boolean, firstDayOfWeek: number): string;
80
+ renderWeekView(date: Date, events: CalendarEvent[], firstDayOfWeek: number, showNowLine?: boolean): string;
81
+ renderAgendaView(year: number, month: number, events: CalendarEvent[]): string;
82
+ }
83
+ export declare class Calendar {
84
+ private container;
85
+ private options;
86
+ private locale;
87
+ private renderer;
88
+ private currentDate;
89
+ private currentView;
90
+ private events;
91
+ private nowLineTimer;
92
+ constructor(options: CalendarOptions);
93
+ setView(view: CalendarView): void;
94
+ next(): void;
95
+ prev(): void;
96
+ today(): void;
97
+ addEvent(event: CalendarEvent): void;
98
+ removeEvent(id: string): void;
99
+ setEvents(events: CalendarEvent[]): void;
100
+ getEvents(): CalendarEvent[];
101
+ destroy(): void;
102
+ private getTitle;
103
+ private buildHeader;
104
+ private buildBody;
105
+ private render;
106
+ private scrollToNow;
107
+ private startNowLineTimer;
108
+ private clearNowLineTimer;
109
+ private readonly boundHandleClick;
110
+ private readonly boundHandleKeydown;
111
+ private attachEvents;
112
+ private handleClick;
113
+ private handleKeydown;
114
+ }
115
+ export {};
@@ -0,0 +1,34 @@
1
+ interface CarouselOptions {
2
+ loop?: boolean;
3
+ autoPlay?: boolean;
4
+ autoPlayInterval?: number;
5
+ }
6
+ declare class Carousel {
7
+ private root;
8
+ private options;
9
+ private track;
10
+ private slides;
11
+ private slideWidth;
12
+ private currentIndex;
13
+ private prevButton;
14
+ private nextButton;
15
+ private dotsNav;
16
+ private dots;
17
+ private autoPlayTimer;
18
+ private abortController;
19
+ constructor(elementOrSelector: string | HTMLElement, options?: CarouselOptions);
20
+ private init;
21
+ private setupDOM;
22
+ private bindEvents;
23
+ private moveToSlide;
24
+ private moveToNextSlide;
25
+ private moveToPrevSlide;
26
+ private updateDots;
27
+ private addTouchSupport;
28
+ private startAutoPlay;
29
+ private pauseAutoPlay;
30
+ private resumeAutoPlay;
31
+ destroy(): void;
32
+ }
33
+ export { Carousel };
34
+ export type { CarouselOptions };
package/js/chart.d.ts ADDED
@@ -0,0 +1,73 @@
1
+ export type ChartType = 'line' | 'area' | 'column' | 'bar' | 'pie';
2
+ export type ChartCurve = 'smooth' | 'linear' | 'step';
3
+ export interface ChartDataPoint {
4
+ label: string;
5
+ value: number;
6
+ }
7
+ export interface ChartSeries {
8
+ name: string;
9
+ data: ChartDataPoint[];
10
+ color?: string;
11
+ }
12
+ export interface ChartOptions {
13
+ type: ChartType;
14
+ series: ChartSeries[];
15
+ title?: string;
16
+ subtitle?: string;
17
+ /** Inner chart height in px. Default: 280 */
18
+ height?: number;
19
+ showLegend?: boolean;
20
+ showGrid?: boolean;
21
+ animate?: boolean;
22
+ /** Line interpolation for line/area charts. Default: 'smooth' */
23
+ curve?: ChartCurve;
24
+ /** Fixed y-axis minimum. Default: 0 */
25
+ yMin?: number;
26
+ /** Fixed y-axis maximum. Default: auto (max value × 1.1) */
27
+ yMax?: number;
28
+ onPointClick?: (series: ChartSeries, point: ChartDataPoint, index: number) => void;
29
+ }
30
+ declare class Chart {
31
+ private container;
32
+ private opts;
33
+ private tooltip;
34
+ private colors;
35
+ private abortController;
36
+ private resizeTimer;
37
+ private resizeObserver;
38
+ constructor(selector: string | HTMLElement, options: ChartOptions);
39
+ private render;
40
+ private renderLineOrArea;
41
+ private renderColumn;
42
+ private renderBar;
43
+ private renderPie;
44
+ private renderHGrid;
45
+ private renderXAxisLine;
46
+ private renderXLabels;
47
+ private renderYLabels;
48
+ private buildPath;
49
+ private linearPath;
50
+ private stepPath;
51
+ /** Smooth cubic bezier path through points (Catmull-Rom → cubic bezier) */
52
+ private smoothPath;
53
+ private arcPath;
54
+ private polar;
55
+ private buildHeader;
56
+ private buildLegend;
57
+ private buildPieLegend;
58
+ private showTooltip;
59
+ private moveTooltip;
60
+ private hideTooltip;
61
+ private onPoint;
62
+ private onBar;
63
+ private resolveColors;
64
+ private div;
65
+ private createSVG;
66
+ private svgEl;
67
+ private fmt;
68
+ private attachResizeObserver;
69
+ update(series: ChartSeries[]): void;
70
+ setType(type: ChartType): void;
71
+ destroy(): void;
72
+ }
73
+ export { Chart };
@@ -0,0 +1,16 @@
1
+ type SupportedLanguage = 'javascript' | 'js' | 'html' | 'css';
2
+ declare class CodeViewer {
3
+ private container;
4
+ private code;
5
+ private language;
6
+ constructor(elementOrSelector: string | HTMLElement, code: string, language?: SupportedLanguage);
7
+ private highlight;
8
+ private escape;
9
+ private highlightJavaScript;
10
+ private highlightHTML;
11
+ private highlightCSS;
12
+ private copyCode;
13
+ private render;
14
+ }
15
+ export { CodeViewer };
16
+ export type { SupportedLanguage };
@@ -0,0 +1,31 @@
1
+ interface ContextMenuItemDef {
2
+ label: string;
3
+ icon?: string;
4
+ shortcut?: string;
5
+ disabled?: boolean;
6
+ destructive?: boolean;
7
+ action?: (target: HTMLElement) => void;
8
+ submenu?: ContextMenuInput[];
9
+ }
10
+ type ContextMenuInput = ContextMenuItemDef | 'separator' | {
11
+ group: string;
12
+ };
13
+ declare class ContextMenu {
14
+ private items;
15
+ private targets;
16
+ private menuEl;
17
+ private currentTarget;
18
+ private abortController;
19
+ constructor(selectorOrElement: string | HTMLElement | HTMLElement[], items: ContextMenuInput[]);
20
+ private init;
21
+ private open;
22
+ private close;
23
+ private buildMenu;
24
+ private buildItem;
25
+ private closeAllSubmenus;
26
+ private getFocusableItems;
27
+ private moveFocus;
28
+ private activateFocused;
29
+ destroy(): void;
30
+ }
31
+ export { ContextMenu, type ContextMenuInput, type ContextMenuItemDef };
@@ -0,0 +1,55 @@
1
+ interface DatePickerLocales {
2
+ days: string[];
3
+ months: string[];
4
+ }
5
+ interface DatePickerOptions {
6
+ mode?: 'single' | 'range';
7
+ startDay?: number;
8
+ timePicker?: boolean;
9
+ locales?: DatePickerLocales;
10
+ format?: (date: Date) => string;
11
+ onSelect?: (date: Date | DateRange) => void;
12
+ }
13
+ interface DateRange {
14
+ start: Date | null;
15
+ end: Date | null;
16
+ }
17
+ declare class DatePicker {
18
+ private input;
19
+ private options;
20
+ private currentDate;
21
+ private selectedDate;
22
+ private rangeStart;
23
+ private rangeEnd;
24
+ private viewYear;
25
+ private viewMonth;
26
+ private viewMode;
27
+ private yearRangeStart;
28
+ private selectedHours;
29
+ private selectedMinutes;
30
+ private calendar;
31
+ private backdrop;
32
+ private handleDocumentClick;
33
+ private abortController;
34
+ constructor(elementOrSelector: string | HTMLInputElement, options?: DatePickerOptions);
35
+ private init;
36
+ private createCalendarElement;
37
+ private attachEvents;
38
+ private show;
39
+ private hide;
40
+ private render;
41
+ private createHeader;
42
+ private navigate;
43
+ private createMonthGrid;
44
+ private createYearGrid;
45
+ private createGrid;
46
+ private createTimePicker;
47
+ private createSpinner;
48
+ private applyTimeToSelection;
49
+ private changeMonth;
50
+ private handleDateClick;
51
+ private updateInput;
52
+ destroy(): void;
53
+ }
54
+ export { DatePicker };
55
+ export type { DatePickerOptions, DatePickerLocales, DateRange };
@@ -0,0 +1,30 @@
1
+ interface DropdownOptions {
2
+ closeOnSelect?: boolean;
3
+ allowMultipleOpen?: boolean;
4
+ }
5
+ interface DropdownSelectDetail {
6
+ text: string;
7
+ element: HTMLElement;
8
+ }
9
+ declare class Dropdown {
10
+ private container;
11
+ private trigger;
12
+ private menu;
13
+ private options;
14
+ private abortController;
15
+ constructor(selector: string, options?: DropdownOptions);
16
+ private init;
17
+ private attachEventListeners;
18
+ private setupItems;
19
+ toggle(): void;
20
+ close(): void;
21
+ open(): void;
22
+ private toggleSubmenu;
23
+ private closeAllSubmenus;
24
+ private handleSelection;
25
+ /**
26
+ * Cleanup method to remove event listeners
27
+ */
28
+ destroy(): void;
29
+ }
30
+ export { Dropdown, DropdownSelectDetail };
package/js/editor.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ interface EditorOptions {
2
+ /** Hides the entire side panel (code/preview) permanently. Safe to use
3
+ * without #code, #preview, or #sidePanel in the DOM. */
4
+ simple?: boolean;
5
+ }
6
+ declare class Editor {
7
+ private readonly editable;
8
+ private readonly code;
9
+ private readonly preview;
10
+ private readonly sidePanel;
11
+ private readonly wordCount;
12
+ private undoStack;
13
+ private redoStack;
14
+ private abortController;
15
+ constructor(options?: EditorOptions);
16
+ private bindToolbar;
17
+ private bindActions;
18
+ private bindKeyboard;
19
+ private bindEditable;
20
+ private bindTabs;
21
+ private onContentChange;
22
+ private syncViews;
23
+ private updateWordCount;
24
+ private saveState;
25
+ private undo;
26
+ private redo;
27
+ private exec;
28
+ private insertText;
29
+ private insertImage;
30
+ private toggleInlineStyle;
31
+ private createLink;
32
+ private formatBlock;
33
+ private insertList;
34
+ private setAlignment;
35
+ private setForeColor;
36
+ private sanitizeHTML;
37
+ private downloadHTML;
38
+ private refreshActiveState;
39
+ destroy(): void;
40
+ }
41
+ export { Editor };
@@ -0,0 +1,48 @@
1
+ interface UploadCompletedDetail {
2
+ fileCount: number;
3
+ files: File[];
4
+ results: PromiseSettledResult<unknown>[];
5
+ }
6
+ interface FileValidationErrorDetail {
7
+ file: File;
8
+ reason: 'size' | 'type';
9
+ }
10
+ interface FileUploaderConfig {
11
+ uploadUrl?: string;
12
+ maxFileSize?: number;
13
+ allowedTypes?: string[];
14
+ }
15
+ declare class FileUploader {
16
+ private container;
17
+ private dropZone;
18
+ private fileInput;
19
+ private fileList;
20
+ private uploadBtn;
21
+ private files;
22
+ private uploadUrl;
23
+ private maxFileSize?;
24
+ private allowedTypes?;
25
+ private abortControllers;
26
+ constructor(elementOrSelector: string | HTMLElement, config?: FileUploaderConfig);
27
+ private init;
28
+ private fileKey;
29
+ private setupEventListeners;
30
+ private preventDefaults;
31
+ private handleDragEnter;
32
+ private handleDragLeave;
33
+ private handleDrop;
34
+ private handleDropZoneClick;
35
+ private handleFileInputChange;
36
+ private handleUploadClick;
37
+ private handleFiles;
38
+ private validateFile;
39
+ private addFileToUI;
40
+ private uploadFile;
41
+ private removeFile;
42
+ private updateUploadButton;
43
+ private dispatchUploadCompletedEvent;
44
+ private formatSize;
45
+ destroy(): void;
46
+ }
47
+ export { FileUploader };
48
+ export type { FileUploaderConfig, UploadCompletedDetail, FileValidationErrorDetail };
@@ -0,0 +1,37 @@
1
+ interface FlyoutMenuOptions {
2
+ triggerSelector?: string;
3
+ menuSelector?: string;
4
+ overlaySelector?: string;
5
+ closeSelector?: string;
6
+ submenuToggleSelector?: string;
7
+ linkSelector?: string;
8
+ direction?: 'right' | 'left';
9
+ title?: string;
10
+ footerText?: string;
11
+ enableHeader?: boolean;
12
+ enableFooter?: boolean;
13
+ }
14
+ declare class FlyoutMenu {
15
+ private options;
16
+ private menuTrigger;
17
+ private readonly flyoutMenu;
18
+ private flyoutOverlay;
19
+ private closeBtn;
20
+ private submenuToggles;
21
+ private menuLinks;
22
+ private submenuHandlers;
23
+ constructor(options?: FlyoutMenuOptions);
24
+ private init;
25
+ private hydrateMenu;
26
+ private processListItems;
27
+ private renderHeader;
28
+ private renderFooter;
29
+ private bindEvents;
30
+ private open;
31
+ private close;
32
+ private handleSubmenu;
33
+ private handleKeydown;
34
+ setDirection(direction: 'left' | 'right'): void;
35
+ destroy(): void;
36
+ }
37
+ export { FlyoutMenu, type FlyoutMenuOptions };
@@ -0,0 +1,35 @@
1
+ interface ImageData {
2
+ src: string;
3
+ title: string;
4
+ desc: string;
5
+ }
6
+ interface MasonryGalleryOptions {
7
+ fetchFunction: () => Promise<ImageData[]>;
8
+ minColumnWidth?: number;
9
+ scrollThreshold?: number;
10
+ loaderSelector?: string;
11
+ reload?: number;
12
+ }
13
+ declare class MasonryGallery {
14
+ private container;
15
+ private readonly loader;
16
+ private options;
17
+ private columns;
18
+ private isFetching;
19
+ private resizeObserver;
20
+ private abortController;
21
+ private reloaded;
22
+ constructor(containerId: string, options: MasonryGalleryOptions);
23
+ private init;
24
+ private setupLayout;
25
+ private addEventListeners;
26
+ private reLayout;
27
+ private handleScroll;
28
+ private loadMoreImages;
29
+ private toggleLoader;
30
+ private renderImages;
31
+ private createCard;
32
+ private addToShortestColumn;
33
+ destroy(): void;
34
+ }
35
+ export { MasonryGallery, ImageData };
@@ -0,0 +1,59 @@
1
+ interface SubgroupData {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ interface GroupData {
6
+ id: string;
7
+ label: string;
8
+ subgroups?: SubgroupData[];
9
+ }
10
+ interface GroupPickerSelection {
11
+ parentGroups: string[];
12
+ subgroups: {
13
+ groupId: string;
14
+ subgroupId: string;
15
+ }[];
16
+ }
17
+ interface GroupPickerOptions {
18
+ onSelectionChange?: (selection: GroupPickerSelection) => void;
19
+ searchPlaceholder?: string;
20
+ selectAllLabel?: string;
21
+ deselectLabel?: string;
22
+ emptyLabel?: string;
23
+ selectionPlaceholder?: string;
24
+ }
25
+ declare class GroupPicker {
26
+ private container;
27
+ private data;
28
+ private options;
29
+ private abortController;
30
+ private selectedParents;
31
+ private selectedSubs;
32
+ private expandedGroups;
33
+ private searchQuery;
34
+ private searchInput;
35
+ private listEl;
36
+ private selectionEl;
37
+ constructor(selector: string | HTMLElement, data: GroupData[], options?: GroupPickerOptions);
38
+ private init;
39
+ private render;
40
+ private renderGroups;
41
+ private createGroupElement;
42
+ private renderSelection;
43
+ private createChip;
44
+ private toggleParentGroup;
45
+ private toggleSubgroup;
46
+ private toggleExpand;
47
+ private refresh;
48
+ private attachEvents;
49
+ private emitChange;
50
+ private highlightText;
51
+ getSelection(): GroupPickerSelection;
52
+ clearSelection(): void;
53
+ setSelection(selection: GroupPickerSelection): void;
54
+ expandAll(): void;
55
+ collapseAll(): void;
56
+ destroy(): void;
57
+ }
58
+ export { GroupPicker };
59
+ export type { GroupData, SubgroupData, GroupPickerSelection, GroupPickerOptions };
@@ -0,0 +1,46 @@
1
+ interface LightboxImage {
2
+ src: string;
3
+ alt?: string;
4
+ caption?: string;
5
+ }
6
+ interface LightboxOptions {
7
+ src?: string;
8
+ alt?: string;
9
+ caption?: string;
10
+ closeable?: boolean;
11
+ images?: LightboxImage[];
12
+ startIndex?: number;
13
+ onOpen?: () => void;
14
+ onClose?: () => void;
15
+ }
16
+ declare class Lightbox {
17
+ private images;
18
+ private currentIndex;
19
+ private readonly closeable;
20
+ private readonly onOpen?;
21
+ private readonly onClose?;
22
+ private wrapper;
23
+ private imgEl;
24
+ private captionEl;
25
+ private counterEl;
26
+ private isZoomed;
27
+ private abortController;
28
+ constructor(options: LightboxOptions);
29
+ show(): void;
30
+ hide(): void;
31
+ next(): void;
32
+ prev(): void;
33
+ isVisible(): boolean;
34
+ destroy(): void;
35
+ private loadImage;
36
+ private preloadAdjacent;
37
+ private updateNav;
38
+ private toggleZoom;
39
+ private handleKeydown;
40
+ private trapFocus;
41
+ private handleBackgroundClick;
42
+ private addTouchSupport;
43
+ private buildTemplate;
44
+ static bind(selector?: string): void;
45
+ }
46
+ export { Lightbox, type LightboxOptions, type LightboxImage };