@vnejs/contracts.views.screens.save 0.1.1
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/const.d.ts +13 -0
- package/dist/const.js +6 -0
- package/dist/events.d.ts +12 -0
- package/dist/events.js +11 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8 -0
- package/dist/params.d.ts +116 -0
- package/dist/params.js +28 -0
- package/package.json +36 -0
- package/src/const.ts +8 -0
- package/src/events.ts +13 -0
- package/src/index.ts +19 -0
- package/src/params.ts +37 -0
- package/tsconfig.json +9 -0
package/dist/const.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const PAGE_TYPES: {
|
|
2
|
+
readonly AUTOSAVE: "autosave";
|
|
3
|
+
readonly SAVE: "save";
|
|
4
|
+
readonly LOAD: "load";
|
|
5
|
+
};
|
|
6
|
+
export declare const CONSTANTS: {
|
|
7
|
+
readonly PAGE_TYPES: {
|
|
8
|
+
readonly AUTOSAVE: "autosave";
|
|
9
|
+
readonly SAVE: "save";
|
|
10
|
+
readonly LOAD: "load";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type Constants = typeof CONSTANTS;
|
package/dist/const.js
ADDED
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SUBSCRIBE_EVENTS: {
|
|
2
|
+
readonly SHOW: "vne:save_view:show";
|
|
3
|
+
readonly HIDE: "vne:save_view:hide";
|
|
4
|
+
readonly PAGE_SET: "vne:save_view:page_set";
|
|
5
|
+
readonly TYPE_SET: "vne:save_view:type_set";
|
|
6
|
+
readonly CREATE: "vne:save_view:create";
|
|
7
|
+
readonly DELETE: "vne:save_view:delete";
|
|
8
|
+
readonly LOAD: "vne:save_view:load";
|
|
9
|
+
readonly UPDATE: "vne:save_view:update";
|
|
10
|
+
readonly PRELOAD: "vne:save_view:preload";
|
|
11
|
+
};
|
|
12
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:save_view:show",
|
|
3
|
+
HIDE: "vne:save_view:hide",
|
|
4
|
+
PAGE_SET: "vne:save_view:page_set",
|
|
5
|
+
TYPE_SET: "vne:save_view:type_set",
|
|
6
|
+
CREATE: "vne:save_view:create",
|
|
7
|
+
DELETE: "vne:save_view:delete",
|
|
8
|
+
LOAD: "vne:save_view:load",
|
|
9
|
+
UPDATE: "vne:save_view:update",
|
|
10
|
+
PRELOAD: "vne:save_view:preload",
|
|
11
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "@vnejs/shared";
|
|
2
|
+
import { CONSTANTS } from "./const.js";
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
export declare const PLUGIN_NAME: "SAVE_VIEW";
|
|
6
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
7
|
+
export { CONSTANTS };
|
|
8
|
+
export type { Constants } from "./const.js";
|
|
9
|
+
export { SUBSCRIBE_EVENTS };
|
|
10
|
+
export type { SubscribeEvents } from "./events.js";
|
|
11
|
+
export { PARAMS };
|
|
12
|
+
export type { Params, ViewProps } from "./params.js";
|
|
13
|
+
declare module "@vnejs/shared" {
|
|
14
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
|
|
15
|
+
}
|
|
16
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {
|
|
17
|
+
}
|
|
18
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@vnejs/shared";
|
|
2
|
+
import { CONSTANTS } from "./const.js";
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
export const PLUGIN_NAME = "SAVE_VIEW";
|
|
6
|
+
export { CONSTANTS };
|
|
7
|
+
export { SUBSCRIBE_EVENTS };
|
|
8
|
+
export { PARAMS };
|
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
export declare const BACKGROUND: string;
|
|
3
|
+
export declare const TRANSITION: number;
|
|
4
|
+
export declare const ZINDEX: number;
|
|
5
|
+
export declare const LOC_LABEL: 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 close: {
|
|
14
|
+
readonly position: PositionBoxProps;
|
|
15
|
+
readonly props: {
|
|
16
|
+
readonly size: 60;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly controls: {
|
|
20
|
+
readonly position: PositionBoxProps;
|
|
21
|
+
readonly props: {
|
|
22
|
+
readonly flexDirection: "column";
|
|
23
|
+
readonly flexGap: 60;
|
|
24
|
+
readonly textSize: 96;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
readonly items: {
|
|
28
|
+
readonly position: PositionBoxProps;
|
|
29
|
+
readonly wrap: {
|
|
30
|
+
readonly width: number;
|
|
31
|
+
readonly height: 450;
|
|
32
|
+
readonly top: 24;
|
|
33
|
+
readonly left: 24;
|
|
34
|
+
readonly right: 24;
|
|
35
|
+
readonly bottom: 24;
|
|
36
|
+
readonly topLeftSize: 36;
|
|
37
|
+
readonly topRightSize: 36;
|
|
38
|
+
readonly bottomLeftSize: 48;
|
|
39
|
+
readonly withHover: true;
|
|
40
|
+
};
|
|
41
|
+
readonly flex: {
|
|
42
|
+
readonly gap: 120;
|
|
43
|
+
readonly withWrap: true;
|
|
44
|
+
readonly width: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly pages: {
|
|
48
|
+
readonly position: PositionBoxProps;
|
|
49
|
+
readonly props: {};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
53
|
+
export declare const VIEW_PROPS: ViewProps;
|
|
54
|
+
export declare const ROWS: number;
|
|
55
|
+
export declare const COLUMNS: number;
|
|
56
|
+
export declare const PAGES: number;
|
|
57
|
+
export declare const AUDIO_NAME: string;
|
|
58
|
+
declare const PARAMS_DEFAULT: {
|
|
59
|
+
BACKGROUND: string;
|
|
60
|
+
TRANSITION: number;
|
|
61
|
+
ZINDEX: number;
|
|
62
|
+
LOC_LABEL: string;
|
|
63
|
+
VIEW_PROPS: {
|
|
64
|
+
screen: {
|
|
65
|
+
withBackgroundDark: boolean;
|
|
66
|
+
withBackgroundBlur: boolean;
|
|
67
|
+
transition: number;
|
|
68
|
+
zIndex: number;
|
|
69
|
+
};
|
|
70
|
+
close: {
|
|
71
|
+
position: PositionBoxProps<unknown>;
|
|
72
|
+
props: {
|
|
73
|
+
size: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
controls: {
|
|
77
|
+
position: PositionBoxProps<unknown>;
|
|
78
|
+
props: {
|
|
79
|
+
flexDirection: "column";
|
|
80
|
+
flexGap: number;
|
|
81
|
+
textSize: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
items: {
|
|
85
|
+
position: PositionBoxProps<unknown>;
|
|
86
|
+
wrap: {
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
top: number;
|
|
90
|
+
left: number;
|
|
91
|
+
right: number;
|
|
92
|
+
bottom: number;
|
|
93
|
+
topLeftSize: number;
|
|
94
|
+
topRightSize: number;
|
|
95
|
+
bottomLeftSize: number;
|
|
96
|
+
withHover: boolean;
|
|
97
|
+
};
|
|
98
|
+
flex: {
|
|
99
|
+
gap: number;
|
|
100
|
+
withWrap: boolean;
|
|
101
|
+
width: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
pages: {
|
|
105
|
+
position: PositionBoxProps<unknown>;
|
|
106
|
+
props: {};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
ROWS: number;
|
|
110
|
+
COLUMNS: number;
|
|
111
|
+
PAGES: number;
|
|
112
|
+
AUDIO_NAME: string;
|
|
113
|
+
};
|
|
114
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
115
|
+
export declare const PARAMS: Params;
|
|
116
|
+
export {};
|
package/dist/params.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getVneLength } from "@vnejs/uis.utils";
|
|
2
|
+
export const BACKGROUND = "save";
|
|
3
|
+
export const TRANSITION = 300;
|
|
4
|
+
export const ZINDEX = 4000;
|
|
5
|
+
export const LOC_LABEL = "saveLoad";
|
|
6
|
+
const HORIZONTAL_MARGIN = 120;
|
|
7
|
+
const TOP_MARGIN = 240;
|
|
8
|
+
const [WRAP_COUNT, WRAP_LENGTH] = [5, 160];
|
|
9
|
+
const WRAP_WIDTH = WRAP_COUNT * WRAP_LENGTH;
|
|
10
|
+
const WRAP_GAP = 120;
|
|
11
|
+
const VIEW_PROPS_DEFAULT = {
|
|
12
|
+
screen: { withBackgroundDark: true, withBackgroundBlur: false, transition: TRANSITION, zIndex: ZINDEX },
|
|
13
|
+
close: { position: { top: 90, right: HORIZONTAL_MARGIN }, props: { size: 60 } },
|
|
14
|
+
controls: { position: { top: TOP_MARGIN, left: HORIZONTAL_MARGIN }, props: { flexDirection: "column", flexGap: 60, textSize: 96 } },
|
|
15
|
+
items: {
|
|
16
|
+
position: { top: TOP_MARGIN, right: HORIZONTAL_MARGIN },
|
|
17
|
+
wrap: { width: WRAP_WIDTH, height: 450, top: 24, left: 24, right: 24, bottom: 24, topLeftSize: 36, topRightSize: 36, bottomLeftSize: 48, withHover: true },
|
|
18
|
+
flex: { gap: WRAP_GAP, withWrap: true, width: getVneLength(2 * WRAP_GAP + WRAP_COUNT * 3 * WRAP_LENGTH) },
|
|
19
|
+
},
|
|
20
|
+
pages: { position: { bottom: 120, right: HORIZONTAL_MARGIN }, props: {} },
|
|
21
|
+
};
|
|
22
|
+
export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
|
|
23
|
+
export const ROWS = 3;
|
|
24
|
+
export const COLUMNS = 3;
|
|
25
|
+
export const PAGES = 5;
|
|
26
|
+
export const AUDIO_NAME = "";
|
|
27
|
+
const PARAMS_DEFAULT = { BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS, ROWS, COLUMNS, PAGES, AUDIO_NAME };
|
|
28
|
+
export const PARAMS = PARAMS_DEFAULT;
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vnejs/contracts.views.screens.save",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.views.screens.save",
|
|
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/shared": "~0.1.0",
|
|
30
|
+
"@vnejs/uis.utils": "~0.1.0",
|
|
31
|
+
"@vnejs/uis.react.position-box": "~0.1.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@vnejs/configs.ts-common": "~0.1.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/const.ts
ADDED
package/src/events.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:save_view:show",
|
|
3
|
+
HIDE: "vne:save_view:hide",
|
|
4
|
+
PAGE_SET: "vne:save_view:page_set",
|
|
5
|
+
TYPE_SET: "vne:save_view:type_set",
|
|
6
|
+
CREATE: "vne:save_view:create",
|
|
7
|
+
DELETE: "vne:save_view:delete",
|
|
8
|
+
LOAD: "vne:save_view:load",
|
|
9
|
+
UPDATE: "vne:save_view:update",
|
|
10
|
+
PRELOAD: "vne:save_view:preload",
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "@vnejs/shared";
|
|
2
|
+
import { CONSTANTS } from "./const.js";
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
|
|
6
|
+
export const PLUGIN_NAME = "SAVE_VIEW" as const;
|
|
7
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
8
|
+
export { CONSTANTS };
|
|
9
|
+
export type { Constants } from "./const.js";
|
|
10
|
+
export { SUBSCRIBE_EVENTS };
|
|
11
|
+
export type { SubscribeEvents } from "./events.js";
|
|
12
|
+
export { PARAMS };
|
|
13
|
+
export type { Params, ViewProps } from "./params.js";
|
|
14
|
+
|
|
15
|
+
declare module "@vnejs/shared" {
|
|
16
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
17
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {}
|
|
18
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
19
|
+
}
|
package/src/params.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getVneLength } from "@vnejs/uis.utils";
|
|
2
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
3
|
+
|
|
4
|
+
export const BACKGROUND: string = "save";
|
|
5
|
+
export const TRANSITION: number = 300;
|
|
6
|
+
export const ZINDEX: number = 4000;
|
|
7
|
+
export const LOC_LABEL: string = "saveLoad";
|
|
8
|
+
|
|
9
|
+
const HORIZONTAL_MARGIN = 120;
|
|
10
|
+
const TOP_MARGIN = 240;
|
|
11
|
+
const [WRAP_COUNT, WRAP_LENGTH] = [5, 160];
|
|
12
|
+
const WRAP_WIDTH = WRAP_COUNT * WRAP_LENGTH;
|
|
13
|
+
const WRAP_GAP = 120;
|
|
14
|
+
|
|
15
|
+
const VIEW_PROPS_DEFAULT = {
|
|
16
|
+
screen: { withBackgroundDark: true, withBackgroundBlur: false, transition: TRANSITION, zIndex: ZINDEX },
|
|
17
|
+
close: { position: { top: 90, right: HORIZONTAL_MARGIN } as PositionBoxProps, props: { size: 60 } },
|
|
18
|
+
controls: { position: { top: TOP_MARGIN, left: HORIZONTAL_MARGIN } as PositionBoxProps, props: { flexDirection: "column" as const, flexGap: 60, textSize: 96 } },
|
|
19
|
+
items: {
|
|
20
|
+
position: { top: TOP_MARGIN, right: HORIZONTAL_MARGIN } as PositionBoxProps,
|
|
21
|
+
wrap: { width: WRAP_WIDTH, height: 450, top: 24, left: 24, right: 24, bottom: 24, topLeftSize: 36, topRightSize: 36, bottomLeftSize: 48, withHover: true },
|
|
22
|
+
flex: { gap: WRAP_GAP, withWrap: true, width: getVneLength(2 * WRAP_GAP + WRAP_COUNT * 3 * WRAP_LENGTH) },
|
|
23
|
+
},
|
|
24
|
+
pages: { position: { bottom: 120, right: HORIZONTAL_MARGIN } as PositionBoxProps, props: {} },
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
27
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
28
|
+
export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
|
|
29
|
+
|
|
30
|
+
export const ROWS: number = 3;
|
|
31
|
+
export const COLUMNS: number = 3;
|
|
32
|
+
export const PAGES: number = 5;
|
|
33
|
+
export const AUDIO_NAME: string = "";
|
|
34
|
+
|
|
35
|
+
const PARAMS_DEFAULT = { BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS, ROWS, COLUMNS, PAGES, AUDIO_NAME };
|
|
36
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
37
|
+
export const PARAMS: Params = PARAMS_DEFAULT;
|