@adminide-stack/yantra-mobile 12.0.172-alpha.1 → 12.0.173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/lib/features/apps/mobileAppCatalog.js +2 -2
  2. package/lib/features/apps/mobileAppCatalog.js.map +1 -1
  3. package/lib/features/chat/NotionPageWidgetCard.js +98 -0
  4. package/lib/features/chat/NotionPageWidgetCard.js.map +1 -0
  5. package/lib/features/chat/hostTranscriptProtocol.js +5 -1
  6. package/lib/features/chat/hostTranscriptProtocol.js.map +1 -1
  7. package/lib/features/chat/notionPageWidget.js +34 -0
  8. package/lib/features/chat/notionPageWidget.js.map +1 -0
  9. package/lib/features/games/cubeforge3D.js +11 -6
  10. package/lib/features/games/cubeforge3D.js.map +1 -1
  11. package/lib/features/games/vendored/core/cubeforge/items.js +2 -8
  12. package/lib/features/games/vendored/core/cubeforge/items.js.map +1 -1
  13. package/lib/features/games/vendored/core/cubeforge/recipes.js +1 -4
  14. package/lib/features/games/vendored/core/cubeforge/recipes.js.map +1 -1
  15. package/lib/features/games/vendored/core/cubeforge/skin.js +83 -0
  16. package/lib/features/games/vendored/core/cubeforge/skin.js.map +1 -0
  17. package/lib/features/games/vendored/core/cubeforge/worldgen.js +2 -38
  18. package/lib/features/games/vendored/core/cubeforge/worldgen.js.map +1 -1
  19. package/lib/features/games/vendored/core/engine/palette.js +2 -9
  20. package/lib/features/games/vendored/core/engine/palette.js.map +1 -1
  21. package/lib/features/games/vendored/core/lessons/lessons.js +2 -96
  22. package/lib/features/games/vendored/core/lessons/lessons.js.map +1 -1
  23. package/lib/features/games/vendored/ui/GamesRoot.js +87 -144
  24. package/lib/features/games/vendored/ui/GamesRoot.js.map +1 -1
  25. package/lib/features/games/vendored/ui/components/primitives.js +2 -50
  26. package/lib/features/games/vendored/ui/components/primitives.js.map +1 -1
  27. package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js +20 -3
  28. package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js.map +1 -1
  29. package/lib/features/games/vendored/ui/screens/SkinEditorScreen.js +169 -0
  30. package/lib/features/games/vendored/ui/screens/SkinEditorScreen.js.map +1 -0
  31. package/lib/features/games/vendored/ui/theme.js +1 -3
  32. package/lib/features/games/vendored/ui/theme.js.map +1 -1
  33. package/lib/features/notion/notionEditorModel.js +3 -1
  34. package/lib/features/notion/notionEditorModel.js.map +1 -1
  35. package/lib/screens/GamesNative/index.js +1 -1
  36. package/lib/screens/Home/components/homeCatalog.js +2 -2
  37. package/lib/screens/Home/components/homeCatalog.js.map +1 -1
  38. package/package.json +4 -4
  39. package/lib/features/games/vendored/core/classroom/permissions.js +0 -76
  40. package/lib/features/games/vendored/core/classroom/permissions.js.map +0 -1
  41. package/lib/features/games/vendored/core/classroom/resourceLink.js +0 -101
  42. package/lib/features/games/vendored/core/classroom/resourceLink.js.map +0 -1
  43. package/lib/features/games/vendored/core/classroom/rules.js +0 -83
  44. package/lib/features/games/vendored/core/classroom/rules.js.map +0 -1
  45. package/lib/features/games/vendored/core/classroom/worldSettings.js +0 -49
  46. package/lib/features/games/vendored/core/classroom/worldSettings.js.map +0 -1
  47. package/lib/features/games/vendored/core/cubeforge/cycle.js +0 -15
  48. package/lib/features/games/vendored/core/cubeforge/cycle.js.map +0 -1
  49. package/lib/features/games/vendored/core/cubeforge/inventory.js +0 -75
  50. package/lib/features/games/vendored/core/cubeforge/inventory.js.map +0 -1
  51. package/lib/features/games/vendored/core/cubeforge/save.js +0 -92
  52. package/lib/features/games/vendored/core/cubeforge/save.js.map +0 -1
  53. package/lib/features/games/vendored/core/cubeforge/session.js +0 -154
  54. package/lib/features/games/vendored/core/cubeforge/session.js.map +0 -1
  55. package/lib/features/games/vendored/core/engine/iso.js +0 -41
  56. package/lib/features/games/vendored/core/engine/iso.js.map +0 -1
  57. package/lib/features/games/vendored/core/engine/world.js +0 -148
  58. package/lib/features/games/vendored/core/engine/world.js.map +0 -1
  59. package/lib/features/games/vendored/core/games/catalog.js +0 -34
  60. package/lib/features/games/vendored/core/games/catalog.js.map +0 -1
  61. package/lib/features/games/vendored/core/logging/events.js +0 -24
  62. package/lib/features/games/vendored/core/logging/events.js.map +0 -1
  63. package/lib/features/games/vendored/core/logging/logger.js +0 -54
  64. package/lib/features/games/vendored/core/logging/logger.js.map +0 -1
  65. package/lib/features/games/vendored/core/session/gameSession.js +0 -317
  66. package/lib/features/games/vendored/core/session/gameSession.js.map +0 -1
  67. package/lib/features/games/vendored/core/storage/worldRepository.js +0 -192
  68. package/lib/features/games/vendored/core/storage/worldRepository.js.map +0 -1
  69. package/lib/features/games/vendored/core/store/reactive.js +0 -78
  70. package/lib/features/games/vendored/core/store/reactive.js.map +0 -1
  71. package/lib/features/games/vendored/ui/components/BlockPalette.js +0 -64
  72. package/lib/features/games/vendored/ui/components/BlockPalette.js.map +0 -1
  73. package/lib/features/games/vendored/ui/components/IsoCanvas.js +0 -124
  74. package/lib/features/games/vendored/ui/components/IsoCanvas.js.map +0 -1
  75. package/lib/features/games/vendored/ui/hooks/useReactiveQuery.js +0 -3
  76. package/lib/features/games/vendored/ui/hooks/useReactiveQuery.js.map +0 -1
  77. package/lib/features/games/vendored/ui/screens/ActivityScreen.js +0 -68
  78. package/lib/features/games/vendored/ui/screens/ActivityScreen.js.map +0 -1
  79. package/lib/features/games/vendored/ui/screens/BuilderScreen.js +0 -227
  80. package/lib/features/games/vendored/ui/screens/BuilderScreen.js.map +0 -1
  81. package/lib/features/games/vendored/ui/screens/ClassroomScreen.js +0 -95
  82. package/lib/features/games/vendored/ui/screens/ClassroomScreen.js.map +0 -1
  83. package/lib/features/games/vendored/ui/screens/CubeforgeScreen.js +0 -342
  84. package/lib/features/games/vendored/ui/screens/CubeforgeScreen.js.map +0 -1
  85. package/lib/features/games/vendored/ui/screens/HubScreen.js +0 -131
  86. package/lib/features/games/vendored/ui/screens/HubScreen.js.map +0 -1
  87. package/lib/features/games/vendored/ui/screens/WorldListScreen.js +0 -134
  88. package/lib/features/games/vendored/ui/screens/WorldListScreen.js.map +0 -1
@@ -300,8 +300,8 @@ const MOBILE_APP_CATALOG = [
300
300
  label: "Games",
301
301
  icon: "cube-outline",
302
302
  group: "Create",
303
- prompt: "Open Yantra Games - build worlds block by block with guided lessons and a classroom mode.",
304
- // Yantra Games: an original block-building learning game, in-binary (local worlds, no backend).
303
+ prompt: "Open Cubeforge - gather, craft and build to survive in a 3D world.",
304
+ // Yantra Games is Cubeforge in 3D: the native engine, in-binary (a local world, no backend).
305
305
  nativeRoute: "games-native"
306
306
  },
