geometrix 0.5.36 → 0.5.38

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/dist/index.d.ts CHANGED
@@ -508,7 +508,7 @@ declare class DesignParam {
508
508
  declare function designParam(iparamDef: tParamDef, suffix?: string): DesignParam;
509
509
  declare function pNumber(name: string, unit: string, init: number, min?: number, max?: number, step?: number): tParam;
510
510
  declare function pCheckbox(name: string, init: boolean): tParam;
511
- declare function pDropdown(name: string, values: string[]): tParam;
511
+ declare function pDropdown(name: string, values: string[], iInit?: number): tParam;
512
512
  declare function pSectionSeparator(name: string): tParam;
513
513
 
514
514
  type tPosiOrien = [number, number, number];
package/dist/index.js CHANGED
@@ -2923,11 +2923,15 @@ function pCheckbox(name, init) {
2923
2923
  };
2924
2924
  return rParam;
2925
2925
  }
2926
- function pDropdown(name, values) {
2926
+ function pDropdown(name, values, iInit = 0) {
2927
+ let init = 0;
2928
+ if (iInit < values.length) {
2929
+ init = iInit;
2930
+ }
2927
2931
  const rParam = {
2928
2932
  name,
2929
2933
  unit: "dropdown",
2930
- init: 0,
2934
+ init,
2931
2935
  min: 0,
2932
2936
  max: values.length - 1,
2933
2937
  step: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geometrix",
3
- "version": "0.5.36",
3
+ "version": "0.5.38",
4
4
  "description": "The 2D geometry engine of the parametrix",
5
5
  "private": false,
6
6
  "repository": {
@@ -67,7 +67,7 @@
67
67
  "json5": "^2.2.3"
68
68
  },
69
69
  "devDependencies": {
70
- "@types/node": "^20.12.10",
70
+ "@types/node": "^20.12.11",
71
71
  "@typescript-eslint/eslint-plugin": "^7.0.1",
72
72
  "@typescript-eslint/parser": "^7.0.1",
73
73
  "eslint": "^8.57.0",