@omg-dev/app 0.6.68 → 0.6.70

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,6 +1,6 @@
1
1
  import { jsxs as o, jsx as r, Fragment as ce } from "react/jsx-runtime";
2
2
  import { useState as f, useEffect as v, useRef as ue, useContext as Le, useMemo as Me } from "react";
3
- import { y as _e, E as me, F as $e, H as L, I as fe, J as Se, N as Pe, O as je, B as Fe, L as he, Q as Ge, j as Q, C as Ye, R as Be, T as Ke, U as Ue, u as pe, p as He, V as Ve, a as C, W as N, Y as D, v as z, Z as X, _ as Je, $ as Qe, a0 as Xe, a1 as qe, a2 as Oe, m as We, a3 as Ze } from "./embedded-DoqmW6eM.js";
3
+ import { z as _e, O as me, E as $e, Q as L, U as fe, V as Se, W as Pe, F as je, B as Fe, L as he, H as Ge, j as Q, m as Ye, R as Be, T as Ke, Y as Ue, v as pe, q as He, Z as Ve, a as z, _ as N, $ as C, w as D, a0 as X, a1 as qe, a2 as Qe, a3 as Xe, a4 as Je, a5 as Oe, n as We, a6 as Ze } from "./embedded-Dw2pU919.js";
4
4
  import { cn as M } from "cnfast";
5
5
  /**
6
6
  * @license lucide-react v0.577.0 - ISC
@@ -46,7 +46,7 @@ function xe(n, i) {
46
46
  function _(n) {
47
47
  return `shipped:${n.id}:${n.rev}`;
48
48
  }
49
- function q(n, i) {
49
+ function J(n, i) {
50
50
  return n ? i.ts > n.through && !n.ids.includes(i.id) : !1;
51
51
  }
52
52
  function nt(n, i) {
@@ -111,7 +111,7 @@ function it({
111
111
  // Deliberately an icon, not a live preview. A document scaled into a
112
112
  // 52px box is two words of giant text — unreadable, and it costs a
113
113
  // fetch + parse per row. The Artifacts page is where previews belong.
114
- /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ r(qe, { className: "size-4" }) })
114
+ /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ r(Je, { className: "size-4" }) })
115
115
  ) : l.kind === "file" ? /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-muted text-muted-foreground", children: /* @__PURE__ */ r(Oe, { className: "size-4" }) }) : /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-black/80 text-white/80", children: /* @__PURE__ */ r(We, { className: "size-4" }) }),
