@metaboliccode-dev/widget 0.2.3 → 0.2.5

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.
Files changed (39) hide show
  1. package/README.md +5 -13
  2. package/dist/MetabolicDashboard/MetabolicDashboard.d.ts +1 -1
  3. package/dist/MetabolicDashboard/api/builtInReportPagesApi.d.ts +0 -3
  4. package/dist/MetabolicDashboard/api/createBulkReportFetchers.d.ts +3 -0
  5. package/dist/MetabolicDashboard/api/createHttpDashboardContentFetchers.d.ts +1 -1
  6. package/dist/MetabolicDashboard/api/downloadReportPdf.d.ts +6 -0
  7. package/dist/MetabolicDashboard/api/fetchFullReport.d.ts +18 -0
  8. package/dist/MetabolicDashboard/api/index.d.ts +3 -1
  9. package/dist/MetabolicDashboard/api/mappers/shared.d.ts +3 -4
  10. package/dist/MetabolicDashboard/api/metabolicDashboardApiKey.d.ts +1 -1
  11. package/dist/MetabolicDashboard/api/reportPageTypes.d.ts +31 -17
  12. package/dist/MetabolicDashboard/dashboardActionsContext.d.ts +6 -0
  13. package/dist/MetabolicDashboard/index.d.ts +2 -2
  14. package/dist/MetabolicDashboard/metabolicDashboard/useMetabolicDashboardResolvedContentSources.d.ts +3 -2
  15. package/dist/components/Button/index.d.ts +1 -1
  16. package/dist/components/DashboardTab/AlertLabSummarySection.d.ts +4 -0
  17. package/dist/components/DashboardTab/CategoryTableRow.d.ts +4 -0
  18. package/dist/components/DashboardTab/DashboardLabSectionHeader.d.ts +10 -0
  19. package/dist/components/DashboardTab/TotalPredictiveTrendSnapshotSection.d.ts +4 -0
  20. package/dist/components/DashboardTab/TotalPredictiveTrendsSection.d.ts +4 -0
  21. package/dist/components/DashboardTab/dashboardTabFallbackContent.d.ts +2 -0
  22. package/dist/components/DashboardTab/index.d.ts +2 -2
  23. package/dist/components/LabResultsTab/index.d.ts +2 -2
  24. package/dist/components/SuggestedProductsTab/index.d.ts +1 -1
  25. package/dist/components/SupplementScheduleTab/index.d.ts +1 -1
  26. package/dist/components/dashboard/components/composite/GradientRangeBar.d.ts +14 -0
  27. package/dist/components/dashboard/components/composite/index.d.ts +2 -0
  28. package/dist/components/dashboard/components/sections/ProfileSummaryCard.d.ts +2 -1
  29. package/dist/components/dashboard/constants.d.ts +1 -0
  30. package/dist/components/dashboard/data/contentTypes.d.ts +14 -14
  31. package/dist/components/dashboard/data/index.d.ts +1 -1
  32. package/dist/components/index.d.ts +1 -1
  33. package/dist/index.css +1 -1
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +2592 -2299
  36. package/dist/layout/types.d.ts +9 -0
  37. package/package.json +2 -1
  38. package/dist/components/SuggestedProductsTab/fallbackData.d.ts +0 -2
  39. package/dist/components/SupplementScheduleTab/fallbackData.d.ts +0 -2
package/README.md CHANGED
@@ -25,7 +25,7 @@ Runs the iframe embed entry locally (see `vite.config.iframe.ts`).
25
25
  | `npm run build:iframe` | Iframe bundle only |
26
26
  | `npm run preview:iframe` | Preview built iframe |
27
27
  | `npm run typecheck` | `tsc` on `src/` |
