vim-web 0.5.0-dev.6 → 0.5.0-dev.7

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.
@@ -24,11 +24,11 @@ export declare class ColorManager {
24
24
  getColor(color: THREE.Color): Promise<RemoteColor | undefined>;
25
25
  /**
26
26
  * Creates or retrieves cached color instances for multiple hex values.
27
- * @param c - Array of RGBA32 color values
27
+ * @param colors - Array of RGBA32 color values
28
28
  * @returns Promise resolving to an array of ColorHandles in the same order as input, or undefined if creation fails
29
29
  * @remarks Duplicate hex values will be mapped to the same color instance for efficiency
30
30
  */
31
- getColors(c: THREE.Color[]): Promise<RemoteColor[]>;
31
+ getColors(colors: THREE.Color[]): Promise<RemoteColor[]>;
32
32
  /**
33
33
  * Retrieves a color instance by its unique identifier.
34
34
  * @param id - The unique identifier of the color
@@ -58384,16 +58384,16 @@ void main() {
58384
58384
  }
58385
58385
  /**
58386
58386
  * Creates or retrieves cached color instances for multiple hex values.
58387
- * @param c - Array of RGBA32 color values
58387
+ * @param colors - Array of RGBA32 color values
58388
58388
  * @returns Promise resolving to an array of ColorHandles in the same order as input, or undefined if creation fails
58389
58389
  * @remarks Duplicate hex values will be mapped to the same color instance for efficiency
58390
58390
  */
58391
- async getColors(c) {
58392
- const result = new Array(c.length);
58391
+ async getColors(colors) {
58392
+ const result = new Array(colors.length);
58393
58393
  const hexToIndices = /* @__PURE__ */ new Map();
58394
58394
  const toCreate = [];
58395
- for (let i2 = 0; i2 < c.length; i2++) {
58396
- const color = c[i2];
58395
+ for (let i2 = 0; i2 < colors.length; i2++) {
58396
+ const color = colors[i2];
58397
58397
  const hex = color.getHex();
58398
58398
  if (this._hexToColor.has(hex)) {
58399
58399
  result[i2] = this._hexToColor.get(hex);
@@ -58404,13 +58404,13 @@ void main() {
58404
58404
  hexToIndices.set(hex, [i2]);
58405
58405
  }
58406
58406
  }
58407
- const colors = await this._createColors(toCreate);
58408
- if (!colors) return void 0;
58409
- for (let i2 = 0; i2 < colors.length; i2++) {
58407
+ const remoteColors = await this._createColors(toCreate);
58408
+ if (!remoteColors) return void 0;
58409
+ for (let i2 = 0; i2 < remoteColors.length; i2++) {
58410
58410
  const color = toCreate[i2];
58411
58411
  const indices = hexToIndices.get(color.getHex());
58412
58412
  for (const index2 of indices) {
58413
- result[index2] = colors[i2];
58413
+ result[index2] = remoteColors[i2];
58414
58414
  }
58415
58415
  }
58416
58416
  return result;
@@ -60893,6 +60893,7 @@ Averrage Date/Second ${avgDataRatePS} kb
60893
60893
  // default state
60894
60894
  );
60895
60895
  }
60896
+ //TODO: Rename this to getElementFromNode, prefer using element instead
60896
60897
  getElement(elementIndex) {
60897
60898
  if (this._objects.has(elementIndex)) {
60898
60899
  return this._objects.get(elementIndex);
@@ -60905,7 +60906,7 @@ Averrage Date/Second ${avgDataRatePS} kb
60905
60906
  throw new Error("Method not implemented.");
60906
60907
  }
60907
60908
  getElementFromIndex(element) {
60908
- throw new Error("Method not implemented.");
60909
+ return this.getElement(element);
60909
60910
  }
60910
60911
  getObjectsInBox(box) {
60911
60912
  throw new Error("Method not implemented.");
@@ -76284,6 +76285,7 @@ Averrage Date/Second ${avgDataRatePS} kb
76284
76285
  obj.state = VisibilityState.HIGHLIGHTED;
76285
76286
  });
76286
76287
  },
76288
+ // TODO: Change this api to use elements
76287
76289
  isolate: (instances) => {
76288
76290
  hide("all");
76289
76291
  viewer.selection.getAll().forEach((obj) => {