@contractspec/bundle.library 3.7.5 → 3.7.7

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 (890) hide show
  1. package/.turbo/turbo-build.log +144 -142
  2. package/AGENTS.md +42 -24
  3. package/CHANGELOG.md +27 -0
  4. package/README.md +59 -37
  5. package/dist/application/index.d.ts +1 -1
  6. package/dist/application/index.js +842 -840
  7. package/dist/application/mcp/cliMcp.js +30 -30
  8. package/dist/application/mcp/common.d.ts +2 -2
  9. package/dist/application/mcp/common.js +2 -2
  10. package/dist/application/mcp/contractsMcp.d.ts +1 -1
  11. package/dist/application/mcp/contractsMcp.js +163 -163
  12. package/dist/application/mcp/docsMcp.js +31 -31
  13. package/dist/application/mcp/index.d.ts +2 -2
  14. package/dist/application/mcp/index.js +842 -840
  15. package/dist/application/mcp/internalMcp.js +30 -30
  16. package/dist/application/mcp/providerRankingMcp.js +35 -33
  17. package/dist/components/docs/DocsIndexPage.js +859 -212
  18. package/dist/components/docs/advanced/AdvancedMCPPage.js +15 -15
  19. package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
  20. package/dist/components/docs/advanced/AdvancedRenderersPage.js +7 -7
  21. package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
  22. package/dist/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
  23. package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
  24. package/dist/components/docs/advanced/index.d.ts +2 -2
  25. package/dist/components/docs/advanced/index.js +57 -57
  26. package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
  27. package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
  28. package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
  29. package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
  30. package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
  31. package/dist/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
  32. package/dist/components/docs/architecture/index.d.ts +3 -3
  33. package/dist/components/docs/architecture/index.js +145 -466
  34. package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
  35. package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
  36. package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
  37. package/dist/components/docs/comparison/ComparisonOverviewPage.js +4 -4
  38. package/dist/components/docs/comparison/ComparisonWindmillPage.js +6 -6
  39. package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
  40. package/dist/components/docs/comparison/index.d.ts +2 -2
  41. package/dist/components/docs/comparison/index.js +35 -35
  42. package/dist/components/docs/docsManifest.d.ts +42 -0
  43. package/dist/components/docs/docsManifest.js +612 -0
  44. package/dist/components/docs/ecosystem/IntegrationsPage.js +5 -5
  45. package/dist/components/docs/ecosystem/PluginsPage.js +7 -7
  46. package/dist/components/docs/ecosystem/RegistryPage.js +4 -4
  47. package/dist/components/docs/ecosystem/TemplatesPage.js +11 -11
  48. package/dist/components/docs/ecosystem/index.d.ts +2 -2
  49. package/dist/components/docs/ecosystem/index.js +27 -27
  50. package/dist/components/docs/examples/DocsExamplesPage.js +4 -4
  51. package/dist/components/docs/examples/index.js +4 -4
  52. package/dist/components/docs/getting-started/CLIPage.js +9 -9
  53. package/dist/components/docs/getting-started/CompatibilityPage.js +12 -12
  54. package/dist/components/docs/getting-started/DataViewTutorialPage.js +7 -7
  55. package/dist/components/docs/getting-started/DeveloperToolsPage.js +10 -10
  56. package/dist/components/docs/getting-started/HelloWorldPage.js +8 -8
  57. package/dist/components/docs/getting-started/InstallationPage.js +10 -10
  58. package/dist/components/docs/getting-started/StartHerePage.js +8 -8
  59. package/dist/components/docs/getting-started/TroubleshootingPage.js +12 -12
  60. package/dist/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
  61. package/dist/components/docs/getting-started/index.d.ts +5 -5
  62. package/dist/components/docs/getting-started/index.js +89 -89
  63. package/dist/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
  64. package/dist/components/docs/guides/GuideContractTypesPage.js +33 -33
  65. package/dist/components/docs/guides/GuideDocsPipelinePage.js +13 -13
  66. package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
  67. package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
  68. package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
  69. package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
  70. package/dist/components/docs/guides/GuidesIndexPage.js +69 -46
  71. package/dist/components/docs/guides/index.d.ts +4 -4
  72. package/dist/components/docs/guides/index.js +174 -151
  73. package/dist/components/docs/index.d.ts +13 -12
  74. package/dist/components/docs/index.js +14060 -15332
  75. package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
  76. package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
  77. package/dist/components/docs/integrations/IntegrationsGithubPage.js +11 -11
  78. package/dist/components/docs/integrations/IntegrationsGmailPage.js +7 -7
  79. package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
  80. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
  81. package/dist/components/docs/integrations/IntegrationsMistralPage.js +12 -12
  82. package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
  83. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
  84. package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
  85. package/dist/components/docs/integrations/IntegrationsPowensPage.js +24 -24
  86. package/dist/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
  87. package/dist/components/docs/integrations/IntegrationsResendPage.js +7 -7
  88. package/dist/components/docs/integrations/IntegrationsS3Page.js +9 -9
  89. package/dist/components/docs/integrations/IntegrationsSlackPage.js +11 -11
  90. package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
  91. package/dist/components/docs/integrations/IntegrationsStripePage.js +25 -25
  92. package/dist/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
  93. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
  94. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
  95. package/dist/components/docs/integrations/index.d.ts +1 -1
  96. package/dist/components/docs/integrations/index.js +614 -1231
  97. package/dist/components/docs/intent/ContractFirstApiPage.js +8 -8
  98. package/dist/components/docs/intent/DeterministicCodegenPage.js +9 -9
  99. package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
  100. package/dist/components/docs/intent/OpenapiAlternativePage.js +13 -13
  101. package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
  102. package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
  103. package/dist/components/docs/intent/index.d.ts +3 -3
  104. package/dist/components/docs/intent/index.js +766 -766
  105. package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
  106. package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
  107. package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
  108. package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
  109. package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
  110. package/dist/components/docs/knowledge/index.d.ts +1 -1
  111. package/dist/components/docs/knowledge/index.js +437 -785
  112. package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
  113. package/dist/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
  114. package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
  115. package/dist/components/docs/libraries/LibrariesContentGenPage.js +6 -6
  116. package/dist/components/docs/libraries/LibrariesContractsPage.js +16 -16
  117. package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
  118. package/dist/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
  119. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
  120. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
  121. package/dist/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
  122. package/dist/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
  123. package/dist/components/docs/libraries/LibrariesGrowthPage.js +5 -5
  124. package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
  125. package/dist/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
  126. package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
  127. package/dist/components/docs/libraries/LibrariesOverviewPage.js +117 -430
  128. package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
  129. package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
  130. package/dist/components/docs/libraries/LibrariesResiliencePage.js +6 -6
  131. package/dist/components/docs/libraries/LibrariesRuntimePage.js +13 -13
  132. package/dist/components/docs/libraries/LibrariesSLOPage.js +6 -6
  133. package/dist/components/docs/libraries/LibrariesSchemaPage.js +16 -16
  134. package/dist/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
  135. package/dist/components/docs/libraries/LibrariesTestingPage.js +7 -7
  136. package/dist/components/docs/libraries/LibrariesUIKitPage.js +10 -10
  137. package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
  138. package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
  139. package/dist/components/docs/libraries/index.d.ts +4 -4
  140. package/dist/components/docs/libraries/index.js +1308 -1621
  141. package/dist/components/docs/manifesto/ManifestoPage.js +33 -138
  142. package/dist/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
  143. package/dist/components/docs/ops/DistributedTracingOpsPage.js +5 -5
  144. package/dist/components/docs/ops/index.js +14 -14
  145. package/dist/components/docs/reference/DocsMarkdownContent.js +1 -1
  146. package/dist/components/docs/reference/DocsReferenceContent.js +2 -2
  147. package/dist/components/docs/reference/DocsReferenceIndexClient.js +8 -8
  148. package/dist/components/docs/reference/DocsReferenceIndexPage.js +8 -8
  149. package/dist/components/docs/reference/DocsReferencePage.js +2 -2
  150. package/dist/components/docs/reference/index.js +10 -10
  151. package/dist/components/docs/safety/SafetyAuditingPage.js +16 -16
  152. package/dist/components/docs/safety/SafetyMigrationsPage.js +15 -15
  153. package/dist/components/docs/safety/SafetyOverviewPage.js +69 -206
  154. package/dist/components/docs/safety/SafetyPDPPage.js +12 -12
  155. package/dist/components/docs/safety/SafetySecurityTrustPage.js +11 -11
  156. package/dist/components/docs/safety/SafetySigningPage.js +7 -7
  157. package/dist/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
  158. package/dist/components/docs/safety/index.d.ts +3 -3
  159. package/dist/components/docs/safety/index.js +616 -753
  160. package/dist/components/docs/shared/StudioPrompt.js +5 -5
  161. package/dist/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
  162. package/dist/components/docs/specs/SpecsDataViewsPage.js +14 -14
  163. package/dist/components/docs/specs/SpecsOverlaysPage.js +14 -14
  164. package/dist/components/docs/specs/SpecsOverviewPage.js +135 -297
  165. package/dist/components/docs/specs/SpecsPolicyPage.js +29 -29
  166. package/dist/components/docs/specs/SpecsWorkflowsPage.js +18 -18
  167. package/dist/components/docs/specs/index.d.ts +3 -3
  168. package/dist/components/docs/specs/index.js +814 -976
  169. package/dist/components/docs/studio/StudioBYOKPage.js +1 -1
  170. package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -1
  171. package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -1
  172. package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -1
  173. package/dist/components/docs/studio/StudioOverviewPage.js +109 -56
  174. package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -1
  175. package/dist/components/docs/studio/index.d.ts +4 -4
  176. package/dist/components/docs/studio/index.js +170 -117
  177. package/dist/components/integrations/index.js +25 -25
  178. package/dist/components/integrations/molecules/IntegrationCard.js +5 -5
  179. package/dist/components/integrations/organisms/IntegrationMarketplace.js +12 -12
  180. package/dist/components/integrations/organisms/IntegrationSettings.js +7 -7
  181. package/dist/components/integrations/organisms/KnowledgeSourceList.js +6 -6
  182. package/dist/components/legal/PrivacyTemplate.js +67 -67
  183. package/dist/components/legal/TermsTemplate.js +54 -54
  184. package/dist/components/legal/index.js +121 -121
  185. package/dist/components/shared/FeatureGateNotice.js +4 -4
  186. package/dist/components/shared/index.js +4 -4
  187. package/dist/components/shell/WorkspaceHeader.js +4 -4
  188. package/dist/components/shell/WorkspaceProjectShellLayout.d.ts +3 -3
  189. package/dist/components/shell/WorkspaceProjectShellLayout.js +10 -10
  190. package/dist/components/shell/WorkspaceShellRenderer.d.ts +4 -4
  191. package/dist/components/shell/WorkspaceShellRenderer.js +8 -8
  192. package/dist/components/shell/WorkspaceSidebar.js +2 -2
  193. package/dist/components/shell/index.d.ts +1 -1
  194. package/dist/components/shell/index.js +12 -12
  195. package/dist/components/templates/engine/index.d.ts +1 -1
  196. package/dist/components/templates/index.d.ts +1 -1
  197. package/dist/components/templates/index.js +835 -835
  198. package/dist/components/templates/messaging/ConversationList.js +11 -11
  199. package/dist/components/templates/messaging/MessageComposer.js +11 -11
  200. package/dist/components/templates/messaging/MessageThread.js +6 -6
  201. package/dist/components/templates/messaging/MessagingWorkspace.js +23 -23
  202. package/dist/components/templates/messaging/index.d.ts +1 -1
  203. package/dist/components/templates/messaging/index.js +23 -23
  204. package/dist/components/templates/recipes/LanguageSwitcher.js +1 -1
  205. package/dist/components/templates/recipes/RecipeCard.js +5 -5
  206. package/dist/components/templates/recipes/RecipeDetail.js +8 -8
  207. package/dist/components/templates/recipes/RecipeList.js +17 -17
  208. package/dist/components/templates/recipes/index.d.ts +2 -2
  209. package/dist/components/templates/recipes/index.js +17 -17
  210. package/dist/components/templates/todos/FilterBar.d.ts +1 -1
  211. package/dist/components/templates/todos/FilterBar.js +9 -9
  212. package/dist/components/templates/todos/TaskForm.js +14 -14
  213. package/dist/components/templates/todos/TaskItem.js +4 -4
  214. package/dist/components/templates/todos/TaskList.js +30 -30
  215. package/dist/components/templates/todos/index.d.ts +2 -2
  216. package/dist/components/templates/todos/index.js +30 -30
  217. package/dist/config/index.d.ts +2 -2
  218. package/dist/features/contracts-registry.d.ts +3 -3
  219. package/dist/features/contracts-registry.js +15 -15
  220. package/dist/features/docs/docs.contracts.d.ts +1 -1
  221. package/dist/features/docs/docs.contracts.js +2 -2
  222. package/dist/features/docs/index.d.ts +1 -1
  223. package/dist/features/docs/index.js +2 -2
  224. package/dist/features/index.d.ts +4 -4
  225. package/dist/features/index.js +18 -18
  226. package/dist/features/registry.js +1 -1
  227. package/dist/index.d.ts +2 -2
  228. package/dist/index.js +14982 -16254
  229. package/dist/libs/email/client.js +1 -1
  230. package/dist/libs/email/contact.js +1 -1
  231. package/dist/libs/email/newsletter.js +1 -1
  232. package/dist/libs/email/waitlist-application.js +1 -1
  233. package/dist/libs/email/waitlist.js +1 -1
  234. package/dist/libs/email.d.ts +1 -1
  235. package/dist/libs/email.js +1 -1
  236. package/dist/node/application/index.js +842 -840
  237. package/dist/node/application/mcp/cliMcp.js +30 -30
  238. package/dist/node/application/mcp/common.js +2 -2
  239. package/dist/node/application/mcp/contractsMcp.js +163 -163
  240. package/dist/node/application/mcp/docsMcp.js +31 -31
  241. package/dist/node/application/mcp/index.js +842 -840
  242. package/dist/node/application/mcp/internalMcp.js +30 -30
  243. package/dist/node/application/mcp/providerRankingMcp.js +35 -33
  244. package/dist/node/components/docs/DocsIndexPage.js +859 -212
  245. package/dist/node/components/docs/advanced/AdvancedMCPPage.js +15 -15
  246. package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
  247. package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +7 -7
  248. package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
  249. package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
  250. package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
  251. package/dist/node/components/docs/advanced/index.js +57 -57
  252. package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
  253. package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
  254. package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
  255. package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
  256. package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
  257. package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
  258. package/dist/node/components/docs/architecture/index.js +145 -466
  259. package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
  260. package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
  261. package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
  262. package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +4 -4
  263. package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +6 -6
  264. package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
  265. package/dist/node/components/docs/comparison/index.js +35 -35
  266. package/dist/node/components/docs/docsManifest.js +611 -0
  267. package/dist/node/components/docs/ecosystem/IntegrationsPage.js +5 -5
  268. package/dist/node/components/docs/ecosystem/PluginsPage.js +7 -7
  269. package/dist/node/components/docs/ecosystem/RegistryPage.js +4 -4
  270. package/dist/node/components/docs/ecosystem/TemplatesPage.js +11 -11
  271. package/dist/node/components/docs/ecosystem/index.js +27 -27
  272. package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -4
  273. package/dist/node/components/docs/examples/index.js +4 -4
  274. package/dist/node/components/docs/getting-started/CLIPage.js +9 -9
  275. package/dist/node/components/docs/getting-started/CompatibilityPage.js +12 -12
  276. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +7 -7
  277. package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +10 -10
  278. package/dist/node/components/docs/getting-started/HelloWorldPage.js +8 -8
  279. package/dist/node/components/docs/getting-started/InstallationPage.js +10 -10
  280. package/dist/node/components/docs/getting-started/StartHerePage.js +8 -8
  281. package/dist/node/components/docs/getting-started/TroubleshootingPage.js +12 -12
  282. package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
  283. package/dist/node/components/docs/getting-started/index.js +89 -89
  284. package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
  285. package/dist/node/components/docs/guides/GuideContractTypesPage.js +33 -33
  286. package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +13 -13
  287. package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
  288. package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
  289. package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
  290. package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
  291. package/dist/node/components/docs/guides/GuidesIndexPage.js +69 -46
  292. package/dist/node/components/docs/guides/index.js +174 -151
  293. package/dist/node/components/docs/index.js +14060 -15332
  294. package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
  295. package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
  296. package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +11 -11
  297. package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +7 -7
  298. package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
  299. package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
  300. package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +12 -12
  301. package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
  302. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
  303. package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
  304. package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +24 -24
  305. package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
  306. package/dist/node/components/docs/integrations/IntegrationsResendPage.js +7 -7
  307. package/dist/node/components/docs/integrations/IntegrationsS3Page.js +9 -9
  308. package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +11 -11
  309. package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
  310. package/dist/node/components/docs/integrations/IntegrationsStripePage.js +25 -25
  311. package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
  312. package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
  313. package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
  314. package/dist/node/components/docs/integrations/index.js +614 -1231
  315. package/dist/node/components/docs/intent/ContractFirstApiPage.js +8 -8
  316. package/dist/node/components/docs/intent/DeterministicCodegenPage.js +9 -9
  317. package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
  318. package/dist/node/components/docs/intent/OpenapiAlternativePage.js +13 -13
  319. package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
  320. package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
  321. package/dist/node/components/docs/intent/index.js +766 -766
  322. package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
  323. package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
  324. package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
  325. package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
  326. package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
  327. package/dist/node/components/docs/knowledge/index.js +437 -785
  328. package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
  329. package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
  330. package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
  331. package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +6 -6
  332. package/dist/node/components/docs/libraries/LibrariesContractsPage.js +16 -16
  333. package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
  334. package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
  335. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
  336. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
  337. package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
  338. package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
  339. package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +5 -5
  340. package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
  341. package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
  342. package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
  343. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +117 -430
  344. package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
  345. package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
  346. package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +6 -6
  347. package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +13 -13
  348. package/dist/node/components/docs/libraries/LibrariesSLOPage.js +6 -6
  349. package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +16 -16
  350. package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
  351. package/dist/node/components/docs/libraries/LibrariesTestingPage.js +7 -7
  352. package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +10 -10
  353. package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
  354. package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
  355. package/dist/node/components/docs/libraries/index.js +1308 -1621
  356. package/dist/node/components/docs/manifesto/ManifestoPage.js +33 -138
  357. package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
  358. package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +5 -5
  359. package/dist/node/components/docs/ops/index.js +14 -14
  360. package/dist/node/components/docs/reference/DocsMarkdownContent.js +1 -1
  361. package/dist/node/components/docs/reference/DocsReferenceContent.js +2 -2
  362. package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +8 -8
  363. package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +8 -8
  364. package/dist/node/components/docs/reference/DocsReferencePage.js +2 -2
  365. package/dist/node/components/docs/reference/index.js +10 -10
  366. package/dist/node/components/docs/safety/SafetyAuditingPage.js +16 -16
  367. package/dist/node/components/docs/safety/SafetyMigrationsPage.js +15 -15
  368. package/dist/node/components/docs/safety/SafetyOverviewPage.js +69 -206
  369. package/dist/node/components/docs/safety/SafetyPDPPage.js +12 -12
  370. package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +11 -11
  371. package/dist/node/components/docs/safety/SafetySigningPage.js +7 -7
  372. package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
  373. package/dist/node/components/docs/safety/index.js +616 -753
  374. package/dist/node/components/docs/shared/StudioPrompt.js +5 -5
  375. package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
  376. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +14 -14
  377. package/dist/node/components/docs/specs/SpecsOverlaysPage.js +14 -14
  378. package/dist/node/components/docs/specs/SpecsOverviewPage.js +135 -297
  379. package/dist/node/components/docs/specs/SpecsPolicyPage.js +29 -29
  380. package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +18 -18
  381. package/dist/node/components/docs/specs/index.js +814 -976
  382. package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -1
  383. package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -1
  384. package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -1
  385. package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -1
  386. package/dist/node/components/docs/studio/StudioOverviewPage.js +109 -56
  387. package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -1
  388. package/dist/node/components/docs/studio/index.js +170 -117
  389. package/dist/node/components/integrations/index.js +25 -25
  390. package/dist/node/components/integrations/molecules/IntegrationCard.js +5 -5
  391. package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +12 -12
  392. package/dist/node/components/integrations/organisms/IntegrationSettings.js +7 -7
  393. package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +6 -6
  394. package/dist/node/components/legal/PrivacyTemplate.js +67 -67
  395. package/dist/node/components/legal/TermsTemplate.js +54 -54
  396. package/dist/node/components/legal/index.js +121 -121
  397. package/dist/node/components/shared/FeatureGateNotice.js +4 -4
  398. package/dist/node/components/shared/index.js +4 -4
  399. package/dist/node/components/shell/WorkspaceHeader.js +4 -4
  400. package/dist/node/components/shell/WorkspaceProjectShellLayout.js +10 -10
  401. package/dist/node/components/shell/WorkspaceShellRenderer.js +8 -8
  402. package/dist/node/components/shell/WorkspaceSidebar.js +2 -2
  403. package/dist/node/components/shell/index.js +12 -12
  404. package/dist/node/components/templates/index.js +835 -835
  405. package/dist/node/components/templates/messaging/ConversationList.js +11 -11
  406. package/dist/node/components/templates/messaging/MessageComposer.js +11 -11
  407. package/dist/node/components/templates/messaging/MessageThread.js +6 -6
  408. package/dist/node/components/templates/messaging/MessagingWorkspace.js +23 -23
  409. package/dist/node/components/templates/messaging/index.js +23 -23
  410. package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -1
  411. package/dist/node/components/templates/recipes/RecipeCard.js +5 -5
  412. package/dist/node/components/templates/recipes/RecipeDetail.js +8 -8
  413. package/dist/node/components/templates/recipes/RecipeList.js +17 -17
  414. package/dist/node/components/templates/recipes/index.js +17 -17
  415. package/dist/node/components/templates/todos/FilterBar.js +9 -9
  416. package/dist/node/components/templates/todos/TaskForm.js +14 -14
  417. package/dist/node/components/templates/todos/TaskItem.js +4 -4
  418. package/dist/node/components/templates/todos/TaskList.js +30 -30
  419. package/dist/node/components/templates/todos/index.js +30 -30
  420. package/dist/node/features/contracts-registry.js +15 -15
  421. package/dist/node/features/docs/docs.contracts.js +2 -2
  422. package/dist/node/features/docs/index.js +2 -2
  423. package/dist/node/features/index.js +18 -18
  424. package/dist/node/features/registry.js +1 -1
  425. package/dist/node/index.js +14982 -16254
  426. package/dist/node/libs/email/client.js +1 -1
  427. package/dist/node/libs/email/contact.js +1 -1
  428. package/dist/node/libs/email/newsletter.js +1 -1
  429. package/dist/node/libs/email/waitlist-application.js +1 -1
  430. package/dist/node/libs/email/waitlist.js +1 -1
  431. package/dist/node/libs/email.js +1 -1
  432. package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
  433. package/dist/node/presentation/features/atoms/FeatureIcon/index.js +7 -7
  434. package/dist/node/presentation/features/atoms/index.js +7 -7
  435. package/dist/node/presentation/features/hooks/index.js +56 -56
  436. package/dist/node/presentation/features/hooks/useContractsRegistry.js +18 -18
  437. package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -1
  438. package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -1
  439. package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -1
  440. package/dist/node/presentation/features/index.js +1364 -1364
  441. package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
  442. package/dist/node/presentation/features/molecules/FeatureCard/index.js +15 -15
  443. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
  444. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
  445. package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
  446. package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -1
  447. package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
  448. package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
  449. package/dist/node/presentation/features/molecules/index.js +77 -77
  450. package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +18 -18
  451. package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
  452. package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
  453. package/dist/node/presentation/features/organisms/FeatureEventsList.js +18 -18
  454. package/dist/node/presentation/features/organisms/FeatureFormsList.js +18 -18
  455. package/dist/node/presentation/features/organisms/FeatureOperationsList.js +15 -15
  456. package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +18 -18
  457. package/dist/node/presentation/features/organisms/index.js +401 -401
  458. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
  459. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
  460. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
  461. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
  462. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
  463. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
  464. package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
  465. package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
  466. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
  467. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
  468. package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
  469. package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
  470. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
  471. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
  472. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
  473. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
  474. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
  475. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
  476. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
  477. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
  478. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
  479. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
  480. package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
  481. package/dist/presentation/features/atoms/FeatureIcon/index.d.ts +1 -1
  482. package/dist/presentation/features/atoms/FeatureIcon/index.js +7 -7
  483. package/dist/presentation/features/atoms/index.js +7 -7
  484. package/dist/presentation/features/hooks/index.d.ts +3 -3
  485. package/dist/presentation/features/hooks/index.js +56 -56
  486. package/dist/presentation/features/hooks/useContractsRegistry.js +18 -18
  487. package/dist/presentation/features/hooks/useFeatureFilters.js +1 -1
  488. package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -1
  489. package/dist/presentation/features/hooks/useRelatedDocs.js +1 -1
  490. package/dist/presentation/features/index.d.ts +14 -14
  491. package/dist/presentation/features/index.js +1364 -1364
  492. package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
  493. package/dist/presentation/features/molecules/FeatureCard/index.js +15 -15
  494. package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
  495. package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
  496. package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
  497. package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -1
  498. package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
  499. package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
  500. package/dist/presentation/features/molecules/index.d.ts +1 -1
  501. package/dist/presentation/features/molecules/index.js +77 -77
  502. package/dist/presentation/features/organisms/FeatureDataViewsList.js +18 -18
  503. package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
  504. package/dist/presentation/features/organisms/FeatureDiscovery/index.d.ts +1 -1
  505. package/dist/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
  506. package/dist/presentation/features/organisms/FeatureEventsList.js +18 -18
  507. package/dist/presentation/features/organisms/FeatureFormsList.js +18 -18
  508. package/dist/presentation/features/organisms/FeatureOperationsList.js +15 -15
  509. package/dist/presentation/features/organisms/FeaturePresentationsList.js +18 -18
  510. package/dist/presentation/features/organisms/index.d.ts +4 -4
  511. package/dist/presentation/features/organisms/index.js +401 -401
  512. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
  513. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
  514. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/types.d.ts +1 -1
  515. package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
  516. package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
  517. package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
  518. package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
  519. package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
  520. package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
  521. package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
  522. package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
  523. package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
  524. package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
  525. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
  526. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
  527. package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
  528. package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
  529. package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
  530. package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
  531. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
  532. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
  533. package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
  534. package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
  535. package/package.json +46 -32
  536. package/src/__tests__/env-setup.ts +1 -1
  537. package/src/__tests__/mocks/prisma.ts +78 -78
  538. package/src/__tests__/setup.ts +2 -2
  539. package/src/application/context-storage/index.ts +42 -42
  540. package/src/application/index.ts +1 -1
  541. package/src/application/mcp/cliMcp.ts +221 -221
  542. package/src/application/mcp/common.ts +210 -210
  543. package/src/application/mcp/contractsMcp.ts +15 -15
  544. package/src/application/mcp/contractsMcpResources.ts +119 -119
  545. package/src/application/mcp/contractsMcpTools.ts +218 -218
  546. package/src/application/mcp/contractsMcpTypes.ts +35 -35
  547. package/src/application/mcp/docsMcp.ts +173 -173
  548. package/src/application/mcp/index.ts +2 -2
  549. package/src/application/mcp/internalMcp.ts +204 -204
  550. package/src/application/mcp/providerRankingMcp.ts +346 -344
  551. package/src/bundles/LibraryBundle.ts +136 -136
  552. package/src/components/docs/DocsIndexPage.tsx +189 -241
  553. package/src/components/docs/advanced/AdvancedMCPPage.tsx +168 -168
  554. package/src/components/docs/advanced/AdvancedOverlayEditorPage.tsx +52 -52
  555. package/src/components/docs/advanced/AdvancedRenderersPage.tsx +53 -53
  556. package/src/components/docs/advanced/AdvancedSpecExperimentsPage.tsx +48 -48
  557. package/src/components/docs/advanced/AdvancedTelemetryPage.tsx +205 -205
  558. package/src/components/docs/advanced/AdvancedWorkflowMonitoringPage.tsx +42 -42
  559. package/src/components/docs/advanced/index.ts +2 -2
  560. package/src/components/docs/architecture/ArchitectureAppConfigPage.tsx +127 -127
  561. package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +79 -79
  562. package/src/components/docs/architecture/ArchitectureIntegrationBindingPage.tsx +147 -147
  563. package/src/components/docs/architecture/ArchitectureKnowledgeBindingPage.tsx +193 -193
  564. package/src/components/docs/architecture/ArchitectureMultiTenancyPage.tsx +73 -73
  565. package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +98 -273
  566. package/src/components/docs/architecture/index.ts +3 -3
  567. package/src/components/docs/comparison/ComparisonAutomationPlatformsPage.tsx +137 -137
  568. package/src/components/docs/comparison/ComparisonEnterprisePlatformsPage.tsx +138 -138
  569. package/src/components/docs/comparison/ComparisonInternalToolBuildersPage.tsx +147 -147
  570. package/src/components/docs/comparison/ComparisonOverviewPage.tsx +106 -106
  571. package/src/components/docs/comparison/ComparisonWindmillPage.tsx +143 -143
  572. package/src/components/docs/comparison/ComparisonWorkflowEnginesPage.tsx +168 -168
  573. package/src/components/docs/comparison/index.ts +2 -2
  574. package/src/components/docs/docsManifest.ts +720 -0
  575. package/src/components/docs/ecosystem/IntegrationsPage.tsx +45 -45
  576. package/src/components/docs/ecosystem/PluginsPage.tsx +77 -77
  577. package/src/components/docs/ecosystem/RegistryPage.tsx +48 -48
  578. package/src/components/docs/ecosystem/TemplatesPage.tsx +52 -52
  579. package/src/components/docs/ecosystem/ecosystem.docblocks.ts +42 -42
  580. package/src/components/docs/ecosystem/index.ts +2 -2
  581. package/src/components/docs/examples/DocsExamplesPage.tsx +67 -66
  582. package/src/components/docs/generated/docs-index._common.json +1757 -1757
  583. package/src/components/docs/generated/docs-index.agent-console.json +376 -376
  584. package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -8
  585. package/src/components/docs/generated/docs-index.ai-chat.json +104 -104
  586. package/src/components/docs/generated/docs-index.ai-support-bot.json +8 -8
  587. package/src/components/docs/generated/docs-index.analytics-dashboard.json +168 -168
  588. package/src/components/docs/generated/docs-index.app-config.json +136 -136
  589. package/src/components/docs/generated/docs-index.audit-trail.json +48 -48
  590. package/src/components/docs/generated/docs-index.calendar-google.json +8 -8
  591. package/src/components/docs/generated/docs-index.content-generation.json +8 -8
  592. package/src/components/docs/generated/docs-index.crm-pipeline.json +160 -160
  593. package/src/components/docs/generated/docs-index.email-gmail.json +8 -8
  594. package/src/components/docs/generated/docs-index.feature-flags.json +216 -216
  595. package/src/components/docs/generated/docs-index.files.json +176 -176
  596. package/src/components/docs/generated/docs-index.generated.ts +19 -19
  597. package/src/components/docs/generated/docs-index.health.json +96 -96
  598. package/src/components/docs/generated/docs-index.identity-rbac.json +312 -312
  599. package/src/components/docs/generated/docs-index.in-app-docs.json +8 -8
  600. package/src/components/docs/generated/docs-index.integration-hub.json +264 -264
  601. package/src/components/docs/generated/docs-index.integration-posthog.json +8 -8
  602. package/src/components/docs/generated/docs-index.integration-stripe.json +8 -8
  603. package/src/components/docs/generated/docs-index.integration-supabase.json +8 -8
  604. package/src/components/docs/generated/docs-index.jobs.json +136 -136
  605. package/src/components/docs/generated/docs-index.kb-update-pipeline.json +128 -128
  606. package/src/components/docs/generated/docs-index.knowledge-canon.json +8 -8
  607. package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +8 -8
  608. package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +48 -48
  609. package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +8 -8
  610. package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +48 -48
  611. package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +8 -8
  612. package/src/components/docs/generated/docs-index.learning-journey-registry.json +32 -32
  613. package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +48 -48
  614. package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +8 -8
  615. package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +8 -8
  616. package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +8 -8
  617. package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +8 -8
  618. package/src/components/docs/generated/docs-index.learning-journey.json +216 -216
  619. package/src/components/docs/generated/docs-index.learning-patterns.json +8 -8
  620. package/src/components/docs/generated/docs-index.lifecycle-cli.json +8 -8
  621. package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +8 -8
  622. package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +48 -48
  623. package/src/components/docs/generated/docs-index.manifest.json +376 -376
  624. package/src/components/docs/generated/docs-index.marketplace.json +336 -336
  625. package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +8 -8
  626. package/src/components/docs/generated/docs-index.meeting-recorder.json +48 -48
  627. package/src/components/docs/generated/docs-index.metrics.json +200 -200
  628. package/src/components/docs/generated/docs-index.minimal.json +16 -16
  629. package/src/components/docs/generated/docs-index.notifications.json +64 -64
  630. package/src/components/docs/generated/docs-index.openbanking-powens.json +8 -8
  631. package/src/components/docs/generated/docs-index.openbanking.json +64 -64
  632. package/src/components/docs/generated/docs-index.opencode-cli.json +16 -16
  633. package/src/components/docs/generated/docs-index.personalization.json +8 -8
  634. package/src/components/docs/generated/docs-index.platform-acp.json +72 -72
  635. package/src/components/docs/generated/docs-index.platform-agent.json +96 -96
  636. package/src/components/docs/generated/docs-index.platform-context.json +56 -56
  637. package/src/components/docs/generated/docs-index.platform-database.json +48 -48
  638. package/src/components/docs/generated/docs-index.platform-docs.json +88 -88
  639. package/src/components/docs/generated/docs-index.platform-integrations.json +320 -320
  640. package/src/components/docs/generated/docs-index.platform-knowledge.json +56 -56
  641. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +96 -96
  642. package/src/components/docs/generated/docs-index.pocket-family-office.json +120 -120
  643. package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +8 -8
  644. package/src/components/docs/generated/docs-index.product-intent.json +8 -8
  645. package/src/components/docs/generated/docs-index.project-management-sync.json +8 -8
  646. package/src/components/docs/generated/docs-index.saas-boilerplate.json +208 -208
  647. package/src/components/docs/generated/docs-index.service-business-os.json +192 -192
  648. package/src/components/docs/generated/docs-index.team-hub.json +184 -184
  649. package/src/components/docs/generated/docs-index.unknown.json +512 -512
  650. package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +80 -80
  651. package/src/components/docs/generated/docs-index.video-api-showcase.json +32 -32
  652. package/src/components/docs/generated/docs-index.video-docs-terminal.json +8 -8
  653. package/src/components/docs/generated/docs-index.video-marketing-clip.json +8 -8
  654. package/src/components/docs/generated/docs-index.voice-providers.json +8 -8
  655. package/src/components/docs/generated/docs-index.wealth-snapshot.json +152 -152
  656. package/src/components/docs/generated/docs-index.workflow-system.json +432 -432
  657. package/src/components/docs/generated/docs-index.workspace-cli.json +8 -8
  658. package/src/components/docs/generated/index.ts +6 -6
  659. package/src/components/docs/generated/loader.ts +49 -49
  660. package/src/components/docs/getting-started/CLIPage.tsx +157 -157
  661. package/src/components/docs/getting-started/CompatibilityPage.tsx +69 -69
  662. package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -63
  663. package/src/components/docs/getting-started/DeveloperToolsPage.tsx +141 -140
  664. package/src/components/docs/getting-started/HelloWorldPage.tsx +88 -88
  665. package/src/components/docs/getting-started/InstallationPage.tsx +78 -78
  666. package/src/components/docs/getting-started/StartHerePage.tsx +64 -64
  667. package/src/components/docs/getting-started/TroubleshootingPage.tsx +68 -68
  668. package/src/components/docs/getting-started/VSCodeExtensionPage.tsx +233 -233
  669. package/src/components/docs/getting-started/getting-started.docblocks.ts +30 -30
  670. package/src/components/docs/getting-started/index.ts +6 -5
  671. package/src/components/docs/guides/GuideCIDiffGatingPage.tsx +88 -88
  672. package/src/components/docs/guides/GuideContractTypesPage.tsx +266 -266
  673. package/src/components/docs/guides/GuideDocsPipelinePage.tsx +78 -78
  674. package/src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx +89 -89
  675. package/src/components/docs/guides/GuideImportExistingCodebasesPage.tsx +360 -360
  676. package/src/components/docs/guides/GuideNextjsOneEndpointPage.tsx +117 -117
  677. package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +82 -82
  678. package/src/components/docs/guides/GuidesIndexPage.tsx +109 -99
  679. package/src/components/docs/guides/guides.docblocks.ts +60 -60
  680. package/src/components/docs/guides/index.ts +4 -4
  681. package/src/components/docs/index.ts +26 -40
  682. package/src/components/docs/integrations/IntegrationsCircuitBreakersPage.tsx +22 -22
  683. package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +41 -41
  684. package/src/components/docs/integrations/IntegrationsGithubPage.tsx +66 -66
  685. package/src/components/docs/integrations/IntegrationsGmailPage.tsx +44 -44
  686. package/src/components/docs/integrations/IntegrationsGoogleCalendarPage.tsx +31 -31
  687. package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +80 -80
  688. package/src/components/docs/integrations/IntegrationsMistralPage.tsx +65 -65
  689. package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +54 -54
  690. package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +124 -529
  691. package/src/components/docs/integrations/IntegrationsPostmarkPage.tsx +97 -97
  692. package/src/components/docs/integrations/IntegrationsPowensPage.tsx +165 -165
  693. package/src/components/docs/integrations/IntegrationsQdrantPage.tsx +44 -44
  694. package/src/components/docs/integrations/IntegrationsResendPage.tsx +40 -40
  695. package/src/components/docs/integrations/IntegrationsS3Page.tsx +48 -48
  696. package/src/components/docs/integrations/IntegrationsSlackPage.tsx +70 -70
  697. package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +139 -139
  698. package/src/components/docs/integrations/IntegrationsStripePage.tsx +153 -153
  699. package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +50 -50
  700. package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +69 -69
  701. package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +73 -73
  702. package/src/components/docs/integrations/index.ts +1 -1
  703. package/src/components/docs/intent/ContractFirstApiPage.tsx +61 -61
  704. package/src/components/docs/intent/DeterministicCodegenPage.tsx +81 -80
  705. package/src/components/docs/intent/GenerateClientFromSchemaPage.tsx +108 -108
  706. package/src/components/docs/intent/OpenapiAlternativePage.tsx +98 -98
  707. package/src/components/docs/intent/SchemaValidationTypescriptPage.tsx +79 -79
  708. package/src/components/docs/intent/SpecDrivenDevelopmentPage.tsx +67 -67
  709. package/src/components/docs/intent/index.ts +3 -3
  710. package/src/components/docs/intent/intent-pages.docblocks.ts +186 -186
  711. package/src/components/docs/knowledge/KnowledgeCategoriesPage.tsx +304 -304
  712. package/src/components/docs/knowledge/KnowledgeExamplesPage.tsx +84 -84
  713. package/src/components/docs/knowledge/KnowledgeOverviewPage.tsx +76 -285
  714. package/src/components/docs/knowledge/KnowledgeSourcesPage.tsx +171 -171
  715. package/src/components/docs/knowledge/KnowledgeSpacesPage.tsx +132 -132
  716. package/src/components/docs/knowledge/index.ts +1 -1
  717. package/src/components/docs/libraries/LibrariesAccessibilityPage.tsx +95 -95
  718. package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +58 -58
  719. package/src/components/docs/libraries/LibrariesAnalyticsPage.tsx +39 -39
  720. package/src/components/docs/libraries/LibrariesContentGenPage.tsx +41 -41
  721. package/src/components/docs/libraries/LibrariesContractsPage.tsx +132 -132
  722. package/src/components/docs/libraries/LibrariesCostTrackingPage.tsx +47 -47
  723. package/src/components/docs/libraries/LibrariesDataBackendPage.tsx +73 -73
  724. package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +76 -76
  725. package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +115 -115
  726. package/src/components/docs/libraries/LibrariesEvolutionPage.tsx +64 -64
  727. package/src/components/docs/libraries/LibrariesGraphQLPage.tsx +92 -92
  728. package/src/components/docs/libraries/LibrariesGrowthPage.tsx +37 -37
  729. package/src/components/docs/libraries/LibrariesMultiTenancyPage.tsx +47 -47
  730. package/src/components/docs/libraries/LibrariesObservabilityPage.tsx +58 -58
  731. package/src/components/docs/libraries/LibrariesOverlayEnginePage.tsx +51 -51
  732. package/src/components/docs/libraries/LibrariesOverviewPage.tsx +137 -301
  733. package/src/components/docs/libraries/LibrariesPersonalizationPage.tsx +57 -57
  734. package/src/components/docs/libraries/LibrariesProgressiveDeliveryPage.tsx +51 -51
  735. package/src/components/docs/libraries/LibrariesResiliencePage.tsx +54 -54
  736. package/src/components/docs/libraries/LibrariesRuntimePage.tsx +96 -96
  737. package/src/components/docs/libraries/LibrariesSLOPage.tsx +52 -52
  738. package/src/components/docs/libraries/LibrariesSchemaPage.tsx +131 -131
  739. package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +59 -59
  740. package/src/components/docs/libraries/LibrariesTestingPage.tsx +64 -64
  741. package/src/components/docs/libraries/LibrariesUIKitPage.tsx +85 -85
  742. package/src/components/docs/libraries/LibrariesWorkflowComposerPage.tsx +38 -38
  743. package/src/components/docs/libraries/LibrariesWorkflowsPage.tsx +79 -79
  744. package/src/components/docs/libraries/index.ts +4 -4
  745. package/src/components/docs/manifesto/ManifestoPage.tsx +61 -132
  746. package/src/components/docs/ops/AutoEvolutionOpsPage.tsx +81 -81
  747. package/src/components/docs/ops/DistributedTracingOpsPage.tsx +28 -28
  748. package/src/components/docs/ops/ops-lifecycle.docblocks.ts +32 -32
  749. package/src/components/docs/ops/ops-runbooks-a.docblocks.ts +60 -60
  750. package/src/components/docs/ops/ops-runbooks-b.docblocks.ts +60 -60
  751. package/src/components/docs/ops/ops-slo-tenant.docblocks.ts +61 -61
  752. package/src/components/docs/ops/ops-top.docs.ts +10 -10
  753. package/src/components/docs/ops/ops.docs.ts +6 -6
  754. package/src/components/docs/product/product.docblocks.ts +60 -60
  755. package/src/components/docs/reference/DocsMarkdownContent.tsx +74 -74
  756. package/src/components/docs/reference/DocsReferenceContent.tsx +51 -51
  757. package/src/components/docs/reference/DocsReferenceIndexClient.tsx +106 -105
  758. package/src/components/docs/reference/DocsReferenceIndexPage.tsx +2 -2
  759. package/src/components/docs/reference/DocsReferencePage.tsx +3 -3
  760. package/src/components/docs/reference/docsMarkdownParser.ts +90 -90
  761. package/src/components/docs/safety/SafetyAuditingPage.tsx +189 -189
  762. package/src/components/docs/safety/SafetyMigrationsPage.tsx +189 -189
  763. package/src/components/docs/safety/SafetyOverviewPage.tsx +70 -157
  764. package/src/components/docs/safety/SafetyPDPPage.tsx +163 -163
  765. package/src/components/docs/safety/SafetySecurityTrustPage.tsx +89 -89
  766. package/src/components/docs/safety/SafetySigningPage.tsx +38 -38
  767. package/src/components/docs/safety/SafetyTenantIsolationPage.tsx +39 -39
  768. package/src/components/docs/safety/index.ts +3 -3
  769. package/src/components/docs/shared/StudioPrompt.tsx +17 -17
  770. package/src/components/docs/specs/SpecsCapabilitiesPage.tsx +79 -79
  771. package/src/components/docs/specs/SpecsDataViewsPage.tsx +142 -142
  772. package/src/components/docs/specs/SpecsOverlaysPage.tsx +202 -202
  773. package/src/components/docs/specs/SpecsOverviewPage.tsx +118 -193
  774. package/src/components/docs/specs/SpecsPolicyPage.tsx +233 -233
  775. package/src/components/docs/specs/SpecsWorkflowsPage.tsx +156 -156
  776. package/src/components/docs/specs/index.ts +3 -3
  777. package/src/components/docs/studio/StudioBYOKPage.tsx +11 -11
  778. package/src/components/docs/studio/StudioDeploymentsPage.tsx +11 -11
  779. package/src/components/docs/studio/StudioGettingStartedPage.tsx +11 -11
  780. package/src/components/docs/studio/StudioIntegrationsPage.tsx +11 -11
  781. package/src/components/docs/studio/StudioOverviewPage.tsx +94 -73
  782. package/src/components/docs/studio/StudioVisualBuilderPage.tsx +11 -11
  783. package/src/components/docs/studio/index.ts +4 -4
  784. package/src/components/docs/tech/contracts/tech-docs.docblocks.ts +10 -10
  785. package/src/components/integrations/molecules/IntegrationCard.tsx +71 -72
  786. package/src/components/integrations/organisms/IntegrationMarketplace.tsx +116 -116
  787. package/src/components/integrations/organisms/IntegrationSettings.tsx +201 -201
  788. package/src/components/integrations/organisms/KnowledgeSourceList.tsx +93 -94
  789. package/src/components/legal/PrivacyTemplate.tsx +611 -611
  790. package/src/components/legal/TermsTemplate.tsx +675 -675
  791. package/src/components/shared/FeatureGateNotice.tsx +26 -27
  792. package/src/components/shell/WorkspaceHeader.tsx +80 -80
  793. package/src/components/shell/WorkspaceProjectShellLayout.tsx +59 -58
  794. package/src/components/shell/WorkspaceShellRenderer.tsx +69 -68
  795. package/src/components/shell/WorkspaceSidebar.tsx +58 -58
  796. package/src/components/shell/index.ts +1 -1
  797. package/src/components/templates/engine/index.ts +29 -28
  798. package/src/components/templates/index.ts +1 -1
  799. package/src/components/templates/messaging/ConversationList.tsx +68 -69
  800. package/src/components/templates/messaging/MessageComposer.tsx +59 -59
  801. package/src/components/templates/messaging/MessageThread.tsx +73 -74
  802. package/src/components/templates/messaging/MessagingWorkspace.tsx +18 -19
  803. package/src/components/templates/messaging/index.ts +1 -1
  804. package/src/components/templates/messaging/types.ts +17 -17
  805. package/src/components/templates/recipes/LanguageSwitcher.tsx +20 -20
  806. package/src/components/templates/recipes/RecipeCard.tsx +56 -56
  807. package/src/components/templates/recipes/RecipeDetail.tsx +43 -43
  808. package/src/components/templates/recipes/RecipeList.tsx +62 -63
  809. package/src/components/templates/recipes/index.ts +2 -2
  810. package/src/components/templates/recipes/types.ts +24 -24
  811. package/src/components/templates/todos/FilterBar.tsx +84 -84
  812. package/src/components/templates/todos/TaskForm.tsx +118 -119
  813. package/src/components/templates/todos/TaskItem.tsx +78 -78
  814. package/src/components/templates/todos/TaskList.tsx +106 -107
  815. package/src/components/templates/todos/index.ts +2 -2
  816. package/src/components/templates/todos/types.ts +11 -11
  817. package/src/config/contractspec-blueprint.ts +55 -55
  818. package/src/config/contractspec-branding.ts +37 -37
  819. package/src/config/contractspec-routes.ts +22 -22
  820. package/src/config/index.ts +14 -15
  821. package/src/features/contracts-registry.ts +118 -118
  822. package/src/features/docs/docs.contracts.ts +6 -6
  823. package/src/features/docs/index.ts +6 -6
  824. package/src/features/docs.feature.ts +27 -27
  825. package/src/features/index.ts +59 -63
  826. package/src/features/mcp.feature.ts +24 -24
  827. package/src/features/presentations.feature.ts +27 -27
  828. package/src/features/registry.ts +14 -14
  829. package/src/index.ts +2 -2
  830. package/src/infrastructure/elysia/logger.ts +21 -21
  831. package/src/libs/email/client.test.ts +81 -81
  832. package/src/libs/email/client.ts +111 -111
  833. package/src/libs/email/contact.ts +35 -35
  834. package/src/libs/email/newsletter.ts +46 -46
  835. package/src/libs/email/types.ts +29 -29
  836. package/src/libs/email/utils.ts +5 -5
  837. package/src/libs/email/waitlist-application.ts +69 -69
  838. package/src/libs/email/waitlist.ts +46 -46
  839. package/src/libs/email.ts +7 -7
  840. package/src/libs/posthog/client.ts +44 -44
  841. package/src/libs/posthog/native.ts +23 -22
  842. package/src/libs/posthog/server.ts +7 -7
  843. package/src/libs/pricing-examples.ts +12 -12
  844. package/src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx +90 -90
  845. package/src/presentation/features/atoms/FeatureIcon/index.ts +3 -3
  846. package/src/presentation/features/hooks/index.ts +9 -9
  847. package/src/presentation/features/hooks/useContractsRegistry.ts +23 -23
  848. package/src/presentation/features/hooks/useFeatureFilters.ts +117 -117
  849. package/src/presentation/features/hooks/useFeatureRegistry.ts +40 -40
  850. package/src/presentation/features/hooks/useRelatedDocs.ts +28 -28
  851. package/src/presentation/features/index.ts +50 -52
  852. package/src/presentation/features/molecules/FeatureCard/FeatureCard.tsx +80 -80
  853. package/src/presentation/features/molecules/FeatureCard/types.ts +6 -6
  854. package/src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx +54 -54
  855. package/src/presentation/features/molecules/FeatureCategoryHeader/index.ts +2 -2
  856. package/src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx +67 -67
  857. package/src/presentation/features/molecules/FeatureFilters/types.ts +20 -20
  858. package/src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx +120 -121
  859. package/src/presentation/features/molecules/FeatureHoverPreview/index.ts +2 -2
  860. package/src/presentation/features/molecules/index.ts +8 -8
  861. package/src/presentation/features/organisms/FeatureDataViewsList.tsx +21 -21
  862. package/src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx +86 -86
  863. package/src/presentation/features/organisms/FeatureDetail/types.ts +4 -4
  864. package/src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx +210 -210
  865. package/src/presentation/features/organisms/FeatureDiscovery/index.ts +3 -3
  866. package/src/presentation/features/organisms/FeatureDiscovery/types.ts +10 -10
  867. package/src/presentation/features/organisms/FeatureEventsList.tsx +19 -19
  868. package/src/presentation/features/organisms/FeatureFormsList.tsx +19 -19
  869. package/src/presentation/features/organisms/FeatureOperationsList.tsx +21 -21
  870. package/src/presentation/features/organisms/FeaturePresentationsList.tsx +21 -21
  871. package/src/presentation/features/organisms/index.ts +6 -6
  872. package/src/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.tsx +219 -219
  873. package/src/presentation/features/templates/FeatureDataViewDetailTemplate/types.ts +7 -7
  874. package/src/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.tsx +26 -26
  875. package/src/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.tsx +195 -195
  876. package/src/presentation/features/templates/FeatureEventDetailTemplate/types.ts +7 -7
  877. package/src/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.tsx +26 -26
  878. package/src/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.tsx +216 -216
  879. package/src/presentation/features/templates/FeatureFormDetailTemplate/types.ts +7 -7
  880. package/src/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.tsx +26 -26
  881. package/src/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.tsx +228 -228
  882. package/src/presentation/features/templates/FeatureOperationDetailTemplate/types.ts +7 -7
  883. package/src/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.tsx +26 -26
  884. package/src/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.tsx +24 -24
  885. package/src/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.tsx +201 -201
  886. package/src/presentation/features/templates/FeaturePresentationDetailTemplate/types.ts +8 -8
  887. package/src/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.tsx +26 -26
  888. package/src/presentation/features/templates/types.ts +2 -2
  889. package/tsconfig.json +12 -12
  890. package/tsdown.config.js +5 -5
