@contractspec/bundle.library 3.8.10 → 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 +37 -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 -24310
- 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 -325
- package/dist/components/docs/specs/index.d.ts +3 -0
- package/dist/components/docs/specs/index.js +109 -1715
- 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 -28593
- 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 -24310
- 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 -325
- package/dist/node/components/docs/specs/index.js +109 -1715
- 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 -28593
- 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 +103 -31
- 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/index.ts +3 -0
- package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
- package/src/infrastructure/elysia/logger.ts +11 -3
|
@@ -1,3064 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/features/contracts-registry.ts
|
|
3
|
-
import {
|
|
4
|
-
EventRegistry,
|
|
5
|
-
OperationSpecRegistry
|
|
6
|
-
} from "@contractspec/lib.contracts-spec";
|
|
7
|
-
import {
|
|
8
|
-
DataViewRegistry
|
|
9
|
-
} from "@contractspec/lib.contracts-spec/data-views";
|
|
10
|
-
import {
|
|
11
|
-
ContractReferenceDataView,
|
|
12
|
-
ContractReferenceQuery,
|
|
13
|
-
DocsGenerateCommand,
|
|
14
|
-
DocsGeneratedEvent,
|
|
15
|
-
DocsIndexDataView,
|
|
16
|
-
DocsIndexQuery,
|
|
17
|
-
DocsLayoutPresentation,
|
|
18
|
-
DocsPublishCommand,
|
|
19
|
-
DocsPublishedEvent,
|
|
20
|
-
DocsReferencePagePresentation,
|
|
21
|
-
DocsSearchForm,
|
|
22
|
-
ExampleCatalogDataView
|
|
23
|
-
} from "@contractspec/lib.contracts-spec/docs";
|
|
24
|
-
import { FormRegistry } from "@contractspec/lib.contracts-spec/forms";
|
|
25
|
-
import {
|
|
26
|
-
PresentationRegistry
|
|
27
|
-
} from "@contractspec/lib.contracts-spec/presentations";
|
|
28
|
-
import {
|
|
29
|
-
serializeDataViewSpec,
|
|
30
|
-
serializeEventSpec,
|
|
31
|
-
serializeFormSpec,
|
|
32
|
-
serializeOperationSpec,
|
|
33
|
-
serializePresentationSpec
|
|
34
|
-
} from "@contractspec/lib.contracts-spec/serialization";
|
|
35
|
-
var operationRegistry = null;
|
|
36
|
-
function createContractSpecOperationRegistry() {
|
|
37
|
-
const registry = new OperationSpecRegistry;
|
|
38
|
-
registry.register(DocsIndexQuery).register(ContractReferenceQuery).register(DocsGenerateCommand).register(DocsPublishCommand);
|
|
39
|
-
return registry;
|
|
40
|
-
}
|
|
41
|
-
function getContractSpecOperationRegistry() {
|
|
42
|
-
if (!operationRegistry) {
|
|
43
|
-
operationRegistry = createContractSpecOperationRegistry();
|
|
44
|
-
}
|
|
45
|
-
return operationRegistry;
|
|
46
|
-
}
|
|
47
|
-
function resolveOperationSpec(key, version) {
|
|
48
|
-
return getContractSpecOperationRegistry().get(key, version);
|
|
49
|
-
}
|
|
50
|
-
var eventRegistry = null;
|
|
51
|
-
function createContractSpecEventRegistry() {
|
|
52
|
-
const registry = new EventRegistry;
|
|
53
|
-
registry.register(DocsGeneratedEvent).register(DocsPublishedEvent);
|
|
54
|
-
return registry;
|
|
55
|
-
}
|
|
56
|
-
function getContractSpecEventRegistry() {
|
|
57
|
-
if (!eventRegistry) {
|
|
58
|
-
eventRegistry = createContractSpecEventRegistry();
|
|
59
|
-
}
|
|
60
|
-
return eventRegistry;
|
|
61
|
-
}
|
|
62
|
-
function resolveEventSpec(key, version) {
|
|
63
|
-
return getContractSpecEventRegistry().get(key, version);
|
|
64
|
-
}
|
|
65
|
-
var presentationRegistry = null;
|
|
66
|
-
function createContractSpecPresentationRegistry() {
|
|
67
|
-
const registry = new PresentationRegistry;
|
|
68
|
-
registry.register(DocsLayoutPresentation).register(DocsReferencePagePresentation);
|
|
69
|
-
return registry;
|
|
70
|
-
}
|
|
71
|
-
function getContractSpecPresentationRegistry() {
|
|
72
|
-
if (!presentationRegistry) {
|
|
73
|
-
presentationRegistry = createContractSpecPresentationRegistry();
|
|
74
|
-
}
|
|
75
|
-
return presentationRegistry;
|
|
76
|
-
}
|
|
77
|
-
function resolvePresentationSpec(key, version) {
|
|
78
|
-
return getContractSpecPresentationRegistry().get(key, version);
|
|
79
|
-
}
|
|
80
|
-
var dataViewRegistry = null;
|
|
81
|
-
function createContractSpecDataViewRegistry() {
|
|
82
|
-
const registry = new DataViewRegistry;
|
|
83
|
-
registry.register(DocsIndexDataView).register(ContractReferenceDataView).register(ExampleCatalogDataView);
|
|
84
|
-
return registry;
|
|
85
|
-
}
|
|
86
|
-
function getContractSpecDataViewRegistry() {
|
|
87
|
-
if (!dataViewRegistry) {
|
|
88
|
-
dataViewRegistry = createContractSpecDataViewRegistry();
|
|
89
|
-
}
|
|
90
|
-
return dataViewRegistry;
|
|
91
|
-
}
|
|
92
|
-
function resolveDataViewSpec(key, version) {
|
|
93
|
-
return getContractSpecDataViewRegistry().get(key, version);
|
|
94
|
-
}
|
|
95
|
-
var formRegistry = null;
|
|
96
|
-
function createContractSpecFormRegistry() {
|
|
97
|
-
const registry = new FormRegistry;
|
|
98
|
-
registry.register(DocsSearchForm);
|
|
99
|
-
return registry;
|
|
100
|
-
}
|
|
101
|
-
function getContractSpecFormRegistry() {
|
|
102
|
-
if (!formRegistry) {
|
|
103
|
-
formRegistry = createContractSpecFormRegistry();
|
|
104
|
-
}
|
|
105
|
-
return formRegistry;
|
|
106
|
-
}
|
|
107
|
-
function resolveFormSpec(key, _version) {
|
|
108
|
-
return getContractSpecFormRegistry().get(key);
|
|
109
|
-
}
|
|
110
|
-
function resolveSerializedOperationSpec(key, version) {
|
|
111
|
-
const spec = resolveOperationSpec(key, version);
|
|
112
|
-
return serializeOperationSpec(spec) ?? undefined;
|
|
113
|
-
}
|
|
114
|
-
function resolveSerializedEventSpec(key, version) {
|
|
115
|
-
const spec = resolveEventSpec(key, version);
|
|
116
|
-
return serializeEventSpec(spec) ?? undefined;
|
|
117
|
-
}
|
|
118
|
-
function resolveSerializedPresentationSpec(key, version) {
|
|
119
|
-
const spec = resolvePresentationSpec(key, version);
|
|
120
|
-
return serializePresentationSpec(spec) ?? undefined;
|
|
121
|
-
}
|
|
122
|
-
function resolveSerializedDataViewSpec(key, version) {
|
|
123
|
-
const spec = resolveDataViewSpec(key, version);
|
|
124
|
-
return serializeDataViewSpec(spec) ?? undefined;
|
|
125
|
-
}
|
|
126
|
-
function resolveSerializedFormSpec(key, version) {
|
|
127
|
-
const spec = resolveFormSpec(key, version);
|
|
128
|
-
return serializeFormSpec(spec) ?? undefined;
|
|
129
|
-
}
|
|
130
|
-
function resetContractSpecOperationRegistry() {
|
|
131
|
-
operationRegistry = null;
|
|
132
|
-
}
|
|
133
|
-
function resetContractSpecEventRegistry() {
|
|
134
|
-
eventRegistry = null;
|
|
135
|
-
}
|
|
136
|
-
function resetContractSpecPresentationRegistry() {
|
|
137
|
-
presentationRegistry = null;
|
|
138
|
-
}
|
|
139
|
-
function resetContractSpecDataViewRegistry() {
|
|
140
|
-
dataViewRegistry = null;
|
|
141
|
-
}
|
|
142
|
-
function resetContractSpecFormRegistry() {
|
|
143
|
-
formRegistry = null;
|
|
144
|
-
}
|
|
145
|
-
function resetAllContractSpecRegistries() {
|
|
146
|
-
resetContractSpecOperationRegistry();
|
|
147
|
-
resetContractSpecEventRegistry();
|
|
148
|
-
resetContractSpecPresentationRegistry();
|
|
149
|
-
resetContractSpecDataViewRegistry();
|
|
150
|
-
resetContractSpecFormRegistry();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// src/features/docs.feature.ts
|
|
154
|
-
var DocsFeature = {
|
|
155
|
-
meta: {
|
|
156
|
-
key: "contractspec.docs",
|
|
157
|
-
version: "1.0.0",
|
|
158
|
-
title: "Documentation",
|
|
159
|
-
description: "Comprehensive documentation system for ContractSpec",
|
|
160
|
-
domain: "platform",
|
|
161
|
-
owners: ["@platform.docs"],
|
|
162
|
-
tags: ["documentation", "guides", "api-reference"],
|
|
163
|
-
stability: "stable"
|
|
164
|
-
},
|
|
165
|
-
operations: [
|
|
166
|
-
{ key: "docs_search", version: "1.0.0" },
|
|
167
|
-
{ key: "docs.navigate", version: "1.0.0" }
|
|
168
|
-
],
|
|
169
|
-
events: [
|
|
170
|
-
{ key: "docs.page_viewed", version: "1.0.0" },
|
|
171
|
-
{ key: "docs.search_performed", version: "1.0.0" }
|
|
172
|
-
],
|
|
173
|
-
presentations: [
|
|
174
|
-
{ key: "docs.landing", version: "1.0.0" },
|
|
175
|
-
{ key: "docs.getting-started", version: "1.0.0" },
|
|
176
|
-
{ key: "docs.architecture", version: "1.0.0" }
|
|
177
|
-
],
|
|
178
|
-
capabilities: {
|
|
179
|
-
provides: [{ key: "contracts.docs", version: "1.0.0" }],
|
|
180
|
-
requires: []
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// src/features/docs/docs.contracts.ts
|
|
185
|
-
import {
|
|
186
|
-
ContractReferenceQuery as ContractReferenceQuery2,
|
|
187
|
-
DocSummaryModel,
|
|
188
|
-
DocsIndexInput,
|
|
189
|
-
DocsIndexOutput,
|
|
190
|
-
DocsIndexQuery as DocsIndexQuery2,
|
|
191
|
-
DocsIndexQuery as DocsIndexQuery3
|
|
192
|
-
} from "@contractspec/lib.contracts-spec/docs";
|
|
193
|
-
// src/features/mcp.feature.ts
|
|
194
|
-
var MCPFeature = {
|
|
195
|
-
meta: {
|
|
196
|
-
key: "contractspec.mcp",
|
|
197
|
-
version: "1.0.0",
|
|
198
|
-
title: "MCP Integration",
|
|
199
|
-
description: "Model Context Protocol server for AI agent integration",
|
|
200
|
-
domain: "platform",
|
|
201
|
-
owners: ["@platform.mcp"],
|
|
202
|
-
tags: ["mcp", "ai-agents", "tooling"],
|
|
203
|
-
stability: "beta"
|
|
204
|
-
},
|
|
205
|
-
operations: [
|
|
206
|
-
{ key: "mcp.tool.register", version: "1.0.0" },
|
|
207
|
-
{ key: "mcp.resource.register", version: "1.0.0" },
|
|
208
|
-
{ key: "mcp.prompt.register", version: "1.0.0" }
|
|
209
|
-
],
|
|
210
|
-
events: [
|
|
211
|
-
{ key: "mcp.tool_invoked", version: "1.0.0" },
|
|
212
|
-
{ key: "mcp.resource_accessed", version: "1.0.0" }
|
|
213
|
-
],
|
|
214
|
-
presentations: [],
|
|
215
|
-
capabilities: {
|
|
216
|
-
provides: [{ key: "contracts.mcp", version: "1.0.0" }],
|
|
217
|
-
requires: [{ key: "contracts.operations", version: "1.0.0" }]
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
// src/features/presentations.feature.ts
|
|
222
|
-
var PresentationsFeature = {
|
|
223
|
-
meta: {
|
|
224
|
-
key: "contractspec.presentations",
|
|
225
|
-
version: "1.0.0",
|
|
226
|
-
title: "Presentation Runtime",
|
|
227
|
-
description: "Cross-platform rendering of contract-driven UI",
|
|
228
|
-
domain: "platform",
|
|
229
|
-
owners: ["@platform.presentations"],
|
|
230
|
-
tags: ["presentations", "ui", "rendering", "cross-platform"],
|
|
231
|
-
stability: "beta"
|
|
232
|
-
},
|
|
233
|
-
operations: [
|
|
234
|
-
{ key: "presentation.render", version: "1.0.0" },
|
|
235
|
-
{ key: "presentation.transform", version: "1.0.0" }
|
|
236
|
-
],
|
|
237
|
-
events: [
|
|
238
|
-
{ key: "presentation.rendered", version: "1.0.0" },
|
|
239
|
-
{ key: "presentation.transformed", version: "1.0.0" }
|
|
240
|
-
],
|
|
241
|
-
presentations: [
|
|
242
|
-
{ key: "form.standard", version: "1.0.0" },
|
|
243
|
-
{ key: "list.standard", version: "1.0.0" },
|
|
244
|
-
{ key: "detail.standard", version: "1.0.0" }
|
|
245
|
-
],
|
|
246
|
-
capabilities: {
|
|
247
|
-
provides: [{ key: "contracts.presentations", version: "1.0.0" }],
|
|
248
|
-
requires: []
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
// src/features/registry.ts
|
|
253
|
-
import { AppConfigFeature } from "@contractspec/lib.contracts-spec/app-config";
|
|
254
|
-
import { FeatureRegistry } from "@contractspec/lib.contracts-spec/features";
|
|
255
|
-
function createContractSpecFeatureRegistry() {
|
|
256
|
-
const features = new FeatureRegistry;
|
|
257
|
-
features.register(DocsFeature);
|
|
258
|
-
features.register(MCPFeature);
|
|
259
|
-
features.register(PresentationsFeature);
|
|
260
|
-
features.register(AppConfigFeature);
|
|
261
|
-
return features;
|
|
262
|
-
}
|
|
263
|
-
var registryInstance = null;
|
|
264
|
-
function getContractSpecFeatureRegistry() {
|
|
265
|
-
if (!registryInstance) {
|
|
266
|
-
registryInstance = createContractSpecFeatureRegistry();
|
|
267
|
-
}
|
|
268
|
-
return registryInstance;
|
|
269
|
-
}
|
|
270
|
-
function resetContractSpecFeatureRegistry() {
|
|
271
|
-
registryInstance = null;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// src/features/index.ts
|
|
275
|
-
import { FeatureRegistry as FeatureRegistry2 } from "@contractspec/lib.contracts-spec/features";
|
|
276
|
-
|
|
277
|
-
// src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx
|
|
278
|
-
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
279
|
-
import {
|
|
280
|
-
Boxes,
|
|
281
|
-
Database,
|
|
282
|
-
FileText,
|
|
283
|
-
Globe,
|
|
284
|
-
Layout,
|
|
285
|
-
MessageSquare,
|
|
286
|
-
Settings,
|
|
287
|
-
Shield,
|
|
288
|
-
Workflow
|
|
289
|
-
} from "lucide-react";
|
|
290
|
-
import * as React from "react";
|
|
291
|
-
import { jsx } from "react/jsx-runtime";
|
|
292
|
-
"use client";
|
|
293
|
-
var domainIconMap = {
|
|
294
|
-
platform: Settings,
|
|
295
|
-
documentation: FileText,
|
|
296
|
-
docs: FileText,
|
|
297
|
-
integration: Workflow,
|
|
298
|
-
api: Globe,
|
|
299
|
-
security: Shield,
|
|
300
|
-
data: Database,
|
|
301
|
-
messaging: MessageSquare,
|
|
302
|
-
ui: Layout,
|
|
303
|
-
presentation: Layout
|
|
304
|
-
};
|
|
305
|
-
var tagIconMap = {
|
|
306
|
-
documentation: FileText,
|
|
307
|
-
guides: FileText,
|
|
308
|
-
"api-reference": Globe,
|
|
309
|
-
presentations: Layout,
|
|
310
|
-
ui: Layout,
|
|
311
|
-
rendering: Layout,
|
|
312
|
-
mcp: Workflow,
|
|
313
|
-
integration: Workflow,
|
|
314
|
-
security: Shield,
|
|
315
|
-
auth: Shield,
|
|
316
|
-
data: Database,
|
|
317
|
-
storage: Database
|
|
318
|
-
};
|
|
319
|
-
var stabilityToneMap = {
|
|
320
|
-
stable: "success",
|
|
321
|
-
beta: "warning",
|
|
322
|
-
experimental: "info",
|
|
323
|
-
deprecated: "danger"
|
|
324
|
-
};
|
|
325
|
-
var sizeClasses = {
|
|
326
|
-
sm: "h-4 w-4",
|
|
327
|
-
md: "h-5 w-5",
|
|
328
|
-
lg: "h-6 w-6"
|
|
329
|
-
};
|
|
330
|
-
function FeatureIcon({
|
|
331
|
-
domain,
|
|
332
|
-
tags = [],
|
|
333
|
-
stability,
|
|
334
|
-
icon: IconOverride,
|
|
335
|
-
size = "md",
|
|
336
|
-
className
|
|
337
|
-
}) {
|
|
338
|
-
const Icon = React.useMemo(() => {
|
|
339
|
-
if (IconOverride)
|
|
340
|
-
return IconOverride;
|
|
341
|
-
if (domain) {
|
|
342
|
-
const domainIcon = domainIconMap[domain.toLowerCase()];
|
|
343
|
-
if (domainIcon)
|
|
344
|
-
return domainIcon;
|
|
345
|
-
}
|
|
346
|
-
for (const tag of tags) {
|
|
347
|
-
const tagIcon = tagIconMap[tag.toLowerCase()];
|
|
348
|
-
if (tagIcon)
|
|
349
|
-
return tagIcon;
|
|
350
|
-
}
|
|
351
|
-
return Boxes;
|
|
352
|
-
}, [domain, tags, IconOverride]);
|
|
353
|
-
const tone = stability ? stabilityToneMap[stability] || "primary" : "primary";
|
|
354
|
-
const toneClasses = {
|
|
355
|
-
success: "text-emerald-600 dark:text-emerald-400",
|
|
356
|
-
warning: "text-amber-600 dark:text-amber-400",
|
|
357
|
-
info: "text-blue-600 dark:text-blue-400",
|
|
358
|
-
danger: "text-red-600 dark:text-red-400",
|
|
359
|
-
primary: "text-primary"
|
|
360
|
-
};
|
|
361
|
-
return /* @__PURE__ */ jsx(Icon, {
|
|
362
|
-
className: cn(sizeClasses[size], toneClasses[tone], className)
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
function getFeatureIconTone(stability) {
|
|
366
|
-
if (!stability)
|
|
367
|
-
return "primary";
|
|
368
|
-
return stabilityToneMap[stability] || "primary";
|
|
369
|
-
}
|
|
370
|
-
// src/presentation/features/hooks/useContractsRegistry.ts
|
|
371
|
-
import { useMemo as useMemo2 } from "react";
|
|
372
|
-
"use client";
|
|
373
|
-
function useContractsRegistry() {
|
|
374
|
-
const registry = useMemo2(() => getContractSpecOperationRegistry(), []);
|
|
375
|
-
return useMemo2(() => ({
|
|
376
|
-
resolveOperation: (ref) => resolveOperationSpec(ref.key, ref.version),
|
|
377
|
-
getOperationSpec: (key, version) => resolveOperationSpec(key, version),
|
|
378
|
-
listOperations: () => registry.list()
|
|
379
|
-
}), [registry]);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// src/presentation/features/hooks/useFeatureFilters.ts
|
|
383
|
-
import { useCallback, useMemo as useMemo3, useState } from "react";
|
|
384
|
-
"use client";
|
|
385
|
-
var defaultFilters = {
|
|
386
|
-
search: "",
|
|
387
|
-
tags: [],
|
|
388
|
-
stability: [],
|
|
389
|
-
domain: []
|
|
390
|
-
};
|
|
391
|
-
function useFeatureFilters(features) {
|
|
392
|
-
const [filters, setFilters] = useState(defaultFilters);
|
|
393
|
-
const setSearch = useCallback((search) => {
|
|
394
|
-
setFilters((prev) => ({ ...prev, search }));
|
|
395
|
-
}, []);
|
|
396
|
-
const toggleTag = useCallback((tag) => {
|
|
397
|
-
setFilters((prev) => ({
|
|
398
|
-
...prev,
|
|
399
|
-
tags: prev.tags.includes(tag) ? prev.tags.filter((t) => t !== tag) : [...prev.tags, tag]
|
|
400
|
-
}));
|
|
401
|
-
}, []);
|
|
402
|
-
const toggleStability = useCallback((stability) => {
|
|
403
|
-
setFilters((prev) => ({
|
|
404
|
-
...prev,
|
|
405
|
-
stability: prev.stability.includes(stability) ? prev.stability.filter((s) => s !== stability) : [...prev.stability, stability]
|
|
406
|
-
}));
|
|
407
|
-
}, []);
|
|
408
|
-
const toggleDomain = useCallback((domain) => {
|
|
409
|
-
setFilters((prev) => ({
|
|
410
|
-
...prev,
|
|
411
|
-
domain: prev.domain.includes(domain) ? prev.domain.filter((d) => d !== domain) : [...prev.domain, domain]
|
|
412
|
-
}));
|
|
413
|
-
}, []);
|
|
414
|
-
const clearFilters = useCallback(() => setFilters(defaultFilters), []);
|
|
415
|
-
const hasActiveFilters = useMemo3(() => {
|
|
416
|
-
return filters.search.length > 0 || filters.tags.length > 0 || filters.stability.length > 0 || filters.domain.length > 0;
|
|
417
|
-
}, [filters]);
|
|
418
|
-
const filteredFeatures = useMemo3(() => {
|
|
419
|
-
return features.filter((feature) => {
|
|
420
|
-
if (filters.search) {
|
|
421
|
-
const searchLower = filters.search.toLowerCase();
|
|
422
|
-
const title = feature.meta.title ?? "";
|
|
423
|
-
const matches = title.toLowerCase().includes(searchLower) || feature.meta.description?.toLowerCase().includes(searchLower) || feature.meta.key.toLowerCase().includes(searchLower);
|
|
424
|
-
if (!matches)
|
|
425
|
-
return false;
|
|
426
|
-
}
|
|
427
|
-
if (filters.tags.length > 0) {
|
|
428
|
-
const hasTag = filters.tags.some((tag) => feature.meta.tags?.includes(tag));
|
|
429
|
-
if (!hasTag)
|
|
430
|
-
return false;
|
|
431
|
-
}
|
|
432
|
-
if (filters.stability.length > 0) {
|
|
433
|
-
if (!filters.stability.includes(feature.meta.stability ?? "unknown"))
|
|
434
|
-
return false;
|
|
435
|
-
}
|
|
436
|
-
if (filters.domain.length > 0) {
|
|
437
|
-
if (!filters.domain.includes(feature.meta.domain ?? "unknown"))
|
|
438
|
-
return false;
|
|
439
|
-
}
|
|
440
|
-
return true;
|
|
441
|
-
});
|
|
442
|
-
}, [features, filters]);
|
|
443
|
-
return {
|
|
444
|
-
filters,
|
|
445
|
-
setSearch,
|
|
446
|
-
toggleTag,
|
|
447
|
-
toggleStability,
|
|
448
|
-
toggleDomain,
|
|
449
|
-
clearFilters,
|
|
450
|
-
filteredFeatures,
|
|
451
|
-
hasActiveFilters
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// src/presentation/features/hooks/useFeatureRegistry.ts
|
|
456
|
-
import { useMemo as useMemo4 } from "react";
|
|
457
|
-
"use client";
|
|
458
|
-
function useFeatureRegistry() {
|
|
459
|
-
const registry = useMemo4(() => getContractSpecFeatureRegistry(), []);
|
|
460
|
-
return useMemo4(() => {
|
|
461
|
-
const features = registry.list();
|
|
462
|
-
return {
|
|
463
|
-
features,
|
|
464
|
-
getFeature: (key) => registry.get(key),
|
|
465
|
-
getByTag: (tag) => registry.listByTag(tag),
|
|
466
|
-
getByOwner: (owner) => registry.listByOwner(owner),
|
|
467
|
-
getUniqueTags: () => registry.getUniqueTags(),
|
|
468
|
-
getUniqueDomains: () => {
|
|
469
|
-
const domains = new Set;
|
|
470
|
-
for (const f of features) {
|
|
471
|
-
if (f.meta.domain)
|
|
472
|
-
domains.add(f.meta.domain);
|
|
473
|
-
}
|
|
474
|
-
return [...domains].sort();
|
|
475
|
-
},
|
|
476
|
-
getUniqueStabilities: () => {
|
|
477
|
-
const stabilities = new Set;
|
|
478
|
-
for (const f of features) {
|
|
479
|
-
if (f.meta.stability)
|
|
480
|
-
stabilities.add(f.meta.stability);
|
|
481
|
-
}
|
|
482
|
-
return [...stabilities].sort();
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
}, [registry]);
|
|
486
|
-
}
|
|
487
|
-
// src/presentation/features/hooks/useRelatedDocs.ts
|
|
488
|
-
import { defaultDocRegistry } from "@contractspec/lib.contracts-spec/docs";
|
|
489
|
-
import { useMemo as useMemo5 } from "react";
|
|
490
|
-
"use client";
|
|
491
|
-
function useRelatedDocs(key, tags) {
|
|
492
|
-
const docs2 = useMemo5(() => {
|
|
493
|
-
try {
|
|
494
|
-
const allDocs = defaultDocRegistry.list();
|
|
495
|
-
return allDocs.filter(({ block }) => {
|
|
496
|
-
const keyMatch = block.id.toLowerCase().includes(key.toLowerCase()) || block.title.toLowerCase().includes(key.toLowerCase());
|
|
497
|
-
const tagMatch = tags?.some((t) => block.tags?.some((bt) => bt.toLowerCase().includes(t.toLowerCase())));
|
|
498
|
-
return keyMatch || tagMatch;
|
|
499
|
-
}).map(({ block, route }) => ({
|
|
500
|
-
id: block.id,
|
|
501
|
-
title: block.title,
|
|
502
|
-
summary: block.summary,
|
|
503
|
-
route
|
|
504
|
-
}));
|
|
505
|
-
} catch (e) {
|
|
506
|
-
console.error("Failed to fetch related docs:", e);
|
|
507
|
-
return [];
|
|
508
|
-
}
|
|
509
|
-
}, [key, tags]);
|
|
510
|
-
return docs2;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx
|
|
514
|
-
import { StatusChip } from "@contractspec/lib.design-system";
|
|
515
|
-
import { HStack } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
516
|
-
import {
|
|
517
|
-
ArrowRight,
|
|
518
|
-
Layout as Layout2,
|
|
519
|
-
Radio,
|
|
520
|
-
Shield as Shield2,
|
|
521
|
-
Tag,
|
|
522
|
-
Users,
|
|
523
|
-
Zap
|
|
524
|
-
} from "lucide-react";
|
|
525
|
-
import { jsx as jsx2, jsxs, Fragment } from "react/jsx-runtime";
|
|
526
|
-
"use client";
|
|
527
|
-
function FeatureHoverPreview({ feature }) {
|
|
528
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
529
|
-
const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
|
|
530
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
531
|
-
children: [
|
|
532
|
-
meta.description && /* @__PURE__ */ jsx2("p", {
|
|
533
|
-
className: "text-muted-foreground text-sm leading-relaxed",
|
|
534
|
-
children: meta.description
|
|
535
|
-
}),
|
|
536
|
-
/* @__PURE__ */ jsxs(HStack, {
|
|
537
|
-
gap: "md",
|
|
538
|
-
className: "py-2",
|
|
539
|
-
children: [
|
|
540
|
-
operations?.length ? /* @__PURE__ */ jsxs("div", {
|
|
541
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
542
|
-
children: [
|
|
543
|
-
/* @__PURE__ */ jsx2(Zap, {
|
|
544
|
-
className: "h-4 w-4 text-amber-500"
|
|
545
|
-
}),
|
|
546
|
-
/* @__PURE__ */ jsx2("span", {
|
|
547
|
-
className: "font-medium",
|
|
548
|
-
children: operations.length
|
|
549
|
-
}),
|
|
550
|
-
/* @__PURE__ */ jsx2("span", {
|
|
551
|
-
className: "text-muted-foreground",
|
|
552
|
-
children: "ops"
|
|
553
|
-
})
|
|
554
|
-
]
|
|
555
|
-
}) : null,
|
|
556
|
-
events?.length ? /* @__PURE__ */ jsxs("div", {
|
|
557
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
558
|
-
children: [
|
|
559
|
-
/* @__PURE__ */ jsx2(Radio, {
|
|
560
|
-
className: "h-4 w-4 text-blue-500"
|
|
561
|
-
}),
|
|
562
|
-
/* @__PURE__ */ jsx2("span", {
|
|
563
|
-
className: "font-medium",
|
|
564
|
-
children: events.length
|
|
565
|
-
}),
|
|
566
|
-
/* @__PURE__ */ jsx2("span", {
|
|
567
|
-
className: "text-muted-foreground",
|
|
568
|
-
children: "events"
|
|
569
|
-
})
|
|
570
|
-
]
|
|
571
|
-
}) : null,
|
|
572
|
-
presentations?.length ? /* @__PURE__ */ jsxs("div", {
|
|
573
|
-
className: "flex items-center gap-1.5 text-sm",
|
|
574
|
-
children: [
|
|
575
|
-
/* @__PURE__ */ jsx2(Layout2, {
|
|
576
|
-
className: "h-4 w-4 text-purple-500"
|
|
577
|
-
}),
|
|
578
|
-
/* @__PURE__ */ jsx2("span", {
|
|
579
|
-
className: "font-medium",
|
|
580
|
-
children: presentations.length
|
|
581
|
-
}),
|
|
582
|
-
/* @__PURE__ */ jsx2("span", {
|
|
583
|
-
className: "text-muted-foreground",
|
|
584
|
-
children: "views"
|
|
585
|
-
})
|
|
586
|
-
]
|
|
587
|
-
}) : null
|
|
588
|
-
]
|
|
589
|
-
}),
|
|
590
|
-
hasCapabilities && /* @__PURE__ */ jsxs("div", {
|
|
591
|
-
className: "space-y-1.5 border-border/50 border-t pt-1",
|
|
592
|
-
children: [
|
|
593
|
-
capabilities?.provides?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
594
|
-
gap: "xs",
|
|
595
|
-
wrap: "wrap",
|
|
596
|
-
className: "items-start",
|
|
597
|
-
children: [
|
|
598
|
-
/* @__PURE__ */ jsx2(Shield2, {
|
|
599
|
-
className: "mt-0.5 h-3.5 w-3.5 text-emerald-500"
|
|
600
|
-
}),
|
|
601
|
-
/* @__PURE__ */ jsx2("span", {
|
|
602
|
-
className: "text-muted-foreground text-xs",
|
|
603
|
-
children: "Provides:"
|
|
604
|
-
}),
|
|
605
|
-
capabilities.provides.slice(0, 2).map((cap) => /* @__PURE__ */ jsx2(StatusChip, {
|
|
606
|
-
tone: "success",
|
|
607
|
-
label: cap.key,
|
|
608
|
-
size: "sm"
|
|
609
|
-
}, cap.key)),
|
|
610
|
-
capabilities.provides.length > 2 && /* @__PURE__ */ jsxs("span", {
|
|
611
|
-
className: "text-muted-foreground text-xs",
|
|
612
|
-
children: [
|
|
613
|
-
"+",
|
|
614
|
-
capabilities.provides.length - 2
|
|
615
|
-
]
|
|
616
|
-
})
|
|
617
|
-
]
|
|
618
|
-
}) : null,
|
|
619
|
-
capabilities?.requires?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
620
|
-
gap: "xs",
|
|
621
|
-
wrap: "wrap",
|
|
622
|
-
className: "items-start",
|
|
623
|
-
children: [
|
|
624
|
-
/* @__PURE__ */ jsx2(ArrowRight, {
|
|
625
|
-
className: "mt-0.5 h-3.5 w-3.5 text-blue-500"
|
|
626
|
-
}),
|
|
627
|
-
/* @__PURE__ */ jsx2("span", {
|
|
628
|
-
className: "text-muted-foreground text-xs",
|
|
629
|
-
children: "Requires:"
|
|
630
|
-
}),
|
|
631
|
-
capabilities.requires.slice(0, 2).map((req) => /* @__PURE__ */ jsx2(StatusChip, {
|
|
632
|
-
tone: "info",
|
|
633
|
-
label: req.key,
|
|
634
|
-
size: "sm"
|
|
635
|
-
}, req.key)),
|
|
636
|
-
capabilities.requires.length > 2 && /* @__PURE__ */ jsxs("span", {
|
|
637
|
-
className: "text-muted-foreground text-xs",
|
|
638
|
-
children: [
|
|
639
|
-
"+",
|
|
640
|
-
capabilities.requires.length - 2
|
|
641
|
-
]
|
|
642
|
-
})
|
|
643
|
-
]
|
|
644
|
-
}) : null
|
|
645
|
-
]
|
|
646
|
-
}),
|
|
647
|
-
meta.tags?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
648
|
-
gap: "xs",
|
|
649
|
-
wrap: "wrap",
|
|
650
|
-
className: "items-center border-border/50 border-t pt-1",
|
|
651
|
-
children: [
|
|
652
|
-
/* @__PURE__ */ jsx2(Tag, {
|
|
653
|
-
className: "h-3.5 w-3.5 text-muted-foreground"
|
|
654
|
-
}),
|
|
655
|
-
meta.tags.slice(0, 4).map((tag) => /* @__PURE__ */ jsxs("span", {
|
|
656
|
-
className: "rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",
|
|
657
|
-
children: [
|
|
658
|
-
"#",
|
|
659
|
-
tag
|
|
660
|
-
]
|
|
661
|
-
}, tag)),
|
|
662
|
-
meta.tags.length > 4 && /* @__PURE__ */ jsxs("span", {
|
|
663
|
-
className: "text-muted-foreground text-xs",
|
|
664
|
-
children: [
|
|
665
|
-
"+",
|
|
666
|
-
meta.tags.length - 4
|
|
667
|
-
]
|
|
668
|
-
})
|
|
669
|
-
]
|
|
670
|
-
}) : null,
|
|
671
|
-
meta.owners?.length ? /* @__PURE__ */ jsxs(HStack, {
|
|
672
|
-
gap: "xs",
|
|
673
|
-
className: "items-center text-muted-foreground text-xs",
|
|
674
|
-
children: [
|
|
675
|
-
/* @__PURE__ */ jsx2(Users, {
|
|
676
|
-
className: "h-3.5 w-3.5"
|
|
677
|
-
}),
|
|
678
|
-
/* @__PURE__ */ jsx2("span", {
|
|
679
|
-
children: meta.owners.join(", ")
|
|
680
|
-
})
|
|
681
|
-
]
|
|
682
|
-
}) : null
|
|
683
|
-
]
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
// src/presentation/features/molecules/FeatureCard/FeatureCard.tsx
|
|
687
|
-
import { EntityCard, StatusChip as StatusChip2 } from "@contractspec/lib.design-system";
|
|
688
|
-
import { HStack as HStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
689
|
-
import { Layout as Layout3, Radio as Radio2, Shield as Shield3, Zap as Zap2 } from "lucide-react";
|
|
690
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
691
|
-
"use client";
|
|
692
|
-
var stabilityTone = {
|
|
693
|
-
stable: "success",
|
|
694
|
-
beta: "warning",
|
|
695
|
-
experimental: "info",
|
|
696
|
-
deprecated: "danger"
|
|
697
|
-
};
|
|
698
|
-
function FeatureCard({
|
|
699
|
-
feature,
|
|
700
|
-
onSelect,
|
|
701
|
-
className
|
|
702
|
-
}) {
|
|
703
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
704
|
-
const tone = stabilityTone[meta.stability] ?? "neutral";
|
|
705
|
-
const iconTone = getFeatureIconTone(meta.stability);
|
|
706
|
-
const emphasis = meta.stability === "stable" ? "strong" : "default";
|
|
707
|
-
const handleClick = onSelect ? () => onSelect(feature) : undefined;
|
|
708
|
-
const hasCapabilities = capabilities?.provides?.length || capabilities?.requires?.length;
|
|
709
|
-
return /* @__PURE__ */ jsx3(EntityCard, {
|
|
710
|
-
cardTitle: meta.title,
|
|
711
|
-
cardSubtitle: meta.key,
|
|
712
|
-
className,
|
|
713
|
-
onClick: handleClick,
|
|
714
|
-
emphasis,
|
|
715
|
-
icon: /* @__PURE__ */ jsx3(FeatureIcon, {
|
|
716
|
-
domain: meta.domain,
|
|
717
|
-
tags: meta.tags,
|
|
718
|
-
stability: meta.stability,
|
|
719
|
-
size: "md"
|
|
720
|
-
}),
|
|
721
|
-
iconTone,
|
|
722
|
-
chips: /* @__PURE__ */ jsx3(StatusChip2, {
|
|
723
|
-
tone,
|
|
724
|
-
label: meta.stability ?? "unknown",
|
|
725
|
-
size: "sm"
|
|
726
|
-
}),
|
|
727
|
-
meta: meta.description ? /* @__PURE__ */ jsx3("span", {
|
|
728
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
729
|
-
children: meta.description
|
|
730
|
-
}) : undefined,
|
|
731
|
-
preview: /* @__PURE__ */ jsx3(FeatureHoverPreview, {
|
|
732
|
-
feature
|
|
733
|
-
}),
|
|
734
|
-
footer: /* @__PURE__ */ jsxs2(HStack2, {
|
|
735
|
-
gap: "md",
|
|
736
|
-
className: "w-full justify-between text-muted-foreground text-xs",
|
|
737
|
-
children: [
|
|
738
|
-
/* @__PURE__ */ jsxs2(HStack2, {
|
|
739
|
-
gap: "sm",
|
|
740
|
-
children: [
|
|
741
|
-
operations?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
742
|
-
className: "flex items-center gap-1",
|
|
743
|
-
children: [
|
|
744
|
-
/* @__PURE__ */ jsx3(Zap2, {
|
|
745
|
-
className: "h-3 w-3 text-amber-500"
|
|
746
|
-
}),
|
|
747
|
-
operations.length
|
|
748
|
-
]
|
|
749
|
-
}) : null,
|
|
750
|
-
events?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
751
|
-
className: "flex items-center gap-1",
|
|
752
|
-
children: [
|
|
753
|
-
/* @__PURE__ */ jsx3(Radio2, {
|
|
754
|
-
className: "h-3 w-3 text-blue-500"
|
|
755
|
-
}),
|
|
756
|
-
events.length
|
|
757
|
-
]
|
|
758
|
-
}) : null,
|
|
759
|
-
presentations?.length ? /* @__PURE__ */ jsxs2("span", {
|
|
760
|
-
className: "flex items-center gap-1",
|
|
761
|
-
children: [
|
|
762
|
-
/* @__PURE__ */ jsx3(Layout3, {
|
|
763
|
-
className: "h-3 w-3 text-purple-500"
|
|
764
|
-
}),
|
|
765
|
-
presentations.length
|
|
766
|
-
]
|
|
767
|
-
}) : null
|
|
768
|
-
]
|
|
769
|
-
}),
|
|
770
|
-
hasCapabilities && /* @__PURE__ */ jsxs2("span", {
|
|
771
|
-
className: "flex items-center gap-1",
|
|
772
|
-
children: [
|
|
773
|
-
/* @__PURE__ */ jsx3(Shield3, {
|
|
774
|
-
className: "h-3 w-3 text-emerald-500"
|
|
775
|
-
}),
|
|
776
|
-
(capabilities?.provides?.length ?? 0) + (capabilities?.requires?.length ?? 0)
|
|
777
|
-
]
|
|
778
|
-
})
|
|
779
|
-
]
|
|
780
|
-
})
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
// src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx
|
|
784
|
-
import { StatusChip as StatusChip3 } from "@contractspec/lib.design-system";
|
|
785
|
-
import { HStack as HStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
786
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
787
|
-
import { Boxes as Boxes2, ChevronDown } from "lucide-react";
|
|
788
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
789
|
-
"use client";
|
|
790
|
-
function FeatureCategoryHeader({
|
|
791
|
-
title,
|
|
792
|
-
count,
|
|
793
|
-
icon,
|
|
794
|
-
isCollapsed = false,
|
|
795
|
-
onToggle,
|
|
796
|
-
className
|
|
797
|
-
}) {
|
|
798
|
-
return /* @__PURE__ */ jsxs3("button", {
|
|
799
|
-
type: "button",
|
|
800
|
-
onClick: onToggle,
|
|
801
|
-
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),
|
|
802
|
-
children: [
|
|
803
|
-
/* @__PURE__ */ jsxs3(HStack3, {
|
|
804
|
-
gap: "sm",
|
|
805
|
-
className: "items-center",
|
|
806
|
-
children: [
|
|
807
|
-
/* @__PURE__ */ jsx4("div", {
|
|
808
|
-
className: "text-muted-foreground transition-colors group-hover:text-foreground",
|
|
809
|
-
children: icon || /* @__PURE__ */ jsx4(Boxes2, {
|
|
810
|
-
className: "h-5 w-5"
|
|
811
|
-
})
|
|
812
|
-
}),
|
|
813
|
-
/* @__PURE__ */ jsx4("span", {
|
|
814
|
-
className: "font-semibold text-lg capitalize transition-colors group-hover:text-primary",
|
|
815
|
-
children: title
|
|
816
|
-
}),
|
|
817
|
-
/* @__PURE__ */ jsx4(StatusChip3, {
|
|
818
|
-
tone: "neutral",
|
|
819
|
-
label: `${count} ${count === 1 ? "feature" : "features"}`,
|
|
820
|
-
size: "sm"
|
|
821
|
-
})
|
|
822
|
-
]
|
|
823
|
-
}),
|
|
824
|
-
/* @__PURE__ */ jsx4(ChevronDown, {
|
|
825
|
-
className: cn2("h-5 w-5 text-muted-foreground transition-transform duration-200", isCollapsed && "-rotate-90")
|
|
826
|
-
})
|
|
827
|
-
]
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
// src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx
|
|
831
|
-
import { Button, Input } from "@contractspec/lib.design-system";
|
|
832
|
-
import { HStack as HStack4, VStack } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
833
|
-
import { cn as cn3 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
834
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
835
|
-
"use client";
|
|
836
|
-
function FeatureFiltersBar({
|
|
837
|
-
uniqueTags,
|
|
838
|
-
uniqueStabilities,
|
|
839
|
-
filters,
|
|
840
|
-
setSearch,
|
|
841
|
-
toggleTag,
|
|
842
|
-
toggleStability,
|
|
843
|
-
clearFilters,
|
|
844
|
-
hasActiveFilters,
|
|
845
|
-
className
|
|
846
|
-
}) {
|
|
847
|
-
return /* @__PURE__ */ jsxs4(VStack, {
|
|
848
|
-
gap: "md",
|
|
849
|
-
className: cn3("w-full", className),
|
|
850
|
-
children: [
|
|
851
|
-
/* @__PURE__ */ jsxs4(HStack4, {
|
|
852
|
-
gap: "md",
|
|
853
|
-
justify: "between",
|
|
854
|
-
className: "w-full",
|
|
855
|
-
children: [
|
|
856
|
-
/* @__PURE__ */ jsx5(Input, {
|
|
857
|
-
placeholder: "Search features...",
|
|
858
|
-
value: filters.search,
|
|
859
|
-
onChange: (e) => setSearch(e.target.value),
|
|
860
|
-
className: "max-w-md",
|
|
861
|
-
"aria-label": "Search features"
|
|
862
|
-
}),
|
|
863
|
-
hasActiveFilters && /* @__PURE__ */ jsx5(Button, {
|
|
864
|
-
variant: "ghost",
|
|
865
|
-
size: "sm",
|
|
866
|
-
onClick: clearFilters,
|
|
867
|
-
children: "Clear filters"
|
|
868
|
-
})
|
|
869
|
-
]
|
|
870
|
-
}),
|
|
871
|
-
uniqueStabilities.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
|
|
872
|
-
gap: "xs",
|
|
873
|
-
wrap: "wrap",
|
|
874
|
-
children: [
|
|
875
|
-
/* @__PURE__ */ jsx5("span", {
|
|
876
|
-
className: "text-muted-foreground text-sm",
|
|
877
|
-
children: "Stability:"
|
|
878
|
-
}),
|
|
879
|
-
uniqueStabilities.map((stability) => /* @__PURE__ */ jsx5(Button, {
|
|
880
|
-
variant: filters.stability.includes(stability) ? "default" : "outline",
|
|
881
|
-
size: "sm",
|
|
882
|
-
onClick: () => toggleStability(stability),
|
|
883
|
-
"aria-pressed": filters.stability.includes(stability),
|
|
884
|
-
children: stability
|
|
885
|
-
}, stability))
|
|
886
|
-
]
|
|
887
|
-
}),
|
|
888
|
-
uniqueTags.length > 0 && /* @__PURE__ */ jsxs4(HStack4, {
|
|
889
|
-
gap: "xs",
|
|
890
|
-
wrap: "wrap",
|
|
891
|
-
children: [
|
|
892
|
-
/* @__PURE__ */ jsx5("span", {
|
|
893
|
-
className: "text-muted-foreground text-sm",
|
|
894
|
-
children: "Tags:"
|
|
895
|
-
}),
|
|
896
|
-
uniqueTags.slice(0, 10).map((tag) => /* @__PURE__ */ jsxs4(Button, {
|
|
897
|
-
variant: filters.tags.includes(tag) ? "default" : "outline",
|
|
898
|
-
size: "sm",
|
|
899
|
-
onClick: () => toggleTag(tag),
|
|
900
|
-
"aria-pressed": filters.tags.includes(tag),
|
|
901
|
-
children: [
|
|
902
|
-
"#",
|
|
903
|
-
tag
|
|
904
|
-
]
|
|
905
|
-
}, tag)),
|
|
906
|
-
uniqueTags.length > 10 && /* @__PURE__ */ jsxs4("span", {
|
|
907
|
-
className: "text-muted-foreground text-sm",
|
|
908
|
-
children: [
|
|
909
|
-
"+",
|
|
910
|
-
uniqueTags.length - 10,
|
|
911
|
-
" more"
|
|
912
|
-
]
|
|
913
|
-
})
|
|
914
|
-
]
|
|
915
|
-
})
|
|
916
|
-
]
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
// src/presentation/features/organisms/FeatureDataViewsList.tsx
|
|
920
|
-
import { EntityCard as EntityCard2 } from "@contractspec/lib.design-system";
|
|
921
|
-
import { Table } from "lucide-react";
|
|
922
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
923
|
-
"use client";
|
|
924
|
-
function FeatureDataViewsList({
|
|
925
|
-
feature
|
|
926
|
-
}) {
|
|
927
|
-
if (!feature.dataViews?.length)
|
|
928
|
-
return null;
|
|
929
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
930
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
931
|
-
children: feature.dataViews.map((view) => {
|
|
932
|
-
const spec = resolveSerializedDataViewSpec(view.key, view.version);
|
|
933
|
-
return /* @__PURE__ */ jsx6(EntityCard2, {
|
|
934
|
-
cardTitle: view.key,
|
|
935
|
-
cardSubtitle: `v${view.version}`,
|
|
936
|
-
footer: spec?.meta.description,
|
|
937
|
-
icon: /* @__PURE__ */ jsx6(Table, {
|
|
938
|
-
className: "h-4 w-4"
|
|
939
|
-
}),
|
|
940
|
-
href: `/features/${feature.meta.key}/dataviews/${view.key}`
|
|
941
|
-
}, view.key);
|
|
942
|
-
})
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
// src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx
|
|
947
|
-
import {
|
|
948
|
-
StatCard,
|
|
949
|
-
StatCardGroup,
|
|
950
|
-
StatusChip as StatusChip4
|
|
951
|
-
} from "@contractspec/lib.design-system";
|
|
952
|
-
import { Box, HStack as HStack5, VStack as VStack2 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
953
|
-
import { cn as cn4 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
954
|
-
import Link from "next/link";
|
|
955
|
-
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
956
|
-
"use client";
|
|
957
|
-
var stabilityTone2 = {
|
|
958
|
-
stable: "success",
|
|
959
|
-
beta: "warning",
|
|
960
|
-
experimental: "info",
|
|
961
|
-
deprecated: "danger"
|
|
962
|
-
};
|
|
963
|
-
function FeatureDetail({ feature, className }) {
|
|
964
|
-
const { meta, operations, events, presentations, capabilities } = feature;
|
|
965
|
-
const tone = stabilityTone2[meta.stability] ?? "neutral";
|
|
966
|
-
return /* @__PURE__ */ jsxs5(VStack2, {
|
|
967
|
-
gap: "lg",
|
|
968
|
-
className: cn4("w-full", className),
|
|
969
|
-
children: [
|
|
970
|
-
/* @__PURE__ */ jsxs5(HStack5, {
|
|
971
|
-
gap: "sm",
|
|
972
|
-
children: [
|
|
973
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
974
|
-
tone,
|
|
975
|
-
label: meta.stability ?? "unknown"
|
|
976
|
-
}),
|
|
977
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
978
|
-
tone: "neutral",
|
|
979
|
-
label: meta.key,
|
|
980
|
-
size: "sm"
|
|
981
|
-
}),
|
|
982
|
-
/* @__PURE__ */ jsx7(StatusChip4, {
|
|
983
|
-
tone: "neutral",
|
|
984
|
-
label: `v${meta.version}`,
|
|
985
|
-
size: "sm"
|
|
986
|
-
})
|
|
987
|
-
]
|
|
988
|
-
}),
|
|
989
|
-
/* @__PURE__ */ jsxs5(StatCardGroup, {
|
|
990
|
-
children: [
|
|
991
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
992
|
-
href: `./${feature.meta.key}/operations`,
|
|
993
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
994
|
-
label: "Operations",
|
|
995
|
-
value: operations?.length ?? 0
|
|
996
|
-
})
|
|
997
|
-
}),
|
|
998
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
999
|
-
href: `./${feature.meta.key}/events`,
|
|
1000
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
1001
|
-
label: "Events",
|
|
1002
|
-
value: events?.length ?? 0
|
|
1003
|
-
})
|
|
1004
|
-
}),
|
|
1005
|
-
/* @__PURE__ */ jsx7(Link, {
|
|
1006
|
-
href: `./${feature.meta.key}/presentations`,
|
|
1007
|
-
children: /* @__PURE__ */ jsx7(StatCard, {
|
|
1008
|
-
label: "Presentations",
|
|
1009
|
-
value: presentations?.length ?? 0
|
|
1010
|
-
})
|
|
1011
|
-
})
|
|
1012
|
-
]
|
|
1013
|
-
}),
|
|
1014
|
-
capabilities?.provides?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1015
|
-
className: "flex-col rounded-lg border p-4",
|
|
1016
|
-
gap: "sm",
|
|
1017
|
-
align: "start",
|
|
1018
|
-
children: [
|
|
1019
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1020
|
-
className: "font-semibold",
|
|
1021
|
-
children: "Provides Capabilities"
|
|
1022
|
-
}),
|
|
1023
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1024
|
-
gap: "xs",
|
|
1025
|
-
wrap: "wrap",
|
|
1026
|
-
children: capabilities.provides.map((cap) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1027
|
-
tone: "success",
|
|
1028
|
-
label: `${cap.key} v${cap.version}`,
|
|
1029
|
-
size: "sm"
|
|
1030
|
-
}, `${cap.key}-${cap.version}`))
|
|
1031
|
-
})
|
|
1032
|
-
]
|
|
1033
|
-
}) : null,
|
|
1034
|
-
capabilities?.requires?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1035
|
-
className: "flex-col rounded-lg border p-4",
|
|
1036
|
-
gap: "sm",
|
|
1037
|
-
align: "start",
|
|
1038
|
-
children: [
|
|
1039
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1040
|
-
className: "font-semibold",
|
|
1041
|
-
children: "Requires Capabilities"
|
|
1042
|
-
}),
|
|
1043
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1044
|
-
gap: "xs",
|
|
1045
|
-
wrap: "wrap",
|
|
1046
|
-
children: capabilities.requires.map((req) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1047
|
-
tone: "info",
|
|
1048
|
-
label: `${req.key}${req.version ? ` v${req.version}` : ""}${req.optional ? " (optional)" : ""}`,
|
|
1049
|
-
size: "sm"
|
|
1050
|
-
}, req.key))
|
|
1051
|
-
})
|
|
1052
|
-
]
|
|
1053
|
-
}) : null,
|
|
1054
|
-
meta.tags?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1055
|
-
className: "flex-col rounded-lg border p-4",
|
|
1056
|
-
gap: "sm",
|
|
1057
|
-
align: "start",
|
|
1058
|
-
children: [
|
|
1059
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1060
|
-
className: "font-semibold",
|
|
1061
|
-
children: "Tags"
|
|
1062
|
-
}),
|
|
1063
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1064
|
-
gap: "xs",
|
|
1065
|
-
wrap: "wrap",
|
|
1066
|
-
children: meta.tags.map((tag) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1067
|
-
tone: "neutral",
|
|
1068
|
-
label: `#${tag}`,
|
|
1069
|
-
size: "sm"
|
|
1070
|
-
}, tag))
|
|
1071
|
-
})
|
|
1072
|
-
]
|
|
1073
|
-
}) : null,
|
|
1074
|
-
meta.owners?.length ? /* @__PURE__ */ jsxs5(Box, {
|
|
1075
|
-
className: "flex-col rounded-lg border p-4",
|
|
1076
|
-
gap: "sm",
|
|
1077
|
-
align: "start",
|
|
1078
|
-
children: [
|
|
1079
|
-
/* @__PURE__ */ jsx7("span", {
|
|
1080
|
-
className: "font-semibold",
|
|
1081
|
-
children: "Owners"
|
|
1082
|
-
}),
|
|
1083
|
-
/* @__PURE__ */ jsx7(HStack5, {
|
|
1084
|
-
gap: "xs",
|
|
1085
|
-
wrap: "wrap",
|
|
1086
|
-
children: meta.owners.map((owner) => /* @__PURE__ */ jsx7(StatusChip4, {
|
|
1087
|
-
tone: "neutral",
|
|
1088
|
-
label: owner,
|
|
1089
|
-
size: "sm"
|
|
1090
|
-
}, owner))
|
|
1091
|
-
})
|
|
1092
|
-
]
|
|
1093
|
-
}) : null
|
|
1094
|
-
]
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
|
-
// src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx
|
|
1098
|
-
import {
|
|
1099
|
-
Button as Button2,
|
|
1100
|
-
EmptyState,
|
|
1101
|
-
PageHeaderResponsive,
|
|
1102
|
-
StatusChip as StatusChip5
|
|
1103
|
-
} from "@contractspec/lib.design-system";
|
|
1104
|
-
import { HStack as HStack6, VStack as VStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
1105
|
-
import { cn as cn5 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
1106
|
-
import { LayoutGrid, List, Star } from "lucide-react";
|
|
1107
|
-
import * as React2 from "react";
|
|
1108
|
-
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1109
|
-
"use client";
|
|
1110
|
-
function groupFeaturesByDomain(features) {
|
|
1111
|
-
const groups = {};
|
|
1112
|
-
for (const feature of features) {
|
|
1113
|
-
const domain = feature.meta.domain || "Other";
|
|
1114
|
-
if (!groups[domain])
|
|
1115
|
-
groups[domain] = [];
|
|
1116
|
-
groups[domain].push(feature);
|
|
1117
|
-
}
|
|
1118
|
-
return groups;
|
|
1119
|
-
}
|
|
1120
|
-
function groupFeaturesByStability(features) {
|
|
1121
|
-
const order = ["stable", "beta", "experimental", "deprecated", "unknown"];
|
|
1122
|
-
const groups = {};
|
|
1123
|
-
for (const feature of features) {
|
|
1124
|
-
const stability = feature.meta.stability || "unknown";
|
|
1125
|
-
if (!groups[stability])
|
|
1126
|
-
groups[stability] = [];
|
|
1127
|
-
groups[stability].push(feature);
|
|
1128
|
-
}
|
|
1129
|
-
const sorted = {};
|
|
1130
|
-
for (const key of order) {
|
|
1131
|
-
if (groups[key])
|
|
1132
|
-
sorted[key] = groups[key];
|
|
1133
|
-
}
|
|
1134
|
-
return sorted;
|
|
1135
|
-
}
|
|
1136
|
-
function FeatureDiscovery({
|
|
1137
|
-
onSelectFeature,
|
|
1138
|
-
className,
|
|
1139
|
-
defaultViewMode = "grid",
|
|
1140
|
-
groupBy = "domain",
|
|
1141
|
-
showFeatured = true
|
|
1142
|
-
}) {
|
|
1143
|
-
const { features, getUniqueTags, getUniqueStabilities } = useFeatureRegistry();
|
|
1144
|
-
const {
|
|
1145
|
-
filters,
|
|
1146
|
-
setSearch,
|
|
1147
|
-
toggleTag,
|
|
1148
|
-
toggleStability,
|
|
1149
|
-
clearFilters,
|
|
1150
|
-
filteredFeatures,
|
|
1151
|
-
hasActiveFilters
|
|
1152
|
-
} = useFeatureFilters(features);
|
|
1153
|
-
const uniqueTags = getUniqueTags();
|
|
1154
|
-
const uniqueStabilities = getUniqueStabilities();
|
|
1155
|
-
const [viewMode, setViewMode] = React2.useState(defaultViewMode);
|
|
1156
|
-
const [collapsedGroups, setCollapsedGroups] = React2.useState(new Set);
|
|
1157
|
-
const featuredFeatures = React2.useMemo(() => filteredFeatures.filter((f) => f.meta.stability === "stable"), [filteredFeatures]);
|
|
1158
|
-
const nonFeaturedFeatures = React2.useMemo(() => showFeatured ? filteredFeatures.filter((f) => f.meta.stability !== "stable") : filteredFeatures, [filteredFeatures, showFeatured]);
|
|
1159
|
-
const groupedFeatures = React2.useMemo(() => {
|
|
1160
|
-
if (groupBy === "none")
|
|
1161
|
-
return null;
|
|
1162
|
-
if (groupBy === "domain")
|
|
1163
|
-
return groupFeaturesByDomain(nonFeaturedFeatures);
|
|
1164
|
-
return groupFeaturesByStability(nonFeaturedFeatures);
|
|
1165
|
-
}, [nonFeaturedFeatures, groupBy]);
|
|
1166
|
-
const toggleGroup = (group) => {
|
|
1167
|
-
setCollapsedGroups((prev) => {
|
|
1168
|
-
const next = new Set(prev);
|
|
1169
|
-
if (next.has(group)) {
|
|
1170
|
-
next.delete(group);
|
|
1171
|
-
} else {
|
|
1172
|
-
next.add(group);
|
|
1173
|
-
}
|
|
1174
|
-
return next;
|
|
1175
|
-
});
|
|
1176
|
-
};
|
|
1177
|
-
const gridClasses = viewMode === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "flex flex-col gap-3";
|
|
1178
|
-
const renderFeatureCards = (featureList) => /* @__PURE__ */ jsx8("div", {
|
|
1179
|
-
className: gridClasses,
|
|
1180
|
-
children: featureList.map((feature) => /* @__PURE__ */ jsx8(FeatureCard, {
|
|
1181
|
-
feature,
|
|
1182
|
-
onSelect: onSelectFeature
|
|
1183
|
-
}, feature.meta.key))
|
|
1184
|
-
});
|
|
1185
|
-
return /* @__PURE__ */ jsxs6(VStack3, {
|
|
1186
|
-
gap: "lg",
|
|
1187
|
-
className: cn5("w-full p-6", className),
|
|
1188
|
-
children: [
|
|
1189
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1190
|
-
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
1191
|
-
children: [
|
|
1192
|
-
/* @__PURE__ */ jsx8(PageHeaderResponsive, {
|
|
1193
|
-
title: "Feature Discovery",
|
|
1194
|
-
subtitle: `Browse ${features.length} available ContractSpec features`
|
|
1195
|
-
}),
|
|
1196
|
-
/* @__PURE__ */ jsxs6(HStack6, {
|
|
1197
|
-
gap: "xs",
|
|
1198
|
-
children: [
|
|
1199
|
-
/* @__PURE__ */ jsx8("button", {
|
|
1200
|
-
type: "button",
|
|
1201
|
-
onClick: () => setViewMode("grid"),
|
|
1202
|
-
className: cn5("rounded-md p-2 transition-colors", viewMode === "grid" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
|
|
1203
|
-
"aria-label": "Grid view",
|
|
1204
|
-
children: /* @__PURE__ */ jsx8(LayoutGrid, {
|
|
1205
|
-
className: "h-4 w-4"
|
|
1206
|
-
})
|
|
1207
|
-
}),
|
|
1208
|
-
/* @__PURE__ */ jsx8("button", {
|
|
1209
|
-
type: "button",
|
|
1210
|
-
onClick: () => setViewMode("list"),
|
|
1211
|
-
className: cn5("rounded-md p-2 transition-colors", viewMode === "list" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"),
|
|
1212
|
-
"aria-label": "List view",
|
|
1213
|
-
children: /* @__PURE__ */ jsx8(List, {
|
|
1214
|
-
className: "h-4 w-4"
|
|
1215
|
-
})
|
|
1216
|
-
})
|
|
1217
|
-
]
|
|
1218
|
-
})
|
|
1219
|
-
]
|
|
1220
|
-
}),
|
|
1221
|
-
/* @__PURE__ */ jsx8(FeatureFiltersBar, {
|
|
1222
|
-
uniqueTags,
|
|
1223
|
-
uniqueStabilities,
|
|
1224
|
-
filters,
|
|
1225
|
-
setSearch,
|
|
1226
|
-
toggleTag,
|
|
1227
|
-
toggleStability,
|
|
1228
|
-
clearFilters,
|
|
1229
|
-
hasActiveFilters
|
|
1230
|
-
}),
|
|
1231
|
-
filteredFeatures.length === 0 ? /* @__PURE__ */ jsx8(EmptyState, {
|
|
1232
|
-
title: "No features found",
|
|
1233
|
-
description: hasActiveFilters ? "Try adjusting your search or filters" : "No features are registered yet",
|
|
1234
|
-
primaryAction: hasActiveFilters ? /* @__PURE__ */ jsx8(Button2, {
|
|
1235
|
-
variant: "outline",
|
|
1236
|
-
onClick: clearFilters,
|
|
1237
|
-
children: "Clear filters"
|
|
1238
|
-
}) : undefined
|
|
1239
|
-
}) : /* @__PURE__ */ jsxs6(VStack3, {
|
|
1240
|
-
gap: "lg",
|
|
1241
|
-
children: [
|
|
1242
|
-
showFeatured && featuredFeatures.length > 0 && /* @__PURE__ */ jsxs6(VStack3, {
|
|
1243
|
-
gap: "sm",
|
|
1244
|
-
children: [
|
|
1245
|
-
/* @__PURE__ */ jsxs6(HStack6, {
|
|
1246
|
-
gap: "sm",
|
|
1247
|
-
className: "items-center",
|
|
1248
|
-
children: [
|
|
1249
|
-
/* @__PURE__ */ jsx8(Star, {
|
|
1250
|
-
className: "h-5 w-5 fill-amber-500 text-amber-500"
|
|
1251
|
-
}),
|
|
1252
|
-
/* @__PURE__ */ jsx8("span", {
|
|
1253
|
-
className: "font-semibold text-lg",
|
|
1254
|
-
children: "Featured"
|
|
1255
|
-
}),
|
|
1256
|
-
/* @__PURE__ */ jsx8(StatusChip5, {
|
|
1257
|
-
tone: "success",
|
|
1258
|
-
label: `${featuredFeatures.length} stable`,
|
|
1259
|
-
size: "sm"
|
|
1260
|
-
})
|
|
1261
|
-
]
|
|
1262
|
-
}),
|
|
1263
|
-
renderFeatureCards(featuredFeatures)
|
|
1264
|
-
]
|
|
1265
|
-
}),
|
|
1266
|
-
groupedFeatures ? /* @__PURE__ */ jsx8(VStack3, {
|
|
1267
|
-
gap: "md",
|
|
1268
|
-
children: Object.entries(groupedFeatures).map(([group, groupFeatures]) => /* @__PURE__ */ jsxs6(VStack3, {
|
|
1269
|
-
gap: "sm",
|
|
1270
|
-
children: [
|
|
1271
|
-
/* @__PURE__ */ jsx8(FeatureCategoryHeader, {
|
|
1272
|
-
title: group,
|
|
1273
|
-
count: groupFeatures.length,
|
|
1274
|
-
isCollapsed: collapsedGroups.has(group),
|
|
1275
|
-
onToggle: () => toggleGroup(group)
|
|
1276
|
-
}),
|
|
1277
|
-
!collapsedGroups.has(group) && renderFeatureCards(groupFeatures)
|
|
1278
|
-
]
|
|
1279
|
-
}, group))
|
|
1280
|
-
}) : renderFeatureCards(nonFeaturedFeatures)
|
|
1281
|
-
]
|
|
1282
|
-
})
|
|
1283
|
-
]
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
// src/presentation/features/organisms/FeatureEventsList.tsx
|
|
1287
|
-
import { EntityCard as EntityCard3 } from "@contractspec/lib.design-system";
|
|
1288
|
-
import { Radio as Radio3 } from "lucide-react";
|
|
1289
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1290
|
-
"use client";
|
|
1291
|
-
function FeatureEventsList({ feature }) {
|
|
1292
|
-
if (!feature.events?.length)
|
|
1293
|
-
return null;
|
|
1294
|
-
return /* @__PURE__ */ jsx9("div", {
|
|
1295
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1296
|
-
children: feature.events.map((ev) => {
|
|
1297
|
-
const spec = resolveSerializedEventSpec(ev.key, ev.version);
|
|
1298
|
-
return /* @__PURE__ */ jsx9(EntityCard3, {
|
|
1299
|
-
cardTitle: ev.key,
|
|
1300
|
-
cardSubtitle: `v${ev.version}`,
|
|
1301
|
-
footer: spec?.meta.description,
|
|
1302
|
-
icon: /* @__PURE__ */ jsx9(Radio3, {
|
|
1303
|
-
className: "h-4 w-4"
|
|
1304
|
-
}),
|
|
1305
|
-
href: `/features/${feature.meta.key}/events/${ev.key}`
|
|
1306
|
-
}, ev.key);
|
|
1307
|
-
})
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
// src/presentation/features/organisms/FeatureFormsList.tsx
|
|
1312
|
-
import { EntityCard as EntityCard4 } from "@contractspec/lib.design-system";
|
|
1313
|
-
import { FormInput } from "lucide-react";
|
|
1314
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1315
|
-
"use client";
|
|
1316
|
-
function FeatureFormsList({ feature }) {
|
|
1317
|
-
if (!feature.forms?.length)
|
|
1318
|
-
return null;
|
|
1319
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
1320
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1321
|
-
children: feature.forms.map((form) => {
|
|
1322
|
-
const spec = resolveSerializedFormSpec(form.key, form.version);
|
|
1323
|
-
return /* @__PURE__ */ jsx10(EntityCard4, {
|
|
1324
|
-
cardTitle: form.key,
|
|
1325
|
-
cardSubtitle: form.version ? `v${form.version}` : undefined,
|
|
1326
|
-
footer: spec?.meta.description,
|
|
1327
|
-
icon: /* @__PURE__ */ jsx10(FormInput, {
|
|
1328
|
-
className: "h-4 w-4"
|
|
1329
|
-
}),
|
|
1330
|
-
href: `/features/${feature.meta.key}/forms/${form.key}`
|
|
1331
|
-
}, form.key);
|
|
1332
|
-
})
|
|
1333
|
-
});
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
// src/presentation/features/organisms/FeatureOperationsList.tsx
|
|
1337
|
-
import { EntityCard as EntityCard5 } from "@contractspec/lib.design-system";
|
|
1338
|
-
import { Zap as Zap3 } from "lucide-react";
|
|
1339
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1340
|
-
"use client";
|
|
1341
|
-
function FeatureOperationsList({
|
|
1342
|
-
feature
|
|
1343
|
-
}) {
|
|
1344
|
-
if (!feature.operations?.length)
|
|
1345
|
-
return null;
|
|
1346
|
-
return /* @__PURE__ */ jsx11("div", {
|
|
1347
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1348
|
-
children: feature.operations.map((op) => {
|
|
1349
|
-
const spec = resolveSerializedOperationSpec(op.key, op.version);
|
|
1350
|
-
return /* @__PURE__ */ jsx11(EntityCard5, {
|
|
1351
|
-
cardTitle: op.key,
|
|
1352
|
-
cardSubtitle: `v${op.version}`,
|
|
1353
|
-
footer: spec?.meta.description,
|
|
1354
|
-
icon: /* @__PURE__ */ jsx11(Zap3, {
|
|
1355
|
-
className: "h-4 w-4"
|
|
1356
|
-
}),
|
|
1357
|
-
href: `/features/${feature.meta.key}/operations/${op.key}`
|
|
1358
|
-
}, op.key);
|
|
1359
|
-
})
|
|
1360
|
-
});
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
// src/presentation/features/organisms/FeaturePresentationsList.tsx
|
|
1364
|
-
import { EntityCard as EntityCard6 } from "@contractspec/lib.design-system";
|
|
1365
|
-
import { Layout as Layout4 } from "lucide-react";
|
|
1366
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1367
|
-
"use client";
|
|
1368
|
-
function FeaturePresentationsList({
|
|
1369
|
-
feature
|
|
1370
|
-
}) {
|
|
1371
|
-
if (!feature.presentations?.length)
|
|
1372
|
-
return null;
|
|
1373
|
-
return /* @__PURE__ */ jsx12("div", {
|
|
1374
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1375
|
-
children: feature.presentations.map((pres) => {
|
|
1376
|
-
const spec = resolveSerializedPresentationSpec(pres.key, pres.version);
|
|
1377
|
-
return /* @__PURE__ */ jsx12(EntityCard6, {
|
|
1378
|
-
cardTitle: pres.key,
|
|
1379
|
-
cardSubtitle: `v${pres.version}`,
|
|
1380
|
-
footer: spec?.meta.description,
|
|
1381
|
-
icon: /* @__PURE__ */ jsx12(Layout4, {
|
|
1382
|
-
className: "h-4 w-4"
|
|
1383
|
-
}),
|
|
1384
|
-
href: `/features/${feature.meta.key}/presentations/${pres.key}`
|
|
1385
|
-
}, pres.key);
|
|
1386
|
-
})
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
// src/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.tsx
|
|
1391
|
-
import {
|
|
1392
|
-
Breadcrumbs,
|
|
1393
|
-
CodeBlock,
|
|
1394
|
-
EmptyState as EmptyState2,
|
|
1395
|
-
PageHeaderResponsive as PageHeaderResponsive2,
|
|
1396
|
-
StatusChip as StatusChip6
|
|
1397
|
-
} from "@contractspec/lib.design-system";
|
|
1398
|
-
import { Card } from "@contractspec/lib.ui-kit-web/ui/card";
|
|
1399
|
-
import { Box as Box2, HStack as HStack7, VStack as VStack4 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
1400
|
-
import { cn as cn6 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
1401
|
-
import { BookOpen, Code, Database as Database2, Table as Table2 } from "lucide-react";
|
|
1402
|
-
import Link2 from "next/link";
|
|
1403
|
-
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1404
|
-
"use client";
|
|
1405
|
-
function FeatureDataViewDetailTemplate({
|
|
1406
|
-
feature,
|
|
1407
|
-
viewKey,
|
|
1408
|
-
view,
|
|
1409
|
-
spec,
|
|
1410
|
-
className
|
|
1411
|
-
}) {
|
|
1412
|
-
const viewRef = view ?? feature.dataViews?.find((v) => v.key === viewKey);
|
|
1413
|
-
const relatedDocs = useRelatedDocs(viewRef?.key || "", spec?.meta?.tags);
|
|
1414
|
-
if (!viewRef) {
|
|
1415
|
-
return /* @__PURE__ */ jsxs7(VStack4, {
|
|
1416
|
-
gap: "lg",
|
|
1417
|
-
className: cn6("mx-auto w-full max-w-5xl p-6", className),
|
|
1418
|
-
children: [
|
|
1419
|
-
/* @__PURE__ */ jsx13(PageHeaderResponsive2, {
|
|
1420
|
-
title: "Data View Not Found",
|
|
1421
|
-
subtitle: `Data View ${viewKey} not found in feature ${feature.meta.key}`,
|
|
1422
|
-
breadcrumb: /* @__PURE__ */ jsx13(Breadcrumbs, {
|
|
1423
|
-
items: [
|
|
1424
|
-
{ label: "Features", href: "/features" },
|
|
1425
|
-
{
|
|
1426
|
-
label: feature.meta.title || feature.meta.key,
|
|
1427
|
-
href: `/features/${feature.meta.key}`
|
|
1428
|
-
},
|
|
1429
|
-
{ label: "Data Views" }
|
|
1430
|
-
]
|
|
1431
|
-
})
|
|
1432
|
-
}),
|
|
1433
|
-
/* @__PURE__ */ jsx13(EmptyState2, {
|
|
1434
|
-
title: "Data View not found",
|
|
1435
|
-
description: `The data view '${viewKey}' could not be found in this feature.`,
|
|
1436
|
-
icon: /* @__PURE__ */ jsx13(Table2, {
|
|
1437
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
1438
|
-
})
|
|
1439
|
-
})
|
|
1440
|
-
]
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
return /* @__PURE__ */ jsxs7(VStack4, {
|
|
1444
|
-
gap: "lg",
|
|
1445
|
-
className: cn6("mx-auto w-full max-w-5xl p-6", className),
|
|
1446
|
-
children: [
|
|
1447
|
-
/* @__PURE__ */ jsx13(PageHeaderResponsive2, {
|
|
1448
|
-
title: viewRef.key,
|
|
1449
|
-
subtitle: `Data View defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
1450
|
-
breadcrumb: /* @__PURE__ */ jsx13(Breadcrumbs, {
|
|
1451
|
-
items: [
|
|
1452
|
-
{ label: "Features", href: "/features" },
|
|
1453
|
-
{
|
|
1454
|
-
label: feature.meta.title || feature.meta.key,
|
|
1455
|
-
href: `/features/${feature.meta.key}`
|
|
1456
|
-
},
|
|
1457
|
-
{
|
|
1458
|
-
label: "Data Views",
|
|
1459
|
-
href: `/features/${feature.meta.key}#dataviews`
|
|
1460
|
-
},
|
|
1461
|
-
{ label: viewRef.key }
|
|
1462
|
-
]
|
|
1463
|
-
})
|
|
1464
|
-
}),
|
|
1465
|
-
/* @__PURE__ */ jsxs7(HStack7, {
|
|
1466
|
-
gap: "sm",
|
|
1467
|
-
children: [
|
|
1468
|
-
/* @__PURE__ */ jsx13(StatusChip6, {
|
|
1469
|
-
tone: "neutral",
|
|
1470
|
-
label: viewRef.key,
|
|
1471
|
-
size: "sm",
|
|
1472
|
-
icon: /* @__PURE__ */ jsx13(Table2, {
|
|
1473
|
-
className: "h-3 w-3"
|
|
1474
|
-
})
|
|
1475
|
-
}),
|
|
1476
|
-
/* @__PURE__ */ jsx13(StatusChip6, {
|
|
1477
|
-
tone: "neutral",
|
|
1478
|
-
label: `v${viewRef.version}`,
|
|
1479
|
-
size: "sm"
|
|
1480
|
-
}),
|
|
1481
|
-
spec?.meta?.stability ? /* @__PURE__ */ jsx13(StatusChip6, {
|
|
1482
|
-
tone: spec.meta.stability === "stable" ? "success" : "warning",
|
|
1483
|
-
label: spec.meta.stability,
|
|
1484
|
-
size: "sm"
|
|
1485
|
-
}) : null
|
|
1486
|
-
]
|
|
1487
|
-
}),
|
|
1488
|
-
/* @__PURE__ */ jsxs7("div", {
|
|
1489
|
-
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
1490
|
-
children: [
|
|
1491
|
-
/* @__PURE__ */ jsx13("div", {
|
|
1492
|
-
className: "space-y-6 lg:col-span-2",
|
|
1493
|
-
children: /* @__PURE__ */ jsx13(Card, {
|
|
1494
|
-
className: "p-6",
|
|
1495
|
-
children: /* @__PURE__ */ jsxs7(VStack4, {
|
|
1496
|
-
gap: "md",
|
|
1497
|
-
children: [
|
|
1498
|
-
/* @__PURE__ */ jsxs7(HStack7, {
|
|
1499
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1500
|
-
children: [
|
|
1501
|
-
/* @__PURE__ */ jsx13(Code, {
|
|
1502
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1503
|
-
}),
|
|
1504
|
-
/* @__PURE__ */ jsx13("h3", {
|
|
1505
|
-
className: "font-semibold text-lg",
|
|
1506
|
-
children: "View Definition"
|
|
1507
|
-
})
|
|
1508
|
-
]
|
|
1509
|
-
}),
|
|
1510
|
-
spec ? /* @__PURE__ */ jsxs7(VStack4, {
|
|
1511
|
-
gap: "lg",
|
|
1512
|
-
children: [
|
|
1513
|
-
spec.meta.description && /* @__PURE__ */ jsx13("p", {
|
|
1514
|
-
className: "text-muted-foreground",
|
|
1515
|
-
children: spec.meta.description
|
|
1516
|
-
}),
|
|
1517
|
-
/* @__PURE__ */ jsxs7(Box2, {
|
|
1518
|
-
className: "flex-col gap-2",
|
|
1519
|
-
children: [
|
|
1520
|
-
/* @__PURE__ */ jsx13("span", {
|
|
1521
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
1522
|
-
children: "Source Query"
|
|
1523
|
-
}),
|
|
1524
|
-
/* @__PURE__ */ jsx13(CodeBlock, {
|
|
1525
|
-
code: JSON.stringify(spec.source, null, 2),
|
|
1526
|
-
language: "json"
|
|
1527
|
-
})
|
|
1528
|
-
]
|
|
1529
|
-
}),
|
|
1530
|
-
/* @__PURE__ */ jsxs7(Box2, {
|
|
1531
|
-
className: "flex-col gap-2",
|
|
1532
|
-
children: [
|
|
1533
|
-
/* @__PURE__ */ jsx13("span", {
|
|
1534
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
1535
|
-
children: "View Configuration"
|
|
1536
|
-
}),
|
|
1537
|
-
/* @__PURE__ */ jsx13(CodeBlock, {
|
|
1538
|
-
code: JSON.stringify(spec.view, null, 2),
|
|
1539
|
-
language: "json"
|
|
1540
|
-
})
|
|
1541
|
-
]
|
|
1542
|
-
})
|
|
1543
|
-
]
|
|
1544
|
-
}) : /* @__PURE__ */ jsxs7(VStack4, {
|
|
1545
|
-
gap: "md",
|
|
1546
|
-
children: [
|
|
1547
|
-
/* @__PURE__ */ jsx13("p", {
|
|
1548
|
-
className: "text-muted-foreground",
|
|
1549
|
-
children: "Full definition details are not available for this data view reference."
|
|
1550
|
-
}),
|
|
1551
|
-
/* @__PURE__ */ jsx13(CodeBlock, {
|
|
1552
|
-
code: JSON.stringify(viewRef, null, 2),
|
|
1553
|
-
language: "json"
|
|
1554
|
-
})
|
|
1555
|
-
]
|
|
1556
|
-
})
|
|
1557
|
-
]
|
|
1558
|
-
})
|
|
1559
|
-
})
|
|
1560
|
-
}),
|
|
1561
|
-
/* @__PURE__ */ jsx13("div", {
|
|
1562
|
-
className: "space-y-6",
|
|
1563
|
-
children: /* @__PURE__ */ jsx13(Card, {
|
|
1564
|
-
className: "p-6",
|
|
1565
|
-
children: /* @__PURE__ */ jsxs7(VStack4, {
|
|
1566
|
-
gap: "md",
|
|
1567
|
-
children: [
|
|
1568
|
-
/* @__PURE__ */ jsxs7(HStack7, {
|
|
1569
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1570
|
-
children: [
|
|
1571
|
-
/* @__PURE__ */ jsx13(Database2, {
|
|
1572
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1573
|
-
}),
|
|
1574
|
-
/* @__PURE__ */ jsx13("h3", {
|
|
1575
|
-
className: "font-semibold text-lg",
|
|
1576
|
-
children: "Metadata"
|
|
1577
|
-
})
|
|
1578
|
-
]
|
|
1579
|
-
}),
|
|
1580
|
-
/* @__PURE__ */ jsxs7("dl", {
|
|
1581
|
-
className: "grid grid-cols-1 gap-4 text-sm",
|
|
1582
|
-
children: [
|
|
1583
|
-
/* @__PURE__ */ jsxs7("div", {
|
|
1584
|
-
children: [
|
|
1585
|
-
/* @__PURE__ */ jsx13("dt", {
|
|
1586
|
-
className: "text-muted-foreground",
|
|
1587
|
-
children: "Key"
|
|
1588
|
-
}),
|
|
1589
|
-
/* @__PURE__ */ jsx13("dd", {
|
|
1590
|
-
className: "truncate font-medium",
|
|
1591
|
-
children: viewRef.key
|
|
1592
|
-
})
|
|
1593
|
-
]
|
|
1594
|
-
}),
|
|
1595
|
-
/* @__PURE__ */ jsxs7("div", {
|
|
1596
|
-
children: [
|
|
1597
|
-
/* @__PURE__ */ jsx13("dt", {
|
|
1598
|
-
className: "text-muted-foreground",
|
|
1599
|
-
children: "Version"
|
|
1600
|
-
}),
|
|
1601
|
-
/* @__PURE__ */ jsx13("dd", {
|
|
1602
|
-
className: "font-medium",
|
|
1603
|
-
children: viewRef.version
|
|
1604
|
-
})
|
|
1605
|
-
]
|
|
1606
|
-
}),
|
|
1607
|
-
spec?.meta?.owners && /* @__PURE__ */ jsxs7("div", {
|
|
1608
|
-
children: [
|
|
1609
|
-
/* @__PURE__ */ jsx13("dt", {
|
|
1610
|
-
className: "text-muted-foreground",
|
|
1611
|
-
children: "Owners"
|
|
1612
|
-
}),
|
|
1613
|
-
/* @__PURE__ */ jsx13("dd", {
|
|
1614
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
1615
|
-
children: spec.meta.owners.map((o) => /* @__PURE__ */ jsx13(StatusChip6, {
|
|
1616
|
-
label: o,
|
|
1617
|
-
size: "sm",
|
|
1618
|
-
tone: "neutral"
|
|
1619
|
-
}, o))
|
|
1620
|
-
})
|
|
1621
|
-
]
|
|
1622
|
-
}),
|
|
1623
|
-
spec?.meta?.tags && /* @__PURE__ */ jsxs7("div", {
|
|
1624
|
-
children: [
|
|
1625
|
-
/* @__PURE__ */ jsx13("dt", {
|
|
1626
|
-
className: "text-muted-foreground",
|
|
1627
|
-
children: "Tags"
|
|
1628
|
-
}),
|
|
1629
|
-
/* @__PURE__ */ jsx13("dd", {
|
|
1630
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
1631
|
-
children: spec.meta.tags.map((t) => /* @__PURE__ */ jsx13(StatusChip6, {
|
|
1632
|
-
label: `#${t}`,
|
|
1633
|
-
size: "sm",
|
|
1634
|
-
tone: "neutral"
|
|
1635
|
-
}, t))
|
|
1636
|
-
})
|
|
1637
|
-
]
|
|
1638
|
-
})
|
|
1639
|
-
]
|
|
1640
|
-
})
|
|
1641
|
-
]
|
|
1642
|
-
})
|
|
1643
|
-
})
|
|
1644
|
-
}),
|
|
1645
|
-
relatedDocs?.length ? /* @__PURE__ */ jsx13("div", {
|
|
1646
|
-
className: "lg:col-span-3",
|
|
1647
|
-
children: /* @__PURE__ */ jsx13(Card, {
|
|
1648
|
-
className: "p-6",
|
|
1649
|
-
children: /* @__PURE__ */ jsxs7(VStack4, {
|
|
1650
|
-
gap: "md",
|
|
1651
|
-
children: [
|
|
1652
|
-
/* @__PURE__ */ jsxs7(HStack7, {
|
|
1653
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1654
|
-
children: [
|
|
1655
|
-
/* @__PURE__ */ jsx13(BookOpen, {
|
|
1656
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1657
|
-
}),
|
|
1658
|
-
/* @__PURE__ */ jsx13("h3", {
|
|
1659
|
-
className: "font-semibold text-lg",
|
|
1660
|
-
children: "Related Documentation"
|
|
1661
|
-
})
|
|
1662
|
-
]
|
|
1663
|
-
}),
|
|
1664
|
-
/* @__PURE__ */ jsx13("div", {
|
|
1665
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1666
|
-
children: relatedDocs.map((doc) => /* @__PURE__ */ jsx13(Link2, {
|
|
1667
|
-
href: doc.route || `/docs/${doc.id}`,
|
|
1668
|
-
className: "group block",
|
|
1669
|
-
children: /* @__PURE__ */ jsxs7("div", {
|
|
1670
|
-
className: "h-full rounded-lg border p-4 transition-colors hover:border-primary",
|
|
1671
|
-
children: [
|
|
1672
|
-
/* @__PURE__ */ jsx13("h4", {
|
|
1673
|
-
className: "mb-1 font-semibold group-hover:text-primary",
|
|
1674
|
-
children: doc.title
|
|
1675
|
-
}),
|
|
1676
|
-
doc.summary && /* @__PURE__ */ jsx13("p", {
|
|
1677
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
1678
|
-
children: doc.summary
|
|
1679
|
-
})
|
|
1680
|
-
]
|
|
1681
|
-
})
|
|
1682
|
-
}, doc.id))
|
|
1683
|
-
})
|
|
1684
|
-
]
|
|
1685
|
-
})
|
|
1686
|
-
})
|
|
1687
|
-
}) : null
|
|
1688
|
-
]
|
|
1689
|
-
})
|
|
1690
|
-
]
|
|
1691
|
-
});
|
|
1692
|
-
}
|
|
1693
|
-
// src/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.tsx
|
|
1694
|
-
import {
|
|
1695
|
-
Breadcrumbs as Breadcrumbs2,
|
|
1696
|
-
PageHeaderResponsive as PageHeaderResponsive3
|
|
1697
|
-
} from "@contractspec/lib.design-system";
|
|
1698
|
-
import { VStack as VStack5 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
1699
|
-
import { cn as cn7 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
1700
|
-
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1701
|
-
"use client";
|
|
1702
|
-
function FeatureDataViewsTemplate({
|
|
1703
|
-
feature,
|
|
1704
|
-
className
|
|
1705
|
-
}) {
|
|
1706
|
-
return /* @__PURE__ */ jsxs8(VStack5, {
|
|
1707
|
-
gap: "lg",
|
|
1708
|
-
className: cn7("mx-auto w-full max-w-5xl p-6", className),
|
|
1709
|
-
children: [
|
|
1710
|
-
/* @__PURE__ */ jsx14(PageHeaderResponsive3, {
|
|
1711
|
-
title: "Data Views",
|
|
1712
|
-
subtitle: `Data views defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
1713
|
-
breadcrumb: /* @__PURE__ */ jsx14(Breadcrumbs2, {
|
|
1714
|
-
items: [
|
|
1715
|
-
{ label: "Features", href: "/features" },
|
|
1716
|
-
{
|
|
1717
|
-
label: feature.meta.title || feature.meta.key,
|
|
1718
|
-
href: `/features/${feature.meta.key}`
|
|
1719
|
-
},
|
|
1720
|
-
{ label: "Data Views" }
|
|
1721
|
-
]
|
|
1722
|
-
})
|
|
1723
|
-
}),
|
|
1724
|
-
/* @__PURE__ */ jsx14(FeatureDataViewsList, {
|
|
1725
|
-
feature
|
|
1726
|
-
})
|
|
1727
|
-
]
|
|
1728
|
-
});
|
|
1729
|
-
}
|
|
1730
|
-
// src/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.tsx
|
|
1731
|
-
import {
|
|
1732
|
-
Breadcrumbs as Breadcrumbs3,
|
|
1733
|
-
CodeBlock as CodeBlock2,
|
|
1734
|
-
EmptyState as EmptyState3,
|
|
1735
|
-
PageHeaderResponsive as PageHeaderResponsive4,
|
|
1736
|
-
StatusChip as StatusChip7
|
|
1737
|
-
} from "@contractspec/lib.design-system";
|
|
1738
|
-
import { Card as Card2 } from "@contractspec/lib.ui-kit-web/ui/card";
|
|
1739
|
-
import { Box as Box3, HStack as HStack8, VStack as VStack6 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
1740
|
-
import { cn as cn8 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
1741
|
-
import { BookOpen as BookOpen2, Code as Code2, Database as Database3, Radio as Radio4 } from "lucide-react";
|
|
1742
|
-
import Link3 from "next/link";
|
|
1743
|
-
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1744
|
-
"use client";
|
|
1745
|
-
function FeatureEventDetailTemplate({
|
|
1746
|
-
feature,
|
|
1747
|
-
eventKey,
|
|
1748
|
-
event,
|
|
1749
|
-
spec,
|
|
1750
|
-
className
|
|
1751
|
-
}) {
|
|
1752
|
-
const eventRef = event ?? feature.events?.find((ev) => ev.key === eventKey);
|
|
1753
|
-
const relatedDocs = useRelatedDocs(eventRef?.key || "", spec?.meta?.tags);
|
|
1754
|
-
if (!eventRef) {
|
|
1755
|
-
return /* @__PURE__ */ jsxs9(VStack6, {
|
|
1756
|
-
gap: "lg",
|
|
1757
|
-
className: cn8("mx-auto w-full max-w-5xl p-6", className),
|
|
1758
|
-
children: [
|
|
1759
|
-
/* @__PURE__ */ jsx15(PageHeaderResponsive4, {
|
|
1760
|
-
title: "Event Not Found",
|
|
1761
|
-
subtitle: `Event ${eventKey} not found in feature ${feature.meta.key}`,
|
|
1762
|
-
breadcrumb: /* @__PURE__ */ jsx15(Breadcrumbs3, {
|
|
1763
|
-
items: [
|
|
1764
|
-
{ label: "Features", href: "/features" },
|
|
1765
|
-
{
|
|
1766
|
-
label: feature.meta.title || feature.meta.key,
|
|
1767
|
-
href: `/features/${feature.meta.key}`
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
label: "Events",
|
|
1771
|
-
href: `/features/${feature.meta.key}/events`
|
|
1772
|
-
}
|
|
1773
|
-
]
|
|
1774
|
-
})
|
|
1775
|
-
}),
|
|
1776
|
-
/* @__PURE__ */ jsx15(EmptyState3, {
|
|
1777
|
-
title: "Event not found",
|
|
1778
|
-
description: `The event '${eventKey}' could not be found in this feature.`,
|
|
1779
|
-
icon: /* @__PURE__ */ jsx15(Radio4, {
|
|
1780
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
1781
|
-
})
|
|
1782
|
-
})
|
|
1783
|
-
]
|
|
1784
|
-
});
|
|
1785
|
-
}
|
|
1786
|
-
return /* @__PURE__ */ jsxs9(VStack6, {
|
|
1787
|
-
gap: "lg",
|
|
1788
|
-
className: cn8("mx-auto w-full max-w-5xl p-6", className),
|
|
1789
|
-
children: [
|
|
1790
|
-
/* @__PURE__ */ jsx15(PageHeaderResponsive4, {
|
|
1791
|
-
title: eventRef.key,
|
|
1792
|
-
subtitle: `Event defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
1793
|
-
breadcrumb: /* @__PURE__ */ jsx15(Breadcrumbs3, {
|
|
1794
|
-
items: [
|
|
1795
|
-
{ label: "Features", href: "/features" },
|
|
1796
|
-
{
|
|
1797
|
-
label: feature.meta.title || feature.meta.key,
|
|
1798
|
-
href: `/features/${feature.meta.key}`
|
|
1799
|
-
},
|
|
1800
|
-
{ label: "Events", href: `/features/${feature.meta.key}#events` },
|
|
1801
|
-
{ label: eventRef.key }
|
|
1802
|
-
]
|
|
1803
|
-
})
|
|
1804
|
-
}),
|
|
1805
|
-
/* @__PURE__ */ jsxs9(HStack8, {
|
|
1806
|
-
gap: "sm",
|
|
1807
|
-
children: [
|
|
1808
|
-
/* @__PURE__ */ jsx15(StatusChip7, {
|
|
1809
|
-
tone: "neutral",
|
|
1810
|
-
label: eventRef.key,
|
|
1811
|
-
size: "sm",
|
|
1812
|
-
icon: /* @__PURE__ */ jsx15(Radio4, {
|
|
1813
|
-
className: "h-3 w-3"
|
|
1814
|
-
})
|
|
1815
|
-
}),
|
|
1816
|
-
/* @__PURE__ */ jsx15(StatusChip7, {
|
|
1817
|
-
tone: "neutral",
|
|
1818
|
-
label: `v${eventRef.version}`,
|
|
1819
|
-
size: "sm"
|
|
1820
|
-
}),
|
|
1821
|
-
spec?.meta?.stability ? /* @__PURE__ */ jsx15(StatusChip7, {
|
|
1822
|
-
tone: spec.meta.stability === "stable" ? "success" : "warning",
|
|
1823
|
-
label: spec.meta.stability,
|
|
1824
|
-
size: "sm"
|
|
1825
|
-
}) : null
|
|
1826
|
-
]
|
|
1827
|
-
}),
|
|
1828
|
-
/* @__PURE__ */ jsxs9("div", {
|
|
1829
|
-
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
1830
|
-
children: [
|
|
1831
|
-
/* @__PURE__ */ jsx15("div", {
|
|
1832
|
-
className: "space-y-6 lg:col-span-2",
|
|
1833
|
-
children: /* @__PURE__ */ jsx15(Card2, {
|
|
1834
|
-
className: "p-6",
|
|
1835
|
-
children: /* @__PURE__ */ jsxs9(VStack6, {
|
|
1836
|
-
gap: "md",
|
|
1837
|
-
children: [
|
|
1838
|
-
/* @__PURE__ */ jsxs9(HStack8, {
|
|
1839
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1840
|
-
children: [
|
|
1841
|
-
/* @__PURE__ */ jsx15(Code2, {
|
|
1842
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1843
|
-
}),
|
|
1844
|
-
/* @__PURE__ */ jsx15("h3", {
|
|
1845
|
-
className: "font-semibold text-lg",
|
|
1846
|
-
children: "Payload Definition"
|
|
1847
|
-
})
|
|
1848
|
-
]
|
|
1849
|
-
}),
|
|
1850
|
-
spec ? /* @__PURE__ */ jsxs9(VStack6, {
|
|
1851
|
-
gap: "lg",
|
|
1852
|
-
children: [
|
|
1853
|
-
spec.meta.description && /* @__PURE__ */ jsx15("p", {
|
|
1854
|
-
className: "text-muted-foreground",
|
|
1855
|
-
children: spec.meta.description
|
|
1856
|
-
}),
|
|
1857
|
-
/* @__PURE__ */ jsxs9(Box3, {
|
|
1858
|
-
className: "flex-col gap-2",
|
|
1859
|
-
children: [
|
|
1860
|
-
/* @__PURE__ */ jsx15("span", {
|
|
1861
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
1862
|
-
children: "Payload Schema"
|
|
1863
|
-
}),
|
|
1864
|
-
/* @__PURE__ */ jsx15(CodeBlock2, {
|
|
1865
|
-
code: JSON.stringify(spec.payload, null, 2),
|
|
1866
|
-
language: "json"
|
|
1867
|
-
})
|
|
1868
|
-
]
|
|
1869
|
-
})
|
|
1870
|
-
]
|
|
1871
|
-
}) : /* @__PURE__ */ jsxs9(VStack6, {
|
|
1872
|
-
gap: "md",
|
|
1873
|
-
children: [
|
|
1874
|
-
/* @__PURE__ */ jsx15("p", {
|
|
1875
|
-
className: "text-muted-foreground",
|
|
1876
|
-
children: "Full payload details are not available for this event reference."
|
|
1877
|
-
}),
|
|
1878
|
-
/* @__PURE__ */ jsx15(CodeBlock2, {
|
|
1879
|
-
code: JSON.stringify(eventRef, null, 2),
|
|
1880
|
-
language: "json"
|
|
1881
|
-
})
|
|
1882
|
-
]
|
|
1883
|
-
})
|
|
1884
|
-
]
|
|
1885
|
-
})
|
|
1886
|
-
})
|
|
1887
|
-
}),
|
|
1888
|
-
/* @__PURE__ */ jsx15("div", {
|
|
1889
|
-
className: "space-y-6",
|
|
1890
|
-
children: /* @__PURE__ */ jsx15(Card2, {
|
|
1891
|
-
className: "p-6",
|
|
1892
|
-
children: /* @__PURE__ */ jsxs9(VStack6, {
|
|
1893
|
-
gap: "md",
|
|
1894
|
-
children: [
|
|
1895
|
-
/* @__PURE__ */ jsxs9(HStack8, {
|
|
1896
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1897
|
-
children: [
|
|
1898
|
-
/* @__PURE__ */ jsx15(Database3, {
|
|
1899
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1900
|
-
}),
|
|
1901
|
-
/* @__PURE__ */ jsx15("h3", {
|
|
1902
|
-
className: "font-semibold text-lg",
|
|
1903
|
-
children: "Metadata"
|
|
1904
|
-
})
|
|
1905
|
-
]
|
|
1906
|
-
}),
|
|
1907
|
-
/* @__PURE__ */ jsxs9("dl", {
|
|
1908
|
-
className: "grid grid-cols-1 gap-4 text-sm",
|
|
1909
|
-
children: [
|
|
1910
|
-
/* @__PURE__ */ jsxs9("div", {
|
|
1911
|
-
children: [
|
|
1912
|
-
/* @__PURE__ */ jsx15("dt", {
|
|
1913
|
-
className: "text-muted-foreground",
|
|
1914
|
-
children: "Key"
|
|
1915
|
-
}),
|
|
1916
|
-
/* @__PURE__ */ jsx15("dd", {
|
|
1917
|
-
className: "truncate font-medium",
|
|
1918
|
-
children: eventRef.key
|
|
1919
|
-
})
|
|
1920
|
-
]
|
|
1921
|
-
}),
|
|
1922
|
-
/* @__PURE__ */ jsxs9("div", {
|
|
1923
|
-
children: [
|
|
1924
|
-
/* @__PURE__ */ jsx15("dt", {
|
|
1925
|
-
className: "text-muted-foreground",
|
|
1926
|
-
children: "Version"
|
|
1927
|
-
}),
|
|
1928
|
-
/* @__PURE__ */ jsx15("dd", {
|
|
1929
|
-
className: "font-medium",
|
|
1930
|
-
children: eventRef.version
|
|
1931
|
-
})
|
|
1932
|
-
]
|
|
1933
|
-
}),
|
|
1934
|
-
spec?.meta?.owners && /* @__PURE__ */ jsxs9("div", {
|
|
1935
|
-
children: [
|
|
1936
|
-
/* @__PURE__ */ jsx15("dt", {
|
|
1937
|
-
className: "text-muted-foreground",
|
|
1938
|
-
children: "Owners"
|
|
1939
|
-
}),
|
|
1940
|
-
/* @__PURE__ */ jsx15("dd", {
|
|
1941
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
1942
|
-
children: spec.meta.owners.map((o) => /* @__PURE__ */ jsx15(StatusChip7, {
|
|
1943
|
-
label: o,
|
|
1944
|
-
size: "sm",
|
|
1945
|
-
tone: "neutral"
|
|
1946
|
-
}, o))
|
|
1947
|
-
})
|
|
1948
|
-
]
|
|
1949
|
-
})
|
|
1950
|
-
]
|
|
1951
|
-
})
|
|
1952
|
-
]
|
|
1953
|
-
})
|
|
1954
|
-
})
|
|
1955
|
-
}),
|
|
1956
|
-
relatedDocs?.length ? /* @__PURE__ */ jsx15("div", {
|
|
1957
|
-
className: "lg:col-span-3",
|
|
1958
|
-
children: /* @__PURE__ */ jsx15(Card2, {
|
|
1959
|
-
className: "p-6",
|
|
1960
|
-
children: /* @__PURE__ */ jsxs9(VStack6, {
|
|
1961
|
-
gap: "md",
|
|
1962
|
-
children: [
|
|
1963
|
-
/* @__PURE__ */ jsxs9(HStack8, {
|
|
1964
|
-
className: "items-center gap-2 border-b pb-2",
|
|
1965
|
-
children: [
|
|
1966
|
-
/* @__PURE__ */ jsx15(BookOpen2, {
|
|
1967
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
1968
|
-
}),
|
|
1969
|
-
/* @__PURE__ */ jsx15("h3", {
|
|
1970
|
-
className: "font-semibold text-lg",
|
|
1971
|
-
children: "Related Documentation"
|
|
1972
|
-
})
|
|
1973
|
-
]
|
|
1974
|
-
}),
|
|
1975
|
-
/* @__PURE__ */ jsx15("div", {
|
|
1976
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
1977
|
-
children: relatedDocs.map((doc) => /* @__PURE__ */ jsx15(Link3, {
|
|
1978
|
-
href: doc.route || `/docs/${doc.id}`,
|
|
1979
|
-
className: "group block",
|
|
1980
|
-
children: /* @__PURE__ */ jsxs9("div", {
|
|
1981
|
-
className: "h-full rounded-lg border p-4 transition-colors hover:border-primary",
|
|
1982
|
-
children: [
|
|
1983
|
-
/* @__PURE__ */ jsx15("h4", {
|
|
1984
|
-
className: "mb-1 font-semibold group-hover:text-primary",
|
|
1985
|
-
children: doc.title
|
|
1986
|
-
}),
|
|
1987
|
-
doc.summary && /* @__PURE__ */ jsx15("p", {
|
|
1988
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
1989
|
-
children: doc.summary
|
|
1990
|
-
})
|
|
1991
|
-
]
|
|
1992
|
-
})
|
|
1993
|
-
}, doc.id))
|
|
1994
|
-
})
|
|
1995
|
-
]
|
|
1996
|
-
})
|
|
1997
|
-
})
|
|
1998
|
-
}) : null
|
|
1999
|
-
]
|
|
2000
|
-
})
|
|
2001
|
-
]
|
|
2002
|
-
});
|
|
2003
|
-
}
|
|
2004
|
-
// src/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.tsx
|
|
2005
|
-
import {
|
|
2006
|
-
Breadcrumbs as Breadcrumbs4,
|
|
2007
|
-
PageHeaderResponsive as PageHeaderResponsive5
|
|
2008
|
-
} from "@contractspec/lib.design-system";
|
|
2009
|
-
import { VStack as VStack7 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2010
|
-
import { cn as cn9 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2011
|
-
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2012
|
-
"use client";
|
|
2013
|
-
function FeatureEventsTemplate({
|
|
2014
|
-
feature,
|
|
2015
|
-
className
|
|
2016
|
-
}) {
|
|
2017
|
-
return /* @__PURE__ */ jsxs10(VStack7, {
|
|
2018
|
-
gap: "lg",
|
|
2019
|
-
className: cn9("mx-auto w-full max-w-5xl p-6", className),
|
|
2020
|
-
children: [
|
|
2021
|
-
/* @__PURE__ */ jsx16(PageHeaderResponsive5, {
|
|
2022
|
-
title: "Events",
|
|
2023
|
-
subtitle: `Events defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2024
|
-
breadcrumb: /* @__PURE__ */ jsx16(Breadcrumbs4, {
|
|
2025
|
-
items: [
|
|
2026
|
-
{ label: "Features", href: "/features" },
|
|
2027
|
-
{
|
|
2028
|
-
label: feature.meta.title || feature.meta.key,
|
|
2029
|
-
href: `/features/${feature.meta.key}`
|
|
2030
|
-
},
|
|
2031
|
-
{ label: "Events" }
|
|
2032
|
-
]
|
|
2033
|
-
})
|
|
2034
|
-
}),
|
|
2035
|
-
/* @__PURE__ */ jsx16(FeatureEventsList, {
|
|
2036
|
-
feature
|
|
2037
|
-
})
|
|
2038
|
-
]
|
|
2039
|
-
});
|
|
2040
|
-
}
|
|
2041
|
-
// src/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.tsx
|
|
2042
|
-
import {
|
|
2043
|
-
Breadcrumbs as Breadcrumbs5,
|
|
2044
|
-
CodeBlock as CodeBlock3,
|
|
2045
|
-
EmptyState as EmptyState4,
|
|
2046
|
-
PageHeaderResponsive as PageHeaderResponsive6,
|
|
2047
|
-
StatusChip as StatusChip8
|
|
2048
|
-
} from "@contractspec/lib.design-system";
|
|
2049
|
-
import { Card as Card3 } from "@contractspec/lib.ui-kit-web/ui/card";
|
|
2050
|
-
import { Box as Box4, HStack as HStack9, VStack as VStack8 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2051
|
-
import { cn as cn10 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2052
|
-
import { BookOpen as BookOpen3, Code as Code3, Database as Database4, PenTool } from "lucide-react";
|
|
2053
|
-
import Link4 from "next/link";
|
|
2054
|
-
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2055
|
-
"use client";
|
|
2056
|
-
function FeatureFormDetailTemplate({
|
|
2057
|
-
feature,
|
|
2058
|
-
formKey,
|
|
2059
|
-
form,
|
|
2060
|
-
spec,
|
|
2061
|
-
className
|
|
2062
|
-
}) {
|
|
2063
|
-
const formRef = form ?? feature.forms?.find((f) => f.key === formKey);
|
|
2064
|
-
const relatedDocs = useRelatedDocs(formRef?.key || "", spec?.meta?.tags);
|
|
2065
|
-
if (!formRef) {
|
|
2066
|
-
return /* @__PURE__ */ jsxs11(VStack8, {
|
|
2067
|
-
gap: "lg",
|
|
2068
|
-
className: cn10("mx-auto w-full max-w-5xl p-6", className),
|
|
2069
|
-
children: [
|
|
2070
|
-
/* @__PURE__ */ jsx17(PageHeaderResponsive6, {
|
|
2071
|
-
title: "Form Not Found",
|
|
2072
|
-
subtitle: `Form ${formKey} not found in feature ${feature.meta.key}`,
|
|
2073
|
-
breadcrumb: /* @__PURE__ */ jsx17(Breadcrumbs5, {
|
|
2074
|
-
items: [
|
|
2075
|
-
{ label: "Features", href: "/features" },
|
|
2076
|
-
{
|
|
2077
|
-
label: feature.meta.title || feature.meta.key,
|
|
2078
|
-
href: `/features/${feature.meta.key}`
|
|
2079
|
-
},
|
|
2080
|
-
{ label: "Forms" }
|
|
2081
|
-
]
|
|
2082
|
-
})
|
|
2083
|
-
}),
|
|
2084
|
-
/* @__PURE__ */ jsx17(EmptyState4, {
|
|
2085
|
-
title: "Form not found",
|
|
2086
|
-
description: `The form '${formKey}' could not be found in this feature.`,
|
|
2087
|
-
icon: /* @__PURE__ */ jsx17(PenTool, {
|
|
2088
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
2089
|
-
})
|
|
2090
|
-
})
|
|
2091
|
-
]
|
|
2092
|
-
});
|
|
2093
|
-
}
|
|
2094
|
-
return /* @__PURE__ */ jsxs11(VStack8, {
|
|
2095
|
-
gap: "lg",
|
|
2096
|
-
className: cn10("mx-auto w-full max-w-5xl p-6", className),
|
|
2097
|
-
children: [
|
|
2098
|
-
/* @__PURE__ */ jsx17(PageHeaderResponsive6, {
|
|
2099
|
-
title: formRef.key,
|
|
2100
|
-
subtitle: `Form defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2101
|
-
breadcrumb: /* @__PURE__ */ jsx17(Breadcrumbs5, {
|
|
2102
|
-
items: [
|
|
2103
|
-
{ label: "Features", href: "/features" },
|
|
2104
|
-
{
|
|
2105
|
-
label: feature.meta.title || feature.meta.key,
|
|
2106
|
-
href: `/features/${feature.meta.key}`
|
|
2107
|
-
},
|
|
2108
|
-
{ label: "Forms", href: `/features/${feature.meta.key}#forms` },
|
|
2109
|
-
{ label: formRef.key }
|
|
2110
|
-
]
|
|
2111
|
-
})
|
|
2112
|
-
}),
|
|
2113
|
-
/* @__PURE__ */ jsxs11(HStack9, {
|
|
2114
|
-
gap: "sm",
|
|
2115
|
-
children: [
|
|
2116
|
-
/* @__PURE__ */ jsx17(StatusChip8, {
|
|
2117
|
-
tone: "neutral",
|
|
2118
|
-
label: formRef.key,
|
|
2119
|
-
size: "sm",
|
|
2120
|
-
icon: /* @__PURE__ */ jsx17(PenTool, {
|
|
2121
|
-
className: "h-3 w-3"
|
|
2122
|
-
})
|
|
2123
|
-
}),
|
|
2124
|
-
/* @__PURE__ */ jsx17(StatusChip8, {
|
|
2125
|
-
tone: "neutral",
|
|
2126
|
-
label: `v${formRef.version}`,
|
|
2127
|
-
size: "sm"
|
|
2128
|
-
}),
|
|
2129
|
-
spec?.meta?.stability ? /* @__PURE__ */ jsx17(StatusChip8, {
|
|
2130
|
-
tone: spec.meta.stability === "stable" ? "success" : "warning",
|
|
2131
|
-
label: spec.meta.stability,
|
|
2132
|
-
size: "sm"
|
|
2133
|
-
}) : null
|
|
2134
|
-
]
|
|
2135
|
-
}),
|
|
2136
|
-
/* @__PURE__ */ jsxs11("div", {
|
|
2137
|
-
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
2138
|
-
children: [
|
|
2139
|
-
/* @__PURE__ */ jsx17("div", {
|
|
2140
|
-
className: "space-y-6 lg:col-span-2",
|
|
2141
|
-
children: /* @__PURE__ */ jsx17(Card3, {
|
|
2142
|
-
className: "p-6",
|
|
2143
|
-
children: /* @__PURE__ */ jsxs11(VStack8, {
|
|
2144
|
-
gap: "md",
|
|
2145
|
-
children: [
|
|
2146
|
-
/* @__PURE__ */ jsxs11(HStack9, {
|
|
2147
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2148
|
-
children: [
|
|
2149
|
-
/* @__PURE__ */ jsx17(Code3, {
|
|
2150
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2151
|
-
}),
|
|
2152
|
-
/* @__PURE__ */ jsx17("h3", {
|
|
2153
|
-
className: "font-semibold text-lg",
|
|
2154
|
-
children: "Form Definition"
|
|
2155
|
-
})
|
|
2156
|
-
]
|
|
2157
|
-
}),
|
|
2158
|
-
spec ? /* @__PURE__ */ jsxs11(VStack8, {
|
|
2159
|
-
gap: "lg",
|
|
2160
|
-
children: [
|
|
2161
|
-
spec.meta.description && /* @__PURE__ */ jsx17("p", {
|
|
2162
|
-
className: "text-muted-foreground",
|
|
2163
|
-
children: spec.meta.description
|
|
2164
|
-
}),
|
|
2165
|
-
/* @__PURE__ */ jsxs11(Box4, {
|
|
2166
|
-
className: "flex-col gap-2",
|
|
2167
|
-
children: [
|
|
2168
|
-
/* @__PURE__ */ jsx17("span", {
|
|
2169
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
2170
|
-
children: "Fields"
|
|
2171
|
-
}),
|
|
2172
|
-
/* @__PURE__ */ jsx17(CodeBlock3, {
|
|
2173
|
-
code: JSON.stringify(spec.fields, null, 2),
|
|
2174
|
-
language: "json"
|
|
2175
|
-
})
|
|
2176
|
-
]
|
|
2177
|
-
}),
|
|
2178
|
-
/* @__PURE__ */ jsxs11(Box4, {
|
|
2179
|
-
className: "flex-col gap-2",
|
|
2180
|
-
children: [
|
|
2181
|
-
/* @__PURE__ */ jsx17("span", {
|
|
2182
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
2183
|
-
children: "Actions"
|
|
2184
|
-
}),
|
|
2185
|
-
/* @__PURE__ */ jsx17(CodeBlock3, {
|
|
2186
|
-
code: JSON.stringify(spec.actions, null, 2),
|
|
2187
|
-
language: "json"
|
|
2188
|
-
})
|
|
2189
|
-
]
|
|
2190
|
-
})
|
|
2191
|
-
]
|
|
2192
|
-
}) : /* @__PURE__ */ jsxs11(VStack8, {
|
|
2193
|
-
gap: "md",
|
|
2194
|
-
children: [
|
|
2195
|
-
/* @__PURE__ */ jsx17("p", {
|
|
2196
|
-
className: "text-muted-foreground",
|
|
2197
|
-
children: "Full form definition details are not available for this form reference."
|
|
2198
|
-
}),
|
|
2199
|
-
/* @__PURE__ */ jsx17(CodeBlock3, {
|
|
2200
|
-
code: JSON.stringify(formRef, null, 2),
|
|
2201
|
-
language: "json"
|
|
2202
|
-
})
|
|
2203
|
-
]
|
|
2204
|
-
})
|
|
2205
|
-
]
|
|
2206
|
-
})
|
|
2207
|
-
})
|
|
2208
|
-
}),
|
|
2209
|
-
/* @__PURE__ */ jsx17("div", {
|
|
2210
|
-
className: "space-y-6",
|
|
2211
|
-
children: /* @__PURE__ */ jsx17(Card3, {
|
|
2212
|
-
className: "p-6",
|
|
2213
|
-
children: /* @__PURE__ */ jsxs11(VStack8, {
|
|
2214
|
-
gap: "md",
|
|
2215
|
-
children: [
|
|
2216
|
-
/* @__PURE__ */ jsxs11(HStack9, {
|
|
2217
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2218
|
-
children: [
|
|
2219
|
-
/* @__PURE__ */ jsx17(Database4, {
|
|
2220
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2221
|
-
}),
|
|
2222
|
-
/* @__PURE__ */ jsx17("h3", {
|
|
2223
|
-
className: "font-semibold text-lg",
|
|
2224
|
-
children: "Metadata"
|
|
2225
|
-
})
|
|
2226
|
-
]
|
|
2227
|
-
}),
|
|
2228
|
-
/* @__PURE__ */ jsxs11("dl", {
|
|
2229
|
-
className: "grid grid-cols-1 gap-4 text-sm",
|
|
2230
|
-
children: [
|
|
2231
|
-
/* @__PURE__ */ jsxs11("div", {
|
|
2232
|
-
children: [
|
|
2233
|
-
/* @__PURE__ */ jsx17("dt", {
|
|
2234
|
-
className: "text-muted-foreground",
|
|
2235
|
-
children: "Key"
|
|
2236
|
-
}),
|
|
2237
|
-
/* @__PURE__ */ jsx17("dd", {
|
|
2238
|
-
className: "truncate font-medium",
|
|
2239
|
-
children: formRef.key
|
|
2240
|
-
})
|
|
2241
|
-
]
|
|
2242
|
-
}),
|
|
2243
|
-
/* @__PURE__ */ jsxs11("div", {
|
|
2244
|
-
children: [
|
|
2245
|
-
/* @__PURE__ */ jsx17("dt", {
|
|
2246
|
-
className: "text-muted-foreground",
|
|
2247
|
-
children: "Version"
|
|
2248
|
-
}),
|
|
2249
|
-
/* @__PURE__ */ jsx17("dd", {
|
|
2250
|
-
className: "font-medium",
|
|
2251
|
-
children: formRef.version
|
|
2252
|
-
})
|
|
2253
|
-
]
|
|
2254
|
-
}),
|
|
2255
|
-
spec?.meta?.owners && /* @__PURE__ */ jsxs11("div", {
|
|
2256
|
-
children: [
|
|
2257
|
-
/* @__PURE__ */ jsx17("dt", {
|
|
2258
|
-
className: "text-muted-foreground",
|
|
2259
|
-
children: "Owners"
|
|
2260
|
-
}),
|
|
2261
|
-
/* @__PURE__ */ jsx17("dd", {
|
|
2262
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
2263
|
-
children: spec.meta.owners.map((o) => /* @__PURE__ */ jsx17(StatusChip8, {
|
|
2264
|
-
label: o,
|
|
2265
|
-
size: "sm",
|
|
2266
|
-
tone: "neutral"
|
|
2267
|
-
}, o))
|
|
2268
|
-
})
|
|
2269
|
-
]
|
|
2270
|
-
}),
|
|
2271
|
-
spec?.meta?.tags && /* @__PURE__ */ jsxs11("div", {
|
|
2272
|
-
children: [
|
|
2273
|
-
/* @__PURE__ */ jsx17("dt", {
|
|
2274
|
-
className: "text-muted-foreground",
|
|
2275
|
-
children: "Tags"
|
|
2276
|
-
}),
|
|
2277
|
-
/* @__PURE__ */ jsx17("dd", {
|
|
2278
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
2279
|
-
children: spec.meta.tags.map((t) => /* @__PURE__ */ jsx17(StatusChip8, {
|
|
2280
|
-
label: `#${t}`,
|
|
2281
|
-
size: "sm",
|
|
2282
|
-
tone: "neutral"
|
|
2283
|
-
}, t))
|
|
2284
|
-
})
|
|
2285
|
-
]
|
|
2286
|
-
})
|
|
2287
|
-
]
|
|
2288
|
-
})
|
|
2289
|
-
]
|
|
2290
|
-
})
|
|
2291
|
-
})
|
|
2292
|
-
}),
|
|
2293
|
-
relatedDocs?.length ? /* @__PURE__ */ jsx17("div", {
|
|
2294
|
-
className: "lg:col-span-3",
|
|
2295
|
-
children: /* @__PURE__ */ jsx17(Card3, {
|
|
2296
|
-
className: "p-6",
|
|
2297
|
-
children: /* @__PURE__ */ jsxs11(VStack8, {
|
|
2298
|
-
gap: "md",
|
|
2299
|
-
children: [
|
|
2300
|
-
/* @__PURE__ */ jsxs11(HStack9, {
|
|
2301
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2302
|
-
children: [
|
|
2303
|
-
/* @__PURE__ */ jsx17(BookOpen3, {
|
|
2304
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2305
|
-
}),
|
|
2306
|
-
/* @__PURE__ */ jsx17("h3", {
|
|
2307
|
-
className: "font-semibold text-lg",
|
|
2308
|
-
children: "Related Documentation"
|
|
2309
|
-
})
|
|
2310
|
-
]
|
|
2311
|
-
}),
|
|
2312
|
-
/* @__PURE__ */ jsx17("div", {
|
|
2313
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
2314
|
-
children: relatedDocs.map((doc) => /* @__PURE__ */ jsx17(Link4, {
|
|
2315
|
-
href: doc.route || `/docs/${doc.id}`,
|
|
2316
|
-
className: "group block",
|
|
2317
|
-
children: /* @__PURE__ */ jsxs11("div", {
|
|
2318
|
-
className: "h-full rounded-lg border p-4 transition-colors hover:border-primary",
|
|
2319
|
-
children: [
|
|
2320
|
-
/* @__PURE__ */ jsx17("h4", {
|
|
2321
|
-
className: "mb-1 font-semibold group-hover:text-primary",
|
|
2322
|
-
children: doc.title
|
|
2323
|
-
}),
|
|
2324
|
-
doc.summary && /* @__PURE__ */ jsx17("p", {
|
|
2325
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
2326
|
-
children: doc.summary
|
|
2327
|
-
})
|
|
2328
|
-
]
|
|
2329
|
-
})
|
|
2330
|
-
}, doc.id))
|
|
2331
|
-
})
|
|
2332
|
-
]
|
|
2333
|
-
})
|
|
2334
|
-
})
|
|
2335
|
-
}) : null
|
|
2336
|
-
]
|
|
2337
|
-
})
|
|
2338
|
-
]
|
|
2339
|
-
});
|
|
2340
|
-
}
|
|
2341
|
-
// src/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.tsx
|
|
2342
|
-
import {
|
|
2343
|
-
Breadcrumbs as Breadcrumbs6,
|
|
2344
|
-
PageHeaderResponsive as PageHeaderResponsive7
|
|
2345
|
-
} from "@contractspec/lib.design-system";
|
|
2346
|
-
import { VStack as VStack9 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2347
|
-
import { cn as cn11 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2348
|
-
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2349
|
-
"use client";
|
|
2350
|
-
function FeatureFormsTemplate({
|
|
2351
|
-
feature,
|
|
2352
|
-
className
|
|
2353
|
-
}) {
|
|
2354
|
-
return /* @__PURE__ */ jsxs12(VStack9, {
|
|
2355
|
-
gap: "lg",
|
|
2356
|
-
className: cn11("mx-auto w-full max-w-5xl p-6", className),
|
|
2357
|
-
children: [
|
|
2358
|
-
/* @__PURE__ */ jsx18(PageHeaderResponsive7, {
|
|
2359
|
-
title: "Forms",
|
|
2360
|
-
subtitle: `Forms defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2361
|
-
breadcrumb: /* @__PURE__ */ jsx18(Breadcrumbs6, {
|
|
2362
|
-
items: [
|
|
2363
|
-
{ label: "Features", href: "/features" },
|
|
2364
|
-
{
|
|
2365
|
-
label: feature.meta.title || feature.meta.key,
|
|
2366
|
-
href: `/features/${feature.meta.key}`
|
|
2367
|
-
},
|
|
2368
|
-
{ label: "Forms" }
|
|
2369
|
-
]
|
|
2370
|
-
})
|
|
2371
|
-
}),
|
|
2372
|
-
/* @__PURE__ */ jsx18(FeatureFormsList, {
|
|
2373
|
-
feature
|
|
2374
|
-
})
|
|
2375
|
-
]
|
|
2376
|
-
});
|
|
2377
|
-
}
|
|
2378
|
-
// src/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.tsx
|
|
2379
|
-
import {
|
|
2380
|
-
Breadcrumbs as Breadcrumbs7,
|
|
2381
|
-
CodeBlock as CodeBlock4,
|
|
2382
|
-
EmptyState as EmptyState5,
|
|
2383
|
-
PageHeaderResponsive as PageHeaderResponsive8,
|
|
2384
|
-
StatusChip as StatusChip9
|
|
2385
|
-
} from "@contractspec/lib.design-system";
|
|
2386
|
-
import { Card as Card4 } from "@contractspec/lib.ui-kit-web/ui/card";
|
|
2387
|
-
import { Box as Box5, HStack as HStack10, VStack as VStack10 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2388
|
-
import { cn as cn12 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2389
|
-
import { Code as Code4, Database as Database5, Zap as Zap4 } from "lucide-react";
|
|
2390
|
-
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2391
|
-
"use client";
|
|
2392
|
-
function FeatureOperationDetailTemplate({
|
|
2393
|
-
feature,
|
|
2394
|
-
operationKey,
|
|
2395
|
-
operation,
|
|
2396
|
-
spec,
|
|
2397
|
-
className
|
|
2398
|
-
}) {
|
|
2399
|
-
const opRef = operation ?? feature.operations?.find((op) => op.key === operationKey);
|
|
2400
|
-
const _relatedDocs = useRelatedDocs(opRef?.key || "", spec?.meta?.tags);
|
|
2401
|
-
if (!opRef) {
|
|
2402
|
-
return /* @__PURE__ */ jsxs13(VStack10, {
|
|
2403
|
-
gap: "lg",
|
|
2404
|
-
className: cn12("mx-auto w-full max-w-5xl p-6", className),
|
|
2405
|
-
children: [
|
|
2406
|
-
/* @__PURE__ */ jsx19(PageHeaderResponsive8, {
|
|
2407
|
-
title: "Operation Not Found",
|
|
2408
|
-
subtitle: `Operation ${operationKey} not found in feature ${feature.meta.key}`,
|
|
2409
|
-
breadcrumb: /* @__PURE__ */ jsx19(Breadcrumbs7, {
|
|
2410
|
-
items: [
|
|
2411
|
-
{ label: "Features", href: "/features" },
|
|
2412
|
-
{
|
|
2413
|
-
label: feature.meta.title || feature.meta.key,
|
|
2414
|
-
href: `/features/${feature.meta.key}`
|
|
2415
|
-
},
|
|
2416
|
-
{ label: "Operations" }
|
|
2417
|
-
]
|
|
2418
|
-
})
|
|
2419
|
-
}),
|
|
2420
|
-
/* @__PURE__ */ jsx19(EmptyState5, {
|
|
2421
|
-
title: "Operation not found",
|
|
2422
|
-
description: `The operation '${operationKey}' could not be found in this feature.`,
|
|
2423
|
-
icon: /* @__PURE__ */ jsx19(Zap4, {
|
|
2424
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
2425
|
-
})
|
|
2426
|
-
})
|
|
2427
|
-
]
|
|
2428
|
-
});
|
|
2429
|
-
}
|
|
2430
|
-
return /* @__PURE__ */ jsxs13(VStack10, {
|
|
2431
|
-
gap: "lg",
|
|
2432
|
-
className: cn12("mx-auto w-full max-w-5xl p-6", className),
|
|
2433
|
-
children: [
|
|
2434
|
-
/* @__PURE__ */ jsx19(PageHeaderResponsive8, {
|
|
2435
|
-
title: opRef.key,
|
|
2436
|
-
subtitle: `Operation defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2437
|
-
breadcrumb: /* @__PURE__ */ jsx19(Breadcrumbs7, {
|
|
2438
|
-
items: [
|
|
2439
|
-
{ label: "Features", href: "/features" },
|
|
2440
|
-
{
|
|
2441
|
-
label: feature.meta.title || feature.meta.key,
|
|
2442
|
-
href: `/features/${feature.meta.key}`
|
|
2443
|
-
},
|
|
2444
|
-
{
|
|
2445
|
-
label: "Operations",
|
|
2446
|
-
href: `/features/${feature.meta.key}/operations`
|
|
2447
|
-
},
|
|
2448
|
-
{ label: opRef.key }
|
|
2449
|
-
]
|
|
2450
|
-
})
|
|
2451
|
-
}),
|
|
2452
|
-
/* @__PURE__ */ jsxs13(HStack10, {
|
|
2453
|
-
gap: "sm",
|
|
2454
|
-
children: [
|
|
2455
|
-
/* @__PURE__ */ jsx19(StatusChip9, {
|
|
2456
|
-
tone: "neutral",
|
|
2457
|
-
label: opRef.key,
|
|
2458
|
-
size: "sm",
|
|
2459
|
-
icon: /* @__PURE__ */ jsx19(Zap4, {
|
|
2460
|
-
className: "h-3 w-3"
|
|
2461
|
-
})
|
|
2462
|
-
}),
|
|
2463
|
-
/* @__PURE__ */ jsx19(StatusChip9, {
|
|
2464
|
-
tone: "neutral",
|
|
2465
|
-
label: `v${opRef.version}`,
|
|
2466
|
-
size: "sm"
|
|
2467
|
-
}),
|
|
2468
|
-
spec?.meta?.stability ? /* @__PURE__ */ jsx19(StatusChip9, {
|
|
2469
|
-
tone: spec.meta.stability === "stable" ? "success" : "warning",
|
|
2470
|
-
label: spec.meta.stability,
|
|
2471
|
-
size: "sm"
|
|
2472
|
-
}) : null
|
|
2473
|
-
]
|
|
2474
|
-
}),
|
|
2475
|
-
/* @__PURE__ */ jsxs13("div", {
|
|
2476
|
-
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
2477
|
-
children: [
|
|
2478
|
-
/* @__PURE__ */ jsx19("div", {
|
|
2479
|
-
className: "space-y-6 lg:col-span-2",
|
|
2480
|
-
children: /* @__PURE__ */ jsx19(Card4, {
|
|
2481
|
-
className: "p-6",
|
|
2482
|
-
children: /* @__PURE__ */ jsxs13(VStack10, {
|
|
2483
|
-
gap: "md",
|
|
2484
|
-
children: [
|
|
2485
|
-
/* @__PURE__ */ jsxs13(HStack10, {
|
|
2486
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2487
|
-
children: [
|
|
2488
|
-
/* @__PURE__ */ jsx19(Code4, {
|
|
2489
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2490
|
-
}),
|
|
2491
|
-
/* @__PURE__ */ jsx19("h3", {
|
|
2492
|
-
className: "font-semibold text-lg",
|
|
2493
|
-
children: "Schema Definition"
|
|
2494
|
-
})
|
|
2495
|
-
]
|
|
2496
|
-
}),
|
|
2497
|
-
spec ? /* @__PURE__ */ jsxs13(VStack10, {
|
|
2498
|
-
gap: "lg",
|
|
2499
|
-
children: [
|
|
2500
|
-
spec.meta.description && /* @__PURE__ */ jsx19("p", {
|
|
2501
|
-
className: "text-muted-foreground",
|
|
2502
|
-
children: spec.meta.description
|
|
2503
|
-
}),
|
|
2504
|
-
/* @__PURE__ */ jsxs13(Box5, {
|
|
2505
|
-
className: "flex-col gap-2",
|
|
2506
|
-
children: [
|
|
2507
|
-
/* @__PURE__ */ jsx19("span", {
|
|
2508
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
2509
|
-
children: "Input Schema"
|
|
2510
|
-
}),
|
|
2511
|
-
/* @__PURE__ */ jsx19(CodeBlock4, {
|
|
2512
|
-
className: "w-full",
|
|
2513
|
-
code: JSON.stringify(spec.io.input, null, 2),
|
|
2514
|
-
language: "json"
|
|
2515
|
-
})
|
|
2516
|
-
]
|
|
2517
|
-
}),
|
|
2518
|
-
/* @__PURE__ */ jsxs13(Box5, {
|
|
2519
|
-
className: "flex-col gap-2",
|
|
2520
|
-
children: [
|
|
2521
|
-
/* @__PURE__ */ jsx19("span", {
|
|
2522
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
2523
|
-
children: "Output Schema"
|
|
2524
|
-
}),
|
|
2525
|
-
/* @__PURE__ */ jsx19(CodeBlock4, {
|
|
2526
|
-
className: "w-full",
|
|
2527
|
-
code: JSON.stringify(spec.io.output, null, 2),
|
|
2528
|
-
language: "json"
|
|
2529
|
-
})
|
|
2530
|
-
]
|
|
2531
|
-
})
|
|
2532
|
-
]
|
|
2533
|
-
}) : /* @__PURE__ */ jsxs13(VStack10, {
|
|
2534
|
-
gap: "md",
|
|
2535
|
-
children: [
|
|
2536
|
-
/* @__PURE__ */ jsx19("p", {
|
|
2537
|
-
className: "text-muted-foreground",
|
|
2538
|
-
children: "Full schema details are not available for this operation reference."
|
|
2539
|
-
}),
|
|
2540
|
-
/* @__PURE__ */ jsx19(CodeBlock4, {
|
|
2541
|
-
code: JSON.stringify(opRef, null, 2),
|
|
2542
|
-
language: "json"
|
|
2543
|
-
})
|
|
2544
|
-
]
|
|
2545
|
-
})
|
|
2546
|
-
]
|
|
2547
|
-
})
|
|
2548
|
-
})
|
|
2549
|
-
}),
|
|
2550
|
-
/* @__PURE__ */ jsx19("div", {
|
|
2551
|
-
className: "space-y-6",
|
|
2552
|
-
children: /* @__PURE__ */ jsx19(Card4, {
|
|
2553
|
-
className: "p-6",
|
|
2554
|
-
children: /* @__PURE__ */ jsxs13(VStack10, {
|
|
2555
|
-
gap: "md",
|
|
2556
|
-
children: [
|
|
2557
|
-
/* @__PURE__ */ jsxs13(HStack10, {
|
|
2558
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2559
|
-
children: [
|
|
2560
|
-
/* @__PURE__ */ jsx19(Database5, {
|
|
2561
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2562
|
-
}),
|
|
2563
|
-
/* @__PURE__ */ jsx19("h3", {
|
|
2564
|
-
className: "font-semibold text-lg",
|
|
2565
|
-
children: "Metadata"
|
|
2566
|
-
})
|
|
2567
|
-
]
|
|
2568
|
-
}),
|
|
2569
|
-
/* @__PURE__ */ jsxs13("dl", {
|
|
2570
|
-
className: "grid grid-cols-1 gap-4 text-sm",
|
|
2571
|
-
children: [
|
|
2572
|
-
/* @__PURE__ */ jsxs13("div", {
|
|
2573
|
-
children: [
|
|
2574
|
-
/* @__PURE__ */ jsx19("dt", {
|
|
2575
|
-
className: "text-muted-foreground",
|
|
2576
|
-
children: "Key"
|
|
2577
|
-
}),
|
|
2578
|
-
/* @__PURE__ */ jsx19("dd", {
|
|
2579
|
-
className: "truncate font-medium",
|
|
2580
|
-
children: opRef.key
|
|
2581
|
-
})
|
|
2582
|
-
]
|
|
2583
|
-
}),
|
|
2584
|
-
/* @__PURE__ */ jsxs13("div", {
|
|
2585
|
-
children: [
|
|
2586
|
-
/* @__PURE__ */ jsx19("dt", {
|
|
2587
|
-
className: "text-muted-foreground",
|
|
2588
|
-
children: "Version"
|
|
2589
|
-
}),
|
|
2590
|
-
/* @__PURE__ */ jsx19("dd", {
|
|
2591
|
-
className: "font-medium",
|
|
2592
|
-
children: opRef.version
|
|
2593
|
-
})
|
|
2594
|
-
]
|
|
2595
|
-
}),
|
|
2596
|
-
spec?.meta?.context && /* @__PURE__ */ jsxs13("div", {
|
|
2597
|
-
children: [
|
|
2598
|
-
/* @__PURE__ */ jsx19("dt", {
|
|
2599
|
-
className: "text-muted-foreground",
|
|
2600
|
-
children: "Context"
|
|
2601
|
-
}),
|
|
2602
|
-
/* @__PURE__ */ jsx19("dd", {
|
|
2603
|
-
className: "font-medium",
|
|
2604
|
-
children: spec.meta.context
|
|
2605
|
-
})
|
|
2606
|
-
]
|
|
2607
|
-
}),
|
|
2608
|
-
spec?.meta?.owners && /* @__PURE__ */ jsxs13("div", {
|
|
2609
|
-
children: [
|
|
2610
|
-
/* @__PURE__ */ jsx19("dt", {
|
|
2611
|
-
className: "text-muted-foreground",
|
|
2612
|
-
children: "Owners"
|
|
2613
|
-
}),
|
|
2614
|
-
/* @__PURE__ */ jsx19("dd", {
|
|
2615
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
2616
|
-
children: spec.meta.owners.map((o) => /* @__PURE__ */ jsx19(StatusChip9, {
|
|
2617
|
-
label: o,
|
|
2618
|
-
size: "sm",
|
|
2619
|
-
tone: "neutral"
|
|
2620
|
-
}, o))
|
|
2621
|
-
})
|
|
2622
|
-
]
|
|
2623
|
-
}),
|
|
2624
|
-
spec?.meta?.tags && /* @__PURE__ */ jsxs13("div", {
|
|
2625
|
-
children: [
|
|
2626
|
-
/* @__PURE__ */ jsx19("dt", {
|
|
2627
|
-
className: "text-muted-foreground",
|
|
2628
|
-
children: "Tags"
|
|
2629
|
-
}),
|
|
2630
|
-
/* @__PURE__ */ jsx19("dd", {
|
|
2631
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
2632
|
-
children: spec.meta.tags.map((t) => /* @__PURE__ */ jsx19(StatusChip9, {
|
|
2633
|
-
label: `#${t}`,
|
|
2634
|
-
size: "sm",
|
|
2635
|
-
tone: "neutral"
|
|
2636
|
-
}, t))
|
|
2637
|
-
})
|
|
2638
|
-
]
|
|
2639
|
-
})
|
|
2640
|
-
]
|
|
2641
|
-
})
|
|
2642
|
-
]
|
|
2643
|
-
})
|
|
2644
|
-
})
|
|
2645
|
-
})
|
|
2646
|
-
]
|
|
2647
|
-
})
|
|
2648
|
-
]
|
|
2649
|
-
});
|
|
2650
|
-
}
|
|
2651
|
-
// src/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.tsx
|
|
2652
|
-
import {
|
|
2653
|
-
Breadcrumbs as Breadcrumbs8,
|
|
2654
|
-
PageHeaderResponsive as PageHeaderResponsive9
|
|
2655
|
-
} from "@contractspec/lib.design-system";
|
|
2656
|
-
import { VStack as VStack11 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2657
|
-
import { cn as cn13 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2658
|
-
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2659
|
-
"use client";
|
|
2660
|
-
function FeatureOperationsTemplate({
|
|
2661
|
-
feature,
|
|
2662
|
-
className
|
|
2663
|
-
}) {
|
|
2664
|
-
return /* @__PURE__ */ jsxs14(VStack11, {
|
|
2665
|
-
gap: "lg",
|
|
2666
|
-
className: cn13("mx-auto w-full max-w-5xl p-6", className),
|
|
2667
|
-
children: [
|
|
2668
|
-
/* @__PURE__ */ jsx20(PageHeaderResponsive9, {
|
|
2669
|
-
title: "Operations",
|
|
2670
|
-
subtitle: `Operations defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2671
|
-
breadcrumb: /* @__PURE__ */ jsx20(Breadcrumbs8, {
|
|
2672
|
-
items: [
|
|
2673
|
-
{ label: "Features", href: "/features" },
|
|
2674
|
-
{
|
|
2675
|
-
label: feature.meta.title || feature.meta.key,
|
|
2676
|
-
href: `/features/${feature.meta.key}`
|
|
2677
|
-
},
|
|
2678
|
-
{ label: "Operations" }
|
|
2679
|
-
]
|
|
2680
|
-
})
|
|
2681
|
-
}),
|
|
2682
|
-
/* @__PURE__ */ jsx20(FeatureOperationsList, {
|
|
2683
|
-
feature
|
|
2684
|
-
})
|
|
2685
|
-
]
|
|
2686
|
-
});
|
|
2687
|
-
}
|
|
2688
|
-
// src/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.tsx
|
|
2689
|
-
import {
|
|
2690
|
-
Breadcrumbs as Breadcrumbs9,
|
|
2691
|
-
PageHeaderResponsive as PageHeaderResponsive10
|
|
2692
|
-
} from "@contractspec/lib.design-system";
|
|
2693
|
-
import { VStack as VStack12 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2694
|
-
import { cn as cn14 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2695
|
-
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2696
|
-
"use client";
|
|
2697
|
-
function FeatureOverviewTemplate({
|
|
2698
|
-
feature,
|
|
2699
|
-
className
|
|
2700
|
-
}) {
|
|
2701
|
-
return /* @__PURE__ */ jsxs15(VStack12, {
|
|
2702
|
-
gap: "lg",
|
|
2703
|
-
className: cn14("mx-auto w-full max-w-5xl p-6", className),
|
|
2704
|
-
children: [
|
|
2705
|
-
/* @__PURE__ */ jsx21(PageHeaderResponsive10, {
|
|
2706
|
-
title: feature.meta.title || feature.meta.key,
|
|
2707
|
-
subtitle: feature.meta.description || "Feature overview",
|
|
2708
|
-
breadcrumb: /* @__PURE__ */ jsx21(Breadcrumbs9, {
|
|
2709
|
-
items: [
|
|
2710
|
-
{ label: "Features", href: "/features" },
|
|
2711
|
-
{ label: feature.meta.title || feature.meta.key }
|
|
2712
|
-
]
|
|
2713
|
-
})
|
|
2714
|
-
}),
|
|
2715
|
-
/* @__PURE__ */ jsx21(FeatureDetail, {
|
|
2716
|
-
feature
|
|
2717
|
-
})
|
|
2718
|
-
]
|
|
2719
|
-
});
|
|
2720
|
-
}
|
|
2721
|
-
// src/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.tsx
|
|
2722
|
-
import {
|
|
2723
|
-
Breadcrumbs as Breadcrumbs10,
|
|
2724
|
-
CodeBlock as CodeBlock5,
|
|
2725
|
-
EmptyState as EmptyState6,
|
|
2726
|
-
PageHeaderResponsive as PageHeaderResponsive11,
|
|
2727
|
-
StatusChip as StatusChip10
|
|
2728
|
-
} from "@contractspec/lib.design-system";
|
|
2729
|
-
import { Card as Card5 } from "@contractspec/lib.ui-kit-web/ui/card";
|
|
2730
|
-
import { Box as Box6, HStack as HStack11, VStack as VStack13 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
2731
|
-
import { cn as cn15 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
2732
|
-
import { BookOpen as BookOpen4, Code as Code5, Database as Database6, Layout as Layout5 } from "lucide-react";
|
|
2733
|
-
import Link5 from "next/link";
|
|
2734
|
-
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2735
|
-
"use client";
|
|
2736
|
-
function FeaturePresentationDetailTemplate({
|
|
2737
|
-
feature,
|
|
2738
|
-
presentationKey,
|
|
2739
|
-
presentation,
|
|
2740
|
-
spec,
|
|
2741
|
-
className
|
|
2742
|
-
}) {
|
|
2743
|
-
const presRef = presentation ?? feature.presentations?.find((p) => p.key === presentationKey);
|
|
2744
|
-
const relatedDocs = useRelatedDocs(presRef?.key || "", spec?.meta?.tags);
|
|
2745
|
-
if (!presRef) {
|
|
2746
|
-
return /* @__PURE__ */ jsxs16(VStack13, {
|
|
2747
|
-
gap: "lg",
|
|
2748
|
-
className: cn15("mx-auto w-full max-w-5xl p-6", className),
|
|
2749
|
-
children: [
|
|
2750
|
-
/* @__PURE__ */ jsx22(PageHeaderResponsive11, {
|
|
2751
|
-
title: "Presentation Not Found",
|
|
2752
|
-
subtitle: `Presentation ${presentationKey} not found in feature ${feature.meta.key}`,
|
|
2753
|
-
breadcrumb: /* @__PURE__ */ jsx22(Breadcrumbs10, {
|
|
2754
|
-
items: [
|
|
2755
|
-
{ label: "Features", href: "/features" },
|
|
2756
|
-
{
|
|
2757
|
-
label: feature.meta.title || feature.meta.key,
|
|
2758
|
-
href: `/features/${feature.meta.key}`
|
|
2759
|
-
},
|
|
2760
|
-
{
|
|
2761
|
-
label: "Presentations",
|
|
2762
|
-
href: `/features/${feature.meta.key}/presentation`
|
|
2763
|
-
}
|
|
2764
|
-
]
|
|
2765
|
-
})
|
|
2766
|
-
}),
|
|
2767
|
-
/* @__PURE__ */ jsx22(EmptyState6, {
|
|
2768
|
-
title: "Presentation not found",
|
|
2769
|
-
description: `The presentation '${presentationKey}' could not be found in this feature.`,
|
|
2770
|
-
icon: /* @__PURE__ */ jsx22(Layout5, {
|
|
2771
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
2772
|
-
})
|
|
2773
|
-
})
|
|
2774
|
-
]
|
|
2775
|
-
});
|
|
2776
|
-
}
|
|
2777
|
-
return /* @__PURE__ */ jsxs16(VStack13, {
|
|
2778
|
-
gap: "lg",
|
|
2779
|
-
className: cn15("mx-auto w-full max-w-5xl p-6", className),
|
|
2780
|
-
children: [
|
|
2781
|
-
/* @__PURE__ */ jsx22(PageHeaderResponsive11, {
|
|
2782
|
-
title: presRef.key,
|
|
2783
|
-
subtitle: `Presentation defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
2784
|
-
breadcrumb: /* @__PURE__ */ jsx22(Breadcrumbs10, {
|
|
2785
|
-
items: [
|
|
2786
|
-
{ label: "Features", href: "/features" },
|
|
2787
|
-
{
|
|
2788
|
-
label: feature.meta.title || feature.meta.key,
|
|
2789
|
-
href: `/features/${feature.meta.key}`
|
|
2790
|
-
},
|
|
2791
|
-
{
|
|
2792
|
-
label: "Presentations",
|
|
2793
|
-
href: `/features/${feature.meta.key}#presentations`
|
|
2794
|
-
},
|
|
2795
|
-
{ label: presRef.key }
|
|
2796
|
-
]
|
|
2797
|
-
})
|
|
2798
|
-
}),
|
|
2799
|
-
/* @__PURE__ */ jsxs16(HStack11, {
|
|
2800
|
-
gap: "sm",
|
|
2801
|
-
children: [
|
|
2802
|
-
/* @__PURE__ */ jsx22(StatusChip10, {
|
|
2803
|
-
tone: "neutral",
|
|
2804
|
-
label: presRef.key,
|
|
2805
|
-
size: "sm",
|
|
2806
|
-
icon: /* @__PURE__ */ jsx22(Layout5, {
|
|
2807
|
-
className: "h-3 w-3"
|
|
2808
|
-
})
|
|
2809
|
-
}),
|
|
2810
|
-
/* @__PURE__ */ jsx22(StatusChip10, {
|
|
2811
|
-
tone: "neutral",
|
|
2812
|
-
label: `v${presRef.version}`,
|
|
2813
|
-
size: "sm"
|
|
2814
|
-
}),
|
|
2815
|
-
spec?.meta?.stability ? /* @__PURE__ */ jsx22(StatusChip10, {
|
|
2816
|
-
tone: spec.meta.stability === "stable" ? "success" : "warning",
|
|
2817
|
-
label: spec.meta.stability,
|
|
2818
|
-
size: "sm"
|
|
2819
|
-
}) : null
|
|
2820
|
-
]
|
|
2821
|
-
}),
|
|
2822
|
-
/* @__PURE__ */ jsxs16("div", {
|
|
2823
|
-
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
2824
|
-
children: [
|
|
2825
|
-
/* @__PURE__ */ jsx22("div", {
|
|
2826
|
-
className: "space-y-6 lg:col-span-2",
|
|
2827
|
-
children: /* @__PURE__ */ jsx22(Card5, {
|
|
2828
|
-
className: "p-6",
|
|
2829
|
-
children: /* @__PURE__ */ jsxs16(VStack13, {
|
|
2830
|
-
gap: "md",
|
|
2831
|
-
children: [
|
|
2832
|
-
/* @__PURE__ */ jsxs16(HStack11, {
|
|
2833
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2834
|
-
children: [
|
|
2835
|
-
/* @__PURE__ */ jsx22(Code5, {
|
|
2836
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2837
|
-
}),
|
|
2838
|
-
/* @__PURE__ */ jsx22("h3", {
|
|
2839
|
-
className: "font-semibold text-lg",
|
|
2840
|
-
children: "Component Definition"
|
|
2841
|
-
})
|
|
2842
|
-
]
|
|
2843
|
-
}),
|
|
2844
|
-
spec ? /* @__PURE__ */ jsxs16(VStack13, {
|
|
2845
|
-
gap: "lg",
|
|
2846
|
-
children: [
|
|
2847
|
-
spec.meta.description && /* @__PURE__ */ jsx22("p", {
|
|
2848
|
-
className: "text-muted-foreground",
|
|
2849
|
-
children: spec.meta.description
|
|
2850
|
-
}),
|
|
2851
|
-
/* @__PURE__ */ jsxs16(Box6, {
|
|
2852
|
-
className: "flex-col gap-2",
|
|
2853
|
-
children: [
|
|
2854
|
-
/* @__PURE__ */ jsx22("span", {
|
|
2855
|
-
className: "font-medium text-muted-foreground text-sm uppercase tracking-wider",
|
|
2856
|
-
children: "Spec Details"
|
|
2857
|
-
}),
|
|
2858
|
-
/* @__PURE__ */ jsx22(CodeBlock5, {
|
|
2859
|
-
code: JSON.stringify(spec, null, 2),
|
|
2860
|
-
language: "json"
|
|
2861
|
-
})
|
|
2862
|
-
]
|
|
2863
|
-
})
|
|
2864
|
-
]
|
|
2865
|
-
}) : /* @__PURE__ */ jsxs16(VStack13, {
|
|
2866
|
-
gap: "md",
|
|
2867
|
-
children: [
|
|
2868
|
-
/* @__PURE__ */ jsx22("p", {
|
|
2869
|
-
className: "text-muted-foreground",
|
|
2870
|
-
children: "Full component details are not available for this presentation reference."
|
|
2871
|
-
}),
|
|
2872
|
-
/* @__PURE__ */ jsx22(CodeBlock5, {
|
|
2873
|
-
code: JSON.stringify(presRef, null, 2),
|
|
2874
|
-
language: "json"
|
|
2875
|
-
})
|
|
2876
|
-
]
|
|
2877
|
-
})
|
|
2878
|
-
]
|
|
2879
|
-
})
|
|
2880
|
-
})
|
|
2881
|
-
}),
|
|
2882
|
-
/* @__PURE__ */ jsx22("div", {
|
|
2883
|
-
className: "space-y-6",
|
|
2884
|
-
children: /* @__PURE__ */ jsx22(Card5, {
|
|
2885
|
-
className: "p-6",
|
|
2886
|
-
children: /* @__PURE__ */ jsxs16(VStack13, {
|
|
2887
|
-
gap: "md",
|
|
2888
|
-
children: [
|
|
2889
|
-
/* @__PURE__ */ jsxs16(HStack11, {
|
|
2890
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2891
|
-
children: [
|
|
2892
|
-
/* @__PURE__ */ jsx22(Database6, {
|
|
2893
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2894
|
-
}),
|
|
2895
|
-
/* @__PURE__ */ jsx22("h3", {
|
|
2896
|
-
className: "font-semibold text-lg",
|
|
2897
|
-
children: "Metadata"
|
|
2898
|
-
})
|
|
2899
|
-
]
|
|
2900
|
-
}),
|
|
2901
|
-
/* @__PURE__ */ jsxs16("dl", {
|
|
2902
|
-
className: "grid grid-cols-1 gap-4 text-sm",
|
|
2903
|
-
children: [
|
|
2904
|
-
/* @__PURE__ */ jsxs16("div", {
|
|
2905
|
-
children: [
|
|
2906
|
-
/* @__PURE__ */ jsx22("dt", {
|
|
2907
|
-
className: "text-muted-foreground",
|
|
2908
|
-
children: "Key"
|
|
2909
|
-
}),
|
|
2910
|
-
/* @__PURE__ */ jsx22("dd", {
|
|
2911
|
-
className: "truncate font-medium",
|
|
2912
|
-
children: presRef.key
|
|
2913
|
-
})
|
|
2914
|
-
]
|
|
2915
|
-
}),
|
|
2916
|
-
/* @__PURE__ */ jsxs16("div", {
|
|
2917
|
-
children: [
|
|
2918
|
-
/* @__PURE__ */ jsx22("dt", {
|
|
2919
|
-
className: "text-muted-foreground",
|
|
2920
|
-
children: "Version"
|
|
2921
|
-
}),
|
|
2922
|
-
/* @__PURE__ */ jsx22("dd", {
|
|
2923
|
-
className: "font-medium",
|
|
2924
|
-
children: presRef.version
|
|
2925
|
-
})
|
|
2926
|
-
]
|
|
2927
|
-
}),
|
|
2928
|
-
spec?.meta?.owners && /* @__PURE__ */ jsxs16("div", {
|
|
2929
|
-
children: [
|
|
2930
|
-
/* @__PURE__ */ jsx22("dt", {
|
|
2931
|
-
className: "text-muted-foreground",
|
|
2932
|
-
children: "Owners"
|
|
2933
|
-
}),
|
|
2934
|
-
/* @__PURE__ */ jsx22("dd", {
|
|
2935
|
-
className: "flex flex-wrap gap-1 font-medium",
|
|
2936
|
-
children: spec.meta.owners.map((o) => /* @__PURE__ */ jsx22(StatusChip10, {
|
|
2937
|
-
label: o,
|
|
2938
|
-
size: "sm",
|
|
2939
|
-
tone: "neutral"
|
|
2940
|
-
}, o))
|
|
2941
|
-
})
|
|
2942
|
-
]
|
|
2943
|
-
})
|
|
2944
|
-
]
|
|
2945
|
-
})
|
|
2946
|
-
]
|
|
2947
|
-
})
|
|
2948
|
-
})
|
|
2949
|
-
}),
|
|
2950
|
-
relatedDocs?.length ? /* @__PURE__ */ jsx22("div", {
|
|
2951
|
-
className: "lg:col-span-3",
|
|
2952
|
-
children: /* @__PURE__ */ jsx22(Card5, {
|
|
2953
|
-
className: "p-6",
|
|
2954
|
-
children: /* @__PURE__ */ jsxs16(VStack13, {
|
|
2955
|
-
gap: "md",
|
|
2956
|
-
children: [
|
|
2957
|
-
/* @__PURE__ */ jsxs16(HStack11, {
|
|
2958
|
-
className: "items-center gap-2 border-b pb-2",
|
|
2959
|
-
children: [
|
|
2960
|
-
/* @__PURE__ */ jsx22(BookOpen4, {
|
|
2961
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
2962
|
-
}),
|
|
2963
|
-
/* @__PURE__ */ jsx22("h3", {
|
|
2964
|
-
className: "font-semibold text-lg",
|
|
2965
|
-
children: "Related Documentation"
|
|
2966
|
-
})
|
|
2967
|
-
]
|
|
2968
|
-
}),
|
|
2969
|
-
/* @__PURE__ */ jsx22("div", {
|
|
2970
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
2971
|
-
children: relatedDocs.map((doc) => /* @__PURE__ */ jsx22(Link5, {
|
|
2972
|
-
href: doc.route || `/docs/${doc.id}`,
|
|
2973
|
-
className: "group block",
|
|
2974
|
-
children: /* @__PURE__ */ jsxs16("div", {
|
|
2975
|
-
className: "h-full rounded-lg border p-4 transition-colors hover:border-primary",
|
|
2976
|
-
children: [
|
|
2977
|
-
/* @__PURE__ */ jsx22("h4", {
|
|
2978
|
-
className: "mb-1 font-semibold group-hover:text-primary",
|
|
2979
|
-
children: doc.title
|
|
2980
|
-
}),
|
|
2981
|
-
doc.summary && /* @__PURE__ */ jsx22("p", {
|
|
2982
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
2983
|
-
children: doc.summary
|
|
2984
|
-
})
|
|
2985
|
-
]
|
|
2986
|
-
})
|
|
2987
|
-
}, doc.id))
|
|
2988
|
-
})
|
|
2989
|
-
]
|
|
2990
|
-
})
|
|
2991
|
-
})
|
|
2992
|
-
}) : null
|
|
2993
|
-
]
|
|
2994
|
-
})
|
|
2995
|
-
]
|
|
2996
|
-
});
|
|
2997
|
-
}
|
|
2998
|
-
// src/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.tsx
|
|
2999
|
-
import {
|
|
3000
|
-
Breadcrumbs as Breadcrumbs11,
|
|
3001
|
-
PageHeaderResponsive as PageHeaderResponsive12
|
|
3002
|
-
} from "@contractspec/lib.design-system";
|
|
3003
|
-
import { VStack as VStack14 } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
3004
|
-
import { cn as cn16 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
3005
|
-
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3006
|
-
"use client";
|
|
3007
|
-
function FeaturePresentationsTemplate({
|
|
3008
|
-
feature,
|
|
3009
|
-
className
|
|
3010
|
-
}) {
|
|
3011
|
-
return /* @__PURE__ */ jsxs17(VStack14, {
|
|
3012
|
-
gap: "lg",
|
|
3013
|
-
className: cn16("mx-auto w-full max-w-5xl p-6", className),
|
|
3014
|
-
children: [
|
|
3015
|
-
/* @__PURE__ */ jsx23(PageHeaderResponsive12, {
|
|
3016
|
-
title: "Presentations",
|
|
3017
|
-
subtitle: `Presentations defined in ${feature.meta.title ?? feature.meta.key}`,
|
|
3018
|
-
breadcrumb: /* @__PURE__ */ jsx23(Breadcrumbs11, {
|
|
3019
|
-
items: [
|
|
3020
|
-
{ label: "Features", href: "/features" },
|
|
3021
|
-
{
|
|
3022
|
-
label: feature.meta.title || feature.meta.key,
|
|
3023
|
-
href: `/features/${feature.meta.key}`
|
|
3024
|
-
},
|
|
3025
|
-
{ label: "Presentations" }
|
|
3026
|
-
]
|
|
3027
|
-
})
|
|
3028
|
-
}),
|
|
3029
|
-
/* @__PURE__ */ jsx23(FeaturePresentationsList, {
|
|
3030
|
-
feature
|
|
3031
|
-
})
|
|
3032
|
-
]
|
|
3033
|
-
});
|
|
3034
|
-
}
|
|
3035
|
-
export {
|
|
3036
|
-
useRelatedDocs,
|
|
3037
|
-
useFeatureRegistry,
|
|
3038
|
-
useFeatureFilters,
|
|
3039
|
-
useContractsRegistry,
|
|
3040
|
-
getFeatureIconTone,
|
|
3041
|
-
FeaturePresentationsTemplate,
|
|
3042
|
-
FeaturePresentationsList,
|
|
3043
|
-
FeaturePresentationDetailTemplate,
|
|
3044
|
-
FeatureOverviewTemplate,
|
|
3045
|
-
FeatureOperationsTemplate,
|
|
3046
|
-
FeatureOperationsList,
|
|
3047
|
-
FeatureOperationDetailTemplate,
|
|
3048
|
-
FeatureIcon,
|
|
3049
|
-
FeatureHoverPreview,
|
|
3050
|
-
FeatureFormsTemplate,
|
|
3051
|
-
FeatureFormsList,
|
|
3052
|
-
FeatureFormDetailTemplate,
|
|
3053
|
-
FeatureFiltersBar,
|
|
3054
|
-
FeatureEventsTemplate,
|
|
3055
|
-
FeatureEventsList,
|
|
3056
|
-
FeatureEventDetailTemplate,
|
|
3057
|
-
FeatureDiscovery,
|
|
3058
|
-
FeatureDetail,
|
|
3059
|
-
FeatureDataViewsTemplate,
|
|
3060
|
-
FeatureDataViewsList,
|
|
3061
|
-
FeatureDataViewDetailTemplate,
|
|
3062
|
-
FeatureCategoryHeader,
|
|
3063
|
-
FeatureCard
|
|
3064
|
-
};
|
|
2
|
+
import{EventRegistry as y$,OperationSpecRegistry as v$}from"@contractspec/lib.contracts-spec";import{DataViewRegistry as b$}from"@contractspec/lib.contracts-spec/data-views";import{ContractReferenceDataView as S$,ContractReferenceQuery as g$,DocsGenerateCommand as k$,DocsGeneratedEvent as d$,DocsIndexDataView as l$,DocsIndexQuery as n$,DocsLayoutPresentation as p$,DocsPublishCommand as f$,DocsPublishedEvent as o$,DocsReferencePagePresentation as i$,DocsSearchForm as c$,ExampleCatalogDataView as x$}from"@contractspec/lib.contracts-spec/docs";import{FormRegistry as j$}from"@contractspec/lib.contracts-spec/forms";import{PresentationRegistry as u$}from"@contractspec/lib.contracts-spec/presentations";import{serializeDataViewSpec as r$,serializeEventSpec as t$,serializeFormSpec as a$,serializeOperationSpec as s$,serializePresentationSpec as e$}from"@contractspec/lib.contracts-spec/serialization";var Qz=null;function L4(){let z=new v$;return z.register(n$).register(g$).register(k$).register(f$),z}function Ez(){if(!Qz)Qz=L4();return Qz}function o(z,$){return Ez().get(z,$)}var Jz=null;function q4(){let z=new y$;return z.register(d$).register(o$),z}function N4(){if(!Jz)Jz=q4();return Jz}function F4(z,$){return N4().get(z,$)}var Xz=null;function V4(){let z=new u$;return z.register(p$).register(i$),z}function w4(){if(!Xz)Xz=V4();return Xz}function B4(z,$){return w4().get(z,$)}var Yz=null;function H4(){let z=new b$;return z.register(l$).register(S$).register(x$),z}function R4(){if(!Yz)Yz=H4();return Yz}function h4(z,$){return R4().get(z,$)}var _z=null;function m4(){let z=new j$;return z.register(c$),z}function C4(){if(!_z)_z=m4();return _z}function y4(z,$){return C4().get(z)}function mz(z,$){let X=o(z,$);return s$(X)??void 0}function Cz(z,$){let X=F4(z,$);return t$(X)??void 0}function yz(z,$){let X=B4(z,$);return e$(X)??void 0}function vz(z,$){let X=h4(z,$);return r$(X)??void 0}function bz(z,$){let X=y4(z,$);return a$(X)??void 0}function v4(){Qz=null}function b4(){Jz=null}function S4(){Xz=null}function g4(){Yz=null}function k4(){_z=null}function z1(){v4(),b4(),S4(),g4(),k4()}var Sz={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 $1,DocSummaryModel as Q1,DocsIndexInput as J1,DocsIndexOutput as X1,DocsIndexQuery as Y1,DocsIndexQuery as _1}from"@contractspec/lib.contracts-spec/docs";var gz={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 kz={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 E1}from"@contractspec/lib.contracts-spec/app-config";import{FeatureRegistry as U1}from"@contractspec/lib.contracts-spec/features";function d4(){let z=new U1;return z.register(Sz),z.register(gz),z.register(kz),z.register(E1),z}var Uz=null;function dz(){if(!Uz)Uz=d4();return Uz}function W1(){Uz=null}import{FeatureRegistry as i3}from"@contractspec/lib.contracts-spec/features";import{cn as Z1}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as G1,Database as lz,FileText as Wz,Globe as l4,Layout as i,MessageSquare as M1,Settings as A1,Shield as nz,Workflow as pz}from"lucide-react";import*as n4 from"react";import{jsx as P1}from"react/jsx-runtime";var O1={platform:A1,documentation:Wz,docs:Wz,integration:pz,api:l4,security:nz,data:lz,messaging:M1,ui:i,presentation:i},I1={documentation:Wz,guides:Wz,"api-reference":l4,presentations:i,ui:i,rendering:i,mcp:pz,integration:pz,security:nz,auth:nz,data:lz,storage:lz},p4={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"},D1={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};function Zz({domain:z,tags:$=[],stability:X,icon:Q,size:_="md",className:Y}){let M=n4.useMemo(()=>{if(Q)return Q;if(z){let D=O1[z.toLowerCase()];if(D)return D}for(let D of $){let O=I1[D.toLowerCase()];if(O)return O}return G1},[z,$,Q]),J=X?p4[X]||"primary":"primary",A={success:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",info:"text-blue-600 dark:text-blue-400",danger:"text-red-600 dark:text-red-400",primary:"text-primary"};return P1(M,{className:Z1(D1[_],A[J],Y)})}function Gz(z){if(!z)return"primary";return p4[z]||"primary"}import{useMemo as f4}from"react";function o4(){let z=f4(()=>Ez(),[]);return f4(()=>({resolveOperation:($)=>o($.key,$.version),getOperationSpec:($,X)=>o($,X),listOperations:()=>z.list()}),[z])}import{useCallback as c,useMemo as i4,useState as T1}from"react";var c4={search:"",tags:[],stability:[],domain:[]};function Mz(z){let[$,X]=T1(c4),Q=c((O)=>{X((I)=>({...I,search:O}))},[]),_=c((O)=>{X((I)=>({...I,tags:I.tags.includes(O)?I.tags.filter((H)=>H!==O):[...I.tags,O]}))},[]),Y=c((O)=>{X((I)=>({...I,stability:I.stability.includes(O)?I.stability.filter((H)=>H!==O):[...I.stability,O]}))},[]),M=c((O)=>{X((I)=>({...I,domain:I.domain.includes(O)?I.domain.filter((H)=>H!==O):[...I.domain,O]}))},[]),J=c(()=>X(c4),[]),A=i4(()=>{return $.search.length>0||$.tags.length>0||$.stability.length>0||$.domain.length>0},[$]),D=i4(()=>{return z.filter((O)=>{if($.search){let I=$.search.toLowerCase();if(!((O.meta.title??"").toLowerCase().includes(I)||O.meta.description?.toLowerCase().includes(I)||O.meta.key.toLowerCase().includes(I)))return!1}if($.tags.length>0){if(!$.tags.some((H)=>O.meta.tags?.includes(H)))return!1}if($.stability.length>0){if(!$.stability.includes(O.meta.stability??"unknown"))return!1}if($.domain.length>0){if(!$.domain.includes(O.meta.domain??"unknown"))return!1}return!0})},[z,$]);return{filters:$,setSearch:Q,toggleTag:_,toggleStability:Y,toggleDomain:M,clearFilters:J,filteredFeatures:D,hasActiveFilters:A}}import{useMemo as x4}from"react";function Az(){let z=x4(()=>dz(),[]);return x4(()=>{let $=z.list();return{features:$,getFeature:(X)=>z.get(X),getByTag:(X)=>z.listByTag(X),getByOwner:(X)=>z.listByOwner(X),getUniqueTags:()=>z.getUniqueTags(),getUniqueDomains:()=>{let X=new Set;for(let Q of $)if(Q.meta.domain)X.add(Q.meta.domain);return[...X].sort()},getUniqueStabilities:()=>{let X=new Set;for(let Q of $)if(Q.meta.stability)X.add(Q.meta.stability);return[...X].sort()}}},[z])}import{defaultDocRegistry as K1}from"@contractspec/lib.contracts-spec/docs";import{useMemo as L1}from"react";function R(z,$){return L1(()=>{try{return K1.list().filter(({block:_})=>{let Y=_.id.toLowerCase().includes(z.toLowerCase())||_.title.toLowerCase().includes(z.toLowerCase()),M=$?.some((J)=>_.tags?.some((A)=>A.toLowerCase().includes(J.toLowerCase())));return Y||M}).map(({block:_,route:Y})=>({id:_.id,title:_.title,summary:_.summary,route:Y}))}catch(Q){return console.error("Failed to fetch related docs:",Q),[]}},[z,$])}import{StatusChip as j4}from"@contractspec/lib.design-system";import{HStack as x}from"@contractspec/lib.ui-kit-web/ui/stack";import{ArrowRight as q1,Layout as N1,Radio as F1,Shield as V1,Tag as w1,Users as B1,Zap as H1}from"lucide-react";import{jsx as L,jsxs as B,Fragment as R1}from"react/jsx-runtime";function Oz({feature:z}){let{meta:$,operations:X,events:Q,presentations:_,capabilities:Y}=z,M=Y?.provides?.length||Y?.requires?.length;return B(R1,{children:[$.description&&L("p",{className:"text-muted-foreground text-sm leading-relaxed",children:$.description}),B(x,{gap:"md",className:"py-2",children:[X?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[L(H1,{className:"h-4 w-4 text-amber-500"}),L("span",{className:"font-medium",children:X.length}),L("span",{className:"text-muted-foreground",children:"ops"})]}):null,Q?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[L(F1,{className:"h-4 w-4 text-blue-500"}),L("span",{className:"font-medium",children:Q.length}),L("span",{className:"text-muted-foreground",children:"events"})]}):null,_?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[L(N1,{className:"h-4 w-4 text-purple-500"}),L("span",{className:"font-medium",children:_.length}),L("span",{className:"text-muted-foreground",children:"views"})]}):null]}),M&&B("div",{className:"space-y-1.5 border-border/50 border-t pt-1",children:[Y?.provides?.length?B(x,{gap:"xs",wrap:"wrap",className:"items-start",children:[L(V1,{className:"mt-0.5 h-3.5 w-3.5 text-emerald-500"}),L("span",{className:"text-muted-foreground text-xs",children:"Provides:"}),Y.provides.slice(0,2).map((J)=>L(j4,{tone:"success",label:J.key,size:"sm"},J.key)),Y.provides.length>2&&B("span",{className:"text-muted-foreground text-xs",children:["+",Y.provides.length-2]})]}):null,Y?.requires?.length?B(x,{gap:"xs",wrap:"wrap",className:"items-start",children:[L(q1,{className:"mt-0.5 h-3.5 w-3.5 text-blue-500"}),L("span",{className:"text-muted-foreground text-xs",children:"Requires:"}),Y.requires.slice(0,2).map((J)=>L(j4,{tone:"info",label:J.key,size:"sm"},J.key)),Y.requires.length>2&&B("span",{className:"text-muted-foreground text-xs",children:["+",Y.requires.length-2]})]}):null]}),$.tags?.length?B(x,{gap:"xs",wrap:"wrap",className:"items-center border-border/50 border-t pt-1",children:[L(w1,{className:"h-3.5 w-3.5 text-muted-foreground"}),$.tags.slice(0,4).map((J)=>B("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",children:["#",J]},J)),$.tags.length>4&&B("span",{className:"text-muted-foreground text-xs",children:["+",$.tags.length-4]})]}):null,$.owners?.length?B(x,{gap:"xs",className:"items-center text-muted-foreground text-xs",children:[L(B1,{className:"h-3.5 w-3.5"}),L("span",{children:$.owners.join(", ")})]}):null]})}import{EntityCard as h1,StatusChip as m1}from"@contractspec/lib.design-system";import{HStack as u4}from"@contractspec/lib.ui-kit-web/ui/stack";import{Layout as C1,Radio as y1,Shield as v1,Zap as b1}from"lucide-react";import{jsx as h,jsxs as n}from"react/jsx-runtime";var S1={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function Iz({feature:z,onSelect:$,className:X}){let{meta:Q,operations:_,events:Y,presentations:M,capabilities:J}=z,A=S1[Q.stability]??"neutral",D=Gz(Q.stability),O=Q.stability==="stable"?"strong":"default",I=$?()=>$(z):void 0,H=J?.provides?.length||J?.requires?.length;return h(h1,{cardTitle:Q.title,cardSubtitle:Q.key,className:X,onClick:I,emphasis:O,icon:h(Zz,{domain:Q.domain,tags:Q.tags,stability:Q.stability,size:"md"}),iconTone:D,chips:h(m1,{tone:A,label:Q.stability??"unknown",size:"sm"}),meta:Q.description?h("span",{className:"line-clamp-2 text-muted-foreground text-sm",children:Q.description}):void 0,preview:h(Oz,{feature:z}),footer:n(u4,{gap:"md",className:"w-full justify-between text-muted-foreground text-xs",children:[n(u4,{gap:"sm",children:[_?.length?n("span",{className:"flex items-center gap-1",children:[h(b1,{className:"h-3 w-3 text-amber-500"}),_.length]}):null,Y?.length?n("span",{className:"flex items-center gap-1",children:[h(y1,{className:"h-3 w-3 text-blue-500"}),Y.length]}):null,M?.length?n("span",{className:"flex items-center gap-1",children:[h(C1,{className:"h-3 w-3 text-purple-500"}),M.length]}):null]}),H&&n("span",{className:"flex items-center gap-1",children:[h(v1,{className:"h-3 w-3 text-emerald-500"}),(J?.provides?.length??0)+(J?.requires?.length??0)]})]})})}import{StatusChip as g1}from"@contractspec/lib.design-system";import{HStack as k1}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as r4}from"@contractspec/lib.ui-kit-web/ui/utils";import{Boxes as d1,ChevronDown as l1}from"lucide-react";import{jsx as j,jsxs as t4}from"react/jsx-runtime";function Dz({title:z,count:$,icon:X,isCollapsed:Q=!1,onToggle:_,className:Y}){return t4("button",{type:"button",onClick:_,className:r4("flex w-full items-center justify-between rounded-lg px-4 py-3","bg-muted/30 transition-colors hover:bg-muted/50","group cursor-pointer",Y),children:[t4(k1,{gap:"sm",className:"items-center",children:[j("div",{className:"text-muted-foreground transition-colors group-hover:text-foreground",children:X||j(d1,{className:"h-5 w-5"})}),j("span",{className:"font-semibold text-lg capitalize transition-colors group-hover:text-primary",children:z}),j(g1,{tone:"neutral",label:`${$} ${$===1?"feature":"features"}`,size:"sm"})]}),j(l1,{className:r4("h-5 w-5 text-muted-foreground transition-transform duration-200",Q&&"-rotate-90")})]})}import{Button as fz,Input as n1}from"@contractspec/lib.design-system";import{HStack as oz,VStack as p1}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as f1}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as u,jsxs as p}from"react/jsx-runtime";function Pz({uniqueTags:z,uniqueStabilities:$,filters:X,setSearch:Q,toggleTag:_,toggleStability:Y,clearFilters:M,hasActiveFilters:J,className:A}){return p(p1,{gap:"md",className:f1("w-full",A),children:[p(oz,{gap:"md",justify:"between",className:"w-full",children:[u(n1,{placeholder:"Search features...",value:X.search,onChange:(D)=>Q(D.target.value),className:"max-w-md","aria-label":"Search features"}),J&&u(fz,{variant:"ghost",size:"sm",onClick:M,children:"Clear filters"})]}),$.length>0&&p(oz,{gap:"xs",wrap:"wrap",children:[u("span",{className:"text-muted-foreground text-sm",children:"Stability:"}),$.map((D)=>u(fz,{variant:X.stability.includes(D)?"default":"outline",size:"sm",onClick:()=>Y(D),"aria-pressed":X.stability.includes(D),children:D},D))]}),z.length>0&&p(oz,{gap:"xs",wrap:"wrap",children:[u("span",{className:"text-muted-foreground text-sm",children:"Tags:"}),z.slice(0,10).map((D)=>p(fz,{variant:X.tags.includes(D)?"default":"outline",size:"sm",onClick:()=>_(D),"aria-pressed":X.tags.includes(D),children:["#",D]},D)),z.length>10&&p("span",{className:"text-muted-foreground text-sm",children:["+",z.length-10," more"]})]})]})}import{EntityCard as o1}from"@contractspec/lib.design-system";import{Table as i1}from"lucide-react";import{jsx as iz}from"react/jsx-runtime";function cz({feature:z}){if(!z.dataViews?.length)return null;return iz("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:z.dataViews.map(($)=>{let X=vz($.key,$.version);return iz(o1,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:X?.meta.description,icon:iz(i1,{className:"h-4 w-4"}),href:`/features/${z.meta.key}/dataviews/${$.key}`},$.key)})})}import{StatCard as xz,StatCardGroup as c1,StatusChip as y}from"@contractspec/lib.design-system";import{Box as Tz,HStack as r,VStack as x1}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as j1}from"@contractspec/lib.ui-kit-web/ui/utils";import jz from"next/link";import{jsx as P,jsxs as v}from"react/jsx-runtime";var u1={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function Kz({feature:z,className:$}){let{meta:X,operations:Q,events:_,presentations:Y,capabilities:M}=z,J=u1[X.stability]??"neutral";return v(x1,{gap:"lg",className:j1("w-full",$),children:[v(r,{gap:"sm",children:[P(y,{tone:J,label:X.stability??"unknown"}),P(y,{tone:"neutral",label:X.key,size:"sm"}),P(y,{tone:"neutral",label:`v${X.version}`,size:"sm"})]}),v(c1,{children:[P(jz,{href:`./${z.meta.key}/operations`,children:P(xz,{label:"Operations",value:Q?.length??0})}),P(jz,{href:`./${z.meta.key}/events`,children:P(xz,{label:"Events",value:_?.length??0})}),P(jz,{href:`./${z.meta.key}/presentations`,children:P(xz,{label:"Presentations",value:Y?.length??0})})]}),M?.provides?.length?v(Tz,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[P("span",{className:"font-semibold",children:"Provides Capabilities"}),P(r,{gap:"xs",wrap:"wrap",children:M.provides.map((A)=>P(y,{tone:"success",label:`${A.key} v${A.version}`,size:"sm"},`${A.key}-${A.version}`))})]}):null,M?.requires?.length?v(Tz,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[P("span",{className:"font-semibold",children:"Requires Capabilities"}),P(r,{gap:"xs",wrap:"wrap",children:M.requires.map((A)=>P(y,{tone:"info",label:`${A.key}${A.version?` v${A.version}`:""}${A.optional?" (optional)":""}`,size:"sm"},A.key))})]}):null,X.tags?.length?v(Tz,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[P("span",{className:"font-semibold",children:"Tags"}),P(r,{gap:"xs",wrap:"wrap",children:X.tags.map((A)=>P(y,{tone:"neutral",label:`#${A}`,size:"sm"},A))})]}):null,X.owners?.length?v(Tz,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[P("span",{className:"font-semibold",children:"Owners"}),P(r,{gap:"xs",wrap:"wrap",children:X.owners.map((A)=>P(y,{tone:"neutral",label:A,size:"sm"},A))})]}):null]})}import{Button as r1,EmptyState as t1,PageHeaderResponsive as a1,StatusChip as s1}from"@contractspec/lib.design-system";import{HStack as a4,VStack as t}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as uz}from"@contractspec/lib.ui-kit-web/ui/utils";import{LayoutGrid as e1,List as z2,Star as $2}from"lucide-react";import*as S from"react";import{jsx as w,jsxs as b}from"react/jsx-runtime";function Q2(z){let $={};for(let X of z){let Q=X.meta.domain||"Other";if(!$[Q])$[Q]=[];$[Q].push(X)}return $}function J2(z){let $=["stable","beta","experimental","deprecated","unknown"],X={};for(let _ of z){let Y=_.meta.stability||"unknown";if(!X[Y])X[Y]=[];X[Y].push(_)}let Q={};for(let _ of $)if(X[_])Q[_]=X[_];return Q}function s4({onSelectFeature:z,className:$,defaultViewMode:X="grid",groupBy:Q="domain",showFeatured:_=!0}){let{features:Y,getUniqueTags:M,getUniqueStabilities:J}=Az(),{filters:A,setSearch:D,toggleTag:O,toggleStability:I,clearFilters:H,filteredFeatures:m,hasActiveFilters:Bz}=Mz(Y),H$=M(),R$=J(),[Hz,P4]=S.useState(X),[T4,h$]=S.useState(new Set),Rz=S.useMemo(()=>m.filter((V)=>V.meta.stability==="stable"),[m]),zz=S.useMemo(()=>_?m.filter((V)=>V.meta.stability!=="stable"):m,[m,_]),K4=S.useMemo(()=>{if(Q==="none")return null;if(Q==="domain")return Q2(zz);return J2(zz)},[zz,Q]),m$=(V)=>{h$((C)=>{let $z=new Set(C);if($z.has(V))$z.delete(V);else $z.add(V);return $z})},C$=Hz==="grid"?"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3":"flex flex-col gap-3",hz=(V)=>w("div",{className:C$,children:V.map((C)=>w(Iz,{feature:C,onSelect:z},C.meta.key))});return b(t,{gap:"lg",className:uz("w-full p-6",$),children:[b("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[w(a1,{title:"Feature Discovery",subtitle:`Browse ${Y.length} available ContractSpec features`}),b(a4,{gap:"xs",children:[w("button",{type:"button",onClick:()=>P4("grid"),className:uz("rounded-md p-2 transition-colors",Hz==="grid"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"Grid view",children:w(e1,{className:"h-4 w-4"})}),w("button",{type:"button",onClick:()=>P4("list"),className:uz("rounded-md p-2 transition-colors",Hz==="list"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),"aria-label":"List view",children:w(z2,{className:"h-4 w-4"})})]})]}),w(Pz,{uniqueTags:H$,uniqueStabilities:R$,filters:A,setSearch:D,toggleTag:O,toggleStability:I,clearFilters:H,hasActiveFilters:Bz}),m.length===0?w(t1,{title:"No features found",description:Bz?"Try adjusting your search or filters":"No features are registered yet",primaryAction:Bz?w(r1,{variant:"outline",onClick:H,children:"Clear filters"}):void 0}):b(t,{gap:"lg",children:[_&&Rz.length>0&&b(t,{gap:"sm",children:[b(a4,{gap:"sm",className:"items-center",children:[w($2,{className:"h-5 w-5 fill-amber-500 text-amber-500"}),w("span",{className:"font-semibold text-lg",children:"Featured"}),w(s1,{tone:"success",label:`${Rz.length} stable`,size:"sm"})]}),hz(Rz)]}),K4?w(t,{gap:"md",children:Object.entries(K4).map(([V,C])=>b(t,{gap:"sm",children:[w(Dz,{title:V,count:C.length,isCollapsed:T4.has(V),onToggle:()=>m$(V)}),!T4.has(V)&&hz(C)]},V))}):hz(zz)]})]})}import{EntityCard as X2}from"@contractspec/lib.design-system";import{Radio as Y2}from"lucide-react";import{jsx as rz}from"react/jsx-runtime";function tz({feature:z}){if(!z.events?.length)return null;return rz("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:z.events.map(($)=>{let X=Cz($.key,$.version);return rz(X2,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:X?.meta.description,icon:rz(Y2,{className:"h-4 w-4"}),href:`/features/${z.meta.key}/events/${$.key}`},$.key)})})}import{EntityCard as _2}from"@contractspec/lib.design-system";import{FormInput as E2}from"lucide-react";import{jsx as az}from"react/jsx-runtime";function sz({feature:z}){if(!z.forms?.length)return null;return az("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:z.forms.map(($)=>{let X=bz($.key,$.version);return az(_2,{cardTitle:$.key,cardSubtitle:$.version?`v${$.version}`:void 0,footer:X?.meta.description,icon:az(E2,{className:"h-4 w-4"}),href:`/features/${z.meta.key}/forms/${$.key}`},$.key)})})}import{EntityCard as U2}from"@contractspec/lib.design-system";import{Zap as W2}from"lucide-react";import{jsx as ez}from"react/jsx-runtime";function z4({feature:z}){if(!z.operations?.length)return null;return ez("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:z.operations.map(($)=>{let X=mz($.key,$.version);return ez(U2,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:X?.meta.description,icon:ez(W2,{className:"h-4 w-4"}),href:`/features/${z.meta.key}/operations/${$.key}`},$.key)})})}import{EntityCard as Z2}from"@contractspec/lib.design-system";import{Layout as G2}from"lucide-react";import{jsx as $4}from"react/jsx-runtime";function Q4({feature:z}){if(!z.presentations?.length)return null;return $4("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:z.presentations.map(($)=>{let X=yz($.key,$.version);return $4(Z2,{cardTitle:$.key,cardSubtitle:`v${$.version}`,footer:X?.meta.description,icon:$4(G2,{className:"h-4 w-4"}),href:`/features/${z.meta.key}/presentations/${$.key}`},$.key)})})}import{Breadcrumbs as e4,CodeBlock as J4,EmptyState as M2,PageHeaderResponsive as z$,StatusChip as a}from"@contractspec/lib.design-system";import{Card as X4}from"@contractspec/lib.ui-kit-web/ui/card";import{Box as $$,HStack as Lz,VStack as g}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as Q$}from"@contractspec/lib.ui-kit-web/ui/utils";import{BookOpen as A2,Code as O2,Database as I2,Table as J$}from"lucide-react";import D2 from"next/link";import{jsx as E,jsxs as T}from"react/jsx-runtime";function P2({feature:z,viewKey:$,view:X,spec:Q,className:_}){let Y=X??z.dataViews?.find((J)=>J.key===$),M=R(Y?.key||"",Q?.meta?.tags);if(!Y)return T(g,{gap:"lg",className:Q$("mx-auto w-full max-w-5xl p-6",_),children:[E(z$,{title:"Data View Not Found",subtitle:`Data View ${$} not found in feature ${z.meta.key}`,breadcrumb:E(e4,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Data Views"}]})}),E(M2,{title:"Data View not found",description:`The data view '${$}' could not be found in this feature.`,icon:E(J$,{className:"h-12 w-12 text-muted-foreground"})})]});return T(g,{gap:"lg",className:Q$("mx-auto w-full max-w-5xl p-6",_),children:[E(z$,{title:Y.key,subtitle:`Data View defined in ${z.meta.title??z.meta.key}`,breadcrumb:E(e4,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Data Views",href:`/features/${z.meta.key}#dataviews`},{label:Y.key}]})}),T(Lz,{gap:"sm",children:[E(a,{tone:"neutral",label:Y.key,size:"sm",icon:E(J$,{className:"h-3 w-3"})}),E(a,{tone:"neutral",label:`v${Y.version}`,size:"sm"}),Q?.meta?.stability?E(a,{tone:Q.meta.stability==="stable"?"success":"warning",label:Q.meta.stability,size:"sm"}):null]}),T("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[E("div",{className:"space-y-6 lg:col-span-2",children:E(X4,{className:"p-6",children:T(g,{gap:"md",children:[T(Lz,{className:"items-center gap-2 border-b pb-2",children:[E(O2,{className:"h-5 w-5 text-muted-foreground"}),E("h3",{className:"font-semibold text-lg",children:"View Definition"})]}),Q?T(g,{gap:"lg",children:[Q.meta.description&&E("p",{className:"text-muted-foreground",children:Q.meta.description}),T($$,{className:"flex-col gap-2",children:[E("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Source Query"}),E(J4,{code:JSON.stringify(Q.source,null,2),language:"json"})]}),T($$,{className:"flex-col gap-2",children:[E("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"View Configuration"}),E(J4,{code:JSON.stringify(Q.view,null,2),language:"json"})]})]}):T(g,{gap:"md",children:[E("p",{className:"text-muted-foreground",children:"Full definition details are not available for this data view reference."}),E(J4,{code:JSON.stringify(Y,null,2),language:"json"})]})]})})}),E("div",{className:"space-y-6",children:E(X4,{className:"p-6",children:T(g,{gap:"md",children:[T(Lz,{className:"items-center gap-2 border-b pb-2",children:[E(I2,{className:"h-5 w-5 text-muted-foreground"}),E("h3",{className:"font-semibold text-lg",children:"Metadata"})]}),T("dl",{className:"grid grid-cols-1 gap-4 text-sm",children:[T("div",{children:[E("dt",{className:"text-muted-foreground",children:"Key"}),E("dd",{className:"truncate font-medium",children:Y.key})]}),T("div",{children:[E("dt",{className:"text-muted-foreground",children:"Version"}),E("dd",{className:"font-medium",children:Y.version})]}),Q?.meta?.owners&&T("div",{children:[E("dt",{className:"text-muted-foreground",children:"Owners"}),E("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.owners.map((J)=>E(a,{label:J,size:"sm",tone:"neutral"},J))})]}),Q?.meta?.tags&&T("div",{children:[E("dt",{className:"text-muted-foreground",children:"Tags"}),E("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.tags.map((J)=>E(a,{label:`#${J}`,size:"sm",tone:"neutral"},J))})]})]})]})})}),M?.length?E("div",{className:"lg:col-span-3",children:E(X4,{className:"p-6",children:T(g,{gap:"md",children:[T(Lz,{className:"items-center gap-2 border-b pb-2",children:[E(A2,{className:"h-5 w-5 text-muted-foreground"}),E("h3",{className:"font-semibold text-lg",children:"Related Documentation"})]}),E("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:M.map((J)=>E(D2,{href:J.route||`/docs/${J.id}`,className:"group block",children:T("div",{className:"h-full rounded-lg border p-4 transition-colors hover:border-primary",children:[E("h4",{className:"mb-1 font-semibold group-hover:text-primary",children:J.title}),J.summary&&E("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:J.summary})]})},J.id))})]})})}):null]})]})}import{Breadcrumbs as T2,PageHeaderResponsive as K2}from"@contractspec/lib.design-system";import{VStack as L2}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as q2}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as Y4,jsxs as N2}from"react/jsx-runtime";function X$({feature:z,className:$}){return N2(L2,{gap:"lg",className:q2("mx-auto w-full max-w-5xl p-6",$),children:[Y4(K2,{title:"Data Views",subtitle:`Data views defined in ${z.meta.title??z.meta.key}`,breadcrumb:Y4(T2,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Data Views"}]})}),Y4(cz,{feature:z})]})}import{Breadcrumbs as Y$,CodeBlock as _$,EmptyState as F2,PageHeaderResponsive as E$,StatusChip as qz}from"@contractspec/lib.design-system";import{Card as _4}from"@contractspec/lib.ui-kit-web/ui/card";import{Box as V2,HStack as Nz,VStack as k}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as U$}from"@contractspec/lib.ui-kit-web/ui/utils";import{BookOpen as w2,Code as B2,Database as H2,Radio as W$}from"lucide-react";import R2 from"next/link";import{jsx as W,jsxs as q}from"react/jsx-runtime";function h2({feature:z,eventKey:$,event:X,spec:Q,className:_}){let Y=X??z.events?.find((J)=>J.key===$),M=R(Y?.key||"",Q?.meta?.tags);if(!Y)return q(k,{gap:"lg",className:U$("mx-auto w-full max-w-5xl p-6",_),children:[W(E$,{title:"Event Not Found",subtitle:`Event ${$} not found in feature ${z.meta.key}`,breadcrumb:W(Y$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Events",href:`/features/${z.meta.key}/events`}]})}),W(F2,{title:"Event not found",description:`The event '${$}' could not be found in this feature.`,icon:W(W$,{className:"h-12 w-12 text-muted-foreground"})})]});return q(k,{gap:"lg",className:U$("mx-auto w-full max-w-5xl p-6",_),children:[W(E$,{title:Y.key,subtitle:`Event defined in ${z.meta.title??z.meta.key}`,breadcrumb:W(Y$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Events",href:`/features/${z.meta.key}#events`},{label:Y.key}]})}),q(Nz,{gap:"sm",children:[W(qz,{tone:"neutral",label:Y.key,size:"sm",icon:W(W$,{className:"h-3 w-3"})}),W(qz,{tone:"neutral",label:`v${Y.version}`,size:"sm"}),Q?.meta?.stability?W(qz,{tone:Q.meta.stability==="stable"?"success":"warning",label:Q.meta.stability,size:"sm"}):null]}),q("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[W("div",{className:"space-y-6 lg:col-span-2",children:W(_4,{className:"p-6",children:q(k,{gap:"md",children:[q(Nz,{className:"items-center gap-2 border-b pb-2",children:[W(B2,{className:"h-5 w-5 text-muted-foreground"}),W("h3",{className:"font-semibold text-lg",children:"Payload Definition"})]}),Q?q(k,{gap:"lg",children:[Q.meta.description&&W("p",{className:"text-muted-foreground",children:Q.meta.description}),q(V2,{className:"flex-col gap-2",children:[W("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Payload Schema"}),W(_$,{code:JSON.stringify(Q.payload,null,2),language:"json"})]})]}):q(k,{gap:"md",children:[W("p",{className:"text-muted-foreground",children:"Full payload details are not available for this event reference."}),W(_$,{code:JSON.stringify(Y,null,2),language:"json"})]})]})})}),W("div",{className:"space-y-6",children:W(_4,{className:"p-6",children:q(k,{gap:"md",children:[q(Nz,{className:"items-center gap-2 border-b pb-2",children:[W(H2,{className:"h-5 w-5 text-muted-foreground"}),W("h3",{className:"font-semibold text-lg",children:"Metadata"})]}),q("dl",{className:"grid grid-cols-1 gap-4 text-sm",children:[q("div",{children:[W("dt",{className:"text-muted-foreground",children:"Key"}),W("dd",{className:"truncate font-medium",children:Y.key})]}),q("div",{children:[W("dt",{className:"text-muted-foreground",children:"Version"}),W("dd",{className:"font-medium",children:Y.version})]}),Q?.meta?.owners&&q("div",{children:[W("dt",{className:"text-muted-foreground",children:"Owners"}),W("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.owners.map((J)=>W(qz,{label:J,size:"sm",tone:"neutral"},J))})]})]})]})})}),M?.length?W("div",{className:"lg:col-span-3",children:W(_4,{className:"p-6",children:q(k,{gap:"md",children:[q(Nz,{className:"items-center gap-2 border-b pb-2",children:[W(w2,{className:"h-5 w-5 text-muted-foreground"}),W("h3",{className:"font-semibold text-lg",children:"Related Documentation"})]}),W("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:M.map((J)=>W(R2,{href:J.route||`/docs/${J.id}`,className:"group block",children:q("div",{className:"h-full rounded-lg border p-4 transition-colors hover:border-primary",children:[W("h4",{className:"mb-1 font-semibold group-hover:text-primary",children:J.title}),J.summary&&W("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:J.summary})]})},J.id))})]})})}):null]})]})}import{Breadcrumbs as m2,PageHeaderResponsive as C2}from"@contractspec/lib.design-system";import{VStack as y2}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as v2}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as E4,jsxs as S2}from"react/jsx-runtime";function b2({feature:z,className:$}){return S2(y2,{gap:"lg",className:v2("mx-auto w-full max-w-5xl p-6",$),children:[E4(C2,{title:"Events",subtitle:`Events defined in ${z.meta.title??z.meta.key}`,breadcrumb:E4(m2,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Events"}]})}),E4(tz,{feature:z})]})}import{Breadcrumbs as Z$,CodeBlock as U4,EmptyState as g2,PageHeaderResponsive as G$,StatusChip as s}from"@contractspec/lib.design-system";import{Card as W4}from"@contractspec/lib.ui-kit-web/ui/card";import{Box as M$,HStack as Fz,VStack as d}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as A$}from"@contractspec/lib.ui-kit-web/ui/utils";import{BookOpen as k2,Code as d2,Database as l2,PenTool as O$}from"lucide-react";import n2 from"next/link";import{jsx as U,jsxs as K}from"react/jsx-runtime";function p2({feature:z,formKey:$,form:X,spec:Q,className:_}){let Y=X??z.forms?.find((J)=>J.key===$),M=R(Y?.key||"",Q?.meta?.tags);if(!Y)return K(d,{gap:"lg",className:A$("mx-auto w-full max-w-5xl p-6",_),children:[U(G$,{title:"Form Not Found",subtitle:`Form ${$} not found in feature ${z.meta.key}`,breadcrumb:U(Z$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Forms"}]})}),U(g2,{title:"Form not found",description:`The form '${$}' could not be found in this feature.`,icon:U(O$,{className:"h-12 w-12 text-muted-foreground"})})]});return K(d,{gap:"lg",className:A$("mx-auto w-full max-w-5xl p-6",_),children:[U(G$,{title:Y.key,subtitle:`Form defined in ${z.meta.title??z.meta.key}`,breadcrumb:U(Z$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Forms",href:`/features/${z.meta.key}#forms`},{label:Y.key}]})}),K(Fz,{gap:"sm",children:[U(s,{tone:"neutral",label:Y.key,size:"sm",icon:U(O$,{className:"h-3 w-3"})}),U(s,{tone:"neutral",label:`v${Y.version}`,size:"sm"}),Q?.meta?.stability?U(s,{tone:Q.meta.stability==="stable"?"success":"warning",label:Q.meta.stability,size:"sm"}):null]}),K("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[U("div",{className:"space-y-6 lg:col-span-2",children:U(W4,{className:"p-6",children:K(d,{gap:"md",children:[K(Fz,{className:"items-center gap-2 border-b pb-2",children:[U(d2,{className:"h-5 w-5 text-muted-foreground"}),U("h3",{className:"font-semibold text-lg",children:"Form Definition"})]}),Q?K(d,{gap:"lg",children:[Q.meta.description&&U("p",{className:"text-muted-foreground",children:Q.meta.description}),K(M$,{className:"flex-col gap-2",children:[U("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Fields"}),U(U4,{code:JSON.stringify(Q.fields,null,2),language:"json"})]}),K(M$,{className:"flex-col gap-2",children:[U("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Actions"}),U(U4,{code:JSON.stringify(Q.actions,null,2),language:"json"})]})]}):K(d,{gap:"md",children:[U("p",{className:"text-muted-foreground",children:"Full form definition details are not available for this form reference."}),U(U4,{code:JSON.stringify(Y,null,2),language:"json"})]})]})})}),U("div",{className:"space-y-6",children:U(W4,{className:"p-6",children:K(d,{gap:"md",children:[K(Fz,{className:"items-center gap-2 border-b pb-2",children:[U(l2,{className:"h-5 w-5 text-muted-foreground"}),U("h3",{className:"font-semibold text-lg",children:"Metadata"})]}),K("dl",{className:"grid grid-cols-1 gap-4 text-sm",children:[K("div",{children:[U("dt",{className:"text-muted-foreground",children:"Key"}),U("dd",{className:"truncate font-medium",children:Y.key})]}),K("div",{children:[U("dt",{className:"text-muted-foreground",children:"Version"}),U("dd",{className:"font-medium",children:Y.version})]}),Q?.meta?.owners&&K("div",{children:[U("dt",{className:"text-muted-foreground",children:"Owners"}),U("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.owners.map((J)=>U(s,{label:J,size:"sm",tone:"neutral"},J))})]}),Q?.meta?.tags&&K("div",{children:[U("dt",{className:"text-muted-foreground",children:"Tags"}),U("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.tags.map((J)=>U(s,{label:`#${J}`,size:"sm",tone:"neutral"},J))})]})]})]})})}),M?.length?U("div",{className:"lg:col-span-3",children:U(W4,{className:"p-6",children:K(d,{gap:"md",children:[K(Fz,{className:"items-center gap-2 border-b pb-2",children:[U(k2,{className:"h-5 w-5 text-muted-foreground"}),U("h3",{className:"font-semibold text-lg",children:"Related Documentation"})]}),U("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:M.map((J)=>U(n2,{href:J.route||`/docs/${J.id}`,className:"group block",children:K("div",{className:"h-full rounded-lg border p-4 transition-colors hover:border-primary",children:[U("h4",{className:"mb-1 font-semibold group-hover:text-primary",children:J.title}),J.summary&&U("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:J.summary})]})},J.id))})]})})}):null]})]})}import{Breadcrumbs as f2,PageHeaderResponsive as o2}from"@contractspec/lib.design-system";import{VStack as i2}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as c2}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as Z4,jsxs as x2}from"react/jsx-runtime";function I$({feature:z,className:$}){return x2(i2,{gap:"lg",className:c2("mx-auto w-full max-w-5xl p-6",$),children:[Z4(o2,{title:"Forms",subtitle:`Forms defined in ${z.meta.title??z.meta.key}`,breadcrumb:Z4(f2,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Forms"}]})}),Z4(sz,{feature:z})]})}import{Breadcrumbs as D$,CodeBlock as G4,EmptyState as j2,PageHeaderResponsive as P$,StatusChip as e}from"@contractspec/lib.design-system";import{Card as T$}from"@contractspec/lib.ui-kit-web/ui/card";import{Box as K$,HStack as M4,VStack as f}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as L$}from"@contractspec/lib.ui-kit-web/ui/utils";import{Code as u2,Database as r2,Zap as q$}from"lucide-react";import{jsx as G,jsxs as N}from"react/jsx-runtime";function t2({feature:z,operationKey:$,operation:X,spec:Q,className:_}){let Y=X??z.operations?.find((J)=>J.key===$),M=R(Y?.key||"",Q?.meta?.tags);if(!Y)return N(f,{gap:"lg",className:L$("mx-auto w-full max-w-5xl p-6",_),children:[G(P$,{title:"Operation Not Found",subtitle:`Operation ${$} not found in feature ${z.meta.key}`,breadcrumb:G(D$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Operations"}]})}),G(j2,{title:"Operation not found",description:`The operation '${$}' could not be found in this feature.`,icon:G(q$,{className:"h-12 w-12 text-muted-foreground"})})]});return N(f,{gap:"lg",className:L$("mx-auto w-full max-w-5xl p-6",_),children:[G(P$,{title:Y.key,subtitle:`Operation defined in ${z.meta.title??z.meta.key}`,breadcrumb:G(D$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Operations",href:`/features/${z.meta.key}/operations`},{label:Y.key}]})}),N(M4,{gap:"sm",children:[G(e,{tone:"neutral",label:Y.key,size:"sm",icon:G(q$,{className:"h-3 w-3"})}),G(e,{tone:"neutral",label:`v${Y.version}`,size:"sm"}),Q?.meta?.stability?G(e,{tone:Q.meta.stability==="stable"?"success":"warning",label:Q.meta.stability,size:"sm"}):null]}),N("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[G("div",{className:"space-y-6 lg:col-span-2",children:G(T$,{className:"p-6",children:N(f,{gap:"md",children:[N(M4,{className:"items-center gap-2 border-b pb-2",children:[G(u2,{className:"h-5 w-5 text-muted-foreground"}),G("h3",{className:"font-semibold text-lg",children:"Schema Definition"})]}),Q?N(f,{gap:"lg",children:[Q.meta.description&&G("p",{className:"text-muted-foreground",children:Q.meta.description}),N(K$,{className:"flex-col gap-2",children:[G("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Input Schema"}),G(G4,{className:"w-full",code:JSON.stringify(Q.io.input,null,2),language:"json"})]}),N(K$,{className:"flex-col gap-2",children:[G("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Output Schema"}),G(G4,{className:"w-full",code:JSON.stringify(Q.io.output,null,2),language:"json"})]})]}):N(f,{gap:"md",children:[G("p",{className:"text-muted-foreground",children:"Full schema details are not available for this operation reference."}),G(G4,{code:JSON.stringify(Y,null,2),language:"json"})]})]})})}),G("div",{className:"space-y-6",children:G(T$,{className:"p-6",children:N(f,{gap:"md",children:[N(M4,{className:"items-center gap-2 border-b pb-2",children:[G(r2,{className:"h-5 w-5 text-muted-foreground"}),G("h3",{className:"font-semibold text-lg",children:"Metadata"})]}),N("dl",{className:"grid grid-cols-1 gap-4 text-sm",children:[N("div",{children:[G("dt",{className:"text-muted-foreground",children:"Key"}),G("dd",{className:"truncate font-medium",children:Y.key})]}),N("div",{children:[G("dt",{className:"text-muted-foreground",children:"Version"}),G("dd",{className:"font-medium",children:Y.version})]}),Q?.meta?.context&&N("div",{children:[G("dt",{className:"text-muted-foreground",children:"Context"}),G("dd",{className:"font-medium",children:Q.meta.context})]}),Q?.meta?.owners&&N("div",{children:[G("dt",{className:"text-muted-foreground",children:"Owners"}),G("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.owners.map((J)=>G(e,{label:J,size:"sm",tone:"neutral"},J))})]}),Q?.meta?.tags&&N("div",{children:[G("dt",{className:"text-muted-foreground",children:"Tags"}),G("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.tags.map((J)=>G(e,{label:`#${J}`,size:"sm",tone:"neutral"},J))})]})]})]})})})]})]})}import{Breadcrumbs as a2,PageHeaderResponsive as s2}from"@contractspec/lib.design-system";import{VStack as e2}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as z3}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as A4,jsxs as Q3}from"react/jsx-runtime";function $3({feature:z,className:$}){return Q3(e2,{gap:"lg",className:z3("mx-auto w-full max-w-5xl p-6",$),children:[A4(s2,{title:"Operations",subtitle:`Operations defined in ${z.meta.title??z.meta.key}`,breadcrumb:A4(a2,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Operations"}]})}),A4(z4,{feature:z})]})}import{Breadcrumbs as J3,PageHeaderResponsive as X3}from"@contractspec/lib.design-system";import{VStack as Y3}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as _3}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as O4,jsxs as U3}from"react/jsx-runtime";function E3({feature:z,className:$}){return U3(Y3,{gap:"lg",className:_3("mx-auto w-full max-w-5xl p-6",$),children:[O4(X3,{title:z.meta.title||z.meta.key,subtitle:z.meta.description||"Feature overview",breadcrumb:O4(J3,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key}]})}),O4(Kz,{feature:z})]})}import{Breadcrumbs as N$,CodeBlock as F$,EmptyState as W3,PageHeaderResponsive as V$,StatusChip as Vz}from"@contractspec/lib.design-system";import{Card as I4}from"@contractspec/lib.ui-kit-web/ui/card";import{Box as Z3,HStack as wz,VStack as l}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as w$}from"@contractspec/lib.ui-kit-web/ui/utils";import{BookOpen as G3,Code as M3,Database as A3,Layout as B$}from"lucide-react";import O3 from"next/link";import{jsx as Z,jsxs as F}from"react/jsx-runtime";function I3({feature:z,presentationKey:$,presentation:X,spec:Q,className:_}){let Y=X??z.presentations?.find((J)=>J.key===$),M=R(Y?.key||"",Q?.meta?.tags);if(!Y)return F(l,{gap:"lg",className:w$("mx-auto w-full max-w-5xl p-6",_),children:[Z(V$,{title:"Presentation Not Found",subtitle:`Presentation ${$} not found in feature ${z.meta.key}`,breadcrumb:Z(N$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Presentations",href:`/features/${z.meta.key}/presentation`}]})}),Z(W3,{title:"Presentation not found",description:`The presentation '${$}' could not be found in this feature.`,icon:Z(B$,{className:"h-12 w-12 text-muted-foreground"})})]});return F(l,{gap:"lg",className:w$("mx-auto w-full max-w-5xl p-6",_),children:[Z(V$,{title:Y.key,subtitle:`Presentation defined in ${z.meta.title??z.meta.key}`,breadcrumb:Z(N$,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Presentations",href:`/features/${z.meta.key}#presentations`},{label:Y.key}]})}),F(wz,{gap:"sm",children:[Z(Vz,{tone:"neutral",label:Y.key,size:"sm",icon:Z(B$,{className:"h-3 w-3"})}),Z(Vz,{tone:"neutral",label:`v${Y.version}`,size:"sm"}),Q?.meta?.stability?Z(Vz,{tone:Q.meta.stability==="stable"?"success":"warning",label:Q.meta.stability,size:"sm"}):null]}),F("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[Z("div",{className:"space-y-6 lg:col-span-2",children:Z(I4,{className:"p-6",children:F(l,{gap:"md",children:[F(wz,{className:"items-center gap-2 border-b pb-2",children:[Z(M3,{className:"h-5 w-5 text-muted-foreground"}),Z("h3",{className:"font-semibold text-lg",children:"Component Definition"})]}),Q?F(l,{gap:"lg",children:[Q.meta.description&&Z("p",{className:"text-muted-foreground",children:Q.meta.description}),F(Z3,{className:"flex-col gap-2",children:[Z("span",{className:"font-medium text-muted-foreground text-sm uppercase tracking-wider",children:"Spec Details"}),Z(F$,{code:JSON.stringify(Q,null,2),language:"json"})]})]}):F(l,{gap:"md",children:[Z("p",{className:"text-muted-foreground",children:"Full component details are not available for this presentation reference."}),Z(F$,{code:JSON.stringify(Y,null,2),language:"json"})]})]})})}),Z("div",{className:"space-y-6",children:Z(I4,{className:"p-6",children:F(l,{gap:"md",children:[F(wz,{className:"items-center gap-2 border-b pb-2",children:[Z(A3,{className:"h-5 w-5 text-muted-foreground"}),Z("h3",{className:"font-semibold text-lg",children:"Metadata"})]}),F("dl",{className:"grid grid-cols-1 gap-4 text-sm",children:[F("div",{children:[Z("dt",{className:"text-muted-foreground",children:"Key"}),Z("dd",{className:"truncate font-medium",children:Y.key})]}),F("div",{children:[Z("dt",{className:"text-muted-foreground",children:"Version"}),Z("dd",{className:"font-medium",children:Y.version})]}),Q?.meta?.owners&&F("div",{children:[Z("dt",{className:"text-muted-foreground",children:"Owners"}),Z("dd",{className:"flex flex-wrap gap-1 font-medium",children:Q.meta.owners.map((J)=>Z(Vz,{label:J,size:"sm",tone:"neutral"},J))})]})]})]})})}),M?.length?Z("div",{className:"lg:col-span-3",children:Z(I4,{className:"p-6",children:F(l,{gap:"md",children:[F(wz,{className:"items-center gap-2 border-b pb-2",children:[Z(G3,{className:"h-5 w-5 text-muted-foreground"}),Z("h3",{className:"font-semibold text-lg",children:"Related Documentation"})]}),Z("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:M.map((J)=>Z(O3,{href:J.route||`/docs/${J.id}`,className:"group block",children:F("div",{className:"h-full rounded-lg border p-4 transition-colors hover:border-primary",children:[Z("h4",{className:"mb-1 font-semibold group-hover:text-primary",children:J.title}),J.summary&&Z("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:J.summary})]})},J.id))})]})})}):null]})]})}import{Breadcrumbs as D3,PageHeaderResponsive as P3}from"@contractspec/lib.design-system";import{VStack as T3}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as K3}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as D4,jsxs as q3}from"react/jsx-runtime";function L3({feature:z,className:$}){return q3(T3,{gap:"lg",className:K3("mx-auto w-full max-w-5xl p-6",$),children:[D4(P3,{title:"Presentations",subtitle:`Presentations defined in ${z.meta.title??z.meta.key}`,breadcrumb:D4(D3,{items:[{label:"Features",href:"/features"},{label:z.meta.title||z.meta.key,href:`/features/${z.meta.key}`},{label:"Presentations"}]})}),D4(Q4,{feature:z})]})}export{R as useRelatedDocs,Az as useFeatureRegistry,Mz as useFeatureFilters,o4 as useContractsRegistry,Gz as getFeatureIconTone,L3 as FeaturePresentationsTemplate,Q4 as FeaturePresentationsList,I3 as FeaturePresentationDetailTemplate,E3 as FeatureOverviewTemplate,$3 as FeatureOperationsTemplate,z4 as FeatureOperationsList,t2 as FeatureOperationDetailTemplate,Zz as FeatureIcon,Oz as FeatureHoverPreview,I$ as FeatureFormsTemplate,sz as FeatureFormsList,p2 as FeatureFormDetailTemplate,Pz as FeatureFiltersBar,b2 as FeatureEventsTemplate,tz as FeatureEventsList,h2 as FeatureEventDetailTemplate,s4 as FeatureDiscovery,Kz as FeatureDetail,X$ as FeatureDataViewsTemplate,cz as FeatureDataViewsList,P2 as FeatureDataViewDetailTemplate,Dz as FeatureCategoryHeader,Iz as FeatureCard};
|