1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Bundled output for commit d7f4975330

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2023-01-17 18:15:45 +00:00
parent d7f4975330
commit 6adae00f72
35 changed files with 90 additions and 51 deletions

View File

@@ -34,7 +34,11 @@ import routes from './routes';
import AdminApplication from './AdminApplication';
import generateElementId from './utils/generateElementId';
declare const _default: {
extend: any;
extenders: {
PostTypes: typeof import("../common/extenders/PostTypes").default;
Routes: typeof import("../common/extenders/Routes").default;
};
extend: typeof import("../common/extend");
Session: typeof import("../common/Session").default;
Store: typeof import("../common/Store").default;
'utils/BasicEditorDriver': typeof import("../common/utils/BasicEditorDriver").default;

View File

@@ -14,6 +14,7 @@ import type Component from './Component';
import type { ComponentAttrs } from './Component';
import Model, { SavedModelData } from './Model';
import IHistory from './IHistory';
import IExtender from './extenders/IExtender';
export type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';
export type FlarumGenericRoute = RouteItem<any, any, any>;
export interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {
@@ -196,7 +197,7 @@ export default class Application {
load(payload: Application['data']): void;
boot(): void;
bootExtensions(extensions: Record<string, {
extend?: unknown[];
extend?: IExtender[];
}>): void;
protected mount(basePath?: string): void;
/**

View File

@@ -1,3 +1,4 @@
import * as extend from './extend';
import Session from './Session';
import Store from './Store';
import BasicEditorDriver from './utils/BasicEditorDriver';
@@ -84,7 +85,11 @@ import AlertManagerState from './states/AlertManagerState';
import ModalManagerState from './states/ModalManagerState';
import PageState from './states/PageState';
declare const _default: {
extend: any;
extenders: {
PostTypes: typeof import("./extenders/PostTypes").default;
Routes: typeof import("./extenders/Routes").default;
};
extend: typeof extend;
Session: typeof Session;
Store: typeof Store;
'utils/BasicEditorDriver': typeof BasicEditorDriver;

View File

@@ -1,12 +0,0 @@
export default class Model {
constructor(type: any, model?: null);
type: any;
attributes: any[];
hasOnes: any[];
hasManys: any[];
model: any;
attribute(name: any): Model;
hasOne(type: any): Model;
hasMany(type: any): Model;
extend(app: any, extension: any): void;
}

View File

@@ -1,5 +0,0 @@
export default class PostTypes {
postComponents: {};
add(name: any, component: any): PostTypes;
extend(app: any, extension: any): void;
}

View File

@@ -1,5 +0,0 @@
export default class Routes {
routes: {};
add(name: any, path: any, component: any): Routes;
extend(app: any, extension: any): void;
}

View File

@@ -1,3 +0,0 @@
export { default as Model } from "./Model";
export { default as PostTypes } from "./PostTypes";
export { default as Routes } from "./Routes";

View File

@@ -0,0 +1,8 @@
import Application from '../Application';
export interface IExtensionModule {
name: string;
exports: unknown;
}
export default interface IExtender {
extend(app: Application, extension: IExtensionModule): void;
}

View File

@@ -0,0 +1,14 @@
import IExtender, { IExtensionModule } from './IExtender';
import Application from '../Application';
export default class PostTypes implements IExtender {
private postComponents;
/**
* Register a new post component type.
* Usually used for event posts.
*
* @param name The name of the post type.
* @param component The component class to render the post.
*/
add(name: string, component: any): PostTypes;
extend(app: Application, extension: IExtensionModule): void;
}

View File

@@ -0,0 +1,18 @@
import Application from '../Application';
import IExtender, { IExtensionModule } from './IExtender';
type HelperRoute = (...args: any) => string;
export default class Routes implements IExtender {
private routes;
private helpers;
/**
* Add a mithril route to the application.
*
* @param name The name of the route.
* @param path The path of the route.
* @param component must extend `Page` component.
*/
add(name: string, path: `/${string}`, component: any): Routes;
helper(name: string, callback: HelperRoute): Routes;
extend(app: Application, extension: IExtensionModule): void;
}
export {};

View File

@@ -0,0 +1,7 @@
import PostTypes from './PostTypes';
import Routes from './Routes';
declare const _default: {
PostTypes: typeof PostTypes;
Routes: typeof Routes;
};
export default _default;

View File

@@ -6,7 +6,6 @@ import 'bootstrap/js/dropdown';
import 'bootstrap/js/tooltip';
import 'bootstrap/js/transition';
import 'jquery.hotkeys/jquery.hotkeys';
import * as Extend from './extend/index';
import app from './app';
export { Extend, app };
export { app };
import './utils/arrayFlatPolyfill';

View File

@@ -70,7 +70,11 @@ import routes from './routes';
import ForumApplication from './ForumApplication';
import isSafariMobile from './utils/isSafariMobile';
declare const _default: {
extend: any;
extenders: {
PostTypes: typeof import("../common/extenders/PostTypes").default;
Routes: typeof import("../common/extenders/Routes").default;
};
extend: typeof import("../common/extend");
Session: typeof import("../common/Session").default;
Store: typeof import("../common/Store").default;
'utils/BasicEditorDriver': typeof BasicEditorDriver;

2
framework/core/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
framework/core/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long