307
307
  {
@@ -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 | 'games-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: 'games-native',\n label: 'Games',\n icon: 'cube-outline',\n group: 'Create',\n prompt: 'Open Yantra Games - build worlds block by block with guided lessons and a classroom mode.',\n // Yantra Games: an original block-building learning game, in-binary (local worlds, no backend).\n nativeRoute: 'games-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,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,GAAA,CAAI,KAAM,CAAA,GAAA,CAAI,CAAQ,IAAA,KAAA,IAAA,CAAK,UAAU,CAAA,CAAE,MAAO,CAAA,OAAO,CAAC,CAAA;AAC3E,EAAO,OAAA,KAAA,CAAM,MAAO,CAAA,CAAA,IAAA,KAAQ,CAAC,IAAA,CAAK,cAAkB,IAAA,CAAC,QAAS,CAAA,GAAA,CAAI,IAAK,CAAA,GAAG,CAAC,CAAA;AAC7E;AAcO,SAAS,gBAAiB,CAAA,KAAA,EAAiC,KAAe,EAAA,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;AAhkBhK,IAAA,IAAA,EAAA,EAAA,EAAA;AAgkBoK,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 | 'games-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: 'games-native',\n label: 'Games',\n icon: 'cube-outline',\n group: 'Create',\n prompt: 'Open Cubeforge - gather, craft and build to survive in a 3D world.',\n // Yantra Games is Cubeforge in 3D: the native engine, in-binary (a local world, no backend).\n nativeRoute: 'games-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,I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AC1E,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;AAhkBhK,IAAA,IAAA,EAAA,EAAA,EAAA;AAgkBoK,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"}
@@ -0,0 +1,98 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {memo,useCallback}from'react';import {View,StyleSheet,Pressable}from'react-native';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {mobileColors}from'../../theme/mobileTokens.js';const NotionPageWidgetCard = memo(function NotionPageWidgetCard2({
2
+ page,
3
+ isDark
4
+ }) {
5
+ var _a, _b;
6
+ const navigation = useNavigation();
7
+ const route = useRoute();
8
+ const orgName = (_b = (_a = route.params) == null ? void 0 : _a.orgName) != null ? _b : null;
9
+ const colors = mobileColors(isDark);
10
+ const open = useCallback(() => {
11
+ navigation.dispatch(CommonActions.navigate({
12
+ name: "MainStack.NotionPage",
13
+ params: {
14
+ orgName,
15
+ blockId: page.pageId
16
+ }
17
+ }));
18
+ }, [navigation, orgName, page.pageId]);
19
+ return /* @__PURE__ */ jsxs(View, { style: [styles.card, {
20
+ borderColor: colors.border,
21
+ backgroundColor: colors.surface
22
+ }], children: [
23
+ /* @__PURE__ */ jsxs(View, { style: styles.page, children: [
24
+ /* @__PURE__ */ jsx(View, { style: [styles.icon, {
25
+ backgroundColor: colors.surfaceMuted
26
+ }], children: page.icon ? /* @__PURE__ */ jsx(Text, { style: styles.emoji, children: page.icon }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "file-document-outline", size: 22, color: colors.text }) }),
27
+ /* @__PURE__ */ jsxs(View, { style: styles.body, children: [
28
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: [styles.title, {
29
+ color: colors.text
30
+ }], children: page.title }),
31
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.source, {
32
+ color: colors.textMuted
33
+ }], children: "Yantra Notion" })
34
+ ] })
35
+ ] }),
36
+ /* @__PURE__ */ jsx(Pressable, { onPress: open, accessibilityRole: "button", accessibilityLabel: `Open ${page.title} in Notion`, style: ({
37
+ pressed
38
+ }) => [styles.open, {
39
+ backgroundColor: colors.text
40
+ }, pressed && styles.pressed], children: /* @__PURE__ */ jsx(Text, { style: [styles.openText, {
41
+ color: colors.bg
42
+ }], children: "Open in Notion" }) })
43
+ ] });
44
+ });
45
+ const styles = StyleSheet.create({
46
+ card: {
47
+ width: "100%",
48
+ gap: 12,
49
+ padding: 12,
50
+ marginTop: 4,
51
+ marginBottom: 8,
52
+ borderWidth: 1,
53
+ borderRadius: 16
54
+ },
55
+ page: {
56
+ flexDirection: "row",
57
+ alignItems: "center",
58
+ gap: 12
59
+ },
60
+ icon: {
61
+ width: 40,
62
+ height: 40,
63
+ borderRadius: 10,
64
+ alignItems: "center",
65
+ justifyContent: "center"
66
+ },
67
+ emoji: {
68
+ fontSize: 20,
69
+ lineHeight: 26
70
+ },
71
+ body: {
72
+ flex: 1,
73
+ minWidth: 0
74
+ },
75
+ title: {
76
+ fontSize: 15,
77
+ fontWeight: "700",
78
+ lineHeight: 20
79
+ },
80
+ source: {
81
+ fontSize: 13,
82
+ lineHeight: 18,
83
+ marginTop: 1
84
+ },
85
+ open: {
86
+ height: 44,
87
+ borderRadius: 12,
88
+ alignItems: "center",
89
+ justifyContent: "center"
90
+ },
91
+ openText: {
92
+ fontSize: 14,
93
+ fontWeight: "600"
94
+ },
95
+ pressed: {
96
+ opacity: 0.75
97
+ }
98
+ });export{NotionPageWidgetCard};//# sourceMappingURL=NotionPageWidgetCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotionPageWidgetCard.js","sources":["../../../src/features/chat/NotionPageWidgetCard.tsx"],"sourcesContent":["/**\n * A page the agent wrote in Yantra Notion, with the way to open it. Without this the reply only named\n * the page, and the person had to go and find it under All pages.\n */\nimport React, { memo, useCallback } from 'react';\nimport { Pressable, StyleSheet, View } from 'react-native';\nimport {\n CommonActions,\n useNavigation,\n useRoute,\n type NavigationProp,\n type ParamListBase,\n} from '@react-navigation/native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { Text } from '@admin-layout/gluestack-ui-mobile';\nimport { mobileColors } from '../../theme/mobileTokens';\nimport type { NotionPageAttachment } from './notionPageWidget';\n\nexport const NotionPageWidgetCard = memo(function NotionPageWidgetCard({\n page,\n isDark,\n}: {\n page: NotionPageAttachment;\n isDark: boolean;\n}) {\n const navigation = useNavigation<NavigationProp<ParamListBase>>();\n const route = useRoute();\n const orgName = (route.params as { orgName?: string | null } | undefined)?.orgName ?? null;\n const colors = mobileColors(isDark);\n\n const open = useCallback(() => {\n navigation.dispatch(\n CommonActions.navigate({ name: 'MainStack.NotionPage', params: { orgName, blockId: page.pageId } }),\n );\n }, [navigation, orgName, page.pageId]);\n\n return (\n <View style={[styles.card, { borderColor: colors.border, backgroundColor: colors.surface }]}>\n <View style={styles.page}>\n <View style={[styles.icon, { backgroundColor: colors.surfaceMuted }]}>\n {page.icon ? (\n <Text style={styles.emoji}>{page.icon}</Text>\n ) : (\n <MaterialCommunityIcons name=\"file-document-outline\" size={22} color={colors.text} />\n )}\n </View>\n <View style={styles.body}>\n <Text numberOfLines={2} style={[styles.title, { color: colors.text }]}>\n {page.title}\n </Text>\n <Text numberOfLines={1} style={[styles.source, { color: colors.textMuted }]}>\n Yantra Notion\n </Text>\n </View>\n </View>\n <Pressable\n onPress={open}\n accessibilityRole=\"button\"\n accessibilityLabel={`Open ${page.title} in Notion`}\n style={({ pressed }) => [styles.open, { backgroundColor: colors.text }, pressed && styles.pressed]}\n >\n <Text style={[styles.openText, { color: colors.bg }]}>Open in Notion</Text>\n </Pressable>\n </View>\n );\n});\n\nconst styles = StyleSheet.create({\n card: {\n width: '100%',\n gap: 12,\n padding: 12,\n marginTop: 4,\n marginBottom: 8,\n borderWidth: 1,\n borderRadius: 16,\n },\n page: { flexDirection: 'row', alignItems: 'center', gap: 12 },\n icon: { width: 40, height: 40, borderRadius: 10, alignItems: 'center', justifyContent: 'center' },\n emoji: { fontSize: 20, lineHeight: 26 },\n body: { flex: 1, minWidth: 0 },\n title: { fontSize: 15, fontWeight: '700', lineHeight: 20 },\n source: { fontSize: 13, lineHeight: 18, marginTop: 1 },\n open: { height: 44, borderRadius: 12, alignItems: 'center', justifyContent: 'center' },\n openText: { fontSize: 14, fontWeight: '600' },\n pressed: { opacity: 0.75 },\n});\n"],"names":["NotionPageWidgetCard"],"mappings":"mXAWa,MAAA,oBAAA,GAAuB,IAAK,CAAA,SAASA,qBAAqB,CAAA;AAAA,EACrE,IAAA;AAAA,EACA;AACF,CAGG,EAAA;AAjBH,EAAA,IAAA,EAAA,EAAA,EAAA;AAkBE,EAAA,MAAM,aAAa,aAA6C,EAAA;AAChE,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAA,MAAM,OAAW,GAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAM,MAAN,KAAA,IAAA,GAAA,MAAA,GAAA,EAAA,CAED,YAFC,IAEU,GAAA,EAAA,GAAA,IAAA;AAC3B,EAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA;AAClC,E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EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,CAAA;AAAA,IACN,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,UAAY,EAAA;AAAA,GACd;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,QAAU,EAAA;AAAA,IACR,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,OAAS,EAAA;AAAA,IACP,OAAS,EAAA;AAAA;AAEb,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import {surfaceReplyDisplayText,TEMPLATES_WIDGET,parseTemplatesOpening,CANVAS_DESIGN_WIDGET,toCanvasDesignAttachment,splitTemplatesSurfaceLink,canvasDesignFromWidget}from'common';import {TemplatesWidgetCard,CanvasDesignWidgetCard}from'./TemplatesChatCards.js';import {registerTranscriptProtocol}from'./transcriptProtocol.js';var __defProp = Object.defineProperty;
1
+ import {jsx}from'react/jsx-runtime';import {surfaceReplyDisplayText,TEMPLATES_WIDGET,parseTemplatesOpening,CANVAS_DESIGN_WIDGET,toCanvasDesignAttachment,splitTemplatesSurfaceLink,canvasDesignFromWidget}from'common';import {NotionPageWidgetCard}from'./NotionPageWidgetCard.js';import {NOTION_PAGE_WIDGET,toNotionPageAttachment}from'./notionPageWidget.js';import {TemplatesWidgetCard,CanvasDesignWidgetCard}from'./TemplatesChatCards.js';import {registerTranscriptProtocol}from'./transcriptProtocol.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -73,6 +73,10 @@ const hostTranscriptProtocol = {
73
73
  const design = toCanvasDesignAttachment(widget.attachment);
