forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
218 changed files
with
21,676 additions
and
5,803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
- "0.10" | ||
|
||
notifications: | ||
email: false |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
///<reference path='angular-bootstrap-lightbox.d.ts'/> | ||
|
||
var imageList:angular.bootstrap.lightbox.ILightboxImageInfo[] = []; | ||
imageList.push({ | ||
url: 'url1', | ||
width: 100, | ||
height: 100 | ||
}); | ||
imageList.push({ | ||
url: 'url2', | ||
width: 100, | ||
height: 100, | ||
thumbUrl: 'thumbUrl', | ||
caption: 'caption' | ||
}); | ||
|
||
var lightBox:angular.bootstrap.lightbox.ILightbox = <any> {}; | ||
lightBox.openModal(imageList, 0); | ||
|
||
var provider:angular.bootstrap.lightbox.ILightBoxProvider = <any> {}; | ||
provider.templateUrl = 'templateUrl'; | ||
provider.calculateImageDimensionLimits = (dimensions:angular.bootstrap.lightbox.IImageDimensionParameter):angular.bootstrap.lightbox.IImageDimensionLimits=> { | ||
return { | ||
minWidth: 100, | ||
minHeight: 100, | ||
maxWidth: dimensions.windowWidth - 102, | ||
maxHeight: dimensions.windowHeight - 136 | ||
}; | ||
}; | ||
provider.calculateModalDimensions = (dimensions:angular.bootstrap.lightbox.IModalDimensionsParameter):angular.bootstrap.lightbox.IModalDimensions=> { | ||
return { | ||
width: Math.max(500, dimensions.imageDisplayWidth + 42), | ||
height: Math.max(500, dimensions.imageDisplayHeight + 76) | ||
}; | ||
}; |
51 changes: 51 additions & 0 deletions
51
angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Type definitions for angular-bootstrap-lightbox | ||
// Project: https://github.com/compact/angular-bootstrap-lightbox | ||
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
|
||
declare module angular.bootstrap.lightbox { | ||
|
||
export interface ILightboxImageInfo { | ||
url: string; | ||
width: number; | ||
height: number; | ||
thumbUrl?: string; | ||
caption?: string; | ||
} | ||
|
||
export interface IImageDimensionLimits { | ||
minWidth?: number; | ||
minHeight?: number; | ||
maxWidth?: number; | ||
maxHeight?: number; | ||
} | ||
|
||
export interface IImageDimensionParameter { | ||
windowWidth:number; | ||
windowHeight:number; | ||
imageWidth:number; | ||
imageHeight:number; | ||
} | ||
|
||
export interface IModalDimensionsParameter { | ||
windowWidth:number; | ||
windowHeight:number; | ||
imageDisplayWidth:number; | ||
imageDisplayHeight:number; | ||
} | ||
|
||
export interface IModalDimensions { | ||
width:number; | ||
height:number; | ||
} | ||
|
||
export interface ILightbox { | ||
openModal(images:ILightboxImageInfo[], index:number):void; | ||
} | ||
|
||
export interface ILightBoxProvider { | ||
templateUrl:string; | ||
calculateImageDimensionLimits:(dimensions:IImageDimensionParameter)=>IImageDimensionLimits; | ||
calculateModalDimensions:(dimensions:IModalDimensionsParameter)=>IModalDimensions; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/// <reference path="../angularjs/angular.d.ts" /> | ||
/// <reference path="angular-hotkeys.d.ts" /> | ||
|
||
var scope: ng.IScope; | ||
var hotkeyProvider: ng.hotkeys.HotkeysProvider; | ||
var hotkeyObj: ng.hotkeys.Hotkey; | ||
|
||
hotkeyProvider.add("mod+s", "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => {} ); | ||
hotkeyProvider.add(hotkeyObj); | ||
hotkeyProvider.bindTo(scope); | ||
hotkeyProvider.del("mod+s"); | ||
hotkeyProvider.get("mod+s"); | ||
hotkeyProvider.toggleCheatSheet(); | ||
|
||
hotkeyProvider.add(hotkeyObj.combo, hotkeyObj.description ,hotkeyObj.callback); | ||
|
||
hotkeyProvider.bindTo(scope) | ||
.add(hotkeyObj) | ||
.add(hotkeyObj) | ||
.add({ | ||
combo: 'w', | ||
description: 'blah blah', | ||
callback: function() {} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Type definitions for angular-hotkeys | ||
// Project: https://github.com/chieffancypants/angular-hotkeys | ||
// Definitions by: Jason Zhao <https://github.com/jlz27> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
|
||
/// <reference path="../angularjs/angular.d.ts" /> | ||
|
||
declare module ng.hotkeys { | ||
|
||
interface HotkeysProvider { | ||
template: string; | ||
includeCheatSheet: boolean; | ||
cheatSheetHotkey: string; | ||
cheatSheetDescription: string; | ||
|
||
add(combo: string, description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): void; | ||
|
||
add(hotkeyObj: ng.hotkeys.Hotkey): void; | ||
|
||
bindTo(scope : ng.IScope): ng.hotkeys.HotkeysProviderChained; | ||
|
||
del(combo: string): void; | ||
|
||
get(combo: string): ng.hotkeys.Hotkey; | ||
|
||
toggleCheatSheet(): void; | ||
} | ||
|
||
interface HotkeysProviderChained { | ||
add(combo: string, description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained; | ||
|
||
add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained; | ||
} | ||
|
||
interface Hotkey { | ||
combo: string; | ||
description?: string; | ||
callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.