@contractspec/bundle.library 3.8.10 → 3.8.12

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 (643) hide show
  1. package/.turbo/turbo-build.log +606 -594
  2. package/CHANGELOG.md +59 -0
  3. package/dist/application/context-storage/index.js +1 -28
  4. package/dist/application/index.js +13 -2133
  5. package/dist/application/mcp/cliMcp.js +4 -452
  6. package/dist/application/mcp/common.js +1 -193
  7. package/dist/application/mcp/contractsMcp.js +2 -549
  8. package/dist/application/mcp/contractsMcpResources.js +2 -123
  9. package/dist/application/mcp/contractsMcpTools.js +1 -199
  10. package/dist/application/mcp/docsMcp.catalog.js +3 -381
  11. package/dist/application/mcp/docsMcp.data.js +1 -147
  12. package/dist/application/mcp/docsMcp.js +6 -1039
  13. package/dist/application/mcp/docsMcp.prompts.js +6 -521
  14. package/dist/application/mcp/docsMcp.reference.js +3 -235
  15. package/dist/application/mcp/docsMcp.resources.js +3 -519
  16. package/dist/application/mcp/docsMcp.tools.js +3 -518
  17. package/dist/application/mcp/index.js +13 -2106
  18. package/dist/application/mcp/internalMcp.js +2 -410
  19. package/dist/application/mcp/normalizeMcpRequest.js +1 -21
  20. package/dist/application/mcp/providerRankingMcp.js +1 -530
  21. package/dist/bundles/LibraryBundle.js +1 -138
  22. package/dist/bundles/index.js +1 -138
  23. package/dist/components/docs/DocsIndexPage.js +2 -912
  24. package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
  25. package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
  26. package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
  27. package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
  28. package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
  29. package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
  30. package/dist/components/docs/advanced/index.js +10 -1055
  31. package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
  32. package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
  33. package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
  34. package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
  35. package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
  36. package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
  37. package/dist/components/docs/architecture/index.js +20 -1340
  38. package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
  39. package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
  40. package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
  41. package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
  42. package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
  43. package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
  44. package/dist/components/docs/comparison/index.js +1 -1510
  45. package/dist/components/docs/docsManifest.js +1 -611
  46. package/dist/components/docs/docsManifest.test.d.ts +1 -0
  47. package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
  48. package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
  49. package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
  50. package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
  51. package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
  52. package/dist/components/docs/ecosystem/index.js +23 -569
  53. package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
  54. package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
  55. package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
  56. package/dist/components/docs/examples/index.js +4 -330
  57. package/dist/components/docs/generated/docs-index.generated.js +1 -5
  58. package/dist/components/docs/generated/index.js +1 -74
  59. package/dist/components/docs/generated/loader.js +1 -74
  60. package/dist/components/docs/getting-started/CLIPage.js +4 -271
  61. package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
  62. package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
  63. package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
  64. package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
  65. package/dist/components/docs/getting-started/InstallationPage.js +3 -154
  66. package/dist/components/docs/getting-started/StartHerePage.js +2 -129
  67. package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
  68. package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
  69. package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
  70. package/dist/components/docs/getting-started/index.js +18 -1869
  71. package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
  72. package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
  73. package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
  74. package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
  75. package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
  76. package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
  77. package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
  78. package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
  79. package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
  80. package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
  81. package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
  82. package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
  83. package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
  84. package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
  85. package/dist/components/docs/guides/guides.docblocks.js +11 -75
  86. package/dist/components/docs/guides/index.d.ts +3 -0
  87. package/dist/components/docs/guides/index.js +213 -2428
  88. package/dist/components/docs/index.js +542 -24310
  89. package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
  90. package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
  91. package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
  92. package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
  93. package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
  94. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
  95. package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
  96. package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
  97. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
  98. package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
  99. package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
  100. package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
  101. package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
  102. package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
  103. package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
  104. package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
  105. package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
  106. package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
  107. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
  108. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
  109. package/dist/components/docs/integrations/index.js +52 -3100
  110. package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
  111. package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
  112. package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
  113. package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
  114. package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
  115. package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
  116. package/dist/components/docs/intent/index.js +15 -1135
  117. package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
  118. package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
  119. package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
  120. package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
  121. package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
  122. package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
  123. package/dist/components/docs/knowledge/index.js +21 -1730
  124. package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
  125. package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
  126. package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
  127. package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
  128. package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
  129. package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
  130. package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
  131. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
  132. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
  133. package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
  134. package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
  135. package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
  136. package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
  137. package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
  138. package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
  139. package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
  140. package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
  141. package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
  142. package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
  143. package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
  144. package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
  145. package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
  146. package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
  147. package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
  148. package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
  149. package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
  150. package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
  151. package/dist/components/docs/libraries/index.js +54 -4147
  152. package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
  153. package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
  154. package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
  155. package/dist/components/docs/ops/index.js +3 -202
  156. package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
  157. package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
  158. package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
  159. package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
  160. package/dist/components/docs/ops/ops-top.docs.js +2 -17
  161. package/dist/components/docs/ops/ops.docs.js +10 -302
  162. package/dist/components/docs/product/product.docblocks.js +5 -72
  163. package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
  164. package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
  165. package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
  166. package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
  167. package/dist/components/docs/reference/DocsReferencePage.js +3 -265
  168. package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
  169. package/dist/components/docs/reference/index.js +4 -470
  170. package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
  171. package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
  172. package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
  173. package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
  174. package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
  175. package/dist/components/docs/safety/SafetySigningPage.js +3 -90
  176. package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
  177. package/dist/components/docs/safety/index.js +7 -1480
  178. package/dist/components/docs/shared/StudioPrompt.js +1 -31
  179. package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
  180. package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
  181. package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
  182. package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
  183. package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
  184. package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
  185. package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
  186. package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
  187. package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
  188. package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
  189. package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
  190. package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -325
  191. package/dist/components/docs/specs/index.d.ts +3 -0
  192. package/dist/components/docs/specs/index.js +109 -1715
  193. package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
  194. package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
  195. package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
  196. package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
  197. package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
  198. package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
  199. package/dist/components/docs/studio/index.js +1 -282
  200. package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
  201. package/dist/components/integrations/index.js +2 -600
  202. package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
  203. package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
  204. package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
  205. package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
  206. package/dist/components/legal/PrivacyTemplate.js +1 -1025
  207. package/dist/components/legal/TermsTemplate.js +1 -941
  208. package/dist/components/legal/index.js +1 -1963
  209. package/dist/components/shared/FeatureGateNotice.js +1 -38
  210. package/dist/components/shared/index.js +1 -38
  211. package/dist/components/shell/WorkspaceHeader.js +1 -100
  212. package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
  213. package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
  214. package/dist/components/shell/WorkspaceSidebar.js +1 -68
  215. package/dist/components/shell/index.js +1 -287
  216. package/dist/components/templates/engine/index.js +1 -39
  217. package/dist/components/templates/index.js +11 -965
  218. package/dist/components/templates/messaging/ConversationList.js +2 -83
  219. package/dist/components/templates/messaging/MessageComposer.js +4 -150
  220. package/dist/components/templates/messaging/MessageThread.js +3 -83
  221. package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
  222. package/dist/components/templates/messaging/index.js +5 -269
  223. package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
  224. package/dist/components/templates/recipes/RecipeCard.js +1 -80
  225. package/dist/components/templates/recipes/RecipeDetail.js +1 -74
  226. package/dist/components/templates/recipes/RecipeList.js +3 -245
  227. package/dist/components/templates/recipes/index.js +3 -248
  228. package/dist/components/templates/todos/FilterBar.js +1 -107
  229. package/dist/components/templates/todos/TaskForm.js +2 -158
  230. package/dist/components/templates/todos/TaskItem.js +1 -77
  231. package/dist/components/templates/todos/TaskList.js +5 -449
  232. package/dist/components/templates/todos/index.js +5 -452
  233. package/dist/config/contractspec-blueprint.js +1 -123
  234. package/dist/config/contractspec-branding.js +1 -44
  235. package/dist/config/contractspec-routes.js +1 -24
  236. package/dist/config/index.js +1 -126
  237. package/dist/features/contracts-registry.js +1 -178
  238. package/dist/features/docs/docs.contracts.js +1 -17
  239. package/dist/features/docs/index.js +1 -17
  240. package/dist/features/docs.feature.js +1 -33
  241. package/dist/features/index.js +1 -315
  242. package/dist/features/mcp.feature.js +1 -30
  243. package/dist/features/presentations.feature.js +1 -33
  244. package/dist/features/registry.js +1 -116
  245. package/dist/index.js +556 -28593
  246. package/dist/infrastructure/elysia/index.js +1 -35
  247. package/dist/infrastructure/elysia/logger.js +1 -35
  248. package/dist/infrastructure/index.js +1 -35
  249. package/dist/libs/email/client.js +1 -114
  250. package/dist/libs/email/contact.js +12 -165
  251. package/dist/libs/email/newsletter.js +6 -167
  252. package/dist/libs/email/types.js +0 -2
  253. package/dist/libs/email/utils.js +2 -8
  254. package/dist/libs/email/waitlist-application.js +28 -209
  255. package/dist/libs/email/waitlist.js +6 -167
  256. package/dist/libs/email.js +46 -363
  257. package/dist/libs/posthog/client.js +1 -63
  258. package/dist/libs/posthog/native.js +1 -23
  259. package/dist/libs/posthog/server.js +1 -13
  260. package/dist/libs/pricing-examples.js +1 -18
  261. package/dist/node/application/context-storage/index.js +1 -28
  262. package/dist/node/application/index.js +13 -2133
  263. package/dist/node/application/mcp/cliMcp.js +4 -452
  264. package/dist/node/application/mcp/common.js +1 -193
  265. package/dist/node/application/mcp/contractsMcp.js +2 -549
  266. package/dist/node/application/mcp/contractsMcpResources.js +2 -123
  267. package/dist/node/application/mcp/contractsMcpTools.js +1 -199
  268. package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
  269. package/dist/node/application/mcp/docsMcp.data.js +1 -147
  270. package/dist/node/application/mcp/docsMcp.js +6 -1039
  271. package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
  272. package/dist/node/application/mcp/docsMcp.reference.js +3 -235
  273. package/dist/node/application/mcp/docsMcp.resources.js +3 -519
  274. package/dist/node/application/mcp/docsMcp.tools.js +3 -518
  275. package/dist/node/application/mcp/index.js +13 -2106
  276. package/dist/node/application/mcp/internalMcp.js +2 -410
  277. package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
  278. package/dist/node/application/mcp/providerRankingMcp.js +1 -530
  279. package/dist/node/bundles/LibraryBundle.js +1 -138
  280. package/dist/node/bundles/index.js +1 -138
  281. package/dist/node/components/docs/DocsIndexPage.js +2 -912
  282. package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
  283. package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
  284. package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
  285. package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
  286. package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
  287. package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
  288. package/dist/node/components/docs/advanced/index.js +10 -1055
  289. package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
  290. package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
  291. package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
  292. package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
  293. package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
  294. package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
  295. package/dist/node/components/docs/architecture/index.js +20 -1340
  296. package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
  297. package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
  298. package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
  299. package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
  300. package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
  301. package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
  302. package/dist/node/components/docs/comparison/index.js +1 -1510
  303. package/dist/node/components/docs/docsManifest.js +1 -611
  304. package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
  305. package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
  306. package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
  307. package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
  308. package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
  309. package/dist/node/components/docs/ecosystem/index.js +23 -569
  310. package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
  311. package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
  312. package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
  313. package/dist/node/components/docs/examples/index.js +4 -330
  314. package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
  315. package/dist/node/components/docs/generated/index.js +1 -74
  316. package/dist/node/components/docs/generated/loader.js +1 -74
  317. package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
  318. package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
  319. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
  320. package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
  321. package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
  322. package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
  323. package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
  324. package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
  325. package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
  326. package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
  327. package/dist/node/components/docs/getting-started/index.js +18 -1869
  328. package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
  329. package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
  330. package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
  331. package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
  332. package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
  333. package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
  334. package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
  335. package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
  336. package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
  337. package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
  338. package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
  339. package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
  340. package/dist/node/components/docs/guides/index.js +213 -2428
  341. package/dist/node/components/docs/index.js +542 -24310
  342. package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
  343. package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
  344. package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
  345. package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
  346. package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
  347. package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
  348. package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
  349. package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
  350. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
  351. package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
  352. package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
  353. package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
  354. package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
  355. package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
  356. package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
  357. package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
  358. package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
  359. package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
  360. package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
  361. package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
  362. package/dist/node/components/docs/integrations/index.js +52 -3100
  363. package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
  364. package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
  365. package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
  366. package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
  367. package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
  368. package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
  369. package/dist/node/components/docs/intent/index.js +15 -1135
  370. package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
  371. package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
  372. package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
  373. package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
  374. package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
  375. package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
  376. package/dist/node/components/docs/knowledge/index.js +21 -1730
  377. package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
  378. package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
  379. package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
  380. package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
  381. package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
  382. package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
  383. package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
  384. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
  385. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
  386. package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
  387. package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
  388. package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
  389. package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
  390. package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
  391. package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
  392. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
  393. package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
  394. package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
  395. package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
  396. package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
  397. package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
  398. package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
  399. package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
  400. package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
  401. package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
  402. package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
  403. package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
  404. package/dist/node/components/docs/libraries/index.js +54 -4147
  405. package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
  406. package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
  407. package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
  408. package/dist/node/components/docs/ops/index.js +3 -202
  409. package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
  410. package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
  411. package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
  412. package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
  413. package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
  414. package/dist/node/components/docs/ops/ops.docs.js +10 -302
  415. package/dist/node/components/docs/product/product.docblocks.js +5 -72
  416. package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
  417. package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
  418. package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
  419. package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
  420. package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
  421. package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
  422. package/dist/node/components/docs/reference/index.js +4 -470
  423. package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
  424. package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
  425. package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
  426. package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
  427. package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
  428. package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
  429. package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
  430. package/dist/node/components/docs/safety/index.js +7 -1480
  431. package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
  432. package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
  433. package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
  434. package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
  435. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
  436. package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
  437. package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
  438. package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
  439. package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
  440. package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -325
  441. package/dist/node/components/docs/specs/index.js +109 -1715
  442. package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
  443. package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
  444. package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
  445. package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
  446. package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
  447. package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
  448. package/dist/node/components/docs/studio/index.js +1 -282
  449. package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
  450. package/dist/node/components/integrations/index.js +2 -600
  451. package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
  452. package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
  453. package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
  454. package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
  455. package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
  456. package/dist/node/components/legal/TermsTemplate.js +1 -941
  457. package/dist/node/components/legal/index.js +1 -1963
  458. package/dist/node/components/shared/FeatureGateNotice.js +1 -38
  459. package/dist/node/components/shared/index.js +1 -38
  460. package/dist/node/components/shell/WorkspaceHeader.js +1 -100
  461. package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
  462. package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
  463. package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
  464. package/dist/node/components/shell/index.js +1 -287
  465. package/dist/node/components/templates/engine/index.js +1 -39
  466. package/dist/node/components/templates/index.js +11 -965
  467. package/dist/node/components/templates/messaging/ConversationList.js +2 -83
  468. package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
  469. package/dist/node/components/templates/messaging/MessageThread.js +3 -83
  470. package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
  471. package/dist/node/components/templates/messaging/index.js +5 -269
  472. package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
  473. package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
  474. package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
  475. package/dist/node/components/templates/recipes/RecipeList.js +3 -245
  476. package/dist/node/components/templates/recipes/index.js +3 -248
  477. package/dist/node/components/templates/todos/FilterBar.js +1 -107
  478. package/dist/node/components/templates/todos/TaskForm.js +2 -158
  479. package/dist/node/components/templates/todos/TaskItem.js +1 -77
  480. package/dist/node/components/templates/todos/TaskList.js +5 -449
  481. package/dist/node/components/templates/todos/index.js +5 -452
  482. package/dist/node/config/contractspec-blueprint.js +1 -123
  483. package/dist/node/config/contractspec-branding.js +1 -44
  484. package/dist/node/config/contractspec-routes.js +1 -24
  485. package/dist/node/config/index.js +1 -126
  486. package/dist/node/features/contracts-registry.js +1 -178
  487. package/dist/node/features/docs/docs.contracts.js +1 -17
  488. package/dist/node/features/docs/index.js +1 -17
  489. package/dist/node/features/docs.feature.js +1 -33
  490. package/dist/node/features/index.js +1 -315
  491. package/dist/node/features/mcp.feature.js +1 -30
  492. package/dist/node/features/presentations.feature.js +1 -33
  493. package/dist/node/features/registry.js +1 -116
  494. package/dist/node/index.js +556 -28593
  495. package/dist/node/infrastructure/elysia/index.js +1 -35
  496. package/dist/node/infrastructure/elysia/logger.js +1 -35
  497. package/dist/node/infrastructure/index.js +1 -35
  498. package/dist/node/libs/email/client.js +1 -114
  499. package/dist/node/libs/email/contact.js +12 -165
  500. package/dist/node/libs/email/newsletter.js +6 -167
  501. package/dist/node/libs/email/types.js +0 -2
  502. package/dist/node/libs/email/utils.js +2 -8
  503. package/dist/node/libs/email/waitlist-application.js +28 -209
  504. package/dist/node/libs/email/waitlist.js +6 -167
  505. package/dist/node/libs/email.js +46 -363
  506. package/dist/node/libs/posthog/client.js +1 -63
  507. package/dist/node/libs/posthog/native.js +1 -23
  508. package/dist/node/libs/posthog/server.js +1 -13
  509. package/dist/node/libs/pricing-examples.js +1 -18
  510. package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
  511. package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
  512. package/dist/node/presentation/features/atoms/index.js +1 -97
  513. package/dist/node/presentation/features/hooks/index.js +1 -397
  514. package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
  515. package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
  516. package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
  517. package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
  518. package/dist/node/presentation/features/index.js +1 -3063
  519. package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
  520. package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
  521. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
  522. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
  523. package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
  524. package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
  525. package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
  526. package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
  527. package/dist/node/presentation/features/molecules/index.js +1 -505
  528. package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
  529. package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
  530. package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
  531. package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
  532. package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
  533. package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
  534. package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
  535. package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
  536. package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
  537. package/dist/node/presentation/features/organisms/index.js +1 -1359
  538. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
  539. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
  540. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
  541. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
  542. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
  543. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
  544. package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
  545. package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
  546. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
  547. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
  548. package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
  549. package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
  550. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
  551. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
  552. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
  553. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
  554. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
  555. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
  556. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
  557. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
  558. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
  559. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
  560. package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
  561. package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
  562. package/dist/presentation/features/atoms/index.js +1 -97
  563. package/dist/presentation/features/hooks/index.js +1 -397
  564. package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
  565. package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
  566. package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
  567. package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
  568. package/dist/presentation/features/index.js +1 -3063
  569. package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
  570. package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
  571. package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
  572. package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
  573. package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
  574. package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
  575. package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
  576. package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
  577. package/dist/presentation/features/molecules/index.js +1 -505
  578. package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
  579. package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
  580. package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
  581. package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
  582. package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
  583. package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
  584. package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
  585. package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
  586. package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
  587. package/dist/presentation/features/organisms/index.js +1 -1359
  588. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
  589. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
  590. package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
  591. package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
  592. package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
  593. package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
  594. package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
  595. package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
  596. package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
  597. package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
  598. package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
  599. package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
  600. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
  601. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
  602. package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
  603. package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
  604. package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
  605. package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
  606. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
  607. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
  608. package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
  609. package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
  610. package/package.json +103 -31
  611. package/src/components/docs/DocsIndexPage.tsx +55 -0
  612. package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
  613. package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
  614. package/src/components/docs/docsManifest.test.ts +70 -0
  615. package/src/components/docs/docsManifest.ts +71 -1
  616. package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
  617. package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
  618. package/src/components/docs/generated/docs-index._common.json +206 -273
  619. package/src/components/docs/generated/docs-index.control-plane.json +18 -0
  620. package/src/components/docs/generated/docs-index.defineExample.json +10 -0
  621. package/src/components/docs/generated/docs-index.manifest.json +22 -12
  622. package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
  623. package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
  624. package/src/components/docs/generated/docs-index.platform-context.json +48 -0
  625. package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
  626. package/src/components/docs/generated/docs-index.platform-database.json +40 -0
  627. package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
  628. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
  629. package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
  630. package/src/components/docs/generated/docs-index.unknown.json +8 -0
  631. package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
  632. package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
  633. package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
  634. package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
  635. package/src/components/docs/guides/index.ts +3 -0
  636. package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
  637. package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
  638. package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
  639. package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
  640. package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
  641. package/src/components/docs/specs/index.ts +3 -0
  642. package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
  643. package/src/infrastructure/elysia/logger.ts +11 -3
