tweak-ui 0.5.0 → 0.8.2

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 (239) hide show
  1. package/dist/.assetsignore +2 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/lib/builder.d.ts +78 -140
  5. package/dist/lib/builder.d.ts.map +1 -1
  6. package/dist/lib/color/adapter.d.ts +7 -0
  7. package/dist/lib/color/adapter.d.ts.map +1 -0
  8. package/dist/lib/color/array-format.d.ts +9 -0
  9. package/dist/lib/color/array-format.d.ts.map +1 -0
  10. package/dist/lib/color/converter.d.ts.map +1 -0
  11. package/dist/lib/color/css-string-format.d.ts +8 -0
  12. package/dist/lib/color/css-string-format.d.ts.map +1 -0
  13. package/dist/lib/color/formatter.d.ts +9 -0
  14. package/dist/lib/color/formatter.d.ts.map +1 -0
  15. package/dist/lib/color/hex-string-format.d.ts +9 -0
  16. package/dist/lib/color/hex-string-format.d.ts.map +1 -0
  17. package/dist/lib/color/index.d.ts.map +1 -0
  18. package/dist/lib/color/number-format.d.ts +9 -0
  19. package/dist/lib/color/number-format.d.ts.map +1 -0
  20. package/dist/lib/{color-formats → color}/object-format.d.ts +4 -4
  21. package/dist/lib/color/object-format.d.ts.map +1 -0
  22. package/dist/lib/{color-formats → color}/types.d.ts +15 -9
  23. package/dist/lib/color/types.d.ts.map +1 -0
  24. package/dist/lib/components/container/bar.d.ts +28 -0
  25. package/dist/lib/components/container/bar.d.ts.map +1 -0
  26. package/dist/lib/components/container/dialog.d.ts +14 -0
  27. package/dist/lib/components/container/dialog.d.ts.map +1 -0
  28. package/dist/lib/components/container/grid.d.ts +22 -0
  29. package/dist/lib/components/container/grid.d.ts.map +1 -0
  30. package/dist/lib/components/container/group.d.ts +55 -0
  31. package/dist/lib/components/container/group.d.ts.map +1 -0
  32. package/dist/lib/components/container/index.d.ts +10 -0
  33. package/dist/lib/components/container/index.d.ts.map +1 -0
  34. package/dist/lib/components/container/list.d.ts +25 -0
  35. package/dist/lib/components/container/list.d.ts.map +1 -0
  36. package/dist/lib/components/container/section.d.ts +28 -0
  37. package/dist/lib/components/container/section.d.ts.map +1 -0
  38. package/dist/lib/components/container/split.d.ts +40 -0
  39. package/dist/lib/components/container/split.d.ts.map +1 -0
  40. package/dist/lib/components/container/tabs.d.ts +23 -0
  41. package/dist/lib/components/container/tabs.d.ts.map +1 -0
  42. package/dist/lib/components/container/tree.d.ts +25 -0
  43. package/dist/lib/components/container/tree.d.ts.map +1 -0
  44. package/dist/lib/components/controls/angle.d.ts +29 -33
  45. package/dist/lib/components/controls/angle.d.ts.map +1 -1
  46. package/dist/lib/components/controls/bitmask.d.ts +41 -0
  47. package/dist/lib/components/controls/bitmask.d.ts.map +1 -0
  48. package/dist/lib/components/controls/bool.d.ts +52 -0
  49. package/dist/lib/components/controls/bool.d.ts.map +1 -0
  50. package/dist/lib/components/controls/color-picker.d.ts +12 -27
  51. package/dist/lib/components/controls/color-picker.d.ts.map +1 -1
  52. package/dist/lib/components/controls/color.d.ts +12 -26
  53. package/dist/lib/components/controls/color.d.ts.map +1 -1
  54. package/dist/lib/components/controls/index.d.ts +9 -5
  55. package/dist/lib/components/controls/index.d.ts.map +1 -1
  56. package/dist/lib/components/controls/input.d.ts +44 -0
  57. package/dist/lib/components/controls/input.d.ts.map +1 -0
  58. package/dist/lib/components/controls/matrix.d.ts +58 -0
  59. package/dist/lib/components/controls/matrix.d.ts.map +1 -0
  60. package/dist/lib/components/controls/point.d.ts +15 -16
  61. package/dist/lib/components/controls/point.d.ts.map +1 -1
  62. package/dist/lib/components/controls/poll.d.ts +12 -0
  63. package/dist/lib/components/controls/poll.d.ts.map +1 -0
  64. package/dist/lib/components/controls/scalar.d.ts +67 -0
  65. package/dist/lib/components/controls/scalar.d.ts.map +1 -0
  66. package/dist/lib/components/controls/select.d.ts +8 -14
  67. package/dist/lib/components/controls/select.d.ts.map +1 -1
  68. package/dist/lib/components/controls/spherical.d.ts +23 -55
  69. package/dist/lib/components/controls/spherical.d.ts.map +1 -1
  70. package/dist/lib/components/controls/string.d.ts +46 -0
  71. package/dist/lib/components/controls/string.d.ts.map +1 -0
  72. package/dist/lib/components/controls/vector.d.ts +54 -0
  73. package/dist/lib/components/controls/vector.d.ts.map +1 -0
  74. package/dist/lib/components/elements/button.d.ts +36 -0
  75. package/dist/lib/components/elements/button.d.ts.map +1 -0
  76. package/dist/lib/components/elements/divider.d.ts +4 -0
  77. package/dist/lib/components/elements/divider.d.ts.map +1 -0
  78. package/dist/lib/components/elements/graph.d.ts +8 -0
  79. package/dist/lib/components/elements/graph.d.ts.map +1 -0
  80. package/dist/lib/components/elements/image.d.ts +33 -0
  81. package/dist/lib/components/elements/image.d.ts.map +1 -0
  82. package/dist/lib/components/elements/index.d.ts +6 -0
  83. package/dist/lib/components/elements/index.d.ts.map +1 -0
  84. package/dist/lib/components/elements/widget.d.ts +31 -0
  85. package/dist/lib/components/elements/widget.d.ts.map +1 -0
  86. package/dist/lib/components/index.d.ts +2 -4
  87. package/dist/lib/components/index.d.ts.map +1 -1
  88. package/dist/lib/core/control.d.ts +20 -0
  89. package/dist/lib/core/control.d.ts.map +1 -0
  90. package/dist/lib/core/index.d.ts +1 -2
  91. package/dist/lib/core/index.d.ts.map +1 -1
  92. package/dist/lib/core/render.d.ts +7 -9
  93. package/dist/lib/core/render.d.ts.map +1 -1
  94. package/dist/lib/core/types.d.ts +46 -60
  95. package/dist/lib/core/types.d.ts.map +1 -1
  96. package/dist/lib/core/utils.d.ts +19 -33
  97. package/dist/lib/core/utils.d.ts.map +1 -1
  98. package/dist/lib/index.d.ts +2 -2
  99. package/dist/lib/index.d.ts.map +1 -1
  100. package/dist/lib/mount.d.ts +6 -16
  101. package/dist/lib/mount.d.ts.map +1 -1
  102. package/dist/lib/stats/index.d.ts +2 -0
  103. package/dist/lib/stats/index.d.ts.map +1 -0
  104. package/dist/lib/stats/sampler.d.ts +66 -0
  105. package/dist/lib/stats/sampler.d.ts.map +1 -0
  106. package/dist/lib/stats/stats-renderer.d.ts +16 -0
  107. package/dist/lib/stats/stats-renderer.d.ts.map +1 -0
  108. package/dist/style.css +1 -0
  109. package/dist/style.d.ts +4 -0
  110. package/dist/tweak-ui.module.js +2959 -2738
  111. package/dist/tweak-ui.module.js.map +1 -1
  112. package/dist/tweak-ui.umd.js +33 -2
  113. package/dist/tweak-ui.umd.js.map +1 -1
  114. package/dist/wrangler.json +1 -0
  115. package/package.json +34 -23
  116. package/dist/lib/builder.js +0 -250
  117. package/dist/lib/builder.js.map +0 -1
  118. package/dist/lib/color-formats/array-format.d.ts +0 -9
  119. package/dist/lib/color-formats/array-format.d.ts.map +0 -1
  120. package/dist/lib/color-formats/array-format.js +0 -18
  121. package/dist/lib/color-formats/array-format.js.map +0 -1
  122. package/dist/lib/color-formats/converter.d.ts.map +0 -1
  123. package/dist/lib/color-formats/converter.js +0 -85
  124. package/dist/lib/color-formats/converter.js.map +0 -1
  125. package/dist/lib/color-formats/css-string-format.d.ts +0 -8
  126. package/dist/lib/color-formats/css-string-format.d.ts.map +0 -1
  127. package/dist/lib/color-formats/css-string-format.js +0 -28
  128. package/dist/lib/color-formats/css-string-format.js.map +0 -1
  129. package/dist/lib/color-formats/formatter.d.ts +0 -9
  130. package/dist/lib/color-formats/formatter.d.ts.map +0 -1
  131. package/dist/lib/color-formats/formatter.js +0 -35
  132. package/dist/lib/color-formats/formatter.js.map +0 -1
  133. package/dist/lib/color-formats/hex-string-format.d.ts +0 -8
  134. package/dist/lib/color-formats/hex-string-format.d.ts.map +0 -1
  135. package/dist/lib/color-formats/hex-string-format.js +0 -28
  136. package/dist/lib/color-formats/hex-string-format.js.map +0 -1
  137. package/dist/lib/color-formats/index.d.ts.map +0 -1
  138. package/dist/lib/color-formats/index.js +0 -4
  139. package/dist/lib/color-formats/index.js.map +0 -1
  140. package/dist/lib/color-formats/number-format.d.ts +0 -9
  141. package/dist/lib/color-formats/number-format.d.ts.map +0 -1
  142. package/dist/lib/color-formats/number-format.js +0 -23
  143. package/dist/lib/color-formats/number-format.js.map +0 -1
  144. package/dist/lib/color-formats/object-format.d.ts.map +0 -1
  145. package/dist/lib/color-formats/object-format.js +0 -23
  146. package/dist/lib/color-formats/object-format.js.map +0 -1
  147. package/dist/lib/color-formats/types.d.ts.map +0 -1
  148. package/dist/lib/color-formats/types.js +0 -2
  149. package/dist/lib/color-formats/types.js.map +0 -1
  150. package/dist/lib/components/button.d.ts +0 -29
  151. package/dist/lib/components/button.d.ts.map +0 -1
  152. package/dist/lib/components/button.js +0 -15
  153. package/dist/lib/components/button.js.map +0 -1
  154. package/dist/lib/components/content.d.ts +0 -22
  155. package/dist/lib/components/content.d.ts.map +0 -1
  156. package/dist/lib/components/content.js +0 -10
  157. package/dist/lib/components/content.js.map +0 -1
  158. package/dist/lib/components/controls/angle.js +0 -201
  159. package/dist/lib/components/controls/angle.js.map +0 -1
  160. package/dist/lib/components/controls/checkbox.d.ts +0 -29
  161. package/dist/lib/components/controls/checkbox.d.ts.map +0 -1
  162. package/dist/lib/components/controls/checkbox.js +0 -31
  163. package/dist/lib/components/controls/checkbox.js.map +0 -1
  164. package/dist/lib/components/controls/color-picker.js +0 -267
  165. package/dist/lib/components/controls/color-picker.js.map +0 -1
  166. package/dist/lib/components/controls/color.js +0 -77
  167. package/dist/lib/components/controls/color.js.map +0 -1
  168. package/dist/lib/components/controls/index.js +0 -11
  169. package/dist/lib/components/controls/index.js.map +0 -1
  170. package/dist/lib/components/controls/number.d.ts +0 -48
  171. package/dist/lib/components/controls/number.d.ts.map +0 -1
  172. package/dist/lib/components/controls/number.js +0 -142
  173. package/dist/lib/components/controls/number.js.map +0 -1
  174. package/dist/lib/components/controls/point.js +0 -137
  175. package/dist/lib/components/controls/point.js.map +0 -1
  176. package/dist/lib/components/controls/position.d.ts +0 -56
  177. package/dist/lib/components/controls/position.d.ts.map +0 -1
  178. package/dist/lib/components/controls/position.js +0 -36
  179. package/dist/lib/components/controls/position.js.map +0 -1
  180. package/dist/lib/components/controls/select.js +0 -132
  181. package/dist/lib/components/controls/select.js.map +0 -1
  182. package/dist/lib/components/controls/spherical.js +0 -302
  183. package/dist/lib/components/controls/spherical.js.map +0 -1
  184. package/dist/lib/components/controls/text.d.ts +0 -36
  185. package/dist/lib/components/controls/text.d.ts.map +0 -1
  186. package/dist/lib/components/controls/text.js +0 -24
  187. package/dist/lib/components/controls/text.js.map +0 -1
  188. package/dist/lib/components/groups/accordion.d.ts +0 -22
  189. package/dist/lib/components/groups/accordion.d.ts.map +0 -1
  190. package/dist/lib/components/groups/accordion.js +0 -34
  191. package/dist/lib/components/groups/accordion.js.map +0 -1
  192. package/dist/lib/components/groups/container.d.ts +0 -25
  193. package/dist/lib/components/groups/container.d.ts.map +0 -1
  194. package/dist/lib/components/groups/container.js +0 -19
  195. package/dist/lib/components/groups/container.js.map +0 -1
  196. package/dist/lib/components/groups/group.d.ts +0 -49
  197. package/dist/lib/components/groups/group.d.ts.map +0 -1
  198. package/dist/lib/components/groups/group.js +0 -50
  199. package/dist/lib/components/groups/group.js.map +0 -1
  200. package/dist/lib/components/groups/index.d.ts +0 -5
  201. package/dist/lib/components/groups/index.d.ts.map +0 -1
  202. package/dist/lib/components/groups/index.js +0 -5
  203. package/dist/lib/components/groups/index.js.map +0 -1
  204. package/dist/lib/components/groups/tabs.d.ts +0 -22
  205. package/dist/lib/components/groups/tabs.d.ts.map +0 -1
  206. package/dist/lib/components/groups/tabs.js +0 -31
  207. package/dist/lib/components/groups/tabs.js.map +0 -1
  208. package/dist/lib/components/image.d.ts +0 -37
  209. package/dist/lib/components/image.d.ts.map +0 -1
  210. package/dist/lib/components/image.js +0 -46
  211. package/dist/lib/components/image.js.map +0 -1
  212. package/dist/lib/components/index.js +0 -6
  213. package/dist/lib/components/index.js.map +0 -1
  214. package/dist/lib/core/index.js +0 -5
  215. package/dist/lib/core/index.js.map +0 -1
  216. package/dist/lib/core/registry.d.ts +0 -18
  217. package/dist/lib/core/registry.d.ts.map +0 -1
  218. package/dist/lib/core/registry.js +0 -30
  219. package/dist/lib/core/registry.js.map +0 -1
  220. package/dist/lib/core/render.js +0 -19
  221. package/dist/lib/core/render.js.map +0 -1
  222. package/dist/lib/core/types.js +0 -2
  223. package/dist/lib/core/types.js.map +0 -1
  224. package/dist/lib/core/utils.js +0 -193
  225. package/dist/lib/core/utils.js.map +0 -1
  226. package/dist/lib/core/value-accessor.d.ts +0 -18
  227. package/dist/lib/core/value-accessor.d.ts.map +0 -1
  228. package/dist/lib/core/value-accessor.js +0 -52
  229. package/dist/lib/core/value-accessor.js.map +0 -1
  230. package/dist/lib/index.js +0 -29
  231. package/dist/lib/index.js.map +0 -1
  232. package/dist/lib/mount.js +0 -85
  233. package/dist/lib/mount.js.map +0 -1
  234. package/dist/tweak-ui.css +0 -648
  235. package/dist/tweak-ui.css.map +0 -1
  236. package/dist/tweak-ui.min.css +0 -1
  237. package/dist/tweak-ui.min.css.map +0 -1
  238. /package/dist/lib/{color-formats → color}/converter.d.ts +0 -0
  239. /package/dist/lib/{color-formats → color}/index.d.ts +0 -0
