@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.
- package/ambient/image-modules.d.ts +58 -0
- package/package.json +30 -5
- package/src/_internal.d.ts +6110 -462
- package/src/{utils.d.ts → _types.d.ts} +10 -0
- package/src/assets.d.ts +64 -26
- package/src/builtins.d.ts +17 -0
- package/src/commands.d.ts +331 -0
- package/src/dialogs.d.ts +134 -0
- package/src/flux.d.ts +317 -0
- package/src/fonts.d.ts +51 -0
- package/src/fs.d.ts +16 -26
- package/src/global.d.ts +514 -31
- package/src/i18n.d.ts +33 -31
- package/src/iconPacks.d.ts +43 -0
- package/src/index.d.ts +16 -0
- package/src/marketplace.d.ts +50 -0
- package/src/metro/api.d.ts +10 -0
- package/src/metro/common.d.ts +34 -5
- package/src/metro/components.d.ts +100 -16
- package/src/metro/filters.d.ts +31 -16
- package/src/metro/index.d.ts +26097 -82
- package/src/metro/stores.d.ts +5 -0
- package/src/native.d.ts +123 -3
- package/src/patcher.d.ts +214 -57
- package/src/plugins.d.ts +55 -0
- package/src/settings.d.ts +9 -17
- package/src/shims.d.ts +5 -0
- package/src/storage.d.ts +80 -223
- package/src/sync.d.ts +51 -0
- package/src/themes.d.ts +43 -0
- package/src/toasts.d.ts +62 -9
- package/src/ui.d.ts +650 -0
- package/src/updates.d.ts +25 -0
- package/src/utils/index.d.ts +53 -0
- package/src/utils/react/index.d.ts +82 -0
- package/testing/fake-api.ts +256 -0
- package/testing/fake-components.ts +183 -0
- package/testing/fake-feedback.ts +258 -0
- package/testing/fake-fs.ts +54 -0
- package/testing/fake-java.ts +513 -0
- package/testing/fake-locales.ts +85 -0
- package/testing/fake-metro.ts +346 -0
- package/testing/fake-native-bridge.ts +98 -0
- package/testing/fake-native.ts +211 -0
- package/testing/fake-objc.ts +388 -0
- package/testing/fake-plugins.ts +176 -0
- package/testing/fake-react-native-modules.ts +362 -0
- package/testing/fake-react-native.ts +180 -0
- package/testing/fake-react.ts +54 -0
- package/testing/fake-settings-panel.ts +173 -0
- package/testing/fake-settings.ts +428 -0
- package/testing/fake-timers.ts +74 -0
- package/testing/fake-utils.ts +216 -0
- package/testing/icu-format.ts +132 -0
- package/testing/icu-parse.ts +277 -0
- package/testing/index.ts +42 -0
- package/testing/install-addon-globals.ts +260 -0
- package/testing/listener-registry.ts +39 -0
- package/testing/memory-storage.ts +149 -0
- package/testing/plugin-files.ts +155 -0
- package/testing/plugin-lifecycle.ts +149 -0
- package/testing/plugin-types.ts +34 -0
- package/testing/preset.ts +263 -0
- package/testing/react-patcher.ts +154 -0
- package/testing/react-value.ts +3 -0
- package/testing/recorders.ts +183 -0
- package/testing/recording-patcher.ts +173 -0
- package/testing/render.ts +84 -0
- package/testing/session.ts +77 -0
- package/testing/test-node.ts +163 -0
- package/testing/test-renderer.ts +753 -0
- package/testing/unfrozen-elements.ts +49 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Image imports in a plugin. `ubd build` ships the file and the import evaluates to the image's registered
|
|
2
|
+
// asset id, which `<Image source={id}>` and Discord's icon props take.
|
|
3
|
+
|
|
4
|
+
declare module '*.png' {
|
|
5
|
+
/** The image's asset id. */
|
|
6
|
+
const id: number;
|
|
7
|
+
|
|
8
|
+
export default id;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module '*.jpg' {
|
|
12
|
+
/** The image's asset id. */
|
|
13
|
+
const id: number;
|
|
14
|
+
|
|
15
|
+
export default id;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
/** The image's asset id. */
|
|
20
|
+
const id: number;
|
|
21
|
+
|
|
22
|
+
export default id;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module '*.webp' {
|
|
26
|
+
/** The image's asset id. */
|
|
27
|
+
const id: number;
|
|
28
|
+
|
|
29
|
+
export default id;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare module '*.gif' {
|
|
33
|
+
/** The image's asset id. */
|
|
34
|
+
const id: number;
|
|
35
|
+
|
|
36
|
+
export default id;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.svg' {
|
|
40
|
+
import type { DiscordIconProps } from '@unbound-app/api/global';
|
|
41
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
42
|
+
import type { ComponentType } from 'react';
|
|
43
|
+
|
|
44
|
+
/** An imported SVG's props: Discord's icon `size` and `color`, which `currentColor` draws, or an explicit `width` and `height`. */
|
|
45
|
+
export type SvgIconProps = DiscordIconProps & {
|
|
46
|
+
width?: number | string;
|
|
47
|
+
height?: number | string;
|
|
48
|
+
fill?: string;
|
|
49
|
+
stroke?: string;
|
|
50
|
+
opacity?: number;
|
|
51
|
+
style?: StyleProp<ViewStyle>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** The SVG as an icon component, drawn with Discord's `react-native-svg`; pass it as `IconComponent={Star}` or `icon={<Star />}`. */
|
|
55
|
+
const Component: ComponentType<SvgIconProps>;
|
|
56
|
+
|
|
57
|
+
export default Component;
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbound-app/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Mario P.",
|
|
6
6
|
"email": "contact@marioparaschiv.com",
|
|
@@ -12,15 +12,25 @@
|
|
|
12
12
|
"directory": "packages/api"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"src"
|
|
15
|
+
"src",
|
|
16
|
+
"ambient",
|
|
17
|
+
"testing"
|
|
16
18
|
],
|
|
19
|
+
"type": "module",
|
|
17
20
|
"types": "./src/index.d.ts",
|
|
18
21
|
"exports": {
|
|
19
22
|
".": "./src/index.d.ts",
|
|
20
23
|
"./assets": "./src/assets.d.ts",
|
|
24
|
+
"./builtins": "./src/builtins.d.ts",
|
|
25
|
+
"./commands": "./src/commands.d.ts",
|
|
26
|
+
"./dialogs": "./src/dialogs.d.ts",
|
|
27
|
+
"./flux": "./src/flux.d.ts",
|
|
28
|
+
"./fonts": "./src/fonts.d.ts",
|
|
21
29
|
"./fs": "./src/fs.d.ts",
|
|
22
30
|
"./global": "./src/global.d.ts",
|
|
23
31
|
"./i18n": "./src/i18n.d.ts",
|
|
32
|
+
"./iconPacks": "./src/iconPacks.d.ts",
|
|
33
|
+
"./marketplace": "./src/marketplace.d.ts",
|
|
24
34
|
"./metro": "./src/metro/index.d.ts",
|
|
25
35
|
"./metro/api": "./src/metro/api.d.ts",
|
|
26
36
|
"./metro/common": "./src/metro/common.d.ts",
|
|
@@ -29,15 +39,30 @@
|
|
|
29
39
|
"./metro/stores": "./src/metro/stores.d.ts",
|
|
30
40
|
"./native": "./src/native.d.ts",
|
|
31
41
|
"./patcher": "./src/patcher.d.ts",
|
|
42
|
+
"./plugins": "./src/plugins.d.ts",
|
|
32
43
|
"./settings": "./src/settings.d.ts",
|
|
44
|
+
"./shims": "./src/shims.d.ts",
|
|
33
45
|
"./storage": "./src/storage.d.ts",
|
|
34
|
-
"./
|
|
46
|
+
"./sync": "./src/sync.d.ts",
|
|
47
|
+
"./testing": "./testing/index.ts",
|
|
48
|
+
"./testing/icu-parse": "./testing/icu-parse.ts",
|
|
49
|
+
"./testing/preset": "./testing/preset.ts",
|
|
50
|
+
"./themes": "./src/themes.d.ts",
|
|
51
|
+
"./toasts": "./src/toasts.d.ts",
|
|
52
|
+
"./types": "./src/_types.d.ts",
|
|
53
|
+
"./ui": "./src/ui.d.ts",
|
|
54
|
+
"./updates": "./src/updates.d.ts",
|
|
55
|
+
"./utils": "./src/utils/index.d.ts",
|
|
56
|
+
"./utils/react": "./src/utils/react/index.d.ts"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"typecheck": "tsc --noEmit -p ."
|
|
35
60
|
},
|
|
36
61
|
"peerDependencies": {
|
|
37
62
|
"@types/react": "^19.2.7",
|
|
38
63
|
"react": "^19.3.1",
|
|
39
|
-
"react-native": "^0.
|
|
40
|
-
"typescript": "^
|
|
64
|
+
"react-native": "^0.86.0",
|
|
65
|
+
"typescript": "^7.0.2"
|
|
41
66
|
},
|
|
42
67
|
"peerDependenciesMeta": {
|
|
43
68
|
"react": {
|