@soonspacejs/plugin-cps-scheme 2.13.17 → 2.14.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/controller/anchor.d.ts +6 -0
- package/dist/controller/base.d.ts +76 -0
- package/dist/controller/button.d.ts +6 -0
- package/dist/controller/color.d.ts +18 -0
- package/dist/controller/handle.d.ts +13 -0
- package/dist/controller/ot-button.d.ts +4 -0
- package/dist/controller/phase.d.ts +14 -0
- package/dist/controller/platter.d.ts +87 -0
- package/dist/controller/st-button.d.ts +8 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +5040 -1
- package/dist/types.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const ActiveState: Readonly<{
|
|
2
|
+
ACTIVE: 1;
|
|
3
|
+
PREPARE: 0.5;
|
|
4
|
+
INACTIVE: 0;
|
|
5
|
+
UNDEFINED: -1;
|
|
6
|
+
}>;
|
|
7
|
+
export type ActiveStateType = (typeof ActiveState)[keyof typeof ActiveState];
|
|
8
|
+
export declare const ReadyState: Readonly<{
|
|
9
|
+
READY: 1;
|
|
10
|
+
NOT_READY: 0;
|
|
11
|
+
UNDEFINED: -1;
|
|
12
|
+
}>;
|
|
13
|
+
export type ReadyStateType = (typeof ReadyState)[keyof typeof ReadyState];
|
|
14
|
+
export interface Behavior {
|
|
15
|
+
label?: string;
|
|
16
|
+
userData?: any;
|
|
17
|
+
readyState?: ReadyStateType;
|
|
18
|
+
visible?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CustomEvent {
|
|
21
|
+
id: string;
|
|
22
|
+
text: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
state: {
|
|
25
|
+
active: ActiveStateType;
|
|
26
|
+
ready: ReadyStateType;
|
|
27
|
+
};
|
|
28
|
+
type: string;
|
|
29
|
+
srcElement: BaseButton;
|
|
30
|
+
userData?: any;
|
|
31
|
+
mouseEvent: MouseEvent;
|
|
32
|
+
}
|
|
33
|
+
export declare class BaseButton {
|
|
34
|
+
platter: any;
|
|
35
|
+
svgNode: SVGElement;
|
|
36
|
+
_tspanNode?: SVGTextElement;
|
|
37
|
+
_textNode?: SVGTextElement;
|
|
38
|
+
_pathNode?: SVGPathElement;
|
|
39
|
+
behavior?: Behavior;
|
|
40
|
+
activeState: ActiveStateType;
|
|
41
|
+
readyState: ReadyStateType;
|
|
42
|
+
_color: {
|
|
43
|
+
main?: any;
|
|
44
|
+
fill?: any;
|
|
45
|
+
fillOpacity?: any;
|
|
46
|
+
stroke?: any;
|
|
47
|
+
text?: any;
|
|
48
|
+
};
|
|
49
|
+
_hover: boolean;
|
|
50
|
+
freezeHover: boolean;
|
|
51
|
+
/** 配置模式 */
|
|
52
|
+
_configMode: boolean;
|
|
53
|
+
TXT_LENGTH: number;
|
|
54
|
+
get id(): string;
|
|
55
|
+
get text(): string;
|
|
56
|
+
get isReady(): boolean;
|
|
57
|
+
constructor(platter: any, svgNode: SVGElement, behavior?: Behavior);
|
|
58
|
+
private _bindEvent;
|
|
59
|
+
private _createEvent;
|
|
60
|
+
setVisible(b: boolean): void;
|
|
61
|
+
setText(text: string, align?: boolean): void;
|
|
62
|
+
private _setActive;
|
|
63
|
+
setActive(active: boolean): void;
|
|
64
|
+
private _setReady;
|
|
65
|
+
setReady(ready: boolean): void;
|
|
66
|
+
resetReady(): void;
|
|
67
|
+
setHover(hover: boolean): void;
|
|
68
|
+
toggleReady(): void;
|
|
69
|
+
refresh(behavior: Behavior): void;
|
|
70
|
+
private _initColor;
|
|
71
|
+
private _changeColor;
|
|
72
|
+
private _setColor;
|
|
73
|
+
private _getTextNode;
|
|
74
|
+
startConfig(): void;
|
|
75
|
+
stopConfig(): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export namespace colors {
|
|
2
|
+
let red: any;
|
|
3
|
+
}
|
|
4
|
+
export namespace inActive {
|
|
5
|
+
let fill: any;
|
|
6
|
+
let stroke: any;
|
|
7
|
+
let text: any;
|
|
8
|
+
let notReady: any;
|
|
9
|
+
}
|
|
10
|
+
export namespace active {
|
|
11
|
+
let text_1: any;
|
|
12
|
+
export { text_1 as text };
|
|
13
|
+
export let whiteText: any;
|
|
14
|
+
let notReady_1: any;
|
|
15
|
+
export { notReady_1 as notReady };
|
|
16
|
+
export let notReadyLight: any;
|
|
17
|
+
}
|
|
18
|
+
export const mainColor: any[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function handleEvent(self: any, platter: any, event: any): void;
|
|
2
|
+
export class DefaultEventHandler {
|
|
3
|
+
constructor(component: any, platter: any);
|
|
4
|
+
_component: any;
|
|
5
|
+
_platter: any;
|
|
6
|
+
handleEvent(event: any): void;
|
|
7
|
+
onBnEvent(event: any): void;
|
|
8
|
+
onBnClick(event: any): void;
|
|
9
|
+
handleAcEvent(event: any): void;
|
|
10
|
+
onAcClick(event: any): void;
|
|
11
|
+
onAcMouseOver(event: any): void;
|
|
12
|
+
onAcMouseOut(event: any): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class Phase {
|
|
2
|
+
constructor(circleNode: any);
|
|
3
|
+
_color: {};
|
|
4
|
+
circleNode: any;
|
|
5
|
+
buttons: Set<any>;
|
|
6
|
+
anchors: Set<any>;
|
|
7
|
+
activeState: -1;
|
|
8
|
+
addButton(bn: any): void;
|
|
9
|
+
addAnchor(ac: any): void;
|
|
10
|
+
_setActive(activeState: any): void;
|
|
11
|
+
setActive(active: any): void;
|
|
12
|
+
isActive(): boolean;
|
|
13
|
+
_setColor(fill: any, fillOpacity: any, stroke: any): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const ST_PERFIX: "st";
|
|
2
|
+
export const BN_PERFIX: "bn";
|
|
3
|
+
export const AC_PERFIX: "ac";
|
|
4
|
+
export const OT_PREFIX: "ot";
|
|
5
|
+
export namespace DEFAULT_BEHAVIORS {
|
|
6
|
+
namespace st_p1 {
|
|
7
|
+
let label: string;
|
|
8
|
+
function click(c: any): void;
|
|
9
|
+
}
|
|
10
|
+
namespace st_p2 {
|
|
11
|
+
let label_1: string;
|
|
12
|
+
export { label_1 as label };
|
|
13
|
+
export function click_1(c: any): void;
|
|
14
|
+
export { click_1 as click };
|
|
15
|
+
}
|
|
16
|
+
namespace st_p3 {
|
|
17
|
+
let label_2: string;
|
|
18
|
+
export { label_2 as label };
|
|
19
|
+
export function click_2(c: any): void;
|
|
20
|
+
export { click_2 as click };
|
|
21
|
+
}
|
|
22
|
+
namespace st_p4 {
|
|
23
|
+
let label_3: string;
|
|
24
|
+
export { label_3 as label };
|
|
25
|
+
export function click_3(c: any): void;
|
|
26
|
+
export { click_3 as click };
|
|
27
|
+
}
|
|
28
|
+
namespace ot_1 {
|
|
29
|
+
let label_4: string;
|
|
30
|
+
export { label_4 as label };
|
|
31
|
+
}
|
|
32
|
+
namespace ot_2 {
|
|
33
|
+
let label_5: string;
|
|
34
|
+
export { label_5 as label };
|
|
35
|
+
}
|
|
36
|
+
namespace ot_3 {
|
|
37
|
+
let label_6: string;
|
|
38
|
+
export { label_6 as label };
|
|
39
|
+
}
|
|
40
|
+
namespace ot_4 {
|
|
41
|
+
let label_7: string;
|
|
42
|
+
export { label_7 as label };
|
|
43
|
+
}
|
|
44
|
+
namespace ot_5 {
|
|
45
|
+
let label_8: string;
|
|
46
|
+
export { label_8 as label };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class Platter {
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param {SVGElement} root
|
|
53
|
+
* @param {*} behaviors
|
|
54
|
+
*/
|
|
55
|
+
constructor(root: SVGElement, behaviors: any, options: any);
|
|
56
|
+
rootNode: SVGElement;
|
|
57
|
+
customBehaviors: any;
|
|
58
|
+
phase: Map<any, any>;
|
|
59
|
+
buttons: Map<any, any>;
|
|
60
|
+
anchors: Map<any, any>;
|
|
61
|
+
_signal: EventTarget;
|
|
62
|
+
_preventDefault: boolean;
|
|
63
|
+
options: {
|
|
64
|
+
placeholder: string;
|
|
65
|
+
};
|
|
66
|
+
_init(): void;
|
|
67
|
+
getItem(id: any): any;
|
|
68
|
+
_getBehavior(id: any): any;
|
|
69
|
+
_triggerEvent(event: any): void;
|
|
70
|
+
refresh(behaviors: any): void;
|
|
71
|
+
setPhase(phase: any): void;
|
|
72
|
+
activePhase(phase: any, active?: boolean): void;
|
|
73
|
+
_activePhases(phases: any, activeState: any): void;
|
|
74
|
+
_activeReset(): void;
|
|
75
|
+
activeAll(activeState: any): void;
|
|
76
|
+
togglePhase(phase: any): void;
|
|
77
|
+
setHover(id: any, isHover?: boolean): void;
|
|
78
|
+
setActive(id: any, isActive?: boolean): void;
|
|
79
|
+
clearActive(): void;
|
|
80
|
+
setReady(id: any, isReady?: boolean): void;
|
|
81
|
+
clearReady(): void;
|
|
82
|
+
addListener(listener: any): void;
|
|
83
|
+
removeListener(listener: any): void;
|
|
84
|
+
setPreventDefault(bool?: boolean): void;
|
|
85
|
+
startConfig(): void;
|
|
86
|
+
stopConfig(): void;
|
|
87
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import SoonSpace from 'soonspacejs';
|
|
2
|
-
import CpsSoonmanagerPlugin from '@soonspacejs/plugin-cps-soonmanager';
|
|
1
|
+
import { default as SoonSpace } from 'soonspacejs';
|
|
2
|
+
import { default as CpsSoonmanagerPlugin } from '@soonspacejs/plugin-cps-soonmanager';
|
|
3
3
|
import { Platter } from './controller/platter';
|
|
4
4
|
import { ISchemeData, TInitOptions } from './types';
|
|
5
5
|
declare class CpsSchemePlugin {
|