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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angle.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/angle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"angle.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/angle.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7F,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAGzD,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAA;AAElF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IACrE;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;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,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C,CAAA;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,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EACzB,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAE3B;AAED,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAa5E,CAAA;AAKD,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,MAAM,EAAE,MAAM,CAG1D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,MAAM,EAAE,MAAM,CAG1D,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,eAAe,CAuKjE,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type BitmaskWidgetAttrs<T = unknown> = CommonWidgetAttrs & BitmaskInputAttrs<T>;
|
|
8
|
+
/**
|
|
9
|
+
* Bitmask component model
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type BitmaskInputAttrs<T = unknown> = TweakableAttrs<T, number> & {
|
|
13
|
+
/**
|
|
14
|
+
* This is called when the control value has been changed.
|
|
15
|
+
*/
|
|
16
|
+
oninput?: (model: T, value: unknown) => void;
|
|
17
|
+
/**
|
|
18
|
+
* This is called once the control value is committed by the user.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
22
|
+
*/
|
|
23
|
+
onchange?: (model: T, value: unknown) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Disables the control input
|
|
26
|
+
*/
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The number of bits in the mask
|
|
30
|
+
*/
|
|
31
|
+
bitCount?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Maaping of names to bit values. If provided, the control will display the names instead of the bit indices.
|
|
34
|
+
*/
|
|
35
|
+
names?: Record<string, number>;
|
|
36
|
+
};
|
|
37
|
+
export declare function uiBitmaskWidget<T>(attrs: BitmaskWidgetAttrs<T>, children?: Children): Vnode<BitmaskWidgetAttrs<T>>;
|
|
38
|
+
export declare const BitmaskWidgetComponent: FactoryComponent<BitmaskWidgetAttrs>;
|
|
39
|
+
export declare function uiBitmaskInput<T>(attrs: BitmaskInputAttrs<T>, children?: Children): Vnode<BitmaskInputAttrs<T>>;
|
|
40
|
+
export declare const BitmaskInputComponent: FactoryComponent<BitmaskInputAttrs>;
|
|
41
|
+
//# sourceMappingURL=bitmask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitmask.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/bitmask.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAsB,MAAM,aAAa,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;AAEtF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IACvE;;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;IAE7C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CAAA;AAED,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC5B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAE9B;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,kBAAkB,CAavE,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,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,iBAAiB,CAqFrE,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Child, Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type BooleanWidgetAttrs<T = unknown> = CommonWidgetAttrs & BooleanInputAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Describes a checkbox control
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type BooleanInputAttrs<T = unknown> = TweakableAttrs<T, boolean> & {
|
|
10
|
+
/**
|
|
11
|
+
* This is called when the control value changes
|
|
12
|
+
*/
|
|
13
|
+
onchange?: (model: T, value: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* This is called when the control value changes
|
|
16
|
+
*/
|
|
17
|
+
oninput?: (model: T, value: boolean) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Content before the input field
|
|
20
|
+
*/
|
|
21
|
+
slotBefore?: Child;
|
|
22
|
+
/**
|
|
23
|
+
* Content after the input field
|
|
24
|
+
*/
|
|
25
|
+
slotAfter?: Child;
|
|
26
|
+
/**
|
|
27
|
+
* Content shown when the value is true
|
|
28
|
+
*/
|
|
29
|
+
slotTrue?: Child;
|
|
30
|
+
/**
|
|
31
|
+
* Content shown when the value is false
|
|
32
|
+
*/
|
|
33
|
+
slotFalse?: Child;
|
|
34
|
+
/**
|
|
35
|
+
* Disables the control input
|
|
36
|
+
*/
|
|
37
|
+
readonly?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to use a toggle button style instead of a checkbox. By default, this is false (checkbox style).
|
|
40
|
+
*/
|
|
41
|
+
toggle?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Aligns the checkbox to the start or end of the control.
|
|
44
|
+
* By default, the checkbox is placed at the end of the control.
|
|
45
|
+
*/
|
|
46
|
+
align?: 'start' | 'end';
|
|
47
|
+
};
|
|
48
|
+
export declare function uiBoolWidget<T>(attrs: BooleanWidgetAttrs<T>, children?: Children): Vnode<BooleanWidgetAttrs<T>>;
|
|
49
|
+
export declare function uiBoolInput<T>(attrs: BooleanInputAttrs<T>, children?: Children): Vnode<BooleanInputAttrs<T>>;
|
|
50
|
+
export declare const BoolWidgetComponent: FactoryComponent<BooleanWidgetAttrs>;
|
|
51
|
+
export declare const BoolInputComponent: FactoryComponent<BooleanInputAttrs>;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EAAE,QAAQ,GAClB,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAE9B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC3B,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAE7B;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,kBAAkB,CAapE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,CAAC,iBAAiB,CA+ClE,CAAA"}
|
|
@@ -1,57 +1,42 @@
|
|
|
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
|
-
* @remarks
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
* If a prefix is missing `#` is assumed
|
|
43
|
-
*/
|
|
44
|
-
format?: string;
|
|
45
|
-
/**
|
|
46
|
-
* This is called when the control value has been changed.
|
|
47
|
-
*/
|
|
48
|
-
onInput?: (model: ColorPickerModel<T, V>, value: unknown) => void;
|
|
49
|
-
/**
|
|
50
|
-
* This is called once the control value is committed by the user.
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
54
|
-
*/
|
|
55
|
-
onChange?: (model: ColorPickerModel<T, V>, value: unknown) => void;
|
|
56
|
-
}
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type ColorPickerWidgetAttrs<T = unknown> = CommonWidgetAttrs & ColorPickerAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Color picker component model
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export type ColorPickerAttrs<T = unknown> = TweakableAttrs<T, any> & {
|
|
11
|
+
/**
|
|
12
|
+
* The format of the string value. Defaults to 'rgb'
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* This must be a combination of the letters `r`, `g`, `b` and `a`.
|
|
16
|
+
*
|
|
17
|
+
* A prefix of `#` indicates the input/output is a hex string. e.g. #rgba
|
|
18
|
+
*
|
|
19
|
+
* A prefix of `0x` indicates the input is a number. e.g. 0xrgba
|
|
20
|
+
*
|
|
21
|
+
* A prefix of `[]` indicates the input is an array of numbers. e.g. `[]rgba`
|
|
22
|
+
*
|
|
23
|
+
* If a prefix is missing `#` is assumed
|
|
24
|
+
*/
|
|
25
|
+
format?: string;
|
|
26
|
+
/**
|
|
27
|
+
* This is called when the control value has been changed.
|
|
28
|
+
*/
|
|
29
|
+
oninput?: (model: T, value: any) => void;
|
|
30
|
+
/**
|
|
31
|
+
* This is called once the control value is committed by the user.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
35
|
+
*/
|
|
36
|
+
onchange?: (model: T, value: any) => void;
|
|
37
|
+
};
|
|
38
|
+
export declare function uiColorPickerWidget<T>(attrs: ColorPickerWidgetAttrs<T>, children?: Children): Vnode<ColorPickerWidgetAttrs<T>>;
|
|
39
|
+
export declare function uiColorPicker<T>(attrs: ColorPickerAttrs<T>, children?: Children): Vnode<ColorPickerAttrs<T>>;
|
|
40
|
+
export declare const ColorPickerWidgetComponent: FactoryComponent<ColorPickerWidgetAttrs>;
|
|
41
|
+
export declare const ColorPicker: FactoryComponent<ColorPickerAttrs>;
|
|
57
42
|
//# sourceMappingURL=color-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/color-picker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/color-picker.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAEzD,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEzF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;IACnE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAExC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAChC,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAElC;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,0BAA0B,EAAE,gBAAgB,CAAC,sBAAsB,CAa/E,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,gBAAgB,CAoU1D,CAAA"}
|
|
@@ -1,52 +1,38 @@
|
|
|
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
|
-
normalized?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* This is called when the control value has been changed.
|
|
42
|
-
*/
|
|
43
|
-
onInput?: (model: ColorModel<T, V>, value: unknown) => void;
|
|
44
|
-
/**
|
|
45
|
-
* This is called once the control value is committed by the user.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
49
|
-
*/
|
|
50
|
-
onChange?: (model: ColorModel<T, V>, value: unknown) => void;
|
|
51
|
-
}
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type ColorWidgetAttrs<T = unknown> = CommonWidgetAttrs & ColorAttrs<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Color component model
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type ColorAttrs<T = unknown> = TweakableAttrs<T, any> & {
|
|
10
|
+
/**
|
|
11
|
+
* The format of the string value. Defaults to 'rgb'
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This must be a combination of the letters r, g, b and a
|
|
15
|
+
* and it must match the input value.
|
|
16
|
+
*/
|
|
17
|
+
format?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether each component is normalized to range [0:1]
|
|
20
|
+
*/
|
|
21
|
+
normalized?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* This is called when the control value has been changed.
|
|
24
|
+
*/
|
|
25
|
+
oninput?: (model: T, value: any) => 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: any) => void;
|
|
33
|
+
};
|
|
34
|
+
export declare function uiColorWidget<T>(attrs: ColorWidgetAttrs<T>, children?: Children): Vnode<ColorWidgetAttrs<T>>;
|
|
35
|
+
export declare function uiColor<T>(attrs: ColorAttrs<T>, children?: Children): Vnode<ColorAttrs<T>>;
|
|
36
|
+
export declare const ColorWidgetComponent: FactoryComponent<ColorWidgetAttrs>;
|
|
37
|
+
export declare const ColorComponent: FactoryComponent<ColorAttrs>;
|
|
52
38
|
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"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CAAA"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
export * from './angle';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './color
|
|
4
|
-
export * from './color';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
1
|
+
export * from './angle';
|
|
2
|
+
export * from './bool';
|
|
3
|
+
export * from './color';
|
|
4
|
+
export * from './color-picker';
|
|
5
|
+
export * from './input';
|
|
6
|
+
export * from './matrix';
|
|
7
|
+
export * from './point';
|
|
8
|
+
export * from './scalar';
|
|
9
|
+
export * from './select';
|
|
10
|
+
export * from './spherical';
|
|
11
|
+
export * from './string';
|
|
12
|
+
export * from './vector';
|
|
13
|
+
export * from './bitmask';
|
|
14
|
+
export * from './poll';
|
|
11
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Child, Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { ValueWidgetAttrs } from '../elements';
|
|
3
|
+
/**
|
|
4
|
+
* Basic input component model
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type InputWidgetAttrs<T = unknown> = ValueWidgetAttrs<T, string> & {
|
|
8
|
+
/**
|
|
9
|
+
* The placeholder text
|
|
10
|
+
*/
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Content before the input field
|
|
14
|
+
*/
|
|
15
|
+
slotBefore?: Child;
|
|
16
|
+
/**
|
|
17
|
+
* Content after the input field
|
|
18
|
+
*/
|
|
19
|
+
slotAfter?: Child;
|
|
20
|
+
/**
|
|
21
|
+
* This is called when the control value has been changed.
|
|
22
|
+
*/
|
|
23
|
+
oninput?: (model: T, value: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* This is called once the control value is committed by the user.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
29
|
+
*/
|
|
30
|
+
onchange?: (model: T, value: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Disables the control input
|
|
33
|
+
*/
|
|
34
|
+
readonly?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
type?: string;
|
|
39
|
+
};
|
|
40
|
+
export declare function uiInputWidget<T>(attrs: InputWidgetAttrs<T>, children?: Children): Vnode<InputWidgetAttrs<T>>;
|
|
41
|
+
export declare function uiInput<T>(attrs: InputWidgetAttrs<T>, children?: Children): Vnode<InputWidgetAttrs<T>>;
|
|
42
|
+
export declare const InputWidgetComponent: FactoryComponent<InputWidgetAttrs>;
|
|
43
|
+
export declare const InputComponent: FactoryComponent<InputWidgetAttrs>;
|
|
44
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/input.ts"],"names":[],"mappings":"AAAA,OAAU,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Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type MatrixElements = number[];
|
|
8
|
+
export type MatrixWidgetAttrs<T = unknown> = CommonWidgetAttrs & MatrixInputAttrs<T>;
|
|
9
|
+
/**
|
|
10
|
+
* Matrix component model
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type MatrixInputAttrs<T = unknown> = TweakableAttrs<T, MatrixElements> & {
|
|
14
|
+
/**
|
|
15
|
+
* The number of rows in the matrix
|
|
16
|
+
*/
|
|
17
|
+
rows: number;
|
|
18
|
+
/**
|
|
19
|
+
* The number of columns in the matrix
|
|
20
|
+
*/
|
|
21
|
+
cols: number;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the input values are ordered in row-major order. Default assumes column-major order.
|
|
24
|
+
*/
|
|
25
|
+
rowMajor?: boolean;
|
|
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
|
+
* This is called when the control value has been changed.
|
|
40
|
+
*/
|
|
41
|
+
oninput?: (model: T, value: unknown) => void;
|
|
42
|
+
/**
|
|
43
|
+
* This is called once the control value is committed by the user.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
47
|
+
*/
|
|
48
|
+
onchange?: (model: T, value: unknown) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Disables the control input
|
|
51
|
+
*/
|
|
52
|
+
readonly?: boolean;
|
|
53
|
+
};
|
|
54
|
+
export declare function uiMatrixWidget<T>(attrs: MatrixWidgetAttrs<T>, children?: Children): Vnode<MatrixWidgetAttrs<T>>;
|
|
55
|
+
export declare const MatrixWidgetComponent: FactoryComponent<MatrixWidgetAttrs>;
|
|
56
|
+
export declare function uiMatrixInput<T>(attrs: MatrixInputAttrs<T>, children?: Children): Vnode<MatrixInputAttrs<T>>;
|
|
57
|
+
export declare const MatrixInputComponent: FactoryComponent<MatrixInputAttrs>;
|
|
58
|
+
//# sourceMappingURL=matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/matrix.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;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,EAAE,CAAA;AACrC,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,cAAc,CAAC,GAAG;IAC9E;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;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,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAA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
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
45
|
-
*/
|
|
46
|
-
onChange?: (model: PointModel<T>, value: number) => void;
|
|
47
|
-
}
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { ValueWidgetAttrs } from '../elements';
|
|
3
|
+
/**
|
|
4
|
+
* Point component model
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type PointAttrs<T = unknown> = ValueWidgetAttrs<T, any> & {
|
|
8
|
+
/**
|
|
9
|
+
* The object field names. Defaults to `['x', 'y']`
|
|
10
|
+
*/
|
|
11
|
+
keys?: string[];
|
|
12
|
+
/**
|
|
13
|
+
* X-Axis min and max valuse
|
|
14
|
+
*/
|
|
15
|
+
rangeX?: [number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Y-Axis min and max valuse
|
|
18
|
+
*/
|
|
19
|
+
rangeY?: [number, number];
|
|
20
|
+
/**
|
|
21
|
+
* Value to reset to when released
|
|
22
|
+
*/
|
|
23
|
+
reset?: [number, number];
|
|
24
|
+
/**
|
|
25
|
+
* Snap to grid value
|
|
26
|
+
*/
|
|
27
|
+
snap?: number;
|
|
28
|
+
/**
|
|
29
|
+
* This is called when the control value has been changed.
|
|
30
|
+
*/
|
|
31
|
+
oninput?: (model: PointAttrs<T>, value: number) => void;
|
|
32
|
+
/**
|
|
33
|
+
* This is called once the control value is committed by the user.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
37
|
+
*/
|
|
38
|
+
onchange?: (model: PointAttrs<T>, value: number) => void;
|
|
39
|
+
};
|
|
40
|
+
export declare function uiPoint<T>(attrs: PointAttrs<T>, children?: Children): Vnode<PointAttrs<T>>;
|
|
41
|
+
export declare const PointComponent: FactoryComponent<PointAttrs>;
|
|
48
42
|
//# sourceMappingURL=point.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/point.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/point.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI9D,OAAO,EAAY,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAExD;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;IAC/D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACzD,CAAA;AAKD,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAE1F;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,UAAU,CAqJvD,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Children, FactoryComponent, Vnode } from 'mithril';
|
|
2
|
+
import { TweakableAttrs } from '../../core';
|
|
3
|
+
import { CommonWidgetAttrs } from '../elements';
|
|
4
|
+
export type PollWidgetAttrs<T = unknown> = CommonWidgetAttrs & PollAttrs<T>;
|
|
5
|
+
export type PollAttrs<T = unknown> = TweakableAttrs<T, string | number | boolean> & {
|
|
6
|
+
interval?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function uiPollWidget<T>(attrs: PollWidgetAttrs<T>, children?: Children): Vnode<PollWidgetAttrs<T>>;
|
|
9
|
+
export declare function uiPoll<T>(attrs: PollAttrs<T>, children?: Children): Vnode<PollAttrs<T>>;
|
|
10
|
+
export declare const PollWidgetComponent: FactoryComponent<PollWidgetAttrs>;
|
|
11
|
+
export declare const PollComponent: FactoryComponent<PollWidgetAttrs>;
|
|
12
|
+
//# sourceMappingURL=poll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/poll.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAEzD,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EACzB,QAAQ,CAAC,EAAE,QAAQ,GAClB,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAE3B;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAEvF;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,eAAe,CAajE,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAsB3D,CAAA"}
|