@eka-care/medassist-widget 0.1.96-dev.0 → 0.1.97-dev.0

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
- import { c, u as e, l as M, v as w, r as b, s as C, w as z, B as x, t as S, d as $, A as j } from "./medassist-widget.js";
1
+ import { c, u as e, k as M, t as b, p as w, r as C, v as z, B as x, s as S, d as $, A as j } from "./medassist-widget.js";
2
2
  import { C as A } from "./medassist-widget-check-BaHLRs-2.js";
3
3
  import { M as v } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
- import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-C8O7wJqq.js";
4
+ import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-BsLIZftX.js";
5
5
  const B = [
6
6
  ["path", { d: "M10 12h4", key: "a56b0p" }],
7
7
  ["path", { d: "M10 8h4", key: "1sr2af" }],
@@ -97,9 +97,9 @@ function _({
97
97
  const {
98
98
  title: l,
99
99
  tags: o,
100
- icon: h,
100
+ icon: p,
101
101
  img: m,
102
- description: p,
102
+ description: h,
103
103
  banner_text: i,
104
104
  items: u,
105
105
  primary_cta: t,
@@ -113,7 +113,7 @@ function _({
113
113
  return /* @__PURE__ */ e(S, { className: "w-full h-full flex flex-col overflow-hidden rounded-xl border border-black-200 dark:border-white-200 bg-elicitationBg text-card-foreground shadow-none", children: [
114
114
  /* @__PURE__ */ e(M, { className: `flex flex-row items-center justify-between gap-3 p-3 ${g ? "bg-primary/[20%]" : ""}`, children: [
115
115
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
116
- l ? /* @__PURE__ */ e(w, { className: "text-base font-bold leading-tight tracking-tight truncate", children: l }) : null,
116
+ l ? /* @__PURE__ */ e(b, { className: "text-base font-bold leading-tight tracking-tight truncate", children: l }) : null,
117
117
  o ? /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-muted-foreground truncate", children: o }) : null
118
118
  ] }),
119
119
  g ? /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(
@@ -123,10 +123,10 @@ function _({
123
123
  alt: l ?? "profile",
124
124
  className: "h-16 w-16 rounded-full object-cover border-2 border-background"
125
125
  }
126
- ) }) : h ? /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(y, { name: h, size: 24, className: "text-primary" }) }) : null
126
+ ) }) : p ? /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(y, { name: p, size: 24, className: "text-primary" }) }) : null
127
127
  ] }),
