@vnejs/contracts.controllers.screens.history 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 +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 +64 -0
- package/dist/params.js +19 -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 +43 -0
- package/src/params.ts +27 -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 HIDE: "vne:history_view:hide";
|
|
3
|
+
readonly SHOW: "vne:history_view:show";
|
|
4
|
+
readonly CLICK: "vne:history_view:click";
|
|
5
|
+
readonly UPDATE: "vne:history_view:update";
|
|
6
|
+
readonly UPDATE_STATE: "vne:history_view:update_state";
|
|
7
|
+
readonly UPDATE_FAST: "vne:history_view:update_fast";
|
|
8
|
+
readonly UPDATE_FORCE: "vne:history_view:update_force";
|
|
9
|
+
readonly ACCEPT: "vne:history_view:accept";
|
|
10
|
+
};
|
|
11
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const SUBSCRIBE_EVENTS = {
|
|
2
|
+
HIDE: "vne:history_view:hide",
|
|
3
|
+
SHOW: "vne:history_view:show",
|
|
4
|
+
CLICK: "vne:history_view:click",
|
|
5
|
+
UPDATE: "vne:history_view:update",
|
|
6
|
+
UPDATE_STATE: "vne:history_view:update_state",
|
|
7
|
+
UPDATE_FAST: "vne:history_view:update_fast",
|
|
8
|
+
UPDATE_FORCE: "vne:history_view:update_force",
|
|
9
|
+
ACCEPT: "vne:history_view:accept",
|
|
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 { HistoryClickPayload, HistoryForcePayload, HistoryStateUpdatePayload, HistoryUpdatePayload } from "./payloads.js";
|
|
5
|
+
export declare const PLUGIN_NAME: "HISTORY_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 { HistoryClickPayload, HistoryForcePayload, HistoryUpdatePayload, HistoryStateUpdatePayload } 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.HIDE]: HistoryForcePayload;
|
|
19
|
+
[SUBSCRIBE_EVENTS.SHOW]: HistoryForcePayload;
|
|
20
|
+
[SUBSCRIBE_EVENTS.CLICK]: HistoryClickPayload;
|
|
21
|
+
[SUBSCRIBE_EVENTS.UPDATE]: HistoryUpdatePayload;
|
|
22
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: HistoryStateUpdatePayload;
|
|
23
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: HistoryUpdatePayload;
|
|
24
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: HistoryUpdatePayload;
|
|
25
|
+
[SUBSCRIBE_EVENTS.ACCEPT]: void;
|
|
26
|
+
}
|
|
27
|
+
interface VneEventResultMap {
|
|
28
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
29
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
30
|
+
[SUBSCRIBE_EVENTS.CLICK]: void;
|
|
31
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
32
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
33
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
34
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
35
|
+
[SUBSCRIBE_EVENTS.ACCEPT]: void;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/dist/index.js
ADDED
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
export declare const ZINDEX: number;
|
|
3
|
+
export declare const TRANSITION: number;
|
|
4
|
+
export declare const LOC_LABEL: string;
|
|
5
|
+
declare const VIEW_PROPS_DEFAULT: {
|
|
6
|
+
readonly screen: {
|
|
7
|
+
readonly isDisableAutoread: true;
|
|
8
|
+
readonly withBlur: true;
|
|
9
|
+
readonly withDark: true;
|
|
10
|
+
readonly zIndex: number;
|
|
11
|
+
readonly transition: number;
|
|
12
|
+
};
|
|
13
|
+
readonly lines: {
|
|
14
|
+
readonly position: PositionBoxProps;
|
|
15
|
+
readonly controls: {
|
|
16
|
+
readonly wrapHeight: 1800;
|
|
17
|
+
readonly withScrollbar: true;
|
|
18
|
+
readonly flexGap: 36;
|
|
19
|
+
readonly textSize: 60;
|
|
20
|
+
readonly textMarginTop: 36;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly close: {
|
|
24
|
+
readonly position: PositionBoxProps;
|
|
25
|
+
readonly svg: {
|
|
26
|
+
readonly size: 60;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
31
|
+
export declare const VIEW_PROPS: ViewProps;
|
|
32
|
+
declare const PARAMS_DEFAULT: {
|
|
33
|
+
ZINDEX: number;
|
|
34
|
+
TRANSITION: number;
|
|
35
|
+
LOC_LABEL: string;
|
|
36
|
+
VIEW_PROPS: {
|
|
37
|
+
screen: {
|
|
38
|
+
isDisableAutoread: boolean;
|
|
39
|
+
withBlur: boolean;
|
|
40
|
+
withDark: boolean;
|
|
41
|
+
zIndex: number;
|
|
42
|
+
transition: number;
|
|
43
|
+
};
|
|
44
|
+
lines: {
|
|
45
|
+
position: PositionBoxProps<unknown>;
|
|
46
|
+
controls: {
|
|
47
|
+
wrapHeight: number;
|
|
48
|
+
withScrollbar: boolean;
|
|
49
|
+
flexGap: number;
|
|
50
|
+
textSize: number;
|
|
51
|
+
textMarginTop: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
close: {
|
|
55
|
+
position: PositionBoxProps<unknown>;
|
|
56
|
+
svg: {
|
|
57
|
+
size: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
63
|
+
export declare const PARAMS: Params;
|
|
64
|
+
export {};
|
package/dist/params.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const ZINDEX = 2000;
|
|
2
|
+
export const TRANSITION = 300;
|
|
3
|
+
export const LOC_LABEL = "history";
|
|
4
|
+
const VIEW_PROPS_DEFAULT = {
|
|
5
|
+
screen: { isDisableAutoread: true, withBlur: true, withDark: true, zIndex: ZINDEX, transition: TRANSITION },
|
|
6
|
+
lines: {
|
|
7
|
+
position: { left: 120, right: 120, isCenteredVertical: true },
|
|
8
|
+
controls: { wrapHeight: 1800, withScrollbar: true, flexGap: 36, textSize: 60, textMarginTop: 36 },
|
|
9
|
+
},
|
|
10
|
+
close: { position: { top: 90, right: 120 }, svg: { size: 60 } },
|
|
11
|
+
};
|
|
12
|
+
export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
|
|
13
|
+
const PARAMS_DEFAULT = {
|
|
14
|
+
ZINDEX,
|
|
15
|
+
TRANSITION,
|
|
16
|
+
LOC_LABEL,
|
|
17
|
+
VIEW_PROPS,
|
|
18
|
+
};
|
|
19
|
+
export const PARAMS = PARAMS_DEFAULT;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type HistoryClickPayload = {
|
|
2
|
+
uid?: string;
|
|
3
|
+
};
|
|
4
|
+
export type HistoryForcePayload = {
|
|
5
|
+
isForce?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type HistoryUpdatePayload = Record<string, unknown>;
|
|
9
|
+
export type HistoryStateUpdatePayload = 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.history",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.8",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.controllers.screens.history",
|
|
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
|
+
HIDE: "vne:history_view:hide",
|
|
3
|
+
SHOW: "vne:history_view:show",
|
|
4
|
+
CLICK: "vne:history_view:click",
|
|
5
|
+
UPDATE: "vne:history_view:update",
|
|
6
|
+
UPDATE_STATE: "vne:history_view:update_state",
|
|
7
|
+
UPDATE_FAST: "vne:history_view:update_fast",
|
|
8
|
+
UPDATE_FORCE: "vne:history_view:update_force",
|
|
9
|
+
ACCEPT: "vne:history_view:accept",
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "@vnejs/registry";
|
|
2
|
+
|
|
3
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
4
|
+
import { PARAMS } from "./params.js";
|
|
5
|
+
import type { HistoryClickPayload, HistoryForcePayload, HistoryStateUpdatePayload, HistoryUpdatePayload } from "./payloads.js";
|
|
6
|
+
|
|
7
|
+
export const PLUGIN_NAME = "HISTORY_VIEW" as const;
|
|
8
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
9
|
+
|
|
10
|
+
export { SUBSCRIBE_EVENTS };
|
|
11
|
+
export type { SubscribeEvents } from "./events.js";
|
|
12
|
+
export { PARAMS };
|
|
13
|
+
export type { Params, ViewProps } from "./params.js";
|
|
14
|
+
|
|
15
|
+
export type { HistoryClickPayload, HistoryForcePayload, HistoryUpdatePayload, HistoryStateUpdatePayload } from "./payloads.js";
|
|
16
|
+
|
|
17
|
+
declare module "@vnejs/registry" {
|
|
18
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
19
|
+
|
|
20
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
21
|
+
|
|
22
|
+
interface VneEventPayloadMap {
|
|
23
|
+
[SUBSCRIBE_EVENTS.HIDE]: HistoryForcePayload;
|
|
24
|
+
[SUBSCRIBE_EVENTS.SHOW]: HistoryForcePayload;
|
|
25
|
+
[SUBSCRIBE_EVENTS.CLICK]: HistoryClickPayload;
|
|
26
|
+
[SUBSCRIBE_EVENTS.UPDATE]: HistoryUpdatePayload;
|
|
27
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: HistoryStateUpdatePayload;
|
|
28
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: HistoryUpdatePayload;
|
|
29
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: HistoryUpdatePayload;
|
|
30
|
+
[SUBSCRIBE_EVENTS.ACCEPT]: void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface VneEventResultMap {
|
|
34
|
+
[SUBSCRIBE_EVENTS.HIDE]: void;
|
|
35
|
+
[SUBSCRIBE_EVENTS.SHOW]: void;
|
|
36
|
+
[SUBSCRIBE_EVENTS.CLICK]: void;
|
|
37
|
+
[SUBSCRIBE_EVENTS.UPDATE]: void;
|
|
38
|
+
[SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
|
|
39
|
+
[SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
|
|
40
|
+
[SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
|
|
41
|
+
[SUBSCRIBE_EVENTS.ACCEPT]: void;
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/params.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
|
|
2
|
+
|
|
3
|
+
export const ZINDEX: number = 2000;
|
|
4
|
+
export const TRANSITION: number = 300;
|
|
5
|
+
export const LOC_LABEL: string = "history";
|
|
6
|
+
|
|
7
|
+
const VIEW_PROPS_DEFAULT = {
|
|
8
|
+
screen: { isDisableAutoread: true, withBlur: true, withDark: true, zIndex: ZINDEX, transition: TRANSITION },
|
|
9
|
+
lines: {
|
|
10
|
+
position: { left: 120, right: 120, isCenteredVertical: true } as PositionBoxProps,
|
|
11
|
+
controls: { wrapHeight: 1800, withScrollbar: true, flexGap: 36, textSize: 60, textMarginTop: 36 },
|
|
12
|
+
},
|
|
13
|
+
close: { position: { top: 90, right: 120 } as PositionBoxProps, svg: { size: 60 } },
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
|
|
17
|
+
export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
|
|
18
|
+
|
|
19
|
+
const PARAMS_DEFAULT = {
|
|
20
|
+
ZINDEX,
|
|
21
|
+
TRANSITION,
|
|
22
|
+
LOC_LABEL,
|
|
23
|
+
VIEW_PROPS,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
|
|
27
|
+
export const PARAMS: Params = PARAMS_DEFAULT;
|
package/src/payloads.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type HistoryClickPayload = {
|
|
2
|
+
uid?: string;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type HistoryForcePayload = {
|
|
6
|
+
isForce?: boolean;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type HistoryUpdatePayload = Record<string, unknown>;
|
|
11
|
+
|
|
12
|
+
export type HistoryStateUpdatePayload = Record<string, unknown>;
|
package/tsconfig.json
ADDED
package/README.md
DELETED