@vnejs/contracts.views.screens.gallery 0.2.8 → 0.2.10

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 CHANGED
@@ -3,13 +3,20 @@ export declare const SUBSCRIBE_EVENTS: {
3
3
  readonly CHECK: "vne:gallery:check";
4
4
  readonly CLEAR: "vne:gallery:clear";
5
5
  readonly SHOW: "vne:gallery:show";
6
+ readonly SHOW_BEFORE: "vne:gallery:show_before";
6
7
  readonly HIDE: "vne:gallery:hide";
7
8
  readonly PAGE_SET: "vne:gallery:page_set";
8
9
  readonly TAB_SET: "vne:gallery:tab_set";
9
10
  readonly UPDATE: "vne:gallery:update";
11
+ readonly UPDATE_FAST: "vne:gallery:update_fast";
10
12
  readonly PRELOAD: "vne:gallery:preload";
11
13
  readonly CHOOSE: "vne:gallery:choose";
12
14
  readonly ACCEPT: "vne:gallery:accept";
13
15
  readonly STATE_UPDATE: "vne:gallery:state_update";
16
+ readonly GRID_NEXT: "vne:gallery:grid_next";
17
+ readonly GRID_PREV: "vne:gallery:grid_prev";
18
+ readonly GRID_CLEAR: "vne:gallery:grid_clear";
19
+ readonly GRID_UPDATE_ITEMS: "vne:gallery:grid_update_items";
20
+ readonly PAGE_ITEMS_GET: "vne:gallery:page_items_get";
14
21
  };
15
22
  export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/dist/events.js CHANGED
@@ -3,12 +3,19 @@ export const SUBSCRIBE_EVENTS = {
3
3
  CHECK: "vne:gallery:check",
4
4
  CLEAR: "vne:gallery:clear",
5
5
  SHOW: "vne:gallery:show",
6
+ SHOW_BEFORE: "vne:gallery:show_before",
6
7
  HIDE: "vne:gallery:hide",
7
8
  PAGE_SET: "vne:gallery:page_set",
8
9
  TAB_SET: "vne:gallery:tab_set",
9
10
  UPDATE: "vne:gallery:update",
11
+ UPDATE_FAST: "vne:gallery:update_fast",
10
12
  PRELOAD: "vne:gallery:preload",
11
13
  CHOOSE: "vne:gallery:choose",
12
14
  ACCEPT: "vne:gallery:accept",
13
15
  STATE_UPDATE: "vne:gallery:state_update",
16
+ GRID_NEXT: "vne:gallery:grid_next",
17
+ GRID_PREV: "vne:gallery:grid_prev",
18
+ GRID_CLEAR: "vne:gallery:grid_clear",
19
+ GRID_UPDATE_ITEMS: "vne:gallery:grid_update_items",
20
+ PAGE_ITEMS_GET: "vne:gallery:page_items_get",
14
21
  };
package/dist/index.d.ts CHANGED
@@ -1,15 +1,59 @@
1
1
  import "@vnejs/shared";
2
2
  import { SUBSCRIBE_EVENTS } from "./events.js";
3
3
  import { PARAMS } from "./params.js";
4
+ import type { GalleryCheckPayload, GalleryChoosePayload, GalleryForcePayload, GalleryMapTabContentPayload, GalleryOpenPayload, GalleryPageItemsGetResult, GalleryPageSetPayload, GalleryStateUpdatePayload, GalleryTabSetPayload, GalleryUpdatePayload } from "./payloads.js";
4
5
  export declare const PLUGIN_NAME: "GALLERY";
5
6
  export type PluginName = typeof PLUGIN_NAME;
6
7
  export { SUBSCRIBE_EVENTS };
7
8
  export type { SubscribeEvents } from "./events.js";
8
9
  export { PARAMS };
9
10
  export type { GalleryTab, GalleryTabContent, GalleryTabContentVariation, GalleryTabs, Params, ViewProps } from "./params.js";
11
+ export type { GalleryOpenPayload, GalleryCheckPayload, GalleryPageSetPayload, GalleryTabSetPayload, GalleryCurrentVariant, GalleryChoosePayload, GalleryMapTabContentPayload, GalleryPageItemsGetResult, GalleryForcePayload, GalleryUpdatePayload, GalleryStateUpdatePayload, } from "./payloads.js";
10
12
  declare module "@vnejs/shared" {
11
13
  interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
12
14
  }
13
15
  interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
14
16
  }
