@unbound-app/api 0.7.0 → 0.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbound-app/api",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "author": {
5
5
  "name": "Mario P.",
6
6
  "email": "contact@marioparaschiv.com",
@@ -187,8 +187,10 @@ export type DesignModule = {
187
187
  Heading: ReactModule.ComponentType<TextProps>;
188
188
  TableRow: TableRowComponent;
189
189
  TableSwitchRow: ReactModule.ComponentType<TableSwitchRowProps>;
190
+ FormSwitch: ReactModule.ComponentType<SwitchProps>;
190
191
  TableCheckboxRow: ReactModule.ComponentType<TableCheckboxRowProps>;
191
192
  TableRadioRow: ReactModule.ComponentType<TableRadioRowProps>;
193
+ TableRadioGroup: ReactModule.ComponentType<TableRadioGroupProps>;
192
194
  TableRowGroup: ReactModule.ComponentType<TableRowGroupProps>;
193
195
  TableRowGroupTitle: ReactModule.ComponentType<TableRowGroupTitleProps>;
194
196
  TableRowIcon: ReactModule.ComponentType<TableRowIconProps>;
@@ -655,8 +657,17 @@ export type TableCheckboxRowProps = {
655
657
  accessibilityHint?: string;
656
658
  onPress: DiscordFunction<void>;
657
659
  };
660
+ export type TableRadioGroupProps = {
661
+ title?: string;
662
+ description?: string;
663
+ value: any;
664
+ hasIcons?: boolean;
665
+ onChange: (value: any) => void;
666
+ children?: ReactModule.ReactNode;
667
+ };
658
668
  export type TableRadioRowProps = {
659
669
  label?: ReactModule.ReactNode;
670
+ icon?: ReactModule.ReactNode;
660
671
  subLabel?: ReactModule.ReactNode;
661
672
  value: any;
662
673
  disabled?: boolean;
package/src/global.d.ts CHANGED
@@ -92,6 +92,7 @@ export type {
92
92
  StyleSheetSpecOrFactory,
93
93
  SwitchProps,
94
94
  TableCheckboxRowProps,
95
+ TableRadioGroupProps,
95
96
  TableRadioRowProps,
96
97
  TableRowComponent,
97
98
  TableRowGroupProps,
@@ -4,6 +4,7 @@ export declare const AsyncUsers: any;
4
4
  export declare const Invites: any;
5
5
  export declare const Linking: any;
6
6
  export declare const Messages: any;
7
+ export declare const OAuth2: any;
7
8
  export declare const Profiles: any;
8
9
 
9
10
  export {};
@@ -9,6 +9,7 @@ export declare const Commands: any;
9
9
  export declare const Constants: any;
10
10
  export declare const Dispatcher: any;
11
11
  export declare const Flux: any;
12
+ export declare const FluxHooks: any;
12
13
  export declare const Gestures: any;
13
14
  export declare const MarkdownParser: any;
14
15
  export declare const Moment: any;
@@ -1,5 +1,6 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
+ export declare const Accessibility: any;
3
4
  export declare const Guilds: any;
4
5
  export declare const Users: any;
5
6
 
package/src/patcher.d.ts CHANGED
@@ -1,14 +1,22 @@
1
1
  // Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
2
2
 
3
- //#region src/patcher.d.ts
4
- export declare const PATCH_SYMBOL: unique symbol;
5
- export declare const patches: PatchedModule[];
6
- export declare enum PatchType {
7
- Before = 0,
8
- Instead = 1,
9
- After = 2,
10
- }
11
- export declare function after<M extends PatchParent, P extends PropOf<M>>(
3
+ /**
4
+ * @description Runs a callback after a method, which can replace its result by returning a value.
5
+ * @template M The object holding the method.
6
+ * @template P The method's key.
7
+ * @param parent The object holding the method.
8
+ * @param method The method's key.
9
+ * @param callback Receives the patch context.
10
+ * @param options Patch options.
11
+ * @returns A function removing the patch.
12
+ */
13
+ declare function after$1<M extends PatchParent, P extends PropOf<M>>(
14
+ parent: M,
15
+ method: P,
16
+ callback: Parameters<typeof before<M, P>>[2],
17
+ options?: PatchOptions,
18
+ ): () => void;
19
+ declare function after<M extends PatchParent, P extends PropOf<M>>(
12
20
  parent: M,
13
21
  method: P,
14
22
  callback: PatchCallback<
@@ -18,7 +26,23 @@ export declare function after<M extends PatchParent, P extends PropOf<M>>(
18
26
  >,
19
27
  options?: PatchOptions,
20
28
  ): () => void;
21
- export declare function before<M extends PatchParent, P extends PropOf<M>>(
29
+ /**
30
+ * @description Runs a callback before a method, which can replace its arguments by returning an array.
31
+ * @template M The object holding the method.
32
+ * @template P The method's key.
33
+ * @param parent The object holding the method.
34
+ * @param method The method's key.
35
+ * @param callback Receives the patch context.
36
+ * @param options Patch options.
37
+ * @returns A function removing the patch.
38
+ */
39
+ declare function before$1<M extends PatchParent, P extends PropOf<M>>(
40
+ parent: M,
41
+ method: P,
42
+ callback: Parameters<typeof before<M, P>>[2],
43
+ options?: PatchOptions,
44
+ ): () => void;
45
+ declare function before<M extends PatchParent, P extends PropOf<M>>(
22
46
  parent: M,
23
47
  method: P,
24
48
  callback: PatchCallback<
@@ -28,8 +52,23 @@ export declare function before<M extends PatchParent, P extends PropOf<M>>(
28
52
  >,
29
53
  options?: PatchOptions,
30
54
  ): () => void;
31
- export declare function createPatcher(defaultOptions: string | PatchOptions): PatcherInstance;
32
- export declare function instead<M extends PatchParent, P extends PropOf<M>>(
55
+ /**
56
+ * @description Runs a callback in place of a method, which can call `ctx.original` and replaces its result.
57
+ * @template M The object holding the method.
58
+ * @template P The method's key.
59
+ * @param parent The object holding the method.
60
+ * @param method The method's key.
61
+ * @param callback Receives the patch context.
62
+ * @param options Patch options.
63
+ * @returns A function removing the patch.
64
+ */
65
+ declare function instead$1<M extends PatchParent, P extends PropOf<M>>(
66
+ parent: M,
67
+ method: P,
68
+ callback: Parameters<typeof before<M, P>>[2],
69
+ options?: PatchOptions,
70
+ ): () => void;
71
+ declare function instead<M extends PatchParent, P extends PropOf<M>>(
33
72
  parent: M,
34
73
  method: P,
35
74
  callback: PatchCallback<
@@ -39,7 +78,28 @@ export declare function instead<M extends PatchParent, P extends PropOf<M>>(
39
78
  >,
40
79
  options?: PatchOptions,
41
80
  ): () => void;
81
+ //#region src/patcher.d.ts
82
+ export declare const PATCH_SYMBOL: unique symbol;
83
+ export declare const patches: PatchedModule[];
84
+ export declare enum PatchType {
85
+ Before = 0,
86
+ Instead = 1,
87
+ After = 2,
88
+ }
89
+ /**
90
+ * @description Creates a patcher whose patches share default options, so they can be removed together.
91
+ * @param defaultOptions A caller id, or options merged into every patch; a caller id is generated if missing.
92
+ * @returns The scoped patcher.
93
+ */
94
+ export declare function createPatcher(defaultOptions: string | PatchOptions): PatcherInstance;
95
+ /**
96
+ * @description Removes every patch.
97
+ */
42
98
  export declare function unpatchAll(): void;
99
+ /**
100
+ * @description Removes every patch made with a caller id.
101
+ * @param caller The caller id.
102
+ */
43
103
  export declare function unpatchAllByCaller(caller: string): void;
44
104
  //#endregion
45
105
  //#region src/env.d.ts
@@ -91,4 +151,6 @@ export type PropOf<M> = {
91
151
  [K in keyof M]: M[K] extends AnyFunction | AnyConstructor ? Extract<K, string> : never;
92
152
  }[keyof M];
93
153
 
154
+ export { after$1 as after, before$1 as before, instead$1 as instead };
155
+
94
156
  export {};