@vnejs/contracts.canvas.props.animation 0.1.3 → 0.2.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.
- package/dist/index.d.ts +10 -0
- package/dist/payloads.d.ts +29 -0
- package/dist/payloads.js +1 -0
- package/package.json +4 -4
- package/src/index.ts +12 -0
- package/src/payloads.ts +33 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { CONSTANTS } from "./const.js";
|
|
|
4
4
|
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
5
5
|
import { PARAMS } from "./params.js";
|
|
6
6
|
import { SETTINGS_KEYS } from "./settings.js";
|
|
7
|
+
import type { AnimationSetPayload, AnimationUnsetPayload } from "./payloads.js";
|
|
7
8
|
export declare const PLUGIN_NAME: "LAYER_ANIMATION";
|
|
8
9
|
export type PluginName = typeof PLUGIN_NAME;
|
|
9
10
|
export { CONSTANTS, EXEC_ACTIONS, LINE_KEYWORDS } from "./const.js";
|
|
@@ -14,6 +15,7 @@ export { PARAMS, ANIMATIONS } from "./params.js";
|
|
|
14
15
|
export type { Params } from "./params.js";
|
|
15
16
|
export { SETTINGS_KEYS };
|
|
16
17
|
export type { SettingsKeys } from "./settings.js";
|
|
18
|
+
export type { AnimationLayerState, AnimationSetPayload, AnimationState, AnimationStateSetPayload, AnimationUnsetPayload } from "./payloads.js";
|
|
17
19
|
type DangerousEnabledSettingKey = (typeof SETTINGS_KEYS)["DANGEROUS_ENABLED"];
|
|
18
20
|
declare module "@vnejs/contracts.core.settings" {
|
|
19
21
|
interface ModuleSharedSettings extends Record<DangerousEnabledSettingKey, boolean> {
|
|
@@ -28,4 +30,12 @@ declare module "@vnejs/shared" {
|
|
|
28
30
|
}
|
|
29
31
|
interface VnePluginSettingsMap extends Record<typeof PLUGIN_NAME, typeof SETTINGS_KEYS> {
|
|
30
32
|
}
|
|
33
|
+
interface VneEventPayloadMap {
|
|
34
|
+
[SUBSCRIBE_EVENTS.SET]: AnimationSetPayload;
|
|
35
|
+
[SUBSCRIBE_EVENTS.UNSET]: AnimationUnsetPayload;
|
|
36
|
+
}
|
|
37
|
+
interface VneEventResultMap {
|
|
38
|
+
[SUBSCRIBE_EVENTS.SET]: void;
|
|
39
|
+
[SUBSCRIBE_EVENTS.UNSET]: void;
|
|
40
|
+
}
|
|
31
41
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type AnimationLayerState = {
|
|
2
|
+
animation: string;
|
|
3
|
+
transformOriginX: string;
|
|
4
|
+
transformOriginY: string;
|
|
5
|
+
isDangerous: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type AnimationState = Record<string, AnimationLayerState>;
|
|
8
|
+
export type AnimationSetPayload = {
|
|
9
|
+
layer?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
duration?: number;
|
|
13
|
+
transformOriginX?: string;
|
|
14
|
+
transformOriginY?: string;
|
|
15
|
+
isDangerous?: boolean;
|
|
16
|
+
args?: unknown[];
|
|
17
|
+
};
|
|
18
|
+
export type AnimationUnsetPayload = {
|
|
19
|
+
layer?: string;
|
|
20
|
+
duration?: number;
|
|
21
|
+
};
|
|
22
|
+
export type AnimationStateSetPayload = {
|
|
23
|
+
layer?: string;
|
|
24
|
+
value?: string;
|
|
25
|
+
transformOriginX?: string;
|
|
26
|
+
transformOriginY?: string;
|
|
27
|
+
isDangerous?: boolean;
|
|
28
|
+
duration?: number;
|
|
29
|
+
};
|
package/dist/payloads.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/contracts.canvas.props.animation",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Contracts for @vnejs/plugins.canvas.props.animation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"author": "",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@vnejs/contracts.core.settings": "~0.
|
|
30
|
-
"@vnejs/shared": "~0.
|
|
29
|
+
"@vnejs/contracts.core.settings": "~0.2.0",
|
|
30
|
+
"@vnejs/shared": "~0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@vnejs/configs.ts-common": "~0.
|
|
33
|
+
"@vnejs/configs.ts-common": "~0.2.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { CONSTANTS } from "./const.js";
|
|
|
5
5
|
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
6
6
|
import { PARAMS } from "./params.js";
|
|
7
7
|
import { SETTINGS_KEYS } from "./settings.js";
|
|
8
|
+
import type { AnimationSetPayload, AnimationUnsetPayload } from "./payloads.js";
|
|
8
9
|
|
|
9
10
|
export const PLUGIN_NAME = "LAYER_ANIMATION" as const;
|
|
10
11
|
export type PluginName = typeof PLUGIN_NAME;
|
|
@@ -17,6 +18,7 @@ export { PARAMS, ANIMATIONS } from "./params.js";
|
|
|
17
18
|
export type { Params } from "./params.js";
|
|
18
19
|
export { SETTINGS_KEYS };
|
|
19
20
|
export type { SettingsKeys } from "./settings.js";
|
|
21
|
+
export type { AnimationLayerState, AnimationSetPayload, AnimationState, AnimationStateSetPayload, AnimationUnsetPayload } from "./payloads.js";
|
|
20
22
|
|
|
21
23
|
type DangerousEnabledSettingKey = (typeof SETTINGS_KEYS)["DANGEROUS_ENABLED"];
|
|
22
24
|
|
|
@@ -32,4 +34,14 @@ declare module "@vnejs/shared" {
|
|
|
32
34
|
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
33
35
|
|
|
34
36
|
interface VnePluginSettingsMap extends Record<typeof PLUGIN_NAME, typeof SETTINGS_KEYS> {}
|
|
37
|
+
|
|
38
|
+
interface VneEventPayloadMap {
|
|
39
|
+
[SUBSCRIBE_EVENTS.SET]: AnimationSetPayload;
|
|
40
|
+
[SUBSCRIBE_EVENTS.UNSET]: AnimationUnsetPayload;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface VneEventResultMap {
|
|
44
|
+
[SUBSCRIBE_EVENTS.SET]: void;
|
|
45
|
+
[SUBSCRIBE_EVENTS.UNSET]: void;
|
|
46
|
+
}
|
|
35
47
|
}
|
package/src/payloads.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type AnimationLayerState = {
|
|
2
|
+
animation: string;
|
|
3
|
+
transformOriginX: string;
|
|
4
|
+
transformOriginY: string;
|
|
5
|
+
isDangerous: boolean;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type AnimationState = Record<string, AnimationLayerState>;
|
|
9
|
+
|
|
10
|
+
export type AnimationSetPayload = {
|
|
11
|
+
layer?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
duration?: number;
|
|
15
|
+
transformOriginX?: string;
|
|
16
|
+
transformOriginY?: string;
|
|
17
|
+
isDangerous?: boolean;
|
|
18
|
+
args?: unknown[];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type AnimationUnsetPayload = {
|
|
22
|
+
layer?: string;
|
|
23
|
+
duration?: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type AnimationStateSetPayload = {
|
|
27
|
+
layer?: string;
|
|
28
|
+
value?: string;
|
|
29
|
+
transformOriginX?: string;
|
|
30
|
+
transformOriginY?: string;
|
|
31
|
+
isDangerous?: boolean;
|
|
32
|
+
duration?: number;
|
|
33
|
+
};
|