17
+ interface VneEventPayloadMap {
18
+ [SUBSCRIBE_EVENTS.OPEN]: GalleryOpenPayload;
19
+ [SUBSCRIBE_EVENTS.CHECK]: GalleryCheckPayload;
20
+ [SUBSCRIBE_EVENTS.CLEAR]: void;
21
+ [SUBSCRIBE_EVENTS.SHOW]: GalleryForcePayload;
22
+ [SUBSCRIBE_EVENTS.SHOW_BEFORE]: void;
23
+ [SUBSCRIBE_EVENTS.HIDE]: GalleryForcePayload;
24
+ [SUBSCRIBE_EVENTS.PAGE_SET]: GalleryPageSetPayload;
25
+ [SUBSCRIBE_EVENTS.TAB_SET]: GalleryTabSetPayload;
26
+ [SUBSCRIBE_EVENTS.UPDATE]: GalleryUpdatePayload;
27
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: GalleryUpdatePayload;
28
+ [SUBSCRIBE_EVENTS.PRELOAD]: void;
29
+ [SUBSCRIBE_EVENTS.CHOOSE]: GalleryChoosePayload;
30
+ [SUBSCRIBE_EVENTS.ACCEPT]: void;
31
+ [SUBSCRIBE_EVENTS.STATE_UPDATE]: GalleryStateUpdatePayload;
32
+ [SUBSCRIBE_EVENTS.GRID_NEXT]: void;
33
+ [SUBSCRIBE_EVENTS.GRID_PREV]: void;
34
+ [SUBSCRIBE_EVENTS.GRID_CLEAR]: void;
35
+ [SUBSCRIBE_EVENTS.GRID_UPDATE_ITEMS]: void;
36
+ [SUBSCRIBE_EVENTS.PAGE_ITEMS_GET]: GalleryMapTabContentPayload;
37
+ }
38
+ interface VneEventResultMap {
39
+ [SUBSCRIBE_EVENTS.OPEN]: void;
40
+ [SUBSCRIBE_EVENTS.CHECK]: boolean;
41
+ [SUBSCRIBE_EVENTS.CLEAR]: void;
42
+ [SUBSCRIBE_EVENTS.SHOW]: void;
43
+ [SUBSCRIBE_EVENTS.SHOW_BEFORE]: void;
44
+ [SUBSCRIBE_EVENTS.HIDE]: void;
45
+ [SUBSCRIBE_EVENTS.PAGE_SET]: void;
46
+ [SUBSCRIBE_EVENTS.TAB_SET]: void;
47
+ [SUBSCRIBE_EVENTS.UPDATE]: void;
48
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
49
+ [SUBSCRIBE_EVENTS.PRELOAD]: void;
50
+ [SUBSCRIBE_EVENTS.CHOOSE]: void;
51
+ [SUBSCRIBE_EVENTS.ACCEPT]: void;
52
+ [SUBSCRIBE_EVENTS.STATE_UPDATE]: void;
53
+ [SUBSCRIBE_EVENTS.GRID_NEXT]: void;
54
+ [SUBSCRIBE_EVENTS.GRID_PREV]: void;
55
+ [SUBSCRIBE_EVENTS.GRID_CLEAR]: void;
56
+ [SUBSCRIBE_EVENTS.GRID_UPDATE_ITEMS]: void;
57
+ [SUBSCRIBE_EVENTS.PAGE_ITEMS_GET]: GalleryPageItemsGetResult;
58
+ }
15
59
  }
