@limrun/ui 0.20.2 → 0.20.4

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,7 +1,7 @@
1
1
  import { jsxs as wr, jsx as Jn } from "react/jsx-runtime";
2
2
  import { useRef as en, useState as cs, useEffect as Ea } from "react";
3
- import { D as Tu, v as Au, w as Cr, y as wu, z as Cu } from "./core-BhHpU_lr.mjs";
4
- import { h as Ru, u as Pu, D as Iu, a as Du, f as Lu } from "./duo-view-tndcvbIi.mjs";
3
+ import { D as Tu, y as Au, z as Cr, B as wu, C as Cu } from "./core-DuukW7sF.mjs";
4
+ import { h as Ru, u as Pu, D as Iu, a as Du, f as Lu } from "./duo-view-CvOd3jDJ.mjs";
5
5
  const To = "183", Nu = 0, ec = 1, Uu = 2, ls = 1, Fu = 2, ir = 3, Xn = 0, Oe = 1, hn = 2, Pn = 0, Li = 1, nc = 2, ic = 3, rc = 4, Ou = 5, ri = 100, Bu = 101, zu = 102, Vu = 103, ku = 104, Gu = 200, Hu = 201, Wu = 202, Xu = 203, Ta = 204, Aa = 205, qu = 206, Yu = 207, Zu = 208, Ju = 209, $u = 210, Ku = 211, ju = 212, Qu = 213, th = 214, wa = 0, Ca = 1, Ra = 2, Ui = 3, Pa = 4, Ia = 5, Da = 6, La = 7, Pl = 0, eh = 1, nh = 2, dn = 0, Il = 1, Dl = 2, Ll = 3, Ao = 4, Nl = 5, Ul = 6, Fl = 7, sc = "attached", ih = "detached", Ol = 300, li = 301, Fi = 302, us = 303, Us = 304, As = 306, Na = 1e3, An = 1001, Ua = 1002, Ce = 1003, rh = 1004, Rr = 1005, ve = 1006, Fs = 1007, oi = 1008, He = 1009, Bl = 1010, zl = 1011, fr = 1012, wo = 1013, mn = 1014, We = 1015, Dn = 1016, Co = 1017, Ro = 1018, dr = 1020, Vl = 35902, kl = 35899, Gl = 1021, Hl = 1022, Xe = 1023, Ln = 1026, ci = 1027, Po = 1028, Io = 1029, Oi = 1030, Do = 1031, Lo = 1033, hs = 33776, fs = 33777, ds = 33778, ps = 33779, Fa = 35840, Oa = 35841, Ba = 35842, za = 35843, Va = 36196, ka = 37492, Ga = 37496, Ha = 37488, Wa = 37489, Xa = 37490, qa = 37491, Ya = 37808, Za = 37809, Ja = 37810, $a = 37811, Ka = 37812, ja = 37813, Qa = 37814, to = 37815, eo = 37816, no = 37817, io = 37818, ro = 37819, so = 37820, ao = 37821, oo = 36492, co = 36494, lo = 36495, uo = 36283, ho = 36284, fo = 36285, po = 36286, gs = 2300, mo = 2301, Os = 2302, ac = 2303, oc = 2400, cc = 2401, lc = 2402, sh = 2500, ah = 0, oh = 1, uc = 2, ch = 3200, Wl = 0, lh = 1, Hn = "", Fe = "srgb", Bi = "srgb-linear", _s = "linear", re = "srgb", mi = 7680, hc = 519, uh = 512, hh = 513, fh = 514, No = 515, dh = 516, ph = 517, Uo = 518, mh = 519, go = 35044, fc = 35048, dc = "300 es", fn = 2e3, pr = 2001;
