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.
Files changed (200) hide show
  1. package/LICENSE +7 -7
  2. package/README.md +32 -32
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/lib/builder.d.ts +102 -162
  6. package/dist/lib/builder.d.ts.map +1 -1
  7. package/dist/lib/color/adapter.d.ts +7 -0
  8. package/dist/lib/color/adapter.d.ts.map +1 -0
  9. package/dist/lib/color/array-format.d.ts +9 -0
  10. package/dist/lib/color/array-format.d.ts.map +1 -0
  11. package/dist/lib/{color-formats → color}/converter.d.ts +18 -18
  12. package/dist/lib/color/converter.d.ts.map +1 -0
  13. package/dist/lib/color/css-string-format.d.ts +8 -0
  14. package/dist/lib/color/css-string-format.d.ts.map +1 -0
  15. package/dist/lib/color/formatter.d.ts +9 -0
  16. package/dist/lib/color/formatter.d.ts.map +1 -0
  17. package/dist/lib/color/hex-string-format.d.ts +9 -0
  18. package/dist/lib/color/hex-string-format.d.ts.map +1 -0
  19. package/dist/lib/{color-formats → color}/index.d.ts +3 -3
  20. package/dist/lib/color/index.d.ts.map +1 -0
  21. package/dist/lib/color/number-format.d.ts +9 -0
  22. package/dist/lib/color/number-format.d.ts.map +1 -0
  23. package/dist/lib/{color-formats → color}/object-format.d.ts +14 -14
  24. package/dist/lib/color/object-format.d.ts.map +1 -0
  25. package/dist/lib/{color-formats → color}/types.d.ts +107 -101
  26. package/dist/lib/color/types.d.ts.map +1 -0
  27. package/dist/lib/components/container/bar.d.ts +28 -0
  28. package/dist/lib/components/container/bar.d.ts.map +1 -0
  29. package/dist/lib/components/container/dialog.d.ts +14 -0
  30. package/dist/lib/components/container/dialog.d.ts.map +1 -0
  31. package/dist/lib/components/container/grid.d.ts +22 -0
  32. package/dist/lib/components/container/grid.d.ts.map +1 -0
  33. package/dist/lib/components/container/group.d.ts +55 -0
  34. package/dist/lib/components/container/group.d.ts.map +1 -0
  35. package/dist/lib/components/container/index.d.ts +10 -0
  36. package/dist/lib/components/container/index.d.ts.map +1 -0
  37. package/dist/lib/components/container/list.d.ts +25 -0
  38. package/dist/lib/components/container/list.d.ts.map +1 -0
  39. package/dist/lib/components/container/section.d.ts +28 -0
  40. package/dist/lib/components/container/section.d.ts.map +1 -0
  41. package/dist/lib/components/container/split.d.ts +40 -0
  42. package/dist/lib/components/container/split.d.ts.map +1 -0
  43. package/dist/lib/components/container/tabs.d.ts +23 -0
  44. package/dist/lib/components/container/tabs.d.ts.map +1 -0
  45. package/dist/lib/components/container/tree.d.ts +25 -0
  46. package/dist/lib/components/container/tree.d.ts.map +1 -0
  47. package/dist/lib/components/controls/angle.d.ts +47 -51
  48. package/dist/lib/components/controls/angle.d.ts.map +1 -1
  49. package/dist/lib/components/controls/bitmask.d.ts +41 -0
  50. package/dist/lib/components/controls/bitmask.d.ts.map +1 -0
  51. package/dist/lib/components/controls/bool.d.ts +52 -0
  52. package/dist/lib/components/controls/bool.d.ts.map +1 -0
  53. package/dist/lib/components/controls/color-picker.d.ts +41 -56
  54. package/dist/lib/components/controls/color-picker.d.ts.map +1 -1
  55. package/dist/lib/components/controls/color.d.ts +37 -51
  56. package/dist/lib/components/controls/color.d.ts.map +1 -1
  57. package/dist/lib/components/controls/index.d.ts +14 -10
  58. package/dist/lib/components/controls/index.d.ts.map +1 -1
  59. package/dist/lib/components/controls/input.d.ts +44 -0
  60. package/dist/lib/components/controls/input.d.ts.map +1 -0
  61. package/dist/lib/components/controls/matrix.d.ts +58 -0
  62. package/dist/lib/components/controls/matrix.d.ts.map +1 -0
  63. package/dist/lib/components/controls/point.d.ts +41 -47
  64. package/dist/lib/components/controls/point.d.ts.map +1 -1
  65. package/dist/lib/components/controls/poll.d.ts +12 -0
  66. package/dist/lib/components/controls/poll.d.ts.map +1 -0
  67. package/dist/lib/components/controls/scalar.d.ts +67 -0
  68. package/dist/lib/components/controls/scalar.d.ts.map +1 -0
  69. package/dist/lib/components/controls/select.d.ts +53 -59
  70. package/dist/lib/components/controls/select.d.ts.map +1 -1
  71. package/dist/lib/components/controls/spherical.d.ts +37 -74
  72. package/dist/lib/components/controls/spherical.d.ts.map +1 -1
  73. package/dist/lib/components/controls/string.d.ts +46 -0
  74. package/dist/lib/components/controls/string.d.ts.map +1 -0
  75. package/dist/lib/components/controls/vector.d.ts +54 -0
  76. package/dist/lib/components/controls/vector.d.ts.map +1 -0
  77. package/dist/lib/components/elements/button.d.ts +36 -0
  78. package/dist/lib/components/elements/button.d.ts.map +1 -0
  79. package/dist/lib/components/elements/divider.d.ts +4 -0
  80. package/dist/lib/components/elements/divider.d.ts.map +1 -0
  81. package/dist/lib/components/elements/graph.d.ts +8 -0
  82. package/dist/lib/components/elements/graph.d.ts.map +1 -0
  83. package/dist/lib/components/elements/image.d.ts +33 -0
  84. package/dist/lib/components/elements/image.d.ts.map +1 -0
  85. package/dist/lib/components/elements/index.d.ts +6 -0
  86. package/dist/lib/components/elements/index.d.ts.map +1 -0
  87. package/dist/lib/components/elements/widget.d.ts +27 -0
  88. package/dist/lib/components/elements/widget.d.ts.map +1 -0
  89. package/dist/lib/components/index.d.ts +3 -5
  90. package/dist/lib/components/index.d.ts.map +1 -1
  91. package/dist/lib/core/control.d.ts +20 -0
  92. package/dist/lib/core/control.d.ts.map +1 -0
  93. package/dist/lib/core/index.d.ts +3 -4
  94. package/dist/lib/core/index.d.ts.map +1 -1
  95. package/dist/lib/core/render.d.ts +7 -9
  96. package/dist/lib/core/render.d.ts.map +1 -1
  97. package/dist/lib/core/types.d.ts +73 -87
  98. package/dist/lib/core/types.d.ts.map +1 -1
  99. package/dist/lib/core/utils.d.ts +78 -93
  100. package/dist/lib/core/utils.d.ts.map +1 -1
  101. package/dist/lib/index.d.ts +21 -27
  102. package/dist/lib/index.d.ts.map +1 -1
  103. package/dist/lib/mount.d.ts +35 -45
  104. package/dist/lib/mount.d.ts.map +1 -1
  105. package/dist/lib/stats/index.d.ts +2 -0
  106. package/dist/lib/stats/index.d.ts.map +1 -0
  107. package/dist/lib/stats/sampler.d.ts +66 -0
  108. package/dist/lib/stats/sampler.d.ts.map +1 -0
  109. package/dist/lib/stats/stats-renderer.d.ts +16 -0
  110. package/dist/lib/stats/stats-renderer.d.ts.map +1 -0
  111. package/dist/style.css +1 -0
  112. package/dist/style.d.ts +4 -0
  113. package/dist/tweak-ui.module.js +2938 -2393
  114. package/dist/tweak-ui.module.js.map +1 -1
  115. package/dist/tweak-ui.umd.js +33 -4420
  116. package/dist/tweak-ui.umd.js.map +1 -1
  117. package/package.json +37 -51
  118. package/dist/index.html +0 -1063
  119. package/dist/lib/color-formats/array-format.d.ts +0 -9
  120. package/dist/lib/color-formats/array-format.d.ts.map +0 -1
  121. package/dist/lib/color-formats/array-format.spec.d.ts +0 -2
  122. package/dist/lib/color-formats/array-format.spec.d.ts.map +0 -1
  123. package/dist/lib/color-formats/converter.d.ts.map +0 -1
  124. package/dist/lib/color-formats/converter.spec.d.ts +0 -2
  125. package/dist/lib/color-formats/converter.spec.d.ts.map +0 -1
  126. package/dist/lib/color-formats/css-string-format.d.ts +0 -8
  127. package/dist/lib/color-formats/css-string-format.d.ts.map +0 -1
  128. package/dist/lib/color-formats/css-string-format.spec.d.ts +0 -2
  129. package/dist/lib/color-formats/css-string-format.spec.d.ts.map +0 -1
  130. package/dist/lib/color-formats/formatter.d.ts +0 -9
  131. package/dist/lib/color-formats/formatter.d.ts.map +0 -1
  132. package/dist/lib/color-formats/formatter.spec.d.ts +0 -2
  133. package/dist/lib/color-formats/formatter.spec.d.ts.map +0 -1
  134. package/dist/lib/color-formats/hex-string-format.d.ts +0 -8
  135. package/dist/lib/color-formats/hex-string-format.d.ts.map +0 -1
  136. package/dist/lib/color-formats/hex-string-format.spec.d.ts +0 -2
  137. package/dist/lib/color-formats/hex-string-format.spec.d.ts.map +0 -1
  138. package/dist/lib/color-formats/index.d.ts.map +0 -1
  139. package/dist/lib/color-formats/number-format.d.ts +0 -9
  140. package/dist/lib/color-formats/number-format.d.ts.map +0 -1
  141. package/dist/lib/color-formats/number-format.spec.d.ts +0 -2
  142. package/dist/lib/color-formats/number-format.spec.d.ts.map +0 -1
  143. package/dist/lib/color-formats/object-format.d.ts.map +0 -1
  144. package/dist/lib/color-formats/object-format.spec.d.ts +0 -2
  145. package/dist/lib/color-formats/object-format.spec.d.ts.map +0 -1
  146. package/dist/lib/color-formats/types.d.ts.map +0 -1
  147. package/dist/lib/components/button.d.ts +0 -29
  148. package/dist/lib/components/button.d.ts.map +0 -1
  149. package/dist/lib/components/content.d.ts +0 -22
  150. package/dist/lib/components/content.d.ts.map +0 -1
  151. package/dist/lib/components/controls/checkbox.d.ts +0 -29
  152. package/dist/lib/components/controls/checkbox.d.ts.map +0 -1
  153. package/dist/lib/components/controls/number.d.ts +0 -48
  154. package/dist/lib/components/controls/number.d.ts.map +0 -1
  155. package/dist/lib/components/controls/position.d.ts +0 -56
  156. package/dist/lib/components/controls/position.d.ts.map +0 -1
  157. package/dist/lib/components/controls/text.d.ts +0 -36
  158. package/dist/lib/components/controls/text.d.ts.map +0 -1
  159. package/dist/lib/components/groups/accordion.d.ts +0 -22
  160. package/dist/lib/components/groups/accordion.d.ts.map +0 -1
  161. package/dist/lib/components/groups/container.d.ts +0 -25
  162. package/dist/lib/components/groups/container.d.ts.map +0 -1
  163. package/dist/lib/components/groups/group.d.ts +0 -49
  164. package/dist/lib/components/groups/group.d.ts.map +0 -1
  165. package/dist/lib/components/groups/index.d.ts +0 -5
  166. package/dist/lib/components/groups/index.d.ts.map +0 -1
  167. package/dist/lib/components/groups/tabs.d.ts +0 -22
  168. package/dist/lib/components/groups/tabs.d.ts.map +0 -1
  169. package/dist/lib/components/image.d.ts +0 -37
  170. package/dist/lib/components/image.d.ts.map +0 -1
  171. package/dist/lib/core/registry.d.ts +0 -18
  172. package/dist/lib/core/registry.d.ts.map +0 -1
  173. package/dist/lib/core/value-accessor.d.ts +0 -18
  174. package/dist/lib/core/value-accessor.d.ts.map +0 -1
  175. package/dist/scss/_style.scss +0 -120
  176. package/dist/scss/_themes.scss +0 -23
  177. package/dist/scss/_utils.scss +0 -24
  178. package/dist/scss/_variables.scss +0 -30
  179. package/dist/scss/controls/_angle.scss +0 -64
  180. package/dist/scss/controls/_button.scss +0 -0
  181. package/dist/scss/controls/_checkbox.scss +0 -19
  182. package/dist/scss/controls/_color-picker.scss +0 -124
  183. package/dist/scss/controls/_color.scss +0 -14
  184. package/dist/scss/controls/_container.scss +0 -13
  185. package/dist/scss/controls/_group.scss +0 -69
  186. package/dist/scss/controls/_image.scss +0 -27
  187. package/dist/scss/controls/_number.scss +0 -38
  188. package/dist/scss/controls/_point.scss +0 -36
  189. package/dist/scss/controls/_position.scss +0 -9
  190. package/dist/scss/controls/_select.scss +0 -0
  191. package/dist/scss/controls/_spherical.scss +0 -87
  192. package/dist/scss/controls/_tabs.scss +0 -38
  193. package/dist/scss/controls/_text.scss +0 -0
  194. package/dist/scss/index.scss +0 -21
  195. package/dist/tweak-ui.css +0 -653
  196. package/dist/tweak-ui.css.map +0 -1
  197. package/dist/tweak-ui.min.css +0 -1
  198. package/dist/tweak-ui.min.css.map +0 -1
  199. package/dist/tweak-ui.umd.min.js +0 -17
  200. package/dist/tweak-ui.umd.min.js.map +0 -1