@@ -1,1053 +1,1053 @@
1
- // src/components/templates/todos/FilterBar.tsx
1
+ // src/components/templates/messaging/ConversationList.tsx
2
+ import { gql } from "@apollo/client";
3
+ import { useQuery } from "@apollo/client/react";
4
+ import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
5
+ import { MessageCircle, Users } from "lucide-react";
6
+ import { useMemo } from "react";
2
7
  import { jsx, jsxs } from "react/jsx-runtime";
3
- function FilterBar({ value, onChange, categories }) {
4
- const handleChange = (key, nextValue) => {
5
- onChange({ ...value, [key]: nextValue });
6
- };
7
- return /* @__PURE__ */ jsxs("div", {
8
- className: "border-border bg-card grid gap-3 rounded-2xl border p-4 md:grid-cols-4",
8
+ var CONVERSATIONS_QUERY = gql`
9
+ query Conversations($projectId: ID!) {
10
+ conversations(projectId: $projectId) {
11
+ id
12
+ name
13
+ isGroup
14
+ updatedAt
15
+ participants {
16
+ id
17
+ userId
18
+ displayName
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ function ConversationList({
24
+ selectedId,
25
+ onSelect
26
+ }) {
27
+ const { projectId } = useTemplateRuntime();
28
+ const { data, loading } = useQuery(CONVERSATIONS_QUERY, {
29
+ variables: { projectId },
30
+ fetchPolicy: "cache-and-network"
31
+ });
32
+ const conversations = useMemo(() => data?.conversations ?? [], [data]);
33
+ return /* @__PURE__ */ jsxs("aside", {
34
+ className: "h-full overflow-y-auto rounded-2xl border border-border bg-card",
9
35
  children: [
10
- /* @__PURE__ */ jsxs("label", {
11
- className: "text-muted-foreground flex flex-col text-xs tracking-wide uppercase",
36
+ /* @__PURE__ */ jsxs("header", {
37
+ className: "px -4 flex items-center justify-between border-border border-b px-4 py-3",
12
38
  children: [
13
- "Status",
14
- /* @__PURE__ */ jsxs("select", {
15
- className: "border-border bg-background text-foreground mt-1 rounded-md border px-3 py-2 text-sm",
16
- value: value.status,
17
- onChange: (event) => handleChange("status", event.target.value),
39
+ /* @__PURE__ */ jsxs("div", {
18
40
  children: [
19
- /* @__PURE__ */ jsx("option", {
20
- value: "all",
21
- children: "All tasks"
22
- }),
23
- /* @__PURE__ */ jsx("option", {
24
- value: "active",
25
- children: "Active"
41
+ /* @__PURE__ */ jsx("p", {
42
+ className: "font-semibold text-sm",
43
+ children: "Conversations"
26
44
  }),
27
- /* @__PURE__ */ jsx("option", {
28
- value: "completed",
29
- children: "Completed"
45
+ /* @__PURE__ */ jsx("p", {
46
+ className: "text-muted-foreground text-xs",
47
+ children: loading ? "Loading…" : `${conversations.length} active`
30
48
  })
31
49
  ]
50
+ }),
51
+ /* @__PURE__ */ jsx(Users, {
52
+ className: "h-4 w-4 text-muted-foreground"
32
53
  })
33
54
  ]
34
55
  }),
35
- /* @__PURE__ */ jsxs("label", {
36
- className: "text-muted-foreground flex flex-col text-xs tracking-wide uppercase",
56
+ /* @__PURE__ */ jsxs("div", {
57
+ className: "divide-y divide-border/70",
37
58
  children: [
38
- "Priority",
39
- /* @__PURE__ */ jsxs("select", {
40
- className: "border-border bg-background text-foreground mt-1 rounded-md border px-3 py-2 text-sm",
41
- value: value.priority,
42
- onChange: (event) => handleChange("priority", event.target.value),
43
- children: [
44
- /* @__PURE__ */ jsx("option", {
45
- value: "all",
46
- children: "All"
47
- }),
48
- /* @__PURE__ */ jsx("option", {
49
- value: "LOW",
50
- children: "Low"
51
- }),
52
- /* @__PURE__ */ jsx("option", {
53
- value: "MEDIUM",
54
- children: "Medium"
55
- }),
56
- /* @__PURE__ */ jsx("option", {
57
- value: "HIGH",
58
- children: "High"
59
- }),
60
- /* @__PURE__ */ jsx("option", {
61
- value: "URGENT",
62
- children: "Urgent"
63
- })
64
- ]
65
- })
59
+ conversations.map((conversation) => {
60
+ const isSelected = selectedId === conversation.id;
61
+ return /* @__PURE__ */ jsxs("button", {
62
+ type: "button",
63
+ className: `flex w-full flex-col items-start gap-1 px-4 py-3 text-left transition ${isSelected ? "bg-violet-500/10 text-foreground" : "hover:bg-muted/40"}`,
64
+ onClick: () => onSelect?.(conversation.id),
65
+ children: [
66
+ /* @__PURE__ */ jsxs("div", {
67
+ className: "flex items-center gap-2",
68
+ children: [
69
+ /* @__PURE__ */ jsx(MessageCircle, {
70
+ className: "h-4 w-4 text-muted-foreground"
71
+ }),
72
+ /* @__PURE__ */ jsx("span", {
73
+ className: "font-medium text-sm",
74
+ children: conversation.name || "Untitled conversation"
75
+ })
76
+ ]
77
+ }),
78
+ /* @__PURE__ */ jsx("p", {
79
+ className: "text-muted-foreground text-xs",
80
+ children: conversation.participants.map((participant) => participant.displayName || participant.userId).join(" · ")
81
+ })
82
+ ]
83
+ }, conversation.id);
84
+ }),
85
+ !loading && conversations.length === 0 ? /* @__PURE__ */ jsx("p", {
86
+ className: "p-4 text-center text-muted-foreground text-xs",
87
+ children: "No conversations yet."
88
+ }) : null
66
89
  ]
67
- }),
68
- /* @__PURE__ */ jsxs("label", {
69
- className: "text-muted-foreground flex flex-col text-xs tracking-wide uppercase",
90
+ })
91
+ ]
92
+ });
93
+ }
94
+
95
+ // src/components/templates/messaging/MessageThread.tsx
96
+ import { gql as gql2 } from "@apollo/client";
97
+ import { useMutation, useQuery as useQuery2 } from "@apollo/client/react";
98
+ import { useTemplateRuntime as useTemplateRuntime2 } from "@contractspec/lib.example-shared-ui";
99
+ import { useEffect, useRef } from "react";
100
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
101
+ "use client";
102
+ var MESSAGES_QUERY = gql2`
103
+ query Messages($conversationId: ID!) {
104
+ messages(conversationId: $conversationId, limit: 50) {
105
+ id
106
+ content
107
+ senderId
108
+ senderName
109
+ createdAt
110
+ status
111
+ }
112
+ }
113
+ `;
114
+ var SET_READ = gql2`
115
+ mutation SetMessagesRead($conversationId: ID!, $userId: String!) {
116
+ setMessagesRead(conversationId: $conversationId, userId: $userId)
117
+ }
118
+ `;
119
+ function MessageThread({
120
+ conversationId,
121
+ viewerId = "local-user"
122
+ }) {
123
+ const scrollRef = useRef(null);
124
+ const enabled = Boolean(conversationId);
125
+ const { data, loading } = useQuery2(MESSAGES_QUERY, {
126
+ variables: { conversationId },
127
+ skip: !enabled,
128
+ fetchPolicy: "cache-and-network"
129
+ });
130
+ const [setRead] = useMutation(SET_READ);
131
+ const { projectId } = useTemplateRuntime2();
132
+ const messages = data?.messages ?? [];
133
+ useEffect(() => {
134
+ if (!enabled || !conversationId)
135
+ return;
136
+ setRead({ variables: { conversationId, userId: viewerId } }).catch(() => {});
137
+ }, [conversationId, enabled, setRead, viewerId]);
138
+ useEffect(() => {
139
+ const container = scrollRef.current;
140
+ if (!container)
141
+ return;
142
+ container.scrollTop = container.scrollHeight;
143
+ }, [messages]);
144
+ if (!conversationId) {
145
+ return /* @__PURE__ */ jsx2("div", {
146
+ className: "flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",
147
+ children: /* @__PURE__ */ jsx2("p", {
148
+ className: "text-muted-foreground text-sm",
149
+ children: "Select a conversation"
150
+ })
151
+ });
152
+ }
153
+ return /* @__PURE__ */ jsx2("div", {
154
+ className: "flex flex-1 flex-col rounded-2xl border border-border bg-card",
155
+ children: /* @__PURE__ */ jsx2("div", {
156
+ ref: scrollRef,
157
+ className: "flex-1 space-y-3 overflow-y-auto p-4",
158
+ children: loading ? /* @__PURE__ */ jsx2("p", {
159
+ className: "text-center text-muted-foreground text-sm",
160
+ children: "Loading…"
161
+ }) : messages.slice().reverse().map((message) => /* @__PURE__ */ jsxs2("div", {
162
+ className: `flex flex-col ${message.senderId === viewerId ? "items-end" : "items-start"}`,
70
163
  children: [
71
- "Category",
72
- /* @__PURE__ */ jsxs("select", {
73
- className: "border-border bg-background text-foreground mt-1 rounded-md border px-3 py-2 text-sm",
74
- value: value.categoryId,
75
- onChange: (event) => handleChange("categoryId", event.target.value),
164
+ /* @__PURE__ */ jsx2("div", {
165
+ className: `max-w-xs rounded-2xl px-3 py-2 text-sm ${message.senderId === viewerId ? "bg-violet-500 text-white" : "bg-muted text-foreground"}`,
166
+ children: /* @__PURE__ */ jsx2("p", {
167
+ children: message.content
168
+ })
169
+ }),
170
+ /* @__PURE__ */ jsxs2("span", {
171
+ className: "mt-1 text-muted-foreground text-xs",
76
172
  children: [
77
- /* @__PURE__ */ jsx("option", {
78
- value: "all",
79
- children: "All categories"
80
- }),
81
- categories.map((category) => /* @__PURE__ */ jsx("option", {
82
- value: category.id,
83
- children: category.name
84
- }, category.id))
173
+ message.senderName || message.senderId,
174
+ " ·",
175
+ " ",
176
+ new Date(message.createdAt).toLocaleTimeString([], {
177
+ hour: "2-digit",
178
+ minute: "2-digit"
179
+ })
85
180
  ]
86
181
  })
87
182
  ]
88
- }),
89
- /* @__PURE__ */ jsxs("label", {
90
- className: "text-muted-foreground flex flex-col text-xs tracking-wide uppercase",
91
- children: [
92
- "Search",
93
- /* @__PURE__ */ jsx("input", {
94
- type: "search",
95
- className: "border-border bg-background text-foreground mt-1 rounded-md border px-3 py-2 text-sm",
96
- placeholder: "Search by title",
97
- value: value.search,
98
- onChange: (event) => handleChange("search", event.target.value)
99
- })
100
- ]
101
- })
102
- ]
183
+ }, message.id))
184
+ })
103
185
  });
104
186
  }
105
187
 
106
- // src/components/templates/todos/TaskForm.tsx
188
+ // src/components/templates/messaging/MessageComposer.tsx
189
+ import { gql as gql3 } from "@apollo/client";
190
+ import { useMutation as useMutation2 } from "@apollo/client/react";
191
+ import { useTemplateRuntime as useTemplateRuntime3 } from "@contractspec/lib.example-shared-ui";
192
+ import { Send } from "lucide-react";
107
193
  import { useState } from "react";
108
- import { useMutation } from "@apollo/client/react";
109
- import { gql } from "@apollo/client";
110
- import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
111
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
194
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
112
195
  "use client";
113
- var CREATE_TASK = gql`
114
- mutation CreateTask($input: CreateTaskInput!) {
115
- createTask(input: $input) {
196
+ var SEND_MESSAGE = gql3`
197
+ mutation SendMessage($input: SendMessageInput!) {
198
+ sendMessage(input: $input) {
116
199
  id
117
- title
118
200
  }
119
201
  }
120
202
  `;
121
- function TaskForm({ categories }) {
122
- const { projectId } = useTemplateRuntime();
123
- const [title, setTitle] = useState("");
124
- const [description, setDescription] = useState("");
125
- const [priority, setPriority] = useState("MEDIUM");
126
- const [categoryId, setCategoryId] = useState("none");
127
- const [tagsInput, setTagsInput] = useState("");
128
- const [createTask, { loading }] = useMutation(CREATE_TASK);
203
+ function MessageComposer({
204
+ conversationId,
205
+ viewerId = "local-user",
206
+ viewerName = "You"
207
+ }) {
208
+ const { projectId } = useTemplateRuntime3();
209
+ const [content, setContent] = useState("");
210
+ const [sendMessage, { loading }] = useMutation2(SEND_MESSAGE);
129
211
  const handleSubmit = async (event) => {
130
212
  event.preventDefault();
131
- if (!title.trim())
213
+ if (!conversationId || !content.trim())
132
214
  return;
133
- await createTask({
215
+ await sendMessage({
134
216
  variables: {
135
217
  input: {
136
218
  projectId,
137
- title: title.trim(),
138
- description: description.trim() || undefined,
139
- priority,
140
- categoryId: categoryId === "none" ? undefined : categoryId,
141
- tags: parseTags(tagsInput)
219
+ conversationId,
220
+ senderId: viewerId,
221
+ senderName: viewerName,
222
+ content: content.trim()
142
223
  }
143
224
  },
144
- refetchQueries: ["Tasks"],
145
- awaitRefetchQueries: true
225
+ refetchQueries: [
226
+ {
227
+ query: MESSAGES_QUERY,
228
+ variables: { conversationId }
229
+ }
230
+ ]
146
231
  });
147
- setTitle("");
148
- setDescription("");
149
- setPriority("MEDIUM");
150
- setCategoryId("none");
151
- setTagsInput("");
232
+ setContent("");
152
233
  };
153
- return /* @__PURE__ */ jsxs2("form", {
234
+ return /* @__PURE__ */ jsxs3("form", {
154
235
  onSubmit: handleSubmit,
155
- className: "border-border bg-background/60 space-y-3 rounded-2xl border p-4",
236
+ className: "mt-3 flex items-center gap-2 rounded-2xl border border-border bg-card px-4 py-3",
156
237
  children: [
157
- /* @__PURE__ */ jsx2("div", {
158
- children: /* @__PURE__ */ jsxs2("label", {
159
- className: "text-muted-foreground text-xs font-semibold uppercase",
160
- children: [
161
- "Title",
162
- /* @__PURE__ */ jsx2("input", {
163
- type: "text",
164
- className: "border-border bg-card mt-1 w-full rounded-md border px-3 py-2 text-sm",
165
- placeholder: "What needs to get done?",
166
- value: title,
167
- onChange: (event) => setTitle(event.target.value),
168
- required: true
169
- })
170
- ]
171
- })
172
- }),
173
- /* @__PURE__ */ jsx2("div", {
174
- children: /* @__PURE__ */ jsxs2("label", {
175
- className: "text-muted-foreground text-xs font-semibold uppercase",
176
- children: [
177
- "Description",
178
- /* @__PURE__ */ jsx2("textarea", {
179
- className: "border-border bg-card mt-1 w-full rounded-md border px-3 py-2 text-sm",
180
- rows: 3,
181
- placeholder: "Add context or policy notes",
182
- value: description,
183
- onChange: (event) => setDescription(event.target.value)
184
- })
185
- ]
186
- })
238
+ /* @__PURE__ */ jsx3("input", {
239
+ type: "text",
240
+ className: "flex-1 bg-transparent text-foreground text-sm outline-none",
241
+ placeholder: conversationId ? "Type a message…" : "Select a conversation to start",
242
+ disabled: !conversationId || loading,
243
+ value: content,
244
+ onChange: (event) => setContent(event.target.value)
187
245
  }),
188
- /* @__PURE__ */ jsxs2("div", {
189
- className: "grid gap-3 md:grid-cols-3",
246
+ /* @__PURE__ */ jsxs3("button", {
247
+ type: "submit",
248
+ className: "btn-primary inline-flex items-center gap-1 text-sm",
249
+ disabled: !conversationId || loading || !content.trim(),
190
250
  children: [
191
- /* @__PURE__ */ jsxs2("label", {
192
- className: "text-muted-foreground text-xs font-semibold uppercase",
193
- children: [
194
- "Priority",
195
- /* @__PURE__ */ jsxs2("select", {
196
- className: "border-border bg-card mt-1 w-full rounded-md border px-3 py-2 text-sm",
197
- value: priority,
198
- onChange: (event) => setPriority(event.target.value),
199
- children: [
200
- /* @__PURE__ */ jsx2("option", {
201
- value: "LOW",
202
- children: "Low"
203
- }),
204
- /* @__PURE__ */ jsx2("option", {
205
- value: "MEDIUM",
206
- children: "Medium"
207
- }),
208
- /* @__PURE__ */ jsx2("option", {
209
- value: "HIGH",
210
- children: "High"
211
- }),
212
- /* @__PURE__ */ jsx2("option", {
213
- value: "URGENT",
214
- children: "Urgent"
215
- })
216
- ]
217
- })
218
- ]
251
+ /* @__PURE__ */ jsx3(Send, {
252
+ className: "h-4 w-4"
219
253
  }),
220
- /* @__PURE__ */ jsxs2("label", {
221
- className: "text-muted-foreground text-xs font-semibold uppercase",
222
- children: [
223
- "Category",
224
- /* @__PURE__ */ jsxs2("select", {
225
- className: "border-border bg-card mt-1 w-full rounded-md border px-3 py-2 text-sm",
226
- value: categoryId,
227
- onChange: (event) => setCategoryId(event.target.value),
228
- children: [
229
- /* @__PURE__ */ jsx2("option", {
230
- value: "none",
231
- children: "None"
232
- }),
233
- categories.map((category) => /* @__PURE__ */ jsx2("option", {
234
- value: category.id,
235
- children: category.name
236
- }, category.id))
237
- ]
238
- })
239
- ]
254
+ "Send"
255
+ ]
256
+ })
257
+ ]
258
+ });
259
+ }
260
+
261
+ // src/components/templates/messaging/MessagingWorkspace.tsx
262
+ import { registerTemplateComponents } from "@contractspec/lib.example-shared-ui";
263
+ import { useState as useState2 } from "react";
264
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
265
+ "use client";
266
+ function MessagingWorkspace() {
267
+ const [conversationId, setConversationId] = useState2();
268
+ return /* @__PURE__ */ jsxs4("div", {
269
+ className: "grid gap-4 md:grid-cols-[280px,1fr]",
270
+ children: [
271
+ /* @__PURE__ */ jsx4(ConversationList, {
272
+ selectedId: conversationId,
273
+ onSelect: setConversationId
274
+ }),
275
+ /* @__PURE__ */ jsxs4("div", {
276
+ className: "flex flex-col gap-3",
277
+ children: [
278
+ /* @__PURE__ */ jsx4(MessageThread, {
279
+ conversationId
240
280
  }),
241
- /* @__PURE__ */ jsxs2("label", {
242
- className: "text-muted-foreground text-xs font-semibold uppercase",
243
- children: [
244
- "Tags",
245
- /* @__PURE__ */ jsx2("input", {
246
- className: "border-border bg-card mt-1 w-full rounded-md border px-3 py-2 text-sm",
247
- placeholder: "Comma separated (optional)",
248
- value: tagsInput,
249
- onChange: (event) => setTagsInput(event.target.value)
250
- })
251
- ]
281
+ /* @__PURE__ */ jsx4(MessageComposer, {
282
+ conversationId
252
283
  })
253
284
  ]
254
- }),
255
- /* @__PURE__ */ jsx2("button", {
256
- type: "submit",
257
- className: "btn-primary w-full py-2 text-sm font-semibold",
258
- disabled: loading,
259
- children: loading ? "Saving..." : "Add task"
260
285
  })
261
286
  ]
262
287
  });
263
288
  }
264
- function parseTags(input) {
265
- return input.split(",").map((tag) => tag.trim()).filter(Boolean);
289
+ registerTemplateComponents("messaging-app", {
290
+ list: MessagingWorkspace,
291
+ detail: MessageThread,
292
+ form: MessageComposer
293
+ });
294
+ // src/components/templates/recipes/LanguageSwitcher.tsx
295
+ import { jsx as jsx5 } from "react/jsx-runtime";
296
+ function LanguageSwitcher({ locale, onChange }) {
297
+ return /* @__PURE__ */ jsx5("div", {
298
+ className: "inline-flex rounded-full border border-border bg-card p-1 font-semibold text-muted-foreground text-xs",
299
+ children: ["EN", "FR"].map((language) => /* @__PURE__ */ jsx5("button", {
300
+ type: "button",
301
+ className: `rounded-full px-3 py-1 transition ${locale === language ? "bg-violet-500 text-white" : "hover:text-foreground"}`,
302
+ onClick: () => onChange(language),
303
+ children: language === "EN" ? "English" : "Français"
304
+ }, language))
305
+ });
266
306
  }
267
307
 
268
- // src/components/templates/todos/TaskItem.tsx
269
- import { Check, Circle, Trash2 } from "lucide-react";
270
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
271
- function TaskItem({ task, onToggle, onDelete }) {
272
- const badgeColor = task.priority === "URGENT" ? "text-red-200 bg-red-500/10 border-red-500/40" : task.priority === "HIGH" ? "text-amber-200 bg-amber-500/10 border-amber-500/40" : task.priority === "LOW" ? "text-emerald-200 bg-emerald-500/10 border-emerald-500/40" : "text-violet-200 bg-violet-500/10 border-violet-500/40";
273
- return /* @__PURE__ */ jsxs3("div", {
274
- className: "border-border/70 bg-card/60 hover:border-border flex items-start gap-4 rounded-2xl border p-4 transition",
308
+ // src/components/templates/recipes/RecipeCard.tsx
309
+ import { Heart } from "lucide-react";
310
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
311
+ function RecipeCard({
312
+ recipe,
313
+ onSelect,
314
+ onToggleFavorite
315
+ }) {
316
+ return /* @__PURE__ */ jsxs5("button", {
317
+ type: "button",
318
+ onClick: () => onSelect?.(recipe),
319
+ className: "flex flex-col gap-3 rounded-2xl border border-border bg-card text-left transition hover:border-violet-400",
275
320
  children: [
276
- /* @__PURE__ */ jsx3("button", {
277
- type: "button",
278
- className: "border-border text-muted-foreground hover:bg-muted/40 rounded-full border p-2",
279
- "aria-pressed": task.completed,
280
- onClick: () => onToggle?.(task),
281
- children: task.completed ? /* @__PURE__ */ jsx3(Check, {
282
- className: "h-4 w-4 text-emerald-400"
283
- }) : /* @__PURE__ */ jsx3(Circle, {
284
- className: "h-4 w-4"
285
- })
321
+ recipe.heroImageUrl ? /* @__PURE__ */ jsx6("img", {
322
+ src: recipe.heroImageUrl,
323
+ alt: recipe.name,
324
+ className: "h-40 w-full rounded-t-2xl object-cover"
325
+ }) : /* @__PURE__ */ jsx6("div", {
326
+ className: "h-40 rounded-t-2xl bg-muted"
286
327
  }),
287
- /* @__PURE__ */ jsxs3("div", {
288
- className: "flex-1 space-y-2",
328
+ /* @__PURE__ */ jsxs5("div", {
329
+ className: "space-y-2 p-4",
289
330
  children: [
290
- /* @__PURE__ */ jsxs3("div", {
291
- className: "flex flex-wrap items-center gap-2",
331
+ /* @__PURE__ */ jsxs5("div", {
332
+ className: "flex items-center justify-between",
292
333
  children: [
293
- /* @__PURE__ */ jsx3("p", {
294
- className: `font-medium ${task.completed ? "text-muted-foreground line-through" : "text-foreground"}`,
295
- children: task.title
296
- }),
297
- /* @__PURE__ */ jsx3("span", {
298
- className: `rounded-full border px-2 py-0.5 text-xs ${badgeColor}`,
299
- children: task.priority.charAt(0) + task.priority.slice(1).toLowerCase()
334
+ /* @__PURE__ */ jsx6("p", {
335
+ className: "font-semibold text-base",
336
+ children: recipe.name
300
337
  }),
301
- task.category ? /* @__PURE__ */ jsx3("span", {
302
- className: "bg-muted/40 text-muted-foreground rounded-full px-2 py-0.5 text-xs",
303
- children: task.category.name
338
+ /* @__PURE__ */ jsx6("button", {
339
+ type: "button",
340
+ className: `inline-flex items-center justify-center rounded-full border border-transparent p-2 ${recipe.isFavorite ? "text-red-400" : "text-muted-foreground hover:text-red-400"}`,
341
+ onClick: (event) => {
342
+ event.stopPropagation();
343
+ onToggleFavorite?.(recipe);
344
+ },
345
+ children: /* @__PURE__ */ jsx6(Heart, {
346
+ className: `h-4 w-4 ${recipe.isFavorite ? "fill-red-400" : ""}`
347
+ })
348
+ })
349
+ ]
350
+ }),
351
+ /* @__PURE__ */ jsx6("p", {
352
+ className: "line-clamp-2 text-muted-foreground text-sm",
353
+ children: recipe.description
354
+ }),
355
+ /* @__PURE__ */ jsxs5("div", {
356
+ className: "flex flex-wrap gap-3 text-muted-foreground text-xs",
357
+ children: [
358
+ recipe.prepTimeMinutes ? /* @__PURE__ */ jsxs5("span", {
359
+ children: [
360
+ "Prep ",
361
+ recipe.prepTimeMinutes,
362
+ "m"
363
+ ]
304
364
  }) : null,
305
- task.dueDate ? /* @__PURE__ */ jsxs3("span", {
306
- className: "text-muted-foreground text-xs",
365
+ recipe.cookTimeMinutes ? /* @__PURE__ */ jsxs5("span", {
307
366
  children: [
308
- "Due ",
309
- new Date(task.dueDate).toLocaleDateString()
367
+ "Cook ",
368
+ recipe.cookTimeMinutes,
369
+ "m"
370
+ ]
371
+ }) : null,
372
+ recipe.servings ? /* @__PURE__ */ jsxs5("span", {
373
+ children: [
374
+ recipe.servings,
375
+ " servings"
310
376
  ]
311
377
  }) : null
312
378
  ]
379
+ })
380
+ ]
381
+ })
382
+ ]
383
+ });
384
+ }
385
+
386
+ // src/components/templates/recipes/RecipeDetail.tsx
387
+ import { BookOpen } from "lucide-react";
388
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
389
+ function RecipeDetail({ recipe }) {
390
+ if (!recipe) {
391
+ return /* @__PURE__ */ jsx7("div", {
392
+ className: "flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",
393
+ children: /* @__PURE__ */ jsx7("p", {
394
+ className: "text-muted-foreground text-sm",
395
+ children: "Select a recipe to view details."
396
+ })
397
+ });
398
+ }
399
+ return /* @__PURE__ */ jsxs6("article", {
400
+ className: "space-y-4 rounded-2xl border border-border bg-card p-6",
401
+ children: [
402
+ /* @__PURE__ */ jsxs6("header", {
403
+ className: "flex flex-wrap items-center gap-3",
404
+ children: [
405
+ /* @__PURE__ */ jsx7(BookOpen, {
406
+ className: "h-5 w-5 text-muted-foreground"
407
+ }),
408
+ /* @__PURE__ */ jsxs6("div", {
409
+ children: [
410
+ /* @__PURE__ */ jsx7("h2", {
411
+ className: "font-semibold text-xl",
412
+ children: recipe.name
413
+ }),
414
+ /* @__PURE__ */ jsx7("p", {
415
+ className: "text-muted-foreground text-sm",
416
+ children: recipe.description
417
+ })
418
+ ]
419
+ })
420
+ ]
421
+ }),
422
+ /* @__PURE__ */ jsxs6("section", {
423
+ children: [
424
+ /* @__PURE__ */ jsx7("h3", {
425
+ className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
426
+ children: "Ingredients"
313
427
  }),
314
- task.description ? /* @__PURE__ */ jsx3("p", {
315
- className: "text-muted-foreground text-sm",
316
- children: task.description
317
- }) : null,
318
- task.tags.length ? /* @__PURE__ */ jsx3("div", {
319
- className: "flex flex-wrap gap-1",
320
- children: task.tags.map((tag) => /* @__PURE__ */ jsxs3("span", {
321
- className: "bg-muted/40 text-muted-foreground rounded-full px-2 py-0.5 text-xs",
428
+ /* @__PURE__ */ jsx7("ul", {
429
+ className: "mt-2 list-disc space-y-1 pl-6 text-foreground text-sm",
430
+ children: recipe.ingredients.map((ingredient) => /* @__PURE__ */ jsxs6("li", {
322
431
  children: [
323
- "#",
324
- tag
432
+ ingredient.name,
433
+ " – ",
434
+ ingredient.quantity
325
435
  ]
326
- }, tag))
327
- }) : null
436
+ }, ingredient.id))
437
+ })
328
438
  ]
329
439
  }),
330
- /* @__PURE__ */ jsx3("button", {
331
- type: "button",
332
- className: "text-muted-foreground hover:text-destructive",
333
- "aria-label": `Delete ${task.title}`,
334
- onClick: () => onDelete?.(task),
335
- children: /* @__PURE__ */ jsx3(Trash2, {
336
- className: "h-4 w-4"
337
- })
440
+ /* @__PURE__ */ jsxs6("section", {
441
+ children: [
442
+ /* @__PURE__ */ jsx7("h3", {
443
+ className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
444
+ children: "Instructions"
445
+ }),
446
+ /* @__PURE__ */ jsx7("ol", {
447
+ className: "mt-2 list-decimal space-y-2 pl-6 text-foreground text-sm",
448
+ children: recipe.instructions.map((instruction) => /* @__PURE__ */ jsx7("li", {
449
+ children: instruction.content
450
+ }, instruction.id))
451
+ })
452
+ ]
338
453
  })
339
454
  ]
340
455
  });
341
456
  }
342
457
 
343
- // src/components/templates/todos/TaskList.tsx
344
- import { useMemo, useState as useState2 } from "react";
345
- import { useMutation as useMutation2, useQuery } from "@apollo/client/react";
346
- import { gql as gql2 } from "@apollo/client";
458
+ // src/components/templates/recipes/RecipeList.tsx
459
+ import { gql as gql4 } from "@apollo/client";
460
+ import { useMutation as useMutation3, useQuery as useQuery3 } from "@apollo/client/react";
347
461
  import {
348
- registerTemplateComponents,
349
- useTemplateRuntime as useTemplateRuntime2
462
+ registerTemplateComponents as registerTemplateComponents2,
463
+ useTemplateRuntime as useTemplateRuntime4
350
464
  } from "@contractspec/lib.example-shared-ui";
351
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
465
+ import { useState as useState3 } from "react";
466
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
352
467
  "use client";
353
- var TASKS_QUERY = gql2`
354
- query Tasks($projectId: ID!) {
355
- taskCategories(projectId: $projectId) {
468
+ var RECIPES_QUERY = gql4`
469
+ query Recipes($projectId: ID!, $locale: RecipeLocale!) {
470
+ recipes(projectId: $projectId, locale: $locale) {
356
471
  id
357
472
  name
358
- color
359
- }
360
- tasks(projectId: $projectId) {
361
- id
362
- title
363
473
  description
364
- completed
365
- priority
366
- dueDate
367
- tags
474
+ heroImageUrl
475
+ prepTimeMinutes
476
+ cookTimeMinutes
477
+ servings
478
+ isFavorite
479
+ locale
368
480
  category {
481
+ id
482
+ nameEn
483
+ nameFr
484
+ }
485
+ ingredients {
369
486
  id
370
487
  name
371
- color
488
+ quantity
489
+ }
490
+ instructions {
491
+ id
492
+ content
493
+ ordering
372
494
  }
373
495
  }
374
496
  }
375
497
  `;
376
- var TOGGLE_TASK = gql2`
377
- mutation ToggleTask($id: ID!, $completed: Boolean!) {
378
- toggleTask(id: $id, completed: $completed) {
498
+ var FAVORITE_RECIPE = gql4`
499
+ mutation FavoriteRecipe($id: ID!, $isFavorite: Boolean!) {
500
+ favoriteRecipe(id: $id, isFavorite: $isFavorite) {
379
501
  id
380
- completed
502
+ isFavorite
381
503
  }
382
504
  }
383
505
  `;
384
- var DELETE_TASK = gql2`
385
- mutation DeleteTask($id: ID!) {
386
- deleteTask(id: $id)
387
- }
388
- `;
389
- function TaskList() {
390
- const { projectId } = useTemplateRuntime2();
391
- const [filters, setFilters] = useState2({
392
- status: "all",
393
- priority: "all",
394
- categoryId: "all",
395
- search: ""
396
- });
397
- const { data, loading } = useQuery(TASKS_QUERY, {
398
- variables: { projectId },
506
+ function RecipeList() {
507
+ const { projectId } = useTemplateRuntime4();
508
+ const [locale, setLocale] = useState3("EN");
509
+ const [selected, setSelected] = useState3();
510
+ const [search, setSearch] = useState3("");
511
+ const { data, loading } = useQuery3(RECIPES_QUERY, {
512
+ variables: { projectId, locale },
399
513
  fetchPolicy: "cache-and-network"
400
514
  });
401
- const [toggleTask] = useMutation2(TOGGLE_TASK);
402
- const [deleteTask] = useMutation2(DELETE_TASK);
403
- const categories = data?.taskCategories ?? [];
404
- const tasks = data?.tasks ?? [];
405
- const filtered = useMemo(() => {
406
- return tasks.filter((task) => {
407
- if (filters.status === "active" && task.completed)
408
- return false;
409
- if (filters.status === "completed" && !task.completed)
410
- return false;
411
- if (filters.priority !== "all" && task.priority !== filters.priority)
412
- return false;
413
- if (filters.categoryId !== "all" && task.category?.id !== filters.categoryId)
414
- return false;
415
- if (filters.search && !task.title.toLowerCase().includes(filters.search.toLowerCase()))
416
- return false;
417
- return true;
418
- });
419
- }, [tasks, filters]);
420
- const handleToggle = async (task) => {
421
- await toggleTask({
422
- variables: { id: task.id, completed: !task.completed },
515
+ const [favoriteRecipe] = useMutation3(FAVORITE_RECIPE);
516
+ const recipes = data?.recipes ?? [];
517
+ const filtered = recipes.filter((recipe) => recipe.name.toLowerCase().includes(search.toLowerCase()));
518
+ const handleToggleFavorite = async (recipe) => {
519
+ await favoriteRecipe({
520
+ variables: { id: recipe.id, isFavorite: !recipe.isFavorite },
423
521
  optimisticResponse: {
424
- toggleTask: {
425
- __typename: "Task",
426
- id: task.id,
427
- completed: !task.completed
522
+ favoriteRecipe: {
523
+ __typename: "Recipe",
524
+ id: recipe.id,
525
+ isFavorite: !recipe.isFavorite
428
526
  }
429
- },
430
- update(cache) {
431
- cache.modify({
432
- fields: {
433
- tasks(existing = []) {
434
- return existing.map((ref) => ref.__ref?.endsWith(task.id) ? { ...ref, completed: !task.completed } : ref);
435
- }
436
- }
437
- });
438
527
  }
439
528
  });
440
529
  };
441
- const handleDelete = async (task) => {
442
- await deleteTask({
443
- variables: { id: task.id },
444
- refetchQueries: [{ query: TASKS_QUERY, variables: { projectId } }]
445
- });
446
- };
447
- return /* @__PURE__ */ jsxs4("div", {
448
- className: "space-y-6",
530
+ return /* @__PURE__ */ jsxs7("div", {
531
+ className: "space-y-4",
449
532
  children: [
450
- /* @__PURE__ */ jsx4(FilterBar, {
451
- value: filters,
452
- onChange: setFilters,
453
- categories
454
- }),
455
- /* @__PURE__ */ jsx4(TaskForm, {
456
- categories
533
+ /* @__PURE__ */ jsxs7("div", {
534
+ className: "flex flex-wrap items-center gap-3",
535
+ children: [
536
+ /* @__PURE__ */ jsx8(LanguageSwitcher, {
537
+ locale,
538
+ onChange: setLocale
539
+ }),
540
+ /* @__PURE__ */ jsx8("input", {
541
+ type: "search",
542
+ placeholder: locale === "EN" ? "Search recipes" : "Rechercher des recettes",
543
+ className: "flex-1 rounded-full border border-border bg-card px-4 py-2 text-sm",
544
+ value: search,
545
+ onChange: (event) => setSearch(event.target.value)
546
+ })
547
+ ]
457
548
  }),
458
- loading ? /* @__PURE__ */ jsx4("p", {
549
+ loading ? /* @__PURE__ */ jsx8("p", {
459
550
  className: "text-muted-foreground text-sm",
460
- children: "Loading tasks…"
461
- }) : filtered.length ? /* @__PURE__ */ jsx4("div", {
462
- className: "space-y-3",
463
- children: filtered.map((task) => /* @__PURE__ */ jsx4(TaskItem, {
464
- task,
465
- onToggle: handleToggle,
466
- onDelete: handleDelete
467
- }, task.id))
468
- }) : /* @__PURE__ */ jsx4("div", {
469
- className: "border-border rounded-2xl border border-dashed p-8 text-center",
470
- children: /* @__PURE__ */ jsx4("p", {
471
- className: "text-muted-foreground",
472
- children: "No tasks match your filters. Create one above."
473
- })
551
+ children: "Loading recipes…"
552
+ }) : /* @__PURE__ */ jsx8("div", {
553
+ className: "grid gap-4 md:grid-cols-3",
554
+ children: filtered.map((recipe) => /* @__PURE__ */ jsx8(RecipeCard, {
555
+ recipe,
556
+ onSelect: setSelected,
557
+ onToggleFavorite: handleToggleFavorite
558
+ }, recipe.id))
559
+ }),
560
+ /* @__PURE__ */ jsx8(RecipeDetail, {
561
+ recipe: selected
474
562
  })
475
563
  ]
476
564
  });
477
565
  }
478
- registerTemplateComponents("todos-app", {
479
- list: TaskList,
480
- detail: TaskList,
481
- form: TaskForm
566
+ registerTemplateComponents2("recipe-app-i18n", {
567
+ list: RecipeList,
568
+ detail: RecipeDetail
482
569
  });
483
- // src/components/templates/messaging/ConversationList.tsx
484
- import { useQuery as useQuery2 } from "@apollo/client/react";
485
- import { gql as gql3 } from "@apollo/client";
486
- import { MessageCircle, Users } from "lucide-react";
487
- import { useMemo as useMemo2 } from "react";
488
- import { useTemplateRuntime as useTemplateRuntime3 } from "@contractspec/lib.example-shared-ui";
489
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
490
- var CONVERSATIONS_QUERY = gql3`
491
- query Conversations($projectId: ID!) {
492
- conversations(projectId: $projectId) {
493
- id
494
- name
495
- isGroup
496
- updatedAt
497
- participants {
498
- id
499
- userId
500
- displayName
501
- }
502
- }
503
- }
504
- `;
505
- function ConversationList({
506
- selectedId,
507
- onSelect
508
- }) {
509
- const { projectId } = useTemplateRuntime3();
510
- const { data, loading } = useQuery2(CONVERSATIONS_QUERY, {
511
- variables: { projectId },
512
- fetchPolicy: "cache-and-network"
513
- });
514
- const conversations = useMemo2(() => data?.conversations ?? [], [data]);
515
- return /* @__PURE__ */ jsxs5("aside", {
516
- className: "border-border bg-card h-full overflow-y-auto rounded-2xl border",
570
+ // src/components/templates/todos/FilterBar.tsx
571
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
572
+ function FilterBar({ value, onChange, categories }) {
573
+ const handleChange = (key, nextValue) => {
574
+ onChange({ ...value, [key]: nextValue });
575
+ };
576
+ return /* @__PURE__ */ jsxs8("div", {
577
+ className: "grid gap-3 rounded-2xl border border-border bg-card p-4 md:grid-cols-4",
517
578
  children: [
518
- /* @__PURE__ */ jsxs5("header", {
519
- className: "border-border px -4 flex items-center justify-between border-b px-4 py-3",
579
+ /* @__PURE__ */ jsxs8("label", {
580
+ className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
520
581
  children: [
521
- /* @__PURE__ */ jsxs5("div", {
582
+ "Status",
583
+ /* @__PURE__ */ jsxs8("select", {
584
+ className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
585
+ value: value.status,
586
+ onChange: (event) => handleChange("status", event.target.value),
522
587
  children: [
523
- /* @__PURE__ */ jsx5("p", {
524
- className: "text-sm font-semibold",
525
- children: "Conversations"
588
+ /* @__PURE__ */ jsx9("option", {
589
+ value: "all",
590
+ children: "All tasks"
526
591
  }),
527
- /* @__PURE__ */ jsx5("p", {
528
- className: "text-muted-foreground text-xs",
529
- children: loading ? "Loading…" : `${conversations.length} active`
592
+ /* @__PURE__ */ jsx9("option", {
593
+ value: "active",
594
+ children: "Active"
595
+ }),
596
+ /* @__PURE__ */ jsx9("option", {
597
+ value: "completed",
598
+ children: "Completed"
530
599
  })
531
600
  ]
532
- }),
533
- /* @__PURE__ */ jsx5(Users, {
534
- className: "text-muted-foreground h-4 w-4"
535
601
  })
536
602
  ]
537
603
  }),
538
- /* @__PURE__ */ jsxs5("div", {
539
- className: "divide-border/70 divide-y",
604
+ /* @__PURE__ */ jsxs8("label", {
605
+ className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
540
606
  children: [
541
- conversations.map((conversation) => {
542
- const isSelected = selectedId === conversation.id;
543
- return /* @__PURE__ */ jsxs5("button", {
544
- type: "button",
545
- className: `flex w-full flex-col items-start gap-1 px-4 py-3 text-left transition ${isSelected ? "text-foreground bg-violet-500/10" : "hover:bg-muted/40"}`,
546
- onClick: () => onSelect?.(conversation.id),
547
- children: [
548
- /* @__PURE__ */ jsxs5("div", {
549
- className: "flex items-center gap-2",
550
- children: [
551
- /* @__PURE__ */ jsx5(MessageCircle, {
552
- className: "text-muted-foreground h-4 w-4"
553
- }),
554
- /* @__PURE__ */ jsx5("span", {
555
- className: "text-sm font-medium",
556
- children: conversation.name || "Untitled conversation"
557
- })
558
- ]
559
- }),
560
- /* @__PURE__ */ jsx5("p", {
561
- className: "text-muted-foreground text-xs",
562
- children: conversation.participants.map((participant) => participant.displayName || participant.userId).join(" · ")
563
- })
564
- ]
565
- }, conversation.id);
566
- }),
567
- !loading && conversations.length === 0 ? /* @__PURE__ */ jsx5("p", {
568
- className: "text-muted-foreground p-4 text-center text-xs",
569
- children: "No conversations yet."
570
- }) : null
607
+ "Priority",
608
+ /* @__PURE__ */ jsxs8("select", {
609
+ className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
610
+ value: value.priority,
611
+ onChange: (event) => handleChange("priority", event.target.value),
612
+ children: [
613
+ /* @__PURE__ */ jsx9("option", {
614
+ value: "all",
615
+ children: "All"
616
+ }),
617
+ /* @__PURE__ */ jsx9("option", {
618
+ value: "LOW",
619
+ children: "Low"
620
+ }),
621
+ /* @__PURE__ */ jsx9("option", {
622
+ value: "MEDIUM",
623
+ children: "Medium"
624
+ }),
625
+ /* @__PURE__ */ jsx9("option", {
626
+ value: "HIGH",
627
+ children: "High"
628
+ }),
629
+ /* @__PURE__ */ jsx9("option", {
630
+ value: "URGENT",
631
+ children: "Urgent"
632
+ })
633
+ ]
634
+ })
571
635
  ]
572
- })
573
- ]
574
- });
575
- }
576
-
577
- // src/components/templates/messaging/MessageThread.tsx
578
- import { useMutation as useMutation3, useQuery as useQuery3 } from "@apollo/client/react";
579
- import { gql as gql4 } from "@apollo/client";
580
- import { useEffect, useRef } from "react";
581
- import { useTemplateRuntime as useTemplateRuntime4 } from "@contractspec/lib.example-shared-ui";
582
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
583
- "use client";
584
- var MESSAGES_QUERY = gql4`
585
- query Messages($conversationId: ID!) {
586
- messages(conversationId: $conversationId, limit: 50) {
587
- id
588
- content
589
- senderId
590
- senderName
591
- createdAt
592
- status
593
- }
594
- }
595
- `;
596
- var SET_READ = gql4`
597
- mutation SetMessagesRead($conversationId: ID!, $userId: String!) {
598
- setMessagesRead(conversationId: $conversationId, userId: $userId)
599
- }
600
- `;
601
- function MessageThread({
602
- conversationId,
603
- viewerId = "local-user"
604
- }) {
605
- const scrollRef = useRef(null);
606
- const enabled = Boolean(conversationId);
607
- const { data, loading } = useQuery3(MESSAGES_QUERY, {
608
- variables: { conversationId },
609
- skip: !enabled,
610
- fetchPolicy: "cache-and-network"
611
- });
612
- const [setRead] = useMutation3(SET_READ);
613
- const { projectId } = useTemplateRuntime4();
614
- const messages = data?.messages ?? [];
615
- useEffect(() => {
616
- if (!enabled || !conversationId)
617
- return;
618
- setRead({ variables: { conversationId, userId: viewerId } }).catch(() => {});
619
- }, [conversationId, enabled, setRead, viewerId]);
620
- useEffect(() => {
621
- const container = scrollRef.current;
622
- if (!container)
623
- return;
624
- container.scrollTop = container.scrollHeight;
625
- }, [messages]);
626
- if (!conversationId) {
627
- return /* @__PURE__ */ jsx6("div", {
628
- className: "border-border flex flex-1 items-center justify-center rounded-2xl border border-dashed",
629
- children: /* @__PURE__ */ jsx6("p", {
630
- className: "text-muted-foreground text-sm",
631
- children: "Select a conversation"
632
- })
633
- });
634
- }
635
- return /* @__PURE__ */ jsx6("div", {
636
- className: "border-border bg-card flex flex-1 flex-col rounded-2xl border",
637
- children: /* @__PURE__ */ jsx6("div", {
638
- ref: scrollRef,
639
- className: "flex-1 space-y-3 overflow-y-auto p-4",
640
- children: loading ? /* @__PURE__ */ jsx6("p", {
641
- className: "text-muted-foreground text-center text-sm",
642
- children: "Loading…"
643
- }) : messages.slice().reverse().map((message) => /* @__PURE__ */ jsxs6("div", {
644
- className: `flex flex-col ${message.senderId === viewerId ? "items-end" : "items-start"}`,
636
+ }),
637
+ /* @__PURE__ */ jsxs8("label", {
638
+ className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
645
639
  children: [
646
- /* @__PURE__ */ jsx6("div", {
647
- className: `max-w-xs rounded-2xl px-3 py-2 text-sm ${message.senderId === viewerId ? "bg-violet-500 text-white" : "bg-muted text-foreground"}`,
648
- children: /* @__PURE__ */ jsx6("p", {
649
- children: message.content
650
- })
651
- }),
652
- /* @__PURE__ */ jsxs6("span", {
653
- className: "text-muted-foreground mt-1 text-xs",
640
+ "Category",
641
+ /* @__PURE__ */ jsxs8("select", {
642
+ className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
643
+ value: value.categoryId,
644
+ onChange: (event) => handleChange("categoryId", event.target.value),
654
645
  children: [
655
- message.senderName || message.senderId,
656
- " ·",
657
- " ",
658
- new Date(message.createdAt).toLocaleTimeString([], {
659
- hour: "2-digit",
660
- minute: "2-digit"
661
- })
646
+ /* @__PURE__ */ jsx9("option", {
647
+ value: "all",
648
+ children: "All categories"
649
+ }),
650
+ categories.map((category) => /* @__PURE__ */ jsx9("option", {
651
+ value: category.id,
652
+ children: category.name
653
+ }, category.id))
662
654
  ]
663
655
  })
664
656
  ]
665
- }, message.id))
666
- })
657
+ }),
658
+ /* @__PURE__ */ jsxs8("label", {
659
+ className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
660
+ children: [
661
+ "Search",
662
+ /* @__PURE__ */ jsx9("input", {
663
+ type: "search",
664
+ className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
665
+ placeholder: "Search by title",
666
+ value: value.search,
667
+ onChange: (event) => handleChange("search", event.target.value)
668
+ })
669
+ ]
670
+ })
671
+ ]
667
672
  });
668
673
  }
669
674
 
670
- // src/components/templates/messaging/MessageComposer.tsx
671
- import { useState as useState3 } from "react";
672
- import { useMutation as useMutation4 } from "@apollo/client/react";
675
+ // src/components/templates/todos/TaskForm.tsx
673
676
  import { gql as gql5 } from "@apollo/client";
674
- import { Send } from "lucide-react";
677
+ import { useMutation as useMutation4 } from "@apollo/client/react";
675
678
  import { useTemplateRuntime as useTemplateRuntime5 } from "@contractspec/lib.example-shared-ui";
676
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
679
+ import { useState as useState4 } from "react";
680
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
677
681
  "use client";
678
- var SEND_MESSAGE = gql5`
679
- mutation SendMessage($input: SendMessageInput!) {
680
- sendMessage(input: $input) {
682
+ var CREATE_TASK = gql5`
683
+ mutation CreateTask($input: CreateTaskInput!) {
684
+ createTask(input: $input) {
681
685
  id
686
+ title
682
687
  }
683
688
  }
684
689
  `;
685
- function MessageComposer({
686
- conversationId,
687
- viewerId = "local-user",
688
- viewerName = "You"
689
- }) {
690
+ function TaskForm({ categories }) {
690
691
  const { projectId } = useTemplateRuntime5();
691
- const [content, setContent] = useState3("");
692
- const [sendMessage, { loading }] = useMutation4(SEND_MESSAGE);
692
+ const [title, setTitle] = useState4("");
693
+ const [description, setDescription] = useState4("");
694
+ const [priority, setPriority] = useState4("MEDIUM");
695
+ const [categoryId, setCategoryId] = useState4("none");
696
+ const [tagsInput, setTagsInput] = useState4("");
697
+ const [createTask, { loading }] = useMutation4(CREATE_TASK);
693
698
  const handleSubmit = async (event) => {
694
699
  event.preventDefault();
695
- if (!conversationId || !content.trim())
700
+ if (!title.trim())
696
701
  return;
697
- await sendMessage({
702
+ await createTask({
698
703
  variables: {
699
704
  input: {
700
705
  projectId,
701
- conversationId,
702
- senderId: viewerId,
703
- senderName: viewerName,
704
- content: content.trim()
706
+ title: title.trim(),
707
+ description: description.trim() || undefined,
708
+ priority,
709
+ categoryId: categoryId === "none" ? undefined : categoryId,
710
+ tags: parseTags(tagsInput)
705
711
  }
706
712
  },
707
- refetchQueries: [
708
- {
709
- query: MESSAGES_QUERY,
710
- variables: { conversationId }
711
- }
712
- ]
713
+ refetchQueries: ["Tasks"],
714
+ awaitRefetchQueries: true
713
715
  });
714
- setContent("");
716
+ setTitle("");
717
+ setDescription("");
718
+ setPriority("MEDIUM");
719
+ setCategoryId("none");
720
+ setTagsInput("");
715
721
  };
716
- return /* @__PURE__ */ jsxs7("form", {
722
+ return /* @__PURE__ */ jsxs9("form", {
717
723
  onSubmit: handleSubmit,
718
- className: "border-border bg-card mt-3 flex items-center gap-2 rounded-2xl border px-4 py-3",
724
+ className: "space-y-3 rounded-2xl border border-border bg-background/60 p-4",
719
725
  children: [
720
- /* @__PURE__ */ jsx7("input", {
721
- type: "text",
722
- className: "text-foreground flex-1 bg-transparent text-sm outline-none",
723
- placeholder: conversationId ? "Type a message…" : "Select a conversation to start",
724
- disabled: !conversationId || loading,
725
- value: content,
726
- onChange: (event) => setContent(event.target.value)
727
- }),
728
- /* @__PURE__ */ jsxs7("button", {
729
- type: "submit",
730
- className: "btn-primary inline-flex items-center gap-1 text-sm",
731
- disabled: !conversationId || loading || !content.trim(),
732
- children: [
733
- /* @__PURE__ */ jsx7(Send, {
734
- className: "h-4 w-4"
735
- }),
736
- "Send"
737
- ]
738
- })
739
- ]
740
- });
741
- }
742
-
743
- // src/components/templates/messaging/MessagingWorkspace.tsx
744
- import { useState as useState4 } from "react";
745
- import { registerTemplateComponents as registerTemplateComponents2 } from "@contractspec/lib.example-shared-ui";
746
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
747
- "use client";
748
- function MessagingWorkspace() {
749
- const [conversationId, setConversationId] = useState4();
750
- return /* @__PURE__ */ jsxs8("div", {
751
- className: "grid gap-4 md:grid-cols-[280px,1fr]",
752
- children: [
753
- /* @__PURE__ */ jsx8(ConversationList, {
754
- selectedId: conversationId,
755
- onSelect: setConversationId
726
+ /* @__PURE__ */ jsx10("div", {
727
+ children: /* @__PURE__ */ jsxs9("label", {
728
+ className: "font-semibold text-muted-foreground text-xs uppercase",
729
+ children: [
730
+ "Title",
731
+ /* @__PURE__ */ jsx10("input", {
732
+ type: "text",
733
+ className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
734
+ placeholder: "What needs to get done?",
735
+ value: title,
736
+ onChange: (event) => setTitle(event.target.value),
737
+ required: true
738
+ })
739
+ ]
740
+ })
756
741
  }),
757
- /* @__PURE__ */ jsxs8("div", {
758
- className: "flex flex-col gap-3",
759
- children: [
760
- /* @__PURE__ */ jsx8(MessageThread, {
761
- conversationId
762
- }),
763
- /* @__PURE__ */ jsx8(MessageComposer, {
764
- conversationId
765
- })
766
- ]
767
- })
768
- ]
769
- });
770
- }
771
- registerTemplateComponents2("messaging-app", {
772
- list: MessagingWorkspace,
773
- detail: MessageThread,
774
- form: MessageComposer
775
- });
776
- // src/components/templates/recipes/LanguageSwitcher.tsx
777
- import { jsx as jsx9 } from "react/jsx-runtime";
778
- function LanguageSwitcher({ locale, onChange }) {
779
- return /* @__PURE__ */ jsx9("div", {
780
- className: "border-border bg-card text-muted-foreground inline-flex rounded-full border p-1 text-xs font-semibold",
781
- children: ["EN", "FR"].map((language) => /* @__PURE__ */ jsx9("button", {
782
- type: "button",
783
- className: `rounded-full px-3 py-1 transition ${locale === language ? "bg-violet-500 text-white" : "hover:text-foreground"}`,
784
- onClick: () => onChange(language),
785
- children: language === "EN" ? "English" : "Français"
786
- }, language))
787
- });
788
- }
789
-
790
- // src/components/templates/recipes/RecipeCard.tsx
791
- import { Heart } from "lucide-react";
792
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
793
- function RecipeCard({
794
- recipe,
795
- onSelect,
796
- onToggleFavorite
797
- }) {
798
- return /* @__PURE__ */ jsxs9("button", {
799
- type: "button",
800
- onClick: () => onSelect?.(recipe),
801
- className: "border-border bg-card flex flex-col gap-3 rounded-2xl border text-left transition hover:border-violet-400",
802
- children: [
803
- recipe.heroImageUrl ? /* @__PURE__ */ jsx10("img", {
804
- src: recipe.heroImageUrl,
805
- alt: recipe.name,
806
- className: "h-40 w-full rounded-t-2xl object-cover"
807
- }) : /* @__PURE__ */ jsx10("div", {
808
- className: "bg-muted h-40 rounded-t-2xl"
742
+ /* @__PURE__ */ jsx10("div", {
743
+ children: /* @__PURE__ */ jsxs9("label", {
744
+ className: "font-semibold text-muted-foreground text-xs uppercase",
745
+ children: [
746
+ "Description",
747
+ /* @__PURE__ */ jsx10("textarea", {
748
+ className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
749
+ rows: 3,
750
+ placeholder: "Add context or policy notes",
751
+ value: description,
752
+ onChange: (event) => setDescription(event.target.value)
753
+ })
754
+ ]
755
+ })
809
756
  }),
810
757
  /* @__PURE__ */ jsxs9("div", {
811
- className: "space-y-2 p-4",
758
+ className: "grid gap-3 md:grid-cols-3",
812
759
  children: [
813
- /* @__PURE__ */ jsxs9("div", {
814
- className: "flex items-center justify-between",
760
+ /* @__PURE__ */ jsxs9("label", {
761
+ className: "font-semibold text-muted-foreground text-xs uppercase",
815
762
  children: [
816
- /* @__PURE__ */ jsx10("p", {
817
- className: "text-base font-semibold",
818
- children: recipe.name
819
- }),
820
- /* @__PURE__ */ jsx10("button", {
821
- type: "button",
822
- className: `inline-flex items-center justify-center rounded-full border border-transparent p-2 ${recipe.isFavorite ? "text-red-400" : "text-muted-foreground hover:text-red-400"}`,
823
- onClick: (event) => {
824
- event.stopPropagation();
825
- onToggleFavorite?.(recipe);
826
- },
827
- children: /* @__PURE__ */ jsx10(Heart, {
828
- className: `h-4 w-4 ${recipe.isFavorite ? "fill-red-400" : ""}`
829
- })
763
+ "Priority",
764
+ /* @__PURE__ */ jsxs9("select", {
765
+ className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
766
+ value: priority,
767
+ onChange: (event) => setPriority(event.target.value),
768
+ children: [
769
+ /* @__PURE__ */ jsx10("option", {
770
+ value: "LOW",
771
+ children: "Low"
772
+ }),
773
+ /* @__PURE__ */ jsx10("option", {
774
+ value: "MEDIUM",
775
+ children: "Medium"
776
+ }),
777
+ /* @__PURE__ */ jsx10("option", {
778
+ value: "HIGH",
779
+ children: "High"
780
+ }),
781
+ /* @__PURE__ */ jsx10("option", {
782
+ value: "URGENT",
783
+ children: "Urgent"
784
+ })
785
+ ]
830
786
  })
831
- ]
832
- }),
833
- /* @__PURE__ */ jsx10("p", {
834
- className: "text-muted-foreground line-clamp-2 text-sm",
835
- children: recipe.description
787
+ ]
836
788
  }),
837
- /* @__PURE__ */ jsxs9("div", {
838
- className: "text-muted-foreground flex flex-wrap gap-3 text-xs",
789
+ /* @__PURE__ */ jsxs9("label", {
790
+ className: "font-semibold text-muted-foreground text-xs uppercase",
839
791
  children: [
840
- recipe.prepTimeMinutes ? /* @__PURE__ */ jsxs9("span", {
841
- children: [
842
- "Prep ",
843
- recipe.prepTimeMinutes,
844
- "m"
845
- ]
846
- }) : null,
847
- recipe.cookTimeMinutes ? /* @__PURE__ */ jsxs9("span", {
848
- children: [
849
- "Cook ",
850
- recipe.cookTimeMinutes,
851
- "m"
852
- ]
853
- }) : null,
854
- recipe.servings ? /* @__PURE__ */ jsxs9("span", {
792
+ "Category",
793
+ /* @__PURE__ */ jsxs9("select", {
794
+ className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
795
+ value: categoryId,
796
+ onChange: (event) => setCategoryId(event.target.value),
855
797
  children: [
856
- recipe.servings,
857
- " servings"
798
+ /* @__PURE__ */ jsx10("option", {
799
+ value: "none",
800
+ children: "None"
801
+ }),
802
+ categories.map((category) => /* @__PURE__ */ jsx10("option", {
803
+ value: category.id,
804
+ children: category.name
805
+ }, category.id))
858
806
  ]
859
- }) : null
807
+ })
808
+ ]
809
+ }),
810
+ /* @__PURE__ */ jsxs9("label", {
811
+ className: "font-semibold text-muted-foreground text-xs uppercase",
812
+ children: [
813
+ "Tags",
814
+ /* @__PURE__ */ jsx10("input", {
815
+ className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
816
+ placeholder: "Comma separated (optional)",
817
+ value: tagsInput,
818
+ onChange: (event) => setTagsInput(event.target.value)
819
+ })
860
820
  ]
861
821
  })
862
822
  ]
823
+ }),
824
+ /* @__PURE__ */ jsx10("button", {
825
+ type: "submit",
826
+ className: "btn-primary w-full py-2 font-semibold text-sm",
827
+ disabled: loading,
828
+ children: loading ? "Saving..." : "Add task"
863
829
  })
864
830
  ]
865
831
  });
866
832
  }
833
+ function parseTags(input) {
834
+ return input.split(",").map((tag) => tag.trim()).filter(Boolean);
835
+ }
867
836
 
868
- // src/components/templates/recipes/RecipeDetail.tsx
869
- import { BookOpen } from "lucide-react";
837
+ // src/components/templates/todos/TaskItem.tsx
838
+ import { Check, Circle, Trash2 } from "lucide-react";
870
839
  import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
871
- function RecipeDetail({ recipe }) {
872
- if (!recipe) {
873
- return /* @__PURE__ */ jsx11("div", {
874
- className: "border-border flex flex-1 items-center justify-center rounded-2xl border border-dashed",
875
- children: /* @__PURE__ */ jsx11("p", {
876
- className: "text-muted-foreground text-sm",
877
- children: "Select a recipe to view details."
878
- })
879
- });
880
- }
881
- return /* @__PURE__ */ jsxs10("article", {
882
- className: "border-border bg-card space-y-4 rounded-2xl border p-6",
840
+ function TaskItem({ task, onToggle, onDelete }) {
841
+ const badgeColor = task.priority === "URGENT" ? "text-red-200 bg-red-500/10 border-red-500/40" : task.priority === "HIGH" ? "text-amber-200 bg-amber-500/10 border-amber-500/40" : task.priority === "LOW" ? "text-emerald-200 bg-emerald-500/10 border-emerald-500/40" : "text-violet-200 bg-violet-500/10 border-violet-500/40";
842
+ return /* @__PURE__ */ jsxs10("div", {
843
+ className: "flex items-start gap-4 rounded-2xl border border-border/70 bg-card/60 p-4 transition hover:border-border",
883
844
  children: [
884
- /* @__PURE__ */ jsxs10("header", {
885
- className: "flex flex-wrap items-center gap-3",
845
+ /* @__PURE__ */ jsx11("button", {
846
+ type: "button",
847
+ className: "rounded-full border border-border p-2 text-muted-foreground hover:bg-muted/40",
848
+ "aria-pressed": task.completed,
849
+ onClick: () => onToggle?.(task),
850
+ children: task.completed ? /* @__PURE__ */ jsx11(Check, {
851
+ className: "h-4 w-4 text-emerald-400"
852
+ }) : /* @__PURE__ */ jsx11(Circle, {
853
+ className: "h-4 w-4"
854
+ })
855
+ }),
856
+ /* @__PURE__ */ jsxs10("div", {
857
+ className: "flex-1 space-y-2",
886
858
  children: [
887
- /* @__PURE__ */ jsx11(BookOpen, {
888
- className: "text-muted-foreground h-5 w-5"
889
- }),
890
859
  /* @__PURE__ */ jsxs10("div", {
860
+ className: "flex flex-wrap items-center gap-2",
891
861
  children: [
892
- /* @__PURE__ */ jsx11("h2", {
893
- className: "text-xl font-semibold",
894
- children: recipe.name
895
- }),
896
862
  /* @__PURE__ */ jsx11("p", {
897
- className: "text-muted-foreground text-sm",
898
- children: recipe.description
899
- })
863
+ className: `font-medium ${task.completed ? "text-muted-foreground line-through" : "text-foreground"}`,
864
+ children: task.title
865
+ }),
866
+ /* @__PURE__ */ jsx11("span", {
867
+ className: `rounded-full border px-2 py-0.5 text-xs ${badgeColor}`,
868
+ children: task.priority.charAt(0) + task.priority.slice(1).toLowerCase()
869
+ }),
870
+ task.category ? /* @__PURE__ */ jsx11("span", {
871
+ className: "rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",
872
+ children: task.category.name
873
+ }) : null,
874
+ task.dueDate ? /* @__PURE__ */ jsxs10("span", {
875
+ className: "text-muted-foreground text-xs",
876
+ children: [
877
+ "Due ",
878
+ new Date(task.dueDate).toLocaleDateString()
879
+ ]
880
+ }) : null
900
881
  ]
901
- })
902
- ]
903
- }),
904
- /* @__PURE__ */ jsxs10("section", {
905
- children: [
906
- /* @__PURE__ */ jsx11("h3", {
907
- className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
908
- children: "Ingredients"
909
882
  }),
910
- /* @__PURE__ */ jsx11("ul", {
911
- className: "text-foreground mt-2 list-disc space-y-1 pl-6 text-sm",
912
- children: recipe.ingredients.map((ingredient) => /* @__PURE__ */ jsxs10("li", {
883
+ task.description ? /* @__PURE__ */ jsx11("p", {
884
+ className: "text-muted-foreground text-sm",
885
+ children: task.description
886
+ }) : null,
887
+ task.tags.length ? /* @__PURE__ */ jsx11("div", {
888
+ className: "flex flex-wrap gap-1",
889
+ children: task.tags.map((tag) => /* @__PURE__ */ jsxs10("span", {
890
+ className: "rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",
913
891
  children: [
914
- ingredient.name,
915
- " – ",
916
- ingredient.quantity
892
+ "#",
893
+ tag
917
894
  ]
918
- }, ingredient.id))
919
- })
895
+ }, tag))
896
+ }) : null
920
897
  ]
921
898
  }),
922
- /* @__PURE__ */ jsxs10("section", {
923
- children: [
924
- /* @__PURE__ */ jsx11("h3", {
925
- className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
926
- children: "Instructions"
927
- }),
928
- /* @__PURE__ */ jsx11("ol", {
929
- className: "text-foreground mt-2 list-decimal space-y-2 pl-6 text-sm",
930
- children: recipe.instructions.map((instruction) => /* @__PURE__ */ jsx11("li", {
931
- children: instruction.content
932
- }, instruction.id))
933
- })
934
- ]
899
+ /* @__PURE__ */ jsx11("button", {
900
+ type: "button",
901
+ className: "text-muted-foreground hover:text-destructive",
902
+ "aria-label": `Delete ${task.title}`,
903
+ onClick: () => onDelete?.(task),
904
+ children: /* @__PURE__ */ jsx11(Trash2, {
905
+ className: "h-4 w-4"
906
+ })
935
907
  })
936
908
  ]
937
909
  });
938
910
  }
939
911
 
940
- // src/components/templates/recipes/RecipeList.tsx
941
- import { useState as useState5 } from "react";
942
- import { useMutation as useMutation5, useQuery as useQuery4 } from "@apollo/client/react";
912
+ // src/components/templates/todos/TaskList.tsx
943
913
  import { gql as gql6 } from "@apollo/client";
914
+ import { useMutation as useMutation5, useQuery as useQuery4 } from "@apollo/client/react";
944
915
  import {
945
916
  registerTemplateComponents as registerTemplateComponents3,
946
917
  useTemplateRuntime as useTemplateRuntime6
947
918
  } from "@contractspec/lib.example-shared-ui";
919
+ import { useMemo as useMemo2, useState as useState5 } from "react";
948
920
  import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
949
921
  "use client";
950
- var RECIPES_QUERY = gql6`
951
- query Recipes($projectId: ID!, $locale: RecipeLocale!) {
952
- recipes(projectId: $projectId, locale: $locale) {
922
+ var TASKS_QUERY = gql6`
923
+ query Tasks($projectId: ID!) {
924
+ taskCategories(projectId: $projectId) {
953
925
  id
954
926
  name
927
+ color
928
+ }
929
+ tasks(projectId: $projectId) {
930
+ id
931
+ title
955
932
  description
956
- heroImageUrl
957
- prepTimeMinutes
958
- cookTimeMinutes
959
- servings
960
- isFavorite
961
- locale
933
+ completed
934
+ priority
935
+ dueDate
936
+ tags
962
937
  category {
963
- id
964
- nameEn
965
- nameFr
966
- }
967
- ingredients {
968
938
  id
969
939
  name
970
- quantity
971
- }
972
- instructions {
973
- id
974
- content
975
- ordering
940
+ color
976
941
  }
977
942
  }
978
943
  }
979
944
  `;
980
- var FAVORITE_RECIPE = gql6`
981
- mutation FavoriteRecipe($id: ID!, $isFavorite: Boolean!) {
982
- favoriteRecipe(id: $id, isFavorite: $isFavorite) {
945
+ var TOGGLE_TASK = gql6`
946
+ mutation ToggleTask($id: ID!, $completed: Boolean!) {
947
+ toggleTask(id: $id, completed: $completed) {
983
948
  id
984
- isFavorite
949
+ completed
985
950
  }
986
951
  }
987
952
  `;
988
- function RecipeList() {
953
+ var DELETE_TASK = gql6`
954
+ mutation DeleteTask($id: ID!) {
955
+ deleteTask(id: $id)
956
+ }
957
+ `;
958
+ function TaskList() {
989
959
  const { projectId } = useTemplateRuntime6();
990
- const [locale, setLocale] = useState5("EN");
991
- const [selected, setSelected] = useState5();
992
- const [search, setSearch] = useState5("");
993
- const { data, loading } = useQuery4(RECIPES_QUERY, {
994
- variables: { projectId, locale },
960
+ const [filters, setFilters] = useState5({
961
+ status: "all",
962
+ priority: "all",
963
+ categoryId: "all",
964
+ search: ""
965
+ });
966
+ const { data, loading } = useQuery4(TASKS_QUERY, {
967
+ variables: { projectId },
995
968
  fetchPolicy: "cache-and-network"
996
969
  });
997
- const [favoriteRecipe] = useMutation5(FAVORITE_RECIPE);
998
- const recipes = data?.recipes ?? [];
999
- const filtered = recipes.filter((recipe) => recipe.name.toLowerCase().includes(search.toLowerCase()));
1000
- const handleToggleFavorite = async (recipe) => {
1001
- await favoriteRecipe({
1002
- variables: { id: recipe.id, isFavorite: !recipe.isFavorite },
970
+ const [toggleTask] = useMutation5(TOGGLE_TASK);
971
+ const [deleteTask] = useMutation5(DELETE_TASK);
972
+ const categories = data?.taskCategories ?? [];
973
+ const tasks = data?.tasks ?? [];
974
+ const filtered = useMemo2(() => {
975
+ return tasks.filter((task) => {
976
+ if (filters.status === "active" && task.completed)
977
+ return false;
978
+ if (filters.status === "completed" && !task.completed)
979
+ return false;
980
+ if (filters.priority !== "all" && task.priority !== filters.priority)
981
+ return false;
982
+ if (filters.categoryId !== "all" && task.category?.id !== filters.categoryId)
983
+ return false;
984
+ if (filters.search && !task.title.toLowerCase().includes(filters.search.toLowerCase()))
985
+ return false;
986
+ return true;
987
+ });
988
+ }, [tasks, filters]);
989
+ const handleToggle = async (task) => {
990
+ await toggleTask({
991
+ variables: { id: task.id, completed: !task.completed },
1003
992
  optimisticResponse: {
1004
- favoriteRecipe: {
1005
- __typename: "Recipe",
1006
- id: recipe.id,
1007
- isFavorite: !recipe.isFavorite
993
+ toggleTask: {
994
+ __typename: "Task",
995
+ id: task.id,
996
+ completed: !task.completed
1008
997
  }
998
+ },
999
+ update(cache) {
1000
+ cache.modify({
1001
+ fields: {
1002
+ tasks(existing = []) {
1003
+ return existing.map((ref) => ref.__ref?.endsWith(task.id) ? { ...ref, completed: !task.completed } : ref);
1004
+ }
1005
+ }
1006
+ });
1009
1007
  }
1010
1008
  });
1011
1009
  };
1010
+ const handleDelete = async (task) => {
1011
+ await deleteTask({
1012
+ variables: { id: task.id },
1013
+ refetchQueries: [{ query: TASKS_QUERY, variables: { projectId } }]
1014
+ });
1015
+ };
1012
1016
  return /* @__PURE__ */ jsxs11("div", {
1013
- className: "space-y-4",
1017
+ className: "space-y-6",
1014
1018
  children: [
1015
- /* @__PURE__ */ jsxs11("div", {
1016
- className: "flex flex-wrap items-center gap-3",
1017
- children: [
1018
- /* @__PURE__ */ jsx12(LanguageSwitcher, {
1019
- locale,
1020
- onChange: setLocale
1021
- }),
1022
- /* @__PURE__ */ jsx12("input", {
1023
- type: "search",
1024
- placeholder: locale === "EN" ? "Search recipes" : "Rechercher des recettes",
1025
- className: "border-border bg-card flex-1 rounded-full border px-4 py-2 text-sm",
1026
- value: search,
1027
- onChange: (event) => setSearch(event.target.value)
1028
- })
1029
- ]
1019
+ /* @__PURE__ */ jsx12(FilterBar, {
1020
+ value: filters,
1021
+ onChange: setFilters,
1022
+ categories
1023
+ }),
1024
+ /* @__PURE__ */ jsx12(TaskForm, {
1025
+ categories
1030
1026
  }),
1031
1027
  loading ? /* @__PURE__ */ jsx12("p", {
1032
1028
  className: "text-muted-foreground text-sm",
1033
- children: "Loading recipes…"
1029
+ children: "Loading tasks…"
1030
+ }) : filtered.length ? /* @__PURE__ */ jsx12("div", {
1031
+ className: "space-y-3",
1032
+ children: filtered.map((task) => /* @__PURE__ */ jsx12(TaskItem, {
1033
+ task,
1034
+ onToggle: handleToggle,
1035
+ onDelete: handleDelete
1036
+ }, task.id))
1034
1037
  }) : /* @__PURE__ */ jsx12("div", {
1035
- className: "grid gap-4 md:grid-cols-3",
1036
- children: filtered.map((recipe) => /* @__PURE__ */ jsx12(RecipeCard, {
1037
- recipe,
1038
- onSelect: setSelected,
1039
- onToggleFavorite: handleToggleFavorite
1040
- }, recipe.id))
1041
- }),
1042
- /* @__PURE__ */ jsx12(RecipeDetail, {
1043
- recipe: selected
1038
+ className: "rounded-2xl border border-border border-dashed p-8 text-center",
1039
+ children: /* @__PURE__ */ jsx12("p", {
1040
+ className: "text-muted-foreground",
1041
+ children: "No tasks match your filters. Create one above."
1042
+ })
1044
1043
  })
1045
1044
  ]
1046
1045
  });
1047
1046
  }
1048
- registerTemplateComponents3("recipe-app-i18n", {
1049
- list: RecipeList,
1050
- detail: RecipeDetail
1047
+ registerTemplateComponents3("todos-app", {
1048
+ list: TaskList,
1049
+ detail: TaskList,
1050
+ form: TaskForm
1051
1051
  });
1052
1052
  export {
1053
1053
  TaskList,