@unbound-app/api 0.9.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/ambient/image-modules.d.ts +58 -0
  2. package/package.json +30 -5
  3. package/src/_internal.d.ts +6110 -462
  4. package/src/{utils.d.ts → _types.d.ts} +10 -0
  5. package/src/assets.d.ts +64 -26
  6. package/src/builtins.d.ts +17 -0
  7. package/src/commands.d.ts +331 -0
  8. package/src/dialogs.d.ts +134 -0
  9. package/src/flux.d.ts +317 -0
  10. package/src/fonts.d.ts +51 -0
  11. package/src/fs.d.ts +16 -26
  12. package/src/global.d.ts +514 -31
  13. package/src/i18n.d.ts +33 -31
  14. package/src/iconPacks.d.ts +43 -0
  15. package/src/index.d.ts +16 -0
  16. package/src/marketplace.d.ts +50 -0
  17. package/src/metro/api.d.ts +10 -0
  18. package/src/metro/common.d.ts +34 -5
  19. package/src/metro/components.d.ts +100 -16
  20. package/src/metro/filters.d.ts +31 -16
  21. package/src/metro/index.d.ts +26097 -82
  22. package/src/metro/stores.d.ts +5 -0
  23. package/src/native.d.ts +123 -3
  24. package/src/patcher.d.ts +214 -57
  25. package/src/plugins.d.ts +55 -0
  26. package/src/settings.d.ts +9 -17
  27. package/src/shims.d.ts +5 -0
  28. package/src/storage.d.ts +80 -223
  29. package/src/sync.d.ts +51 -0
  30. package/src/themes.d.ts +43 -0
  31. package/src/toasts.d.ts +62 -9
  32. package/src/ui.d.ts +650 -0
  33. package/src/updates.d.ts +25 -0
  34. package/src/utils/index.d.ts +53 -0
  35. package/src/utils/react/index.d.ts +82 -0
  36. package/testing/fake-api.ts +256 -0
  37. package/testing/fake-components.ts +183 -0
  38. package/testing/fake-feedback.ts +258 -0
  39. package/testing/fake-fs.ts +54 -0
  40. package/testing/fake-java.ts +513 -0
  41. package/testing/fake-locales.ts +85 -0
  42. package/testing/fake-metro.ts +346 -0
  43. package/testing/fake-native-bridge.ts +98 -0
  44. package/testing/fake-native.ts +211 -0
  45. package/testing/fake-objc.ts +388 -0
  46. package/testing/fake-plugins.ts +176 -0
  47. package/testing/fake-react-native-modules.ts +362 -0
  48. package/testing/fake-react-native.ts +180 -0
  49. package/testing/fake-react.ts +54 -0
  50. package/testing/fake-settings-panel.ts +173 -0
  51. package/testing/fake-settings.ts +428 -0
  52. package/testing/fake-timers.ts +74 -0
  53. package/testing/fake-utils.ts +216 -0
  54. package/testing/icu-format.ts +132 -0
  55. package/testing/icu-parse.ts +277 -0
  56. package/testing/index.ts +42 -0
  57. package/testing/install-addon-globals.ts +260 -0
  58. package/testing/listener-registry.ts +39 -0
  59. package/testing/memory-storage.ts +149 -0
  60. package/testing/plugin-files.ts +155 -0
  61. package/testing/plugin-lifecycle.ts +149 -0
  62. package/testing/plugin-types.ts +34 -0
  63. package/testing/preset.ts +263 -0
  64. package/testing/react-patcher.ts +154 -0
  65. package/testing/react-value.ts +3 -0
  66. package/testing/recorders.ts +183 -0
  67. package/testing/recording-patcher.ts +173 -0
  68. package/testing/render.ts +84 -0
  69. package/testing/session.ts +77 -0
  70. package/testing/test-node.ts +163 -0
  71. package/testing/test-renderer.ts +753 -0
  72. package/testing/unfrozen-elements.ts +49 -0