@@ -1,102 +1,108 @@
1
- /**
2
- * Describes a HSV color value
3
- * @public
4
- */
5
- export interface HSV {
6
- [key: string]: number;
7
- /**
8
- * The hue component
9
- */
10
- h: number;
11
- /**
12
- * The saturation component
13
- */
14
- s: number;
15
- /**
16
- * The value component
17
- */
18
- v: number;
19
- }
20
- /**
21
- * Describes a HSV color value with alpha
22
- * @public
23
- */
24
- export interface HSVA extends HSV {
25
- /**
26
- * The alpha component
27
- */
28
- a: number;
29
- }
30
- /**
31
- * Describes a HSL color value
32
- * @public
33
- */
34
- export interface HSL {
35
- [key: string]: number;
36
- /**
37
- * The hue component
38
- */
39
- h: number;
40
- /**
41
- * The saturation component
42
- */
43
- s: number;
44
- /**
45
- * The value component
46
- */
47
- l: number;
48
- }
49
- /**
50
- * Describes a HSL color value with alpha
51
- * @public
52
- */
53
- export interface HSLA extends HSL {
54
- /**
55
- * The alpha component
56
- */
57
- a: number;
58
- }
59
- /**
60
- * Describes an RGB color value
61
- * @public
62
- */
63
- export interface RGB {
64
- [key: string]: number;
65
- /**
66
- * The red component
67
- */
68
- r: number;
69
- /**
70
- * The green component
71
- */
72
- g: number;
73
- /**
74
- * The blue component
75
- */
76
- b: number;
77
- }
78
- /**
79
- * Describes an RGB color value with alpha
80
- * @public
81
- */
82
- export interface RGBA extends RGB {
83
- /**
84
- * The alpha component
85
- */
86
- a: number;
87
- }
88
- /**
89
- * An implementation to parse and format specific color format
90
- * @public
91
- */
92
- export interface ColorFormatter<T> {
93
- /**
94
- * Parses a color value and returns an RGBA object with all components normalized to [0:1]
95
- */
96
- parse: (v: T) => RGBA;
97
- /**
98
- * Formats an RGBA color value into a target color format
99
- */
100
- format: (rgba: RGBA) => T;
101
- }
1
+ import { ControlAdapter } from '../core';
2
+ /**
3
+ * Describes a HSV color value
4
+ * @public
5
+ */
6
+ export interface HSV {
7
+ [key: string]: number;
8
+ /**
9
+ * The hue component
10
+ */
11
+ h: number;
12
+ /**
13
+ * The saturation component
14
+ */
15
+ s: number;
16
+ /**
17
+ * The value component
18
+ */
19
+ v: number;
20
+ }
21
+ /**
22
+ * Describes a HSV color value with alpha
23
+ * @public
24
+ */
25
+ export interface HSVA extends HSV {
26
+ /**
27
+ * The alpha component
28
+ */
29
+ a: number;
30
+ }
31
+ /**
32
+ * Describes a HSL color value
33
+ * @public
34
+ */
35
+ export interface HSL {
36
+ [key: string]: number;
37
+ /**
38
+ * The hue component
39
+ */
40
+ h: number;
41
+ /**
42
+ * The saturation component
43
+ */
44
+ s: number;
45
+ /**
46
+ * The value component
47
+ */
48
+ l: number;
49
+ }
50
+ /**
51
+ * Describes a HSL color value with alpha
52
+ * @public
53
+ */
54
+ export interface HSLA extends HSL {
55
+ /**
56
+ * The alpha component
57
+ */
58
+ a: number;
59
+ }
60
+ /**
61
+ * Describes an RGB color value
62
+ * @public
63
+ */
64
+ export interface RGB {
65
+ [key: string]: number;
66
+ /**
67
+ * The red component
68
+ */
69
+ r: number;
70
+ /**
71
+ * The green component
72
+ */
73
+ g: number;
74
+ /**
75
+ * The blue component
76
+ */
77
+ b: number;
78
+ }
79
+ /**
80
+ * Describes an RGB color value with alpha
81
+ * @public
82
+ */
83
+ export interface RGBA extends RGB {
84
+ /**
85
+ * The alpha component
86
+ */
87
+ a: number;
88
+ }
89
+ export interface OKLCH {
90
+ /**
91
+ * The lightness component [0,1]
92
+ */
93
+ l: number;
94
+ /**
95
+ * The chroma component [0,1]
96
+ */
97
+ c: number;
98
+ /**
99
+ * The hue component [0,1]
100
+ */
101
+ h: number;
102
+ /**
103
+ * The alpha component [0,1]
104
+ */
105
+ a: number;
106
+ }
107
+ export type ColorAdapter<T> = ControlAdapter<T, RGBA>;
102
108
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/color/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,IAAK,SAAQ,GAAG;IAC/B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,IAAK,SAAQ,GAAG;IAC/B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,IAAK,SAAQ,GAAG;IAC/B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { Attributes, Children, FactoryComponent, Vnode } from 'mithril';
2
+ /**
3
+ * Bar component model
4
+ * @public
5
+ */
6
+ export type BarAttrs = Attributes & {
7
+ /**
8
+ * Custom CSS Style
9
+ */
10
+ style?: Partial<CSSStyleDeclaration>;
11
+ /**
12
+ * Start children
13
+ */
14
+ start?: Children;
15
+ /**
16
+ * End children
17
+ */
18
+ end?: Children;
19
+ };
20
+ export declare function uiBar<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
21
+ export declare function uiBarStart<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
22
+ export declare function uiBarEnd<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
23
+ export declare function uiBarContent<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
24
+ export declare const BarComponent: FactoryComponent<Attributes>;
25
+ export declare const BarStartComponent: FactoryComponent<Attributes>;
26
+ export declare const BarEndComponent: FactoryComponent<Attributes>;
27
+ export declare const BarContentComponent: FactoryComponent<Attributes>;
28
+ //# sourceMappingURL=bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAgB,KAAK,EAAE,MAAM,SAAS,CAAA;AAErF;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAA;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAElF;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAEvF;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAErF;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAEzF;AAED,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,UAAU,CAUrD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,UAAU,CAM1D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,UAAU,CAMxD,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,UAAU,CAM5D,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { Attributes, Children, FactoryComponent, Vnode } from 'mithril';
2
+ /**
3
+ * Bar component model
4
+ * @public
5
+ */
6
+ export type DialogAttrs = Attributes & {
7
+ /**
8
+ * Custom CSS Style
9
+ */
10
+ style?: Partial<CSSStyleDeclaration>;
11
+ };
12
+ export declare function uiDialog<T>(attrs: DialogAttrs, children?: Children): Vnode<DialogAttrs>;
13
+ export declare const DialogComponent: FactoryComponent<DialogAttrs>;
14
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAgB,KAAK,EAAE,MAAM,SAAS,CAAA;AAGrF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACrC,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,CAezD,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { Children, FactoryComponent, Vnode } from 'mithril';
2
+ /**
3
+ * Grid component model
4
+ * @public
5
+ */
6
+ export type GridAttrs = {
7
+ /**
8
+ * Grit template columns specification, e.g. "1fr 2fr 1fr" or "3"
9
+ */
10
+ columns?: number | string;
11
+ /**
12
+ * Grit template rows specification
13
+ */
14
+ rows?: number | string;
15
+ /**
16
+ * Custom CSS Style
17
+ */
18
+ style?: Partial<CSSStyleDeclaration>;
19
+ };
20
+ export declare function uiGrid<T>(attrs: GridAttrs, children?: Children): Vnode<GridAttrs>;
21
+ export declare const GridComponent: FactoryComponent<GridAttrs>;
22
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/grid.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACrC,CAAA;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAEjF;AAED,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,SAAS,CAqBrD,CAAA"}
@@ -0,0 +1,55 @@
1
+ import { Child, Children, FactoryComponent, Vnode } from 'mithril';
2
+ import { ClassValue } from '../../core/utils';
3
+ /**
4
+ * Group component model
5
+ * @public
6
+ */
7
+ export type GroupAttrs = {
8
+ /**
9
+ * Group icon
10
+ */
11
+ icon?: Child;
12
+ /**
13
+ * Group title
14
+ */
15
+ title?: Child;
16
+ /**
17
+ * Group CSS Style
18
+ */
19
+ style?: Partial<CSSStyleDeclaration>;
20
+ /**
21
+ * Additional CSS class for the group element
22
+ */
23
+ class?: ClassValue;
24
+ /**
25
+ * Whether the child elements can be collapsed
26
+ */
27
+ collapsible?: boolean;
28
+ /**
29
+ * Whether the child elements are collapsed
30
+ */
31
+ collapsed?: boolean;
32
+ /**
33
+ * WHether the group is disabled. Disabled groups can not be expanded.
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Adds an offset to the left side
38
+ */
39
+ inset?: boolean;
40
+ /**
41
+ * Is called when this Group has been collapsed or expanded
42
+ */
43
+ onToggle?: (node: Vnode<GroupAttrs>) => void;
44
+ /**
45
+ * Is called when this Group has been expanded
46
+ */
47
+ onExpand?: (node: Vnode<GroupAttrs>) => void;
48
+ /**
49
+ * Is called when this Group has been collapsed
50
+ */
51
+ onCollapse?: (node: Vnode<GroupAttrs>) => void;
52
+ };
53
+ export declare function uiGroup<T>(attrs: GroupAttrs, children?: Children): Vnode<GroupAttrs>;
54
+ export declare const GroupComponent: FactoryComponent<GroupAttrs>;
55
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/group.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAA;AAEvE;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IAC5C;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAEpF;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,UAAU,CAuDvD,CAAA"}
@@ -0,0 +1,10 @@
1
+ export * from './bar';
2
+ export * from './grid';
3
+ export * from './group';
4
+ export * from './list';
5
+ export * from './section';
6
+ export * from './split';
7
+ export * from './tabs';
8
+ export * from './tree';
9
+ export * from './dialog';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { Attributes, Children, FactoryComponent, Vnode } from 'mithril';
2
+ import { StyleAttr } from '../../core';
3
+ /**
4
+ * List component model
5
+ * @public
6
+ */
7
+ export type ListAttrs = Attributes & {
8
+ /**
9
+ * Maps to flex-flow CSS property.
10
+ * @links https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/flex-flow
11
+ */
12
+ flow?: `row` | `column` | string;
13
+ /**
14
+ * Maps to flex CSS property.
15
+ * @links https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/flex
16
+ */
17
+ flex?: string | number;
18
+ /**
19
+ * Custom CSS Style
20
+ */
21
+ style?: StyleAttr;
22
+ };
23
+ export declare function uiFlex<T>(attrs: ListAttrs, children?: Children): Vnode<ListAttrs>;
24
+ export declare const FlexComponent: FactoryComponent<ListAttrs>;
25
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/list.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG;IACnC;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAEjF;AAED,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,SAAS,CAiBrD,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { Attributes, Children, FactoryComponent, Vnode } from 'mithril';
2
+ /**
3
+ * Page component model
4
+ * @public
5
+ */
6
+ export type SectionAttrs = Attributes & {
7
+ /**
8
+ * Custom CSS Style
9
+ */
10
+ style?: Partial<CSSStyleDeclaration>;
11
+ /**
12
+ * Header children
13
+ */
14
+ header?: Children;
15
+ /**
16
+ * Footer children
17
+ */
18
+ footer?: Children;
19
+ };
20
+ export declare function uiSection<T>(attrs: SectionAttrs, children?: Children): Vnode<SectionAttrs>;
21
+ export declare function uiSectionHeader<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
22
+ export declare function uiSectionFooter<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
23
+ export declare function uiSectionContent<T>(attrs: Attributes, children?: Children): Vnode<Attributes>;
24
+ export declare const SectionComponent: FactoryComponent<Attributes>;
25
+ export declare const SectionHeaderComponent: FactoryComponent<Attributes>;
26
+ export declare const SectionFooterComponent: FactoryComponent<Attributes>;
27
+ export declare const SectionContentComponent: FactoryComponent<Attributes>;
28
+ //# sourceMappingURL=section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/section.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE1E;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAEpC;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAA;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAA;CAClB,CAAA;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,CAE1F;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAE5F;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAE5F;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAE7F;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,CAAC,UAAU,CAUzD,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,UAAU,CAM/D,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,UAAU,CAM/D,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,CAAC,UAAU,CAMhE,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { Children, FactoryComponent, Vnode } from 'mithril';
2
+ import { EventAttrs, StyleAttr } from '../../core';
3
+ /**
4
+ * Split pane component model
5
+ * @public
6
+ */
7
+ export type SplitAttr = EventAttrs & {
8
+ /**
9
+ * Custom CSS Style
10
+ */
11
+ style?: StyleAttr;
12
+ /**
13
+ * Whether the split is horizontal (side by side) or vertical (stacked)
14
+ */
15
+ flow?: 'row' | 'column';
16
+ /**
17
+ * Minimum size in pixels for each pane. Default is 16px.
18
+ */
19
+ minSize?: number;
20
+ };
21
+ export declare function uiSplit<T>(attrs: SplitAttr, children?: Children): Vnode<SplitAttr>;
22
+ /**
23
+ * Split pane component model
24
+ * @public
25
+ */
26
+ export type SplitContentAttr = EventAttrs & {
27
+ [key: string]: any;
28
+ /**
29
+ * Custom CSS Style
30
+ */
31
+ style?: StyleAttr;
32
+ /**
33
+ *
34
+ */
35
+ fluid?: boolean;
36
+ };
37
+ export declare function uiSplitContent<T>(attrs: SplitAttr, children?: Children): Vnode<SplitAttr>;
38
+ export declare const SplitContentComponent: FactoryComponent<SplitContentAttr>;
39
+ export declare const SplitComponent: FactoryComponent<SplitAttr>;
40
+ //# sourceMappingURL=split.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/split.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAY,MAAM,SAAS,CAAA;AACxE,OAAO,EAAE,UAAU,EAAe,SAAS,EAAE,MAAM,YAAY,CAAA;AAI/D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAElF;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAEzF;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,gBAAgB,CAYpE,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,SAAS,CAqItD,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { Child, Children, FactoryComponent, Vnode } from 'mithril';
2
+ /**
3
+ * Tabs component model
4
+ * @public
5
+ */
6
+ export type TabsAttrs = {
7
+ vertical?: boolean;
8
+ };
9
+ export interface TabsHost {
10
+ attach(node: Vnode<TabAttrs>): void;
11
+ detach(node: Vnode<TabAttrs>): void;
12
+ activate(node: Vnode<TabAttrs>): void;
13
+ isActive(child: Vnode<TabAttrs>): boolean;
14
+ }
15
+ export interface TabAttrs {
16
+ title: Child;
17
+ active?: boolean;
18
+ disabled?: boolean;
19
+ }
20
+ export declare const TabComponent: FactoryComponent<TabAttrs>;
21
+ export declare function uiTabs(attrs: TabsAttrs, children?: Children): Vnode<TabsAttrs>;
22
+ export declare const TabsComponent: FactoryComponent<TabsAttrs>;
23
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAgB,KAAK,EAAE,MAAM,SAAS,CAAA;AAMhF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;IACnC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAA;CAC1C;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,KAAK,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,QAAQ,CAkCnD,CAAA;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAE9E;AAED,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,SAAS,CA6ErD,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { Child, FactoryComponent, Vnode } from 'mithril';
2
+ export interface TreeAttrs<T> {
3
+ data: Iterable<T>;
4
+ adapter: TreeDataAdapter<T>;
5
+ selectedId?: string;
6
+ rowHeight?: number;
7
+ style?: Partial<CSSStyleDeclaration>;
8
+ onSelect?: (node: T) => void;
9
+ }
10
+ export interface TreeDataAdapter<T> {
11
+ version: number;
12
+ nodeId(node: T): string;
13
+ nodeLabel(node: T): Child;
14
+ nodeIcon(node: T, expanded: boolean): Child;
15
+ nodeChildren(node: T): Iterable<T> | undefined;
16
+ isExpanded(node: T): boolean;
17
+ setExpanded(node: T, expanded: boolean): void;
18
+ connect?(controller: TreeController<T>): void;
19
+ }
20
+ export interface TreeController<T> {
21
+ scrollTo(node: T): void;
22
+ }
23
+ export declare function uiTree<T>(attrs: TreeAttrs<T>): Vnode<TreeAttrs<T>>;
24
+ export declare const TreeComponent: FactoryComponent<TreeAttrs<any>>;
25
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/container/tree.ts"],"names":[],"mappings":"AAAA,OAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG3D,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;IACjB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACpC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,CAAA;IAC3C,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IAC9C,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAA;IAC5B,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IAC7C,OAAO,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAA;CACxB;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAElE;AA0BD,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CA0H1D,CAAA"}
@@ -1,52 +1,48 @@
1
- import { ComponentModel, ValueSource, ComponentAttrs, ValueCodec } from '../../core';
2
- import { Direction } from './spherical';
3
- /**
4
- * Spherical component attributes
5
- * @public
6
- */
7
- export declare type AngleAttrs = ComponentAttrs<AngleModel>;
8
- /**
9
- * Spherical component model
10
- * @public
11
- */
12
- export interface AngleModel<T = unknown> extends ComponentModel, ValueSource<T, number> {
13
- /**
14
- * The type name of the control
15
- */
16
- type: 'angle';
17
- /**
18
- * Whether to use degrees instead of radians
19
- */
20
- degree?: boolean;
21
- /**
22
- * This is called when the control value has been changed.
23
- */
24
- onInput?: (model: AngleModel<T>, value: unknown) => void;
25
- /**
26
- * This is called once the control value is committed by the user.
27
- *
28
- * @remarks
29
- * Unlike the `onInput` callback, this is not necessarily called for each value change.
30
- */
31
- onChange?: (model: AngleModel<T>, value: unknown) => void;
32
- }
33
- export interface AngleCodecOptions<T> {
34
- /**
35
- * Maps object keys to cartesian axes. Defaults to `{ x: 'right', y: 'up' }`
36
- */
37
- axes?: Record<string | number, Direction>;
38
- /**
39
- * The vector length (circle radius). Defaults to `1`
40
- */
41
- length?: number | (() => number);
42
- /**
43
- * Gets the objec where the result should be stored. May return a new instance.
44
- */
45
- result?: () => T;
46
- }
47
- export declare function angleCodec(): ValueCodec<{
48
- x: number;
49
- y: number;
50
- }, number>;
51
- export declare function angleCodec<T>(options: AngleCodecOptions<T>): ValueCodec<T, number>;
1
+ import { Children, FactoryComponent, Vnode } from 'mithril';
2
+ import { ControlAdapter, TweakableAttrs } from '../../core';
3
+ import { CommonWidgetAttrs } from '../elements';
4
+ export type AngleWidgetAttrs<T = unknown> = CommonWidgetAttrs & AngleInputAttrs<T>;
5
+ /**
6
+ * Spherical component model
7
+ * @public
8
+ */
9
+ export type AngleInputAttrs<T = unknown> = TweakableAttrs<T, number> & {
10
+ /**
11
+ * Whether to use degrees instead of radians
12
+ */
13
+ degree?: boolean;
14
+ /**
15
+ * The min value in degrees
16
+ */
17
+ min?: number;
18
+ /**
19
+ * The max value in degrees
20
+ */
21
+ max?: number;
22
+ /**
23
+ * The step value in degrees
24
+ */
25
+ step?: number;
26
+ /**
27
+ * Disables the control input
28
+ */
29
+ readonly?: boolean;
30
+ /**
31
+ * This is called when the control value has been changed.
32
+ */
33
+ oninput?: (target: T, value: number) => void;
34
+ /**
35
+ * This is called once the control value is committed by the user.
36
+ *
37
+ * @remarks
38
+ * Unlike the `onInput` callback, this is not necessarily called for each value change.
39
+ */
40
+ onchange?: (target: T, value: number) => void;
41
+ };
42
+ export declare function uiAngleWidget<T>(attrs: AngleWidgetAttrs<T>, children?: Children): Vnode<AngleWidgetAttrs<T>>;
43
+ export declare function uiAngleInput<T>(attrs: AngleInputAttrs<T>, children?: Children): Vnode<AngleInputAttrs<T>>;
44
+ export declare const AngleWidgetComponent: FactoryComponent<AngleWidgetAttrs<unknown>>;
45
+ export declare const radToDegAdapter: ControlAdapter<number, number>;
46
+ export declare const degToRadAdapter: ControlAdapter<number, number>;
47
+ export declare const AngleInputComponent: FactoryComponent<AngleInputAttrs>;
52
48
  //# sourceMappingURL=angle.d.ts.map