zois-core 1.2.1 → 2.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/README.md +23 -2
- package/dist/changelogs.js +167 -0
- package/dist/core-subscreen/coreSubscreen.js +81 -0
- package/dist/core-subscreen/developmentSubscreen.js +22 -0
- package/dist/core-subscreen/generalSubscreen.js +23 -0
- package/dist/core-subscreen/mainSubscreen.js +58 -0
- package/dist/core-subscreen/shards/coreButtonShard.js +30 -0
- package/dist/core-subscreen/shards/coreCheckboxShard.js +33 -0
- package/dist/core-subscreen/shards/coreInputListShard.js +38 -0
- package/dist/core-subscreen/shards/coreSelectShard.js +17 -0
- package/dist/core-subscreen/shards/coreTextShard.js +9 -0
- package/dist/core-subscreen/shards/index.js +5 -0
- package/dist/core-subscreen/toastsSubscreen.js +112 -0
- package/dist/core.js +178 -0
- package/dist/dialogs.js +110 -0
- package/dist/index.js +202 -1
- package/dist/localization.js +71 -0
- package/dist/logging.js +31 -0
- package/dist/messaging.js +234 -1
- package/dist/modSdk.js +63 -0
- package/dist/shard-modules/attributesModule.js +16 -0
- package/dist/shard-modules/centerModule.js +12 -0
- package/dist/shard-modules/clickModule.js +14 -0
- package/dist/shard-modules/counterUpModule.js +37 -0
- package/dist/shard-modules/dynamicClassModule.js +15 -0
- package/dist/shard-modules/index.js +9 -0
- package/dist/shard-modules/multiClickModule.js +41 -0
- package/dist/shard-modules/shardModule.js +12 -0
- package/dist/shard-modules/styleModule.js +20 -0
- package/dist/shard-modules/typeModule.js +37 -0
- package/dist/shards/backNextButtonShard.js +99 -0
- package/dist/shards/buttonShard.js +118 -0
- package/dist/shards/cardShard.js +35 -0
- package/dist/shards/checkboxShard.js +139 -0
- package/dist/shards/containerShard.js +16 -0
- package/dist/shards/imageShard.js +98 -0
- package/dist/shards/index.js +13 -0
- package/dist/shards/inputListShard.js +162 -0
- package/dist/shards/inputShard.js +33 -0
- package/dist/shards/selectShard.js +126 -0
- package/dist/shards/shard.js +79 -0
- package/dist/shards/svgShard.js +47 -0
- package/dist/shards/tabsShard.js +59 -0
- package/dist/shards/textShard.js +27 -0
- package/dist/styles.css +209 -1
- package/dist/toasts.js +188 -0
- package/dist/types/changelogs.d.ts +1 -0
- package/dist/types/core-subscreen/coreSubscreen.d.ts +15 -0
- package/dist/types/core-subscreen/developmentSubscreen.d.ts +5 -0
- package/dist/types/core-subscreen/generalSubscreen.d.ts +5 -0
- package/dist/types/core-subscreen/mainSubscreen.d.ts +6 -0
- package/dist/types/core-subscreen/shards/coreButtonShard.d.ts +5 -0
- package/dist/types/core-subscreen/shards/coreCheckboxShard.d.ts +6 -0
- package/dist/types/core-subscreen/shards/coreInputListShard.d.ts +6 -0
- package/dist/types/core-subscreen/shards/coreSelectShard.d.ts +5 -0
- package/dist/types/core-subscreen/shards/coreTextShard.d.ts +4 -0
- package/dist/types/core-subscreen/shards/index.d.ts +5 -0
- package/dist/types/core-subscreen/toastsSubscreen.d.ts +5 -0
- package/dist/types/core.d.ts +18 -0
- package/dist/types/dialogs.d.ts +29 -0
- package/dist/types/index.d.ts +55 -5
- package/dist/types/localization.d.ts +4 -0
- package/dist/types/logging.d.ts +16 -0
- package/dist/types/messaging.d.ts +5 -3
- package/dist/types/{modsApi.d.ts → modSdk.d.ts} +2 -2
- package/dist/types/shard-modules/attributesModule.d.ts +7 -0
- package/dist/types/shard-modules/centerModule.d.ts +5 -0
- package/dist/types/shard-modules/clickModule.d.ts +7 -0
- package/dist/types/shard-modules/counterUpModule.d.ts +13 -0
- package/dist/types/shard-modules/dynamicClassModule.d.ts +8 -0
- package/dist/types/{ui-modules → shard-modules}/index.d.ts +2 -0
- package/dist/types/shard-modules/multiClickModule.d.ts +12 -0
- package/dist/types/shard-modules/shardModule.d.ts +7 -0
- package/dist/types/shard-modules/styleModule.d.ts +8 -0
- package/dist/types/shard-modules/typeModule.d.ts +11 -0
- package/dist/types/shards/backNextButtonShard.d.ts +14 -0
- package/dist/types/shards/buttonShard.d.ts +20 -0
- package/dist/types/shards/cardShard.d.ts +10 -0
- package/dist/types/shards/checkboxShard.d.ts +19 -0
- package/dist/types/shards/containerShard.d.ts +7 -0
- package/dist/types/shards/imageShard.d.ts +11 -0
- package/dist/types/shards/index.d.ts +13 -0
- package/dist/types/shards/inputListShard.d.ts +16 -0
- package/dist/types/shards/inputShard.d.ts +14 -0
- package/dist/types/shards/selectShard.d.ts +17 -0
- package/dist/types/shards/shard.d.ts +21 -0
- package/dist/types/shards/svgShard.d.ts +12 -0
- package/dist/types/shards/tabsShard.d.ts +17 -0
- package/dist/types/shards/textShard.d.ts +13 -0
- package/dist/types/toasts.d.ts +21 -0
- package/dist/types/ui.d.ts +27 -147
- package/dist/ui.js +351 -11
- package/dist/validation.js +31 -1
- package/dist/wardrobe.js +167 -1
- package/package.json +44 -26
- package/scripts/generateChangelog.mjs +80 -0
- package/dist/modsApi.js +0 -1
- package/dist/modules.js +0 -1
- package/dist/popups.js +0 -1
- package/dist/types/modules.d.ts +0 -18
- package/dist/types/popups.d.ts +0 -63
- package/dist/types/ui-modules/attributesModule.d.ts +0 -6
- package/dist/types/ui-modules/centerModule.d.ts +0 -4
- package/dist/types/ui-modules/clickModule.d.ts +0 -6
- package/dist/types/ui-modules/counterUpModule.d.ts +0 -12
- package/dist/types/ui-modules/dynamicClassModule.d.ts +0 -7
- package/dist/types/ui-modules/styleModule.d.ts +0 -7
- package/dist/types/ui-modules/typeModule.d.ts +0 -10
- package/dist/ui-modules/attributesModule.js +0 -1
- package/dist/ui-modules/centerModule.js +0 -1
- package/dist/ui-modules/clickModule.js +0 -1
- package/dist/ui-modules/counterUpModule.js +0 -1
- package/dist/ui-modules/dynamicClassModule.js +0 -1
- package/dist/ui-modules/index.js +0 -1
- package/dist/ui-modules/styleModule.js +0 -1
- package/dist/ui-modules/typeModule.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./shard";
|
|
2
|
+
export interface ImageShardContext extends ShardContext {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class ImageShard extends Shard<ImageShardContext> {
|
|
7
|
+
private modal;
|
|
8
|
+
generateBody(): Record<keyof NonNullable<ImageShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
9
|
+
private openModal;
|
|
10
|
+
private closeModal;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./backNextButtonShard";
|
|
2
|
+
export * from "./buttonShard";
|
|
3
|
+
export * from "./cardShard";
|
|
4
|
+
export * from "./checkboxShard";
|
|
5
|
+
export * from "./containerShard";
|
|
6
|
+
export * from "./imageShard";
|
|
7
|
+
export * from "./inputListShard";
|
|
8
|
+
export * from "./inputShard";
|
|
9
|
+
export * from "./selectShard";
|
|
10
|
+
export * from "./shard";
|
|
11
|
+
export * from "./svgShard";
|
|
12
|
+
export * from "./tabsShard";
|
|
13
|
+
export * from "./textShard";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DynamicClassStyles } from "../ui";
|
|
2
|
+
import { Shard, ShardContext } from "./shard";
|
|
3
|
+
export interface InputListShardContext<V extends number | string = number | string> extends ShardContext<"input"> {
|
|
4
|
+
value?: V[];
|
|
5
|
+
title?: string;
|
|
6
|
+
fontSize?: number | "auto";
|
|
7
|
+
numbersOnly?: boolean;
|
|
8
|
+
onChange?: (value: V[]) => void;
|
|
9
|
+
isDisabled?: () => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class InputListShard extends Shard<InputListShardContext> {
|
|
12
|
+
protected get dynamicClassContainer(): DynamicClassStyles;
|
|
13
|
+
protected get dynamicClassInput(): DynamicClassStyles;
|
|
14
|
+
protected get dynamicClassToolsButton(): DynamicClassStyles;
|
|
15
|
+
generateBody(): Record<keyof NonNullable<InputListShardContext<number | string>["modules"]>, HTMLElement | SVGElement>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./shard";
|
|
2
|
+
export interface InputShardContext extends ShardContext {
|
|
3
|
+
value?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
textArea?: boolean;
|
|
6
|
+
fontSize?: number | "auto";
|
|
7
|
+
onChange?: () => void;
|
|
8
|
+
onInput?: () => void;
|
|
9
|
+
isDisabled?: () => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class InputShard extends Shard<InputShardContext> {
|
|
12
|
+
generateBody(): Record<keyof NonNullable<InputShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
13
|
+
update(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DynamicClassStyles } from "../ui";
|
|
2
|
+
import { Shard, ShardContext } from "./shard";
|
|
3
|
+
export interface SelectShardContext extends Omit<ShardContext, "height"> {
|
|
4
|
+
options: {
|
|
5
|
+
name: string;
|
|
6
|
+
text: string;
|
|
7
|
+
icon?: SVGElement;
|
|
8
|
+
}[];
|
|
9
|
+
currentOption: string;
|
|
10
|
+
onChange?: (name: any) => void;
|
|
11
|
+
isDisabled?: () => boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class SelectShard extends Shard<SelectShardContext> {
|
|
14
|
+
protected get dynamicClassContainer(): DynamicClassStyles;
|
|
15
|
+
generateBody(): Record<keyof NonNullable<SelectShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
16
|
+
update(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ShardModule } from "../shard-modules";
|
|
2
|
+
import { Anchor } from "../ui";
|
|
3
|
+
export interface ShardContext<T extends string = never> {
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
anchor?: Anchor;
|
|
7
|
+
padding?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
parent?: HTMLElement;
|
|
11
|
+
modules?: Partial<Record<T | "base", ShardModule[]>>;
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class Shard<Context extends ShardContext = ShardContext> {
|
|
14
|
+
protected context: Context;
|
|
15
|
+
protected body: Record<keyof NonNullable<Context["modules"]>, HTMLElement | SVGElement> | null;
|
|
16
|
+
constructor(context: Context);
|
|
17
|
+
mount(parentElement?: HTMLElement): HTMLElement | SVGElement;
|
|
18
|
+
protected abstract generateBody(): Record<keyof NonNullable<Context["modules"]>, HTMLElement | SVGElement>;
|
|
19
|
+
protected processModules(stage: "overrideContext" | "layoutEffect" | "effect"): void;
|
|
20
|
+
protected update(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./shard";
|
|
2
|
+
export interface SvgShardContext extends ShardContext {
|
|
3
|
+
dataurl: string;
|
|
4
|
+
size: number;
|
|
5
|
+
fill?: string;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
strokeWidth?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class SvgShard extends Shard<SvgShardContext> {
|
|
10
|
+
generateBody(): Record<keyof NonNullable<SvgShardContext["modules"]>, SVGElement>;
|
|
11
|
+
update(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./shard";
|
|
2
|
+
export interface TabsShardContext extends Omit<ShardContext, "height"> {
|
|
3
|
+
tabs: {
|
|
4
|
+
name: string;
|
|
5
|
+
load?: () => void;
|
|
6
|
+
unload?: () => void;
|
|
7
|
+
run?: () => void;
|
|
8
|
+
exit?: () => void;
|
|
9
|
+
}[];
|
|
10
|
+
currentTabName: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class TabsShard extends Shard<TabsShardContext> {
|
|
13
|
+
private tabHandlers;
|
|
14
|
+
constructor(context: TabsShardContext);
|
|
15
|
+
generateBody(): Record<keyof NonNullable<TabsShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
16
|
+
update(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Shard, ShardContext } from "./shard";
|
|
2
|
+
export interface TextShardContext extends ShardContext {
|
|
3
|
+
text?: string;
|
|
4
|
+
fontSize?: number | "auto";
|
|
5
|
+
color?: string;
|
|
6
|
+
withBackground?: boolean;
|
|
7
|
+
withBorder?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class TextShard extends Shard<TextShardContext> {
|
|
10
|
+
protected get defaultColor(): string;
|
|
11
|
+
generateBody(): Record<keyof NonNullable<TextShardContext["modules"]>, HTMLElement | SVGElement>;
|
|
12
|
+
update(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ModData } from "./index";
|
|
2
|
+
interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: "info" | "warning" | "error" | "success" | "spinner";
|
|
7
|
+
duration: number;
|
|
8
|
+
theme?: ModData["singleToastsTheme"];
|
|
9
|
+
}
|
|
10
|
+
export declare class ToastsManager {
|
|
11
|
+
private generateToastId;
|
|
12
|
+
private process;
|
|
13
|
+
info({ title, message, duration }: Omit<Toast, "type" | "id" | "theme">): void;
|
|
14
|
+
success({ title, message, duration }: Omit<Toast, "type" | "id" | "theme">): void;
|
|
15
|
+
warn({ title, message, duration }: Omit<Toast, "type" | "id" | "theme">): void;
|
|
16
|
+
error({ title, message, duration }: Omit<Toast, "type" | "id" | "theme">): void;
|
|
17
|
+
spinner({ title, message }: Omit<Toast, "type" | "id" | "duration" | "theme">): string;
|
|
18
|
+
removeSpinner(id: string): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const toastsManager: ToastsManager;
|
|
21
|
+
export {};
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -1,124 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TabsShardContext, ButtonShardContext, TextShardContext, InputShardContext, CheckboxShardContext, InputListShardContext, ImageShardContext, SvgShardContext, BackNextButtonShardContext, CardShardContext, SelectShardContext, ContainerShardContext, Shard } from "./shards";
|
|
2
2
|
export type Anchor = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
3
|
-
|
|
4
|
-
x?: number;
|
|
5
|
-
y?: number;
|
|
6
|
-
anchor?: Anchor;
|
|
7
|
-
place?: boolean;
|
|
8
|
-
modules?: Partial<Record<T, BaseModule[]>>;
|
|
9
|
-
}
|
|
10
|
-
interface CreateButtonArgs extends BaseElementArgs<"base" | "icon" | "text"> {
|
|
11
|
-
text?: string;
|
|
12
|
-
fontSize?: number | "auto";
|
|
13
|
-
width?: number;
|
|
14
|
-
height?: number;
|
|
15
|
-
padding?: number;
|
|
16
|
-
style?: "default" | "green" | "inverted";
|
|
17
|
-
icon?: string | SVGElement;
|
|
18
|
-
iconAbsolutePosition?: boolean;
|
|
19
|
-
tooltip?: {
|
|
20
|
-
text: string;
|
|
21
|
-
position: "left" | "right";
|
|
22
|
-
};
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
isDisabled?: () => boolean;
|
|
25
|
-
}
|
|
26
|
-
interface CreateTextArgs extends BaseElementArgs<"base"> {
|
|
27
|
-
text?: string;
|
|
28
|
-
color?: string;
|
|
29
|
-
fontSize?: number | "auto";
|
|
30
|
-
withBackground?: boolean;
|
|
31
|
-
withBorder?: boolean;
|
|
32
|
-
width?: number;
|
|
33
|
-
height?: number;
|
|
34
|
-
padding?: number;
|
|
35
|
-
}
|
|
36
|
-
interface CreateInputArgs extends BaseElementArgs<"base"> {
|
|
37
|
-
value?: string;
|
|
38
|
-
placeholder?: string;
|
|
39
|
-
width: number;
|
|
40
|
-
height?: number;
|
|
41
|
-
textArea?: boolean;
|
|
42
|
-
fontSize?: number | "auto";
|
|
43
|
-
padding?: number;
|
|
44
|
-
onChange?: () => void;
|
|
45
|
-
onInput?: () => void;
|
|
46
|
-
isDisabled?: () => boolean;
|
|
47
|
-
}
|
|
48
|
-
interface CreateCheckboxArgs extends BaseElementArgs<"base" | "checkbox" | "label"> {
|
|
49
|
-
isChecked: boolean;
|
|
50
|
-
width?: number;
|
|
51
|
-
text: string;
|
|
52
|
-
onChange?: () => void;
|
|
53
|
-
isDisabled?: () => boolean;
|
|
54
|
-
}
|
|
55
|
-
interface CreateScrollViewArgs extends BaseElementArgs<"base"> {
|
|
56
|
-
scroll: "x" | "y" | "all";
|
|
57
|
-
width: number;
|
|
58
|
-
height?: number;
|
|
59
|
-
}
|
|
60
|
-
interface CreateInputListArgs extends BaseElementArgs<"base" | "input"> {
|
|
61
|
-
value?: string[] | number[];
|
|
62
|
-
title?: string;
|
|
63
|
-
width: number;
|
|
64
|
-
height?: number;
|
|
65
|
-
fontSize?: number | "auto";
|
|
66
|
-
padding?: number;
|
|
67
|
-
numbersOnly?: boolean;
|
|
68
|
-
onChange?: (value: string[] | number[]) => void;
|
|
69
|
-
isDisabled?: () => boolean;
|
|
70
|
-
}
|
|
71
|
-
interface CreateImageArgs extends BaseElementArgs<"base"> {
|
|
72
|
-
src: string;
|
|
73
|
-
width: number;
|
|
74
|
-
}
|
|
75
|
-
interface CreateSvgArgs extends BaseElementArgs<"base"> {
|
|
76
|
-
dataurl: string;
|
|
77
|
-
size: number;
|
|
78
|
-
fill?: string;
|
|
79
|
-
stroke?: string;
|
|
80
|
-
strokeWidth?: string;
|
|
81
|
-
}
|
|
82
|
-
interface CreateBackNextButtonArgs extends BaseElementArgs<"base" | "backButton" | "nextButton" | "text"> {
|
|
83
|
-
width: number;
|
|
84
|
-
height: number;
|
|
85
|
-
items: [string, any?][];
|
|
86
|
-
currentIndex: number;
|
|
87
|
-
isBold?: boolean;
|
|
88
|
-
onChange?: (value: any) => void;
|
|
89
|
-
isDisabled?: (value: any) => boolean;
|
|
90
|
-
}
|
|
91
|
-
interface CreateTabArgs extends BaseElementArgs<"base"> {
|
|
92
|
-
width: number;
|
|
93
|
-
tabs: {
|
|
94
|
-
name: string;
|
|
95
|
-
load?: () => void;
|
|
96
|
-
unload?: () => void;
|
|
97
|
-
run?: () => void;
|
|
98
|
-
exit?: () => void;
|
|
99
|
-
}[];
|
|
100
|
-
currentTabName: string;
|
|
101
|
-
}
|
|
102
|
-
interface CreateCardArgs extends BaseElementArgs<"base" | "name" | "value" | "icon"> {
|
|
103
|
-
name: string;
|
|
104
|
-
value: string | number;
|
|
105
|
-
icon?: SVGElement;
|
|
106
|
-
}
|
|
107
|
-
interface CreateSelectArgs extends BaseElementArgs<"base"> {
|
|
108
|
-
width: number;
|
|
109
|
-
options: {
|
|
110
|
-
name: any;
|
|
111
|
-
text: string;
|
|
112
|
-
icon?: SVGElement;
|
|
113
|
-
}[];
|
|
114
|
-
currentOption: string;
|
|
115
|
-
onChange?: (name: any) => void;
|
|
116
|
-
isDisabled?: () => boolean;
|
|
117
|
-
}
|
|
118
|
-
interface CreateContainerArgs extends BaseElementArgs<"base"> {
|
|
119
|
-
width?: number;
|
|
120
|
-
height?: number;
|
|
121
|
-
}
|
|
3
|
+
export type SubscreenConstructor = new (...args: any[]) => BaseSubscreen;
|
|
122
4
|
interface DrawPolylineArrowArgs {
|
|
123
5
|
points: {
|
|
124
6
|
x: number;
|
|
@@ -137,6 +19,7 @@ export interface DynamicClassStyles {
|
|
|
137
19
|
disabled?: Partial<CSSStyleDeclaration>;
|
|
138
20
|
before?: Partial<CSSStyleDeclaration>;
|
|
139
21
|
after?: Partial<CSSStyleDeclaration>;
|
|
22
|
+
[key: string]: Partial<CSSStyleDeclaration> | undefined;
|
|
140
23
|
}
|
|
141
24
|
export declare function hexToRgb(hex: string): string;
|
|
142
25
|
export declare function dataUrlSvgWithColor(dataUrl: string, newColor: string): string;
|
|
@@ -147,7 +30,7 @@ export declare function getRelativeWidth(width: number): number;
|
|
|
147
30
|
export declare function getRelativeY(yPos: number, anchorPosition?: 'top' | 'bottom'): number;
|
|
148
31
|
export declare function getRelativeX(xPos: number, anchorPosition?: 'left' | 'right'): number;
|
|
149
32
|
export declare function setPosition(element: HTMLElement, xPos: number, yPos: number, anchor?: Anchor): void;
|
|
150
|
-
export declare function setSize(element: HTMLElement, width: number, height: number): void;
|
|
33
|
+
export declare function setSize(element: HTMLElement | SVGElement, width: number, height: number): void;
|
|
151
34
|
export declare function setFontSize(element: HTMLElement, targetFontSize: number): void;
|
|
152
35
|
export declare function setFontFamily(element: HTMLElement, fontFamily?: string): void;
|
|
153
36
|
export declare function setPadding(element: HTMLElement, targetPadding: number): void;
|
|
@@ -155,37 +38,34 @@ export declare function autosetFontSize(element: HTMLElement): void;
|
|
|
155
38
|
export declare function addDynamicClass(targetElement: HTMLElement | SVGElement, styles: DynamicClassStyles): void;
|
|
156
39
|
export declare function setPreviousSubscreen(): void;
|
|
157
40
|
export declare function setSubscreen(subscreen: BaseSubscreen | null): void;
|
|
158
|
-
export declare function getCurrentSubscreen(): BaseSubscreen;
|
|
41
|
+
export declare function getCurrentSubscreen(): BaseSubscreen | null;
|
|
42
|
+
export declare function getPreviousSubscreen(): BaseSubscreen | null;
|
|
159
43
|
export declare abstract class BaseSubscreen {
|
|
160
|
-
|
|
161
|
-
private resizeEventListeners;
|
|
162
|
-
private tabHandlers;
|
|
163
|
-
private addElement;
|
|
44
|
+
protected readonly setSubscreen: typeof setSubscreen;
|
|
164
45
|
get currentSubscreen(): BaseSubscreen | null;
|
|
165
46
|
get previousSubscreen(): BaseSubscreen | null;
|
|
166
|
-
get name(): string;
|
|
167
|
-
run
|
|
168
|
-
load
|
|
169
|
-
unload
|
|
170
|
-
click
|
|
171
|
-
exit
|
|
172
|
-
update
|
|
47
|
+
abstract get name(): string;
|
|
48
|
+
run(): void;
|
|
49
|
+
load(): void;
|
|
50
|
+
unload(): void;
|
|
51
|
+
click(): void;
|
|
52
|
+
exit(): void;
|
|
53
|
+
update(): void;
|
|
173
54
|
setPreviousSubscreen(): void;
|
|
174
|
-
|
|
175
|
-
createButton(
|
|
176
|
-
createText(
|
|
177
|
-
createInput(
|
|
178
|
-
createCheckbox(
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
createTabs({ x, y, width, tabs, anchor, place, currentTabName, modules }: CreateTabArgs): HTMLDivElement;
|
|
55
|
+
create(shard: Shard): HTMLElement;
|
|
56
|
+
createButton(ctx: ButtonShardContext): HTMLButtonElement;
|
|
57
|
+
createText(ctx: TextShardContext): HTMLParagraphElement;
|
|
58
|
+
createInput(ctx: InputShardContext): HTMLInputElement | HTMLTextAreaElement;
|
|
59
|
+
createCheckbox(ctx: CheckboxShardContext): HTMLDivElement;
|
|
60
|
+
createInputList(ctx: InputListShardContext): HTMLDivElement;
|
|
61
|
+
createImage(ctx: ImageShardContext): HTMLImageElement;
|
|
62
|
+
createSvg(ctx: SvgShardContext): SVGElement;
|
|
63
|
+
createBackNextButton(ctx: BackNextButtonShardContext): HTMLDivElement;
|
|
64
|
+
createTabs(ctx: TabsShardContext): HTMLDivElement;
|
|
185
65
|
drawPolylineArrow({ points, strokeColor, lineWidth, circleRadius, circleColor }: DrawPolylineArrowArgs): void;
|
|
186
|
-
createCard(
|
|
187
|
-
createSelect(
|
|
188
|
-
createContainer(
|
|
66
|
+
createCard(ctx: CardShardContext): HTMLDivElement;
|
|
67
|
+
createSelect(ctx: SelectShardContext): HTMLDivElement;
|
|
68
|
+
createContainer(ctx: ContainerShardContext): HTMLDivElement;
|
|
189
69
|
}
|
|
190
70
|
export declare function hookSubscreen(subscreenName: string, hook: (subscreen: BaseSubscreen) => void): void;
|
|
191
71
|
export {};
|