package/src/i18n.d.ts CHANGED
@@ -1,24 +1,7 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
- declare const _default: {
4
- Messages: Record<string, string>;
5
- format: typeof format;
6
- defineLocalizations: typeof defineLocalizations;
7
- init: typeof init;
8
- destroy: typeof destroy;
9
- };
10
- /** The core `Messages` proxy, resolving Unbound's own UI strings against the active Discord locale. */
11
- export declare const Messages: Record<string, string>;
12
- /**
13
- * @description Creates an isolated, in-memory `Messages`/`format` pair over an addon-supplied string table, sharing the active locale with core.
14
- * @param table The addon's string store, keyed by locale then message key.
15
- * @returns A `Messages` proxy and `format` function scoped to the supplied table.
16
- */
17
- export declare function defineLocalizations(table: StringStore): Localizations;
18
- /**
19
- * @description Drains every active locale-change subscription. Idempotent. Twin of {@link init}.
20
- */
21
- export declare function destroy(): void;
3
+ /** The core messages proxy, resolving Unbound's own UI strings against the active Discord locale. */
4
+ export declare const messages: Record<string, string>;
22
5
  /**
23
6
  * @description Formats a localized string, interpolating ICU `MessageFormat` placeholders.
24
7
  * @param key The message key to resolve and format.
@@ -26,19 +9,38 @@ export declare function destroy(): void;
26
9
  * @returns The formatted string.
27
10
  */
28
11
  export declare function format(key: string, vars?: FormatVars): string;