@@ -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 type AngleAttrs = ComponentAttrs<AngleModel>;
1
+ import { default as m, Children, Vnode } from 'mithril';
2
+ import { ControlAdapter, TweakableAttrs } from '../../core';
3
+ import { CommonWidgetAttrs } from '../elements';
4
+ export type AngleWidgetAttrs<T = unknown> = CommonWidgetAttrs & AngleInputAttrs<T>;
8
5
  /**
9
6
  * Spherical component model
10
7
  * @public
11
8
  */
12
- export interface AngleModel<T = unknown> extends ComponentModel, ValueSource<T, number> {
13
- /**
14
- * The type name of the control
15
- */
16
- type: 'angle';
9
+ export type AngleInputAttrs<T = unknown> = TweakableAttrs<T, number> & {
17
10
  /**
18
11
  * Whether to use degrees instead of radians
19
12
  */
20
13
  degree?: boolean;
21
14
  /**
22
- * This is called when the control value has been changed.
15
+ * The min value in degrees
23
16
  */
24
- onInput?: (model: AngleModel<T>, value: unknown) => void;
17
+ min?: number;
25
18
  /**
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.
19
+ * The max value in degrees
20
+ */
21
+ max?: number;
22
+ /**
23
+ * The step value in degrees
30
24
  */
31
- onChange?: (model: AngleModel<T>, value: unknown) => void;
32
- }
33
- export interface AngleCodecOptions<T> {
25
+ step?: number;
34
26
  /**
35
- * Maps object keys to cartesian axes. Defaults to `{ x: 'right', y: 'up' }`
27
+ * Disables the control input
36
28
  */
37
- axes?: Record<string | number, Direction>;
29
+ readonly?: boolean;
38
30
  /**
39
- * The vector length (circle radius). Defaults to `1`
31
+ * This is called when the control value has been changed.
40
32
  */
41
- length?: number | (() => number);
33
+ oninput?: (target: T, value: number) => void;
42
34
  /**
43
- * Gets the objec where the result should be stored. May return a new instance.
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.
44
39
  */
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>;
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: <T>() => m.Component<AngleWidgetAttrs<T>>;
45
+ export declare const radToDegAdapter: ControlAdapter<number, number>;
46
+ export declare const degToRadAdapter: ControlAdapter<number, number>;
47
+ export declare const AngleInputComponent: <T>() => m.Component<AngleInputAttrs<T>>;
52
48
  //# sourceMappingURL=angle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"angle.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/angle.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,cAAc,EACd,WAAW,EACX,cAAc,EACd,UAAU,EACX,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAE,SAAS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CAazE,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,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAuKvE,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { default as m, Children, 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: <T>() => m.Component<BitmaskWidgetAttrs<T>>;
39
+ export declare function uiBitmaskInput<T>(attrs: BitmaskInputAttrs<T>, children?: Children): Vnode<BitmaskInputAttrs<T>>;
40
+ export declare const BitmaskInputComponent: <T>() => m.Component<BitmaskInputAttrs<T>>;
41
+ //# sourceMappingURL=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,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,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAqF3E,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { default as m, Child, Children, 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: <T>() => m.Component<BooleanWidgetAttrs<T>>;
51
+ export declare const BoolInputComponent: <T>() => m.Component<BooleanInputAttrs<T>>;
52
+ //# sourceMappingURL=bool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bool.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/bool.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAoC,cAAc,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAY,MAAM,aAAa,CAAA;AAEzD,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,OAAO,CAAC,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAE7C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAE5C;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CACxB,CAAA;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC5B,QAAQ,CAAC,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,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAa1E,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC,CA+CxE,CAAA"}
@@ -1,32 +1,13 @@
1
- import { ComponentModel, ValueSource, ComponentAttrs } from '../../core';
2
- /**
3
- * Color picker component attributes
4
- *
5
- * @public
6
- */
7
- export type ColorPickerAttrs = ComponentAttrs<ColorPickerModel>;
1
+ import { default as m, Children, Vnode } from 'mithril';
2
+ import { TweakableAttrs } from '../../core';
3
+ import { CommonWidgetAttrs } from '../elements';
4
+ export type ColorPickerWidgetAttrs<T = unknown> = CommonWidgetAttrs & ColorPickerAttrs<T>;
8
5
  /**
9
6
  * Color picker component model
10
7
  *
11
8
  * @public
12
9
  */
13
- export interface ColorPickerModel<T = unknown, V = number | string | number[]> extends ComponentModel, ValueSource<T, V> {
14
- /**
15
- * The type name of the control
16
- */
17
- type: 'color-picker';
18
- /**
19
- * If `target` and `property` are not set, then this is used as the control value
20
- *
21
- * @remarks
22
- * The format is determined by the `format` property.
23
- *
24
- * It is allowed to omit the '#' character but the '#' will be added on change
25
- *
26
- * It is allowed to use single character form per component (#f00 instead of #ff0000)
27
- * but it will always be written back as #ff0000 on change
28
- */
29
- value?: V;
10
+ export type ColorPickerAttrs<T = unknown> = TweakableAttrs<T, any> & {
30
11
  /**
31
12
  * The format of the string value. Defaults to 'rgb'
32
13
  *
@@ -45,13 +26,17 @@ export interface ColorPickerModel<T = unknown, V = number | string | number[]> e
45
26
  /**
46
27
  * This is called when the control value has been changed.
47
28
  */
48
- onInput?: (model: ColorPickerModel<T, V>, value: unknown) => void;
29
+ oninput?: (model: T, value: any) => void;
49
30
  /**
50
31
  * This is called once the control value is committed by the user.
51
32
  *
52
33
  * @remarks
53
34
  * Unlike the `onInput` callback, this is not necessarily called for each value change.
54
35
  */
55
- onChange?: (model: ColorPickerModel<T, V>, value: unknown) => void;
56
- }
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: <T>() => m.Component<ColorPickerWidgetAttrs<T>>;
41
+ export declare const ColorPicker: <T>() => m.Component<ColorPickerAttrs<T>>;
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":"AAWA,OAAO,EAIL,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAA;AASnB;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAE/D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAC3E,SAAQ,cAAc,EACpB,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,cAAc,CAAA;IACpB;;;;;;;;;;OAUG;IACH,KAAK,CA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AAQ,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,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAarF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAoUhE,CAAA"}
@@ -1,30 +1,12 @@
1
- import { ComponentModel, ValueSource, ComponentAttrs } from '../../core';
2
- /**
3
- * Color component attributes
4
- * @public
5
- */
6
- export type ColorAttrs = ComponentAttrs<ColorModel>;
1
+ import { default as m, Children, Vnode } from 'mithril';
2
+ import { TweakableAttrs } from '../../core';
3
+ import { CommonWidgetAttrs } from '../elements';
4
+ export type ColorWidgetAttrs<T = unknown> = CommonWidgetAttrs & ColorAttrs<T>;
7
5
  /**
8
6
  * Color component model
9
7
  * @public
10
8
  */
11
- export interface ColorModel<T = unknown, V = number | string | number[]> extends ComponentModel, ValueSource<T, V> {
12
- /**
13
- * The type name of the control
14
- */
15
- type: 'color';
16
- /**
17
- * The color value as a string.
18
- *
19
- * @remarks
20
- * The format is determined by the `format` property.
21
- *
22
- * It is allowed to omit the '#' character but the '#' will be added on change
23
- *
24
- * It is allowed to use single character form per component (#f00 instead of #ff0000)
25
- * but it will always be written back as #ff0000 on change
26
- */
27
- value?: V;
9
+ export type ColorAttrs<T = unknown> = TweakableAttrs<T, any> & {
28
10
  /**
29
11
  * The format of the string value. Defaults to 'rgb'
30
12
  *
@@ -40,13 +22,17 @@ export interface ColorModel<T = unknown, V = number | string | number[]> extends
40
22
  /**
41
23
  * This is called when the control value has been changed.
42
24
  */
43
- onInput?: (model: ColorModel<T, V>, value: unknown) => void;
25
+ oninput?: (model: T, value: any) => void;
44
26
  /**
45
27
  * This is called once the control value is committed by the user.
46
28
  *
47
29
  * @remarks
48
30
  * Unlike the `onInput` callback, this is not necessarily called for each value change.
49
31
  */
50
- onChange?: (model: ColorModel<T, V>, value: unknown) => void;
51
- }
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: <T>() => m.Component<ColorWidgetAttrs<T>>;
37
+ export declare const ColorComponent: <T>() => m.Component<ColorAttrs<T>>;
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":"AAIA,OAAO,EAKL,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAA;AAcnB;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEnD;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CACrE,SAAQ,cAAc,EACpB,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,CAAC,CAAA;IACT;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,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CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAE1F;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAazE,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,OAAK,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAoF7D,CAAA"}
@@ -1,11 +1,15 @@
1
1
  export * from './angle';
2
- export * from './checkbox';
3
- export * from './color-picker';
2
+ export * from './bool';
4
3
  export * from './color';
5
- export * from './number';
4
+ export * from './color-picker';
5
+ export * from './input';
6
+ export * from './matrix';
6
7
  export * from './point';
7
- export * from './position';
8
+ export * from './scalar';
8
9
  export * from './select';
9
10
  export * from './spherical';
10
- export * from './text';
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,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA"}
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 { default as m, Child, Children, 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: <T>() => m.Component<InputWidgetAttrs<T>>;
43
+ export declare const InputComponent: <T>() => m.Component<InputWidgetAttrs<T>>;
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,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEnD,OAAO,EAAY,gBAAgB,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