@omg-dev/app 0.1.320 → 0.1.321

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-Cdv4gnNZ.js";
1
+ import { R as c, L as f, A as d } from "./streamdown-response-Cl86mmV7.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-Cdv4gnNZ.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-Cl86mmV7.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,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { aj as p, ak as m, al as o } from "./embedded-DdwkOHs-.js";
3
+ import { af as p, ag as m, ah as o } from "./embedded-Bk0VM5g-.js";
4
4
  export {
5
5
  p as OmgAppSurface,
6
6
  m as OmgSettingsSurface,
@@ -0,0 +1,4 @@
1
+ import { p } from "./streamdown-response-Cl86mmV7.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, n as Q, a as le, o as re, p as oe, q as ie, X, A, g as u, R as B, s as ce, u as de, v as J, T as ue, w as me, x as he, y as pe, L as fe } from "./embedded-DdwkOHs-.js";
2
+ import { r as H, P as Q, a as le, g as re, h as oe, i as ie, X, A, f as u, R as B, j as ce, S as de, k as J, T as ue, l as me, m as he, C as pe, L as fe } from "./embedded-Bk0VM5g-.js";
3
3
  import { useState as a, useRef as L, useEffect as v, useCallback as ge } from "react";
4
4
  function we({
5
5
  initial: m,
@@ -12,9 +12,9 @@ function we({
12
12
  () => T.some((e) => e.status !== "sent") ? "stash" : "sessions"
13
13
  ), [h, Y] = a(T), [o, k] = a(""), [p, Z] = a(""), [i, E] = a("all"), [n, P] = a(S), [r, D] = a(
14
14
  S === "all" && m ? m : []
15
- ), [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(r), c = L(0);
15
+ ), [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(r), c = L(0);
16
16
  v(() => {
17
- q.current = r;
17
+ O.current = r;
18
18
  }, [r]), v(() => {
19
19
  const e = () => Y(H());
20
20
  return window.addEventListener(Q, e), window.addEventListener("storage", e), () => {
@@ -26,7 +26,7 @@ function we({
26
26
  }, [o]);
27
27
  const j = ge(
28
28
  (e) => {
29
- const d = e ? ++c.current : c.current, ae = e ? 0 : q.current.length;
29
+ const d = e ? ++c.current : c.current, ae = e ? 0 : O.current.length;
30
30
  e ? $(!0) : G(!0);
31
31
  const x = new URLSearchParams({ limit: String(25), offset: String(ae) });
32
32
  p && x.set("search", p), i !== "all" && x.set("agent", i), n !== "all" && x.set("project", n), le(`/api/sessions/resumable?${x.toString()}`).then((b) => {
@@ -44,9 +44,9 @@ function we({
44
44
  v(() => {
45
45
  l === "sessions" && j(!0);
46
46
  }, [j, l]);
47
- const C = o.trim().toLowerCase(), O = h.filter(
47
+ const C = o.trim().toLowerCase(), V = h.filter(
48
48
  (e) => C ? `${e.text} ${e.sessionTitle ?? ""} ${e.project ?? ""}`.toLowerCase().includes(C) : !0
49
- ), ee = _ && !r.length, V = i !== "all" || n !== "all" || !!p, te = r.length < f, se = (e) => e === "draft" ? "Draft" : e === "sending" ? "Sending" : e === "failed" ? "Failed" : "Sent";
49
+ ), ee = _ && !r.length, q = i !== "all" || n !== "all" || !!p, te = r.length < f, se = (e) => e === "draft" ? "Draft" : e === "sending" ? "Sending" : e === "failed" ? "Failed" : "Sent";
50
50
  return /* @__PURE__ */ t(
51
51
  re,
52
52
  {
@@ -184,7 +184,7 @@ function we({
184
184
  ] }) : null
185
185
  ] })
186
186
  ] }),
187
- /* @__PURE__ */ t("div", { className: "min-h-0 max-h-[min(28rem,55dvh)] overflow-y-auto overscroll-contain pt-1", children: l === "stash" ? O.length ? /* @__PURE__ */ t("div", { className: "space-y-0.5", children: O.map((e) => /* @__PURE__ */ s(
187
+ /* @__PURE__ */ t("div", { className: "min-h-0 max-h-[min(28rem,55dvh)] overflow-y-auto overscroll-contain pt-1", children: l === "stash" ? V.length ? /* @__PURE__ */ t("div", { className: "space-y-0.5", children: V.map((e) => /* @__PURE__ */ s(
188
188
  "div",
189
189
  {
190
190
  className: "group flex items-center gap-1 rounded-xl transition hover:bg-muted",
@@ -255,8 +255,8 @@ function we({
255
255
  ] })
256
256
  ] }, d)) }) : r.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: [
257
257
  /* @__PURE__ */ t(B, { className: "size-5" }),
258
- /* @__PURE__ */ t("span", { children: V ? "No sessions match" : "No recent sessions to resume" }),
259
- V ? /* @__PURE__ */ t(
258
+ /* @__PURE__ */ t("span", { children: q ? "No sessions match" : "No recent sessions to resume" }),
259
+ q ? /* @__PURE__ */ t(
260
260
  "button",
261
261
  {
262
262
  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, d as D, e as S, G as F, f as L, t as R, L as j, g as z } from "./embedded-DdwkOHs-.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, f as z } from "./embedded-Bk0VM5g-.js";
3
3
  import { useState as g, useCallback as P, useEffect as U } from "react";
4
4
  function u({
5
5
  title: r,
@@ -1,6 +1,6 @@
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 { c as ve, Q as he, U as ze, V as S, W as ge, Y as Se, Z as Pe, _ as je, B as Fe, L as pe, v as J, y as Ye, R as Ge, g as P, T as Be, $ as Ke, h as be, i as Ue, a0 as He, a as L, a1 as k, a2 as R, m as _, a3 as W, a4 as Ve, a5 as qe, a6 as Qe, a7 as Xe, P as Je, a8 as We } from "./embedded-DdwkOHs-.js";
3
+ import { F as ve, Q as he, U as ze, V as S, W as ge, Y as Se, Z as Fe, _ as Pe, B as je, L as pe, k as J, C as Ye, R as Ge, f as F, T as Be, $ as Ke, v as be, w as Ue, a0 as He, a as L, a1 as k, a2 as R, E as _, a3 as W, a4 as Ve, a5 as qe, a6 as Qe, a7 as Xe, s as Je, a8 as We } from "./embedded-Bk0VM5g-.js";
4
4
  /**
5
5
  * @license lucide-react v0.577.0 - ISC
6
6
  *
@@ -52,7 +52,7 @@ function Ne(s, i) {
52
52
  })
53
53
  )), i;
54
54
  }
55
- function j(s) {
55
+ function P(s) {
56
56
  return `shipped:${s.id}:${s.rev}`;
57
57
  }
58
58
  function Z(s, i) {
@@ -151,13 +151,13 @@ function ut({
151
151
  artifactsOnly: p = !1,
152
152
  active: v = !0
153
153
  }) {
154
- const h = p ? "artifacts" : "feed", b = p ? he(R) : null, x = p ? null : he(W), [u, F] = f(() => (x == null ? void 0 : x.items) ?? null), [Y, ee] = f(() => (x == null ? void 0 : x.total) ?? 0), [G, te] = f(!1), [A, I] = f(
154
+ const h = p ? "artifacts" : "feed", b = p ? he(R) : null, x = p ? null : he(W), [u, j] = f(() => (x == null ? void 0 : x.items) ?? null), [Y, ee] = f(() => (x == null ? void 0 : x.total) ?? 0), [G, te] = f(!1), [A, I] = f(
155
155
  () => p ? null : M(m)
156
156
  ), [B, re] = f(!1), [K, se] = f(null), { questions: y, busy: we, dismissAll: ke } = ze(), [U, $] = f(!1);
157
157
  w(() => {
158
158
  $(!1);
159
159
  }, [y.length]);
160
- const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ae] = f(!1), [ne, 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();
160
+ const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ae] = f(!1), [ne, 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 = Fe();
161
161
  w(() => {
162
162
  h === "feed" && I(M(m));
163
163
  }, [m, h]), w(() => {
@@ -276,12 +276,12 @@ function ut({
276
276
  };
277
277
  w(() => {
278
278
  if (!(h !== "feed" || !v))
279
- return je((e) => {
279
+ return Pe((e) => {
280
280
  if (!e.ok) {
281
- F((t) => (t === null && se(e.error), t));
281
+ j((t) => (t === null && se(e.error), t));
282
282
  return;
283
283
  }
284
- F((t) => {
284
+ j((t) => {
285
285
  const d = new Set(e.posts.map((g) => g.id)), n = (t ?? []).filter((g) => !d.has(g.id)), a = [...e.posts, ...n];
286
286
  return q.current = Math.max(We, a.length), k(W, a, e.total), a;
287
287
  }), ee(e.total), se(null);
@@ -295,7 +295,7 @@ function ut({
295
295
  `/api/shipped?limit=${ge}&offset=${q.current}`,
296
296
  { cache: "no-store" }
297
297
  );
298
- F((t) => {
298
+ j((t) => {
299
299
  const d = new Set((t ?? []).map((a) => a.id)), n = [...t ?? [], ...e.posts.filter((a) => !d.has(a.id))];
300
300
  return q.current = n.length, k(W, n, e.total ?? Y), n;
301
301
  }), ee((t) => e.total ?? t);
@@ -306,7 +306,7 @@ function ut({
306
306
  }
307
307
  }, ue = (u == null ? void 0 : u.filter(
308
308
  (e) => Z(A, {
309
- id: j(e),
309
+ id: P(e),
310
310
  ts: e.ts
311
311
  })
312
312
  ).length) ?? 0, Le = Te(() => {
@@ -319,10 +319,10 @@ function ut({
319
319
  return t;
320
320
  }, [u]), Re = (e) => {
321
321
  Z(A, {
322
- id: j(e),
322
+ id: P(e),
323
323
  ts: e.ts
324
324
  }) && I(
325
- at(m, j(e))
325
+ at(m, P(e))
326
326
  );
327
327
  }, _e = async () => {
328
328
  if (!B) {
@@ -345,7 +345,7 @@ function ut({
345
345
  // Icon only. It is a rare, undoable housekeeping action — it does not
346
346
  // need to be the second-loudest thing on the page.
347
347
  /* @__PURE__ */ r(
348
- Fe,
348
+ je,
349
349
  {
350
350
  size: "icon-sm",
351
351
  variant: "ghost",
@@ -419,7 +419,7 @@ function ut({
419
419
  disabled: ne === e.id,
420
420
  "aria-label": `Refresh ${e.title || e.caption || e.name}`,
421
421
  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",
422
- children: /* @__PURE__ */ r(Ge, { className: P("size-3.5", ne === e.id && "animate-spin") })
422
+ children: /* @__PURE__ */ r(Ge, { className: F("size-3.5", ne === e.id && "animate-spin") })
423
423
  }
424
424
  ) : null,
425
425
  /* @__PURE__ */ r(
@@ -467,7 +467,7 @@ function ut({
467
467
  $(!1), ke();
468
468
  },
469
469
  onBlur: () => $(!1),
470
- className: P(
470
+ className: F(
471
471
  "-my-1 rounded-full px-2 py-1 text-[11px] font-medium transition-colors disabled:opacity-50",
472
472
  U ? "bg-destructive/10 text-destructive" : "text-muted-foreground hover:text-foreground"
473
473
  ),
@@ -482,7 +482,7 @@ function ut({
482
482
  /* @__PURE__ */ r("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
483
483
  /* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
484
484
  const d = !!t.sessionId && o.has(t.sessionId), n = Z(A, {
485
- id: j(t),
485
+ id: P(t),
486
486
  ts: t.ts
487
487
  }), a = t.mediaItems.length > 0;
488
488
  return /* @__PURE__ */ l("article", { className: "relative border-b border-border/50 last:border-b-0", children: [
@@ -493,7 +493,7 @@ function ut({
493
493
  onClick: () => {
494
494
  Re(t), t.sessionId && (c ? c(t) : d && s(t.sessionId));
495
495
  },
496
- className: P(
496
+ className: F(
497
497
  "flex w-full items-start gap-2.5 py-2.5 pl-2.5 text-left transition-colors hover:bg-foreground/[0.02]",
498
498
  a ? "pr-[4.75rem]" : "pr-3.5"
499
499
  ),
@@ -501,7 +501,7 @@ function ut({
501
501
  /* @__PURE__ */ r(
502
502
  "span",
503
503
  {
504
- className: P(
504
+ className: F(
505
505
  "mt-3 size-1.5 shrink-0 rounded-full",
506
506
  n && "bg-primary"
507
507
  ),
@@ -3,7 +3,7 @@ var Od = (e, t, n) => t in e ? Rd(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var le = (e, t, n) => Od(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as y, jsxs as J, Fragment as _t } from "react/jsx-runtime";
5
5
  import { memo as he, useId as Dd, useTransition as Pd, useMemo as Ee, useRef as Re, useEffect as De, useState as ge, createElement as Xa, isValidElement as Vt, cloneElement as Md, useContext as Pe, createContext as Jt, useCallback as ze, Suspense as wi, lazy as Zu } from "react";
6
- import { ai as Ju, g as eo, a9 as vd, C as Bd, aa as Fd } from "./embedded-DdwkOHs-.js";
6
+ import { ae as Ju, f as eo, a9 as vd, q as Bd, aa as Fd } from "./embedded-Bk0VM5g-.js";
7
7
  import { createPortal as to } from "react-dom";
8
8
  import { f as Ur, p as Ka, e as Za, g as Ja, h as Jn, s as Mt, z as no, i as ro, j as io, k as Hd, l as es, w as Ud, b as zd, c as $d, m as jd, d as qd } from "./engine-compile-BeZvvx0I.js";
9
9
  import { g as ao } from "./_commonjsHelpers-C6fGbg64.js";
@@ -18959,7 +18959,7 @@ var yc = Jt(!1), kk = () => Pe(yc), Ua = (...e) => nc(Ju(e)), xk = (e, t) => {
18959
18959
  for (; t > 0 && e[t - 1] === `
18960
18960
  `; ) t--;
18961
18961
  return e.slice(0, t);
18962
- }, wk = Zu(() => import("./highlighted-body-OFNGDK62-AWF1mqgj.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), Lk = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, startLine: a, lineNumbers: s, ...u }) => {
18962
+ }, wk = Zu(() => import("./highlighted-body-OFNGDK62-COtrDCHk.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), Lk = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, startLine: a, lineNumbers: s, ...u }) => {
18963
18963
  let o = ee(), l = Ee(() => Sk(e), [e]), d = Ee(() => ({ bg: "transparent", fg: "inherit", tokens: l.split(`
18964
18964
  `).map((f) => [{ content: f, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [l]);
18965
18965
  return y(Cc.Provider, { value: { code: e }, children: J(Ik, { isIncomplete: i, language: t, children: [y(Nk, { 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(Ck, { className: n, language: t, lineNumbers: s, result: d, startLine: a, ...u }), children: y(wk, { className: n, code: l, language: t, lineNumbers: s, raw: d, startLine: a, ...u }) })] }) });
@@ -19301,7 +19301,7 @@ var yc = Jt(!1), kk = () => Pe(yc), Ua = (...e) => nc(Ju(e)), xk = (e, t) => {
19301
19301
  }, Zk = ({ children: e, className: t, showControls: n, showCopy: r = !0, showDownload: i = !0, showFullscreen: a = !0, ...s }) => {
19302
19302
  let u = ee(), o = n && r, l = n && i, d = n && a, f = o || l || d;
19303
19303
  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(Rc, {}) : null, l ? y(Oc, {}) : null, d ? y(Kk, { 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 }) })] });
19304
- }, Jk = /startLine=(\d+)/, ex = /\bnoLineNumbers\b/, tx = Zu(() => import("./mermaid-GHXKKRXX-gvTkauyO.js").then((e) => ({ default: e.Mermaid }))), nx = /language-([^\s]+)/;
19304
+ }, Jk = /startLine=(\d+)/, ex = /\bnoLineNumbers\b/, tx = Zu(() => import("./mermaid-GHXKKRXX-BuF4Syv9.js").then((e) => ({ default: e.Mermaid }))), nx = /language-([^\s]+)/;
19305
19305
  function Jr(e, t) {
19306
19306
  if (!(e != null && e.position || t != null && t.position)) return !0;
19307
19307
  if (!(e != null && e.position && t != null && t.position)) return !1;
@@ -20814,7 +20814,7 @@ function S6(e) {
20814
20814
  }
20815
20815
  function w6() {
20816
20816
  return Tr || (Tr = Promise.all([
20817
- import("./index-BydyhpZP.js"),
20817
+ import("./index-Cecrqg2T.js"),
20818
20818
  import("./index-JkCQXUYs.js").then((e) => e.bp)
20819
20819
  ]).then(([e, t]) => {
20820
20820
  Hn = { math: e.math, mermaid: t.mermaid };