@burdenoff/microfe-healthybowl 2026.1013.2 → 2026.1015.2

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.
@@ -67,7 +67,7 @@ var o = "00000000-0000-0000-0000-000000000001", s = "\n status\n blocked\n en
67
67
  groups { ${c} }
68
68
  }
69
69
  }
70
- `, h = "\n animalId tagNumber name type breed gender dateOfBirth generation relation archived childAnimalId\n", g = r`
70
+ `, h = "\n animalId tagNumber name type breed gender dateOfBirth generation relation archived childAnimalId\n childAnimalIds\n", g = r`
71
71
  query HealthyBowlAnimalPedigree($context: ContextInput!, $animalId: ID!, $ancestorDepth: Int, $offspringDepth: Int) {
72
72
  healthyBowlAnimalPedigree(
73
73
  context: $context
@@ -2,6 +2,7 @@ import "./context/HealthyBowlContext.js";
2
2
  import "../components/assistant/AIAssistantPanel.js";
3
3
  import "../components/assistant/index.js";
4
4
  import "./events/rybbit.js";
5
+ import "./offline/store.js";
5
6
  import "./HealthyBowlRoot.js";
6
7
  import "./public/PublicTracePage.js";
7
8
  import "./public/PublicSeedLotPage.js";
@@ -2,46 +2,47 @@ import { useBasePath as e } from "../hooks/useBasePath.js";
2
2
  import { useOfflineSync as t } from "./OfflineSyncProvider.js";
3
3
  import { relativeTime as n } from "./observationMeta.js";
4
4
  import { compactLabel as r } from "./headerSlot.js";
5
- import { AlertTriangle as i, CheckCircle2 as a, RefreshCw as o, Wifi as s, WifiOff as c } from "lucide-react";
6
- import { Link as l } from "react-router";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ import { AlertTriangle as a, CheckCircle2 as o, RefreshCw as s, Wifi as c, WifiOff as l } from "lucide-react";
7
+ import { Link as u } from "react-router";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
9
  //#region src/healthybowl/offline/OfflineStatusPill.tsx
9
- var f = ({ inline: f, compact: p, className: m }) => {
10
- let { buildPath: h } = e(), { online: g, syncing: _, queuedCount: v, conflictCount: y, lastSyncedAt: b, syncNow: x } = t(), S = !g, C = v > 0, w = "ok";
11
- S ? w = "offline" : (C || y > 0) && (w = "warning");
12
- let T = w === "offline" || w === "warning" ? "bg-status-warning-bgSubtle text-status-warning-text border-status-warning-border" : "bg-status-success-bgSubtle text-status-success-text border-status-success-border", E = S ? c : y > 0 ? i : C ? s : a, D;
13
- D = S ? C ? `Offline — ${v} record${v > 1 ? "s" : ""} queued` : "Offline — working locally" : _ ? "Online — syncing…" : y > 0 ? `Online — ${y} conflict${y > 1 ? "s" : ""} to review` : C ? `Online — ${v} record${v > 1 ? "s" : ""} queued` : b ? `Online — all synced · last synced ${n(b)}` : "Online — all synced";
14
- let O = /* @__PURE__ */ d("button", {
10
+ var p = ({ inline: p, compact: m, className: h }) => {
11
+ let { buildPath: g } = e(), { t: _ } = i(), { online: v, syncing: y, queuedCount: b, conflictCount: x, needsReviewCount: S, lastSyncedAt: C, storageBlocked: w, syncNow: T } = t(), E = !v, D = b > 0, O = "ok";
12
+ E ? O = "offline" : (w || D || x > 0 || S > 0) && (O = "warning");
13
+ let k = O === "offline" || O === "warning" ? "bg-status-warning-bgSubtle text-status-warning-text border-status-warning-border" : "bg-status-success-bgSubtle text-status-success-text border-status-success-border", A = w ? a : E ? l : x > 0 || S > 0 ? a : D ? c : o, j;
14
+ j = w ? _("healthybowl.offline.pill.storageBlocked", "Close other HealthyBowl tabs · offline storage is finishing an update") : E ? D ? `Offline — ${b} record${b > 1 ? "s" : ""} queued` : "Offline — working locally" : y ? "Online — syncing…" : x > 0 ? `Online — ${x} conflict${x > 1 ? "s" : ""} to review` : D ? `Online — ${b} record${b > 1 ? "s" : ""} queued` : S > 0 ? S === 1 ? _("healthybowl.offline.pill.needsReviewOne", "Online — 1 record to review") : _("healthybowl.offline.pill.needsReviewMany", "Online — {{count}} records to review", { count: S }) : C ? `Online — all synced · last synced ${n(C)}` : "Online — all synced";
15
+ let M = /* @__PURE__ */ f("button", {
15
16
  type: "button",
16
- onClick: () => void x({ manual: !0 }),
17
- disabled: _ || !g,
18
- title: g ? "Sync now" : "Reconnect to sync",
19
- className: `inline-flex shrink-0 items-center gap-1.5 rounded-lg bg-bg-surface px-2.5 py-1 text-xs font-semibold text-text-primary shadow-sm ring-1 ring-border-subtle transition hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50 ${p ? "hidden lg:inline-flex" : ""}`,
20
- children: [/* @__PURE__ */ u(o, { className: `h-3.5 w-3.5 ${_ ? "animate-spin" : ""}` }), "Sync Now"]
17
+ onClick: () => void T({ manual: !0 }),
18
+ disabled: y || !v,
19
+ title: v ? "Sync now" : "Reconnect to sync",
20
+ className: `inline-flex shrink-0 items-center gap-1.5 rounded-lg bg-bg-surface px-2.5 py-1 text-xs font-semibold text-text-primary shadow-sm ring-1 ring-border-subtle transition hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50 ${m ? "hidden lg:inline-flex" : ""}`,
21
+ children: [/* @__PURE__ */ d(s, { className: `h-3.5 w-3.5 ${y ? "animate-spin" : ""}` }), "Sync Now"]
21
22
  });
22
- return p ? /* @__PURE__ */ d("div", {
23
- className: `flex max-w-[13rem] items-center gap-2 rounded-full border px-3 py-1 xl:max-w-[22rem] ${T} ${m ?? ""}`,
23
+ return m ? /* @__PURE__ */ f("div", {
24
+ className: `flex max-w-[13rem] items-center gap-2 rounded-full border px-3 py-1 xl:max-w-[22rem] ${k} ${h ?? ""}`,
24
25
  role: "status",
25
26
  "aria-live": "polite",
26
- children: [/* @__PURE__ */ d(l, {
27
- to: h("field-capture/pending"),
28
- title: D,
29
- "aria-label": D,
27
+ children: [/* @__PURE__ */ f(u, {
28
+ to: g("field-capture/pending"),
29
+ title: j,
30
+ "aria-label": j,
30
31
  className: "flex min-w-0 flex-1 items-center gap-2 text-left transition hover:opacity-90",
31
- children: [/* @__PURE__ */ u(E, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ u("span", {
32
+ children: [/* @__PURE__ */ d(A, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ d("span", {
32
33
  className: "truncate text-xs font-medium",
33
- children: r(D)
34
+ children: r(j)
34
35
  })]
35
- }), O]
36
- }) : /* @__PURE__ */ d("div", {
37
- className: `flex items-center justify-between gap-3 rounded-xl border px-3.5 py-2 ${T} ${f ? "" : "shadow-sm"} ${m ?? ""}`,
36
+ }), M]
37
+ }) : /* @__PURE__ */ f("div", {
38
+ className: `flex items-center justify-between gap-3 rounded-xl border px-3.5 py-2 ${k} ${p ? "" : "shadow-sm"} ${h ?? ""}`,
38
39
  role: "status",
39
40
  "aria-live": "polite",
40
- children: [/* @__PURE__ */ d("span", {
41
+ children: [/* @__PURE__ */ f("span", {
41
42
  className: "flex items-center gap-2 text-sm font-medium",
42
- children: [/* @__PURE__ */ u(E, { className: "h-4 w-4 shrink-0" }), D]
43
- }), O]
43
+ children: [/* @__PURE__ */ d(A, { className: "h-4 w-4 shrink-0" }), j]
44
+ }), M]
44
45
  });
45
46
  };
46
47
  //#endregion
47
- export { f as OfflineStatusPill };
48
+ export { p as OfflineStatusPill };