@thi.ng/imgui 2.2.54 → 2.2.56

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-04-11T12:32:44Z
3
+ - **Last updated**: 2024-04-23T07:02:18Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [2.2.55](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@2.2.55) (2024-04-20)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update type usage ([bee8fd5](https://github.com/thi-ng/umbrella/commit/bee8fd5))
17
+
12
18
  ### [2.2.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@2.2.8) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -256,10 +256,10 @@ import * as imgui from "@thi.ng/imgui";
256
256
  Browser ESM import:
257
257
 
258
258
  ```html
259
- <script type="module" src="https://cdn.skypack.dev/@thi.ng/imgui"></script>
259
+ <script type="module" src="https://esm.run/@thi.ng/imgui"></script>
260
260
  ```
261
261
 
262
- [Skypack documentation](https://docs.skypack.dev/)
262
+ [JSDelivr documentation](https://www.jsdelivr.com/)
263
263
 
264
264
  Package sizes (brotli'd, pre-treeshake): ESM: 6.65 KB
265
265
 
@@ -1,7 +1,7 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
3
3
  import type { IMGUI } from "../gui.js";
4
- export declare const dial: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
4
+ export declare const dial: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
5
5
  export declare const dialGroup: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: number, max: number, prec: number, horizontal: boolean, vals: number[], label: string[], fmt?: Fn<number, string>, info?: string[]) => number[] | undefined;
6
- export declare const dialRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, lx: number, ly: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
6
+ export declare const dialRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, lx: number, ly: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
7
7
  //# sourceMappingURL=dial.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
2
3
  import type { IMGUI } from "../gui.js";
3
4
  /**
@@ -10,5 +11,5 @@ import type { IMGUI } from "../gui.js";
10
11
  * @param title -
11
12
  * @param info -
12
13
  */
13
- export declare const dropdown: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, sel: number, items: string[], title: string, info?: string) => number | undefined;
14
+ export declare const dropdown: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, sel: number, items: string[], title: string, info?: string) => Maybe<number>;
14
15
  //# sourceMappingURL=dropdown.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { IMGUI } from "../gui.js";
2
- export declare const radialMenu: (gui: IMGUI, id: string, x: number, y: number, r: number, items: string[], info: string[]) => number | undefined;
3
+ export declare const radialMenu: (gui: IMGUI, id: string, x: number, y: number, r: number, items: string[], info: string[]) => Maybe<number>;
3
4
  //# sourceMappingURL=radial-menu.d.ts.map
@@ -1,4 +1,5 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
2
3
  import type { IMGUI } from "../gui.js";
3
- export declare const radio: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, horizontal: boolean, sel: number, square: boolean, labels: string[], info?: string[]) => number | undefined;
4
+ export declare const radio: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, horizontal: boolean, sel: number, square: boolean, labels: string[], info?: string[]) => Maybe<number>;
4
5
  //# sourceMappingURL=radio.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
3
3
  import type { IMGUI } from "../gui.js";
4
- export declare const ring: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, thetaGap: number, rscale: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
4
+ export declare const ring: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, thetaGap: number, rscale: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
5
5
  export declare const ringGroup: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: number, max: number, prec: number, horizontal: boolean, thetaGap: number, rscale: number, vals: number[], label: string[], fmt?: Fn<number, string>, info?: string[]) => number[] | undefined;
6
- export declare const ringRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, thetaGap: number, rscale: number, lx: number, ly: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
6
+ export declare const ringRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, thetaGap: number, rscale: number, lx: number, ly: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
7
7
  //# sourceMappingURL=ring.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
3
3
  import type { IMGUI } from "../gui.js";
4
- export declare const sliderH: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
4
+ export declare const sliderH: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
5
5
  export declare const sliderHGroup: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: number, max: number, prec: number, horizontal: boolean, vals: number[], label: string[], fmt?: Fn<number, string>, info?: string[]) => number[] | undefined;
6
- export declare const sliderHRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
6
+ export declare const sliderHRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
7
7
  //# sourceMappingURL=sliderh.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
3
3
  import type { IMGUI } from "../gui.js";
4
- export declare const sliderV: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, rows: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
4
+ export declare const sliderV: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, min: number, max: number, prec: number, val: number, rows: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
5
5
  export declare const sliderVGroup: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: number, max: number, prec: number, vals: number[], rows: number, label: string[], fmt?: Fn<number, string>, info?: string[]) => number[] | undefined;
6
- export declare const sliderVRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => number | undefined;
6
+ export declare const sliderVRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: number, max: number, prec: number, val: number, label?: string, fmt?: Fn<number, string>, info?: string) => Maybe<number>;
7
7
  //# sourceMappingURL=sliderv.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
3
3
  import type { ReadonlyVec } from "@thi.ng/vectors";
4
4
  import type { Color, GUITheme } from "../api.js";
