<commit_before>import Framework7, {
  Framework7EventsClass,
  Framework7Plugin,
  CSSSelector,
} from '../../components/app/app-class';
import { Dom7, Dom7Array } from 'dom7';
import { View } from '../../components/view/view';

import { ComponentFunction as Component } from '../../modules/component/component';
import { Actions } from '../../components/actions/actions';
import { Popup } from '../../components/popup/popup';
import { LoginScreen } from '../../components/login-screen/login-screen';
import { Popover } from '../../components/popover/popover';
import { Modal } from '../../components/modal/modal';
import { Sheet } from '../../components/sheet/sheet';
import { Panel } from '../../components/panel/panel';

export namespace Router {
  interface ModalRouteParameters {
    /** Creates dynamic page from specified content string */
    content?: string | HTMLElement | Dom7Array | HTMLElement[];
    /** Load page content via Ajax. */
    url?: string;
    /** Load page from passed Framework7 Router Component */
    component?: Component | Function;
    /** load pages as a component via Ajax */
    componentUrl?: string;
    /** Do required asynchronous manipulation and the return required route content and options */
    async?(routeTo: Route, routeFrom: Route, resolve: Function, reject: Function): void;
    /** Function that should return Promise resolved with Component or ES module with `.default` property containing Component */
    asyncComponent?(): Promise<any>;
  }

  // interface AP extends Actions.Parameters{}

  interface RouteCallbackCtx {
    to: Route;
    from: Route;
    resolve: Function;
    reject: Function;
    router: Router;
    direction?: 'forward' | 'backward';
  }

  interface RouteParameters {
    /** Route name, e.g. home */
    name?: string;
    /** Route path. Means this route will be loaded when we click link that match to this path, or can be loaded by this path using API */
    path: string;
    /** View name where this route will be forced to load */
    viewName?: string;
    /** Object with additional route options (optional) */
    options?: RouteOptions;
    /** Array with nested routes */
    routes?: RouteParameters[];
    /** Modules to load */
    modules?: any[];
    /** Load page from DOM by passed HTMLElement */
    el?: HTMLElement | CSSSelector;
    /** Load page from DOM that has same data-name attribute */
    pageName?: string;
    /** Creates dynamic page from specified content string */
    content?: string | HTMLElement | Dom7Array | HTMLElement[];
    /** Load page content via Ajax. */
    url?: string;
    /** Load page from passed Framework7 Router Component */
    component?: Component | Function;
    /** load pages as a component via Ajax */
    componentUrl?: string;
    /** Do required asynchronous manipulation and the return required route content and options */
    async?(ctx: RouteCallbackCtx): void;<commit_msg>Core: Router - Add object as component type<commit_after>import Framework7, {
  Framework7EventsClass,
  Framework7Plugin,
  CSSSelector,
} from '../../components/app/app-class';
import { Dom7, Dom7Array } from 'dom7';
import { View } from '../../components/view/view';

import { ComponentFunction as Component } from '../../modules/component/component';
import { Actions } from '../../components/actions/actions';
import { Popup } from '../../components/popup/popup';
import { LoginScreen } from '../../components/login-screen/login-screen';
import { Popover } from '../../components/popover/popover';
import { Modal } from '../../components/modal/modal';
import { Sheet } from '../../components/sheet/sheet';
import { Panel } from '../../components/panel/panel';

export namespace Router {
  interface ModalRouteParameters {
    /** Creates dynamic page from specified content string */
    content?: string | HTMLElement | Dom7Array | HTMLElement[];
    /** Load page content via Ajax. */
    url?: string;
    /** Load page from passed Framework7 Router Component */
    component?: Component | Function | object;
    /** load pages as a component via Ajax */
    componentUrl?: string;
    /** Do required asynchronous manipulation and the return required route content and options */
    async?(routeTo: Route, routeFrom: Route, resolve: Function, reject: Function): void;
    /** Function that should return Promise resolved with Component or ES module with `.default` property containing Component */
    asyncComponent?(): Promise<any>;
  }

  // interface AP extends Actions.Parameters{}

  interface RouteCallbackCtx {
    to: Route;
    from: Route;
    resolve: Function;
    reject: Function;
    router: Router;
    direction?: 'forward' | 'backward';
  }

  interface RouteParameters {
    /** Route name, e.g. home */
    name?: string;
    /** Route path. Means this route will be loaded when we click link that match to this path, or can be loaded by this path using API */
    path: string;
    /** View name where this route will be forced to load */
    viewName?: string;
    /** Object with additional route options (optional) */
    options?: RouteOptions;
    /** Array with nested routes */
    routes?: RouteParameters[];
    /** Modules to load */
    modules?: any[];
    /** Load page from DOM by passed HTMLElement */
    el?: HTMLElement | CSSSelector;
    /** Load page from DOM that has same data-name attribute */
    pageName?: string;
    /** Creates dynamic page from specified content string */
    content?: string | HTMLElement | Dom7Array | HTMLElement[];
    /** Load page content via Ajax. */
    url?: string;
    /** Load page from passed Framework7 Router Component */
    component?: Component | Function | object;
    /** load pages as a component via Ajax */
    componentUrl?: string;
    /** Do required asynchronous manipulation and the return required route content and options */
    async?(ctx: RouteCallbackCtx): void;
{'fraction_non_alphanumeric': 0.12669376693766937, 'fraction_numerical': 0.0033875338753387536, 'mean_word_length': 3.1909155429382543, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '3611609', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1494, 'n_words': 591}