@burdenoff/microfe-subscriberbot 2026.1107.7 → 2026.1107.8

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.
@@ -51,9 +51,10 @@ export interface UpcomingRenewal {
51
51
  soon: boolean;
52
52
  }
53
53
  /**
54
- * Upcoming renewals, soonest first. Real renewal events win; when the event
55
- * stream is empty the list is derived from each relationship's own future
56
- * `renewsAt`, so a freshly-tracked portfolio still shows what renews next.
54
+ * Upcoming renewals, soonest first. A relationship's renewal event wins over
55
+ * its own `renewsAt`; a relationship with no event is still listed from its
56
+ * future `renewsAt`, so tracking a new subscription shows what renews next
57
+ * even when other relationships already have renewal events.
57
58
  * `fallbackTitle` names an event whose relationship is not in the page.
58
59
  * Relationships that no longer renew (cancelled, expired, lapsed, paused) are
59
60
  * left out of both sources.
@@ -1 +1 @@
1
- {"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../../../src/subscriberbot/utils/portfolio.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,eAAe,EAChB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,UAAU,QAAsB,CAAC;AAE9C,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAS7D,CAAC;AAmBF,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,UAAU,CAAC,GAAG,MAAM,CAEhG;AAED,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4EAA4E;AAC5E,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AAM,CAE1D;AAED,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3E"}
@@ -59,8 +59,7 @@ function l(t, r, i, a = Date.now()) {
59
59
  let s = a + 7 * e, c = (e) => new Date(e).getTime(), l = (e) => {
60
60
  let t = o.get(e);
61
61
  return !t || n.has(t.status);
62
- };
63
- return r.length > 0 ? r.filter((e) => !Number.isNaN(c(e.occursAt)) && l(e.relationshipId)).map((e) => {
62
+ }, u = r.filter((e) => !Number.isNaN(c(e.occursAt)) && l(e.relationshipId)).map((e) => {
64
63
  let t = o.get(e.relationshipId);
65
64
  return {
66
65
  id: e.id,
@@ -73,8 +72,8 @@ function l(t, r, i, a = Date.now()) {
73
72
  kind: t?.kind ?? null,
74
73
  soon: c(e.occursAt) <= s
75
74
  };
76
- }).sort((e, t) => c(e.when) - c(t.when)) : t.filter((e) => {
77
- if (!e.renewsAt || !n.has(e.status)) return !1;
75
+ }), d = new Set(u.map((e) => e.relationshipId)), f = t.filter((e) => {
76
+ if (d.has(e.id) || !e.renewsAt || !n.has(e.status)) return !1;
78
77
  let t = c(e.renewsAt);
79
78
  return !Number.isNaN(t) && t >= a;
80
79
  }).map((e) => {
@@ -90,7 +89,8 @@ function l(t, r, i, a = Date.now()) {
90
89
  kind: e.kind,
91
90
  soon: c(t) <= s
92
91
  };
93
- }).sort((e, t) => c(e.when) - c(t.when));
92
+ });
93
+ return [...u, ...f].sort((e, t) => c(e.when) - c(t.when));
94
94
  }
95
95
  var u = {
96
96
  TRIAL: [
@@ -1 +1 @@
1
- {"version":3,"file":"portfolio.js","names":[],"sources":["../../../src/subscriberbot/utils/portfolio.ts"],"sourcesContent":["/**\n * Portfolio model shared by the desktop and mobile Subscriber Bot screens\n * @module subscriberbot/utils/portfolio\n *\n * Pure functions only (no React, no DOM) so the overview, the relationship\n * list and the relationship detail page compute spend, renewals and lifecycle\n * actions the same way at every viewport. Unit-tested in `portfolio.test.ts`.\n */\n\nimport type {\n SubBillingInterval,\n SubRelationship,\n SubRelationshipStatus,\n SubRenewalEvent,\n} from '../types';\n\nexport const MS_PER_DAY = 1000 * 60 * 60 * 24;\n\n/** Renewals inside this window are flagged as \"soon\". */\nexport const SOON_WINDOW_DAYS = 7;\n\n/**\n * Approximate monthly multiplier per billing interval, so total recurring\n * spend can be expressed as one comparable \"per month\" number. Usage-based\n * relationships count at their last known amount; free and lifetime ones\n * do not recur.\n */\nexport const MONTHLY_FACTOR: Record<SubBillingInterval, number> = {\n DAILY: 30,\n WEEKLY: 4.345,\n MONTHLY: 1,\n QUARTERLY: 1 / 3,\n YEARLY: 1 / 12,\n LIFETIME: 0,\n FREE: 0,\n USAGE_BASED: 1,\n};\n\n/**\n * Statuses that still renew. A cancelled, expired, lapsed or paused\n * relationship has no upcoming charge, even if it keeps an old `renewsAt`\n * or the renewal stream still holds an event for it.\n */\nconst RENEWING_STATUSES: ReadonlySet<SubRelationshipStatus> = new Set<SubRelationshipStatus>([\n 'ACTIVE',\n 'TRIAL',\n 'PAST_DUE',\n]);\n\n/** Statuses that are still being billed. */\nconst BILLING_STATUSES: ReadonlySet<SubRelationshipStatus> = new Set<SubRelationshipStatus>([\n 'ACTIVE',\n 'TRIAL',\n]);\n\n/** The relationship's cost normalised to one month. */\nexport function monthlyAmount(relationship: Pick<SubRelationship, 'amount' | 'interval'>): number {\n return relationship.amount * (MONTHLY_FACTOR[relationship.interval] ?? 1);\n}\n\nexport interface RecurringSpend {\n /** Sum of `monthlyAmount` over ACTIVE + TRIAL relationships. */\n monthly: number;\n /** Currency of the first billing relationship (portfolio display currency). */\n currency: string;\n /** Number of relationships that are still billing. */\n activeCount: number;\n}\n\n/** Total monthly recurring spend over the relationships that still bill. */\nexport function recurringSpend(\n relationships: readonly Pick<SubRelationship, 'amount' | 'interval' | 'status' | 'currency'>[]\n): RecurringSpend {\n const active = relationships.filter((r) => BILLING_STATUSES.has(r.status));\n return {\n monthly: active.reduce((sum, r) => sum + monthlyAmount(r), 0),\n currency: active[0]?.currency ?? relationships[0]?.currency ?? 'USD',\n activeCount: active.length,\n };\n}\n\n/**\n * Calendar days from today until `date`, in the viewer's local time zone:\n * 0 is \"today\", 1 is \"tomorrow\", negative is overdue. Counting calendar days\n * (not 24-hour blocks) matters for renewals stored at midnight UTC: one due\n * tomorrow used to read \"Renews today\" for most of the day before\n * (BOFF-4010). Null when the date is missing or unparseable.\n */\nexport function daysUntil(\n date: string | null | undefined,\n now: number = Date.now()\n): number | null {\n if (!date) return null;\n const t = new Date(date).getTime();\n if (Number.isNaN(t)) return null;\n return calendarDay(t) - calendarDay(now);\n}\n\n/**\n * The local calendar date of `ms` as a whole-day ordinal. Local Y/M/D are\n * re-read as a UTC date so daylight-saving shifts never leave a fraction.\n */\nfunction calendarDay(ms: number): number {\n const d = new Date(ms);\n return Math.round(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()) / MS_PER_DAY);\n}\n\n/** Translation key, English fallback and params for a renewal countdown. */\nexport interface RenewalCountdown {\n key: string;\n fallback: string;\n params?: Record<string, number>;\n tone: 'overdue' | 'soon' | 'later';\n}\n\nexport function renewalCountdown(days: number): RenewalCountdown {\n if (days < 0) {\n return { key: 'mobile.renewal.overdue', fallback: 'Renewal overdue', tone: 'overdue' };\n }\n if (days === 0) {\n return { key: 'mobile.renewal.today', fallback: 'Renews today', tone: 'soon' };\n }\n if (days === 1) {\n return { key: 'mobile.renewal.tomorrow', fallback: 'Renews tomorrow', tone: 'soon' };\n }\n return {\n key: 'mobile.renewal.inDays',\n fallback: 'Renews in {{count}} days',\n params: { count: days },\n tone: days <= SOON_WINDOW_DAYS ? 'soon' : 'later',\n };\n}\n\n/** One normalised \"what charges next\" row. */\nexport interface UpcomingRenewal {\n id: string;\n relationshipId: string;\n title: string;\n when: string;\n amount: number | null;\n currency: string | null;\n interval: SubBillingInterval | null;\n kind: SubRelationship['kind'] | null;\n soon: boolean;\n}\n\n/**\n * Upcoming renewals, soonest first. Real renewal events win; when the event\n * stream is empty the list is derived from each relationship's own future\n * `renewsAt`, so a freshly-tracked portfolio still shows what renews next.\n * `fallbackTitle` names an event whose relationship is not in the page.\n * Relationships that no longer renew (cancelled, expired, lapsed, paused) are\n * left out of both sources.\n */\nexport function buildUpcomingRenewals(\n relationships: readonly SubRelationship[],\n events: readonly SubRenewalEvent[],\n fallbackTitle: (eventType: string) => string,\n now: number = Date.now()\n): UpcomingRenewal[] {\n const byId = new Map<string, SubRelationship>();\n relationships.forEach((r) => byId.set(r.id, r));\n const soonCutoff = now + SOON_WINDOW_DAYS * MS_PER_DAY;\n const time = (iso: string) => new Date(iso).getTime();\n\n // An event whose relationship is not in the page is kept: its status is\n // unknown here, and the renewal stream is the better source.\n const renews = (relationshipId: string) => {\n const rel = byId.get(relationshipId);\n return !rel || RENEWING_STATUSES.has(rel.status);\n };\n\n if (events.length > 0) {\n return events\n .filter((e) => !Number.isNaN(time(e.occursAt)) && renews(e.relationshipId))\n .map((e) => {\n const rel = byId.get(e.relationshipId);\n return {\n id: e.id,\n relationshipId: e.relationshipId,\n title: rel?.label ?? fallbackTitle(e.eventType),\n when: e.occursAt,\n amount: e.amount ?? rel?.amount ?? null,\n currency: e.currency ?? rel?.currency ?? null,\n interval: rel?.interval ?? null,\n kind: rel?.kind ?? null,\n soon: time(e.occursAt) <= soonCutoff,\n };\n })\n .sort((a, b) => time(a.when) - time(b.when));\n }\n\n return relationships\n .filter((r) => {\n if (!r.renewsAt || !RENEWING_STATUSES.has(r.status)) return false;\n const t = time(r.renewsAt);\n return !Number.isNaN(t) && t >= now;\n })\n .map((r) => {\n const when = r.renewsAt as string;\n return {\n id: r.id,\n relationshipId: r.id,\n title: r.label,\n when,\n amount: r.amount,\n currency: r.currency,\n interval: r.interval,\n kind: r.kind,\n soon: time(when) <= soonCutoff,\n };\n })\n .sort((a, b) => time(a.when) - time(b.when));\n}\n\n/**\n * Lifecycle state machine — mirrors `RELATIONSHIP_TRANSITIONS` in\n * wspace-subscriberbot-svc (relationships.service.ts). The server stays the\n * authority and re-validates every transition; this copy only decides which\n * actions are worth offering so the UI never shows a button that is certain\n * to fail.\n */\nexport const RELATIONSHIP_TRANSITIONS: Record<\n SubRelationshipStatus,\n readonly SubRelationshipStatus[]\n> = {\n TRIAL: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n ACTIVE: ['PAUSED', 'PAST_DUE', 'CANCELLED', 'EXPIRED'],\n PAUSED: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n PAST_DUE: ['ACTIVE', 'LAPSED', 'CANCELLED'],\n LAPSED: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n CANCELLED: [],\n EXPIRED: [],\n};\n\nexport function canTransition(from: SubRelationshipStatus, to: SubRelationshipStatus): boolean {\n return RELATIONSHIP_TRANSITIONS[from]?.includes(to) ?? false;\n}\n\nexport type QuickActionId = 'activate' | 'resume' | 'pause' | 'cancel';\n\nexport interface QuickAction {\n id: QuickActionId;\n /** Status the relationship moves to. CANCELLED goes through subCancelRelationship. */\n target: SubRelationshipStatus;\n /** Destructive actions ask for confirmation first. */\n destructive: boolean;\n}\n\n/**\n * The everyday actions a phone user reaches for from a list row or the\n * detail page — start, pause/resume, cancel — filtered to what the state\n * machine allows from `status`. Rarer bookkeeping transitions (mark expired,\n * past due, lapsed) stay on the desktop detail page.\n */\nexport function quickActionsFor(status: SubRelationshipStatus): QuickAction[] {\n const actions: QuickAction[] = [];\n if (canTransition(status, 'ACTIVE')) {\n actions.push({\n id: status === 'TRIAL' ? 'activate' : 'resume',\n target: 'ACTIVE',\n destructive: false,\n });\n }\n if (canTransition(status, 'PAUSED')) {\n actions.push({ id: 'pause', target: 'PAUSED', destructive: false });\n }\n if (canTransition(status, 'CANCELLED')) {\n actions.push({ id: 'cancel', target: 'CANCELLED', destructive: true });\n }\n return actions;\n}\n\n/**\n * Swipe-to-reveal geometry for a list row. `dx` is the horizontal drag\n * distance (negative = towards the left). Returns the clamped row offset\n * while dragging.\n */\nexport function swipeOffset(dx: number, wasOpen: boolean, revealWidth: number): number {\n const base = wasOpen ? -revealWidth : 0;\n return Math.min(0, Math.max(-revealWidth, base + dx));\n}\n\n/**\n * Whether the row should settle open once the finger lifts: past half the\n * action tray it snaps open, otherwise it snaps shut.\n */\nexport function swipeSettlesOpen(offset: number, revealWidth: number): boolean {\n return revealWidth > 0 && -offset >= revealWidth / 2;\n}\n\n/**\n * How long after a swipe ends the browser's trailing synthetic click is\n * treated as part of the gesture. Browsers dispatch it immediately after\n * `pointerup`, so a short window is enough; a real tap that follows later is\n * never swallowed, and a cancelled swipe (no click at all) leaves nothing\n * pending.\n */\nexport const SWIPE_CLICK_WINDOW_MS = 400;\n\n/** Deadline until which a click counts as the swipe's own trailing click. */\nexport function swipeClickDeadline(endedAt: number): number {\n return endedAt + SWIPE_CLICK_WINDOW_MS;\n}\n\n/** Whether a click at `now` is the trailing click of a swipe ending by `deadline`. */\nexport function isSwipeTrailingClick(now: number, deadline: number): boolean {\n return now <= deadline;\n}\n"],"mappings":";AAgBA,IAAa,IAAa,MAAO,KAAK,KAAK,IAW9B,IAAqD;CAChE,OAAO;CACP,QAAQ;CACR,SAAS;CACT,WAAW,IAAI;CACf,QAAQ,IAAI;CACZ,UAAU;CACV,MAAM;CACN,aAAa;AACf,GAOM,IAAwD,IAAI,IAA2B;CAC3F;CACA;CACA;AACF,CAAC,GAGK,IAAuD,IAAI,IAA2B,CAC1F,UACA,OACF,CAAC;AAGD,SAAgB,EAAc,GAAoE;CAChG,OAAO,EAAa,UAAU,EAAe,EAAa,aAAa;AACzE;AAYA,SAAgB,EACd,GACgB;CAChB,IAAM,IAAS,EAAc,QAAQ,MAAM,EAAiB,IAAI,EAAE,MAAM,CAAC;CACzE,OAAO;EACL,SAAS,EAAO,QAAQ,GAAK,MAAM,IAAM,EAAc,CAAC,GAAG,CAAC;EAC5D,UAAU,EAAO,IAAI,YAAY,EAAc,IAAI,YAAY;EAC/D,aAAa,EAAO;CACtB;AACF;AASA,SA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AC;CAchC,OAbI,EAAc,GAAQ,QAAQ,KAChC,EAAQ,KAAK;EACX,IAAI,MAAW,UAAU,aAAa;EACtC,QAAQ;EACR,aAAa;CACf,CAAC,GAEC,EAAc,GAAQ,QAAQ,KAChC,EAAQ,KAAK;EAAE,IAAI;EAAS,QAAQ;EAAU,aAAa;CAAM,CAAC,GAEhE,EAAc,GAAQ,WAAW,KACnC,EAAQ,KAAK;EAAE,IAAI;EAAU,QAAQ;EAAa,aAAa;CAAK,CAAC,GAEhE;AACT;AAOA,SAAgB,EAAY,GAAY,GAAkB,GAA6B;CACrF,IAAM,IAAO,IAAU,CAAC,IAAc;CACtC,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,GAAa,IAAO,CAAE,CAAC;AACtD;AAMA,SAAgB,EAAiB,GAAgB,GAA8B;CAC7E,OAAO,IAAc,KAAK,CAAC,KAAU,IAAc;AACrD;AAYA,SAAgB,EAAmB,GAAyB;CAC1D,OAAO,IAAA;AACT;AAGA,SAAgB,EAAqB,GAAa,GAA2B;CAC3E,OAAO,KAAO;AAChB"}
1
+ {"version":3,"file":"portfolio.js","names":[],"sources":["../../../src/subscriberbot/utils/portfolio.ts"],"sourcesContent":["/**\n * Portfolio model shared by the desktop and mobile Subscriber Bot screens\n * @module subscriberbot/utils/portfolio\n *\n * Pure functions only (no React, no DOM) so the overview, the relationship\n * list and the relationship detail page compute spend, renewals and lifecycle\n * actions the same way at every viewport. Unit-tested in `portfolio.test.ts`.\n */\n\nimport type {\n SubBillingInterval,\n SubRelationship,\n SubRelationshipStatus,\n SubRenewalEvent,\n} from '../types';\n\nexport const MS_PER_DAY = 1000 * 60 * 60 * 24;\n\n/** Renewals inside this window are flagged as \"soon\". */\nexport const SOON_WINDOW_DAYS = 7;\n\n/**\n * Approximate monthly multiplier per billing interval, so total recurring\n * spend can be expressed as one comparable \"per month\" number. Usage-based\n * relationships count at their last known amount; free and lifetime ones\n * do not recur.\n */\nexport const MONTHLY_FACTOR: Record<SubBillingInterval, number> = {\n DAILY: 30,\n WEEKLY: 4.345,\n MONTHLY: 1,\n QUARTERLY: 1 / 3,\n YEARLY: 1 / 12,\n LIFETIME: 0,\n FREE: 0,\n USAGE_BASED: 1,\n};\n\n/**\n * Statuses that still renew. A cancelled, expired, lapsed or paused\n * relationship has no upcoming charge, even if it keeps an old `renewsAt`\n * or the renewal stream still holds an event for it.\n */\nconst RENEWING_STATUSES: ReadonlySet<SubRelationshipStatus> = new Set<SubRelationshipStatus>([\n 'ACTIVE',\n 'TRIAL',\n 'PAST_DUE',\n]);\n\n/** Statuses that are still being billed. */\nconst BILLING_STATUSES: ReadonlySet<SubRelationshipStatus> = new Set<SubRelationshipStatus>([\n 'ACTIVE',\n 'TRIAL',\n]);\n\n/** The relationship's cost normalised to one month. */\nexport function monthlyAmount(relationship: Pick<SubRelationship, 'amount' | 'interval'>): number {\n return relationship.amount * (MONTHLY_FACTOR[relationship.interval] ?? 1);\n}\n\nexport interface RecurringSpend {\n /** Sum of `monthlyAmount` over ACTIVE + TRIAL relationships. */\n monthly: number;\n /** Currency of the first billing relationship (portfolio display currency). */\n currency: string;\n /** Number of relationships that are still billing. */\n activeCount: number;\n}\n\n/** Total monthly recurring spend over the relationships that still bill. */\nexport function recurringSpend(\n relationships: readonly Pick<SubRelationship, 'amount' | 'interval' | 'status' | 'currency'>[]\n): RecurringSpend {\n const active = relationships.filter((r) => BILLING_STATUSES.has(r.status));\n return {\n monthly: active.reduce((sum, r) => sum + monthlyAmount(r), 0),\n currency: active[0]?.currency ?? relationships[0]?.currency ?? 'USD',\n activeCount: active.length,\n };\n}\n\n/**\n * Calendar days from today until `date`, in the viewer's local time zone:\n * 0 is \"today\", 1 is \"tomorrow\", negative is overdue. Counting calendar days\n * (not 24-hour blocks) matters for renewals stored at midnight UTC: one due\n * tomorrow used to read \"Renews today\" for most of the day before\n * (BOFF-4010). Null when the date is missing or unparseable.\n */\nexport function daysUntil(\n date: string | null | undefined,\n now: number = Date.now()\n): number | null {\n if (!date) return null;\n const t = new Date(date).getTime();\n if (Number.isNaN(t)) return null;\n return calendarDay(t) - calendarDay(now);\n}\n\n/**\n * The local calendar date of `ms` as a whole-day ordinal. Local Y/M/D are\n * re-read as a UTC date so daylight-saving shifts never leave a fraction.\n */\nfunction calendarDay(ms: number): number {\n const d = new Date(ms);\n return Math.round(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()) / MS_PER_DAY);\n}\n\n/** Translation key, English fallback and params for a renewal countdown. */\nexport interface RenewalCountdown {\n key: string;\n fallback: string;\n params?: Record<string, number>;\n tone: 'overdue' | 'soon' | 'later';\n}\n\nexport function renewalCountdown(days: number): RenewalCountdown {\n if (days < 0) {\n return { key: 'mobile.renewal.overdue', fallback: 'Renewal overdue', tone: 'overdue' };\n }\n if (days === 0) {\n return { key: 'mobile.renewal.today', fallback: 'Renews today', tone: 'soon' };\n }\n if (days === 1) {\n return { key: 'mobile.renewal.tomorrow', fallback: 'Renews tomorrow', tone: 'soon' };\n }\n return {\n key: 'mobile.renewal.inDays',\n fallback: 'Renews in {{count}} days',\n params: { count: days },\n tone: days <= SOON_WINDOW_DAYS ? 'soon' : 'later',\n };\n}\n\n/** One normalised \"what charges next\" row. */\nexport interface UpcomingRenewal {\n id: string;\n relationshipId: string;\n title: string;\n when: string;\n amount: number | null;\n currency: string | null;\n interval: SubBillingInterval | null;\n kind: SubRelationship['kind'] | null;\n soon: boolean;\n}\n\n/**\n * Upcoming renewals, soonest first. A relationship's renewal event wins over\n * its own `renewsAt`; a relationship with no event is still listed from its\n * future `renewsAt`, so tracking a new subscription shows what renews next\n * even when other relationships already have renewal events.\n * `fallbackTitle` names an event whose relationship is not in the page.\n * Relationships that no longer renew (cancelled, expired, lapsed, paused) are\n * left out of both sources.\n */\nexport function buildUpcomingRenewals(\n relationships: readonly SubRelationship[],\n events: readonly SubRenewalEvent[],\n fallbackTitle: (eventType: string) => string,\n now: number = Date.now()\n): UpcomingRenewal[] {\n const byId = new Map<string, SubRelationship>();\n relationships.forEach((r) => byId.set(r.id, r));\n const soonCutoff = now + SOON_WINDOW_DAYS * MS_PER_DAY;\n const time = (iso: string) => new Date(iso).getTime();\n\n // An event whose relationship is not in the page is kept: its status is\n // unknown here, and the renewal stream is the better source.\n const renews = (relationshipId: string) => {\n const rel = byId.get(relationshipId);\n return !rel || RENEWING_STATUSES.has(rel.status);\n };\n\n const fromEvents: UpcomingRenewal[] = events\n .filter((e) => !Number.isNaN(time(e.occursAt)) && renews(e.relationshipId))\n .map((e) => {\n const rel = byId.get(e.relationshipId);\n return {\n id: e.id,\n relationshipId: e.relationshipId,\n title: rel?.label ?? fallbackTitle(e.eventType),\n when: e.occursAt,\n amount: e.amount ?? rel?.amount ?? null,\n currency: e.currency ?? rel?.currency ?? null,\n interval: rel?.interval ?? null,\n kind: rel?.kind ?? null,\n soon: time(e.occursAt) <= soonCutoff,\n };\n });\n\n // Fall back per relationship, not per page: one relationship's event must\n // not hide the relationships that have no event yet.\n const covered = new Set(fromEvents.map((e) => e.relationshipId));\n const fromRelationships: UpcomingRenewal[] = relationships\n .filter((r) => {\n if (covered.has(r.id)) return false;\n if (!r.renewsAt || !RENEWING_STATUSES.has(r.status)) return false;\n const t = time(r.renewsAt);\n return !Number.isNaN(t) && t >= now;\n })\n .map((r) => {\n const when = r.renewsAt as string;\n return {\n id: r.id,\n relationshipId: r.id,\n title: r.label,\n when,\n amount: r.amount,\n currency: r.currency,\n interval: r.interval,\n kind: r.kind,\n soon: time(when) <= soonCutoff,\n };\n });\n\n return [...fromEvents, ...fromRelationships].sort((a, b) => time(a.when) - time(b.when));\n}\n\n/**\n * Lifecycle state machine — mirrors `RELATIONSHIP_TRANSITIONS` in\n * wspace-subscriberbot-svc (relationships.service.ts). The server stays the\n * authority and re-validates every transition; this copy only decides which\n * actions are worth offering so the UI never shows a button that is certain\n * to fail.\n */\nexport const RELATIONSHIP_TRANSITIONS: Record<\n SubRelationshipStatus,\n readonly SubRelationshipStatus[]\n> = {\n TRIAL: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n ACTIVE: ['PAUSED', 'PAST_DUE', 'CANCELLED', 'EXPIRED'],\n PAUSED: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n PAST_DUE: ['ACTIVE', 'LAPSED', 'CANCELLED'],\n LAPSED: ['ACTIVE', 'CANCELLED', 'EXPIRED'],\n CANCELLED: [],\n EXPIRED: [],\n};\n\nexport function canTransition(from: SubRelationshipStatus, to: SubRelationshipStatus): boolean {\n return RELATIONSHIP_TRANSITIONS[from]?.includes(to) ?? false;\n}\n\nexport type QuickActionId = 'activate' | 'resume' | 'pause' | 'cancel';\n\nexport interface QuickAction {\n id: QuickActionId;\n /** Status the relationship moves to. CANCELLED goes through subCancelRelationship. */\n target: SubRelationshipStatus;\n /** Destructive actions ask for confirmation first. */\n destructive: boolean;\n}\n\n/**\n * The everyday actions a phone user reaches for from a list row or the\n * detail page — start, pause/resume, cancel — filtered to what the state\n * machine allows from `status`. Rarer bookkeeping transitions (mark expired,\n * past due, lapsed) stay on the desktop detail page.\n */\nexport function quickActionsFor(status: SubRelationshipStatus): QuickAction[] {\n const actions: QuickAction[] = [];\n if (canTransition(status, 'ACTIVE')) {\n actions.push({\n id: status === 'TRIAL' ? 'activate' : 'resume',\n target: 'ACTIVE',\n destructive: false,\n });\n }\n if (canTransition(status, 'PAUSED')) {\n actions.push({ id: 'pause', target: 'PAUSED', destructive: false });\n }\n if (canTransition(status, 'CANCELLED')) {\n actions.push({ id: 'cancel', target: 'CANCELLED', destructive: true });\n }\n return actions;\n}\n\n/**\n * Swipe-to-reveal geometry for a list row. `dx` is the horizontal drag\n * distance (negative = towards the left). Returns the clamped row offset\n * while dragging.\n */\nexport function swipeOffset(dx: number, wasOpen: boolean, revealWidth: number): number {\n const base = wasOpen ? -revealWidth : 0;\n return Math.min(0, Math.max(-revealWidth, base + dx));\n}\n\n/**\n * Whether the row should settle open once the finger lifts: past half the\n * action tray it snaps open, otherwise it snaps shut.\n */\nexport function swipeSettlesOpen(offset: number, revealWidth: number): boolean {\n return revealWidth > 0 && -offset >= revealWidth / 2;\n}\n\n/**\n * How long after a swipe ends the browser's trailing synthetic click is\n * treated as part of the gesture. Browsers dispatch it immediately after\n * `pointerup`, so a short window is enough; a real tap that follows later is\n * never swallowed, and a cancelled swipe (no click at all) leaves nothing\n * pending.\n */\nexport const SWIPE_CLICK_WINDOW_MS = 400;\n\n/** Deadline until which a click counts as the swipe's own trailing click. */\nexport function swipeClickDeadline(endedAt: number): number {\n return endedAt + SWIPE_CLICK_WINDOW_MS;\n}\n\n/** Whether a click at `now` is the trailing click of a swipe ending by `deadline`. */\nexport function isSwipeTrailingClick(now: number, deadline: number): boolean {\n return now <= deadline;\n}\n"],"mappings":";AAgBA,IAAa,IAAa,MAAO,KAAK,KAAK,IAW9B,IAAqD;CAChE,OAAO;CACP,QAAQ;CACR,SAAS;CACT,WAAW,IAAI;CACf,QAAQ,IAAI;CACZ,UAAU;CACV,MAAM;CACN,aAAa;AACf,GAOM,IAAwD,IAAI,IAA2B;CAC3F;CACA;CACA;AACF,CAAC,GAGK,IAAuD,IAAI,IAA2B,CAC1F,UACA,OACF,CAAC;AAGD,SAAgB,EAAc,GAAoE;CAChG,OAAO,EAAa,UAAU,EAAe,EAAa,aAAa;AACzE;AAYA,SAAgB,EACd,GACgB;CAChB,IAAM,IAAS,EAAc,QAAQ,MAAM,EAAiB,IAAI,EAAE,MAAM,CAAC;CACzE,OAAO;EACL,SAAS,EAAO,QAAQ,GAAK,MAAM,IAAM,EAAc,CAAC,GAAG,CAAC;EAC5D,UAAU,EAAO,IAAI,YAAY,EAAc,IAAI,YAAY;EAC/D,aAAa,EAAO;CACtB;AACF;AASA,SAAgB,EACd,GACA,IAAc,KAAK,IAAI,GACR;CACf,IAAI,CAAC,GAAM,OAAO;CAClB,IAAM,IAAI,IAAI,KAAK,CAAI,EAAE,QAAQ;CAEjC,OADI,OAAO,MAAM,CAAC,IAAU,OACrB,EAAY,CAAC,IAAI,EAAY,CAA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GAAQ,QAAQ,KAChC,EAAQ,KAAK;EAAE,IAAI;EAAS,QAAQ;EAAU,aAAa;CAAM,CAAC,GAEhE,EAAc,GAAQ,WAAW,KACnC,EAAQ,KAAK;EAAE,IAAI;EAAU,QAAQ;EAAa,aAAa;CAAK,CAAC,GAEhE;AACT;AAOA,SAAgB,EAAY,GAAY,GAAkB,GAA6B;CACrF,IAAM,IAAO,IAAU,CAAC,IAAc;CACtC,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,GAAa,IAAO,CAAE,CAAC;AACtD;AAMA,SAAgB,EAAiB,GAAgB,GAA8B;CAC7E,OAAO,IAAc,KAAK,CAAC,KAAU,IAAc;AACrD;AAYA,SAAgB,EAAmB,GAAyB;CAC1D,OAAO,IAAA;AACT;AAGA,SAAgB,EAAqB,GAAa,GAA2B;CAC3E,OAAO,KAAO;AAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-subscriberbot",
3
- "version": "2026.1107.7",
3
+ "version": "2026.1107.8",
4
4
  "description": "Burdenoff SubscriberBot Microfrontend",
5
5
  "type": "module",
6
6
  "files": [