@adminide-stack/yantra-mobile 12.0.149-alpha.2 → 12.0.150-alpha.0

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.
@@ -291,8 +291,8 @@ const MOBILE_APP_CATALOG = [
291
291
  label: "Dictate",
292
292
  icon: "microphone-outline",
293
293
  group: "Office",
294
- prompt: "Turn my dictated visit into a SOAP note.",
295
- // A clinician speaks a visit note; it comes back as a SOAP note with what to check.
294
+ prompt: "Turn what I say into notes: a class, a meeting, an idea or a patient visit.",
295
+ // Anyone speaks - a class, a meeting, an idea, a story, a visit - and gets the notes that fit it.
296
296
  nativeRoute: "dictate-native"
297
297
  },
298
298
  {
@@ -1 +1 @@
1
- {"version":3,"file":"mobileAppCatalog.js","sources":["../../../src/features/apps/mobileAppCatalog.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport type { MaterialCommunityIcons } from '@expo/vector-icons';\n\ntype IconName = ComponentProps<typeof MaterialCommunityIcons>['name'];\n\nexport type AppGroupId = 'Create' | 'Office' | 'Automate' | 'Sell' | 'Money' | 'Team' | 'More';\n\nexport type MobileAppItem = {\n key: string;\n label: string;\n icon: IconName;\n group: AppGroupId;\n /** Prompt sent as the first chat turn when the app has no native screen. */\n prompt: string;\n /**\n * Which surface host opens this app, if it has one. `webbuilder` is the\n * historical name of the shared WebView surface shell (`screens/WebBuilder`),\n * which is not web-builder-specific: it takes a `url` route param, mints the\n * system token, injects the bridge + cdecli token, stamps `embed=mobile` and\n * owns the timeout/retry UI. Anything with a deployed surface SPA can use it.\n */\n nativeRoute?:\n | 'webbuilder'\n | 'canvas-native'\n | 'characters-native'\n | 'chat-native'\n | 'billing-native'\n | 'shopping-native'\n | 'travel-native'\n | 'job-search-native'\n | 'resume-native'\n | 'inbox-native'\n | 'study-native'\n | 'local-services-native'\n | 'movies-native'\n | 'expenses-native'\n | 'dictate-native'\n | 'webbuilder-native'\n | 'design-native';\n /**\n * Deployed surface SPA for this app, as the `<slug>-surface` name. Resolved\n * against SURFACE_URL_TEMPLATE so one env var covers every surface and stays\n * per-environment, instead of 20+ near-identical URLs in eas.json.\n *\n * The slug is the SURFACE's name, which is not always the tile key\n * (issue-ticket -> issues, shop -> shopping, notebook -> notebooklm).\n */\n surfaceSlug?: string;\n /**\n * Explicit env override, for the surfaces people actually run locally\n * (design 5174, canvas 5175, webbuilder). Wins over `surfaceSlug`.\n */\n surfaceUrlKey?: 'WEB_BUILDER_URL' | 'CANVAS_SURFACE_URL' | 'DESIGN_SURFACE_URL';\n /**\n * Key of the web tile this native tile replaces in every launcher list.\n * The web entry stays in the catalog (deep links, tests, the WebView\n * lane) but users see one tile per app, the native one, under the\n * shared name. Also the key of a retired tile this one took over from\n * (Posters for Paper 2 Poster). Either way a favorite pinned under the\n * old key carries over to this tile.\n */\n supersedes?: string;\n /**\n * Account chrome, not a product app. Stays in the catalog so drawer /\n * deep-link routing still knows the native host, but never appears as\n * a tile in Apps or the Apps menu.\n */\n hideInLauncher?: boolean;\n};\n\n/**\n * Mobile Apps launcher. Labels, groups, and prompts stay in lockstep with the\n * browser ChatTopBar Apps menu (`packages-modules/account/browser`).\n */\nexport const MOBILE_APP_CATALOG: readonly MobileAppItem[] = [\n {\n key: 'design',\n label: 'Design',\n icon: 'palette-outline',\n group: 'Create',\n prompt: 'Design a 10-slide pitch deck for a coffee subscription startup',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'DESIGN_SURFACE_URL',\n surfaceSlug: 'design',\n },\n {\n key: 'design-native',\n label: 'Design',\n supersedes: 'design',\n icon: 'palette-outline',\n group: 'Create',\n prompt: 'Design a 10-slide pitch deck for a coffee subscription startup',\n // The native design studio (features/design): templates, saved designs and the\n // editor, drawn natively over the same designs as the web Design Studio. No WebView.\n nativeRoute: 'design-native',\n },\n {\n key: 'canvas',\n label: 'Canvas',\n icon: 'view-grid-outline',\n group: 'Create',\n prompt: 'Open a canvas and help me lay out the assets for this project.',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'CANVAS_SURFACE_URL',\n surfaceSlug: 'canvas',\n },\n {\n key: 'canvas-native',\n label: 'Canvas',\n supersedes: 'canvas',\n icon: 'vector-square',\n group: 'Create',\n prompt: 'Open a canvas and help me lay out the assets for this project.',\n // Renders through Module Federation: the viewer downloads from the\n // canvas-surface origin on open. First native surface; the classic\n // Canvas tile keeps the full web editor in the WebView host.\n nativeRoute: 'canvas-native',\n },\n {\n key: 'webbuilder',\n label: 'Web Builder',\n icon: 'application-outline',\n group: 'Create',\n prompt: 'Build a landing page for my bakery with a menu and a contact form',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'WEB_BUILDER_URL',\n surfaceSlug: 'webbuilder',\n },\n {\n key: 'webbuilder-native',\n label: 'Web Builder',\n supersedes: 'webbuilder',\n icon: 'application-outline',\n group: 'Create',\n prompt: 'Build a landing page for my bakery with a menu and a contact form',\n // Native web builder over the same projects as the web surface: your sites,\n // build and edit with the agent, live preview, versions, publish.\n nativeRoute: 'webbuilder-native',\n },\n {\n key: 'codezen',\n label: 'Codezen',\n icon: 'code-braces',\n group: 'Create',\n prompt: 'Clone my repository and fix the failing test',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'codezen',\n },\n {\n key: 'character',\n label: 'Characters',\n icon: 'drama-masks',\n group: 'Create',\n prompt: 'Create a stoic philosophy mentor character I can chat with',\n // Native federated experience (gallery -> detail -> chat); the web\n // surface remains reachable through the surface lane if ever needed.\n nativeRoute: 'characters-native',\n surfaceSlug: 'character',\n },\n {\n key: 'characters-native',\n label: 'Characters',\n supersedes: 'character',\n icon: 'account-star',\n group: 'Create',\n prompt: 'Show me characters I can chat with.',\n nativeRoute: 'characters-native',\n surfaceSlug: 'character',\n },\n // Word, Excel, PowerPoint and PDF files, pictures, interface designs and research posters,\n // each in its own browser editor (yantra-office).\n {\n key: 'word',\n label: 'Documents',\n icon: 'file-document-outline',\n group: 'Office',\n prompt: 'Write a one-page project proposal as a Word document',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'word',\n },\n {\n key: 'excel',\n label: 'Spreadsheets',\n icon: 'file-table-outline',\n group: 'Office',\n prompt: 'Make a monthly budget spreadsheet with totals and a chart',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'excel',\n },\n {\n key: 'presentation',\n label: 'Presentations',\n icon: 'presentation',\n group: 'Office',\n prompt: 'Turn my notes into a six-slide project update deck',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'presentation',\n },\n {\n key: 'pdf',\n label: 'PDFs',\n icon: 'file-pdf-box',\n group: 'Office',\n prompt: 'Make a one-page PDF checklist for moving house',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'pdf',\n },\n {\n key: 'photo',\n label: 'Photos',\n icon: 'image-edit-outline',\n group: 'Office',\n prompt: 'Make an Instagram post from a template with our spring sale headline',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'photo',\n },\n {\n key: 'figdesign',\n label: 'FigDesign',\n // The pen tool, not Design's palette or Canvas's vector-square: Design is AI web-design\n // boards and Canvas is media, this is the interface design editor.\n icon: 'fountain-pen-tip',\n group: 'Office',\n prompt: 'Start a mobile app design for my bakery in our brand green, with Light and Dark modes',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'figdesign',\n },\n {\n key: 'poster',\n label: 'Posters',\n // A printed sheet with a headline over its text, as on the web launcher, not\n // Presentations' easel: a poster is one big page, not a deck.\n icon: 'post-outline',\n group: 'Office',\n prompt: 'Turn this research paper into a 48 x 36 inch conference poster I can edit and print.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'poster',\n // Posters replaced Paper 2 Poster: a tile pinned under the old key stays pinned.\n supersedes: 'paper2poster',\n },\n {\n key: 'chat-native',\n label: 'Chats',\n icon: 'message-text-outline',\n group: 'Team',\n prompt: 'Show me my conversations.',\n // Person-to-person messaging, federated like canvas: the whole UI\n // downloads from the chat-native surface on open. Not the AI chat -\n // that is the Home tab.\n nativeRoute: 'chat-native',\n },\n {\n key: 'workflow',\n label: 'Workflow',\n icon: 'sitemap',\n group: 'Automate',\n prompt: 'Build a workflow that runs every morning and sends me a summary of what changed.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'workflow',\n },\n {\n key: 'computer',\n label: 'Computer',\n icon: 'monitor',\n group: 'Automate',\n prompt: 'Open a browser and compare the top 5 CRM tools with screenshots',\n },\n {\n key: 'crm',\n label: 'CRM',\n icon: 'account-group-outline',\n group: 'Sell',\n prompt: 'Look at my pipeline and tell me which deals are going cold and what I should send them.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'crm',\n },\n {\n key: 'salesiq',\n label: 'SalesIQ',\n icon: 'radar',\n group: 'Sell',\n prompt: 'Show me who is on my website right now',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'salesiq',\n },\n {\n key: 'inbox',\n label: 'Inbox',\n icon: 'inbox-outline',\n group: 'Sell',\n prompt: 'Go through my inbox, tell me what actually needs a reply, and draft those replies.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'inbox',\n },\n {\n key: 'inbox-native',\n label: 'Inbox',\n supersedes: 'inbox',\n icon: 'inbox-outline',\n group: 'Sell',\n prompt: 'Go through my inbox, tell me what actually needs a reply, and draft those replies.',\n // Native mail client over the same yantra-mailer store as the web Inbox.\n nativeRoute: 'inbox-native',\n },\n {\n key: 'mailcampaign',\n label: 'Mail Campaigns',\n icon: 'bullhorn-outline',\n group: 'Sell',\n prompt: 'Draft an email campaign announcing what we shipped this month.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'mailcampaign',\n },\n {\n key: 'smscampaign',\n label: 'SMS Campaigns',\n icon: 'message-text-outline',\n group: 'Sell',\n prompt: \"Text my customers a short reminder about this week's offer.\",\n nativeRoute: 'webbuilder',\n surfaceSlug: 'smscampaign',\n },\n {\n key: 'social-post',\n label: 'Social Posts',\n icon: 'send-outline',\n group: 'Sell',\n prompt: 'Draft a launch post for X and LinkedIn and schedule it for Tuesday morning.',\n nativeRoute: 'webbuilder',\n // The deployed surface is `posts-surface`, not `social-post-surface`.\n surfaceSlug: 'posts',\n },\n {\n key: 'invoices',\n label: 'Invoices',\n icon: 'cash-check',\n group: 'Money',\n prompt: 'Show me which invoices are still unpaid.',\n // The served Invoices surface (yantra-surface packages/invoices) in the shared WebView.\n nativeRoute: 'webbuilder',\n surfaceSlug: 'invoices',\n },\n {\n key: 'expenses',\n label: 'Expenses',\n icon: 'receipt',\n group: 'Money',\n prompt: 'Summarise my spend this month and flag anything unusual.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'expenses',\n },\n {\n key: 'expenses-native',\n label: 'Expenses',\n supersedes: 'expenses',\n icon: 'receipt',\n group: 'Money',\n prompt: 'Summarise my spend this month and flag anything unusual.',\n // Native expenses over the same expenses subgraph as the web app: scan receipts,\n // approvals, budgets, recurring payments, accounts.\n nativeRoute: 'expenses-native',\n },\n {\n key: 'dictate-native',\n label: 'Dictate',\n icon: 'microphone-outline',\n group: 'Office',\n prompt: 'Turn my dictated visit into a SOAP note.',\n // A clinician speaks a visit note; it comes back as a SOAP note with what to check.\n nativeRoute: 'dictate-native',\n },\n {\n key: 'cards-wallet',\n label: 'Cards & Wallet',\n icon: 'credit-card-outline',\n group: 'Money',\n prompt: 'Issue a $200 virtual card for monthly ad spend',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'cards-wallet',\n },\n {\n key: 'billing',\n label: 'Billing',\n icon: 'currency-usd',\n group: 'Money',\n prompt: 'Create an invoice for a $2,400 consulting project',\n nativeRoute: 'billing-native',\n surfaceSlug: 'billing',\n // Plan / subscription for this account — already in the drawer.\n hideInLauncher: true,\n },\n {\n key: 'kpi-motivation',\n label: 'KPI Motivation',\n icon: 'trophy-outline',\n group: 'Team',\n prompt: 'Set up a weekly sales KPI scoreboard for my team',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'kpi-motivation',\n },\n {\n key: 'issue-ticket',\n label: 'Issue Ticket',\n icon: 'bug-outline',\n group: 'Team',\n prompt: 'Create a bug board and triage my open issues',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'issues',\n },\n {\n key: 'notebook',\n label: 'Study',\n icon: 'school-outline',\n group: 'Team',\n prompt: 'Make a study guide from my lecture notes',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'notebooklm',\n },\n {\n key: 'study-native',\n label: 'Study',\n supersedes: 'notebook',\n icon: 'school-outline',\n group: 'Team',\n prompt: 'Make a study guide from my lecture notes',\n // Native study notebooks over the same yantra-notebook store as the web Study.\n nativeRoute: 'study-native',\n },\n {\n key: 'resume',\n label: 'Resume',\n icon: 'file-account-outline',\n group: 'Team',\n prompt: 'Draft a resume for a senior product designer with 8 years of experience',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'resume',\n },\n {\n key: 'resume-native',\n label: 'Resume',\n supersedes: 'resume',\n icon: 'file-account-outline',\n group: 'Team',\n prompt: 'Draft a resume for a senior product designer with 8 years of experience',\n nativeRoute: 'resume-native',\n },\n {\n key: 'job-search',\n label: 'Job Search',\n icon: 'briefcase-outline',\n group: 'Team',\n prompt: 'Find remote senior backend engineer roles and tailor my resume for one',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'job-search',\n },\n {\n key: 'job-search-native',\n label: 'Job Search',\n supersedes: 'job-search',\n icon: 'briefcase-search-outline',\n group: 'Team',\n prompt: 'Find remote senior backend engineer roles and tailor my resume for one',\n nativeRoute: 'job-search-native',\n },\n {\n key: 'shop',\n label: 'Shop',\n icon: 'cart-outline',\n group: 'More',\n prompt: 'Compare the best options for what I need and show me the tradeoffs.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'shopping',\n },\n {\n key: 'shopping-native',\n label: 'Shop',\n supersedes: 'shop',\n icon: 'storefront-outline',\n group: 'More',\n prompt: 'Compare the best options for what I need and show me the tradeoffs.',\n // Federated storefront: search + cart download from shopping_native/Shop.\n // The classic Shop tile keeps the web surface in the WebView host.\n nativeRoute: 'shopping-native',\n },\n {\n key: 'travel-native',\n label: 'Travel',\n supersedes: 'travel',\n icon: 'airplane-takeoff',\n group: 'More',\n prompt: 'Plan a 4-day trip for me: flights, somewhere to stay, and what to do each day.',\n nativeRoute: 'travel-native',\n },\n {\n key: 'travel',\n label: 'Travel',\n icon: 'airplane',\n group: 'More',\n prompt: 'Plan a 4-day trip for me: flights, somewhere to stay, and what to do each day.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'travel',\n },\n {\n key: 'social-events',\n label: 'yantra.live',\n icon: 'ticket-outline',\n group: 'More',\n prompt: 'What concerts are happening nearby this weekend?',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'social-events',\n },\n {\n key: 'movies',\n label: 'Movies',\n icon: 'popcorn',\n group: 'More',\n prompt: 'What movies are playing near me tonight?',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'movies',\n },\n {\n key: 'movies-native',\n label: 'Movies',\n supersedes: 'movies',\n icon: 'popcorn',\n group: 'More',\n prompt: 'What movies are playing near me tonight?',\n // Native cinema app over the yantra-movies connector: discover, trailers, showtimes, watchlist.\n nativeRoute: 'movies-native',\n },\n {\n key: 'local-services',\n label: 'Local Services',\n icon: 'wrench',\n group: 'More',\n prompt: 'Find an electrician near me',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'local-services',\n },\n {\n key: 'local-services-native',\n label: 'Local Services',\n supersedes: 'local-services',\n icon: 'wrench',\n group: 'More',\n prompt: 'Find an electrician near me',\n // Native search, details and saved pros over the same yantra-local-services\n // connector as the web Local Services surface.\n nativeRoute: 'local-services-native',\n },\n {\n key: 'fitness',\n label: 'Fitness',\n icon: 'dumbbell',\n group: 'More',\n prompt: 'Build me a workout plan for this week',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'fitness',\n },\n];\n\nexport const APP_GROUP_ORDER: readonly AppGroupId[] = ['Create', 'Office', 'Automate', 'Sell', 'Money', 'Team', 'More'];\n\nexport type AppsTab = 'all' | 'favorites';\n\n/**\n * Poster colors per group - the tile artwork. Deliberately the same in light\n * and dark themes: artwork is content, the card chrome is what adapts.\n */\nexport const APP_GROUP_ART: Record<AppGroupId, { base: string; glow: string }> = {\n Create: { base: '#4f46e5', glow: '#c4b5fd' },\n Office: { base: '#334155', glow: '#cbd5e1' },\n Automate: { base: '#0f766e', glow: '#99f6e4' },\n Sell: { base: '#c2410c', glow: '#fed7aa' },\n Money: { base: '#15803d', glow: '#bbf7d0' },\n Team: { base: '#0369a1', glow: '#bae6fd' },\n More: { base: '#be185d', glow: '#fbcfe8' },\n};\n\nexport function matchesAppQuery(label: string, query: string): boolean {\n const q = query.toLowerCase().replace(/[^a-z0-9]/g, '');\n if (!q) return true;\n return label\n .toLowerCase()\n .replace(/[^a-z0-9]/g, '')\n .includes(q);\n}\n\n/**\n * Favorites keyed by a web tile that a native tile now replaces, carried over to\n * the native tile, so pinning \"Inbox\" before it went native still pins it after.\n */\nexport function carryOverSupersededFavorites(\n favorites: ReadonlySet<string>,\n items: readonly MobileAppItem[] = MOBILE_APP_CATALOG,\n): Set<string> {\n const replacement = new Map<string, string>();\n for (const item of items) if (item.supersedes) replacement.set(item.supersedes, item.key);\n const out = new Set<string>();\n for (const key of favorites) out.add(replacement.get(key) ?? key);\n return out;\n}\n\n/** One tile per app: a web tile disappears when its native replacement is in the list. */\nexport function visibleMobileApps(items: readonly MobileAppItem[]): MobileAppItem[] {\n const replaced = new Set(items.map((item) => item.supersedes).filter(Boolean));\n return items.filter((item) => !item.hideInLauncher && !replaced.has(item.key));\n}\n\nexport function groupMobileApps(items: readonly MobileAppItem[], query: string) {\n const hits = visibleMobileApps(items).filter((item) => matchesAppQuery(item.label, query));\n return APP_GROUP_ORDER.map((label) => ({\n label,\n items: hits.filter((item) => item.group === label),\n })).filter((group) => group.items.length > 0);\n}\n\n/**\n * One flat grid (Manus/game-launcher style) instead of grouped sections: rows\n * stay dense and the group reads from each card's caption. Catalog order is\n * kept inside a group; groups follow APP_GROUP_ORDER.\n */\nexport function filterMobileApps(\n items: readonly MobileAppItem[],\n query: string,\n tab: AppsTab,\n favorites: ReadonlySet<string>,\n): MobileAppItem[] {\n const rank = new Map(APP_GROUP_ORDER.map((group, index) => [group, index]));\n return visibleMobileApps(items)\n .filter((item) => matchesAppQuery(item.label, query))\n .filter((item) => tab !== 'favorites' || favorites.has(item.key))\n .sort((a, b) => (rank.get(a.group) ?? APP_GROUP_ORDER.length) - (rank.get(b.group) ?? APP_GROUP_ORDER.length));\n}\n"],"names":[],"mappings":"AAsDO,MAAM,kBAA+C,GAAA;AAAA,EAAC;AAAA,IAC3D,GAAK,EAAA,QAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA,IACR,WAAa,EAAA,YAAA;AAAA,IACb,aAAe,EAAA,oBAAA;AAAA,IACf,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;AAAA,IACD,GAAK,EAAA,eAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,UAAY,EAAA,QAAA;AAAA,IACZ,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA;AAAA;AAAA,IAGR,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;AAAA,IACD,GAAK,EAAA,QAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,IAAM,EAAA,mBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA,IACR,WAAa,EAAA,YAAA;AAAA,IACb,aAAe,EAAA,oBAAA;AAAA,IACf,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;AAAA,IACD,GAAK,EAAA,eAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,UAAY,EAAA,QAAA;AAAA,IACZ,IAAM,EAAA,eAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA;AAAA;AAAA;AAAA,IAIR,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;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,GAAA,EAAc,SAAiD,EAAA;AAC9I,EAAA,MAAM,IAAO,GAAA,IAAI,GAAI,CAAA,eAAA,CAAgB,GAAI,CAAA,CAAC,KAAO,EAAA,KAAA,KAAU,CAAC,KAAA,EAAO,KAAK,CAAC,CAAC,CAAA;AAC1E,EAAO,OAAA,iBAAA,CAAkB,KAAK,CAAA,CAAE,MAAO,CAAA,CAAA,IAAA,KAAQ,gBAAgB,IAAK,CAAA,KAAA,EAAO,KAAK,CAAC,CAAE,CAAA,MAAA,CAAO,UAAQ,GAAQ,KAAA,WAAA,IAAe,SAAU,CAAA,GAAA,CAAI,IAAK,CAAA,GAAG,CAAC,CAAE,CAAA,IAAA,CAAK,CAAC,CAAA,EAAG,CAAG,KAAA;AAxjBhK,IAAA,IAAA,EAAA,EAAA,EAAA;AAwjBoK,IAAA,OAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAK,GAAI,CAAA,CAAA,CAAE,KAAK,CAAA,KAAhB,IAAqB,GAAA,EAAA,GAAA,eAAA,CAAgB,MAAW,KAAA,CAAA,EAAA,GAAA,IAAA,CAAK,GAAI,CAAA,CAAA,CAAE,KAAK,CAAA,KAAhB,YAAqB,eAAgB,CAAA,MAAA,CAAA;AAAA,GAAO,CAAA;AAChQ"}
1
+ {"version":3,"file":"mobileAppCatalog.js","sources":["../../../src/features/apps/mobileAppCatalog.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport type { MaterialCommunityIcons } from '@expo/vector-icons';\n\ntype IconName = ComponentProps<typeof MaterialCommunityIcons>['name'];\n\nexport type AppGroupId = 'Create' | 'Office' | 'Automate' | 'Sell' | 'Money' | 'Team' | 'More';\n\nexport type MobileAppItem = {\n key: string;\n label: string;\n icon: IconName;\n group: AppGroupId;\n /** Prompt sent as the first chat turn when the app has no native screen. */\n prompt: string;\n /**\n * Which surface host opens this app, if it has one. `webbuilder` is the\n * historical name of the shared WebView surface shell (`screens/WebBuilder`),\n * which is not web-builder-specific: it takes a `url` route param, mints the\n * system token, injects the bridge + cdecli token, stamps `embed=mobile` and\n * owns the timeout/retry UI. Anything with a deployed surface SPA can use it.\n */\n nativeRoute?:\n | 'webbuilder'\n | 'canvas-native'\n | 'characters-native'\n | 'chat-native'\n | 'billing-native'\n | 'shopping-native'\n | 'travel-native'\n | 'job-search-native'\n | 'resume-native'\n | 'inbox-native'\n | 'study-native'\n | 'local-services-native'\n | 'movies-native'\n | 'expenses-native'\n | 'dictate-native'\n | 'webbuilder-native'\n | 'design-native';\n /**\n * Deployed surface SPA for this app, as the `<slug>-surface` name. Resolved\n * against SURFACE_URL_TEMPLATE so one env var covers every surface and stays\n * per-environment, instead of 20+ near-identical URLs in eas.json.\n *\n * The slug is the SURFACE's name, which is not always the tile key\n * (issue-ticket -> issues, shop -> shopping, notebook -> notebooklm).\n */\n surfaceSlug?: string;\n /**\n * Explicit env override, for the surfaces people actually run locally\n * (design 5174, canvas 5175, webbuilder). Wins over `surfaceSlug`.\n */\n surfaceUrlKey?: 'WEB_BUILDER_URL' | 'CANVAS_SURFACE_URL' | 'DESIGN_SURFACE_URL';\n /**\n * Key of the web tile this native tile replaces in every launcher list.\n * The web entry stays in the catalog (deep links, tests, the WebView\n * lane) but users see one tile per app, the native one, under the\n * shared name. Also the key of a retired tile this one took over from\n * (Posters for Paper 2 Poster). Either way a favorite pinned under the\n * old key carries over to this tile.\n */\n supersedes?: string;\n /**\n * Account chrome, not a product app. Stays in the catalog so drawer /\n * deep-link routing still knows the native host, but never appears as\n * a tile in Apps or the Apps menu.\n */\n hideInLauncher?: boolean;\n};\n\n/**\n * Mobile Apps launcher. Labels, groups, and prompts stay in lockstep with the\n * browser ChatTopBar Apps menu (`packages-modules/account/browser`).\n */\nexport const MOBILE_APP_CATALOG: readonly MobileAppItem[] = [\n {\n key: 'design',\n label: 'Design',\n icon: 'palette-outline',\n group: 'Create',\n prompt: 'Design a 10-slide pitch deck for a coffee subscription startup',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'DESIGN_SURFACE_URL',\n surfaceSlug: 'design',\n },\n {\n key: 'design-native',\n label: 'Design',\n supersedes: 'design',\n icon: 'palette-outline',\n group: 'Create',\n prompt: 'Design a 10-slide pitch deck for a coffee subscription startup',\n // The native design studio (features/design): templates, saved designs and the\n // editor, drawn natively over the same designs as the web Design Studio. No WebView.\n nativeRoute: 'design-native',\n },\n {\n key: 'canvas',\n label: 'Canvas',\n icon: 'view-grid-outline',\n group: 'Create',\n prompt: 'Open a canvas and help me lay out the assets for this project.',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'CANVAS_SURFACE_URL',\n surfaceSlug: 'canvas',\n },\n {\n key: 'canvas-native',\n label: 'Canvas',\n supersedes: 'canvas',\n icon: 'vector-square',\n group: 'Create',\n prompt: 'Open a canvas and help me lay out the assets for this project.',\n // Renders through Module Federation: the viewer downloads from the\n // canvas-surface origin on open. First native surface; the classic\n // Canvas tile keeps the full web editor in the WebView host.\n nativeRoute: 'canvas-native',\n },\n {\n key: 'webbuilder',\n label: 'Web Builder',\n icon: 'application-outline',\n group: 'Create',\n prompt: 'Build a landing page for my bakery with a menu and a contact form',\n nativeRoute: 'webbuilder',\n surfaceUrlKey: 'WEB_BUILDER_URL',\n surfaceSlug: 'webbuilder',\n },\n {\n key: 'webbuilder-native',\n label: 'Web Builder',\n supersedes: 'webbuilder',\n icon: 'application-outline',\n group: 'Create',\n prompt: 'Build a landing page for my bakery with a menu and a contact form',\n // Native web builder over the same projects as the web surface: your sites,\n // build and edit with the agent, live preview, versions, publish.\n nativeRoute: 'webbuilder-native',\n },\n {\n key: 'codezen',\n label: 'Codezen',\n icon: 'code-braces',\n group: 'Create',\n prompt: 'Clone my repository and fix the failing test',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'codezen',\n },\n {\n key: 'character',\n label: 'Characters',\n icon: 'drama-masks',\n group: 'Create',\n prompt: 'Create a stoic philosophy mentor character I can chat with',\n // Native federated experience (gallery -> detail -> chat); the web\n // surface remains reachable through the surface lane if ever needed.\n nativeRoute: 'characters-native',\n surfaceSlug: 'character',\n },\n {\n key: 'characters-native',\n label: 'Characters',\n supersedes: 'character',\n icon: 'account-star',\n group: 'Create',\n prompt: 'Show me characters I can chat with.',\n nativeRoute: 'characters-native',\n surfaceSlug: 'character',\n },\n // Word, Excel, PowerPoint and PDF files, pictures, interface designs and research posters,\n // each in its own browser editor (yantra-office).\n {\n key: 'word',\n label: 'Documents',\n icon: 'file-document-outline',\n group: 'Office',\n prompt: 'Write a one-page project proposal as a Word document',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'word',\n },\n {\n key: 'excel',\n label: 'Spreadsheets',\n icon: 'file-table-outline',\n group: 'Office',\n prompt: 'Make a monthly budget spreadsheet with totals and a chart',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'excel',\n },\n {\n key: 'presentation',\n label: 'Presentations',\n icon: 'presentation',\n group: 'Office',\n prompt: 'Turn my notes into a six-slide project update deck',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'presentation',\n },\n {\n key: 'pdf',\n label: 'PDFs',\n icon: 'file-pdf-box',\n group: 'Office',\n prompt: 'Make a one-page PDF checklist for moving house',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'pdf',\n },\n {\n key: 'photo',\n label: 'Photos',\n icon: 'image-edit-outline',\n group: 'Office',\n prompt: 'Make an Instagram post from a template with our spring sale headline',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'photo',\n },\n {\n key: 'figdesign',\n label: 'FigDesign',\n // The pen tool, not Design's palette or Canvas's vector-square: Design is AI web-design\n // boards and Canvas is media, this is the interface design editor.\n icon: 'fountain-pen-tip',\n group: 'Office',\n prompt: 'Start a mobile app design for my bakery in our brand green, with Light and Dark modes',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'figdesign',\n },\n {\n key: 'poster',\n label: 'Posters',\n // A printed sheet with a headline over its text, as on the web launcher, not\n // Presentations' easel: a poster is one big page, not a deck.\n icon: 'post-outline',\n group: 'Office',\n prompt: 'Turn this research paper into a 48 x 36 inch conference poster I can edit and print.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'poster',\n // Posters replaced Paper 2 Poster: a tile pinned under the old key stays pinned.\n supersedes: 'paper2poster',\n },\n {\n key: 'chat-native',\n label: 'Chats',\n icon: 'message-text-outline',\n group: 'Team',\n prompt: 'Show me my conversations.',\n // Person-to-person messaging, federated like canvas: the whole UI\n // downloads from the chat-native surface on open. Not the AI chat -\n // that is the Home tab.\n nativeRoute: 'chat-native',\n },\n {\n key: 'workflow',\n label: 'Workflow',\n icon: 'sitemap',\n group: 'Automate',\n prompt: 'Build a workflow that runs every morning and sends me a summary of what changed.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'workflow',\n },\n {\n key: 'computer',\n label: 'Computer',\n icon: 'monitor',\n group: 'Automate',\n prompt: 'Open a browser and compare the top 5 CRM tools with screenshots',\n },\n {\n key: 'crm',\n label: 'CRM',\n icon: 'account-group-outline',\n group: 'Sell',\n prompt: 'Look at my pipeline and tell me which deals are going cold and what I should send them.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'crm',\n },\n {\n key: 'salesiq',\n label: 'SalesIQ',\n icon: 'radar',\n group: 'Sell',\n prompt: 'Show me who is on my website right now',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'salesiq',\n },\n {\n key: 'inbox',\n label: 'Inbox',\n icon: 'inbox-outline',\n group: 'Sell',\n prompt: 'Go through my inbox, tell me what actually needs a reply, and draft those replies.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'inbox',\n },\n {\n key: 'inbox-native',\n label: 'Inbox',\n supersedes: 'inbox',\n icon: 'inbox-outline',\n group: 'Sell',\n prompt: 'Go through my inbox, tell me what actually needs a reply, and draft those replies.',\n // Native mail client over the same yantra-mailer store as the web Inbox.\n nativeRoute: 'inbox-native',\n },\n {\n key: 'mailcampaign',\n label: 'Mail Campaigns',\n icon: 'bullhorn-outline',\n group: 'Sell',\n prompt: 'Draft an email campaign announcing what we shipped this month.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'mailcampaign',\n },\n {\n key: 'smscampaign',\n label: 'SMS Campaigns',\n icon: 'message-text-outline',\n group: 'Sell',\n prompt: \"Text my customers a short reminder about this week's offer.\",\n nativeRoute: 'webbuilder',\n surfaceSlug: 'smscampaign',\n },\n {\n key: 'social-post',\n label: 'Social Posts',\n icon: 'send-outline',\n group: 'Sell',\n prompt: 'Draft a launch post for X and LinkedIn and schedule it for Tuesday morning.',\n nativeRoute: 'webbuilder',\n // The deployed surface is `posts-surface`, not `social-post-surface`.\n surfaceSlug: 'posts',\n },\n {\n key: 'invoices',\n label: 'Invoices',\n icon: 'cash-check',\n group: 'Money',\n prompt: 'Show me which invoices are still unpaid.',\n // The served Invoices surface (yantra-surface packages/invoices) in the shared WebView.\n nativeRoute: 'webbuilder',\n surfaceSlug: 'invoices',\n },\n {\n key: 'expenses',\n label: 'Expenses',\n icon: 'receipt',\n group: 'Money',\n prompt: 'Summarise my spend this month and flag anything unusual.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'expenses',\n },\n {\n key: 'expenses-native',\n label: 'Expenses',\n supersedes: 'expenses',\n icon: 'receipt',\n group: 'Money',\n prompt: 'Summarise my spend this month and flag anything unusual.',\n // Native expenses over the same expenses subgraph as the web app: scan receipts,\n // approvals, budgets, recurring payments, accounts.\n nativeRoute: 'expenses-native',\n },\n {\n key: 'dictate-native',\n label: 'Dictate',\n icon: 'microphone-outline',\n group: 'Office',\n prompt: 'Turn what I say into notes: a class, a meeting, an idea or a patient visit.',\n // Anyone speaks - a class, a meeting, an idea, a story, a visit - and gets the notes that fit it.\n nativeRoute: 'dictate-native',\n },\n {\n key: 'cards-wallet',\n label: 'Cards & Wallet',\n icon: 'credit-card-outline',\n group: 'Money',\n prompt: 'Issue a $200 virtual card for monthly ad spend',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'cards-wallet',\n },\n {\n key: 'billing',\n label: 'Billing',\n icon: 'currency-usd',\n group: 'Money',\n prompt: 'Create an invoice for a $2,400 consulting project',\n nativeRoute: 'billing-native',\n surfaceSlug: 'billing',\n // Plan / subscription for this account — already in the drawer.\n hideInLauncher: true,\n },\n {\n key: 'kpi-motivation',\n label: 'KPI Motivation',\n icon: 'trophy-outline',\n group: 'Team',\n prompt: 'Set up a weekly sales KPI scoreboard for my team',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'kpi-motivation',\n },\n {\n key: 'issue-ticket',\n label: 'Issue Ticket',\n icon: 'bug-outline',\n group: 'Team',\n prompt: 'Create a bug board and triage my open issues',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'issues',\n },\n {\n key: 'notebook',\n label: 'Study',\n icon: 'school-outline',\n group: 'Team',\n prompt: 'Make a study guide from my lecture notes',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'notebooklm',\n },\n {\n key: 'study-native',\n label: 'Study',\n supersedes: 'notebook',\n icon: 'school-outline',\n group: 'Team',\n prompt: 'Make a study guide from my lecture notes',\n // Native study notebooks over the same yantra-notebook store as the web Study.\n nativeRoute: 'study-native',\n },\n {\n key: 'resume',\n label: 'Resume',\n icon: 'file-account-outline',\n group: 'Team',\n prompt: 'Draft a resume for a senior product designer with 8 years of experience',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'resume',\n },\n {\n key: 'resume-native',\n label: 'Resume',\n supersedes: 'resume',\n icon: 'file-account-outline',\n group: 'Team',\n prompt: 'Draft a resume for a senior product designer with 8 years of experience',\n nativeRoute: 'resume-native',\n },\n {\n key: 'job-search',\n label: 'Job Search',\n icon: 'briefcase-outline',\n group: 'Team',\n prompt: 'Find remote senior backend engineer roles and tailor my resume for one',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'job-search',\n },\n {\n key: 'job-search-native',\n label: 'Job Search',\n supersedes: 'job-search',\n icon: 'briefcase-search-outline',\n group: 'Team',\n prompt: 'Find remote senior backend engineer roles and tailor my resume for one',\n nativeRoute: 'job-search-native',\n },\n {\n key: 'shop',\n label: 'Shop',\n icon: 'cart-outline',\n group: 'More',\n prompt: 'Compare the best options for what I need and show me the tradeoffs.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'shopping',\n },\n {\n key: 'shopping-native',\n label: 'Shop',\n supersedes: 'shop',\n icon: 'storefront-outline',\n group: 'More',\n prompt: 'Compare the best options for what I need and show me the tradeoffs.',\n // Federated storefront: search + cart download from shopping_native/Shop.\n // The classic Shop tile keeps the web surface in the WebView host.\n nativeRoute: 'shopping-native',\n },\n {\n key: 'travel-native',\n label: 'Travel',\n supersedes: 'travel',\n icon: 'airplane-takeoff',\n group: 'More',\n prompt: 'Plan a 4-day trip for me: flights, somewhere to stay, and what to do each day.',\n nativeRoute: 'travel-native',\n },\n {\n key: 'travel',\n label: 'Travel',\n icon: 'airplane',\n group: 'More',\n prompt: 'Plan a 4-day trip for me: flights, somewhere to stay, and what to do each day.',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'travel',\n },\n {\n key: 'social-events',\n label: 'yantra.live',\n icon: 'ticket-outline',\n group: 'More',\n prompt: 'What concerts are happening nearby this weekend?',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'social-events',\n },\n {\n key: 'movies',\n label: 'Movies',\n icon: 'popcorn',\n group: 'More',\n prompt: 'What movies are playing near me tonight?',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'movies',\n },\n {\n key: 'movies-native',\n label: 'Movies',\n supersedes: 'movies',\n icon: 'popcorn',\n group: 'More',\n prompt: 'What movies are playing near me tonight?',\n // Native cinema app over the yantra-movies connector: discover, trailers, showtimes, watchlist.\n nativeRoute: 'movies-native',\n },\n {\n key: 'local-services',\n label: 'Local Services',\n icon: 'wrench',\n group: 'More',\n prompt: 'Find an electrician near me',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'local-services',\n },\n {\n key: 'local-services-native',\n label: 'Local Services',\n supersedes: 'local-services',\n icon: 'wrench',\n group: 'More',\n prompt: 'Find an electrician near me',\n // Native search, details and saved pros over the same yantra-local-services\n // connector as the web Local Services surface.\n nativeRoute: 'local-services-native',\n },\n {\n key: 'fitness',\n label: 'Fitness',\n icon: 'dumbbell',\n group: 'More',\n prompt: 'Build me a workout plan for this week',\n nativeRoute: 'webbuilder',\n surfaceSlug: 'fitness',\n },\n];\n\nexport const APP_GROUP_ORDER: readonly AppGroupId[] = ['Create', 'Office', 'Automate', 'Sell', 'Money', 'Team', 'More'];\n\nexport type AppsTab = 'all' | 'favorites';\n\n/**\n * Poster colors per group - the tile artwork. Deliberately the same in light\n * and dark themes: artwork is content, the card chrome is what adapts.\n */\nexport const APP_GROUP_ART: Record<AppGroupId, { base: string; glow: string }> = {\n Create: { base: '#4f46e5', glow: '#c4b5fd' },\n Office: { base: '#334155', glow: '#cbd5e1' },\n Automate: { base: '#0f766e', glow: '#99f6e4' },\n Sell: { base: '#c2410c', glow: '#fed7aa' },\n Money: { base: '#15803d', glow: '#bbf7d0' },\n Team: { base: '#0369a1', glow: '#bae6fd' },\n More: { base: '#be185d', glow: '#fbcfe8' },\n};\n\nexport function matchesAppQuery(label: string, query: string): boolean {\n const q = query.toLowerCase().replace(/[^a-z0-9]/g, '');\n if (!q) return true;\n return label\n .toLowerCase()\n .replace(/[^a-z0-9]/g, '')\n .includes(q);\n}\n\n/**\n * Favorites keyed by a web tile that a native tile now replaces, carried over to\n * the native tile, so pinning \"Inbox\" before it went native still pins it after.\n */\nexport function carryOverSupersededFavorites(\n favorites: ReadonlySet<string>,\n items: readonly MobileAppItem[] = MOBILE_APP_CATALOG,\n): Set<string> {\n const replacement = new Map<string, string>();\n for (const item of items) if (item.supersedes) replacement.set(item.supersedes, item.key);\n const out = new Set<string>();\n for (const key of favorites) out.add(replacement.get(key) ?? key);\n return out;\n}\n\n/** One tile per app: a web tile disappears when its native replacement is in the list. */\nexport function visibleMobileApps(items: readonly MobileAppItem[]): MobileAppItem[] {\n const replaced = new Set(items.map((item) => item.supersedes).filter(Boolean));\n return items.filter((item) => !item.hideInLauncher && !replaced.has(item.key));\n}\n\nexport function groupMobileApps(items: readonly MobileAppItem[], query: string) {\n const hits = visibleMobileApps(items).filter((item) => matchesAppQuery(item.label, query));\n return APP_GROUP_ORDER.map((label) => ({\n label,\n items: hits.filter((item) => item.group === label),\n })).filter((group) => group.items.length > 0);\n}\n\n/**\n * One flat grid (Manus/game-launcher style) instead of grouped sections: rows\n * stay dense and the group reads from each card's caption. Catalog order is\n * kept inside a group; groups follow APP_GROUP_ORDER.\n */\nexport function filterMobileApps(\n items: readonly MobileAppItem[],\n query: string,\n tab: AppsTab,\n favorites: ReadonlySet<string>,\n): MobileAppItem[] {\n const rank = new Map(APP_GROUP_ORDER.map((group, index) => [group, index]));\n return visibleMobileApps(items)\n .filter((item) => matchesAppQuery(item.label, query))\n .filter((item) => tab !== 'favorites' || favorites.has(item.key))\n .sort((a, b) => (rank.get(a.group) ?? APP_GROUP_ORDER.length) - (rank.get(b.group) ?? APP_GROUP_ORDER.length));\n}\n"],"names":[],"mappings":"AAsDO,MAAM,kBAA+C,GAAA;AAAA,EAAC;AAAA,IAC3D,GAAK,EAAA,QAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA,IACR,WAAa,EAAA,YAAA;AAAA,IACb,aAAe,EAAA,oBAAA;AAAA,IACf,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;AAAA,IACD,GAAK,EAAA,eAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,UAAY,EAAA,QAAA;AAAA,IACZ,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EAAA,gEAAA;AAAA;AAAA;AAAA,IAGR,WAAa,EAAA;AAAA,GACf;AAAA,EAAG;AAAA,IACD,GAAK,EAAA,QAAA;AAAA,IACL,KAAO,EAAA,QAAA;AAAA,IACP,IAAM,EAAA,mBAAA;AAAA,IACN,KAAO,EAAA,QAAA;AAAA,IACP,MAAQ,EA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,BackHandler,Share,View,StyleSheet,ScrollView,Text,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {useSafeInsets}from'../canvas/withRemoteSafeArea.js';import {createRemoteUploadMedia,createRemoteConnectorExec}from'../canvas/videoEditor/remoteMediaClient.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {Tap,DIM}from'../inbox/components/Tap.js';import {DictationList}from'./components/DictationList.js';import {NoteView}from'./components/NoteView.js';import {RecordingPanel,StartPanel}from'./components/RecordPanel.js';import {writeNoteFromRecording,dictateErrorText,suggestFromNote,suggestErrorText}from'./dictateClient.js';import {readShowIdentifiers,writeShowIdentifiers}from'./dictatePreference.js';import {dictateTheme}from'./dictateTheme.js';import {createDictationStore}from'./dictationStore.js';import {noteToText}from'./noteText.js';import {labelText}from'./privacy.js';import {shownNote}from'./shownNote.js';import {useDictationRecorder,MicrophoneDeniedError}from'./useDictationRecorder.js';var __defProp = Object.defineProperty;
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo,useState,useEffect,useCallback,useRef}from'react';import {Alert,BackHandler,Share,View,StyleSheet,ScrollView,Text,Linking,Platform}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {useSafeInsets}from'../canvas/withRemoteSafeArea.js';import {createRemoteUploadMedia,createRemoteConnectorExec}from'../canvas/videoEditor/remoteMediaClient.js';import {AppKeyboardAvoidingView}from'../../components/AppKeyboardAvoidingView.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {Tap,DIM}from'../inbox/components/Tap.js';import {DictationList}from'./components/DictationList.js';import {NoteView}from'./components/NoteView.js';import {RecordingPanel,StartPanel}from'./components/RecordPanel.js';import {writeNoteFromRecording,dictateErrorText,suggestFromNote,suggestErrorText,rewriteNote,rewriteErrorText,askAboutNote,askErrorText}from'./dictateClient.js';import {readShowIdentifiers,writeShowIdentifiers}from'./dictatePreference.js';import {dictateTheme}from'./dictateTheme.js';import {createDictationStore}from'./dictationStore.js';import {noteToText}from'./noteText.js';import {knownIdentifiers,mapNote,restoreText,labelText}from'./privacy.js';import {shownNote}from'./shownNote.js';import {useDictationRecorder,MicrophoneDeniedError}from'./useDictationRecorder.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -30,7 +30,8 @@ var __objRest = (source, exclude) => {
30
30
  }
31
31
  return target;
32
32
  };