@@ -1,910 +1,2 @@
1
1
  // @bun
2
- // src/features/docs.feature.ts
3
- var DocsFeature = {
4
- meta: {
5
- key: "contractspec.docs",
6
- version: "1.0.0",
7
- title: "Documentation",
8
- description: "Comprehensive documentation system for ContractSpec",
9
- domain: "platform",
10
- owners: ["@platform.docs"],
11
- tags: ["documentation", "guides", "api-reference"],
12
- stability: "stable"
13
- },
14
- operations: [
15
- { key: "docs_search", version: "1.0.0" },
16
- { key: "docs.navigate", version: "1.0.0" }
17
- ],
18
- events: [
19
- { key: "docs.page_viewed", version: "1.0.0" },
20
- { key: "docs.search_performed", version: "1.0.0" }
21
- ],
22
- presentations: [
23
- { key: "docs.landing", version: "1.0.0" },
24
- { key: "docs.getting-started", version: "1.0.0" },
25
- { key: "docs.architecture", version: "1.0.0" }
26
- ],
27
- capabilities: {
28
- provides: [{ key: "contracts.docs", version: "1.0.0" }],
29
- requires: []
30
- }
31
- };
32
-
33
- // src/features/mcp.feature.ts
34
- var MCPFeature = {
35
- meta: {
36
- key: "contractspec.mcp",
37
- version: "1.0.0",
38
- title: "MCP Integration",
39
- description: "Model Context Protocol server for AI agent integration",
40
- domain: "platform",
41
- owners: ["@platform.mcp"],
42
- tags: ["mcp", "ai-agents", "tooling"],
43
- stability: "beta"
44
- },
45
- operations: [
46
- { key: "mcp.tool.register", version: "1.0.0" },
47
- { key: "mcp.resource.register", version: "1.0.0" },
48
- { key: "mcp.prompt.register", version: "1.0.0" }
49
- ],
50
- events: [
51
- { key: "mcp.tool_invoked", version: "1.0.0" },
52
- { key: "mcp.resource_accessed", version: "1.0.0" }
53
- ],
54
- presentations: [],
55
- capabilities: {
56
- provides: [{ key: "contracts.mcp", version: "1.0.0" }],
57
- requires: [{ key: "contracts.operations", version: "1.0.0" }]
58
- }
59
- };
60
-
61
- // src/features/presentations.feature.ts
62
- var PresentationsFeature = {
63
- meta: {
64
- key: "contractspec.presentations",
65
- version: "1.0.0",
66
- title: "Presentation Runtime",
67
- description: "Cross-platform rendering of contract-driven UI",
68
- domain: "platform",
69
- owners: ["@platform.presentations"],
70
- tags: ["presentations", "ui", "rendering", "cross-platform"],
71
- stability: "beta"
72
- },
73
- operations: [
74
- { key: "presentation.render", version: "1.0.0" },
75
- { key: "presentation.transform", version: "1.0.0" }
76
- ],
77
- events: [
78
- { key: "presentation.rendered", version: "1.0.0" },
79
- { key: "presentation.transformed", version: "1.0.0" }
80
- ],
81
- presentations: [
82
- { key: "form.standard", version: "1.0.0" },
83
- { key: "list.standard", version: "1.0.0" },
84
- { key: "detail.standard", version: "1.0.0" }
85
- ],
86
- capabilities: {
87
- provides: [{ key: "contracts.presentations", version: "1.0.0" }],
88
- requires: []
89
- }
90
- };
91
-
92
- // src/features/registry.ts
93
- import { AppConfigFeature } from "@contractspec/lib.contracts-spec/app-config";
94
- import { FeatureRegistry } from "@contractspec/lib.contracts-spec/features";
95
- function createContractSpecFeatureRegistry() {
96
- const features = new FeatureRegistry;
97
- features.register(DocsFeature);
98
- features.register(MCPFeature);
99
- features.register(PresentationsFeature);
100
- features.register(AppConfigFeature);
101
- return features;
102
- }
103
- var registryInstance = null;
104
- function getContractSpecFeatureRegistry() {
105
- if (!registryInstance) {
106
- registryInstance = createContractSpecFeatureRegistry();
107
- }
108
- return registryInstance;
109
- }
110
- function resetContractSpecFeatureRegistry() {
111
- registryInstance = null;
112
- }
113
-
114
- // src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx
115
- import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
116
- import {
117
- Boxes,
118
- Database,
119
- FileText,
120
- Globe,
121
- Layout,
122
- MessageSquare,
123
- Settings,
124
- Shield,
125
- Workflow
126
- } from "lucide-react";
127
- import * as React from "react";
128
- import { jsx } from "react/jsx-runtime";
129
- "use client";
130
- var domainIconMap = {
131
- platform: Settings,
132
- documentation: FileText,
133
- docs: FileText,
134
- integration: Workflow,
135
- api: Globe,
136
- security: Shield,
137
- data: Database,
138
- messaging: MessageSquare,
139
- ui: Layout,
140
- presentation: Layout
141
- };
142
- var tagIconMap = {
143
- documentation: FileText,
144
- guides: FileText,
145
- "api-reference": Globe,
146
- presentations: Layout,
147
- ui: Layout,
148
- rendering: Layout,
149
- mcp: Workflow,
150
- integration: Workflow,
151
- security: Shield,
152
- auth: Shield,
153
- data: Database,
154
- storage: Database
155
- };
156
- var stabilityToneMap = {
157
- stable: "success",
158
- beta: "warning",
159
- experimental: "info",
160
- deprecated: "danger"
161
- };
162
- var sizeClasses = {
163
- sm: "h-4 w-4",
164
- md: "h-5 w-5",
165
- lg: "h-6 w-6"
166
- };
167
- function FeatureIcon({
168
- domain,
169
- tags = [],
170
- stability,
171
- icon: IconOverride,
172
- size = "md",
173
- className
174
- }) {
175
- const Icon = React.useMemo(() => {
176
- if (IconOverride)
177
- return IconOverride;
178
- if (domain) {
179
- const domainIcon = domainIconMap[domain.toLowerCase()];
180
- if (domainIcon)
181
- return domainIcon;
182
- }
183
- for (const tag of tags) {
184
- const tagIcon = tagIconMap[tag.toLowerCase()];
185
- if (tagIcon)
186
- return tagIcon;
187
- }
188
- return Boxes;
189
- }, [domain, tags, IconOverride]);
190
- const tone = stability ? stabilityToneMap[stability] || "primary" : "primary";
191
- const toneClasses = {
192
- success: "text-emerald-600 dark:text-emerald-400",
193
- warning: "text-amber-600 dark:text-amber-400",
194
- info: "text-blue-600 dark:text-blue-400",
195
- danger: "text-red-600 dark:text-red-400",
196
- primary: "text-primary"
197
- };
198
- return /* @__PURE__ */ jsx(Icon, {
199
- className: cn(sizeClasses[size], toneClasses[tone], className)
200
- });
201
- }
202
- function getFeatureIconTone(stability) {
203
- if (!stability)
204
- return "primary";
205
- return stabilityToneMap[stability] || "primary";
206
- }
207
- // src/presentation/features/hooks/useFeatureFilters.ts
208
- import { useCallback, useMemo as useMemo2, useState } from "react";
209
- "use client";
210
- var defaultFilters = {
211
- search: "",
212
- tags: [],
213
- stability: [],
214
- domain: []
215
- };
216
- function useFeatureFilters(features) {
217
- const [filters, setFilters] = useState(defaultFilters);
218
- const setSearch = useCallback((search) => {
219
- setFilters((prev) => ({ ...prev, search }));
220
- }, []);
221
- const toggleTag = useCallback((tag) => {
222
- setFilters((prev) => ({
223
- ...prev,
224
- tags: prev.tags.includes(tag) ? prev.tags.filter((t) => t !== tag) : [...prev.tags, tag]
225
- }));
226
- }, []);
227
- const toggleStability = useCallback((stability) => {
228
- setFilters((prev) => ({
229
- ...prev,
230
- stability: prev.stability.includes(stability) ? prev.stability.filter((s) => s !== stability) : [...prev.stability, stability]
231
- }));
232
- }, []);
233
- const toggleDomain = useCallback((domain) => {
234
- setFilters((prev) => ({
235
- ...prev,
236
- domain: prev.domain.includes(domain) ? prev.domain.filter((d) => d !== domain) : [...prev.domain, domain]
237
- }));
238
- }, []);
239
- const clearFilters = useCallback(() => setFilters(defaultFilters), []);
240
- const hasActiveFilters = useMemo2(() => {
241
- return filters.search.length > 0 || filters.tags.length > 0 || filters.stability.length > 0 || filters.domain.length > 0;
242
- }, [filters]);
243
- const filteredFeatures = useMemo2(() => {
244
- return features.filter((feature) => {
245
- if (filters.search) {
246
- const searchLower = filters.search.toLowerCase();
247
- const title = feature.meta.title ?? "";
248
- const matches = title.toLowerCase().includes(searchLower) || feature.meta.description?.toLowerCase().includes(searchLower) || feature.meta.key.toLowerCase().includes(searchLower);
249
- if (!matches)
250
- return false;
251
- }
252
- if (filters.tags.length > 0) {
253
- const hasTag = filters.tags.some((tag) => feature.meta.tags?.includes(tag));
254
- if (!hasTag)
255
- return false;
256
- }
257
- if (filters.stability.length > 0) {
258
- if (!filters.stability.includes(feature.meta.stability ?? "unknown"))
259
- return false;
260
- }
261
- if (filters.domain.length > 0) {
262
- if (!filters.domain.includes(feature.meta.domain ?? "unknown"))
263
- return false;
264
- }
265
- return true;
266
- });
267
- }, [features, filters]);
268
- return {
269
- filters,
270
- setSearch,
271
- toggleTag,
272
- toggleStability,
273
- toggleDomain,
274
- clearFilters,
275
- filteredFeatures,
276
- hasActiveFilters
277
- };
278
- }
279
-
280
- // src/presentation/features/hooks/useFeatureRegistry.ts
281
- import { useMemo as useMemo3 } from "react";
282
- "use client";
283
- function useFeatureRegistry() {
284
- const registry = useMemo3(() => getContractSpecFeatureRegistry(), []);
285
- return useMemo3(() => {
286
- const features = registry.list();
287
- return {
288
- features,
289
- getFeature: (key) => registry.get(key),
290
- getByTag: (tag) => registry.listByTag(tag),
291
- getByOwner: (owner) => registry.listByOwner(owner),
292
- getUniqueTags: () => registry.getUniqueTags(),
293
- getUniqueDomains: () => {
294
- const domains = new Set;
295
- for (const f of features) {
296
- if (f.meta.domain)
297
- domains.add(f.meta.domain);
298
- }
299
- return [...domains].sort();
300
- },
301
- getUniqueStabilities: () => {
302
- const stabilities = new Set;
303
- for (const f of features) {
304
- if (f.meta.stability)
305
- stabilities.add(f.meta.stability);
306
- }
307
- return [...stabilities].sort();
308
- }
309
- };
310
- }, [registry]);
311
- }
312
-
313
- // src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx
314
- import { StatusChip } from "@contractspec/lib.design-system";
315
- import { HStack } from "@contractspec/lib.ui-kit-web/ui/stack";
316
- import {
317
- ArrowRight,
318
- Layout as Layout2,
319
- Radio,
320
- Shield as Shield2,
321
- Tag,
322
- Users,
323
- Zap
324
- } from "lucide-react";
325
- import { jsx as jsx2, jsxs, Fragment } from "react/jsx-runtime";
326
- "use client";
327
- function FeatureHoverPreview({ feature }) {
328
- const { meta, operations, events, presentations, capabilities } = feature;
329
- const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
330
- return /* @__PURE__ */ jsxs(Fragment, {
331
- children: [
332
- meta.description && /* @__PURE__ */ jsx2("p", {
333
- className: "text-muted-foreground text-sm leading-relaxed",
334
- children: meta.description
335
- }),
336
- /* @__PURE__ */ jsxs(HStack, {
337
- gap: "md",
338
- className: "py-2",
339
- children: [
340
- operations?.length ? /* @__PURE__ */ jsxs("div", {
341
- className: "flex items-center gap-1.5 text-sm",
342
- children: [
343
- /* @__PURE__ */ jsx2(Zap, {
344
- className: "h-4 w-4 text-amber-500"
345
- }),
346
- /* @__PURE__ */ jsx2("span", {
347
- className: "font-medium",
348
- children: operations.length
349
- }),
350
- /* @__PURE__ */ jsx2("span", {
351
- className: "text-muted-foreground",
352
- children: "ops"
353
- })
354
- ]
355
- }) : null,
356
- events?.length ? /* @__PURE__ */ jsxs("div", {
357
- className: "flex items-center gap-1.5 text-sm",
358
- children: [
359
- /* @__PURE__ */ jsx2(Radio, {
360
- className: "h-4 w-4 text-blue-500"
361
- }),
362
- /* @__PURE__ */ jsx2("span", {
363
- className: "font-medium",
364
- children: events.length
365
- }),
366
- /* @__PURE__ */ jsx2("span", {
367
- className: "text-muted-foreground",
368
- children: "events"
369
- })
370
- ]
371
- }) : null,
372
- presentations?.length ? /* @__PURE__ */ jsxs("div", {
373
- className: "flex items-center gap-1.5 text-sm",
374
- children: [
375
- /* @__PURE__ */ jsx2(Layout2, {
376
- className: "h-4 w-4 text-purple-500"
377
- }),
378
- /* @__PURE__ */ jsx2("span", {
379
- className: "font-medium",
380
- children: presentations.length
381
- }),
382
- /* @__PURE__ */ jsx2("span", {
383
- className: "text-muted-foreground",
384
- children: "views"
385
- })
386
- ]
387
- }) : null
388
- ]
389
- }),
390
- hasCapabilities && /* @__PURE__ */ jsxs("div", {
391
- className: "space-y-1.5 border-border/50 border-t pt-1",
392
- children: [
393
- capabilities?.provides?.length ? /* @__PURE__ */ jsxs(HStack, {
394
- gap: "xs",
395
- wrap: "wrap",
396
- className: "items-start",
397
- children: [
398
- /* @__PURE__ */ jsx2(Shield2, {
399
- className: "mt-0.5 h-3.5 w-3.5 text-emerald-500"
400
- }),
401
- /* @__PURE__ */ jsx2("span", {
402
- className: "text-muted-foreground text-xs",
403
- children: "Provides:"
404
- }),
405
- capabilities.provides.slice(0, 2).map((cap) => /* @__PURE__ */ jsx2(StatusChip, {
406
- tone: "success",
407
- label: cap.key,
408
- size: "sm"
409
- }, cap.key)),
410
- capabilities.provides.length > 2 && /* @__PURE__ */ jsxs("span", {
411
- className: "text-muted-foreground text-xs",
412
- children: [
413
- "+",
414
- capabilities.provides.length - 2
415
- ]
416
- })
417
- ]
418
- }) : null,
419
- capabilities?.requires?.length ? /* @__PURE__ */ jsxs(HStack, {
420
- gap: "xs",
421
- wrap: "wrap",
422
- className: "items-start",
423
- children: [
424
- /* @__PURE__ */ jsx2(ArrowRight, {
425
- className: "mt-0.5 h-3.5 w-3.5 text-blue-500"
426
- }),
427
- /* @__PURE__ */ jsx2("span", {
428
- className: "text-muted-foreground text-xs",
429
- children: "Requires:"
430
- }),
431
- capabilities.requires.slice(0, 2).map((req) => /* @__PURE__ */ jsx2(StatusChip, {
432
- tone: "info",
433
- label: req.key,
434
- size: "sm"
435
- }, req.key)),
436
- capabilities.requires.length > 2 && /* @__PURE__ */ jsxs("span", {
437
- className: "text-muted-foreground text-xs",
438
- children: [
439
- "+",
440
- capabilities.requires.length - 2
441
- ]
442
- })
443
- ]
444
- }) : null
445
- ]
446
- }),
447
- meta.tags?.length ? /* @__PURE__ */ jsxs(HStack, {
448
- gap: "xs",
449
- wrap: "wrap",
450
- className: "items-center border-border/50 border-t pt-1",
451
- children: [
452
- /* @__PURE__ */ jsx2(Tag, {
453
- className: "h-3.5 w-3.5 text-muted-foreground"
454
- }),
455
- meta.tags.slice(0, 4).map((tag) => /* @__PURE__ */ jsxs("span", {
456
- className: "rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",
457
- children: [
458
- "#",
459
- tag
460
- ]
461
- }, tag)),
462
- meta.tags.length > 4 && /* @__PURE__ */ jsxs("span", {
463
- className: "text-muted-foreground text-xs",
464
- children: [
465
- "+",
466
- meta.tags.length - 4
467
- ]
468
- })
469
- ]
470
- }) : null,
471
- meta.owners?.length ? /* @__PURE__ */ jsxs(HStack, {
472
- gap: "xs",
473
- className: "items-center text-muted-foreground text-xs",
474
- children: [
475
- /* @__PURE__ */ jsx2(Users, {
476
- className: "h-3.5 w-3.5"
477
- }),
478
- /* @__PURE__ */ jsx2("span", {
479
- children: meta.owners.join(", ")
480
- })
481
- ]
482
- }) : null
483
- ]
484
- });
485
- }
486
- // src/presentation/features/molecules/FeatureCard/FeatureCard.tsx
487
- import { EntityCard, StatusChip as StatusChip2 } from "@contractspec/lib.design-system";
488
- import { HStack as HStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
489
- import { Layout as Layout3, Radio as Radio2, Shield as Shield3, Zap as Zap2 } from "lucide-react";
490
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
491
- "use client";
492
- var stabilityTone = {
493
- stable: "success",
494
- beta: "warning",
495
- experimental: "info",
496
- deprecated: "danger"
497
- };
498
- function FeatureCard({
499
- feature,
500
- onSelect,
501
- className
502
- }) {
503
- const { meta, operations, events, presentations, capabilities } = feature;
504
- const tone = stabilityTone[meta.stability] ?? "neutral";
505
- const iconTone = getFeatureIconTone(meta.stability);
506
- const emphasis = meta.stability === "stable" ? "strong" : "default";
507
- const handleClick = onSelect ? () => onSelect(feature) : undefined;
508
- const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
509
- return /* @__PURE__ */ jsx3(EntityCard, {
510
- cardTitle: meta.title,
511
- cardSubtitle: meta.key,
512
- className,
513
- onClick: handleClick,
514
- emphasis,
515
- icon: /* @__PURE__ */ jsx3(FeatureIcon, {
516
- domain: meta.domain,
517
- tags: meta.tags,
518
- stability: meta.stability,
519
- size: "md"
520
- }),
521
- iconTone,
522
- chips: /* @__PURE__ */ jsx3(StatusChip2, {
523
- tone,
524
- label: meta.stability ?? "unknown",
525
- size: "sm"
526
- }),
527
- meta: meta.description ? /* @__PURE__ */ jsx3("span", {
528
- className: "line-clamp-2 text-muted-foreground text-sm",
529
- children: meta.description
530
- }) : undefined,
531
- preview: /* @__PURE__ */ jsx3(FeatureHoverPreview, {
532
- feature
533
- }),
534
- footer: /* @__PURE__ */ jsxs2(HStack2, {
535
- gap: "md",
536
- className: "w-full justify-between text-muted-foreground text-xs",
537
- children: [
538
- /* @__PURE__ */ jsxs2(HStack2, {
539
- gap: "sm",
540
- children: [
541
- operations?.length ? /* @__PURE__ */ jsxs2("span", {
542
- className: "flex items-center gap-1",
543
- children: [
544
- /* @__PURE__ */ jsx3(Zap2, {
545
- className: "h-3 w-3 text-amber-500"
546
- }),
547
- operations.length
548
- ]
549
- }) : null,
550
- events?.length ? /* @__PURE__ */ jsxs2("span", {
551
- className: "flex items-center gap-1",
552
- children: [
553
- /* @__PURE__ */ jsx3(Radio2, {
554
- className: "h-3 w-3 text-blue-500"
555
- }),
556
- events.length
557
- ]
558
- }) : null,
559
- presentations?.length ? /* @__PURE__ */ jsxs2("span", {
560
- className: "flex items-center gap-1",
561
- children: [
562
- /* @__PURE__ */ jsx3(Layout3, {
563
- className: "h-3 w-3 text-purple-500"
564
- }),
565
- presentations.length
566
- ]
567
- }) : null
568
- ]
569
- }),
570
- hasCapabilities && /* @__PURE__ */ jsxs2("span", {
571
- className: "flex items-center gap-1",
572
- children: [
573
- /* @__PURE__ */ jsx3(Shield3, {
574
- className: "h-3 w-3 text-emerald-500"
575
- }),
576
- (capabilities?.provides?.length ?? 0) + (capabilities?.requires?.length ?? 0)
577
- ]
578
- })
579
- ]
580
- })
581
- });
582
- }
583
- // src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx
584
- import { StatusChip as StatusChip3 } from "@contractspec/lib.design-system";
585
- import { HStack as HStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
586
- import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
587
- import { Boxes as Boxes2, ChevronDown } from "lucide-react";
588
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
589
- "use client";
590
- function FeatureCategoryHeader({
591
- title,
592
- count,
593
- icon,
594
- isCollapsed = false,
595
- onToggle,
596
- className
597
- }) {
598
- return /* @__PURE__ */ jsxs3("button", {
599
- type: "button",
600
- onClick: onToggle,
601
- className: cn2("flex w-full items-center justify-between rounded-lg px-4 py-3", "bg-muted/30 transition-colors hover:bg-muted/50", "group cursor-pointer", className),
602
- children: [
603
- /* @__PURE__ */ jsxs3(HStack3, {
604
- gap: "sm",
605
- className: "items-center",
606
- children: [
607
- /* @__PURE__ */ jsx4("div", {
608
- className: "text-muted-foreground transition-colors group-hover:text-foreground",
609
- children: icon || /* @__PURE__ */ jsx4(Boxes2, {
610
- className: "h-5 w-5"
611
- })
612
- }),
613
- /* @__PURE__ */ jsx4("span", {
614
- className: "font-semibold text-lg capitalize transition-colors group-hover:text-primary",
615
- children: title
616
- }),
617
- /* @__PURE__ */ jsx4(StatusChip3, {
618
- tone: "neutral",
619
- label: `${count} ${count === 1 ? "feature" : "features"}`,
620
- size: "sm"
621
- })
622
- ]
623
- }),
624
- /* @__PURE__ */ jsx4(ChevronDown, {
625
- className: cn2("h-5 w-5 text-muted-foreground transition-transform duration-200", isCollapsed && "-rotate-90")
626
- })
627
- ]
628
- });
629
- }
630
- // src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx
631
- import { Button, Input } from "@contractspec/lib.design-system";
632
- import { HStack as HStack4, VStack } from "@contractspec/lib.ui-kit-web/ui/stack";
633
- import { cn as cn3 } from "@contractspec/lib.ui-kit-web/ui/utils";
634
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
635
- "use client";
636
- function FeatureFiltersBar({
637
- uniqueTags,
638
- uniqueStabilities,
639
- filters,
640
- setSearch,
641
- toggleTag,
642
- toggleStability,
643
- clearFilters,
644
- hasActiveFilters,
645
- className
646
- }) {
647
- return /* @__PURE__ */ jsxs4(VStack, {
648
- gap: "md",
649
- className: cn3("w-full", className),
650
- children: [
651
- /* @__PURE__ */ jsxs4(HStack4, {
652
- gap: "md",
653
- justify: "between",
654
- className: "w-full",
655
- children: [
656
- /* @__PURE__ */ jsx5(Input, {
657
- placeholder: "Search features...",
658
- value: filters.search,
659
- onChange: (e) => setSearch(e.target.value),
660
- className: "max-w-md",
661
- "aria-label": "Search features"
662
- }),
663
- hasActiveFilters && /* @__PURE__ */ jsx5(Button, {
664
- variant: "ghost",
665
- size: "sm",
666
- onClick: clearFilters,
667
- children: "Clear filters"
668
- })
669
- ]
670
- }),
671
- uniqueStabilities.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
672
- gap: "xs",
673
- wrap: "wrap",
674
- children: [
675
- /* @__PURE__ */ jsx5("span", {
676
- className: "text-muted-foreground text-sm",
677
- children: "Stability:"
678
- }),
679
- uniqueStabilities.map((stability) => /* @__PURE__ */ jsx5(Button, {
680
- variant: filters.stability.includes(stability) ? "default" : "outline",
681
- size: "sm",
682
- onClick: () => toggleStability(stability),
683
- "aria-pressed": filters.stability.includes(stability),
684
- children: stability
685
- }, stability))
686
- ]
687
- }),
688
- uniqueTags.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
689
- gap: "xs",
690
- wrap: "wrap",
691
- children: [
692
- /* @__PURE__ */ jsx5("span", {
693
- className: "text-muted-foreground text-sm",
694
- children: "Tags:"
695
- }),
696
- uniqueTags.slice(0, 10).map((tag) => /* @__PURE__ */ jsxs4(Button, {
697
- variant: filters.tags.includes(tag) ? "default" : "outline",
698
- size: "sm",
699
- onClick: () => toggleTag(tag),
700
- "aria-pressed": filters.tags.includes(tag),
701
- children: [
702
- "#",
703
- tag
704
- ]
705
- }, tag)),
706
- uniqueTags.length > 10 && /* @__PURE__ */ jsxs4("span", {
707
- className: "text-muted-foreground text-sm",
708
- children: [
709
- "+",
710
- uniqueTags.length - 10,
711
- " more"
712
- ]
713
- })
714
- ]
715
- })
716
- ]
717
- });
718
- }
719
- // src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx
720
- import {
721
- Button as Button2,
722
- EmptyState,
723
- PageHeaderResponsive,
724
- StatusChip as StatusChip4
725
- } from "@contractspec/lib.design-system";
726
- import { HStack as HStack5, VStack as VStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
727
- import { cn as cn4 } from "@contractspec/lib.ui-kit-web/ui/utils";
728
- import { LayoutGrid, List, Star } from "lucide-react";
729
- import * as React2 from "react";
730
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
731
- "use client";
732
- function groupFeaturesByDomain(features) {
733
- const groups = {};
734
- for (const feature of features) {
735
- const domain = feature.meta.domain || "Other";
736
- if (!groups[domain])
737
- groups[domain] = [];
738
- groups[domain].push(feature);
739
- }
740
- return groups;
741
- }
742
- function groupFeaturesByStability(features) {
743
- const order = ["stable", "beta", "experimental", "deprecated", "unknown"];
744
- const groups = {};
745
- for (const feature of features) {
746
- const stability = feature.meta.stability || "unknown";
747
- if (!groups[stability])
748
- groups[stability] = [];
749
- groups[stability].push(feature);
750
- }
751
- const sorted = {};
752
- for (const key of order) {
753
- if (groups[key])
754
- sorted[key] = groups[key];
755
- }
756
- return sorted;
757
- }
758
- function FeatureDiscovery({
759
- onSelectFeature,
760
- className,
761
- defaultViewMode = "grid",
762
- groupBy = "domain",
763
- showFeatured = true
764
- }) {
765
- const { features, getUniqueTags, getUniqueStabilities } = useFeatureRegistry();
766
- const {
767
- filters,
768
- setSearch,
769
- toggleTag,
770
- toggleStability,
771
- clearFilters,
772
- filteredFeatures,
773
- hasActiveFilters
774
- } = useFeatureFilters(features);
775
- const uniqueTags = getUniqueTags();
776
- const uniqueStabilities = getUniqueStabilities();
777
- const [viewMode, setViewMode] = React2.useState(defaultViewMode);
778
- const [collapsedGroups, setCollapsedGroups] = React2.useState(new Set);
779
- const featuredFeatures = React2.useMemo(() => filteredFeatures.filter((f) => f.meta.stability === "stable"), [filteredFeatures]);
780
- const nonFeaturedFeatures = React2.useMemo(() => showFeatured ? filteredFeatures.filter((f) => f.meta.stability !== "stable") : filteredFeatures, [filteredFeatures, showFeatured]);
781
- const groupedFeatures = React2.useMemo(() => {
782
- if (groupBy === "none")
783
- return null;
784
- if (groupBy === "domain")
785
- return groupFeaturesByDomain(nonFeaturedFeatures);
786
- return groupFeaturesByStability(nonFeaturedFeatures);
787
- }, [nonFeaturedFeatures, groupBy]);
788
- const toggleGroup = (group) => {
789
- setCollapsedGroups((prev) => {
790
- const next = new Set(prev);
791
- if (next.has(group)) {
792
- next.delete(group);
793
- } else {
794
- next.add(group);
795
- }
796
- return next;
797
- });
798
- };
799
- const gridClasses = viewMode === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "flex flex-col gap-3";
800
- const renderFeatureCards = (featureList) => /* @__PURE__ */ jsx6("div", {
801
- className: gridClasses,
802
- children: featureList.map((feature) => /* @__PURE__ */ jsx6(FeatureCard, {
803
- feature,
804
- onSelect: onSelectFeature
805
- }, feature.meta.key))
806
- });
807
- return /* @__PURE__ */ jsxs5(VStack2, {
808
- gap: "lg",
809
- className: cn4("w-full p-6", className),
810
- children: [
811
- /* @__PURE__ */ jsxs5("div", {
812
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
813
- children: [
814
- /* @__PURE__ */ jsx6(PageHeaderResponsive, {
815
- title: "Feature Discovery",
816
- subtitle: `Browse ${features.length} available ContractSpec features`
817
- }),
818
- /* @__PURE__ */ jsxs5(HStack5, {
819
- gap: "xs",
820
- children: [
821
- /* @__PURE__ */ jsx6("button", {
822
- type: "button",
823
- onClick: () => setViewMode("grid"),
824
- className: cn4("rounded-md p-2 transition-colors", viewMode === "grid" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
825
- "aria-label": "Grid view",
826
- children: /* @__PURE__ */ jsx6(LayoutGrid, {
827
- className: "h-4 w-4"
828
- })
829
- }),
830
- /* @__PURE__ */ jsx6("button", {
831
- type: "button",
832
- onClick: () => setViewMode("list"),
833
- className: cn4("rounded-md p-2 transition-colors", viewMode === "list" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
834
- "aria-label": "List view",
835
- children: /* @__PURE__ */ jsx6(List, {
836
- className: "h-4 w-4"
837
- })
838
- })
839
- ]
840
- })
841
- ]
842
- }),
843
- /* @__PURE__ */ jsx6(FeatureFiltersBar, {
844
- uniqueTags,
845
- uniqueStabilities,
846
- filters,
847
- setSearch,
848
- toggleTag,
849
- toggleStability,
850
- clearFilters,
851
- hasActiveFilters
852
- }),
853
- filteredFeatures.length === 0 ? /* @__PURE__ */ jsx6(EmptyState, {
854
- title: "No features found",
855
- description: hasActiveFilters ? "Try adjusting your search or filters" : "No features are registered yet",
856
- primaryAction: hasActiveFilters ? /* @__PURE__ */ jsx6(Button2, {
857
- variant: "outline",
858
- onClick: clearFilters,
859
- children: "Clear filters"
860
- }) : undefined
861
- }) : /* @__PURE__ */ jsxs5(VStack2, {
862
- gap: "lg",
863
- children: [
864
- showFeatured && featuredFeatures.length > 0 && /* @__PURE__ */ jsxs5(VStack2, {
865
- gap: "sm",
866
- children: [
867
- /* @__PURE__ */ jsxs5(HStack5, {
868
- gap: "sm",
869
- className: "items-center",
870
- children: [
871
- /* @__PURE__ */ jsx6(Star, {
872
- className: "h-5 w-5 fill-amber-500 text-amber-500"
873
- }),
874
- /* @__PURE__ */ jsx6("span", {
875
- className: "font-semibold text-lg",
876
- children: "Featured"
877
- }),
878
- /* @__PURE__ */ jsx6(StatusChip4, {
879
- tone: "success",
880
- label: `${featuredFeatures.length} stable`,
881
- size: "sm"
882
- })
883
- ]
884
- }),
885
- renderFeatureCards(featuredFeatures)
886
- ]
887
- }),
888
- groupedFeatures ? /* @__PURE__ */ jsx6(VStack2, {
889
- gap: "md",
890
- children: Object.entries(groupedFeatures).map(([group, groupFeatures]) => /* @__PURE__ */ jsxs5(VStack2, {
891
- gap: "sm",
892
- children: [
893
- /* @__PURE__ */ jsx6(FeatureCategoryHeader, {
894
- title: group,
895
- count: groupFeatures.length,
896
- isCollapsed: collapsedGroups.has(group),
897
- onToggle: () => toggleGroup(group)
898
- }),
899
- !collapsedGroups.has(group) && renderFeatureCards(groupFeatures)
900
- ]
901
- }, group))
902
- }) : renderFeatureCards(nonFeaturedFeatures)
903
- ]
904
- })
905
- ]
906
- });
907
- }
908
- export {
909
- FeatureDiscovery
910
- };
2
+ var e={meta:{key:"contractspec.docs",version:"1.0.0",title:"Documentation",description:"Comprehensive documentation system for ContractSpec",domain:"platform",owners:["@platform.docs"],tags:["documentation","guides","api-reference"],stability:"stable"},operations:[{key:"docs_search",version:"1.0.0"},{key:"docs.navigate",version:"1.0.0"}],events:[{key:"docs.page_viewed",version:"1.0.0"},{key:"docs.search_performed",version:"1.0.0"}],presentations:[{key:"docs.landing",version:"1.0.0"},{key:"docs.getting-started",version:"1.0.0"},{key:"docs.architecture",version:"1.0.0"}],capabilities:{provides:[{key:"contracts.docs",version:"1.0.0"}],requires:[]}};var JJ={meta:{key:"contractspec.mcp",version:"1.0.0",title:"MCP Integration",description:"Model Context Protocol server for AI agent integration",domain:"platform",owners:["@platform.mcp"],tags:["mcp","ai-agents","tooling"],stability:"beta"},operations:[{key:"mcp.tool.register",version:"1.0.0"},{key:"mcp.resource.register",version:"1.0.0"},{key:"mcp.prompt.register",version:"1.0.0"}],events:[{key:"mcp.tool_invoked",version:"1.0.0"},{key:"mcp.resource_accessed",version:"1.0.0"}],presentations:[],capabilities:{provides:[{key:"contracts.mcp",version:"1.0.0"}],requires:[{key:"contracts.operations",version:"1.0.0"}]}};var KJ={meta:{key:"contractspec.presentations",version:"1.0.0",title:"Presentation Runtime",description:"Cross-platform rendering of contract-driven UI",domain:"platform",owners:["@platform.presentations"],tags:["presentations","ui","rendering","cross-platform"],stability:"beta"},operations:[{key:"presentation.render",version:"1.0.0"},{key:"presentation.transform",version:"1.0.0"}],events:[{key:"presentation.rendered",version:"1.0.0"},{key:"presentation.transformed",version:"1.0.0"}],presentations:[{key:"form.standard",version:"1.0.0"},{key:"list.standard",version:"1.0.0"},{key:"detail.standard",version:"1.0.0"}],capabilities:{provides:[{key:"contracts.presentations",version:"1.0.0"}],requires:[]}};import{AppConfigFeature as LJ}from"@contractspec/lib.contracts-spec/app-config";import{FeatureRegistry as HJ}from"@contractspec/lib.contracts-spec/features";function IJ(){let Q=new HJ;return Q.register(e),Q.register(JJ),Q.register(KJ),Q.register(LJ),Q}var S=null;function QJ(){if(!S)S=IJ();return S}function NK(){S=null}import{cn as MJ}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as qJ,Database as x,FileText as m,Globe as XJ,Layout as M,MessageSquare as TJ,Settings as wJ,Shield as d,Workflow as f}from"lucide-react";import*as YJ from"react";import{jsx as vJ}from"react/jsx-runtime";var CJ={platform:wJ,documentation:m,docs:m,integration:f,api:XJ,security:d,data:x,messaging:TJ,ui:M,presentation:M},kJ={documentation:m,guides:m,"api-reference":XJ,presentations:M,ui:M,rendering:M,mcp:f,integration:f,security:d,auth:d,data:x,storage:x},_J={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"},hJ={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};function p({domain:Q,tags:J=[],stability:K,icon:X,size:Z="md",className:Y}){let R=YJ.useMemo(()=>{if(X)return X;if(Q){let z=CJ[Q.toLowerCase()];if(z)return z}for(let z of J){let _=kJ[z.toLowerCase()];if(_)return _}return qJ},[Q,J,X]),E=K?_J[K]||"primary":"primary",A={success:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",info:"text-blue-600 dark:text-blue-400",danger:"text-red-600 dark:text-red-400",primary:"text-primary"};return vJ(R,{className:MJ(hJ[Z],A[E],Y)})}function g(Q){if(!Q)return"primary";return _J[Q]||"primary"}import{useCallback as q,useMemo as $J,useState as SJ}from"react";var ZJ={search:"",tags:[],stability:[],domain:[]};function zJ(Q){let[J,K]=SJ(ZJ),X=q((_)=>{K(($)=>({...$,search:_}))},[]),Z=q((_)=>{K(($)=>({...$,tags:$.tags.includes(_)?$.tags.filter((G)=>G!==_):[...$.tags,_]}))},[]),Y=q((_)=>{K(($)=>({...$,stability:$.stability.includes(_)?$.stability.filter((G)=>G!==_):[...$.stability,_]}))},[]),R=q((_)=>{K(($)=>({...$,domain:$.domain.includes(_)?$.domain.filter((G)=>G!==_):[...$.domain,_]}))},[]),E=q(()=>K(ZJ),[]),A=$J(()=>{return J.search.length>0||J.tags.length>0||J.stability.length>0||J.domain.length>0},[J]),z=$J(()=>{return Q.filter((_)=>{if(J.search){let $=J.search.toLowerCase();if(!((_.meta.title??"").toLowerCase().includes($)||_.meta.description?.toLowerCase().includes($)||_.meta.key.toLowerCase().includes($)))return!1}if(J.tags.length>0){if(!J.tags.some((G)=>_.meta.tags?.includes(G)))return!1}if(J.stability.length>0){if(!J.stability.includes(_.meta.stability??"unknown"))return!1}if(J.domain.length>0){if(!J.domain.includes(_.meta.domain??"unknown"))return!1}return!0})},[Q,J]);return{filters:J,setSearch:X,toggleTag:Z,toggleStability:Y,toggleDomain:R,clearFilters:E,filteredFeatures:z,hasActiveFilters:A}}import{useMemo as EJ}from"react";function WJ(){let Q=EJ(()=>QJ(),[]);return EJ(()=>{let J=Q.list();return{features:J,getFeature:(K)=>Q.get(K),getByTag:(K)=>Q.listByTag(K),getByOwner:(K)=>Q.listByOwner(K),getUniqueTags:()=>Q.getUniqueTags(),getUniqueDomains:()=>{let K=new Set;for(let X of J)if(X.meta.domain)K.add(X.meta.domain);return[...K].sort()},getUniqueStabilities:()=>{let K=new Set;for(let X of J)if(X.meta.stability)K.add(X.meta.stability);return[...K].sort()}}},[Q])}import{StatusChip as UJ}from"@contractspec/lib.design-system";import{HStack as T}from"@contractspec/lib.ui-kit-web/ui/stack";import{ArrowRight as mJ,Layout as yJ,Radio as FJ,Shield as bJ,Tag as jJ,Users as xJ,Zap as dJ}from"lucide-react";import{jsx as W,jsxs as P,Fragment as fJ}from"react/jsx-runtime";function c({feature:Q}){let{meta:J,operations:K,events:X,presentations:Z,capabilities:Y}=Q,R=Y?.provides?.length||Y?.requires?.length;return P(fJ,{children:[J.description&&W("p",{className:"text-muted-foreground text-sm leading-relaxed",children:J.description}),P(T,{gap:"md",className:"py-2",children:[K?.length?P("div",{className:"flex items-center gap-1.5 text-sm",children:[W(dJ,{className:"h-4 w-4 text-amber-500"}),W("span",{className:"font-medium",children:K.length}),W("span",{className:"text-muted-foreground",children:"ops"})]}):null,X?.length?P("div",{className:"flex items-center gap-1.5 text-sm",children:[W(FJ,{className:"h-4 w-4 text-blue-500"}),W("span",{className:"font-medium",children:X.length}),W("span",{className:"text-muted-foreground",children:"events"})]}):null,Z?.length?P("div",{className:"flex items-center gap-1.5 text-sm",children:[W(yJ,{className:"h-4 w-4 text-purple-500"}),W("span",{className:"font-medium",children:Z.length}),W("span",{className:"text-muted-foreground",children:"views"})]}):null]}),R&&P("div",{className:"space-y-1.5 border-border/50 border-t pt-1",children:[Y?.provides?.length?P(T,{gap:"xs",wrap:"wrap",className:"items-start",children:[W(bJ,{className:"mt-0.5 h-3.5 w-3.5 text-emerald-500"}),W("span",{className:"text-muted-foreground text-xs",children:"Provides:"}),Y.provides.slice(0,2).map((E)=>W(UJ,{tone:"success",label:E.key,size:"sm"},E.key)),Y.provides.length>2&&P("span",{className:"text-muted-foreground text-xs",children:["+",Y.provides.length-2]})]}):null,Y?.requires?.length?P(T,{gap:"xs",wrap:"wrap",className:"items-start",children:[W(mJ,{className:"mt-0.5 h-3.5 w-3.5 text-blue-500"}),W("span",{className:"text-muted-foreground text-xs",children:"Requires:"}),Y.requires.slice(0,2).map((E)=>W(UJ,{tone:"info",label:E.key,size:"sm"},E.key)),Y.requires.length>2&&P("span",{className:"text-muted-foreground text-xs",children:["+",Y.requires.length-2]})]}):null]}),J.tags?.length?P(T,{gap:"xs",wrap:"wrap",className:"items-center border-border/50 border-t pt-1",children:[W(jJ,{className:"h-3.5 w-3.5 text-muted-foreground"}),J.tags.slice(0,4).map((E)=>P("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",children:["#",E]},E)),J.tags.length>4&&P("span",{className:"text-muted-foreground text-xs",children:["+",J.tags.length-4]})]}):null,J.owners?.length?P(T,{gap:"xs",className:"items-center text-muted-foreground text-xs",children:[W(xJ,{className:"h-3.5 w-3.5"}),W("span",{children:J.owners.join(", ")})]}):null]})}import{EntityCard as pJ,StatusChip as gJ}from"@contractspec/lib.design-system";import{HStack as OJ}from"@contractspec/lib.ui-kit-web/ui/stack";import{Layout as cJ,Radio as nJ,Shield as oJ,Zap as lJ}from"lucide-react";import{jsx as D,jsxs as H}from"react/jsx-runtime";var uJ={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function n({feature:Q,onSelect:J,className:K}){let{meta:X,operations:Z,events:Y,presentations:R,capabilities:E}=Q,A=uJ[X.stability]??"neutral",z=g(X.stability),_=X.stability==="stable"?"strong":"default",$=J?()=>J(Q):void 0,G=E?.provides?.length||E?.requires?.length;return D(pJ,{cardTitle:X.title,cardSubtitle:X.key,className:K,onClick:$,emphasis:_,icon:D(p,{domain:X.domain,tags:X.tags,stability:X.stability,size:"md"}),iconTone:z,chips:D(gJ,{tone:A,label:X.stability??"unknown",size:"sm"}),meta:X.description?D("span",{className:"line-clamp-2 text-muted-foreground text-sm",children:X.description}):void 0,preview:D(c,{feature:Q}),footer:H(OJ,{gap:"md",className:"w-full justify-between text-muted-foreground text-xs",children:[H(OJ,{gap:"sm",children:[Z?.length?H("span",{className:"flex items-center gap-1",children:[D(lJ,{className:"h-3 w-3 text-amber-500"}),Z.length]}):null,Y?.length?H("span",{className:"flex items-center gap-1",children:[D(nJ,{className:"h-3 w-3 text-blue-500"}),Y.length]}):null,R?.length?H("span",{className:"flex items-center gap-1",children:[D(cJ,{className:"h-3 w-3 text-purple-500"}),R.length]}):null]}),G&&H("span",{className:"flex items-center gap-1",children:[D(oJ,{className:"h-3 w-3 text-emerald-500"}),(E?.provides?.length??0)+(E?.requires?.length??0)]})]})})}import{StatusChip as rJ}from"@contractspec/lib.design-system";import{HStack as iJ}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as PJ}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as aJ,ChevronDown as sJ}from"lucide-react";import{jsx as w,jsxs as GJ}from"react/jsx-runtime";function o({title:Q,count:J,icon:K,isCollapsed:X=!1,onToggle:Z,className:Y}){return GJ("button",{type:"button",onClick:Z,className:PJ("flex w-full items-center justify-between rounded-lg px-4 py-3","bg-muted/30 transition-colors hover:bg-muted/50","group cursor-pointer",Y),children:[GJ(iJ,{gap:"sm",className:"items-center",children:[w("div",{className:"text-muted-foreground transition-colors group-hover:text-foreground",children:K||w(aJ,{className:"h-5 w-5"})}),w("span",{className:"font-semibold text-lg capitalize transition-colors group-hover:text-primary",children:Q}),w(rJ,{tone:"neutral",label:`${J} ${J===1?"feature":"features"}`,size:"sm"})]}),w(sJ,{className:PJ("h-5 w-5 text-muted-foreground transition-transform duration-200",X&&"-rotate-90")})]})}import{Button as l,Input as tJ}from"@contractspec/lib.design-system";import{HStack as u,VStack as eJ}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as JK}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as C,jsxs as I}from"react/jsx-runtime";function r({uniqueTags:Q,uniqueStabilities:J,filters:K,setSearch:X,toggleTag:Z,toggleStability:Y,clearFilters:R,hasActiveFilters:E,className:A}){return I(eJ,{gap:"md",className:JK("w-full",A),children:[I(u,{gap:"md",justify:"between",className:"w-full",children:[C(tJ,{placeholder:"Search features...",value:K.search,onChange:(z)=>X(z.target.value),className:"max-w-md","aria-label":"Search features"}),E&&C(l,{variant:"ghost",size:"sm",onClick:R,children:"Clear filters"})]}),J.length>0&&I(u,{gap:"xs",wrap:"wrap",children:[C("span",{className:"text-muted-foreground text-sm",children:"Stability:"}),J.map((z)=>C(l,{variant:K.stability.includes(z)?"default":"outline",size:"sm",onClick:()=>Y(z),"aria-pressed":K.stability.includes(z),children:z},z))]}),Q.length>0&&I(u,{gap:"xs",wrap:"wrap",children:[C("span",{className:"text-muted-foreground text-sm",children:"Tags:"}),Q.slice(0,10).map((z)=>I(l,{variant:K.tags.includes(z)?"default":"outline",size:"sm",onClick:()=>Z(z),"aria-pressed":K.tags.includes(z),children:["#",z]},z)),Q.length>10&&I("span",{className:"text-muted-foreground text-sm",children:["+",Q.length-10," more"]})]})]})}import{Button as KK,EmptyState as QK,PageHeaderResponsive as XK,StatusChip as YK}from"@contractspec/lib.design-system";import{HStack as RJ,VStack as k}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as i}from"@contractspec/lib.ui-kit-web/ui/utils";import{LayoutGrid as _K,List as $K,Star as ZK}from"lucide-react";import*as L from"react";import{jsx as O,jsxs as B}from"react/jsx-runtime";function zK(Q){let J={};for(let K of Q){let X=K.meta.domain||"Other";if(!J[X])J[X]=[];J[X].push(K)}return J}function EK(Q){let J=["stable","beta","experimental","deprecated","unknown"],K={};for(let Z of Q){let Y=Z.meta.stability||"unknown";if(!K[Y])K[Y]=[];K[Y].push(Z)}let X={};for(let Z of J)if(K[Z])X[Z]=K[Z];return X}function DQ({onSelectFeature:Q,className:J,defaultViewMode:K="grid",groupBy:X="domain",showFeatured:Z=!0}){let{features:Y,getUniqueTags:R,getUniqueStabilities:E}=WJ(),{filters:A,setSearch:z,toggleTag:_,toggleStability:$,clearFilters:G,filteredFeatures:N,hasActiveFilters:y}=zJ(Y),AJ=R(),DJ=E(),[F,a]=L.useState(K),[s,NJ]=L.useState(new Set),b=L.useMemo(()=>N.filter((U)=>U.meta.stability==="stable"),[N]),h=L.useMemo(()=>Z?N.filter((U)=>U.meta.stability!=="stable"):N,[N,Z]),t=L.useMemo(()=>{if(X==="none")return null;if(X==="domain")return zK(h);return EK(h)},[h,X]),VJ=(U)=>{NJ((V)=>{let v=new Set(V);if(v.has(U))v.delete(U);else v.add(U);return v})},BJ=F==="grid"?"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3":"flex flex-col gap-3",j=(U)=>O("div",{className:BJ,children:U.map((V)=>O(n,{feature:V,onSelect:Q},V.meta.key))});return B(k,{gap:"lg",className:i("w-full p-6",J),children:[B("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[O(XK,{title:"Feature Discovery",subtitle:`Browse ${Y.length} available ContractSpec features`}),B(RJ,{gap:"xs",children:[O("button",{type:"button",onClick:()=>a("grid"),className:i("rounded-md p-2 transition-colors",F==="grid"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"Grid view",children:O(_K,{className:"h-4 w-4"})}),O("button",{type:"button",onClick:()=>a("list"),className:i("rounded-md p-2 transition-colors",F==="list"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"List view",children:O($K,{className:"h-4 w-4"})})]})]}),O(r,{uniqueTags:AJ,uniqueStabilities:DJ,filters:A,setSearch:z,toggleTag:_,toggleStability:$,clearFilters:G,hasActiveFilters:y}),N.length===0?O(QK,{title:"No features found",description:y?"Try adjusting your search or filters":"No features are registered yet",primaryAction:y?O(KK,{variant:"outline",onClick:G,children:"Clear filters"}):void 0}):B(k,{gap:"lg",children:[Z&&b.length>0&&B(k,{gap:"sm",children:[B(RJ,{gap:"sm",className:"items-center",children:[O(ZK,{className:"h-5 w-5 fill-amber-500 text-amber-500"}),O("span",{className:"font-semibold text-lg",children:"Featured"}),O(YK,{tone:"success",label:`${b.length} stable`,size:"sm"})]}),j(b)]}),t?O(k,{gap:"md",children:Object.entries(t).map(([U,V])=>B(k,{gap:"sm",children:[O(o,{title:U,count:V.length,isCollapsed:s.has(U),onToggle:()=>VJ(U)}),!s.has(U)&&j(V)]},U))}):j(h)]})]})}export{DQ as FeatureDiscovery};