28
- | `npm run test` / `npm run test:run` | Vitest (`vitest.config.ts`) |
28
+ | `npm run test` / `npm run test:run` | Vitest runner (`vitest.config.ts`). Note: there is currently no checked-in test suite — these scripts will exit non-zero because `vitest.config.ts` sets `passWithNoTests: false`. See [Development → Testing](./docs/development.md#testing). |
29
29
  | `npm run lint` / `npm run lint:fix` | Biome |
30
30
  | `npm run docs:api` | TypeDoc API docs |
31
31
 
@@ -34,7 +34,6 @@ Runs the iframe embed entry locally (see `vite.config.iframe.ts`).
34
34
  | Path | Role |
35
35
  | --- | --- |
36
36
  | `src/` | Library source (`MetabolicDashboard`, tabs, branding, API mappers) |
37
- | `src/__tests__/` | Vitest tests; JSON fixtures under `src/__tests__/fixtures/pages/` |
38
37
  | `src/public/` | Default logos, triad icons, and placeholders bundled with the library |
39
38
  | `dist/` | Published ESM library output |
40
39
  | `dist-iframe/` | Static iframe app after `npm run build:iframe` |
@@ -68,24 +67,15 @@ See [Installation](./docs/installation.md) for framework-specific notes and trou
68
67
  import {
69
68
  MetabolicDashboard,
70
69
  METABOLIC_DASHBOARD_STUB_API_KEY,
71
- createHttpDashboardContentFetchers,
72
- mergeReportPagesApiWithBuiltIn,
73
70
  } from "@metaboliccode-dev/widget";
74
71
  import "@metaboliccode-dev/widget/styles.css";
75
72
 
76
- const fetchers = createHttpDashboardContentFetchers(
77
- mergeReportPagesApiWithBuiltIn({
78
- apiKey: "mc-prod",
79
- userId: "prod-full-user",
80
- }),
81
- );
82
-
83
73
  export function App() {
84
74
  return (
85
75
  <div className="h-screen">
86
76
  <MetabolicDashboard
87
77
  apiKey={METABOLIC_DASHBOARD_STUB_API_KEY}
88
- dashboardContentFetchers={fetchers}
78
+ reportHttpConfig={{ apiKey: "mc-prod", userId: "prod-full-user" }}
89
79
  sideMenuUserProfile={{ displayName: "User", email: "user@example.com" }}
90
80
  />
91
81
  </div>
@@ -93,8 +83,10 @@ export function App() {
93
83
  }
94
84
  ```
95
85
 
86
+ The library owns the report-pages API base URL (baked in at build time). Consumers only pass auth — never a `baseUrl`.
87
+
96
88
  See [Quick Start](./docs/quick-start.md) for the dual-key pattern (why `apiKey` and the custom fetchers both carry credentials).
97
89
 
98
90
  ## AG Charts enterprise license
99
91
 
100
- Charts use **AG Charts** (`ag-charts-community` + `ag-charts-enterprise`). The enterprise license key is **baked into the published bundle at release time** by CI (GitHub Actions `VITE_AG_CHARTS_LICENSE_KEY` secret). Consumers do not need to do anything — installing the package gives you an unlocked build. See [Development → Releasing](./docs/development.md#releasing-a-new-version) for the publisher-side setup.
92
+ Charts use **AG Charts** (`ag-charts-community` + `ag-charts-enterprise`). The enterprise license key is **baked into the published bundle** by the **manually-triggered** GitHub Actions release workflow (the `AG_CHARTS_LICENSE_KEY` repo secret is passed to the build step). Consumers do not need to do anything — installing the package gives you an unlocked build. See [Development → Releasing a new version](./docs/development.md#releasing-a-new-version) for the full publishing procedure.
@@ -1,2 +1,2 @@
1
1
  import type { MetabolicDashboardProps } from "../layout";
2
- export declare function MetabolicDashboard({ config: configPartial, apiKey: apiKeyProp, viewerRole, sideMenuTitle, sideMenuLogo, sideMenuUserProfile, content, dashboardContentFetchers, onDashboardTabContentLoadError, renderMainContent, activeNavItemId: activeNavItemIdProp, defaultActiveNavItemId, onActiveNavItemChange, shellClassName, sideMenuClassName, mainClassName, sidebarWidthClassName, dashboardTabContentCacheTtlMs, }: MetabolicDashboardProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MetabolicDashboard({ config: configPartial, apiKey: apiKeyProp, viewerRole, sideMenuTitle, sideMenuLogo, sideMenuUserProfile, content, reportHttpConfig, dashboardContentFetchers, onDashboardTabContentLoadError, onExportReports, renderMainContent, activeNavItemId: activeNavItemIdProp, defaultActiveNavItemId, onActiveNavItemChange, shellClassName, sideMenuClassName, mainClassName, sidebarWidthClassName, dashboardTabContentCacheTtlMs, }: MetabolicDashboardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1 @@
1
- import type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
2
1
  export declare function getBuiltInReportPagesApiBaseUrl(): string;
3
- export declare function getBuiltInReportPagesApiDefaults(): HttpDashboardContentFetchersConfig;
4
- export declare function mergeReportPagesApiWithBuiltIn(override?: Partial<HttpDashboardContentFetchersConfig>): HttpDashboardContentFetchersConfig;
@@ -0,0 +1,3 @@
1
+ import type { DashboardContentFetchers } from "../dashboardTab/dashboardTabModel";
2
+ import type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
3
+ export declare function createBulkReportFetchers(config: HttpDashboardContentFetchersConfig): DashboardContentFetchers;
@@ -1,6 +1,6 @@
1
1
  import type { DashboardContentFetchers } from "../dashboardTab/dashboardTabModel";
2
2
  import type { FetchReportPageOptions } from "./fetchReportPage";
3
- export type HttpDashboardContentFetchersConfig = Omit<FetchReportPageOptions, "signal"> & {
3
+ export type HttpDashboardContentFetchersConfig = Omit<FetchReportPageOptions, "signal" | "baseUrl"> & {
4
4
  apiKey?: string;
5
5
  userId?: string;
6
6
  simulateDelayMs?: number;
@@ -0,0 +1,6 @@
1
+ import type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
2
+ export type DownloadReportPdfOptions = {
3
+ reportId?: string;
4
+ signal?: AbortSignal;
5
+ };
6
+ export declare function createReportPdfDownloader(config: Pick<HttpDashboardContentFetchersConfig, "apiKey" | "userId" | "reportId" | "headers" | "fetchImpl">): (options?: DownloadReportPdfOptions) => Promise<void>;
@@ -0,0 +1,18 @@
1
+ import type { FetchReportPageOptions } from "./fetchReportPage";
2
+ import type { ReportPageDtoByNavId } from "./reportPageTypes";
3
+ export type FullReportDto = {
4
+ report: {
5
+ id: string;
6
+ status?: string | null;
7
+ effective_date?: string | null;
8
+ code?: string | null;
9
+ pdf_url?: string | null;
10
+ pdf_raw_url?: string | null;
11
+ available_pages: readonly string[];
12
+ observations: readonly unknown[];
13
+ };
14
+ pages: ReportPageDtoByNavId;
15
+ };
16
+ export type FetchFullReportOptions = FetchReportPageOptions;
17
+ export declare function buildFullReportUrl(baseUrl: string, reportId?: string): string;
18
+ export declare function fetchFullReport(options: FetchFullReportOptions): Promise<FullReportDto>;
@@ -1,6 +1,8 @@
1
- export { getBuiltInReportPagesApiBaseUrl, getBuiltInReportPagesApiDefaults, mergeReportPagesApiWithBuiltIn, } from "./builtInReportPagesApi";
1
+ export { getBuiltInReportPagesApiBaseUrl } from "./builtInReportPagesApi";
2
2
  export type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
3
3
  export { createHttpDashboardContentFetchers } from "./createHttpDashboardContentFetchers";
4
+ export type { DownloadReportPdfOptions } from "./downloadReportPdf";
5
+ export { createReportPdfDownloader } from "./downloadReportPdf";
4
6
  export type { FetchReportPageOptions } from "./fetchReportPage";
5
7
  export { buildReportPageUrl, fetchReportPage } from "./fetchReportPage";
6
8
  export { mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, } from "./mapReportPages";
@@ -7,14 +7,13 @@ export declare const TRIAD_RADAR_STYLES: readonly [{
7
7
  readonly fill: "rgb(134 205 149 / 0.35)";
8
8
  readonly stroke: "#5BA86C";
9
9
  }];
10
- export declare const METABOLIC_TRIAD_INTRO: readonly string[];
11
- export declare const LAB_RESULTS_INTRO_BY_TRIAD: Record<number, readonly [string, string, string]>;
12
- export declare const LAB_ANALYSIS_COPY: Record<number, readonly [string, string]>;
10
+ export declare const TRIAD_INTRO_PARAGRAPHS: Record<number, readonly string[]>;
11
+ export declare function triadIntroParagraphs(triadNumber: number): readonly string[];
13
12
  export declare const SCHEDULE_LABELS: readonly [keyof SupplementDto["schedule"], string][];
14
13
  export declare function patientInitials(name: string): string;
15
14
  export declare function formatGender(g?: string | null): string;
16
15
  export declare function formatRange(r: NumericRangeDto | null, unit: string): string;
17
- export declare function formatMetricValue(value: number, unit: string): string;
16
+ export declare function formatMetricValue(value: number | null | undefined, unit: string): string;
18
17
  export declare function mapTrendZone(z?: string | null): QuestionnaireTrendZone;
19
18
  export declare function directionToArrows(direction: string): string;
20
19
  export declare function interpretationStatusLabel(interpretation: string): string;
@@ -1,3 +1,3 @@
1
- export declare const METABOLIC_REPORT_PAGES_API_BASE_URL = "https://mc-api-staging-api.politebay-458989bb.canadacentral.azurecontainerapps.io";
1
+ export declare const METABOLIC_REPORT_PAGES_API_BASE_URL: string;
2
2
  export declare const METABOLIC_DASHBOARD_STUB_API_KEY: string | undefined;
3
3
  export declare function isMetabolicDashboardApiKeyAccepted(apiKey: string | undefined): boolean;
@@ -16,24 +16,35 @@ export type DashboardPageDto = {
16
16
  max: number;
17
17
  } | null;
18
18
  labs_last_date?: string | null;
19
+ questionnaire_last_date?: string | null;
20
+ wearable_last_activity?: string | null;
19
21
  triads: readonly DashboardTriadDto[];
20
22
  lab_metrics: readonly DashboardLabMetricDto[];
21
23
  };
22
24
  export type DashboardTriadDto = {
23
25
  number: number;
24
26
  name: string;
25
- organs: readonly {
26
- name: string;
27
- normalized_score: number;
28
- }[];
27
+ total_score?: number | null;
28
+ lab_score?: number | null;
29
+ survey_score?: number | null;
30
+ interpretation?: string | null;
31
+ organs: readonly DashboardOrganDto[];
32
+ };
33
+ export type DashboardOrganDto = {
34
+ name: string;
35
+ total_score?: number | null;
36
+ lab_score?: number | null;
37
+ survey_score?: number | null;
38
+ interpretation?: string | null;
29
39
  };
30
40
  export type DashboardLabMetricDto = {
31
41
  name: string;
32
- value: number;
33
- unit: string;
42
+ value?: number | null;
43
+ unit?: string | null;
44
+ interpretation?: string | null;
34
45
  normal_range: NumericRangeDto | null;
35
46
  treatment_range: NumericRangeDto | null;
36
- indicator_percent: number;
47
+ indicator_percent?: number | null;
37
48
  };
38
49
  export type TotalPredictiveIndexPageDto = {
39
50
  triads: readonly TotalPredictiveTriadDto[];
@@ -60,6 +71,7 @@ export type WellnessIndicatorsPageDto = {
60
71
  export type WellnessIndicatorDto = {
61
72
  name: string;
62
73
  score: number;
74
+ interpretation?: string | null;
63
75
  zones: {
64
76
  low: {
65
77
  min: number;
@@ -117,21 +129,23 @@ export type LabResultsGroupDto = {
117
129
  };
118
130
  export type LabResultsMetricDto = {
119
131
  name: string;
120
- value: number;
121
- unit: string;
132
+ value?: number | null;
133
+ unit?: string | null;
122
134
  normal_range: NumericRangeDto | null;
123
135
  treatment_range: NumericRangeDto | null;
124
136
  previous_value?: number | null;
125
- indicator_percent: number;
137
+ indicator_percent?: number | null;
126
138
  interpretation?: string | null;
127
139
  };
128
140
  export type SuggestedProductsPageDto = {
129
- triad_number: number;
130
- triad_name: string;
141
+ triad_number?: number | null;
142
+ triad_name?: string | null;
131
143
  organ_metrics: readonly {
132
144
  name: string;
133
145
  score: number;
134
146
  indicator_percent: number;
147
+ normal_range: NumericRangeDto | null;
148
+ previous_score: number | null;
135
149
  }[];
136
150
  symptoms: readonly string[];
137
151
  products: readonly {
@@ -164,11 +178,11 @@ export type AlertLabSummaryPageDto = {
164
178
  };
165
179
  export type AlertLabMetricDto = {
166
180
  name: string;
167
- value: number;
168
- unit: string;
169
- interpretation: string;
170
- normal_range: NumericRangeDto;
171
- indicator_percent: number;
181
+ value?: number | null;
182
+ unit?: string | null;
183
+ interpretation?: string | null;
184
+ normal_range: NumericRangeDto | null;
185
+ indicator_percent?: number | null;
172
186
  };
173
187
  export type ReportPageDtoByNavId = {
174
188
  dashboard: DashboardPageDto;
@@ -0,0 +1,6 @@
1
+ export type DashboardActions = {
2
+ onExportReports?: () => void | Promise<void>;
3
+ onNavigateToNavItem?: (navItemId: string) => void;
4
+ };
5
+ export declare function useDashboardActions(): DashboardActions;
6
+ export declare const DashboardActionsProvider: import("react").Provider<DashboardActions>;
@@ -1,6 +1,6 @@
1
1
  export type { MetabolicDashboardProps } from "../layout";
2
- export type { AlertLabMetricDto, AlertLabSummaryPageDto, DashboardPageDto, FetchReportPageOptions, HttpDashboardContentFetchersConfig, LabAnalysisPageDto, LabResultsPageDto, QuestionnaireAnalysisPageDto, ReportPageDtoByNavId, ReportPageDtoFor, ReportPageNavKey, SuggestedProductsPageDto, SupplementSchedulePageDto, TotalPredictiveIndexPageDto, WellnessIndicatorsPageDto, } from "./api";
3
- export { buildReportPageUrl, createHttpDashboardContentFetchers, fetchReportPage, getBuiltInReportPagesApiBaseUrl, getBuiltInReportPagesApiDefaults, isMetabolicDashboardApiKeyAccepted, METABOLIC_DASHBOARD_STUB_API_KEY, METABOLIC_REPORT_PAGES_API_BASE_URL, mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, mergeReportPagesApiWithBuiltIn, } from "./api";
2
+ export type { AlertLabMetricDto, AlertLabSummaryPageDto, DashboardPageDto, DownloadReportPdfOptions, FetchReportPageOptions, HttpDashboardContentFetchersConfig, LabAnalysisPageDto, LabResultsPageDto, QuestionnaireAnalysisPageDto, ReportPageDtoByNavId, ReportPageDtoFor, ReportPageNavKey, SuggestedProductsPageDto, SupplementSchedulePageDto, TotalPredictiveIndexPageDto, WellnessIndicatorsPageDto, } from "./api";
3
+ export { buildReportPageUrl, createHttpDashboardContentFetchers, createReportPdfDownloader, fetchReportPage, getBuiltInReportPagesApiBaseUrl, isMetabolicDashboardApiKeyAccepted, METABOLIC_DASHBOARD_STUB_API_KEY, METABOLIC_REPORT_PAGES_API_BASE_URL, mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, } from "./api";
4
4
  export { mergeDashboardContentFetchers } from "./dashboardContentFetchers";
5
5
  export type { DashboardTabContentCacheContextValue } from "./dashboardTab/DashboardTabContentCacheContext";
6
6
  export { DashboardTabContentCacheProvider, DEFAULT_DASHBOARD_TAB_CONTENT_CACHE_TTL_MS, useInvalidateDashboardTabContentCache, } from "./dashboardTab/DashboardTabContentCacheContext";
@@ -1,12 +1,13 @@
1
1
  import type { MetabolicDashboardProps } from "../../layout";
2
2
  import type { DashboardContentFetchers } from "../dashboardTab/dashboardTabModel";
3
- type UseMetabolicDashboardResolvedContentSourcesArgs = Pick<MetabolicDashboardProps, "config" | "apiKey" | "dashboardContentFetchers" | "content" | "renderMainContent" | "dashboardTabContentCacheTtlMs"> & {
3
+ type UseMetabolicDashboardResolvedContentSourcesArgs = Pick<MetabolicDashboardProps, "config" | "apiKey" | "reportHttpConfig" | "dashboardContentFetchers" | "onExportReports" | "content" | "renderMainContent" | "dashboardTabContentCacheTtlMs"> & {
4
4
  simulationReportId: string | undefined;
5
5
  };
6
- export declare function useMetabolicDashboardResolvedContentSources({ config: configPartial, apiKey: apiKeyProp, dashboardContentFetchers, content, renderMainContent, dashboardTabContentCacheTtlMs, simulationReportId, }: UseMetabolicDashboardResolvedContentSourcesArgs): {
6
+ export declare function useMetabolicDashboardResolvedContentSources({ config: configPartial, apiKey: apiKeyProp, reportHttpConfig, dashboardContentFetchers, onExportReports, content, renderMainContent, dashboardTabContentCacheTtlMs, simulationReportId, }: UseMetabolicDashboardResolvedContentSourcesArgs): {
7
7
  apiKeyAccepted: boolean;
8
8
  useDefaultTabData: boolean;
9
9
  resolvedDashboardContentFetchers: DashboardContentFetchers;
10
+ resolvedExportReports: (() => void | Promise<void>) | ((options?: import("..").DownloadReportPdfOptions) => Promise<void>);
10
11
  resolvedCacheTtlMs: number;
11
12
  };
12
13
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { ButtonHTMLAttributes, ReactNode } from "react";
2
- export type ButtonVariant = "default" | "soft" | "sideMenu" | "sideMenuFooter" | "trendRowStatusOptimal" | "trendRowStatusHigh" | "trendRowStatusLow";
2
+ export type ButtonVariant = "default" | "soft" | "sideMenu" | "sideMenuFooter" | "trendRowStatusOptimal" | "trendRowStatusTrending" | "trendRowStatusHigh" | "trendRowStatusLow";
3
3
  export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
4
4
  className?: string;
5
5
  children?: ReactNode;
@@ -0,0 +1,4 @@
1
+ import type { DashboardTabContent } from "../dashboard/data";
2
+ export declare function AlertLabSummarySection({ data, }: {
3
+ data: NonNullable<DashboardTabContent["alertLabSummaryTable"]>;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { DashboardAlertLabTableRowContent, DashboardTriadTrendCategoryRowContent } from "../dashboard/data";
2
+ export declare function CategoryTableRow({ row, }: {
3
+ row: DashboardTriadTrendCategoryRowContent | DashboardAlertLabTableRowContent;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export type DashboardLabSectionHeaderProps = {
2
+ sectionTitle: string;
3
+ infoTooltip: string;
4
+ infoAriaLabel: string;
5
+ lastLabsCaption?: string;
6
+ lastLabsLabel: string;
7
+ viewAllLabel: string;
8
+ onViewAllClick?: () => void;
9
+ };
10
+ export declare function DashboardLabSectionHeader({ sectionTitle, infoTooltip, infoAriaLabel, lastLabsCaption, lastLabsLabel, viewAllLabel, onViewAllClick, }: DashboardLabSectionHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { DashboardTotalPredictiveTrendsContent } from "../dashboard/data";
2
+ export declare function TotalPredictiveTrendSnapshotSection({ data, }: {
3
+ data: DashboardTotalPredictiveTrendsContent;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { DashboardTotalPredictiveTrendsContent } from "../dashboard/data";
2
+ export declare function TotalPredictiveTrendsSection({ data }: {
3
+ data: DashboardTotalPredictiveTrendsContent;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { DashboardTotalPredictiveTrendsContent } from "../dashboard/data";
2
+ export declare const FALLBACK_TOTAL_PREDICTIVE_TREND_SNAPSHOT: DashboardTotalPredictiveTrendsContent;
@@ -1,4 +1,4 @@
1
1
  import type { DashboardTabContent } from "../dashboard/data";
2
2
  export declare function DashboardTab({ content }: {
3
- content: DashboardTabContent;
4
- }): import("react/jsx-runtime").JSX.Element;
3
+ content?: DashboardTabContent;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  import type { LabResultsTabContent } from "../dashboard/data";
2
2
  export type { LabResultsTabContent } from "../dashboard/data";
3
3
  export declare function LabResultsTab({ content }: {
4
- content: LabResultsTabContent;
5
- }): import("react/jsx-runtime").JSX.Element;
4
+ content?: LabResultsTabContent;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -2,4 +2,4 @@ import type { SuggestedProductsTabContent } from "../dashboard/data";
2
2
  export type { SuggestedProductItemContent, SuggestedProductsTabContent, } from "../dashboard/data";
3
3
  export declare function SuggestedProductsTab({ content }: {
4
4
  content?: SuggestedProductsTabContent;
5
- }): import("react/jsx-runtime").JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -2,4 +2,4 @@ import type { SupplementScheduleTabContent } from "../dashboard/data";
2
2
  export type { PractitionerNotesContent, SupplementScheduleCardContent, SupplementScheduleRowContent, SupplementScheduleTabContent, } from "../dashboard/data";
3
3
  export declare function SupplementScheduleTab({ content }: {
4
4
  content?: SupplementScheduleTabContent;
5
- }): import("react/jsx-runtime").JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ export type GradientRangeBarStop = {
2
+ color: string;
3
+ position: number;
4
+ };
5
+ export type GradientRangeBarProps = {
6
+ stops: readonly GradientRangeBarStop[];
7
+ indicatorPercent: number;
8
+ showIndicator?: boolean;
9
+ labels?: readonly string[];
10
+ barHeight?: number;
11
+ };
12
+ export declare const OVERALL_SCORE_GRADIENT_STOPS: readonly GradientRangeBarStop[];
13
+ export declare const OVERALL_SCORE_LABELS: readonly ["0", "20", "40", "60", "80", "100"];
14
+ export declare function GradientRangeBar({ stops, indicatorPercent, showIndicator, labels, barHeight, }: GradientRangeBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  export type { DashboardCardSectionHeaderProps } from "./DashboardCardSectionHeader";
2
2
  export { DashboardCardSectionHeader } from "./DashboardCardSectionHeader";
3
+ export type { GradientRangeBarProps, GradientRangeBarStop } from "./GradientRangeBar";
4
+ export { GradientRangeBar, OVERALL_SCORE_GRADIENT_STOPS, OVERALL_SCORE_LABELS, } from "./GradientRangeBar";
3
5
  export { MetabolicScoreBar } from "./MetabolicScoreBar";
4
6
  export { MetaflammationGauge } from "./MetaflammationGauge";
5
7
  export { PractitionerNoteRow } from "./PractitionerNoteRow";
@@ -1,5 +1,6 @@
1
1
  export type ProfileSummaryRow = readonly [string, string];
2
- export declare function ProfileSummaryCard({ initials, rows, }: {
2
+ export declare function ProfileSummaryCard({ heading, initials, rows, }: {
3
+ heading?: string;
3
4
  initials: string;
4
5
  rows?: readonly ProfileSummaryRow[];
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,3 @@
1
1
  export declare const dashboardIconButtonClass = "rounded-full p-0.5 text-[color:var(--mb-color-text-muted)] transition hover:text-[color:var(--mb-color-text)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--mb-color-focus-ring)]";
2
2
  export declare const dashboardCardInlineButtonClass = "whitespace-nowrap !border-[color:var(--mb-color-card-inline-button-border)] !bg-[color:var(--mb-color-card-inline-button-bg)] !px-3 !py-2 !text-sm !font-medium !text-[color:var(--mb-color-card-inline-button-text)] [&_svg]:!text-[color:var(--mb-color-card-inline-button-text)] !shadow-none hover:!bg-[color:var(--mb-color-card-inline-button-hover)]";
3
+ export declare const dashboardOutlineButtonClass = "whitespace-nowrap !border-[color:var(--mb-color-card-border)] !bg-transparent !px-3 !py-2 !text-sm !font-medium !text-[color:var(--mb-color-text)] [&_svg]:!text-[color:var(--mb-color-text)] !shadow-none transition-[background-color,border-color] duration-150 ease-out hover:!border-[color:var(--mb-color-button-border)] hover:!bg-[color:var(--mb-color-card-inline-button-hover)] disabled:hover:!border-[color:var(--mb-color-card-border)] disabled:hover:!bg-transparent";
@@ -52,7 +52,7 @@ export type LabMetricRangeCardContent = {
52
52
  infoTooltip?: string;
53
53
  downloadAriaLabel: string;
54
54
  };
55
- export type DashboardTrendStatus = "optimal" | "high" | "low";
55
+ export type DashboardTrendStatus = "optimal" | "trending" | "high" | "low";
56
56
  export type DashboardTriadTrendChipContent = {
57
57
  triadNumber: number;
58
58
  name: string;
@@ -95,21 +95,21 @@ export type DashboardAlertLabSummaryTableContent = {
95
95
  viewAllLabel: string;
96
96
  rows: readonly DashboardAlertLabTableRowContent[];
97
97
  };
98
+ export type DashboardPatientSummaryRow = readonly [string, string];
99
+ export type DashboardPatientSummaryContent = {
100
+ patientName: string;
101
+ initials: string;
102
+ rows: readonly DashboardPatientSummaryRow[];
103
+ };
98
104
  export type DashboardTabContent = {
99
105
  pageHeader: {
100
106
  title: string;
101
107
  subtitle: string;
102
108
  };
103
- profile?: {
104
- initials: string;
105
- rows: ReadonlyArray<readonly [string, string]>;
106
- };
107
- welcome: DashboardWelcomeContent;
108
- overallScore: DashboardOverallScoreContent;
109
+ patientSummary?: DashboardPatientSummaryContent;
110
+ welcome?: DashboardWelcomeContent;
111
+ overallScore?: DashboardOverallScoreContent;
109
112
  metaflammation?: DashboardMetaflammationContent;
110
- metabolicTriadIntroParagraphs: readonly string[];
111
- triadReports: readonly TriadRadarReportContent[];
112
- labMetrics: readonly LabMetricRangeCardContent[];
113
113
  totalPredictiveTrends?: DashboardTotalPredictiveTrendsContent;
114
114
  alertLabSummaryTable?: DashboardAlertLabSummaryTableContent;
115
115
  };
@@ -234,7 +234,7 @@ export type LabResultsTabContent = {
234
234
  title: string;
235
235
  subtitle: string;
236
236
  };
237
- intro: LabResultsIntroContent;
237
+ intro?: LabResultsIntroContent;
238
238
  groups: readonly LabResultsGroupContent[];
239
239
  };
240
240
  export type SuggestedProductItemContent = {
@@ -248,7 +248,7 @@ export type SuggestedProductsTabContent = {
248
248
  title: string;
249
249
  subtitle: string;
250
250
  };
251
- intro: LabResultsIntroContent;
251
+ intro?: LabResultsIntroContent;
252
252
  labSectionTitle: string;
253
253
  labMetrics: readonly LabResultsMetricContent[];
254
254
  symptomsSectionTitle: string;
@@ -267,8 +267,8 @@ export type LabAnalysisSectionContent = {
267
267
  systemsBanner: string;
268
268
  markers: readonly LabAnalysisMarkerRowContent[];
269
269
  trendZone: QuestionnaireTrendZone;
270
- descriptionPrimary: string;
271
- descriptionSecondary: string;
270
+ descriptionPrimary?: string;
271
+ descriptionSecondary?: string;
272
272
  };
273
273
  export type LabAnalysisTabContent = {
274
274
  pageHeader: {
@@ -1,2 +1,2 @@
1
1
  export type { TriadTrendBarConfig, TriadTrendBarMapping } from "../triadTrendIndicator";
2
- export type { AlertLabSummaryCardContent, AlertLabSummaryPairRowContent, AlertLabSummaryTabContent, DashboardAlertLabSummaryTableContent, DashboardAlertLabTableRowContent, DashboardMetaflammationContent, DashboardOverallScoreContent, DashboardTabContent, DashboardTotalPredictiveTrendsContent, DashboardTrendStatus, DashboardTriadTrendCategoryRowContent, DashboardTriadTrendChipContent, DashboardWelcomeContent, LabAnalysisMarkerRowContent, LabAnalysisSectionContent, LabAnalysisTabContent, LabMetricRangeCardContent, LabResultsGroupContent, LabResultsIntroContent, LabResultsMetricContent, LabResultsTabContent, PractitionerNotesContent, QuestionnaireAnalysisSectionContent, QuestionnaireAnalysisTabContent, QuestionnaireCategoryContent, QuestionnaireTrendZone, SuggestedProductItemContent, SuggestedProductsTabContent, SupplementScheduleCardContent, SupplementScheduleRowContent, SupplementScheduleTabContent, TotalPredictiveIndexTabContent, TriadRadarReportContent, TriadResiliencyCardContent, TriadResiliencyCategoryContent, WelcomeActionId, WellnessIndicatorCardContent, WellnessIndicatorsTabContent, WellnessIndicatorZoneBounds, WellnessIndicatorZones, } from "./contentTypes";
2
+ export type { AlertLabSummaryCardContent, AlertLabSummaryPairRowContent, AlertLabSummaryTabContent, DashboardAlertLabSummaryTableContent, DashboardAlertLabTableRowContent, DashboardMetaflammationContent, DashboardOverallScoreContent, DashboardPatientSummaryContent, DashboardPatientSummaryRow, DashboardTabContent, DashboardTotalPredictiveTrendsContent, DashboardTrendStatus, DashboardTriadTrendCategoryRowContent, DashboardTriadTrendChipContent, DashboardWelcomeContent, LabAnalysisMarkerRowContent, LabAnalysisSectionContent, LabAnalysisTabContent, LabMetricRangeCardContent, LabResultsGroupContent, LabResultsIntroContent, LabResultsMetricContent, LabResultsTabContent, PractitionerNotesContent, QuestionnaireAnalysisSectionContent, QuestionnaireAnalysisTabContent, QuestionnaireCategoryContent, QuestionnaireTrendZone, SuggestedProductItemContent, SuggestedProductsTabContent, SupplementScheduleCardContent, SupplementScheduleRowContent, SupplementScheduleTabContent, TotalPredictiveIndexTabContent, TriadRadarReportContent, TriadResiliencyCardContent, TriadResiliencyCategoryContent, WelcomeActionId, WellnessIndicatorCardContent, WellnessIndicatorsTabContent, WellnessIndicatorZoneBounds, WellnessIndicatorZones, } from "./contentTypes";
@@ -5,7 +5,7 @@ export { Button } from "./Button";
5
5
  export { DashboardTab } from "./DashboardTab";
6
6
  export { DashboardTabSkeleton } from "./DashboardTab/DashboardTabSkeleton";
7
7
  export { MetabolicTriadCategoryPanelSkeleton, type MetabolicTriadCategoryPanelSkeletonProps, } from "./dashboard/components/sections/MetabolicTriadCategoryPanelSkeleton";
8
- export type { AlertLabSummaryCardContent, AlertLabSummaryPairRowContent, DashboardAlertLabSummaryTableContent, DashboardAlertLabTableRowContent, DashboardMetaflammationContent, DashboardOverallScoreContent, DashboardTabContent, DashboardTotalPredictiveTrendsContent, DashboardTrendStatus, DashboardTriadTrendCategoryRowContent, DashboardTriadTrendChipContent, DashboardWelcomeContent, LabAnalysisMarkerRowContent, LabAnalysisSectionContent, LabMetricRangeCardContent, LabResultsGroupContent, LabResultsIntroContent, LabResultsMetricContent, PractitionerNotesContent, QuestionnaireAnalysisSectionContent, QuestionnaireCategoryContent, QuestionnaireTrendZone, SupplementScheduleCardContent, SupplementScheduleRowContent, TriadRadarReportContent, TriadResiliencyCardContent, TriadResiliencyCategoryContent, TriadTrendBarConfig, TriadTrendBarMapping, WelcomeActionId, WellnessIndicatorCardContent, WellnessIndicatorZoneBounds, WellnessIndicatorZones, } from "./dashboard/data";
8
+ export type { AlertLabSummaryCardContent, AlertLabSummaryPairRowContent, DashboardAlertLabSummaryTableContent, DashboardAlertLabTableRowContent, DashboardMetaflammationContent, DashboardOverallScoreContent, DashboardPatientSummaryContent, DashboardPatientSummaryRow, DashboardTabContent, DashboardTotalPredictiveTrendsContent, DashboardTrendStatus, DashboardTriadTrendCategoryRowContent, DashboardTriadTrendChipContent, DashboardWelcomeContent, LabAnalysisMarkerRowContent, LabAnalysisSectionContent, LabMetricRangeCardContent, LabResultsGroupContent, LabResultsIntroContent, LabResultsMetricContent, PractitionerNotesContent, QuestionnaireAnalysisSectionContent, QuestionnaireCategoryContent, QuestionnaireTrendZone, SupplementScheduleCardContent, SupplementScheduleRowContent, TriadRadarReportContent, TriadResiliencyCardContent, TriadResiliencyCategoryContent, TriadTrendBarConfig, TriadTrendBarMapping, WelcomeActionId, WellnessIndicatorCardContent, WellnessIndicatorZoneBounds, WellnessIndicatorZones, } from "./dashboard/data";
9
9
  export { LabAnalysisTab, type LabAnalysisTabContent, } from "./LabAnalysisTab";
10
10
  export { LabAnalysisTabSkeleton } from "./LabAnalysisTab/LabAnalysisTabSkeleton";
11
11
  export { LabResultsTab, type LabResultsTabContent, } from "./LabResultsTab";