@contractspec/bundle.library 3.7.6 → 3.8.2

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