@contractspec/bundle.library 3.4.3 → 3.5.0
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 +494 -488
- package/CHANGELOG.md +36 -0
- package/dist/application/index.js +8 -8
- package/dist/application/mcp/cliMcp.js +8 -8
- package/dist/application/mcp/contractsMcp.js +8 -8
- package/dist/application/mcp/docsMcp.js +8 -8
- package/dist/application/mcp/index.js +8 -8
- package/dist/application/mcp/internalMcp.js +8 -8
- package/dist/application/mcp/providerRankingMcp.js +8 -8
- package/dist/bundles/LibraryBundle.d.ts +126 -0
- package/dist/bundles/LibraryBundle.js +139 -0
- package/dist/bundles/index.d.ts +1 -0
- package/dist/bundles/index.js +139 -0
- package/dist/components/docs/DocsIndexPage.js +91 -91
- package/dist/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/components/docs/advanced/index.js +482 -482
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/components/docs/architecture/index.js +748 -748
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/components/docs/comparison/index.js +738 -738
- package/dist/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/components/docs/ecosystem/index.js +211 -211
- package/dist/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/components/docs/examples/index.js +21 -21
- package/dist/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/components/docs/getting-started/index.js +731 -731
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +106 -106
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/components/docs/guides/index.js +975 -975
- package/dist/components/docs/index.js +10791 -10791
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/components/docs/integrations/index.js +1642 -1642
- package/dist/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/components/docs/intent/index.js +396 -396
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/components/docs/knowledge/index.js +963 -963
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/components/docs/libraries/index.js +1919 -1919
- package/dist/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/components/docs/ops/index.js +92 -92
- package/dist/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/components/docs/reference/index.js +63 -63
- package/dist/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/components/docs/safety/index.js +733 -733
- package/dist/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/components/docs/specs/index.js +838 -838
- package/dist/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/components/docs/studio/index.js +78 -78
- package/dist/components/integrations/index.js +209 -209
- package/dist/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/components/legal/PrivacyTemplate.js +477 -477
- package/dist/components/legal/TermsTemplate.js +421 -421
- package/dist/components/legal/index.js +898 -898
- package/dist/components/shared/FeatureGateNotice.js +13 -13
- package/dist/components/shared/index.js +13 -13
- package/dist/components/shell/WorkspaceHeader.js +37 -37
- package/dist/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/components/shell/WorkspaceShellRenderer.d.ts +17 -0
- package/dist/components/shell/WorkspaceShellRenderer.js +229 -0
- package/dist/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +140 -77
- package/dist/components/templates/index.js +272 -272
- package/dist/components/templates/messaging/ConversationList.js +27 -27
- package/dist/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/components/templates/messaging/MessageThread.js +18 -18
- package/dist/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/components/templates/messaging/index.js +65 -65
- package/dist/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/components/templates/recipes/RecipeList.js +80 -80
- package/dist/components/templates/recipes/index.js +80 -80
- package/dist/components/templates/todos/FilterBar.js +39 -39
- package/dist/components/templates/todos/TaskForm.js +43 -43
- package/dist/components/templates/todos/TaskItem.js +30 -30
- package/dist/components/templates/todos/TaskList.js +127 -127
- package/dist/components/templates/todos/index.js +127 -127
- package/dist/index.js +12323 -12260
- package/dist/infrastructure/elysia/index.js +8 -8
- package/dist/infrastructure/elysia/logger.js +8 -8
- package/dist/infrastructure/index.js +8 -8
- package/dist/libs/posthog/client.js +2 -2
- package/dist/node/application/index.js +8 -8
- package/dist/node/application/mcp/cliMcp.js +8 -8
- package/dist/node/application/mcp/contractsMcp.js +8 -8
- package/dist/node/application/mcp/docsMcp.js +8 -8
- package/dist/node/application/mcp/index.js +8 -8
- package/dist/node/application/mcp/internalMcp.js +8 -8
- package/dist/node/application/mcp/providerRankingMcp.js +8 -8
- package/dist/node/bundles/LibraryBundle.js +138 -0
- package/dist/node/bundles/index.js +138 -0
- package/dist/node/components/docs/DocsIndexPage.js +91 -91
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/node/components/docs/advanced/index.js +482 -482
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/node/components/docs/architecture/index.js +748 -748
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/node/components/docs/comparison/index.js +738 -738
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/node/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/node/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/node/components/docs/ecosystem/index.js +211 -211
- package/dist/node/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/node/components/docs/examples/index.js +21 -21
- package/dist/node/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/node/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/node/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/node/components/docs/getting-started/index.js +731 -731
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +106 -106
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/node/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/node/components/docs/guides/index.js +975 -975
- package/dist/node/components/docs/index.js +10791 -10791
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/node/components/docs/integrations/index.js +1642 -1642
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/node/components/docs/intent/index.js +396 -396
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/node/components/docs/knowledge/index.js +963 -963
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/node/components/docs/libraries/index.js +1919 -1919
- package/dist/node/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/node/components/docs/ops/index.js +92 -92
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/node/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/node/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/node/components/docs/reference/index.js +63 -63
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/node/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/node/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/node/components/docs/safety/index.js +733 -733
- package/dist/node/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/node/components/docs/specs/index.js +838 -838
- package/dist/node/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/node/components/docs/studio/index.js +78 -78
- package/dist/node/components/integrations/index.js +209 -209
- package/dist/node/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/node/components/legal/PrivacyTemplate.js +477 -477
- package/dist/node/components/legal/TermsTemplate.js +421 -421
- package/dist/node/components/legal/index.js +898 -898
- package/dist/node/components/shared/FeatureGateNotice.js +13 -13
- package/dist/node/components/shared/index.js +13 -13
- package/dist/node/components/shell/WorkspaceHeader.js +37 -37
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/node/components/shell/WorkspaceShellRenderer.js +228 -0
- package/dist/node/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/node/components/shell/index.js +140 -77
- package/dist/node/components/templates/index.js +272 -272
- package/dist/node/components/templates/messaging/ConversationList.js +27 -27
- package/dist/node/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/node/components/templates/messaging/MessageThread.js +18 -18
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/node/components/templates/messaging/index.js +65 -65
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/node/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/node/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/node/components/templates/recipes/RecipeList.js +80 -80
- package/dist/node/components/templates/recipes/index.js +80 -80
- package/dist/node/components/templates/todos/FilterBar.js +39 -39
- package/dist/node/components/templates/todos/TaskForm.js +43 -43
- package/dist/node/components/templates/todos/TaskItem.js +30 -30
- package/dist/node/components/templates/todos/TaskList.js +127 -127
- package/dist/node/components/templates/todos/index.js +127 -127
- package/dist/node/index.js +12323 -12260
- package/dist/node/infrastructure/elysia/index.js +8 -8
- package/dist/node/infrastructure/elysia/logger.js +8 -8
- package/dist/node/infrastructure/index.js +8 -8
- package/dist/node/libs/posthog/client.js +2 -2
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/node/presentation/features/atoms/index.js +3 -3
- package/dist/node/presentation/features/index.js +915 -915
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/node/presentation/features/molecules/index.js +139 -139
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/node/presentation/features/organisms/index.js +275 -275
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/presentation/features/atoms/index.js +3 -3
- package/dist/presentation/features/index.js +915 -915
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/presentation/features/molecules/index.js +139 -139
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/presentation/features/organisms/index.js +275 -275
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/package.json +71 -22
- package/src/bundles/LibraryBundle.ts +152 -0
- package/src/bundles/index.ts +1 -0
- package/src/components/shell/WorkspaceShellRenderer.tsx +90 -0
- package/src/components/shell/index.ts +1 -0
|
@@ -1,204 +1,204 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/components/docs/shared/StudioPrompt.tsx
|
|
3
3
|
import Link from "@contractspec/lib.ui-link";
|
|
4
|
-
import {
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
function StudioPrompt({
|
|
6
6
|
title = "Want to turn product signals into spec-first deliverables?",
|
|
7
7
|
body = "ContractSpec Studio ingests evidence from meetings, support, analytics, docs, and code, then compiles decisions into spec diffs and task packs.",
|
|
8
8
|
ctaLabel = "Try Studio",
|
|
9
9
|
href = "https://www.contractspec.studio"
|
|
10
10
|
}) {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
12
|
className: "card-subtle space-y-3 p-6",
|
|
13
13
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ jsx("h3", {
|
|
15
15
|
className: "text-lg font-semibold",
|
|
16
16
|
children: title
|
|
17
|
-
}
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ jsx("p", {
|
|
19
19
|
className: "text-muted-foreground text-sm",
|
|
20
20
|
children: body
|
|
21
|
-
}
|
|
22
|
-
/* @__PURE__ */
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx(Link, {
|
|
23
23
|
href,
|
|
24
24
|
className: "btn-primary",
|
|
25
25
|
children: ctaLabel
|
|
26
|
-
}
|
|
26
|
+
})
|
|
27
27
|
]
|
|
28
|
-
}
|
|
28
|
+
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// src/components/docs/guides/GuideCIDiffGatingPage.tsx
|
|
32
32
|
import { CodeBlock } from "@contractspec/lib.design-system";
|
|
33
33
|
import Link2 from "@contractspec/lib.ui-link";
|
|
34
34
|
import { ChevronRight } from "lucide-react";
|
|
35
|
-
import {
|
|
35
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
36
36
|
function GuideCIDiffGatingPage() {
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
38
38
|
className: "space-y-8",
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
41
41
|
className: "space-y-3",
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsx2("h1", {
|
|
44
44
|
className: "text-4xl font-bold",
|
|
45
45
|
children: "CI gating with deterministic diffs"
|
|
46
|
-
}
|
|
47
|
-
/* @__PURE__ */
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsx2("p", {
|
|
48
48
|
className: "text-muted-foreground text-lg",
|
|
49
49
|
children: "Add ContractSpec CI checks that validate specs, detect drift, and gate breaking changes before merge."
|
|
50
|
-
}
|
|
50
|
+
})
|
|
51
51
|
]
|
|
52
|
-
}
|
|
53
|
-
/* @__PURE__ */
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
54
54
|
className: "card-subtle space-y-4 p-6",
|
|
55
55
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
57
57
|
className: "text-2xl font-bold",
|
|
58
58
|
children: "What you'll build"
|
|
59
|
-
}
|
|
60
|
-
/* @__PURE__ */
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsxs2("ul", {
|
|
61
61
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ jsx2("li", {
|
|
64
64
|
children: "CI workflow running ContractSpec validation and drift checks."
|
|
65
|
-
}
|
|
66
|
-
/* @__PURE__ */
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx2("li", {
|
|
67
67
|
children: "Machine-readable output for PR annotations."
|
|
68
|
-
}
|
|
69
|
-
/* @__PURE__ */
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx2("li", {
|
|
70
70
|
children: "Deterministic contract diffs in review."
|
|
71
|
-
}
|
|
71
|
+
})
|
|
72
72
|
]
|
|
73
|
-
}
|
|
73
|
+
})
|
|
74
74
|
]
|
|
75
|
-
}
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
77
77
|
className: "space-y-6",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
80
80
|
className: "space-y-3",
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
83
83
|
className: "text-2xl font-bold",
|
|
84
84
|
children: "1) Add the CI workflow"
|
|
85
|
-
}
|
|
86
|
-
/* @__PURE__ */
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsx2("p", {
|
|
87
87
|
className: "text-muted-foreground text-sm",
|
|
88
88
|
children: "Copy the template from the CLI package."
|
|
89
|
-
}
|
|
90
|
-
/* @__PURE__ */
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
91
91
|
language: "bash",
|
|
92
92
|
filename: "ci-copy",
|
|
93
93
|
code: `cp node_modules/@contractspec/app.cli-contractspec/templates/github-action.yml .github/workflows/contractspec.yml`
|
|
94
|
-
}
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
96
96
|
className: "text-muted-foreground text-sm",
|
|
97
97
|
children: [
|
|
98
98
|
"Expected output: new workflow file in ",
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ jsx2("code", {
|
|
100
100
|
children: ".github/workflows"
|
|
101
|
-
}
|
|
101
|
+
}),
|
|
102
102
|
"."
|
|
103
103
|
]
|
|
104
|
-
}
|
|
104
|
+
})
|
|
105
105
|
]
|
|
106
|
-
}
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
108
108
|
className: "space-y-3",
|
|
109
109
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
111
111
|
className: "text-2xl font-bold",
|
|
112
112
|
children: "2) Run CI locally"
|
|
113
|
-
}
|
|
114
|
-
/* @__PURE__ */
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
115
115
|
language: "bash",
|
|
116
116
|
filename: "ci-local",
|
|
117
117
|
code: `contractspec ci --format json --check-drift`
|
|
118
|
-
}
|
|
119
|
-
/* @__PURE__ */
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsx2("p", {
|
|
120
120
|
className: "text-muted-foreground text-sm",
|
|
121
121
|
children: "Expected output: JSON summary including pass/fail counts and drift status (if configured)."
|
|
122
|
-
}
|
|
122
|
+
})
|
|
123
123
|
]
|
|
124
|
-
}
|
|
125
|
-
/* @__PURE__ */
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
126
126
|
className: "space-y-3",
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
129
129
|
className: "text-2xl font-bold",
|
|
130
130
|
children: "3) Add a diff check"
|
|
131
|
-
}
|
|
132
|
-
/* @__PURE__ */
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx2("p", {
|
|
133
133
|
className: "text-muted-foreground text-sm",
|
|
134
134
|
children: "Use the diff command to inspect breaking changes in PRs."
|
|
135
|
-
}
|
|
136
|
-
/* @__PURE__ */
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
137
137
|
language: "bash",
|
|
138
138
|
filename: "ci-diff",
|
|
139
139
|
code: `contractspec diff src/contracts/spec-v1.ts src/contracts/spec-v2.ts --breaking`
|
|
140
|
-
}
|
|
141
|
-
/* @__PURE__ */
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ jsx2("p", {
|
|
142
142
|
className: "text-muted-foreground text-sm",
|
|
143
143
|
children: "Expected output: deterministic diff with breaking change hints."
|
|
144
|
-
}
|
|
144
|
+
})
|
|
145
145
|
]
|
|
146
|
-
}
|
|
147
|
-
/* @__PURE__ */
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
148
148
|
className: "card-subtle space-y-3 p-6",
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ jsx2("h3", {
|
|
151
151
|
className: "text-lg font-semibold",
|
|
152
152
|
children: "Example package"
|
|
153
|
-
}
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ jsx2("p", {
|
|
155
155
|
className: "text-muted-foreground text-sm",
|
|
156
156
|
children: "The CRM pipeline example is already wired in the quickstart smoke test. Use it as a CI-ready template."
|
|
157
|
-
}
|
|
158
|
-
/* @__PURE__ */
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
159
159
|
language: "bash",
|
|
160
160
|
filename: "crm-ci",
|
|
161
161
|
code: `cd packages/examples/crm-pipeline
|
|
162
162
|
bun run build
|
|
163
163
|
bun run validate`
|
|
164
|
-
}
|
|
164
|
+
})
|
|
165
165
|
]
|
|
166
|
-
}
|
|
167
|
-
/* @__PURE__ */
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx2(StudioPrompt, {
|
|
168
168
|
title: "Need continuous checks tied to outcomes?",
|
|
169
169
|
body: "Studio closes the loop with post-change verification and learning dividends that improve future decisions."
|
|
170
|
-
}
|
|
170
|
+
})
|
|
171
171
|
]
|
|
172
|
-
}
|
|
173
|
-
/* @__PURE__ */
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
174
174
|
className: "flex items-center gap-4 pt-4",
|
|
175
175
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ jsxs2(Link2, {
|
|
177
177
|
href: "/docs/guides",
|
|
178
178
|
className: "btn-primary",
|
|
179
179
|
children: [
|
|
180
180
|
"Back to guides ",
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ jsx2(ChevronRight, {
|
|
182
182
|
size: 16
|
|
183
|
-
}
|
|
183
|
+
})
|
|
184
184
|
]
|
|
185
|
-
}
|
|
186
|
-
/* @__PURE__ */
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ jsx2(Link2, {
|
|
187
187
|
href: "/docs",
|
|
188
188
|
className: "btn-ghost",
|
|
189
189
|
children: "Docs home"
|
|
190
|
-
}
|
|
190
|
+
})
|
|
191
191
|
]
|
|
192
|
-
}
|
|
192
|
+
})
|
|
193
193
|
]
|
|
194
|
-
}
|
|
194
|
+
});
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// src/components/docs/guides/GuideContractTypesPage.tsx
|
|
198
198
|
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
|
|
199
199
|
import Link3 from "@contractspec/lib.ui-link";
|
|
200
200
|
import { ChevronRight as ChevronRight2, Layers, Zap, Shield, Globe } from "lucide-react";
|
|
201
|
-
import {
|
|
201
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
202
202
|
var contractTypes = [
|
|
203
203
|
{
|
|
204
204
|
name: "Operations",
|
|
@@ -230,75 +230,75 @@ var contractTypes = [
|
|
|
230
230
|
}
|
|
231
231
|
];
|
|
232
232
|
function GuideContractTypesPage() {
|
|
233
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
234
234
|
className: "space-y-8",
|
|
235
235
|
children: [
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
237
237
|
className: "space-y-3",
|
|
238
238
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ jsx3("h1", {
|
|
240
240
|
className: "text-4xl font-bold",
|
|
241
241
|
children: "Contract Types Overview"
|
|
242
|
-
}
|
|
243
|
-
/* @__PURE__ */
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx3("p", {
|
|
244
244
|
className: "text-muted-foreground text-lg",
|
|
245
245
|
children: "Learn about the different contract types in ContractSpec and when to use each one for spec-first development."
|
|
246
|
-
}
|
|
246
|
+
})
|
|
247
247
|
]
|
|
248
|
-
}
|
|
249
|
-
/* @__PURE__ */
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
250
250
|
className: "card-subtle space-y-4 p-6",
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
253
253
|
className: "text-2xl font-bold",
|
|
254
254
|
children: "Core Contract Types"
|
|
255
|
-
}
|
|
256
|
-
/* @__PURE__ */
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsx3("div", {
|
|
257
257
|
className: "grid gap-3 md:grid-cols-2",
|
|
258
|
-
children: contractTypes.map((type) => /* @__PURE__ */
|
|
258
|
+
children: contractTypes.map((type) => /* @__PURE__ */ jsxs3("div", {
|
|
259
259
|
className: "flex items-start gap-3 rounded-lg border border-white/10 p-4",
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ jsx3(type.icon, {
|
|
262
262
|
className: type.color,
|
|
263
263
|
size: 20
|
|
264
|
-
}
|
|
265
|
-
/* @__PURE__ */
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
266
266
|
className: "space-y-1",
|
|
267
267
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
269
269
|
className: "font-semibold",
|
|
270
270
|
children: type.name
|
|
271
|
-
}
|
|
272
|
-
/* @__PURE__ */
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ jsx3("p", {
|
|
273
273
|
className: "text-muted-foreground text-xs",
|
|
274
274
|
children: type.description
|
|
275
|
-
}
|
|
276
|
-
/* @__PURE__ */
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ jsx3("code", {
|
|
277
277
|
className: "text-xs text-violet-400",
|
|
278
278
|
children: type.factory
|
|
279
|
-
}
|
|
279
|
+
})
|
|
280
280
|
]
|
|
281
|
-
}
|
|
281
|
+
})
|
|
282
282
|
]
|
|
283
|
-
}, type.name
|
|
284
|
-
}
|
|
283
|
+
}, type.name))
|
|
284
|
+
})
|
|
285
285
|
]
|
|
286
|
-
}
|
|
287
|
-
/* @__PURE__ */
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
288
288
|
className: "space-y-6",
|
|
289
289
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
291
291
|
className: "space-y-3",
|
|
292
292
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
294
294
|
className: "text-2xl font-bold",
|
|
295
295
|
children: "1) Operations (Commands & Queries)"
|
|
296
|
-
}
|
|
297
|
-
/* @__PURE__ */
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ jsx3("p", {
|
|
298
298
|
className: "text-muted-foreground text-sm",
|
|
299
299
|
children: "Operations are the backbone of your API. Commands mutate state, queries read state. Both have typed input/output schemas."
|
|
300
|
-
}
|
|
301
|
-
/* @__PURE__ */
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
302
302
|
language: "typescript",
|
|
303
303
|
filename: "src/contracts/user.operation.ts",
|
|
304
304
|
code: `import { defineCommand, defineQuery } from "@contractspec/lib.contracts-spec";
|
|
@@ -368,21 +368,21 @@ export const GetUserQuery = defineQuery({
|
|
|
368
368
|
},
|
|
369
369
|
policy: { auth: "user" },
|
|
370
370
|
});`
|
|
371
|
-
}
|
|
371
|
+
})
|
|
372
372
|
]
|
|
373
|
-
}
|
|
374
|
-
/* @__PURE__ */
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
375
375
|
className: "space-y-3",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
378
378
|
className: "text-2xl font-bold",
|
|
379
379
|
children: "2) Events"
|
|
380
|
-
}
|
|
381
|
-
/* @__PURE__ */
|
|
380
|
+
}),
|
|
381
|
+
/* @__PURE__ */ jsx3("p", {
|
|
382
382
|
className: "text-muted-foreground text-sm",
|
|
383
383
|
children: "Events represent domain occurrences. They have typed payloads with PII field marking for compliance."
|
|
384
|
-
}
|
|
385
|
-
/* @__PURE__ */
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
386
386
|
language: "typescript",
|
|
387
387
|
filename: "src/contracts/user.event.ts",
|
|
388
388
|
code: `import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
@@ -427,21 +427,21 @@ export const UserDeletedEvent = defineEvent({
|
|
|
427
427
|
},
|
|
428
428
|
}),
|
|
429
429
|
});`
|
|
430
|
-
}
|
|
430
|
+
})
|
|
431
431
|
]
|
|
432
|
-
}
|
|
433
|
-
/* @__PURE__ */
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
434
434
|
className: "space-y-3",
|
|
435
435
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
437
437
|
className: "text-2xl font-bold",
|
|
438
438
|
children: "3) Capabilities"
|
|
439
|
-
}
|
|
440
|
-
/* @__PURE__ */
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ jsx3("p", {
|
|
441
441
|
className: "text-muted-foreground text-sm",
|
|
442
442
|
children: "Capabilities group related operations, events, and presentations. They define feature boundaries and dependencies."
|
|
443
|
-
}
|
|
444
|
-
/* @__PURE__ */
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
445
445
|
language: "typescript",
|
|
446
446
|
filename: "src/contracts/user-management.capability.ts",
|
|
447
447
|
code: `import { defineCapability } from "@contractspec/lib.contracts-spec";
|
|
@@ -488,21 +488,21 @@ export const AdminUserCapability = defineCapability({
|
|
|
488
488
|
{ surface: "operation", key: "user.impersonate", version: "1.0.0" },
|
|
489
489
|
],
|
|
490
490
|
});`
|
|
491
|
-
}
|
|
491
|
+
})
|
|
492
492
|
]
|
|
493
|
-
}
|
|
494
|
-
/* @__PURE__ */
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
495
495
|
className: "space-y-3",
|
|
496
496
|
children: [
|
|
497
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
498
498
|
className: "text-2xl font-bold",
|
|
499
499
|
children: "4) Presentations"
|
|
500
|
-
}
|
|
501
|
-
/* @__PURE__ */
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ jsx3("p", {
|
|
502
502
|
className: "text-muted-foreground text-sm",
|
|
503
503
|
children: "Presentations define UI specifications. They link to capabilities and specify how data should be displayed."
|
|
504
|
-
}
|
|
505
|
-
/* @__PURE__ */
|
|
504
|
+
}),
|
|
505
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
506
506
|
language: "typescript",
|
|
507
507
|
filename: "src/contracts/user-list.presentation.ts",
|
|
508
508
|
code: `import { definePresentation } from "@contractspec/lib.contracts-spec";
|
|
@@ -528,175 +528,175 @@ export const UserListPresentation = definePresentation({
|
|
|
528
528
|
search: { fields: ["name", "email"] },
|
|
529
529
|
},
|
|
530
530
|
});`
|
|
531
|
-
}
|
|
531
|
+
})
|
|
532
532
|
]
|
|
533
|
-
}
|
|
534
|
-
/* @__PURE__ */
|
|
533
|
+
}),
|
|
534
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
535
535
|
className: "space-y-3",
|
|
536
536
|
children: [
|
|
537
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
538
538
|
className: "text-2xl font-bold",
|
|
539
539
|
children: "5) Additional Contract Types"
|
|
540
|
-
}
|
|
541
|
-
/* @__PURE__ */
|
|
540
|
+
}),
|
|
541
|
+
/* @__PURE__ */ jsx3("p", {
|
|
542
542
|
className: "text-muted-foreground text-sm",
|
|
543
543
|
children: "ContractSpec provides specialized contracts for different concerns:"
|
|
544
|
-
}
|
|
545
|
-
/* @__PURE__ */
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
546
546
|
className: "grid gap-4 md:grid-cols-2",
|
|
547
547
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
549
549
|
className: "card-subtle space-y-2 p-4",
|
|
550
550
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
552
552
|
className: "font-semibold",
|
|
553
553
|
children: "Policy"
|
|
554
|
-
}
|
|
555
|
-
/* @__PURE__ */
|
|
554
|
+
}),
|
|
555
|
+
/* @__PURE__ */ jsx3("code", {
|
|
556
556
|
className: "text-xs text-violet-400",
|
|
557
557
|
children: "definePolicy"
|
|
558
|
-
}
|
|
559
|
-
/* @__PURE__ */
|
|
558
|
+
}),
|
|
559
|
+
/* @__PURE__ */ jsx3("p", {
|
|
560
560
|
className: "text-muted-foreground text-xs",
|
|
561
561
|
children: "RBAC/ABAC rules, rate limits, and access control."
|
|
562
|
-
}
|
|
562
|
+
})
|
|
563
563
|
]
|
|
564
|
-
}
|
|
565
|
-
/* @__PURE__ */
|
|
564
|
+
}),
|
|
565
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
566
566
|
className: "card-subtle space-y-2 p-4",
|
|
567
567
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
569
569
|
className: "font-semibold",
|
|
570
570
|
children: "Workflow"
|
|
571
|
-
}
|
|
572
|
-
/* @__PURE__ */
|
|
571
|
+
}),
|
|
572
|
+
/* @__PURE__ */ jsx3("code", {
|
|
573
573
|
className: "text-xs text-violet-400",
|
|
574
574
|
children: "defineWorkflow"
|
|
575
|
-
}
|
|
576
|
-
/* @__PURE__ */
|
|
575
|
+
}),
|
|
576
|
+
/* @__PURE__ */ jsx3("p", {
|
|
577
577
|
className: "text-muted-foreground text-xs",
|
|
578
578
|
children: "Multi-step processes with states, transitions, and SLAs."
|
|
579
|
-
}
|
|
579
|
+
})
|
|
580
580
|
]
|
|
581
|
-
}
|
|
582
|
-
/* @__PURE__ */
|
|
581
|
+
}),
|
|
582
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
583
583
|
className: "card-subtle space-y-2 p-4",
|
|
584
584
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
586
586
|
className: "font-semibold",
|
|
587
587
|
children: "Translation"
|
|
588
|
-
}
|
|
589
|
-
/* @__PURE__ */
|
|
588
|
+
}),
|
|
589
|
+
/* @__PURE__ */ jsx3("code", {
|
|
590
590
|
className: "text-xs text-violet-400",
|
|
591
591
|
children: "defineTranslation"
|
|
592
|
-
}
|
|
593
|
-
/* @__PURE__ */
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ jsx3("p", {
|
|
594
594
|
className: "text-muted-foreground text-xs",
|
|
595
595
|
children: "i18n messages with ICU format and locale fallbacks."
|
|
596
|
-
}
|
|
596
|
+
})
|
|
597
597
|
]
|
|
598
|
-
}
|
|
599
|
-
/* @__PURE__ */
|
|
598
|
+
}),
|
|
599
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
600
600
|
className: "card-subtle space-y-2 p-4",
|
|
601
601
|
children: [
|
|
602
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
603
603
|
className: "font-semibold",
|
|
604
604
|
children: "Integration"
|
|
605
|
-
}
|
|
606
|
-
/* @__PURE__ */
|
|
605
|
+
}),
|
|
606
|
+
/* @__PURE__ */ jsx3("code", {
|
|
607
607
|
className: "text-xs text-violet-400",
|
|
608
608
|
children: "defineIntegration"
|
|
609
|
-
}
|
|
610
|
-
/* @__PURE__ */
|
|
609
|
+
}),
|
|
610
|
+
/* @__PURE__ */ jsx3("p", {
|
|
611
611
|
className: "text-muted-foreground text-xs",
|
|
612
612
|
children: "External service connections and API adapters."
|
|
613
|
-
}
|
|
613
|
+
})
|
|
614
614
|
]
|
|
615
|
-
}
|
|
616
|
-
/* @__PURE__ */
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
617
617
|
className: "card-subtle space-y-2 p-4",
|
|
618
618
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
620
620
|
className: "font-semibold",
|
|
621
621
|
children: "Form"
|
|
622
|
-
}
|
|
623
|
-
/* @__PURE__ */
|
|
622
|
+
}),
|
|
623
|
+
/* @__PURE__ */ jsx3("code", {
|
|
624
624
|
className: "text-xs text-violet-400",
|
|
625
625
|
children: "defineFormSpec"
|
|
626
|
-
}
|
|
627
|
-
/* @__PURE__ */
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ jsx3("p", {
|
|
628
628
|
className: "text-muted-foreground text-xs",
|
|
629
629
|
children: "Form definitions with fields, validation, and layouts."
|
|
630
|
-
}
|
|
630
|
+
})
|
|
631
631
|
]
|
|
632
|
-
}
|
|
633
|
-
/* @__PURE__ */
|
|
632
|
+
}),
|
|
633
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
634
634
|
className: "card-subtle space-y-2 p-4",
|
|
635
635
|
children: [
|
|
636
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
637
637
|
className: "font-semibold",
|
|
638
638
|
children: "Data View"
|
|
639
|
-
}
|
|
640
|
-
/* @__PURE__ */
|
|
639
|
+
}),
|
|
640
|
+
/* @__PURE__ */ jsx3("code", {
|
|
641
641
|
className: "text-xs text-violet-400",
|
|
642
642
|
children: "defineDataView"
|
|
643
|
-
}
|
|
644
|
-
/* @__PURE__ */
|
|
643
|
+
}),
|
|
644
|
+
/* @__PURE__ */ jsx3("p", {
|
|
645
645
|
className: "text-muted-foreground text-xs",
|
|
646
646
|
children: "Read-only data projections and aggregations."
|
|
647
|
-
}
|
|
647
|
+
})
|
|
648
648
|
]
|
|
649
|
-
}
|
|
650
|
-
/* @__PURE__ */
|
|
649
|
+
}),
|
|
650
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
651
651
|
className: "card-subtle space-y-2 p-4",
|
|
652
652
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
654
654
|
className: "font-semibold",
|
|
655
655
|
children: "Feature"
|
|
656
|
-
}
|
|
657
|
-
/* @__PURE__ */
|
|
656
|
+
}),
|
|
657
|
+
/* @__PURE__ */ jsx3("code", {
|
|
658
658
|
className: "text-xs text-violet-400",
|
|
659
659
|
children: "defineFeature"
|
|
660
|
-
}
|
|
661
|
-
/* @__PURE__ */
|
|
660
|
+
}),
|
|
661
|
+
/* @__PURE__ */ jsx3("p", {
|
|
662
662
|
className: "text-muted-foreground text-xs",
|
|
663
663
|
children: "Feature flags and progressive rollout configurations."
|
|
664
|
-
}
|
|
664
|
+
})
|
|
665
665
|
]
|
|
666
|
-
}
|
|
667
|
-
/* @__PURE__ */
|
|
666
|
+
}),
|
|
667
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
668
668
|
className: "card-subtle space-y-2 p-4",
|
|
669
669
|
children: [
|
|
670
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
671
671
|
className: "font-semibold",
|
|
672
672
|
children: "Test"
|
|
673
|
-
}
|
|
674
|
-
/* @__PURE__ */
|
|
673
|
+
}),
|
|
674
|
+
/* @__PURE__ */ jsx3("code", {
|
|
675
675
|
className: "text-xs text-violet-400",
|
|
676
676
|
children: "defineTestSpec"
|
|
677
|
-
}
|
|
678
|
-
/* @__PURE__ */
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ jsx3("p", {
|
|
679
679
|
className: "text-muted-foreground text-xs",
|
|
680
680
|
children: "Contract-driven test scenarios and fixtures."
|
|
681
|
-
}
|
|
681
|
+
})
|
|
682
682
|
]
|
|
683
|
-
}
|
|
683
|
+
})
|
|
684
684
|
]
|
|
685
|
-
}
|
|
685
|
+
})
|
|
686
686
|
]
|
|
687
|
-
}
|
|
688
|
-
/* @__PURE__ */
|
|
687
|
+
}),
|
|
688
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
689
689
|
className: "space-y-3",
|
|
690
690
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
692
692
|
className: "text-2xl font-bold",
|
|
693
693
|
children: "6) Registering Contracts"
|
|
694
|
-
}
|
|
695
|
-
/* @__PURE__ */
|
|
694
|
+
}),
|
|
695
|
+
/* @__PURE__ */ jsx3("p", {
|
|
696
696
|
className: "text-muted-foreground text-sm",
|
|
697
697
|
children: "Each contract type has a registry for lookup and validation."
|
|
698
|
-
}
|
|
699
|
-
/* @__PURE__ */
|
|
698
|
+
}),
|
|
699
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
700
700
|
language: "typescript",
|
|
701
701
|
filename: "src/contracts/registry.ts",
|
|
702
702
|
code: `import {
|
|
@@ -730,287 +730,287 @@ installOp(operationRegistry, GetUserQuery, async (input) => {
|
|
|
730
730
|
// Register events and capabilities
|
|
731
731
|
eventRegistry.register(UserCreatedEvent);
|
|
732
732
|
capabilityRegistry.register(UserManagementCapability);`
|
|
733
|
-
}
|
|
733
|
+
})
|
|
734
734
|
]
|
|
735
|
-
}
|
|
736
|
-
/* @__PURE__ */
|
|
735
|
+
}),
|
|
736
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
737
737
|
className: "card-subtle space-y-3 p-6",
|
|
738
738
|
children: [
|
|
739
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
740
740
|
className: "text-lg font-semibold",
|
|
741
741
|
children: "Contract Type Decision Guide"
|
|
742
|
-
}
|
|
743
|
-
/* @__PURE__ */
|
|
742
|
+
}),
|
|
743
|
+
/* @__PURE__ */ jsxs3("table", {
|
|
744
744
|
className: "w-full text-sm",
|
|
745
745
|
children: [
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
children: /* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ jsx3("thead", {
|
|
747
|
+
children: /* @__PURE__ */ jsxs3("tr", {
|
|
748
748
|
className: "border-b border-white/10",
|
|
749
749
|
children: [
|
|
750
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ jsx3("th", {
|
|
751
751
|
className: "py-2 text-left",
|
|
752
752
|
children: "When you need..."
|
|
753
|
-
}
|
|
754
|
-
/* @__PURE__ */
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ jsx3("th", {
|
|
755
755
|
className: "py-2 text-left",
|
|
756
756
|
children: "Use this contract"
|
|
757
|
-
}
|
|
757
|
+
})
|
|
758
758
|
]
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
/* @__PURE__ */
|
|
759
|
+
})
|
|
760
|
+
}),
|
|
761
|
+
/* @__PURE__ */ jsxs3("tbody", {
|
|
762
762
|
className: "text-muted-foreground",
|
|
763
763
|
children: [
|
|
764
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
765
765
|
className: "border-b border-white/5",
|
|
766
766
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ jsx3("td", {
|
|
768
768
|
className: "py-2",
|
|
769
769
|
children: "An API endpoint that changes data"
|
|
770
|
-
}
|
|
771
|
-
/* @__PURE__ */
|
|
770
|
+
}),
|
|
771
|
+
/* @__PURE__ */ jsx3("td", {
|
|
772
772
|
className: "py-2",
|
|
773
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
774
774
|
children: "defineCommand"
|
|
775
|
-
}
|
|
776
|
-
}
|
|
775
|
+
})
|
|
776
|
+
})
|
|
777
777
|
]
|
|
778
|
-
}
|
|
779
|
-
/* @__PURE__ */
|
|
778
|
+
}),
|
|
779
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
780
780
|
className: "border-b border-white/5",
|
|
781
781
|
children: [
|
|
782
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ jsx3("td", {
|
|
783
783
|
className: "py-2",
|
|
784
784
|
children: "An API endpoint that reads data"
|
|
785
|
-
}
|
|
786
|
-
/* @__PURE__ */
|
|
785
|
+
}),
|
|
786
|
+
/* @__PURE__ */ jsx3("td", {
|
|
787
787
|
className: "py-2",
|
|
788
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
789
789
|
children: "defineQuery"
|
|
790
|
-
}
|
|
791
|
-
}
|
|
790
|
+
})
|
|
791
|
+
})
|
|
792
792
|
]
|
|
793
|
-
}
|
|
794
|
-
/* @__PURE__ */
|
|
793
|
+
}),
|
|
794
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
795
795
|
className: "border-b border-white/5",
|
|
796
796
|
children: [
|
|
797
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ jsx3("td", {
|
|
798
798
|
className: "py-2",
|
|
799
799
|
children: "Async notification of something that happened"
|
|
800
|
-
}
|
|
801
|
-
/* @__PURE__ */
|
|
800
|
+
}),
|
|
801
|
+
/* @__PURE__ */ jsx3("td", {
|
|
802
802
|
className: "py-2",
|
|
803
|
-
children: /* @__PURE__ */
|
|
803
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
804
804
|
children: "defineEvent"
|
|
805
|
-
}
|
|
806
|
-
}
|
|
805
|
+
})
|
|
806
|
+
})
|
|
807
807
|
]
|
|
808
|
-
}
|
|
809
|
-
/* @__PURE__ */
|
|
808
|
+
}),
|
|
809
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
810
810
|
className: "border-b border-white/5",
|
|
811
811
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ jsx3("td", {
|
|
813
813
|
className: "py-2",
|
|
814
814
|
children: "Group related specs under a feature"
|
|
815
|
-
}
|
|
816
|
-
/* @__PURE__ */
|
|
815
|
+
}),
|
|
816
|
+
/* @__PURE__ */ jsx3("td", {
|
|
817
817
|
className: "py-2",
|
|
818
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
819
819
|
children: "defineCapability"
|
|
820
|
-
}
|
|
821
|
-
}
|
|
820
|
+
})
|
|
821
|
+
})
|
|
822
822
|
]
|
|
823
|
-
}
|
|
824
|
-
/* @__PURE__ */
|
|
823
|
+
}),
|
|
824
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
825
825
|
className: "border-b border-white/5",
|
|
826
826
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ jsx3("td", {
|
|
828
828
|
className: "py-2",
|
|
829
829
|
children: "Define UI rendering specifications"
|
|
830
|
-
}
|
|
831
|
-
/* @__PURE__ */
|
|
830
|
+
}),
|
|
831
|
+
/* @__PURE__ */ jsx3("td", {
|
|
832
832
|
className: "py-2",
|
|
833
|
-
children: /* @__PURE__ */
|
|
833
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
834
834
|
children: "definePresentation"
|
|
835
|
-
}
|
|
836
|
-
}
|
|
835
|
+
})
|
|
836
|
+
})
|
|
837
837
|
]
|
|
838
|
-
}
|
|
839
|
-
/* @__PURE__ */
|
|
838
|
+
}),
|
|
839
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
840
840
|
className: "border-b border-white/5",
|
|
841
841
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ jsx3("td", {
|
|
843
843
|
className: "py-2",
|
|
844
844
|
children: "Access control and rate limiting"
|
|
845
|
-
}
|
|
846
|
-
/* @__PURE__ */
|
|
845
|
+
}),
|
|
846
|
+
/* @__PURE__ */ jsx3("td", {
|
|
847
847
|
className: "py-2",
|
|
848
|
-
children: /* @__PURE__ */
|
|
848
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
849
849
|
children: "definePolicy"
|
|
850
|
-
}
|
|
851
|
-
}
|
|
850
|
+
})
|
|
851
|
+
})
|
|
852
852
|
]
|
|
853
|
-
}
|
|
854
|
-
/* @__PURE__ */
|
|
853
|
+
}),
|
|
854
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
855
855
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ jsx3("td", {
|
|
857
857
|
className: "py-2",
|
|
858
858
|
children: "Multi-step business processes"
|
|
859
|
-
}
|
|
860
|
-
/* @__PURE__ */
|
|
859
|
+
}),
|
|
860
|
+
/* @__PURE__ */ jsx3("td", {
|
|
861
861
|
className: "py-2",
|
|
862
|
-
children: /* @__PURE__ */
|
|
862
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
863
863
|
children: "defineWorkflow"
|
|
864
|
-
}
|
|
865
|
-
}
|
|
864
|
+
})
|
|
865
|
+
})
|
|
866
866
|
]
|
|
867
|
-
}
|
|
867
|
+
})
|
|
868
868
|
]
|
|
869
|
-
}
|
|
869
|
+
})
|
|
870
870
|
]
|
|
871
|
-
}
|
|
871
|
+
})
|
|
872
872
|
]
|
|
873
|
-
}
|
|
874
|
-
/* @__PURE__ */
|
|
873
|
+
}),
|
|
874
|
+
/* @__PURE__ */ jsx3(StudioPrompt, {
|
|
875
875
|
title: "Need to decide which contract should change next?",
|
|
876
876
|
body: "Studio uses evidence and focus constraints to generate decision briefs, patch intents, and execution-ready task packs."
|
|
877
|
-
}
|
|
877
|
+
})
|
|
878
878
|
]
|
|
879
|
-
}
|
|
880
|
-
/* @__PURE__ */
|
|
879
|
+
}),
|
|
880
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
881
881
|
className: "flex items-center gap-4 pt-4",
|
|
882
882
|
children: [
|
|
883
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ jsxs3(Link3, {
|
|
884
884
|
href: "/docs/guides/nextjs-one-endpoint",
|
|
885
885
|
className: "btn-primary",
|
|
886
886
|
children: [
|
|
887
887
|
"Next: Add your first endpoint ",
|
|
888
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx3(ChevronRight2, {
|
|
889
889
|
size: 16
|
|
890
|
-
}
|
|
890
|
+
})
|
|
891
891
|
]
|
|
892
|
-
}
|
|
893
|
-
/* @__PURE__ */
|
|
892
|
+
}),
|
|
893
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
894
894
|
href: "/docs/guides",
|
|
895
895
|
className: "btn-ghost",
|
|
896
896
|
children: "Back to guides"
|
|
897
|
-
}
|
|
897
|
+
})
|
|
898
898
|
]
|
|
899
|
-
}
|
|
899
|
+
})
|
|
900
900
|
]
|
|
901
|
-
}
|
|
901
|
+
});
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
// src/components/docs/guides/GuideDocsPipelinePage.tsx
|
|
905
905
|
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
906
906
|
import Link4 from "@contractspec/lib.ui-link";
|
|
907
907
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
908
|
-
import {
|
|
908
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
909
909
|
function GuideDocsPipelinePage() {
|
|
910
|
-
return /* @__PURE__ */
|
|
910
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
911
911
|
className: "space-y-8",
|
|
912
912
|
children: [
|
|
913
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
914
914
|
className: "space-y-3",
|
|
915
915
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ jsx4("h1", {
|
|
917
917
|
className: "text-4xl font-bold",
|
|
918
918
|
children: "Build the docs pipeline"
|
|
919
|
-
}
|
|
920
|
-
/* @__PURE__ */
|
|
919
|
+
}),
|
|
920
|
+
/* @__PURE__ */ jsx4("p", {
|
|
921
921
|
className: "text-muted-foreground text-lg",
|
|
922
922
|
children: "Generate reference docs, chunk the index, and wire the docs pages the same way this repo does."
|
|
923
|
-
}
|
|
923
|
+
})
|
|
924
924
|
]
|
|
925
|
-
}
|
|
926
|
-
/* @__PURE__ */
|
|
925
|
+
}),
|
|
926
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
927
927
|
className: "card-subtle space-y-4 p-6",
|
|
928
928
|
children: [
|
|
929
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
930
930
|
className: "text-2xl font-bold",
|
|
931
931
|
children: "What you'll build"
|
|
932
|
-
}
|
|
933
|
-
/* @__PURE__ */
|
|
932
|
+
}),
|
|
933
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
934
934
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
935
935
|
children: [
|
|
936
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ jsx4("li", {
|
|
937
937
|
children: "Generated Markdown and a chunked index manifest."
|
|
938
|
-
}
|
|
939
|
-
/* @__PURE__ */
|
|
938
|
+
}),
|
|
939
|
+
/* @__PURE__ */ jsx4("li", {
|
|
940
940
|
children: "Reference routes powered by the docs loader."
|
|
941
|
-
}
|
|
942
|
-
/* @__PURE__ */
|
|
941
|
+
}),
|
|
942
|
+
/* @__PURE__ */ jsx4("li", {
|
|
943
943
|
children: "Versioned outputs you can publish per release."
|
|
944
|
-
}
|
|
944
|
+
})
|
|
945
945
|
]
|
|
946
|
-
}
|
|
946
|
+
})
|
|
947
947
|
]
|
|
948
|
-
}
|
|
949
|
-
/* @__PURE__ */
|
|
948
|
+
}),
|
|
949
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
950
950
|
className: "space-y-6",
|
|
951
951
|
children: [
|
|
952
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
953
953
|
className: "space-y-3",
|
|
954
954
|
children: [
|
|
955
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
956
956
|
className: "text-2xl font-bold",
|
|
957
957
|
children: "1) Generate contract docs"
|
|
958
|
-
}
|
|
959
|
-
/* @__PURE__ */
|
|
958
|
+
}),
|
|
959
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
960
960
|
language: "bash",
|
|
961
961
|
filename: "generate-contract-docs",
|
|
962
962
|
code: `contractspec generate`
|
|
963
|
-
}
|
|
964
|
-
/* @__PURE__ */
|
|
963
|
+
}),
|
|
964
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
965
965
|
className: "text-muted-foreground text-sm",
|
|
966
966
|
children: [
|
|
967
967
|
"Expected output: Markdown in ",
|
|
968
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ jsx4("code", {
|
|
969
969
|
children: "generated/docs"
|
|
970
|
-
}
|
|
970
|
+
}),
|
|
971
971
|
"."
|
|
972
972
|
]
|
|
973
|
-
}
|
|
973
|
+
})
|
|
974
974
|
]
|
|
975
|
-
}
|
|
976
|
-
/* @__PURE__ */
|
|
975
|
+
}),
|
|
976
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
977
977
|
className: "space-y-3",
|
|
978
978
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
980
980
|
className: "text-2xl font-bold",
|
|
981
981
|
children: "2) Build the docs index"
|
|
982
|
-
}
|
|
983
|
-
/* @__PURE__ */
|
|
982
|
+
}),
|
|
983
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
984
984
|
language: "bash",
|
|
985
985
|
filename: "docs-generate",
|
|
986
986
|
code: `bun docs:generate
|
|
987
987
|
# versioned output
|
|
988
988
|
bun docs:generate -- --version v1.0.0`
|
|
989
|
-
}
|
|
990
|
-
/* @__PURE__ */
|
|
989
|
+
}),
|
|
990
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
991
991
|
className: "text-muted-foreground text-sm",
|
|
992
992
|
children: [
|
|
993
993
|
"This writes ",
|
|
994
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ jsx4("code", {
|
|
995
995
|
children: "docs-index.manifest.json"
|
|
996
|
-
}
|
|
996
|
+
}),
|
|
997
997
|
" and chunked",
|
|
998
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ jsx4("code", {
|
|
999
999
|
children: "docs-index.*.json"
|
|
1000
|
-
}
|
|
1000
|
+
}),
|
|
1001
1001
|
" files in the generated docs bundle."
|
|
1002
1002
|
]
|
|
1003
|
-
}
|
|
1003
|
+
})
|
|
1004
1004
|
]
|
|
1005
|
-
}
|
|
1006
|
-
/* @__PURE__ */
|
|
1005
|
+
}),
|
|
1006
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1007
1007
|
className: "space-y-3",
|
|
1008
1008
|
children: [
|
|
1009
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1010
1010
|
className: "text-2xl font-bold",
|
|
1011
1011
|
children: "3) Wire reference routes"
|
|
1012
|
-
}
|
|
1013
|
-
/* @__PURE__ */
|
|
1012
|
+
}),
|
|
1013
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
1014
1014
|
language: "tsx",
|
|
1015
1015
|
filename: "docs-reference-route",
|
|
1016
1016
|
code: `import { notFound } from "next/navigation";
|
|
@@ -1032,247 +1032,247 @@ export default async function Page({ params }: { params: { slug?: string[] } })
|
|
|
1032
1032
|
if (!doc) notFound();
|
|
1033
1033
|
return <DocsReferencePage entry={doc.entry} content={doc.content} />;
|
|
1034
1034
|
}`
|
|
1035
|
-
}
|
|
1036
|
-
/* @__PURE__ */
|
|
1035
|
+
}),
|
|
1036
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
1037
1037
|
className: "text-muted-foreground text-sm",
|
|
1038
1038
|
children: [
|
|
1039
1039
|
"Use the index page on ",
|
|
1040
|
-
/* @__PURE__ */
|
|
1040
|
+
/* @__PURE__ */ jsx4("code", {
|
|
1041
1041
|
children: "/docs/reference"
|
|
1042
|
-
}
|
|
1042
|
+
}),
|
|
1043
1043
|
" to render the searchable list."
|
|
1044
1044
|
]
|
|
1045
|
-
}
|
|
1045
|
+
})
|
|
1046
1046
|
]
|
|
1047
|
-
}
|
|
1048
|
-
/* @__PURE__ */
|
|
1047
|
+
}),
|
|
1048
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1049
1049
|
className: "card-subtle space-y-3 p-6",
|
|
1050
1050
|
children: [
|
|
1051
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1052
1052
|
className: "text-lg font-semibold",
|
|
1053
1053
|
children: "Repo reference"
|
|
1054
|
-
}
|
|
1055
|
-
/* @__PURE__ */
|
|
1054
|
+
}),
|
|
1055
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
1056
1056
|
className: "text-muted-foreground text-sm",
|
|
1057
1057
|
children: [
|
|
1058
1058
|
"This repo wires docs under",
|
|
1059
1059
|
" ",
|
|
1060
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ jsx4("code", {
|
|
1061
1061
|
children: "packages/apps/web-landing/src/app/docs/reference"
|
|
1062
|
-
}
|
|
1062
|
+
}),
|
|
1063
1063
|
"."
|
|
1064
1064
|
]
|
|
1065
|
-
}
|
|
1065
|
+
})
|
|
1066
1066
|
]
|
|
1067
|
-
}
|
|
1068
|
-
/* @__PURE__ */
|
|
1067
|
+
}),
|
|
1068
|
+
/* @__PURE__ */ jsx4(StudioPrompt, {
|
|
1069
1069
|
title: "Need decision-to-export automation?",
|
|
1070
1070
|
body: "Studio exports evidence-backed spec changes and task packs to Linear, Jira, Notion, and GitHub."
|
|
1071
|
-
}
|
|
1071
|
+
})
|
|
1072
1072
|
]
|
|
1073
|
-
}
|
|
1074
|
-
/* @__PURE__ */
|
|
1073
|
+
}),
|
|
1074
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1075
1075
|
className: "flex items-center gap-4 pt-4",
|
|
1076
1076
|
children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ jsxs4(Link4, {
|
|
1078
1078
|
href: "/docs/guides/ci-contract-diff-gating",
|
|
1079
1079
|
className: "btn-primary",
|
|
1080
1080
|
children: [
|
|
1081
1081
|
"Next: CI gating ",
|
|
1082
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ jsx4(ChevronRight3, {
|
|
1083
1083
|
size: 16
|
|
1084
|
-
}
|
|
1084
|
+
})
|
|
1085
1085
|
]
|
|
1086
|
-
}
|
|
1087
|
-
/* @__PURE__ */
|
|
1086
|
+
}),
|
|
1087
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
1088
1088
|
href: "/docs/guides",
|
|
1089
1089
|
className: "btn-ghost",
|
|
1090
1090
|
children: "Back to guides"
|
|
1091
|
-
}
|
|
1091
|
+
})
|
|
1092
1092
|
]
|
|
1093
|
-
}
|
|
1093
|
+
})
|
|
1094
1094
|
]
|
|
1095
|
-
}
|
|
1095
|
+
});
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
1098
1098
|
// src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx
|
|
1099
1099
|
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
|
|
1100
1100
|
import Link5 from "@contractspec/lib.ui-link";
|
|
1101
1101
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
1102
|
-
import {
|
|
1102
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1103
1103
|
function GuideGenerateDocsClientsSchemasPage() {
|
|
1104
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1105
1105
|
className: "space-y-8",
|
|
1106
1106
|
children: [
|
|
1107
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1108
1108
|
className: "space-y-3",
|
|
1109
1109
|
children: [
|
|
1110
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ jsx5("h1", {
|
|
1111
1111
|
className: "text-4xl font-bold",
|
|
1112
1112
|
children: "Generate docs + client schemas"
|
|
1113
|
-
}
|
|
1114
|
-
/* @__PURE__ */
|
|
1113
|
+
}),
|
|
1114
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1115
1115
|
className: "text-muted-foreground text-lg",
|
|
1116
1116
|
children: "Generate docs and OpenAPI output from ContractSpec operations to power SDKs, docs sites, and tooling."
|
|
1117
|
-
}
|
|
1117
|
+
})
|
|
1118
1118
|
]
|
|
1119
|
-
}
|
|
1120
|
-
/* @__PURE__ */
|
|
1119
|
+
}),
|
|
1120
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1121
1121
|
className: "card-subtle space-y-4 p-6",
|
|
1122
1122
|
children: [
|
|
1123
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1124
1124
|
className: "text-2xl font-bold",
|
|
1125
1125
|
children: "What you'll build"
|
|
1126
|
-
}
|
|
1127
|
-
/* @__PURE__ */
|
|
1126
|
+
}),
|
|
1127
|
+
/* @__PURE__ */ jsxs5("ul", {
|
|
1128
1128
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
1129
1129
|
children: [
|
|
1130
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1131
1131
|
children: "Export docs from your specs."
|
|
1132
|
-
}
|
|
1133
|
-
/* @__PURE__ */
|
|
1132
|
+
}),
|
|
1133
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1134
1134
|
children: "Emit OpenAPI 3.1 for client SDK generation."
|
|
1135
|
-
}
|
|
1136
|
-
/* @__PURE__ */
|
|
1135
|
+
}),
|
|
1136
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1137
1137
|
children: "Keep outputs deterministic with CI validation."
|
|
1138
|
-
}
|
|
1138
|
+
})
|
|
1139
1139
|
]
|
|
1140
|
-
}
|
|
1140
|
+
})
|
|
1141
1141
|
]
|
|
1142
|
-
}
|
|
1143
|
-
/* @__PURE__ */
|
|
1142
|
+
}),
|
|
1143
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1144
1144
|
className: "space-y-6",
|
|
1145
1145
|
children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1147
1147
|
className: "space-y-3",
|
|
1148
1148
|
children: [
|
|
1149
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1150
1150
|
className: "text-2xl font-bold",
|
|
1151
1151
|
children: "1) Generate docs"
|
|
1152
|
-
}
|
|
1153
|
-
/* @__PURE__ */
|
|
1152
|
+
}),
|
|
1153
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1154
1154
|
className: "text-muted-foreground text-sm",
|
|
1155
1155
|
children: "Use the generator to emit docs from your contracts."
|
|
1156
|
-
}
|
|
1157
|
-
/* @__PURE__ */
|
|
1156
|
+
}),
|
|
1157
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1158
1158
|
language: "bash",
|
|
1159
1159
|
filename: "generate-docs",
|
|
1160
1160
|
code: `contractspec generate`
|
|
1161
|
-
}
|
|
1162
|
-
/* @__PURE__ */
|
|
1161
|
+
}),
|
|
1162
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1163
1163
|
className: "text-muted-foreground text-sm",
|
|
1164
1164
|
children: [
|
|
1165
1165
|
"Expected output: ",
|
|
1166
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1167
1167
|
children: "Generate X doc files in generated/docs"
|
|
1168
|
-
}
|
|
1168
|
+
}),
|
|
1169
1169
|
"."
|
|
1170
1170
|
]
|
|
1171
|
-
}
|
|
1171
|
+
})
|
|
1172
1172
|
]
|
|
1173
|
-
}
|
|
1174
|
-
/* @__PURE__ */
|
|
1173
|
+
}),
|
|
1174
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1175
1175
|
className: "space-y-3",
|
|
1176
1176
|
children: [
|
|
1177
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1178
1178
|
className: "text-2xl font-bold",
|
|
1179
1179
|
children: "2) Export OpenAPI"
|
|
1180
|
-
}
|
|
1181
|
-
/* @__PURE__ */
|
|
1180
|
+
}),
|
|
1181
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1182
1182
|
className: "text-muted-foreground text-sm",
|
|
1183
1183
|
children: "Export an OpenAPI document from your registry module."
|
|
1184
|
-
}
|
|
1185
|
-
/* @__PURE__ */
|
|
1184
|
+
}),
|
|
1185
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1186
1186
|
language: "bash",
|
|
1187
1187
|
filename: "openapi-export",
|
|
1188
1188
|
code: `contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json`
|
|
1189
|
-
}
|
|
1190
|
-
/* @__PURE__ */
|
|
1189
|
+
}),
|
|
1190
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1191
1191
|
className: "text-muted-foreground text-sm",
|
|
1192
1192
|
children: [
|
|
1193
1193
|
"Expected output:",
|
|
1194
1194
|
" ",
|
|
1195
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1196
1196
|
children: "OpenAPI written to .../generated/openapi.json"
|
|
1197
|
-
}
|
|
1197
|
+
}),
|
|
1198
1198
|
"."
|
|
1199
1199
|
]
|
|
1200
|
-
}
|
|
1200
|
+
})
|
|
1201
1201
|
]
|
|
1202
|
-
}
|
|
1203
|
-
/* @__PURE__ */
|
|
1202
|
+
}),
|
|
1203
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1204
1204
|
className: "space-y-3",
|
|
1205
1205
|
children: [
|
|
1206
|
-
/* @__PURE__ */
|
|
1206
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1207
1207
|
className: "text-2xl font-bold",
|
|
1208
1208
|
children: "3) Validate specs"
|
|
1209
|
-
}
|
|
1210
|
-
/* @__PURE__ */
|
|
1209
|
+
}),
|
|
1210
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1211
1211
|
language: "bash",
|
|
1212
1212
|
filename: "validate-specs",
|
|
1213
1213
|
code: `contractspec validate`
|
|
1214
|
-
}
|
|
1215
|
-
/* @__PURE__ */
|
|
1214
|
+
}),
|
|
1215
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1216
1216
|
className: "text-muted-foreground text-sm",
|
|
1217
1217
|
children: [
|
|
1218
1218
|
"Expected output: ",
|
|
1219
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1220
1220
|
children: "Validation passed"
|
|
1221
|
-
}
|
|
1221
|
+
}),
|
|
1222
1222
|
"."
|
|
1223
1223
|
]
|
|
1224
|
-
}
|
|
1224
|
+
})
|
|
1225
1225
|
]
|
|
1226
|
-
}
|
|
1227
|
-
/* @__PURE__ */
|
|
1226
|
+
}),
|
|
1227
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1228
1228
|
className: "card-subtle space-y-3 p-6",
|
|
1229
1229
|
children: [
|
|
1230
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1231
1231
|
className: "text-lg font-semibold",
|
|
1232
1232
|
children: "Example package"
|
|
1233
|
-
}
|
|
1234
|
-
/* @__PURE__ */
|
|
1233
|
+
}),
|
|
1234
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1235
1235
|
className: "text-muted-foreground text-sm",
|
|
1236
1236
|
children: "The Integration Hub example provides a full registry of operations and is a good source for OpenAPI exports."
|
|
1237
|
-
}
|
|
1238
|
-
/* @__PURE__ */
|
|
1237
|
+
}),
|
|
1238
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1239
1239
|
language: "bash",
|
|
1240
1240
|
filename: "integration-hub-example",
|
|
1241
1241
|
code: `contractspec examples show integration-hub
|
|
1242
1242
|
|
|
1243
1243
|
# openapi export against your registry module
|
|
1244
1244
|
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json`
|
|
1245
|
-
}
|
|
1245
|
+
})
|
|
1246
1246
|
]
|
|
1247
|
-
}
|
|
1248
|
-
/* @__PURE__ */
|
|
1247
|
+
}),
|
|
1248
|
+
/* @__PURE__ */ jsx5(StudioPrompt, {
|
|
1249
1249
|
title: "Want exports tied to product decisions?",
|
|
1250
1250
|
body: "Studio compiles approved changes into deliverables and pushes them to your execution stack with full evidence context."
|
|
1251
|
-
}
|
|
1251
|
+
})
|
|
1252
1252
|
]
|
|
1253
|
-
}
|
|
1254
|
-
/* @__PURE__ */
|
|
1253
|
+
}),
|
|
1254
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1255
1255
|
className: "flex items-center gap-4 pt-4",
|
|
1256
1256
|
children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ jsxs5(Link5, {
|
|
1258
1258
|
href: "/docs/guides/docs-generation-pipeline",
|
|
1259
1259
|
className: "btn-primary",
|
|
1260
1260
|
children: [
|
|
1261
1261
|
"Next: Docs pipeline ",
|
|
1262
|
-
/* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ jsx5(ChevronRight4, {
|
|
1263
1263
|
size: 16
|
|
1264
|
-
}
|
|
1264
|
+
})
|
|
1265
1265
|
]
|
|
1266
|
-
}
|
|
1267
|
-
/* @__PURE__ */
|
|
1266
|
+
}),
|
|
1267
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1268
1268
|
href: "/docs/guides",
|
|
1269
1269
|
className: "btn-ghost",
|
|
1270
1270
|
children: "Back to guides"
|
|
1271
|
-
}
|
|
1271
|
+
})
|
|
1272
1272
|
]
|
|
1273
|
-
}
|
|
1273
|
+
})
|
|
1274
1274
|
]
|
|
1275
|
-
}
|
|
1275
|
+
});
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
1278
|
// src/components/docs/guides/GuideImportExistingCodebasesPage.tsx
|
|
@@ -1285,7 +1285,7 @@ import {
|
|
|
1285
1285
|
Settings,
|
|
1286
1286
|
AlertCircle
|
|
1287
1287
|
} from "lucide-react";
|
|
1288
|
-
import {
|
|
1288
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1289
1289
|
var supportedFrameworks = [
|
|
1290
1290
|
{
|
|
1291
1291
|
name: "NestJS",
|
|
@@ -1324,134 +1324,134 @@ var supportedFrameworks = [
|
|
|
1324
1324
|
}
|
|
1325
1325
|
];
|
|
1326
1326
|
function GuideImportExistingCodebasesPage() {
|
|
1327
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
1328
1328
|
className: "space-y-8",
|
|
1329
1329
|
children: [
|
|
1330
|
-
/* @__PURE__ */
|
|
1330
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1331
1331
|
className: "space-y-3",
|
|
1332
1332
|
children: [
|
|
1333
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ jsx6("h1", {
|
|
1334
1334
|
className: "text-4xl font-bold",
|
|
1335
1335
|
children: "Import Existing Codebases"
|
|
1336
|
-
}
|
|
1337
|
-
/* @__PURE__ */
|
|
1336
|
+
}),
|
|
1337
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1338
1338
|
className: "text-muted-foreground text-lg",
|
|
1339
1339
|
children: "Convert your existing API endpoints into ContractSpec contracts. Auto-detect frameworks, extract schemas, and generate spec-first definitions from your code."
|
|
1340
|
-
}
|
|
1340
|
+
})
|
|
1341
1341
|
]
|
|
1342
|
-
}
|
|
1343
|
-
/* @__PURE__ */
|
|
1342
|
+
}),
|
|
1343
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1344
1344
|
className: "card-subtle space-y-4 p-6",
|
|
1345
1345
|
children: [
|
|
1346
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1347
1347
|
className: "text-2xl font-bold",
|
|
1348
1348
|
children: "What you'll learn"
|
|
1349
|
-
}
|
|
1350
|
-
/* @__PURE__ */
|
|
1349
|
+
}),
|
|
1350
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1351
1351
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
1352
1352
|
children: [
|
|
1353
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1354
1354
|
children: "How to import existing API endpoints as ContractSpec contracts."
|
|
1355
|
-
}
|
|
1356
|
-
/* @__PURE__ */
|
|
1355
|
+
}),
|
|
1356
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1357
1357
|
children: "Framework-specific patterns and auto-detection."
|
|
1358
|
-
}
|
|
1359
|
-
/* @__PURE__ */
|
|
1358
|
+
}),
|
|
1359
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1360
1360
|
children: "Customizing imports with scopes, dry-run, and output options."
|
|
1361
|
-
}
|
|
1362
|
-
/* @__PURE__ */
|
|
1361
|
+
}),
|
|
1362
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1363
1363
|
children: "Registering imported contracts and adding handlers."
|
|
1364
|
-
}
|
|
1364
|
+
})
|
|
1365
1365
|
]
|
|
1366
|
-
}
|
|
1366
|
+
})
|
|
1367
1367
|
]
|
|
1368
|
-
}
|
|
1369
|
-
/* @__PURE__ */
|
|
1368
|
+
}),
|
|
1369
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1370
1370
|
className: "space-y-6",
|
|
1371
1371
|
children: [
|
|
1372
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1373
1373
|
className: "space-y-3",
|
|
1374
1374
|
children: [
|
|
1375
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1376
1376
|
className: "text-2xl font-bold",
|
|
1377
1377
|
children: "Why import existing code?"
|
|
1378
|
-
}
|
|
1379
|
-
/* @__PURE__ */
|
|
1378
|
+
}),
|
|
1379
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1380
1380
|
className: "text-muted-foreground text-sm",
|
|
1381
1381
|
children: "Instead of writing contracts from scratch, the import command extracts endpoint patterns from your existing codebase. This gives you:"
|
|
1382
|
-
}
|
|
1383
|
-
/* @__PURE__ */
|
|
1382
|
+
}),
|
|
1383
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1384
1384
|
className: "text-muted-foreground list-disc space-y-1 pl-5 text-sm",
|
|
1385
1385
|
children: [
|
|
1386
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1387
1387
|
children: "Instant spec coverage for existing APIs"
|
|
1388
|
-
}
|
|
1389
|
-
/* @__PURE__ */
|
|
1388
|
+
}),
|
|
1389
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1390
1390
|
children: "Type-safe schemas derived from your existing types"
|
|
1391
|
-
}
|
|
1392
|
-
/* @__PURE__ */
|
|
1391
|
+
}),
|
|
1392
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1393
1393
|
children: "A foundation to iterate and refine contracts"
|
|
1394
|
-
}
|
|
1395
|
-
/* @__PURE__ */
|
|
1394
|
+
}),
|
|
1395
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1396
1396
|
children: "Gradual adoption without rewriting code"
|
|
1397
|
-
}
|
|
1397
|
+
})
|
|
1398
1398
|
]
|
|
1399
|
-
}
|
|
1399
|
+
})
|
|
1400
1400
|
]
|
|
1401
|
-
}
|
|
1402
|
-
/* @__PURE__ */
|
|
1401
|
+
}),
|
|
1402
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1403
1403
|
className: "space-y-3",
|
|
1404
1404
|
children: [
|
|
1405
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1406
1406
|
className: "text-2xl font-bold",
|
|
1407
1407
|
children: "Supported frameworks"
|
|
1408
|
-
}
|
|
1409
|
-
/* @__PURE__ */
|
|
1408
|
+
}),
|
|
1409
|
+
/* @__PURE__ */ jsx6("div", {
|
|
1410
1410
|
className: "grid gap-3 md:grid-cols-2 lg:grid-cols-3",
|
|
1411
|
-
children: supportedFrameworks.map((fw) => /* @__PURE__ */
|
|
1411
|
+
children: supportedFrameworks.map((fw) => /* @__PURE__ */ jsxs6("div", {
|
|
1412
1412
|
className: "flex items-start gap-3 rounded-lg border border-white/10 p-4",
|
|
1413
1413
|
children: [
|
|
1414
|
-
/* @__PURE__ */
|
|
1414
|
+
/* @__PURE__ */ jsx6(FileCode, {
|
|
1415
1415
|
className: "text-violet-400",
|
|
1416
1416
|
size: 18
|
|
1417
|
-
}
|
|
1418
|
-
/* @__PURE__ */
|
|
1417
|
+
}),
|
|
1418
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1419
1419
|
className: "space-y-1",
|
|
1420
1420
|
children: [
|
|
1421
|
-
/* @__PURE__ */
|
|
1421
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
1422
1422
|
className: "font-semibold",
|
|
1423
1423
|
children: fw.name
|
|
1424
|
-
}
|
|
1425
|
-
/* @__PURE__ */
|
|
1424
|
+
}),
|
|
1425
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1426
1426
|
className: "text-muted-foreground text-xs",
|
|
1427
1427
|
children: fw.description
|
|
1428
|
-
}
|
|
1429
|
-
/* @__PURE__ */
|
|
1428
|
+
}),
|
|
1429
|
+
/* @__PURE__ */ jsxs6("code", {
|
|
1430
1430
|
className: "text-xs text-violet-400",
|
|
1431
1431
|
children: [
|
|
1432
1432
|
"--framework ",
|
|
1433
1433
|
fw.flag
|
|
1434
1434
|
]
|
|
1435
|
-
}
|
|
1435
|
+
})
|
|
1436
1436
|
]
|
|
1437
|
-
}
|
|
1437
|
+
})
|
|
1438
1438
|
]
|
|
1439
|
-
}, fw.flag
|
|
1440
|
-
}
|
|
1439
|
+
}, fw.flag))
|
|
1440
|
+
})
|
|
1441
1441
|
]
|
|
1442
|
-
}
|
|
1443
|
-
/* @__PURE__ */
|
|
1442
|
+
}),
|
|
1443
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1444
1444
|
className: "space-y-3",
|
|
1445
1445
|
children: [
|
|
1446
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1447
1447
|
className: "text-2xl font-bold",
|
|
1448
1448
|
children: "1) Quick start"
|
|
1449
|
-
}
|
|
1450
|
-
/* @__PURE__ */
|
|
1449
|
+
}),
|
|
1450
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1451
1451
|
className: "text-muted-foreground text-sm",
|
|
1452
1452
|
children: "Run the import command to auto-detect your framework and extract endpoints:"
|
|
1453
|
-
}
|
|
1454
|
-
/* @__PURE__ */
|
|
1453
|
+
}),
|
|
1454
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1455
1455
|
language: "bash",
|
|
1456
1456
|
filename: "import-quickstart",
|
|
1457
1457
|
code: `# Auto-detect framework and import all endpoints
|
|
@@ -1462,40 +1462,40 @@ contractspec import ./src --dry-run
|
|
|
1462
1462
|
|
|
1463
1463
|
# Force a specific framework
|
|
1464
1464
|
contractspec import ./src --framework nestjs`
|
|
1465
|
-
}
|
|
1466
|
-
/* @__PURE__ */
|
|
1465
|
+
}),
|
|
1466
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1467
1467
|
className: "text-muted-foreground text-sm",
|
|
1468
1468
|
children: "Expected output: A summary of endpoints found, schemas extracted, and files generated."
|
|
1469
|
-
}
|
|
1469
|
+
})
|
|
1470
1470
|
]
|
|
1471
|
-
}
|
|
1472
|
-
/* @__PURE__ */
|
|
1471
|
+
}),
|
|
1472
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1473
1473
|
className: "space-y-3",
|
|
1474
1474
|
children: [
|
|
1475
|
-
/* @__PURE__ */
|
|
1475
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1476
1476
|
className: "text-2xl font-bold",
|
|
1477
1477
|
children: "2) Framework-specific patterns"
|
|
1478
|
-
}
|
|
1479
|
-
/* @__PURE__ */
|
|
1478
|
+
}),
|
|
1479
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1480
1480
|
className: "text-muted-foreground text-sm",
|
|
1481
1481
|
children: "The import command recognizes these patterns in each framework:"
|
|
1482
|
-
}
|
|
1482
|
+
})
|
|
1483
1483
|
]
|
|
1484
|
-
}
|
|
1485
|
-
/* @__PURE__ */
|
|
1484
|
+
}),
|
|
1485
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1486
1486
|
className: "space-y-3",
|
|
1487
1487
|
children: [
|
|
1488
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1489
1489
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1490
1490
|
children: [
|
|
1491
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1492
1492
|
size: 18,
|
|
1493
1493
|
className: "text-blue-400"
|
|
1494
|
-
}
|
|
1494
|
+
}),
|
|
1495
1495
|
"NestJS"
|
|
1496
1496
|
]
|
|
1497
|
-
}
|
|
1498
|
-
/* @__PURE__ */
|
|
1497
|
+
}),
|
|
1498
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1499
1499
|
language: "typescript",
|
|
1500
1500
|
filename: "src/users/users.controller.ts (before)",
|
|
1501
1501
|
code: `@Controller('users')
|
|
@@ -1511,55 +1511,55 @@ export class UsersController {
|
|
|
1511
1511
|
return this.usersService.create(dto);
|
|
1512
1512
|
}
|
|
1513
1513
|
}`
|
|
1514
|
-
}
|
|
1515
|
-
/* @__PURE__ */
|
|
1514
|
+
}),
|
|
1515
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1516
1516
|
className: "text-muted-foreground text-sm",
|
|
1517
1517
|
children: [
|
|
1518
1518
|
"Detected: ",
|
|
1519
|
-
/* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1520
1520
|
children: "@Controller"
|
|
1521
|
-
}
|
|
1521
|
+
}),
|
|
1522
1522
|
", ",
|
|
1523
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1524
1524
|
children: "@Get"
|
|
1525
|
-
}
|
|
1525
|
+
}),
|
|
1526
1526
|
",",
|
|
1527
1527
|
" ",
|
|
1528
|
-
/* @__PURE__ */
|
|
1528
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1529
1529
|
children: "@Post"
|
|
1530
|
-
}
|
|
1530
|
+
}),
|
|
1531
1531
|
", ",
|
|
1532
|
-
/* @__PURE__ */
|
|
1532
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1533
1533
|
children: "@Body"
|
|
1534
|
-
}
|
|
1534
|
+
}),
|
|
1535
1535
|
", ",
|
|
1536
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1537
1537
|
children: "@Param"
|
|
1538
|
-
}
|
|
1538
|
+
}),
|
|
1539
1539
|
",",
|
|
1540
1540
|
" ",
|
|
1541
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1542
1542
|
children: "@UseGuards"
|
|
1543
|
-
}
|
|
1543
|
+
}),
|
|
1544
1544
|
" decorators."
|
|
1545
1545
|
]
|
|
1546
|
-
}
|
|
1546
|
+
})
|
|
1547
1547
|
]
|
|
1548
|
-
}
|
|
1549
|
-
/* @__PURE__ */
|
|
1548
|
+
}),
|
|
1549
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1550
1550
|
className: "space-y-3",
|
|
1551
1551
|
children: [
|
|
1552
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1553
1553
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1554
1554
|
children: [
|
|
1555
|
-
/* @__PURE__ */
|
|
1555
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1556
1556
|
size: 18,
|
|
1557
1557
|
className: "text-green-400"
|
|
1558
|
-
}
|
|
1558
|
+
}),
|
|
1559
1559
|
"Express"
|
|
1560
1560
|
]
|
|
1561
|
-
}
|
|
1562
|
-
/* @__PURE__ */
|
|
1561
|
+
}),
|
|
1562
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1563
1563
|
language: "typescript",
|
|
1564
1564
|
filename: "src/routes/users.ts (before)",
|
|
1565
1565
|
code: `const router = express.Router();
|
|
@@ -1573,37 +1573,37 @@ router.post('/users', validateBody(CreateUserSchema), async (req, res) => {
|
|
|
1573
1573
|
const user = await createUser(req.body);
|
|
1574
1574
|
res.status(201).json(user);
|
|
1575
1575
|
});`
|
|
1576
|
-
}
|
|
1577
|
-
/* @__PURE__ */
|
|
1576
|
+
}),
|
|
1577
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1578
1578
|
className: "text-muted-foreground text-sm",
|
|
1579
1579
|
children: [
|
|
1580
1580
|
"Detected: ",
|
|
1581
|
-
/* @__PURE__ */
|
|
1581
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1582
1582
|
children: "router.get"
|
|
1583
|
-
}
|
|
1583
|
+
}),
|
|
1584
1584
|
", ",
|
|
1585
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1586
1586
|
children: "router.post"
|
|
1587
|
-
}
|
|
1587
|
+
}),
|
|
1588
1588
|
", validation middleware, Zod schemas."
|
|
1589
1589
|
]
|
|
1590
|
-
}
|
|
1590
|
+
})
|
|
1591
1591
|
]
|
|
1592
|
-
}
|
|
1593
|
-
/* @__PURE__ */
|
|
1592
|
+
}),
|
|
1593
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1594
1594
|
className: "space-y-3",
|
|
1595
1595
|
children: [
|
|
1596
|
-
/* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1597
1597
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1598
1598
|
children: [
|
|
1599
|
-
/* @__PURE__ */
|
|
1599
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1600
1600
|
size: 18,
|
|
1601
1601
|
className: "text-purple-400"
|
|
1602
|
-
}
|
|
1602
|
+
}),
|
|
1603
1603
|
"Next.js API Routes"
|
|
1604
1604
|
]
|
|
1605
|
-
}
|
|
1606
|
-
/* @__PURE__ */
|
|
1605
|
+
}),
|
|
1606
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1607
1607
|
language: "typescript",
|
|
1608
1608
|
filename: "app/api/users/[id]/route.ts (before)",
|
|
1609
1609
|
code: `export async function GET(
|
|
@@ -1619,44 +1619,44 @@ export async function POST(request: Request) {
|
|
|
1619
1619
|
const user = await createUser(body);
|
|
1620
1620
|
return Response.json(user, { status: 201 });
|
|
1621
1621
|
}`
|
|
1622
|
-
}
|
|
1623
|
-
/* @__PURE__ */
|
|
1622
|
+
}),
|
|
1623
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1624
1624
|
className: "text-muted-foreground text-sm",
|
|
1625
1625
|
children: [
|
|
1626
1626
|
"Detected: ",
|
|
1627
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1628
1628
|
children: "GET"
|
|
1629
|
-
}
|
|
1629
|
+
}),
|
|
1630
1630
|
", ",
|
|
1631
|
-
/* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1632
1632
|
children: "POST"
|
|
1633
|
-
}
|
|
1633
|
+
}),
|
|
1634
1634
|
" exports in",
|
|
1635
1635
|
" ",
|
|
1636
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1637
1637
|
children: "app/api/**/route.ts"
|
|
1638
|
-
}
|
|
1638
|
+
}),
|
|
1639
1639
|
" and ",
|
|
1640
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1641
1641
|
children: "pages/api/**/*.ts"
|
|
1642
|
-
}
|
|
1642
|
+
}),
|
|
1643
1643
|
"."
|
|
1644
1644
|
]
|
|
1645
|
-
}
|
|
1645
|
+
})
|
|
1646
1646
|
]
|
|
1647
|
-
}
|
|
1648
|
-
/* @__PURE__ */
|
|
1647
|
+
}),
|
|
1648
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1649
1649
|
className: "space-y-3",
|
|
1650
1650
|
children: [
|
|
1651
|
-
/* @__PURE__ */
|
|
1651
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1652
1652
|
className: "text-2xl font-bold",
|
|
1653
1653
|
children: "3) Understanding generated contracts"
|
|
1654
|
-
}
|
|
1655
|
-
/* @__PURE__ */
|
|
1654
|
+
}),
|
|
1655
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1656
1656
|
className: "text-muted-foreground text-sm",
|
|
1657
1657
|
children: "The import command generates ContractSpec operations with TODO placeholders for fields it cannot infer:"
|
|
1658
|
-
}
|
|
1659
|
-
/* @__PURE__ */
|
|
1658
|
+
}),
|
|
1659
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1660
1660
|
language: "typescript",
|
|
1661
1661
|
filename: ".contractspec/generated/users.operation.ts",
|
|
1662
1662
|
code: `import { defineQuery, defineCommand } from "@contractspec/lib.contracts-spec";
|
|
@@ -1720,187 +1720,187 @@ export const CreateUserCommand = defineCommand({
|
|
|
1720
1720
|
rest: { method: "POST", path: "/users" },
|
|
1721
1721
|
},
|
|
1722
1722
|
});`
|
|
1723
|
-
}
|
|
1723
|
+
})
|
|
1724
1724
|
]
|
|
1725
|
-
}
|
|
1726
|
-
/* @__PURE__ */
|
|
1725
|
+
}),
|
|
1726
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1727
1727
|
className: "space-y-3",
|
|
1728
1728
|
children: [
|
|
1729
|
-
/* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1730
1730
|
className: "text-2xl font-bold",
|
|
1731
1731
|
children: "4) Customizing imports"
|
|
1732
|
-
}
|
|
1733
|
-
/* @__PURE__ */
|
|
1732
|
+
}),
|
|
1733
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1734
1734
|
className: "flex items-center gap-2",
|
|
1735
1735
|
children: [
|
|
1736
|
-
/* @__PURE__ */
|
|
1736
|
+
/* @__PURE__ */ jsx6(Settings, {
|
|
1737
1737
|
size: 18,
|
|
1738
1738
|
className: "text-violet-400"
|
|
1739
|
-
}
|
|
1740
|
-
/* @__PURE__ */
|
|
1739
|
+
}),
|
|
1740
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
1741
1741
|
className: "text-lg font-semibold",
|
|
1742
1742
|
children: "Available options"
|
|
1743
|
-
}
|
|
1743
|
+
})
|
|
1744
1744
|
]
|
|
1745
|
-
}
|
|
1746
|
-
/* @__PURE__ */
|
|
1745
|
+
}),
|
|
1746
|
+
/* @__PURE__ */ jsx6("div", {
|
|
1747
1747
|
className: "overflow-x-auto",
|
|
1748
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ jsxs6("table", {
|
|
1749
1749
|
className: "w-full text-sm",
|
|
1750
1750
|
children: [
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
children: /* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ jsx6("thead", {
|
|
1752
|
+
children: /* @__PURE__ */ jsxs6("tr", {
|
|
1753
1753
|
className: "border-b border-white/10",
|
|
1754
1754
|
children: [
|
|
1755
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1756
1756
|
className: "py-2 pr-4 text-left",
|
|
1757
1757
|
children: "Option"
|
|
1758
|
-
}
|
|
1759
|
-
/* @__PURE__ */
|
|
1758
|
+
}),
|
|
1759
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1760
1760
|
className: "py-2 pr-4 text-left",
|
|
1761
1761
|
children: "Description"
|
|
1762
|
-
}
|
|
1763
|
-
/* @__PURE__ */
|
|
1762
|
+
}),
|
|
1763
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1764
1764
|
className: "py-2 text-left",
|
|
1765
1765
|
children: "Example"
|
|
1766
|
-
}
|
|
1766
|
+
})
|
|
1767
1767
|
]
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
/* @__PURE__ */
|
|
1768
|
+
})
|
|
1769
|
+
}),
|
|
1770
|
+
/* @__PURE__ */ jsxs6("tbody", {
|
|
1771
1771
|
className: "text-muted-foreground",
|
|
1772
1772
|
children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1774
1774
|
className: "border-b border-white/5",
|
|
1775
1775
|
children: [
|
|
1776
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1777
1777
|
className: "py-2 pr-4",
|
|
1778
|
-
children: /* @__PURE__ */
|
|
1778
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1779
1779
|
children: "--scope"
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
/* @__PURE__ */
|
|
1780
|
+
})
|
|
1781
|
+
}),
|
|
1782
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1783
1783
|
className: "py-2 pr-4",
|
|
1784
1784
|
children: "Limit to specific directories"
|
|
1785
|
-
}
|
|
1786
|
-
/* @__PURE__ */
|
|
1785
|
+
}),
|
|
1786
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1787
1787
|
className: "py-2",
|
|
1788
|
-
children: /* @__PURE__ */
|
|
1788
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1789
1789
|
children: "--scope src/users src/auth"
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1790
|
+
})
|
|
1791
|
+
})
|
|
1792
1792
|
]
|
|
1793
|
-
}
|
|
1794
|
-
/* @__PURE__ */
|
|
1793
|
+
}),
|
|
1794
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1795
1795
|
className: "border-b border-white/5",
|
|
1796
1796
|
children: [
|
|
1797
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1798
1798
|
className: "py-2 pr-4",
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1799
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1800
1800
|
children: "--framework"
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
/* @__PURE__ */
|
|
1801
|
+
})
|
|
1802
|
+
}),
|
|
1803
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1804
1804
|
className: "py-2 pr-4",
|
|
1805
1805
|
children: "Force a specific framework"
|
|
1806
|
-
}
|
|
1807
|
-
/* @__PURE__ */
|
|
1806
|
+
}),
|
|
1807
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1808
1808
|
className: "py-2",
|
|
1809
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1810
1810
|
children: "--framework express"
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1811
|
+
})
|
|
1812
|
+
})
|
|
1813
1813
|
]
|
|
1814
|
-
}
|
|
1815
|
-
/* @__PURE__ */
|
|
1814
|
+
}),
|
|
1815
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1816
1816
|
className: "border-b border-white/5",
|
|
1817
1817
|
children: [
|
|
1818
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1819
1819
|
className: "py-2 pr-4",
|
|
1820
|
-
children: /* @__PURE__ */
|
|
1820
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1821
1821
|
children: "--output"
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
/* @__PURE__ */
|
|
1822
|
+
})
|
|
1823
|
+
}),
|
|
1824
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1825
1825
|
className: "py-2 pr-4",
|
|
1826
1826
|
children: "Output directory"
|
|
1827
|
-
}
|
|
1828
|
-
/* @__PURE__ */
|
|
1827
|
+
}),
|
|
1828
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1829
1829
|
className: "py-2",
|
|
1830
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1831
1831
|
children: "--output ./contracts"
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1832
|
+
})
|
|
1833
|
+
})
|
|
1834
1834
|
]
|
|
1835
|
-
}
|
|
1836
|
-
/* @__PURE__ */
|
|
1835
|
+
}),
|
|
1836
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1837
1837
|
className: "border-b border-white/5",
|
|
1838
1838
|
children: [
|
|
1839
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1840
1840
|
className: "py-2 pr-4",
|
|
1841
|
-
children: /* @__PURE__ */
|
|
1841
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1842
1842
|
children: "--dry-run"
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
/* @__PURE__ */
|
|
1843
|
+
})
|
|
1844
|
+
}),
|
|
1845
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1846
1846
|
className: "py-2 pr-4",
|
|
1847
1847
|
children: "Preview without writing files"
|
|
1848
|
-
}
|
|
1849
|
-
/* @__PURE__ */
|
|
1848
|
+
}),
|
|
1849
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1850
1850
|
className: "py-2",
|
|
1851
|
-
children: /* @__PURE__ */
|
|
1851
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1852
1852
|
children: "--dry-run"
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1853
|
+
})
|
|
1854
|
+
})
|
|
1855
1855
|
]
|
|
1856
|
-
}
|
|
1857
|
-
/* @__PURE__ */
|
|
1856
|
+
}),
|
|
1857
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1858
1858
|
className: "border-b border-white/5",
|
|
1859
1859
|
children: [
|
|
1860
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1861
1861
|
className: "py-2 pr-4",
|
|
1862
|
-
children: /* @__PURE__ */
|
|
1862
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1863
1863
|
children: "--analyze"
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
/* @__PURE__ */
|
|
1864
|
+
})
|
|
1865
|
+
}),
|
|
1866
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1867
1867
|
className: "py-2 pr-4",
|
|
1868
1868
|
children: "Analysis only, no code generation"
|
|
1869
|
-
}
|
|
1870
|
-
/* @__PURE__ */
|
|
1869
|
+
}),
|
|
1870
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1871
1871
|
className: "py-2",
|
|
1872
|
-
children: /* @__PURE__ */
|
|
1872
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1873
1873
|
children: "--analyze"
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1874
|
+
})
|
|
1875
|
+
})
|
|
1876
1876
|
]
|
|
1877
|
-
}
|
|
1878
|
-
/* @__PURE__ */
|
|
1877
|
+
}),
|
|
1878
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1879
1879
|
children: [
|
|
1880
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1881
1881
|
className: "py-2 pr-4",
|
|
1882
|
-
children: /* @__PURE__ */
|
|
1882
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1883
1883
|
children: "--json"
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
/* @__PURE__ */
|
|
1884
|
+
})
|
|
1885
|
+
}),
|
|
1886
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1887
1887
|
className: "py-2 pr-4",
|
|
1888
1888
|
children: "Output as JSON for scripting"
|
|
1889
|
-
}
|
|
1890
|
-
/* @__PURE__ */
|
|
1889
|
+
}),
|
|
1890
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1891
1891
|
className: "py-2",
|
|
1892
|
-
children: /* @__PURE__ */
|
|
1892
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1893
1893
|
children: "--json"
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1894
|
+
})
|
|
1895
|
+
})
|
|
1896
1896
|
]
|
|
1897
|
-
}
|
|
1897
|
+
})
|
|
1898
1898
|
]
|
|
1899
|
-
}
|
|
1899
|
+
})
|
|
1900
1900
|
]
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
/* @__PURE__ */
|
|
1901
|
+
})
|
|
1902
|
+
}),
|
|
1903
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1904
1904
|
language: "bash",
|
|
1905
1905
|
filename: "import-options",
|
|
1906
1906
|
code: `# Import only specific modules
|
|
@@ -1914,21 +1914,21 @@ contractspec import ./src --output ./src/contracts/generated
|
|
|
1914
1914
|
|
|
1915
1915
|
# Get JSON for CI/scripting
|
|
1916
1916
|
contractspec import ./src --json > import-result.json`
|
|
1917
|
-
}
|
|
1917
|
+
})
|
|
1918
1918
|
]
|
|
1919
|
-
}
|
|
1920
|
-
/* @__PURE__ */
|
|
1919
|
+
}),
|
|
1920
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1921
1921
|
className: "space-y-3",
|
|
1922
1922
|
children: [
|
|
1923
|
-
/* @__PURE__ */
|
|
1923
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1924
1924
|
className: "text-2xl font-bold",
|
|
1925
1925
|
children: "5) Registering imported contracts"
|
|
1926
|
-
}
|
|
1927
|
-
/* @__PURE__ */
|
|
1926
|
+
}),
|
|
1927
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1928
1928
|
className: "text-muted-foreground text-sm",
|
|
1929
1929
|
children: "After import, register contracts and add handlers:"
|
|
1930
|
-
}
|
|
1931
|
-
/* @__PURE__ */
|
|
1930
|
+
}),
|
|
1931
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1932
1932
|
language: "typescript",
|
|
1933
1933
|
filename: "src/contracts/registry.ts",
|
|
1934
1934
|
code: `import {
|
|
@@ -1952,267 +1952,267 @@ installOp(registry, CreateUserCommand, async (input) => {
|
|
|
1952
1952
|
const user = await db.user.create({ data: input });
|
|
1953
1953
|
return { id: user.id };
|
|
1954
1954
|
});`
|
|
1955
|
-
}
|
|
1955
|
+
})
|
|
1956
1956
|
]
|
|
1957
|
-
}
|
|
1958
|
-
/* @__PURE__ */
|
|
1957
|
+
}),
|
|
1958
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1959
1959
|
className: "space-y-3",
|
|
1960
1960
|
children: [
|
|
1961
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1962
1962
|
className: "text-2xl font-bold",
|
|
1963
1963
|
children: "6) After importing"
|
|
1964
|
-
}
|
|
1965
|
-
/* @__PURE__ */
|
|
1964
|
+
}),
|
|
1965
|
+
/* @__PURE__ */ jsxs6("ol", {
|
|
1966
1966
|
className: "text-muted-foreground list-decimal space-y-2 pl-5 text-sm",
|
|
1967
1967
|
children: [
|
|
1968
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1969
1969
|
children: [
|
|
1970
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1971
1971
|
children: "Review generated contracts"
|
|
1972
|
-
}
|
|
1972
|
+
}),
|
|
1973
1973
|
" \u2014 Check the TODO placeholders and fill in descriptions, owners, and tags."
|
|
1974
1974
|
]
|
|
1975
|
-
}
|
|
1976
|
-
/* @__PURE__ */
|
|
1975
|
+
}),
|
|
1976
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1977
1977
|
children: [
|
|
1978
|
-
/* @__PURE__ */
|
|
1978
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1979
1979
|
children: "Refine schemas"
|
|
1980
|
-
}
|
|
1980
|
+
}),
|
|
1981
1981
|
" \u2014 Add proper types, validation rules, and error definitions."
|
|
1982
1982
|
]
|
|
1983
|
-
}
|
|
1984
|
-
/* @__PURE__ */
|
|
1983
|
+
}),
|
|
1984
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1985
1985
|
children: [
|
|
1986
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1987
1987
|
children: "Run validation"
|
|
1988
|
-
}
|
|
1988
|
+
}),
|
|
1989
1989
|
" \u2014",
|
|
1990
1990
|
" ",
|
|
1991
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1992
1992
|
children: "contractspec validate"
|
|
1993
|
-
}
|
|
1993
|
+
}),
|
|
1994
1994
|
" to ensure contracts are valid."
|
|
1995
1995
|
]
|
|
1996
|
-
}
|
|
1997
|
-
/* @__PURE__ */
|
|
1996
|
+
}),
|
|
1997
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1998
1998
|
children: [
|
|
1999
|
-
/* @__PURE__ */
|
|
1999
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
2000
2000
|
children: "Register and wire handlers"
|
|
2001
|
-
}
|
|
2001
|
+
}),
|
|
2002
2002
|
" \u2014 Connect contracts to your existing business logic."
|
|
2003
2003
|
]
|
|
2004
|
-
}
|
|
2005
|
-
/* @__PURE__ */
|
|
2004
|
+
}),
|
|
2005
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
2006
2006
|
children: [
|
|
2007
|
-
/* @__PURE__ */
|
|
2007
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
2008
2008
|
children: "Iterate"
|
|
2009
|
-
}
|
|
2009
|
+
}),
|
|
2010
2010
|
" \u2014 The imported contracts are a starting point. Refine them as your spec matures."
|
|
2011
2011
|
]
|
|
2012
|
-
}
|
|
2012
|
+
})
|
|
2013
2013
|
]
|
|
2014
|
-
}
|
|
2014
|
+
})
|
|
2015
2015
|
]
|
|
2016
|
-
}
|
|
2017
|
-
/* @__PURE__ */
|
|
2016
|
+
}),
|
|
2017
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2018
2018
|
className: "space-y-3",
|
|
2019
2019
|
children: [
|
|
2020
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ jsxs6("h2", {
|
|
2021
2021
|
className: "flex items-center gap-2 text-2xl font-bold",
|
|
2022
2022
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsx6(AlertCircle, {
|
|
2024
2024
|
size: 20,
|
|
2025
2025
|
className: "text-yellow-400"
|
|
2026
|
-
}
|
|
2026
|
+
}),
|
|
2027
2027
|
"Troubleshooting"
|
|
2028
2028
|
]
|
|
2029
|
-
}
|
|
2030
|
-
/* @__PURE__ */
|
|
2029
|
+
}),
|
|
2030
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2031
2031
|
className: "space-y-4",
|
|
2032
2032
|
children: [
|
|
2033
|
-
/* @__PURE__ */
|
|
2033
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2034
2034
|
className: "card-subtle space-y-2 p-4",
|
|
2035
2035
|
children: [
|
|
2036
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2037
2037
|
className: "font-semibold",
|
|
2038
2038
|
children: "Framework not detected"
|
|
2039
|
-
}
|
|
2040
|
-
/* @__PURE__ */
|
|
2039
|
+
}),
|
|
2040
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2041
2041
|
className: "text-muted-foreground text-sm",
|
|
2042
2042
|
children: [
|
|
2043
2043
|
"Use ",
|
|
2044
|
-
/* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2045
2045
|
children: "--framework <name>"
|
|
2046
|
-
}
|
|
2046
|
+
}),
|
|
2047
2047
|
" to force a specific framework. Check that your entry files follow standard patterns."
|
|
2048
2048
|
]
|
|
2049
|
-
}
|
|
2049
|
+
})
|
|
2050
2050
|
]
|
|
2051
|
-
}
|
|
2052
|
-
/* @__PURE__ */
|
|
2051
|
+
}),
|
|
2052
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2053
2053
|
className: "card-subtle space-y-2 p-4",
|
|
2054
2054
|
children: [
|
|
2055
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2056
2056
|
className: "font-semibold",
|
|
2057
2057
|
children: "Missing schemas"
|
|
2058
|
-
}
|
|
2059
|
-
/* @__PURE__ */
|
|
2058
|
+
}),
|
|
2059
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2060
2060
|
className: "text-muted-foreground text-sm",
|
|
2061
2061
|
children: [
|
|
2062
2062
|
"Schema inference works best with explicit types. If using",
|
|
2063
2063
|
" ",
|
|
2064
|
-
/* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2065
2065
|
children: "any"
|
|
2066
|
-
}
|
|
2066
|
+
}),
|
|
2067
2067
|
" or dynamic types, you'll see TODO placeholders. Fill them in manually."
|
|
2068
2068
|
]
|
|
2069
|
-
}
|
|
2069
|
+
})
|
|
2070
2070
|
]
|
|
2071
|
-
}
|
|
2072
|
-
/* @__PURE__ */
|
|
2071
|
+
}),
|
|
2072
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2073
2073
|
className: "card-subtle space-y-2 p-4",
|
|
2074
2074
|
children: [
|
|
2075
|
-
/* @__PURE__ */
|
|
2075
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2076
2076
|
className: "font-semibold",
|
|
2077
2077
|
children: "Partial imports"
|
|
2078
|
-
}
|
|
2079
|
-
/* @__PURE__ */
|
|
2078
|
+
}),
|
|
2079
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2080
2080
|
className: "text-muted-foreground text-sm",
|
|
2081
2081
|
children: [
|
|
2082
2082
|
"Some endpoints may not be detected if they use unconventional patterns. Use ",
|
|
2083
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2084
2084
|
children: "--analyze"
|
|
2085
|
-
}
|
|
2085
|
+
}),
|
|
2086
2086
|
" to see what was found, then add missing contracts manually."
|
|
2087
2087
|
]
|
|
2088
|
-
}
|
|
2088
|
+
})
|
|
2089
2089
|
]
|
|
2090
|
-
}
|
|
2090
|
+
})
|
|
2091
2091
|
]
|
|
2092
|
-
}
|
|
2092
|
+
})
|
|
2093
2093
|
]
|
|
2094
|
-
}
|
|
2095
|
-
/* @__PURE__ */
|
|
2094
|
+
}),
|
|
2095
|
+
/* @__PURE__ */ jsx6(StudioPrompt, {
|
|
2096
2096
|
title: "Want evidence-driven migration priorities?",
|
|
2097
2097
|
body: "Studio clusters product signals into scored patterns, then proposes spec-first change cards for the highest-impact areas."
|
|
2098
|
-
}
|
|
2098
|
+
})
|
|
2099
2099
|
]
|
|
2100
|
-
}
|
|
2101
|
-
/* @__PURE__ */
|
|
2100
|
+
}),
|
|
2101
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2102
2102
|
className: "flex items-center gap-4 pt-4",
|
|
2103
2103
|
children: [
|
|
2104
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsxs6(Link6, {
|
|
2105
2105
|
href: "/docs/guides/spec-validation-and-typing",
|
|
2106
2106
|
className: "btn-primary",
|
|
2107
2107
|
children: [
|
|
2108
2108
|
"Next: Spec validation + typing ",
|
|
2109
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ jsx6(ChevronRight5, {
|
|
2110
2110
|
size: 16
|
|
2111
|
-
}
|
|
2111
|
+
})
|
|
2112
2112
|
]
|
|
2113
|
-
}
|
|
2114
|
-
/* @__PURE__ */
|
|
2113
|
+
}),
|
|
2114
|
+
/* @__PURE__ */ jsx6(Link6, {
|
|
2115
2115
|
href: "/docs/guides",
|
|
2116
2116
|
className: "btn-ghost",
|
|
2117
2117
|
children: "Back to guides"
|
|
2118
|
-
}
|
|
2118
|
+
})
|
|
2119
2119
|
]
|
|
2120
|
-
}
|
|
2120
|
+
})
|
|
2121
2121
|
]
|
|
2122
|
-
}
|
|
2122
|
+
});
|
|
2123
2123
|
}
|
|
2124
2124
|
|
|
2125
2125
|
// src/components/docs/guides/GuideNextjsOneEndpointPage.tsx
|
|
2126
2126
|
import { CodeBlock as CodeBlock6 } from "@contractspec/lib.design-system";
|
|
2127
2127
|
import Link7 from "@contractspec/lib.ui-link";
|
|
2128
2128
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
2129
|
-
import {
|
|
2129
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2130
2130
|
function GuideNextjsOneEndpointPage() {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2131
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
2132
2132
|
className: "space-y-8",
|
|
2133
2133
|
children: [
|
|
2134
|
-
/* @__PURE__ */
|
|
2134
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2135
2135
|
className: "space-y-3",
|
|
2136
2136
|
children: [
|
|
2137
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsx7("h1", {
|
|
2138
2138
|
className: "text-4xl font-bold",
|
|
2139
2139
|
children: "Next.js: add one endpoint"
|
|
2140
|
-
}
|
|
2141
|
-
/* @__PURE__ */
|
|
2140
|
+
}),
|
|
2141
|
+
/* @__PURE__ */ jsx7("p", {
|
|
2142
2142
|
className: "text-muted-foreground text-lg",
|
|
2143
2143
|
children: "Add ContractSpec to an existing Next.js App Router project by wiring a single operation end-to-end with validation and types."
|
|
2144
|
-
}
|
|
2144
|
+
})
|
|
2145
2145
|
]
|
|
2146
|
-
}
|
|
2147
|
-
/* @__PURE__ */
|
|
2146
|
+
}),
|
|
2147
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2148
2148
|
className: "card-subtle space-y-4 p-6",
|
|
2149
2149
|
children: [
|
|
2150
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2151
2151
|
className: "text-2xl font-bold",
|
|
2152
2152
|
children: "What you'll build"
|
|
2153
|
-
}
|
|
2154
|
-
/* @__PURE__ */
|
|
2153
|
+
}),
|
|
2154
|
+
/* @__PURE__ */ jsxs7("ul", {
|
|
2155
2155
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2156
2156
|
children: [
|
|
2157
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2158
2158
|
children: "One OperationSpec with SchemaModel validation."
|
|
2159
|
-
}
|
|
2160
|
-
/* @__PURE__ */
|
|
2159
|
+
}),
|
|
2160
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2161
2161
|
children: "A registry wiring the operation to its handler."
|
|
2162
|
-
}
|
|
2163
|
-
/* @__PURE__ */
|
|
2162
|
+
}),
|
|
2163
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2164
2164
|
children: "A Next.js route handler that exposes the operation."
|
|
2165
|
-
}
|
|
2165
|
+
})
|
|
2166
2166
|
]
|
|
2167
|
-
}
|
|
2167
|
+
})
|
|
2168
2168
|
]
|
|
2169
|
-
}
|
|
2170
|
-
/* @__PURE__ */
|
|
2169
|
+
}),
|
|
2170
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2171
2171
|
className: "space-y-6",
|
|
2172
2172
|
children: [
|
|
2173
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2174
2174
|
className: "space-y-3",
|
|
2175
2175
|
children: [
|
|
2176
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2177
2177
|
className: "text-2xl font-bold",
|
|
2178
2178
|
children: "1) Install core packages"
|
|
2179
|
-
}
|
|
2180
|
-
/* @__PURE__ */
|
|
2179
|
+
}),
|
|
2180
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2181
2181
|
language: "bash",
|
|
2182
2182
|
filename: "nextjs-install",
|
|
2183
2183
|
code: `bun add -D contractspec
|
|
2184
2184
|
bun add @contractspec/lib.contracts-spec @contractspec/lib.contracts-runtime-server-rest @contractspec/lib.schema`
|
|
2185
|
-
}
|
|
2186
|
-
/* @__PURE__ */
|
|
2185
|
+
}),
|
|
2186
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2187
2187
|
className: "text-muted-foreground text-sm",
|
|
2188
2188
|
children: [
|
|
2189
2189
|
"Expected output: ",
|
|
2190
|
-
/* @__PURE__ */
|
|
2190
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2191
2191
|
children: "added 3 packages"
|
|
2192
|
-
}
|
|
2192
|
+
}),
|
|
2193
2193
|
" and a lockfile update."
|
|
2194
2194
|
]
|
|
2195
|
-
}
|
|
2195
|
+
})
|
|
2196
2196
|
]
|
|
2197
|
-
}
|
|
2198
|
-
/* @__PURE__ */
|
|
2197
|
+
}),
|
|
2198
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2199
2199
|
className: "space-y-3",
|
|
2200
2200
|
children: [
|
|
2201
|
-
/* @__PURE__ */
|
|
2201
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2202
2202
|
className: "text-2xl font-bold",
|
|
2203
2203
|
children: "2) Define the operation spec"
|
|
2204
|
-
}
|
|
2205
|
-
/* @__PURE__ */
|
|
2204
|
+
}),
|
|
2205
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2206
2206
|
className: "text-muted-foreground text-sm",
|
|
2207
2207
|
children: [
|
|
2208
2208
|
"Create ",
|
|
2209
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2210
2210
|
children: "src/contracts/healthcheck.operation.ts"
|
|
2211
|
-
}
|
|
2211
|
+
}),
|
|
2212
2212
|
":"
|
|
2213
2213
|
]
|
|
2214
|
-
}
|
|
2215
|
-
/* @__PURE__ */
|
|
2214
|
+
}),
|
|
2215
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2216
2216
|
language: "typescript",
|
|
2217
2217
|
filename: "src/contracts/healthcheck.operation.ts",
|
|
2218
2218
|
code: `import { defineQuery } from "@contractspec/lib.contracts-spec/operations";
|
|
@@ -2247,27 +2247,27 @@ export const HealthcheckQuery = defineQuery({
|
|
|
2247
2247
|
mcp: { toolName: "healthcheck.get.v1" },
|
|
2248
2248
|
},
|
|
2249
2249
|
});`
|
|
2250
|
-
}
|
|
2250
|
+
})
|
|
2251
2251
|
]
|
|
2252
|
-
}
|
|
2253
|
-
/* @__PURE__ */
|
|
2252
|
+
}),
|
|
2253
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2254
2254
|
className: "space-y-3",
|
|
2255
2255
|
children: [
|
|
2256
|
-
/* @__PURE__ */
|
|
2256
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2257
2257
|
className: "text-2xl font-bold",
|
|
2258
2258
|
children: "3) Register the operation"
|
|
2259
|
-
}
|
|
2260
|
-
/* @__PURE__ */
|
|
2259
|
+
}),
|
|
2260
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2261
2261
|
className: "text-muted-foreground text-sm",
|
|
2262
2262
|
children: [
|
|
2263
2263
|
"Create ",
|
|
2264
|
-
/* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2265
2265
|
children: "src/contracts/registry.ts"
|
|
2266
|
-
}
|
|
2266
|
+
}),
|
|
2267
2267
|
":"
|
|
2268
2268
|
]
|
|
2269
|
-
}
|
|
2270
|
-
/* @__PURE__ */
|
|
2269
|
+
}),
|
|
2270
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2271
2271
|
language: "typescript",
|
|
2272
2272
|
filename: "src/contracts/registry.ts",
|
|
2273
2273
|
code: `import {
|
|
@@ -2282,27 +2282,27 @@ installOp(registry, HealthcheckQuery, async () => ({
|
|
|
2282
2282
|
status: "ok",
|
|
2283
2283
|
checkedAt: new Date().toISOString(),
|
|
2284
2284
|
}));`
|
|
2285
|
-
}
|
|
2285
|
+
})
|
|
2286
2286
|
]
|
|
2287
|
-
}
|
|
2288
|
-
/* @__PURE__ */
|
|
2287
|
+
}),
|
|
2288
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2289
2289
|
className: "space-y-3",
|
|
2290
2290
|
children: [
|
|
2291
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2292
2292
|
className: "text-2xl font-bold",
|
|
2293
2293
|
children: "4) Add the Next.js handler"
|
|
2294
|
-
}
|
|
2295
|
-
/* @__PURE__ */
|
|
2294
|
+
}),
|
|
2295
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2296
2296
|
className: "text-muted-foreground text-sm",
|
|
2297
2297
|
children: [
|
|
2298
2298
|
"Create ",
|
|
2299
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2300
2300
|
children: "app/api/ops/[...route]/route.ts"
|
|
2301
|
-
}
|
|
2301
|
+
}),
|
|
2302
2302
|
":"
|
|
2303
2303
|
]
|
|
2304
|
-
}
|
|
2305
|
-
/* @__PURE__ */
|
|
2304
|
+
}),
|
|
2305
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2306
2306
|
language: "typescript",
|
|
2307
2307
|
filename: "app/api/ops/[...route]/route.ts",
|
|
2308
2308
|
code: `import { makeNextAppHandler } from "@contractspec/lib.contracts-runtime-server-rest/rest-next-app";
|
|
@@ -2314,61 +2314,61 @@ const handler = makeNextAppHandler(registry, async () => ({
|
|
|
2314
2314
|
}));
|
|
2315
2315
|
|
|
2316
2316
|
export { handler as GET, handler as POST };`
|
|
2317
|
-
}
|
|
2318
|
-
/* @__PURE__ */
|
|
2317
|
+
}),
|
|
2318
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2319
2319
|
className: "text-muted-foreground text-sm",
|
|
2320
2320
|
children: [
|
|
2321
2321
|
"Expected output: the route responds at",
|
|
2322
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2323
2323
|
children: " /api/ops/healthcheck.get"
|
|
2324
|
-
}
|
|
2324
|
+
}),
|
|
2325
2325
|
"."
|
|
2326
2326
|
]
|
|
2327
|
-
}
|
|
2327
|
+
})
|
|
2328
2328
|
]
|
|
2329
|
-
}
|
|
2330
|
-
/* @__PURE__ */
|
|
2329
|
+
}),
|
|
2330
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2331
2331
|
className: "space-y-3",
|
|
2332
2332
|
children: [
|
|
2333
|
-
/* @__PURE__ */
|
|
2333
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2334
2334
|
className: "text-2xl font-bold",
|
|
2335
2335
|
children: "5) Validate the spec"
|
|
2336
|
-
}
|
|
2337
|
-
/* @__PURE__ */
|
|
2336
|
+
}),
|
|
2337
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2338
2338
|
language: "bash",
|
|
2339
2339
|
filename: "nextjs-validate",
|
|
2340
2340
|
code: `contractspec validate src/contracts/healthcheck.operation.ts`
|
|
2341
|
-
}
|
|
2342
|
-
/* @__PURE__ */
|
|
2341
|
+
}),
|
|
2342
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2343
2343
|
className: "text-muted-foreground text-sm",
|
|
2344
2344
|
children: [
|
|
2345
2345
|
"Expected output: ",
|
|
2346
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2347
2347
|
children: "Validation passed"
|
|
2348
|
-
}
|
|
2348
|
+
}),
|
|
2349
2349
|
"."
|
|
2350
2350
|
]
|
|
2351
|
-
}
|
|
2351
|
+
})
|
|
2352
2352
|
]
|
|
2353
|
-
}
|
|
2354
|
-
/* @__PURE__ */
|
|
2353
|
+
}),
|
|
2354
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2355
2355
|
className: "card-subtle space-y-3 p-6",
|
|
2356
2356
|
children: [
|
|
2357
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ jsx7("h3", {
|
|
2358
2358
|
className: "text-lg font-semibold",
|
|
2359
2359
|
children: "Example package"
|
|
2360
|
-
}
|
|
2361
|
-
/* @__PURE__ */
|
|
2360
|
+
}),
|
|
2361
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2362
2362
|
className: "text-muted-foreground text-sm",
|
|
2363
2363
|
children: [
|
|
2364
2364
|
"Use ",
|
|
2365
|
-
/* @__PURE__ */
|
|
2365
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2366
2366
|
children: "@contractspec/example.lifecycle-dashboard"
|
|
2367
|
-
}
|
|
2367
|
+
}),
|
|
2368
2368
|
" as a lightweight Next.js snippet reference."
|
|
2369
2369
|
]
|
|
2370
|
-
}
|
|
2371
|
-
/* @__PURE__ */
|
|
2370
|
+
}),
|
|
2371
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2372
2372
|
language: "bash",
|
|
2373
2373
|
filename: "nextjs-example",
|
|
2374
2374
|
code: `# Inspect the example docs
|
|
@@ -2376,105 +2376,105 @@ contractspec examples show lifecycle-dashboard
|
|
|
2376
2376
|
|
|
2377
2377
|
# Validate all example manifests in this repo
|
|
2378
2378
|
contractspec examples validate --repo-root .`
|
|
2379
|
-
}
|
|
2379
|
+
})
|
|
2380
2380
|
]
|
|
2381
|
-
}
|
|
2382
|
-
/* @__PURE__ */
|
|
2381
|
+
}),
|
|
2382
|
+
/* @__PURE__ */ jsx7(StudioPrompt, {
|
|
2383
2383
|
title: "Want real product evidence behind endpoint changes?",
|
|
2384
2384
|
body: "Studio correlates meetings, support, analytics, and code signals before compiling endpoint decisions into spec diffs."
|
|
2385
|
-
}
|
|
2385
|
+
})
|
|
2386
2386
|
]
|
|
2387
|
-
}
|
|
2388
|
-
/* @__PURE__ */
|
|
2387
|
+
}),
|
|
2388
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2389
2389
|
className: "flex items-center gap-4 pt-4",
|
|
2390
2390
|
children: [
|
|
2391
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsxs7(Link7, {
|
|
2392
2392
|
href: "/docs/guides/spec-validation-and-typing",
|
|
2393
2393
|
className: "btn-primary",
|
|
2394
2394
|
children: [
|
|
2395
2395
|
"Next: Spec validation + typing ",
|
|
2396
|
-
/* @__PURE__ */
|
|
2396
|
+
/* @__PURE__ */ jsx7(ChevronRight6, {
|
|
2397
2397
|
size: 16
|
|
2398
|
-
}
|
|
2398
|
+
})
|
|
2399
2399
|
]
|
|
2400
|
-
}
|
|
2401
|
-
/* @__PURE__ */
|
|
2400
|
+
}),
|
|
2401
|
+
/* @__PURE__ */ jsx7(Link7, {
|
|
2402
2402
|
href: "/docs/guides",
|
|
2403
2403
|
className: "btn-ghost",
|
|
2404
2404
|
children: "Back to guides"
|
|
2405
|
-
}
|
|
2405
|
+
})
|
|
2406
2406
|
]
|
|
2407
|
-
}
|
|
2407
|
+
})
|
|
2408
2408
|
]
|
|
2409
|
-
}
|
|
2409
|
+
});
|
|
2410
2410
|
}
|
|
2411
2411
|
|
|
2412
2412
|
// src/components/docs/guides/GuideSpecValidationTypingPage.tsx
|
|
2413
2413
|
import { CodeBlock as CodeBlock7 } from "@contractspec/lib.design-system";
|
|
2414
2414
|
import Link8 from "@contractspec/lib.ui-link";
|
|
2415
2415
|
import { ChevronRight as ChevronRight7 } from "lucide-react";
|
|
2416
|
-
import {
|
|
2416
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2417
2417
|
function GuideSpecValidationTypingPage() {
|
|
2418
|
-
return /* @__PURE__ */
|
|
2418
|
+
return /* @__PURE__ */ jsxs8("div", {
|
|
2419
2419
|
className: "space-y-8",
|
|
2420
2420
|
children: [
|
|
2421
|
-
/* @__PURE__ */
|
|
2421
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2422
2422
|
className: "space-y-3",
|
|
2423
2423
|
children: [
|
|
2424
|
-
/* @__PURE__ */
|
|
2424
|
+
/* @__PURE__ */ jsx8("h1", {
|
|
2425
2425
|
className: "text-4xl font-bold",
|
|
2426
2426
|
children: "Spec-driven validation + typing"
|
|
2427
|
-
}
|
|
2428
|
-
/* @__PURE__ */
|
|
2427
|
+
}),
|
|
2428
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2429
2429
|
className: "text-muted-foreground text-lg",
|
|
2430
2430
|
children: "Define a single operation with SchemaModel, generate validation, and keep your existing handler logic."
|
|
2431
|
-
}
|
|
2431
|
+
})
|
|
2432
2432
|
]
|
|
2433
|
-
}
|
|
2434
|
-
/* @__PURE__ */
|
|
2433
|
+
}),
|
|
2434
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2435
2435
|
className: "card-subtle space-y-4 p-6",
|
|
2436
2436
|
children: [
|
|
2437
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2438
2438
|
className: "text-2xl font-bold",
|
|
2439
2439
|
children: "What you'll build"
|
|
2440
|
-
}
|
|
2441
|
-
/* @__PURE__ */
|
|
2440
|
+
}),
|
|
2441
|
+
/* @__PURE__ */ jsxs8("ul", {
|
|
2442
2442
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2443
2443
|
children: [
|
|
2444
|
-
/* @__PURE__ */
|
|
2444
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2445
2445
|
children: "One command spec with explicit input/output models."
|
|
2446
|
-
}
|
|
2447
|
-
/* @__PURE__ */
|
|
2446
|
+
}),
|
|
2447
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2448
2448
|
children: "Validation + typing without rewriting your service layer."
|
|
2449
|
-
}
|
|
2450
|
-
/* @__PURE__ */
|
|
2449
|
+
}),
|
|
2450
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2451
2451
|
children: "Clear acceptance scenarios for regression safety."
|
|
2452
|
-
}
|
|
2452
|
+
})
|
|
2453
2453
|
]
|
|
2454
|
-
}
|
|
2454
|
+
})
|
|
2455
2455
|
]
|
|
2456
|
-
}
|
|
2457
|
-
/* @__PURE__ */
|
|
2456
|
+
}),
|
|
2457
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2458
2458
|
className: "space-y-6",
|
|
2459
2459
|
children: [
|
|
2460
|
-
/* @__PURE__ */
|
|
2460
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2461
2461
|
className: "space-y-3",
|
|
2462
2462
|
children: [
|
|
2463
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2464
2464
|
className: "text-2xl font-bold",
|
|
2465
2465
|
children: "1) Define the spec"
|
|
2466
|
-
}
|
|
2467
|
-
/* @__PURE__ */
|
|
2466
|
+
}),
|
|
2467
|
+
/* @__PURE__ */ jsxs8("p", {
|
|
2468
2468
|
className: "text-muted-foreground text-sm",
|
|
2469
2469
|
children: [
|
|
2470
2470
|
"Create ",
|
|
2471
|
-
/* @__PURE__ */
|
|
2471
|
+
/* @__PURE__ */ jsx8("code", {
|
|
2472
2472
|
children: "src/contracts/contact-create.operation.ts"
|
|
2473
|
-
}
|
|
2473
|
+
}),
|
|
2474
2474
|
":"
|
|
2475
2475
|
]
|
|
2476
|
-
}
|
|
2477
|
-
/* @__PURE__ */
|
|
2476
|
+
}),
|
|
2477
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2478
2478
|
language: "typescript",
|
|
2479
2479
|
filename: "src/contracts/contact-create.operation.ts",
|
|
2480
2480
|
code: `import { defineCommand } from "@contractspec/lib.contracts-spec/operations";
|
|
@@ -2524,21 +2524,21 @@ export const ContactCreateCommand = defineCommand({
|
|
|
2524
2524
|
],
|
|
2525
2525
|
},
|
|
2526
2526
|
});`
|
|
2527
|
-
}
|
|
2527
|
+
})
|
|
2528
2528
|
]
|
|
2529
|
-
}
|
|
2530
|
-
/* @__PURE__ */
|
|
2529
|
+
}),
|
|
2530
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2531
2531
|
className: "space-y-3",
|
|
2532
2532
|
children: [
|
|
2533
|
-
/* @__PURE__ */
|
|
2533
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2534
2534
|
className: "text-2xl font-bold",
|
|
2535
2535
|
children: "2) Wire the handler"
|
|
2536
|
-
}
|
|
2537
|
-
/* @__PURE__ */
|
|
2536
|
+
}),
|
|
2537
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2538
2538
|
className: "text-muted-foreground text-sm",
|
|
2539
2539
|
children: "Keep your existing code. Just ensure the handler returns the output shape defined above."
|
|
2540
|
-
}
|
|
2541
|
-
/* @__PURE__ */
|
|
2540
|
+
}),
|
|
2541
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2542
2542
|
language: "typescript",
|
|
2543
2543
|
filename: "src/handlers/contact-create.ts",
|
|
2544
2544
|
code: `import { ContactCreateCommand } from "@/contracts/contact-create.operation";
|
|
@@ -2554,45 +2554,45 @@ export const ContactCreateCommand = defineCommand({
|
|
|
2554
2554
|
createdAt: new Date().toISOString(),
|
|
2555
2555
|
};
|
|
2556
2556
|
}`
|
|
2557
|
-
}
|
|
2557
|
+
})
|
|
2558
2558
|
]
|
|
2559
|
-
}
|
|
2560
|
-
/* @__PURE__ */
|
|
2559
|
+
}),
|
|
2560
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2561
2561
|
className: "space-y-3",
|
|
2562
2562
|
children: [
|
|
2563
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2564
2564
|
className: "text-2xl font-bold",
|
|
2565
2565
|
children: "3) Validate"
|
|
2566
|
-
}
|
|
2567
|
-
/* @__PURE__ */
|
|
2566
|
+
}),
|
|
2567
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2568
2568
|
language: "bash",
|
|
2569
2569
|
filename: "spec-validation",
|
|
2570
2570
|
code: `contractspec validate src/contracts/contact-create.operation.ts`
|
|
2571
|
-
}
|
|
2572
|
-
/* @__PURE__ */
|
|
2571
|
+
}),
|
|
2572
|
+
/* @__PURE__ */ jsxs8("p", {
|
|
2573
2573
|
className: "text-muted-foreground text-sm",
|
|
2574
2574
|
children: [
|
|
2575
2575
|
"Expected output: ",
|
|
2576
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsx8("code", {
|
|
2577
2577
|
children: "Validation passed"
|
|
2578
|
-
}
|
|
2578
|
+
}),
|
|
2579
2579
|
"."
|
|
2580
2580
|
]
|
|
2581
|
-
}
|
|
2581
|
+
})
|
|
2582
2582
|
]
|
|
2583
|
-
}
|
|
2584
|
-
/* @__PURE__ */
|
|
2583
|
+
}),
|
|
2584
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2585
2585
|
className: "card-subtle space-y-3 p-6",
|
|
2586
2586
|
children: [
|
|
2587
|
-
/* @__PURE__ */
|
|
2587
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
2588
2588
|
className: "text-lg font-semibold",
|
|
2589
2589
|
children: "Example package"
|
|
2590
|
-
}
|
|
2591
|
-
/* @__PURE__ */
|
|
2590
|
+
}),
|
|
2591
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2592
2592
|
className: "text-muted-foreground text-sm",
|
|
2593
2593
|
children: "The CRM Pipeline example includes real specs, handlers, and presentations for contact + deal flows."
|
|
2594
|
-
}
|
|
2595
|
-
/* @__PURE__ */
|
|
2594
|
+
}),
|
|
2595
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2596
2596
|
language: "bash",
|
|
2597
2597
|
filename: "crm-example",
|
|
2598
2598
|
code: `# Build + validate the CRM pipeline example
|
|
@@ -2600,44 +2600,44 @@ cd packages/examples/crm-pipeline
|
|
|
2600
2600
|
bun install
|
|
2601
2601
|
bun run build
|
|
2602
2602
|
bun run validate`
|
|
2603
|
-
}
|
|
2603
|
+
})
|
|
2604
2604
|
]
|
|
2605
|
-
}
|
|
2606
|
-
/* @__PURE__ */
|
|
2605
|
+
}),
|
|
2606
|
+
/* @__PURE__ */ jsx8(StudioPrompt, {
|
|
2607
2607
|
title: "Need validation tied to real outcomes?",
|
|
2608
2608
|
body: "Studio links checks to evidence, focus decisions, and post-release verification so specs evolve with product truth."
|
|
2609
|
-
}
|
|
2609
|
+
})
|
|
2610
2610
|
]
|
|
2611
|
-
}
|
|
2612
|
-
/* @__PURE__ */
|
|
2611
|
+
}),
|
|
2612
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2613
2613
|
className: "flex items-center gap-4 pt-4",
|
|
2614
2614
|
children: [
|
|
2615
|
-
/* @__PURE__ */
|
|
2615
|
+
/* @__PURE__ */ jsxs8(Link8, {
|
|
2616
2616
|
href: "/docs/guides/generate-docs-clients-schemas",
|
|
2617
2617
|
className: "btn-primary",
|
|
2618
2618
|
children: [
|
|
2619
2619
|
"Next: Generate docs + clients ",
|
|
2620
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsx8(ChevronRight7, {
|
|
2621
2621
|
size: 16
|
|
2622
|
-
}
|
|
2622
|
+
})
|
|
2623
2623
|
]
|
|
2624
|
-
}
|
|
2625
|
-
/* @__PURE__ */
|
|
2624
|
+
}),
|
|
2625
|
+
/* @__PURE__ */ jsx8(Link8, {
|
|
2626
2626
|
href: "/docs/guides",
|
|
2627
2627
|
className: "btn-ghost",
|
|
2628
2628
|
children: "Back to guides"
|
|
2629
|
-
}
|
|
2629
|
+
})
|
|
2630
2630
|
]
|
|
2631
|
-
}
|
|
2631
|
+
})
|
|
2632
2632
|
]
|
|
2633
|
-
}
|
|
2633
|
+
});
|
|
2634
2634
|
}
|
|
2635
2635
|
|
|
2636
2636
|
// src/components/docs/guides/GuidesIndexPage.tsx
|
|
2637
2637
|
import { CodeBlock as CodeBlock8 } from "@contractspec/lib.design-system";
|
|
2638
2638
|
import Link9 from "@contractspec/lib.ui-link";
|
|
2639
2639
|
import { ArrowRight, BookOpen, CheckCircle2 } from "lucide-react";
|
|
2640
|
-
import {
|
|
2640
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2641
2641
|
var guides = [
|
|
2642
2642
|
{
|
|
2643
2643
|
title: "Contract types overview",
|
|
@@ -2683,89 +2683,89 @@ var guides = [
|
|
|
2683
2683
|
}
|
|
2684
2684
|
];
|
|
2685
2685
|
function GuidesIndexPage() {
|
|
2686
|
-
return /* @__PURE__ */
|
|
2686
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
2687
2687
|
className: "space-y-10",
|
|
2688
2688
|
children: [
|
|
2689
|
-
/* @__PURE__ */
|
|
2689
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2690
2690
|
className: "space-y-3",
|
|
2691
2691
|
children: [
|
|
2692
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ jsx9("h1", {
|
|
2693
2693
|
className: "text-4xl font-bold",
|
|
2694
2694
|
children: "Guides"
|
|
2695
|
-
}
|
|
2696
|
-
/* @__PURE__ */
|
|
2695
|
+
}),
|
|
2696
|
+
/* @__PURE__ */ jsx9("p", {
|
|
2697
2697
|
className: "text-muted-foreground text-lg",
|
|
2698
2698
|
children: "Hands-on guides with commands, expected output, and CI-verified example packages."
|
|
2699
|
-
}
|
|
2699
|
+
})
|
|
2700
2700
|
]
|
|
2701
|
-
}
|
|
2702
|
-
/* @__PURE__ */
|
|
2701
|
+
}),
|
|
2702
|
+
/* @__PURE__ */ jsx9("div", {
|
|
2703
2703
|
className: "grid gap-4 md:grid-cols-2",
|
|
2704
|
-
children: guides.map((guide) => /* @__PURE__ */
|
|
2704
|
+
children: guides.map((guide) => /* @__PURE__ */ jsxs9(Link9, {
|
|
2705
2705
|
href: guide.href,
|
|
2706
2706
|
className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
|
|
2707
2707
|
children: [
|
|
2708
|
-
/* @__PURE__ */
|
|
2708
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2709
2709
|
className: "flex items-center justify-between",
|
|
2710
2710
|
children: [
|
|
2711
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ jsx9("h2", {
|
|
2712
2712
|
className: "text-xl font-semibold transition-colors group-hover:text-violet-400",
|
|
2713
2713
|
children: guide.title
|
|
2714
|
-
}
|
|
2715
|
-
/* @__PURE__ */
|
|
2714
|
+
}),
|
|
2715
|
+
/* @__PURE__ */ jsx9(ArrowRight, {
|
|
2716
2716
|
className: "text-violet-400",
|
|
2717
2717
|
size: 18
|
|
2718
|
-
}
|
|
2718
|
+
})
|
|
2719
2719
|
]
|
|
2720
|
-
}
|
|
2721
|
-
/* @__PURE__ */
|
|
2720
|
+
}),
|
|
2721
|
+
/* @__PURE__ */ jsx9("p", {
|
|
2722
2722
|
className: "text-muted-foreground text-sm",
|
|
2723
2723
|
children: guide.description
|
|
2724
|
-
}
|
|
2725
|
-
/* @__PURE__ */
|
|
2724
|
+
}),
|
|
2725
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2726
2726
|
className: "text-muted-foreground flex items-center gap-2 text-xs",
|
|
2727
2727
|
children: [
|
|
2728
|
-
/* @__PURE__ */
|
|
2728
|
+
/* @__PURE__ */ jsx9(CheckCircle2, {
|
|
2729
2729
|
size: 14
|
|
2730
|
-
}
|
|
2731
|
-
/* @__PURE__ */
|
|
2730
|
+
}),
|
|
2731
|
+
/* @__PURE__ */ jsxs9("span", {
|
|
2732
2732
|
children: [
|
|
2733
2733
|
"Target time: ",
|
|
2734
2734
|
guide.time
|
|
2735
2735
|
]
|
|
2736
|
-
}
|
|
2736
|
+
})
|
|
2737
2737
|
]
|
|
2738
|
-
}
|
|
2738
|
+
})
|
|
2739
2739
|
]
|
|
2740
|
-
}, guide.href
|
|
2741
|
-
}
|
|
2742
|
-
/* @__PURE__ */
|
|
2740
|
+
}, guide.href))
|
|
2741
|
+
}),
|
|
2742
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2743
2743
|
className: "card-subtle space-y-4 p-6",
|
|
2744
2744
|
children: [
|
|
2745
|
-
/* @__PURE__ */
|
|
2745
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2746
2746
|
className: "flex items-center gap-2 text-sm font-semibold tracking-[0.2em] text-violet-400 uppercase",
|
|
2747
2747
|
children: [
|
|
2748
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ jsx9(BookOpen, {
|
|
2749
2749
|
size: 16
|
|
2750
|
-
}
|
|
2750
|
+
}),
|
|
2751
2751
|
"How to use the guides"
|
|
2752
2752
|
]
|
|
2753
|
-
}
|
|
2754
|
-
/* @__PURE__ */
|
|
2753
|
+
}),
|
|
2754
|
+
/* @__PURE__ */ jsxs9("ul", {
|
|
2755
2755
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2756
2756
|
children: [
|
|
2757
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2758
2758
|
children: "Run each guide in a fresh branch or sandbox workspace."
|
|
2759
|
-
}
|
|
2760
|
-
/* @__PURE__ */
|
|
2759
|
+
}),
|
|
2760
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2761
2761
|
children: "Use the linked example package to validate end-to-end."
|
|
2762
|
-
}
|
|
2763
|
-
/* @__PURE__ */
|
|
2762
|
+
}),
|
|
2763
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2764
2764
|
children: "Keep the commands as written to match CI expectations."
|
|
2765
|
-
}
|
|
2765
|
+
})
|
|
2766
2766
|
]
|
|
2767
|
-
}
|
|
2768
|
-
/* @__PURE__ */
|
|
2767
|
+
}),
|
|
2768
|
+
/* @__PURE__ */ jsx9(CodeBlock8, {
|
|
2769
2769
|
language: "bash",
|
|
2770
2770
|
filename: "guides-quickstart",
|
|
2771
2771
|
code: `# list all examples
|
|
@@ -2773,11 +2773,11 @@ contractspec examples list
|
|
|
2773
2773
|
|
|
2774
2774
|
# validate example packages in this repo
|
|
2775
2775
|
contractspec examples validate --repo-root .`
|
|
2776
|
-
}
|
|
2776
|
+
})
|
|
2777
2777
|
]
|
|
2778
|
-
}
|
|
2778
|
+
})
|
|
2779
2779
|
]
|
|
2780
|
-
}
|
|
2780
|
+
});
|
|
2781
2781
|
}
|
|
2782
2782
|
|
|
2783
2783
|
// src/components/docs/guides/guides.docblocks.ts
|