6
6
  function gh(i) {
7
7
  for (let t = i.length - 1; t >= 0; --t)
@@ -26256,7 +26256,7 @@ function T0(i, t, e) {
26256
26256
  },
26257
26257
  // Imported appearances replace the rigid body while live screens and the hinge remain under our control.
26258
26258
  loadAppearance: async (mt) => {
26259
- const { GLTFLoader: st } = await import("./GLTFLoader-BjfxfJc4.mjs"), { scene: F } = await new st().loadAsync(mt), $ = /* @__PURE__ */ new Set();
26259
+ const { GLTFLoader: st } = await import("./GLTFLoader-BoPozIl8.mjs"), { scene: F } = await new st().loadAsync(mt), $ = /* @__PURE__ */ new Set();
26260
26260
  if (F.traverse((J) => {
26261
26261
  if (J instanceof Ee) {
26262
26262
  $.add(J.geometry);
@@ -26490,6 +26490,7 @@ function C0(i) {
26490
26490
  It && (It.dataset.visible = String(ot.edge === X));
26491
26491
  }
26492
26492
  }, Y = (X) => {
26493
+ if (n.current.watchOnly) return;
26493
26494
  const ot = _(X.target);
26494
26495
  if (ot) return { button: ot.dataset.duoButton };
26495
26496
  const It = P.domElement.getBoundingClientRect();
@@ -26542,13 +26543,13 @@ function C0(i) {
26542
26543
  }, Ft = (X) => {
26543
26544
  J();
26544
26545
  const ot = _(X.target);
26545
- if (!ot || (X.stopPropagation(), X.code !== "Space" && X.code !== "Enter") || (X.preventDefault(), X.repeat)) return;
26546
+ if (!ot || n.current.watchOnly || (X.stopPropagation(), X.code !== "Space" && X.code !== "Enter") || (X.preventDefault(), X.repeat)) return;
26546
26547
  const It = ot.dataset.duoButton;
26547
26548
  Wt.press(It), lt.highlightButton(It, !0), ot.dataset.pressed = "true";
26548
26549
  }, Gt = (X) => {
26549
26550
  J();
26550
26551
  const ot = _(X.target);
26551
- ot && (X.stopPropagation(), !(X.code !== "Space" && X.code !== "Enter") && (X.preventDefault(), Wt.release(), lt.highlightButton(ot.dataset.duoButton), ot.dataset.pressed = "false"));
26552
+ !ot || n.current.watchOnly || (X.stopPropagation(), !(X.code !== "Space" && X.code !== "Enter") && (X.preventDefault(), Wt.release(), lt.highlightButton(ot.dataset.duoButton), ot.dataset.pressed = "false"));
26552
26553
  }, ct = (X) => {
26553
26554
  const ot = _(X.target);
26554
26555
  ot && I(Z?.guides.find((It) => It.button === ot.dataset.duoButton)?.edge);
@@ -26622,6 +26623,7 @@ function C0(i) {
26622
26623
  children: Object.keys(Cr).map((w) => /* @__PURE__ */ Jn(
26623
26624
  "button",
26624
26625
  {
26626
+ disabled: i.watchOnly,
26625
26627
  ref: (P) => {
26626
26628
  P ? e.current.set(w, P) : e.current.delete(w);
26627
26629
  },
@@ -26640,6 +26642,7 @@ function C0(i) {
26640
26642
  /* @__PURE__ */ wr(
26641
26643
  Du,
26642
26644
  {
26645
+ watchOnly: i.watchOnly,
26643
26646
  angle: a,
26644
26647
  onFold: f,
26645
26648
  foldTarget: u,
@@ -26653,6 +26656,7 @@ function C0(i) {
26653
26656
  ["front", "book", "table", "back"].map((w) => /* @__PURE__ */ Jn(
26654
26657
  "button",
26655
26658
  {
26659
+ disabled: i.watchOnly && (w === "book" || w === "table"),
26656
26660
  "aria-pressed": g === w,
26657
26661
  onClick: () => {
26658
26662
  m.current++, x(w), R.current(), w === "book" && i.setOrientation("portrait").then(() => o(110)).catch((P) => s(String(P))), w === "table" && i.setOrientation("landscape-left").then(() => o(110)).catch((P) => s(String(P)));