29
- /**
30
- * @description Loads the fallback and active locales, then subscribes to Discord locale changes. Fire-and-forget; never blocks startup. Twin of {@link destroy}.
31
- * @returns A promise that resolves once the initial locales have been ensured and the subscription is wired.
32
- */
33
- export declare function init(): Promise<void>;
34
- export type FormatVars = Record<string, string | number | boolean | Date>;
35
- export type LocaleStrings = Record<string, string>;
36
- export type Localizations = {
37
- Messages: Record<string, string>;
12
+ /** An addon's `messages`, `format` and `useMessages`, over en-US and at most one other locale. */
13
+ export type AddonLocales = {
14
+ /** Each message in the active locale, falling back to en-US, then the key itself. */
15
+ messages: LocaleStrings;
16
+ /** Formats a message in the active locale, filling its placeholders from `vars`. */
38
17
  format: (key: string, vars?: FormatVars) => string;
18
+ /**
19
+ * Re-renders the component when the locale changes or its table loads. Returns the active locale code,
20
+ * a dependency for `useMemo` and `useCallback` over strings.
21
+ */
22
+ useMessages: () => string;
23
+ /** The en-US messages inlined in the bundle. */
24
+ source: Readonly<LocaleStrings>;
25
+ /** Calls the listener when the locale changes or its table loads; returns the remover. */
26
+ subscribe: (listener: () => void) => () => void;
27
+ /** The locales held in memory: en-US, and the active one once it loaded. */
28
+ loadedLocales: () => string[];
29
+ /** Stops following locale changes and drops the loaded table. */
30
+ dispose: () => void;
39
31
  };
40
- export type StringStore = Record<string, LocaleStrings>;
41
-
42
- export { _default as default };
32
+ /** The values `format` puts into a message's ICU `MessageFormat` placeholders, by placeholder name. */
33
+ export type FormatVars = Record<string, string | number | boolean | Date>;
34
+ /** Where an addon's translations live: the codes its manifest lists, and how to read one. */
35
+ export type LocaleSource = {
36
+ /** The addon's id, named in errors. */
37
+ owner: string;
38
+ /** Every locale the addon ships beside its bundle, en-US aside. */
39
+ codes: readonly string[];
40
+ /** Reads one locale's JSON, such as from `<addon folder>/i18n/<code>.json`. */
41
+ read: (code: string) => Promise<string>;
42
+ };
43
+ /** One locale's messages, keyed by message key. */
44
+ export type LocaleStrings = Record<string, string>;
43
45
 
44
46
  export {};
@@ -0,0 +1,43 @@
1
+ // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
+
3
+ import type { AddonHandle, PushedManifest } from './_internal';
4
+ /** Disables an icon pack and restores the default icons. */
5
+ export declare const disable: (id: string) => void;
6
+ /** Enables an icon pack and applies it. */
7
+ export declare const enable: (id: string) => void | Promise<void>;
8
+ /** Reads one installed icon pack by id. */
9
+ export declare const get: (id: string) => AddonHandle | undefined;
10
+ /** Lists every installed icon pack. */
11
+ export declare const getAll: () => AddonHandle[];
12
+ /** Installs an icon pack from its manifest URL. */
13
+ export declare const install: (url: string, digest?: string) => Promise<AddonHandle | undefined>;
14
+ /** Reports whether an icon pack is enabled. */
15
+ export declare const isEnabled: (id: string) => boolean;
16
+ /** Swaps an icon pack's files in place, keeping its enabled state. */
17
+ export declare const reload: (
18
+ id: string,
19
+ bundle: string,
20
+ manifest: PushedManifest,
21
+ bytecode?: string,
22
+ ) => Promise<ReloadResult>;
23
+ /** Enables a disabled icon pack, or disables an enabled one. */
24
+ export declare const toggle: (id: string) => void;
25
+ /** Removes an installed icon pack. */
26
+ export declare const uninstall: (id: string) => Promise<void>;
27
+ /**
28
+ * @description Checks for updates, then applies this icon pack's pending update.
29
+ * @param id The icon pack's id.
30
+ * @returns Whether the icon pack now runs a newer version.
31
+ */
32
+ export declare function update(id: string): Promise<boolean>;
33
+ /** The outcome of an addon reload: success, or failure carrying the recorded error. */
34
+ export type ReloadResult =
35
+ | {
36
+ ok: true;
37
+ }
38
+ | {
39
+ ok: false;
40
+ error: Error;
41
+ };
42
+
43
+ export {};
package/src/index.d.ts CHANGED
@@ -1,11 +1,27 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
+ /// <reference path="../ambient/image-modules.d.ts" />
4
+
3
5
  export * as assets from './assets';
6
+ export * as builtins from './builtins';
7
+ export * as commands from './commands';
8
+ export * as dialogs from './dialogs';
9
+ export * as flux from './flux';
10
+ export * as fonts from './fonts';
4
11
  export * as fs from './fs';
5
12
  export * as i18n from './i18n';
13
+ export * as iconPacks from './iconPacks';
14
+ export * as marketplace from './marketplace';
6
15
  export * as metro from './metro/index';
7
16
  export * as native from './native';
8
17
  export * as patcher from './patcher';
18
+ export * as plugins from './plugins';
9
19
  export * as settings from './settings';
20
+ export * as shims from './shims';
10
21
  export * as storage from './storage';
22
+ export * as sync from './sync';
23
+ export * as themes from './themes';
11
24
  export * as toasts from './toasts';
25
+ export * as ui from './ui';
26
+ export * as updates from './updates';
27
+ export * as utils from './utils/index';
@@ -0,0 +1,50 @@
1
+ // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
+
3
+ import type { AddonAuthor, AddonKind } from './_internal';
4
+ /**
5
+ * @description Installs the latest version of a marketplace addon, with the plugins it depends on once the user agrees.
6
+ * @param id The addon's id in the catalog.
7
+ * @returns Whether the addon now runs that version.
8
+ */
9
+ export declare function install(id: string): Promise<boolean>;
10
+ /**
11
+ * @description Fetches the marketplace catalog if it changed. Concurrent calls share one request.
12
+ * @returns Whether the server could be reached.
13
+ */
14
+ export declare function refresh(): Promise<boolean>;
15
+ /**
16
+ * @description Lists the catalog's addons of one type that match a query.
17
+ * @param query The addon type, an optional search text and the sort order.
18
+ * @returns The matching addons, or none while the catalog has not loaded.
19
+ */
20
+ export declare function search(query: CatalogQuery): MarketplaceListing[];
21
+ /** What `marketplace.search` filters the catalog by. */
22
+ export type CatalogQuery = {
23
+ /** Only addons of this kind are returned. */
24
+ type: AddonKind;
25
+ /** Matches the name, description, authors or id, case-insensitively. */
26
+ search?: string;
27
+ /** The result order; `name` when omitted. */
28
+ sort?: CatalogSort;
29
+ };
30
+ /** `name` sorts alphabetically, `updated` puts the most recently published versions first. */
31
+ export type CatalogSort = 'name' | 'updated';
32
+ /** One addon the marketplace lists, at its newest version. */
33
+ export type MarketplaceListing = {
34
+ /** The addon's id from its manifest, which installs and updates key on. */
35
+ id: string;
36
+ /** Whether the addon is a plugin, theme, icon pack or font. */
37
+ type: AddonKind;
38
+ /** The catalog's display name, or the newest version's manifest name when the catalog has none. */
39
+ name: string;
40
+ /** The catalog's description, or the newest version's manifest description when the catalog has none. */
41
+ description: string;
42
+ /** The authors listed in the newest version's manifest. */
43
+ authors: AddonAuthor[];
44
+ /** The newest published version. */
45
+ version: string;
46
+ /** When the newest version was published, as an ISO 8601 date-time. */
47
+ publishedAt: string;
48
+ };
49
+
50
+ export {};
@@ -1,10 +1,20 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
+ /** Discord's action sheet module, with `openLazy` and `hideActionSheet`; found on first access. */
4
+ export declare const ActionSheets: any;
5
+ /** Discord's module with `fetchProfile`, which loads a user's profile from the API; found on first access. */
3
6
  export declare const AsyncUsers: any;
7
+ /** Discord's invite actions module, with `acceptInviteAndTransitionToInviteChannel`; found on first access. */
4
8
  export declare const Invites: any;
9
+ /** Discord's link opener module, with `openURL` and `openSettings`; found on first access. */
5
10
  export declare const Linking: any;
11
+ /** Discord's message actions module, with `sendMessage` and `receiveMessage`; found on first access. */
6
12
  export declare const Messages: any;
13
+ /** Discord's module with `openOAuth2Modal`, which opens the app authorize screen; found on first access. */
7
14
  export declare const OAuth2: any;
15
+ /** Discord's module with `showUserProfile`, which opens a user's profile; found on first access. */
8
16
  export declare const Profiles: any;
17
+ /** Discord's user profile action sheet helpers, such as `getUserProfileActionSheetKey`; found on first access. */
18
+ export declare const UserProfiles: any;
9
19
 
10
20
  export {};
@@ -1,26 +1,55 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
+ export type { MarkdownParserModule, SimpleMarkdownModule } from '../_internal';
4
+ import type { MarkdownParserModule, SimpleMarkdownModule } from '../_internal';
5
+ import * as React$1 from 'react';
6
+ import { ReactNode } from 'react';
7
+ import { ImageProps, ImageURISource } from 'react-native';
8
+
9
+ /** Discord's clipboard module, which reads and writes strings and images; found on first access. */
3
10
  declare const Clipboard$1: any;
4
11
  declare const React$1: typeof import('react');
12
+ /** The React Native instance Discord bundles, read from `window.ReactNative`. */
5
13
  declare const ReactNative$1: typeof import('react-native');
14
+ /** React Native's asset registry, with `registerAsset`; found on first access. */
6
15
  export declare const Assets: any;
16
+ /** Discord's module with `createBotMessage`, which builds a local message from Clyde; found on first access. */
7
17
  export declare const Clyde: any;
18
+ /** Discord's slash command module, with `getBuiltInCommands`; found on first access. */
8
19
  export declare const Commands: any;
20
+ /** Discord's constants module, with `Fonts`, `Endpoints` and more; found on first access. */
9
21
  export declare const Constants: any;
10
- export declare const Dispatcher: any;
11
- export declare const Flux: any;
12
- export declare const FluxHooks: any;
22
+ /** Discord's copy of `react-native-gesture-handler`; found on first access. */
13
23
  export declare const Gestures: any;
14
- export declare const MarkdownParser: any;
24
+ /** React Native's image source resolver; patching it changes the source every `Image` renders. */
25
+ export declare const ImageSources: ImageSourcesModule;
26
+ /** Discord's markdown parser, which turns message text into an AST or React nodes; found on first access. */
27
+ export declare const MarkdownParser: MarkdownParserModule;
28
+ /** Discord's copy of Moment.js; found on first access. */
15
29
  export declare const Moment: any;
30
+ /** Discord's HTTP client for its API, with `getAPIBaseURL`; found on first access. */
16
31
  export declare const REST: any;
32
+ /** Discord's module exporting its `Radius` corner radius tokens; found on first access. */
17
33
  export declare const Radius: any;
34
+ /** Discord's copy of `react-native-reanimated`; found on first access. */
18
35
  export declare const Reanimated: any;
36
+ /** Discord's copy of `react-native-svg`, with `Svg` and `Path`; found on first access. */
19
37
  export declare const SVG: any;
38
+ /** Discord's copy of `react-native-screens`, with `FullWindowOverlay`; found on first access. */
20
39
  export declare const Screens: any;
40
+ /** Discord's copy of `simple-markdown`, whose block rules parse whole documents; found on first access. */
41
+ export declare const SimpleMarkdown: SimpleMarkdownModule;
42
+ /** Discord's design tokens, with `colors` and `internal`; found on first access. */
43
+ export declare const Theme: any;
44
+ /** Discord's `util` module, with `inspect` for printing values; found on first access. */
21
45
  export declare const Util: any;
46
+ /** Discord's localisation module, with `getLanguages`, `getSystemLocale` and `intl`; found on first access. */
22
47
  export declare const i18n: any;
23
-
48
+ /** React Native's `ImageSourceUtils`, which every `Image` render resolves its source through. */
49
+ export type ImageSourcesModule = {
50
+ /** Resolves the source or sources an `Image` with these props loads, or `null` for none. */
51
+ getImageSourcesFromImageProps: (props: ImageProps) => ImageURISource | ImageURISource[] | null;
52
+ };
24
53
  export { Clipboard$1 as Clipboard, React$1 as React, ReactNative$1 as ReactNative };
25
54
 
26
55
  export {};
@@ -1,26 +1,110 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
- export type { DesignModule, SwitchProps } from '../_internal';
4
- import type { DesignModule, SwitchProps } from '../_internal';
5
- import * as ReactModule from 'react';
6
- import { ComponentType, ReactNode } from 'react';
7
- import {
8
- AccessibilityState,
9
- ImageStyle,
10
- PressableProps,
11
- StyleProp,
12
- TextInputProps as RNTextInputProps,
13
- TextStyle,
14
- ViewProps,
15
- ViewStyle,
16
- } from 'react-native';
3
+ export type { DesignComponentName, DesignModule } from '../_internal';
4
+ export { DESIGN_COMPONENTS } from '../_internal';
5
+ import type { DesignComponentName, DesignModule } from '../_internal';
6
+ import * as React$1 from 'react';
7
+ import { ComponentProps, ComponentType, ElementType, FunctionComponent, ReactNode } from 'react';
8
+ import * as RN from 'react-native';
9
+ import { ColorValue, ImageStyle, TextStyle, ViewStyle } from 'react-native';
10
+
11
+ /** The `messageType` values for `HelpMessage`, from Discord or else Unbound's fallback; `{}` when neither loads. */
12
+ declare const HelpMessageTypes$1: any;
13
+ declare const HelpMessageTypes: {
14
+ readonly 0: 'WARNING';
15
+ readonly 1: 'INFO';
16
+ readonly 2: 'ERROR';
17
+ readonly 3: 'SUCCESS';
18
+ readonly WARNING: 0;
19
+ readonly INFO: 1;
20
+ readonly ERROR: 2;
21
+ readonly SUCCESS: 3;
22
+ };
23
+ /** Discord's stacked avatar components, `AvatarPile` and `AvatarDuoPile`; found on first access. */
24
+ export declare const AvatarPiles: any;
25
+ /** Discord's avatar module, with `Avatar` and `AvatarSizes`; found on first access. */
26
+ export declare const Avatars: any;
27
+ /** Discord's blur backdrop components, with `BackgroundBlurFill`; found on first access. */
17
28
  export declare const BackdropFilters: any;
29
+ /** Discord's bottom sheet components, with `ActionSheet` and `BottomSheetTitleHeader`; found on first access. */
30
+ export declare const BottomSheets: any;
31
+ /** Discord's default avatar images, `DEFAULT_AVATARS` and `DEFAULT_AVATARS_SMALL`; found on first access. */
32
+ export declare const DefaultAvatars: any;
33
+ /** Discord's design module, with Unbound's fallbacks standing in for components a build lacks. */
18
34
  export declare const Discord: DesignModule;
35
+ /** Discord's copy of Shopify's `FlashList` module; found on first access. */
19
36
  export declare const FlashList: any;
37
+ /** Discord's legacy form components, such as `FormRow` and `FormSection`; `{}` on builds without them. */
20
38
  export declare const Forms: any;
21
- export declare const HelpMessage: any;
39
+ /** The `@gorhom/bottom-sheet` Discord bundles, whose `BottomSheetScrollView` scrolls inside a `scrollable` sheet; found on first access. */
40
+ export declare const GorhomSheet: any;
41
+ /** Discord's media viewer module, with `openMediaModal`; found on first access. */
22
42
  export declare const Media: any;
43
+ /** Discord's portal components, `Portal` and `PortalHost`, for rendering outside the tree; found on first access. */
23
44
  export declare const Portal: any;
45
+ /** Discord's safe area components, with `SafeAreaPaddingView`; found on first access. */
24
46
  export declare const SafeArea: any;
25
- export declare const Switch: ReactModule.ComponentType<SwitchProps>;
47
+ /** `react-native-safe-area-context`, with `useSafeAreaInsets`; found on first access. */
48
+ export declare const SafeAreaContext: any;
49
+ /** Discord's `TableRowDivider`, the hairline `TableRowGroup` draws between rows; found on first access. */
50
+ export declare const TableRowDividers: any;
51
+ /** Discord's video player module, with `VideoComponent` and `createVideoControls`; found on first access. */
52
+ export declare const Video: any;
53
+ /**
54
+ * @description Discord's help message, or Unbound's own on Discord builds that no longer ship one, picked on first render.
55
+ * @param props The message, its type, text styling, corner radius and an optional trailing button.
56
+ * @returns The help message element.
57
+ */
58
+ export declare function HelpMessage(
59
+ props: HelpMessageProps,
60
+ ): import('react').ReactElement<
61
+ HelpMessageProps,
62
+ string | import('react').JSXElementConstructor<any>
63
+ >;
64
+ /**
65
+ * @description Discord's switch, or its form switch, or React Native's, picked on first render.
66
+ * @param props The switch props.
67
+ * @returns The switch element.
68
+ */
69
+ export declare function Switch(
70
+ props: SwitchProps,
71
+ ): import('react').ReactElement<SwitchProps, string | import('react').JSXElementConstructor<any>>;
72
+ /**
73
+ * @description Tells whether a value can be rendered as a React element type: a function or class
74
+ * component, or a `memo`/`forwardRef`/`lazy` object.
75
+ * @param value The value to check.
76
+ * @returns Whether React can render it.
77
+ */
78
+ export declare function isRenderable(value: unknown): value is React$1.ElementType;
79
+ /**
80
+ * @description Registers the component the design module returns when a Discord build lacks the
81
+ * named one or ships something React can't render.
82
+ * @param name The design component to stand in for.
83
+ * @param component The fallback.
84
+ */
85
+ export declare function registerDesignFallback<K extends DesignComponentName>(
86
+ name: K,
87
+ component: DesignModule[K],
88
+ ): void;
89
+ /** Props for `HelpMessage`; the defaults named here are those of Unbound's fallback. */
90
+ export type HelpMessageProps = {
91
+ /** The message; a string or number is rendered as text, any other node as given. */
92
+ children?: React$1.ReactNode;
93
+ /** A `HelpMessageTypes` value that picks the icon and feedback colors; `WARNING` when omitted. */
94
+ messageType?: HelpMessageType;
95
+ /** Discord's text variant for string children; `text-sm/medium` when omitted. */
96
+ textVariant?: string;
97
+ /** The color of string children; the theme's default text color when omitted. */
98
+ textColor?: ColorValue;
99
+ /** The corner radius in density-independent pixels; `8` when omitted. */
100
+ borderRadius?: number;
101
+ /** A node, usually a button, rendered after the message. */
102
+ button?: React$1.ReactNode;
103
+ };
104
+ /** A `HelpMessage` style: one of the `HelpMessageTypes` values. */
105
+ export type HelpMessageType = (typeof HelpMessageTypes)[keyof typeof HelpMessageTypes & string];
106
+ /** The props of Discord's `FormSwitch`, which the switch fallback accepts. */
107
+ export type SwitchProps = React$1.ComponentProps<DesignModule['FormSwitch']>;
108
+ export { HelpMessageTypes$1 as HelpMessageTypes };
109
+
26
110
  export {};
@@ -1,15 +1,19 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
- import type { PredicateResult } from '../utils';
3
+ import type { PredicateResult } from '../_types';
4
4
  declare const CACHE_KEY: unique symbol;
5
- declare const _default: {
6
- byProps: typeof byProps;
7
- byDisplayName: typeof byDisplayName;
8
- byPrototypes: typeof byPrototypes;
9
- byName: typeof byName;
10
- byStore: typeof byStore;
11
- byFilePath: typeof byFilePath;
12
- };
5
+ /**
6
+ * @description Builds a filter matching a module every part matches, testing the parts in order.
7
+ * @param parts The filters to combine; none may be a raw filter such as `byFilePath`.
8
+ * @returns A {@link MetroFilter} keyed by its parts' keys in any order, or unkeyed when a part is.
9
+ */
10
+ export declare function all(...parts: MetroFilter[]): MetroFilter;
11
+ /**
12
+ * @description Builds a filter matching a module any part matches, testing the parts in order.
13
+ * @param parts The filters to combine; none may be a raw filter such as `byFilePath`.
14
+ * @returns A {@link MetroFilter} keyed by its parts' keys in any order, or unkeyed when a part is.
15
+ */
16
+ export declare function any(...parts: MetroFilter[]): MetroFilter;
13
17
  /**
14
18
  * @description Builds a filter matching a module whose `displayName` equals the given name.
15
19
  * @param name The `displayName` the module must have.
@@ -22,6 +26,13 @@ export declare function byDisplayName(name: string): MetroFilter;
22
26
  * @returns A {@link MetroFilter} matching the module loaded from that file path.
23
27
  */
24
28
  export declare function byFilePath(path: string): MetroFilter;
29
+ /**
30
+ * @description Builds a filter matching a flux store by name, appending `Store` when `short` is set.
31
+ * @param name The store name to match against.
32
+ * @param short Whether to append `Store` to `name` before matching.
33
+ * @returns A {@link MetroFilter} matching the flux store with that name.
34
+ */
35
+ export declare function byFluxStore(name: string, short?: boolean): MetroFilter;
25
36
  /**
26
37
  * @description Builds a filter matching a module whose `name` equals the given name.
27
38
  * @param name The `name` the module must have.
@@ -41,17 +52,21 @@ export declare function byProps(...props: string[]): MetroFilter;
41
52
  */
42
53
  export declare function byPrototypes(...prototypes: string[]): MetroFilter;
43
54
  /**
44
- * @description Builds a filter matching a flux store by name, appending `Store` when `short` is set.
45
- * @param name The store name to match against.
46
- * @param short Whether to append `Store` to `name` before matching.
47
- * @returns A {@link MetroFilter} matching the flux store with that name.
55
+ * @description Builds a filter matching a wrapped component, like one from `React.memo`, whose inner `type` has the given name.
56
+ * @param name The `name` of the wrapped component's `type`.
57
+ * @returns A {@link MetroFilter} matching the module whose `type` has that name.
58
+ */
59
+ export declare function byTypeName(name: string): MetroFilter;
60
+ /**
61
+ * @description Builds a filter matching a module the given filter does not match.
62
+ * @param part The filter to negate; it may not be a raw filter such as `byFilePath`.
63
+ * @returns A {@link MetroFilter} keyed by the part's key, or unkeyed when the part is.
48
64
  */
49
- export declare function byStore(name: string, short?: boolean): MetroFilter;
65
+ export declare function not(part: MetroFilter): MetroFilter;
50
66
  /** A module predicate, carrying its cache key and a `raw` flag, produced by every `by*` helper. */
51
67
  export type MetroFilter = ((mdl: any, id: number | string) => PredicateResult) & {
52
68
  [CACHE_KEY]?: string;
53
69
  isRaw?: boolean;
70
+ filePath?: string;
54
71
  };
55
- export { _default as default };
56
-
57
72
  export {};