1
0
mirror of https://github.com/flarum/core.git synced 2025-08-13 20:04:24 +02:00

Bundled output for commit d268894e61

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

[skip ci]
This commit is contained in:
flarum-bot
2021-12-27 19:02:33 +00:00
parent d268894e61
commit 3d62a6af27
67 changed files with 578 additions and 615 deletions

View File

@@ -15,9 +15,9 @@ declare class ComposerState {
* The composer's intended height, which can be modified by the user
* (by dragging the composer handle).
*
* @type {Integer}
* @type {number}
*/
height: any;
height: number;
/**
* The dynamic component being shown inside the composer.
*
@@ -33,16 +33,15 @@ declare class ComposerState {
/**
* Load a content component into the composer.
*
* @param {ComposerBody} componentClass
* @public
* @param {typeof import('../components/ComposerBody').default} componentClass
*/
public load(componentClass: any, attrs: any): void;
load(componentClass: typeof import('../components/ComposerBody').default, attrs: any): void;
/**
* Clear the composer's content component.
*/
clear(): void;
onExit: {
callback: Function;
callback: () => boolean;
message: string;
} | null | undefined;
fields: {
@@ -50,47 +49,34 @@ declare class ComposerState {
} | undefined;
/**
* Show the composer.
*
* @public
*/
public show(): void;
show(): void;
/**
* Close the composer.
*
* @public
*/
public hide(): void;
hide(): void;
/**
* Confirm with the user so they don't lose their content, then close the
* composer.
*
* @public
*/
public close(): void;
close(): void;
/**
* Minimize the composer. Has no effect if the composer is hidden.
*
* @public
*/
public minimize(): void;
minimize(): void;
/**
* Take the composer into fullscreen mode. Has no effect if the composer is
* hidden.
*
* @public
*/
public fullScreen(): void;
fullScreen(): void;
/**
* Exit fullscreen mode.
*
* @public
*/
public exitFullScreen(): void;
exitFullScreen(): void;
/**
* Determine whether the body matches the given component class and data.
*
* @param {object} type The component class to check against. Subclasses are
* accepted as well.
* @param {object} type The component class to check against. Subclasses are accepted as well.
* @param {object} data
* @return {boolean}
*/
@@ -110,23 +96,22 @@ declare class ComposerState {
* This will be true if the Composer is in full-screen mode on desktop,
* or if we are on a mobile device, where we always consider the composer as full-screen..
*
* @return {Boolean}
* @public
* @return {boolean}
*/
public isFullScreen(): boolean;
isFullScreen(): boolean;
/**
* Check whether or not the user is currently composing a reply to a
* discussion.
*
* @param {Discussion} discussion
* @return {Boolean}
* @param {import('../../common/models/Discussion').default} discussion
* @return {boolean}
*/
composingReplyTo(discussion: any): boolean;
composingReplyTo(discussion: import('../../common/models/Discussion').default): boolean;
/**
* Confirm with the user that they want to close the composer and lose their
* content.
*
* @return {Boolean} Whether or not the exit was cancelled.
* @return {boolean} Whether or not the exit was cancelled.
*/
preventExit(): boolean;
/**
@@ -136,27 +121,27 @@ declare class ComposerState {
* confirmation is necessary. If the callback returns true at the time of
* closing, the provided text will be shown in a standard confirmation dialog.
*
* @param {Function} callback
* @param {String} message
* @param {() => boolean} callback
* @param {string} message
*/
preventClosingWhen(callback: Function, message: string): void;
preventClosingWhen(callback: () => boolean, message: string): void;
/**
* Minimum height of the Composer.
* @returns {Integer}
* @returns {number}
*/
minimumHeight(): any;
minimumHeight(): number;
/**
* Maxmimum height of the Composer.
* @returns {Integer}
* @returns {number}
*/
maximumHeight(): any;
maximumHeight(): number;
/**
* Computed the composer's current height, based on the intended height, and
* the composer's current state. This will be applied to the composer's
* the composer's current state. This will be applied to the composer
* content's DOM element.
* @returns {Integer|String}
* @returns {number | string}
*/
computedHeight(): any | string;
computedHeight(): number | string;
}
declare namespace ComposerState {
namespace Position {

View File

@@ -46,33 +46,30 @@ declare class PostStreamState {
/**
* Update the stream so that it loads and includes the latest posts in the
* discussion, if the end is being viewed.
*
* @public
*/
public update(): Promise<any>;
update(): Promise<void>;
visibleEnd: any;
/**
* Load and scroll up to the first post in the discussion.
*
* @return {Promise}
* @return {Promise<void>}
*/
goToFirst(): Promise<any>;
goToFirst(): Promise<void>;
/**
* Load and scroll down to the last post in the discussion.
*
* @return {Promise}
* @return {Promise<void>}
*/
goToLast(): Promise<any>;
goToLast(): Promise<void>;
/**
* Load and scroll to a post with a certain number.
*
* @param {number|String} number The post number to go to. If 'reply', go to
* the last post and scroll the reply preview into view.
* @param {Boolean} noAnimation
* @return {Promise}
* @param {number | string} number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.
* @param {boolean} [noAnimation]
* @return {Promise<void>}
*/
goToNumber(number: number | string, noAnimation?: boolean): Promise<any>;
loadPromise: Promise<any> | undefined;
goToNumber(number: number | string, noAnimation?: boolean | undefined): Promise<void>;
loadPromise: Promise<void> | undefined;
needsScroll: boolean | undefined;
targetPost: {
number: string | number;
@@ -86,28 +83,28 @@ declare class PostStreamState {
* Load and scroll to a certain index within the discussion.
*
* @param {number} index
* @param {Boolean} noAnimation
* @return {Promise}
* @param {boolean} [noAnimation]
* @return {Promise<void>}
*/
goToIndex(index: number, noAnimation?: boolean): Promise<any>;
goToIndex(index: number, noAnimation?: boolean | undefined): Promise<void>;
/**
* Clear the stream and load posts near a certain number. Returns a promise.
* If the post with the given number is already loaded, the promise will be
* resolved immediately.
*
* @param {number} number
* @return {Promise}
* @return {Promise<void>}
*/
loadNearNumber(number: number): Promise<any>;
loadNearNumber(number: number): Promise<void>;
/**
* Clear the stream and load posts near a certain index. A page of posts
* surrounding the given index will be loaded. Returns a promise. If the given
* index is already loaded, the promise will be resolved immediately.
*
* @param {number} index
* @return {Promise}
* @return {Promise<void>}
*/
loadNearIndex(index: number): Promise<any>;
loadNearIndex(index: number): Promise<void>;
/**
* Load the next page of posts.
*/
@@ -122,7 +119,7 @@ declare class PostStreamState {
*
* @param {number} start
* @param {number} end
* @param {Boolean} backwards
* @param {boolean} backwards
*/
loadPage(start: number, end: number, backwards?: boolean): void;
/**
@@ -131,15 +128,15 @@ declare class PostStreamState {
*
* @param {number} start
* @param {number} end
* @return {Promise}
* @return {Promise<void>}
*/
loadRange(start: number, end: number): Promise<any>;
loadRange(start: number, end: number): Promise<void>;
/**
* Set up the stream with the given array of posts.
*
* @param {Post[]} posts
* @param {import('../../common/models/Post').default[]} posts
*/
show(posts: any[]): void;
show(posts: import('../../common/models/Post').default[]): void;
/**
* Reset the stream so that a specific range of posts is displayed. If a range
* is not specified, the first page of posts will be displayed.
@@ -164,7 +161,7 @@ declare class PostStreamState {
* Check whether or not the scrubber should be disabled, i.e. if all of the
* posts are visible in the viewport.
*
* @return {Boolean}
* @return {boolean}
*/
disabled(): boolean;
/**