zois-core 2.2.1 → 3.0.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/dist/assets/icons/toast-themes/abdl/bottle.svg +10 -0
- package/dist/assets/icons/toast-themes/abdl/diaper.svg +11 -0
- package/dist/assets/icons/toast-themes/abdl/heart.svg +7 -0
- package/dist/assets/icons/toast-themes/abdl/sparkle.svg +5 -0
- package/dist/assets/icons/toast-themes/abdl/star.svg +5 -0
- package/dist/assets/icons/toast-themes/abdl/teddy.svg +18 -0
- package/dist/assets/icons/toast-themes/anime/error.svg +20 -0
- package/dist/assets/icons/toast-themes/anime/info.svg +20 -0
- package/dist/assets/icons/toast-themes/anime/success.svg +16 -0
- package/dist/assets/icons/toast-themes/anime/warning.svg +19 -0
- package/dist/changelogs.js +628 -295
- package/dist/cssVars.js +46 -0
- package/dist/dialogs.js +523 -83
- package/dist/events.js +28 -6
- package/dist/index.js +27 -70
- package/dist/localization.js +250 -40
- package/dist/messaging.js +1 -1
- package/dist/migration.js +37 -0
- package/dist/modules/baseModule.js +110 -0
- package/dist/modules/index.js +4 -0
- package/dist/modules/loadingStrategy.js +20 -0
- package/dist/modules/moduleContext.js +56 -0
- package/dist/modules/modulesManager.js +175 -0
- package/dist/{modSdk.js → patching.js} +33 -9
- package/dist/rpc.js +139 -0
- package/dist/scripts/zois-core.js +14 -14
- package/dist/settings.js +90 -0
- package/dist/settingsDialog.js +1361 -0
- package/dist/shard-modules/{attributesModule.js → attributes.js} +2 -2
- package/dist/shard-modules/{shardModule.js → base.js} +2 -2
- package/dist/shard-modules/{centerModule.js → center.js} +4 -2
- package/dist/shard-modules/{clickModule.js → click.js} +2 -2
- package/dist/shard-modules/{counterUpModule.js → counterUp.js} +2 -2
- package/dist/shard-modules/{dynamicClassModule.js → dynamicClass.js} +2 -2
- package/dist/shard-modules/index.js +9 -9
- package/dist/shard-modules/{multiClickModule.js → multiClick.js} +2 -2
- package/dist/shard-modules/{styleModule.js → style.js} +2 -2
- package/dist/shard-modules/{typeModule.js → type.js} +2 -2
- package/dist/shards/backNextButton.js +173 -0
- package/dist/shards/{shard.js → base.js} +15 -15
- package/dist/shards/{buttonShard.js → button.js} +30 -52
- package/dist/shards/{cardShard.js → card.js} +4 -4
- package/dist/shards/{checkboxShard.js → checkbox.js} +6 -13
- package/dist/shards/{containerShard.js → container.js} +2 -2
- package/dist/shards/extensionsStorageBar.js +377 -0
- package/dist/shards/fileInput.js +180 -0
- package/dist/shards/flexContainer.js +30 -0
- package/dist/shards/gridContainer.js +34 -0
- package/dist/shards/{imageShard.js → image.js} +8 -6
- package/dist/shards/index.js +17 -13
- package/dist/shards/{inputShard.js → input.js} +4 -4
- package/dist/shards/{inputListShard.js → inputList.js} +22 -4
- package/dist/shards/select.js +201 -0
- package/dist/shards/svg.js +28 -0
- package/dist/shards/{tabsShard.js → tabs.js} +18 -19
- package/dist/shards/{textShard.js → text.js} +4 -4
- package/dist/shared.js +215 -0
- package/dist/styles.css +0 -51
- package/dist/subscreens/customTranslations.js +239 -0
- package/dist/subscreens/languageDetails.js +194 -0
- package/dist/subscreens/localization.js +115 -0
- package/dist/toast-themes/abdl.js +419 -0
- package/dist/toast-themes/anime.js +483 -0
- package/dist/toast-themes/base.js +40 -0
- package/dist/toast-themes/cyber.js +538 -0
- package/dist/toast-themes/default.js +282 -0
- package/dist/toastThemesDialog.js +274 -0
- package/dist/toasts.js +195 -174
- package/dist/types/cssVars.d.ts +1 -0
- package/dist/types/dialogs.d.ts +46 -18
- package/dist/types/events.d.ts +11 -2
- package/dist/types/global.d.ts +4 -3
- package/dist/types/index.d.ts +12 -19
- package/dist/types/localization.d.ts +25 -3
- package/dist/types/migration.d.ts +6 -0
- package/dist/types/modules/baseModule.d.ts +108 -0
- package/dist/types/modules/index.d.ts +4 -0
- package/dist/types/modules/loadingStrategy.d.ts +7 -0
- package/dist/types/modules/moduleContext.d.ts +9 -0
- package/dist/types/modules/modulesManager.d.ts +23 -0
- package/dist/types/{modSdk.d.ts → patching.d.ts} +2 -3
- package/dist/types/rpc.d.ts +72 -0
- package/dist/types/settings.d.ts +19 -0
- package/dist/types/settingsDialog.d.ts +4 -0
- package/dist/types/shard-modules/{attributesModule.d.ts → attributes.d.ts} +2 -2
- package/dist/types/shard-modules/{shardModule.d.ts → base.d.ts} +2 -2
- package/dist/types/shard-modules/{centerModule.d.ts → center.d.ts} +2 -1
- package/dist/types/shard-modules/{clickModule.d.ts → click.d.ts} +2 -2
- package/dist/types/shard-modules/{counterUpModule.d.ts → counterUp.d.ts} +2 -2
- package/dist/types/shard-modules/{dynamicClassModule.d.ts → dynamicClass.d.ts} +2 -2
- package/dist/types/shard-modules/index.d.ts +9 -9
- package/dist/types/shard-modules/{multiClickModule.d.ts → multiClick.d.ts} +2 -2
- package/dist/types/shard-modules/{styleModule.d.ts → style.d.ts} +2 -2
- package/dist/types/shard-modules/{typeModule.d.ts → type.d.ts} +2 -2
- package/dist/types/shards/{backNextButtonShard.d.ts → backNextButton.d.ts} +4 -3
- package/dist/types/shards/{shard.d.ts → base.d.ts} +3 -2
- package/dist/types/shards/{buttonShard.d.ts → button.d.ts} +6 -6
- package/dist/types/shards/{cardShard.d.ts → card.d.ts} +3 -3
- package/dist/types/shards/{checkboxShard.d.ts → checkbox.d.ts} +5 -5
- package/dist/types/shards/{containerShard.d.ts → container.d.ts} +2 -2
- package/dist/types/shards/extensionsStorageBar.d.ts +28 -0
- package/dist/types/shards/fileInput.d.ts +10 -0
- package/dist/types/shards/flexContainer.d.ts +14 -0
- package/dist/types/shards/gridContainer.d.ts +18 -0
- package/dist/types/shards/{imageShard.d.ts → image.d.ts} +2 -2
- package/dist/types/shards/index.d.ts +17 -13
- package/dist/types/shards/{inputShard.d.ts → input.d.ts} +3 -3
- package/dist/types/shards/{inputListShard.d.ts → inputList.d.ts} +3 -2
- package/dist/types/shards/{selectShard.d.ts → select.d.ts} +6 -4
- package/dist/types/shards/svg.d.ts +11 -0
- package/dist/types/shards/{tabsShard.d.ts → tabs.d.ts} +3 -6
- package/dist/types/shards/{textShard.d.ts → text.d.ts} +3 -3
- package/dist/types/shared.d.ts +7 -0
- package/dist/types/subscreens/customTranslations.d.ts +10 -0
- package/dist/types/subscreens/languageDetails.d.ts +14 -0
- package/dist/types/subscreens/localization.d.ts +5 -0
- package/dist/types/toast-themes/abdl.d.ts +9 -0
- package/dist/types/toast-themes/anime.d.ts +9 -0
- package/dist/types/toast-themes/base.d.ts +39 -0
- package/dist/types/toast-themes/cyber.d.ts +10 -0
- package/dist/types/toast-themes/default.d.ts +9 -0
- package/dist/types/toastThemesDialog.d.ts +1 -0
- package/dist/types/toasts.d.ts +48 -36
- package/dist/types/ui.d.ts +128 -49
- package/dist/types/validation.d.ts +5 -0
- package/dist/ui.js +414 -79
- package/dist/validation.js +79 -1
- package/dist/wardrobe.js +2 -2
- package/package.json +36 -14
- package/dist/core-subscreen/coreSubscreen.js +0 -81
- package/dist/core-subscreen/developmentSubscreen.js +0 -22
- package/dist/core-subscreen/generalSubscreen.js +0 -23
- package/dist/core-subscreen/mainSubscreen.js +0 -58
- package/dist/core-subscreen/shards/coreButtonShard.js +0 -30
- package/dist/core-subscreen/shards/coreCheckboxShard.js +0 -33
- package/dist/core-subscreen/shards/coreInputListShard.js +0 -38
- package/dist/core-subscreen/shards/coreSelectShard.js +0 -17
- package/dist/core-subscreen/shards/coreTextShard.js +0 -9
- package/dist/core-subscreen/shards/index.js +0 -5
- package/dist/core-subscreen/toastsSubscreen.js +0 -111
- package/dist/core.js +0 -192
- package/dist/shards/backNextButtonShard.js +0 -99
- package/dist/shards/selectShard.js +0 -131
- package/dist/shards/svgShard.js +0 -29
- package/dist/types/core-subscreen/coreSubscreen.d.ts +0 -15
- package/dist/types/core-subscreen/developmentSubscreen.d.ts +0 -5
- package/dist/types/core-subscreen/generalSubscreen.d.ts +0 -5
- package/dist/types/core-subscreen/mainSubscreen.d.ts +0 -6
- package/dist/types/core-subscreen/shards/coreButtonShard.d.ts +0 -5
- package/dist/types/core-subscreen/shards/coreCheckboxShard.d.ts +0 -6
- package/dist/types/core-subscreen/shards/coreInputListShard.d.ts +0 -6
- package/dist/types/core-subscreen/shards/coreSelectShard.d.ts +0 -5
- package/dist/types/core-subscreen/shards/coreTextShard.d.ts +0 -4
- package/dist/types/core-subscreen/shards/index.d.ts +0 -5
- package/dist/types/core-subscreen/toastsSubscreen.d.ts +0 -5
- package/dist/types/core.d.ts +0 -18
- package/dist/types/shards/svgShard.d.ts +0 -12
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ModuleContext } from "./moduleContext";
|
|
2
|
+
/**
|
|
3
|
+
* Marks a module class as disabled, preventing its instances from being loaded.
|
|
4
|
+
*
|
|
5
|
+
* Disabled modules cannot be loaded manually or automatically through
|
|
6
|
+
* the ModulesManager.
|
|
7
|
+
*
|
|
8
|
+
* @param constructor - The module class to disable.
|
|
9
|
+
* @returns The original module class.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Disabled<T extends {
|
|
12
|
+
new (...args: any[]): {};
|
|
13
|
+
}>(constructor: T): T;
|
|
14
|
+
export type ModuleConstructor = new (...args: any[]) => BaseModule;
|
|
15
|
+
/**
|
|
16
|
+
* Base class for all modules managed by the ModulesManager.
|
|
17
|
+
*
|
|
18
|
+
* Provides methods for controlling the module lifecycle and methods that
|
|
19
|
+
* can be overridden to implement module-specific behavior.
|
|
20
|
+
*
|
|
21
|
+
* Public lifecycle methods delegate their operations to the ModulesManager.
|
|
22
|
+
* The corresponding on-prefixed methods are called by the ModulesManager.
|
|
23
|
+
*
|
|
24
|
+
* Classes decorated with @Disabled are prevented from being loaded.
|
|
25
|
+
*/
|
|
26
|
+
export declare abstract class BaseModule {
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether this module is allowed to be loaded.
|
|
29
|
+
*
|
|
30
|
+
* Returns false if the module class has been decorated with @Disabled.
|
|
31
|
+
*/
|
|
32
|
+
get enabled(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Requests initialization of this module through the ModulesManager.
|
|
35
|
+
*
|
|
36
|
+
* Calls onInit() once, before the module's first successful load.
|
|
37
|
+
*/
|
|
38
|
+
protected init(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Requests loading of this module through the ModulesManager.
|
|
41
|
+
*
|
|
42
|
+
* The manager creates a ModuleContext and passes it to onLoad().
|
|
43
|
+
*/
|
|
44
|
+
protected load(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Requests unloading of this module through the ModulesManager.
|
|
47
|
+
*
|
|
48
|
+
* The manager calls onUnload() and disposes the module's ModuleContext.
|
|
49
|
+
*/
|
|
50
|
+
protected unload(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Requests a safeword event for this module through the ModulesManager.
|
|
53
|
+
*
|
|
54
|
+
* The manager calls onSafeword() if the module is currently loaded.
|
|
55
|
+
*/
|
|
56
|
+
protected safeword(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Requests reloading of this module through the ModulesManager.
|
|
59
|
+
*
|
|
60
|
+
* The manager unloads the module, calls onReload(), and loads it again.
|
|
61
|
+
*/
|
|
62
|
+
protected reload(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Initializes the module before its first load.
|
|
65
|
+
*
|
|
66
|
+
* Called only once by the ModulesManager.
|
|
67
|
+
* Use this method to prepare resources and register persistent event listeners
|
|
68
|
+
* required by the module.
|
|
69
|
+
*/
|
|
70
|
+
onInit(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Loads the module and activates its functionality.
|
|
73
|
+
*
|
|
74
|
+
* Called whenever the module is loaded.
|
|
75
|
+
* Use this method to enable features, register temporary event listeners,
|
|
76
|
+
* and initialize resources that should remain active only while the module
|
|
77
|
+
* is loaded.
|
|
78
|
+
*
|
|
79
|
+
* @param context - The ModuleContext used to register hooks and patches.
|
|
80
|
+
*/
|
|
81
|
+
onLoad(context: ModuleContext): void;
|
|
82
|
+
/**
|
|
83
|
+
* Unloads the module and deactivates its functionality.
|
|
84
|
+
*
|
|
85
|
+
* Called when the module is unloaded.
|
|
86
|
+
* Use this method to perform module-specific cleanup before the
|
|
87
|
+
* ModuleContext is disposed.
|
|
88
|
+
*/
|
|
89
|
+
onUnload(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Handles a safeword event for the module.
|
|
92
|
+
*
|
|
93
|
+
* Called by the ModulesManager when a safeword event is dispatched
|
|
94
|
+
* to this module.
|
|
95
|
+
* Use this method to immediately stop or safely terminate active
|
|
96
|
+
* module functionality.
|
|
97
|
+
*/
|
|
98
|
+
onSafeword(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Performs module-specific reload operations.
|
|
101
|
+
*
|
|
102
|
+
* Called by the ModulesManager after onUnload() and before onLoad()
|
|
103
|
+
* during a reload operation.
|
|
104
|
+
* Use this method to refresh configuration, recreate resources,
|
|
105
|
+
* or reset internal state.
|
|
106
|
+
*/
|
|
107
|
+
onReload(): void;
|
|
108
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare enum ModuleLoadingStrategy {
|
|
2
|
+
BEFORE_LOGIN = "beforeLogin",
|
|
3
|
+
AFTER_LOGIN = "afterLogin",
|
|
4
|
+
MANUAL = "manual"
|
|
5
|
+
}
|
|
6
|
+
export declare function LoadingStrategy(strategy: ModuleLoadingStrategy): ClassDecorator;
|
|
7
|
+
export declare function getLoadingStrategy(constructor: Function): ModuleLoadingStrategy | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HookPriority } from "../patching";
|
|
2
|
+
export declare class ModuleContext {
|
|
3
|
+
private readonly cleanups;
|
|
4
|
+
private disposed;
|
|
5
|
+
private registerCleanup;
|
|
6
|
+
hookFunction<TFunctionName extends string>(functionName: TFunctionName, priority: HookPriority, hook: PatchHook<GetDotedPathType<typeof globalThis, TFunctionName>>): () => void;
|
|
7
|
+
patchFunction(functionName: string, patches: Record<string, string | null>): () => void;
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseModule } from "./baseModule";
|
|
2
|
+
import { ModuleLoadingStrategy } from "./loadingStrategy";
|
|
3
|
+
export declare class ModulesManager {
|
|
4
|
+
private readonly modules;
|
|
5
|
+
private readonly initialized;
|
|
6
|
+
private readonly loaded;
|
|
7
|
+
private readonly contexts;
|
|
8
|
+
registerModules(): void;
|
|
9
|
+
get<T extends BaseModule>(name: string): Readonly<T> | null;
|
|
10
|
+
getAll(): Readonly<BaseModule>[];
|
|
11
|
+
getLoaded(): Readonly<BaseModule>[];
|
|
12
|
+
isInitialized(name: string): boolean;
|
|
13
|
+
isLoaded(name: string): boolean;
|
|
14
|
+
init(name: string): boolean;
|
|
15
|
+
load(name: string): boolean;
|
|
16
|
+
loadByStrategy(strategy: ModuleLoadingStrategy): void;
|
|
17
|
+
unload(name: string): boolean;
|
|
18
|
+
reload(name: string): boolean;
|
|
19
|
+
safeword(name?: string): void;
|
|
20
|
+
unloadAll(): void;
|
|
21
|
+
reloadAll(): void;
|
|
22
|
+
}
|
|
23
|
+
export declare const modulesManager: ModulesManager;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PatchHook, ModSDKModInfo, GetDotedPathType, ModSDKModAPI } from "bondage-club-mod-sdk";
|
|
2
1
|
export declare enum HookPriority {
|
|
3
2
|
OBSERVE = 0,
|
|
4
3
|
ADD_BEHAVIOR = 1,
|
|
@@ -7,7 +6,7 @@ export declare enum HookPriority {
|
|
|
7
6
|
TOP = 100
|
|
8
7
|
}
|
|
9
8
|
export declare let modSdk: ModSDKModAPI;
|
|
10
|
-
export declare function
|
|
9
|
+
export declare function initModSdk(): void;
|
|
11
10
|
/**
|
|
12
11
|
* Hook a BC function.
|
|
13
12
|
* @template TFunctionName - The name of the hooked function, _e.g._ `"Player.CanChange"`
|
|
@@ -33,7 +32,7 @@ export declare function hookFunction<TFunctionName extends string>(functionName:
|
|
|
33
32
|
* Patches from multiple calls are merged; where key matches the older one is replaced.
|
|
34
33
|
* Specifying value of `null` removes patch with this key.
|
|
35
34
|
*/
|
|
36
|
-
export declare function patchFunction(functionName: string, patches: Record<string, string | null>): void;
|
|
35
|
+
export declare function patchFunction(functionName: string, patches: Record<string, string | null>): () => void;
|
|
37
36
|
/**
|
|
38
37
|
* Call original function, bypassing any hooks and ignoring any patches applied by ALL mods.
|
|
39
38
|
* @template TFunctionName - The name of the called function, _e.g._ `"Player.CanChange"`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BaseModule } from "./modules";
|
|
2
|
+
export interface RPCFunctionMap {
|
|
3
|
+
"getModule": {
|
|
4
|
+
payload: string;
|
|
5
|
+
result: Readonly<BaseModule> | null;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
type RPCFunctionName = Extract<keyof RPCFunctionMap, string>;
|
|
9
|
+
type RPCFunctionPayload<T extends RPCFunctionName> = RPCFunctionMap[T] extends {
|
|
10
|
+
payload: infer P;
|
|
11
|
+
} ? P : never;
|
|
12
|
+
type RPCFunctionResult<T extends RPCFunctionName> = RPCFunctionMap[T] extends {
|
|
13
|
+
result: infer R;
|
|
14
|
+
} ? R : never;
|
|
15
|
+
type RPCFunctionAddress = `${string}:${RPCFunctionName}`;
|
|
16
|
+
type RPCFunctionNameFromAddress<T extends RPCFunctionAddress> = T extends `${string}:${infer N}` ? Extract<N, RPCFunctionName> : never;
|
|
17
|
+
type RPCCallArguments<T extends RPCFunctionName> = [
|
|
18
|
+
RPCFunctionPayload<T>
|
|
19
|
+
] extends [void] ? [payload?: undefined, timeoutMs?: number] : [payload: RPCFunctionPayload<T>, timeoutMs?: number];
|
|
20
|
+
export declare class RPCBus {
|
|
21
|
+
#private;
|
|
22
|
+
private readonly endpoints;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the unique identifier of this RPC bus.
|
|
25
|
+
*/
|
|
26
|
+
get id(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an RPC bus instance.
|
|
29
|
+
*
|
|
30
|
+
* @param id - Unique addon identifier.
|
|
31
|
+
*/
|
|
32
|
+
constructor(id: string);
|
|
33
|
+
/**
|
|
34
|
+
* Registers a remote function that can be called by other addons.
|
|
35
|
+
*
|
|
36
|
+
* The function name and its payload and result types must be
|
|
37
|
+
* declared in RPCFunctionMap.
|
|
38
|
+
*
|
|
39
|
+
* @param name - Name of the remote function.
|
|
40
|
+
* @param handler - Function executed when a remote call is received.
|
|
41
|
+
* @returns A function that unregisters the remote function.
|
|
42
|
+
* @throws {Error} If the function name is invalid or already registered.
|
|
43
|
+
*/
|
|
44
|
+
expose<T extends RPCFunctionName>(name: T, handler: (payload: RPCFunctionPayload<T>, sender: string) => RPCFunctionResult<T> | Promise<RPCFunctionResult<T>>): () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Calls a remote function registered by another addon.
|
|
47
|
+
*
|
|
48
|
+
* The address must follow the "addon_key:functionName" format.
|
|
49
|
+
* Payload and result types are inferred from RPCFunctionMap.
|
|
50
|
+
*
|
|
51
|
+
* @param address - Addon identifier and function name.
|
|
52
|
+
* @param args - Function payload and optional timeout in milliseconds.
|
|
53
|
+
* @returns A promise containing the remote function result.
|
|
54
|
+
* @throws {Error} If the address is invalid, the addon or function
|
|
55
|
+
* cannot be found, or the call times out.
|
|
56
|
+
*/
|
|
57
|
+
call<TAddress extends RPCFunctionAddress>(address: TAddress, ...args: RPCCallArguments<RPCFunctionNameFromAddress<TAddress>>): Promise<RPCFunctionResult<RPCFunctionNameFromAddress<TAddress>>>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Creates and registers a new RPC bus for an addon.
|
|
61
|
+
*
|
|
62
|
+
* Each addon identifier can only be registered once.
|
|
63
|
+
*
|
|
64
|
+
* @param id - Unique addon identifier.
|
|
65
|
+
* @returns A new RPCBus instance.
|
|
66
|
+
* @throws {Error} If the identifier is empty, contains a colon,
|
|
67
|
+
* or has already been registered.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getRPCBus(id: string): RPCBus;
|
|
70
|
+
export declare let rpcBus: RPCBus | null;
|
|
71
|
+
export declare function initRPCBus(): void;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Anchor } from "./ui";
|
|
2
|
+
export interface CoreSettings {
|
|
3
|
+
devMode?: boolean;
|
|
4
|
+
toasts?: {
|
|
5
|
+
position?: Anchor;
|
|
6
|
+
scaleFactor?: number;
|
|
7
|
+
blacklist?: {
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
content?: string[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
autoConnectToDevBackendServer?: boolean;
|
|
13
|
+
allowReplaceModSdk?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function registerSettingsSubscreen(): void;
|
|
16
|
+
export declare function unloadSettingsSubscreen(): void;
|
|
17
|
+
export declare function getSettings(): CoreSettings;
|
|
18
|
+
export declare function setSettings(data: CoreSettings | ((prev: CoreSettings) => CoreSettings)): void;
|
|
19
|
+
export declare function resetSettings(): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type CoreSettingsSection = "general" | "toasts" | "development" | "dependents" | null;
|
|
2
|
+
export declare function createSettingsDialog(): HTMLDialogElement;
|
|
3
|
+
export declare function openCoreSettingsDialog(): HTMLDialogElement;
|
|
4
|
+
export declare function closeCoreSettingsDialog(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
export declare class AttributesModule extends ShardModule {
|
|
4
4
|
private attributes;
|
|
5
5
|
constructor(attributes: Record<string, string>);
|
|
6
|
-
|
|
6
|
+
beforeMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import { ShardContext } from "../shards";
|
|
|
2
2
|
export type ShardModuleTarget = HTMLElement | SVGElement;
|
|
3
3
|
export declare abstract class ShardModule<Context extends ShardContext = ShardContext> {
|
|
4
4
|
overrideContext(context: Context, target: ShardModuleTarget): Context;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
beforeMount(context: Context, target: ShardModuleTarget): void;
|
|
6
|
+
onMount(context: Context, target: ShardModuleTarget): void;
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
export declare class CenterModule extends ShardModule<ShardContext> {
|
|
4
4
|
overrideContext(context: ShardContext, target: HTMLElement): ShardContext;
|
|
5
|
+
beforeMount(context: ShardContext<never>, target: ShardModuleTarget): void;
|
|
5
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
export declare class ClickModule extends ShardModule {
|
|
4
4
|
private callback;
|
|
5
5
|
constructor(callback: (target: ShardModuleTarget) => void);
|
|
6
|
-
|
|
6
|
+
beforeMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
interface CounterUpModuleProps {
|
|
4
4
|
duration: number;
|
|
5
5
|
endValue: number;
|
|
@@ -8,6 +8,6 @@ interface CounterUpModuleProps {
|
|
|
8
8
|
export declare class CounterUpModule extends ShardModule {
|
|
9
9
|
private props;
|
|
10
10
|
constructor(props: CounterUpModuleProps);
|
|
11
|
-
|
|
11
|
+
onMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DynamicClassStyles } from "../ui";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
import { ShardContext } from "../shards";
|
|
4
4
|
export declare class DynamicClassModule extends ShardModule {
|
|
5
5
|
private style;
|
|
6
6
|
constructor(style: DynamicClassStyles);
|
|
7
|
-
|
|
7
|
+
beforeMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
1
|
+
export * from "./base";
|
|
2
|
+
export * from "./center";
|
|
3
|
+
export * from "./counterUp";
|
|
4
|
+
export * from "./type";
|
|
5
|
+
export * from "./style";
|
|
6
|
+
export * from "./dynamicClass";
|
|
7
|
+
export * from "./attributes";
|
|
8
|
+
export * from "./click";
|
|
9
|
+
export * from "./multiClick";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
interface MultiClickModuleProps {
|
|
4
4
|
n: number;
|
|
5
5
|
callback: () => void;
|
|
@@ -7,6 +7,6 @@ interface MultiClickModuleProps {
|
|
|
7
7
|
export declare class MultiClickModule extends ShardModule<ShardContext> {
|
|
8
8
|
private readonly props;
|
|
9
9
|
constructor(props: MultiClickModuleProps);
|
|
10
|
-
|
|
10
|
+
onMount(context: ShardContext<never>, target: ShardModuleTarget): void;
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
export declare class StyleModule extends ShardModule {
|
|
4
4
|
private style;
|
|
5
5
|
constructor(style: Partial<CSSStyleDeclaration>);
|
|
6
6
|
private applyStyle;
|
|
7
|
-
|
|
7
|
+
beforeMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ShardContext } from "../shards";
|
|
2
|
-
import { ShardModule, ShardModuleTarget } from "./
|
|
2
|
+
import { ShardModule, ShardModuleTarget } from "./base";
|
|
3
3
|
interface TypeModuleProps {
|
|
4
4
|
duration: number;
|
|
5
5
|
}
|
|
6
6
|
export declare class TypeModule extends ShardModule {
|
|
7
7
|
private readonly props;
|
|
8
8
|
constructor(props: TypeModuleProps);
|
|
9
|
-
|
|
9
|
+
onMount(context: ShardContext, target: ShardModuleTarget): void;
|
|
10
10
|
}
|
|
11
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DynamicClassStyles } from "../ui";
|
|
2
|
-
import { Shard, ShardContext } from "./
|
|
2
|
+
import { Shard, ShardContext } from "./base";
|
|
3
3
|
export interface BackNextButtonShardContext extends ShardContext<"backButton" | "nextButton" | "text"> {
|
|
4
4
|
items: [string, any?][];
|
|
5
5
|
currentIndex: number;
|
|
@@ -9,6 +9,7 @@ export interface BackNextButtonShardContext extends ShardContext<"backButton" |
|
|
|
9
9
|
export declare class BackNextButtonShard extends Shard<BackNextButtonShardContext> {
|
|
10
10
|
protected get dynamicClassContainer(): DynamicClassStyles;
|
|
11
11
|
protected get dynamicClassButton(): DynamicClassStyles;
|
|
12
|
-
protected
|
|
13
|
-
protected
|
|
12
|
+
protected get dynamicClassValueContainer(): DynamicClassStyles;
|
|
13
|
+
protected render(): Record<keyof NonNullable<BackNextButtonShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
14
|
+
protected setContextStyles(): void;
|
|
14
15
|
}
|
|
@@ -16,7 +16,8 @@ export declare abstract class Shard<Context extends ShardContext = ShardContext>
|
|
|
16
16
|
protected get mountReturnValue(): HTMLElement | SVGElement;
|
|
17
17
|
constructor(context: Context);
|
|
18
18
|
mount(parentElement?: HTMLElement): HTMLElement | SVGElement;
|
|
19
|
-
|
|
19
|
+
unmount(): void;
|
|
20
|
+
protected abstract render(): Record<keyof NonNullable<Context["modules"]>, HTMLElement | SVGElement>;
|
|
20
21
|
protected processModules(stage: "overrideContext" | "layoutEffect" | "effect"): void;
|
|
21
|
-
protected
|
|
22
|
+
protected setContextStyles(): void;
|
|
22
23
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { DynamicClassStyles } from "../ui";
|
|
2
|
-
import { Shard, ShardContext } from "./
|
|
2
|
+
import { Shard, ShardContext } from "./base";
|
|
3
3
|
export interface ButtonShardContext extends ShardContext<"icon" | "text"> {
|
|
4
4
|
text?: string;
|
|
5
5
|
fontSize?: number | "auto";
|
|
6
|
-
variant?: "outlined" | "filled";
|
|
6
|
+
variant?: "outlined" | "filled" | "playful";
|
|
7
7
|
icon?: string | SVGElement;
|
|
8
8
|
iconAbsolutePosition?: boolean;
|
|
9
9
|
tooltip?: {
|
|
10
10
|
text: string;
|
|
11
|
-
|
|
12
|
-
};
|
|
11
|
+
icon?: SVGElement | HTMLImageElement;
|
|
12
|
+
}[];
|
|
13
13
|
href?: string;
|
|
14
14
|
onClick?: () => void;
|
|
15
15
|
isDisabled?: () => boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare class ButtonShard extends Shard<ButtonShardContext> {
|
|
18
18
|
protected get dynamicClassButton(): DynamicClassStyles;
|
|
19
|
-
protected
|
|
20
|
-
protected
|
|
19
|
+
protected render(): Record<keyof NonNullable<ButtonShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
20
|
+
protected setContextStyles(): void;
|
|
21
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Shard, ShardContext } from "./
|
|
1
|
+
import { Shard, ShardContext } from "./base";
|
|
2
2
|
export interface CardShardContext extends ShardContext<"base" | "name" | "value" | "icon"> {
|
|
3
3
|
name: string;
|
|
4
4
|
value: string | number;
|
|
5
5
|
icon?: SVGElement;
|
|
6
6
|
}
|
|
7
7
|
export declare class CardShard extends Shard<CardShardContext> {
|
|
8
|
-
protected
|
|
9
|
-
protected
|
|
8
|
+
protected render(): Record<keyof NonNullable<CardShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
9
|
+
protected setContextStyles(): void;
|
|
10
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DynamicClassStyles } from "../ui";
|
|
2
|
-
import { Shard, ShardContext } from "./
|
|
2
|
+
import { Shard, ShardContext } from "./base";
|
|
3
3
|
export interface CheckboxShardContext extends ShardContext<"checkbox" | "label"> {
|
|
4
4
|
isChecked: boolean;
|
|
5
5
|
text: string;
|
|
6
6
|
tooltip?: {
|
|
7
|
-
position: "left" | "right";
|
|
8
7
|
text: string;
|
|
9
|
-
|
|
8
|
+
icon?: SVGElement | HTMLImageElement;
|
|
9
|
+
}[];
|
|
10
10
|
onChange?: () => void;
|
|
11
11
|
isDisabled?: () => boolean;
|
|
12
12
|
}
|
|
@@ -16,6 +16,6 @@ export declare class CheckboxShard extends Shard<CheckboxShardContext> {
|
|
|
16
16
|
protected get dynamicClassTooltip(): DynamicClassStyles;
|
|
17
17
|
protected get dynamicClassBox(): DynamicClassStyles;
|
|
18
18
|
protected get textColor(): string;
|
|
19
|
-
protected
|
|
20
|
-
protected
|
|
19
|
+
protected render(): Record<keyof NonNullable<CheckboxShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
20
|
+
protected setContextStyles(): void;
|
|
21
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DynamicClassStyles } from "../ui";
|
|
2
|
-
import { Shard, ShardContext } from "./
|
|
2
|
+
import { Shard, ShardContext } from "./base";
|
|
3
3
|
export interface ContainerShardContext extends ShardContext<"content" | "scrollbar"> {
|
|
4
4
|
scroll?: "x" | "y" | "all" | "none" | "auto";
|
|
5
5
|
}
|
|
6
6
|
export declare class ContainerShard extends Shard<ContainerShardContext> {
|
|
7
7
|
protected get dynamicClassContainer(): DynamicClassStyles;
|
|
8
8
|
protected get mountReturnValue(): HTMLElement | SVGElement | null;
|
|
9
|
-
protected
|
|
9
|
+
protected render(): Record<keyof NonNullable<ContainerShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
10
10
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DynamicClassStyles } from "../ui";
|
|
2
|
+
import { Shard, ShardContext } from "./base";
|
|
3
|
+
export declare const EXTENSION_SETTINGS_LIMIT_BYTES: number;
|
|
4
|
+
export interface ExtensionStorageEntry {
|
|
5
|
+
key: string;
|
|
6
|
+
bytes: number;
|
|
7
|
+
isFocus: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ExtensionsStorageBarShardContext extends ShardContext<"bar" | "tooltip" | "summary" | "legend"> {
|
|
10
|
+
modKey: string;
|
|
11
|
+
tooltipPosition?: "left" | "right";
|
|
12
|
+
}
|
|
13
|
+
export declare class ExtensionsStorageBarShard extends Shard<ExtensionsStorageBarShardContext> {
|
|
14
|
+
protected get dynamicClassRoot(): DynamicClassStyles;
|
|
15
|
+
protected get dynamicClassColumn(): DynamicClassStyles;
|
|
16
|
+
protected get dynamicClassBar(): DynamicClassStyles;
|
|
17
|
+
protected get dynamicClassLegend(): DynamicClassStyles;
|
|
18
|
+
protected get dynamicClassSummary(): DynamicClassStyles;
|
|
19
|
+
protected get dynamicClassTooltip(): DynamicClassStyles;
|
|
20
|
+
protected get dynamicClassSide(): DynamicClassStyles;
|
|
21
|
+
protected render(): {
|
|
22
|
+
base: HTMLDivElement;
|
|
23
|
+
bar: HTMLDivElement;
|
|
24
|
+
tooltip: HTMLDivElement;
|
|
25
|
+
summary: HTMLDivElement;
|
|
26
|
+
legend: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./base";
|
|
2
|
+
export interface FileInputShardContext extends ShardContext {
|
|
3
|
+
title: string;
|
|
4
|
+
accept?: string;
|
|
5
|
+
onFile?: (file: File) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare class FileInputShard extends Shard<FileInputShardContext> {
|
|
8
|
+
protected render(): Record<keyof NonNullable<FileInputShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
9
|
+
protected setContextStyles(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ContainerShard, ContainerShardContext } from "./container";
|
|
2
|
+
export interface FlexContainerShardContext extends ContainerShardContext {
|
|
3
|
+
direction?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
4
|
+
wrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
5
|
+
gap?: number;
|
|
6
|
+
rowGap?: number;
|
|
7
|
+
columnGap?: number;
|
|
8
|
+
alignItems?: "normal" | "stretch" | "center" | "start" | "end" | "flex-start" | "flex-end" | "baseline";
|
|
9
|
+
alignContent?: "normal" | "stretch" | "center" | "start" | "end" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
10
|
+
justifyContent?: "normal" | "center" | "start" | "end" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
11
|
+
}
|
|
12
|
+
export declare class FlexContainerShard extends ContainerShard {
|
|
13
|
+
constructor(context: FlexContainerShardContext);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ContainerShard, ContainerShardContext } from "./container";
|
|
2
|
+
export interface GridContainerShardContext extends ContainerShardContext {
|
|
3
|
+
templateColumns?: string;
|
|
4
|
+
templateRows?: string;
|
|
5
|
+
autoColumns?: string;
|
|
6
|
+
autoRows?: string;
|
|
7
|
+
autoFlow?: "row" | "column" | "dense" | "row dense" | "column dense";
|
|
8
|
+
gap?: number;
|
|
9
|
+
rowGap?: number;
|
|
10
|
+
columnGap?: number;
|
|
11
|
+
alignItems?: "normal" | "stretch" | "center" | "start" | "end";
|
|
12
|
+
alignContent?: "normal" | "stretch" | "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
13
|
+
justifyItems?: "legacy" | "normal" | "stretch" | "center" | "start" | "end";
|
|
14
|
+
justifyContent?: "normal" | "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
15
|
+
}
|
|
16
|
+
export declare class GridContainerShard extends ContainerShard {
|
|
17
|
+
constructor(context: GridContainerShardContext);
|
|
18
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Shard, ShardContext } from "./
|
|
1
|
+
import { Shard, ShardContext } from "./base";
|
|
2
2
|
export interface ImageShardContext extends ShardContext {
|
|
3
3
|
src: string;
|
|
4
4
|
alt?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare class ImageShard extends Shard<ImageShardContext> {
|
|
7
7
|
private modal;
|
|
8
|
-
protected
|
|
8
|
+
protected render(): Record<keyof NonNullable<ImageShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
9
9
|
private openModal;
|
|
10
10
|
private closeModal;
|
|
11
11
|
}
|