@bitbybit-dev/cad-cloud-sdk 1.6.1 → 1.6.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.
@@ -1,6 +1,6 @@
1
1
  // ---------------------------------------------------------------------------
2
2
  // AUTO-GENERATED by generate-pipeline-types.ts — do not edit manually.
3
- // Generated from operation-catalog.json v1.6.1
3
+ // Generated from operation-catalog.json v1.6.2
4
4
  // ---------------------------------------------------------------------------
5
5
  /**
6
6
  * Create a type-safe pipeline step with autocomplete for operation paths and params.
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline-operations.js","sourceRoot":"","sources":["../../src/types/pipeline-operations.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,uEAAuE;AACvE,+CAA+C;AAC/C,8EAA8E;AAsprB9E;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAChB,SAAY,EACZ,MAA0B,EAC1B,IAA2B;IAE3B,MAAM,CAAC,GAA4B,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACzD,IAAI,IAAI,EAAE,MAAM;QAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACrC,OAAO,CAAiB,CAAC;AAC7B,CAAC"}
1
+ {"version":3,"file":"pipeline-operations.js","sourceRoot":"","sources":["../../src/types/pipeline-operations.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,uEAAuE;AACvE,+CAA+C;AAC/C,8EAA8E;AAkurB9E;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAChB,SAAY,EACZ,MAA0B,EAC1B,IAA2B;IAE3B,MAAM,CAAC,GAA4B,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACzD,IAAI,IAAI,EAAE,MAAM;QAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACrC,OAAO,CAAiB,CAAC;AAC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitbybit-dev/cad-cloud-sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Type-safe SDK for the Bitbybit CAD Cloud API \u2014 parametric models, CAD operations, file conversion, and task management",
5
5
  "author": "Bit By Bit Developers",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  // ---------------------------------------------------------------------------
2
2
  // AUTO-GENERATED by generate-pipeline-types.ts — do not edit manually.
3
- // Generated from operation-catalog.json v1.6.1
3
+ // Generated from operation-catalog.json v1.6.2
4
4
  // ---------------------------------------------------------------------------
5
5
 
6
6
  /* eslint-disable @typescript-eslint/no-empty-object-type */
@@ -12,7 +12,9 @@ export type OperationPath =
12
12
  | "color.getRedParam"
13
13
  | "color.hexColor"
14
14
  | "color.hexToRgb"
15
+ | "color.hexToRgba"
15
16
  | "color.hexToRgbMapped"
17
+ | "color.hslToHex"
16
18
  | "color.invert"
17
19
  | "color.linearToSrgb"
18
20
  | "color.rgb1Color"
@@ -335,6 +337,7 @@ export type OperationPath =
335
337
  | "math.moveTowards"
336
338
  | "math.multiply"
337
339
  | "math.negate"
340
+ | "math.niceStep"
338
341
  | "math.number"
339
342
  | "math.oneNrOperation"
340
343
  | "math.pi"
@@ -348,6 +351,7 @@ export type OperationPath =
348
351
  | "math.round"
349
352
  | "math.roundAndRemoveTrailingZeros"
350
353
  | "math.roundToDecimals"
354
+ | "math.shortestAngle"
351
355
  | "math.sign"
352
356
  | "math.sin"
353
357
  | "math.smoothstep"
@@ -1277,19 +1281,35 @@ export interface OperationParams {
1277
1281
  * Example: '#FF5733' -> '#FF5733'
1278
1282
  */
1279
1283
  "color.hexColor": {
1280
- /** The color as a hex text such as `#ff5733`, with or without the `#`. */
1284
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1281
1285
  color?: unknown | PipelineRef;
1282
1286
  };
1283
1287
  /**
1284
1288
  * Reads a hex color into an `{ r, g, b }` object with channels from 0 to 255.
1285
1289
  *
1286
- * The text may start with or without `#`; anything else than six hex digits throws an error.
1287
- * Example: '#FF5733' -> { r: 255, g: 87, b: 51 }
1290
+ * The text holds six hex digits or three, each standing for a pair, with or without `#`;
1291
+ * anything else throws an error.
1292
+ * Example: '#FF5733' -> { r: 255, g: 87, b: 51 }, '#f53' -> { r: 255, g: 85, b: 51 }
1288
1293
  */
1289
1294
  "color.hexToRgb": {
1290
- /** The color as a hex text such as `#ff5733`, with or without the `#`. */
1295
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1291
1296
  color?: unknown | PipelineRef;
1292
1297
  };
1298
+ /**
1299
+ * Writes a hex color with an opacity as a CSS `rgba()` color, for a style that needs to see
1300
+ * through.
1301
+ *
1302
+ * Example: '#ff5733' with alpha 0.5 -> 'rgba(255, 87, 51, 0.5)'
1303
+ */
1304
+ "color.hexToRgba": {
1305
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1306
+ color?: unknown | PipelineRef;
1307
+ /**
1308
+ * How opaque the color is, from 0 for fully transparent to 1 for solid; a value outside that is held
1309
+ * at the nearer end.
1310
+ */
1311
+ alpha?: number | PipelineRef;
1312
+ };
1293
1313
  /**
1294
1314
  * Reads a hex color into an `{ r, g, b }` object with the channels remapped to a range of your
1295
1315
  * choice.
@@ -1304,6 +1324,30 @@ export interface OperationParams {
1304
1324
  /** The value a channel of 255 maps to; 1 gives channels from 0 to 1. */
1305
1325
  to?: number | PipelineRef;
1306
1326
  };