33
- const PREVIEW_NOTICE = "Preview: dictate made-up visits only. Real patient information needs your practice\u2019s HIPAA agreement with Yantra first.";
33
+ const PREVIEW_NOTICE = "Preview: for patient visits, dictate made-up ones only. Real patient information needs your practice\u2019s HIPAA agreement with Yantra first.";
34
+ const HOME_DETAIL = "A class, a meeting, an idea, a story or a patient visit. Speak, and Yantra writes the notes that fit, with names and numbers hidden from the AI.";
34
35
  function DictateExperience({
35
36
  isDark: hostDark,
36
37
  token,
@@ -41,7 +42,7 @@ function DictateExperience({
41
42
  deps,
42
43
  store: injectedStore
43
44
  }) {
44
- var _a, _b, _c;
45
+ var _a, _b, _c, _d, _e;
45
46
  const appTheme = useAppTheme();
46
47
  const theme = useMemo(() => dictateTheme(hostDark != null ? hostDark : appTheme.isDark), [hostDark, appTheme.isDark]);
47
48
  const insets = useSafeInsets();
@@ -57,6 +58,8 @@ function DictateExperience({
57
58
  const [micDenied, setMicDenied] = useState(false);
58
59
  const [showIdentifiers, setShowIdentifiers] = useState(false);
59
60
  const [suggestStates, setSuggestStates] = useState({});
61
+ const [askStates, setAskStates] = useState({});
62
+ const [rewriteStates, setRewriteStates] = useState({});
60
63
  useEffect(() => {
61
64
  void readShowIdentifiers().then(setShowIdentifiers);
62
65
  }, []);
@@ -170,6 +173,112 @@ function DictateExperience({
170
173
  }));
171
174
  }
172
175
  }, [agent, store, refresh]);
176
+ const rewrite = useCallback(async (record, kind) => {
177
+ if (!record.redaction) return;
178
+ setRewriteStates((s) => __spreadProps(__spreadValues({}, s), {
179
+ [record.id]: {
180
+ status: "loading"
181
+ }
182
+ }));
183
+ try {
184
+ const out = await rewriteNote(record.redaction, kind, agent);
185
+ const redaction = __spreadProps(__spreadValues({}, record.redaction), {
186
+ note: out.note,
187
+ identifiers: [...record.redaction.identifiers, ...out.identifiers]
188
+ });
189
+ const identifiers = knownIdentifiers(__spreadProps(__spreadValues({}, record), {
190
+ redaction
191
+ }));
192
+ await store.update(record.id, __spreadValues({
193
+ note: mapNote(out.note, (text) => restoreText(text, identifiers)),
194
+ redaction,
195
+ suggestions: void 0
196
+ }, out.model ? {
197
+ model: out.model
198
+ } : {}));
199
+ await refresh();
200
+ setRewriteStates((s) => __spreadProps(__spreadValues({}, s), {
201
+ [record.id]: {
202
+ status: "idle"
203
+ }
204
+ }));
205
+ } catch (err) {
206
+ setRewriteStates((s) => __spreadProps(__spreadValues({}, s), {
207
+ [record.id]: {
208
+ status: "error",
209
+ message: rewriteErrorText(err)
210
+ }
211
+ }));
212
+ }
213
+ }, [agent, store, refresh]);
214
+ const ask = useCallback(async (record, text) => {
215
+ var _a2;
216
+ if (!record.redaction || !text.trim()) return;
217
+ setAskStates((s) => __spreadProps(__spreadValues({}, s), {
218
+ [record.id]: {
219
+ status: "loading",
220
+ text
221
+ }
222
+ }));
223
+ try {
224
+ const out = await askAboutNote(record, text, agent);
225
+ const at = (/* @__PURE__ */ new Date()).toISOString();
226
+ const chat = (_a2 = record.chat) != null ? _a2 : {
227
+ turns: [],
228
+ identifiers: []
229
+ };
230
+ await store.update(record.id, {
231
+ chat: {
232
+ turns: [...chat.turns, {
233
+ role: "user",
234
+ text: out.asked,
235
+ at
236
+ }, {
237
+ role: "assistant",
238
+ text: out.answer,
239
+ at
240
+ }],
241
+ identifiers: [...chat.identifiers, ...out.identifiers]
242
+ }
243
+ });
244
+ await refresh();
245
+ setAskStates((s) => __spreadProps(__spreadValues({}, s), {
246
+ [record.id]: {
247
+ status: "idle"
248
+ }
249
+ }));
250
+ } catch (err) {
251
+ setAskStates((s) => __spreadProps(__spreadValues({}, s), {
252
+ [record.id]: {
253
+ status: "error",
254
+ text,
255
+ message: askErrorText(err)
256
+ }
257
+ }));
258
+ }
259
+ }, [agent, store, refresh]);
260
+ const clearChat = useCallback((record) => {
261
+ Alert.alert("Clear this chat?", "The messages are removed from this phone. The note stays.", [{
262
+ text: "Cancel",
263
+ style: "cancel"
264
+ }, {
265
+ text: "Clear",
266
+ style: "destructive",
267
+ onPress: () => {
268
+ void (async () => {
269
+ await store.update(record.id, {
270
+ chat: void 0
271
+ });
272
+ setAskStates((s) => __spreadProps(__spreadValues({}, s), {
273
+ [record.id]: {
274
+ status: "idle"
275
+ }
276
+ }));
277
+ await refresh();
278
+ })();
279
+ }
280
+ }]);
281
+ }, [store, refresh]);
173
282
  const start = useCallback(async () => {
174
283
  setError(null);
175
284
  setStarting(true);
@@ -299,7 +408,15 @@ function DictateExperience({
299
408
  status: "idle"
300
409
  }, onSuggest: () => {
301
410
  void suggest(open);
302
- } });
411
+ }, rewriteState: (_d = rewriteStates[open.id]) != null ? _d : {
412
+ status: "idle"
413
+ }, onRewrite: (kind) => {
414
+ void rewrite(open, kind);
415
+ }, askState: (_e = askStates[open.id]) != null ? _e : {
416
+ status: "idle"
417
+ }, onAsk: (text) => {
418
+ void ask(open, text);
419
+ }, onClearChat: () => clearChat(open) });
303
420
  } else if (screen.kind === "record" && recorder.phase !== "idle") {
304
421
  body = /* @__PURE__ */ jsx(View, { style: styles.recordBody, children: /* @__PURE__ */ jsx(RecordingPanel, { theme, phase: recorder.phase, pauseReason: recorder.pauseReason, elapsedMs: recorder.elapsedMs, level: recorder.level, noInput: recorder.noInput, onPause: recorder.pause, onResume: recorder.resume, onDone: () => {
305
422
  void done();
@@ -310,10 +427,10 @@ function DictateExperience({
310
427
  }], children: [
311
428
  /* @__PURE__ */ jsx(Text, { style: [styles.lead, {
312
429
  color: theme.ink
313
- }], children: "Dictate a visit" }),
430
+ }], children: "Dictate anything" }),
314
431
  /* @__PURE__ */ jsx(Text, { style: [styles.leadDetail, {
315
432
  color: theme.muted
316
- }], children: "Speak your note. Yantra writes it up as a SOAP note and lists what to check before you use it." }),
433
+ }], children: HOME_DETAIL }),
317
434
  /* @__PURE__ */ jsx(StartPanel, { theme, starting, recordsInBackground: recorder.recordsInBackground, onStart: () => {
318
435
  void start();
319
436
  } }),
