@vnejs/contracts.controls.cursor 0.2.0 → 0.2.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.
- package/dist/events.d.ts +2 -0
- package/dist/events.js +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/params.d.ts +4 -0
- package/dist/params.js +4 -0
- package/dist/settings.d.ts +1 -0
- package/dist/settings.js +1 -0
- package/package.json +1 -1
- package/src/events.ts +2 -0
- package/src/index.ts +5 -2
- package/src/params.ts +4 -0
- package/src/settings.ts +1 -0
package/dist/events.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const SUBSCRIBE_EVENTS: {
|
|
|
6
6
|
readonly VIEW_SET: "vne:cursor:view_set";
|
|
7
7
|
readonly MOVE: "vne:cursor:move";
|
|
8
8
|
readonly MOVED: "vne:cursor:moved";
|
|
9
|
+
readonly SET_X_Y: "vne:cursor:set_x_y";
|
|
9
10
|
readonly SHIFT: "vne:cursor:shift";
|
|
11
|
+
readonly SCROLL: "vne:cursor:scroll";
|
|
10
12
|
};
|
|
11
13
|
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -17,13 +17,14 @@ export type { SettingsKeys } from "./settings.js";
|
|
|
17
17
|
type CursorShiftSpeedSettingKey = (typeof SETTINGS_KEYS)["SHIFT_SPEED"];
|
|
18
18
|
type CursorShiftReverseXSettingKey = (typeof SETTINGS_KEYS)["SHIFT_REVERSE_X"];
|
|
19
19
|
type CursorShiftReverseYSettingKey = (typeof SETTINGS_KEYS)["SHIFT_REVERSE_Y"];
|
|
20
|
+
type CursorScrollSpeedSettingKey = (typeof SETTINGS_KEYS)["SCROLL_SPEED"];
|
|
20
21
|
declare module "@vnejs/module" {
|
|
21
22
|
interface ModuleGlobalState {
|
|
22
23
|
cursor: ModuleGlobalStateCursor;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
declare module "@vnejs/contracts.core.settings" {
|
|
26
|
-
interface ModuleSharedSettings extends Record<CursorShiftSpeedSettingKey, number>, Record<CursorShiftReverseXSettingKey, boolean>, Record<CursorShiftReverseYSettingKey, boolean> {
|
|
27
|
+
interface ModuleSharedSettings extends Record<CursorShiftSpeedSettingKey, number>, Record<CursorShiftReverseXSettingKey, boolean>, Record<CursorShiftReverseYSettingKey, boolean>, Record<CursorScrollSpeedSettingKey, number> {
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
declare module "@vnejs/shared" {
|
package/dist/params.d.ts
CHANGED
|
@@ -4,12 +4,16 @@ export declare const DEFAULT_SHIFT_SPEED: 1;
|
|
|
4
4
|
export declare const DEFAULT_SHIFT_REVERSE_X: false;
|
|
5
5
|
export declare const DEFAULT_SHIFT_REVERSE_Y: false;
|
|
6
6
|
export declare const BASE_SHIFT_SPEED: 16;
|
|
7
|
+
export declare const DEFAULT_SCROLL_SPEED: 1;
|
|
8
|
+
export declare const BASE_SCROLL_SPEED: 16;
|
|
7
9
|
declare const PARAMS_DEFAULT: {
|
|
8
10
|
DEFAULT_VIEW: "default";
|
|
9
11
|
DEFAULT_SHIFT_SPEED: 1;
|
|
10
12
|
DEFAULT_SHIFT_REVERSE_X: false;
|
|
11
13
|
DEFAULT_SHIFT_REVERSE_Y: false;
|
|
12
14
|
BASE_SHIFT_SPEED: 16;
|
|
15
|
+
DEFAULT_SCROLL_SPEED: 1;
|
|
16
|
+
BASE_SCROLL_SPEED: 16;
|
|
13
17
|
};
|
|
14
18
|
export type Params = Widen<typeof PARAMS_DEFAULT>;
|
|
15
19
|
export declare const PARAMS: Params;
|
package/dist/params.js
CHANGED
|
@@ -3,11 +3,15 @@ export const DEFAULT_SHIFT_SPEED = 1;
|
|
|
3
3
|
export const DEFAULT_SHIFT_REVERSE_X = false;
|
|
4
4
|
export const DEFAULT_SHIFT_REVERSE_Y = false;
|
|
5
5
|
export const BASE_SHIFT_SPEED = 16;
|
|
6
|
+
export const DEFAULT_SCROLL_SPEED = 1;
|
|
7
|
+
export const BASE_SCROLL_SPEED = 16;
|
|
6
8
|
const PARAMS_DEFAULT = {
|
|
7
9
|
DEFAULT_VIEW,
|
|
8
10
|
DEFAULT_SHIFT_SPEED,
|
|
9
11
|
DEFAULT_SHIFT_REVERSE_X,
|
|
10
12
|
DEFAULT_SHIFT_REVERSE_Y,
|
|
11
13
|
BASE_SHIFT_SPEED,
|
|
14
|
+
DEFAULT_SCROLL_SPEED,
|
|
15
|
+
BASE_SCROLL_SPEED,
|
|
12
16
|
};
|
|
13
17
|
export const PARAMS = PARAMS_DEFAULT;
|
package/dist/settings.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export declare const SETTINGS_KEYS: {
|
|
|
2
2
|
readonly SHIFT_SPEED: "vne:cursor:shift_speed";
|
|
3
3
|
readonly SHIFT_REVERSE_Y: "vne:cursor:shift_reverse_y";
|
|
4
4
|
readonly SHIFT_REVERSE_X: "vne:cursor:shift_reverse_x";
|
|
5
|
+
readonly SCROLL_SPEED: "vne:cursor:scroll_speed";
|
|
5
6
|
};
|
|
6
7
|
export type SettingsKeys = typeof SETTINGS_KEYS;
|
package/dist/settings.js
CHANGED
package/package.json
CHANGED
package/src/events.ts
CHANGED
|
@@ -9,7 +9,9 @@ export const SUBSCRIBE_EVENTS = {
|
|
|
9
9
|
|
|
10
10
|
MOVE: "vne:cursor:move",
|
|
11
11
|
MOVED: "vne:cursor:moved",
|
|
12
|
+
SET_X_Y: "vne:cursor:set_x_y",
|
|
12
13
|
SHIFT: "vne:cursor:shift",
|
|
14
|
+
SCROLL: "vne:cursor:scroll",
|
|
13
15
|
} as const;
|
|
14
16
|
|
|
15
17
|
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/src/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export type { SettingsKeys } from "./settings.js";
|
|
|
21
21
|
type CursorShiftSpeedSettingKey = (typeof SETTINGS_KEYS)["SHIFT_SPEED"];
|
|
22
22
|
type CursorShiftReverseXSettingKey = (typeof SETTINGS_KEYS)["SHIFT_REVERSE_X"];
|
|
23
23
|
type CursorShiftReverseYSettingKey = (typeof SETTINGS_KEYS)["SHIFT_REVERSE_Y"];
|
|
24
|
+
type CursorScrollSpeedSettingKey = (typeof SETTINGS_KEYS)["SCROLL_SPEED"];
|
|
24
25
|
|
|
25
26
|
declare module "@vnejs/module" {
|
|
26
27
|
interface ModuleGlobalState {
|
|
@@ -30,9 +31,11 @@ declare module "@vnejs/module" {
|
|
|
30
31
|
|
|
31
32
|
declare module "@vnejs/contracts.core.settings" {
|
|
32
33
|
interface ModuleSharedSettings
|
|
33
|
-
extends
|
|
34
|
+
extends
|
|
35
|
+
Record<CursorShiftSpeedSettingKey, number>,
|
|
34
36
|
Record<CursorShiftReverseXSettingKey, boolean>,
|
|
35
|
-
Record<CursorShiftReverseYSettingKey, boolean
|
|
37
|
+
Record<CursorShiftReverseYSettingKey, boolean>,
|
|
38
|
+
Record<CursorScrollSpeedSettingKey, number> {}
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
declare module "@vnejs/shared" {
|
package/src/params.ts
CHANGED
|
@@ -5,6 +5,8 @@ export const DEFAULT_SHIFT_SPEED = 1 as const;
|
|
|
5
5
|
export const DEFAULT_SHIFT_REVERSE_X = false as const;
|
|
6
6
|
export const DEFAULT_SHIFT_REVERSE_Y = false as const;
|
|
7
7
|
export const BASE_SHIFT_SPEED = 16 as const;
|
|
8
|
+
export const DEFAULT_SCROLL_SPEED = 1 as const;
|
|
9
|
+
export const BASE_SCROLL_SPEED = 16 as const;
|
|
8
10
|
|
|
9
11
|
const PARAMS_DEFAULT = {
|
|
10
12
|
DEFAULT_VIEW,
|
|
@@ -12,6 +14,8 @@ const PARAMS_DEFAULT = {
|
|
|
12
14
|
DEFAULT_SHIFT_REVERSE_X,
|
|
13
15
|
DEFAULT_SHIFT_REVERSE_Y,
|
|
14
16
|
BASE_SHIFT_SPEED,
|
|
17
|
+
DEFAULT_SCROLL_SPEED,
|
|
18
|
+
BASE_SCROLL_SPEED,
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
export type Params = Widen<typeof PARAMS_DEFAULT>;
|
package/src/settings.ts
CHANGED
|
@@ -2,6 +2,7 @@ export const SETTINGS_KEYS = {
|
|
|
2
2
|
SHIFT_SPEED: "vne:cursor:shift_speed",
|
|
3
3
|
SHIFT_REVERSE_Y: "vne:cursor:shift_reverse_y",
|
|
4
4
|
SHIFT_REVERSE_X: "vne:cursor:shift_reverse_x",
|
|
5
|
+
SCROLL_SPEED: "vne:cursor:scroll_speed",
|
|
5
6
|
} as const;
|
|
6
7
|
|
|
7
8
|
export type SettingsKeys = typeof SETTINGS_KEYS;
|