@omg-dev/app 0.2.20 → 0.2.22

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,4 +1,4 @@
1
- import { R as c, L as f, A as d } from "./streamdown-response-gONFDL8V.js";
1
+ import { R as c, L as f, A as d } from "./streamdown-response-9boPsbKB.js";
2
2
  import { useContext as p, useState as L, useEffect as N } from "react";
3
3
  import { jsx as x } from "react/jsx-runtime";
4
4
  var A = ({ code: s, language: e, raw: a, className: o, startLine: m, lineNumbers: u, ...g }) => {
@@ -1,4 +1,4 @@
1
- import { w as T, s as U, h as X, c as Y, v as G, S as J, o as k, l as Q, f as M, m as y } from "./streamdown-response-gONFDL8V.js";
1
+ import { w as T, s as U, h as X, c as Y, v as G, S as J, o as k, l as Q, f as M, m as y } from "./streamdown-response-9boPsbKB.js";
2
2
  import v from "./katex-jHfnQmlp.js";
3
3
  function Z(t, e) {
4
4
  return B(t, {}) || { type: "root", children: [] };
package/dist-lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@tanstack/react-router";
4
- import { ac as m, ad as o, ae as s } from "./embedded-fYVkvd7A.js";
4
+ import { ac as m, ad as o, ae as s } from "./embedded-Dg1UH3AQ.js";
5
5
  export {
6
6
  m as OmgAppSurface,
7
7
  o as OmgSettingsSurface,
@@ -0,0 +1,4 @@
1
+ import { p } from "./streamdown-response-9boPsbKB.js";
2
+ export {
3
+ p as Mermaid
4
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as s, Fragment as N } from "react/jsx-runtime";
2
- import { r as H, m as Q, a as re, n as le, o as oe, p as ie, X, A, R as B, q as ce, s as de, u as J, T as ue, v as me, w as he, x as pe, L as fe } from "./embedded-fYVkvd7A.js";
2
+ import { r as H, P as Q, a as re, f as le, g as oe, h as ie, X, A, R as B, i as ce, S as de, j as J, T as ue, k as me, l as he, C as pe, L as fe } from "./embedded-Dg1UH3AQ.js";
3
3
  import { cn as u } from "cnfast";
4
4
  import { useState as a, useRef as L, useEffect as v, useCallback as ge } from "react";
5
5
  function ye({
@@ -13,9 +13,9 @@ function ye({
13
13
  () => T.some((e) => e.status !== "sent") ? "stash" : "sessions"
14
14
  ), [h, Y] = a(T), [o, k] = a(""), [p, Z] = a(""), [i, E] = a("all"), [n, P] = a(S), [l, D] = a(
15
15
  S === "all" && m ? m : []
16
- ), [f, F] = a(S === "all" && m ? m.length : 0), [g, M] = a({ agents: [], projects: [] }), [_, $] = a(!1), [I, G] = a(!1), U = L(null), q = L(l), c = L(0);
16
+ ), [f, F] = a(S === "all" && m ? m.length : 0), [g, M] = a({ agents: [], projects: [] }), [_, $] = a(!1), [I, G] = a(!1), U = L(null), O = L(l), c = L(0);
17
17
  v(() => {
18
- q.current = l;
18
+ O.current = l;
19
19
  }, [l]), v(() => {
20
20
  const e = () => Y(H());
21
21
  return window.addEventListener(Q, e), window.addEventListener("storage", e), () => {
@@ -27,7 +27,7 @@ function ye({
27
27
  }, [o]);
28
28
  const j = ge(
29
29
  (e) => {
30
- const d = e ? ++c.current : c.current, ae = e ? 0 : q.current.length;
30
+ const d = e ? ++c.current : c.current, ae = e ? 0 : O.current.length;
31
31
  e ? $(!0) : G(!0);
32
32
  const x = new URLSearchParams({ limit: String(25), offset: String(ae) });
33
33
  p && x.set("search", p), i !== "all" && x.set("agent", i), n !== "all" && x.set("project", n), re(`/api/sessions/resumable?${x.toString()}`).then((b) => {
@@ -45,9 +45,9 @@ function ye({
45
45
  v(() => {
46
46
  r === "sessions" && j(!0);
47
47
  }, [j, r]);
48
- const C = o.trim().toLowerCase(), O = h.filter(
48
+ const C = o.trim().toLowerCase(), V = h.filter(
49
49
  (e) => C ? `${e.text} ${e.sessionTitle ?? ""} ${e.project ?? ""}`.toLowerCase().includes(C) : !0
50
- ), ee = _ && !l.length, V = i !== "all" || n !== "all" || !!p, te = l.length < f, se = (e) => e === "draft" ? "Draft" : e === "sending" ? "Sending" : e === "failed" ? "Failed" : "Sent";
50
+ ), ee = _ && !l.length, q = i !== "all" || n !== "all" || !!p, te = l.length < f, se = (e) => e === "draft" ? "Draft" : e === "sending" ? "Sending" : e === "failed" ? "Failed" : "Sent";
51
51
  return /* @__PURE__ */ t(
52
52
  le,
53
53
  {
@@ -185,7 +185,7 @@ function ye({
185
185
  ] }) : null
186
186
  ] })
187
187
  ] }),
188
- /* @__PURE__ */ t("div", { className: "min-h-0 max-h-[min(28rem,55dvh)] overflow-y-auto overscroll-contain pt-1", children: r === "stash" ? O.length ? /* @__PURE__ */ t("div", { className: "space-y-0.5", children: O.map((e) => /* @__PURE__ */ s(
188
+ /* @__PURE__ */ t("div", { className: "min-h-0 max-h-[min(28rem,55dvh)] overflow-y-auto overscroll-contain pt-1", children: r === "stash" ? V.length ? /* @__PURE__ */ t("div", { className: "space-y-0.5", children: V.map((e) => /* @__PURE__ */ s(
189
189
  "div",
190
190
  {
191
191
  className: "group flex items-center gap-1 rounded-xl transition hover:bg-muted",
@@ -256,8 +256,8 @@ function ye({
256
256
  ] })
257
257
  ] }, d)) }) : l.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full min-h-48 flex-col items-center justify-center gap-2 px-4 text-center text-sm text-muted-foreground", children: [
258
258
  /* @__PURE__ */ t(B, { className: "size-5" }),
259
- /* @__PURE__ */ t("span", { children: V ? "No sessions match" : "No recent sessions to resume" }),
260
- V ? /* @__PURE__ */ t(
259
+ /* @__PURE__ */ t("span", { children: q ? "No sessions match" : "No recent sessions to resume" }),
260
+ q ? /* @__PURE__ */ t(
261
261
  "button",
262
262
  {
263
263
  type: "button",
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as n, Fragment as $ } from "react/jsx-runtime";
2
- import { a as C, D as T, b as M, c as D, d as S, G as F, e as L, t as R, L as j } from "./embedded-fYVkvd7A.js";
2
+ import { a as C, D as T, b as M, c as D, d as S, G as F, e as L, t as R, L as j } from "./embedded-Dg1UH3AQ.js";
3
3
  import "@base-ui/react/collapsible";
4
4
  import { cn as z } from "cnfast";
5
5
  import { useState as p, useCallback as P, useEffect as U } from "react";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as r, Fragment as me } from "react/jsx-runtime";
2
2
  import { useState as f, useEffect as w, useRef as fe, useContext as $e, useMemo as Te } from "react";
3
- import { y as ve, N as he, O as ze, Q as S, U as ge, V as Se, W as Pe, Y as je, B as Fe, L as pe, u as J, x as Ye, R as Ge, T as Be, Z as Ke, j as be, f as Ue, _ as He, a as L, $ as k, a0 as R, k as _, a1 as W, a2 as Ve, a3 as qe, a4 as Qe, a5 as Xe, P as Je, a6 as We } from "./embedded-fYVkvd7A.js";
4
- import { cn as P } from "cnfast";
3
+ import { y as ve, N as he, O as ze, Q as S, U as ge, V as Se, W as je, Y as Pe, B as Fe, L as pe, j as J, C as Ye, R as Ge, T as Be, Z as Ke, u as be, o as Ue, _ as He, a as L, $ as k, a0 as R, v as _, a1 as W, a2 as Ve, a3 as qe, a4 as Qe, a5 as Xe, m as Je, a6 as We } from "./embedded-Dg1UH3AQ.js";
4
+ import { cn as j } from "cnfast";
5
5
  /**
6
6
  * @license lucide-react v0.577.0 - ISC
7
7
  *
@@ -53,7 +53,7 @@ function Ne(s, i) {
53
53
  })
54
54
  )), i;
55
55
  }
56
- function j(s) {
56
+ function P(s) {
57
57
  return `shipped:${s.id}:${s.rev}`;
58
58
  }
59
59
  function Z(s, i) {
@@ -158,7 +158,7 @@ function mt({
158
158
  w(() => {
159
159
  $(!1);
160
160
  }, [y.length]);
161
- const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ne] = f(!1), [ae, ie] = f(null), [le, oe] = f(null), de = "&kind=html", D = fe(Math.max(S, (b == null ? void 0 : b.items.length) ?? 0)), q = fe(Math.max(ge, (x == null ? void 0 : x.items.length) ?? 0)), ce = $e(Se), Ae = Pe();
161
+ const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ne] = f(!1), [ae, ie] = f(null), [le, oe] = f(null), de = "&kind=html", D = fe(Math.max(S, (b == null ? void 0 : b.items.length) ?? 0)), q = fe(Math.max(ge, (x == null ? void 0 : x.items.length) ?? 0)), ce = $e(Se), Ae = je();
162
162
  w(() => {
163
163
  h === "feed" && I(M(m));
164
164
  }, [m, h]), w(() => {
@@ -277,7 +277,7 @@ function mt({
277
277
  };
278
278
  w(() => {
279
279
  if (!(h !== "feed" || !v))
280
- return je((e) => {
280
+ return Pe((e) => {
281
281
  if (!e.ok) {
282
282
  F((t) => (t === null && se(e.error), t));
283
283
  return;
@@ -307,7 +307,7 @@ function mt({
307
307
  }
308
308
  }, ue = (u == null ? void 0 : u.filter(
309
309
  (e) => Z(A, {
310
- id: j(e),
310
+ id: P(e),
311
311
  ts: e.ts
312
312
  })
313
313
  ).length) ?? 0, Le = Te(() => {
@@ -320,10 +320,10 @@ function mt({
320
320
  return t;
321
321
  }, [u]), Re = (e) => {
322
322
  Z(A, {
323
- id: j(e),
323
+ id: P(e),
324
324
  ts: e.ts
325
325
  }) && I(
326
- nt(m, j(e))
326
+ nt(m, P(e))
327
327
  );
328
328
  }, _e = async () => {
329
329
  if (!B) {
@@ -420,7 +420,7 @@ function mt({
420
420
  disabled: ae === e.id,
421
421
  "aria-label": `Refresh ${e.title || e.caption || e.name}`,
422
422
  className: "flex size-7 items-center justify-center rounded-full text-muted-foreground opacity-100 transition-[color,background-color,transform,opacity] duration-150 hover:bg-foreground/[0.06] hover:text-foreground active:scale-[0.94] disabled:opacity-50 sm:opacity-0 sm:group-hover:opacity-100 sm:focus:opacity-100",
423
- children: /* @__PURE__ */ r(Ge, { className: P("size-3.5", ae === e.id && "animate-spin") })
423
+ children: /* @__PURE__ */ r(Ge, { className: j("size-3.5", ae === e.id && "animate-spin") })
424
424
  }
425
425
  ) : null,
426
426
  /* @__PURE__ */ r(
@@ -468,7 +468,7 @@ function mt({
468
468
  $(!1), ke();
469
469
  },
470
470
  onBlur: () => $(!1),
471
- className: P(
471
+ className: j(
472
472
  "-my-1 rounded-full px-2 py-1 text-[11px] font-medium transition-colors disabled:opacity-50",
473
473
  U ? "bg-destructive/10 text-destructive" : "text-muted-foreground hover:text-foreground"
474
474
  ),
@@ -483,7 +483,7 @@ function mt({
483
483
  /* @__PURE__ */ r("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
484
484
  /* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
485
485
  const d = !!t.sessionId && o.has(t.sessionId), a = Z(A, {
486
- id: j(t),
486
+ id: P(t),
487
487
  ts: t.ts
488
488
  }), n = t.mediaItems.length > 0;
489
489
  return /* @__PURE__ */ l("article", { className: "relative border-b border-border/50 last:border-b-0", children: [
@@ -494,7 +494,7 @@ function mt({
494
494
  onClick: () => {
495
495
  Re(t), t.sessionId && (c ? c(t) : d && s(t.sessionId));
496
496
  },
497
- className: P(
497
+ className: j(
498
498
  "flex w-full items-start gap-2.5 py-2.5 pl-2.5 text-left transition-colors hover:bg-foreground/[0.02]",
499
499
  n ? "pr-[4.75rem]" : "pr-3.5"
500
500
  ),
@@ -502,7 +502,7 @@ function mt({
502
502
  /* @__PURE__ */ r(
503
503
  "span",
504
504
  {
505
- className: P(
505
+ className: j(
506
506
  "mt-3 size-1.5 shrink-0 rounded-full",
507
507
  a && "bg-primary"
508
508
  ),
@@ -7,7 +7,7 @@ import { createPortal as Ju } from "react-dom";
7
7
  import { f as Ur, p as Ka, e as Za, g as Ja, h as Jn, s as Mt, z as eo, i as to, j as no, k as Bd, l as es, w as Fd, b as Hd, c as Ud, m as zd, d as $d } from "./engine-compile-BeZvvx0I.js";
8
8
  import { g as ro } from "./_commonjsHelpers-C6fGbg64.js";
9
9
  import { cn as io } from "cnfast";
10
- import { a7 as jd, l as qd, a8 as Yd } from "./embedded-fYVkvd7A.js";
10
+ import { a7 as jd, x as qd, a8 as Yd } from "./embedded-Dg1UH3AQ.js";
11
11
  const Vd = {
12
12
  classId: "classID",
13
13
  dataType: "datatype",
@@ -18973,7 +18973,7 @@ var Cc = Jt(!1), xk = () => Pe(Cc), Ua = (...e) => rc($l(e)), Ak = (e, t) => {
18973
18973
  for (; t > 0 && e[t - 1] === `
18974
18974
  `; ) t--;
18975
18975
  return e.slice(0, t);
18976
- }, Lk = Zu(() => import("./highlighted-body-OFNGDK62-BoAuuZR4.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), Rk = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, startLine: a, lineNumbers: s, ...u }) => {
18976
+ }, Lk = Zu(() => import("./highlighted-body-OFNGDK62-Bcdmy8xK.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), Rk = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, startLine: a, lineNumbers: s, ...u }) => {
18977
18977
  let o = ee(), l = Ee(() => wk(e), [e]), d = Ee(() => ({ bg: "transparent", fg: "inherit", tokens: l.split(`
18978
18978
  `).map((f) => [{ content: f, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [l]);
18979
18979
  return y(Ic.Provider, { value: { code: e }, children: J(Nk, { isIncomplete: i, language: t, children: [y(Sk, { language: t }), r ? y("div", { className: o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: y("div", { className: o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: r }) }) : null, y(wi, { fallback: y(Ik, { className: n, language: t, lineNumbers: s, result: d, startLine: a, ...u }), children: y(Lk, { className: n, code: l, language: t, lineNumbers: s, raw: d, startLine: a, ...u }) })] }) });
@@ -19315,7 +19315,7 @@ var Cc = Jt(!1), xk = () => Pe(Cc), Ua = (...e) => rc($l(e)), Ak = (e, t) => {
19315
19315
  }, Jk = ({ children: e, className: t, showControls: n, showCopy: r = !0, showDownload: i = !0, showFullscreen: a = !0, ...s }) => {
19316
19316
  let u = ee(), o = n && r, l = n && i, d = n && a, f = o || l || d;
19317
19317
  return J("div", { className: u("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [f ? J("div", { className: u("flex items-center justify-end gap-1"), children: [o ? y(Oc, {}) : null, l ? y(Dc, {}) : null, d ? y(Zk, { showCopy: o, showDownload: l, children: e }) : null] }) : null, y("div", { className: u("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"), children: y("table", { className: u("w-full divide-y divide-border", t), "data-streamdown": "table", ...s, children: e }) })] });
19318
- }, ex = /startLine=(\d+)/, tx = /\bnoLineNumbers\b/, nx = Zu(() => import("./mermaid-GHXKKRXX-Du3eD6Dj.js").then((e) => ({ default: e.Mermaid }))), rx = /language-([^\s]+)/;
19318
+ }, ex = /startLine=(\d+)/, tx = /\bnoLineNumbers\b/, nx = Zu(() => import("./mermaid-GHXKKRXX-sJaUMvbY.js").then((e) => ({ default: e.Mermaid }))), rx = /language-([^\s]+)/;
19319
19319
  function Jr(e, t) {
19320
19320
  if (!(e != null && e.position || t != null && t.position)) return !0;
19321
19321
  if (!(e != null && e.position && t != null && t.position)) return !1;
@@ -20828,7 +20828,7 @@ function w6(e) {
20828
20828
  }
20829
20829
  function L6() {
20830
20830
  return Tr || (Tr = Promise.all([
20831
- import("./index-BnJITiuM.js"),
20831
+ import("./index-uXIZsv3_.js"),
20832
20832
  import("./index-JkCQXUYs.js").then((e) => e.bp)
20833
20833
  ]).then(([e, t]) => {
20834
20834
  Hn = { math: e.math, mermaid: t.mermaid };