tweak-ui 0.4.3 → 0.8.0
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/LICENSE +7 -7
- package/README.md +32 -32
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/builder.d.ts +102 -162
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/color/adapter.d.ts +7 -0
- package/dist/lib/color/adapter.d.ts.map +1 -0
- package/dist/lib/color/array-format.d.ts +9 -0
- package/dist/lib/color/array-format.d.ts.map +1 -0
- package/dist/lib/{color-formats → color}/converter.d.ts +18 -18
- package/dist/lib/color/converter.d.ts.map +1 -0
- package/dist/lib/color/css-string-format.d.ts +8 -0
- package/dist/lib/color/css-string-format.d.ts.map +1 -0
- package/dist/lib/color/formatter.d.ts +9 -0
- package/dist/lib/color/formatter.d.ts.map +1 -0
- package/dist/lib/color/hex-string-format.d.ts +9 -0
- package/dist/lib/color/hex-string-format.d.ts.map +1 -0
- package/dist/lib/{color-formats → color}/index.d.ts +3 -3
- package/dist/lib/color/index.d.ts.map +1 -0
- package/dist/lib/color/number-format.d.ts +9 -0
- package/dist/lib/color/number-format.d.ts.map +1 -0
- package/dist/lib/{color-formats → color}/object-format.d.ts +14 -14
- package/dist/lib/color/object-format.d.ts.map +1 -0
- package/dist/lib/{color-formats → color}/types.d.ts +107 -101
- package/dist/lib/color/types.d.ts.map +1 -0
- package/dist/lib/components/container/bar.d.ts +28 -0
- package/dist/lib/components/container/bar.d.ts.map +1 -0
- package/dist/lib/components/container/dialog.d.ts +14 -0
- package/dist/lib/components/container/dialog.d.ts.map +1 -0
- package/dist/lib/components/container/grid.d.ts +22 -0
- package/dist/lib/components/container/grid.d.ts.map +1 -0
- package/dist/lib/components/container/group.d.ts +55 -0
- package/dist/lib/components/container/group.d.ts.map +1 -0
- package/dist/lib/components/container/index.d.ts +10 -0
- package/dist/lib/components/container/index.d.ts.map +1 -0
- package/dist/lib/components/container/list.d.ts +25 -0
- package/dist/lib/components/container/list.d.ts.map +1 -0
- package/dist/lib/components/container/section.d.ts +28 -0
- package/dist/lib/components/container/section.d.ts.map +1 -0
- package/dist/lib/components/container/split.d.ts +40 -0
- package/dist/lib/components/container/split.d.ts.map +1 -0
- package/dist/lib/components/container/tabs.d.ts +23 -0
- package/dist/lib/components/container/tabs.d.ts.map +1 -0
- package/dist/lib/components/container/tree.d.ts +25 -0
- package/dist/lib/components/container/tree.d.ts.map +1 -0
- package/dist/lib/components/controls/angle.d.ts +47 -51
- package/dist/lib/components/controls/angle.d.ts.map +1 -1
- package/dist/lib/components/controls/bitmask.d.ts +41 -0
- package/dist/lib/components/controls/bitmask.d.ts.map +1 -0
- package/dist/lib/components/controls/bool.d.ts +52 -0
- package/dist/lib/components/controls/bool.d.ts.map +1 -0
- package/dist/lib/components/controls/color-picker.d.ts +41 -56
- package/dist/lib/components/controls/color-picker.d.ts.map +1 -1
- package/dist/lib/components/controls/color.d.ts +37 -51
- package/dist/lib/components/controls/color.d.ts.map +1 -1
- package/dist/lib/components/controls/index.d.ts +14 -10
- package/dist/lib/components/controls/index.d.ts.map +1 -1
- package/dist/lib/components/controls/input.d.ts +44 -0
- package/dist/lib/components/controls/input.d.ts.map +1 -0
- package/dist/lib/components/controls/matrix.d.ts +58 -0
- package/dist/lib/components/controls/matrix.d.ts.map +1 -0
- package/dist/lib/components/controls/point.d.ts +41 -47
- package/dist/lib/components/controls/point.d.ts.map +1 -1
- package/dist/lib/components/controls/poll.d.ts +12 -0
- package/dist/lib/components/controls/poll.d.ts.map +1 -0
- package/dist/lib/components/controls/scalar.d.ts +67 -0
- package/dist/lib/components/controls/scalar.d.ts.map +1 -0
- package/dist/lib/components/controls/select.d.ts +53 -59
- package/dist/lib/components/controls/select.d.ts.map +1 -1
- package/dist/lib/components/controls/spherical.d.ts +37 -74
- package/dist/lib/components/controls/spherical.d.ts.map +1 -1
- package/dist/lib/components/controls/string.d.ts +46 -0
- package/dist/lib/components/controls/string.d.ts.map +1 -0
- package/dist/lib/components/controls/vector.d.ts +54 -0
- package/dist/lib/components/controls/vector.d.ts.map +1 -0
- package/dist/lib/components/elements/button.d.ts +36 -0
- package/dist/lib/components/elements/button.d.ts.map +1 -0
- package/dist/lib/components/elements/divider.d.ts +4 -0
- package/dist/lib/components/elements/divider.d.ts.map +1 -0
- package/dist/lib/components/elements/graph.d.ts +8 -0
- package/dist/lib/components/elements/graph.d.ts.map +1 -0
- package/dist/lib/components/elements/image.d.ts +33 -0
- package/dist/lib/components/elements/image.d.ts.map +1 -0
- package/dist/lib/components/elements/index.d.ts +6 -0
- package/dist/lib/components/elements/index.d.ts.map +1 -0
- package/dist/lib/components/elements/widget.d.ts +27 -0
- package/dist/lib/components/elements/widget.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +3 -5
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/core/control.d.ts +20 -0
- package/dist/lib/core/control.d.ts.map +1 -0
- package/dist/lib/core/index.d.ts +3 -4
- package/dist/lib/core/index.d.ts.map +1 -1
- package/dist/lib/core/render.d.ts +7 -9
- package/dist/lib/core/render.d.ts.map +1 -1
- package/dist/lib/core/types.d.ts +73 -87
- package/dist/lib/core/types.d.ts.map +1 -1
- package/dist/lib/core/utils.d.ts +78 -93
- package/dist/lib/core/utils.d.ts.map +1 -1
- package/dist/lib/index.d.ts +21 -27
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/mount.d.ts +35 -45
- package/dist/lib/mount.d.ts.map +1 -1
- package/dist/lib/stats/index.d.ts +2 -0
- package/dist/lib/stats/index.d.ts.map +1 -0
- package/dist/lib/stats/sampler.d.ts +66 -0
- package/dist/lib/stats/sampler.d.ts.map +1 -0
- package/dist/lib/stats/stats-renderer.d.ts +16 -0
- package/dist/lib/stats/stats-renderer.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/style.d.ts +4 -0
- package/dist/tweak-ui.module.js +2938 -2393
- package/dist/tweak-ui.module.js.map +1 -1
- package/dist/tweak-ui.umd.js +33 -4420
- package/dist/tweak-ui.umd.js.map +1 -1
- package/package.json +37 -51
- package/dist/index.html +0 -1063
- package/dist/lib/color-formats/array-format.d.ts +0 -9
- package/dist/lib/color-formats/array-format.d.ts.map +0 -1
- package/dist/lib/color-formats/array-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/array-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/converter.d.ts.map +0 -1
- package/dist/lib/color-formats/converter.spec.d.ts +0 -2
- package/dist/lib/color-formats/converter.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/css-string-format.d.ts +0 -8
- package/dist/lib/color-formats/css-string-format.d.ts.map +0 -1
- package/dist/lib/color-formats/css-string-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/css-string-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/formatter.d.ts +0 -9
- package/dist/lib/color-formats/formatter.d.ts.map +0 -1
- package/dist/lib/color-formats/formatter.spec.d.ts +0 -2
- package/dist/lib/color-formats/formatter.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/hex-string-format.d.ts +0 -8
- package/dist/lib/color-formats/hex-string-format.d.ts.map +0 -1
- package/dist/lib/color-formats/hex-string-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/hex-string-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/index.d.ts.map +0 -1
- package/dist/lib/color-formats/number-format.d.ts +0 -9
- package/dist/lib/color-formats/number-format.d.ts.map +0 -1
- package/dist/lib/color-formats/number-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/number-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/object-format.d.ts.map +0 -1
- package/dist/lib/color-formats/object-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/object-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/types.d.ts.map +0 -1
- package/dist/lib/components/button.d.ts +0 -29
- package/dist/lib/components/button.d.ts.map +0 -1
- package/dist/lib/components/content.d.ts +0 -22
- package/dist/lib/components/content.d.ts.map +0 -1
- package/dist/lib/components/controls/checkbox.d.ts +0 -29
- package/dist/lib/components/controls/checkbox.d.ts.map +0 -1
- package/dist/lib/components/controls/number.d.ts +0 -48
- package/dist/lib/components/controls/number.d.ts.map +0 -1
- package/dist/lib/components/controls/position.d.ts +0 -56
- package/dist/lib/components/controls/position.d.ts.map +0 -1
- package/dist/lib/components/controls/text.d.ts +0 -36
- package/dist/lib/components/controls/text.d.ts.map +0 -1
- package/dist/lib/components/groups/accordion.d.ts +0 -22
- package/dist/lib/components/groups/accordion.d.ts.map +0 -1
- package/dist/lib/components/groups/container.d.ts +0 -25
- package/dist/lib/components/groups/container.d.ts.map +0 -1
- package/dist/lib/components/groups/group.d.ts +0 -49
- package/dist/lib/components/groups/group.d.ts.map +0 -1
- package/dist/lib/components/groups/index.d.ts +0 -5
- package/dist/lib/components/groups/index.d.ts.map +0 -1
- package/dist/lib/components/groups/tabs.d.ts +0 -22
- package/dist/lib/components/groups/tabs.d.ts.map +0 -1
- package/dist/lib/components/image.d.ts +0 -37
- package/dist/lib/components/image.d.ts.map +0 -1
- package/dist/lib/core/registry.d.ts +0 -18
- package/dist/lib/core/registry.d.ts.map +0 -1
- package/dist/lib/core/value-accessor.d.ts +0 -18
- package/dist/lib/core/value-accessor.d.ts.map +0 -1
- package/dist/scss/_style.scss +0 -120
- package/dist/scss/_themes.scss +0 -23
- package/dist/scss/_utils.scss +0 -24
- package/dist/scss/_variables.scss +0 -30
- package/dist/scss/controls/_angle.scss +0 -64
- package/dist/scss/controls/_button.scss +0 -0
- package/dist/scss/controls/_checkbox.scss +0 -19
- package/dist/scss/controls/_color-picker.scss +0 -124
- package/dist/scss/controls/_color.scss +0 -14
- package/dist/scss/controls/_container.scss +0 -13
- package/dist/scss/controls/_group.scss +0 -69
- package/dist/scss/controls/_image.scss +0 -27
- package/dist/scss/controls/_number.scss +0 -38
- package/dist/scss/controls/_point.scss +0 -36
- package/dist/scss/controls/_position.scss +0 -9
- package/dist/scss/controls/_select.scss +0 -0
- package/dist/scss/controls/_spherical.scss +0 -87
- package/dist/scss/controls/_tabs.scss +0 -38
- package/dist/scss/controls/_text.scss +0 -0
- package/dist/scss/index.scss +0 -21
- package/dist/tweak-ui.css +0 -653
- package/dist/tweak-ui.css.map +0 -1
- package/dist/tweak-ui.min.css +0 -1
- package/dist/tweak-ui.min.css.map +0 -1
- package/dist/tweak-ui.umd.min.js +0 -17
- package/dist/tweak-ui.umd.min.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Child, Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type ScalarWidgetAttrs<T = unknown> = CommonWidgetAttrs & ScalarInputAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Scalar component model
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type ScalarInputAttrs<T = unknown> = TweakableAttrs<T, number> & {
|
|
10
|
+
/**
|
|
11
|
+
* The placeholder text
|
|
12
|
+
*/
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Content before the input field
|
|
16
|
+
*/
|
|
17
|
+
slotBefore?: Child;
|
|
18
|
+
/**
|
|
19
|
+
* Content after the input field
|
|
20
|
+
*/
|
|
21
|
+
slotAfter?: Child;
|
|
22
|
+
/**
|
|
23
|
+
* The unit to display after the value. For example, "px" or "kg".
|
|
24
|
+
*/
|
|
25
|
+
unit?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The min value
|
|
28
|
+
*/
|
|
29
|
+
min?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The max value
|
|
32
|
+
*/
|
|
33
|
+
max?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The step value
|
|
36
|
+
*/
|
|
37
|
+
step?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Displays a range slider below the input field. By default, this is false.
|
|
40
|
+
*/
|
|
41
|
+
range?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* This is called when the control value has been changed.
|
|
44
|
+
*/
|
|
45
|
+
oninput?: (model: T, value: number) => void;
|
|
46
|
+
/**
|
|
47
|
+
* This is called once the control value is committed by the user.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
51
|
+
*/
|
|
52
|
+
onchange?: (model: T, value: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Disables the control input
|
|
55
|
+
*/
|
|
56
|
+
readonly?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The minimum number of fraction digits to display. By default, this is 1.
|
|
59
|
+
*/
|
|
60
|
+
decimals?: number;
|
|
61
|
+
class?: string;
|
|
62
|
+
};
|
|
63
|
+
export declare function uiScalarWidget<T>(attrs: ScalarWidgetAttrs<T>, children?: Children): Vnode<ScalarWidgetAttrs<T>>;
|
|
64
|
+
export declare function uiScalarInput<T>(attrs: ScalarInputAttrs<T>, children?: Children): Vnode<ScalarInputAttrs<T>>;
|
|
65
|
+
export declare const ScalarWidgetComponent: FactoryComponent<ScalarWidgetAttrs>;
|
|
66
|
+
export declare const ScalarInputComponent: FactoryComponent<ScalarInputAttrs>;
|
|
67
|
+
//# sourceMappingURL=scalar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/scalar.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAErE,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAEzD,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEpF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAA;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE3C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC3B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAE7B;AAED,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAE5B;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,iBAAiB,CAarE,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,gBAAgB,CAgKnE,CAAA"}
|
|
@@ -1,60 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onChange?: (model: SelectModel<T>, value: unknown) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Disables the control input
|
|
57
|
-
*/
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
}
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { ValueWidgetAttrs } from '../elements';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type SelectOption = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: unknown;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export type SelectOptionArray = Array<SelectOption | SelectOptionGroup | string | number>;
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type SelectOptionsObject = {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type SelectOptionGroup<T = SelectOptionArray | SelectOptionsObject> = {
|
|
25
|
+
label: string;
|
|
26
|
+
options: T;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Select component select options
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export type SelectModelOptions = SelectOptionArray | SelectOptionsObject;
|
|
34
|
+
/**
|
|
35
|
+
* Select component model
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export type SelectAttrs<T = unknown, V = any> = ValueWidgetAttrs<T, V> & {
|
|
39
|
+
/**
|
|
40
|
+
* The select options
|
|
41
|
+
*/
|
|
42
|
+
options?: SelectModelOptions;
|
|
43
|
+
/**
|
|
44
|
+
* This is called once the control value is committed by the user.
|
|
45
|
+
*/
|
|
46
|
+
onchange?: (model: T, value: V) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Disables the control input
|
|
49
|
+
*/
|
|
50
|
+
readonly?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare function uiSelect<T>(attrs: SelectAttrs<T>, children?: Children): Vnode<SelectAttrs<T>>;
|
|
53
|
+
export declare const SelectComponent: FactoryComponent<SelectAttrs>;
|
|
60
54
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/select.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/select.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI9D,OAAO,EAAY,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC,CAAA;AACzF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,iBAAiB,GAAG,mBAAmB,IAAI;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,CAAC,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AAExE;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,GAAG,IAAI,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACvE;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AA4DD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAE7F;AAED,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,WAAW,CAqFzD,CAAA"}
|
|
@@ -1,75 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* @
|
|
13
|
-
*/
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
41
|
-
*/
|
|
42
|
-
onChange?: (model: SphericalModel<T>, value: unknown) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Direction name
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
export declare type Direction = 'right' | 'left' | 'up' | 'down' | 'front' | 'back';
|
|
49
|
-
export interface SphericalCodecOptions<T> {
|
|
50
|
-
/**
|
|
51
|
-
* Maps object keys to cartesian axes. Defaults to `{ x: 'right', y: 'up', z: 'back' }`
|
|
52
|
-
*/
|
|
53
|
-
axes?: Record<string | number, Direction>;
|
|
54
|
-
/**
|
|
55
|
-
* The vector length (sphere radius). Defaults to `1`
|
|
56
|
-
*/
|
|
57
|
-
length?: number | (() => number);
|
|
58
|
-
/**
|
|
59
|
-
* Gets the objec where the result should be stored. May return a new instance.
|
|
60
|
-
*/
|
|
61
|
-
result?: () => T;
|
|
62
|
-
}
|
|
63
|
-
export declare function sphericalCodec(): ValueCodec<{
|
|
64
|
-
x: number;
|
|
65
|
-
y: number;
|
|
66
|
-
z: number;
|
|
67
|
-
}, {
|
|
68
|
-
phi: number;
|
|
69
|
-
theta: number;
|
|
70
|
-
}>;
|
|
71
|
-
export declare function sphericalCodec<T>(options: SphericalCodecOptions<T>): ValueCodec<T, {
|
|
72
|
-
phi: number;
|
|
73
|
-
theta: number;
|
|
74
|
-
}>;
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { ValueWidgetAttrs } from '../elements';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type CartesianValue = {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
z: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export type SphericalValue = {
|
|
15
|
+
radius: number;
|
|
16
|
+
azimuth: number;
|
|
17
|
+
polar: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Spherical component model
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type SphericalAttrs<T = unknown> = ValueWidgetAttrs<T, CartesianValue> & {
|
|
24
|
+
/**
|
|
25
|
+
* This is called when the control value has been changed.
|
|
26
|
+
*/
|
|
27
|
+
oninput?: (model: T, value: unknown) => void;
|
|
28
|
+
/**
|
|
29
|
+
* This is called once the control value is committed by the user.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
33
|
+
*/
|
|
34
|
+
onchange?: (model: T, value: unknown) => void;
|
|
35
|
+
};
|
|
36
|
+
export declare function uiSpherical<T>(attrs: SphericalAttrs<T>, children?: Children): Vnode<SphericalAttrs<T>>;
|
|
37
|
+
export declare const SphericalComponent: FactoryComponent<SphericalAttrs>;
|
|
75
38
|
//# sourceMappingURL=spherical.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spherical.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/spherical.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spherical.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/spherical.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI9D,OAAO,EAAY,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/E;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG;IAC9E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAE5C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9C,CAAA;AAED,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EACxB,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAE1B;AAED,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,CAAC,cAAc,CA0K/D,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Child, Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type StringWidgetAttrs<T = unknown> = CommonWidgetAttrs & StringInputAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Text component model
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type StringInputAttrs<T = unknown> = TweakableAttrs<T, string> & {
|
|
10
|
+
/**
|
|
11
|
+
* The placeholder text
|
|
12
|
+
*/
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
slotStart?: Child;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
slotEnd?: Child;
|
|
22
|
+
/**
|
|
23
|
+
* This is called when the control value has been changed.
|
|
24
|
+
*/
|
|
25
|
+
oninput?: (model: T, value: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* This is called once the control value is committed by the user.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
31
|
+
*/
|
|
32
|
+
onchange?: (model: T, value: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Disables the control input
|
|
35
|
+
*/
|
|
36
|
+
readonly?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The number of rows for a textarea. If not specified, a single-line input will be used.
|
|
39
|
+
*/
|
|
40
|
+
rows?: number;
|
|
41
|
+
};
|
|
42
|
+
export declare function uiStringWidget<T>(attrs: StringWidgetAttrs<T>, children?: Children): Vnode<StringWidgetAttrs<T>>;
|
|
43
|
+
export declare function uiString<T>(attrs: StringInputAttrs<T>, children?: Children): Vnode<StringInputAttrs<T>>;
|
|
44
|
+
export declare const StringWidgetComponent: FactoryComponent<StringWidgetAttrs>;
|
|
45
|
+
export declare const StringInputComponent: FactoryComponent<StringInputAttrs>;
|
|
46
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/string.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAEzD,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEpF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE3C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC3B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAE7B;AAED,wBAAgB,QAAQ,CAAC,CAAC,EACxB,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAE5B;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,iBAAiB,CAarE,CAAA;AACD,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,gBAAgB,CAyCnE,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type VectorWidgetAttrs<T = unknown> = CommonWidgetAttrs & VectorInputAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Vector component model
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type VectorInputAttrs<T = unknown> = TweakableAttrs<T, any> & {
|
|
10
|
+
/**
|
|
11
|
+
* The vector object field names. Defaults to `['x', 'y', 'z']`
|
|
12
|
+
*/
|
|
13
|
+
keys?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* The min value
|
|
16
|
+
*/
|
|
17
|
+
min?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The max value
|
|
20
|
+
*/
|
|
21
|
+
max?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The step value
|
|
24
|
+
*/
|
|
25
|
+
step?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Number of columns to display. By default, this is determined by the number of keys.
|
|
28
|
+
*/
|
|
29
|
+
cols?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to hide the field labels and just show the input controls. Default is false.
|
|
32
|
+
*/
|
|
33
|
+
unlabeled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* This is called when the control value has been changed.
|
|
36
|
+
*/
|
|
37
|
+
oninput?: (model: T, value: unknown, key?: string | number) => void;
|
|
38
|
+
/**
|
|
39
|
+
* This is called once the control value is committed by the user.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
43
|
+
*/
|
|
44
|
+
onchange?: (model: T, value: unknown, key?: string | number) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Disables the control input
|
|
47
|
+
*/
|
|
48
|
+
readonly?: boolean;
|
|
49
|
+
};
|
|
50
|
+
export declare function uiVectorWidget<T>(attrs: VectorWidgetAttrs<T>, children?: Children): Vnode<VectorWidgetAttrs<T>>;
|
|
51
|
+
export declare function uiVectorInput<T>(attrs: VectorInputAttrs<T>, children?: Children): Vnode<VectorInputAttrs<T>>;
|
|
52
|
+
export declare const VectorWidgetComponent: FactoryComponent<VectorWidgetAttrs>;
|
|
53
|
+
export declare const VectorInputComponent: FactoryComponent<VectorInputAttrs>;
|
|
54
|
+
//# sourceMappingURL=vector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/vector.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAC7E,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAGzD,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEpF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;IACnE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IACnE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC3B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAE7B;AAED,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAE5B;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,iBAAiB,CAarE,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,gBAAgB,CAuCnE,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { EventAttrs, StyleAttr } from '../../core';
|
|
3
|
+
/**
|
|
4
|
+
* Button component model
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type ButtonAttrs = EventAttrs & {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
style?: StyleAttr;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the button square
|
|
15
|
+
*/
|
|
16
|
+
square?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the button a block
|
|
19
|
+
*/
|
|
20
|
+
block?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the button is large
|
|
23
|
+
*/
|
|
24
|
+
large?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
accent?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Css flex property
|
|
31
|
+
*/
|
|
32
|
+
flex?: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function uiButton<T>(attrs: ButtonAttrs, children?: Children): Vnode<ButtonAttrs>;
|
|
35
|
+
export declare const ButtonComponent: FactoryComponent<ButtonAttrs>;
|
|
36
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/button.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAGlD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAEvF;AAED,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,WAAW,CA2BzD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/divider.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEhE,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAE9D;AAED,eAAO,MAAM,OAAO,EAAE,gBAAgB,CAAC,UAAU,CAMhD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { StatsConfig } from '../../stats';
|
|
3
|
+
export interface GraphAttrs extends Partial<StatsConfig> {
|
|
4
|
+
rowHeight?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function uiGraph(attrs: GraphAttrs, children?: Children): Vnode<GraphAttrs>;
|
|
7
|
+
export declare const GraphComponent: FactoryComponent<GraphAttrs>;
|
|
8
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/graph.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAY,MAAM,SAAS,CAAA;AACxE,OAAO,EAAE,WAAW,EAAgC,MAAM,aAAa,CAAA;AAEvE,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,WAAW,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAEjF;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,UAAU,CAqHvD,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { EventAttrs, StyleAttr } from '../../core';
|
|
3
|
+
/**
|
|
4
|
+
* Image component model
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type ImageAttrs = EventAttrs & {
|
|
8
|
+
/**
|
|
9
|
+
* The image source url
|
|
10
|
+
*/
|
|
11
|
+
src?: string | any;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
render?: (src: any) => Promise<ImageBitmap>;
|
|
16
|
+
/**
|
|
17
|
+
* Aspect ratio of the picture container
|
|
18
|
+
*/
|
|
19
|
+
aspect?: number | string;
|
|
20
|
+
/**
|
|
21
|
+
* A fixed width
|
|
22
|
+
*/
|
|
23
|
+
width?: number | string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
28
|
+
class?: string;
|
|
29
|
+
style?: StyleAttr;
|
|
30
|
+
};
|
|
31
|
+
export declare function uiImage(attrs: ImageAttrs, children?: Children): Vnode<ImageAttrs>;
|
|
32
|
+
export declare const ImageComponent: FactoryComponent<ImageAttrs>;
|
|
33
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/image.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAGlD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;IAE3C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEvB;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAElC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAEjF;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,UAAU,CA6GvD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { EventAttrs, StyleAttr, TweakableAttrs } from '../../core';
|
|
3
|
+
export type WidgetAttrs = EventAttrs & CommonWidgetAttrs & {
|
|
4
|
+
[property: string]: any;
|
|
5
|
+
/**
|
|
6
|
+
* The HTML tag to use for the control container, defaults to 'div'
|
|
7
|
+
*/
|
|
8
|
+
tagName?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Style object to apply to the control container
|
|
11
|
+
*/
|
|
12
|
+
style?: StyleAttr;
|
|
13
|
+
};
|
|
14
|
+
export interface CommonWidgetAttrs {
|
|
15
|
+
/**
|
|
16
|
+
* A label for the control
|
|
17
|
+
*/
|
|
18
|
+
label?: Children | false;
|
|
19
|
+
/**
|
|
20
|
+
* Additional CSS class names to apply to the control container
|
|
21
|
+
*/
|
|
22
|
+
class?: string;
|
|
23
|
+
}
|
|
24
|
+
export type ValueWidgetAttrs<T = any, V = any> = CommonWidgetAttrs & TweakableAttrs<T, V>;
|
|
25
|
+
export declare const WidgetComponent: FactoryComponent<WidgetAttrs>;
|
|
26
|
+
export declare function uiWidget(attrs: WidgetAttrs, children?: Children): Vnode<WidgetAttrs>;
|
|
27
|
+
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/elements/widget.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAElE,MAAM,MAAM,WAAW,GAAG,UAAU,GAClC,iBAAiB,GAAG;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAEH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,iBAAiB,GAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAEzF,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,WAAW,CAgBzD,CAAA;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAEpF"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './content';
|
|
5
|
-
export * from './image';
|
|
1
|
+
export * from './container';
|
|
2
|
+
export * from './controls';
|
|
3
|
+
export * from './elements';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TweakableAttrs } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets a value of a view model
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @param control - The model of a component
|
|
7
|
+
*/
|
|
8
|
+
export declare function getControlValue<V>(control: TweakableAttrs<any, V>): V;
|
|
9
|
+
/**
|
|
10
|
+
* Sets a value on a view model
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
* @param control - The model of a component
|
|
14
|
+
* @param value - The value for the component
|
|
15
|
+
* @returns the encoded value as it was written to the model
|
|
16
|
+
*/
|
|
17
|
+
export declare function setControlValue<V, R>(control: TweakableAttrs<any, V>, value: V): unknown;
|
|
18
|
+
export declare function getRawValue(attrs: TweakableAttrs<any, any>): any;
|
|
19
|
+
export declare function setRawValue(attrs: TweakableAttrs<any, any>, value: any): void;
|
|
20
|
+
//# sourceMappingURL=control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../src/lib/core/control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGxC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,WAI9E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,OAW1D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAmB7E"}
|
package/dist/lib/core/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|