@vnejs/contracts.controllers.screens.gallery.full 0.0.0-stage → 0.2.8
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 +14 -0
- package/dist/events.js +13 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +6 -0
- package/dist/params.d.ts +50 -0
- package/dist/params.js +11 -0
- package/dist/payloads.d.ts +35 -0
- package/dist/payloads.js +1 -0
- package/package.json +33 -4
- package/src/events.ts +15 -0
- package/src/index.ts +66 -0
- package/src/params.ts +18 -0
- package/src/payloads.ts +44 -0
- package/tsconfig.json +9 -0
- package/README.md +0 -3
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SUBSCRIBE_EVENTS: {
|
|
2
|
+
readonly SHOW: "vne:gallery_full:show";
|
|
3
|
+
readonly HIDE: "vne:gallery_full:hide";
|
|
4
|
+
readonly UPDATE: "vne:gallery_full:update";
|
|
5
|
+
readonly LOAD: "vne:gallery_full:load";
|
|
6
|
+
readonly LOAD_SRC: "vne:gallery_full:load_src";
|
|
7
|
+
readonly NEXT: "vne:gallery_full:next";
|
|
8
|
+
readonly PREV: "vne:gallery_full:prev";
|
|
9
|
+
readonly PAGE_SET: "vne:gallery_full:page_set";
|
|
10
|
+
readonly UPDATE_FAST: "vne:gallery_full:update_fast";
|
|
11
|
+
readonly UPDATE_FORCE: "vne:gallery_full:update_force";
|
|
12
|
+
readonly UPDATE_STATE: "vne:gallery_full:update_state";
|
|
13
|
+
};
|
|
14
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:gallery_full:show",
|
|
3
|
+
HIDE: "vne:gallery_full:hide",
|
|
4
|
+
UPDATE: "vne:gallery_full:update",
|
|
5
|
+
LOAD: "vne:gallery_full:load",
|
|
6
|
+
LOAD_SRC: "vne:gallery_full:load_src",
|
|
7
|
+
NEXT: "vne:gallery_full:next",
|
|
8
|
+
PREV: "vne:gallery_full:prev",
|
|
9
|
+
PAGE_SET: "vne:gallery_full:page_set",
|
|
10
|
+
UPDATE_FAST: "vne:gallery_full:update_fast",
|
|
11
|
+
UPDATE_FORCE: "vne:gallery_full:update_force",
|
|
12
|
+
UPDATE_STATE: "vne:gallery_full:update_state",
|
|
13
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "@vnejs/registry";
|
|
2
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
3
|
+
import { PARAMS } from "./params.js";
|
|
4
|
+
import type { GalleryFullForcePayload, GalleryFullLoadPayload, GalleryFullLoadSrcPayload, GalleryFullLoadSrcResult, GalleryFullPageSetPayload, GalleryFullShowPayload, GalleryFullUpdatePayload } from "./payloads.js";
|
|
5
|
+
export declare const PLUGIN_NAME: "GALLERY_FULL_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 { GalleryFullVariant, GalleryFullShowPayload, GalleryFullChoosePayload, GalleryFullForcePayload, GalleryFullUpdatePayload, GalleryFullLoadPayload, GalleryFullImageSrcItem, GalleryFullLoadSrcPayload, GalleryFullLoadSrcResult, GalleryFullPageSetPayload, } 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]: GalleryFullShowPayload;
|
|
19
|
+
[SUBSCRIBE_EVENTS.HIDE]: GalleryFullForcePayload;
|
|
20
|
+
[SUBSCRIBE_EVENTS.UPDATE]: GalleryFullUpdatePayload;
|
|
21
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: GalleryFullUpdatePayload;
|
|
22
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: GalleryFullUpdatePayload;
|
|
23
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: GalleryFullUpdatePayload;
|
|
24
|
+
[SUBSCRIBE_EVENTS.LOAD]: GalleryFullLoadPayload;
|
|
25
|
+
[SUBSCRIBE_EVENTS.LOAD_SRC]: GalleryFullLoadSrcPayload;
|
|
26
|
+
[SUBSCRIBE_EVENTS.NEXT]: void;
|
|
27
|
+
[SUBSCRIBE_EVENTS.PREV]: void;
|
|
28
|
+
[SUBSCRIBE_EVENTS.PAGE_SET]: GalleryFullPageSetPayload;
|
|
29
|
+
}
|
|
30
|
+
interface VneEventResultMap {
|
|
31
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
32
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
33
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
34
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
35
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
36
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
37
|
+
[SUBSCRIBE_EVENTS.LOAD]: void;
|
|
38
|
+
[SUBSCRIBE_EVENTS.LOAD_SRC]: GalleryFullLoadSrcResult;
|
|
39
|
+
[SUBSCRIBE_EVENTS.NEXT]: void;
|
|
40
|
+
[SUBSCRIBE_EVENTS.PREV]: void;
|
|
41
|
+
[SUBSCRIBE_EVENTS.PAGE_SET]: void;
|
|
42
|
+
}
|
|
43
|
+
}
|
package/dist/index.js
ADDED
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
export declare const TRANSITION: number;
|
|
3
|
+
export declare const ZINDEX: number;
|
|
4
|
+
declare const VIEW_PROPS_DEFAULT: {
|
|
5
|
+
readonly screen: {
|
|
6
|
+
readonly isIgnoreOnScreenshot: true;
|
|
7
|
+
readonly zIndex: number;
|
|
8
|
+
readonly transition: number;
|
|
9
|
+
};
|
|
10
|
+
readonly image: {
|
|
11
|
+
readonly transition: 300;
|
|
12
|
+
};
|
|
13
|
+
readonly close: {
|
|
14
|
+
readonly position: PositionBoxProps;
|
|
15
|
+
readonly props: {
|
|
16
|
+
readonly size: 60;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly pages: {
|
|
20
|
+
readonly position: PositionBoxProps;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
24
|
+
export declare const VIEW_PROPS: ViewProps;
|
|
25
|
+
declare const PARAMS_DEFAULT: {
|
|
26
|
+
TRANSITION: number;
|
|
27
|
+
ZINDEX: number;
|
|
28
|
+
VIEW_PROPS: {
|
|
29
|
+
screen: {
|
|
30
|
+
isIgnoreOnScreenshot: boolean;
|
|
31
|
+
zIndex: number;
|
|
32
|
+
transition: number;
|
|
33
|
+
};
|
|
34
|
+
image: {
|
|
35
|
+
transition: number;
|
|
36
|
+
};
|
|
37
|
+
close: {
|
|
38
|
+
position: PositionBoxProps<unknown>;
|
|
39
|
+
props: {
|
|
40
|
+
size: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
pages: {
|
|
44
|
+
position: PositionBoxProps<unknown>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
49
|
+
export declare const PARAMS: Params;
|
|
50
|
+
export {};
|
package/dist/params.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const TRANSITION = 500;
|
|
2
|
+
export const ZINDEX = 9000;
|
|
3
|
+
const VIEW_PROPS_DEFAULT = {
|
|
4
|
+
screen: { isIgnoreOnScreenshot: true, zIndex: ZINDEX, transition: TRANSITION },
|
|
5
|
+
image: { transition: 300 },
|
|
6
|
+
close: { position: { right: 120, top: 90 }, props: { size: 60 } },
|
|
7
|
+
pages: { position: { bottom: 120, isCenteredHorizontal: true } },
|
|
8
|
+
};
|
|
9
|
+
export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
|
|
10
|
+
const PARAMS_DEFAULT = { TRANSITION, ZINDEX, VIEW_PROPS };
|
|
11
|
+
export const PARAMS = PARAMS_DEFAULT;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type GalleryFullVariant = {
|
|
2
|
+
isOpened?: boolean;
|
|
3
|
+
layerChildType?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
overlays?: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
export type GalleryFullShowPayload = {
|
|
8
|
+
index?: number;
|
|
9
|
+
fullName?: string;
|
|
10
|
+
mediaType?: string;
|
|
11
|
+
layerChildType?: string;
|
|
12
|
+
isOpened?: boolean;
|
|
13
|
+
variants?: GalleryFullVariant[];
|
|
14
|
+
isForce?: boolean;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type GalleryFullChoosePayload = GalleryFullShowPayload;
|
|
18
|
+
export type GalleryFullLoadPayload = {
|
|
19
|
+
pageIndex?: number;
|
|
20
|
+
};
|
|
21
|
+
export type GalleryFullPageSetPayload = {
|
|
22
|
+
pageIndex?: number;
|
|
23
|
+
};
|
|
24
|
+
export type GalleryFullImageSrcItem = {
|
|
25
|
+
url: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
transition: number;
|
|
28
|
+
};
|
|
29
|
+
export type GalleryFullLoadSrcPayload = GalleryFullVariant;
|
|
30
|
+
export type GalleryFullLoadSrcResult = string | GalleryFullImageSrcItem[];
|
|
31
|
+
export type GalleryFullForcePayload = {
|
|
32
|
+
isForce?: boolean;
|
|
33
|
+
onClose?: () => void;
|
|
34
|
+
};
|
|
35
|
+
export type GalleryFullUpdatePayload = 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.gallery.full",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.8",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.controllers.screens.gallery.full",
|
|
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,15 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
SHOW: "vne:gallery_full:show",
|
|
3
|
+
HIDE: "vne:gallery_full:hide",
|
|
4
|
+
UPDATE: "vne:gallery_full:update",
|
|
5
|
+
LOAD: "vne:gallery_full:load",
|
|
6
|
+
LOAD_SRC: "vne:gallery_full:load_src",
|
|
7
|
+
NEXT: "vne:gallery_full:next",
|
|
8
|
+
PREV: "vne:gallery_full:prev",
|
|
9
|
+
PAGE_SET: "vne:gallery_full:page_set",
|
|
10
|
+
UPDATE_FAST: "vne:gallery_full:update_fast",
|
|
11
|
+
UPDATE_FORCE: "vne:gallery_full:update_force",
|
|
12
|
+
UPDATE_STATE: "vne:gallery_full:update_state",
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "@vnejs/registry";
|
|
2
|
+
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
import type {
|
|
6
|
+
GalleryFullForcePayload,
|
|
7
|
+
GalleryFullLoadPayload,
|
|
8
|
+
GalleryFullLoadSrcPayload,
|
|
9
|
+
GalleryFullLoadSrcResult,
|
|
10
|
+
GalleryFullPageSetPayload,
|
|
11
|
+
GalleryFullShowPayload,
|
|
12
|
+
GalleryFullUpdatePayload,
|
|
13
|
+
} from "./payloads.js";
|
|
14
|
+
|
|
15
|
+
export const PLUGIN_NAME = "GALLERY_FULL_VIEW" as const;
|
|
16
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
17
|
+
export { SUBSCRIBE_EVENTS };
|
|
18
|
+
export type { SubscribeEvents } from "./events.js";
|
|
19
|
+
export { PARAMS };
|
|
20
|
+
export type { Params, ViewProps } from "./params.js";
|
|
21
|
+
|
|
22
|
+
export type {
|
|
23
|
+
GalleryFullVariant,
|
|
24
|
+
GalleryFullShowPayload,
|
|
25
|
+
GalleryFullChoosePayload,
|
|
26
|
+
GalleryFullForcePayload,
|
|
27
|
+
GalleryFullUpdatePayload,
|
|
28
|
+
GalleryFullLoadPayload,
|
|
29
|
+
GalleryFullImageSrcItem,
|
|
30
|
+
GalleryFullLoadSrcPayload,
|
|
31
|
+
GalleryFullLoadSrcResult,
|
|
32
|
+
GalleryFullPageSetPayload,
|
|
33
|
+
} from "./payloads.js";
|
|
34
|
+
|
|
35
|
+
declare module "@vnejs/registry" {
|
|
36
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
37
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
38
|
+
|
|
39
|
+
interface VneEventPayloadMap {
|
|
40
|
+
[SUBSCRIBE_EVENTS.SHOW]: GalleryFullShowPayload;
|
|
41
|
+
[SUBSCRIBE_EVENTS.HIDE]: GalleryFullForcePayload;
|
|
42
|
+
[SUBSCRIBE_EVENTS.UPDATE]: GalleryFullUpdatePayload;
|
|
43
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: GalleryFullUpdatePayload;
|
|
44
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: GalleryFullUpdatePayload;
|
|
45
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: GalleryFullUpdatePayload;
|
|
46
|
+
[SUBSCRIBE_EVENTS.LOAD]: GalleryFullLoadPayload;
|
|
47
|
+
[SUBSCRIBE_EVENTS.LOAD_SRC]: GalleryFullLoadSrcPayload;
|
|
48
|
+
[SUBSCRIBE_EVENTS.NEXT]: void;
|
|
49
|
+
[SUBSCRIBE_EVENTS.PREV]: void;
|
|
50
|
+
[SUBSCRIBE_EVENTS.PAGE_SET]: GalleryFullPageSetPayload;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface VneEventResultMap {
|
|
54
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
55
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
56
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
57
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
58
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
59
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
60
|
+
[SUBSCRIBE_EVENTS.LOAD]: void;
|
|
61
|
+
[SUBSCRIBE_EVENTS.LOAD_SRC]: GalleryFullLoadSrcResult;
|
|
62
|
+
[SUBSCRIBE_EVENTS.NEXT]: void;
|
|
63
|
+
[SUBSCRIBE_EVENTS.PREV]: void;
|
|
64
|
+
[SUBSCRIBE_EVENTS.PAGE_SET]: void;
|
|
65
|
+
}
|
|
66
|
+
}
|
package/src/params.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
|
|
3
|
+
export const TRANSITION: number = 500;
|
|
4
|
+
export const ZINDEX: number = 9000;
|
|
5
|
+
|
|
6
|
+
const VIEW_PROPS_DEFAULT = {
|
|
7
|
+
screen: { isIgnoreOnScreenshot: true, zIndex: ZINDEX, transition: TRANSITION },
|
|
8
|
+
image: { transition: 300 },
|
|
9
|
+
close: { position: { right: 120, top: 90 } as PositionBoxProps, props: { size: 60 } },
|
|
10
|
+
pages: { position: { bottom: 120, isCenteredHorizontal: true } as PositionBoxProps },
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
14
|
+
export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
|
|
15
|
+
|
|
16
|
+
const PARAMS_DEFAULT = { TRANSITION, ZINDEX, VIEW_PROPS };
|
|
17
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
18
|
+
export const PARAMS: Params = PARAMS_DEFAULT;
|
package/src/payloads.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type GalleryFullVariant = {
|
|
2
|
+
isOpened?: boolean;
|
|
3
|
+
layerChildType?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
overlays?: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type GalleryFullShowPayload = {
|
|
9
|
+
index?: number;
|
|
10
|
+
fullName?: string;
|
|
11
|
+
mediaType?: string;
|
|
12
|
+
layerChildType?: string;
|
|
13
|
+
isOpened?: boolean;
|
|
14
|
+
variants?: GalleryFullVariant[];
|
|
15
|
+
isForce?: boolean;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type GalleryFullChoosePayload = GalleryFullShowPayload;
|
|
20
|
+
|
|
21
|
+
export type GalleryFullLoadPayload = {
|
|
22
|
+
pageIndex?: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type GalleryFullPageSetPayload = {
|
|
26
|
+
pageIndex?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type GalleryFullImageSrcItem = {
|
|
30
|
+
url: string;
|
|
31
|
+
duration: number;
|
|
32
|
+
transition: number;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type GalleryFullLoadSrcPayload = GalleryFullVariant;
|
|
36
|
+
|
|
37
|
+
export type GalleryFullLoadSrcResult = string | GalleryFullImageSrcItem[];
|
|
38
|
+
|
|
39
|
+
export type GalleryFullForcePayload = {
|
|
40
|
+
isForce?: boolean;
|
|
41
|
+
onClose?: () => void;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type GalleryFullUpdatePayload = Record<string, unknown>;
|
package/tsconfig.json
ADDED
package/README.md
DELETED