<commit_before>import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';

export interface NativeTransitionOptions {
  direction?: string;
  duration?: number;
  slowdownfactor?: number;
  slidePixels?: number;
  iosdelay?: number;
  androiddelay?: number;
  winphonedelay?: number;
  fixedPixelsTop?: number;
  fixedPixelsBottom?: number;
  action?: string;
  origin?: string;
  href?: string;
}

/**
 * @name Native Page Transitions
 * @description
 * The Native Page Transitions plugin uses native hardware acceleration to animate your transitions between views. You have complete control over the type of transition, the duration, and direction.
 *
 * @usage
 * ```
 * import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
 *
 * constructor(private nativePageTransitions: NativePageTransitions) { }
 *
 * ...
 *
 *
 * // example of adding a transition when a page/modal closes
 * ionViewWillLeave() {
 *
 *  let options: NativeTransitionOptions = {
 *     direction: 'up',
 *     duration: 500,
 *     slowdownfactor: 3,
 *     slidePixels: 20,
 *     iosdelay: 100,
 *     androiddelay: 150,
 *     fixedPixelsTop: 0,
 *     fixedPixelsBottom: 60
 *    };
 *
 *  this.nativePageTransitions.slide(options)
 *    .then(onSuccess)
 *    .catch(onError);
 *
 * }
 *
 *
 * // example of adding a transition when pushing a new page
 * openPage(page: any) {
 *
 *   this.nativePageTransitions.slide(options);
 *   this.navCtrl.push(page);
 *
 * }
 *
 * ```
 */
@Plugin({
  pluginName: 'NativePageTransitions',
  plugin: 'com.telerik.plugins.nativepagetransitions',
  pluginRef: 'plugins.nativepagetransitions',
  repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
  platforms: ['iOS', 'Android', 'Windows Phone']
})
@Injectable()
export class NativePageTransitions extends IonicNativePlugin {
  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova()
  slide(options: NativeTransitionOptions): Promise<any> { return; }

  /**
   * Perform a flip animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova()
  flip(options: NativeTransitionOptions): Promise<any> { return; }

  /**
   * Perform a fade animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS', 'Android']})
  fade(options: NativeTransitionOptions): Promise<any> { return; }


  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS', 'Android']})
  drawer(options: NativeTransitionOptions): Promise<any> { return; }



  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS']})
  curl(options: NativeTransitionOptions): Promise<any> { return; }

}<commit_msg>feat(native-page-transitions): add pendingTransition methods (#1344)<commit_after>import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';

export interface NativeTransitionOptions {
  direction?: string;
  duration?: number;
  slowdownfactor?: number;
  slidePixels?: number;
  iosdelay?: number;
  androiddelay?: number;
  winphonedelay?: number;
  fixedPixelsTop?: number;
  fixedPixelsBottom?: number;
  action?: string;
  origin?: string;
  href?: string;
}

/**
 * @name Native Page Transitions
 * @description
 * The Native Page Transitions plugin uses native hardware acceleration to animate your transitions between views. You have complete control over the type of transition, the duration, and direction.
 *
 * @usage
 * ```
 * import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
 *
 * constructor(private nativePageTransitions: NativePageTransitions) { }
 *
 * ...
 *
 *
 * // example of adding a transition when a page/modal closes
 * ionViewWillLeave() {
 *
 *  let options: NativeTransitionOptions = {
 *     direction: 'up',
 *     duration: 500,
 *     slowdownfactor: 3,
 *     slidePixels: 20,
 *     iosdelay: 100,
 *     androiddelay: 150,
 *     fixedPixelsTop: 0,
 *     fixedPixelsBottom: 60
 *    };
 *
 *  this.nativePageTransitions.slide(options)
 *    .then(onSuccess)
 *    .catch(onError);
 *
 * }
 *
 *
 * // example of adding a transition when pushing a new page
 * openPage(page: any) {
 *
 *   this.nativePageTransitions.slide(options);
 *   this.navCtrl.push(page);
 *
 * }
 *
 * ```
 */
@Plugin({
  pluginName: 'NativePageTransitions',
  plugin: 'com.telerik.plugins.nativepagetransitions',
  pluginRef: 'plugins.nativepagetransitions',
  repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
  platforms: ['iOS', 'Android', 'Windows Phone']
})
@Injectable()
export class NativePageTransitions extends IonicNativePlugin {
  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova()
  slide(options: NativeTransitionOptions): Promise<any> { return; }

  /**
   * Perform a flip animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova()
  flip(options: NativeTransitionOptions): Promise<any> { return; }

  /**
   * Perform a fade animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS', 'Android']})
  fade(options: NativeTransitionOptions): Promise<any> { return; }


  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS', 'Android']})
  drawer(options: NativeTransitionOptions): Promise<any> { return; }



  /**
   * Perform a slide animation
   * @param options {NativeTransitionOptions} Options for the transition
   * @returns {Promise<any>}
   */
  @Cordova({platforms: ['iOS']})
  curl(options: NativeTransitionOptions): Promise<any> { return; }

  /**
   * Execute pending transition
   * @returns {Promise<any>}
   */
  @Cordova()
  executePendingTransition(): Promise<any> { return; }

  /**
   * Cancel pending transition
   * @returns {Promise<any>}
   */
  @Cordova()
  cancelPendingTransition(): Promise<any> { return; }

}
{'fraction_non_alphanumeric': 0.13186813186813187, 'fraction_numerical': 0.005118169501731146, 'mean_word_length': 4.083397092578424, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2273367', 'n_tokens_mistral': 2048, 'n_tokens_neox': 1980, 'n_words': 502}