@vnejs/plugins.views.screens.loading.contract 0.0.2

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,7 @@
1
+ export declare const SUBSCRIBE_EVENTS: {
2
+ readonly SHOW: "vne:loading:show";
3
+ readonly HIDE: "vne:loading:hide";
4
+ readonly EMIT: "vne:loading:emit";
5
+ readonly UPDATE: "vne:loading:update";
6
+ };
7
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/dist/events.js ADDED
@@ -0,0 +1,6 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ SHOW: "vne:loading:show",
3
+ HIDE: "vne:loading:hide",
4
+ EMIT: "vne:loading:emit",
5
+ UPDATE: "vne:loading:update",
6
+ };
@@ -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: "LOADING";
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 = "LOADING";
5
+ export { SUBSCRIBE_EVENTS };
6
+ export { PARAMS };
@@ -0,0 +1,44 @@
1
+ import type { Widen } from "@vnejs/shared";
2
+ export declare const MIN_SHOW_TIME: number;
3
+ export declare const BACKGROUND: string;
4
+ export declare const TRANSITION: number;
5
+ export declare const ZINDEX: number;
6
+ export declare const LOC_LABEL: string;
7
+ declare const VIEW_PROPS_DEFAULT: {
8
+ readonly position: {
9
+ readonly bottom: 120;
10
+ readonly right: 120;
11
+ };
12
+ readonly text: {
13
+ readonly size: 144;
14
+ };
15
+ readonly screen: {
16
+ readonly transition: number;
17
+ readonly zIndex: number;
18
+ };
19
+ };
20
+ export type ViewProps = Widen<typeof VIEW_PROPS_DEFAULT>;
21
+ export declare const VIEW_PROPS: ViewProps;
22
+ declare const PARAMS_DEFAULT: {
23
+ MIN_SHOW_TIME: number;
24
+ BACKGROUND: string;
25
+ TRANSITION: number;
26
+ ZINDEX: number;
27
+ LOC_LABEL: string;
28
+ VIEW_PROPS: {
29
+ position: {
30
+ bottom: number;
31
+ right: number;
32
+ };
33
+ text: {
34
+ size: number;
35
+ };
36
+ screen: {
37
+ transition: number;
38
+ zIndex: number;
39
+ };
40
+ };
41
+ };
42
+ export type Params = Widen<typeof PARAMS_DEFAULT>;
43
+ export declare const PARAMS: Params;
44
+ export {};
package/dist/params.js ADDED
@@ -0,0 +1,13 @@
1
+ export const MIN_SHOW_TIME = 200;
2
+ export const BACKGROUND = "loading";
3
+ export const TRANSITION = 500;
4
+ export const ZINDEX = 10000;
5
+ export const LOC_LABEL = "loading";
6
+ const VIEW_PROPS_DEFAULT = {
7
+ position: { bottom: 120, right: 120 },
8
+ text: { size: 144 },
9
+ screen: { transition: TRANSITION, zIndex: ZINDEX },
10
+ };
11
+ export const VIEW_PROPS = VIEW_PROPS_DEFAULT;
12
+ const PARAMS_DEFAULT = { MIN_SHOW_TIME, BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS };
13
+ export const PARAMS = PARAMS_DEFAULT;
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@vnejs/plugins.views.screens.loading.contract",
3
+ "version": "0.0.2",
4
+ "description": "Contracts for @vnejs/plugins.views.screens.loading",
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.0.9"
30
+ },
31
+ "devDependencies": {
32
+ "@vnejs/configs.ts-common": "~0.0.1"
33
+ }
34
+ }
package/src/events.ts ADDED
@@ -0,0 +1,8 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ SHOW: "vne:loading:show",
3
+ HIDE: "vne:loading:hide",
4
+ EMIT: "vne:loading:emit",
5
+ UPDATE: "vne:loading:update",
6
+ } as const;
7
+
8
+ 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 = "LOADING" 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,20 @@
1
+ import type { Widen } from "@vnejs/shared";
2
+
3
+ export const MIN_SHOW_TIME: number = 200;
4
+ export const BACKGROUND: string = "loading";
5
+ export const TRANSITION: number = 500;
6
+ export const ZINDEX: number = 10000;
7
+ export const LOC_LABEL: string = "loading";
8
+
9
+ const VIEW_PROPS_DEFAULT = {
10
+ position: { bottom: 120, right: 120 },
11
+ text: { size: 144 },
12
+ screen: { transition: TRANSITION, zIndex: ZINDEX },
13
+ } as const;
14
+
15
+ export type ViewProps = Widen<typeof VIEW_PROPS_DEFAULT>;
16
+ export const VIEW_PROPS: ViewProps = VIEW_PROPS_DEFAULT;
17
+
18
+ const PARAMS_DEFAULT = { MIN_SHOW_TIME, BACKGROUND, TRANSITION, ZINDEX, LOC_LABEL, VIEW_PROPS };
19
+ export type Params = Widen<typeof PARAMS_DEFAULT>;
20
+ 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
+ }