@burdenoff/microfe-atheletebridge 2026.1023.1 → 2026.1029.1
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.
- package/dist/atheletebridge/hooks/index.d.ts +1 -0
- package/dist/atheletebridge/hooks/index.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/index.js +1 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.d.ts +18 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.d.ts.map +1 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.js +24 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +203 -194
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +164 -159
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
- package/package.json +5 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { useTeams, useTeam, useTeamMembers, useCreateTeam, useUpdateTeam, useArchiveTeam, useAddMember, useRemoveMember, useFixtures, useFixture, useStandings, useScheduleFixture, useRecordFixtureResult, usePrograms, useProgram, useCreateProgram, useUpdateProgram, useTransitionProgram, useArchiveProgram, useAddDrill, useRemoveDrill, useSessions, useSession, useBookSession, useConfirmSession, useCompleteSession, useCancelSession, useWorkoutLogs, usePerformanceMetrics, useLogWorkout, useRecordMetric, useUploadFile, useFile, useUserSearch, directoryUserName, useUsersByIds, useUserDirectory, useAiModelCatalog, useWorkspaceAiConfig, useSetWorkspaceAiModel, useSetWorkspaceAutoPilot, useAgentRuns, useAgentRun, useProgramAiState, useGenerateProgram, useAdjustPlanFromPerformance, useOverrideAgentRun, AthApiError, AI_PROVIDER_UNAVAILABLE, isAiProviderUnavailable, useRecentActivity, useAthleteProfile, useCoachAnalytics, useHealth, } from './useAthleteBridgeApi';
|
|
2
|
+
export { useScheduledTimeGate } from './useScheduledTimeGate';
|
|
2
3
|
export type { TeamFilters, FixtureFilters, ProgramFilters, SessionFilters, WorkoutLogFilters, AgentRunFilters, WorkspaceFileRef, DirectoryUser, ResolvedUser, UserDirectory, ActivityType, ActivityItem, RecentActivityInput, AthleteProfile, SessionStatusCount, RatingByCoach, AnalyticsTrendPoint, AthleteTrainingLoad, CoachAnalytics, CoachAnalyticsOptions, } from './useAthleteBridgeApi';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atheletebridge/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,OAAO,EACP,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EAEf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EAEtB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,cAAc,EAEd,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAEhB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EAEf,aAAa,EACb,OAAO,EAEP,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAEhB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EAEvB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAEjB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atheletebridge/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,OAAO,EACP,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EAEf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EAEtB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,cAAc,EAEd,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAEhB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EAEf,aAAa,EACb,OAAO,EAEP,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAEhB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EAEvB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAEjB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,YAAY,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True once `scheduledAt` has passed — and it becomes true on screen at that
|
|
3
|
+
* moment, without a refresh.
|
|
4
|
+
*
|
|
5
|
+
* Comparing against `Date.now()` during render alone goes stale: leave the page
|
|
6
|
+
* open across the scheduled time and the gated action never appears. The server
|
|
7
|
+
* enforces the same rule, so this is a UX concern only, but a user staring at a
|
|
8
|
+
* hidden action has no way to tell "not yet" from "broken".
|
|
9
|
+
*
|
|
10
|
+
* A wait longer than one `setTimeout` can hold is re-armed in chunks rather
|
|
11
|
+
* than clamped, so a fixture scheduled weeks ahead does not spin on a timer
|
|
12
|
+
* that overflows.
|
|
13
|
+
*
|
|
14
|
+
* @param scheduledAt ISO timestamp, or nullish while the query has no row yet
|
|
15
|
+
* @returns whether the scheduled time has passed
|
|
16
|
+
*/
|
|
17
|
+
export declare function useScheduledTimeGate(scheduledAt: string | null | undefined): boolean;
|
|
18
|
+
//# sourceMappingURL=useScheduledTimeGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScheduledTimeGate.d.ts","sourceRoot":"","sources":["../../../src/atheletebridge/hooks/useScheduledTimeGate.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAyBpF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
//#region src/atheletebridge/hooks/useScheduledTimeGate.ts
|
|
3
|
+
var n = 2147483647;
|
|
4
|
+
function r(r) {
|
|
5
|
+
let i = r ? new Date(r).getTime() : NaN, [, a] = t(0);
|
|
6
|
+
return e(() => {
|
|
7
|
+
if (Number.isNaN(i) || i <= Date.now()) return;
|
|
8
|
+
let e, t = () => {
|
|
9
|
+
let r = i - Date.now();
|
|
10
|
+
if (r <= 0) {
|
|
11
|
+
a((e) => e + 1);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
e = setTimeout(t, Math.min(r, n));
|
|
15
|
+
};
|
|
16
|
+
return t(), () => {
|
|
17
|
+
e !== void 0 && clearTimeout(e);
|
|
18
|
+
};
|
|
19
|
+
}, [i]), !Number.isNaN(i) && i <= Date.now();
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as useScheduledTimeGate };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=useScheduledTimeGate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScheduledTimeGate.js","names":[],"sources":["../../../src/atheletebridge/hooks/useScheduledTimeGate.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/** `setTimeout` saturates past this and would fire immediately instead. */\nconst MAX_TIMEOUT_MS = 2_147_483_647; // ~24.8 days\n\n/**\n * True once `scheduledAt` has passed — and it becomes true on screen at that\n * moment, without a refresh.\n *\n * Comparing against `Date.now()` during render alone goes stale: leave the page\n * open across the scheduled time and the gated action never appears. The server\n * enforces the same rule, so this is a UX concern only, but a user staring at a\n * hidden action has no way to tell \"not yet\" from \"broken\".\n *\n * A wait longer than one `setTimeout` can hold is re-armed in chunks rather\n * than clamped, so a fixture scheduled weeks ahead does not spin on a timer\n * that overflows.\n *\n * @param scheduledAt ISO timestamp, or nullish while the query has no row yet\n * @returns whether the scheduled time has passed\n */\nexport function useScheduledTimeGate(scheduledAt: string | null | undefined): boolean {\n const dueAt = scheduledAt ? new Date(scheduledAt).getTime() : Number.NaN;\n // Bumped exactly once, when the scheduled time arrives, to re-render.\n const [, setArrived] = useState(0);\n\n useEffect(() => {\n if (Number.isNaN(dueAt) || dueAt <= Date.now()) return;\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n const arm = (): void => {\n const remaining = dueAt - Date.now();\n if (remaining <= 0) {\n setArrived((n) => n + 1);\n return;\n }\n timer = setTimeout(arm, Math.min(remaining, MAX_TIMEOUT_MS));\n };\n arm();\n\n return () => {\n if (timer !== undefined) clearTimeout(timer);\n };\n }, [dueAt]);\n\n return !Number.isNaN(dueAt) && dueAt <= Date.now();\n}\n"],"mappings":";;AAGA,IAAM,IAAiB;AAkBvB,SAAgB,EAAqB,GAAiD;CACpF,IAAM,IAAQ,IAAc,IAAI,KAAK,CAAW,EAAE,QAAQ,IAAI,KAExD,GAAG,KAAc,EAAS,CAAC;CAqBjC,OAnBA,QAAgB;EACd,IAAI,OAAO,MAAM,CAAK,KAAK,KAAS,KAAK,IAAI,GAAG;EAEhD,IAAI,GACE,UAAkB;GACtB,IAAM,IAAY,IAAQ,KAAK,IAAI;GACnC,IAAI,KAAa,GAAG;IAClB,GAAY,MAAM,IAAI,CAAC;IACvB;GACF;GACA,IAAQ,WAAW,GAAK,KAAK,IAAI,GAAW,CAAc,CAAC;EAC7D;EAGA,OAFA,EAAI,SAES;GACX,AAAI,MAAU,KAAA,KAAW,aAAa,CAAK;EAC7C;CACF,GAAG,CAAC,CAAK,CAAC,GAEH,CAAC,OAAO,MAAM,CAAK,KAAK,KAAS,KAAK,IAAI;AACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixtureDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"FixtureDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH,wBAAgB,iBAAiB,gCAunBhC"}
|