Skip to content

Commit

Permalink
Bundled output for commit 67759e6
Browse files Browse the repository at this point in the history
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
  • Loading branch information
flarum-bot committed Nov 24, 2024
1 parent 67759e6 commit ef8e540
Show file tree
Hide file tree
Showing 38 changed files with 237 additions and 2 deletions.
37 changes: 37 additions & 0 deletions js/dist-typings/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import 'flarum/common/models/Discussion';
import 'flarum/common/models/Post';
import 'flarum/common/models/User';

import Rank from '../common/models/Rank';
import type User from 'flarum/common/models/User';

declare module 'flarum/common/models/Discussion' {
export default interface Discussion {
votes(): number;
hasUpvoted(): boolean;
hasDownvoted(): boolean;
canVote(): boolean;
seeVotes(): boolean;
}
}

declare module 'flarum/common/models/Post' {
export default interface Post {
upvotes(): User[];
downvotes(): User[];
votes(): number;
canVote(): boolean;
canSeeVotes(): boolean;
hasUpvoted(): boolean;
hasDownvoted(): boolean;
seeVoters(): boolean;
}
}

declare module 'flarum/common/models/User' {
export default interface User {
points(): number;
ranks(): Rank[];
canHaveVotingNotifications(): boolean;
}
}
13 changes: 13 additions & 0 deletions js/dist-typings/admin/components/GroupSettings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// <reference types="mithril" />
import Component from 'flarum/common/Component';
interface GroupSettingsAttrs {
value: string;
onchange: (value: string) => void;
}
export default class GroupSettings extends Component<GroupSettingsAttrs> {
newGroupId: any;
newMinPoints: any;
newMaxPoints: any;
view(): JSX.Element;
}
export {};
42 changes: 42 additions & 0 deletions js/dist-typings/admin/components/SettingsPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export default class SettingsPage extends ExtensionPage<import("flarum/admin/components/ExtensionPage").ExtensionPageAttrs> {
constructor();
oninit(vnode: any): void;
fields: string[] | undefined;
switches: string[] | undefined;
ranks: import("flarum/common/Model").default[] | undefined;
values: {} | undefined;
settingsPrefix: string | undefined;
newRank: {
points: any;
name: any;
color: any;
} | undefined;
/**
* @returns {*}
*/
content(): any;
updateName(rank: any, value: any): void;
updatePoints(rank: any, value: any): void;
updateColor(rank: any, value: any): void;
deleteRank(rankToDelete: any): void;
addRank(): void;
/**
*
* @returns boolean
*/
changed(): boolean;
prepareSubmissionData(): {};
/**
* @param e
*/
onsubmit(e: any): void;
/**
* @returns string
*/
addPrefix(key: any): string;
settingsItems(): ItemList<any>;
voteItems(): ItemList<any>;
rankingsItems(): ItemList<any>;
}
import ExtensionPage from "flarum/admin/components/ExtensionPage";
import ItemList from "flarum/common/utils/ItemList";
3 changes: 3 additions & 0 deletions js/dist-typings/admin/components/UploadImageButton.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default class UploadImageButton extends FlarumUploadImageButton {
}
import FlarumUploadImageButton from "flarum/admin/components/UploadImageButton";
6 changes: 6 additions & 0 deletions js/dist-typings/admin/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export namespace components {
export { SettingsPage };
export { UploadImageButton };
}
import SettingsPage from "./SettingsPage";
import UploadImageButton from "./UploadImageButton";
2 changes: 2 additions & 0 deletions js/dist-typings/admin/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("flarum/common/extenders/Store").default[];
export default _default;
3 changes: 3 additions & 0 deletions js/dist-typings/admin/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as extend } from './extend';
export * from '../common/helpers';
export * from './components';
2 changes: 2 additions & 0 deletions js/dist-typings/common/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("flarum/common/extenders/Store").default[];
export default _default;
4 changes: 4 additions & 0 deletions js/dist-typings/common/helpers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export namespace helpers {
export { rankLabel };
}
import rankLabel from "./rankLabel";
1 change: 1 addition & 0 deletions js/dist-typings/common/helpers/rankLabel.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function rankLabel(rank: any, attrs?: {}): any;
1 change: 1 addition & 0 deletions js/dist-typings/common/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './models';
6 changes: 6 additions & 0 deletions js/dist-typings/common/models/Rank.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Model from 'flarum/common/Model';
export default class Rank extends Model {
points(): number;
name(): string;
color(): string;
}
4 changes: 4 additions & 0 deletions js/dist-typings/common/models/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Rank from './Rank';
export declare const models: {
Rank: typeof Rank;
};
1 change: 1 addition & 0 deletions js/dist-typings/forum/addAlternateLayout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function addAlternateLayout(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addHotnessSort.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addNotifications.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function addNotifications(): void;
2 changes: 2 additions & 0 deletions js/dist-typings/forum/addPusher.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function _default(): void;
export default _default;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addUpvoteTabToUserProfile.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function addUpvoteTabToUserProfile(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addUpvotesToDiscussion.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addUserInfo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addVoteButtons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
4 changes: 4 additions & 0 deletions js/dist-typings/forum/addVotersToDiscussionPageSideBar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Adds our custom {@link Voters} component to the discussion sidebar.
*/
export default function addVotersToDiscussionPageSideBar(): void;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addVotesSort.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
8 changes: 8 additions & 0 deletions js/dist-typings/forum/components/RankingImage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="mithril" />
import Component, { ComponentAttrs } from 'flarum/common/Component';
export interface RankingImageAttrs extends ComponentAttrs {
place: number;
}
export default class RankingImage extends Component<RankingImageAttrs> {
view(): JSX.Element;
}
16 changes: 16 additions & 0 deletions js/dist-typings/forum/components/RankingsPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This page re-uses Flarum's IndexPage CSS classes
*/
export default class RankingsPage extends Page<import("flarum/common/components/Page").IPageAttrs, undefined> {
constructor();
oninit(vnode: any): void;
loading: boolean | undefined;
users: any[] | undefined;
view(): JSX.Element;
refresh(clear?: boolean): Promise<void>;
addOrdinalSuffix(i: any): any;
loadResults(offset: any): Promise<import("flarum/common/Store").ApiResponseSingle<import("flarum/common/Model").default>>;
loadMore(): void;
parseResults(results: any): any;
}
import Page from "flarum/common/components/Page";
6 changes: 6 additions & 0 deletions js/dist-typings/forum/components/VoteNotification.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="flarum/@types/translator-icu-rich" />
export default class UpvotedNotification extends Notification<import("flarum/forum/components/Notification").INotificationAttrs> {
constructor();
content(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
}
import Notification from "flarum/forum/components/Notification";
17 changes: 17 additions & 0 deletions js/dist-typings/forum/components/Voters.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Component, { ComponentAttrs } from 'flarum/common/Component';
import SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';
import type Mithril from 'mithril';
import type Post from 'flarum/common/models/Post';
export interface VotersAttrs extends ComponentAttrs {
post: Post;
}
export default class Voters extends Component<VotersAttrs> {
subtreeRetainer: SubtreeRetainer;
lastRenderVotes: number;
loading: boolean;
oninit(vnode: Mithril.Vnode): void;
onbeforeupdate(vnode: Mithril.Vnode): boolean;
onupdate(): void;
view(): JSX.Element;
load(): Promise<void>;
}
9 changes: 9 additions & 0 deletions js/dist-typings/forum/components/VotesModal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="flarum/@types/translator-icu-rich" />
export default class VotesModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs, undefined> {
constructor();
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
oninit(vnode: any): void;
content(): JSX.Element;
load(): Promise<void>;
}
import Modal from "flarum/common/components/Modal";
14 changes: 14 additions & 0 deletions js/dist-typings/forum/components/VotesUserPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import PostsUserPage from 'flarum/forum/components/PostsUserPage';
import type Post from 'flarum/common/models/Post';
/**
* The `VotesUserPage` component shows posts which user voted on.
*/
export default class VotesUserPage extends PostsUserPage {
/**
* Load a new page of the user's activity feed.
*
* @param offset The position to start getting results from.
* @protected
*/
loadResults(offset: number): Promise<import("flarum/common/Store").ApiResponsePlural<Post>>;
}
12 changes: 12 additions & 0 deletions js/dist-typings/forum/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import RankingsPage from './RankingsPage';
import VoteNotification from './VoteNotification';
import VotesModal from './VotesModal';
import Voters from './Voters';
import RankingImage from './RankingImage';
export declare const components: {
RankingImage: typeof RankingImage;
RankingsPage: typeof RankingsPage;
VoteNotification: typeof VoteNotification;
VotesModal: typeof VotesModal;
Voters: typeof Voters;
};
2 changes: 2 additions & 0 deletions js/dist-typings/forum/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Model").default)[];
export default _default;
5 changes: 5 additions & 0 deletions js/dist-typings/forum/helpers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const helpers: {
rankLabel: typeof import("../../common/helpers/rankLabel").default;
saveVote: (post: any, upvoted: any, downvoted: any, load: any, discussion?: any) => any;
setting: (key: any, isBool?: boolean) => unknown;
};
2 changes: 2 additions & 0 deletions js/dist-typings/forum/helpers/saveVote.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function _default(post: any, upvoted: any, downvoted: any, load: any, discussion?: any): any;
export default _default;
2 changes: 2 additions & 0 deletions js/dist-typings/forum/helpers/setting.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function _default(key: any, isBool?: boolean): unknown;
export default _default;
3 changes: 3 additions & 0 deletions js/dist-typings/forum/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as extend } from './extend';
export * from './components';
export * from './helpers';
1 change: 1 addition & 0 deletions js/dist-typings/forum/useAlternatePostVoteLayout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function useAlternatePostVoteLayout(): void;
2 changes: 1 addition & 1 deletion js/dist/forum.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

0 comments on commit ef8e540

Please sign in to comment.