muigui 0.0.14 → 0.0.16
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/README.md +49 -4
- package/dist/0.x/controllers/Button.d.ts +7 -0
- package/dist/0.x/controllers/Canvas.d.ts +6 -0
- package/dist/0.x/controllers/Checkbox.d.ts +4 -0
- package/dist/0.x/controllers/Color.d.ts +6 -0
- package/dist/0.x/controllers/ColorChooser.d.ts +6 -0
- package/dist/0.x/controllers/Container.d.ts +13 -0
- package/dist/0.x/controllers/Controller.d.ts +20 -0
- package/dist/0.x/controllers/Direction.d.ts +5 -0
- package/dist/0.x/controllers/Divider.d.ts +4 -0
- package/dist/0.x/controllers/Folder.d.ts +10 -0
- package/dist/0.x/controllers/Label.d.ts +4 -0
- package/dist/0.x/controllers/LabelController.d.ts +8 -0
- package/dist/0.x/controllers/PopDownController.d.ts +10 -0
- package/dist/0.x/controllers/RadioGrid.d.ts +4 -0
- package/dist/0.x/controllers/Range.d.ts +4 -0
- package/dist/0.x/controllers/Select.d.ts +4 -0
- package/dist/0.x/controllers/Slider.d.ts +4 -0
- package/dist/0.x/controllers/Text.d.ts +4 -0
- package/dist/0.x/controllers/TextNumber.d.ts +5 -0
- package/dist/0.x/controllers/ValueController.d.ts +17 -0
- package/dist/0.x/controllers/Vec2.d.ts +4 -0
- package/dist/0.x/controllers/create-controller.d.ts +13 -0
- package/dist/0.x/esm.d.ts +16 -0
- package/dist/0.x/layout/Column.d.ts +4 -0
- package/dist/0.x/layout/Frame.d.ts +5 -0
- package/dist/0.x/layout/Grid.d.ts +4 -0
- package/dist/0.x/layout/Layout.d.ts +5 -0
- package/dist/0.x/layout/Row.d.ts +4 -0
- package/dist/0.x/libs/assert.d.ts +1 -0
- package/dist/0.x/libs/color-utils.d.ts +235 -0
- package/dist/0.x/libs/conversions.d.ts +16 -0
- package/dist/0.x/libs/elem.d.ts +4 -0
- package/dist/0.x/libs/graph.d.ts +6 -0
- package/dist/0.x/libs/ids.d.ts +1 -0
- package/dist/0.x/libs/key-values.d.ts +1 -0
- package/dist/0.x/libs/keyboard.d.ts +6 -0
- package/dist/0.x/libs/monitor.d.ts +3 -0
- package/dist/0.x/libs/resize-helpers.d.ts +3 -0
- package/dist/0.x/libs/svg.d.ts +1 -0
- package/dist/0.x/libs/taskrunner.d.ts +2 -0
- package/dist/0.x/libs/touch.d.ts +17 -0
- package/dist/0.x/libs/utils.d.ts +27 -0
- package/dist/0.x/libs/wheel.d.ts +1 -0
- package/dist/0.x/muigui.d.ts +48 -0
- package/dist/0.x/muigui.js +4006 -0
- package/dist/0.x/muigui.js.map +1 -0
- package/dist/0.x/muigui.min.js +2 -0
- package/dist/0.x/muigui.min.js.map +1 -0
- package/dist/0.x/muigui.module.js +4043 -0
- package/dist/0.x/muigui.module.js.map +1 -0
- package/dist/0.x/muigui.module.min.js +2 -0
- package/dist/0.x/muigui.module.min.js.map +1 -0
- package/dist/0.x/styles/muigui.css.d.ts +30 -0
- package/dist/0.x/views/CheckboxView.d.ts +6 -0
- package/dist/0.x/views/ColorChooserView.d.ts +7 -0
- package/dist/0.x/views/ColorView.d.ts +7 -0
- package/dist/0.x/views/DirectionView.d.ts +7 -0
- package/dist/0.x/views/EditView.d.ts +6 -0
- package/dist/0.x/views/ElementView.d.ts +4 -0
- package/dist/0.x/views/NumberView.d.ts +7 -0
- package/dist/0.x/views/RadioGridView.d.ts +7 -0
- package/dist/0.x/views/RangeView.d.ts +7 -0
- package/dist/0.x/views/SelectView.d.ts +6 -0
- package/dist/0.x/views/SliderView.d.ts +7 -0
- package/dist/0.x/views/TextView.d.ts +7 -0
- package/dist/0.x/views/ValueView.d.ts +4 -0
- package/dist/0.x/views/Vec2View.d.ts +6 -0
- package/dist/0.x/views/View.d.ts +16 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ gui.add(s, 'someFunction');
|
|
|
40
40
|
|
|
41
41
|
produces
|
|
42
42
|
|
|
43
|
-
<img src="./images/muigui-screenshot.png"
|
|
43
|
+
<img src="./images/muigui-screenshot.png" width="250">
|
|
44
44
|
|
|
45
45
|
## Why
|
|
46
46
|
|
|
@@ -213,6 +213,8 @@ into using tweakpane and it doesn't meet my needs as of v4.0.0. Examples below
|
|
|
213
213
|
|
|
214
214
|
So, I thought I'd try to write a library that handled that case.
|
|
215
215
|
|
|
216
|
+
## Exploration
|
|
217
|
+
|
|
216
218
|
I also wanted to explore various things though many of them
|
|
217
219
|
have not made it into muigui yet.
|
|
218
220
|
|
|
@@ -266,7 +268,15 @@ have not made it into muigui yet.
|
|
|
266
268
|
gui.add(s);
|
|
267
269
|
```
|
|
268
270
|
|
|
269
|
-
|
|
271
|
+
You could implement that like this
|
|
272
|
+
|
|
273
|
+
```js
|
|
274
|
+
for (const key of Object.keys(s)) {
|
|
275
|
+
gui.add(s, key);
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
But that won't work. `someNumber` could only become
|
|
270
280
|
a `TextNumber` because there's no range. `someOption` would
|
|
271
281
|
only become a `Text` because there's no info that it's an enum.
|
|
272
282
|
`someColor` would become a `Text` because there's no info that
|
|
@@ -274,7 +284,39 @@ have not made it into muigui yet.
|
|
|
274
284
|
having to provide more info.
|
|
275
285
|
|
|
276
286
|
It's not clear in JS that adding that info would be a win
|
|
277
|
-
for keeping it simple but it sure would be nice.
|
|
287
|
+
for keeping it simple but it sure would be nice. I've thought
|
|
288
|
+
about passing a second object with options. The simplest version
|
|
289
|
+
would be something like this
|
|
290
|
+
|
|
291
|
+
```js
|
|
292
|
+
const s = {
|
|
293
|
+
someNumber: 123,
|
|
294
|
+
someString: 'hello',
|
|
295
|
+
someOption: 'dog',
|
|
296
|
+
someColor: '#ED3281',
|
|
297
|
+
someFunction: () => console.log('called')
|
|
298
|
+
};
|
|
299
|
+
const argsByName: {
|
|
300
|
+
someNumber: [{ min: 1, max: 200 }],
|
|
301
|
+
someOption: [['cat', 'bird', 'dog']],
|
|
302
|
+
someColor: [{type: 'color'}],
|
|
303
|
+
};
|
|
304
|
+
addObject(s, argsByName) {
|
|
305
|
+
for (const key of Object.keys(s)) {
|
|
306
|
+
gui.add(s, key, ...(argsByName[key] || []);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
But that's not really what you get from a typed system.
|
|
312
|
+
In a typed system, the fact that `someOption` is an enum
|
|
313
|
+
is known from its type. Similar that `someColor` is a
|
|
314
|
+
a color is known from it's type. `someNumber` is still
|
|
315
|
+
problematic because it needs a range which is probably
|
|
316
|
+
not part of its type.
|
|
317
|
+
|
|
318
|
+
In any case, I'd be nice to find a way to get an
|
|
319
|
+
instant UI like C#/Unity does.
|
|
278
320
|
|
|
279
321
|
* ## Modularity
|
|
280
322
|
|
|
@@ -389,12 +431,15 @@ some hidden gui state like whether or not a folder is expanded.
|
|
|
389
431
|
You still run into the issue though that the data being edited
|
|
390
432
|
might not be easily serializable so you'd have to find another solution.
|
|
391
433
|
|
|
434
|
+
To put it another way, it's not the responsibility of a UI library
|
|
435
|
+
to serialize.
|
|
436
|
+
|
|
392
437
|
## Future
|
|
393
438
|
|
|
394
439
|
I'm under sure how much time I'll continue to put into this.
|
|
395
440
|
I get the feeling other people are far more motivated to make
|
|
396
441
|
UIs. Maybe if I'm lucky they'll take some inspiration from
|
|
397
|
-
the thoughts above and I'll find they've covered it all.
|
|
442
|
+
the thoughts and ideas above and I'll find they've covered it all.
|
|
398
443
|
|
|
399
444
|
## License
|
|
400
445
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class Container extends Controller {
|
|
2
|
+
get children(): any[];
|
|
3
|
+
get controllers(): any[];
|
|
4
|
+
get folders(): any[];
|
|
5
|
+
reset(recursive?: boolean): this;
|
|
6
|
+
updateDisplay(): this;
|
|
7
|
+
remove(controller: any): this;
|
|
8
|
+
addController(controller: any): any;
|
|
9
|
+
pushContainer(container: any): any;
|
|
10
|
+
popContainer(): this;
|
|
11
|
+
#private;
|
|
12
|
+
}
|
|
13
|
+
import Controller from './Controller.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default class Controller extends View {
|
|
2
|
+
constructor(className: any);
|
|
3
|
+
get parent(): any;
|
|
4
|
+
setParent(parent: any): void;
|
|
5
|
+
show(show?: boolean): this;
|
|
6
|
+
hide(): this;
|
|
7
|
+
disabled(): boolean;
|
|
8
|
+
enable(enable?: boolean): this;
|
|
9
|
+
disable(disable?: boolean): this;
|
|
10
|
+
onChange(fn: any): this;
|
|
11
|
+
removeChange(fn: any): this;
|
|
12
|
+
onFinishChange(fn: any): this;
|
|
13
|
+
removeFinishChange(fn: any): this;
|
|
14
|
+
emitChange(value: any, object: any, property: any): void;
|
|
15
|
+
emitFinalChange(value: any, object: any, property: any): void;
|
|
16
|
+
updateDisplay(): void;
|
|
17
|
+
getColors(): any;
|
|
18
|
+
#private;
|
|
19
|
+
}
|
|
20
|
+
import View from '../views/View.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default class Folder extends Container {
|
|
2
|
+
constructor(name?: string, className?: string);
|
|
3
|
+
open(open?: boolean): this;
|
|
4
|
+
close(): this;
|
|
5
|
+
name(name: any): this;
|
|
6
|
+
title(title: any): this;
|
|
7
|
+
toggleOpen(): this;
|
|
8
|
+
#private;
|
|
9
|
+
}
|
|
10
|
+
import Container from './Container.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default class PopDownController extends ValueController {
|
|
2
|
+
constructor(object: any, property: any, options?: {});
|
|
3
|
+
setKnobColor(bgCssColor: any): void;
|
|
4
|
+
updateDisplay(): void;
|
|
5
|
+
setOptions(options: any): void;
|
|
6
|
+
addTop(view: any): any;
|
|
7
|
+
addBottom(view: any): import("../views/View.js").default;
|
|
8
|
+
#private;
|
|
9
|
+
}
|
|
10
|
+
import ValueController from './ValueController.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default class ValueController extends LabelController {
|
|
2
|
+
constructor(object: any, property: any, className?: string);
|
|
3
|
+
get initialValue(): any;
|
|
4
|
+
get object(): any;
|
|
5
|
+
get property(): any;
|
|
6
|
+
add(view: any): any;
|
|
7
|
+
setValue(v: any): void;
|
|
8
|
+
setFinalValue(v: any): this;
|
|
9
|
+
updateDisplay(ignoreCache: any): this;
|
|
10
|
+
setOptions(options: any): this;
|
|
11
|
+
getValue(): any;
|
|
12
|
+
value(v: any): this;
|
|
13
|
+
reset(): this;
|
|
14
|
+
listen(listen?: boolean): this;
|
|
15
|
+
#private;
|
|
16
|
+
}
|
|
17
|
+
import LabelController from './LabelController.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* possible inputs
|
|
3
|
+
* add(o, p, min: number, max: number)
|
|
4
|
+
* add(o, p, min: number, max: number, step: number)
|
|
5
|
+
* add(o, p, array: [value])
|
|
6
|
+
* add(o, p, array: [[key, value]])
|
|
7
|
+
*
|
|
8
|
+
* @param {*} object
|
|
9
|
+
* @param {string} property
|
|
10
|
+
* @param {...any} args
|
|
11
|
+
* @returns {Controller}
|
|
12
|
+
*/
|
|
13
|
+
export function createController(object: any, property: string, ...args: any[]): Controller;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import GUI from './muigui.js';
|
|
2
|
+
export { default as ColorChooser } from './controllers/ColorChooser.js';
|
|
3
|
+
export { default as Direction } from './controllers/Direction.js';
|
|
4
|
+
export { default as RadioGrid } from './controllers/RadioGrid.js';
|
|
5
|
+
export { default as Range } from './controllers/Range.js';
|
|
6
|
+
export { default as Select } from './controllers/Select.js';
|
|
7
|
+
export { default as Slider } from './controllers/Slider.js';
|
|
8
|
+
export { default as TextNumber } from './controllers/TextNumber.js';
|
|
9
|
+
export { default as Vec2 } from './controllers/Vec2.js';
|
|
10
|
+
import { graph } from './libs/graph.js';
|
|
11
|
+
import { monitor } from './libs/monitor.js';
|
|
12
|
+
export declare const helpers: {
|
|
13
|
+
graph: typeof graph;
|
|
14
|
+
monitor: typeof monitor;
|
|
15
|
+
};
|
|
16
|
+
export default GUI;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function assert(truthy: any, msg?: string): void;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
export function hslToRgbUint8([h, s, l]: [any, any, any]): number[];
|
|
2
|
+
export function hslaToRgbaUint8([h, s, l, a]: [any, any, any, any]): number[];
|
|
3
|
+
export function rgbFloatToHsl01([r, g, b]: [any, any, any]): number[];
|
|
4
|
+
export function rgbaFloatToHsla01([r, g, b, a]: [any, any, any, any]): any[];
|
|
5
|
+
export function hsv01ToRGBFloat([hue, sat, val]: [any, any, any]): number[];
|
|
6
|
+
export function hsva01ToRGBAFloat([hue, sat, val, alpha]: [any, any, any, any]): any[];
|
|
7
|
+
export function rgbFloatToHSV01([r, g, b]: [any, any, any]): number[];
|
|
8
|
+
export function rgbaFloatToHSVA01([r, g, b, a]: [any, any, any, any]): any[];
|
|
9
|
+
export function guessFormat(v: any): string;
|
|
10
|
+
export function hexToUint8RGB(v: any): number[];
|
|
11
|
+
export function uint8RGBToHex(v: any): string;
|
|
12
|
+
export function hexToUint8RGBA(v: any): number[];
|
|
13
|
+
export function uint8RGBAToHex(v: any): string;
|
|
14
|
+
export function hexToFloatRGB(v: any): number[];
|
|
15
|
+
export function floatRGBToHex(v: any): string;
|
|
16
|
+
export function hexToFloatRGBA(v: any): number[];
|
|
17
|
+
export function floatRGBAToHex(v: any): string;
|
|
18
|
+
export function rgbUint8ToHsl(rgb: any): number[];
|
|
19
|
+
export function rgbaUint8ToHsla(rgba: any): any[];
|
|
20
|
+
export function hasAlpha(format: any): any;
|
|
21
|
+
export const colorFormatConverters: {
|
|
22
|
+
hex6: {
|
|
23
|
+
color: {
|
|
24
|
+
from: (v: any) => any[];
|
|
25
|
+
to: typeof fixHex6;
|
|
26
|
+
};
|
|
27
|
+
text: {
|
|
28
|
+
from: (v: any) => any[];
|
|
29
|
+
to: (v: any) => any;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
hex8: {
|
|
33
|
+
color: {
|
|
34
|
+
from: (v: any) => any[];
|
|
35
|
+
to: typeof fixHex8;
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
from: (v: any) => any[];
|
|
39
|
+
to: (v: any) => any;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
hex3: {
|
|
43
|
+
color: {
|
|
44
|
+
from: (v: any) => any[];
|
|
45
|
+
to: typeof hex3ToHex6;
|
|
46
|
+
};
|
|
47
|
+
text: {
|
|
48
|
+
from: (v: any) => any[];
|
|
49
|
+
to: (v: any) => any;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
'hex6-no-hash': {
|
|
53
|
+
color: {
|
|
54
|
+
from: (v: any) => any[];
|
|
55
|
+
to: (v: any) => string;
|
|
56
|
+
};
|
|
57
|
+
text: {
|
|
58
|
+
from: (v: any) => any[];
|
|
59
|
+
to: (v: any) => any;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
'hex8-no-hash': {
|
|
63
|
+
color: {
|
|
64
|
+
from: (v: any) => any[];
|
|
65
|
+
to: (v: any) => string;
|
|
66
|
+
};
|
|
67
|
+
text: {
|
|
68
|
+
from: (v: any) => any[];
|
|
69
|
+
to: (v: any) => any;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
'hex3-no-hash': {
|
|
73
|
+
color: {
|
|
74
|
+
from: (v: any) => any[];
|
|
75
|
+
to: typeof hex3ToHex6;
|
|
76
|
+
};
|
|
77
|
+
text: {
|
|
78
|
+
from: (v: any) => any[];
|
|
79
|
+
to: (v: any) => any;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
'uint32-rgb': {
|
|
83
|
+
color: {
|
|
84
|
+
from: (v: any) => (number | boolean)[];
|
|
85
|
+
to: (v: any) => string;
|
|
86
|
+
};
|
|
87
|
+
text: {
|
|
88
|
+
from: (v: any) => (number | boolean)[];
|
|
89
|
+
to: (v: any) => string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
'uint32-rgba': {
|
|
93
|
+
color: {
|
|
94
|
+
from: (v: any) => (number | boolean)[];
|
|
95
|
+
to: (v: any) => string;
|
|
96
|
+
};
|
|
97
|
+
text: {
|
|
98
|
+
from: (v: any) => (number | boolean)[];
|
|
99
|
+
to: (v: any) => string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
'uint8-rgb': {
|
|
103
|
+
color: {
|
|
104
|
+
from: (v: any) => (boolean | number[])[];
|
|
105
|
+
to: (v: any) => string;
|
|
106
|
+
};
|
|
107
|
+
text: {
|
|
108
|
+
from: (s: any) => (boolean | number[])[];
|
|
109
|
+
to: (v: any) => any;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
'uint8-rgba': {
|
|
113
|
+
color: {
|
|
114
|
+
from: (v: any) => (boolean | number[])[];
|
|
115
|
+
to: (v: any) => string;
|
|
116
|
+
};
|
|
117
|
+
text: {
|
|
118
|
+
from: (s: any) => (boolean | number[])[];
|
|
119
|
+
to: (v: any) => any;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
'float-rgb': {
|
|
123
|
+
color: {
|
|
124
|
+
from: (v: any) => (boolean | number[])[];
|
|
125
|
+
to: (v: any) => string;
|
|
126
|
+
};
|
|
127
|
+
text: {
|
|
128
|
+
from: (s: any) => any[];
|
|
129
|
+
to: (v: any) => string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
'float-rgba': {
|
|
133
|
+
color: {
|
|
134
|
+
from: (v: any) => (boolean | number[])[];
|
|
135
|
+
to: (v: any) => string;
|
|
136
|
+
};
|
|
137
|
+
text: {
|
|
138
|
+
from: (s: any) => any[];
|
|
139
|
+
to: (v: any) => string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
'float-hsv': {
|
|
143
|
+
color: {
|
|
144
|
+
from: (v: any) => (boolean | number[])[];
|
|
145
|
+
to: (v: any) => number[];
|
|
146
|
+
};
|
|
147
|
+
text: {
|
|
148
|
+
from: (s: any) => any[];
|
|
149
|
+
to: (v: any) => string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
'float-hsva': {
|
|
153
|
+
color: {
|
|
154
|
+
from: (v: any) => (boolean | any[])[];
|
|
155
|
+
to: (v: any) => any[];
|
|
156
|
+
};
|
|
157
|
+
text: {
|
|
158
|
+
from: (s: any) => any[];
|
|
159
|
+
to: (v: any) => string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
'object-rgb': {
|
|
163
|
+
color: {
|
|
164
|
+
from: (v: any) => (boolean | {
|
|
165
|
+
r: number;
|
|
166
|
+
g: number;
|
|
167
|
+
b: number;
|
|
168
|
+
})[];
|
|
169
|
+
to: (v: any) => string;
|
|
170
|
+
};
|
|
171
|
+
text: {
|
|
172
|
+
from: (s: any) => any[];
|
|
173
|
+
to: (rgb: any) => string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
'object-rgba': {
|
|
177
|
+
color: {
|
|
178
|
+
from: (v: any) => (boolean | {
|
|
179
|
+
r: number;
|
|
180
|
+
g: number;
|
|
181
|
+
b: number;
|
|
182
|
+
a: number;
|
|
183
|
+
})[];
|
|
184
|
+
to: (v: any) => string;
|
|
185
|
+
};
|
|
186
|
+
text: {
|
|
187
|
+
from: (s: any) => any[];
|
|
188
|
+
to: (rgba: any) => string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
'css-rgb': {
|
|
192
|
+
color: {
|
|
193
|
+
from: (v: any) => (string | boolean)[];
|
|
194
|
+
to: (v: any) => string;
|
|
195
|
+
};
|
|
196
|
+
text: {
|
|
197
|
+
from: (s: any) => (string | boolean)[];
|
|
198
|
+
to: (v: any) => string | boolean;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
'css-rgba': {
|
|
202
|
+
color: {
|
|
203
|
+
from: (v: any) => (string | boolean)[];
|
|
204
|
+
to: (v: any) => string;
|
|
205
|
+
};
|
|
206
|
+
text: {
|
|
207
|
+
from: (s: any) => (string | boolean)[];
|
|
208
|
+
to: (v: any) => string | boolean;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
'css-hsl': {
|
|
212
|
+
color: {
|
|
213
|
+
from: (v: any) => (string | boolean)[];
|
|
214
|
+
to: (v: any) => string;
|
|
215
|
+
};
|
|
216
|
+
text: {
|
|
217
|
+
from: (s: any) => (string | boolean)[];
|
|
218
|
+
to: (v: any) => string | boolean;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
'css-hsla': {
|
|
222
|
+
color: {
|
|
223
|
+
from: (v: any) => (string | boolean)[];
|
|
224
|
+
to: (v: any) => string;
|
|
225
|
+
};
|
|
226
|
+
text: {
|
|
227
|
+
from: (s: any) => (string | boolean)[];
|
|
228
|
+
to: (v: any) => string | boolean;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
declare function fixHex6(v: any): any;
|
|
233
|
+
declare function fixHex8(v: any): any;
|
|
234
|
+
declare function hex3ToHex6(hex3: any): any;
|
|
235
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export namespace identity {
|
|
2
|
+
function to(v: any): any;
|
|
3
|
+
function from(v: any): any[];
|
|
4
|
+
}
|
|
5
|
+
export namespace strToNumber {
|
|
6
|
+
export function to_1(v: any): any;
|
|
7
|
+
export { to_1 as to };
|
|
8
|
+
export function from_1(v: any): (number | boolean)[];
|
|
9
|
+
export { from_1 as from };
|
|
10
|
+
}
|
|
11
|
+
export namespace converters {
|
|
12
|
+
let radToDeg: {
|
|
13
|
+
to: (v: any) => any;
|
|
14
|
+
from: (v: any) => any[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function makeId(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function convertToKeyValues(keyValues: any, valueIsNumber: any): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function arc(cx: any, cy: any, r: any, start: any, end: any): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function computeRelativePosition(elem: any, event: any, start: any): {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
nx: number;
|
|
5
|
+
ny: number;
|
|
6
|
+
dx: number;
|
|
7
|
+
dy: number;
|
|
8
|
+
ndx: number;
|
|
9
|
+
ndy: number;
|
|
10
|
+
};
|
|
11
|
+
export function addTouchEvents(elem: any, { onDown, onMove, onUp }: {
|
|
12
|
+
onDown?: typeof noop | undefined;
|
|
13
|
+
onMove?: typeof noop | undefined;
|
|
14
|
+
onUp?: typeof noop | undefined;
|
|
15
|
+
}): () => void;
|
|
16
|
+
declare function noop(): void;
|
|
17
|
+
export {};
|