74
74
  return design ? /* @__PURE__ */ jsx(CanvasDesignWidgetCard, { design, isDark }) : null;
75
75
  }
76
+ if (widget.component === NOTION_PAGE_WIDGET) {
77
+ const page = toNotionPageAttachment(widget.attachment);
78
+ return page ? /* @__PURE__ */ jsx(NotionPageWidgetCard, { page, isDark }) : null;
79
+ }
76
80
  return null;
77
81
  },
78
82
  userTurnText: surfaceReplyDisplayText
@@ -1 +1 @@
1
- {"version":3,"file":"hostTranscriptProtocol.js","sources":["../../../src/features/chat/hostTranscriptProtocol.tsx"],"sourcesContent":["/**\n * The host's half of transcriptProtocol: templates in a chat, read by common's\n * TEMPLATES_CHAT_PROTOCOL and drawn as TemplatesChatCards.\n *\n * Host-only: this module imports `common` and the in-app browser, which the federated surface\n * remotes must not bundle. A remote's transcript reaches it through the registered protocol. The\n * card is a host component; rendered inside the remote's tree it still reads the host's providers,\n * which wrap that tree (as the connect card does, useHostConnectorCard).\n */\nimport React from 'react';\nimport {\n CANVAS_DESIGN_WIDGET,\n canvasDesignFromWidget,\n parseTemplatesOpening,\n splitTemplatesSurfaceLink,\n surfaceReplyDisplayText,\n TEMPLATES_WIDGET,\n toCanvasDesignAttachment,\n} from 'common';\nimport type { ChatWidgetEnvelope } from './chatWidgets';\nimport { CanvasDesignWidgetCard, TemplatesWidgetCard } from './TemplatesChatCards';\nimport { registerTranscriptProtocol, type TranscriptProtocol } from './transcriptProtocol';\n\nfunction readWidget(envelope: ChatWidgetEnvelope) {\n // Templates to browse: every field optional, the opening sometimes flat in `contents`.\n if (envelope.propsComponent === TEMPLATES_WIDGET) {\n const contents = envelope.propsConfiguration?.contents as Record<string, unknown> | undefined;\n const opening = parseTemplatesOpening(contents?.attachment ?? envelope.attachment ?? contents ?? {});\n return opening ? { component: TEMPLATES_WIDGET, attachment: { ...opening } } : null;\n }\n // A design made from a template, only with the canvas artifact it is.\n if (envelope.propsComponent === CANVAS_DESIGN_WIDGET) {\n const design = canvasDesignFromWidget(envelope);\n return design ? { component: CANVAS_DESIGN_WIDGET, attachment: { ...design } } : null;\n }\n return undefined;\n}\n\nexport const hostTranscriptProtocol: TranscriptProtocol = {\n readWidget,\n settleWidgets({ text, widgets }) {\n // The gateway keeps the reply's LAST templates widget as the link's snapshot, so that one owns it.\n const templates = widgets.map((w) => w.component).lastIndexOf(TEMPLATES_WIDGET);\n if (templates < 0) return { text, widgets };\n const { text: rest, url } = splitTemplatesSurfaceLink(text);\n if (!url) return { text, widgets };\n const settled = [...widgets];\n settled[templates] = { ...settled[templates], link: url };\n return { text: rest, widgets: settled };\n },\n renderWidget(widget, isDark) {\n if (widget.component === TEMPLATES_WIDGET) {\n const opening = parseTemplatesOpening(widget.attachment);\n return opening ? <TemplatesWidgetCard opening={opening} link={widget.link} isDark={isDark} /> : null;\n }\n if (widget.component === CANVAS_DESIGN_WIDGET) {\n const design = toCanvasDesignAttachment(widget.attachment);\n return design ? <CanvasDesignWidgetCard design={design} isDark={isDark} /> : null;\n }\n return null;\n },\n userTurnText: surfaceReplyDisplayText,\n};\n\n/** Called once at startup, from this package's module (the host's, never a remote's). */\nexport function registerHostTranscriptProtocol(): () => void {\n return registerTranscriptProtocol(hostTranscriptProtocol);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,SAAS,WAAW,QAA8B,EAAA;AAdlD,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AAgBE,EAAI,IAAA,QAAA,C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CAAA;AAClC,IAAI,IAAA,CAAC,KAAY,OAAA;AAAA,MACf,IAAA;AAAA,MACA;AAAA,KACF;AACA,IAAM,MAAA,OAAA,GAAU,CAAC,GAAG,OAAO,CAAA;AAC3B,IAAA,OAAA,CAAQ,SAAS,CAAA,GAAI,aAChB,CAAA,cAAA,CAAA,EAAA,EAAA,OAAA,CAAQ,SAAS,CADD,CAAA,EAAA;AAAA,MAEnB,IAAM,EAAA;AAAA,KACR,CAAA;AACA,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,IAAA;AAAA,MACN,OAAS,EAAA;AAAA,KACX;AAAA,GACF;AAAA,EACA,YAAA,CAAa,QAAQ,MAAQ,EAAA;AAC3B,IAAI,IAAA,MAAA,CAAO,cAAc,gBAAkB,EAAA;AACzC,MAAM,MAAA,OAAA,GAAU,qBAAsB,CAAA,MAAA,CAAO,UAAU,CAAA;AACvD,MAAO,OAAA,OAAA,uBAAW,mBAAoB,EAAA,EAAA,OAAA,EAAkB,MAAM,MAAO,CAAA,IAAA,EAAM,QAAgB,CAAK,GAAA,IAAA;AAAA;AAElG,IAAI,IAAA,MAAA,CAAO,cAAc,oBAAsB,EAAA;AAC7C,MAAM,MAAA,MAAA,GAAS,wBAAyB,CAAA,MAAA,CAAO,UAAU,CAAA;AACzD,MAAA,OAAO,MAAS,mBAAA,GAAA,CAAC,sBAAuB,EAAA,EAAA,MAAA,EAAgB,QAAgB,CAAK,GAAA,IAAA;AAAA;AAE/E,IAAO,OAAA,IAAA;AAAA,GACT;AAAA,EACA,YAAc,EAAA;AAChB;AAGO,SAAS,8BAA6C,GAAA;AAC3D,EAAA,OAAO,2BAA2B,sBAAsB,CAAA;AAC1D"}
1
+ {"version":3,"file":"hostTranscriptProtocol.js","sources":["../../../src/features/chat/hostTranscriptProtocol.tsx"],"sourcesContent":["/**\n * The host's half of transcriptProtocol: templates in a chat, read by common's\n * TEMPLATES_CHAT_PROTOCOL and drawn as TemplatesChatCards.\n *\n * Host-only: this module imports `common` and the in-app browser, which the federated surface\n * remotes must not bundle. A remote's transcript reaches it through the registered protocol. The\n * card is a host component; rendered inside the remote's tree it still reads the host's providers,\n * which wrap that tree (as the connect card does, useHostConnectorCard).\n */\nimport React from 'react';\nimport {\n CANVAS_DESIGN_WIDGET,\n canvasDesignFromWidget,\n parseTemplatesOpening,\n splitTemplatesSurfaceLink,\n surfaceReplyDisplayText,\n TEMPLATES_WIDGET,\n toCanvasDesignAttachment,\n} from 'common';\nimport type { ChatWidgetEnvelope } from './chatWidgets';\nimport { NotionPageWidgetCard } from './NotionPageWidgetCard';\nimport { NOTION_PAGE_WIDGET, toNotionPageAttachment } from './notionPageWidget';\nimport { CanvasDesignWidgetCard, TemplatesWidgetCard } from './TemplatesChatCards';\nimport { registerTranscriptProtocol, type TranscriptProtocol } from './transcriptProtocol';\n\nfunction readWidget(envelope: ChatWidgetEnvelope) {\n // Templates to browse: every field optional, the opening sometimes flat in `contents`.\n if (envelope.propsComponent === TEMPLATES_WIDGET) {\n const contents = envelope.propsConfiguration?.contents as Record<string, unknown> | undefined;\n const opening = parseTemplatesOpening(contents?.attachment ?? envelope.attachment ?? contents ?? {});\n return opening ? { component: TEMPLATES_WIDGET, attachment: { ...opening } } : null;\n }\n // A design made from a template, only with the canvas artifact it is.\n if (envelope.propsComponent === CANVAS_DESIGN_WIDGET) {\n const design = canvasDesignFromWidget(envelope);\n return design ? { component: CANVAS_DESIGN_WIDGET, attachment: { ...design } } : null;\n }\n return undefined;\n}\n\nexport const hostTranscriptProtocol: TranscriptProtocol = {\n readWidget,\n settleWidgets({ text, widgets }) {\n // The gateway keeps the reply's LAST templates widget as the link's snapshot, so that one owns it.\n const templates = widgets.map((w) => w.component).lastIndexOf(TEMPLATES_WIDGET);\n if (templates < 0) return { text, widgets };\n const { text: rest, url } = splitTemplatesSurfaceLink(text);\n if (!url) return { text, widgets };\n const settled = [...widgets];\n settled[templates] = { ...settled[templates], link: url };\n return { text: rest, widgets: settled };\n },\n renderWidget(widget, isDark) {\n if (widget.component === TEMPLATES_WIDGET) {\n const opening = parseTemplatesOpening(widget.attachment);\n return opening ? <TemplatesWidgetCard opening={opening} link={widget.link} isDark={isDark} /> : null;\n }\n if (widget.component === CANVAS_DESIGN_WIDGET) {\n const design = toCanvasDesignAttachment(widget.attachment);\n return design ? <CanvasDesignWidgetCard design={design} isDark={isDark} /> : null;\n }\n if (widget.component === NOTION_PAGE_WIDGET) {\n const page = toNotionPageAttachment(widget.attachment);\n return page ? <NotionPageWidgetCard page={page} isDark={isDark} /> : null;\n }\n return null;\n },\n userTurnText: surfaceReplyDisplayText,\n};\n\n/** Called once at startup, from this package's module (the host's, never a remote's). */\nexport function registerHostTranscriptProtocol(): () => void {\n return registerTranscriptProtocol(hostTranscriptProtocol);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA,SAAS,WAAW,QAA8B,EAAA;AAhBlD,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AAkBE,EAAI,IAAA,QAAA,CAAS,mBAAmB,gBAAkB,EAAA;AAChD,IAAM,MAAA,QAAA,GAAA,CAAW,EAAS,GAAA,QAAA,CAAA,kBAAA,KAAT,IAA6B,GAAA,MAAA,GAAA,EAAA,CAAA,QAAA;AAC9C,IAAM,MAAA,OAAA,GAAU,qBAAsB,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,QAAA,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAU,UAAV,KAAA,IAAA,GAAA,EAAA,GAAwB,QAAS,CAAA,UAAA,KAAjC,IAA+C,GAAA,EAAA,GAAA,QAAA,KAA/C,IAA2D,GAAA,EAAA,GAAA,EAAE,CAAA;AACnG,IAAA,OAAO,OAAU,GAAA;AAAA,MACf,SAAW,EAAA,gBAAA;AAAA,MACX,YAAY,cACP,CAAA,EAAA,EAAA,OAAA;AAAA,KAEH,GAAA,IAAA;AAAA;AAGN,EAAI,IAAA,QAAA,CAAS,mB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AAA,EAAkB,MAAM,MAAO,CAAA,IAAA,EAAM,QAAgB,CAAK,GAAA,IAAA;AAAA;AAElG,IAAI,IAAA,MAAA,CAAO,cAAc,oBAAsB,EAAA;AAC7C,MAAM,MAAA,MAAA,GAAS,wBAAyB,CAAA,MAAA,CAAO,UAAU,CAAA;AACzD,MAAA,OAAO,MAAS,mBAAA,GAAA,CAAC,sBAAuB,EAAA,EAAA,MAAA,EAAgB,QAAgB,CAAK,GAAA,IAAA;AAAA;AAE/E,IAAI,IAAA,MAAA,CAAO,cAAc,kBAAoB,EAAA;AAC3C,MAAM,MAAA,IAAA,GAAO,sBAAuB,CAAA,MAAA,CAAO,UAAU,CAAA;AACrD,MAAA,OAAO,IAAO,mBAAA,GAAA,CAAC,oBAAqB,EAAA,EAAA,IAAA,EAAY,QAAgB,CAAK,GAAA,IAAA;AAAA;AAEvE,IAAO,OAAA,IAAA;AAAA,GACT;AAAA,EACA,YAAc,EAAA;AAChB;AAGO,SAAS,8BAA6C,GAAA;AAC3D,EAAA,OAAO,2BAA2B,sBAAsB,CAAA;AAC1D"}
@@ -0,0 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ const NOTION_PAGE_WIDGET = "notion-page";
18
+ function text(value) {
19
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
20
+ }
21
+ function toNotionPageAttachment(raw) {
22
+ var _a;
23
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
24
+ const a = raw;
25
+ const pageId = text(a.pageId);
26
+ if (!pageId) return null;
27
+ const icon = text(a.icon);
28
+ return __spreadValues({
29
+ pageId,
30
+ title: (_a = text(a.title)) != null ? _a : "Untitled"
31
+ }, icon ? {
32
+ icon
33
+ } : {});
34
+ }export{NOTION_PAGE_WIDGET,toNotionPageAttachment};//# sourceMappingURL=notionPageWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notionPageWidget.js","sources":["../../../src/features/chat/notionPageWidget.ts"],"sourcesContent":["/** The `propsComponent` the Yantra Notion skill ends a reply with, once a page exists. */\nexport const NOTION_PAGE_WIDGET = 'notion-page';\n\nexport interface NotionPageAttachment {\n pageId: string;\n title: string;\n icon?: string;\n}\n\nfunction text(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\n/** One attachment as a Yantra Notion page, or null without the page it opens. The web's reader, on the phone. */\nexport function toNotionPageAttachment(raw: unknown): NotionPageAttachment | null {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return null;\n const a = raw as Record<string, unknown>;\n const pageId = text(a.pageId);\n if (!pageId) return null;\n const icon = text(a.icon);\n return { pageId, title: text(a.title) ?? 'Untitled', ...(icon ? { icon } : {}) };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACO,MAAM,kBAAqB,GAAA;AAMlC,SAAS,KAAK,KAAoC,EAAA;AAChD,EAAO,OAAA,OAAO,UAAU,QAAY,IAAA,KAAA,CAAM,MAAS,GAAA,KAAA,CAAM,MAAS,GAAA,MAAA;AACpE;AAGO,SAAS,uBAAuB,GAA2C,EAAA;AAZlF,EAAA,IAAA,EAAA;AAaE,EAAI,IAAA,CAAC,OAAO,OAAO,GAAA,KAAQ,YAAY,KAAM,CAAA,OAAA,CAAQ,GAAG,CAAA,EAAU,OAAA,IAAA;AAClE,EAAA,MAAM,CAAI,GAAA,GAAA;AACV,EAAM,MAAA,MAAA,GAAS,IAAK,CAAA,CAAA,CAAE,MAAM,CAAA;AAC5B,EAAI,IAAA,CAAC,QAAe,OAAA,IAAA;AACpB,EAAM,MAAA,IAAA,GAAO,IAAK,CAAA,CAAA,CAAE,IAAI,CAAA;AACxB,EAAO,OAAA,cAAA,CAAA;AAAA,IACL,MAAA;AAAA,IACA,KAAO,EAAA,CAAA,EAAA,GAAA,IAAA,CAAK,CAAE,CAAA,KAAK,MAAZ,IAAiB,GAAA,EAAA,GAAA;AAAA,GAAA,EACpB,IAAO,GAAA;AAAA,IACT;AAAA,MACE,EAAC,CAAA;AAET"}
@@ -1,5 +1,10 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {Platform,StyleSheet,Modal,KeyboardAvoidingView,Pressable,View,TextInput,Text}from'react-native';import {requireOptionalNativeModule,requireNativeViewManager}from'expo-modules-core';import {SafeAreaView}from'react-native-safe-area-context';const MAX_CHAT_CHARS = 200;
2
- const nativeModule = () => Platform.OS === "ios" ? requireOptionalNativeModule("YantraCubeforge") : null;
1
+ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {StyleSheet,Platform,Modal,KeyboardAvoidingView,Pressable,View,TextInput,Text}from'react-native';import {requireNativeViewManager,requireOptionalNativeModule}from'expo-modules-core';import {SafeAreaView}from'react-native-safe-area-context';const MAX_CHAT_CHARS = 200;
2
+ const SUPPORTED_PLATFORMS = /* @__PURE__ */ new Set(["ios", "android"]);
3
+ function nativeModule() {
4
+ if (!SUPPORTED_PLATFORMS.has(Platform.OS)) return null;
5
+ const module = requireOptionalNativeModule("YantraCubeforge");
6
+ return (module == null ? void 0 : module.engineAvailable) === false ? null : module;
7
+ }
3
8
  function cubeforgeFriendsSupported() {
4
9
  var _a;
5
10
  return typeof ((_a = nativeModule()) == null ? void 0 : _a.deleteWorld) === "function";
@@ -18,7 +23,7 @@ function ChatBar({
18
23
  if (text) onSend(text);
19
24
  onClose();
20
25
  };
21
- return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxs(KeyboardAvoidingView, { behavior: "padding", style: styles.fillClear, children: [
26
+ return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxs(KeyboardAvoidingView, { behavior: Platform.OS === "ios" ? "padding" : void 0, style: styles.fillClear, children: [
22
27
  /* @__PURE__ */ jsx(Pressable, { accessibilityLabel: "Close chat", style: styles.fillClear, onPress: onClose }),
23
28
  /* @__PURE__ */ jsxs(View, { style: styles.chatBar, children: [
24
29
  /* @__PURE__ */ jsx(TextInput, { autoFocus: true, value: draft, onChangeText: setDraft, onSubmitEditing: send, maxLength: MAX_CHAT_CHARS, placeholder: "Message everyone here", placeholderTextColor: "#94a3b8", returnKeyType: "send", style: styles.chatInput }),
@@ -30,14 +35,14 @@ let cached;
30
35
  function cubeforge3DComponent() {
31
36
  if (cached !== void 0) return cached;
32
37
  cached = null;
33
- if (Platform.OS !== "ios") return cached;
34
38
  try {
35
- if (!requireOptionalNativeModule("YantraCubeforge")) return cached;
39
+ if (!nativeModule()) return cached;
36
40
  const NativeCubeforge = requireNativeViewManager("YantraCubeforge");
37
41
  cached = function Cubeforge3D({
38
42
  seed,
39
43
  worldKey,
40
44
  room,
45
+ skin,
41
46
  onExit,
42
47
  onRoomClosed,
43
48
  onTokenExpired
@@ -45,7 +50,7 @@ function cubeforge3DComponent() {
45
50
  const engine = React.useRef(null);
46
51
  const [chatting, setChatting] = React.useState(false);
47
52
  return /* @__PURE__ */ jsxs(SafeAreaView, { edges: ["bottom", "left", "right"], style: styles.fill, children: [
48
- /* @__PURE__ */ jsx(NativeCubeforge, { ref: engine, style: styles.fill, seed, worldKey, room, onExit, onOpenChat: () => setChatting(true), onRoomClosed: () => onRoomClosed == null ? void 0 : onRoomClosed(), onTokenExpired: () => onTokenExpired == null ? void 0 : onTokenExpired() }),
53
+ /* @__PURE__ */ jsx(NativeCubeforge, { ref: engine, style: styles.fill, seed, worldKey, room, skin, onExit, onOpenChat: () => setChatting(true), onRoomClosed: () => onRoomClosed == null ? void 0 : onRoomClosed(), onTokenExpired: () => onTokenExpired == null ? void 0 : onTokenExpired() }),
49
54
  chatting ? /* @__PURE__ */ jsx(ChatBar, { onSend: (text) => {
50
55
  var _a;
51
56
  (_a = engine.current) == null ? void 0 : _a.sendChat(text).catch(() => void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"cubeforge3D.js","sources":["../../../src/features/games/cubeforge3D.tsx"],"sourcesContent":["/**\n * Cubeforge 3D: the native Rust + Metal engine (portable-devices/mobile/modules/\n * yantra-cubeforge, iOS only) as the `cubeforge3D` component Yantra Games shows\n * behind \"Play in 3D\".\n *\n * Optional on purpose: an over-the-air JS update can reach a binary built\n * before the module existed, and Android has none. Both read as \"no module\",\n * and Yantra Games then simply hides \"Play in 3D\".\n */\nimport * as React from 'react';\nimport {\n KeyboardAvoidingView,\n Modal,\n Platform,\n Pressable,\n StyleSheet,\n Text,\n TextInput,\n View,\n type ViewProps,\n} from 'react-native';\nimport { requireNativeViewManager, requireOptionalNativeModule } from 'expo-modules-core';\nimport { SafeAreaView } from 'react-native-safe-area-context';\nimport type { Cubeforge3DProps } from './vendored';\n\ninterface NativeCubeforgeProps extends ViewProps {\n seed: number;\n worldKey: string;\n room?: Cubeforge3DProps['room'];\n onExit: () => void;\n onOpenChat: () => void;\n onRoomClosed: () => void;\n onTokenExpired: () => void;\n}\n\ninterface NativeCubeforgeHandle {\n sendChat: (text: string) => Promise<boolean>;\n}\n\ntype NativeCubeforgeView = React.ComponentType<NativeCubeforgeProps & React.RefAttributes<NativeCubeforgeHandle>>;\n\ninterface NativeCubeforgeModule {\n deleteWorld?: (worldKey: string) => void;\n}\n\nconst MAX_CHAT_CHARS = 200;\n\nconst nativeModule = (): NativeCubeforgeModule | null =>\n Platform.OS === 'ios' ? requireOptionalNativeModule<NativeCubeforgeModule>('YantraCubeforge') : null;\n\n/** Whether this binary's engine can join shared worlds. Older ones cannot. */\nexport function cubeforgeFriendsSupported(): boolean {\n return typeof nativeModule()?.deleteWorld === 'function';\n}\n\n/** Remove a 3D world's save from this device. */\nexport function deleteCubeforgeSave(worldKey: string): void {\n nativeModule()?.deleteWorld?.(worldKey);\n}\n\nfunction ChatBar({ onSend, onClose }: { onSend: (text: string) => void; onClose: () => void }) {\n const [draft, setDraft] = React.useState('');\n const send = () => {\n const text = draft.trim();\n if (text) onSend(text);\n onClose();\n };\n return (\n <Modal transparent visible animationType=\"fade\" onRequestClose={onClose}>\n <KeyboardAvoidingView behavior=\"padding\" style={styles.fillClear}>\n <Pressable accessibilityLabel=\"Close chat\" style={styles.fillClear} onPress={onClose} />\n <View style={styles.chatBar}>\n <TextInput\n autoFocus\n value={draft}\n onChangeText={setDraft}\n onSubmitEditing={send}\n maxLength={MAX_CHAT_CHARS}\n placeholder=\"Message everyone here\"\n placeholderTextColor=\"#94a3b8\"\n returnKeyType=\"send\"\n style={styles.chatInput}\n />\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel=\"Send\"\n onPress={send}\n style={styles.chatSend}\n >\n <Text style={styles.chatSendLabel}>Send</Text>\n </Pressable>\n </View>\n </KeyboardAvoidingView>\n </Modal>\n );\n}\n\nlet cached: React.ComponentType<Cubeforge3DProps> | null | undefined;\n\n/** The 3D component when this binary ships the engine, otherwise null. */\nexport function cubeforge3DComponent(): React.ComponentType<Cubeforge3DProps> | null {\n if (cached !== undefined) return cached;\n cached = null;\n if (Platform.OS !== 'ios') return cached;\n try {\n if (!requireOptionalNativeModule('YantraCubeforge')) return cached;\n const NativeCubeforge = requireNativeViewManager<NativeCubeforgeProps>(\n 'YantraCubeforge',\n ) as unknown as NativeCubeforgeView;\n cached = function Cubeforge3D({\n seed,\n worldKey,\n room,\n onExit,\n onRoomClosed,\n onTokenExpired,\n }: Cubeforge3DProps) {\n const engine = React.useRef<NativeCubeforgeHandle>(null);\n const [chatting, setChatting] = React.useState(false);\n // The engine draws edge to edge; keep its HUD clear of the home indicator.\n return (\n <SafeAreaView edges={['bottom', 'left', 'right']} style={styles.fill}>\n <NativeCubeforge\n ref={engine}\n style={styles.fill}\n seed={seed}\n worldKey={worldKey}\n room={room}\n onExit={onExit}\n onOpenChat={() => setChatting(true)}\n onRoomClosed={() => onRoomClosed?.()}\n onTokenExpired={() => onTokenExpired?.()}\n />\n {chatting ? (\n <ChatBar\n onSend={(text) => {\n engine.current?.sendChat(text).catch(() => undefined);\n }}\n onClose={() => setChatting(false)}\n />\n ) : null}\n </SafeAreaView>\n );\n };\n } catch {\n cached = null;\n }\n return cached;\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1, backgroundColor: '#000' },\n fillClear: { flex: 1 },\n chatBar: { flexDirection: 'row', alignItems: 'center', gap: 8, padding: 10, backgroundColor: '#12161b' },\n chatInput: {\n flex: 1,\n minHeight: 44,\n borderRadius: 10,\n paddingHorizontal: 12,\n color: '#f1f5f9',\n backgroundColor: '#242b33',\n fontSize: 16,\n },\n chatSend: {\n minHeight: 44,\n minWidth: 64,\n borderRadius: 10,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: '#3f7fbf',\n },\n chatSendLabel: { color: '#ffffff', fontSize: 15, fontWeight: '600' },\n});\n"],"names":[],"mappings":"4TA8BA,MAAM,cAAiB,GAAA,GAAA;AACvB,MAAM,eAAe,MAAoC,QAAA,CAAS,OAAO,KAAQ,GAAA,2BAAA,CAAmD,iBAAiB,CAAI,GAAA,IAAA;AAGlJ,SAAS,yBAAqC,GAAA;AAlCrD,EAAA,IAAA,EAAA;AAmCE,EAAA,OAAO,QAAO,CAAA,EAAA,GAAA,YAAA,EAAA,KAAA,IAAA,GAAA,MAAA,GAAA,EAAA,CAAgB,WAAgB,CAAA,KAAA,UAAA;AAChD;AAGO,SAAS,oBAAoB,QAAwB,EAAA;AAvC5D,EAAA,IAAA,EAAA,EAAA,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AU,EAAA;AAAA,IACR,SAAW,EAAA,EAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,YAAc,EAAA,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,aAAe,EAAA;AAAA,IACb,KAAO,EAAA,SAAA;AAAA,IACP,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA;AAEhB,CAAC,CAAA"}
1
+ {"version":3,"file":"cubeforge3D.js","sources":["../../../src/features/games/cubeforge3D.tsx"],"sourcesContent":["/**\n * Cubeforge 3D: the native Rust engine (portable-devices/mobile/modules/\n * yantra-cubeforge, Metal on iOS, Vulkan or GL on Android) as the `cubeforge3D`\n * component Yantra Games shows behind \"Play in 3D\".\n *\n * Optional on purpose: an over-the-air JS update can reach a binary built\n * before the module existed, and 32-bit Android phones have no engine. Both\n * read as \"no module\", and Yantra Games then simply hides \"Play in 3D\".\n */\nimport * as React from 'react';\nimport {\n KeyboardAvoidingView,\n Modal,\n Platform,\n Pressable,\n StyleSheet,\n Text,\n TextInput,\n View,\n type ViewProps,\n} from 'react-native';\nimport { requireNativeViewManager, requireOptionalNativeModule } from 'expo-modules-core';\nimport { SafeAreaView } from 'react-native-safe-area-context';\nimport type { Cubeforge3DProps } from './vendored';\n\ninterface NativeCubeforgeProps extends ViewProps {\n seed: number;\n worldKey: string;\n room?: Cubeforge3DProps['room'];\n skin?: string;\n onExit: () => void;\n onOpenChat: () => void;\n onRoomClosed: () => void;\n onTokenExpired: () => void;\n}\n\ninterface NativeCubeforgeHandle {\n sendChat: (text: string) => Promise<boolean>;\n}\n\ntype NativeCubeforgeView = React.ComponentType<NativeCubeforgeProps & React.RefAttributes<NativeCubeforgeHandle>>;\n\ninterface NativeCubeforgeModule {\n deleteWorld?: (worldKey: string) => void;\n /** Android only: false on a CPU the engine is not built for. */\n engineAvailable?: boolean;\n}\n\nconst MAX_CHAT_CHARS = 200;\n\nconst SUPPORTED_PLATFORMS = new Set(['ios', 'android']);\n\nfunction nativeModule(): NativeCubeforgeModule | null {\n if (!SUPPORTED_PLATFORMS.has(Platform.OS)) return null;\n const module = requireOptionalNativeModule<NativeCubeforgeModule>('YantraCubeforge');\n return module?.engineAvailable === false ? null : module;\n}\n\n/** Whether this binary's engine can join shared worlds. Older ones cannot. */\nexport function cubeforgeFriendsSupported(): boolean {\n return typeof nativeModule()?.deleteWorld === 'function';\n}\n\n/** Remove a 3D world's save from this device. */\nexport function deleteCubeforgeSave(worldKey: string): void {\n nativeModule()?.deleteWorld?.(worldKey);\n}\n\nfunction ChatBar({ onSend, onClose }: { onSend: (text: string) => void; onClose: () => void }) {\n const [draft, setDraft] = React.useState('');\n const send = () => {\n const text = draft.trim();\n if (text) onSend(text);\n onClose();\n };\n return (\n <Modal transparent visible animationType=\"fade\" onRequestClose={onClose}>\n <KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined} style={styles.fillClear}>\n <Pressable accessibilityLabel=\"Close chat\" style={styles.fillClear} onPress={onClose} />\n <View style={styles.chatBar}>\n <TextInput\n autoFocus\n value={draft}\n onChangeText={setDraft}\n onSubmitEditing={send}\n maxLength={MAX_CHAT_CHARS}\n placeholder=\"Message everyone here\"\n placeholderTextColor=\"#94a3b8\"\n returnKeyType=\"send\"\n style={styles.chatInput}\n />\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel=\"Send\"\n onPress={send}\n style={styles.chatSend}\n >\n <Text style={styles.chatSendLabel}>Send</Text>\n </Pressable>\n </View>\n </KeyboardAvoidingView>\n </Modal>\n );\n}\n\nlet cached: React.ComponentType<Cubeforge3DProps> | null | undefined;\n\n/** The 3D component when this binary ships the engine, otherwise null. */\nexport function cubeforge3DComponent(): React.ComponentType<Cubeforge3DProps> | null {\n if (cached !== undefined) return cached;\n cached = null;\n try {\n if (!nativeModule()) return cached;\n const NativeCubeforge = requireNativeViewManager<NativeCubeforgeProps>(\n 'YantraCubeforge',\n ) as unknown as NativeCubeforgeView;\n cached = function Cubeforge3D({\n seed,\n worldKey,\n room,\n skin,\n onExit,\n onRoomClosed,\n onTokenExpired,\n }: Cubeforge3DProps) {\n const engine = React.useRef<NativeCubeforgeHandle>(null);\n const [chatting, setChatting] = React.useState(false);\n // The engine draws edge to edge; keep its HUD clear of the home indicator.\n return (\n <SafeAreaView edges={['bottom', 'left', 'right']} style={styles.fill}>\n <NativeCubeforge\n ref={engine}\n style={styles.fill}\n seed={seed}\n worldKey={worldKey}\n room={room}\n skin={skin}\n onExit={onExit}\n onOpenChat={() => setChatting(true)}\n onRoomClosed={() => onRoomClosed?.()}\n onTokenExpired={() => onTokenExpired?.()}\n />\n {chatting ? (\n <ChatBar\n onSend={(text) => {\n engine.current?.sendChat(text).catch(() => undefined);\n }}\n onClose={() => setChatting(false)}\n />\n ) : null}\n </SafeAreaView>\n );\n };\n } catch {\n cached = null;\n }\n return cached;\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1, backgroundColor: '#000' },\n fillClear: { flex: 1 },\n chatBar: { flexDirection: 'row', alignItems: 'center', gap: 8, padding: 10, backgroundColor: '#12161b' },\n chatInput: {\n flex: 1,\n minHeight: 44,\n borderRadius: 10,\n paddingHorizontal: 12,\n color: '#f1f5f9',\n backgroundColor: '#242b33',\n fontSize: 16,\n },\n chatSend: {\n minHeight: 44,\n minWidth: 64,\n borderRadius: 10,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: '#3f7fbf',\n },\n chatSendLabel: { color: '#ffffff', fontSize: 15, fontWeight: '600' },\n});\n"],"names":[],"mappings":"4TAiCA,MAAM,cAAiB,GAAA,GAAA;AACvB,MAAM,sCAA0B,IAAA,GAAA,CAAI,CAAC,KAAA,EAAO,SAAS,CAAC,CAAA;AACtD,SAAS,YAA6C,GAAA;AACpD,EAAA,IAAI,CAAC,mBAAoB,CAAA,GAAA,CAAI,QAAS,CAAA,EAAE,GAAU,OAAA,IAAA;AA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e,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA,CAAA;AAAA,IACL,OAAS,EAAA,EAAA;AAAA,IACT,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,CAAA;AAAA,IACN,SAAW,EAAA,EAAA;AAAA,IACX,YAAc,EAAA,EAAA;AAAA,IACd,iBAAmB,EAAA,EAAA;AAAA,IACnB,KAAO,EAAA,SAAA;AAAA,IACP,eAAiB,EAAA,SAAA;AAAA,IACjB,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,QAAU,EAAA;AAAA,IACR,SAAW,EAAA,EAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,YAAc,EAAA,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,aAAe,EAAA;AAAA,IACb,KAAO,EAAA,SAAA;AAAA,IACP,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA;AAEhB,CAAC,CAAA"}
@@ -51,12 +51,6 @@ const ITEMS = [{
51
51
  color: "#8a6d3b",
52
52
  kind: "tool"
53
53
  }];
54
- const BY_KEY = new Map(ITEMS.map((i) => [i.key, i]));
54
+ new Map(ITEMS.map((i) => [i.key, i]));
55
55
  const BY_BLOCK = /* @__PURE__ */ new Map();
56
- for (const i of ITEMS) if (i.placesBlock != null) BY_BLOCK.set(i.placesBlock, i);
57
- function itemByKey(key) {
58
- return BY_KEY.get(key);
59
- }
60
- function itemForBlock(block) {
61
- return BY_BLOCK.get(block);
62
- }export{ITEMS,itemByKey,itemForBlock};//# sourceMappingURL=items.js.map
56
+ for (const i of ITEMS) if (i.placesBlock != null) BY_BLOCK.set(i.placesBlock, i);export{ITEMS};//# sourceMappingURL=items.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"items.js","sources":["../../../../../../src/features/games/vendored/core/cubeforge/items.ts"],"sourcesContent":["/**\n * Cubeforge item registry.\n *\n * Cubeforge is an original survival/crafting sandbox. Items are what the player\n * gathers, crafts, and places. Placeable items carry a `placesBlock` id from the\n * shared voxel palette so the existing isometric renderer draws them with no new\n * art. Tools have no block - they are crafted goods the player keeps.\n *\n * Original work. Nothing here is ported or copied from any third-party game.\n */\n\nimport type { BlockId } from '../engine/palette';\n\nexport type ItemKind = 'resource' | 'crafted' | 'tool';\n\nexport interface CubeItem {\n /** Stable key used in saves and inventory. */\n readonly key: string;\n readonly name: string;\n /** Chip colour in the UI (taken from the matching block's top face). */\n readonly color: string;\n readonly kind: ItemKind;\n /** When present, the item can be placed into the world as this block. */\n readonly placesBlock?: BlockId;\n}\n\n/**\n * The item catalogue. Resources are gathered from the generated world; crafted\n * items come from recipes; tools are crafted goods with no placed block.\n */\nexport const ITEMS: readonly CubeItem[] = [\n { key: 'grass', name: 'Grass', color: '#7cc86b', kind: 'resource', placesBlock: 1 },\n { key: 'soil', name: 'Soil', color: '#b07a4e', kind: 'resource', placesBlock: 2 },\n { key: 'stone', name: 'Stone', color: '#b9bdc6', kind: 'resource', placesBlock: 3 },\n { key: 'wood', name: 'Wood', color: '#d6a86a', kind: 'resource', placesBlock: 4 },\n { key: 'sand', name: 'Sand', color: '#ead9a0', kind: 'resource', placesBlock: 6 },\n { key: 'brick', name: 'Bricks', color: '#d1684f', kind: 'crafted', placesBlock: 7 },\n { key: 'glass', name: 'Glass', color: '#bfe9ef', kind: 'crafted', placesBlock: 8 },\n { key: 'torch', name: 'Torch', color: '#f2c14e', kind: 'tool' },\n { key: 'workbench', name: 'Workbench', color: '#8a6d3b', kind: 'tool' },\n];\n\nconst BY_KEY = new Map<string, CubeItem>(ITEMS.map((i) => [i.key, i]));\nconst BY_BLOCK = new Map<BlockId, CubeItem>();\nfor (const i of ITEMS) if (i.placesBlock != null) BY_BLOCK.set(i.placesBlock, i);\n\nexport function itemByKey(key: string): CubeItem | undefined {\n return BY_KEY.get(key);\n}\n\n/** The item a placed block yields when gathered, if any. */\nexport function itemForBlock(block: BlockId): CubeItem | undefined {\n return BY_BLOCK.get(block);\n}\n\nexport function isPlaceable(item: CubeItem): boolean {\n return item.placesBlock != null;\n}\n\n/** Items that can be placed into the world, in catalogue order. */\nexport function placeableItems(): CubeItem[] {\n return ITEMS.filter(isPlaceable);\n}\n"],"names":[],"mappings":"AA4BO,MAAM,QAA6B,CAAC;AAAA,EACzC,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,UAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,MAAA;AAAA,EACL,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,UAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,UAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,MAAA;AAAA,EACL,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,UAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,MAAA;AAAA,EACL,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,UAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,EAAA,QAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,SAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,SAAA;AAAA,EACN,WAAa,EAAA;AACf,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,GAAK,EAAA,WAAA;AAAA,EACL,IAAM,EAAA,WAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAC;AACD,MAAM,MAAA,GAAS,IAAI,GAAA,CAAsB,KAAM,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAC,CAAE,CAAA,GAAA,EAAK,CAAC,CAAC,CAAC,CAAA;AACnE,MAAM,QAAA,uBAAe,GAAuB,EAAA;AAC5C,KAAW,MAAA,CAAA,IAAK,KAAO,EAAA,IAAI,CAAE,CAAA,WAAA,IAAe,MAAe,QAAA,CAAA,GAAA,CAAI,CAAE,CAAA,WAAA,EAAa,CAAC,CAAA;AACxE,SAAS,UAAU,GAAmC,EAAA;AAC3D,EAAO,OAAA,MAAA,CAAO,IAAI,GAAG,CAAA;AACvB;AAGO,SAAS,aAAa,KAAsC,EAAA;AACjE,EAAO,OAAA,QAAA,CAAS,IAAI,KAAK,CAAA;AAC3B"}
1
+ {"version":3,"file":"items.js","sources":["../../../../../../src/features/games/vendored/core/cubeforge/items.ts"],"sourcesContent":["/**\n * Cubeforge item registry.\n *\n * Cubeforge is an original survival/crafting sandbox. Items are what the player\n * gathers, crafts, and places. Placeable items carry a `placesBlock` id from the\n * shared voxel palette so the existing isometric renderer draws them with no new\n * art. Tools have no block - they are crafted goods the player keeps.\n *\n * Original work. Nothing here is ported or copied from any third-party game.\n */\n\nimport type { BlockId } from '../engine/palette';\n\nexport type ItemKind = 'resource' | 'crafted' | 'tool';\n\nexport interface CubeItem {\n /** Stable key used in saves and inventory. */\n readonly key: string;\n readonly name: string;\n /** Chip colour in the UI (taken from the matching block's top face). */\n readonly color: string;\n readonly kind: ItemKind;\n /** When present, the item can be placed into the world as this block. */\n readonly placesBlock?: BlockId;\n}\n\n/**\n * The item catalogue. Resources are gathered from the generated world; crafted\n * items come from recipes; tools are crafted goods with no placed block.\n */\nexport const ITEMS: readonly CubeItem[] = [\n { key: 'grass', name: 'Grass', color: '#7cc86b', kind: 'resource', placesBlock: 1 },\n { key: 'soil', name: 'Soil', color: '#b07a4e', kind: 'resource', placesBlock: 2 },\n { key: 'stone', name: 'Stone', color: '#b9bdc6', kind: 'resource', placesBlock: 3 },\n { key: 'wood', name: 'Wood', color: '#d6a86a', kind: 'resource', placesBlock: 4 },\n { key: 'sand', name: 'Sand', color: '#ead9a0', kind: 'resource', placesBlock: 6 },\n { key: 'brick', name: 'Bricks', color: '#d1684f', kind: 'crafted', placesBlock: 7 },\n { key: 'glass', name: 'Glass', color: '#bfe9ef', kind: 'crafted', placesBlock: 8 },\n { key: 'torch', name: 'Torch', color: '#f2c14e', kind: 'tool' },\n { key: 'workbench', name: 'Workbench', color: '#8a6d3b', kind: 'tool' },\n];\n\nconst BY_KEY = new Map<string, CubeItem>(ITEMS.map((i) => [i.key, i]));\nconst BY_BLOCK = new Map<BlockId, CubeItem>();\nfor (const i of ITEMS) if (i.placesBlock != null) BY_BLOCK.set(i.placesBlock, i);\n\nexport function itemByKey(key: string): CubeItem | undefined {\n return BY_KEY.get(key);\n}\n\n/** The item a placed block yields when gathered, if any. */\nexport function itemForBlock(block: BlockId): CubeItem | undefined {\n return BY_BLOCK.get(block);\n}\n\nexport function isPlaceable(item: CubeItem): boolean {\n return item.placesBlock != null;\n}\n\n/** Items that can be placed into the world, in catalogue order. */\nexport function placeableItems(): CubeItem[] {\n return ITEMS.filter(isPlaceable);\n}\n"],"names":[],"mappings":"AA4BO,MAAM,QAA6B,CAAC;AAAA,EACzC,GAAK,EAAA,OAAA;AAAA,EACL,IAAM,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ACN,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAC;AACc,IAAI,GAAA,CAAsB,KAAM,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAC,CAAE,CAAA,GAAA,EAAK,CAAC,CAAC,CAAC;AACnE,MAAM,QAAA,uBAAe,GAAuB,EAAA;AAC5C,KAAW,MAAA,CAAA,IAAK,KAAO,EAAA,IAAI,CAAE,CAAA,WAAA,IAAe,MAAe,QAAA,CAAA,GAAA,CAAI,CAAE,CAAA,WAAA,EAAa,CAAC,CAAA"}
@@ -46,7 +46,4 @@ const RECIPES = [{
46
46
  qty: 1
47
47
  }
48
48
  }];
49
- const BY_ID = new Map(RECIPES.map((r) => [r.id, r]));
50
- function recipeById(id) {
51
- return BY_ID.get(id);
52
- }export{RECIPES,recipeById};//# sourceMappingURL=recipes.js.map
49
+ new Map(RECIPES.map((r) => [r.id, r]));export{RECIPES};//# sourceMappingURL=recipes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.js","sources":["../../../../../../src/features/games/vendored/core/cubeforge/recipes.ts"],"sourcesContent":["/**\n * Cubeforge crafting recipes.\n *\n * A recipe turns a set of input items into one output item. Recipes are pure\n * data; the session checks affordability against the inventory and applies them.\n * Original design - small, readable, and classroom-friendly.\n */\n\nexport interface RecipeCost {\n readonly item: string;\n readonly qty: number;\n}\n\nexport interface Recipe {\n readonly id: string;\n readonly name: string;\n readonly inputs: readonly RecipeCost[];\n readonly output: RecipeCost;\n}\n\nexport const RECIPES: readonly Recipe[] = [\n { id: 'bricks', name: 'Bricks', inputs: [{ item: 'soil', qty: 2 }], output: { item: 'brick', qty: 1 } },\n { id: 'glass', name: 'Glass', inputs: [{ item: 'sand', qty: 2 }], output: { item: 'glass', qty: 1 } },\n {\n id: 'torch',\n name: 'Torch',\n inputs: [\n { item: 'wood', qty: 1 },\n { item: 'stone', qty: 1 },\n ],\n output: { item: 'torch', qty: 1 },\n },\n { id: 'workbench', name: 'Workbench', inputs: [{ item: 'wood', qty: 3 }], output: { item: 'workbench', qty: 1 } },\n];\n\nconst BY_ID = new Map<string, Recipe>(RECIPES.map((r) => [r.id, r]));\n\nexport function recipeById(id: string): Recipe | undefined {\n return BY_ID.get(id);\n}\n\n/** Sum a recipe's inputs by item key (handles repeated items defensively). */\nexport function totalCost(recipe: Recipe): Map<string, number> {\n const need = new Map<string, number>();\n for (const c of recipe.inputs) need.set(c.item, (need.get(c.item) ?? 0) + c.qty);\n return need;\n}\n"],"names":[],"mappings":"AAkBO,MAAM,UAA6B,CAAC;AAAA,EACzC,EAAI,EAAA,QAAA;AAAA,EACJ,IAAM,EAAA,QAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,IAAM,EAAA,OAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,IAAM,EAAA,OAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACJ,EAAA;AAAA,IACD,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,WAAA;AAAA,EACJ,IAAM,EAAA,WAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,WAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAC;AACD,MAAM,KAAA,GAAQ,IAAI,GAAA,CAAoB,OAAQ,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAC,CAAE,CAAA,EAAA,EAAI,CAAC,CAAC,CAAC,CAAA;AAC1D,SAAS,WAAW,EAAgC,EAAA;AACzD,EAAO,OAAA,KAAA,CAAM,IAAI,EAAE,CAAA;AACrB"}
1
+ {"version":3,"file":"recipes.js","sources":["../../../../../../src/features/games/vendored/core/cubeforge/recipes.ts"],"sourcesContent":["/**\n * Cubeforge crafting recipes.\n *\n * A recipe turns a set of input items into one output item. Recipes are pure\n * data; the session checks affordability against the inventory and applies them.\n * Original design - small, readable, and classroom-friendly.\n */\n\nexport interface RecipeCost {\n readonly item: string;\n readonly qty: number;\n}\n\nexport interface Recipe {\n readonly id: string;\n readonly name: string;\n readonly inputs: readonly RecipeCost[];\n readonly output: RecipeCost;\n}\n\nexport const RECIPES: readonly Recipe[] = [\n { id: 'bricks', name: 'Bricks', inputs: [{ item: 'soil', qty: 2 }], output: { item: 'brick', qty: 1 } },\n { id: 'glass', name: 'Glass', inputs: [{ item: 'sand', qty: 2 }], output: { item: 'glass', qty: 1 } },\n {\n id: 'torch',\n name: 'Torch',\n inputs: [\n { item: 'wood', qty: 1 },\n { item: 'stone', qty: 1 },\n ],\n output: { item: 'torch', qty: 1 },\n },\n { id: 'workbench', name: 'Workbench', inputs: [{ item: 'wood', qty: 3 }], output: { item: 'workbench', qty: 1 } },\n];\n\nconst BY_ID = new Map<string, Recipe>(RECIPES.map((r) => [r.id, r]));\n\nexport function recipeById(id: string): Recipe | undefined {\n return BY_ID.get(id);\n}\n\n/** Sum a recipe's inputs by item key (handles repeated items defensively). */\nexport function totalCost(recipe: Recipe): Map<string, number> {\n const need = new Map<string, number>();\n for (const c of recipe.inputs) need.set(c.item, (need.get(c.item) ?? 0) + c.qty);\n return need;\n}\n"],"names":[],"mappings":"AAkBO,MAAM,UAA6B,CAAC;AAAA,EACzC,EAAI,EAAA,QAAA;AAAA,EACJ,IAAM,EAAA,QAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,IAAM,EAAA,OAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,IAAM,EAAA,OAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACJ,EAAA;AAAA,IACD,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,WAAA;AAAA,EACJ,IAAM,EAAA,WAAA;AAAA,EACN,QAAQ,CAAC;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,GAAK,EAAA;AAAA,GACN,CAAA;AAAA,EACD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,WAAA;AAAA,IACN,GAAK,EAAA;AAAA;AAET,CAAC;AACa,IAAI,GAAA,CAAoB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