Skip to content

Commit

Permalink
perf(gesture): lazy loaded dynamic ES module
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Aug 1, 2018
1 parent 1b5bb67 commit 49cac8b
Show file tree
Hide file tree
Showing 34 changed files with 938 additions and 1,708 deletions.
200 changes: 0 additions & 200 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,12 @@ import {
AlertOptions,
Animation,
AnimationBuilder,
BlockerConfig,
BlockerDelegate,
CheckedInputChangeEvent,
Color,
ComponentProps,
ComponentRef,
DomRenderFn,
FrameworkDelegate,
GestureCallback,
GestureConfig,
GestureDelegate,
GestureDetail,
HeaderFn,
InputChangeEvent,
ItemHeightFn,
Expand Down Expand Up @@ -2228,200 +2222,6 @@ declare global {
}


declare global {

namespace StencilComponents {
interface IonGestureController {
/**
* Creates a gesture delegate based on the GestureConfig passed
*/
'create': (config: GestureConfig) => Promise<GestureDelegate>;
/**
* Creates a blocker that will block any other gesture events from firing. Set in the ion-gesture component.
*/
'createBlocker': (opts?: BlockerConfig) => BlockerDelegate;
}
}

interface HTMLIonGestureControllerElement extends StencilComponents.IonGestureController, HTMLStencilElement {}

var HTMLIonGestureControllerElement: {
prototype: HTMLIonGestureControllerElement;
new (): HTMLIonGestureControllerElement;
};
interface HTMLElementTagNameMap {
'ion-gesture-controller': HTMLIonGestureControllerElement;
}
interface ElementTagNameMap {
'ion-gesture-controller': HTMLIonGestureControllerElement;
}
namespace JSX {
interface IntrinsicElements {
'ion-gesture-controller': JSXElements.IonGestureControllerAttributes;
}
}
namespace JSXElements {
export interface IonGestureControllerAttributes extends HTMLAttributes {
/**
* Event emitted when a gesture has been captured.
*/
'onIonGestureCaptured'?: (event: CustomEvent<string>) => void;
}
}
}


declare global {

namespace StencilComponents {
interface IonGesture {
/**
* What component to attach listeners to.
*/
'attachTo': string | HTMLElement;
/**
* Function to execute to see if gesture can start. Return boolean
*/
'canStart': GestureCallback;
/**
* What direction to listen for gesture changes
*/
'direction': string;
/**
* If true, the current gesture will disabling scrolling interactions
*/
'disableScroll': boolean;
/**
* If true, the current gesture interaction is disabled
*/
'disabled': boolean;
/**
* Name for the gesture action
*/
'gestureName': string;
/**
* What priority the gesture should take. The higher the number, the higher the priority.
*/
'gesturePriority': number;
/**
* The max angle for the gesture
*/
'maxAngle': number;
/**
* Function to execute when the gesture has not been captured
*/
'notCaptured': GestureCallback;
/**
* Function to execute when the gesture has end
*/
'onEnd': GestureCallback;
/**
* Function to execute when the gesture has moved
*/
'onMove': GestureCallback;
/**
* Function to execute when the gesture has start
*/
'onStart': GestureCallback;
/**
* Function to execute when the gesture will start
*/
'onWillStart': (_: GestureDetail) => Promise<void>;
/**
* If the event should use passive event listeners
*/
'passive': boolean;
/**
* How many pixels of change the gesture should wait for before triggering the action.
*/
'threshold': number;
}
}

interface HTMLIonGestureElement extends StencilComponents.IonGesture, HTMLStencilElement {}

var HTMLIonGestureElement: {
prototype: HTMLIonGestureElement;
new (): HTMLIonGestureElement;
};
interface HTMLElementTagNameMap {
'ion-gesture': HTMLIonGestureElement;
}
interface ElementTagNameMap {
'ion-gesture': HTMLIonGestureElement;
}
namespace JSX {
interface IntrinsicElements {
'ion-gesture': JSXElements.IonGestureAttributes;
}
}
namespace JSXElements {
export interface IonGestureAttributes extends HTMLAttributes {
/**
* What component to attach listeners to.
*/
'attachTo'?: string | HTMLElement;
/**
* Function to execute to see if gesture can start. Return boolean
*/
'canStart'?: GestureCallback;
/**
* What direction to listen for gesture changes
*/
'direction'?: string;
/**
* If true, the current gesture will disabling scrolling interactions
*/
'disableScroll'?: boolean;
/**
* If true, the current gesture interaction is disabled
*/
'disabled'?: boolean;
/**
* Name for the gesture action
*/
'gestureName'?: string;
/**
* What priority the gesture should take. The higher the number, the higher the priority.
*/
'gesturePriority'?: number;
/**
* The max angle for the gesture
*/
'maxAngle'?: number;
/**
* Function to execute when the gesture has not been captured
*/
'notCaptured'?: GestureCallback;
/**
* Function to execute when the gesture has end
*/
'onEnd'?: GestureCallback;
/**
* Function to execute when the gesture has moved
*/
'onMove'?: GestureCallback;
/**
* Function to execute when the gesture has start
*/
'onStart'?: GestureCallback;
/**
* Function to execute when the gesture will start
*/
'onWillStart'?: (_: GestureDetail) => Promise<void>;
/**
* If the event should use passive event listeners
*/
'passive'?: boolean;
/**
* How many pixels of change the gesture should wait for before triggering the action.
*/
'threshold'?: number;
}
}
}


declare global {

namespace StencilComponents {
Expand Down
1 change: 1 addition & 0 deletions core/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

white-space: nowrap;

user-select: none;
vertical-align: top; // the better option for most scenarios
vertical-align: -webkit-baseline-middle; // the best for those that support it
}
Expand Down

This file was deleted.

107 changes: 0 additions & 107 deletions core/src/components/gesture-controller/gesture-controller-utils.ts

This file was deleted.

31 changes: 0 additions & 31 deletions core/src/components/gesture-controller/readme.md

This file was deleted.

Loading

0 comments on commit 49cac8b

Please sign in to comment.