@vnejs/contracts.views.screens.intro 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,9 @@
1
+ export declare const SUBSCRIBE_EVENTS: {
2
+ readonly SHOW: "vne:intro:show";
3
+ readonly HIDE: "vne:intro:hide";
4
+ readonly CLICK: "vne:intro:click";
5
+ readonly UPDATE: "vne:intro:update";
6
+ readonly SKIP: "vne:intro:skip";
7
+ readonly INTERACT: "vne:intro:interact";
8
+ };
9
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/dist/events.js ADDED
@@ -0,0 +1,8 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ SHOW: "vne:intro:show",
3
+ HIDE: "vne:intro:hide",
4
+ CLICK: "vne:intro:click",
5
+ UPDATE: "vne:intro:update",
6
+ SKIP: "vne:intro:skip",
7
+ INTERACT: "vne:intro:interact",
8
+ };
@@ -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: "INTRO";
5
+ export type PluginName = typeof PLUGIN_NAME;
6
+ export { SUBSCRIBE_EVENTS };
7
+ export type { SubscribeEvents } from "./events.js";
8
+ export { PARAMS };
9
+ export type { 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 = "INTRO";
5
+ export { SUBSCRIBE_EVENTS };
6
+ export { PARAMS };
@@ -0,0 +1,62 @@
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 texts: {
8
+ readonly position: PositionBoxProps;
9
+ readonly flex: {
10
+ readonly direction: "column";
11
+ readonly gap: 60;
12
+ };
13
+ readonly text: {
14
+ readonly size: 96;
15
+ };
16
+ };
17
+ readonly hint: {
18
+ readonly position: PositionBoxProps;
19
+ readonly text: {
20
+ readonly size: 60;
21
+ readonly align: "center";
22
+ };
23
+ };
24
+ readonly screen: {
25
+ readonly transition: number;
26
+ readonly zIndex: number;
27
+ };
28
+ };
29
+ export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
30
+ export declare const VIEW_PROPS: ViewProps;
31
+ declare const PARAMS_DEFAULT: {
32
+ BACKGROUND: string;
33
+ TRANSITION: number;
34
+ ZINDEX: number;
35
+ LOC_LABEL: string;
36
+ VIEW_PROPS: {
37
+ texts: {
38
+ position: PositionBoxProps<unknown>;
39
+ flex: {
40
+ direction: "column";
41
+ gap: number;
42
+ };
43
+ text: {
44
+ size: number;
45
+ };
46
+ };
47
+ hint: {
48
+ position: PositionBoxProps<unknown>;
49
+ text: {
50
+ size: number;
51
+ align: "center";
52
+ };
53
+ };
54
+ screen: {
55
+ transition: number;
56
+ zIndex: number;
57
+ };
58
+ };
59
+ };
60
+ export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
61
+ export declare const PARAMS: Params;
62
+ export {};
package/dist/params.js ADDED
@@ -0,0 +1,12 @@
1
+ export const BACKGROUND = "loading";
2
+ export const TRANSITION = 500;
3
+ export const ZINDEX = 2000;
4
+ export const LOC_LABEL = "intro";
5
+ const VIEW_PROPS_DEFAULT = {
6
+ texts: { position: { top: 240, left: 120, right: 720 }, flex: { direction: "column", gap: 60 }, text: { size: 96 } },
7
+ hint: { position: { bottom: 120, left: 120, right: 120 }, text: { size: 60, align: "center" } },
8
+ screen: { transition: TRANSITION, zIndex: ZINDEX },
9
+ };
10
+ export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
11
+ const PARAMS_DEFAULT = { BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS };
12
+ export const PARAMS = PARAMS_DEFAULT;
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@vnejs/contracts.views.screens.intro",
3
+ "version": "0.1.1",
4
+ "description": "Contracts for @vnejs/plugins.views.screens.intro",
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,10 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ SHOW: "vne:intro:show",
3
+ HIDE: "vne:intro:hide",
4
+ CLICK: "vne:intro:click",
5
+ UPDATE: "vne:intro:update",
6
+ SKIP: "vne:intro:skip",
7
+ INTERACT: "vne:intro:interact",
8
+ } as const;
9
+
10
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/src/index.ts ADDED
@@ -0,0 +1,15 @@
1
+ import "@vnejs/shared";
2
+ import { SUBSCRIBE_EVENTS } from "./events.js";
3
+ import { PARAMS } from "./params.js";
4
+
5
+ export const PLUGIN_NAME = "INTRO" as const;
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
+
12
+ declare module "@vnejs/shared" {
13
+ interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
14
+ interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
15
+ }
package/src/params.ts ADDED
@@ -0,0 +1,19 @@
1
+ import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
2
+
3
+ export const BACKGROUND: string = "loading";
4
+ export const TRANSITION: number = 500;
5
+ export const ZINDEX: number = 2000;
6
+ export const LOC_LABEL: string = "intro";
7
+
8
+ const VIEW_PROPS_DEFAULT = {
9
+ texts: { position: { top: 240, left: 120, right: 720 } as PositionBoxProps, flex: { direction: "column" as const, gap: 60 }, text: { size: 96 } },
10
+ hint: { position: { bottom: 120, left: 120, right: 120 } as PositionBoxProps, text: { size: 60, align: "center" as const } },
11
+ screen: { transition: TRANSITION, zIndex: ZINDEX },
12
+ } as const;
13
+
14
+ export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
15
+ export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
16
+
17
+ const PARAMS_DEFAULT = { BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS };
18
+ export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
19
+ 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
+ }