@mulsense/xnew 0.1.2 → 0.1.3
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/types/basics/Accordion.d.ts +1 -1
- package/dist/types/basics/Controller.d.ts +3 -3
- package/dist/types/basics/Modal.d.ts +1 -3
- package/dist/types/basics/ResizeEvent.d.ts +1 -1
- package/dist/types/basics/Touch.d.ts +28 -0
- package/dist/types/core/unit.d.ts +8 -12
- package/dist/types/index.d.ts +6 -9
- package/dist/xnew.d.ts +22 -20
- package/dist/xnew.js +139 -186
- package/dist/xnew.mjs +139 -186
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ export declare function AccordionFrame(frame: xnew.Unit, {}?: {}): {
|
|
|
4
4
|
open(): void;
|
|
5
5
|
close(): void;
|
|
6
6
|
};
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function AccordionHeader(header: xnew.Unit, {}?: {}): void;
|
|
8
8
|
export declare function AccordionBullet(bullet: xnew.Unit, { type }?: {
|
|
9
9
|
type?: string;
|
|
10
10
|
}): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { xnew } from '../core/xnew';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function TouchStick(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
3
3
|
size?: number | undefined;
|
|
4
4
|
fill?: string | undefined;
|
|
5
5
|
fillOpacity?: number | undefined;
|
|
@@ -8,7 +8,7 @@ export declare function VirtualStick(self: xnew.Unit, { size, fill, fillOpacity,
|
|
|
8
8
|
strokeWidth?: number | undefined;
|
|
9
9
|
strokeLinejoin?: string | undefined;
|
|
10
10
|
}): void;
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function TouchDPad(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
12
12
|
size?: number | undefined;
|
|
13
13
|
fill?: string | undefined;
|
|
14
14
|
fillOpacity?: number | undefined;
|
|
@@ -17,7 +17,7 @@ export declare function VirtualDPad(self: xnew.Unit, { size, fill, fillOpacity,
|
|
|
17
17
|
strokeWidth?: number | undefined;
|
|
18
18
|
strokeLinejoin?: string | undefined;
|
|
19
19
|
}): void;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function TouchButton(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
21
21
|
size?: number | undefined;
|
|
22
22
|
fill?: string | undefined;
|
|
23
23
|
fillOpacity?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function ResizeEvent(
|
|
1
|
+
export declare function ResizeEvent(resize: any): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { xnew } from '../core/xnew';
|
|
2
|
+
export declare function TouchStick(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
3
|
+
size?: number | undefined;
|
|
4
|
+
fill?: string | undefined;
|
|
5
|
+
fillOpacity?: number | undefined;
|
|
6
|
+
stroke?: string | undefined;
|
|
7
|
+
strokeOpacity?: number | undefined;
|
|
8
|
+
strokeWidth?: number | undefined;
|
|
9
|
+
strokeLinejoin?: string | undefined;
|
|
10
|
+
}): void;
|
|
11
|
+
export declare function TouchDPad(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
12
|
+
size?: number | undefined;
|
|
13
|
+
fill?: string | undefined;
|
|
14
|
+
fillOpacity?: number | undefined;
|
|
15
|
+
stroke?: string | undefined;
|
|
16
|
+
strokeOpacity?: number | undefined;
|
|
17
|
+
strokeWidth?: number | undefined;
|
|
18
|
+
strokeLinejoin?: string | undefined;
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function TouchButton(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
21
|
+
size?: number | undefined;
|
|
22
|
+
fill?: string | undefined;
|
|
23
|
+
fillOpacity?: number | undefined;
|
|
24
|
+
stroke?: string | undefined;
|
|
25
|
+
strokeOpacity?: number | undefined;
|
|
26
|
+
strokeWidth?: number | undefined;
|
|
27
|
+
strokeLinejoin?: string | undefined;
|
|
28
|
+
}): void;
|
|
@@ -6,7 +6,7 @@ interface Context {
|
|
|
6
6
|
value: any;
|
|
7
7
|
}
|
|
8
8
|
interface Snapshot {
|
|
9
|
-
unit: Unit
|
|
9
|
+
unit: Unit;
|
|
10
10
|
context: Context | null;
|
|
11
11
|
element: UnitElement | null;
|
|
12
12
|
}
|
|
@@ -23,6 +23,7 @@ interface UnitInternal {
|
|
|
23
23
|
baseContext: Context | null;
|
|
24
24
|
baseComponent: Function;
|
|
25
25
|
currentElement: UnitElement;
|
|
26
|
+
currentContext: Context | null;
|
|
26
27
|
nextNest: {
|
|
27
28
|
element: UnitElement;
|
|
28
29
|
position: InsertPosition;
|
|
@@ -40,6 +41,7 @@ export declare class Unit {
|
|
|
40
41
|
[key: string]: any;
|
|
41
42
|
_: UnitInternal;
|
|
42
43
|
static roots: Unit[];
|
|
44
|
+
static current: Unit | null;
|
|
43
45
|
constructor(target: Object | null, component?: Function | string, props?: Object);
|
|
44
46
|
get element(): UnitElement;
|
|
45
47
|
start(): void;
|
|
@@ -58,6 +60,11 @@ export declare class Unit {
|
|
|
58
60
|
static update(unit: Unit, time: number): void;
|
|
59
61
|
static ticker(time: number): void;
|
|
60
62
|
static reset(): void;
|
|
63
|
+
static wrap(listener: Function): (...args: any[]) => any;
|
|
64
|
+
static scope(snapshot: Snapshot | null, func: Function, ...args: any[]): any;
|
|
65
|
+
static snapshot(unit: Unit): Snapshot | null;
|
|
66
|
+
static stack(unit: Unit, key: string, value: any): void;
|
|
67
|
+
static trace(unit: Unit, key: string): any;
|
|
61
68
|
static componentUnits: MapSet<Function, Unit>;
|
|
62
69
|
get components(): Set<Function>;
|
|
63
70
|
static find(component: Function): Unit[];
|
|
@@ -68,17 +75,6 @@ export declare class Unit {
|
|
|
68
75
|
static subon(unit: any, target: UnitElement | Window | Document, type: string, listener: Function, options?: boolean | AddEventListenerOptions): void;
|
|
69
76
|
static suboff(unit: any, target: UnitElement | Window | Document | null, type?: string, listener?: Function): void;
|
|
70
77
|
}
|
|
71
|
-
export declare class UnitScope {
|
|
72
|
-
static current: Unit | null;
|
|
73
|
-
static contexts: Map<Unit | null, Context>;
|
|
74
|
-
static initialize(unit: Unit | null, context: Context | null): void;
|
|
75
|
-
static finalize(unit: Unit): void;
|
|
76
|
-
static wrap(listener: Function): (...args: any[]) => any;
|
|
77
|
-
static execute(snapshot: Snapshot | null, func: Function, ...args: any[]): any;
|
|
78
|
-
static snapshot(unit?: Unit | null): Snapshot | null;
|
|
79
|
-
static stack(unit: Unit, key: string, value: any): void;
|
|
80
|
-
static trace(unit: Unit, key: string): any;
|
|
81
|
-
}
|
|
82
78
|
export declare class UnitPromise {
|
|
83
79
|
private promise;
|
|
84
80
|
constructor(executor: (resolve: (value: any) => void, reject: (reason?: any) => void) => void);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ import { Screen } from './basics/Screen';
|
|
|
4
4
|
import { InputFrame } from './basics/Input';
|
|
5
5
|
import { ModalFrame, ModalContent } from './basics/Modal';
|
|
6
6
|
import { TabFrame, TabButton, TabContent } from './basics/Tab';
|
|
7
|
-
import { AccordionFrame,
|
|
8
|
-
import { PanelFrame, PanelGroup } from './basics/Panel';
|
|
7
|
+
import { AccordionFrame, AccordionHeader, AccordionBullet, AccordionContent } from './basics/Accordion';
|
|
9
8
|
import { DragFrame, DragTarget } from './basics/SubWIndow';
|
|
10
|
-
import {
|
|
9
|
+
import { TouchStick, TouchDPad, TouchButton } from './basics/Touch';
|
|
11
10
|
import { Unit } from './core/unit';
|
|
12
11
|
import { xnewtype as basetype } from './core/xnew';
|
|
13
12
|
import { synthesizer } from './audio/synthesizer';
|
|
@@ -18,20 +17,18 @@ declare const basics: {
|
|
|
18
17
|
ModalFrame: typeof ModalFrame;
|
|
19
18
|
ModalContent: typeof ModalContent;
|
|
20
19
|
AccordionFrame: typeof AccordionFrame;
|
|
21
|
-
|
|
20
|
+
AccordionHeader: typeof AccordionHeader;
|
|
22
21
|
AccordionBullet: typeof AccordionBullet;
|
|
23
22
|
AccordionContent: typeof AccordionContent;
|
|
24
23
|
TabFrame: typeof TabFrame;
|
|
25
24
|
TabButton: typeof TabButton;
|
|
26
25
|
TabContent: typeof TabContent;
|
|
27
|
-
PanelFrame: typeof PanelFrame;
|
|
28
|
-
PanelGroup: typeof PanelGroup;
|
|
29
26
|
InputFrame: typeof InputFrame;
|
|
30
27
|
DragFrame: typeof DragFrame;
|
|
31
28
|
DragTarget: typeof DragTarget;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
TouchStick: typeof TouchStick;
|
|
30
|
+
TouchDPad: typeof TouchDPad;
|
|
31
|
+
TouchButton: typeof TouchButton;
|
|
35
32
|
};
|
|
36
33
|
declare const audio: {
|
|
37
34
|
synthesizer: typeof synthesizer;
|
package/dist/xnew.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function ResizeEvent(
|
|
1
|
+
declare function ResizeEvent(resize: any): void;
|
|
2
2
|
|
|
3
3
|
declare class MapSet<Key, Value> extends Map<Key, Set<Value>> {
|
|
4
4
|
has(key: Key): boolean;
|
|
@@ -28,6 +28,11 @@ interface Context {
|
|
|
28
28
|
key: string;
|
|
29
29
|
value: any;
|
|
30
30
|
}
|
|
31
|
+
interface Snapshot {
|
|
32
|
+
unit: Unit;
|
|
33
|
+
context: Context | null;
|
|
34
|
+
element: UnitElement | null;
|
|
35
|
+
}
|
|
31
36
|
interface Capture {
|
|
32
37
|
checker: (unit: Unit) => boolean;
|
|
33
38
|
execute: (unit: Unit) => any;
|
|
@@ -41,6 +46,7 @@ interface UnitInternal {
|
|
|
41
46
|
baseContext: Context | null;
|
|
42
47
|
baseComponent: Function;
|
|
43
48
|
currentElement: UnitElement;
|
|
49
|
+
currentContext: Context | null;
|
|
44
50
|
nextNest: {
|
|
45
51
|
element: UnitElement;
|
|
46
52
|
position: InsertPosition;
|
|
@@ -58,6 +64,7 @@ declare class Unit {
|
|
|
58
64
|
[key: string]: any;
|
|
59
65
|
_: UnitInternal;
|
|
60
66
|
static roots: Unit[];
|
|
67
|
+
static current: Unit | null;
|
|
61
68
|
constructor(target: Object | null, component?: Function | string, props?: Object);
|
|
62
69
|
get element(): UnitElement;
|
|
63
70
|
start(): void;
|
|
@@ -76,6 +83,11 @@ declare class Unit {
|
|
|
76
83
|
static update(unit: Unit, time: number): void;
|
|
77
84
|
static ticker(time: number): void;
|
|
78
85
|
static reset(): void;
|
|
86
|
+
static wrap(listener: Function): (...args: any[]) => any;
|
|
87
|
+
static scope(snapshot: Snapshot | null, func: Function, ...args: any[]): any;
|
|
88
|
+
static snapshot(unit: Unit): Snapshot | null;
|
|
89
|
+
static stack(unit: Unit, key: string, value: any): void;
|
|
90
|
+
static trace(unit: Unit, key: string): any;
|
|
79
91
|
static componentUnits: MapSet<Function, Unit>;
|
|
80
92
|
get components(): Set<Function>;
|
|
81
93
|
static find(component: Function): Unit[];
|
|
@@ -120,9 +132,7 @@ declare function ModalContent(content: xnew$1.Unit, { duration, easing, backgrou
|
|
|
120
132
|
duration?: number;
|
|
121
133
|
easing?: string;
|
|
122
134
|
background?: string;
|
|
123
|
-
}):
|
|
124
|
-
transition(status: number): void;
|
|
125
|
-
};
|
|
135
|
+
}): void;
|
|
126
136
|
|
|
127
137
|
declare function TabFrame(frame: xnew$1.Unit, { select }?: {
|
|
128
138
|
select?: number | undefined;
|
|
@@ -141,7 +151,7 @@ declare function AccordionFrame(frame: xnew$1.Unit, {}?: {}): {
|
|
|
141
151
|
open(): void;
|
|
142
152
|
close(): void;
|
|
143
153
|
};
|
|
144
|
-
declare function
|
|
154
|
+
declare function AccordionHeader(header: xnew$1.Unit, {}?: {}): void;
|
|
145
155
|
declare function AccordionBullet(bullet: xnew$1.Unit, { type }?: {
|
|
146
156
|
type?: string;
|
|
147
157
|
}): {
|
|
@@ -156,19 +166,13 @@ declare function AccordionContent(content: xnew$1.Unit, { open, duration, easing
|
|
|
156
166
|
transition(status: number): void;
|
|
157
167
|
};
|
|
158
168
|
|
|
159
|
-
declare function PanelFrame(frame: xnew$1.Unit): void;
|
|
160
|
-
declare function PanelGroup(group: xnew$1.Unit, { name, open }?: {
|
|
161
|
-
name?: string;
|
|
162
|
-
open?: boolean;
|
|
163
|
-
}): void;
|
|
164
|
-
|
|
165
169
|
declare function DragFrame(frame: xnew$1.Unit, { x, y }?: {
|
|
166
170
|
x?: number;
|
|
167
171
|
y?: number;
|
|
168
172
|
}): void;
|
|
169
173
|
declare function DragTarget(target: xnew$1.Unit, {}?: {}): void;
|
|
170
174
|
|
|
171
|
-
declare function
|
|
175
|
+
declare function TouchStick(self: xnew$1.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
172
176
|
size?: number | undefined;
|
|
173
177
|
fill?: string | undefined;
|
|
174
178
|
fillOpacity?: number | undefined;
|
|
@@ -177,7 +181,7 @@ declare function VirtualStick(self: xnew$1.Unit, { size, fill, fillOpacity, stro
|
|
|
177
181
|
strokeWidth?: number | undefined;
|
|
178
182
|
strokeLinejoin?: string | undefined;
|
|
179
183
|
}): void;
|
|
180
|
-
declare function
|
|
184
|
+
declare function TouchDPad(self: xnew$1.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
181
185
|
size?: number | undefined;
|
|
182
186
|
fill?: string | undefined;
|
|
183
187
|
fillOpacity?: number | undefined;
|
|
@@ -186,7 +190,7 @@ declare function VirtualDPad(self: xnew$1.Unit, { size, fill, fillOpacity, strok
|
|
|
186
190
|
strokeWidth?: number | undefined;
|
|
187
191
|
strokeLinejoin?: string | undefined;
|
|
188
192
|
}): void;
|
|
189
|
-
declare function
|
|
193
|
+
declare function TouchButton(self: xnew$1.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
190
194
|
size?: number | undefined;
|
|
191
195
|
fill?: string | undefined;
|
|
192
196
|
fillOpacity?: number | undefined;
|
|
@@ -271,20 +275,18 @@ declare const basics: {
|
|
|
271
275
|
ModalFrame: typeof ModalFrame;
|
|
272
276
|
ModalContent: typeof ModalContent;
|
|
273
277
|
AccordionFrame: typeof AccordionFrame;
|
|
274
|
-
|
|
278
|
+
AccordionHeader: typeof AccordionHeader;
|
|
275
279
|
AccordionBullet: typeof AccordionBullet;
|
|
276
280
|
AccordionContent: typeof AccordionContent;
|
|
277
281
|
TabFrame: typeof TabFrame;
|
|
278
282
|
TabButton: typeof TabButton;
|
|
279
283
|
TabContent: typeof TabContent;
|
|
280
|
-
PanelFrame: typeof PanelFrame;
|
|
281
|
-
PanelGroup: typeof PanelGroup;
|
|
282
284
|
InputFrame: typeof InputFrame;
|
|
283
285
|
DragFrame: typeof DragFrame;
|
|
284
286
|
DragTarget: typeof DragTarget;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
TouchStick: typeof TouchStick;
|
|
288
|
+
TouchDPad: typeof TouchDPad;
|
|
289
|
+
TouchButton: typeof TouchButton;
|
|
288
290
|
};
|
|
289
291
|
declare const audio: {
|
|
290
292
|
synthesizer: typeof synthesizer;
|