@@ -360,7 +477,7 @@ function DictateExperience({
360
477
  }) })
361
478
  ] });
362
479
  }
363
- return /* @__PURE__ */ jsxs(View, { style: [styles.screen, {
480
+ return /* @__PURE__ */ jsxs(AppKeyboardAvoidingView, { behavior: Platform.OS === "ios" ? "padding" : void 0, style: [styles.screen, {
364
481
  backgroundColor: theme.screen,
365
482
  paddingTop: insets.top
366
483
  }], children: [
@@ -459,4 +576,4 @@ const styles = StyleSheet.create({
459
576
  justifyContent: "center",
460
577
  paddingHorizontal: 16
461
578
  }
462
- });export{DictateExperience,PREVIEW_NOTICE,DictateExperience as default};//# sourceMappingURL=DictateExperience.js.map
579
+ });export{DictateExperience,HOME_DETAIL,PREVIEW_NOTICE,DictateExperience as default};//# sourceMappingURL=DictateExperience.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DictateExperience.js","sources":["../../../src/features/dictate/DictateExperience.tsx"],"sourcesContent":["/**\n * Dictate: a clinician speaks a visit note; Yantra writes it up as a SOAP note\n * with the points to check before it is used.\n *\n * Record (screen kept awake, paused honestly if the app leaves the screen) ->\n * the recording is kept on the phone at once -> uploaded and handed to\n * YANTRA_MEETINGS_CLINICAL_NOTE (medical speech-to-text, then the note) ->\n * the note is saved on the phone and the recording deleted. A note that could\n * not be written keeps its recording for Retry, across restarts.\n *\n * The host screen passes the session (token + surface index URL); everything\n * else - the recorder, the store, the agent calls - lives here.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Alert, BackHandler, Linking, ScrollView, Share, StyleSheet, Text, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { useSafeInsets } from '../canvas/withRemoteSafeArea';\nimport { createRemoteConnectorExec, createRemoteUploadMedia } from '../canvas/videoEditor/remoteMediaClient';\nimport { useAppTheme } from '../../theme/AppThemeProvider';\nimport { DIM, Tap } from '../inbox/components/Tap';\nimport { DictationList } from './components/DictationList';\nimport { NoteView } from './components/NoteView';\nimport { RecordingPanel, StartPanel } from './components/RecordPanel';\nimport {\n dictateErrorText,\n suggestErrorText,\n suggestFromNote,\n writeNoteFromRecording,\n type DictateDeps,\n type DictateStage,\n} from './dictateClient';\nimport { readShowIdentifiers, writeShowIdentifiers } from './dictatePreference';\nimport { dictateTheme } from './dictateTheme';\nimport { createDictationStore, type DictationStore } from './dictationStore';\nimport { noteToText } from './noteText';\nimport { labelText } from './privacy';\nimport { shownNote, type SuggestState } from './shownNote';\nimport type { DictationRecord } from './types';\nimport { MicrophoneDeniedError, useDictationRecorder } from './useDictationRecorder';\n\nexport interface DictateExperienceProps {\n isDark?: boolean;\n token?: string | null;\n /** The surface index URL; the agent (uploads, the note) is derived from it. */\n indexUrl: string;\n sessionError?: string | null;\n onRetrySession?: () => void;\n onExit: () => void;\n /** Tests and previews inject these; the app builds them from the session. */\n deps?: DictateDeps;\n store?: DictationStore;\n}\n\ntype Screen = { kind: 'home' } | { kind: 'record' } | { kind: 'note'; id: string };\n\nexport const PREVIEW_NOTICE =\n 'Preview: dictate made-up visits only. Real patient information needs your practice’s HIPAA agreement with Yantra first.';\n\nexport function DictateExperience({\n isDark: hostDark,\n token,\n indexUrl,\n sessionError,\n onRetrySession,\n onExit,\n deps,\n store: injectedStore,\n}: DictateExperienceProps) {\n const appTheme = useAppTheme();\n const theme = useMemo(() => dictateTheme(hostDark ?? appTheme.isDark), [hostDark, appTheme.isDark]);\n const insets = useSafeInsets();\n const store = useMemo(() => injectedStore ?? createDictationStore(), [injectedStore]);\n const recorder = useDictationRecorder();\n const [screen, setScreen] = useState<Screen>({ kind: 'home' });\n const [records, setRecords] = useState<DictationRecord[]>([]);\n const [stages, setStages] = useState<Record<string, DictateStage>>({});\n const [starting, setStarting] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [micDenied, setMicDenied] = useState(false);\n const [showIdentifiers, setShowIdentifiers] = useState(false);\n const [suggestStates, setSuggestStates] = useState<Record<string, SuggestState>>({});\n\n useEffect(() => {\n void readShowIdentifiers().then(setShowIdentifiers);\n }, []);\n const toggleIdentifiers = useCallback(() => {\n setShowIdentifiers((show) => {\n writeShowIdentifiers(!show);\n return !show;\n });\n }, []);\n\n const tokenRef = useRef(token);\n tokenRef.current = token;\n const agent = useMemo<DictateDeps>(\n () =>\n deps ?? {\n exec: (connector, action, params, options) => {\n const { current } = tokenRef;\n if (!current) return Promise.reject(new Error('Network request failed: not signed in yet'));\n return createRemoteConnectorExec(current, indexUrl)(connector, action, params, options);\n },\n upload: (uri) => {\n const { current } = tokenRef;\n if (!current) return Promise.reject(new Error('Network request failed: not signed in yet'));\n return createRemoteUploadMedia(current, indexUrl)(uri);\n },\n },\n [deps, indexUrl],\n );\n\n const refresh = useCallback(async () => setRecords(await store.list()), [store]);\n\n // A note being written when the app last closed never finished: offer it again.\n useEffect(() => {\n void (async () => {\n for (const r of await store.list()) {\n if (r.status === 'writing') await store.update(r.id, { status: r.audioUri ? 'saved' : 'failed' });\n }\n await refresh();\n })();\n }, [store, refresh]);\n\n const write = useCallback(\n async (record: DictationRecord) => {\n if (!record.audioUri) return;\n setStages((s) => ({ ...s, [record.id]: 'uploading' }));\n await store.update(record.id, { status: 'writing', error: undefined });\n await refresh();\n try {\n const written = await writeNoteFromRecording(record.audioUri, agent, {}, (stage) =>\n setStages((s) => ({ ...s, [record.id]: stage })),\n );\n await store.update(record.id, {\n status: 'ready',\n note: written.note,\n transcript: written.transcript,\n redaction: written.redaction,\n model: written.model,\n error: undefined,\n });\n await store.dropAudio(record.id);\n } catch (err) {\n await store.update(record.id, { status: 'failed', error: dictateErrorText(err) });\n } finally {\n setStages(({ [record.id]: _done, ...rest }) => rest);\n await refresh();\n }\n },\n [agent, store, refresh],\n );\n\n const suggest = useCallback(\n async (record: DictationRecord) => {\n if (!record.redaction) return;\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'loading' } }));\n try {\n const { items, identifiers } = await suggestFromNote(record.redaction, agent);\n await store.update(record.id, {\n suggestions: { items, identifiers, createdAt: new Date().toISOString() },\n });\n await refresh();\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'idle' } }));\n } catch (err) {\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'error', message: suggestErrorText(err) } }));\n }\n },\n [agent, store, refresh],\n );\n\n const start = useCallback(async () => {\n setError(null);\n setStarting(true);\n try {\n await recorder.start();\n setMicDenied(false);\n setScreen({ kind: 'record' });\n } catch (err) {\n // A declined microphone is not an error to retry: it is a setting, so offer the way there.\n if (err instanceof MicrophoneDeniedError) setMicDenied(true);\n else setError('The microphone could not start. Try again.');\n } finally {\n setStarting(false);\n }\n }, [recorder]);\n\n const done = useCallback(async () => {\n const out = await recorder.finish();\n if (!out) {\n setScreen({ kind: 'home' });\n setError('The recording could not be saved. Try again.');\n return;\n }\n const record = await store.keepRecording(out.uri, out.durationMs);\n await refresh();\n setScreen({ kind: 'note', id: record.id });\n void write(record);\n }, [recorder, store, refresh, write]);\n\n const discard = useCallback(() => {\n Alert.alert('Discard this dictation?', 'The recording is deleted and no note is written.', [\n { text: 'Keep dictating', style: 'cancel' },\n {\n text: 'Discard',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n const out = await recorder.finish();\n if (out) await store.discardRecording(out.uri);\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n }, [recorder, store]);\n\n const back = useCallback(() => {\n if (screen.kind === 'record') {\n if (recorder.phase === 'recording') recorder.pause();\n Alert.alert('Stop dictating?', 'Write the note from what you have recorded, or discard it.', [\n { text: 'Keep dictating', style: 'cancel' },\n {\n text: 'Write the note',\n onPress: () => {\n void done();\n },\n },\n {\n text: 'Discard',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n const out = await recorder.finish();\n if (out) await store.discardRecording(out.uri);\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n return true;\n }\n if (screen.kind === 'note') {\n setScreen({ kind: 'home' });\n return true;\n }\n onExit();\n return true;\n }, [screen.kind, recorder, done, store, onExit]);\n\n useEffect(() => {\n const sub = BackHandler.addEventListener('hardwareBackPress', back);\n return () => sub.remove();\n }, [back]);\n\n const open = screen.kind === 'note' ? (records.find((r) => r.id === screen.id) ?? null) : null;\n\n // What is on screen goes: hidden identifiers stay hidden (\"[Name 1]\"), shown ones go as dictated.\n const share = useCallback(() => {\n if (!open?.note) return;\n const shown = shownNote(open, open.note, showIdentifiers);\n const text = noteToText(shown.note, shown.transcript, shown.suggestions);\n void Share.share({ title: labelText(shown.note.title), message: labelText(text) });\n }, [open, showIdentifiers]);\n\n const remove = useCallback(() => {\n if (!open) return;\n const removed = open.note\n ? 'The note and transcript are removed from this phone.'\n : 'The recording is removed from this phone.';\n Alert.alert('Delete this dictation?', removed, [\n { text: 'Cancel', style: 'cancel' },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n await store.remove(open.id);\n await refresh();\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n }, [open, store, refresh]);\n\n const title = screen.kind === 'note' ? 'Note' : 'Dictate';\n\n // The note, the live recording, or the home list - whichever screen is open.\n let body: React.ReactNode;\n if (screen.kind === 'note' && open) {\n body = (\n <NoteView\n record={open}\n stage={stages[open.id] ?? null}\n theme={theme}\n bottomInset={insets.bottom}\n onRetry={() => {\n void write(open);\n }}\n showIdentifiers={showIdentifiers}\n onToggleIdentifiers={toggleIdentifiers}\n suggestState={suggestStates[open.id] ?? { status: 'idle' }}\n onSuggest={() => {\n void suggest(open);\n }}\n />\n );\n } else if (screen.kind === 'record' && recorder.phase !== 'idle') {\n body = (\n <View style={styles.recordBody}>\n <RecordingPanel\n theme={theme}\n phase={recorder.phase}\n pauseReason={recorder.pauseReason}\n elapsedMs={recorder.elapsedMs}\n level={recorder.level}\n noInput={recorder.noInput}\n onPause={recorder.pause}\n onResume={recorder.resume}\n onDone={() => {\n void done();\n }}\n onDiscard={discard}\n />\n </View>\n );\n } else {\n body = (\n <ScrollView contentContainerStyle={[styles.home, { paddingBottom: 24 + insets.bottom }]}>\n <Text style={[styles.lead, { color: theme.ink }]}>Dictate a visit</Text>\n <Text style={[styles.leadDetail, { color: theme.muted }]}>\n Speak your note. Yantra writes it up as a SOAP note and lists what to check before you use it.\n </Text>\n <StartPanel\n theme={theme}\n starting={starting}\n recordsInBackground={recorder.recordsInBackground}\n onStart={() => {\n void start();\n }}\n />\n {error ? <Text style={[styles.error, { color: theme.crit }]}>{error}</Text> : null}\n {micDenied ? (\n <View style={[styles.banner, { backgroundColor: theme.recSoft }]}>\n <MaterialCommunityIcons name=\"microphone-off\" size={18} color={theme.crit} />\n <Text style={[styles.bannerText, { color: theme.crit }]}>\n Microphone access is off for Yantra.\n </Text>\n <Tap\n onPress={() => {\n void Linking.openSettings();\n }}\n accessibilityRole=\"button\"\n style={[styles.bannerAction, { backgroundColor: theme.card, borderColor: theme.border }]}\n pressedStyle={DIM}\n >\n <Text style={[styles.bannerActionText, { color: theme.ink }]}>Open Settings</Text>\n </Tap>\n </View>\n ) : null}\n {sessionError ? (\n <Tap\n onPress={onRetrySession}\n accessibilityRole=\"button\"\n style={[styles.banner, { backgroundColor: theme.recSoft }]}\n pressedStyle={DIM}\n >\n <Text style={[styles.bannerText, { color: theme.crit }]}>\n Not connected, so notes cannot be written yet. Tap to retry.\n </Text>\n </Tap>\n ) : null}\n <View\n style={[\n styles.banner,\n {\n backgroundColor: theme.warnSoft,\n borderColor: theme.warnBorder,\n borderWidth: StyleSheet.hairlineWidth,\n },\n ]}\n >\n <MaterialCommunityIcons name=\"shield-alert-outline\" size={18} color={theme.warnInk} />\n <Text style={[styles.bannerText, { color: theme.warnInk }]}>{PREVIEW_NOTICE}</Text>\n </View>\n <Text style={[styles.sectionLabel, { color: theme.muted }]}>RECENT</Text>\n <DictationList records={records} theme={theme} onOpen={(r) => setScreen({ kind: 'note', id: r.id })} />\n </ScrollView>\n );\n }\n\n return (\n <View style={[styles.screen, { backgroundColor: theme.screen, paddingTop: insets.top }]}>\n <View style={[styles.header, { borderBottomColor: theme.border }]}>\n <Tap\n onPress={back}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Back\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"chevron-left\" size={28} color={theme.ink} />\n </Tap>\n <Text style={[styles.headerTitle, { color: theme.ink }]}>{title}</Text>\n <View style={styles.headerActions}>\n {open?.note ? (\n <Tap\n onPress={share}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Share the note\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"export-variant\" size={22} color={theme.ink} />\n </Tap>\n ) : null}\n {/* Any dictation can go, note or not; just not while its note is being written. */}\n {open && !stages[open.id] ? (\n <Tap\n onPress={remove}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Delete\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"trash-can-outline\" size={22} color={theme.ink} />\n </Tap>\n ) : null}\n </View>\n </View>\n\n {body}\n </View>\n );\n}\n\nexport default DictateExperience;\n\nconst styles = StyleSheet.create({\n screen: { flex: 1 },\n header: {\n height: 52,\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 4,\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n headerButton: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' },\n headerTitle: { flex: 1, fontSize: 17, fontWeight: '600' },\n headerActions: { flexDirection: 'row', alignItems: 'center' },\n home: { paddingHorizontal: 16, paddingTop: 20 },\n lead: { fontSize: 24, fontWeight: '700' },\n leadDetail: { marginTop: 6, fontSize: 15, lineHeight: 21 },\n error: { textAlign: 'center', fontSize: 13, marginBottom: 8 },\n banner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 10,\n borderRadius: 12,\n paddingHorizontal: 12,\n paddingVertical: 10,\n marginBottom: 12,\n },\n bannerText: { flex: 1, fontSize: 13, lineHeight: 18 },\n bannerAction: {\n paddingHorizontal: 12,\n paddingVertical: 7,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n },\n bannerActionText: { fontSize: 13, fontWeight: '600' },\n sectionLabel: { marginTop: 12, marginBottom: 8, fontSize: 12, fontWeight: '700', letterSpacing: 0.8 },\n recordBody: { flex: 1, justifyContent: 'center', paddingHorizontal: 16 },\n});\n"],"names":["_b","_a","_c"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,MAAM,cAAiB,GAAA;AACvB,SAAS,iBAAkB,CAAA;AAAA,EAChC,MAAQ,EAAA,QAAA;AAAA,EACR,KAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAO,EAAA;AACT,CAA2B,EAAA;AA9D3B,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AA+DE,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAA,MAAM,KAAQ,GAAA,OAAA,CAAQ,MAAM,YAAA,CAAa,QAAY,IAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAS,MAAM,CAAA,EAAG,CAAC,QAAA,EAAU,QAAS,CAAA,MAAM,CAAC,CAAA;AAClG,EAAA,MAAM,SAAS,aAAc,EAAA;AAC7B,EAAM,MAAA,KAAA,GAAQ,QAAQ,MAAM,aAAA,IAAA,IAAA,GAAA,aAAA,GAAiB,sBAAwB,EAAA,CAAC,aAAa,CAAC,CAAA;AACpF,EAAA,MAAM,WAAW,oBAAqB,EAAA;AACtC,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,QAAiB,CAAA;AAAA,IAC3C,IAAM,EAAA;AAAA,GACP,CAAA;AACD,EAAA,MAAM,CAAC,OAAS,E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AAA;AAAA,IAChB,iBAAmB,EAAA;AAAA;AAEvB,CAAC,CAAA"}
1
+ {"version":3,"file":"DictateExperience.js","sources":["../../../src/features/dictate/DictateExperience.tsx"],"sourcesContent":["/**\n * Dictate: anyone speaks - a class, a meeting, an idea, a story, a patient\n * visit - and Yantra writes the notes that fit it, with the points to check\n * before they are used, names and numbers hidden from the AI.\n *\n * Record (screen kept awake, paused honestly if the app leaves the screen) ->\n * the recording is kept on the phone at once -> uploaded and handed to\n * YANTRA_MEETINGS_DICTATION_NOTE (speech-to-text, then the note) -> the note\n * is saved on the phone and the recording deleted. A note that could not be\n * written keeps its recording for Retry, across restarts. A note can then be\n * written again as another kind, read for suggestions, and asked about in a\n * chat, all from its hidden version.\n *\n * The host screen passes the session (token + surface index URL); everything\n * else - the recorder, the store, the agent calls - lives here.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Alert, BackHandler, Linking, Platform, ScrollView, Share, StyleSheet, Text, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { useSafeInsets } from '../canvas/withRemoteSafeArea';\nimport { createRemoteConnectorExec, createRemoteUploadMedia } from '../canvas/videoEditor/remoteMediaClient';\nimport { AppKeyboardAvoidingView } from '../../components/AppKeyboardAvoidingView';\nimport { useAppTheme } from '../../theme/AppThemeProvider';\nimport { DIM, Tap } from '../inbox/components/Tap';\nimport { DictationList } from './components/DictationList';\nimport { NoteView } from './components/NoteView';\nimport { RecordingPanel, StartPanel } from './components/RecordPanel';\nimport {\n askAboutNote,\n askErrorText,\n dictateErrorText,\n rewriteErrorText,\n rewriteNote,\n suggestErrorText,\n suggestFromNote,\n writeNoteFromRecording,\n type DictateDeps,\n type DictateStage,\n} from './dictateClient';\nimport { readShowIdentifiers, writeShowIdentifiers } from './dictatePreference';\nimport { dictateTheme } from './dictateTheme';\nimport { createDictationStore, type DictationStore } from './dictationStore';\nimport { noteToText } from './noteText';\nimport { knownIdentifiers, labelText, mapNote, restoreText } from './privacy';\nimport { shownNote, type AskState, type RewriteState, type SuggestState } from './shownNote';\nimport type { DictationKind, DictationRecord } from './types';\nimport { MicrophoneDeniedError, useDictationRecorder } from './useDictationRecorder';\n\nexport interface DictateExperienceProps {\n isDark?: boolean;\n token?: string | null;\n /** The surface index URL; the agent (uploads, the note) is derived from it. */\n indexUrl: string;\n sessionError?: string | null;\n onRetrySession?: () => void;\n onExit: () => void;\n /** Tests and previews inject these; the app builds them from the session. */\n deps?: DictateDeps;\n store?: DictationStore;\n}\n\ntype Screen = { kind: 'home' } | { kind: 'record' } | { kind: 'note'; id: string };\n\nexport const PREVIEW_NOTICE =\n 'Preview: for patient visits, dictate made-up ones only. Real patient information needs your practice’s HIPAA agreement with Yantra first.';\n\nexport const HOME_DETAIL =\n 'A class, a meeting, an idea, a story or a patient visit. Speak, and Yantra writes the notes that fit, with names and numbers hidden from the AI.';\n\nexport function DictateExperience({\n isDark: hostDark,\n token,\n indexUrl,\n sessionError,\n onRetrySession,\n onExit,\n deps,\n store: injectedStore,\n}: DictateExperienceProps) {\n const appTheme = useAppTheme();\n const theme = useMemo(() => dictateTheme(hostDark ?? appTheme.isDark), [hostDark, appTheme.isDark]);\n const insets = useSafeInsets();\n const store = useMemo(() => injectedStore ?? createDictationStore(), [injectedStore]);\n const recorder = useDictationRecorder();\n const [screen, setScreen] = useState<Screen>({ kind: 'home' });\n const [records, setRecords] = useState<DictationRecord[]>([]);\n const [stages, setStages] = useState<Record<string, DictateStage>>({});\n const [starting, setStarting] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [micDenied, setMicDenied] = useState(false);\n const [showIdentifiers, setShowIdentifiers] = useState(false);\n const [suggestStates, setSuggestStates] = useState<Record<string, SuggestState>>({});\n const [askStates, setAskStates] = useState<Record<string, AskState>>({});\n const [rewriteStates, setRewriteStates] = useState<Record<string, RewriteState>>({});\n\n useEffect(() => {\n void readShowIdentifiers().then(setShowIdentifiers);\n }, []);\n const toggleIdentifiers = useCallback(() => {\n setShowIdentifiers((show) => {\n writeShowIdentifiers(!show);\n return !show;\n });\n }, []);\n\n const tokenRef = useRef(token);\n tokenRef.current = token;\n const agent = useMemo<DictateDeps>(\n () =>\n deps ?? {\n exec: (connector, action, params, options) => {\n const { current } = tokenRef;\n if (!current) return Promise.reject(new Error('Network request failed: not signed in yet'));\n return createRemoteConnectorExec(current, indexUrl)(connector, action, params, options);\n },\n upload: (uri) => {\n const { current } = tokenRef;\n if (!current) return Promise.reject(new Error('Network request failed: not signed in yet'));\n return createRemoteUploadMedia(current, indexUrl)(uri);\n },\n },\n [deps, indexUrl],\n );\n\n const refresh = useCallback(async () => setRecords(await store.list()), [store]);\n\n // A note being written when the app last closed never finished: offer it again.\n useEffect(() => {\n void (async () => {\n for (const r of await store.list()) {\n if (r.status === 'writing') await store.update(r.id, { status: r.audioUri ? 'saved' : 'failed' });\n }\n await refresh();\n })();\n }, [store, refresh]);\n\n const write = useCallback(\n async (record: DictationRecord) => {\n if (!record.audioUri) return;\n setStages((s) => ({ ...s, [record.id]: 'uploading' }));\n await store.update(record.id, { status: 'writing', error: undefined });\n await refresh();\n try {\n const written = await writeNoteFromRecording(record.audioUri, agent, {}, (stage) =>\n setStages((s) => ({ ...s, [record.id]: stage })),\n );\n await store.update(record.id, {\n status: 'ready',\n note: written.note,\n transcript: written.transcript,\n redaction: written.redaction,\n model: written.model,\n error: undefined,\n });\n await store.dropAudio(record.id);\n } catch (err) {\n await store.update(record.id, { status: 'failed', error: dictateErrorText(err) });\n } finally {\n setStages(({ [record.id]: _done, ...rest }) => rest);\n await refresh();\n }\n },\n [agent, store, refresh],\n );\n\n const suggest = useCallback(\n async (record: DictationRecord) => {\n if (!record.redaction) return;\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'loading' } }));\n try {\n const { items, identifiers } = await suggestFromNote(record.redaction, agent);\n await store.update(record.id, {\n suggestions: { items, identifiers, createdAt: new Date().toISOString() },\n });\n await refresh();\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'idle' } }));\n } catch (err) {\n setSuggestStates((s) => ({ ...s, [record.id]: { status: 'error', message: suggestErrorText(err) } }));\n }\n },\n [agent, store, refresh],\n );\n\n // The hidden transcript, written again as another kind; the suggestions were about the old note, so they go.\n const rewrite = useCallback(\n async (record: DictationRecord, kind: DictationKind) => {\n if (!record.redaction) return;\n setRewriteStates((s) => ({ ...s, [record.id]: { status: 'loading' } }));\n try {\n const out = await rewriteNote(record.redaction, kind, agent);\n const redaction = {\n ...record.redaction,\n note: out.note,\n identifiers: [...record.redaction.identifiers, ...out.identifiers],\n };\n const identifiers = knownIdentifiers({ ...record, redaction });\n await store.update(record.id, {\n note: mapNote(out.note, (text) => restoreText(text, identifiers)),\n redaction,\n suggestions: undefined,\n ...(out.model ? { model: out.model } : {}),\n });\n await refresh();\n setRewriteStates((s) => ({ ...s, [record.id]: { status: 'idle' } }));\n } catch (err) {\n setRewriteStates((s) => ({ ...s, [record.id]: { status: 'error', message: rewriteErrorText(err) } }));\n }\n },\n [agent, store, refresh],\n );\n\n const ask = useCallback(\n async (record: DictationRecord, text: string) => {\n if (!record.redaction || !text.trim()) return;\n setAskStates((s) => ({ ...s, [record.id]: { status: 'loading', text } }));\n try {\n const out = await askAboutNote(record, text, agent);\n const at = new Date().toISOString();\n const chat = record.chat ?? { turns: [], identifiers: [] };\n await store.update(record.id, {\n chat: {\n turns: [\n ...chat.turns,\n { role: 'user', text: out.asked, at },\n { role: 'assistant', text: out.answer, at },\n ],\n identifiers: [...chat.identifiers, ...out.identifiers],\n },\n });\n await refresh();\n setAskStates((s) => ({ ...s, [record.id]: { status: 'idle' } }));\n } catch (err) {\n setAskStates((s) => ({ ...s, [record.id]: { status: 'error', text, message: askErrorText(err) } }));\n }\n },\n [agent, store, refresh],\n );\n\n const clearChat = useCallback(\n (record: DictationRecord) => {\n Alert.alert('Clear this chat?', 'The messages are removed from this phone. The note stays.', [\n { text: 'Cancel', style: 'cancel' },\n {\n text: 'Clear',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n await store.update(record.id, { chat: undefined });\n setAskStates((s) => ({ ...s, [record.id]: { status: 'idle' } }));\n await refresh();\n })();\n },\n },\n ]);\n },\n [store, refresh],\n );\n\n const start = useCallback(async () => {\n setError(null);\n setStarting(true);\n try {\n await recorder.start();\n setMicDenied(false);\n setScreen({ kind: 'record' });\n } catch (err) {\n // A declined microphone is not an error to retry: it is a setting, so offer the way there.\n if (err instanceof MicrophoneDeniedError) setMicDenied(true);\n else setError('The microphone could not start. Try again.');\n } finally {\n setStarting(false);\n }\n }, [recorder]);\n\n const done = useCallback(async () => {\n const out = await recorder.finish();\n if (!out) {\n setScreen({ kind: 'home' });\n setError('The recording could not be saved. Try again.');\n return;\n }\n const record = await store.keepRecording(out.uri, out.durationMs);\n await refresh();\n setScreen({ kind: 'note', id: record.id });\n void write(record);\n }, [recorder, store, refresh, write]);\n\n const discard = useCallback(() => {\n Alert.alert('Discard this dictation?', 'The recording is deleted and no note is written.', [\n { text: 'Keep dictating', style: 'cancel' },\n {\n text: 'Discard',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n const out = await recorder.finish();\n if (out) await store.discardRecording(out.uri);\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n }, [recorder, store]);\n\n const back = useCallback(() => {\n if (screen.kind === 'record') {\n if (recorder.phase === 'recording') recorder.pause();\n Alert.alert('Stop dictating?', 'Write the note from what you have recorded, or discard it.', [\n { text: 'Keep dictating', style: 'cancel' },\n {\n text: 'Write the note',\n onPress: () => {\n void done();\n },\n },\n {\n text: 'Discard',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n const out = await recorder.finish();\n if (out) await store.discardRecording(out.uri);\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n return true;\n }\n if (screen.kind === 'note') {\n setScreen({ kind: 'home' });\n return true;\n }\n onExit();\n return true;\n }, [screen.kind, recorder, done, store, onExit]);\n\n useEffect(() => {\n const sub = BackHandler.addEventListener('hardwareBackPress', back);\n return () => sub.remove();\n }, [back]);\n\n const open = screen.kind === 'note' ? (records.find((r) => r.id === screen.id) ?? null) : null;\n\n // What is on screen goes: hidden identifiers stay hidden (\"[Name 1]\"), shown ones go as dictated.\n const share = useCallback(() => {\n if (!open?.note) return;\n const shown = shownNote(open, open.note, showIdentifiers);\n const text = noteToText(shown.note, shown.transcript, shown.suggestions);\n void Share.share({ title: labelText(shown.note.title), message: labelText(text) });\n }, [open, showIdentifiers]);\n\n const remove = useCallback(() => {\n if (!open) return;\n const removed = open.note\n ? 'The note and transcript are removed from this phone.'\n : 'The recording is removed from this phone.';\n Alert.alert('Delete this dictation?', removed, [\n { text: 'Cancel', style: 'cancel' },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n void (async () => {\n await store.remove(open.id);\n await refresh();\n setScreen({ kind: 'home' });\n })();\n },\n },\n ]);\n }, [open, store, refresh]);\n\n const title = screen.kind === 'note' ? 'Note' : 'Dictate';\n\n // The note, the live recording, or the home list - whichever screen is open.\n let body: React.ReactNode;\n if (screen.kind === 'note' && open) {\n body = (\n <NoteView\n record={open}\n stage={stages[open.id] ?? null}\n theme={theme}\n bottomInset={insets.bottom}\n onRetry={() => {\n void write(open);\n }}\n showIdentifiers={showIdentifiers}\n onToggleIdentifiers={toggleIdentifiers}\n suggestState={suggestStates[open.id] ?? { status: 'idle' }}\n onSuggest={() => {\n void suggest(open);\n }}\n rewriteState={rewriteStates[open.id] ?? { status: 'idle' }}\n onRewrite={(kind) => {\n void rewrite(open, kind);\n }}\n askState={askStates[open.id] ?? { status: 'idle' }}\n onAsk={(text) => {\n void ask(open, text);\n }}\n onClearChat={() => clearChat(open)}\n />\n );\n } else if (screen.kind === 'record' && recorder.phase !== 'idle') {\n body = (\n <View style={styles.recordBody}>\n <RecordingPanel\n theme={theme}\n phase={recorder.phase}\n pauseReason={recorder.pauseReason}\n elapsedMs={recorder.elapsedMs}\n level={recorder.level}\n noInput={recorder.noInput}\n onPause={recorder.pause}\n onResume={recorder.resume}\n onDone={() => {\n void done();\n }}\n onDiscard={discard}\n />\n </View>\n );\n } else {\n body = (\n <ScrollView contentContainerStyle={[styles.home, { paddingBottom: 24 + insets.bottom }]}>\n <Text style={[styles.lead, { color: theme.ink }]}>Dictate anything</Text>\n <Text style={[styles.leadDetail, { color: theme.muted }]}>{HOME_DETAIL}</Text>\n <StartPanel\n theme={theme}\n starting={starting}\n recordsInBackground={recorder.recordsInBackground}\n onStart={() => {\n void start();\n }}\n />\n {error ? <Text style={[styles.error, { color: theme.crit }]}>{error}</Text> : null}\n {micDenied ? (\n <View style={[styles.banner, { backgroundColor: theme.recSoft }]}>\n <MaterialCommunityIcons name=\"microphone-off\" size={18} color={theme.crit} />\n <Text style={[styles.bannerText, { color: theme.crit }]}>\n Microphone access is off for Yantra.\n </Text>\n <Tap\n onPress={() => {\n void Linking.openSettings();\n }}\n accessibilityRole=\"button\"\n style={[styles.bannerAction, { backgroundColor: theme.card, borderColor: theme.border }]}\n pressedStyle={DIM}\n >\n <Text style={[styles.bannerActionText, { color: theme.ink }]}>Open Settings</Text>\n </Tap>\n </View>\n ) : null}\n {sessionError ? (\n <Tap\n onPress={onRetrySession}\n accessibilityRole=\"button\"\n style={[styles.banner, { backgroundColor: theme.recSoft }]}\n pressedStyle={DIM}\n >\n <Text style={[styles.bannerText, { color: theme.crit }]}>\n Not connected, so notes cannot be written yet. Tap to retry.\n </Text>\n </Tap>\n ) : null}\n <View\n style={[\n styles.banner,\n {\n backgroundColor: theme.warnSoft,\n borderColor: theme.warnBorder,\n borderWidth: StyleSheet.hairlineWidth,\n },\n ]}\n >\n <MaterialCommunityIcons name=\"shield-alert-outline\" size={18} color={theme.warnInk} />\n <Text style={[styles.bannerText, { color: theme.warnInk }]}>{PREVIEW_NOTICE}</Text>\n </View>\n <Text style={[styles.sectionLabel, { color: theme.muted }]}>RECENT</Text>\n <DictationList records={records} theme={theme} onOpen={(r) => setScreen({ kind: 'note', id: r.id })} />\n </ScrollView>\n );\n }\n\n return (\n <AppKeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n style={[styles.screen, { backgroundColor: theme.screen, paddingTop: insets.top }]}\n >\n <View style={[styles.header, { borderBottomColor: theme.border }]}>\n <Tap\n onPress={back}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Back\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"chevron-left\" size={28} color={theme.ink} />\n </Tap>\n <Text style={[styles.headerTitle, { color: theme.ink }]}>{title}</Text>\n <View style={styles.headerActions}>\n {open?.note ? (\n <Tap\n onPress={share}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Share the note\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"export-variant\" size={22} color={theme.ink} />\n </Tap>\n ) : null}\n {/* Any dictation can go, note or not; just not while its note is being written. */}\n {open && !stages[open.id] ? (\n <Tap\n onPress={remove}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Delete\"\n style={styles.headerButton}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"trash-can-outline\" size={22} color={theme.ink} />\n </Tap>\n ) : null}\n </View>\n </View>\n\n {body}\n </AppKeyboardAvoidingView>\n );\n}\n\nexport default DictateExperience;\n\nconst styles = StyleSheet.create({\n screen: { flex: 1 },\n header: {\n height: 52,\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 4,\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n headerButton: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' },\n headerTitle: { flex: 1, fontSize: 17, fontWeight: '600' },\n headerActions: { flexDirection: 'row', alignItems: 'center' },\n home: { paddingHorizontal: 16, paddingTop: 20 },\n lead: { fontSize: 24, fontWeight: '700' },\n leadDetail: { marginTop: 6, fontSize: 15, lineHeight: 21 },\n error: { textAlign: 'center', fontSize: 13, marginBottom: 8 },\n banner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 10,\n borderRadius: 12,\n paddingHorizontal: 12,\n paddingVertical: 10,\n marginBottom: 12,\n },\n bannerText: { flex: 1, fontSize: 13, lineHeight: 18 },\n bannerAction: {\n paddingHorizontal: 12,\n paddingVertical: 7,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n },\n bannerActionText: { fontSize: 13, fontWeight: '600' },\n sectionLabel: { marginTop: 12, marginBottom: 8, fontSize: 12, fontWeight: '700', letterSpacing: 0.8 },\n recordBody: { flex: 1, justifyContent: 'center', paddingHorizontal: 16 },\n});\n"],"names":["_b","_a","_c"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDO,MAAM,cAAiB,GAAA;AACvB,MAAM,WAAc,GAAA;AACpB,SAAS,iBAAkB,CAAA;AAAA,EAChC,MAAQ,EAAA,QAAA;AAAA,EACR,KAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAO,EAAA;AACT,CAA2B,EAAA;AAnE3B,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AAoEE,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAA,MAAM,KAAQ,GAAA,OAAA,CAAQ,MAAM,YAAA,CAAa,QAAY,IAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAS,MAAM,CAAA,EAAG,CAAC,QAAA,EAAU,QAAS,CAAA,MAAM,CAAC,CAAA;AAClG,EAAA,MAAM,SAAS,aAAc,EAAA;AAC7B,EAAM,MAAA,KAAA,GAAQ,QAAQ,MAAM,aAAA,IAAA,IAAA,GAAA,aAAA,GAAiB,sBAAwB,EAAA,CAAC,aAAa,CAAC,CAAA;AACpF,EAAA,MAAM,WAAW,oBAAqB,EAAA;AACtC,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,QAAiB,CAAA;AAAA,IAC3C,IAAM,EAAA;AAAA,GACP,CAAA;AACD,EAAA,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AAA,IACL,SAAW,EAAA,QAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA,EAAA;AAAA,IACL,YAAc,EAAA,EAAA;AAAA,IACd,iBAAmB,EAAA,EAAA;AAAA,IACnB,eAAiB,EAAA,EAAA;AAAA,IACjB,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,CAAA;AAAA,IACN,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,iBAAmB,EAAA,EAAA;AAAA,IACnB,eAAiB,EAAA,CAAA;AAAA,IACjB,YAAc,EAAA,GAAA;AAAA,IACd,aAAa,UAAW,CAAA;AAAA,GAC1B;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA,EAAA;AAAA,IACX,YAAc,EAAA,CAAA;AAAA,IACd,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,CAAA;AAAA,IACN,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAmB,EAAA;AAAA;AAEvB,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {Text,StyleSheet,View}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {formatDuration}from'../noteText.js';import {dictationDate}from'./NoteView.js';function statusOf(record, theme) {
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {Text,StyleSheet,View}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {KIND_ICON,KIND_LABEL}from'../kinds.js';import {formatDuration}from'../noteText.js';import {dictationDate}from'./NoteView.js';function statusOf(record, theme) {
2
2
  var _a;
3
3
  if (record.status === "ready") {
4
4
  return ((_a = record.note) == null ? void 0 : _a.to_verify.length) ? {
@@ -42,14 +42,14 @@ function DictationList({
42
42
  }, children: [
43
43
  /* @__PURE__ */ jsx(View, { style: [styles.icon, {
44
44
  backgroundColor: theme.accentSoft
45
- }], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "file-document-outline", size: 18, color: theme.accent }) }),
45
+ }], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: record.note ? KIND_ICON[record.note.kind] : "file-document-outline", size: 18, color: theme.accent }) }),
46
46
  /* @__PURE__ */ jsxs(View, { style: styles.text, children: [
47
47
  /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.title, {
48
48
  color: theme.ink
49
49
  }], children: (_b = (_a = record.note) == null ? void 0 : _a.title) != null ? _b : "Dictation" }),
50
- /* @__PURE__ */ jsx(Text, { style: [styles.sub, {
50
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.sub, {
51
51
  color: theme.faint
52
- }], children: [dictationDate(record.createdAt), formatDuration(record.durationMs)].filter(Boolean).join(" \xB7 ") })
52
+ }], children: [record.note ? KIND_LABEL[record.note.kind] : "", dictationDate(record.createdAt), formatDuration(record.durationMs)].filter(Boolean).join(" \xB7 ") })
53
53
  ] }),
54
54
  status ? /* @__PURE__ */ jsx(View, { style: [styles.pill, {
55
55
  backgroundColor: status.bg