@solid-labs/fab-one-widget 1.0.16 → 1.0.17

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.
@@ -252,7 +252,7 @@ let __tla = (async () => {
252
252
  for (const o of n) (t.length === 0 || t[t.length - 1].distanceTo(o) > r) && t.push(o.clone());
253
253
  return t.length > 2 && t[0].distanceTo(t[t.length - 1]) > r && t.push(t[0].clone()), t;
254
254
  }
255
- function Ge(n) {
255
+ function Xe(n) {
256
256
  let r = 0;
257
257
  for (let t = 0; t < n.length - 1; t++) r += n[t].distanceTo(n[t + 1]);
258
258
  return r;
@@ -290,8 +290,8 @@ let __tla = (async () => {
290
290
  }
291
291
  if (!c.length) return [];
292
292
  if (t) {
293
- c.sort((x, C) => Ge(C) - Ge(x));
294
- const f = Ge(c[0]), u = c.filter((x) => Ge(x) >= f * 0.3);
293
+ c.sort((x, C) => Xe(C) - Xe(x));
294
+ const f = Xe(c[0]), u = c.filter((x) => Xe(x) >= f * 0.3);
295
295
  return u[u.length - 1] ?? c[0];
296
296
  }
297
297
  const a = c.filter((f) => f.length >= 3 && f[0].distanceTo(f[f.length - 1]) < r * 10), e = a.length > 0 ? a : c;
@@ -328,7 +328,7 @@ let __tla = (async () => {
328
328
  });
329
329
  const d = Fn(l, $t, o);
330
330
  if (d.length < 2) return a;
331
- const f = Ge(d);
331
+ const f = Xe(d);
332
332
  let u = -1 / 0, x = new M(0, t, 0);
333
333
  for (const p of d) p.x > u && (u = p.x, x = p.clone());
334
334
  const C = d.length > 2 && d[0].distanceTo(d[d.length - 1]) < $t * 10;
@@ -366,7 +366,7 @@ let __tla = (async () => {
366
366
  }
367
367
  });
368
368
  const m = Fn(c, $t);
369
- return Ge(m);
369
+ return Xe(m);
370
370
  }
371
371
  function Ot(n) {
372
372
  return new bt(n, {
@@ -3279,7 +3279,7 @@ let __tla = (async () => {
3279
3279
  });
3280
3280
  }
3281
3281
  const wr = ({ config: n, spacingType: r, scanUrl: t, formMeasurements: o, onComplete: s, isDebugUser: l = false, onAnalyticsEvent: c, wasmModule: a }) => {
3282
- const [e, m] = W(null), [d, f] = W(0), [u, x] = W(false), [C, p] = W(false), [g, b] = W(""), [P, v] = W("3D"), [S, A] = W(r === "AK" ? 2 : 1), [w, k] = W(false), [h, z] = W(null), [L, _] = W(r ?? null), [D, E] = W("mm"), [V, G] = W(false), [q, be] = W(""), [ae, fe] = W(false), [re, ee] = W(false), [Y, ue] = W(false), [Z, pe] = W(false), [me, he] = W(null), [H, ne] = W(null), [xe, we] = W(null), [ye, oe] = W(false), [N, X] = W([]), [Pe, ke] = W(null), [Ve, ie] = W(null), [Ae, wt] = W(null), [St, jt] = W(null), [Wn, Vt] = W(false), [vt, Nt] = W(null), [Ct, Le] = W(null), [De, Bn] = W(false), [Xt, En] = W(ir), [Te, Gt] = W("obj"), [Se, zt] = W(o), [Ye, Mt] = W(true), [Ne, tt] = W(false), [nt, Yt] = W(false), [ze, ot] = W(false), [Tn, At] = W(false), [Ze, $n] = W(null), [On, Hn] = W(void 0), [jn, Vn] = W(void 0), [Zt] = W("#c8c8c8"), [Nn] = W(1), [We, Xn] = W(false), [kt, Kt] = W([]), rt = le(null), $e = le(null), it = le(false), Gn = le(null), Ft = le(null), Pt = le(null), Ke = Q(async () => {
3282
+ const [e, m] = W(null), [d, f] = W(0), [u, x] = W(false), [C, p] = W(false), [g, b] = W(""), [P, v] = W("3D"), [S, A] = W(r === "AK" ? 2 : 1), [w, k] = W(false), [h, z] = W(null), [L, _] = W(r ?? null), [D, E] = W("mm"), [V, G] = W(false), [q, be] = W(""), [ae, fe] = W(false), [re, ee] = W(false), [Y, ue] = W(false), [Z, pe] = W(false), [me, he] = W(null), [H, ne] = W(null), [xe, we] = W(null), [ye, oe] = W(false), [N, X] = W([]), [Pe, ke] = W(null), [Ve, ie] = W(null), [Ae, wt] = W(null), [St, jt] = W(null), [Wn, Vt] = W(false), [vt, Nt] = W(null), [Ct, Le] = W(null), [De, Bn] = W(false), [Xt, En] = W(ir), [Te, Gt] = W("obj"), [Se, zt] = W(o), [Ge, Mt] = W(true), [Ye, tt] = W(false), [nt, Yt] = W(false), [ze, ot] = W(false), [Tn, At] = W(false), [Ze, $n] = W(null), [On, Hn] = W(void 0), [jn, Vn] = W(void 0), [Zt] = W("#c8c8c8"), [Nn] = W(1), [We, Xn] = W(false), [kt, Kt] = W([]), rt = le(null), $e = le(null), it = le(false), Gn = le(null), Ft = le(null), Pt = le(null), Ke = Q(async () => {
3283
3283
  if (Pt.current) try {
3284
3284
  const y = Pt.current, I = () => {
3285
3285
  const J = y.querySelector("canvas");
@@ -3291,11 +3291,11 @@ let __tla = (async () => {
3291
3291
  const nn = _e;
3292
3292
  if (nn.hasAttribute("data-finalizing-overlay")) return;
3293
3293
  const on = nn.querySelectorAll("div[style*='background']");
3294
- on.length !== 0 && on.forEach((Xe) => {
3294
+ on.length !== 0 && on.forEach((Ne) => {
3295
3295
  var _a;
3296
- const Ie = Xe.getBoundingClientRect();
3296
+ const Ie = Ne.getBoundingClientRect();
3297
3297
  if (Ie.width === 0 || Ie.height === 0) return;
3298
- let Rt = 0, qe = Xe;
3298
+ let Rt = 0, qe = Ne;
3299
3299
  for (; qe && qe !== y; ) {
3300
3300
  const ft = (qe.style.transform || "").match(/rotate\((-?\d+)deg\)/);
3301
3301
  if (ft) {
@@ -3306,15 +3306,15 @@ let __tla = (async () => {
3306
3306
  }
3307
3307
  const rn = (Ie.left + Ie.width / 2 - O.left) * te, sn = (Ie.top + Ie.height / 2 - O.top) * Me, ct = Math.abs(Rt) > 1, ln = (ct ? Ie.height : Ie.width) * te, an = (ct ? Ie.width : Ie.height) * Me;
3308
3308
  se.save(), se.translate(rn, sn), ct && se.rotate(Rt * Math.PI / 180);
3309
- const ro = Xe.style.backgroundColor || "rgba(0,0,0,0.75)";
3309
+ const ro = Ne.style.backgroundColor || "rgba(0,0,0,0.75)";
3310
3310
  se.fillStyle = ro;
3311
3311
  const io = 4 * te;
3312
3312
  se.beginPath(), se.roundRect(-ln / 2, -an / 2, ln, an, io), se.fill();
3313
- const cn = ((_a = Xe.textContent) == null ? void 0 : _a.trim()) || "";
3313
+ const cn = ((_a = Ne.textContent) == null ? void 0 : _a.trim()) || "";
3314
3314
  if (cn) {
3315
- const dt = window.getComputedStyle(Xe), ft = parseFloat(dt.fontSize || "14") * Me;
3315
+ const dt = window.getComputedStyle(Ne), ft = parseFloat(dt.fontSize || "14") * Me;
3316
3316
  se.font = `${dt.fontWeight || "normal"} ${ft}px monospace`, se.fillStyle = dt.color || "#fff", se.textAlign = "center", se.textBaseline = "middle";
3317
- const dn = Xe.querySelectorAll("span");
3317
+ const dn = Ne.querySelectorAll("span");
3318
3318
  dn.length > 0 && !ct ? dn.forEach((Wt) => {
3319
3319
  const et = Wt.getBoundingClientRect();
3320
3320
  if (et.width === 0) return;
@@ -3764,7 +3764,7 @@ let __tla = (async () => {
3764
3764
  }, [
3765
3765
  Se,
3766
3766
  N
3767
- ]), no = nt ? 5 : K && Ne || K ? 4 : e ? T.length === 0 ? 2 : 3 : 1, oo = [
3767
+ ]), no = nt ? 5 : K && Ye || K ? 4 : e ? T.length === 0 ? 2 : 3 : 1, oo = [
3768
3768
  {
3769
3769
  label: "Load File",
3770
3770
  number: 1
@@ -3838,7 +3838,7 @@ let __tla = (async () => {
3838
3838
  minHeight: 0
3839
3839
  },
3840
3840
  children: [
3841
- K && Ne && L && i("div", {
3841
+ K && Ye && L && i("div", {
3842
3842
  style: {
3843
3843
  width: 340,
3844
3844
  flexShrink: 0,
@@ -4298,7 +4298,7 @@ let __tla = (async () => {
4298
4298
  reverseOrder: true,
4299
4299
  displayUnit: D,
4300
4300
  useInnerSurface: Y && !Z,
4301
- formMeasurements: Ne ? On ?? Se : Ye ? Se : void 0,
4301
+ formMeasurements: Ye ? On ?? Se : Ge ? Se : void 0,
4302
4302
  originY: vt ?? R.position.y,
4303
4303
  wasmSlices: Pe
4304
4304
  }),
@@ -4308,7 +4308,7 @@ let __tla = (async () => {
4308
4308
  modelSize: d,
4309
4309
  displayUnit: D,
4310
4310
  bottomY: Y ? B.position.y : void 0,
4311
- formHeight: Ne ? jn : Ye ? Ze == null ? void 0 : Ze.frontalHeight : void 0
4311
+ formHeight: Ye ? jn : Ge ? Ze == null ? void 0 : Ze.frontalHeight : void 0
4312
4312
  }),
4313
4313
  i(Qo, {
4314
4314
  mesh: e,
@@ -4567,9 +4567,9 @@ let __tla = (async () => {
4567
4567
  style: {
4568
4568
  padding: "6px 14px",
4569
4569
  fontSize: 13,
4570
- fontWeight: Ye ? 600 : 400,
4571
- backgroundColor: Ye ? "rgb(12, 67, 173)" : "#fff",
4572
- color: Ye ? "#fff" : "#666",
4570
+ fontWeight: Ge ? 600 : 400,
4571
+ backgroundColor: Ge ? "rgb(12, 67, 173)" : "#fff",
4572
+ color: Ge ? "#fff" : "#666",
4573
4573
  border: "none",
4574
4574
  cursor: "pointer",
4575
4575
  fontFamily: "system-ui, sans-serif"
@@ -4641,27 +4641,127 @@ let __tla = (async () => {
4641
4641
  isDoubleShell: Y,
4642
4642
  onDismiss: () => oe(false)
4643
4643
  }),
4644
- !Ne && s && i("button", {
4645
- disabled: ze,
4646
- onClick: () => At(true),
4644
+ s && F("div", {
4647
4645
  style: {
4648
4646
  position: "absolute",
4649
- bottom: 60,
4650
- left: 16,
4647
+ bottom: 16,
4648
+ right: 16,
4651
4649
  zIndex: 10,
4652
- padding: "6px 16px",
4653
- borderRadius: 4,
4654
- fontSize: 13,
4655
- fontWeight: 500,
4656
- backgroundColor: "#fff",
4657
- border: "1px solid #bdbdbd",
4658
- color: ze ? "#999" : "#666",
4659
- cursor: ze ? "not-allowed" : "pointer",
4660
- fontFamily: "system-ui, sans-serif",
4661
- letterSpacing: "0.4px",
4662
- lineHeight: "36px"
4650
+ display: "flex",
4651
+ gap: 8
4663
4652
  },
4664
- children: "Have Galileo Check My Measurements"
4653
+ children: [
4654
+ i("button", {
4655
+ disabled: ze,
4656
+ onClick: () => At(true),
4657
+ style: {
4658
+ padding: "6px 16px",
4659
+ borderRadius: 4,
4660
+ fontSize: 13,
4661
+ fontWeight: 500,
4662
+ backgroundColor: "#fff",
4663
+ border: "1px solid #bdbdbd",
4664
+ color: ze ? "#999" : "#666",
4665
+ cursor: ze ? "not-allowed" : "pointer",
4666
+ fontFamily: "system-ui, sans-serif",
4667
+ letterSpacing: "0.4px",
4668
+ lineHeight: "36px"
4669
+ },
4670
+ children: "Have Galileo Check My Measurements"
4671
+ }),
4672
+ e && !K && i("button", {
4673
+ disabled: T.length < 2,
4674
+ onClick: Qn,
4675
+ style: {
4676
+ padding: "6px 16px",
4677
+ borderRadius: 4,
4678
+ fontSize: 14,
4679
+ fontWeight: 500,
4680
+ backgroundColor: T.length >= 2 ? "rgb(12, 67, 173)" : "#9e9e9e",
4681
+ border: "none",
4682
+ color: "#fff",
4683
+ cursor: T.length >= 2 ? "pointer" : "not-allowed",
4684
+ fontFamily: "system-ui, sans-serif",
4685
+ letterSpacing: "0.4px",
4686
+ lineHeight: "36px"
4687
+ },
4688
+ children: "Next \xBB"
4689
+ }),
4690
+ K && nt && !Ye && i("button", {
4691
+ onClick: () => tt(true),
4692
+ style: {
4693
+ padding: "6px 16px",
4694
+ borderRadius: 4,
4695
+ fontSize: 14,
4696
+ fontWeight: 500,
4697
+ backgroundColor: "#fff",
4698
+ border: "1px solid #bdbdbd",
4699
+ color: "#333",
4700
+ cursor: "pointer",
4701
+ fontFamily: "system-ui, sans-serif",
4702
+ letterSpacing: "0.4px",
4703
+ lineHeight: "36px"
4704
+ },
4705
+ children: "Edit Measurements"
4706
+ }),
4707
+ K && nt && (to ? i("button", {
4708
+ disabled: ze,
4709
+ onClick: () => Dt("continue"),
4710
+ style: {
4711
+ padding: "6px 16px",
4712
+ borderRadius: 4,
4713
+ fontSize: 14,
4714
+ fontWeight: 500,
4715
+ backgroundColor: ze ? "#9e9e9e" : "rgb(12, 67, 173)",
4716
+ border: "none",
4717
+ color: "#fff",
4718
+ cursor: ze ? "not-allowed" : "pointer",
4719
+ fontFamily: "system-ui, sans-serif",
4720
+ letterSpacing: "0.4px",
4721
+ lineHeight: "36px"
4722
+ },
4723
+ children: "Continue"
4724
+ }) : F(Ee, {
4725
+ children: [
4726
+ i("button", {
4727
+ disabled: ze,
4728
+ onClick: () => Dt("use_form_measurements"),
4729
+ style: {
4730
+ padding: "6px 16px",
4731
+ borderRadius: 4,
4732
+ fontSize: 14,
4733
+ fontWeight: 500,
4734
+ backgroundColor: ze ? "#9e9e9e" : "rgb(12, 67, 173)",
4735
+ border: "none",
4736
+ color: "#fff",
4737
+ cursor: ze ? "not-allowed" : "pointer",
4738
+ fontFamily: "system-ui, sans-serif",
4739
+ letterSpacing: "0.4px",
4740
+ lineHeight: "36px"
4741
+ },
4742
+ children: "Set to Measurements"
4743
+ }),
4744
+ i("button", {
4745
+ disabled: ze,
4746
+ onClick: () => Dt("use_scan"),
4747
+ style: {
4748
+ padding: "6px 16px",
4749
+ borderRadius: 4,
4750
+ fontSize: 14,
4751
+ fontWeight: 500,
4752
+ backgroundColor: ze ? "#e0e0e0" : "#fff",
4753
+ border: "1px solid #bdbdbd",
4754
+ color: ze ? "#999" : "#333",
4755
+ cursor: ze ? "not-allowed" : "pointer",
4756
+ fontFamily: "system-ui, sans-serif",
4757
+ letterSpacing: "0.4px",
4758
+ lineHeight: "36px"
4759
+ },
4760
+ children: "Go With Scan"
4761
+ })
4762
+ ]
4763
+ }))
4764
+ ]
4665
4765
  })
4666
4766
  ]
4667
4767
  })
@@ -4703,120 +4803,6 @@ let __tla = (async () => {
4703
4803
  children: "@keyframes gm-spin { to { transform: rotate(360deg) } }"
4704
4804
  })
4705
4805
  ]
4706
- }),
4707
- F("div", {
4708
- style: {
4709
- padding: "12px 24px",
4710
- backgroundColor: "#fff",
4711
- borderTop: "1px solid #e0e0e0",
4712
- display: "flex",
4713
- alignItems: "flex-start",
4714
- justifyContent: "space-between",
4715
- gap: 8,
4716
- flexShrink: 0
4717
- },
4718
- children: [
4719
- i("div", {}),
4720
- F("div", {
4721
- style: {
4722
- display: "flex",
4723
- gap: 8
4724
- },
4725
- children: [
4726
- e && !K && T.length >= 2 && i("button", {
4727
- onClick: Qn,
4728
- style: {
4729
- padding: "6px 16px",
4730
- borderRadius: 4,
4731
- fontSize: 14,
4732
- fontWeight: 500,
4733
- backgroundColor: "rgb(12, 67, 173)",
4734
- border: "none",
4735
- color: "#fff",
4736
- cursor: "pointer",
4737
- fontFamily: "system-ui, sans-serif",
4738
- letterSpacing: "0.4px",
4739
- lineHeight: "36px"
4740
- },
4741
- children: "Next \xBB"
4742
- }),
4743
- K && nt && !Ne && i("button", {
4744
- onClick: () => tt(true),
4745
- style: {
4746
- padding: "6px 16px",
4747
- borderRadius: 4,
4748
- fontSize: 14,
4749
- fontWeight: 500,
4750
- backgroundColor: "#fff",
4751
- border: "1px solid #bdbdbd",
4752
- color: "#333",
4753
- cursor: "pointer",
4754
- fontFamily: "system-ui, sans-serif",
4755
- letterSpacing: "0.4px",
4756
- lineHeight: "36px"
4757
- },
4758
- children: "Edit Measurements"
4759
- }),
4760
- K && nt && (to ? i("button", {
4761
- disabled: ze,
4762
- onClick: () => Dt("continue"),
4763
- style: {
4764
- padding: "6px 16px",
4765
- borderRadius: 4,
4766
- fontSize: 14,
4767
- fontWeight: 500,
4768
- backgroundColor: ze ? "#9e9e9e" : "rgb(12, 67, 173)",
4769
- border: "none",
4770
- color: "#fff",
4771
- cursor: ze ? "not-allowed" : "pointer",
4772
- fontFamily: "system-ui, sans-serif",
4773
- letterSpacing: "0.4px",
4774
- lineHeight: "36px"
4775
- },
4776
- children: "Continue"
4777
- }) : F(Ee, {
4778
- children: [
4779
- i("button", {
4780
- disabled: ze,
4781
- onClick: () => Dt("use_form_measurements"),
4782
- style: {
4783
- padding: "6px 16px",
4784
- borderRadius: 4,
4785
- fontSize: 14,
4786
- fontWeight: 500,
4787
- backgroundColor: ze ? "#9e9e9e" : "rgb(12, 67, 173)",
4788
- border: "none",
4789
- color: "#fff",
4790
- cursor: ze ? "not-allowed" : "pointer",
4791
- fontFamily: "system-ui, sans-serif",
4792
- letterSpacing: "0.4px",
4793
- lineHeight: "36px"
4794
- },
4795
- children: "Set to Measurements"
4796
- }),
4797
- i("button", {
4798
- disabled: ze,
4799
- onClick: () => Dt("use_scan"),
4800
- style: {
4801
- padding: "6px 16px",
4802
- borderRadius: 4,
4803
- fontSize: 14,
4804
- fontWeight: 500,
4805
- backgroundColor: ze ? "#e0e0e0" : "#fff",
4806
- border: "1px solid #bdbdbd",
4807
- color: ze ? "#999" : "#333",
4808
- cursor: ze ? "not-allowed" : "pointer",
4809
- fontFamily: "system-ui, sans-serif",
4810
- letterSpacing: "0.4px",
4811
- lineHeight: "36px"
4812
- },
4813
- children: "Go With Scan"
4814
- })
4815
- ]
4816
- }))
4817
- ]
4818
- })
4819
- ]
4820
4806
  })
4821
4807
  ]
4822
4808
  }),