Skip to content

Commit

Permalink
chore(all): add latest build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
AureliaEffect committed Apr 20, 2019
1 parent ee8d7fa commit 4cf18cf
Show file tree
Hide file tree
Showing 20 changed files with 1,799 additions and 2,313 deletions.
640 changes: 290 additions & 350 deletions dist/amd/aurelia-history-browser.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/amd/aurelia-history-browser.js.map

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions dist/amd/index.js

This file was deleted.

290 changes: 125 additions & 165 deletions dist/aurelia-history-browser.d.ts
Original file line number Diff line number Diff line change
@@ -1,185 +1,145 @@
import {
DOM,
PLATFORM
} from 'aurelia-pal';
import {
History
} from 'aurelia-history';
import { History } from 'aurelia-history';

/**
* An implementation of the basic history API.
*/
export declare class BrowserHistory extends History {
/**
* Creates an instance of BrowserHistory
* @param linkHandler An instance of LinkHandler.
*/
constructor(linkHandler: LinkHandler);
/**
* Activates the history object.
* @param options The set of options to activate history with.
* @returns Whether or not activation occurred.
*/
activate(options?: Object): boolean;
/**
* Deactivates the history object.
*/
deactivate(): void;
/**
* Returns the fully-qualified root of the current history object.
* @returns The absolute root of the application.
*/
getAbsoluteRoot(): string;
/**
* Causes a history navigation to occur.
*
* @param fragment The history fragment to navigate to.
* @param options The set of options that specify how the navigation should occur.
* @return Promise if triggering navigation, otherwise true/false indicating if navigation occurred.
*/
navigate(fragment?: string, { trigger, replace }?: {
trigger?: boolean;
replace?: boolean;
}): boolean;
/**
* Causes the history state to navigate back.
*/
navigateBack(): void;
/**
* Sets the document title.
*/
setTitle(title: string): void;
/**
* Sets a key in the history page state.
* @param key The key for the value.
* @param value The value to set.
*/
setState(key: string, value: any): void;
/**
* Gets a key in the history page state.
* @param key The key for the value.
* @return The value for the key.
*/
getState(key: string): any;
/**
* Returns the current index in the navigation history.
* @returns The current index.
*/
getHistoryIndex(): number;
/**
* Move to a specific position in the navigation history.
* @param movement The amount of steps, positive or negative, to move.
*/
go(movement: number): void;
}
/**
* Provides information about how to handle an anchor event.
*/
export declare interface AnchorEventInfo {

/**
* Indicates whether the event should be handled or not.
*/
shouldHandleEvent: boolean;

/**
* The href of the link or null if not-applicable.
*/
href: string;

/**
* The anchor element or null if not-applicable.
*/
anchor: Element;
export interface AnchorEventInfo {
/**
* Indicates whether the event should be handled or not.
*/
shouldHandleEvent: boolean;
/**
* The href of the link or null if not-applicable.
*/
href: string;
/**
* The anchor element or null if not-applicable.
*/
anchor: Element;
}

/**
* Class responsible for handling interactions that should trigger browser history navigations.
*/
export declare class LinkHandler {

/**
* Activate the instance.
*
* @param history The BrowserHistory instance that navigations should be dispatched to.
*/
activate(history: BrowserHistory): void;

/**
* Deactivate the instance. Event handlers and other resources should be cleaned up here.
*/
deactivate(): void;
/**
* Activate the instance.
*
* @param history The BrowserHistory instance that navigations should be dispatched to.
*/
activate(history: BrowserHistory): void;
/**
* Deactivate the instance. Event handlers and other resources should be cleaned up here.
*/
deactivate(): void;
}

/**
* The default LinkHandler implementation. Navigations are triggered by click events on
* anchor elements with relative hrefs when the history instance is using pushstate.
*/
/**
* The default LinkHandler implementation. Navigations are triggered by click events on
* anchor elements with relative hrefs when the history instance is using pushstate.
*/
export declare class DefaultLinkHandler extends LinkHandler {

/**
* Creates an instance of DefaultLinkHandler.
*/
constructor();

/**
* Activate the instance.
*
* @param history The BrowserHistory instance that navigations should be dispatched to.
*/
activate(history: BrowserHistory): void;

/**
* Deactivate the instance. Event handlers and other resources should be cleaned up here.
*/
deactivate(): void;

/**
* Gets the href and a "should handle" recommendation, given an Event.
*
* @param event The Event to inspect for target anchor and href.
*/
static getEventInfo(event: Event): AnchorEventInfo;

/**
* Finds the closest ancestor that's an anchor element.
*
* @param el The element to search upward from.
* @returns The link element that is the closest ancestor.
*/
static findClosestAnchor(el: Element): Element;

/**
* Gets a value indicating whether or not an anchor targets the current window.
*
* @param target The anchor element whose target should be inspected.
* @returns True if the target of the link element is this window; false otherwise.
*/
static targetIsThisWindow(target: Element): boolean;
/**
* Creates an instance of DefaultLinkHandler.
*/
constructor();
/**
* Activate the instance.
*
* @param history The BrowserHistory instance that navigations should be dispatched to.
*/
activate(history: BrowserHistory): void;
/**
* Deactivate the instance. Event handlers and other resources should be cleaned up here.
*/
deactivate(): void;
/**
* Gets the href and a "should handle" recommendation, given an Event.
*
* @param event The Event to inspect for target anchor and href.
*/
static getEventInfo(event: Event): AnchorEventInfo;
/**
* Finds the closest ancestor that's an anchor element.
*
* @param el The element to search upward from.
* @returns The link element that is the closest ancestor.
*/
static findClosestAnchor(el: Element): Element;
/**
* Gets a value indicating whether or not an anchor targets the current window.
*
* @param target The anchor element whose target should be inspected.
* @returns True if the target of the link element is this window; false otherwise.
*/
static targetIsThisWindow(target: Element): boolean;
}

/**
* Configures the plugin by registering BrowserHistory as the implementation of History in the DI container.
* @param config The FrameworkConfiguration object provided by Aurelia.
*/
export declare function configure(config: Object): void;

/**
* An implementation of the basic history API.
*/
export declare class BrowserHistory extends History {
static inject: any;

/**
* Creates an instance of BrowserHistory
* @param linkHandler An instance of LinkHandler.
*/
constructor(linkHandler: LinkHandler);

/**
* Activates the history object.
* @param options The set of options to activate history with.
* @returns Whether or not activation occurred.
*/
activate(options?: Object): boolean;

/**
* Deactivates the history object.
*/
deactivate(): void;

/**
* Returns the fully-qualified root of the current history object.
* @returns The absolute root of the application.
*/
getAbsoluteRoot(): string;

/**
* Causes a history navigation to occur.
*
* @param fragment The history fragment to navigate to.
* @param options The set of options that specify how the navigation should occur.
* @return Promise if triggering navigation, otherwise true/false indicating if navigation occurred.
*/
navigate(fragment?: string, {
trigger,
replace
}?: {
trigger?: any,
replace?: any
}): boolean;

/**
* Causes the history state to navigate back.
*/
navigateBack(): void;

/**
* Sets the document title.
*/
setTitle(title: string): void;

/**
* Sets a key in the history page state.
* @param key The key for the value.
* @param value The value to set.
*/
setState(key: string, value: any): void;

/**
* Gets a key in the history page state.
* @param key The key for the value.
* @return The value for the key.
*/
getState(key: string): any;

/**
* Returns the current index in the navigation history.
* @returns The current index.
*/
getHistoryIndex(): number;

/**
* Move to a specific position in the navigation history.
* @param movement The amount of steps, positive or negative, to move.
*/
go(movement: number): void;
}
export declare function configure(config: Object): void;
Loading

0 comments on commit 4cf18cf

Please sign in to comment.