@vnejs/contracts.controllers.screens.settings 0.0.0-stage → 0.2.9
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/events.d.ts +11 -0
- package/dist/events.js +10 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +6 -0
- package/dist/params.d.ts +76 -0
- package/dist/params.js +17 -0
- package/dist/payloads.d.ts +9 -0
- package/dist/payloads.js +1 -0
- package/package.json +33 -4
- package/src/events.ts +12 -0
- package/src/index.ts +51 -0
- package/src/params.ts +25 -0
- package/src/payloads.ts +12 -0
- package/tsconfig.json +9 -0
- package/README.md +0 -3
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const SUBSCRIBE_EVENTS: {
|
|
2
|
+
readonly SHOW: "vne:settings_screen_view:show";
|
|
3
|
+
readonly HIDE: "vne:settings_screen_view:hide";
|
|
4
|
+
readonly UPDATE: "vne:settings_screen_view:update";
|
|
5
|
+
readonly UPDATE_FAST: "vne:settings_screen_view:update_fast";
|
|
6
|
+
readonly UPDATE_FORCE: "vne:settings_screen_view:update_force";
|
|
7
|
+
readonly PRELOAD: "vne:settings_screen_view:preload";
|
|
8
|
+
readonly TAB_SET: "vne:settings_screen_view:tab_set";
|
|
9
|
+
readonly UPDATE_STATE: "vne:settings_screen_view:update_state";
|
|
10
|
+
};
|
|
11
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:settings_screen_view:show",
|
|
3
|
+
HIDE: "vne:settings_screen_view:hide",
|
|
4
|
+
UPDATE: "vne:settings_screen_view:update",
|
|
5
|
+
UPDATE_FAST: "vne:settings_screen_view:update_fast",
|
|
6
|
+
UPDATE_FORCE: "vne:settings_screen_view:update_force",
|
|
7
|
+
PRELOAD: "vne:settings_screen_view:preload",
|
|
8
|
+
TAB_SET: "vne:settings_screen_view:tab_set",
|
|
9
|
+
UPDATE_STATE: "vne:settings_screen_view:update_state",
|
|
10
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "@vnejs/registry";
|
|
2
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
3
|
+
import { PARAMS } from "./params.js";
|
|
4
|
+
import type { SettingsScreenViewForcePayload, SettingsScreenViewStateUpdatePayload, SettingsScreenViewTabSetPayload, SettingsScreenViewUpdatePayload } from "./payloads.js";
|
|
5
|
+
export declare const PLUGIN_NAME: "SETTINGS_SCREEN_VIEW";
|
|
6
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
7
|
+
export { SUBSCRIBE_EVENTS };
|
|
8
|
+
export type { SubscribeEvents } from "./events.js";
|
|
9
|
+
export { PARAMS };
|
|
10
|
+
export type { Params, ViewProps } from "./params.js";
|
|
11
|
+
export type { SettingsScreenViewTabSetPayload, SettingsScreenViewForcePayload, SettingsScreenViewUpdatePayload, SettingsScreenViewStateUpdatePayload, } from "./payloads.js";
|
|
12
|
+
declare module "@vnejs/registry" {
|
|
13
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
|
|
14
|
+
}
|
|
15
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
|
|
16
|
+
}
|
|
17
|
+
interface VneEventPayloadMap {
|
|
18
|
+
[SUBSCRIBE_EVENTS.SHOW]: SettingsScreenViewForcePayload;
|
|
19
|
+
[SUBSCRIBE_EVENTS.HIDE]: SettingsScreenViewForcePayload;
|
|
20
|
+
[SUBSCRIBE_EVENTS.UPDATE]: SettingsScreenViewUpdatePayload;
|
|
21
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: SettingsScreenViewUpdatePayload;
|
|
22
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: SettingsScreenViewUpdatePayload;
|
|
23
|
+
[SUBSCRIBE_EVENTS.PRELOAD]: void;
|
|
24
|
+
[SUBSCRIBE_EVENTS.TAB_SET]: SettingsScreenViewTabSetPayload;
|
|
25
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: SettingsScreenViewStateUpdatePayload;
|
|
26
|
+
}
|
|
27
|
+
interface VneEventResultMap {
|
|
28
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
29
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
30
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
31
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
32
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
33
|
+
[SUBSCRIBE_EVENTS.PRELOAD]: void;
|
|
34
|
+
[SUBSCRIBE_EVENTS.TAB_SET]: void;
|
|
35
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/dist/index.js
ADDED
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
export declare const TRANSITION: number;
|
|
3
|
+
export declare const ZINDEX: number;
|
|
4
|
+
export declare const LOC_LABEL: string;
|
|
5
|
+
export declare const BACKGROUND: string;
|
|
6
|
+
declare const VIEW_PROPS_DEFAULT: {
|
|
7
|
+
readonly screen: {
|
|
8
|
+
readonly withBackgroundDark: true;
|
|
9
|
+
readonly withBackgroundBlur: false;
|
|
10
|
+
readonly transition: number;
|
|
11
|
+
readonly zIndex: number;
|
|
12
|
+
};
|
|
13
|
+
readonly background: {
|
|
14
|
+
readonly withDark: true;
|
|
15
|
+
readonly withBlur: false;
|
|
16
|
+
};
|
|
17
|
+
readonly cross: {
|
|
18
|
+
readonly position: PositionBoxProps;
|
|
19
|
+
readonly svg: {
|
|
20
|
+
readonly size: 60;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly controls: {
|
|
24
|
+
readonly position: PositionBoxProps;
|
|
25
|
+
readonly props: {
|
|
26
|
+
readonly textWidth: 660;
|
|
27
|
+
readonly wrapWidth: 3600;
|
|
28
|
+
readonly flexGap: 36;
|
|
29
|
+
readonly flexWithWrap: false;
|
|
30
|
+
readonly textSize: 96;
|
|
31
|
+
readonly textAlign: "center";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
36
|
+
export declare const VIEW_PROPS: ViewProps;
|
|
37
|
+
export declare const AUDIO_NAME: string;
|
|
38
|
+
declare const PARAMS_DEFAULT: {
|
|
39
|
+
TRANSITION: number;
|
|
40
|
+
ZINDEX: number;
|
|
41
|
+
LOC_LABEL: string;
|
|
42
|
+
BACKGROUND: string;
|
|
43
|
+
VIEW_PROPS: {
|
|
44
|
+
screen: {
|
|
45
|
+
withBackgroundDark: boolean;
|
|
46
|
+
withBackgroundBlur: boolean;
|
|
47
|
+
transition: number;
|
|
48
|
+
zIndex: number;
|
|
49
|
+
};
|
|
50
|
+
background: {
|
|
51
|
+
withDark: boolean;
|
|
52
|
+
withBlur: boolean;
|
|
53
|
+
};
|
|
54
|
+
cross: {
|
|
55
|
+
position: PositionBoxProps<unknown>;
|
|
56
|
+
svg: {
|
|
57
|
+
size: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
controls: {
|
|
61
|
+
position: PositionBoxProps<unknown>;
|
|
62
|
+
props: {
|
|
63
|
+
textWidth: number;
|
|
64
|
+
wrapWidth: number;
|
|
65
|
+
flexGap: number;
|
|
66
|
+
flexWithWrap: boolean;
|
|
67
|
+
textSize: number;
|
|
68
|
+
textAlign: "center";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
AUDIO_NAME: string;
|
|
73
|
+
};
|
|
74
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
75
|
+
export declare const PARAMS: Params;
|
|
76
|
+
export {};
|
package/dist/params.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const TRANSITION = 500;
|
|
2
|
+
export const ZINDEX = 4000;
|
|
3
|
+
export const LOC_LABEL = "settings";
|
|
4
|
+
export const BACKGROUND = "save";
|
|
5
|
+
const VIEW_PROPS_DEFAULT = {
|
|
6
|
+
screen: { withBackgroundDark: true, withBackgroundBlur: false, transition: TRANSITION, zIndex: ZINDEX },
|
|
7
|
+
background: { withDark: true, withBlur: false },
|
|
8
|
+
cross: { position: { bottom: 90, right: 120 }, svg: { size: 60 } },
|
|
9
|
+
controls: {
|
|
10
|
+
position: { top: 90, left: 120 },
|
|
11
|
+
props: { textWidth: 660, wrapWidth: 3600, flexGap: 36, flexWithWrap: false, textSize: 96, textAlign: "center" },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
|
|
15
|
+
export const AUDIO_NAME = "";
|
|
16
|
+
const PARAMS_DEFAULT = { TRANSITION, ZINDEX, LOC_LABEL, BACKGROUND, VIEW_PROPS, AUDIO_NAME };
|
|
17
|
+
export const PARAMS = PARAMS_DEFAULT;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type SettingsScreenViewTabSetPayload = {
|
|
2
|
+
tab?: string;
|
|
3
|
+
};
|
|
4
|
+
export type SettingsScreenViewForcePayload = {
|
|
5
|
+
isForce?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type SettingsScreenViewUpdatePayload = Record<string, unknown>;
|
|
9
|
+
export type SettingsScreenViewStateUpdatePayload = Record<string, unknown>;
|
package/dist/payloads.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/contracts.controllers.screens.settings",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.9",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.controllers.screens.settings",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"src",
|
|
18
|
+
"tsconfig.json"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "npx @vnejs/monorepo package",
|
|
22
|
+
"publish:major": "npx @vnejs/monorepo publish major --access public",
|
|
23
|
+
"publish:minor": "npx @vnejs/monorepo publish minor --access public",
|
|
24
|
+
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
25
|
+
},
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@vnejs/registry": "~0.2.0",
|
|
30
|
+
"@vnejs/uis.react.position-box": "~0.2.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@vnejs/configs.ts-common": "~0.2.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/events.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:settings_screen_view:show",
|
|
3
|
+
HIDE: "vne:settings_screen_view:hide",
|
|
4
|
+
UPDATE: "vne:settings_screen_view:update",
|
|
5
|
+
UPDATE_FAST: "vne:settings_screen_view:update_fast",
|
|
6
|
+
UPDATE_FORCE: "vne:settings_screen_view:update_force",
|
|
7
|
+
PRELOAD: "vne:settings_screen_view:preload",
|
|
8
|
+
TAB_SET: "vne:settings_screen_view:tab_set",
|
|
9
|
+
UPDATE_STATE: "vne:settings_screen_view:update_state",
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "@vnejs/registry";
|
|
2
|
+
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
import type {
|
|
6
|
+
SettingsScreenViewForcePayload,
|
|
7
|
+
SettingsScreenViewStateUpdatePayload,
|
|
8
|
+
SettingsScreenViewTabSetPayload,
|
|
9
|
+
SettingsScreenViewUpdatePayload,
|
|
10
|
+
} from "./payloads.js";
|
|
11
|
+
|
|
12
|
+
export const PLUGIN_NAME = "SETTINGS_SCREEN_VIEW" as const;
|
|
13
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
14
|
+
export { SUBSCRIBE_EVENTS };
|
|
15
|
+
export type { SubscribeEvents } from "./events.js";
|
|
16
|
+
export { PARAMS };
|
|
17
|
+
export type { Params, ViewProps } from "./params.js";
|
|
18
|
+
|
|
19
|
+
export type {
|
|
20
|
+
SettingsScreenViewTabSetPayload,
|
|
21
|
+
SettingsScreenViewForcePayload,
|
|
22
|
+
SettingsScreenViewUpdatePayload,
|
|
23
|
+
SettingsScreenViewStateUpdatePayload,
|
|
24
|
+
} from "./payloads.js";
|
|
25
|
+
|
|
26
|
+
declare module "@vnejs/registry" {
|
|
27
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
28
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
29
|
+
|
|
30
|
+
interface VneEventPayloadMap {
|
|
31
|
+
[SUBSCRIBE_EVENTS.SHOW]: SettingsScreenViewForcePayload;
|
|
32
|
+
[SUBSCRIBE_EVENTS.HIDE]: SettingsScreenViewForcePayload;
|
|
33
|
+
[SUBSCRIBE_EVENTS.UPDATE]: SettingsScreenViewUpdatePayload;
|
|
34
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: SettingsScreenViewUpdatePayload;
|
|
35
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: SettingsScreenViewUpdatePayload;
|
|
36
|
+
[SUBSCRIBE_EVENTS.PRELOAD]: void;
|
|
37
|
+
[SUBSCRIBE_EVENTS.TAB_SET]: SettingsScreenViewTabSetPayload;
|
|
38
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: SettingsScreenViewStateUpdatePayload;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface VneEventResultMap {
|
|
42
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
43
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
44
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
45
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
46
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
47
|
+
[SUBSCRIBE_EVENTS.PRELOAD]: void;
|
|
48
|
+
[SUBSCRIBE_EVENTS.TAB_SET]: void;
|
|
49
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
50
|
+
}
|
|
51
|
+
}
|
package/src/params.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
|
|
3
|
+
export const TRANSITION: number = 500;
|
|
4
|
+
export const ZINDEX: number = 4000;
|
|
5
|
+
export const LOC_LABEL: string = "settings";
|
|
6
|
+
export const BACKGROUND: string = "save";
|
|
7
|
+
|
|
8
|
+
const VIEW_PROPS_DEFAULT = {
|
|
9
|
+
screen: { withBackgroundDark: true, withBackgroundBlur: false, transition: TRANSITION, zIndex: ZINDEX },
|
|
10
|
+
background: { withDark: true, withBlur: false },
|
|
11
|
+
cross: { position: { bottom: 90, right: 120 } as PositionBoxProps, svg: { size: 60 } },
|
|
12
|
+
controls: {
|
|
13
|
+
position: { top: 90, left: 120 } as PositionBoxProps,
|
|
14
|
+
props: { textWidth: 660, wrapWidth: 3600, flexGap: 36, flexWithWrap: false, textSize: 96, textAlign: "center" as const },
|
|
15
|
+
},
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
19
|
+
export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
|
|
20
|
+
|
|
21
|
+
export const AUDIO_NAME: string = "";
|
|
22
|
+
|
|
23
|
+
const PARAMS_DEFAULT = { TRANSITION, ZINDEX, LOC_LABEL, BACKGROUND, VIEW_PROPS, AUDIO_NAME };
|
|
24
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
25
|
+
export const PARAMS: Params = PARAMS_DEFAULT;
|
package/src/payloads.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SettingsScreenViewTabSetPayload = {
|
|
2
|
+
tab?: string;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type SettingsScreenViewForcePayload = {
|
|
6
|
+
isForce?: boolean;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type SettingsScreenViewUpdatePayload = Record<string, unknown>;
|
|
11
|
+
|
|
12
|
+
export type SettingsScreenViewStateUpdatePayload = Record<string, unknown>;
|
package/tsconfig.json
ADDED
package/README.md
DELETED