@@ -0,0 +1,45 @@
1
+ import type { GalleryTabContent } from "./params.js";
2
+ export type GalleryOpenPayload = {
3
+ key?: string;
4
+ };
5
+ export type GalleryCheckPayload = {
6
+ key?: string;
7
+ };
8
+ export type GalleryPageSetPayload = {
9
+ pageIndex?: number;
10
+ };
11
+ export type GalleryTabSetPayload = {
12
+ tab?: string;
13
+ isForce?: boolean;
14
+ isUpdateView?: boolean;
15
+ };
16
+ export type GalleryCurrentVariant = {
17
+ isOpened: boolean;
18
+ layerChildType?: string;
19
+ name?: string;
20
+ overlays?: Record<string, string>;
21
+ };
22
+ export type GalleryChoosePayload = {
23
+ index?: number;
24
+ fullName?: string;
25
+ mediaType?: string;
26
+ layerChildType?: string;
27
+ isOpened?: boolean;
28
+ variants?: GalleryCurrentVariant[];
29
+ };
30
+ export type GalleryMapTabContentPayload = GalleryTabContent;
31
+ export type GalleryPageItemsGetResult = {
32
+ isStub?: boolean;
33
+ isOpened?: boolean;
34
+ layerChildType?: string;
35
+ fullName?: string;
36
+ src?: string;
37
+ mediaType?: string;
38
+ variants?: GalleryCurrentVariant[];
39
+ };
40
+ export type GalleryForcePayload = {
41
+ isForce?: boolean;
42
+ onClose?: () => void;
43
+ };
44
+ export type GalleryUpdatePayload = Record<string, unknown>;
45
+ export type GalleryStateUpdatePayload = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/contracts.views.screens.gallery",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Contracts for @vnejs/plugins.views.screens.gallery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/events.ts CHANGED
@@ -4,14 +4,21 @@ export const SUBSCRIBE_EVENTS = {
4
4
  CLEAR: "vne:gallery:clear",
5
5
 
6
6
  SHOW: "vne:gallery:show",
7
+ SHOW_BEFORE: "vne:gallery:show_before",
7
8
  HIDE: "vne:gallery:hide",
8
9
  PAGE_SET: "vne:gallery:page_set",
9
10
  TAB_SET: "vne:gallery:tab_set",
10
11
  UPDATE: "vne:gallery:update",
12
+ UPDATE_FAST: "vne:gallery:update_fast",
11
13
  PRELOAD: "vne:gallery:preload",
12
14
  CHOOSE: "vne:gallery:choose",
13
15
  ACCEPT: "vne:gallery:accept",
14
16
  STATE_UPDATE: "vne:gallery:state_update",
17
+ GRID_NEXT: "vne:gallery:grid_next",
18
+ GRID_PREV: "vne:gallery:grid_prev",
19
+ GRID_CLEAR: "vne:gallery:grid_clear",
20
+ GRID_UPDATE_ITEMS: "vne:gallery:grid_update_items",
21
+ PAGE_ITEMS_GET: "vne:gallery:page_items_get",
15
22
  } as const;
16
23
 
17
24
  export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/src/index.ts CHANGED
@@ -2,6 +2,18 @@ import "@vnejs/shared";
2
2
 
3
3
  import { SUBSCRIBE_EVENTS } from "./events.js";
4
4
  import { PARAMS } from "./params.js";
5
+ import type {
6
+ GalleryCheckPayload,
7
+ GalleryChoosePayload,
8
+ GalleryForcePayload,
9
+ GalleryMapTabContentPayload,
10
+ GalleryOpenPayload,
11
+ GalleryPageItemsGetResult,
12
+ GalleryPageSetPayload,
13
+ GalleryStateUpdatePayload,
14
+ GalleryTabSetPayload,
15
+ GalleryUpdatePayload,
16
+ } from "./payloads.js";
5
17
 
6
18
  export const PLUGIN_NAME = "GALLERY" as const;
7
19
  export type PluginName = typeof PLUGIN_NAME;
@@ -11,8 +23,66 @@ export type { SubscribeEvents } from "./events.js";
11
23
  export { PARAMS };
12
24
  export type { GalleryTab, GalleryTabContent, GalleryTabContentVariation, GalleryTabs, Params, ViewProps } from "./params.js";
13
25
 
