@kupcad/ui 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kupcad/ui",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "KupCAD's UI: a three.js viewer of a model the core made, for any host (@kupcad/ui/viewer), and the Svelte panels around it (the viewer's pane, parameters, console, a language server's preview), styled by --kc-* tokens.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -36,11 +36,11 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@kupcad/protocol": "0.1.5",
39
+ "@kupcad/protocol": "0.1.6",
40
40
  "three": "^0.186.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@kupcad/wasm": "0.1.5",
43
+ "@kupcad/wasm": "0.1.6",
44
44
  "@playwright/test": "^1.64.1",
45
45
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
46
46
  "@testing-library/svelte": "^5.4.2",
@@ -3,7 +3,8 @@
3
3
  // the camera's controls capture the pointer while it drags, and a screenshot reads the canvas as
4
4
  // an image, which jsdom draws none of: here an empty PNG. A canvas has no context, as jsdom's has
5
5
  // none, but quietly (jsdom says "not implemented" when asked). A dialog (the shortcuts') opens and
6
- // closes, which jsdom's element can't. `stubRenderer` draws in place of WebGL.
6
+ // closes, which jsdom's element can't. A range of text measures, as an editor beside the viewer
7
+ // measures its lines (jsdom lays out nothing: no box). `stubRenderer` draws in place of WebGL.
7
8
 
8
9
  /** @import { Camera, Object3D } from 'three' */
9
10
  /** @import { RendererLike } from './types.js' */
@@ -14,6 +15,9 @@ globalThis.ResizeObserver ??= class {
14
15
  disconnect() {}
15
16
  };
16
17
 
18
+ Range.prototype.getClientRects ??= () => /** @type {DOMRectList} */ (/** @type {unknown} */ ([]));
19
+ Range.prototype.getBoundingClientRect ??= () => DOMRect.fromRect();
20
+
17
21
  Element.prototype.setPointerCapture ??= () => {};
18
22
  Element.prototype.releasePointerCapture ??= () => {};
19
23
  Element.prototype.hasPointerCapture ??= () => false;