@vnejs/contracts.controllers.screens.loading 0.0.0-stage → 0.2.9

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,11 @@
1
+ export declare const LOGS_ACTIONS: {
2
+ readonly START: "start";
3
+ readonly FINISH: "finish";
4
+ };
5
+ export declare const CONSTANTS: {
6
+ readonly LOGS_ACTIONS: {
7
+ readonly START: "start";
8
+ readonly FINISH: "finish";
9
+ };
10
+ };
11
+ export type Constants = typeof CONSTANTS;
package/dist/const.js ADDED
@@ -0,0 +1,7 @@
1
+ export const LOGS_ACTIONS = {
2
+ START: "start",
3
+ FINISH: "finish",
4
+ };
5
+ export const CONSTANTS = {
6
+ LOGS_ACTIONS,
7
+ };
@@ -0,0 +1,10 @@
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
+ readonly UPDATE_FAST: "vne:loading:update_fast";
7
+ readonly UPDATE_FORCE: "vne:loading:update_force";
8
+ readonly UPDATE_STATE: "vne:loading:update_state";
9
+ };
10
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/dist/events.js ADDED
@@ -0,0 +1,9 @@
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
+ UPDATE_FAST: "vne:loading:update_fast",
7
+ UPDATE_FORCE: "vne:loading:update_force",
8
+ UPDATE_STATE: "vne:loading:update_state",
9
+ };
@@ -0,0 +1,40 @@
1
+ import "@vnejs/registry";
2
+ import { CONSTANTS, LOGS_ACTIONS } from "./const.js";
3
+ import { SUBSCRIBE_EVENTS } from "./events.js";
4
+ import { PARAMS } from "./params.js";
5
+ import type { LoadingEmitPayload, LoadingForcePayload, LoadingStateUpdatePayload, LoadingUpdatePayload } from "./payloads.js";
6
+ export declare const PLUGIN_NAME: "LOADING";
7
+ export type PluginName = typeof PLUGIN_NAME;
8
+ export { CONSTANTS, LOGS_ACTIONS };
9
+ export type { Constants } from "./const.js";
10
+ export { SUBSCRIBE_EVENTS };
11
+ export type { SubscribeEvents } from "./events.js";
12
+ export { PARAMS };
13
+ export type { Params, ViewProps } from "./params.js";
14
+ export type { LoadingEmitPayload, LoadingForcePayload, LoadingUpdatePayload, LoadingStateUpdatePayload } from "./payloads.js";
15
+ declare module "@vnejs/registry" {
16
+ interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
17
+ }
18
+ interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {
19
+ }
20
+ interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
21
+ }
22
+ interface VneEventPayloadMap {
23
+ [SUBSCRIBE_EVENTS.SHOW]: LoadingForcePayload;
24
+ [SUBSCRIBE_EVENTS.HIDE]: LoadingForcePayload;
25
+ [SUBSCRIBE_EVENTS.EMIT]: LoadingEmitPayload;
26
+ [SUBSCRIBE_EVENTS.UPDATE]: LoadingUpdatePayload;
27
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: LoadingUpdatePayload;
28
+ [SUBSCRIBE_EVENTS.UPDATE_FORCE]: LoadingUpdatePayload;
29
+ [SUBSCRIBE_EVENTS.UPDATE_STATE]: LoadingStateUpdatePayload;
30
+ }
31
+ interface VneEventResultMap {
32
+ [SUBSCRIBE_EVENTS.SHOW]: void;
33
+ [SUBSCRIBE_EVENTS.HIDE]: void;
34
+ [SUBSCRIBE_EVENTS.EMIT]: void;
35
+ [SUBSCRIBE_EVENTS.UPDATE]: void;
36
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
37
+ [SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
38
+ [SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
39
+ }
40
+ }
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import "@vnejs/registry";
2
+ import { CONSTANTS, LOGS_ACTIONS } from "./const.js";
3
+ import { SUBSCRIBE_EVENTS } from "./events.js";
4
+ import { PARAMS } from "./params.js";
5
+ export const PLUGIN_NAME = "LOADING";
6
+ export { CONSTANTS, LOGS_ACTIONS };
7
+ export { SUBSCRIBE_EVENTS };
8
+ export { PARAMS };
@@ -0,0 +1,38 @@
1
+ import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
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: PositionBoxProps;
9
+ readonly text: {
10
+ readonly size: 144;
11
+ };
12
+ readonly screen: {
13
+ readonly transition: number;
14
+ readonly zIndex: number;
15
+ };
16
+ };
17
+ export type ViewProps = WidenViewProps<typeof VIEW_PROPS_DEFAULT>;
18
+ export declare const VIEW_PROPS: ViewProps;
19
+ declare const PARAMS_DEFAULT: {
20
+ MIN_SHOW_TIME: number;
21
+ BACKGROUND: string;
22
+ TRANSITION: number;
23
+ ZINDEX: number;
24
+ LOC_LABEL: string;
25
+ VIEW_PROPS: {
26
+ position: PositionBoxProps<unknown>;
27
+ text: {
28
+ size: number;
29
+ };
30
+ screen: {
31
+ readonly transition: number;
32
+ readonly zIndex: number;
33
+ };
34
+ };
35
+ };
36
+ export type Params = WidenViewProps<typeof PARAMS_DEFAULT>;
37
+ export declare const PARAMS: Params;
38
+ 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;
@@ -0,0 +1,10 @@
1
+ export type LoadingEmitPayload = {
2
+ promiseFunc?: () => void | Promise<void>;
3
+ source?: string;
4
+ };
5
+ export type LoadingForcePayload = {
6
+ isForce?: boolean;
7
+ onClose?: () => void;
8
+ };
9
+ export type LoadingUpdatePayload = Record<string, unknown>;
10
+ export type LoadingStateUpdatePayload = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@vnejs/contracts.controllers.screens.loading",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.9",
4
+ "description": "Contracts for @vnejs/plugins.controllers.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/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/const.ts ADDED
@@ -0,0 +1,10 @@
1
+ export const LOGS_ACTIONS = {
2
+ START: "start",
3
+ FINISH: "finish",
4
+ } as const;
5
+
6
+ export const CONSTANTS = {
7
+ LOGS_ACTIONS,
8
+ } as const;
9
+
10
+ export type Constants = typeof CONSTANTS;
package/src/events.ts ADDED
@@ -0,0 +1,11 @@
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
+ UPDATE_FAST: "vne:loading:update_fast",
7
+ UPDATE_FORCE: "vne:loading:update_force",
8
+ UPDATE_STATE: "vne:loading:update_state",
9
+ } as const;
10
+
11
+ export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
package/src/index.ts ADDED
@@ -0,0 +1,43 @@
1
+ import "@vnejs/registry";
2
+
3
+ import { CONSTANTS, LOGS_ACTIONS } from "./const.js";
4
+ import { SUBSCRIBE_EVENTS } from "./events.js";
5
+ import { PARAMS } from "./params.js";
6
+ import type { LoadingEmitPayload, LoadingForcePayload, LoadingStateUpdatePayload, LoadingUpdatePayload } from "./payloads.js";
7
+
8
+ export const PLUGIN_NAME = "LOADING" as const;
9
+ export type PluginName = typeof PLUGIN_NAME;
10
+ export { CONSTANTS, LOGS_ACTIONS };
11
+ export type { Constants } from "./const.js";
12
+ export { SUBSCRIBE_EVENTS };
13
+ export type { SubscribeEvents } from "./events.js";
14
+ export { PARAMS };
15
+ export type { Params, ViewProps } from "./params.js";
16
+
17
+ export type { LoadingEmitPayload, LoadingForcePayload, LoadingUpdatePayload, LoadingStateUpdatePayload } from "./payloads.js";
18
+
19
+ declare module "@vnejs/registry" {
20
+ interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
21
+ interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {}
22
+ interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
23
+
24
+ interface VneEventPayloadMap {
25
+ [SUBSCRIBE_EVENTS.SHOW]: LoadingForcePayload;
26
+ [SUBSCRIBE_EVENTS.HIDE]: LoadingForcePayload;
27
+ [SUBSCRIBE_EVENTS.EMIT]: LoadingEmitPayload;
28
+ [SUBSCRIBE_EVENTS.UPDATE]: LoadingUpdatePayload;
29
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: LoadingUpdatePayload;
30
+ [SUBSCRIBE_EVENTS.UPDATE_FORCE]: LoadingUpdatePayload;
31
+ [SUBSCRIBE_EVENTS.UPDATE_STATE]: LoadingStateUpdatePayload;
32
+ }
33
+
34
+ interface VneEventResultMap {
35
+ [SUBSCRIBE_EVENTS.SHOW]: void;
36
+ [SUBSCRIBE_EVENTS.HIDE]: void;
37
+ [SUBSCRIBE_EVENTS.EMIT]: void;
38
+ [SUBSCRIBE_EVENTS.UPDATE]: void;
39
+ [SUBSCRIBE_EVENTS.UPDATE_FAST]: void;
40
+ [SUBSCRIBE_EVENTS.UPDATE_FORCE]: void;
41
+ [SUBSCRIBE_EVENTS.UPDATE_STATE]: void;
42
+ }
43
+ }
package/src/params.ts ADDED
@@ -0,0 +1,20 @@
1
+ import type { PositionBoxProps, WidenViewProps } from "@vnejs/uis.react.position-box";
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 } as PositionBoxProps,
11
+ text: { size: 144 },
12
+ screen: { transition: TRANSITION, zIndex: ZINDEX },
13
+ } as const;
14
+
15
+ export type ViewProps = WidenViewProps<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 = WidenViewProps<typeof PARAMS_DEFAULT>;
20
+ export const PARAMS: Params = PARAMS_DEFAULT;
@@ -0,0 +1,13 @@
1
+ export type LoadingEmitPayload = {
2
+ promiseFunc?: () => void | Promise<void>;
3
+ source?: string;
4
+ };
5
+
6
+ export type LoadingForcePayload = {
7
+ isForce?: boolean;
8
+ onClose?: () => void;
9
+ };
10
+
11
+ export type LoadingUpdatePayload = Record<string, unknown>;
12
+
13
+ export type LoadingStateUpdatePayload = Record<string, unknown>;
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
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.