@solid-labs/fab-one-widget 0.1.6 → 0.1.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.
Files changed (34) hide show
  1. package/dist/GirthManagerWidget-C5L2H3Y2.js +4786 -0
  2. package/dist/GirthManagerWidget-C5L2H3Y2.js.map +1 -0
  3. package/dist/girth-manager-ui/src/GirthManagerCore.d.ts +11 -5
  4. package/dist/girth-manager-ui/src/components/CameraFit.d.ts +5 -1
  5. package/dist/girth-manager-ui/src/components/CircumferenceMeasurements.d.ts +4 -1
  6. package/dist/girth-manager-ui/src/components/CircumferenceSlice.d.ts +6 -1
  7. package/dist/girth-manager-ui/src/components/ClickableMesh.d.ts +5 -1
  8. package/dist/girth-manager-ui/src/components/DebugOverlays.d.ts +14 -2
  9. package/dist/girth-manager-ui/src/components/DebugPanel.d.ts +2 -1
  10. package/dist/girth-manager-ui/src/components/ErrorBoundary.d.ts +16 -0
  11. package/dist/girth-manager-ui/src/components/MeasurementInputForm.d.ts +14 -0
  12. package/dist/girth-manager-ui/src/components/VerticalDimension.d.ts +3 -1
  13. package/dist/girth-manager-ui/src/config.d.ts +2 -2
  14. package/dist/girth-manager-ui/src/index.d.ts +10 -6
  15. package/dist/girth-manager-ui/src/processing/logger.d.ts +13 -0
  16. package/dist/girth-manager-ui/src/processing/mesh-ops.d.ts +0 -22
  17. package/dist/girth-manager-ui/src/processing/pipeline.d.ts +34 -6
  18. package/dist/girth-manager-ui/src/processing/types.d.ts +112 -12
  19. package/dist/girth-manager-ui/src/processing/vertex-colors.d.ts +6 -1
  20. package/dist/girth-manager-ui/src/processing/wasm-loader.d.ts +16 -16
  21. package/dist/girth-manager-web-widget/src/GirthManagerWidget.d.ts +3 -5
  22. package/dist/girth-manager-web-widget/src/index.d.ts +1 -1
  23. package/dist/girth-manager-web-widget/src/types.d.ts +57 -0
  24. package/dist/girth-manager-web-widget/src/web-component.d.ts +2 -2
  25. package/dist/html2canvas.esm-Dmi1NfiH.js +4871 -0
  26. package/dist/html2canvas.esm-Dmi1NfiH.js.map +1 -0
  27. package/dist/index.js +1 -1
  28. package/dist/web-component.js +2 -2
  29. package/dist/web-component.js.map +1 -1
  30. package/package.json +9 -9
  31. package/dist/GirthManagerWidget-Ci-QU3Wh.js +0 -4137
  32. package/dist/GirthManagerWidget-Ci-QU3Wh.js.map +0 -1
  33. package/dist/galileo_core_geo-DFVJmkI7.js +0 -298
  34. package/dist/galileo_core_geo-DFVJmkI7.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as a, a as c, c as i, g as s } from "./GirthManagerWidget-Ci-QU3Wh.js";