1327
+ /**
1328
+ * Writes a color given by hue, saturation and lightness as a hex color: a way to pick colors
1329
+ * that differ by hue alone, such as a palette spread round the wheel.
1330
+ *
1331
+ * The hue wraps round; saturation and lightness are held between 0 and 1.
1332
+ * Example: hue 0, saturation 1, lightness 0.5 -> '#ff0000'; hue 210, 0.6, 0.5 -> '#3380cc'
1333
+ */
1334
+ "color.hslToHex": {
1335
+ /**
1336
+ * The hue in degrees round the color wheel: 0 red, 120 green, 240 blue; any angle is taken
1337
+ * whole turns aside.
1338
+ */
1339
+ hue?: number | PipelineRef;
1340
+ /**
1341
+ * How strong the color is, from 0 for grey to 1 for the purest hue; a value outside that is held at
1342
+ * the nearer end.
1343
+ */
1344
+ saturation?: number | PipelineRef;
1345
+ /**
1346
+ * How light the color is, from 0 for black through 0.5 for the full hue to 1 for white; a value
1347
+ * outside that is held at the nearer end.
1348
+ */
1349
+ lightness?: number | PipelineRef;
1350
+ };
1307
1351
  /**
1308
1352
  * Inverts a hex color, turning each channel into its opposite: 255 minus the value.
1309
1353
  *
@@ -5634,6 +5678,19 @@ export interface OperationParams {
5634
5678
  /** The number the method works on; for the trigonometric methods an angle in radians. */
5635
5679
  number?: number | PipelineRef;
5636
5680
  };
5681
+ /**
5682
+ * Rounds a positive number to a step on the 1, 2, 5 scale - 0.1, 0.2, 0.5, 1, 2, 5, 10 - the
5683
+ * sizes a grid, a ruler or a slider reads well in.
5684
+ *
5685
+ * A number within a billionth of a step counts as that step.
5686
+ * Example: 0.37 up -> 0.5, down -> 0.2, nearest -> 0.5
5687
+ */
5688
+ "math.niceStep": {
5689
+ /** The rough size to turn into a step, such as a span divided by the number of ticks wanted. */
5690
+ number?: number | PipelineRef;
5691
+ /** Whether the step may be larger than `number`, smaller, or whichever is closer. */
5692
+ direction?: "up" | "down" | "nearest" | PipelineRef;
5693
+ };
5637
5694
  /**
5638
5695
  * Passes a number through unchanged, so a value can be given a name and reused.
5639
5696
  *
@@ -5770,6 +5827,7 @@ export interface OperationParams {
5770
5827
  /**
5771
5828
  * Rounds a number to a given number of decimal places.
5772
5829
  *
5830
+ * A small negative number rounds to 0, never to -0.
5773
5831
  * Example: 1.32156 to 3 places -> 1.322
5774
5832
  */
5775
5833
  "math.roundToDecimals": {
@@ -5778,6 +5836,24 @@ export interface OperationParams {
5778
5836
  /** How many digits to keep after the decimal point; 0 rounds to a whole number. */
5779
5837
  decimalPlaces?: number | PipelineRef;
5780
5838
  };
5839
+ /**
5840
+ * Gives the angle that `to` names, whole turns aside, nearest to `from`, so going from `from` to
5841
+ * it is the short way round.
5842
+ *
5843
+ * Animating an angle toward the result never spins the long way. `fullTurn` sets the unit.
5844
+ * Example: 10 to 350 in degrees -> -10, 350 to 10 -> 370
5845
+ */
5846
+ "math.shortestAngle": {
5847
+ /** The angle the turn starts from, in the unit `fullTurn` sets. */
5848
+ from?: number | PipelineRef;
5849
+ /**
5850
+ * The angle to arrive at, in the same unit as `from`; any number of whole turns may be added
5851
+ * to it without changing the answer.
5852
+ */
5853
+ to?: number | PipelineRef;
5854
+ /** How large a whole turn is in the unit the angles use: 360 for degrees, two pi for radians. */
5855
+ fullTurn?: number | PipelineRef;
5856
+ };
5781
5857
  /**
5782
5858
  * Tells the sign of a number: -1 when negative, 0 when zero, 1 when positive.
5783
5859
  *