@thi.ng/imgui 3.2.0 → 3.2.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.
- package/CHANGELOG.md +10 -1
- package/README.md +1 -1
- package/components/dropdown.js +1 -1
- package/components/ramp.d.ts +6 -2
- package/components/ramp.js +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-02-
|
|
3
|
+
- **Last updated**: 2025-02-10T21:44:04Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,15 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [3.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@3.2.1) (2025-02-05)
|
|
15
|
+
|
|
16
|
+
#### 🩹 Bug fixes
|
|
17
|
+
|
|
18
|
+
- update dropdown label handling ([8dc2e93](https://github.com/thi-ng/umbrella/commit/8dc2e93))
|
|
19
|
+
- show label in default state if selected value is undefined
|
|
20
|
+
(e.g. because `value` was set to -1)
|
|
21
|
+
- update ramp color handling, add `fill` option ([874d701](https://github.com/thi-ng/umbrella/commit/874d701))
|
|
22
|
+
|
|
14
23
|
## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@3.2.0) (2025-02-05)
|
|
15
24
|
|
|
16
25
|
#### 🚀 Features
|
package/README.md
CHANGED
package/components/dropdown.js
CHANGED
package/components/ramp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Maybe } from "@thi.ng/api";
|
|
2
2
|
import type { Ramp } from "@thi.ng/ramp";
|
|
3
|
-
import { type ComponentOpts } from "../api.js";
|
|
3
|
+
import { type Color, type ComponentOpts } from "../api.js";
|
|
4
4
|
export interface RampOpts extends Omit<ComponentOpts, "label"> {
|
|
5
5
|
ramp: Ramp<number>;
|
|
6
6
|
/**
|
|
@@ -23,6 +23,10 @@ export interface RampOpts extends Omit<ComponentOpts, "label"> {
|
|
|
23
23
|
* @defaultValue 100
|
|
24
24
|
*/
|
|
25
25
|
samples?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Optional fill color override (default: GUI text color)
|
|
28
|
+
*/
|
|
29
|
+
fill?: Color;
|
|
26
30
|
}
|
|
27
|
-
export declare const ramp: ({ gui, layout, id, ramp, mode, info, eps, samples, }: RampOpts) => Maybe<Ramp<number>>;
|
|
31
|
+
export declare const ramp: ({ gui, layout, id, ramp, mode, info, eps, samples, fill, }: RampOpts) => Maybe<Ramp<number>>;
|
|
28
32
|
//# sourceMappingURL=ramp.d.ts.map
|
package/components/ramp.js
CHANGED
|
@@ -23,7 +23,8 @@ const ramp = ({
|
|
|
23
23
|
mode = 0,
|
|
24
24
|
info,
|
|
25
25
|
eps = 0.05,
|
|
26
|
-
samples = 100
|
|
26
|
+
samples = 100,
|
|
27
|
+
fill = gui.textColor(false)
|
|
27
28
|
}) => {
|
|
28
29
|
const { x, y, w, h } = layoutBox(layout);
|
|
29
30
|
const maxX = x + w;
|
|
@@ -33,7 +34,6 @@ const ramp = ({
|
|
|
33
34
|
const key = hash([x, y, w, h]);
|
|
34
35
|
gui.registerID(id, key);
|
|
35
36
|
const box = gui.resource(id, key, () => rect([x, y], [w, h]));
|
|
36
|
-
const col = gui.textColor(false);
|
|
37
37
|
const hover = isHoverSlider(gui, id, box, "move");
|
|
38
38
|
const stops = ramp2.stops;
|
|
39
39
|
let selID = -1;
|
|
@@ -79,7 +79,7 @@ const ramp = ({
|
|
|
79
79
|
mix2([], pos, maxPos, [1, stops[stops.length - 1][1]]),
|
|
80
80
|
[maxX, maxY]
|
|
81
81
|
],
|
|
82
|
-
{ fill
|
|
82
|
+
{ fill }
|
|
83
83
|
)
|
|
84
84
|
),
|
|
85
85
|
...stops.map(([t], i) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/imgui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Immediate mode GUI with flexible state handling & data only shape output",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@thi.ng/api": "^8.11.19",
|
|
43
43
|
"@thi.ng/checks": "^3.6.22",
|
|
44
|
-
"@thi.ng/geom": "^8.1.
|
|
44
|
+
"@thi.ng/geom": "^8.1.29",
|
|
45
45
|
"@thi.ng/geom-isec": "^4.0.31",
|
|
46
46
|
"@thi.ng/layout": "^3.1.15",
|
|
47
47
|
"@thi.ng/math": "^5.11.19",
|
|
@@ -162,5 +162,5 @@
|
|
|
162
162
|
],
|
|
163
163
|
"year": 2019
|
|
164
164
|
},
|
|
165
|
-
"gitHead": "
|
|
165
|
+
"gitHead": "dcc1dbfa6eae31ac65e12843987b94d4a7edc144\n"
|
|
166
166
|
}
|