116
116
  u > 0 ? /* @__PURE__ */ o("span", { className: "absolute inset-x-0 bottom-0 bg-black/55 py-0.5 text-center text-[9px] font-semibold text-white", children: [
117
117
  "+",
@@ -144,7 +144,7 @@ function mt({
144
144
  artifactsOnly: p = !1,
145
145
  active: g = !0
146
146
  }) {
147
- const h = p ? "artifacts" : "feed", $ = p ? me(D) : null, S = p ? null : me(X), [m, P] = f(() => S?.items ?? null), [j, W] = f(() => S?.total ?? 0), [F, Z] = f(!1), [w, k] = f(
147
+ const h = p ? "artifacts" : "feed", $ = p ? me(C) : null, S = p ? null : me(X), [m, P] = f(() => S?.items ?? null), [j, W] = f(() => S?.total ?? 0), [F, Z] = f(!1), [w, k] = f(
148
148
  () => p ? null : R(u)
149
149
  ), [G, ee] = f(!1), [Y, te] = f(null), { questions: b, busy: ye, dismissAll: ve } = $e(), [B, T] = f(!1);
150
150
  v(() => {
@@ -168,15 +168,15 @@ function mt({
168
168
  let e = !0;
169
169
  const t = async () => {
170
170
  try {
171
- const a = await C(
171
+ const a = await z(
172
172
  `/api/artifacts?limit=${L}${le}`,
173
173
  { cache: "no-store" }
174
174
  );
175
175
  if (!e) return;
176
176
  const s = Array.isArray(a.artifacts) ? a.artifacts : [], x = a.total ?? s.length;
177
- A((ze) => {
178
- const Re = new Set(s.map((J) => J.id)), Te = (ze ?? []).filter((J) => !Re.has(J.id)), V = [...s, ...Te];
179
- return I.current = Math.max(L, V.length), N(D, V, x), V;
177
+ A((De) => {
178
+ const Re = new Set(s.map((q) => q.id)), Te = (De ?? []).filter((q) => !Re.has(q.id)), V = [...s, ...Te];
179
+ return I.current = Math.max(L, V.length), N(C, V, x), V;
180
180
  }), K(x);
181
181
  } catch {
182
182
  e && A((a) => a ?? []);
@@ -195,13 +195,13 @@ function mt({
195
195
  if (!U) {
196
196
  re(!0);
197
197
  try {
198
- const e = await C(
198
+ const e = await z(
199
199
  `/api/artifacts?limit=${L}&offset=${I.current}${le}`,
200
200
  { cache: "no-store" }
201
201
  );
202
202
  A((t) => {
203
203
  const d = new Set((t ?? []).map((s) => s.id)), a = [...t ?? [], ...e.artifacts.filter((s) => !d.has(s.id))];
204
- return I.current = a.length, N(D, a, e.total ?? E), a;
204
+ return I.current = a.length, N(C, a, e.total ?? E), a;
205
205
  }), K((t) => e.total ?? t);
206
206
  } catch {
207
207
  } finally {
@@ -218,7 +218,7 @@ function mt({
218
218
  })) {
219
219
  ie(e.id);
220
220
  try {
221
- await C(
221
+ await z(
222
222
  `/api/sessions/${encodeURIComponent(e.sessionId ?? "")}/artifacts/${encodeURIComponent(e.id)}`,
223
223
  {
224
224
  method: "DELETE",
@@ -226,10 +226,10 @@ function mt({
226
226
  }
227
227
  ), A((a) => {
228
228
  const s = a?.filter((x) => x.id !== e.id) ?? null;
229
- return s && N(D, s, Math.max(0, E - 1)), s;
230
- }), K((a) => Math.max(0, a - 1)), I.current = Math.max(0, I.current - 1), z.success("Artifact deleted");
229
+ return s && N(C, s, Math.max(0, E - 1)), s;
230
+ }), K((a) => Math.max(0, a - 1)), I.current = Math.max(0, I.current - 1), D.success("Artifact deleted");
231
231
  } catch (a) {
232
- z.error(a instanceof Error ? a.message : "Couldn't delete artifact");
232
+ D.error(a instanceof Error ? a.message : "Couldn't delete artifact");
233
233
  } finally {
234
234
  ie(null);
235
235
  }
@@ -238,7 +238,7 @@ function mt({
238
238
  if (!(!e.sessionId || e.refreshEnabled === void 0)) {
239
239
  ne(e.id);
240
240
  try {
241
- const t = await C(
241
+ const t = await z(
242
242
  `/api/sessions/${encodeURIComponent(e.sessionId)}/artifacts/html/${encodeURIComponent(e.id)}/refresh`,
243
243
  {
244
244
  method: "POST",
@@ -255,10 +255,10 @@ function mt({
255
255
  refreshStatus: t.artifact.refresh?.status ?? s.refreshStatus,
256
256
  refreshEnabled: t.artifact.refresh?.enabled ?? s.refreshEnabled
257
257
  } : s) ?? null;
258
- return a && N(D, a, E), a;
259
- }), z.success("Artifact refreshed");
258
+ return a && N(C, a, E), a;
259
+ }), D.success("Artifact refreshed");
260
260
  } catch (t) {
261
- z.error(t instanceof Error ? t.message : "Couldn't refresh artifact");
261
+ D.error(t instanceof Error ? t.message : "Couldn't refresh artifact");
262
262
  } finally {
263
263
  ne(null);
264
264
  }
@@ -281,7 +281,7 @@ function mt({
281
281
  if (!F) {
282
282
  Z(!0);
283
283
  try {
284
- const e = await C(
284
+ const e = await z(
285
285
  `/api/shipped?limit=${fe}&offset=${H.current}`,
286
286
  { cache: "no-store" }
287
287
  );
@@ -295,7 +295,7 @@ function mt({
295
295
  }
296
296
  }
297
297
  }, de = m?.filter(
298
- (e) => q(w, {
298
+ (e) => J(w, {
299
299
  id: _(e),
300
300
  ts: e.ts
301
301
  })
@@ -307,19 +307,19 @@ function mt({
307
307
  s && s.label === a ? s.items.push(d) : t.push({ label: a, items: [d] });
308
308
  }
309
309
  return t;
310
- }, [m]), Ce = (e) => {
311
- q(w, {
310
+ }, [m]), ze = (e) => {
311
+ J(w, {
312
312
  id: _(e),
313
313
  ts: e.ts
314
314
  }) && k(
315
315
  nt(u, _(e))
316
316
  );
317
- }, De = async () => {
317
+ }, Ce = async () => {
318
318
  if (!G) {
319
319
  ee(!0);
320
320
  try {
321
321
  const e = Math.max(Date.now(), ...(m ?? []).map((t) => t.ts));
322
- k(ge(u, e)), await Je(), z.success("Notifications marked read");
322
+ k(ge(u, e)), await qe(), D.success("Notifications marked read");
323
323
  } finally {
324
324
  ee(!1);
325
325
  }
@@ -342,7 +342,7 @@ function mt({
342
342
  "aria-label": "Mark all read",
343
343
  title: "Mark all read — clears the app icon badge",
344
344
  disabled: G,
345
- onClick: () => void De(),
345
+ onClick: () => void Ce(),
346
346
  children: G ? /* @__PURE__ */ r(he, { className: "size-4 animate-spin" }) : /* @__PURE__ */ r(Ge, { className: "size-4" })
347
347
  }
348
348
  )
@@ -471,7 +471,7 @@ function mt({
471
471
  Ie.map((e) => /* @__PURE__ */ o("section", { className: "space-y-1.5", children: [
472
472
  /* @__PURE__ */ r("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
473
473
  /* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
474
- const d = !!t.sessionId && l.has(t.sessionId), a = q(w, {
474
+ const d = !!t.sessionId && l.has(t.sessionId), a = J(w, {
475
475
  id: _(t),
476
476
  ts: t.ts
477
477
  }), s = t.mediaItems.length > 0;
@@ -481,7 +481,7 @@ function mt({
481
481
  {
482
482
  type: "button",
483
483
  onClick: () => {
484
- Ce(t), t.sessionId && (c ? c(t) : d && n(t.sessionId));
484
+ ze(t), t.sessionId && (c ? c(t) : d && n(t.sessionId));
485
485
  },
486
486
  className: M(
487
487
  "flex w-full items-start gap-2.5 py-2.5 pl-2.5 text-left transition-colors hover:bg-foreground/[0.02]",
@@ -3,7 +3,7 @@ import { useMemo as We, useState as Ce, useEffect as xe, useRef as Ve } from "re
3
3
  import { r as He, t as T, o as Ue, u as be, y as L, A as Je, a as Qe } from "./chunk-YOKDWASO-B5AA2F8u.js";
4
4
  import { b as Xe, c as Ye, a as Ze, d as Ke } from "./engine-compile-D_stzVMa.js";
5
5
  import { cn as je } from "cnfast";
6
- import { ac as et, x as tt, ad as nt } from "./embedded-DoqmW6eM.js";
6
+ import { ae as et, y as tt, af as nt } from "./embedded-Dw2pU919.js";
7
7
  const d = (
8
8
  /** @type {const} */
9
9
  {