diff --git a/docs/site-map.md b/docs/site-map.md index 90a90483f..dfe1d7a2c 100644 --- a/docs/site-map.md +++ b/docs/site-map.md @@ -553,6 +553,7 @@ This file is generated by `npm run sitemap:update`. Run `npm run sitemap:check` - `/mockups/settings-search-clinical` - Route discovered from app directory Source: `src/app/mockups/settings-search-clinical/page.tsx`. - `/mockups/settings-search-general` - Route discovered from app directory Source: `src/app/mockups/settings-search-general/page.tsx`. - `/mockups/settings-search-privacy` - Route discovered from app directory Source: `src/app/mockups/settings-search-privacy/page.tsx`. +- `/mockups/therapy-compass` - Route discovered from app directory Source: `src/app/mockups/therapy-compass/page.tsx`. - `/mockups/tools-action-workbench` - Route discovered from app directory Source: `src/app/mockups/tools-action-workbench/page.tsx`. - `/mockups/tools-clinical-lanes` - Route discovered from app directory Source: `src/app/mockups/tools-clinical-lanes/page.tsx`. - `/mockups/tools-command-center` - Route discovered from app directory Source: `src/app/mockups/tools-command-center/page.tsx`. diff --git a/src/app/mockups/mockups-layout-client.tsx b/src/app/mockups/mockups-layout-client.tsx index 7ae81f3bf..f498a929e 100644 --- a/src/app/mockups/mockups-layout-client.tsx +++ b/src/app/mockups/mockups-layout-client.tsx @@ -13,6 +13,10 @@ export function MockupsLayoutClient({ children }: { children: ReactNode }) { const isSourceOverlayRedesignMockup = pathname === "/mockups/document-search/source-overlays"; const isStandaloneDocumentFlow = pathname === "/mockups/document-search"; const isUniversalSearchRedesignMockup = pathname === "/mockups/universal-search-redesign"; + // Therapy Compass keeps the universal header + rail but provides its own + // primary search surface, so the shared bottom composer is hidden (as with + // the tools/favourites mockups). + const isTherapyCompassMockup = pathname.startsWith("/mockups/therapy-compass"); return ( diff --git a/src/app/mockups/therapy-compass/page.tsx b/src/app/mockups/therapy-compass/page.tsx new file mode 100644 index 000000000..95bf7d331 --- /dev/null +++ b/src/app/mockups/therapy-compass/page.tsx @@ -0,0 +1,13 @@ +import type { Metadata } from "next"; + +import { TherapyCompassPage } from "@/components/therapy-compass"; + +export const metadata: Metadata = { + title: "Therapy Compass Mockup - Clinical KB", + description: + "Source-grounded therapy decision-support mockup: search, compare, recommend, pathways, brief interventions and patient sheets.", +}; + +export default function TherapyCompassMockupRoute() { + return ; +} diff --git a/src/components/therapy-compass/bindings.tsx b/src/components/therapy-compass/bindings.tsx new file mode 100644 index 000000000..aac521778 --- /dev/null +++ b/src/components/therapy-compass/bindings.tsx @@ -0,0 +1,269 @@ +"use client"; + +import { createContext, useContext, useMemo, useState, type CSSProperties, type ReactNode } from "react"; + +import { s } from "./style-utils"; + +// The eight first-class Therapy Compass screens. Anything else (e.g. the +// Review Queue) falls through to the shared "Other" placeholder, mirroring the +// design's `isOther` branch. +const KNOWN_SCREENS = ["search", "detail", "compare", "recommend", "pathways", "brief", "home", "sheets"] as const; + +type SheetSectionKey = "about" | "steps" | "practice" | "coping" | "contacts"; + +/** + * Every value the ported screen JSX references as `b.`. The names and + * semantics are a 1:1 mirror of the design export's `renderVals()` so the + * converted markup binds without edits — screen navigation, comparison tabs, + * density, brief tabs, patient-sheet tone/sections and the clinician toggle. + */ +export type TcBindings = { + // navigation + goHome: () => void; + goSearch: () => void; + goRecommend: () => void; + goCompare: () => void; + goPathways: () => void; + goBrief: () => void; + goSheets: () => void; + goDetail: () => void; + goReview: () => void; + // active-screen flags + isSearch: boolean; + isDetail: boolean; + isCompare: boolean; + isRecommend: boolean; + isPathways: boolean; + isBrief: boolean; + isHome: boolean; + isSheets: boolean; + isOther: boolean; + otherLabel: string; + // sidebar nav styling + navHome: CSSProperties; + navSearch: CSSProperties; + navRecommend: CSSProperties; + navCompare: CSSProperties; + navPathways: CSSProperties; + navBrief: CSSProperties; + navSheets: CSSProperties; + navReview: CSSProperties; + // comparison tabs + density + cmpTab: string; + tabPriorities: CSSProperties; + tabDifferences: CSSProperties; + tabAll: CSSProperties; + setTabPriorities: () => void; + setTabDifferences: () => void; + setTabAll: () => void; + density: string; + segComfortable: CSSProperties; + segDense: CSSProperties; + setComfortable: () => void; + setDense: () => void; + // brief-intervention tabs + briefTab: string; + brief5: CSSProperties; + brief15: CSSProperties; + briefGround: CSSProperties; + set5: () => void; + set15: () => void; + setGround: () => void; + // patient-sheet tone + tonePlain: CSSProperties; + toneWarm: CSSProperties; + toneClinical: CSSProperties; + setTonePlain: () => void; + setToneWarm: () => void; + setToneClinical: () => void; + // patient-sheet section toggles + secAbout: boolean; + secSteps: boolean; + secPractice: boolean; + secCoping: boolean; + secContacts: boolean; + chipAbout: CSSProperties; + chipSteps: CSSProperties; + chipPractice: CSSProperties; + chipCoping: CSSProperties; + chipContacts: CSSProperties; + toggleAbout: () => void; + toggleSteps: () => void; + togglePractice: () => void; + toggleCoping: () => void; + toggleContacts: () => void; + // clinician footer toggle + sheetClinician: boolean; + toggleClinician: () => void; + clinicianTrack: CSSProperties; + clinicianKnob: CSSProperties; + // patient-sheet print + printSheet: () => void; + // raw screen id (for callers that need it) + screen: string; +}; + +const TcContext = createContext(null); + +function navStyle(active: boolean): CSSProperties { + // Horizontal pill for the in-content tool nav (the mockup's own left rail was + // dropped in favour of the app's universal sidebar). Button resets keep the + // + + + +