@contractspec/bundle.library 3.8.9 → 3.8.11
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.
- package/.turbo/turbo-build.log +606 -594
- package/CHANGELOG.md +68 -0
- package/dist/application/context-storage/index.js +1 -28
- package/dist/application/index.js +13 -2133
- package/dist/application/mcp/cliMcp.js +4 -452
- package/dist/application/mcp/common.js +1 -193
- package/dist/application/mcp/contractsMcp.js +2 -549
- package/dist/application/mcp/contractsMcpResources.js +2 -123
- package/dist/application/mcp/contractsMcpTools.js +1 -199
- package/dist/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/application/mcp/docsMcp.data.js +1 -147
- package/dist/application/mcp/docsMcp.js +6 -1039
- package/dist/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/application/mcp/docsMcp.reference.js +3 -235
- package/dist/application/mcp/docsMcp.resources.js +3 -519
- package/dist/application/mcp/docsMcp.tools.js +3 -518
- package/dist/application/mcp/index.js +13 -2106
- package/dist/application/mcp/internalMcp.js +2 -410
- package/dist/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/application/mcp/providerRankingMcp.js +1 -530
- package/dist/bundles/LibraryBundle.js +1 -138
- package/dist/bundles/index.js +1 -138
- package/dist/components/docs/DocsIndexPage.js +2 -912
- package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/components/docs/advanced/index.js +10 -1055
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/components/docs/architecture/index.js +20 -1340
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/components/docs/comparison/index.js +1 -1510
- package/dist/components/docs/docsManifest.js +1 -611
- package/dist/components/docs/docsManifest.test.d.ts +1 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/components/docs/ecosystem/index.js +23 -569
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/components/docs/examples/index.js +4 -330
- package/dist/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/components/docs/generated/index.js +1 -74
- package/dist/components/docs/generated/loader.js +1 -74
- package/dist/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/components/docs/getting-started/index.js +18 -1869
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
- package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/components/docs/guides/index.d.ts +3 -0
- package/dist/components/docs/guides/index.js +213 -2428
- package/dist/components/docs/index.js +542 -24297
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/components/docs/integrations/index.js +52 -3100
- package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/components/docs/intent/index.js +15 -1135
- package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/components/docs/knowledge/index.js +21 -1730
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/components/docs/libraries/index.js +54 -4147
- package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/components/docs/ops/index.js +3 -202
- package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/components/docs/ops/ops.docs.js +10 -302
- package/dist/components/docs/product/product.docblocks.js +5 -72
- package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/components/docs/reference/index.js +4 -470
- package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/components/docs/safety/index.js +7 -1480
- package/dist/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
- package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
- package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -312
- package/dist/components/docs/specs/index.d.ts +3 -0
- package/dist/components/docs/specs/index.js +109 -1702
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/components/docs/studio/index.js +1 -282
- package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/components/integrations/index.js +2 -600
- package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/components/legal/TermsTemplate.js +1 -941
- package/dist/components/legal/index.js +1 -1963
- package/dist/components/shared/FeatureGateNotice.js +1 -38
- package/dist/components/shared/index.js +1 -38
- package/dist/components/shell/WorkspaceHeader.js +1 -100
- package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/components/shell/index.js +1 -287
- package/dist/components/templates/engine/index.js +1 -39
- package/dist/components/templates/index.js +11 -965
- package/dist/components/templates/messaging/ConversationList.js +2 -83
- package/dist/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/components/templates/messaging/MessageThread.js +3 -83
- package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/components/templates/messaging/index.js +5 -269
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/components/templates/recipes/RecipeList.js +3 -245
- package/dist/components/templates/recipes/index.js +3 -248
- package/dist/components/templates/todos/FilterBar.js +1 -107
- package/dist/components/templates/todos/TaskForm.js +2 -158
- package/dist/components/templates/todos/TaskItem.js +1 -77
- package/dist/components/templates/todos/TaskList.js +5 -449
- package/dist/components/templates/todos/index.js +5 -452
- package/dist/config/contractspec-blueprint.js +1 -123
- package/dist/config/contractspec-branding.js +1 -44
- package/dist/config/contractspec-routes.js +1 -24
- package/dist/config/index.js +1 -126
- package/dist/features/contracts-registry.js +1 -178
- package/dist/features/docs/docs.contracts.js +1 -17
- package/dist/features/docs/index.js +1 -17
- package/dist/features/docs.feature.js +1 -33
- package/dist/features/index.js +1 -315
- package/dist/features/mcp.feature.js +1 -30
- package/dist/features/presentations.feature.js +1 -33
- package/dist/features/registry.js +1 -116
- package/dist/index.js +556 -28580
- package/dist/infrastructure/elysia/index.js +1 -35
- package/dist/infrastructure/elysia/logger.js +1 -35
- package/dist/infrastructure/index.js +1 -35
- package/dist/libs/email/client.js +1 -114
- package/dist/libs/email/contact.js +12 -165
- package/dist/libs/email/newsletter.js +6 -167
- package/dist/libs/email/types.js +0 -2
- package/dist/libs/email/utils.js +2 -8
- package/dist/libs/email/waitlist-application.js +28 -209
- package/dist/libs/email/waitlist.js +6 -167
- package/dist/libs/email.js +46 -363
- package/dist/libs/posthog/client.js +1 -63
- package/dist/libs/posthog/native.js +1 -23
- package/dist/libs/posthog/server.js +1 -13
- package/dist/libs/pricing-examples.js +1 -18
- package/dist/node/application/context-storage/index.js +1 -28
- package/dist/node/application/index.js +13 -2133
- package/dist/node/application/mcp/cliMcp.js +4 -452
- package/dist/node/application/mcp/common.js +1 -193
- package/dist/node/application/mcp/contractsMcp.js +2 -549
- package/dist/node/application/mcp/contractsMcpResources.js +2 -123
- package/dist/node/application/mcp/contractsMcpTools.js +1 -199
- package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/node/application/mcp/docsMcp.data.js +1 -147
- package/dist/node/application/mcp/docsMcp.js +6 -1039
- package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/node/application/mcp/docsMcp.reference.js +3 -235
- package/dist/node/application/mcp/docsMcp.resources.js +3 -519
- package/dist/node/application/mcp/docsMcp.tools.js +3 -518
- package/dist/node/application/mcp/index.js +13 -2106
- package/dist/node/application/mcp/internalMcp.js +2 -410
- package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/node/application/mcp/providerRankingMcp.js +1 -530
- package/dist/node/bundles/LibraryBundle.js +1 -138
- package/dist/node/bundles/index.js +1 -138
- package/dist/node/components/docs/DocsIndexPage.js +2 -912
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/node/components/docs/advanced/index.js +10 -1055
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/node/components/docs/architecture/index.js +20 -1340
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/node/components/docs/comparison/index.js +1 -1510
- package/dist/node/components/docs/docsManifest.js +1 -611
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/node/components/docs/ecosystem/index.js +23 -569
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/node/components/docs/examples/index.js +4 -330
- package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/node/components/docs/generated/index.js +1 -74
- package/dist/node/components/docs/generated/loader.js +1 -74
- package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/node/components/docs/getting-started/index.js +18 -1869
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/node/components/docs/guides/index.js +213 -2428
- package/dist/node/components/docs/index.js +542 -24297
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/node/components/docs/integrations/index.js +52 -3100
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/node/components/docs/intent/index.js +15 -1135
- package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/node/components/docs/knowledge/index.js +21 -1730
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/node/components/docs/libraries/index.js +54 -4147
- package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/node/components/docs/ops/index.js +3 -202
- package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/node/components/docs/ops/ops.docs.js +10 -302
- package/dist/node/components/docs/product/product.docblocks.js +5 -72
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/node/components/docs/reference/index.js +4 -470
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/node/components/docs/safety/index.js +7 -1480
- package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -312
- package/dist/node/components/docs/specs/index.js +109 -1702
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/node/components/docs/studio/index.js +1 -282
- package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/node/components/integrations/index.js +2 -600
- package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/node/components/legal/TermsTemplate.js +1 -941
- package/dist/node/components/legal/index.js +1 -1963
- package/dist/node/components/shared/FeatureGateNotice.js +1 -38
- package/dist/node/components/shared/index.js +1 -38
- package/dist/node/components/shell/WorkspaceHeader.js +1 -100
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/node/components/shell/index.js +1 -287
- package/dist/node/components/templates/engine/index.js +1 -39
- package/dist/node/components/templates/index.js +11 -965
- package/dist/node/components/templates/messaging/ConversationList.js +2 -83
- package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/node/components/templates/messaging/MessageThread.js +3 -83
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/node/components/templates/messaging/index.js +5 -269
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/node/components/templates/recipes/RecipeList.js +3 -245
- package/dist/node/components/templates/recipes/index.js +3 -248
- package/dist/node/components/templates/todos/FilterBar.js +1 -107
- package/dist/node/components/templates/todos/TaskForm.js +2 -158
- package/dist/node/components/templates/todos/TaskItem.js +1 -77
- package/dist/node/components/templates/todos/TaskList.js +5 -449
- package/dist/node/components/templates/todos/index.js +5 -452
- package/dist/node/config/contractspec-blueprint.js +1 -123
- package/dist/node/config/contractspec-branding.js +1 -44
- package/dist/node/config/contractspec-routes.js +1 -24
- package/dist/node/config/index.js +1 -126
- package/dist/node/features/contracts-registry.js +1 -178
- package/dist/node/features/docs/docs.contracts.js +1 -17
- package/dist/node/features/docs/index.js +1 -17
- package/dist/node/features/docs.feature.js +1 -33
- package/dist/node/features/index.js +1 -315
- package/dist/node/features/mcp.feature.js +1 -30
- package/dist/node/features/presentations.feature.js +1 -33
- package/dist/node/features/registry.js +1 -116
- package/dist/node/index.js +556 -28580
- package/dist/node/infrastructure/elysia/index.js +1 -35
- package/dist/node/infrastructure/elysia/logger.js +1 -35
- package/dist/node/infrastructure/index.js +1 -35
- package/dist/node/libs/email/client.js +1 -114
- package/dist/node/libs/email/contact.js +12 -165
- package/dist/node/libs/email/newsletter.js +6 -167
- package/dist/node/libs/email/types.js +0 -2
- package/dist/node/libs/email/utils.js +2 -8
- package/dist/node/libs/email/waitlist-application.js +28 -209
- package/dist/node/libs/email/waitlist.js +6 -167
- package/dist/node/libs/email.js +46 -363
- package/dist/node/libs/posthog/client.js +1 -63
- package/dist/node/libs/posthog/native.js +1 -23
- package/dist/node/libs/posthog/server.js +1 -13
- package/dist/node/libs/pricing-examples.js +1 -18
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/node/presentation/features/atoms/index.js +1 -97
- package/dist/node/presentation/features/hooks/index.js +1 -397
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/node/presentation/features/index.js +1 -3063
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/node/presentation/features/molecules/index.js +1 -505
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/node/presentation/features/organisms/index.js +1 -1359
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/presentation/features/atoms/index.js +1 -97
- package/dist/presentation/features/hooks/index.js +1 -397
- package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/presentation/features/index.js +1 -3063
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/presentation/features/molecules/index.js +1 -505
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/presentation/features/organisms/index.js +1 -1359
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/package.json +109 -37
- package/src/components/docs/DocsIndexPage.tsx +55 -0
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
- package/src/components/docs/docsManifest.test.ts +70 -0
- package/src/components/docs/docsManifest.ts +71 -1
- package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
- package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
- package/src/components/docs/generated/docs-index._common.json +206 -273
- package/src/components/docs/generated/docs-index.control-plane.json +18 -0
- package/src/components/docs/generated/docs-index.defineExample.json +10 -0
- package/src/components/docs/generated/docs-index.manifest.json +22 -12
- package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
- package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
- package/src/components/docs/generated/docs-index.platform-context.json +48 -0
- package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
- package/src/components/docs/generated/docs-index.platform-database.json +40 -0
- package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
- package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
- package/src/components/docs/generated/docs-index.unknown.json +8 -0
- package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
- package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
- package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
- package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
- package/src/components/docs/guides/index.ts +3 -0
- package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
- package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
- package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
- package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
- package/src/components/docs/specs/SpecsWorkflowsPage.tsx +9 -1
- package/src/components/docs/specs/index.ts +3 -0
- package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
- package/src/infrastructure/elysia/logger.ts +11 -3
|
@@ -1,1359 +1 @@
|
|
|
1
|
-
// src/features/contracts-registry.ts
|
|
2
|
-
import {
|
|
3
|
-
EventRegistry,
|
|
4
|
-
OperationSpecRegistry
|
|
5
|
-
} from "@contractspec/lib.contracts-spec";
|
|
6
|
-
import {
|
|
7
|
-
DataViewRegistry
|
|
8
|
-
} from "@contractspec/lib.contracts-spec/data-views";
|
|
9
|
-
import {
|
|
10
|
-
ContractReferenceDataView,
|
|
11
|
-
ContractReferenceQuery,
|
|
12
|
-
DocsGenerateCommand,
|
|
13
|
-
DocsGeneratedEvent,
|
|
14
|
-
DocsIndexDataView,
|
|
15
|
-
DocsIndexQuery,
|
|
16
|
-
DocsLayoutPresentation,
|
|
17
|
-
DocsPublishCommand,
|
|
18
|
-
DocsPublishedEvent,
|
|
19
|
-
DocsReferencePagePresentation,
|
|
20
|
-
DocsSearchForm,
|
|
21
|
-
ExampleCatalogDataView
|
|
22
|
-
} from "@contractspec/lib.contracts-spec/docs";
|
|
23
|
-
import { FormRegistry } from "@contractspec/lib.contracts-spec/forms";
|
|
24
|
-
import {
|
|
25
|
-
PresentationRegistry
|
|
26
|
-
} from "@contractspec/lib.contracts-spec/presentations";
|
|
27
|
-
import {
|
|
28
|
-
serializeDataViewSpec,
|
|
29
|
-
serializeEventSpec,
|
|
30
|
-
serializeFormSpec,
|
|
31
|
-
serializeOperationSpec,
|
|
32
|
-
serializePresentationSpec
|
|
33
|
-
} from "@contractspec/lib.contracts-spec/serialization";
|
|
34
|
-
var operationRegistry = null;
|
|
35
|
-
function createContractSpecOperationRegistry() {
|
|
36
|
-
const registry = new OperationSpecRegistry;
|
|
37
|
-
registry.register(DocsIndexQuery).register(ContractReferenceQuery).register(DocsGenerateCommand).register(DocsPublishCommand);
|
|
38
|
-
return registry;
|
|
39
|
-
}
|
|
40
|
-
function getContractSpecOperationRegistry() {
|
|
41
|
-
if (!operationRegistry) {
|
|
42
|
-
operationRegistry = createContractSpecOperationRegistry();
|
|
43
|
-
}
|
|
44
|
-
return operationRegistry;
|
|
45
|
-
}
|
|
46
|
-
function resolveOperationSpec(key, version) {
|
|
47
|
-
return getContractSpecOperationRegistry().get(key, version);
|
|
48
|
-
}
|
|
49
|
-
var eventRegistry = null;
|
|
50
|
-
function createContractSpecEventRegistry() {
|
|
51
|
-
const registry = new EventRegistry;
|
|
52
|
-
registry.register(DocsGeneratedEvent).register(DocsPublishedEvent);
|
|
53
|
-
return registry;
|
|
54
|
-
}
|
|
55
|
-
function getContractSpecEventRegistry() {
|
|
56
|
-
if (!eventRegistry) {
|
|
57
|
-
eventRegistry = createContractSpecEventRegistry();
|
|
58
|
-
}
|
|
59
|
-
return eventRegistry;
|
|
60
|
-
}
|
|
61
|
-
function resolveEventSpec(key, version) {
|
|
62
|
-
return getContractSpecEventRegistry().get(key, version);
|
|
63
|
-
}
|
|
64
|
-
var presentationRegistry = null;
|
|
65
|
-
function createContractSpecPresentationRegistry() {
|
|
66
|
-
const registry = new PresentationRegistry;
|
|
67
|
-
registry.register(DocsLayoutPresentation).register(DocsReferencePagePresentation);
|
|
68
|
-
return registry;
|
|
69
|
-
}
|
|
70
|
-
function getContractSpecPresentationRegistry() {
|
|
71
|
-
if (!presentationRegistry) {
|
|
72
|
-
presentationRegistry = createContractSpecPresentationRegistry();
|
|
73
|
-
}
|
|
74
|
-
return presentationRegistry;
|
|
75
|
-
}
|
|
76
|
-
function resolvePresentationSpec(key, version) {
|
|
77
|
-
return getContractSpecPresentationRegistry().get(key, version);
|
|
78
|
-
}
|
|
79
|
-
var dataViewRegistry = null;
|
|
80
|
-
function createContractSpecDataViewRegistry() {
|
|
81
|
-
const registry = new DataViewRegistry;
|
|
82
|
-
registry.register(DocsIndexDataView).register(ContractReferenceDataView).register(ExampleCatalogDataView);
|
|
83
|
-
return registry;
|
|
84
|
-
}
|
|
85
|
-
function getContractSpecDataViewRegistry() {
|
|
86
|
-
if (!dataViewRegistry) {
|
|
87
|
-
dataViewRegistry = createContractSpecDataViewRegistry();
|
|
88
|
-
}
|
|
89
|
-
return dataViewRegistry;
|
|
90
|
-
}
|
|
91
|
-
function resolveDataViewSpec(key, version) {
|
|
92
|
-
return getContractSpecDataViewRegistry().get(key, version);
|
|
93
|
-
}
|
|
94
|
-
var formRegistry = null;
|
|
95
|
-
function createContractSpecFormRegistry() {
|
|
96
|
-
const registry = new FormRegistry;
|
|
97
|
-
registry.register(DocsSearchForm);
|
|
98
|
-
return registry;
|
|
99
|
-
}
|
|
100
|
-
function getContractSpecFormRegistry() {
|
|
101
|
-
if (!formRegistry) {
|
|
102
|
-
formRegistry = createContractSpecFormRegistry();
|
|
103
|
-
}
|
|
104
|
-
return formRegistry;
|
|
105
|
-
}
|
|
106
|
-
function resolveFormSpec(key, _version) {
|
|
107
|
-
return getContractSpecFormRegistry().get(key);
|
|
108
|
-
}
|
|
109
|
-
function resolveSerializedOperationSpec(key, version) {
|
|
110
|
-
const spec = resolveOperationSpec(key, version);
|
|
111
|
-
return serializeOperationSpec(spec) ?? undefined;
|
|
112
|
-
}
|
|
113
|
-
function resolveSerializedEventSpec(key, version) {
|
|
114
|
-
const spec = resolveEventSpec(key, version);
|
|
115
|
-
return serializeEventSpec(spec) ?? undefined;
|
|
116
|
-
}
|
|
117
|
-
function resolveSerializedPresentationSpec(key, version) {
|
|
118
|
-
const spec = resolvePresentationSpec(key, version);
|
|
119
|
-
return serializePresentationSpec(spec) ?? undefined;
|
|
120
|
-
}
|
|
121
|
-
function resolveSerializedDataViewSpec(key, version) {
|
|
122
|
-
const spec = resolveDataViewSpec(key, version);
|
|
123
|
-
return serializeDataViewSpec(spec) ?? undefined;
|
|
124
|
-
}
|
|
125
|
-
function resolveSerializedFormSpec(key, version) {
|
|
126
|
-
const spec = resolveFormSpec(key, version);
|
|
127
|
-
return serializeFormSpec(spec) ?? undefined;
|
|
128
|
-
}
|
|
129
|
-
function resetContractSpecOperationRegistry() {
|
|
130
|
-
operationRegistry = null;
|
|
131
|
-
}
|
|
132
|
-
function resetContractSpecEventRegistry() {
|
|
133
|
-
eventRegistry = null;
|
|
134
|
-
}
|
|
135
|
-
function resetContractSpecPresentationRegistry() {
|
|
136
|
-
presentationRegistry = null;
|
|
137
|
-
}
|
|
138
|
-
function resetContractSpecDataViewRegistry() {
|
|
139
|
-
dataViewRegistry = null;
|
|
140
|
-
}
|
|
141
|
-
function resetContractSpecFormRegistry() {
|
|
142
|
-
formRegistry = null;
|
|
143
|
-
}
|
|
144
|
-
function resetAllContractSpecRegistries() {
|
|
145
|
-
resetContractSpecOperationRegistry();
|
|
146
|
-
resetContractSpecEventRegistry();
|
|
147
|
-
resetContractSpecPresentationRegistry();
|
|
148
|
-
resetContractSpecDataViewRegistry();
|
|
149
|
-
resetContractSpecFormRegistry();
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/features/docs.feature.ts
|
|
153
|
-
var DocsFeature = {
|
|
154
|
-
meta: {
|
|
155
|
-
key: "contractspec.docs",
|
|
156
|
-
version: "1.0.0",
|
|
157
|
-
title: "Documentation",
|
|
158
|
-
description: "Comprehensive documentation system for ContractSpec",
|
|
159
|
-
domain: "platform",
|
|
160
|
-
owners: ["@platform.docs"],
|
|
161
|
-
tags: ["documentation", "guides", "api-reference"],
|
|
162
|
-
stability: "stable"
|
|
163
|
-
},
|
|
164
|
-
operations: [
|
|
165
|
-
{ key: "docs_search", version: "1.0.0" },
|
|
166
|
-
{ key: "docs.navigate", version: "1.0.0" }
|
|
167
|
-
],
|
|
168
|
-
events: [
|
|
169
|
-
{ key: "docs.page_viewed", version: "1.0.0" },
|
|
170
|
-
{ key: "docs.search_performed", version: "1.0.0" }
|
|
171
|
-
],
|
|
172
|
-
presentations: [
|
|
173
|
-
{ key: "docs.landing", version: "1.0.0" },
|
|
174
|
-
{ key: "docs.getting-started", version: "1.0.0" },
|
|
175
|
-
{ key: "docs.architecture", version: "1.0.0" }
|
|
176
|
-
],
|
|
177
|
-
capabilities: {
|
|
178
|
-
provides: [{ key: "contracts.docs", version: "1.0.0" }],
|
|
179
|
-
requires: []
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// src/features/docs/docs.contracts.ts
|
|
184
|
-
import {
|
|
185
|
-
ContractReferenceQuery as ContractReferenceQuery2,
|
|
186
|
-
DocSummaryModel,
|
|
187
|
-
DocsIndexInput,
|
|
188
|
-
DocsIndexOutput,
|
|
189
|
-
DocsIndexQuery as DocsIndexQuery2,
|
|
190
|
-
DocsIndexQuery as DocsIndexQuery3
|
|
191
|
-
} from "@contractspec/lib.contracts-spec/docs";
|
|
192
|
-
// src/features/mcp.feature.ts
|
|
193
|
-
var MCPFeature = {
|
|
194
|
-
meta: {
|
|
195
|
-
key: "contractspec.mcp",
|
|
196
|
-
version: "1.0.0",
|
|
197
|
-
title: "MCP Integration",
|
|
198
|
-
description: "Model Context Protocol server for AI agent integration",
|
|
199
|
-
domain: "platform",
|
|
200
|
-
owners: ["@platform.mcp"],
|
|
201
|
-
tags: ["mcp", "ai-agents", "tooling"],
|
|
202
|
-
stability: "beta"
|
|
203
|
-
},
|
|
204
|
-
operations: [
|
|
205
|
-
{ key: "mcp.tool.register", version: "1.0.0" },
|
|
206
|
-
{ key: "mcp.resource.register", version: "1.0.0" },
|
|
207
|
-
{ key: "mcp.prompt.register", version: "1.0.0" }
|
|
208
|
-
],
|
|
209
|
-
events: [
|
|
210
|
-
{ key: "mcp.tool_invoked", version: "1.0.0" },
|
|
211
|
-
{ key: "mcp.resource_accessed", version: "1.0.0" }
|
|
212
|
-
],
|
|
213
|
-
presentations: [],
|
|
214
|
-
capabilities: {
|
|
215
|
-
provides: [{ key: "contracts.mcp", version: "1.0.0" }],
|
|
216
|
-
requires: [{ key: "contracts.operations", version: "1.0.0" }]
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
// src/features/presentations.feature.ts
|
|
221
|
-
var PresentationsFeature = {
|
|
222
|
-
meta: {
|
|
223
|
-
key: "contractspec.presentations",
|
|
224
|
-
version: "1.0.0",
|
|
225
|
-
title: "Presentation Runtime",
|
|
226
|
-
description: "Cross-platform rendering of contract-driven UI",
|
|
227
|
-
domain: "platform",
|
|
228
|
-
owners: ["@platform.presentations"],
|
|
229
|
-
tags: ["presentations", "ui", "rendering", "cross-platform"],
|
|
230
|
-
stability: "beta"
|
|
231
|
-
},
|
|
232
|
-
operations: [
|
|
233
|
-
{ key: "presentation.render", version: "1.0.0" },
|
|
234
|
-
{ key: "presentation.transform", version: "1.0.0" }
|
|
235
|
-
],
|
|
236
|
-
events: [
|
|
237
|
-
{ key: "presentation.rendered", version: "1.0.0" },
|
|
238
|
-
{ key: "presentation.transformed", version: "1.0.0" }
|
|
239
|
-
],
|
|
240
|
-
presentations: [
|
|
241
|
-
{ key: "form.standard", version: "1.0.0" },
|
|
242
|
-
{ key: "list.standard", version: "1.0.0" },
|
|
243
|
-
{ key: "detail.standard", version: "1.0.0" }
|
|
244
|
-
],
|
|
245
|
-
capabilities: {
|
|
246
|
-
provides: [{ key: "contracts.presentations", version: "1.0.0" }],
|
|
247
|
-
requires: []
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
// src/features/registry.ts
|
|
252
|
-
import { AppConfigFeature } from "@contractspec/lib.contracts-spec/app-config";
|
|
253
|
-
import { FeatureRegistry } from "@contractspec/lib.contracts-spec/features";
|
|
254
|
-
function createContractSpecFeatureRegistry() {
|
|
255
|
-
const features = new FeatureRegistry;
|
|
256
|
-
features.register(DocsFeature);
|
|
257
|
-
features.register(MCPFeature);
|
|
258
|
-
features.register(PresentationsFeature);
|
|
259
|
-
features.register(AppConfigFeature);
|
|
260
|
-
return features;
|
|
261
|
-
}
|
|
262
|
-
var registryInstance = null;
|
|
263
|
-
function getContractSpecFeatureRegistry() {
|
|
264
|
-
if (!registryInstance) {
|
|
265
|
-
registryInstance = createContractSpecFeatureRegistry();
|
|
266
|
-
}
|
|
267
|
-
return registryInstance;
|
|
268
|
-
}
|
|
269
|
-
function resetContractSpecFeatureRegistry() {
|
|
270
|
-
registryInstance = null;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// src/features/index.ts
|
|
274
|
-
import { FeatureRegistry as FeatureRegistry2 } from "@contractspec/lib.contracts-spec/features";
|
|
275
|
-
|
|
276
|
-
// src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx
|
|
277
|
-
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
278
|
-
import {
|
|
279
|
-
Boxes,
|
|
280
|
-
Database,
|
|
281
|
-
FileText,
|
|
282
|
-
Globe,
|
|
283
|
-
Layout,
|
|
284
|
-
MessageSquare,
|
|
285
|
-
Settings,
|
|
286
|
-
Shield,
|
|
287
|
-
Workflow
|
|
288
|
-
} from "lucide-react";
|
|
289
|
-
import * as React from "react";
|
|
290
|
-
import { jsx } from "react/jsx-runtime";
|
|
291
|
-
"use client";
|
|
292
|
-
var domainIconMap = {
|
|
293
|
-
platform: Settings,
|
|
294
|
-
documentation: FileText,
|
|
295
|
-
docs: FileText,
|
|
296
|
-
integration: Workflow,
|
|
297
|
-
api: Globe,
|
|
298
|
-
security: Shield,
|
|
299
|
-
data: Database,
|
|
300
|
-
messaging: MessageSquare,
|
|
301
|
-
ui: Layout,
|
|
302
|
-
presentation: Layout
|
|
303
|
-
};
|
|
304
|
-
var tagIconMap = {
|
|
305
|
-
documentation: FileText,
|
|
306
|
-
guides: FileText,
|
|
307
|
-
"api-reference": Globe,
|
|
308
|
-
presentations: Layout,
|
|
309
|
-
ui: Layout,
|
|
310
|
-
rendering: Layout,
|
|
311
|
-
mcp: Workflow,
|
|
312
|
-
integration: Workflow,
|
|
313
|
-
security: Shield,
|
|
314
|
-
auth: Shield,
|
|
315
|
-
data: Database,
|
|
316
|
-
storage: Database
|
|
317
|
-
};
|
|
318
|
-
var stabilityToneMap = {
|
|
319
|
-
stable: "success",
|
|
320
|
-
beta: "warning",
|
|
321
|
-
experimental: "info",
|
|
322
|
-
deprecated: "danger"
|
|
323
|
-
};
|
|
324
|
-
var sizeClasses = {
|
|
325
|
-
sm: "h-4 w-4",
|
|
326
|
-
md: "h-5 w-5",
|
|
327
|
-
lg: "h-6 w-6"
|
|
328
|
-
};
|
|
329
|
-
function FeatureIcon({
|
|
330
|
-
domain,
|
|
331
|
-
tags = [],
|
|
332
|
-
stability,
|
|
333
|
-
icon: IconOverride,
|
|
334
|
-
size = "md",
|
|
335
|
-
className
|
|
336
|
-
}) {
|
|
337
|
-
const Icon = React.useMemo(() => {
|
|
338
|
-
if (IconOverride)
|
|
339
|
-
return IconOverride;
|
|
340
|
-
if (domain) {
|
|
341
|
-
const domainIcon = domainIconMap[domain.toLowerCase()];
|
|
342
|
-
if (domainIcon)
|
|
343
|
-
return domainIcon;
|
|
344
|
-
}
|
|
345
|
-
for (const tag of tags) {
|
|
346
|
-
const tagIcon = tagIconMap[tag.toLowerCase()];
|
|
347
|
-
if (tagIcon)
|
|
348
|
-
return tagIcon;
|
|
349
|
-
}
|
|
350
|
-
return Boxes;
|
|
351
|
-
}, [domain, tags, IconOverride]);
|
|
352
|
-
const tone = stability ? stabilityToneMap[stability] || "primary" : "primary";
|
|
353
|
-
const toneClasses = {
|
|
354
|
-
success: "text-emerald-600 dark:text-emerald-400",
|
|
355
|
-
warning: "text-amber-600 dark:text-amber-400",
|
|
356
|
-
info: "text-blue-600 dark:text-blue-400",
|
|
357
|
-
danger: "text-red-600 dark:text-red-400",
|
|
358
|
-
primary: "text-primary"
|
|
359
|
-
};
|
|
360
|
-
return /* @__PURE__ */ jsx(Icon, {
|
|
361
|
-
className: cn(sizeClasses[size], toneClasses[tone], className)
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
function getFeatureIconTone(stability) {
|
|
365
|
-
if (!stability)
|
|
366
|
-
return "primary";
|
|
367
|
-
return stabilityToneMap[stability] || "primary";
|
|
368
|
-
}
|
|
369
|
-
// src/presentation/features/hooks/useFeatureFilters.ts
|
|
370
|
-
import { useCallback, useMemo as useMemo2, useState } from "react";
|
|
371
|
-
"use client";
|
|
372
|
-
var defaultFilters = {
|
|
373
|
-
search: "",
|
|
374
|
-
tags: [],
|
|
375
|
-
stability: [],
|
|
376
|
-
domain: []
|
|
377
|
-
};
|
|
378
|
-
function useFeatureFilters(features) {
|
|
379
|
-
const [filters, setFilters] = useState(defaultFilters);
|
|
380
|
-
const setSearch = useCallback((search) => {
|
|
381
|
-
setFilters((prev) => ({ ...prev, search }));
|
|
382
|
-
}, []);
|
|
383
|
-
const toggleTag = useCallback((tag) => {
|
|
384
|
-
setFilters((prev) => ({
|
|
385
|
-
...prev,
|
|
386
|
-
tags: prev.tags.includes(tag) ? prev.tags.filter((t) => t !== tag) : [...prev.tags, tag]
|
|
387
|
-
}));
|
|
388
|
-
}, []);
|
|
389
|
-
const toggleStability = useCallback((stability) => {
|
|
390
|
-
setFilters((prev) => ({
|
|
391
|
-
...prev,
|
|
392
|
-
stability: prev.stability.includes(stability) ? prev.stability.filter((s) => s !== stability) : [...prev.stability, stability]
|
|
393
|
-
}));
|
|
394
|
-
}, []);
|
|
395
|
-
const toggleDomain = useCallback((domain) => {
|
|
396
|
-
setFilters((prev) => ({
|
|
397
|
-
...prev,
|
|
398
|
-
domain: prev.domain.includes(domain) ? prev.domain.filter((d) => d !== domain) : [...prev.domain, domain]
|
|
399
|
-
}));
|
|
400
|
-
}, []);
|
|
401
|
-
const clearFilters = useCallback(() => setFilters(defaultFilters), []);
|
|
402
|
-
const hasActiveFilters = useMemo2(() => {
|
|
403
|
-
return filters.search.length > 0 || filters.tags.length > 0 || filters.stability.length > 0 || filters.domain.length > 0;
|
|
404
|
-
}, [filters]);
|
|
405
|
-
const filteredFeatures = useMemo2(() => {
|
|
406
|
-
return features.filter((feature) => {
|
|
407
|
-
if (filters.search) {
|
|
408
|
-
const searchLower = filters.search.toLowerCase();
|
|
409
|
-
const title = feature.meta.title ?? "";
|
|
410
|
-
const matches = title.toLowerCase().includes(searchLower) || feature.meta.description?.toLowerCase().includes(searchLower) || feature.meta.key.toLowerCase().includes(searchLower);
|
|
411
|
-
if (!matches)
|
|
412
|
-
return false;
|
|
413
|
-
}
|
|
414
|
-
if (filters.tags.length > 0) {
|
|
415
|
-
const hasTag = filters.tags.some((tag) => feature.meta.tags?.includes(tag));
|
|
416
|
-
if (!hasTag)
|
|
417
|
-
return false;
|
|
418
|
-
}
|
|
419
|
-
if (filters.stability.length > 0) {
|
|
420
|
-
if (!filters.stability.includes(feature.meta.stability ?? "unknown"))
|
|
421
|
-
return false;
|
|
422
|
-
}
|
|
423
|
-
if (filters.domain.length > 0) {
|
|
424
|
-
if (!filters.domain.includes(feature.meta.domain ?? "unknown"))
|
|
425
|
-
return false;
|
|
426
|
-
}
|
|
427
|
-
return true;
|
|
428
|
-
});
|
|
429
|
-
}, [features, filters]);
|
|
430
|
-
return {
|
|
431
|
-
filters,
|
|
432
|
-
setSearch,
|
|
433
|
-
toggleTag,
|
|
434
|
-
toggleStability,
|
|
435
|
-
toggleDomain,
|
|
436
|
-
clearFilters,
|
|
437
|
-
filteredFeatures,
|
|
438
|
-
hasActiveFilters
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// src/presentation/features/hooks/useFeatureRegistry.ts
|
|
443
|
-
import { useMemo as useMemo3 } from "react";
|
|
444
|
-
"use client";
|
|
445
|
-
function useFeatureRegistry() {
|
|
446
|
-
const registry = useMemo3(() => getContractSpecFeatureRegistry(), []);
|
|
447
|
-
return useMemo3(() => {
|
|
448
|
-
const features = registry.list();
|
|
449
|
-
return {
|
|
450
|
-
features,
|
|
451
|
-
getFeature: (key) => registry.get(key),
|
|
452
|
-
getByTag: (tag) => registry.listByTag(tag),
|
|
453
|
-
getByOwner: (owner) => registry.listByOwner(owner),
|
|
454
|
-
getUniqueTags: () => registry.getUniqueTags(),
|
|
455
|
-
getUniqueDomains: () => {
|
|
456
|
-
const domains = new Set;
|
|
457
|
-
for (const f of features) {
|
|
458
|
-
if (f.meta.domain)
|
|
459
|
-
domains.add(f.meta.domain);
|
|
460
|
-
}
|
|
461
|
-
return [...domains].sort();
|
|
462
|
-
},
|
|
463
|
-
getUniqueStabilities: () => {
|
|
464
|
-
const stabilities = new Set;
|
|
465
|
-
for (const f of features) {
|
|
466
|
-
if (f.meta.stability)
|
|
467
|
-
stabilities.add(f.meta.stability);
|
|
468
|
-
}
|
|
469
|
-
return [...stabilities].sort();
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
}, [registry]);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx
|
|
476
|
-
import { StatusChip } from "@contractspec/lib.design-system";
|
|
477
|
-
import { HStack } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
478
|
-
import {
|
|
479
|
-
ArrowRight,
|
|
480
|
-
Layout as Layout2,
|
|
481
|
-
Radio,
|
|
482
|
-
Shield as Shield2,
|
|
483
|
-
Tag,
|
|
484
|
-
Users,
|
|
485
|
-
Zap
|
|
486
|
-
} from "lucide-react";
|
|
487
|
-
import { jsx as jsx2, jsxs, Fragment } from "react/jsx-runtime";
|
|
488
|
-
"use client";
|
|
489
|
-
function FeatureHoverPreview({ feature }) {
|
|
490
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
491
|
-
const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
|
|
492
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
493
|
-
children: [
|
|
494
|
-
meta.description && /* @__PURE__ */ jsx2("p", {
|
|
495
|
-
className: "text-muted-foreground text-sm leading-relaxed",
|
|
496
|
-
children: meta.description
|
|
497
|
-
}),
|
|
498
|
-
/* @__PURE__ */ jsxs(HStack, {
|
|
499
|
-
gap: "md",
|
|
500
|
-
className: "py-2",
|
|
501
|
-
children: [
|
|
502
|
-
operations?.length ? /* @__PURE__ */ jsxs("div", {
|
|
503
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
504
|
-
children: [
|
|
505
|
-
/* @__PURE__ */ jsx2(Zap, {
|
|
506
|
-
className: "h-4 w-4 text-amber-500"
|
|
507
|
-
}),
|
|
508
|
-
/* @__PURE__ */ jsx2("span", {
|
|
509
|
-
className: "font-medium",
|
|
510
|
-
children: operations.length
|
|
511
|
-
}),
|
|
512
|
-
/* @__PURE__ */ jsx2("span", {
|
|
513
|
-
className: "text-muted-foreground",
|
|
514
|
-
children: "ops"
|
|
515
|
-
})
|
|
516
|
-
]
|
|
517
|
-
}) : null,
|
|
518
|
-
events?.length ? /* @__PURE__ */ jsxs("div", {
|
|
519
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
520
|
-
children: [
|
|
521
|
-
/* @__PURE__ */ jsx2(Radio, {
|
|
522
|
-
className: "h-4 w-4 text-blue-500"
|
|
523
|
-
}),
|
|
524
|
-
/* @__PURE__ */ jsx2("span", {
|
|
525
|
-
className: "font-medium",
|
|
526
|
-
children: events.length
|
|
527
|
-
}),
|
|
528
|
-
/* @__PURE__ */ jsx2("span", {
|
|
529
|
-
className: "text-muted-foreground",
|
|
530
|
-
children: "events"
|
|
531
|
-
})
|
|
532
|
-
]
|
|
533
|
-
}) : null,
|
|
534
|
-
presentations?.length ? /* @__PURE__ */ jsxs("div", {
|
|
535
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
536
|
-
children: [
|
|
537
|
-
/* @__PURE__ */ jsx2(Layout2, {
|
|
538
|
-
className: "h-4 w-4 text-purple-500"
|
|
539
|
-
}),
|
|
540
|
-
/* @__PURE__ */ jsx2("span", {
|
|
541
|
-
className: "font-medium",
|
|
542
|
-
children: presentations.length
|
|
543
|
-
}),
|
|
544
|
-
/* @__PURE__ */ jsx2("span", {
|
|
545
|
-
className: "text-muted-foreground",
|
|
546
|
-
children: "views"
|
|
547
|
-
})
|
|
548
|
-
]
|
|
549
|
-
}) : null
|
|
550
|
-
]
|
|
551
|
-
}),
|
|
552
|
-
hasCapabilities && /* @__PURE__ */ jsxs("div", {
|
|
553
|
-
className: "space-y-1.5 border-border/50 border-t pt-1",
|
|
554
|
-
children: [
|
|
555
|
-
capabilities?.provides?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
556
|
-
gap: "xs",
|
|
557
|
-
wrap: "wrap",
|
|
558
|
-
className: "items-start",
|
|
559
|
-
children: [
|
|
560
|
-
/* @__PURE__ */ jsx2(Shield2, {
|
|
561
|
-
className: "mt-0.5 h-3.5 w-3.5 text-emerald-500"
|
|
562
|
-
}),
|
|
563
|
-
/* @__PURE__ */ jsx2("span", {
|
|
564
|
-
className: "text-muted-foreground text-xs",
|
|
565
|
-
children: "Provides:"
|
|
566
|
-
}),
|
|
567
|
-
capabilities.provides.slice(0, 2).map((cap) => /* @__PURE__ */ jsx2(StatusChip, {
|
|
568
|
-
tone: "success",
|
|
569
|
-
label: cap.key,
|
|
570
|
-
size: "sm"
|
|
571
|
-
}, cap.key)),
|
|
572
|
-
capabilities.provides.length > 2 && /* @__PURE__ */ jsxs("span", {
|
|
573
|
-
className: "text-muted-foreground text-xs",
|
|
574
|
-
children: [
|
|
575
|
-
"+",
|
|
576
|
-
capabilities.provides.length - 2
|
|
577
|
-
]
|
|
578
|
-
})
|
|
579
|
-
]
|
|
580
|
-
}) : null,
|
|
581
|
-
capabilities?.requires?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
582
|
-
gap: "xs",
|
|
583
|
-
wrap: "wrap",
|
|
584
|
-
className: "items-start",
|
|
585
|
-
children: [
|
|
586
|
-
/* @__PURE__ */ jsx2(ArrowRight, {
|
|
587
|
-
className: "mt-0.5 h-3.5 w-3.5 text-blue-500"
|
|
588
|
-
}),
|
|
589
|
-
/* @__PURE__ */ jsx2("span", {
|
|
590
|
-
className: "text-muted-foreground text-xs",
|
|
591
|
-
children: "Requires:"
|
|
592
|
-
}),
|
|
593
|
-
capabilities.requires.slice(0, 2).map((req) => /* @__PURE__ */ jsx2(StatusChip, {
|
|
594
|
-
tone: "info",
|
|
595
|
-
label: req.key,
|
|
596
|
-
size: "sm"
|
|
597
|
-
}, req.key)),
|
|
598
|
-
capabilities.requires.length > 2 && /* @__PURE__ */ jsxs("span", {
|
|
599
|
-
className: "text-muted-foreground text-xs",
|
|
600
|
-
children: [
|
|
601
|
-
"+",
|
|
602
|
-
capabilities.requires.length - 2
|
|
603
|
-
]
|
|
604
|
-
})
|
|
605
|
-
]
|
|
606
|
-
}) : null
|
|
607
|
-
]
|
|
608
|
-
}),
|
|
609
|
-
meta.tags?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
610
|
-
gap: "xs",
|
|
611
|
-
wrap: "wrap",
|
|
612
|
-
className: "items-center border-border/50 border-t pt-1",
|
|
613
|
-
children: [
|
|
614
|
-
/* @__PURE__ */ jsx2(Tag, {
|
|
615
|
-
className: "h-3.5 w-3.5 text-muted-foreground"
|
|
616
|
-
}),
|
|
617
|
-
meta.tags.slice(0, 4).map((tag) => /* @__PURE__ */ jsxs("span", {
|
|
618
|
-
className: "rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",
|
|
619
|
-
children: [
|
|
620
|
-
"#",
|
|
621
|
-
tag
|
|
622
|
-
]
|
|
623
|
-
}, tag)),
|
|
624
|
-
meta.tags.length > 4 && /* @__PURE__ */ jsxs("span", {
|
|
625
|
-
className: "text-muted-foreground text-xs",
|
|
626
|
-
children: [
|
|
627
|
-
"+",
|
|
628
|
-
meta.tags.length - 4
|
|
629
|
-
]
|
|
630
|
-
})
|
|
631
|
-
]
|
|
632
|
-
}) : null,
|
|
633
|
-
meta.owners?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
634
|
-
gap: "xs",
|
|
635
|
-
className: "items-center text-muted-foreground text-xs",
|
|
636
|
-
children: [
|
|
637
|
-
/* @__PURE__ */ jsx2(Users, {
|
|
638
|
-
className: "h-3.5 w-3.5"
|
|
639
|
-
}),
|
|
640
|
-
/* @__PURE__ */ jsx2("span", {
|
|
641
|
-
children: meta.owners.join(", ")
|
|
642
|
-
})
|
|
643
|
-
]
|
|
644
|
-
}) : null
|
|
645
|
-
]
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
// src/presentation/features/molecules/FeatureCard/FeatureCard.tsx
|
|
649
|
-
import { EntityCard, StatusChip as StatusChip2 } from "@contractspec/lib.design-system";
|
|
650
|
-
import { HStack as HStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
651
|
-
import { Layout as Layout3, Radio as Radio2, Shield as Shield3, Zap as Zap2 } from "lucide-react";
|
|
652
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
653
|
-
"use client";
|
|
654
|
-
var stabilityTone = {
|
|
655
|
-
stable: "success",
|
|
656
|
-
beta: "warning",
|
|
657
|
-
experimental: "info",
|
|
658
|
-
deprecated: "danger"
|
|
659
|
-
};
|
|
660
|
-
function FeatureCard({
|
|
661
|
-
feature,
|
|
662
|
-
onSelect,
|
|
663
|
-
className
|
|
664
|
-
}) {
|
|
665
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
666
|
-
const tone = stabilityTone[meta.stability] ?? "neutral";
|
|
667
|
-
const iconTone = getFeatureIconTone(meta.stability);
|
|
668
|
-
const emphasis = meta.stability === "stable" ? "strong" : "default";
|
|
669
|
-
const handleClick = onSelect ? () => onSelect(feature) : undefined;
|
|
670
|
-
const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
|
|
671
|
-
return /* @__PURE__ */ jsx3(EntityCard, {
|
|
672
|
-
cardTitle: meta.title,
|
|
673
|
-
cardSubtitle: meta.key,
|
|
674
|
-
className,
|
|
675
|
-
onClick: handleClick,
|
|
676
|
-
emphasis,
|
|
677
|
-
icon: /* @__PURE__ */ jsx3(FeatureIcon, {
|
|
678
|
-
domain: meta.domain,
|
|
679
|
-
tags: meta.tags,
|
|
680
|
-
stability: meta.stability,
|
|
681
|
-
size: "md"
|
|
682
|
-
}),
|
|
683
|
-
iconTone,
|
|
684
|
-
chips: /* @__PURE__ */ jsx3(StatusChip2, {
|
|
685
|
-
tone,
|
|
686
|
-
label: meta.stability ?? "unknown",
|
|
687
|
-
size: "sm"
|
|
688
|
-
}),
|
|
689
|
-
meta: meta.description ? /* @__PURE__ */ jsx3("span", {
|
|
690
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
691
|
-
children: meta.description
|
|
692
|
-
}) : undefined,
|
|
693
|
-
preview: /* @__PURE__ */ jsx3(FeatureHoverPreview, {
|
|
694
|
-
feature
|
|
695
|
-
}),
|
|
696
|
-
footer: /* @__PURE__ */ jsxs2(HStack2, {
|
|
697
|
-
gap: "md",
|
|
698
|
-
className: "w-full justify-between text-muted-foreground text-xs",
|
|
699
|
-
children: [
|
|
700
|
-
/* @__PURE__ */ jsxs2(HStack2, {
|
|
701
|
-
gap: "sm",
|
|
702
|
-
children: [
|
|
703
|
-
operations?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
704
|
-
className: "flex items-center gap-1",
|
|
705
|
-
children: [
|
|
706
|
-
/* @__PURE__ */ jsx3(Zap2, {
|
|
707
|
-
className: "h-3 w-3 text-amber-500"
|
|
708
|
-
}),
|
|
709
|
-
operations.length
|
|
710
|
-
]
|
|
711
|
-
}) : null,
|
|
712
|
-
events?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
713
|
-
className: "flex items-center gap-1",
|
|
714
|
-
children: [
|
|
715
|
-
/* @__PURE__ */ jsx3(Radio2, {
|
|
716
|
-
className: "h-3 w-3 text-blue-500"
|
|
717
|
-
}),
|
|
718
|
-
events.length
|
|
719
|
-
]
|
|
720
|
-
}) : null,
|
|
721
|
-
presentations?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
722
|
-
className: "flex items-center gap-1",
|
|
723
|
-
children: [
|
|
724
|
-
/* @__PURE__ */ jsx3(Layout3, {
|
|
725
|
-
className: "h-3 w-3 text-purple-500"
|
|
726
|
-
}),
|
|
727
|
-
presentations.length
|
|
728
|
-
]
|
|
729
|
-
}) : null
|
|
730
|
-
]
|
|
731
|
-
}),
|
|
732
|
-
hasCapabilities && /* @__PURE__ */ jsxs2("span", {
|
|
733
|
-
className: "flex items-center gap-1",
|
|
734
|
-
children: [
|
|
735
|
-
/* @__PURE__ */ jsx3(Shield3, {
|
|
736
|
-
className: "h-3 w-3 text-emerald-500"
|
|
737
|
-
}),
|
|
738
|
-
(capabilities?.provides?.length ?? 0) + (capabilities?.requires?.length ?? 0)
|
|
739
|
-
]
|
|
740
|
-
})
|
|
741
|
-
]
|
|
742
|
-
})
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
// src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx
|
|
746
|
-
import { StatusChip as StatusChip3 } from "@contractspec/lib.design-system";
|
|
747
|
-
import { HStack as HStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
748
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
749
|
-
import { Boxes as Boxes2, ChevronDown } from "lucide-react";
|
|
750
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
751
|
-
"use client";
|
|
752
|
-
function FeatureCategoryHeader({
|
|
753
|
-
title,
|
|
754
|
-
count,
|
|
755
|
-
icon,
|
|
756
|
-
isCollapsed = false,
|
|
757
|
-
onToggle,
|
|
758
|
-
className
|
|
759
|
-
}) {
|
|
760
|
-
return /* @__PURE__ */ jsxs3("button", {
|
|
761
|
-
type: "button",
|
|
762
|
-
onClick: onToggle,
|
|
763
|
-
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),
|
|
764
|
-
children: [
|
|
765
|
-
/* @__PURE__ */ jsxs3(HStack3, {
|
|
766
|
-
gap: "sm",
|
|
767
|
-
className: "items-center",
|
|
768
|
-
children: [
|
|
769
|
-
/* @__PURE__ */ jsx4("div", {
|
|
770
|
-
className: "text-muted-foreground transition-colors group-hover:text-foreground",
|
|
771
|
-
children: icon || /* @__PURE__ */ jsx4(Boxes2, {
|
|
772
|
-
className: "h-5 w-5"
|
|
773
|
-
})
|
|
774
|
-
}),
|
|
775
|
-
/* @__PURE__ */ jsx4("span", {
|
|
776
|
-
className: "font-semibold text-lg capitalize transition-colors group-hover:text-primary",
|
|
777
|
-
children: title
|
|
778
|
-
}),
|
|
779
|
-
/* @__PURE__ */ jsx4(StatusChip3, {
|
|
780
|
-
tone: "neutral",
|
|
781
|
-
label: `${count} ${count === 1 ? "feature" : "features"}`,
|
|
782
|
-
size: "sm"
|
|
783
|
-
})
|
|
784
|
-
]
|
|
785
|
-
}),
|
|
786
|
-
/* @__PURE__ */ jsx4(ChevronDown, {
|
|
787
|
-
className: cn2("h-5 w-5 text-muted-foreground transition-transform duration-200", isCollapsed && "-rotate-90")
|
|
788
|
-
})
|
|
789
|
-
]
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
// src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx
|
|
793
|
-
import { Button, Input } from "@contractspec/lib.design-system";
|
|
794
|
-
import { HStack as HStack4, VStack } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
795
|
-
import { cn as cn3 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
796
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
797
|
-
"use client";
|
|
798
|
-
function FeatureFiltersBar({
|
|
799
|
-
uniqueTags,
|
|
800
|
-
uniqueStabilities,
|
|
801
|
-
filters,
|
|
802
|
-
setSearch,
|
|
803
|
-
toggleTag,
|
|
804
|
-
toggleStability,
|
|
805
|
-
clearFilters,
|
|
806
|
-
hasActiveFilters,
|
|
807
|
-
className
|
|
808
|
-
}) {
|
|
809
|
-
return /* @__PURE__ */ jsxs4(VStack, {
|
|
810
|
-
gap: "md",
|
|
811
|
-
className: cn3("w-full", className),
|
|
812
|
-
children: [
|
|
813
|
-
/* @__PURE__ */ jsxs4(HStack4, {
|
|
814
|
-
gap: "md",
|
|
815
|
-
justify: "between",
|
|
816
|
-
className: "w-full",
|
|
817
|
-
children: [
|
|
818
|
-
/* @__PURE__ */ jsx5(Input, {
|
|
819
|
-
placeholder: "Search features...",
|
|
820
|
-
value: filters.search,
|
|
821
|
-
onChange: (e) => setSearch(e.target.value),
|
|
822
|
-
className: "max-w-md",
|
|
823
|
-
"aria-label": "Search features"
|
|
824
|
-
}),
|
|
825
|
-
hasActiveFilters && /* @__PURE__ */ jsx5(Button, {
|
|
826
|
-
variant: "ghost",
|
|
827
|
-
size: "sm",
|
|
828
|
-
onClick: clearFilters,
|
|
829
|
-
children: "Clear filters"
|
|
830
|
-
})
|
|
831
|
-
]
|
|
832
|
-
}),
|
|
833
|
-
uniqueStabilities.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
|
|
834
|
-
gap: "xs",
|
|
835
|
-
wrap: "wrap",
|
|
836
|
-
children: [
|
|
837
|
-
/* @__PURE__ */ jsx5("span", {
|
|
838
|
-
className: "text-muted-foreground text-sm",
|
|
839
|
-
children: "Stability:"
|
|
840
|
-
}),
|
|
841
|
-
uniqueStabilities.map((stability) => /* @__PURE__ */ jsx5(Button, {
|
|
842
|
-
variant: filters.stability.includes(stability) ? "default" : "outline",
|
|
843
|
-
size: "sm",
|
|
844
|
-
onClick: () => toggleStability(stability),
|
|
845
|
-
"aria-pressed": filters.stability.includes(stability),
|
|
846
|
-
children: stability
|
|
847
|
-
}, stability))
|
|
848
|
-
]
|
|
849
|
-
}),
|
|
850
|
-
uniqueTags.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
|
|
851
|
-
gap: "xs",
|
|
852
|
-
wrap: "wrap",
|
|
853
|
-
children: [
|
|
854
|
-
/* @__PURE__ */ jsx5("span", {
|
|
855
|
-
className: "text-muted-foreground text-sm",
|
|
856
|
-
children: "Tags:"
|
|
857
|
-
}),
|
|
858
|
-
uniqueTags.slice(0, 10).map((tag) => /* @__PURE__ */ jsxs4(Button, {
|
|
859
|
-
variant: filters.tags.includes(tag) ? "default" : "outline",
|
|
860
|
-
size: "sm",
|
|
861
|
-
onClick: () => toggleTag(tag),
|
|
862
|
-
"aria-pressed": filters.tags.includes(tag),
|
|
863
|
-
children: [
|
|
864
|
-
"#",
|
|
865
|
-
tag
|
|
866
|
-
]
|
|
867
|
-
}, tag)),
|
|
868
|
-
uniqueTags.length > 10 && /* @__PURE__ */ jsxs4("span", {
|
|
869
|
-
className: "text-muted-foreground text-sm",
|
|
870
|
-
children: [
|
|
871
|
-
"+",
|
|
872
|
-
uniqueTags.length - 10,
|
|
873
|
-
" more"
|
|
874
|
-
]
|
|
875
|
-
})
|
|
876
|
-
]
|
|
877
|
-
})
|
|
878
|
-
]
|
|
879
|
-
});
|
|
880
|
-
}
|
|
881
|
-
// src/presentation/features/organisms/FeatureDataViewsList.tsx
|
|
882
|
-
import { EntityCard as EntityCard2 } from "@contractspec/lib.design-system";
|
|
883
|
-
import { Table } from "lucide-react";
|
|
884
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
885
|
-
"use client";
|
|
886
|
-
function FeatureDataViewsList({
|
|
887
|
-
feature
|
|
888
|
-
}) {
|
|
889
|
-
if (!feature.dataViews?.length)
|
|
890
|
-
return null;
|
|
891
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
892
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
893
|
-
children: feature.dataViews.map((view) => {
|
|
894
|
-
const spec = resolveSerializedDataViewSpec(view.key, view.version);
|
|
895
|
-
return /* @__PURE__ */ jsx6(EntityCard2, {
|
|
896
|
-
cardTitle: view.key,
|
|
897
|
-
cardSubtitle: `v${view.version}`,
|
|
898
|
-
footer: spec?.meta.description,
|
|
899
|
-
icon: /* @__PURE__ */ jsx6(Table, {
|
|
900
|
-
className: "h-4 w-4"
|
|
901
|
-
}),
|
|
902
|
-
href: `/features/${feature.meta.key}/dataviews/${view.key}`
|
|
903
|
-
}, view.key);
|
|
904
|
-
})
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
// src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx
|
|
909
|
-
import {
|
|
910
|
-
StatCard,
|
|
911
|
-
StatCardGroup,
|
|
912
|
-
StatusChip as StatusChip4
|
|
913
|
-
} from "@contractspec/lib.design-system";
|
|
914
|
-
import { Box, HStack as HStack5, VStack as VStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
915
|
-
import { cn as cn4 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
916
|
-
import Link from "next/link";
|
|
917
|
-
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
918
|
-
"use client";
|
|
919
|
-
var stabilityTone2 = {
|
|
920
|
-
stable: "success",
|
|
921
|
-
beta: "warning",
|
|
922
|
-
experimental: "info",
|
|
923
|
-
deprecated: "danger"
|
|
924
|
-
};
|
|
925
|
-
function FeatureDetail({ feature, className }) {
|
|
926
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
927
|
-
const tone = stabilityTone2[meta.stability] ?? "neutral";
|
|
928
|
-
return /* @__PURE__ */ jsxs5(VStack2, {
|
|
929
|
-
gap: "lg",
|
|
930
|
-
className: cn4("w-full", className),
|
|
931
|
-
children: [
|
|
932
|
-
/* @__PURE__ */ jsxs5(HStack5, {
|
|
933
|
-
gap: "sm",
|
|
934
|
-
children: [
|
|
935
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
936
|
-
tone,
|
|
937
|
-
label: meta.stability ?? "unknown"
|
|
938
|
-
}),
|
|
939
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
940
|
-
tone: "neutral",
|
|
941
|
-
label: meta.key,
|
|
942
|
-
size: "sm"
|
|
943
|
-
}),
|
|
944
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
945
|
-
tone: "neutral",
|
|
946
|
-
label: `v${meta.version}`,
|
|
947
|
-
size: "sm"
|
|
948
|
-
})
|
|
949
|
-
]
|
|
950
|
-
}),
|
|
951
|
-
/* @__PURE__ */ jsxs5(StatCardGroup, {
|
|
952
|
-
children: [
|
|
953
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
954
|
-
href: `./${feature.meta.key}/operations`,
|
|
955
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
956
|
-
label: "Operations",
|
|
957
|
-
value: operations?.length ?? 0
|
|
958
|
-
})
|
|
959
|
-
}),
|
|
960
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
961
|
-
href: `./${feature.meta.key}/events`,
|
|
962
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
963
|
-
label: "Events",
|
|
964
|
-
value: events?.length ?? 0
|
|
965
|
-
})
|
|
966
|
-
}),
|
|
967
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
968
|
-
href: `./${feature.meta.key}/presentations`,
|
|
969
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
970
|
-
label: "Presentations",
|
|
971
|
-
value: presentations?.length ?? 0
|
|
972
|
-
})
|
|
973
|
-
})
|
|
974
|
-
]
|
|
975
|
-
}),
|
|
976
|
-
capabilities?.provides?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
977
|
-
className: "flex-col rounded-lg border p-4",
|
|
978
|
-
gap: "sm",
|
|
979
|
-
align: "start",
|
|
980
|
-
children: [
|
|
981
|
-
/* @__PURE__ */ jsx7("span", {
|
|
982
|
-
className: "font-semibold",
|
|
983
|
-
children: "Provides Capabilities"
|
|
984
|
-
}),
|
|
985
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
986
|
-
gap: "xs",
|
|
987
|
-
wrap: "wrap",
|
|
988
|
-
children: capabilities.provides.map((cap) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
989
|
-
tone: "success",
|
|
990
|
-
label: `${cap.key} v${cap.version}`,
|
|
991
|
-
size: "sm"
|
|
992
|
-
}, `${cap.key}-${cap.version}`))
|
|
993
|
-
})
|
|
994
|
-
]
|
|
995
|
-
}) : null,
|
|
996
|
-
capabilities?.requires?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
997
|
-
className: "flex-col rounded-lg border p-4",
|
|
998
|
-
gap: "sm",
|
|
999
|
-
align: "start",
|
|
1000
|
-
children: [
|
|
1001
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1002
|
-
className: "font-semibold",
|
|
1003
|
-
children: "Requires Capabilities"
|
|
1004
|
-
}),
|
|
1005
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1006
|
-
gap: "xs",
|
|
1007
|
-
wrap: "wrap",
|
|
1008
|
-
children: capabilities.requires.map((req) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1009
|
-
tone: "info",
|
|
1010
|
-
label: `${req.key}${req.version ? ` v${req.version}` : ""}${req.optional ? " (optional)" : ""}`,
|
|
1011
|
-
size: "sm"
|
|
1012
|
-
}, req.key))
|
|
1013
|
-
})
|
|
1014
|
-
]
|
|
1015
|
-
}) : null,
|
|
1016
|
-
meta.tags?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1017
|
-
className: "flex-col rounded-lg border p-4",
|
|
1018
|
-
gap: "sm",
|
|
1019
|
-
align: "start",
|
|
1020
|
-
children: [
|
|
1021
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1022
|
-
className: "font-semibold",
|
|
1023
|
-
children: "Tags"
|
|
1024
|
-
}),
|
|
1025
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1026
|
-
gap: "xs",
|
|
1027
|
-
wrap: "wrap",
|
|
1028
|
-
children: meta.tags.map((tag) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1029
|
-
tone: "neutral",
|
|
1030
|
-
label: `#${tag}`,
|
|
1031
|
-
size: "sm"
|
|
1032
|
-
}, tag))
|
|
1033
|
-
})
|
|
1034
|
-
]
|
|
1035
|
-
}) : null,
|
|
1036
|
-
meta.owners?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1037
|
-
className: "flex-col rounded-lg border p-4",
|
|
1038
|
-
gap: "sm",
|
|
1039
|
-
align: "start",
|
|
1040
|
-
children: [
|
|
1041
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1042
|
-
className: "font-semibold",
|
|
1043
|
-
children: "Owners"
|
|
1044
|
-
}),
|
|
1045
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1046
|
-
gap: "xs",
|
|
1047
|
-
wrap: "wrap",
|
|
1048
|
-
children: meta.owners.map((owner) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1049
|
-
tone: "neutral",
|
|
1050
|
-
label: owner,
|
|
1051
|
-
size: "sm"
|
|
1052
|
-
}, owner))
|
|
1053
|
-
})
|
|
1054
|
-
]
|
|
1055
|
-
}) : null
|
|
1056
|
-
]
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
// src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx
|
|
1060
|
-
import {
|
|
1061
|
-
Button as Button2,
|
|
1062
|
-
EmptyState,
|
|
1063
|
-
PageHeaderResponsive,
|
|
1064
|
-
StatusChip as StatusChip5
|
|
1065
|
-
} from "@contractspec/lib.design-system";
|
|
1066
|
-
import { HStack as HStack6, VStack as VStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
1067
|
-
import { cn as cn5 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
1068
|
-
import { LayoutGrid, List, Star } from "lucide-react";
|
|
1069
|
-
import * as React2 from "react";
|
|
1070
|
-
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1071
|
-
"use client";
|
|
1072
|
-
function groupFeaturesByDomain(features) {
|
|
1073
|
-
const groups = {};
|
|
1074
|
-
for (const feature of features) {
|
|
1075
|
-
const domain = feature.meta.domain || "Other";
|
|
1076
|
-
if (!groups[domain])
|
|
1077
|
-
groups[domain] = [];
|
|
1078
|
-
groups[domain].push(feature);
|
|
1079
|
-
}
|
|
1080
|
-
return groups;
|
|
1081
|
-
}
|
|
1082
|
-
function groupFeaturesByStability(features) {
|
|
1083
|
-
const order = ["stable", "beta", "experimental", "deprecated", "unknown"];
|
|
1084
|
-
const groups = {};
|
|
1085
|
-
for (const feature of features) {
|
|
1086
|
-
const stability = feature.meta.stability || "unknown";
|
|
1087
|
-
if (!groups[stability])
|
|
1088
|
-
groups[stability] = [];
|
|
1089
|
-
groups[stability].push(feature);
|
|
1090
|
-
}
|
|
1091
|
-
const sorted = {};
|
|
1092
|
-
for (const key of order) {
|
|
1093
|
-
if (groups[key])
|
|
1094
|
-
sorted[key] = groups[key];
|
|
1095
|
-
}
|
|
1096
|
-
return sorted;
|
|
1097
|
-
}
|
|
1098
|
-
function FeatureDiscovery({
|
|
1099
|
-
onSelectFeature,
|
|
1100
|
-
className,
|
|
1101
|
-
defaultViewMode = "grid",
|
|
1102
|
-
groupBy = "domain",
|
|
1103
|
-
showFeatured = true
|
|
1104
|
-
}) {
|
|
1105
|
-
const { features, getUniqueTags, getUniqueStabilities } = useFeatureRegistry();
|
|
1106
|
-
const {
|
|
1107
|
-
filters,
|
|
1108
|
-
setSearch,
|
|
1109
|
-
toggleTag,
|
|
1110
|
-
toggleStability,
|
|
1111
|
-
clearFilters,
|
|
1112
|
-
filteredFeatures,
|
|
1113
|
-
hasActiveFilters
|
|
1114
|
-
} = useFeatureFilters(features);
|
|
1115
|
-
const uniqueTags = getUniqueTags();
|
|
1116
|
-
const uniqueStabilities = getUniqueStabilities();
|
|
1117
|
-
const [viewMode, setViewMode] = React2.useState(defaultViewMode);
|
|
1118
|
-
const [collapsedGroups, setCollapsedGroups] = React2.useState(new Set);
|
|
1119
|
-
const featuredFeatures = React2.useMemo(() => filteredFeatures.filter((f) => f.meta.stability === "stable"), [filteredFeatures]);
|
|
1120
|
-
const nonFeaturedFeatures = React2.useMemo(() => showFeatured ? filteredFeatures.filter((f) => f.meta.stability !== "stable") : filteredFeatures, [filteredFeatures, showFeatured]);
|
|
1121
|
-
const groupedFeatures = React2.useMemo(() => {
|
|
1122
|
-
if (groupBy === "none")
|
|
1123
|
-
return null;
|
|
1124
|
-
if (groupBy === "domain")
|
|
1125
|
-
return groupFeaturesByDomain(nonFeaturedFeatures);
|
|
1126
|
-
return groupFeaturesByStability(nonFeaturedFeatures);
|
|
1127
|
-
}, [nonFeaturedFeatures, groupBy]);
|
|
1128
|
-
const toggleGroup = (group) => {
|
|
1129
|
-
setCollapsedGroups((prev) => {
|
|
1130
|
-
const next = new Set(prev);
|
|
1131
|
-
if (next.has(group)) {
|
|
1132
|
-
next.delete(group);
|
|
1133
|
-
} else {
|
|
1134
|
-
next.add(group);
|
|
1135
|
-
}
|
|
1136
|
-
return next;
|
|
1137
|
-
});
|
|
1138
|
-
};
|
|
1139
|
-
const gridClasses = viewMode === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "flex flex-col gap-3";
|
|
1140
|
-
const renderFeatureCards = (featureList) => /* @__PURE__ */ jsx8("div", {
|
|
1141
|
-
className: gridClasses,
|
|
1142
|
-
children: featureList.map((feature) => /* @__PURE__ */ jsx8(FeatureCard, {
|
|
1143
|
-
feature,
|
|
1144
|
-
onSelect: onSelectFeature
|
|
1145
|
-
}, feature.meta.key))
|
|
1146
|
-
});
|
|
1147
|
-
return /* @__PURE__ */ jsxs6(VStack3, {
|
|
1148
|
-
gap: "lg",
|
|
1149
|
-
className: cn5("w-full p-6", className),
|
|
1150
|
-
children: [
|
|
1151
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1152
|
-
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
1153
|
-
children: [
|
|
1154
|
-
/* @__PURE__ */ jsx8(PageHeaderResponsive, {
|
|
1155
|
-
title: "Feature Discovery",
|
|
1156
|
-
subtitle: `Browse ${features.length} available ContractSpec features`
|
|
1157
|
-
}),
|
|
1158
|
-
/* @__PURE__ */ jsxs6(HStack6, {
|
|
1159
|
-
gap: "xs",
|
|
1160
|
-
children: [
|
|
1161
|
-
/* @__PURE__ */ jsx8("button", {
|
|
1162
|
-
type: "button",
|
|
1163
|
-
onClick: () => setViewMode("grid"),
|
|
1164
|
-
className: cn5("rounded-md p-2 transition-colors", viewMode === "grid" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
|
|
1165
|
-
"aria-label": "Grid view",
|
|
1166
|
-
children: /* @__PURE__ */ jsx8(LayoutGrid, {
|
|
1167
|
-
className: "h-4 w-4"
|
|
1168
|
-
})
|
|
1169
|
-
}),
|
|
1170
|
-
/* @__PURE__ */ jsx8("button", {
|
|
1171
|
-
type: "button",
|
|
1172
|
-
onClick: () => setViewMode("list"),
|
|
1173
|
-
className: cn5("rounded-md p-2 transition-colors", viewMode === "list" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
|
|
1174
|
-
"aria-label": "List view",
|
|
1175
|
-
children: /* @__PURE__ */ jsx8(List, {
|
|
1176
|
-
className: "h-4 w-4"
|
|
1177
|
-
})
|
|
1178
|
-
})
|
|
1179
|
-
]
|
|
1180
|
-
})
|
|
1181
|
-
]
|
|
1182
|
-
}),
|
|
1183
|
-
/* @__PURE__ */ jsx8(FeatureFiltersBar, {
|
|
1184
|
-
uniqueTags,
|
|
1185
|
-
uniqueStabilities,
|
|
1186
|
-
filters,
|
|
1187
|
-
setSearch,
|
|
1188
|
-
toggleTag,
|
|
1189
|
-
toggleStability,
|
|
1190
|
-
clearFilters,
|
|
1191
|
-
hasActiveFilters
|
|
1192
|
-
}),
|
|
1193
|
-
filteredFeatures.length === 0 ? /* @__PURE__ */ jsx8(EmptyState, {
|
|
1194
|
-
title: "No features found",
|
|
1195
|
-
description: hasActiveFilters ? "Try adjusting your search or filters" : "No features are registered yet",
|
|
1196
|
-
primaryAction: hasActiveFilters ? /* @__PURE__ */ jsx8(Button2, {
|
|
1197
|
-
variant: "outline",
|
|
1198
|
-
onClick: clearFilters,
|
|
1199
|
-
children: "Clear filters"
|
|
1200
|
-
}) : undefined
|
|
1201
|
-
}) : /* @__PURE__ */ jsxs6(VStack3, {
|
|
1202
|
-
gap: "lg",
|
|
1203
|
-
children: [
|
|
1204
|
-
showFeatured && featuredFeatures.length > 0 && /* @__PURE__ */ jsxs6(VStack3, {
|
|
1205
|
-
gap: "sm",
|
|
1206
|
-
children: [
|
|
1207
|
-
/* @__PURE__ */ jsxs6(HStack6, {
|
|
1208
|
-
gap: "sm",
|
|
1209
|
-
className: "items-center",
|
|
1210
|
-
children: [
|
|
1211
|
-
/* @__PURE__ */ jsx8(Star, {
|
|
1212
|
-
className: "h-5 w-5 fill-amber-500 text-amber-500"
|
|
1213
|
-
}),
|
|
1214
|
-
/* @__PURE__ */ jsx8("span", {
|
|
1215
|
-
className: "font-semibold text-lg",
|
|
1216
|
-
children: "Featured"
|
|
1217
|
-
}),
|
|
1218
|
-
/* @__PURE__ */ jsx8(StatusChip5, {
|
|
1219
|
-
tone: "success",
|
|
1220
|
-
label: `${featuredFeatures.length} stable`,
|
|
1221
|
-
size: "sm"
|
|
1222
|
-
})
|
|
1223
|
-
]
|
|
1224
|
-
}),
|
|
1225
|
-
renderFeatureCards(featuredFeatures)
|
|
1226
|
-
]
|
|
1227
|
-
}),
|
|
1228
|
-
groupedFeatures ? /* @__PURE__ */ jsx8(VStack3, {
|
|
1229
|
-
gap: "md",
|
|
1230
|
-
children: Object.entries(groupedFeatures).map(([group, groupFeatures]) => /* @__PURE__ */ jsxs6(VStack3, {
|
|
1231
|
-
gap: "sm",
|
|
1232
|
-
children: [
|
|
1233
|
-
/* @__PURE__ */ jsx8(FeatureCategoryHeader, {
|
|
1234
|
-
title: group,
|
|
1235
|
-
count: groupFeatures.length,
|
|
1236
|
-
isCollapsed: collapsedGroups.has(group),
|
|
1237
|
-
onToggle: () => toggleGroup(group)
|
|
1238
|
-
}),
|
|
1239
|
-
!collapsedGroups.has(group) && renderFeatureCards(groupFeatures)
|
|
1240
|
-
]
|
|
1241
|
-
}, group))
|
|
1242
|
-
}) : renderFeatureCards(nonFeaturedFeatures)
|
|
1243
|
-
]
|
|
1244
|
-
})
|
|
1245
|
-
]
|
|
1246
|
-
});
|
|
1247
|
-
}
|
|
1248
|
-
// src/presentation/features/organisms/FeatureEventsList.tsx
|
|
1249
|
-
import { EntityCard as EntityCard3 } from "@contractspec/lib.design-system";
|
|
1250
|
-
import { Radio as Radio3 } from "lucide-react";
|
|
1251
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1252
|
-
"use client";
|
|
1253
|
-
function FeatureEventsList({ feature }) {
|
|
1254
|
-
if (!feature.events?.length)
|
|
1255
|
-
return null;
|
|
1256
|
-
return /* @__PURE__ */ jsx9("div", {
|
|
1257
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1258
|
-
children: feature.events.map((ev) => {
|
|
1259
|
-
const spec = resolveSerializedEventSpec(ev.key, ev.version);
|
|
1260
|
-
return /* @__PURE__ */ jsx9(EntityCard3, {
|
|
1261
|
-
cardTitle: ev.key,
|
|
1262
|
-
cardSubtitle: `v${ev.version}`,
|
|
1263
|
-
footer: spec?.meta.description,
|
|
1264
|
-
icon: /* @__PURE__ */ jsx9(Radio3, {
|
|
1265
|
-
className: "h-4 w-4"
|
|
1266
|
-
}),
|
|
1267
|
-
href: `/features/${feature.meta.key}/events/${ev.key}`
|
|
1268
|
-
}, ev.key);
|
|
1269
|
-
})
|
|
1270
|
-
});
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
// src/presentation/features/organisms/FeatureFormsList.tsx
|
|
1274
|
-
import { EntityCard as EntityCard4 } from "@contractspec/lib.design-system";
|
|
1275
|
-
import { FormInput } from "lucide-react";
|
|
1276
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1277
|
-
"use client";
|
|
1278
|
-
function FeatureFormsList({ feature }) {
|
|
1279
|
-
if (!feature.forms?.length)
|
|
1280
|
-
return null;
|
|
1281
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
1282
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1283
|
-
children: feature.forms.map((form) => {
|
|
1284
|
-
const spec = resolveSerializedFormSpec(form.key, form.version);
|
|
1285
|
-
return /* @__PURE__ */ jsx10(EntityCard4, {
|
|
1286
|
-
cardTitle: form.key,
|
|
1287
|
-
cardSubtitle: form.version ? `v${form.version}` : undefined,
|
|
1288
|
-
footer: spec?.meta.description,
|
|
1289
|
-
icon: /* @__PURE__ */ jsx10(FormInput, {
|
|
1290
|
-
className: "h-4 w-4"
|
|
1291
|
-
}),
|
|
1292
|
-
href: `/features/${feature.meta.key}/forms/${form.key}`
|
|
1293
|
-
}, form.key);
|
|
1294
|
-
})
|
|
1295
|
-
});
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
// src/presentation/features/organisms/FeatureOperationsList.tsx
|
|
1299
|
-
import { EntityCard as EntityCard5 } from "@contractspec/lib.design-system";
|
|
1300
|
-
import { Zap as Zap3 } from "lucide-react";
|
|
1301
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1302
|
-
"use client";
|
|
1303
|
-
function FeatureOperationsList({
|
|
1304
|
-
feature
|
|
1305
|
-
}) {
|
|
1306
|
-
if (!feature.operations?.length)
|
|
1307
|
-
return null;
|
|
1308
|
-
return /* @__PURE__ */ jsx11("div", {
|
|
1309
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1310
|
-
children: feature.operations.map((op) => {
|
|
1311
|
-
const spec = resolveSerializedOperationSpec(op.key, op.version);
|
|
1312
|
-
return /* @__PURE__ */ jsx11(EntityCard5, {
|
|
1313
|
-
cardTitle: op.key,
|
|
1314
|
-
cardSubtitle: `v${op.version}`,
|
|
1315
|
-
footer: spec?.meta.description,
|
|
1316
|
-
icon: /* @__PURE__ */ jsx11(Zap3, {
|
|
1317
|
-
className: "h-4 w-4"
|
|
1318
|
-
}),
|
|
1319
|
-
href: `/features/${feature.meta.key}/operations/${op.key}`
|
|
1320
|
-
}, op.key);
|
|
1321
|
-
})
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
// src/presentation/features/organisms/FeaturePresentationsList.tsx
|
|
1326
|
-
import { EntityCard as EntityCard6 } from "@contractspec/lib.design-system";
|
|
1327
|
-
import { Layout as Layout4 } from "lucide-react";
|
|
1328
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1329
|
-
"use client";
|
|
1330
|
-
function FeaturePresentationsList({
|
|
1331
|
-
feature
|
|
1332
|
-
}) {
|
|
1333
|
-
if (!feature.presentations?.length)
|
|
1334
|
-
return null;
|
|
1335
|
-
return /* @__PURE__ */ jsx12("div", {
|
|
1336
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1337
|
-
children: feature.presentations.map((pres) => {
|
|
1338
|
-
const spec = resolveSerializedPresentationSpec(pres.key, pres.version);
|
|
1339
|
-
return /* @__PURE__ */ jsx12(EntityCard6, {
|
|
1340
|
-
cardTitle: pres.key,
|
|
1341
|
-
cardSubtitle: `v${pres.version}`,
|
|
1342
|
-
footer: spec?.meta.description,
|
|
1343
|
-
icon: /* @__PURE__ */ jsx12(Layout4, {
|
|
1344
|
-
className: "h-4 w-4"
|
|
1345
|
-
}),
|
|
1346
|
-
href: `/features/${feature.meta.key}/presentations/${pres.key}`
|
|
1347
|
-
}, pres.key);
|
|
1348
|
-
})
|
|
1349
|
-
});
|
|
1350
|
-
}
|
|
1351
|
-
export {
|
|
1352
|
-
FeaturePresentationsList,
|
|
1353
|
-
FeatureOperationsList,
|
|
1354
|
-
FeatureFormsList,
|
|
1355
|
-
FeatureEventsList,
|
|
1356
|
-
FeatureDiscovery,
|
|
1357
|
-
FeatureDetail,
|
|
1358
|
-
FeatureDataViewsList
|
|
1359
|
-
};
|
|
1
|
+
import{EventRegistry as Z$,OperationSpecRegistry as U$}from"@contractspec/lib.contracts-spec";import{DataViewRegistry as O$}from"@contractspec/lib.contracts-spec/data-views";import{ContractReferenceDataView as V$,ContractReferenceQuery as N$,DocsGenerateCommand as G$,DocsGeneratedEvent as R$,DocsIndexDataView as A$,DocsIndexQuery as L$,DocsLayoutPresentation as M$,DocsPublishCommand as B$,DocsPublishedEvent as I$,DocsReferencePagePresentation as H$,DocsSearchForm as T$,ExampleCatalogDataView as m$}from"@contractspec/lib.contracts-spec/docs";import{FormRegistry as w$}from"@contractspec/lib.contracts-spec/forms";import{PresentationRegistry as q$}from"@contractspec/lib.contracts-spec/presentations";import{serializeDataViewSpec as h$,serializeEventSpec as F$,serializeFormSpec as C$,serializeOperationSpec as k$,serializePresentationSpec as v$}from"@contractspec/lib.contracts-spec/serialization";var y=null;function T4(){let D=new U$;return D.register(L$).register(N$).register(G$).register(B$),D}function m4(){if(!y)y=T4();return y}function w4(D,$){return m4().get(D,$)}var b=null;function q4(){let D=new Z$;return D.register(R$).register(I$),D}function h4(){if(!b)b=q4();return b}function F4(D,$){return h4().get(D,$)}var f=null;function C4(){let D=new q$;return D.register(M$).register(H$),D}function k4(){if(!f)f=C4();return f}function v4(D,$){return k4().get(D,$)}var p=null;function d4(){let D=new O$;return D.register(A$).register(V$).register(m$),D}function S4(){if(!p)p=d4();return p}function y4(D,$){return S4().get(D,$)}var x=null;function b4(){let D=new w$;return D.register(T$),D}function f4(){if(!x)x=b4();return x}function p4(D,$){return f4().get(D)}function r(D,$){let E=w4(D,$);return k$(E)??void 0}function i(D,$){let E=F4(D,$);return F$(E)??void 0}function a(D,$){let E=v4(D,$);return v$(E)??void 0}function t(D,$){let E=y4(D,$);return h$(E)??void 0}function s(D,$){let E=p4(D,$);return C$(E)??void 0}function x4(){y=null}function j4(){b=null}function g4(){f=null}function c4(){p=null}function o4(){x=null}function d$(){x4(),j4(),g4(),c4(),o4()}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:[]}};import{ContractReferenceQuery as S$,DocSummaryModel as y$,DocsIndexInput as b$,DocsIndexOutput as f$,DocsIndexQuery as p$,DocsIndexQuery as x$}from"@contractspec/lib.contracts-spec/docs";var $4={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 D4={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 j$}from"@contractspec/lib.contracts-spec/app-config";import{FeatureRegistry as g$}from"@contractspec/lib.contracts-spec/features";function n4(){let D=new g$;return D.register(e),D.register($4),D.register(D4),D.register(j$),D}var j=null;function E4(){if(!j)j=n4();return j}function c$(){j=null}import{FeatureRegistry as G1}from"@contractspec/lib.contracts-spec/features";import{cn as o$}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as n$,Database as Q4,FileText as g,Globe as l4,Layout as w,MessageSquare as l$,Settings as u$,Shield as J4,Workflow as K4}from"lucide-react";import*as u4 from"react";import{jsx as t$}from"react/jsx-runtime";var r$={platform:u$,documentation:g,docs:g,integration:K4,api:l4,security:J4,data:Q4,messaging:l$,ui:w,presentation:w},i$={documentation:g,guides:g,"api-reference":l4,presentations:w,ui:w,rendering:w,mcp:K4,integration:K4,security:J4,auth:J4,data:Q4,storage:Q4},r4={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"},a$={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};function X4({domain:D,tags:$=[],stability:E,icon:Q,size:X="md",className:J}){let U=u4.useMemo(()=>{if(Q)return Q;if(D){let z=r$[D.toLowerCase()];if(z)return z}for(let z of $){let K=i$[z.toLowerCase()];if(K)return K}return n$},[D,$,Q]),P=E?r4[E]||"primary":"primary",Y={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 t$(U,{className:o$(a$[X],Y[P],J)})}function Y4(D){if(!D)return"primary";return r4[D]||"primary"}import{useCallback as q,useMemo as i4,useState as s$}from"react";var a4={search:"",tags:[],stability:[],domain:[]};function t4(D){let[$,E]=s$(a4),Q=q((K)=>{E((_)=>({..._,search:K}))},[]),X=q((K)=>{E((_)=>({..._,tags:_.tags.includes(K)?_.tags.filter((G)=>G!==K):[..._.tags,K]}))},[]),J=q((K)=>{E((_)=>({..._,stability:_.stability.includes(K)?_.stability.filter((G)=>G!==K):[..._.stability,K]}))},[]),U=q((K)=>{E((_)=>({..._,domain:_.domain.includes(K)?_.domain.filter((G)=>G!==K):[..._.domain,K]}))},[]),P=q(()=>E(a4),[]),Y=i4(()=>{return $.search.length>0||$.tags.length>0||$.stability.length>0||$.domain.length>0},[$]),z=i4(()=>{return D.filter((K)=>{if($.search){let _=$.search.toLowerCase();if(!((K.meta.title??"").toLowerCase().includes(_)||K.meta.description?.toLowerCase().includes(_)||K.meta.key.toLowerCase().includes(_)))return!1}if($.tags.length>0){if(!$.tags.some((G)=>K.meta.tags?.includes(G)))return!1}if($.stability.length>0){if(!$.stability.includes(K.meta.stability??"unknown"))return!1}if($.domain.length>0){if(!$.domain.includes(K.meta.domain??"unknown"))return!1}return!0})},[D,$]);return{filters:$,setSearch:Q,toggleTag:X,toggleStability:J,toggleDomain:U,clearFilters:P,filteredFeatures:z,hasActiveFilters:Y}}import{useMemo as s4}from"react";function e4(){let D=s4(()=>E4(),[]);return s4(()=>{let $=D.list();return{features:$,getFeature:(E)=>D.get(E),getByTag:(E)=>D.listByTag(E),getByOwner:(E)=>D.listByOwner(E),getUniqueTags:()=>D.getUniqueTags(),getUniqueDomains:()=>{let E=new Set;for(let Q of $)if(Q.meta.domain)E.add(Q.meta.domain);return[...E].sort()},getUniqueStabilities:()=>{let E=new Set;for(let Q of $)if(Q.meta.stability)E.add(Q.meta.stability);return[...E].sort()}}},[D])}import{StatusChip as $$}from"@contractspec/lib.design-system";import{HStack as h}from"@contractspec/lib.ui-kit-web/ui/stack";import{ArrowRight as e$,Layout as $D,Radio as DD,Shield as ED,Tag as QD,Users as JD,Zap as KD}from"lucide-react";import{jsx as Z,jsxs as N,Fragment as XD}from"react/jsx-runtime";function _4({feature:D}){let{meta:$,operations:E,events:Q,presentations:X,capabilities:J}=D,U=J?.provides?.length||J?.requires?.length;return N(XD,{children:[$.description&&Z("p",{className:"text-muted-foreground text-sm leading-relaxed",children:$.description}),N(h,{gap:"md",className:"py-2",children:[E?.length?N("div",{className:"flex items-center gap-1.5 text-sm",children:[Z(KD,{className:"h-4 w-4 text-amber-500"}),Z("span",{className:"font-medium",children:E.length}),Z("span",{className:"text-muted-foreground",children:"ops"})]}):null,Q?.length?N("div",{className:"flex items-center gap-1.5 text-sm",children:[Z(DD,{className:"h-4 w-4 text-blue-500"}),Z("span",{className:"font-medium",children:Q.length}),Z("span",{className:"text-muted-foreground",children:"events"})]}):null,X?.length?N("div",{className:"flex items-center gap-1.5 text-sm",children:[Z($D,{className:"h-4 w-4 text-purple-500"}),Z("span",{className:"font-medium",children:X.length}),Z("span",{className:"text-muted-foreground",children:"views"})]}):null]}),U&&N("div",{className:"space-y-1.5 border-border/50 border-t pt-1",children:[J?.provides?.length?N(h,{gap:"xs",wrap:"wrap",className:"items-start",children:[Z(ED,{className:"mt-0.5 h-3.5 w-3.5 text-emerald-500"}),Z("span",{className:"text-muted-foreground text-xs",children:"Provides:"}),J.provides.slice(0,2).map((P)=>Z($$,{tone:"success",label:P.key,size:"sm"},P.key)),J.provides.length>2&&N("span",{className:"text-muted-foreground text-xs",children:["+",J.provides.length-2]})]}):null,J?.requires?.length?N(h,{gap:"xs",wrap:"wrap",className:"items-start",children:[Z(e$,{className:"mt-0.5 h-3.5 w-3.5 text-blue-500"}),Z("span",{className:"text-muted-foreground text-xs",children:"Requires:"}),J.requires.slice(0,2).map((P)=>Z($$,{tone:"info",label:P.key,size:"sm"},P.key)),J.requires.length>2&&N("span",{className:"text-muted-foreground text-xs",children:["+",J.requires.length-2]})]}):null]}),$.tags?.length?N(h,{gap:"xs",wrap:"wrap",className:"items-center border-border/50 border-t pt-1",children:[Z(QD,{className:"h-3.5 w-3.5 text-muted-foreground"}),$.tags.slice(0,4).map((P)=>N("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",children:["#",P]},P)),$.tags.length>4&&N("span",{className:"text-muted-foreground text-xs",children:["+",$.tags.length-4]})]}):null,$.owners?.length?N(h,{gap:"xs",className:"items-center text-muted-foreground text-xs",children:[Z(JD,{className:"h-3.5 w-3.5"}),Z("span",{children:$.owners.join(", ")})]}):null]})}import{EntityCard as YD,StatusChip as _D}from"@contractspec/lib.design-system";import{HStack as D$}from"@contractspec/lib.ui-kit-web/ui/stack";import{Layout as zD,Radio as PD,Shield as WD,Zap as ZD}from"lucide-react";import{jsx as R,jsxs as T}from"react/jsx-runtime";var UD={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function z4({feature:D,onSelect:$,className:E}){let{meta:Q,operations:X,events:J,presentations:U,capabilities:P}=D,Y=UD[Q.stability]??"neutral",z=Y4(Q.stability),K=Q.stability==="stable"?"strong":"default",_=$?()=>$(D):void 0,G=P?.provides?.length||P?.requires?.length;return R(YD,{cardTitle:Q.title,cardSubtitle:Q.key,className:E,onClick:_,emphasis:K,icon:R(X4,{domain:Q.domain,tags:Q.tags,stability:Q.stability,size:"md"}),iconTone:z,chips:R(_D,{tone:Y,label:Q.stability??"unknown",size:"sm"}),meta:Q.description?R("span",{className:"line-clamp-2 text-muted-foreground text-sm",children:Q.description}):void 0,preview:R(_4,{feature:D}),footer:T(D$,{gap:"md",className:"w-full justify-between text-muted-foreground text-xs",children:[T(D$,{gap:"sm",children:[X?.length?T("span",{className:"flex items-center gap-1",children:[R(ZD,{className:"h-3 w-3 text-amber-500"}),X.length]}):null,J?.length?T("span",{className:"flex items-center gap-1",children:[R(PD,{className:"h-3 w-3 text-blue-500"}),J.length]}):null,U?.length?T("span",{className:"flex items-center gap-1",children:[R(zD,{className:"h-3 w-3 text-purple-500"}),U.length]}):null]}),G&&T("span",{className:"flex items-center gap-1",children:[R(WD,{className:"h-3 w-3 text-emerald-500"}),(P?.provides?.length??0)+(P?.requires?.length??0)]})]})})}import{StatusChip as OD}from"@contractspec/lib.design-system";import{HStack as VD}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as E$}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as ND,ChevronDown as GD}from"lucide-react";import{jsx as F,jsxs as Q$}from"react/jsx-runtime";function P4({title:D,count:$,icon:E,isCollapsed:Q=!1,onToggle:X,className:J}){return Q$("button",{type:"button",onClick:X,className:E$("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",J),children:[Q$(VD,{gap:"sm",className:"items-center",children:[F("div",{className:"text-muted-foreground transition-colors group-hover:text-foreground",children:E||F(ND,{className:"h-5 w-5"})}),F("span",{className:"font-semibold text-lg capitalize transition-colors group-hover:text-primary",children:D}),F(OD,{tone:"neutral",label:`${$} ${$===1?"feature":"features"}`,size:"sm"})]}),F(GD,{className:E$("h-5 w-5 text-muted-foreground transition-transform duration-200",Q&&"-rotate-90")})]})}import{Button as W4,Input as RD}from"@contractspec/lib.design-system";import{HStack as Z4,VStack as AD}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as LD}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as C,jsxs as m}from"react/jsx-runtime";function U4({uniqueTags:D,uniqueStabilities:$,filters:E,setSearch:Q,toggleTag:X,toggleStability:J,clearFilters:U,hasActiveFilters:P,className:Y}){return m(AD,{gap:"md",className:LD("w-full",Y),children:[m(Z4,{gap:"md",justify:"between",className:"w-full",children:[C(RD,{placeholder:"Search features...",value:E.search,onChange:(z)=>Q(z.target.value),className:"max-w-md","aria-label":"Search features"}),P&&C(W4,{variant:"ghost",size:"sm",onClick:U,children:"Clear filters"})]}),$.length>0&&m(Z4,{gap:"xs",wrap:"wrap",children:[C("span",{className:"text-muted-foreground text-sm",children:"Stability:"}),$.map((z)=>C(W4,{variant:E.stability.includes(z)?"default":"outline",size:"sm",onClick:()=>J(z),"aria-pressed":E.stability.includes(z),children:z},z))]}),D.length>0&&m(Z4,{gap:"xs",wrap:"wrap",children:[C("span",{className:"text-muted-foreground text-sm",children:"Tags:"}),D.slice(0,10).map((z)=>m(W4,{variant:E.tags.includes(z)?"default":"outline",size:"sm",onClick:()=>X(z),"aria-pressed":E.tags.includes(z),children:["#",z]},z)),D.length>10&&m("span",{className:"text-muted-foreground text-sm",children:["+",D.length-10," more"]})]})]})}import{EntityCard as MD}from"@contractspec/lib.design-system";import{Table as BD}from"lucide-react";import{jsx as O4}from"react/jsx-runtime";function ID({feature:D}){if(!D.dataViews?.length)return null;return O4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:D.dataViews.map(($)=>{let E=t($.key,$.version);return O4(MD,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:E?.meta.description,icon:O4(BD,{className:"h-4 w-4"}),href:`/features/${D.meta.key}/dataviews/${$.key}`},$.key)})})}import{StatCard as V4,StatCardGroup as HD,StatusChip as M}from"@contractspec/lib.design-system";import{Box as c,HStack as k,VStack as TD}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as mD}from"@contractspec/lib.ui-kit-web/ui/utils";import N4 from"next/link";import{jsx as W,jsxs as B}from"react/jsx-runtime";var wD={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function J$({feature:D,className:$}){let{meta:E,operations:Q,events:X,presentations:J,capabilities:U}=D,P=wD[E.stability]??"neutral";return B(TD,{gap:"lg",className:mD("w-full",$),children:[B(k,{gap:"sm",children:[W(M,{tone:P,label:E.stability??"unknown"}),W(M,{tone:"neutral",label:E.key,size:"sm"}),W(M,{tone:"neutral",label:`v${E.version}`,size:"sm"})]}),B(HD,{children:[W(N4,{href:`./${D.meta.key}/operations`,children:W(V4,{label:"Operations",value:Q?.length??0})}),W(N4,{href:`./${D.meta.key}/events`,children:W(V4,{label:"Events",value:X?.length??0})}),W(N4,{href:`./${D.meta.key}/presentations`,children:W(V4,{label:"Presentations",value:J?.length??0})})]}),U?.provides?.length?B(c,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[W("span",{className:"font-semibold",children:"Provides Capabilities"}),W(k,{gap:"xs",wrap:"wrap",children:U.provides.map((Y)=>W(M,{tone:"success",label:`${Y.key} v${Y.version}`,size:"sm"},`${Y.key}-${Y.version}`))})]}):null,U?.requires?.length?B(c,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[W("span",{className:"font-semibold",children:"Requires Capabilities"}),W(k,{gap:"xs",wrap:"wrap",children:U.requires.map((Y)=>W(M,{tone:"info",label:`${Y.key}${Y.version?` v${Y.version}`:""}${Y.optional?" (optional)":""}`,size:"sm"},Y.key))})]}):null,E.tags?.length?B(c,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[W("span",{className:"font-semibold",children:"Tags"}),W(k,{gap:"xs",wrap:"wrap",children:E.tags.map((Y)=>W(M,{tone:"neutral",label:`#${Y}`,size:"sm"},Y))})]}):null,E.owners?.length?B(c,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[W("span",{className:"font-semibold",children:"Owners"}),W(k,{gap:"xs",wrap:"wrap",children:E.owners.map((Y)=>W(M,{tone:"neutral",label:Y,size:"sm"},Y))})]}):null]})}import{Button as qD,EmptyState as hD,PageHeaderResponsive as FD,StatusChip as CD}from"@contractspec/lib.design-system";import{HStack as K$,VStack as v}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as G4}from"@contractspec/lib.ui-kit-web/ui/utils";import{LayoutGrid as kD,List as vD,Star as dD}from"lucide-react";import*as H from"react";import{jsx as V,jsxs as I}from"react/jsx-runtime";function SD(D){let $={};for(let E of D){let Q=E.meta.domain||"Other";if(!$[Q])$[Q]=[];$[Q].push(E)}return $}function yD(D){let $=["stable","beta","experimental","deprecated","unknown"],E={};for(let X of D){let J=X.meta.stability||"unknown";if(!E[J])E[J]=[];E[J].push(X)}let Q={};for(let X of $)if(E[X])Q[X]=E[X];return Q}function X$({onSelectFeature:D,className:$,defaultViewMode:E="grid",groupBy:Q="domain",showFeatured:X=!0}){let{features:J,getUniqueTags:U,getUniqueStabilities:P}=e4(),{filters:Y,setSearch:z,toggleTag:K,toggleStability:_,clearFilters:G,filteredFeatures:A,hasActiveFilters:o}=t4(J),Y$=U(),_$=P(),[n,B4]=H.useState(E),[I4,z$]=H.useState(new Set),l=H.useMemo(()=>A.filter((O)=>O.meta.stability==="stable"),[A]),d=H.useMemo(()=>X?A.filter((O)=>O.meta.stability!=="stable"):A,[A,X]),H4=H.useMemo(()=>{if(Q==="none")return null;if(Q==="domain")return SD(d);return yD(d)},[d,Q]),P$=(O)=>{z$((L)=>{let S=new Set(L);if(S.has(O))S.delete(O);else S.add(O);return S})},W$=n==="grid"?"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3":"flex flex-col gap-3",u=(O)=>V("div",{className:W$,children:O.map((L)=>V(z4,{feature:L,onSelect:D},L.meta.key))});return I(v,{gap:"lg",className:G4("w-full p-6",$),children:[I("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[V(FD,{title:"Feature Discovery",subtitle:`Browse ${J.length} available ContractSpec features`}),I(K$,{gap:"xs",children:[V("button",{type:"button",onClick:()=>B4("grid"),className:G4("rounded-md p-2 transition-colors",n==="grid"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"Grid view",children:V(kD,{className:"h-4 w-4"})}),V("button",{type:"button",onClick:()=>B4("list"),className:G4("rounded-md p-2 transition-colors",n==="list"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"List view",children:V(vD,{className:"h-4 w-4"})})]})]}),V(U4,{uniqueTags:Y$,uniqueStabilities:_$,filters:Y,setSearch:z,toggleTag:K,toggleStability:_,clearFilters:G,hasActiveFilters:o}),A.length===0?V(hD,{title:"No features found",description:o?"Try adjusting your search or filters":"No features are registered yet",primaryAction:o?V(qD,{variant:"outline",onClick:G,children:"Clear filters"}):void 0}):I(v,{gap:"lg",children:[X&&l.length>0&&I(v,{gap:"sm",children:[I(K$,{gap:"sm",className:"items-center",children:[V(dD,{className:"h-5 w-5 fill-amber-500 text-amber-500"}),V("span",{className:"font-semibold text-lg",children:"Featured"}),V(CD,{tone:"success",label:`${l.length} stable`,size:"sm"})]}),u(l)]}),H4?V(v,{gap:"md",children:Object.entries(H4).map(([O,L])=>I(v,{gap:"sm",children:[V(P4,{title:O,count:L.length,isCollapsed:I4.has(O),onToggle:()=>P$(O)}),!I4.has(O)&&u(L)]},O))}):u(d)]})]})}import{EntityCard as bD}from"@contractspec/lib.design-system";import{Radio as fD}from"lucide-react";import{jsx as R4}from"react/jsx-runtime";function pD({feature:D}){if(!D.events?.length)return null;return R4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:D.events.map(($)=>{let E=i($.key,$.version);return R4(bD,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:E?.meta.description,icon:R4(fD,{className:"h-4 w-4"}),href:`/features/${D.meta.key}/events/${$.key}`},$.key)})})}import{EntityCard as xD}from"@contractspec/lib.design-system";import{FormInput as jD}from"lucide-react";import{jsx as A4}from"react/jsx-runtime";function gD({feature:D}){if(!D.forms?.length)return null;return A4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:D.forms.map(($)=>{let E=s($.key,$.version);return A4(xD,{cardTitle:$.key,cardSubtitle:$.version?`v${$.version}`:void 0,footer:E?.meta.description,icon:A4(jD,{className:"h-4 w-4"}),href:`/features/${D.meta.key}/forms/${$.key}`},$.key)})})}import{EntityCard as cD}from"@contractspec/lib.design-system";import{Zap as oD}from"lucide-react";import{jsx as L4}from"react/jsx-runtime";function nD({feature:D}){if(!D.operations?.length)return null;return L4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:D.operations.map(($)=>{let E=r($.key,$.version);return L4(cD,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:E?.meta.description,icon:L4(oD,{className:"h-4 w-4"}),href:`/features/${D.meta.key}/operations/${$.key}`},$.key)})})}import{EntityCard as lD}from"@contractspec/lib.design-system";import{Layout as uD}from"lucide-react";import{jsx as M4}from"react/jsx-runtime";function rD({feature:D}){if(!D.presentations?.length)return null;return M4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:D.presentations.map(($)=>{let E=a($.key,$.version);return M4(lD,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:E?.meta.description,icon:M4(uD,{className:"h-4 w-4"}),href:`/features/${D.meta.key}/presentations/${$.key}`},$.key)})})}export{rD as FeaturePresentationsList,nD as FeatureOperationsList,gD as FeatureFormsList,pD as FeatureEventsList,X$ as FeatureDiscovery,J$ as FeatureDetail,ID as FeatureDataViewsList};
|