1
+ import { G as a, a as c, c as i, g as s } from "./GirthManagerWidget-C5L2H3Y2.js";
2
2
  export {
3
3
  a as GirthManagerWidget,
4
4
  c as arrayToCircumference,
@@ -1,6 +1,6 @@
1
1
  import { createElement as s } from "react";
2
2
  import { createRoot as i } from "react-dom/client";
3
- import { G as o } from "./GirthManagerWidget-Ci-QU3Wh.js";
3
+ import { G as o } from "./GirthManagerWidget-C5L2H3Y2.js";
4
4
  class n extends HTMLElement {
5
5
  constructor() {
6
6
  super(...arguments), this._root = null, this._request = null, this._wasmModule = void 0, this._handleComplete = (e) => {
@@ -31,7 +31,7 @@ class n extends HTMLElement {
31
31
  this._request = e;
32
32
  this._render();
33
33
  }
34
- /** Set the pre-loaded WASM module (galileo-core-geo). Must be set before or alongside request. */
34
+ /** Set the pre-loaded WASM v2 module (geo-wasm). Must be set before or alongside request. */
35
35
  get wasmModule() {
36
36
  return this._wasmModule;
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web-component.js","sources":["../src/web-component.ts"],"sourcesContent":["import { createElement } from \"react\"\nimport { createRoot, type Root } from \"react-dom/client\"\nimport { GirthManagerWidget } from \"./GirthManagerWidget\"\nimport type { WidgetRequest, WidgetResponse } from \"./types\"\n\n/**\n * Custom Element wrapper for Angular integration.\n *\n * Usage in Angular:\n * // In the component class:\n * async ngAfterViewInit() {\n * const wasm = await import('galileo-core-geo');\n * await wasm.default();\n * this.widgetEl.nativeElement.wasmModule = wasm;\n * this.widgetEl.nativeElement.request = { spacing_type: 'BK', scan_url: '...' };\n * }\n *\n * // In the template:\n * <girth-manager-widget #widgetEl (widgetComplete)=\"onComplete($event)\"></girth-manager-widget>\n */\nclass GirthManagerWidgetElement extends HTMLElement {\n private _root: Root | null = null\n private _request: WidgetRequest | null = null\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _wasmModule: any = undefined\n\n static get observedAttributes() {\n return [\"request\"]\n }\n\n get request(): WidgetRequest | null {\n return this._request\n }\n\n set request(value: WidgetRequest | string | null) {\n if (typeof value === \"string\") {\n try {\n this._request = JSON.parse(value)\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON for request attribute:\", value)\n return\n }\n } else {\n this._request = value\n }\n this._render()\n }\n\n /** Set the pre-loaded WASM module (galileo-core-geo). Must be set before or alongside request. */\n get wasmModule() {\n return this._wasmModule\n }\n\n set wasmModule(value: unknown) {\n this._wasmModule = value\n this._render()\n }\n\n connectedCallback() {\n const shadow = this.attachShadow({ mode: \"open\" })\n const container = document.createElement(\"div\")\n container.style.width = \"100%\"\n container.style.height = \"100%\"\n shadow.appendChild(container)\n this._root = createRoot(container)\n\n // Parse request from attribute if set before connection\n const attrValue = this.getAttribute(\"request\")\n if (attrValue && !this._request) {\n try {\n this._request = JSON.parse(attrValue)\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON in request attribute\")\n }\n }\n\n this._render()\n }\n\n disconnectedCallback() {\n this._root?.unmount()\n this._root = null\n }\n\n attributeChangedCallback(name: string, _oldValue: string, newValue: string) {\n if (name === \"request\" && newValue) {\n try {\n this._request = JSON.parse(newValue)\n this._render()\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON in request attribute\")\n }\n }\n }\n\n private _handleComplete = (response: WidgetResponse) => {\n this.dispatchEvent(\n new CustomEvent(\"widgetComplete\", {\n detail: response,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n private _render() {\n if (!this._root || !this._request) return\n\n this._root.render(\n createElement(GirthManagerWidget, {\n request: this._request,\n onComplete: this._handleComplete,\n wasmModule: this._wasmModule,\n })\n )\n }\n}\n\n// Register the custom element\nif (!customElements.get(\"girth-manager-widget\")) {\n customElements.define(\"girth-manager-widget\", GirthManagerWidgetElement)\n}\n\nexport { GirthManagerWidgetElement }\nexport type { WidgetRequest, WidgetResponse }\n"],"names":["GirthManagerWidgetElement","response","value","shadow","container","createRoot","attrValue","name","_oldValue","newValue","createElement","GirthManagerWidget"],"mappings":";;;AAoBA,MAAMA,UAAkC,YAAY;AAAA,EAApD,cAAA;AAAA,UAAA,GAAA,SAAA,GACI,KAAQ,QAAqB,MAC7B,KAAQ,WAAiC,MAEzC,KAAQ,cAAmB,QAuE3B,KAAQ,kBAAkB,CAACC,MAA6B;AACpD,WAAK;AAAA,QACD,IAAI,YAAY,kBAAkB;AAAA,UAC9B,QAAQA;AAAA,UACR,SAAS;AAAA,UACT,UAAU;AAAA,QAAA,CACb;AAAA,MAAA;AAAA,IAET;AAAA,EAAA;AAAA,EA7EA,WAAW,qBAAqB;AAC5B,WAAO,CAAC,SAAS;AAAA,EACrB;AAAA,EAEA,IAAI,UAAgC;AAChC,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,QAAQC,GAAsC;AAC9C,QAAI,OAAOA,KAAU;AACjB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAK;AAAA,MACpC,QAAQ;AACJ,gBAAQ,MAAM,4DAA4DA,CAAK;AAC/E;AAAA,MACJ;AAAA;AAEA,WAAK,WAAWA;AAEpB,SAAK,QAAA;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,aAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,WAAWA,GAAgB;AAC3B,SAAK,cAAcA,GACnB,KAAK,QAAA;AAAA,EACT;AAAA,EAEA,oBAAoB;AAChB,UAAMC,IAAS,KAAK,aAAa,EAAE,MAAM,QAAQ,GAC3CC,IAAY,SAAS,cAAc,KAAK;AAC9C,IAAAA,EAAU,MAAM,QAAQ,QACxBA,EAAU,MAAM,SAAS,QACzBD,EAAO,YAAYC,CAAS,GAC5B,KAAK,QAAQC,EAAWD,CAAS;AAGjC,UAAME,IAAY,KAAK,aAAa,SAAS;AAC7C,QAAIA,KAAa,CAAC,KAAK;AACnB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAS;AAAA,MACxC,QAAQ;AACJ,gBAAQ,MAAM,wDAAwD;AAAA,MAC1E;AAGJ,SAAK,QAAA;AAAA,EACT;AAAA,EAEA,uBAAuB;AACnB,SAAK,OAAO,QAAA,GACZ,KAAK,QAAQ;AAAA,EACjB;AAAA,EAEA,yBAAyBC,GAAcC,GAAmBC,GAAkB;AACxE,QAAIF,MAAS,aAAaE;AACtB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAQ,GACnC,KAAK,QAAA;AAAA,MACT,QAAQ;AACJ,gBAAQ,MAAM,wDAAwD;AAAA,MAC1E;AAAA,EAER;AAAA,EAYQ,UAAU;AACd,IAAI,CAAC,KAAK,SAAS,CAAC,KAAK,YAEzB,KAAK,MAAM;AAAA,MACPC,EAAcC,GAAoB;AAAA,QAC9B,SAAS,KAAK;AAAA,QACd,YAAY,KAAK;AAAA,QACjB,YAAY,KAAK;AAAA,MAAA,CACpB;AAAA,IAAA;AAAA,EAET;AACJ;AAGK,eAAe,IAAI,sBAAsB,KAC1C,eAAe,OAAO,wBAAwBX,CAAyB;"}
1
+ {"version":3,"file":"web-component.js","sources":["../src/web-component.ts"],"sourcesContent":["import { createElement } from \"react\"\nimport { createRoot, type Root } from \"react-dom/client\"\nimport { GirthManagerWidget } from \"./GirthManagerWidget\"\nimport type { WidgetRequest, WidgetResponse } from \"./types\"\n\n/**\n * Custom Element wrapper for Angular integration.\n *\n * Usage in Angular:\n * // In the component class:\n * async ngAfterViewInit() {\n * const wasm = await import('geo-wasm');\n * await wasm.default();\n * this.widgetEl.nativeElement.wasmModule = wasm;\n * this.widgetEl.nativeElement.request = { spacing_type: 'BK', scan_url: '...' };\n * }\n *\n * // In the template:\n * <girth-manager-widget #widgetEl (widgetComplete)=\"onComplete($event)\"></girth-manager-widget>\n */\nclass GirthManagerWidgetElement extends HTMLElement {\n private _root: Root | null = null\n private _request: WidgetRequest | null = null\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _wasmModule: any = undefined\n\n static get observedAttributes() {\n return [\"request\"]\n }\n\n get request(): WidgetRequest | null {\n return this._request\n }\n\n set request(value: WidgetRequest | string | null) {\n if (typeof value === \"string\") {\n try {\n this._request = JSON.parse(value)\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON for request attribute:\", value)\n return\n }\n } else {\n this._request = value\n }\n this._render()\n }\n\n /** Set the pre-loaded WASM v2 module (geo-wasm). Must be set before or alongside request. */\n get wasmModule() {\n return this._wasmModule\n }\n\n set wasmModule(value: unknown) {\n this._wasmModule = value\n this._render()\n }\n\n connectedCallback() {\n const shadow = this.attachShadow({ mode: \"open\" })\n const container = document.createElement(\"div\")\n container.style.width = \"100%\"\n container.style.height = \"100%\"\n shadow.appendChild(container)\n this._root = createRoot(container)\n\n // Parse request from attribute if set before connection\n const attrValue = this.getAttribute(\"request\")\n if (attrValue && !this._request) {\n try {\n this._request = JSON.parse(attrValue)\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON in request attribute\")\n }\n }\n\n this._render()\n }\n\n disconnectedCallback() {\n this._root?.unmount()\n this._root = null\n }\n\n attributeChangedCallback(name: string, _oldValue: string, newValue: string) {\n if (name === \"request\" && newValue) {\n try {\n this._request = JSON.parse(newValue)\n this._render()\n } catch {\n console.error(\"[GirthManagerWidget] Invalid JSON in request attribute\")\n }\n }\n }\n\n private _handleComplete = (response: WidgetResponse) => {\n this.dispatchEvent(\n new CustomEvent(\"widgetComplete\", {\n detail: response,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n private _render() {\n if (!this._root || !this._request) return\n\n this._root.render(\n createElement(GirthManagerWidget, {\n request: this._request,\n onComplete: this._handleComplete,\n wasmModule: this._wasmModule,\n })\n )\n }\n}\n\n// Register the custom element\nif (!customElements.get(\"girth-manager-widget\")) {\n customElements.define(\"girth-manager-widget\", GirthManagerWidgetElement)\n}\n\nexport { GirthManagerWidgetElement }\nexport type { WidgetRequest, WidgetResponse }\n"],"names":["GirthManagerWidgetElement","response","value","shadow","container","createRoot","attrValue","name","_oldValue","newValue","createElement","GirthManagerWidget"],"mappings":";;;AAoBA,MAAMA,UAAkC,YAAY;AAAA,EAApD,cAAA;AAAA,UAAA,GAAA,SAAA,GACI,KAAQ,QAAqB,MAC7B,KAAQ,WAAiC,MAEzC,KAAQ,cAAmB,QAuE3B,KAAQ,kBAAkB,CAACC,MAA6B;AACpD,WAAK;AAAA,QACD,IAAI,YAAY,kBAAkB;AAAA,UAC9B,QAAQA;AAAA,UACR,SAAS;AAAA,UACT,UAAU;AAAA,QAAA,CACb;AAAA,MAAA;AAAA,IAET;AAAA,EAAA;AAAA,EA7EA,WAAW,qBAAqB;AAC5B,WAAO,CAAC,SAAS;AAAA,EACrB;AAAA,EAEA,IAAI,UAAgC;AAChC,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,QAAQC,GAAsC;AAC9C,QAAI,OAAOA,KAAU;AACjB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAK;AAAA,MACpC,QAAQ;AACJ,gBAAQ,MAAM,4DAA4DA,CAAK;AAC/E;AAAA,MACJ;AAAA;AAEA,WAAK,WAAWA;AAEpB,SAAK,QAAA;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,aAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,WAAWA,GAAgB;AAC3B,SAAK,cAAcA,GACnB,KAAK,QAAA;AAAA,EACT;AAAA,EAEA,oBAAoB;AAChB,UAAMC,IAAS,KAAK,aAAa,EAAE,MAAM,QAAQ,GAC3CC,IAAY,SAAS,cAAc,KAAK;AAC9C,IAAAA,EAAU,MAAM,QAAQ,QACxBA,EAAU,MAAM,SAAS,QACzBD,EAAO,YAAYC,CAAS,GAC5B,KAAK,QAAQC,EAAWD,CAAS;AAGjC,UAAME,IAAY,KAAK,aAAa,SAAS;AAC7C,QAAIA,KAAa,CAAC,KAAK;AACnB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAS;AAAA,MACxC,QAAQ;AACJ,gBAAQ,MAAM,wDAAwD;AAAA,MAC1E;AAGJ,SAAK,QAAA;AAAA,EACT;AAAA,EAEA,uBAAuB;AACnB,SAAK,OAAO,QAAA,GACZ,KAAK,QAAQ;AAAA,EACjB;AAAA,EAEA,yBAAyBC,GAAcC,GAAmBC,GAAkB;AACxE,QAAIF,MAAS,aAAaE;AACtB,UAAI;AACA,aAAK,WAAW,KAAK,MAAMA,CAAQ,GACnC,KAAK,QAAA;AAAA,MACT,QAAQ;AACJ,gBAAQ,MAAM,wDAAwD;AAAA,MAC1E;AAAA,EAER;AAAA,EAYQ,UAAU;AACd,IAAI,CAAC,KAAK,SAAS,CAAC,KAAK,YAEzB,KAAK,MAAM;AAAA,MACPC,EAAcC,GAAoB;AAAA,QAC9B,SAAS,KAAK;AAAA,QACd,YAAY,KAAK;AAAA,QACjB,YAAY,KAAK;AAAA,MAAA,CACpB;AAAA,IAAA;AAAA,EAET;AACJ;AAGK,eAAe,IAAI,sBAAsB,KAC1C,eAAe,OAAO,wBAAwBX,CAAyB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solid-labs/fab-one-widget",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/girth-manager-web-widget/src/index.d.ts",
@@ -23,32 +23,32 @@
23
23
  "preview": "vite preview",
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
- "dependencies": {
27
- "@galileo/girth-manager-ui": "file:../girth-manager-ui",
28
- "galileo-core-geo": "file:../wasm/galileo-core-geo/pkg"
29
- },
26
+ "dependencies": {},
30
27
  "devDependencies": {
28
+ "@galileo/girth-manager-ui": "file:../girth-manager-ui",
29
+ "@radix-ui/react-icons": "^1.3.2",
31
30
  "@react-three/drei": "^10.0.3",
32
31
  "@react-three/fiber": "^9.1.2",
33
32
  "@types/react": "^19.0.10",
34
33
  "@types/react-dom": "^19.0.4",
35
34
  "@types/three": "^0.172.0",
36
35
  "@vitejs/plugin-react": "^5.1.4",
36
+ "geo-wasm": "file:../wasm/galileo-core-geo/pkg",
37
37
  "react": "^19.0.0",
38
38
  "react-dom": "^19.0.0",
39
39
  "three": "^0.172.0",
40
40
  "three-mesh-bvh": "^0.8.3",
41
- "zustand": "^5.0.3",
42
41
  "typescript": "~5.7.0",
43
42
  "vite": "^6.1.0",
43
+ "vite-plugin-top-level-await": "^1.5.0",
44
44
  "vite-plugin-wasm": "^3.4.1",
45
- "vite-plugin-top-level-await": "^1.5.0"
45
+ "zustand": "^5.0.3"
46
46
  },
47
47
  "peerDependencies": {
48
+ "@react-three/drei": ">=10",
49
+ "@react-three/fiber": ">=9",
48
50
  "react": ">=18",
49
51
  "react-dom": ">=18",
50
- "@react-three/fiber": ">=9",
51
- "@react-three/drei": ">=10",
52
52
  "three": ">=0.160.0",
53
53
  "three-mesh-bvh": ">=0.7.0",
54
54
  "zustand": ">=4"