@vnejs/contracts.views.screens.gallery 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.
@@ -0,0 +1,13 @@
1
+ export declare const SUBSCRIBE_EVENTS: {
2
+ readonly OPEN: "vne:gallery:open";
3
+ readonly CHECK: "vne:gallery:check";
4
+ readonly CLEAR: "vne:gallery:clear";
5
+ readonly SHOW: "vne:gallery:show";
6
+ readonly HIDE: "vne:gallery:hide";
7
+ readonly PAGE_SET: "vne:gallery:page_set";
8
+ readonly TYPE_SET: "vne:gallery:type_set";
9
+ readonly UPDATE: "vne:gallery:update";
10
+ readonly PRELOAD: "vne:gallery:preload";
11
+ readonly CHOOSE: "vne:gallery:choose";
12
+ };
13
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/dist/events.js ADDED
@@ -0,0 +1,12 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ OPEN: "vne:gallery:open",
3
+ CHECK: "vne:gallery:check",
4
+ CLEAR: "vne:gallery:clear",
5
+ SHOW: "vne:gallery:show",
6
+ HIDE: "vne:gallery:hide",
7
+ PAGE_SET: "vne:gallery:page_set",
8
+ TYPE_SET: "vne:gallery:type_set",
9
+ UPDATE: "vne:gallery:update",
10
+ PRELOAD: "vne:gallery:preload",
11
+ CHOOSE: "vne:gallery:choose",
12
+ };
@@ -0,0 +1,15 @@
1
+ import "@vnejs/shared";
2
+ import { SUBSCRIBE_EVENTS } from "./events.js";
3
+ import { PARAMS } from "./params.js";
4
+ export declare const PLUGIN_NAME: "GALLERY";
5
+ export type PluginName = typeof PLUGIN_NAME;
6
+ export { SUBSCRIBE_EVENTS };
7
+ export type { SubscribeEvents } from "./events.js";
8
+ export { PARAMS };
9
+ export type { GalleryTab, GalleryTabContent, GalleryTabs, Params, ViewProps } from "./params.js";
10
+ declare module "@vnejs/shared" {
11
+ interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
12
+ }
13
+ interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
14
+ }
15
+ }
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import "@vnejs/shared";
2
+ import { SUBSCRIBE_EVENTS } from "./events.js";
3
+ import { PARAMS } from "./params.js";
4
+ export const PLUGIN_NAME = "GALLERY";
5
+ export { SUBSCRIBE_EVENTS };
6
+ export { PARAMS };
@@ -0,0 +1,115 @@
1
+ import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
2
+ export type GalleryTabContent = {
3
+ check: string;
4
+ mediaType: string;
5
+ name: string;
6
+ fullName: string;
7
+ };
8
+ export type GalleryTab = {
9
+ locKey: string;
10
+ content: GalleryTabContent[];
11
+ };
12
+ export type GalleryTabs = Record<string, GalleryTab>;
13
+ export declare const TABS: GalleryTabs;
14
+ export declare const BACKGROUND: "save";
15
+ export declare const TRANSITION: number;
16
+ export declare const ZINDEX: number;
17
+ export declare const LOC_LABEL: string;
18
+ declare const VIEW_PROPS_DEFAULT: {
19
+ readonly screen: {
20
+ readonly withBackgroundDark: true;
21
+ readonly zIndex: number;
22
+ readonly transition: number;
23
+ };
24
+ readonly close: {
25
+ readonly position: PositionBoxProps;
26
+ readonly svg: {
27
+ readonly size: 60;
28
+ };
29
+ };
30
+ readonly controls: {
31
+ readonly position: PositionBoxProps;
32
+ readonly controls: {
33
+ readonly flexDirection: "column";
34
+ readonly flexGap: 60;
35
+ readonly textSize: 96;
36
+ };
37
+ };
38
+ readonly items: {
39
+ readonly position: PositionBoxProps;
40
+ readonly flex: {
41
+ readonly gap: number;
42
+ readonly withWrap: true;
43
+ readonly width: number;
44
+ };
45
+ readonly stub: {
46
+ readonly width: number;
47
+ readonly height: number;
48
+ };
49
+ readonly item: {
50
+ readonly width: number;
51
+ readonly height: number;
52
+ readonly withHover: true;
53
+ };
54
+ };
55
+ readonly pages: {
56
+ readonly position: PositionBoxProps;
57
+ };
58
+ };
59
+ export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
60
+ export declare const VIEW_PROPS: ViewProps;
61
+ export declare const ROWS: number;
62
+ export declare const COLUMNS: number;
63
+ declare const PARAMS_DEFAULT: {
64
+ TABS: GalleryTabs;
65
+ BACKGROUND: "save";
66
+ TRANSITION: number;
67
+ ZINDEX: number;
68
+ LOC_LABEL: string;
69
+ VIEW_PROPS: {
70
+ screen: {
71
+ withBackgroundDark: boolean;
72
+ zIndex: number;
73
+ transition: number;
74
+ };
75
+ close: {
76
+ position: PositionBoxProps<unknown>;
77
+ svg: {
78
+ size: number;
79
+ };
80
+ };
81
+ controls: {
82
+ position: PositionBoxProps<unknown>;
83
+ controls: {
84
+ flexDirection: "column";
85
+ flexGap: number;
86
+ textSize: number;
87
+ };
88
+ };
89
+ items: {
90
+ position: PositionBoxProps<unknown>;
91
+ flex: {
92
+ gap: number;
93
+ withWrap: boolean;
94
+ width: number;
95
+ };
96
+ stub: {
97
+ width: number;
98
+ height: number;
99
+ };
100
+ item: {
101
+ width: number;
102
+ height: number;
103
+ withHover: boolean;
104
+ };
105
+ };
106
+ pages: {
107
+ position: PositionBoxProps<unknown>;
108
+ };
109
+ };
110
+ ROWS: number;
111
+ COLUMNS: number;
112
+ };
113
+ export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
114
+ export declare const PARAMS: Params;
115
+ export {};
package/dist/params.js ADDED
@@ -0,0 +1,38 @@
1
+ export const TABS = {};
2
+ export const BACKGROUND = "save";
3
+ export const TRANSITION = 300;
4
+ export const ZINDEX = 4000;
5
+ export const LOC_LABEL = "gallery";
6
+ const [ITEM_WIDTH, ITEM_HEIGHT, ITEM_GAP] = [800, 450, 120];
7
+ const VIEW_PROPS_DEFAULT = {
8
+ screen: { withBackgroundDark: true, zIndex: ZINDEX, transition: TRANSITION },
9
+ close: {
10
+ position: { right: 120, top: 90 },
11
+ svg: { size: 60 },
12
+ },
13
+ controls: {
14
+ position: { top: 240, left: 120 },
15
+ controls: { flexDirection: "column", flexGap: 60, textSize: 96 },
16
+ },
17
+ items: {
18
+ position: { top: 240, right: 120 },
19
+ flex: { gap: ITEM_GAP, withWrap: true, width: 2 * ITEM_GAP + 3 * ITEM_WIDTH },
20
+ stub: { width: ITEM_WIDTH, height: ITEM_HEIGHT },
21
+ item: { width: ITEM_WIDTH, height: ITEM_HEIGHT, withHover: true },
22
+ },
23
+ pages: { position: { bottom: 120, right: 120 } },
24
+ };
25
+ export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
26
+ export const ROWS = 3;
27
+ export const COLUMNS = 3;
28
+ const PARAMS_DEFAULT = {
29
+ TABS,
30
+ BACKGROUND,
31
+ TRANSITION,
32
+ ZINDEX,
33
+ LOC_LABEL,
34
+ VIEW_PROPS,
35
+ ROWS,
36
+ COLUMNS,
37
+ };
38
+ export const PARAMS = PARAMS_DEFAULT;
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@vnejs/contracts.views.screens.gallery",
3
+ "version": "0.1.1",
4
+ "description": "Contracts for @vnejs/plugins.views.screens.gallery",
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.react.position-box": "~0.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "@vnejs/configs.ts-common": "~0.1.0"
34
+ }
35
+ }
package/src/events.ts ADDED
@@ -0,0 +1,15 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ OPEN: "vne:gallery:open",
3
+ CHECK: "vne:gallery:check",
4
+ CLEAR: "vne:gallery:clear",
5
+
6
+ SHOW: "vne:gallery:show",
7
+ HIDE: "vne:gallery:hide",
8
+ PAGE_SET: "vne:gallery:page_set",
9
+ TYPE_SET: "vne:gallery:type_set",
10
+ UPDATE: "vne:gallery:update",
11
+ PRELOAD: "vne:gallery:preload",
12
+ CHOOSE: "vne:gallery:choose",
13
+ } as const;
14
+
15
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/src/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ import "@vnejs/shared";
2
+
3
+ import { SUBSCRIBE_EVENTS } from "./events.js";
4
+ import { PARAMS } from "./params.js";
5
+
6
+ export const PLUGIN_NAME = "GALLERY" as const;
7
+ export type PluginName = typeof PLUGIN_NAME;
8
+
9
+ export { SUBSCRIBE_EVENTS };
10
+ export type { SubscribeEvents } from "./events.js";
11
+ export { PARAMS };
12
+ export type { GalleryTab, GalleryTabContent, GalleryTabs, Params, ViewProps } from "./params.js";
13
+
14
+ declare module "@vnejs/shared" {
15
+ interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
16
+
17
+ interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
18
+ }
package/src/params.ts ADDED
@@ -0,0 +1,65 @@
1
+ import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
2
+
3
+ export type GalleryTabContent = {
4
+ check: string;
5
+ mediaType: string;
6
+ name: string;
7
+ fullName: string;
8
+ };
9
+
10
+ export type GalleryTab = {
11
+ locKey: string;
12
+ content: GalleryTabContent[];
13
+ };
14
+
15
+ export type GalleryTabs = Record<string, GalleryTab>;
16
+
17
+ export const TABS: GalleryTabs = {};
18
+
19
+ export const BACKGROUND = "save" as const;
20
+
21
+ export const TRANSITION: number = 300;
22
+ export const ZINDEX: number = 4000;
23
+
24
+ export const LOC_LABEL: string = "gallery";
25
+
26
+ const [ITEM_WIDTH, ITEM_HEIGHT, ITEM_GAP] = [800, 450, 120];
27
+
28
+ const VIEW_PROPS_DEFAULT = {
29
+ screen: { withBackgroundDark: true, zIndex: ZINDEX, transition: TRANSITION },
30
+ close: {
31
+ position: { right: 120, top: 90 } as PositionBoxProps,
32
+ svg: { size: 60 },
33
+ },
34
+ controls: {
35
+ position: { top: 240, left: 120 } as PositionBoxProps,
36
+ controls: { flexDirection: "column" as const, flexGap: 60, textSize: 96 },
37
+ },
38
+ items: {
39
+ position: { top: 240, right: 120 } as PositionBoxProps,
40
+ flex: { gap: ITEM_GAP, withWrap: true, width: 2 * ITEM_GAP + 3 * ITEM_WIDTH },
41
+ stub: { width: ITEM_WIDTH, height: ITEM_HEIGHT },
42
+ item: { width: ITEM_WIDTH, height: ITEM_HEIGHT, withHover: true },
43
+ },
44
+ pages: { position: { bottom: 120, right: 120 } as PositionBoxProps },
45
+ } as const;
46
+
47
+ export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
48
+ export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
49
+
50
+ export const ROWS: number = 3;
51
+ export const COLUMNS: number = 3;
52
+
53
+ const PARAMS_DEFAULT = {
54
+ TABS,
55
+ BACKGROUND,
56
+ TRANSITION,
57
+ ZINDEX,
58
+ LOC_LABEL,
59
+ VIEW_PROPS,
60
+ ROWS,
61
+ COLUMNS,
62
+ };
63
+
64
+ export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
65
+ export const PARAMS: Params = PARAMS_DEFAULT;
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@vnejs/configs.ts-common/tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules"]
9
+ }