@codingfactory/messenger-client 0.4.3 → 0.4.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.
package/dist/index.js CHANGED
@@ -7699,19 +7699,19 @@ const du = ["data-testid", "aria-label"], hu = { class: "day-separator__chip" },
7699
7699
  });
7700
7700
  class bu {
7701
7701
  async create(t) {
7702
- const n = document.createElement("div"), i = n;
7703
- if (i.className = `msg-action-sheet-overlay ${t.cssClass ?? ""}`, t.htmlAttributes)
7702
+ const n = document.createElement("div"), i = {};
7703
+ if (n.className = `msg-action-sheet-overlay ${t.cssClass ?? ""}`, t.htmlAttributes)
7704
7704
  for (const [v, C] of Object.entries(t.htmlAttributes))
7705
- i.setAttribute(v, C);
7705
+ n.setAttribute(v, C);
7706
7706
  let o = null;
7707
7707
  const c = new Promise((v) => {
7708
7708
  o = v;
7709
7709
  }), u = async (v) => {
7710
- i.classList.add("msg-action-sheet-overlay--closing"), await new Promise((C) => setTimeout(C, 200)), i.remove(), o && (o({ role: v }), o = null);
7710
+ n.classList.add("msg-action-sheet-overlay--closing"), await new Promise((C) => setTimeout(C, 200)), n.remove(), o && (o({ role: v }), o = null);
7711
7711
  }, p = document.createElement("button");
7712
7712
  p.type = "button", p.className = "msg-action-sheet-backdrop", p.setAttribute("aria-label", "Close"), p.addEventListener("click", () => {
7713
7713
  u("backdrop");
7714
- }), i.appendChild(p);
7714
+ }), n.appendChild(p);
7715
7715
  const h = document.createElement("div");
7716
7716
  if (h.className = "msg-action-sheet", t.header) {
7717
7717
  const v = document.createElement("div");
@@ -7732,23 +7732,23 @@ class bu {
7732
7732
  v.handler && v.handler() === !1 || u(v.role ?? "selected");
7733
7733
  }), T.appendChild(C);
7734
7734
  }
7735
- return h.appendChild(T), i.appendChild(h), n.present = async () => {
7736
- document.body.appendChild(i), requestAnimationFrame(() => i.classList.add("msg-action-sheet-overlay--visible"));
7737
- }, n.dismiss = () => u("dismiss"), n.onDidDismiss = () => c, n.remove = () => i.remove(), n;
7735
+ return h.appendChild(T), n.appendChild(h), i.present = async () => {
7736
+ document.body.appendChild(n), requestAnimationFrame(() => n.classList.add("msg-action-sheet-overlay--visible"));
7737
+ }, i.dismiss = () => u("dismiss"), i.onDidDismiss = () => c, i.remove = () => n.remove(), i;
7738
7738
  }
7739
7739
  }
7740
7740
  const An = new bu();
7741
7741
  class yu {
7742
7742
  async create(t) {
7743
- const n = document.createElement("div"), i = n;
7744
- i.className = `msg-alert-overlay ${t.cssClass ?? ""}`;
7743
+ const n = document.createElement("div"), i = {};
7744
+ n.className = `msg-alert-overlay ${t.cssClass ?? ""}`;
7745
7745
  let o = null;
7746
7746
  const c = new Promise((v) => {
7747
7747
  o = v;
7748
7748
  }), u = async (v) => {
7749
- i.classList.add("msg-alert-overlay--closing"), await new Promise((C) => setTimeout(C, 200)), i.remove(), o && (o({ role: v }), o = null);
7749
+ n.classList.add("msg-alert-overlay--closing"), await new Promise((C) => setTimeout(C, 200)), n.remove(), o && (o({ role: v }), o = null);
7750
7750
  }, p = document.createElement("div");
7751
- p.className = "msg-alert-backdrop", i.appendChild(p);
7751
+ p.className = "msg-alert-backdrop", n.appendChild(p);
7752
7752
  const h = document.createElement("div");
7753
7753
  if (h.className = "msg-alert-card", t.header) {
7754
7754
  const v = document.createElement("h3");
@@ -7769,9 +7769,9 @@ class yu {
7769
7769
  v.handler && v.handler(), u(v.role ?? "selected");
7770
7770
  }), T.appendChild(C);
7771
7771
  }
7772
- return h.appendChild(T), i.appendChild(h), n.present = async () => {
7773
- document.body.appendChild(i), requestAnimationFrame(() => i.classList.add("msg-alert-overlay--visible"));
7774
- }, n.dismiss = () => u("dismiss"), n.onDidDismiss = () => c, n.remove = () => i.remove(), n;
7772
+ return h.appendChild(T), n.appendChild(h), i.present = async () => {
7773
+ document.body.appendChild(n), requestAnimationFrame(() => n.classList.add("msg-alert-overlay--visible"));
7774
+ }, i.dismiss = () => u("dismiss"), i.onDidDismiss = () => c, i.remove = () => n.remove(), i;
7775
7775
  }
7776
7776
  }
7777
7777
  const _u = new yu(), wu = ["data-testid"], Cu = ["data-testid"], ku = ["data-testid", "aria-label", "onClick"], Su = ["src", "alt"], Tu = {
@@ -19,7 +19,7 @@ export interface ActionSheetOptions {
19
19
  cssClass?: string;
20
20
  htmlAttributes?: Record<string, string>;
21
21
  }
22
- export interface ActionSheetOverlay extends HTMLElement {
22
+ export interface ActionSheetOverlay {
23
23
  present: () => Promise<void>;
24
24
  dismiss: () => Promise<void>;
25
25
  onDidDismiss: () => Promise<{
@@ -48,7 +48,7 @@ export interface AlertOptions {
48
48
  buttons: AlertButton[];
49
49
  cssClass?: string;
50
50
  }
51
- export interface AlertOverlay extends HTMLElement {
51
+ export interface AlertOverlay {
52
52
  present: () => Promise<void>;
53
53
  dismiss: () => Promise<void>;
54
54
  onDidDismiss: () => Promise<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfactory/messenger-client",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Shared messaging frontend: UI components, state management, API helpers, and realtime composables.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",