···11-## Moonbase
22-33-- Moved entry to the top of the settings menu
44-- Added about section
55-- Fixed the moonlight menu in the tray icon duplicating over time
66-- Added the ability to switch moonlight branches from the tray icon
77-- Added the ability to use Markdown in settings descriptions
88-91## Core
1021111-- Fixed the Discord overlay being broken
1212-- Fixed script blocking issue that would, among other things, break TikTok embeds
1313-- Added simple error handling to injected Webpack modules
1414-1515-## Libraries
1616-1717-- Added Component Editor library
1818-- Added Commands library
1919-- Spacepack: Introduced logging for failed finds
2020-- Spacepack: Deprecated findByExports
2121-2222-## Misc
2323-2424-- Updated README
2525-- Introduced new `create-extension` CLI tool
2626-- The manifest schema is now automatically generated
33+- Updated mappings
44+- Fixed using remapped paths as patch finds not working
···5858};
59596060// Unmangle Menu elements
6161+// spacepack.require.m[moonlight.moonmap.modules["discord/modules/menus/web/Menu"]].toString();
6162const code =
6263 spacepack.require.m[
6364 spacepack.findByCode("Menu API only allows Items and groups of Items as children.")[0].id
···11import React from "@moonlight-mod/wp/react";
22-import spacepack from "@moonlight-mod/wp/spacepack_spacepack";
32import Flex from "@moonlight-mod/wp/discord/uikit/Flex";
43import { Text } from "@moonlight-mod/wp/discord/components/common/index";
55-66-const Margins = spacepack.require("discord/styles/shared/Margins.css");
77-const HelpMessageClasses = spacepack.findByCode("positive:", "iconDiv:")[0].exports;
44+import HelpMessageClasses from "@moonlight-mod/wp/discord/components/common/HelpMessage.css";
55+import Margins from "@moonlight-mod/wp/discord/styles/shared/Margins.css";
8697// reimpl of HelpMessage but with a custom icon
108export default function HelpMessage({
···77 "name": "Rocketship",
88 "tagline": "Adds new features when using rocketship",
99 "description": "**This extension only works on Linux when using rocketship:**\nhttps://github.com/moonlight-mod/rocketship\n\nAdds new features to the Discord Linux client with rocketship, such as a better screensharing experience.",
1010- "authors": ["NotNite", "Cynosphere", "adryd"]
1010+ "authors": ["NotNite", "Cynosphere", "adryd"],
1111+ "deprecated": true
1112 }
1213}
···121121}
122122123123export type Messages = {
124124+ /**
125125+ * Adds a component to the username of a message
126126+ */
124127 addToUsername: (id: string, component: React.FC<any>, anchor?: MessageUsernameAnchors, before?: boolean) => void;
128128+ /**
129129+ * Adds a component to the username badge area of a message (e.g. where role icons/new member badge is)
130130+ */
125131 addUsernameBadge: (
126132 id: string,
127133 component: React.FC<any>,
128134 anchor?: MessageUsernameBadgeAnchors,
129135 before?: boolean
130136 ) => void;
137137+ /**
138138+ * Adds a component to the end of a message header (e.g. silent indicator)
139139+ */
131140 addBadge: (id: string, component: React.FC<any>, anchor?: MessageBadgeAnchors, before?: boolean) => void;
132141 /**
142142+ * Adds a component to message accessories (e.g. embeds)
143143+ */
144144+ addAccessory: (id: string, component: React.FC<any>) => void;
145145+ /**
133146 * @private
134147 */
135148 _patchUsername: Patcher<any>;
···141154 * @private
142155 */
143156 _patchBadges: Patcher<any>;
157157+ /**
158158+ * @private
159159+ */
160160+ _patchAccessories: Patcher<any>;
144161};
145162//#endregion
+1-1
packages/types/src/coreExtensions/notices.ts
···11-import type { Store } from "@moonlight-mod/mappings/discord/packages/flux";
11+import type { Store } from "@moonlight-mod/mappings/discord/packages/flux/Store";
2233export type NoticeButton = {
44 name: string;
+11-8
packages/types/src/coreExtensions/settings.ts
···11import React, { ReactElement } from "react";
22-import type { Store } from "@moonlight-mod/mappings/discord/packages/flux";
22+import type { Store } from "@moonlight-mod/mappings/discord/packages/flux/Store";
3344export type NoticeProps = {
55 stores: Store<any>[];
···77};
8899export type SettingsSection =
1010- | { section: "DIVIDER"; pos: number }
1111- | { section: "HEADER"; label: string; pos: number }
1010+ | { section: "DIVIDER"; pos: number | ((sections: SettingsSection[]) => number) }
1111+ | { section: "HEADER"; label: string; pos: number | ((sections: SettingsSection[]) => number) }
1212 | {
1313 section: string;
1414 label: string;
1515 color: string | null;
1616 element: React.FunctionComponent;
1717- pos: number;
1717+ pos: number | ((sections: SettingsSection[]) => number);
1818 notice?: NoticeProps;
1919+ onClick?: () => void;
1920 _moonlight_submenu?: () => ReactElement | ReactElement[];
2021 };
2122···3233 * @param color A color to use for the section
3334 * @param pos The position in the settings menu to place the section
3435 * @param notice A notice to display when in the section
3636+ * @param onClick A custom action to execute when clicked from the context menu
3537 */
3638 addSection: (
3739 section: string,
3840 label: string,
3941 element: React.FunctionComponent,
4042 color?: string | null,
4141- pos?: number,
4242- notice?: NoticeProps
4343+ pos?: number | ((sections: SettingsSection[]) => number),
4444+ notice?: NoticeProps,
4545+ onClick?: () => void
4346 ) => void;
44474548 /**
···5356 * Places a divider in the settings menu.
5457 * @param pos The position in the settings menu to place the divider
5558 */
5656- addDivider: (pos: number | null) => void;
5959+ addDivider: (pos: number | ((sections: SettingsSection[]) => number) | null) => void;
57605861 /**
5962 * Places a header in the settings menu.
6063 * @param pos The position in the settings menu to place the header
6164 */
6262- addHeader: (label: string, pos: number | null) => void;
6565+ addHeader: (label: string, pos: number | ((sections: SettingsSection[]) => number) | null) => void;
63666467 /**
6568 * @private
+1
packages/types/src/coreExtensions.ts
···77export * as AppPanels from "./coreExtensions/appPanels";
88export * as Commands from "./coreExtensions/commands";
99export * as ComponentEditor from "./coreExtensions/componentEditor";
1010+export * as Common from "./coreExtensions/common";
+4
packages/types/src/discord/require.ts
···11import { AppPanels } from "../coreExtensions/appPanels";
22import { Commands } from "../coreExtensions/commands";
33+import { ErrorBoundary, Icons } from "../coreExtensions/common";
34import { DMList, MemberList, Messages } from "../coreExtensions/componentEditor";
45import { ContextMenu, EvilItemParser } from "../coreExtensions/contextMenu";
56import { Markdown } from "../coreExtensions/markdown";
···1314declare function WebpackRequire(id: "appPanels_appPanels"): AppPanels;
14151516declare function WebpackRequire(id: "commands_commands"): Commands;
1717+1818+declare function WebpackRequire(id: "common_ErrorBoundary"): ErrorBoundary;
1919+declare function WebpackRequire(id: "common_icons"): Icons;
16201721declare function WebpackRequire(id: "componentEditor_dmList"): DMList;
1822declare function WebpackRequire(id: "componentEditor_memberList"): MemberList;
+11
packages/types/src/extension.ts
···8585 source?: string;
86868787 /**
8888+ * A donation link (or other method of support). If you don't want financial contributions, consider putting your favorite charity here!
8989+ */
9090+ donate?: string;
9191+9292+ /**
8893 * A changelog to show in Moonbase.
8994 * Moonbase will show the changelog for the latest version, even if it is not installed.
9095 */
···130135 * @example https://moonlight-mod.github.io/
131136 */
132137 blocked?: string[];
138138+139139+ /**
140140+ * A mapping from CSP directives to URLs to allow.
141141+ * @example { "script-src": ["https://example.com"] }
142142+ */
143143+ csp?: Record<string, string[]>;
133144};
134145135146export enum ExtensionEnvironment {