26
+ export type {
27
+ GalleryOpenPayload,
28
+ GalleryCheckPayload,
29
+ GalleryPageSetPayload,
30
+ GalleryTabSetPayload,
31
+ GalleryCurrentVariant,
32
+ GalleryChoosePayload,
33
+ GalleryMapTabContentPayload,
34
+ GalleryPageItemsGetResult,
35
+ GalleryForcePayload,
36
+ GalleryUpdatePayload,
37
+ GalleryStateUpdatePayload,
38
+ } from "./payloads.js";
39
+
14
40
  declare module "@vnejs/shared" {
15
41
  interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
16
42
 
17
43
  interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
44
+
45
+ interface VneEventPayloadMap {
46
+ [SUBSCRIBE_EVENTS.OPEN]: GalleryOpenPayload;
47
+ [SUBSCRIBE_EVENTS.CHECK]: GalleryCheckPayload;
48
+ [SUBSCRIBE_EVENTS.CLEAR]: void;
49
+ [SUBSCRIBE_EVENTS.SHOW]: GalleryForcePayload;
50
+ [SUBSCRIBE_EVENTS.SHOW_BEFORE]: void;
51
+ [SUBSCRIBE_EVENTS.HIDE]: GalleryForcePayload;
52
+ [SUBSCRIBE_EVENTS.PAGE_SET]: GalleryPageSetPayload;
53
+ [SUBSCRIBE_EVENTS.TAB_SET]: GalleryTabSetPayload;
54
+ [SUBSCRIBE_EVENTS.UPDATE]: GalleryUpdatePayload;
55
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: GalleryUpdatePayload;
56
+ [SUBSCRIBE_EVENTS.PRELOAD]: void;
57
+ [SUBSCRIBE_EVENTS.CHOOSE]: GalleryChoosePayload;
58
+ [SUBSCRIBE_EVENTS.ACCEPT]: void;
59
+ [SUBSCRIBE_EVENTS.STATE_UPDATE]: GalleryStateUpdatePayload;
60
+ [SUBSCRIBE_EVENTS.GRID_NEXT]: void;
61
+ [SUBSCRIBE_EVENTS.GRID_PREV]: void;
62
+ [SUBSCRIBE_EVENTS.GRID_CLEAR]: void;
63
+ [SUBSCRIBE_EVENTS.GRID_UPDATE_ITEMS]: void;
64
+ [SUBSCRIBE_EVENTS.PAGE_ITEMS_GET]: GalleryMapTabContentPayload;
65
+ }
66
+
67
+ interface VneEventResultMap {
68
+ [SUBSCRIBE_EVENTS.OPEN]: void;
69
+ [SUBSCRIBE_EVENTS.CHECK]: boolean;
70
+ [SUBSCRIBE_EVENTS.CLEAR]: void;
71
+ [SUBSCRIBE_EVENTS.SHOW]: void;
72
+ [SUBSCRIBE_EVENTS.SHOW_BEFORE]: void;
73
+ [SUBSCRIBE_EVENTS.HIDE]: void;
74
+ [SUBSCRIBE_EVENTS.PAGE_SET]: void;
75
+ [SUBSCRIBE_EVENTS.TAB_SET]: void;
76
+ [SUBSCRIBE_EVENTS.UPDATE]: void;
77
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
78
+ [SUBSCRIBE_EVENTS.PRELOAD]: void;
79
+ [SUBSCRIBE_EVENTS.CHOOSE]: void;
80
+ [SUBSCRIBE_EVENTS.ACCEPT]: void;
81
+ [SUBSCRIBE_EVENTS.STATE_UPDATE]: void;
82
+ [SUBSCRIBE_EVENTS.GRID_NEXT]: void;
83
+ [SUBSCRIBE_EVENTS.GRID_PREV]: void;
84
+ [SUBSCRIBE_EVENTS.GRID_CLEAR]: void;
85
+ [SUBSCRIBE_EVENTS.GRID_UPDATE_ITEMS]: void;
86
+ [SUBSCRIBE_EVENTS.PAGE_ITEMS_GET]: GalleryPageItemsGetResult;
87
+ }
18
88
  }
@@ -0,0 +1,56 @@
1
+ import type { GalleryTabContent } from "./params.js";
2
+
3
+ export type GalleryOpenPayload = {
4
+ key?: string;
5
+ };
6
+
7
+ export type GalleryCheckPayload = {
8
+ key?: string;
9
+ };
10
+
11
+ export type GalleryPageSetPayload = {
12
+ pageIndex?: number;
13
+ };
14
+
15
+ export type GalleryTabSetPayload = {
16
+ tab?: string;
17
+ isForce?: boolean;
18
+ isUpdateView?: boolean;
19
+ };
20
+
21
+ export type GalleryCurrentVariant = {
22
+ isOpened: boolean;
23
+ layerChildType?: string;
24
+ name?: string;
25
+ overlays?: Record<string, string>;
26
+ };
27
+
28
+ export type GalleryChoosePayload = {
29
+ index?: number;
30
+ fullName?: string;
31
+ mediaType?: string;
32
+ layerChildType?: string;
33
+ isOpened?: boolean;
34
+ variants?: GalleryCurrentVariant[];
35
+ };
36
+
37
+ export type GalleryMapTabContentPayload = GalleryTabContent;
38
+
39
+ export type GalleryPageItemsGetResult = {
40
+ isStub?: boolean;
41
+ isOpened?: boolean;
42
+ layerChildType?: string;
43
+ fullName?: string;
44
+ src?: string;
45
+ mediaType?: string;
46
+ variants?: GalleryCurrentVariant[];
47
+ };
48
+
49
+ export type GalleryForcePayload = {
50
+ isForce?: boolean;
51
+ onClose?: () => void;
52
+ };
53
+
54
+ export type GalleryUpdatePayload = Record<string, unknown>;
55
+
56
+ export type GalleryStateUpdatePayload = Record<string, unknown>;