128
- /* @__PURE__ */ e(b, { className: "flex-1 space-y-3 pt-3 overflow-hidden", children: [
129
- p ? /* @__PURE__ */ e("div", { className: "text-sm text-foreground leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words", children: /* @__PURE__ */ e(C, { children: p }) }) : null,
128
+ /* @__PURE__ */ e(w, { className: "flex-1 space-y-3 pt-3 overflow-hidden", children: [
129
+ h ? /* @__PURE__ */ e("div", { className: "text-sm text-foreground leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words", children: /* @__PURE__ */ e(C, { children: h }) }) : null,
130
130
  i ? /* @__PURE__ */ e("div", { className: "rounded-full px-4 py-2 text-center text-sm font-semibold bg-primary/15 text-primary truncate", children: i }) : null,
131
131
  u?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col gap-y-1", children: u.map((n, f) => /* @__PURE__ */ e(
132
132
  "div",
@@ -188,18 +188,18 @@ function W({
188
188
  className: l,
189
189
  orientation: o = "vertical"
190
190
  }) {
191
- const [h, m] = $(!1), p = j(!1), i = (a ?? []).filter((t) => !!t?.card_id);
191
+ const [p, m] = $(!1), h = j(!1), i = (a ?? []).filter((t) => !!t?.card_id);
192
192
  if (!i.length)
193
193
  return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground py-2", children: "No options available." });
194
194
  const u = async (t) => {
195
- p.current || (p.current = !0, m(!0), await d?.(t));
195
+ h.current || (h.current = !0, m(!0), await d?.(t));
196
196
  };
197
197
  return o !== "horizontal" ? /* @__PURE__ */ e("div", { className: l ?? "flex flex-col gap-3 mt-3", children: i.map((t) => /* @__PURE__ */ e(
198
198
  _,
199
199
  {
200
200
  card: t,
201
201
  onSelect: u,
202
- disabled: r || h
202
+ disabled: r || p
203
203
  },
204
204
  t.card_id
205
205
  )) }) : /* @__PURE__ */ e(
@@ -211,7 +211,7 @@ function W({
211
211
  {
212
212
  card: i[t],
213
213
  onSelect: u,
214
- disabled: r || h
214
+ disabled: r || p
215
215
  }
216
216
  )
217
217
  }
@@ -1,4 +1,4 @@
1
- import { c as M, d as h, A as L, y as E, u as e, j as p, C as R, T as A, q as z, _ as re, k as ne, l as ie, m as le, n as se, o as oe, p as ce, S as G, r as de, I as me, s as he, B as v, t as pe } from "./medassist-widget.js";
1
+ import { c as M, d as h, A as L, y as E, u as e, i as p, C as R, T as A, q as z, _ as re, j as ne, k as ie, l as le, m as se, n as oe, o as ce, S as G, p as de, I as me, r as he, B as v, s as pe } from "./medassist-widget.js";
2
2
  import { C as ue } from "./medassist-widget-check-BaHLRs-2.js";
3
3
  import { M as K } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
4
  import { C as fe, a as xe } from "./medassist-widget-chevron-right-CKYbGWbY.js";
@@ -1,8 +1,8 @@
1
- import { d as l, A as d, y as N, _ as R, u as r, j as z } from "./medassist-widget.js";
1
+ import { d as l, A as d, y as N, _ as R, u as r, i as z } from "./medassist-widget.js";
2
2
  import { C as A, a as M } from "./medassist-widget-chevron-right-CKYbGWbY.js";
3
3
  const v = 12, T = 0.76, I = 3;
4
4
  function k({ count: s, renderItem: h, className: u }) {
5
- const [n, x] = l(0), [o, m] = l(0), [y, g] = l(() => Math.min(I, s)), b = d(null), f = d(0), p = d(0);
5
+ const [n, x] = l(0), [i, m] = l(0), [y, g] = l(() => Math.min(I, s)), b = d(null), f = d(0), p = d(0);
6
6
  if (N(() => {
7
7
  g((t) => Math.max(t, Math.min(n + 2, s)));
8
8
  }, [n, s]), R(() => {
@@ -12,11 +12,11 @@ function k({ count: s, renderItem: h, className: u }) {
12
12
  const e = new ResizeObserver(([a]) => m(a.contentRect.width));
13
13
  return e.observe(t), () => e.disconnect();
14
14
  }, []), s === 0) return null;
15
- const i = (t) => x(Math.max(0, Math.min(s - 1, t)));
15
+ const o = (t) => x(Math.max(0, Math.min(s - 1, t)));
16
16
  if (s === 1)
17
17
  return /* @__PURE__ */ r("div", { className: u ?? "mt-3", children: h(0, !0) });
18
- const c = o * T, C = (o - c) / 2, w = o > 0 ? C - n * (c + v) : 0;
19
- return /* @__PURE__ */ r("div", { ref: b, className: z("mt-3 w-full", u), children: o > 0 && /* Relative wrapper so buttons sit outside overflow but share the same stacking context */
18
+ const c = i * T, C = (i - c) / 2, w = i > 0 ? C - n * (c + v) : 0;
19
+ return /* @__PURE__ */ r("div", { ref: b, className: z("mt-3 w-full", u), children: i > 0 && /* Relative wrapper so buttons sit outside overflow but share the same stacking context */
20
20
  /* @__PURE__ */ r("div", { className: "relative w-full", children: [
21
21
  /* @__PURE__ */ r(
22
22
  "div",
@@ -27,7 +27,7 @@ function k({ count: s, renderItem: h, className: u }) {
27
27
  },
28
28
  onTouchEnd: (t) => {
29
29
  const e = t.changedTouches[0].clientX - f.current, a = t.changedTouches[0].clientY - p.current;
30
- Math.abs(e) > Math.abs(a) && Math.abs(e) > 50 && i(n + (e < 0 ? 1 : -1));
30
+ Math.abs(e) > Math.abs(a) && Math.abs(e) > 50 && o(n + (e < 0 ? 1 : -1));
31
31
  },
32
32
  children: /* @__PURE__ */ r(
33
33
  "div",
@@ -68,7 +68,7 @@ function k({ count: s, renderItem: h, className: u }) {
68
68
  {
69
69
  type: "button",
70
70
  "aria-label": "Previous",
71
- onClick: () => i(n - 1),
71
+ onClick: () => o(n - 1),
72
72
  className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 h-10 w-10 p-2 flex items-center justify-center rounded-full bg-background/90 shadow-md border border-primary text-primary hover:bg-muted transition-colors",
73
73
  children: /* @__PURE__ */ r(A, { size: 18 })
74
74
  }
@@ -78,7 +78,7 @@ function k({ count: s, renderItem: h, className: u }) {
78
78
  {
79
79
  type: "button",
80
80
  "aria-label": "Next",
81
- onClick: () => i(n + 1),
81
+ onClick: () => o(n + 1),
82
82
  className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 h-10 w-10 p-2 flex items-center justify-center rounded-full bg-background/90 shadow-md border border-primary text-primary hover:bg-muted transition-colors",
83
83
  children: /* @__PURE__ */ r(M, { size: 18 })
84
84
  }
@@ -1,4 +1,4 @@
1
- import { c as m, A as u, u as e, t as h, r as f, S as p, B as g } from "./medassist-widget.js";
1
+ import { c as m, A as u, u as e, s as h, p as f, S as p, B as g } from "./medassist-widget.js";
2
2
  const x = [
3
3
  [
4
4
  "path",
@@ -32,7 +32,7 @@ async function k(a) {
32
32
  t.href = o.toDataURL("image/png"), t.download = `screenshot-${Date.now()}.png`, t.click();
33
33
  }
34
34
  function _({ card: a }) {
35
- const { title: n, description: o, tags_text: t, banner_text: l, action: c, link: r } = a, s = u(null), d = r && !i(r);
35
+ const { title: n, description: o, tags_text: t, banner_text: l, action: r, link: c } = a, s = u(null), d = c && !i(c);
36
36
  return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: [
37
37
  /* @__PURE__ */ e(
38
38
  h,
@@ -49,7 +49,7 @@ function _({ card: a }) {
49
49
  d && /* @__PURE__ */ e("div", { className: "shrink-0 h-24 w-24 rounded-lg overflow-hidden border border-border", children: /* @__PURE__ */ e(
50
50
  "img",
51
51
  {
52
- src: r,
52
+ src: c,
53
53
  alt: n ?? "media",
54
54
  className: "h-full w-full object-cover"
55
55
  }
@@ -62,7 +62,7 @@ function _({ card: a }) {
62
62
  ] })
63
63
  }
64
64
  ),
65
- c && /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e(
65
+ r && /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e(
66
66
  g,
67
67
  {
68
68
  type: "button",
@@ -70,11 +70,11 @@ function _({ card: a }) {
70
70
  size: "sm",
71
71
  className: "rounded-md px-5 gap-1.5",
72
72
  onClick: () => {
73
- c === "screenshot" ? k(s) : c === "download" && (r && i(r) ? v(r) : N(s));
73
+ r === "screenshot" ? k(s) : r === "download" && (c && i(c) ? v(c) : N(s));
74
74
  },
75
75
  children: [
76
- c === "screenshot" ? /* @__PURE__ */ e(w, { className: "h-4 w-4" }) : /* @__PURE__ */ e(y, { className: "h-4 w-4" }),
77
- c === "screenshot" ? "Screenshot" : "Download"
76
+ r === "screenshot" ? /* @__PURE__ */ e(w, { className: "h-4 w-4" }) : /* @__PURE__ */ e(y, { className: "h-4 w-4" }),
77
+ r === "screenshot" ? "Screenshot" : "Download"
78
78
  ]
79
79
  }
80
80
  ) })
@@ -1,6 +1,6 @@
1
- import { A as x, y as E, q as W, d as _, R as X, b as O, T as Y, D as y, e as J, u as l, f as S, g as Q, S as D, h as T, i as M, j as N } from "./medassist-widget.js";
1
+ import { A as x, y as E, q as X, d as _, R as j, b as O, T as Y, D as y, e as J, u as l, P as S, f as Q, S as D, g as T, h as M, i as N } from "./medassist-widget.js";
2
2
  import { C as Z } from "./medassist-widget-check-BaHLRs-2.js";
3
- var V = X[" useInsertionEffect ".trim().toString()] || O;
3
+ var V = j[" useInsertionEffect ".trim().toString()] || O;
4
4
  function ee({
5
5
  prop: e,
6
6
  defaultProp: r,
@@ -22,7 +22,7 @@ function ee({
22
22
  b.current = d;
23
23
  }, [d, a]);
24
24
  }
25
- const v = W(
25
+ const v = X(
26
26
  (b) => {
27
27
  if (d) {
28
28
  const h = te(b) ? b(e) : b;
@@ -74,7 +74,7 @@ function oe(e) {
74
74
  c(void 0);
75
75
  }, [e]), r;
76
76
  }
77
- var w = "Checkbox", [ce] = J(w), [se, z] = ce(w);
77
+ var P = "Checkbox", [ce] = J(P), [se, z] = ce(P);
78
78
  function ie(e) {
79
79
  const {
80
80
  __scopeCheckbox: r,
@@ -93,11 +93,11 @@ function ie(e) {
93
93
  prop: c,
94
94
  defaultProp: s ?? !1,
95
95
  onChange: t,
96
- caller: w
97
- }), [C, n] = _(null), [m, u] = _(null), f = x(!1), I = C ? !!i || !!C.closest("form") : (
96
+ caller: P
97
+ }), [C, n] = _(null), [m, u] = _(null), f = x(!1), w = C ? !!i || !!C.closest("form") : (
98
98
  // We set this to true by default so that events bubble to forms without JS (SSR)
99
99
  !0
100
- ), P = {
100
+ ), I = {
101
101
  checked: p,
102
102
  disabled: o,
103
103
  setChecked: g,
@@ -109,7 +109,7 @@ function ie(e) {
109
109
  hasConsumerStoppedPropagationRef: f,
110
110
  required: v,
111
111
  defaultChecked: k(s) ? !1 : s,
112
- isFormControl: I,
112
+ isFormControl: w,
113
113
  bubbleInput: m,
114
114
  setBubbleInput: u
115
115
  };
@@ -117,8 +117,8 @@ function ie(e) {
117
117
  se,
118
118
  {
119
119
  scope: r,
120
- ...P,
121
- children: ae(h) ? h(P) : a
120
+ ...I,
121
+ children: ae(h) ? h(I) : a
122
122
  }
123
123
  );
124
124
  }
@@ -212,7 +212,7 @@ var A = y(
212
212
  );
213
213
  }
214
214
  );
215
- A.displayName = w;
215
+ A.displayName = P;
216
216
  var F = "CheckboxIndicator", H = y(
217
217
  (e, r) => {
218
218
  const { __scopeCheckbox: c, forceMount: a, ...s } = e, o = z(F, c);
@@ -253,13 +253,13 @@ var L = "CheckboxBubbleInput", U = y(
253
253
  E(() => {
254
254
  const f = p;
255
255
  if (!f) return;
256
- const I = window.HTMLInputElement.prototype, B = Object.getOwnPropertyDescriptor(
257
- I,
256
+ const w = window.HTMLInputElement.prototype, B = Object.getOwnPropertyDescriptor(
257
+ w,
258
258
  "checked"
259
- ).set, j = !s.current;
259
+ ).set, K = !s.current;
260
260
  if (n !== o && B) {
261
- const K = new Event("click", { bubbles: j });
262
- f.indeterminate = k(o), B.call(f, k(o) ? !1 : o), f.dispatchEvent(K);
261
+ const W = new Event("click", { bubbles: K });
262
+ f.indeterminate = k(o), B.call(f, k(o) ? !1 : o), f.dispatchEvent(W);
263
263
  }
264
264
  }, [p, n, o, s]);
265
265
  const u = x(k(o) ? !1 : o);