@@ -7,5 +7,5 @@ export declare const textLabel: (gui: IMGUI, layout: IGridLayout<any> | LayoutBo
7
7
  export declare const textLabelRaw: (p: ReadonlyVec, attribs: Color | any, label: string) => (string | ReadonlyVec | Record<string, any>)[];
8
8
  export declare const textTransformH: (theme: GUITheme, x: number, y: number, _: number, h: number) => number[];
9
9
  export declare const textTransformV: (theme: GUITheme, x: number, y: number, w: number, h: number) => number[];
10
- export declare const dialValueLabel: (gui: IMGUI, id: string, key: number, v: number, x: number, y: number, label: string | undefined, fmt: Fn<number, string> | undefined) => any;
10
+ export declare const dialValueLabel: (gui: IMGUI, id: string, key: number, v: number, x: number, y: number, label: Maybe<string>, fmt: Maybe<Fn<number, string>>) => any;
11
11
  //# sourceMappingURL=textlabel.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { IGridLayout, LayoutBox } from "@thi.ng/layout";
2
3
  import type { IMGUI } from "../gui.js";
3
4
  /**
@@ -13,6 +14,6 @@ import type { IMGUI } from "../gui.js";
13
14
  * @param label -
14
15
  * @param info -
15
16
  */
16
- export declare const toggle: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, val: boolean, square?: boolean, label?: string, info?: string) => boolean | undefined;
17
- export declare const toggleRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, lx: number, val: boolean, label?: string, info?: string) => boolean | undefined;
17
+ export declare const toggle: (gui: IMGUI, layout: IGridLayout<any> | LayoutBox, id: string, val: boolean, square?: boolean, label?: string, info?: string) => Maybe<boolean>;
18
+ export declare const toggleRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, lx: number, val: boolean, label?: string, info?: string) => Maybe<boolean>;
18
19
  //# sourceMappingURL=toggle.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { IGridLayout } from "@thi.ng/layout";
3
3
  import type { Vec } from "@thi.ng/vectors";
4
4
  import type { IMGUI } from "../gui.js";
@@ -22,6 +22,6 @@ import type { IMGUI } from "../gui.js";
22
22
  * @param fmt -
23
23
  * @param info -
24
24
  */
25
- export declare const xyPad: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: Vec, max: Vec, prec: number, val: Vec, mode: number, yUp: boolean, label?: string, fmt?: Fn<Vec, string>, info?: string) => Vec | undefined;
26
- export declare const xyPadRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: Vec, max: Vec, prec: number, val: Vec, yUp: boolean | undefined, lx: number, ly: number, label?: string, fmt?: Fn<Vec, string>, info?: string) => Vec | undefined;
25
+ export declare const xyPad: (gui: IMGUI, layout: IGridLayout<any>, id: string, min: Vec, max: Vec, prec: number, val: Vec, mode: number, yUp: boolean, label?: string, fmt?: Fn<Vec, string>, info?: string) => Maybe<Vec>;
26
+ export declare const xyPadRaw: (gui: IMGUI, id: string, x: number, y: number, w: number, h: number, min: Vec, max: Vec, prec: number, val: Vec, yUp: boolean | undefined, lx: number, ly: number, label?: string, fmt?: Fn<Vec, string>, info?: string) => Maybe<Vec>;
27
27
  //# sourceMappingURL=xypad.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/imgui",
3
- "version": "2.2.54",
3
+ "version": "2.2.56",
4
4
  "description": "Immediate mode GUI with flexible state handling & data only shape output",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -27,7 +27,7 @@
27
27
  "build": "yarn build:esbuild && yarn build:decl",
28
28
  "build:decl": "tsc --declaration --emitDeclarationOnly",
29
29
  "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
30
- "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc behaviors components",
30
+ "clean": "bun ../../tools/src/clean-package.ts behaviors components",
31
31
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
32
32
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
33
33
  "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
@@ -36,21 +36,20 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.10.1",
40
- "@thi.ng/checks": "^3.6.1",
41
- "@thi.ng/geom": "^6.1.6",
42
- "@thi.ng/geom-api": "^4.0.6",
43
- "@thi.ng/geom-isec": "^3.0.6",
44
- "@thi.ng/geom-tessellate": "^2.1.128",
45
- "@thi.ng/layout": "^3.0.36",
46
- "@thi.ng/math": "^5.10.10",
47
- "@thi.ng/transducers": "^9.0.1",
48
- "@thi.ng/vectors": "^7.10.27"
39
+ "@thi.ng/api": "^8.11.1",
40
+ "@thi.ng/checks": "^3.6.3",
41
+ "@thi.ng/geom": "^6.1.8",
42
+ "@thi.ng/geom-api": "^4.0.8",
43
+ "@thi.ng/geom-isec": "^3.0.8",
44
+ "@thi.ng/geom-tessellate": "^2.1.130",
45
+ "@thi.ng/layout": "^3.0.38",
46
+ "@thi.ng/math": "^5.10.12",
47
+ "@thi.ng/transducers": "^9.0.3",
48
+ "@thi.ng/vectors": "^7.10.29"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@microsoft/api-extractor": "^7.43.0",
52
52
  "esbuild": "^0.20.2",
53
- "rimraf": "^5.0.5",
54
53
  "typedoc": "^0.25.12",
55
54
  "typescript": "^5.4.3"
56
55
  },
@@ -159,5 +158,5 @@
159
158
  ],
160
159
  "year": 2019
161
160
  },
162
- "gitHead": "18a0c063a7b33d790e5bc2486c106f45f663ac28\n"
161
+ "gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n"
163
162
  }