@x-viewer/core 0.21.5 → 0.21.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.
@@ -1,6 +1,10 @@
1
1
  export declare class Container {
2
2
  width: number;
3
3
  height: number;
4
+ /** Max render target edge; avoids runaway buffers when embed CSS mis-reports size. */
5
+ private static readonly RENDER_MAX_EDGE;
6
+ /** Ignore width/height drift smaller than this (px) to avoid resize churn from sub-pixel/layout noise. */
7
+ private static readonly RESIZE_IGNORE_DELTA_PX;
4
8
  /**
5
9
  * The root container which will be created to under the container user passed in,
6
10
  * it typically contains a viewer container and a widget container.
@@ -22,6 +26,14 @@ export declare class Container {
22
26
  */
23
27
  widgetContainer?: HTMLDivElement;
24
28
  constructor(containerId: string);
29
+ /**
30
+ * Caps width/height used for WebGL/CSS2D so hosts with auto-height + % sizing (e.g. some CMS embeds)
31
+ * cannot drive an unbounded resize loop. Does not change DOM layout.
32
+ */
33
+ static clampRenderDimensions(rawWidth: number, rawHeight: number): {
34
+ width: number;
35
+ height: number;
36
+ };
25
37
  get needResize(): boolean;
26
38
  destroy(): void;
27
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-viewer/core",
3
- "version": "0.21.5",
3
+ "version": "0.21.6",
4
4
  "homepage": "https://dwg.thingraph.site/",
5
5
  "description": "WebGL-based 2D/3D viewer engine built on Three.js. View DWG/DXF/PDF files in the browser with no server required. Supports glTF, OBJ, FBX, IFC, STL and BimTiles formats.",
6
6
  "author": "thingraph",