mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	update defs
This commit is contained in:
		
							
								
								
									
										128
									
								
								packages/splitjs/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										128
									
								
								packages/splitjs/index.d.ts
									
									
									
									
										vendored
									
									
								
							| @@ -1,96 +1,94 @@ | |||||||
| // Type definitions for split.js 1.3 | // Type definitions for Split.js | ||||||
| // Project: https://github.com/nathancahill/Split.js | // Project: https://github.com/nathancahill/split/tree/master/packages/splitjs | ||||||
| // Definitions by: Ilia Choly <https://github.com/icholy> | // Definitions by: Ilia Choly <https://github.com/icholy> | ||||||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||||||
| // TypeScript Version: 2.1 | // TypeScript Version: 2.1 | ||||||
|  |  | ||||||
| // Global variable outside module loader | // Global variable outside module loader | ||||||
| export as namespace Split; | export as namespace Split | ||||||
|  |  | ||||||
| // Module loader | // Module loader | ||||||
| export = Split; | export = Split | ||||||
|  |  | ||||||
| declare function Split( | declare function Split( | ||||||
|   elements: Array<string | HTMLElement>, |     elements: Array<string | HTMLElement>, | ||||||
|   options?: Split.Options |     options?: Split.Options, | ||||||
| ): Split.Instance; | ): Split.Instance | ||||||
|  |  | ||||||
| declare namespace Split { | declare namespace Split { | ||||||
|   type Partial<T> = {[P in keyof T]?: T[P]}; |     type Partial<T> = { [P in keyof T]?: T[P] } | ||||||
|   type CSSStyleDeclarationPartial = Partial<CSSStyleDeclaration>; |     type CSSStyleDeclarationPartial = Partial<CSSStyleDeclaration> | ||||||
|  |  | ||||||
|   interface Options { |     interface Options { | ||||||
|     // Initial sizes of each element in percents or CSS values. |         // Initial sizes of each element in percents or CSS values. | ||||||
|     sizes?: number[]; |         sizes?: number[] | ||||||
|  |  | ||||||
|     // Minimum size of each element. |         // Minimum size of each element. | ||||||
|     minSize?: number | number[]; |         minSize?: number | number[] | ||||||
|  |  | ||||||
|     expandToMin?: boolean; |         expandToMin?: boolean | ||||||
|  |  | ||||||
|     // Gutter size in pixels. |         // Gutter size in pixels. | ||||||
|     gutterSize?: number; |         gutterSize?: number | ||||||
|  |  | ||||||
|     gutterAlign?: string; |         gutterAlign?: string | ||||||
|  |  | ||||||
|     // Snap to minimum size offset in pixels. |         // Snap to minimum size offset in pixels. | ||||||
|     snapOffset?: number; |         snapOffset?: number | ||||||
|  |  | ||||||
|     dragInterval?: number; |         dragInterval?: number | ||||||
|  |  | ||||||
|     // Direction to split: horizontal or vertical. |         // Direction to split: horizontal or vertical. | ||||||
|     direction?: 'horizontal' | 'vertical'; |         direction?: 'horizontal' | 'vertical' | ||||||
|  |  | ||||||
|     // Cursor to display while dragging. |         // Cursor to display while dragging. | ||||||
|     cursor?: string; |         cursor?: string | ||||||
|  |  | ||||||
|     // Callback on drag. |         // Callback on drag. | ||||||
|     onDrag?(): void; |         onDrag?(): void | ||||||
|  |  | ||||||
|     // Callback on drag start. |         // Callback on drag start. | ||||||
|     onDragStart?(): void; |         onDragStart?(): void | ||||||
|  |  | ||||||
|     // Callback on drag end. |         // Callback on drag end. | ||||||
|     onDragEnd?(): void; |         onDragEnd?(): void | ||||||
|  |  | ||||||
|     // Called to create each gutter element |         // Called to create each gutter element | ||||||
|     gutter?( |         gutter?( | ||||||
|       index: number, |             index: number, | ||||||
|       direction: 'horizontal' | 'vertical' |             direction: 'horizontal' | 'vertical', | ||||||
|     ): HTMLElement; |         ): HTMLElement | ||||||
|  |  | ||||||
|     // Called to set the style of each element. |         // Called to set the style of each element. | ||||||
|     elementStyle?( |         elementStyle?( | ||||||
|       dimension: 'width' | 'height', |             dimension: 'width' | 'height', | ||||||
|       elementSize: number, |             elementSize: number, | ||||||
|       gutterSize: number, |             gutterSize: number, | ||||||
|       index: number, |             index: number, | ||||||
|     ): CSSStyleDeclarationPartial; |         ): CSSStyleDeclarationPartial | ||||||
|  |  | ||||||
|     // Called to set the style of the gutter. |         // Called to set the style of the gutter. | ||||||
|     gutterStyle?( |         gutterStyle?( | ||||||
|       dimension: 'width' | 'height', |             dimension: 'width' | 'height', | ||||||
|       gutterSize: number, |             gutterSize: number, | ||||||
|       index: number, |             index: number, | ||||||
|     ): CSSStyleDeclarationPartial; |         ): CSSStyleDeclarationPartial | ||||||
|   } |     } | ||||||
|  |  | ||||||
|   interface Instance { |     interface Instance { | ||||||
|     // setSizes behaves the same as the sizes configuration option, passing an array of percents or CSS values. |         // setSizes behaves the same as the sizes configuration option, passing an array of percents or CSS values. | ||||||
|     // It updates the sizes of the elements in the split. |         // It updates the sizes of the elements in the split. | ||||||
|     setSizes(sizes: number[]): void; |         setSizes(sizes: number[]): void | ||||||
|  |  | ||||||
|     // getSizes returns an array of percents, suitable for using with setSizes or creation. |         // getSizes returns an array of percents, suitable for using with setSizes or creation. | ||||||
|     // Not supported in IE8. |         getSizes(): number[] | ||||||
|     getSizes(): number[]; |  | ||||||
|  |  | ||||||
|     // collapse changes the size of element at index to 0. |         // collapse changes the size of element at index to 0. | ||||||
|     // Every element except the last is collapsed towards the front (left or top). |         // Every element except the last is collapsed towards the front (left or top). | ||||||
|     // The last is collapsed towards the back. |         // The last is collapsed towards the back. | ||||||
|     // Not supported in IE8. |         collapse(index: number): void | ||||||
|     collapse(index: number): void; |  | ||||||
|  |  | ||||||
|     // Destroy the instance. It removes the gutter elements, and the size CSS styles Split.js set. |         // Destroy the instance. It removes the gutter elements, and the size CSS styles Split.js set. | ||||||
|     destroy(preserveStyles?: boolean, preserveGutters?: boolean): void; |         destroy(preserveStyles?: boolean, preserveGutters?: boolean): void | ||||||
|   } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user